@fluidframework/tree 2.0.0-dev-rc.2.0.0.246488 → 2.0.0-dev-rc.3.0.0.250606

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 (1462) hide show
  1. package/.eslintrc.cjs +2 -0
  2. package/api-report/tree.api.md +20 -29
  3. package/dist/codec/codec.d.ts +1 -1
  4. package/dist/codec/codec.d.ts.map +1 -1
  5. package/dist/codec/codec.js.map +1 -1
  6. package/dist/codec/discriminatedUnions.d.ts.map +1 -1
  7. package/dist/codec/discriminatedUnions.js.map +1 -1
  8. package/dist/codec/versioned/codec.d.ts +1 -1
  9. package/dist/codec/versioned/codec.d.ts.map +1 -1
  10. package/dist/codec/versioned/codec.js.map +1 -1
  11. package/dist/core/change-family/changeFamily.d.ts +2 -2
  12. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  13. package/dist/core/change-family/changeFamily.js.map +1 -1
  14. package/dist/core/forest/editableForest.d.ts +1 -1
  15. package/dist/core/forest/editableForest.d.ts.map +1 -1
  16. package/dist/core/forest/editableForest.js.map +1 -1
  17. package/dist/core/forest/forest.d.ts +5 -1
  18. package/dist/core/forest/forest.d.ts.map +1 -1
  19. package/dist/core/forest/forest.js.map +1 -1
  20. package/dist/core/rebase/types.d.ts.map +1 -1
  21. package/dist/core/rebase/types.js.map +1 -1
  22. package/dist/core/rebase/utils.d.ts.map +1 -1
  23. package/dist/core/rebase/utils.js.map +1 -1
  24. package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  25. package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  26. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  27. package/dist/core/tree/anchorSet.d.ts +2 -2
  28. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  29. package/dist/core/tree/anchorSet.js.map +1 -1
  30. package/dist/core/tree/deltaUtil.d.ts +1 -1
  31. package/dist/core/tree/deltaUtil.d.ts.map +1 -1
  32. package/dist/core/tree/deltaUtil.js.map +1 -1
  33. package/dist/core/tree/detachedFieldIndex.d.ts +2 -2
  34. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  35. package/dist/core/tree/detachedFieldIndex.js +11 -11
  36. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  37. package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  38. package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
  39. package/dist/core/tree/sparseTree.d.ts.map +1 -1
  40. package/dist/core/tree/sparseTree.js.map +1 -1
  41. package/dist/core/tree/types.d.ts +1 -1
  42. package/dist/core/tree/types.d.ts.map +1 -1
  43. package/dist/core/tree/types.js +7 -7
  44. package/dist/core/tree/types.js.map +1 -1
  45. package/dist/core/tree/visitDelta.d.ts +2 -2
  46. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  47. package/dist/core/tree/visitDelta.js +38 -13
  48. package/dist/core/tree/visitDelta.js.map +1 -1
  49. package/dist/core/tree/visitPath.d.ts +1 -1
  50. package/dist/core/tree/visitPath.d.ts.map +1 -1
  51. package/dist/core/tree/visitPath.js.map +1 -1
  52. package/dist/core/tree/visitorUtils.d.ts +4 -4
  53. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  54. package/dist/core/tree/visitorUtils.js.map +1 -1
  55. package/dist/domains/json/jsonCursor.d.ts.map +1 -1
  56. package/dist/domains/json/jsonCursor.js.map +1 -1
  57. package/dist/domains/json/jsonDomainSchema.js.map +1 -1
  58. package/dist/domains/leafDomain.d.ts.map +1 -1
  59. package/dist/domains/leafDomain.js +8 -8
  60. package/dist/domains/leafDomain.js.map +1 -1
  61. package/dist/domains/nodeKey/nodeKeySchema.d.ts.map +1 -1
  62. package/dist/domains/nodeKey/nodeKeySchema.js.map +1 -1
  63. package/dist/domains/schemaBuilder.d.ts +1 -1
  64. package/dist/domains/schemaBuilder.d.ts.map +1 -1
  65. package/dist/domains/schemaBuilder.js.map +1 -1
  66. package/dist/domains/testRecursiveDomain.d.ts.map +1 -1
  67. package/dist/domains/testRecursiveDomain.js.map +1 -1
  68. package/dist/external-utilities/typeboxValidator.js.map +1 -1
  69. package/dist/feature-libraries/changeAtomIdCodec.d.ts +1 -1
  70. package/dist/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
  71. package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
  72. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts +2 -2
  73. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  74. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  75. package/dist/feature-libraries/chunked-forest/chunk.d.ts +1 -1
  76. package/dist/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
  77. package/dist/feature-libraries/chunked-forest/chunk.js.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +2 -2
  79. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  80. package/dist/feature-libraries/chunked-forest/chunkTree.js +2 -2
  81. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  82. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -2
  83. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  84. package/dist/feature-libraries/chunked-forest/chunkedForest.js +10 -9
  85. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  86. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +2 -2
  87. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
  88. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  89. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  90. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  91. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +5 -5
  92. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  93. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
  94. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  95. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  96. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
  97. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  98. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  99. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +2 -2
  100. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  101. package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  102. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  103. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +3 -3
  104. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  105. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  106. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  107. package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts +2 -2
  108. package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
  109. package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
  110. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts +3 -3
  111. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +1 -1
  112. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +1 -1
  113. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  114. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  115. package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
  116. package/dist/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
  117. package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
  118. package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  119. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +2 -2
  120. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  121. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  122. package/dist/feature-libraries/contextuallyTyped.d.ts +5 -5
  123. package/dist/feature-libraries/contextuallyTyped.d.ts.map +1 -1
  124. package/dist/feature-libraries/contextuallyTyped.js +11 -11
  125. package/dist/feature-libraries/contextuallyTyped.js.map +1 -1
  126. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +2 -2
  127. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  128. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +3 -3
  129. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  130. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +3 -3
  131. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  132. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +7 -7
  133. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  134. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -1
  135. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  136. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +1 -1
  137. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  138. package/dist/feature-libraries/fieldGenerator.d.ts +1 -1
  139. package/dist/feature-libraries/fieldGenerator.d.ts.map +1 -1
  140. package/dist/feature-libraries/fieldGenerator.js.map +1 -1
  141. package/dist/feature-libraries/flex-tree/context.d.ts +8 -4
  142. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  143. package/dist/feature-libraries/flex-tree/context.js +7 -7
  144. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  145. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +17 -29
  146. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  147. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +8 -6
  148. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  149. package/dist/feature-libraries/flex-tree/index.d.ts +2 -2
  150. package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
  151. package/dist/feature-libraries/flex-tree/index.js +2 -2
  152. package/dist/feature-libraries/flex-tree/index.js.map +1 -1
  153. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts +2 -6
  154. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  155. package/dist/feature-libraries/flex-tree/lazyEntity.js +3 -11
  156. package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  157. package/dist/feature-libraries/flex-tree/lazyField.d.ts +4 -4
  158. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  159. package/dist/feature-libraries/flex-tree/lazyField.js +20 -20
  160. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  161. package/dist/feature-libraries/flex-tree/lazyNode.d.ts +6 -6
  162. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  163. package/dist/feature-libraries/flex-tree/lazyNode.js +34 -55
  164. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  165. package/dist/feature-libraries/flex-tree/treeEvents.d.ts +20 -20
  166. package/dist/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  167. package/dist/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  168. package/dist/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
  169. package/dist/feature-libraries/flex-tree/unboxed.js +1 -1
  170. package/dist/feature-libraries/flex-tree/unboxed.js.map +1 -1
  171. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -3
  172. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  173. package/dist/feature-libraries/forest-summary/forestSummarizer.js +9 -9
  174. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  175. package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
  176. package/dist/feature-libraries/forest-summary/format.js +4 -4
  177. package/dist/feature-libraries/forest-summary/format.js.map +1 -1
  178. package/dist/feature-libraries/index.d.ts +1 -1
  179. package/dist/feature-libraries/index.d.ts.map +1 -1
  180. package/dist/feature-libraries/index.js +2 -2
  181. package/dist/feature-libraries/index.js.map +1 -1
  182. package/dist/feature-libraries/mapTreeCursor.d.ts +1 -1
  183. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  184. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  185. package/dist/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
  186. package/dist/feature-libraries/modular-schema/comparison.d.ts +1 -1
  187. package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  188. package/dist/feature-libraries/modular-schema/comparison.js +17 -17
  189. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  190. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +2 -2
  191. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  192. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  193. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  194. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
  195. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  196. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  197. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  198. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  199. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +1 -1
  200. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  201. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  202. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +1 -1
  203. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  204. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  205. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +1 -1
  206. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  207. package/dist/feature-libraries/modular-schema/isNeverTree.js +7 -7
  208. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  209. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  210. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  211. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  212. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -8
  213. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  214. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +14 -12
  215. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  216. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +1 -1
  217. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  218. package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
  219. package/dist/feature-libraries/node-key/nodeKey.d.ts +1 -1
  220. package/dist/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
  221. package/dist/feature-libraries/node-key/nodeKey.js.map +1 -1
  222. package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts +2 -2
  223. package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts.map +1 -1
  224. package/dist/feature-libraries/node-key/nodeKeyIndex.js +1 -1
  225. package/dist/feature-libraries/node-key/nodeKeyIndex.js.map +1 -1
  226. package/dist/feature-libraries/node-key/nodeKeyManager.d.ts +1 -1
  227. package/dist/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
  228. package/dist/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
  229. package/dist/feature-libraries/object-forest/objectForest.d.ts +1 -1
  230. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  231. package/dist/feature-libraries/object-forest/objectForest.js +10 -9
  232. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  233. package/dist/feature-libraries/optional-field/optionalField.d.ts +3 -3
  234. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  235. package/dist/feature-libraries/optional-field/optionalField.js +1 -1
  236. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  237. package/dist/feature-libraries/optional-field/optionalFieldChangeFormat.d.ts.map +1 -1
  238. package/dist/feature-libraries/optional-field/optionalFieldChangeFormat.js.map +1 -1
  239. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  240. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +1 -1
  241. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  242. package/dist/feature-libraries/schema-aware/schemaAware.d.ts +2 -2
  243. package/dist/feature-libraries/schema-aware/schemaAware.d.ts.map +1 -1
  244. package/dist/feature-libraries/schema-aware/schemaAware.js.map +1 -1
  245. package/dist/feature-libraries/schema-index/codec.d.ts +1 -1
  246. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  247. package/dist/feature-libraries/schema-index/codec.js +10 -10
  248. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  249. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
  250. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  251. package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -1
  252. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  253. package/dist/feature-libraries/schemaBuilder.d.ts +1 -1
  254. package/dist/feature-libraries/schemaBuilder.d.ts.map +1 -1
  255. package/dist/feature-libraries/schemaBuilder.js +1 -1
  256. package/dist/feature-libraries/schemaBuilder.js.map +1 -1
  257. package/dist/feature-libraries/schemaBuilderBase.d.ts +1 -1
  258. package/dist/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
  259. package/dist/feature-libraries/schemaBuilderBase.js +15 -15
  260. package/dist/feature-libraries/schemaBuilderBase.js.map +1 -1
  261. package/dist/feature-libraries/sequence-field/compose.d.ts +1 -1
  262. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  263. package/dist/feature-libraries/sequence-field/compose.js +2 -2
  264. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  265. package/dist/feature-libraries/sequence-field/format.js +14 -14
  266. package/dist/feature-libraries/sequence-field/format.js.map +1 -1
  267. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +1 -1
  268. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  269. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  270. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  271. package/dist/feature-libraries/sequence-field/invert.js +2 -2
  272. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  273. package/dist/feature-libraries/sequence-field/markQueue.d.ts +1 -1
  274. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  275. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  276. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +2 -2
  277. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  278. package/dist/feature-libraries/sequence-field/moveEffectTable.js +5 -5
  279. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  280. package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  281. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  282. package/dist/feature-libraries/sequence-field/rebase.d.ts +1 -1
  283. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  284. package/dist/feature-libraries/sequence-field/rebase.js +5 -5
  285. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  286. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  287. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts +1 -1
  288. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  289. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +1 -1
  290. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  291. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +2 -2
  292. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
  293. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +1 -1
  294. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
  295. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  296. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  297. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js +6 -6
  298. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  299. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  300. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  301. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  302. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +1 -1
  303. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  304. package/dist/feature-libraries/sequence-field/utils.d.ts +2 -2
  305. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  306. package/dist/feature-libraries/sequence-field/utils.js +1 -1
  307. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  308. package/dist/feature-libraries/storedToViewSchema.d.ts +2 -2
  309. package/dist/feature-libraries/storedToViewSchema.d.ts.map +1 -1
  310. package/dist/feature-libraries/storedToViewSchema.js.map +1 -1
  311. package/dist/feature-libraries/treeCursorUtils.d.ts +1 -1
  312. package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  313. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  314. package/dist/feature-libraries/treeTextCursor.d.ts +1 -1
  315. package/dist/feature-libraries/treeTextCursor.d.ts.map +1 -1
  316. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  317. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
  318. package/dist/feature-libraries/typed-schema/schemaCollection.js +1 -1
  319. package/dist/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
  320. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +2 -2
  321. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  322. package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  323. package/dist/feature-libraries/typed-schema/view.d.ts +1 -1
  324. package/dist/feature-libraries/typed-schema/view.d.ts.map +1 -1
  325. package/dist/feature-libraries/typed-schema/view.js +10 -10
  326. package/dist/feature-libraries/typed-schema/view.js.map +1 -1
  327. package/dist/feature-libraries/valueUtilities.d.ts +1 -1
  328. package/dist/feature-libraries/valueUtilities.d.ts.map +1 -1
  329. package/dist/feature-libraries/valueUtilities.js.map +1 -1
  330. package/dist/index.d.ts +2 -2
  331. package/dist/index.d.ts.map +1 -1
  332. package/dist/index.js +2 -2
  333. package/dist/index.js.map +1 -1
  334. package/dist/packageVersion.d.ts +1 -1
  335. package/dist/packageVersion.js +1 -1
  336. package/dist/packageVersion.js.map +1 -1
  337. package/dist/shared-tree/schematizeTree.d.ts +1 -1
  338. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  339. package/dist/shared-tree/schematizeTree.js.map +1 -1
  340. package/dist/shared-tree/schematizingTreeView.d.ts +2 -2
  341. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  342. package/dist/shared-tree/schematizingTreeView.js +11 -11
  343. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  344. package/dist/shared-tree/sharedTree.d.ts +5 -5
  345. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  346. package/dist/shared-tree/sharedTree.js +10 -8
  347. package/dist/shared-tree/sharedTree.js.map +1 -1
  348. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +2 -2
  349. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  350. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  351. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  352. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  353. package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  354. package/dist/shared-tree/treeApi.d.ts.map +1 -1
  355. package/dist/shared-tree/treeApi.js +7 -7
  356. package/dist/shared-tree/treeApi.js.map +1 -1
  357. package/dist/shared-tree/treeCheckout.d.ts +2 -2
  358. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  359. package/dist/shared-tree/treeCheckout.js +24 -24
  360. package/dist/shared-tree/treeCheckout.js.map +1 -1
  361. package/dist/shared-tree/treeView.d.ts +3 -3
  362. package/dist/shared-tree/treeView.d.ts.map +1 -1
  363. package/dist/shared-tree/treeView.js.map +1 -1
  364. package/dist/shared-tree-core/branch.d.ts +1 -1
  365. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  366. package/dist/shared-tree-core/branch.js +1 -1
  367. package/dist/shared-tree-core/branch.js.map +1 -1
  368. package/dist/shared-tree-core/editManager.d.ts +2 -2
  369. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  370. package/dist/shared-tree-core/editManager.js +25 -25
  371. package/dist/shared-tree-core/editManager.js.map +1 -1
  372. package/dist/shared-tree-core/editManagerFormat.d.ts +2 -2
  373. package/dist/shared-tree-core/editManagerFormat.d.ts.map +1 -1
  374. package/dist/shared-tree-core/editManagerFormat.js +7 -7
  375. package/dist/shared-tree-core/editManagerFormat.js.map +1 -1
  376. package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  377. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  378. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  379. package/dist/shared-tree-core/messageCodecs.d.ts +1 -1
  380. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  381. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  382. package/dist/shared-tree-core/messageFormat.d.ts +2 -2
  383. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  384. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  385. package/dist/shared-tree-core/sharedTreeCore.d.ts +2 -2
  386. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  387. package/dist/shared-tree-core/sharedTreeCore.js +1 -1
  388. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  389. package/dist/simple-tree/index.d.ts +1 -1
  390. package/dist/simple-tree/index.d.ts.map +1 -1
  391. package/dist/simple-tree/index.js +2 -2
  392. package/dist/simple-tree/index.js.map +1 -1
  393. package/dist/simple-tree/leafNodeSchema.d.ts +11 -0
  394. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -0
  395. package/dist/simple-tree/leafNodeSchema.js +51 -0
  396. package/dist/simple-tree/leafNodeSchema.js.map +1 -0
  397. package/dist/simple-tree/proxies.d.ts +34 -39
  398. package/dist/simple-tree/proxies.d.ts.map +1 -1
  399. package/dist/simple-tree/proxies.js +193 -235
  400. package/dist/simple-tree/proxies.js.map +1 -1
  401. package/dist/simple-tree/proxyBinding.d.ts +42 -0
  402. package/dist/simple-tree/proxyBinding.d.ts.map +1 -0
  403. package/dist/simple-tree/proxyBinding.js +172 -0
  404. package/dist/simple-tree/proxyBinding.js.map +1 -0
  405. package/dist/simple-tree/rawNode.d.ts +5 -4
  406. package/dist/simple-tree/rawNode.d.ts.map +1 -1
  407. package/dist/simple-tree/rawNode.js +5 -3
  408. package/dist/simple-tree/rawNode.js.map +1 -1
  409. package/dist/simple-tree/schemaCreationUtilities.d.ts.map +1 -1
  410. package/dist/simple-tree/schemaCreationUtilities.js.map +1 -1
  411. package/dist/simple-tree/schemaFactory.d.ts +3 -5
  412. package/dist/simple-tree/schemaFactory.d.ts.map +1 -1
  413. package/dist/simple-tree/schemaFactory.js +66 -87
  414. package/dist/simple-tree/schemaFactory.js.map +1 -1
  415. package/dist/simple-tree/schemaFactoryRecursive.d.ts +1 -1
  416. package/dist/simple-tree/schemaFactoryRecursive.d.ts.map +1 -1
  417. package/dist/simple-tree/schemaFactoryRecursive.js +1 -1
  418. package/dist/simple-tree/schemaFactoryRecursive.js.map +1 -1
  419. package/dist/simple-tree/schemaTypes.d.ts +2 -2
  420. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  421. package/dist/simple-tree/schemaTypes.js.map +1 -1
  422. package/dist/simple-tree/testRecursiveDomain.d.ts +1 -1
  423. package/dist/simple-tree/testRecursiveDomain.d.ts.map +1 -1
  424. package/dist/simple-tree/testRecursiveDomain.js.map +1 -1
  425. package/dist/simple-tree/toFlexSchema.d.ts +3 -12
  426. package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
  427. package/dist/simple-tree/toFlexSchema.js +8 -7
  428. package/dist/simple-tree/toFlexSchema.js.map +1 -1
  429. package/dist/simple-tree/toMapTree.d.ts +2 -2
  430. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  431. package/dist/simple-tree/toMapTree.js.map +1 -1
  432. package/dist/simple-tree/tree.d.ts +1 -1
  433. package/dist/simple-tree/tree.d.ts.map +1 -1
  434. package/dist/simple-tree/tree.js.map +1 -1
  435. package/dist/simple-tree/treeApi.d.ts +1 -1
  436. package/dist/simple-tree/treeApi.d.ts.map +1 -1
  437. package/dist/simple-tree/treeApi.js +7 -7
  438. package/dist/simple-tree/treeApi.js.map +1 -1
  439. package/dist/simple-tree/treeArrayNode.d.ts +3 -3
  440. package/dist/simple-tree/treeArrayNode.d.ts.map +1 -1
  441. package/dist/simple-tree/treeArrayNode.js.map +1 -1
  442. package/dist/simple-tree/types.d.ts +1 -1
  443. package/dist/simple-tree/types.d.ts.map +1 -1
  444. package/dist/simple-tree/types.js.map +1 -1
  445. package/dist/simple-tree/typesUnsafe.d.ts +1 -1
  446. package/dist/simple-tree/typesUnsafe.d.ts.map +1 -1
  447. package/dist/simple-tree/typesUnsafe.js.map +1 -1
  448. package/dist/tree-alpha.d.ts +9 -21
  449. package/dist/tree-beta.d.ts +9 -21
  450. package/dist/tree-public.d.ts +8 -20
  451. package/dist/tree-untrimmed.d.ts +135 -141
  452. package/dist/treeFactory.d.ts +31 -14
  453. package/dist/treeFactory.d.ts.map +1 -1
  454. package/dist/treeFactory.js +50 -23
  455. package/dist/treeFactory.js.map +1 -1
  456. package/dist/util/nestedSet.d.ts.map +1 -1
  457. package/dist/util/nestedSet.js.map +1 -1
  458. package/dist/util/opaque.d.ts +1 -1
  459. package/dist/util/opaque.d.ts.map +1 -1
  460. package/dist/util/opaque.js.map +1 -1
  461. package/dist/util/typeCheckTests.d.ts +1 -1
  462. package/dist/util/typeCheckTests.d.ts.map +1 -1
  463. package/dist/util/typeCheckTests.js.map +1 -1
  464. package/docs/main/schema2.md +3 -3
  465. package/docs/main/tree-content-apis.md +5 -5
  466. package/docs/roadmap.md +4 -4
  467. package/lib/codec/codec.d.ts +1 -1
  468. package/lib/codec/codec.d.ts.map +1 -1
  469. package/lib/codec/codec.js +1 -1
  470. package/lib/codec/codec.js.map +1 -1
  471. package/lib/codec/discriminatedUnions.d.ts.map +1 -1
  472. package/lib/codec/discriminatedUnions.js.map +1 -1
  473. package/lib/codec/versioned/codec.d.ts +1 -1
  474. package/lib/codec/versioned/codec.d.ts.map +1 -1
  475. package/lib/codec/versioned/codec.js.map +1 -1
  476. package/lib/core/change-family/changeFamily.d.ts +2 -2
  477. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  478. package/lib/core/change-family/changeFamily.js.map +1 -1
  479. package/lib/core/forest/editableForest.d.ts +1 -1
  480. package/lib/core/forest/editableForest.d.ts.map +1 -1
  481. package/lib/core/forest/editableForest.js +1 -1
  482. package/lib/core/forest/editableForest.js.map +1 -1
  483. package/lib/core/forest/forest.d.ts +5 -1
  484. package/lib/core/forest/forest.d.ts.map +1 -1
  485. package/lib/core/forest/forest.js.map +1 -1
  486. package/lib/core/rebase/types.d.ts.map +1 -1
  487. package/lib/core/rebase/types.js.map +1 -1
  488. package/lib/core/rebase/utils.d.ts.map +1 -1
  489. package/lib/core/rebase/utils.js.map +1 -1
  490. package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  491. package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  492. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  493. package/lib/core/tree/anchorSet.d.ts +2 -2
  494. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  495. package/lib/core/tree/anchorSet.js +1 -1
  496. package/lib/core/tree/anchorSet.js.map +1 -1
  497. package/lib/core/tree/deltaUtil.d.ts +1 -1
  498. package/lib/core/tree/deltaUtil.d.ts.map +1 -1
  499. package/lib/core/tree/deltaUtil.js.map +1 -1
  500. package/lib/core/tree/detachedFieldIndex.d.ts +2 -2
  501. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  502. package/lib/core/tree/detachedFieldIndex.js +1 -1
  503. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  504. package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  505. package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
  506. package/lib/core/tree/sparseTree.d.ts.map +1 -1
  507. package/lib/core/tree/sparseTree.js.map +1 -1
  508. package/lib/core/tree/types.d.ts +1 -1
  509. package/lib/core/tree/types.d.ts.map +1 -1
  510. package/lib/core/tree/types.js +1 -1
  511. package/lib/core/tree/types.js.map +1 -1
  512. package/lib/core/tree/visitDelta.d.ts +2 -2
  513. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  514. package/lib/core/tree/visitDelta.js +38 -13
  515. package/lib/core/tree/visitDelta.js.map +1 -1
  516. package/lib/core/tree/visitPath.d.ts +1 -1
  517. package/lib/core/tree/visitPath.d.ts.map +1 -1
  518. package/lib/core/tree/visitPath.js.map +1 -1
  519. package/lib/core/tree/visitorUtils.d.ts +4 -4
  520. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  521. package/lib/core/tree/visitorUtils.js.map +1 -1
  522. package/lib/domains/json/jsonCursor.d.ts.map +1 -1
  523. package/lib/domains/json/jsonCursor.js.map +1 -1
  524. package/lib/domains/json/jsonDomainSchema.js.map +1 -1
  525. package/lib/domains/leafDomain.d.ts.map +1 -1
  526. package/lib/domains/leafDomain.js +1 -1
  527. package/lib/domains/leafDomain.js.map +1 -1
  528. package/lib/domains/nodeKey/nodeKeySchema.d.ts.map +1 -1
  529. package/lib/domains/nodeKey/nodeKeySchema.js +1 -1
  530. package/lib/domains/nodeKey/nodeKeySchema.js.map +1 -1
  531. package/lib/domains/schemaBuilder.d.ts +1 -1
  532. package/lib/domains/schemaBuilder.d.ts.map +1 -1
  533. package/lib/domains/schemaBuilder.js +1 -1
  534. package/lib/domains/schemaBuilder.js.map +1 -1
  535. package/lib/domains/testRecursiveDomain.d.ts.map +1 -1
  536. package/lib/domains/testRecursiveDomain.js +1 -1
  537. package/lib/domains/testRecursiveDomain.js.map +1 -1
  538. package/lib/external-utilities/typeboxValidator.js.map +1 -1
  539. package/lib/feature-libraries/changeAtomIdCodec.d.ts +1 -1
  540. package/lib/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
  541. package/lib/feature-libraries/changeAtomIdCodec.js.map +1 -1
  542. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts +2 -2
  543. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  544. package/lib/feature-libraries/chunked-forest/basicChunk.js +2 -2
  545. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  546. package/lib/feature-libraries/chunked-forest/chunk.d.ts +1 -1
  547. package/lib/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
  548. package/lib/feature-libraries/chunked-forest/chunk.js.map +1 -1
  549. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +2 -2
  550. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  551. package/lib/feature-libraries/chunked-forest/chunkTree.js +3 -3
  552. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  553. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -2
  554. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  555. package/lib/feature-libraries/chunked-forest/chunkedForest.js +3 -2
  556. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  557. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +2 -2
  558. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
  559. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  560. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  561. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  562. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +2 -2
  563. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  564. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
  565. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  566. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  567. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
  568. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  569. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  570. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +2 -2
  571. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  572. package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  573. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  574. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +3 -3
  575. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  576. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  577. package/lib/feature-libraries/chunked-forest/codec/format.js +1 -1
  578. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  579. package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts +2 -2
  580. package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
  581. package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
  582. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts +3 -3
  583. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +1 -1
  584. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js +1 -1
  585. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +1 -1
  586. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  587. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  588. package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
  589. package/lib/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
  590. package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
  591. package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  592. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +2 -2
  593. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  594. package/lib/feature-libraries/chunked-forest/uniformChunk.js +2 -2
  595. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  596. package/lib/feature-libraries/contextuallyTyped.d.ts +5 -5
  597. package/lib/feature-libraries/contextuallyTyped.d.ts.map +1 -1
  598. package/lib/feature-libraries/contextuallyTyped.js +4 -4
  599. package/lib/feature-libraries/contextuallyTyped.js.map +1 -1
  600. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +2 -2
  601. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  602. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +3 -3
  603. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  604. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +3 -3
  605. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  606. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +3 -3
  607. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  608. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -1
  609. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  610. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +1 -1
  611. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  612. package/lib/feature-libraries/fieldGenerator.d.ts +1 -1
  613. package/lib/feature-libraries/fieldGenerator.d.ts.map +1 -1
  614. package/lib/feature-libraries/fieldGenerator.js.map +1 -1
  615. package/lib/feature-libraries/flex-tree/context.d.ts +8 -4
  616. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  617. package/lib/feature-libraries/flex-tree/context.js +3 -3
  618. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  619. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +17 -29
  620. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  621. package/lib/feature-libraries/flex-tree/flexTreeTypes.js +7 -5
  622. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  623. package/lib/feature-libraries/flex-tree/index.d.ts +2 -2
  624. package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
  625. package/lib/feature-libraries/flex-tree/index.js +1 -1
  626. package/lib/feature-libraries/flex-tree/index.js.map +1 -1
  627. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +2 -6
  628. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  629. package/lib/feature-libraries/flex-tree/lazyEntity.js +2 -9
  630. package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  631. package/lib/feature-libraries/flex-tree/lazyField.d.ts +4 -4
  632. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  633. package/lib/feature-libraries/flex-tree/lazyField.js +6 -6
  634. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  635. package/lib/feature-libraries/flex-tree/lazyNode.d.ts +6 -6
  636. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  637. package/lib/feature-libraries/flex-tree/lazyNode.js +26 -47
  638. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  639. package/lib/feature-libraries/flex-tree/treeEvents.d.ts +20 -20
  640. package/lib/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  641. package/lib/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  642. package/lib/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
  643. package/lib/feature-libraries/flex-tree/unboxed.js +1 -1
  644. package/lib/feature-libraries/flex-tree/unboxed.js.map +1 -1
  645. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -3
  646. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  647. package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -2
  648. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  649. package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
  650. package/lib/feature-libraries/forest-summary/format.js +1 -1
  651. package/lib/feature-libraries/forest-summary/format.js.map +1 -1
  652. package/lib/feature-libraries/index.d.ts +1 -1
  653. package/lib/feature-libraries/index.d.ts.map +1 -1
  654. package/lib/feature-libraries/index.js +1 -1
  655. package/lib/feature-libraries/index.js.map +1 -1
  656. package/lib/feature-libraries/mapTreeCursor.d.ts +1 -1
  657. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  658. package/lib/feature-libraries/mapTreeCursor.js +1 -1
  659. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  660. package/lib/feature-libraries/memoizedIdRangeAllocator.js +1 -1
  661. package/lib/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
  662. package/lib/feature-libraries/modular-schema/comparison.d.ts +1 -1
  663. package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  664. package/lib/feature-libraries/modular-schema/comparison.js +1 -1
  665. package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
  666. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +2 -2
  667. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  668. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  669. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  670. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
  671. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  672. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  673. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  674. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  675. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +1 -1
  676. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  677. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  678. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +1 -1
  679. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  680. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  681. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +1 -1
  682. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  683. package/lib/feature-libraries/modular-schema/isNeverTree.js +1 -1
  684. package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  685. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  686. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  687. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  688. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -8
  689. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  690. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +16 -14
  691. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  692. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +1 -1
  693. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  694. package/lib/feature-libraries/modular-schema/modularChangeFormat.js +2 -2
  695. package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
  696. package/lib/feature-libraries/node-key/nodeKey.d.ts +1 -1
  697. package/lib/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
  698. package/lib/feature-libraries/node-key/nodeKey.js.map +1 -1
  699. package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts +2 -2
  700. package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts.map +1 -1
  701. package/lib/feature-libraries/node-key/nodeKeyIndex.js +1 -1
  702. package/lib/feature-libraries/node-key/nodeKeyIndex.js.map +1 -1
  703. package/lib/feature-libraries/node-key/nodeKeyManager.d.ts +1 -1
  704. package/lib/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
  705. package/lib/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
  706. package/lib/feature-libraries/object-forest/objectForest.d.ts +1 -1
  707. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  708. package/lib/feature-libraries/object-forest/objectForest.js +5 -4
  709. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  710. package/lib/feature-libraries/optional-field/optionalField.d.ts +3 -3
  711. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  712. package/lib/feature-libraries/optional-field/optionalField.js +2 -2
  713. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  714. package/lib/feature-libraries/optional-field/optionalFieldChangeFormat.d.ts.map +1 -1
  715. package/lib/feature-libraries/optional-field/optionalFieldChangeFormat.js.map +1 -1
  716. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  717. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +1 -1
  718. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  719. package/lib/feature-libraries/schema-aware/schemaAware.d.ts +2 -2
  720. package/lib/feature-libraries/schema-aware/schemaAware.d.ts.map +1 -1
  721. package/lib/feature-libraries/schema-aware/schemaAware.js.map +1 -1
  722. package/lib/feature-libraries/schema-index/codec.d.ts +1 -1
  723. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  724. package/lib/feature-libraries/schema-index/codec.js +2 -2
  725. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  726. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
  727. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  728. package/lib/feature-libraries/schema-index/schemaSummarizer.js +1 -1
  729. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  730. package/lib/feature-libraries/schemaBuilder.d.ts +1 -1
  731. package/lib/feature-libraries/schemaBuilder.d.ts.map +1 -1
  732. package/lib/feature-libraries/schemaBuilder.js +1 -1
  733. package/lib/feature-libraries/schemaBuilder.js.map +1 -1
  734. package/lib/feature-libraries/schemaBuilderBase.d.ts +1 -1
  735. package/lib/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
  736. package/lib/feature-libraries/schemaBuilderBase.js +1 -1
  737. package/lib/feature-libraries/schemaBuilderBase.js.map +1 -1
  738. package/lib/feature-libraries/sequence-field/compose.d.ts +1 -1
  739. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  740. package/lib/feature-libraries/sequence-field/compose.js +4 -4
  741. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  742. package/lib/feature-libraries/sequence-field/format.js +1 -1
  743. package/lib/feature-libraries/sequence-field/format.js.map +1 -1
  744. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +1 -1
  745. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  746. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  747. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  748. package/lib/feature-libraries/sequence-field/invert.js +2 -2
  749. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  750. package/lib/feature-libraries/sequence-field/markQueue.d.ts +1 -1
  751. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  752. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  753. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +2 -2
  754. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  755. package/lib/feature-libraries/sequence-field/moveEffectTable.js +1 -1
  756. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  757. package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  758. package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
  759. package/lib/feature-libraries/sequence-field/rebase.d.ts +1 -1
  760. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  761. package/lib/feature-libraries/sequence-field/rebase.js +5 -5
  762. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  763. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +1 -1
  764. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  765. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts +1 -1
  766. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  767. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +1 -1
  768. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  769. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +2 -2
  770. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
  771. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +1 -1
  772. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
  773. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  774. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  775. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js +2 -2
  776. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  777. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  778. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  779. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  780. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +2 -2
  781. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  782. package/lib/feature-libraries/sequence-field/utils.d.ts +2 -2
  783. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  784. package/lib/feature-libraries/sequence-field/utils.js +2 -2
  785. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  786. package/lib/feature-libraries/storedToViewSchema.d.ts +2 -2
  787. package/lib/feature-libraries/storedToViewSchema.d.ts.map +1 -1
  788. package/lib/feature-libraries/storedToViewSchema.js +1 -1
  789. package/lib/feature-libraries/storedToViewSchema.js.map +1 -1
  790. package/lib/feature-libraries/treeCursorUtils.d.ts +1 -1
  791. package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  792. package/lib/feature-libraries/treeCursorUtils.js +1 -1
  793. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  794. package/lib/feature-libraries/treeTextCursor.d.ts +1 -1
  795. package/lib/feature-libraries/treeTextCursor.d.ts.map +1 -1
  796. package/lib/feature-libraries/treeTextCursor.js +1 -1
  797. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  798. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
  799. package/lib/feature-libraries/typed-schema/schemaCollection.js +2 -2
  800. package/lib/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
  801. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +2 -2
  802. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  803. package/lib/feature-libraries/typed-schema/typedTreeSchema.js +3 -3
  804. package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  805. package/lib/feature-libraries/typed-schema/view.d.ts +1 -1
  806. package/lib/feature-libraries/typed-schema/view.d.ts.map +1 -1
  807. package/lib/feature-libraries/typed-schema/view.js +1 -1
  808. package/lib/feature-libraries/typed-schema/view.js.map +1 -1
  809. package/lib/feature-libraries/valueUtilities.d.ts +1 -1
  810. package/lib/feature-libraries/valueUtilities.d.ts.map +1 -1
  811. package/lib/feature-libraries/valueUtilities.js.map +1 -1
  812. package/lib/index.d.ts +2 -2
  813. package/lib/index.d.ts.map +1 -1
  814. package/lib/index.js +1 -1
  815. package/lib/index.js.map +1 -1
  816. package/lib/packageVersion.d.ts +1 -1
  817. package/lib/packageVersion.js +1 -1
  818. package/lib/packageVersion.js.map +1 -1
  819. package/lib/shared-tree/schematizeTree.d.ts +1 -1
  820. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  821. package/lib/shared-tree/schematizeTree.js +2 -2
  822. package/lib/shared-tree/schematizeTree.js.map +1 -1
  823. package/lib/shared-tree/schematizingTreeView.d.ts +2 -2
  824. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  825. package/lib/shared-tree/schematizingTreeView.js +3 -3
  826. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  827. package/lib/shared-tree/sharedTree.d.ts +5 -5
  828. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  829. package/lib/shared-tree/sharedTree.js +9 -7
  830. package/lib/shared-tree/sharedTree.js.map +1 -1
  831. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +2 -2
  832. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  833. package/lib/shared-tree/sharedTreeChangeCodecs.js +1 -1
  834. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  835. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  836. package/lib/shared-tree/sharedTreeChangeFamily.js +1 -1
  837. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  838. package/lib/shared-tree/sharedTreeChangeFormat.js +1 -1
  839. package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  840. package/lib/shared-tree/treeApi.d.ts.map +1 -1
  841. package/lib/shared-tree/treeApi.js +2 -2
  842. package/lib/shared-tree/treeApi.js.map +1 -1
  843. package/lib/shared-tree/treeCheckout.d.ts +2 -2
  844. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  845. package/lib/shared-tree/treeCheckout.js +2 -2
  846. package/lib/shared-tree/treeCheckout.js.map +1 -1
  847. package/lib/shared-tree/treeView.d.ts +3 -3
  848. package/lib/shared-tree/treeView.d.ts.map +1 -1
  849. package/lib/shared-tree/treeView.js.map +1 -1
  850. package/lib/shared-tree-core/branch.d.ts +1 -1
  851. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  852. package/lib/shared-tree-core/branch.js +2 -2
  853. package/lib/shared-tree-core/branch.js.map +1 -1
  854. package/lib/shared-tree-core/editManager.d.ts +2 -2
  855. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  856. package/lib/shared-tree-core/editManager.js +4 -4
  857. package/lib/shared-tree-core/editManager.js.map +1 -1
  858. package/lib/shared-tree-core/editManagerFormat.d.ts +2 -2
  859. package/lib/shared-tree-core/editManagerFormat.d.ts.map +1 -1
  860. package/lib/shared-tree-core/editManagerFormat.js +1 -1
  861. package/lib/shared-tree-core/editManagerFormat.js.map +1 -1
  862. package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  863. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  864. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  865. package/lib/shared-tree-core/messageCodecs.d.ts +1 -1
  866. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  867. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  868. package/lib/shared-tree-core/messageFormat.d.ts +2 -2
  869. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  870. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  871. package/lib/shared-tree-core/sharedTreeCore.d.ts +2 -2
  872. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  873. package/lib/shared-tree-core/sharedTreeCore.js +1 -1
  874. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  875. package/lib/simple-tree/index.d.ts +1 -1
  876. package/lib/simple-tree/index.d.ts.map +1 -1
  877. package/lib/simple-tree/index.js +1 -1
  878. package/lib/simple-tree/index.js.map +1 -1
  879. package/lib/simple-tree/leafNodeSchema.d.ts +11 -0
  880. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -0
  881. package/lib/simple-tree/leafNodeSchema.js +48 -0
  882. package/lib/simple-tree/leafNodeSchema.js.map +1 -0
  883. package/lib/simple-tree/proxies.d.ts +34 -39
  884. package/lib/simple-tree/proxies.d.ts.map +1 -1
  885. package/lib/simple-tree/proxies.js +171 -214
  886. package/lib/simple-tree/proxies.js.map +1 -1
  887. package/lib/simple-tree/proxyBinding.d.ts +42 -0
  888. package/lib/simple-tree/proxyBinding.d.ts.map +1 -0
  889. package/lib/simple-tree/proxyBinding.js +164 -0
  890. package/lib/simple-tree/proxyBinding.js.map +1 -0
  891. package/lib/simple-tree/rawNode.d.ts +5 -4
  892. package/lib/simple-tree/rawNode.d.ts.map +1 -1
  893. package/lib/simple-tree/rawNode.js +6 -4
  894. package/lib/simple-tree/rawNode.js.map +1 -1
  895. package/lib/simple-tree/schemaCreationUtilities.d.ts.map +1 -1
  896. package/lib/simple-tree/schemaCreationUtilities.js.map +1 -1
  897. package/lib/simple-tree/schemaFactory.d.ts +3 -5
  898. package/lib/simple-tree/schemaFactory.d.ts.map +1 -1
  899. package/lib/simple-tree/schemaFactory.js +48 -68
  900. package/lib/simple-tree/schemaFactory.js.map +1 -1
  901. package/lib/simple-tree/schemaFactoryRecursive.d.ts +1 -1
  902. package/lib/simple-tree/schemaFactoryRecursive.d.ts.map +1 -1
  903. package/lib/simple-tree/schemaFactoryRecursive.js +1 -1
  904. package/lib/simple-tree/schemaFactoryRecursive.js.map +1 -1
  905. package/lib/simple-tree/schemaTypes.d.ts +2 -2
  906. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  907. package/lib/simple-tree/schemaTypes.js.map +1 -1
  908. package/lib/simple-tree/testRecursiveDomain.d.ts +1 -1
  909. package/lib/simple-tree/testRecursiveDomain.d.ts.map +1 -1
  910. package/lib/simple-tree/testRecursiveDomain.js.map +1 -1
  911. package/lib/simple-tree/toFlexSchema.d.ts +3 -12
  912. package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
  913. package/lib/simple-tree/toFlexSchema.js +10 -8
  914. package/lib/simple-tree/toFlexSchema.js.map +1 -1
  915. package/lib/simple-tree/toMapTree.d.ts +2 -2
  916. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  917. package/lib/simple-tree/toMapTree.js +1 -1
  918. package/lib/simple-tree/toMapTree.js.map +1 -1
  919. package/lib/simple-tree/tree.d.ts +1 -1
  920. package/lib/simple-tree/tree.d.ts.map +1 -1
  921. package/lib/simple-tree/tree.js.map +1 -1
  922. package/lib/simple-tree/treeApi.d.ts +1 -1
  923. package/lib/simple-tree/treeApi.d.ts.map +1 -1
  924. package/lib/simple-tree/treeApi.js +3 -3
  925. package/lib/simple-tree/treeApi.js.map +1 -1
  926. package/lib/simple-tree/treeArrayNode.d.ts +3 -3
  927. package/lib/simple-tree/treeArrayNode.d.ts.map +1 -1
  928. package/lib/simple-tree/treeArrayNode.js.map +1 -1
  929. package/lib/simple-tree/types.d.ts +1 -1
  930. package/lib/simple-tree/types.d.ts.map +1 -1
  931. package/lib/simple-tree/types.js.map +1 -1
  932. package/lib/simple-tree/typesUnsafe.d.ts +1 -1
  933. package/lib/simple-tree/typesUnsafe.d.ts.map +1 -1
  934. package/lib/simple-tree/typesUnsafe.js.map +1 -1
  935. package/lib/test/codec/ajvValidator.cjs +3 -3
  936. package/lib/test/codec/ajvValidator.cjs.map +1 -1
  937. package/lib/test/codec/ajvValidator.d.cts.map +1 -1
  938. package/lib/test/codec/utils.d.ts +1 -1
  939. package/lib/test/codec/utils.d.ts.map +1 -1
  940. package/lib/test/codec/utils.js.map +1 -1
  941. package/lib/test/cursorTestSuite.d.ts +2 -2
  942. package/lib/test/cursorTestSuite.d.ts.map +1 -1
  943. package/lib/test/cursorTestSuite.js +3 -3
  944. package/lib/test/cursorTestSuite.js.map +1 -1
  945. package/lib/test/domains/json/benchmarks.d.ts.map +1 -1
  946. package/lib/test/domains/json/benchmarks.js +1 -1
  947. package/lib/test/domains/json/benchmarks.js.map +1 -1
  948. package/lib/test/domains/json/jsDirectObject.bench.js +2 -2
  949. package/lib/test/domains/json/jsDirectObject.bench.js.map +1 -1
  950. package/lib/test/domains/json/jsonCursor.bench.d.ts.map +1 -1
  951. package/lib/test/domains/json/jsonCursor.bench.js +7 -7
  952. package/lib/test/domains/json/jsonCursor.bench.js.map +1 -1
  953. package/lib/test/domains/json/jsonCursor.spec.js +1 -1
  954. package/lib/test/domains/json/jsonCursor.spec.js.map +1 -1
  955. package/lib/test/domains/json/twitter.js +1 -1
  956. package/lib/test/domains/json/twitter.js.map +1 -1
  957. package/lib/test/domains/schemaBuilder.spec.js +1 -1
  958. package/lib/test/domains/schemaBuilder.spec.js.map +1 -1
  959. package/lib/test/events/eventEmitter.spec.js +1 -1
  960. package/lib/test/events/eventEmitter.spec.js.map +1 -1
  961. package/lib/test/exhaustiveRebaserUtils.d.ts +2 -0
  962. package/lib/test/exhaustiveRebaserUtils.d.ts.map +1 -1
  963. package/lib/test/exhaustiveRebaserUtils.js.map +1 -1
  964. package/lib/test/feature-libraries/chunked-forest/basicChunk.spec.js +7 -7
  965. package/lib/test/feature-libraries/chunked-forest/basicChunk.spec.js.map +1 -1
  966. package/lib/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.js +6 -6
  967. package/lib/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.js.map +1 -1
  968. package/lib/test/feature-libraries/chunked-forest/chunkTree.spec.js +2 -2
  969. package/lib/test/feature-libraries/chunked-forest/chunkTree.spec.js.map +1 -1
  970. package/lib/test/feature-libraries/chunked-forest/chunkedForest.spec.js +3 -3
  971. package/lib/test/feature-libraries/chunked-forest/chunkedForest.spec.js.map +1 -1
  972. package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.d.ts +1 -1
  973. package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.d.ts.map +1 -1
  974. package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.js +3 -3
  975. package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.js.map +1 -1
  976. package/lib/test/feature-libraries/chunked-forest/codec/chunkCodecUtilities.spec.js +1 -1
  977. package/lib/test/feature-libraries/chunked-forest/codec/chunkCodecUtilities.spec.js.map +1 -1
  978. package/lib/test/feature-libraries/chunked-forest/codec/chunkDecoding.spec.js +10 -10
  979. package/lib/test/feature-libraries/chunked-forest/codec/chunkDecoding.spec.js.map +1 -1
  980. package/lib/test/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.spec.js +4 -4
  981. package/lib/test/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.spec.js.map +1 -1
  982. package/lib/test/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.spec.js +1 -1
  983. package/lib/test/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.spec.js.map +1 -1
  984. package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.d.ts +2 -2
  985. package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.d.ts.map +1 -1
  986. package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.js +10 -10
  987. package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.js.map +1 -1
  988. package/lib/test/feature-libraries/chunked-forest/codec/format.spec.js +1 -1
  989. package/lib/test/feature-libraries/chunked-forest/codec/format.spec.js.map +1 -1
  990. package/lib/test/feature-libraries/chunked-forest/codec/nodeShape.spec.js +6 -6
  991. package/lib/test/feature-libraries/chunked-forest/codec/nodeShape.spec.js.map +1 -1
  992. package/lib/test/feature-libraries/chunked-forest/codec/schemaBasedEncoding.spec.js +8 -8
  993. package/lib/test/feature-libraries/chunked-forest/codec/schemaBasedEncoding.spec.js.map +1 -1
  994. package/lib/test/feature-libraries/chunked-forest/codec/uncompressedEncode.spec.js +2 -2
  995. package/lib/test/feature-libraries/chunked-forest/codec/uncompressedEncode.spec.js.map +1 -1
  996. package/lib/test/feature-libraries/chunked-forest/fieldCursorTestUtilities.d.ts.map +1 -1
  997. package/lib/test/feature-libraries/chunked-forest/fieldCursorTestUtilities.js.map +1 -1
  998. package/lib/test/feature-libraries/chunked-forest/uniformChunk.spec.js +5 -5
  999. package/lib/test/feature-libraries/chunked-forest/uniformChunk.spec.js.map +1 -1
  1000. package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.d.ts +1 -1
  1001. package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.d.ts.map +1 -1
  1002. package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.js +5 -5
  1003. package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.js.map +1 -1
  1004. package/lib/test/feature-libraries/contextuallyTyped.spec.js +2 -2
  1005. package/lib/test/feature-libraries/contextuallyTyped.spec.js.map +1 -1
  1006. package/lib/test/feature-libraries/default-field-kinds/defaultChangeFamily.spec.js +3 -3
  1007. package/lib/test/feature-libraries/default-field-kinds/defaultChangeFamily.spec.js.map +1 -1
  1008. package/lib/test/feature-libraries/default-field-kinds/defaultFieldKinds.spec.js +3 -3
  1009. package/lib/test/feature-libraries/default-field-kinds/defaultFieldKinds.spec.js.map +1 -1
  1010. package/lib/test/feature-libraries/deltaUtils.spec.js +1 -1
  1011. package/lib/test/feature-libraries/deltaUtils.spec.js.map +1 -1
  1012. package/lib/test/feature-libraries/fieldKindTestUtils.d.ts +1 -1
  1013. package/lib/test/feature-libraries/fieldKindTestUtils.d.ts.map +1 -1
  1014. package/lib/test/feature-libraries/fieldKindTestUtils.js +1 -1
  1015. package/lib/test/feature-libraries/fieldKindTestUtils.js.map +1 -1
  1016. package/lib/test/feature-libraries/flex-tree/editableTree.identifier.spec.js +2 -2
  1017. package/lib/test/feature-libraries/flex-tree/editableTree.identifier.spec.js.map +1 -1
  1018. package/lib/test/feature-libraries/flex-tree/editableTreeTypes.spec.js +3 -3
  1019. package/lib/test/feature-libraries/flex-tree/editableTreeTypes.spec.js.map +1 -1
  1020. package/lib/test/feature-libraries/flex-tree/events.spec.js +5 -63
  1021. package/lib/test/feature-libraries/flex-tree/events.spec.js.map +1 -1
  1022. package/lib/test/feature-libraries/flex-tree/lazyField.spec.js +4 -4
  1023. package/lib/test/feature-libraries/flex-tree/lazyField.spec.js.map +1 -1
  1024. package/lib/test/feature-libraries/flex-tree/lazyNode.spec.js +5 -5
  1025. package/lib/test/feature-libraries/flex-tree/lazyNode.spec.js.map +1 -1
  1026. package/lib/test/feature-libraries/flex-tree/navigation.spec.js.map +1 -1
  1027. package/lib/test/feature-libraries/flex-tree/unboxed.spec.js +1 -1
  1028. package/lib/test/feature-libraries/flex-tree/unboxed.spec.js.map +1 -1
  1029. package/lib/test/feature-libraries/flex-tree/utilities.spec.js +3 -3
  1030. package/lib/test/feature-libraries/flex-tree/utilities.spec.js.map +1 -1
  1031. package/lib/test/feature-libraries/flex-tree/utils.d.ts +2 -2
  1032. package/lib/test/feature-libraries/flex-tree/utils.d.ts.map +1 -1
  1033. package/lib/test/feature-libraries/flex-tree/utils.js +3 -3
  1034. package/lib/test/feature-libraries/flex-tree/utils.js.map +1 -1
  1035. package/lib/test/feature-libraries/forest-summary/forestSummarizerCodec.spec.js +5 -5
  1036. package/lib/test/feature-libraries/forest-summary/forestSummarizerCodec.spec.js.map +1 -1
  1037. package/lib/test/feature-libraries/mapTreeCursor.spec.js +1 -1
  1038. package/lib/test/feature-libraries/mapTreeCursor.spec.js.map +1 -1
  1039. package/lib/test/feature-libraries/memoizedIdRangeAllocator.spec.js.map +1 -1
  1040. package/lib/test/feature-libraries/modular-schema/basicRebasers.d.ts +1 -1
  1041. package/lib/test/feature-libraries/modular-schema/basicRebasers.d.ts.map +1 -1
  1042. package/lib/test/feature-libraries/modular-schema/basicRebasers.js +3 -3
  1043. package/lib/test/feature-libraries/modular-schema/basicRebasers.js.map +1 -1
  1044. package/lib/test/feature-libraries/modular-schema/comparison.spec.js +3 -3
  1045. package/lib/test/feature-libraries/modular-schema/comparison.spec.js.map +1 -1
  1046. package/lib/test/feature-libraries/modular-schema/genericFieldKind.spec.js +2 -2
  1047. package/lib/test/feature-libraries/modular-schema/genericFieldKind.spec.js.map +1 -1
  1048. package/lib/test/feature-libraries/modular-schema/genericFieldSnapshots.test.js +1 -1
  1049. package/lib/test/feature-libraries/modular-schema/genericFieldSnapshots.test.js.map +1 -1
  1050. package/lib/test/feature-libraries/modular-schema/isNeverTree.spec.js +4 -4
  1051. package/lib/test/feature-libraries/modular-schema/isNeverTree.spec.js.map +1 -1
  1052. package/lib/test/feature-libraries/modular-schema/modularChangeFamily.spec.js +24 -6
  1053. package/lib/test/feature-libraries/modular-schema/modularChangeFamily.spec.js.map +1 -1
  1054. package/lib/test/feature-libraries/modular-schema/rangeMap.spec.js +1 -1
  1055. package/lib/test/feature-libraries/modular-schema/rangeMap.spec.js.map +1 -1
  1056. package/lib/test/feature-libraries/modular-schema/schemaEvolutionExamples.spec.js +3 -3
  1057. package/lib/test/feature-libraries/modular-schema/schemaEvolutionExamples.spec.js.map +1 -1
  1058. package/lib/test/feature-libraries/modularChangeFamilyIntegration.spec.js +7 -5
  1059. package/lib/test/feature-libraries/modularChangeFamilyIntegration.spec.js.map +1 -1
  1060. package/lib/test/feature-libraries/node-key/nodeKey.spec.js.map +1 -1
  1061. package/lib/test/feature-libraries/node-key/nodeKeyIndex.spec.js +2 -2
  1062. package/lib/test/feature-libraries/node-key/nodeKeyIndex.spec.js.map +1 -1
  1063. package/lib/test/feature-libraries/objectForest.spec.js +2 -2
  1064. package/lib/test/feature-libraries/objectForest.spec.js.map +1 -1
  1065. package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.d.ts.map +1 -1
  1066. package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.js +20 -12
  1067. package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.js.map +1 -1
  1068. package/lib/test/feature-libraries/optional-field/optionalField.spec.js +6 -6
  1069. package/lib/test/feature-libraries/optional-field/optionalField.spec.js.map +1 -1
  1070. package/lib/test/feature-libraries/optional-field/optionalFieldChangeCodecs.test.js +2 -2
  1071. package/lib/test/feature-libraries/optional-field/optionalFieldChangeCodecs.test.js.map +1 -1
  1072. package/lib/test/feature-libraries/optional-field/optionalFieldSnapshots.test.js +1 -1
  1073. package/lib/test/feature-libraries/optional-field/optionalFieldSnapshots.test.js.map +1 -1
  1074. package/lib/test/feature-libraries/optional-field/optionalFieldUtils.d.ts +1 -1
  1075. package/lib/test/feature-libraries/optional-field/optionalFieldUtils.d.ts.map +1 -1
  1076. package/lib/test/feature-libraries/optional-field/optionalFieldUtils.js.map +1 -1
  1077. package/lib/test/feature-libraries/schema-aware/schemaAware.spec.js +2 -2
  1078. package/lib/test/feature-libraries/schema-aware/schemaAware.spec.js.map +1 -1
  1079. package/lib/test/feature-libraries/schema-aware/schemaComplex.d.ts.map +1 -1
  1080. package/lib/test/feature-libraries/schema-aware/schemaComplex.js.map +1 -1
  1081. package/lib/test/feature-libraries/schema-index/codec.spec.js +5 -5
  1082. package/lib/test/feature-libraries/schema-index/codec.spec.js.map +1 -1
  1083. package/lib/test/feature-libraries/schema-index/schemaSummarizer.spec.js +3 -3
  1084. package/lib/test/feature-libraries/schema-index/schemaSummarizer.spec.js.map +1 -1
  1085. package/lib/test/feature-libraries/schemaBuilder.spec.js +3 -3
  1086. package/lib/test/feature-libraries/schemaBuilder.spec.js.map +1 -1
  1087. package/lib/test/feature-libraries/sequence-field/compose.test.js +2 -2
  1088. package/lib/test/feature-libraries/sequence-field/compose.test.js.map +1 -1
  1089. package/lib/test/feature-libraries/sequence-field/invert.test.js +2 -2
  1090. package/lib/test/feature-libraries/sequence-field/invert.test.js.map +1 -1
  1091. package/lib/test/feature-libraries/sequence-field/markListFactory.test.js +1 -1
  1092. package/lib/test/feature-libraries/sequence-field/markListFactory.test.js.map +1 -1
  1093. package/lib/test/feature-libraries/sequence-field/populatedMarks.d.ts +2 -2
  1094. package/lib/test/feature-libraries/sequence-field/populatedMarks.d.ts.map +1 -1
  1095. package/lib/test/feature-libraries/sequence-field/populatedMarks.js +2 -2
  1096. package/lib/test/feature-libraries/sequence-field/populatedMarks.js.map +1 -1
  1097. package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.d.ts +1 -1
  1098. package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.d.ts.map +1 -1
  1099. package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.js.map +1 -1
  1100. package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.test.js.map +1 -1
  1101. package/lib/test/feature-libraries/sequence-field/rebase.test.js +5 -5
  1102. package/lib/test/feature-libraries/sequence-field/rebase.test.js.map +1 -1
  1103. package/lib/test/feature-libraries/sequence-field/relevantRemovedRoots.test.js +1 -1
  1104. package/lib/test/feature-libraries/sequence-field/relevantRemovedRoots.test.js.map +1 -1
  1105. package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.d.ts.map +1 -1
  1106. package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.js +17 -7
  1107. package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.js.map +1 -1
  1108. package/lib/test/feature-libraries/sequence-field/sequenceField.spec.js +1 -1
  1109. package/lib/test/feature-libraries/sequence-field/sequenceField.spec.js.map +1 -1
  1110. package/lib/test/feature-libraries/sequence-field/sequenceFieldCodecs.test.js.map +1 -1
  1111. package/lib/test/feature-libraries/sequence-field/sequenceFieldEditor.test.js +1 -1
  1112. package/lib/test/feature-libraries/sequence-field/sequenceFieldEditor.test.js.map +1 -1
  1113. package/lib/test/feature-libraries/sequence-field/sequenceFieldSnapshots.test.js +2 -2
  1114. package/lib/test/feature-libraries/sequence-field/sequenceFieldSnapshots.test.js.map +1 -1
  1115. package/lib/test/feature-libraries/sequence-field/sequenceFieldToDelta.test.js +2 -2
  1116. package/lib/test/feature-libraries/sequence-field/sequenceFieldToDelta.test.js.map +1 -1
  1117. package/lib/test/feature-libraries/sequence-field/sequenceFieldUtils.test.js.map +1 -1
  1118. package/lib/test/feature-libraries/sequence-field/testEdits.d.ts +1 -1
  1119. package/lib/test/feature-libraries/sequence-field/testEdits.d.ts.map +1 -1
  1120. package/lib/test/feature-libraries/sequence-field/testEdits.js.map +1 -1
  1121. package/lib/test/feature-libraries/sequence-field/utils.d.ts +3 -3
  1122. package/lib/test/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  1123. package/lib/test/feature-libraries/sequence-field/utils.js +10 -8
  1124. package/lib/test/feature-libraries/sequence-field/utils.js.map +1 -1
  1125. package/lib/test/feature-libraries/storedToViewSchema.spec.js +1 -1
  1126. package/lib/test/feature-libraries/storedToViewSchema.spec.js.map +1 -1
  1127. package/lib/test/feature-libraries/treeCursorUtils.spec.js +2 -2
  1128. package/lib/test/feature-libraries/treeCursorUtils.spec.js.map +1 -1
  1129. package/lib/test/feature-libraries/treeTextCursor.spec.js +1 -1
  1130. package/lib/test/feature-libraries/treeTextCursor.spec.js.map +1 -1
  1131. package/lib/test/feature-libraries/typedSchema/example.spec.js +1 -1
  1132. package/lib/test/feature-libraries/typedSchema/example.spec.js.map +1 -1
  1133. package/lib/test/feature-libraries/typedSchema/flexList.spec.js +1 -1
  1134. package/lib/test/feature-libraries/typedSchema/flexList.spec.js.map +1 -1
  1135. package/lib/test/feature-libraries/typedSchema/typedTreeSchema.spec.js +1 -1
  1136. package/lib/test/feature-libraries/typedSchema/typedTreeSchema.spec.js.map +1 -1
  1137. package/lib/test/forestTestSuite.d.ts.map +1 -1
  1138. package/lib/test/forestTestSuite.js +4 -4
  1139. package/lib/test/forestTestSuite.js.map +1 -1
  1140. package/lib/test/rebaserAxiomaticTests.d.ts +1 -1
  1141. package/lib/test/rebaserAxiomaticTests.d.ts.map +1 -1
  1142. package/lib/test/rebaserAxiomaticTests.js +221 -2
  1143. package/lib/test/rebaserAxiomaticTests.js.map +1 -1
  1144. package/lib/test/scalableTestTrees.d.ts +3 -3
  1145. package/lib/test/scalableTestTrees.d.ts.map +1 -1
  1146. package/lib/test/scalableTestTrees.js +5 -5
  1147. package/lib/test/scalableTestTrees.js.map +1 -1
  1148. package/lib/test/shared-tree/editing.spec.js +3 -3
  1149. package/lib/test/shared-tree/editing.spec.js.map +1 -1
  1150. package/lib/test/shared-tree/fuzz/anchorStability.fuzz.spec.js +2 -2
  1151. package/lib/test/shared-tree/fuzz/anchorStability.fuzz.spec.js.map +1 -1
  1152. package/lib/test/shared-tree/fuzz/composeVsIndividual.fuzz.spec.js +1 -1
  1153. package/lib/test/shared-tree/fuzz/composeVsIndividual.fuzz.spec.js.map +1 -1
  1154. package/lib/test/shared-tree/fuzz/fuzzEditGenerators.d.ts +2 -2
  1155. package/lib/test/shared-tree/fuzz/fuzzEditGenerators.d.ts.map +1 -1
  1156. package/lib/test/shared-tree/fuzz/fuzzEditGenerators.js +3 -3
  1157. package/lib/test/shared-tree/fuzz/fuzzEditGenerators.js.map +1 -1
  1158. package/lib/test/shared-tree/fuzz/fuzzEditReducers.d.ts +2 -2
  1159. package/lib/test/shared-tree/fuzz/fuzzEditReducers.d.ts.map +1 -1
  1160. package/lib/test/shared-tree/fuzz/fuzzEditReducers.js +3 -3
  1161. package/lib/test/shared-tree/fuzz/fuzzEditReducers.js.map +1 -1
  1162. package/lib/test/shared-tree/fuzz/fuzzUtils.d.ts +3 -3
  1163. package/lib/test/shared-tree/fuzz/fuzzUtils.d.ts.map +1 -1
  1164. package/lib/test/shared-tree/fuzz/fuzzUtils.js +2 -2
  1165. package/lib/test/shared-tree/fuzz/fuzzUtils.js.map +1 -1
  1166. package/lib/test/shared-tree/fuzz/operationTypes.d.ts +2 -2
  1167. package/lib/test/shared-tree/fuzz/operationTypes.d.ts.map +1 -1
  1168. package/lib/test/shared-tree/fuzz/operationTypes.js.map +1 -1
  1169. package/lib/test/shared-tree/fuzz/topLevel.fuzz.spec.js.map +1 -1
  1170. package/lib/test/shared-tree/fuzz/undoRedo.fuzz.spec.js +1 -1
  1171. package/lib/test/shared-tree/fuzz/undoRedo.fuzz.spec.js.map +1 -1
  1172. package/lib/test/shared-tree/opSize.bench.js +5 -5
  1173. package/lib/test/shared-tree/opSize.bench.js.map +1 -1
  1174. package/lib/test/shared-tree/schematizeTree.spec.js +2 -2
  1175. package/lib/test/shared-tree/schematizeTree.spec.js.map +1 -1
  1176. package/lib/test/shared-tree/schematizingTreeView.spec.js +27 -8
  1177. package/lib/test/shared-tree/schematizingTreeView.spec.js.map +1 -1
  1178. package/lib/test/shared-tree/sharedTree.bench.js +11 -11
  1179. package/lib/test/shared-tree/sharedTree.bench.js.map +1 -1
  1180. package/lib/test/shared-tree/sharedTree.spec.js +9 -9
  1181. package/lib/test/shared-tree/sharedTree.spec.js.map +1 -1
  1182. package/lib/test/shared-tree/sharedTreeChangeCodec.spec.js +7 -7
  1183. package/lib/test/shared-tree/sharedTreeChangeCodec.spec.js.map +1 -1
  1184. package/lib/test/shared-tree/sharedTreeChangeFamily.spec.js +4 -4
  1185. package/lib/test/shared-tree/sharedTreeChangeFamily.spec.js.map +1 -1
  1186. package/lib/test/shared-tree/summary.bench.js +3 -3
  1187. package/lib/test/shared-tree/summary.bench.js.map +1 -1
  1188. package/lib/test/shared-tree/treeCheckout.spec.js +2 -2
  1189. package/lib/test/shared-tree/treeCheckout.spec.js.map +1 -1
  1190. package/lib/test/shared-tree/undo.spec.js +1 -1
  1191. package/lib/test/shared-tree/undo.spec.js.map +1 -1
  1192. package/lib/test/shared-tree-core/branch.spec.js +2 -2
  1193. package/lib/test/shared-tree-core/branch.spec.js.map +1 -1
  1194. package/lib/test/shared-tree-core/edit-manager/editManager.bench.js +5 -5
  1195. package/lib/test/shared-tree-core/edit-manager/editManager.bench.js.map +1 -1
  1196. package/lib/test/shared-tree-core/edit-manager/editManagerCodecs.test.js +2 -2
  1197. package/lib/test/shared-tree-core/edit-manager/editManagerCodecs.test.js.map +1 -1
  1198. package/lib/test/shared-tree-core/edit-manager/editManagerCorrectness.test.js +2 -2
  1199. package/lib/test/shared-tree-core/edit-manager/editManagerCorrectness.test.js.map +1 -1
  1200. package/lib/test/shared-tree-core/edit-manager/editManagerPerf.test.js +2 -2
  1201. package/lib/test/shared-tree-core/edit-manager/editManagerPerf.test.js.map +1 -1
  1202. package/lib/test/shared-tree-core/edit-manager/editManagerScenario.d.ts +2 -2
  1203. package/lib/test/shared-tree-core/edit-manager/editManagerScenario.d.ts.map +1 -1
  1204. package/lib/test/shared-tree-core/edit-manager/editManagerScenario.js +2 -2
  1205. package/lib/test/shared-tree-core/edit-manager/editManagerScenario.js.map +1 -1
  1206. package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.d.ts +2 -2
  1207. package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.d.ts.map +1 -1
  1208. package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.js +1 -1
  1209. package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.js.map +1 -1
  1210. package/lib/test/shared-tree-core/message.spec.js.map +1 -1
  1211. package/lib/test/shared-tree-core/sharedTreeCore.spec.js +3 -3
  1212. package/lib/test/shared-tree-core/sharedTreeCore.spec.js.map +1 -1
  1213. package/lib/test/shared-tree-core/utils.d.ts +2 -2
  1214. package/lib/test/shared-tree-core/utils.d.ts.map +1 -1
  1215. package/lib/test/shared-tree-core/utils.js +2 -2
  1216. package/lib/test/shared-tree-core/utils.js.map +1 -1
  1217. package/lib/test/simple-tree/object.spec.js +12 -13
  1218. package/lib/test/simple-tree/object.spec.js.map +1 -1
  1219. package/lib/test/simple-tree/objectFactory.spec.js +11 -14
  1220. package/lib/test/simple-tree/objectFactory.spec.js.map +1 -1
  1221. package/lib/test/simple-tree/proxies.spec.js +112 -5
  1222. package/lib/test/simple-tree/proxies.spec.js.map +1 -1
  1223. package/lib/test/simple-tree/rawObjectNode.spec.js +2 -2
  1224. package/lib/test/simple-tree/rawObjectNode.spec.js.map +1 -1
  1225. package/lib/test/simple-tree/schemaCreationUtilities.spec.js +3 -3
  1226. package/lib/test/simple-tree/schemaCreationUtilities.spec.js.map +1 -1
  1227. package/lib/test/simple-tree/schemaFactory.examples.spec.js +1 -1
  1228. package/lib/test/simple-tree/schemaFactory.examples.spec.js.map +1 -1
  1229. package/lib/test/simple-tree/schemaFactory.spec.js +58 -24
  1230. package/lib/test/simple-tree/schemaFactory.spec.js.map +1 -1
  1231. package/lib/test/simple-tree/schemaFactoryRecursive.spec.js +1 -1
  1232. package/lib/test/simple-tree/schemaFactoryRecursive.spec.js.map +1 -1
  1233. package/lib/test/simple-tree/schemaTypes.spec.js.map +1 -1
  1234. package/lib/test/simple-tree/toFlexSchema.spec.js +1 -1
  1235. package/lib/test/simple-tree/toFlexSchema.spec.js.map +1 -1
  1236. package/lib/test/simple-tree/toMapTree.spec.js +1 -1
  1237. package/lib/test/simple-tree/toMapTree.spec.js.map +1 -1
  1238. package/lib/test/simple-tree/treeApi.spec.js +1 -1
  1239. package/lib/test/simple-tree/treeApi.spec.js.map +1 -1
  1240. package/lib/test/simple-tree/utils.d.ts +1 -1
  1241. package/lib/test/simple-tree/utils.d.ts.map +1 -1
  1242. package/lib/test/simple-tree/utils.js +0 -1
  1243. package/lib/test/simple-tree/utils.js.map +1 -1
  1244. package/lib/test/snapshots/gc.spec.js +2 -2
  1245. package/lib/test/snapshots/gc.spec.js.map +1 -1
  1246. package/lib/test/snapshots/snapshotTools.js +2 -2
  1247. package/lib/test/snapshots/snapshotTools.js.map +1 -1
  1248. package/lib/test/snapshots/summary.spec.js +2 -2
  1249. package/lib/test/snapshots/summary.spec.js.map +1 -1
  1250. package/lib/test/snapshots/testTrees.d.ts.map +1 -1
  1251. package/lib/test/snapshots/testTrees.js +6 -6
  1252. package/lib/test/snapshots/testTrees.js.map +1 -1
  1253. package/lib/test/snapshots/utils.d.ts.map +1 -1
  1254. package/lib/test/snapshots/utils.js +1 -1
  1255. package/lib/test/snapshots/utils.js.map +1 -1
  1256. package/lib/test/testChange.d.ts +1 -1
  1257. package/lib/test/testChange.d.ts.map +1 -1
  1258. package/lib/test/testChange.js +3 -3
  1259. package/lib/test/testChange.js.map +1 -1
  1260. package/lib/test/testChange.spec.js +6 -1
  1261. package/lib/test/testChange.spec.js.map +1 -1
  1262. package/lib/test/testTrees.d.ts +1 -1
  1263. package/lib/test/testTrees.d.ts.map +1 -1
  1264. package/lib/test/testTrees.js +1 -1
  1265. package/lib/test/testTrees.js.map +1 -1
  1266. package/lib/test/tree/anchorSet.spec.js +3 -3
  1267. package/lib/test/tree/anchorSet.spec.js.map +1 -1
  1268. package/lib/test/tree/detachedFieldIndex.spec.d.ts.map +1 -1
  1269. package/lib/test/tree/detachedFieldIndex.spec.js +3 -3
  1270. package/lib/test/tree/detachedFieldIndex.spec.js.map +1 -1
  1271. package/lib/test/tree/pathTree.spec.js +2 -2
  1272. package/lib/test/tree/pathTree.spec.js.map +1 -1
  1273. package/lib/test/tree/visitDelta.spec.js +189 -1
  1274. package/lib/test/tree/visitDelta.spec.js.map +1 -1
  1275. package/lib/test/util/brand.spec.d.ts.map +1 -1
  1276. package/lib/test/util/brand.spec.js +1 -1
  1277. package/lib/test/util/brand.spec.js.map +1 -1
  1278. package/lib/test/util/nestedMap.spec.js +1 -1
  1279. package/lib/test/util/nestedMap.spec.js.map +1 -1
  1280. package/lib/test/util/opaque.spec.js.map +1 -1
  1281. package/lib/test/util/testTreeProvider.spec.js +1 -1
  1282. package/lib/test/util/testTreeProvider.spec.js.map +1 -1
  1283. package/lib/test/util/typeUtils.spec.js.map +1 -1
  1284. package/lib/test/utils.d.ts +6 -5
  1285. package/lib/test/utils.d.ts.map +1 -1
  1286. package/lib/test/utils.js +11 -10
  1287. package/lib/test/utils.js.map +1 -1
  1288. package/lib/tree-alpha.d.ts +9 -21
  1289. package/lib/tree-beta.d.ts +9 -21
  1290. package/lib/tree-public.d.ts +8 -20
  1291. package/lib/tree-untrimmed.d.ts +135 -141
  1292. package/lib/treeFactory.d.ts +31 -14
  1293. package/lib/treeFactory.d.ts.map +1 -1
  1294. package/lib/treeFactory.js +48 -22
  1295. package/lib/treeFactory.js.map +1 -1
  1296. package/lib/util/nestedSet.d.ts.map +1 -1
  1297. package/lib/util/nestedSet.js.map +1 -1
  1298. package/lib/util/opaque.d.ts +1 -1
  1299. package/lib/util/opaque.d.ts.map +1 -1
  1300. package/lib/util/opaque.js.map +1 -1
  1301. package/lib/util/typeCheckTests.d.ts +1 -1
  1302. package/lib/util/typeCheckTests.d.ts.map +1 -1
  1303. package/lib/util/typeCheckTests.js.map +1 -1
  1304. package/package.json +27 -24
  1305. package/src/codec/codec.ts +2 -2
  1306. package/src/codec/discriminatedUnions.ts +1 -1
  1307. package/src/codec/versioned/codec.ts +1 -1
  1308. package/src/core/change-family/changeFamily.ts +2 -2
  1309. package/src/core/forest/editableForest.ts +4 -4
  1310. package/src/core/forest/forest.ts +8 -3
  1311. package/src/core/rebase/types.ts +1 -1
  1312. package/src/core/rebase/utils.ts +1 -1
  1313. package/src/core/schema-stored/storedSchemaRepository.ts +2 -2
  1314. package/src/core/tree/anchorSet.ts +10 -10
  1315. package/src/core/tree/deltaUtil.ts +1 -1
  1316. package/src/core/tree/detachedFieldIndex.ts +3 -3
  1317. package/src/core/tree/detachedFieldIndexCodec.ts +1 -1
  1318. package/src/core/tree/sparseTree.ts +1 -1
  1319. package/src/core/tree/types.ts +1 -1
  1320. package/src/core/tree/visitDelta.ts +59 -17
  1321. package/src/core/tree/visitPath.ts +1 -1
  1322. package/src/core/tree/visitorUtils.ts +4 -4
  1323. package/src/domains/json/jsonCursor.ts +3 -3
  1324. package/src/domains/json/jsonDomainSchema.ts +1 -1
  1325. package/src/domains/leafDomain.ts +1 -1
  1326. package/src/domains/nodeKey/nodeKeySchema.ts +3 -3
  1327. package/src/domains/schemaBuilder.ts +10 -10
  1328. package/src/domains/testRecursiveDomain.ts +1 -1
  1329. package/src/external-utilities/typeboxValidator.ts +1 -1
  1330. package/src/feature-libraries/README.md +4 -4
  1331. package/src/feature-libraries/changeAtomIdCodec.ts +4 -4
  1332. package/src/feature-libraries/chunked-forest/basicChunk.ts +8 -8
  1333. package/src/feature-libraries/chunked-forest/chunk.ts +1 -1
  1334. package/src/feature-libraries/chunked-forest/chunkTree.ts +12 -12
  1335. package/src/feature-libraries/chunked-forest/chunkedForest.ts +17 -16
  1336. package/src/feature-libraries/chunked-forest/codec/chunkCodecUtilities.ts +2 -2
  1337. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +13 -13
  1338. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +2 -2
  1339. package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -1
  1340. package/src/feature-libraries/chunked-forest/codec/codecs.ts +3 -3
  1341. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +8 -8
  1342. package/src/feature-libraries/chunked-forest/codec/format.ts +1 -1
  1343. package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +5 -5
  1344. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncoding.ts +8 -8
  1345. package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +1 -1
  1346. package/src/feature-libraries/chunked-forest/emptyChunk.ts +4 -4
  1347. package/src/feature-libraries/chunked-forest/sequenceChunk.ts +1 -1
  1348. package/src/feature-libraries/chunked-forest/uniformChunk.ts +7 -7
  1349. package/src/feature-libraries/contextuallyTyped.ts +20 -20
  1350. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +32 -38
  1351. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +9 -9
  1352. package/src/feature-libraries/detachedFieldIndexSummarizer.ts +2 -2
  1353. package/src/feature-libraries/fieldGenerator.ts +1 -1
  1354. package/src/feature-libraries/flex-tree/README.md +2 -2
  1355. package/src/feature-libraries/flex-tree/context.ts +12 -7
  1356. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +33 -38
  1357. package/src/feature-libraries/flex-tree/index.ts +2 -2
  1358. package/src/feature-libraries/flex-tree/lazyEntity.ts +4 -18
  1359. package/src/feature-libraries/flex-tree/lazyField.ts +26 -26
  1360. package/src/feature-libraries/flex-tree/lazyNode.ts +50 -81
  1361. package/src/feature-libraries/flex-tree/treeEvents.ts +20 -20
  1362. package/src/feature-libraries/flex-tree/unboxed.ts +2 -2
  1363. package/src/feature-libraries/forest-summary/forestSummarizer.ts +10 -10
  1364. package/src/feature-libraries/forest-summary/format.ts +1 -1
  1365. package/src/feature-libraries/index.ts +2 -2
  1366. package/src/feature-libraries/mapTreeCursor.ts +5 -5
  1367. package/src/feature-libraries/memoizedIdRangeAllocator.ts +3 -3
  1368. package/src/feature-libraries/modular-schema/comparison.ts +7 -7
  1369. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +7 -7
  1370. package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +2 -2
  1371. package/src/feature-libraries/modular-schema/genericFieldKind.ts +4 -4
  1372. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -1
  1373. package/src/feature-libraries/modular-schema/genericFieldKindFormat.ts +1 -1
  1374. package/src/feature-libraries/modular-schema/isNeverTree.ts +4 -4
  1375. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +16 -16
  1376. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +42 -45
  1377. package/src/feature-libraries/modular-schema/modularChangeFormat.ts +2 -2
  1378. package/src/feature-libraries/node-key/nodeKey.ts +1 -1
  1379. package/src/feature-libraries/node-key/nodeKeyIndex.ts +2 -2
  1380. package/src/feature-libraries/node-key/nodeKeyManager.ts +2 -2
  1381. package/src/feature-libraries/object-forest/objectForest.ts +23 -22
  1382. package/src/feature-libraries/optional-field/optionalField.ts +16 -16
  1383. package/src/feature-libraries/optional-field/optionalFieldChangeFormat.ts +1 -1
  1384. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +2 -2
  1385. package/src/feature-libraries/schema-aware/README.md +1 -1
  1386. package/src/feature-libraries/schema-aware/schemaAware.ts +8 -8
  1387. package/src/feature-libraries/schema-index/codec.ts +5 -5
  1388. package/src/feature-libraries/schema-index/schemaSummarizer.ts +6 -6
  1389. package/src/feature-libraries/schemaBuilder.ts +1 -1
  1390. package/src/feature-libraries/schemaBuilderBase.ts +13 -13
  1391. package/src/feature-libraries/sequence-field/compose.ts +41 -41
  1392. package/src/feature-libraries/sequence-field/format.ts +1 -1
  1393. package/src/feature-libraries/sequence-field/helperTypes.ts +3 -3
  1394. package/src/feature-libraries/sequence-field/invert.ts +7 -7
  1395. package/src/feature-libraries/sequence-field/markQueue.ts +1 -1
  1396. package/src/feature-libraries/sequence-field/moveEffectTable.ts +2 -2
  1397. package/src/feature-libraries/sequence-field/prune.ts +1 -1
  1398. package/src/feature-libraries/sequence-field/rebase.ts +49 -49
  1399. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +1 -1
  1400. package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +2 -2
  1401. package/src/feature-libraries/sequence-field/sequenceFieldChangeRebaser.ts +2 -2
  1402. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +3 -3
  1403. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +5 -5
  1404. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +3 -3
  1405. package/src/feature-libraries/sequence-field/utils.ts +18 -18
  1406. package/src/feature-libraries/storedToViewSchema.ts +9 -9
  1407. package/src/feature-libraries/treeCursorUtils.ts +7 -7
  1408. package/src/feature-libraries/treeTextCursor.ts +9 -9
  1409. package/src/feature-libraries/typed-schema/schemaCollection.ts +7 -7
  1410. package/src/feature-libraries/typed-schema/typedTreeSchema.ts +10 -10
  1411. package/src/feature-libraries/typed-schema/view.ts +5 -5
  1412. package/src/feature-libraries/valueUtilities.ts +2 -2
  1413. package/src/index.ts +2 -2
  1414. package/src/packageVersion.ts +1 -1
  1415. package/src/shared-tree/schematizeTree.ts +6 -6
  1416. package/src/shared-tree/schematizingTreeView.ts +8 -8
  1417. package/src/shared-tree/sharedTree.ts +22 -23
  1418. package/src/shared-tree/sharedTreeChangeCodecs.ts +5 -5
  1419. package/src/shared-tree/sharedTreeChangeFamily.ts +2 -2
  1420. package/src/shared-tree/sharedTreeChangeFormat.ts +1 -1
  1421. package/src/shared-tree/treeApi.ts +2 -2
  1422. package/src/shared-tree/treeCheckout.ts +18 -18
  1423. package/src/shared-tree/treeView.ts +4 -4
  1424. package/src/shared-tree-core/branch.ts +11 -11
  1425. package/src/shared-tree-core/editManager.ts +18 -18
  1426. package/src/shared-tree-core/editManagerFormat.ts +4 -4
  1427. package/src/shared-tree-core/editManagerSummarizer.ts +2 -2
  1428. package/src/shared-tree-core/messageCodecs.ts +2 -2
  1429. package/src/shared-tree-core/messageFormat.ts +2 -2
  1430. package/src/shared-tree-core/sharedTreeCore.ts +6 -6
  1431. package/src/simple-tree/ProxyBinding.md +103 -0
  1432. package/src/simple-tree/index.ts +1 -1
  1433. package/src/simple-tree/leafNodeSchema.ts +70 -0
  1434. package/src/simple-tree/proxies.ts +268 -361
  1435. package/src/simple-tree/proxyBinding.ts +221 -0
  1436. package/src/simple-tree/rawNode.ts +16 -15
  1437. package/src/simple-tree/schemaCreationUtilities.ts +1 -1
  1438. package/src/simple-tree/schemaFactory.ts +73 -124
  1439. package/src/simple-tree/schemaFactoryRecursive.ts +1 -1
  1440. package/src/simple-tree/schemaTypes.ts +2 -2
  1441. package/src/simple-tree/testRecursiveDomain.ts +1 -1
  1442. package/src/simple-tree/toFlexSchema.ts +17 -15
  1443. package/src/simple-tree/toMapTree.ts +13 -13
  1444. package/src/simple-tree/tree.ts +1 -1
  1445. package/src/simple-tree/treeApi.ts +8 -8
  1446. package/src/simple-tree/treeArrayNode.ts +7 -8
  1447. package/src/simple-tree/types.ts +1 -1
  1448. package/src/simple-tree/typesUnsafe.ts +5 -6
  1449. package/src/treeFactory.ts +50 -26
  1450. package/src/util/nestedSet.ts +1 -1
  1451. package/src/util/opaque.ts +1 -1
  1452. package/src/util/typeCheckTests.ts +6 -6
  1453. package/tsconfig.json +1 -1
  1454. package/dist/simple-tree/flexNode.d.ts +0 -35
  1455. package/dist/simple-tree/flexNode.d.ts.map +0 -1
  1456. package/dist/simple-tree/flexNode.js +0 -62
  1457. package/dist/simple-tree/flexNode.js.map +0 -1
  1458. package/lib/simple-tree/flexNode.d.ts +0 -35
  1459. package/lib/simple-tree/flexNode.d.ts.map +0 -1
  1460. package/lib/simple-tree/flexNode.js +0 -55
  1461. package/lib/simple-tree/flexNode.js.map +0 -1
  1462. package/src/simple-tree/flexNode.ts +0 -96
package/.eslintrc.cjs CHANGED
@@ -25,6 +25,8 @@ module.exports = {
25
25
  caughtErrorsIgnorePattern: "^_",
26
26
  },
27
27
  ],
28
+ // This rule can be removed once the client release group has eslint-config-fluid 5.2.0+
29
+ "import/order": "off",
28
30
  },
29
31
  overrides: [
30
32
  {
@@ -13,6 +13,7 @@ import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
13
13
  import { IFluidHandle } from '@fluidframework/core-interfaces';
14
14
  import { IFluidLoadable } from '@fluidframework/core-interfaces';
15
15
  import { ISharedObject } from '@fluidframework/shared-object-base';
16
+ import { ISharedObjectKind } from '@fluidframework/shared-object-base';
16
17
  import { SessionSpaceCompressedId } from '@fluidframework/id-compressor';
17
18
  import { StableId } from '@fluidframework/id-compressor';
18
19
  import type { Static } from '@sinclair/typebox';
@@ -245,6 +246,9 @@ export interface CommitMetadata {
245
246
  // @internal
246
247
  export function compareLocalNodeKeys(a: LocalNodeKey, b: LocalNodeKey): -1 | 0 | 1;
247
248
 
249
+ // @internal
250
+ export function configuredSharedTree(options: SharedTreeOptions): ISharedObjectKind<ITree>;
251
+
248
252
  // @internal
249
253
  export type ContextuallyTypedFieldData = ContextuallyTypedNodeData | undefined;
250
254
 
@@ -408,14 +412,6 @@ export type DetachedRangeUpPath = Brand<Omit<RangeUpPath, "parent">, "DetachedRa
408
412
  // @public
409
413
  export const disposeSymbol: unique symbol;
410
414
 
411
- // @internal
412
- export interface EditableTreeEvents {
413
- afterChange(event: TreeEvent): void;
414
- beforeChange(event: TreeEvent): void;
415
- changing(upPath: UpPath): void;
416
- subtreeChanging(upPath: UpPath): PathVisitor | void;
417
- }
418
-
419
415
  // @internal
420
416
  export const EmptyKey: FieldKey;
421
417
 
@@ -641,6 +637,7 @@ export class FlexObjectNodeSchema<const out Name extends string = string, const
641
637
 
642
638
  // @internal
643
639
  export interface FlexTreeContext extends ISubscribable<ForestEvents> {
640
+ readonly forest: IForestSubscription;
644
641
  // (undocumented)
645
642
  readonly nodeKeys: NodeKeys;
646
643
  get root(): FlexTreeField;
@@ -720,11 +717,11 @@ export const flexTreeMarker: unique symbol;
720
717
  export interface FlexTreeNode extends FlexTreeEntity<FlexTreeNodeSchema> {
721
718
  // (undocumented)
722
719
  readonly [flexTreeMarker]: FlexTreeEntityKind.Node;
723
- [onNextChange](fn: (node: FlexTreeNode) => void): () => void;
720
+ readonly anchorNode: AnchorNode;
724
721
  // (undocumented)
725
722
  boxedIterator(): IterableIterator<FlexTreeField>;
726
723
  is<TSchema extends FlexTreeNodeSchema>(schema: TSchema): this is FlexTreeTypedNode<TSchema>;
727
- on<K extends keyof EditableTreeEvents>(eventName: K, listener: EditableTreeEvents[K]): () => void;
724
+ on<K extends keyof FlexTreeNodeEvents>(eventName: K, listener: FlexTreeNodeEvents[K]): () => void;
728
725
  readonly parentField: {
729
726
  readonly parent: FlexTreeField;
730
727
  readonly index: number;
@@ -733,6 +730,14 @@ export interface FlexTreeNode extends FlexTreeEntity<FlexTreeNodeSchema> {
733
730
  readonly value?: TreeValue;
734
731
  }
735
732
 
733
+ // @internal
734
+ export interface FlexTreeNodeEvents {
735
+ afterChange(event: TreeEvent): void;
736
+ beforeChange(event: TreeEvent): void;
737
+ changing(upPath: UpPath): void;
738
+ subtreeChanging(upPath: UpPath): PathVisitor | void;
739
+ }
740
+
736
741
  // @internal
737
742
  export interface FlexTreeNodeKeyField extends FlexTreeField {
738
743
  // (undocumented)
@@ -875,6 +880,7 @@ export const forbiddenFieldKindIdentifier = "Forbidden";
875
880
  // @internal
876
881
  export interface ForestEvents {
877
882
  afterChange(): void;
883
+ afterRootFieldCreated(key: FieldKey): void;
878
884
  beforeChange(): void;
879
885
  }
880
886
 
@@ -1467,7 +1473,7 @@ export const reservedObjectNodeFieldPropertyNamePrefixes: readonly ["set", "boxe
1467
1473
  export type ReservedObjectNodeFieldPropertyNames = (typeof reservedObjectNodeFieldPropertyNames)[number];
1468
1474
 
1469
1475
  // @internal
1470
- export const reservedObjectNodeFieldPropertyNames: readonly ["constructor", "context", "is", "on", "parentField", "schema", "treeStatus", "tryGetField", "type", "value", "localNodeKey", "boxedIterator", "iterator"];
1476
+ export const reservedObjectNodeFieldPropertyNames: readonly ["anchorNode", "constructor", "context", "is", "on", "parentField", "schema", "treeStatus", "tryGetField", "type", "value", "localNodeKey", "boxedIterator", "iterator"];
1471
1477
 
1472
1478
  // @public
1473
1479
  export type RestrictiveReadonlyRecord<K extends symbol | string, T> = {
@@ -1654,9 +1660,7 @@ export interface SequenceFieldEditBuilder {
1654
1660
  }
1655
1661
 
1656
1662
  // @public
1657
- export const SharedTree: {
1658
- getFactory(): IChannelFactory<ITree>;
1659
- };
1663
+ export const SharedTree: ISharedObjectKind<ITree>;
1660
1664
 
1661
1665
  // @internal
1662
1666
  export interface SharedTreeContentSnapshot {
@@ -1758,7 +1762,7 @@ export interface TreeApi extends TreeNodeApi {
1758
1762
  }
1759
1763
 
1760
1764
  // @public
1761
- export interface TreeArrayNode<TAllowedTypes extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends TreeNode, TreeArrayNodeBase<TreeNodeFromImplicitAllowedTypes<TAllowedTypes>, InsertableTreeNodeFromImplicitAllowedTypes<TAllowedTypes>, TreeArrayNode> {
1765
+ export interface TreeArrayNode<TAllowedTypes extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends TreeArrayNodeBase<TreeNodeFromImplicitAllowedTypes<TAllowedTypes>, InsertableTreeNodeFromImplicitAllowedTypes<TAllowedTypes>, TreeArrayNode> {
1762
1766
  }
1763
1767
 
1764
1768
  // @public
@@ -1788,7 +1792,7 @@ export interface TreeArrayNodeBase<out T, in TNew, in TMoveFrom> extends Readonl
1788
1792
  }
1789
1793
 
1790
1794
  // @beta
1791
- export interface TreeArrayNodeUnsafe<TAllowedTypes extends Unenforced<ImplicitAllowedTypes>> extends TreeNode, TreeArrayNodeBase<TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>, InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>, TreeArrayNode> {
1795
+ export interface TreeArrayNodeUnsafe<TAllowedTypes extends Unenforced<ImplicitAllowedTypes>> extends TreeArrayNodeBase<TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>, InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>, TreeArrayNode> {
1792
1796
  }
1793
1797
 
1794
1798
  // @internal
@@ -1822,19 +1826,6 @@ export interface TreeEvent {
1822
1826
  readonly target: FlexTreeNode;
1823
1827
  }
1824
1828
 
1825
- // @internal
1826
- export class TreeFactory implements IChannelFactory<ITree> {
1827
- constructor(options: SharedTreeOptions);
1828
- // (undocumented)
1829
- readonly attributes: IChannelAttributes;
1830
- // (undocumented)
1831
- create(runtime: IFluidDataStoreRuntime, id: string): ITree;
1832
- // (undocumented)
1833
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, channelAttributes: Readonly<IChannelAttributes>): Promise<ITree>;
1834
- // (undocumented)
1835
- readonly type: string;
1836
- }
1837
-
1838
1829
  // @public
1839
1830
  export type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> = TSchema extends FieldSchema<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind> : TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes<TSchema> : unknown;
1840
1831
 
@@ -4,8 +4,8 @@
4
4
  */
5
5
  import { IsoBuffer } from "@fluid-internal/client-utils";
6
6
  import type { Static, TAnySchema, TSchema } from "@sinclair/typebox";
7
- import { JsonCompatibleReadOnly } from "../util/index.js";
8
7
  import { ChangeEncodingContext } from "../core/index.js";
8
+ import { JsonCompatibleReadOnly } from "../util/index.js";
9
9
  /**
10
10
  * Translates decoded data to encoded data.
11
11
  * @remarks Typically paired with an {@link IEncoder}.
@@ -1 +1 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/codec/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAkB,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,KAAK,EAAE,MAAM,EAAE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I,EAAC,gCAAgC,CAAC,CAAC;aACvC;YACD,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,CAAC,OAAkB,EAAE,OAAiB,EAAE,EAAE;YACjD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;gBACnC,IAAA,eAAI,EAAC,gCAAgC,CAAC,CAAC;aACvC;YACD,2GAA2G;YAC3G,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAA+B,CAAC;QACrE,CAAC;KACD,CAAC;AACH,CAAC;AA/BD,oDA+BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { bufferToString, IsoBuffer } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils\";\nimport type { Static, TAnySchema, TSchema } from \"@sinclair/typebox\";\nimport { fail, JsonCompatibleReadOnly } from \"../util/index.js\";\nimport { ChangeEncodingContext } from \"../core/index.js\";\n\n/**\n * Translates decoded data to encoded data.\n * @remarks Typically paired with an {@link IEncoder}.\n */\nexport interface IEncoder<TDecoded, TEncoded, TContext> {\n\t/**\n\t * Encodes `obj` into some encoded format.\n\t */\n\tencode(obj: TDecoded, context: TContext): TEncoded;\n}\n\n/**\n * Translates encoded data to decoded data.\n * @remarks Typically paired with an {@link IEncoder}.\n */\nexport interface IDecoder<TDecoded, TEncoded, TContext> {\n\t/**\n\t * Decodes `obj` from some encoded format.\n\t */\n\tdecode(obj: TEncoded, context: TContext): TDecoded;\n}\n\n/**\n * Validates data complies with some particular schema.\n * Implementations are typically created by a {@link JsonValidator}.\n * @internal\n */\nexport interface SchemaValidationFunction<Schema extends TSchema> {\n\t/**\n\t * @returns Whether the data matches a schema.\n\t */\n\tcheck(data: unknown): data is Static<Schema>;\n}\n\n/**\n * JSON schema validator compliant with draft 6 schema. See https://json-schema.org.\n * @internal\n */\nexport interface JsonValidator {\n\t/**\n\t * Compiles the provided JSON schema into a validator for that schema.\n\t * @param schema - A valid draft 6 JSON schema\n\t * @remarks IFluidHandles--which have circular property references--are used in various places in SharedTree's persisted\n\t * format. Handles should only be contained in sections of data which are validated against the empty schema `{}`\n\t * (see https://datatracker.ietf.org/doc/html/draft-wright-json-schema-01#section-4.4).\n\t *\n\t * Implementations of `JsonValidator` must therefore tolerate these values, despite the input not being valid JSON.\n\t */\n\tcompile<Schema extends TSchema>(schema: Schema): SchemaValidationFunction<Schema>;\n}\n\n/**\n * Options relating to handling of persisted data.\n * @internal\n */\nexport interface ICodecOptions {\n\t/**\n\t * {@link JsonValidator} which SharedTree uses to validate persisted data it reads & writes\n\t * matches the expected encoded format (i.e. the wire format for ops and summaries).\n\t *\n\t * See {@link noopValidator} and {@link typeboxValidator} for out-of-the-box implementations.\n\t *\n\t * This option is not \"on-by-default\" because JSON schema validation comes with a small but noticeable\n\t * runtime performance cost, and popular schema validation libraries have relatively large bundle size.\n\t *\n\t * SharedTree users are still encouraged to use a non-trivial validator (i.e. not `noopValidator`)\n\t * whenever reasonable: it gives better fail-fast behavior when unexpected encoded data is found,\n\t * which reduces the risk of unrecoverable data corruption.\n\t */\n\treadonly jsonValidator: JsonValidator;\n}\n\n/**\n * `TContext` allows passing context to the codec which may configure how data is encoded/decoded.\n * This parameter is typically used for:\n * - Codecs which can pick from multiple encoding options, and imbue the encoded data with information about which option was used.\n * The caller of such a codec can provide context about which encoding choice to make as part of the `encode` call without creating\n * additional codecs. Note that this pattern can always be implemented by having the caller create multiple codecs and selecting the\n * appropriate one, but depending on API layering this might be less ergonomic.\n * - Context for the object currently being encoded, which might enable more efficient encoding. When used in this fashion, the codec author\n * should be careful to include the context somewhere in the encoded data such that decoding can correctly round-trip.\n * For example, a composed set of codecs could implement a form of [dictionary coding](https://en.wikipedia.org/wiki/Dictionary_coder)\n * using a context map which was created by the top-level codec and passed to the inner codecs.\n * This pattern is used:\n * - To avoid repeatedly encoding session ids on commits (only recording it once at the top level)\n * @remarks `TEncoded` should always be valid Json (i.e. not contain functions), but due to TypeScript's handling\n * of index signatures and `JsonCompatibleReadOnly`'s index signature in the Json object case, specifying this as a\n * type-system level constraint makes code that uses this interface more difficult to write.\n *\n * If provided, `TValidate` allows the input type passed to `decode` to be different than `TEncoded`.\n * This is useful when, for example, the type being decoded is `unknown` and must be validated to be a `TEncoded` before being decoded to a `TDecoded`.\n */\nexport interface IJsonCodec<\n\tTDecoded,\n\tTEncoded = JsonCompatibleReadOnly,\n\tTValidate = TEncoded,\n\tTContext = void,\n> extends IEncoder<TDecoded, TEncoded, TContext>,\n\t\tIDecoder<TDecoded, TValidate, TContext> {\n\tencodedSchema?: TAnySchema;\n}\n\n/**\n * @remarks TODO: We might consider using DataView or some kind of writer instead of IsoBuffer.\n */\nexport interface IBinaryCodec<TDecoded, TContext = void>\n\textends IEncoder<TDecoded, IsoBuffer, TContext>,\n\t\tIDecoder<TDecoded, IsoBuffer, TContext> {}\n\n/**\n * Contains knowledge of how to encode some in-memory type into JSON and binary formats,\n * as well as how to decode those representations.\n *\n * @remarks Codecs are typically used in shared-tree to convert data into some persisted format.\n * For this common use case, any format for encoding that was ever actually used needs to\n * be supported for decoding in all future code versions.\n *\n * Using an {@link ICodecFamily} is the recommended strategy for managing this support, keeping in\n * mind evolution of encodings over time.\n */\nexport interface IMultiFormatCodec<\n\tTDecoded,\n\tTJsonEncoded extends JsonCompatibleReadOnly = JsonCompatibleReadOnly,\n\tTJsonValidate = TJsonEncoded,\n\tTContext = void,\n> {\n\tjson: IJsonCodec<TDecoded, TJsonEncoded, TJsonValidate, TContext>;\n\tbinary: IBinaryCodec<TDecoded, TContext>;\n\n\t/** Ensures multi-format codecs cannot also be single-format codecs. */\n\tencode?: never;\n\t/** Ensures multi-format codecs cannot also be single-format codecs. */\n\tdecode?: never;\n}\n\n/**\n * Represents a family of codecs that can be used to encode and decode data in different formats.\n * The family is identified by a format version, which is typically used to select the codec to use.\n *\n * Separating codecs into families rather than having a single codec support multiple versions (i.e. currying\n * the `formatVersion` parameter)\n * allows avoiding some duplicate work at encode/decode time, since the vast majority of document usage will not\n * involve mixed format versions.\n *\n * @privateRemarks - This interface currently assumes all codecs in a family require the same encode/decode context,\n * which isn't necessarily true.\n * This may need to be relaxed in the future.\n */\nexport interface ICodecFamily<TDecoded, TContext = void> {\n\t/**\n\t * @returns a codec that can be used to encode and decode data in the specified format.\n\t * @throws - if the format version is not supported by this family.\n\t * @remarks Implementations should typically emit telemetry (either indirectly by throwing a well-known error with\n\t * logged properties or directly using some logger) when a format version is requested that is not supported.\n\t * This ensures that applications can diagnose compatibility issues.\n\t */\n\tresolve(\n\t\tformatVersion: number,\n\t): IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>;\n\n\t/**\n\t * @returns an iterable of all format versions supported by this family.\n\t */\n\tgetSupportedFormats(): Iterable<number>;\n}\n\n/**\n * Creates a codec family from a registry of codecs.\n * Any codec that is not a {@link IMultiFormatCodec} will be wrapped with a default binary encoding.\n */\nexport function makeCodecFamily<TDecoded, TContext>(\n\tregistry: Iterable<\n\t\t[\n\t\t\tformatVersion: number,\n\t\t\tcodec:\n\t\t\t\t| IMultiFormatCodec<\n\t\t\t\t\t\tTDecoded,\n\t\t\t\t\t\tJsonCompatibleReadOnly,\n\t\t\t\t\t\tJsonCompatibleReadOnly,\n\t\t\t\t\t\tTContext\n\t\t\t\t >\n\t\t\t\t| IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>,\n\t\t]\n\t>,\n): ICodecFamily<TDecoded, TContext> {\n\tconst codecs: Map<\n\t\tnumber,\n\t\tIMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>\n\t> = new Map();\n\tfor (const [formatVersion, codec] of registry) {\n\t\tif (codecs.has(formatVersion)) {\n\t\t\tfail(\"Duplicate codecs specified.\");\n\t\t}\n\t\tcodecs.set(formatVersion, ensureBinaryEncoding(codec));\n\t}\n\n\treturn {\n\t\tresolve(formatVersion: number) {\n\t\t\tconst codec = codecs.get(formatVersion);\n\t\t\tassert(codec !== undefined, 0x5e6 /* Requested coded for unsupported format. */);\n\t\t\treturn codec;\n\t\t},\n\t\tgetSupportedFormats() {\n\t\t\treturn codecs.keys();\n\t\t},\n\t};\n}\n\nclass DefaultBinaryCodec<TDecoded, TContext> implements IBinaryCodec<TDecoded, TContext> {\n\tpublic constructor(\n\t\tprivate readonly jsonCodec: IJsonCodec<TDecoded, unknown, unknown, TContext>,\n\t) {}\n\n\tpublic encode(change: TDecoded, context: TContext): IsoBuffer {\n\t\tconst jsonable = this.jsonCodec.encode(change, context);\n\t\tconst json = JSON.stringify(jsonable);\n\t\treturn IsoBuffer.from(json);\n\t}\n\n\tpublic decode(change: IsoBuffer, context: TContext): TDecoded {\n\t\tconst json = bufferToString(change, \"utf8\");\n\t\tconst jsonable = JSON.parse(json);\n\t\treturn this.jsonCodec.decode(jsonable, context);\n\t}\n}\n\nfunction isJsonCodec<TDecoded, TContext>(\n\tcodec:\n\t\t| IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>\n\t\t| IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>,\n): codec is IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\n\treturn typeof codec.encode === \"function\" && typeof codec.decode === \"function\";\n}\n\n/**\n * Constructs a {@link IMultiFormatCodec} from a `IJsonCodec` using a generic binary encoding that simply writes\n * the json representation of the object to a buffer.\n */\nexport function withDefaultBinaryEncoding<TDecoded, TContext>(\n\tjsonCodec: IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>,\n): IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\n\treturn {\n\t\tjson: jsonCodec,\n\t\tbinary: new DefaultBinaryCodec(jsonCodec),\n\t};\n}\n\n/**\n * Ensures that the provided single or multi-format codec has a binary encoding.\n * Adapts the json encoding using {@link withDefaultBinaryEncoding} if necessary.\n */\nexport function ensureBinaryEncoding<TDecoded, TContext>(\n\tcodec:\n\t\t| IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>\n\t\t| IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>,\n): IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\n\treturn isJsonCodec(codec) ? withDefaultBinaryEncoding(codec) : codec;\n}\n\n/**\n * Codec for objects which carry no information.\n */\nexport const unitCodec: IMultiFormatCodec<0, JsonCompatibleReadOnly, JsonCompatibleReadOnly, any> =\n\t{\n\t\tjson: {\n\t\t\tencode: () => 0,\n\t\t\tdecode: () => 0,\n\t\t},\n\t\tbinary: {\n\t\t\tencode: () => IsoBuffer.from(\"\"),\n\t\t\tdecode: () => 0,\n\t\t},\n\t};\n\n/**\n * Wraps a codec with JSON schema validation for its encoded type.\n * @returns An {@link IJsonCodec} which validates the data it encodes and decodes matches the provided schema.\n */\nexport function withSchemaValidation<\n\tTInMemoryFormat,\n\tEncodedSchema extends TSchema,\n\tTEncodedFormat = JsonCompatibleReadOnly,\n\tTValidate = TEncodedFormat,\n\tTContext = ChangeEncodingContext,\n>(\n\tschema: EncodedSchema,\n\tcodec: IJsonCodec<TInMemoryFormat, TEncodedFormat, TValidate, TContext>,\n\tvalidator?: JsonValidator,\n): IJsonCodec<TInMemoryFormat, TEncodedFormat, TValidate, TContext> {\n\tif (!validator) {\n\t\treturn codec;\n\t}\n\tconst compiledFormat = validator.compile(schema);\n\treturn {\n\t\tencode: (obj: TInMemoryFormat, context: TContext) => {\n\t\t\tconst encoded = codec.encode(obj, context);\n\t\t\tif (!compiledFormat.check(encoded)) {\n\t\t\t\tfail(\"Encoded schema should validate\");\n\t\t\t}\n\t\t\treturn encoded;\n\t\t},\n\t\tdecode: (encoded: TValidate, context: TContext) => {\n\t\t\tif (!compiledFormat.check(encoded)) {\n\t\t\t\tfail(\"Encoded schema should validate\");\n\t\t\t}\n\t\t\t// TODO: would be nice to provide a more specific validate type to the inner codec than the outer one gets.\n\t\t\treturn codec.decode(encoded, context) as unknown as TInMemoryFormat;\n\t\t},\n\t};\n}\n"]}
1
+ {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/codec/codec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAyE;AACzE,2DAAoD;AAGpD,+CAAgE;AAwKhE;;;GAGG;AACH,SAAgB,eAAe,CAC9B,QAYC;IAED,MAAM,MAAM,GAGR,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,QAAQ,EAAE;QAC9C,IAAI,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE;YAC9B,IAAA,eAAI,EAAC,6BAA6B,CAAC,CAAC;SACpC;QACD,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC;KACvD;IAED,OAAO;QACN,OAAO,CAAC,aAAqB;YAC5B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YACxC,IAAA,mBAAM,EAAC,KAAK,KAAK,SAAS,EAAE,KAAK,CAAC,6CAA6C,CAAC,CAAC;YACjF,OAAO,KAAK,CAAC;QACd,CAAC;QACD,mBAAmB;YAClB,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;QACtB,CAAC;KACD,CAAC;AACH,CAAC;AApCD,0CAoCC;AAED,MAAM,kBAAkB;IACvB,YACkB,SAA2D;QAA3D,cAAS,GAAT,SAAS,CAAkD;IAC1E,CAAC;IAEG,MAAM,CAAC,MAAgB,EAAE,OAAiB;QAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACxD,MAAM,IAAI,GAAG,IAA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AyB;IAEzB,IAAI,CAAC,SAAS,EAAE;QACf,OAAO,KAAK,CAAC;KACb;IACD,MAAM,cAAc,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO;QACN,MAAM,EAAE,CAAC,GAAoB,EAAE,OAAiB,EAAE,EAAE;YACnD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YAC3C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;gBACnC,IAAA,eAAI,EAAC,gCAAgC,CAAC,CAAC;aACvC;YACD,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,CAAC,OAAkB,EAAE,OAAiB,EAAE,EAAE;YACjD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;gBACnC,IAAA,eAAI,EAAC,gCAAgC,CAAC,CAAC;aACvC;YACD,2GAA2G;YAC3G,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAA+B,CAAC;QACrE,CAAC;KACD,CAAC;AACH,CAAC;AA/BD,oDA+BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IsoBuffer, bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils\";\nimport type { Static, TAnySchema, TSchema } from \"@sinclair/typebox\";\nimport { ChangeEncodingContext } from \"../core/index.js\";\nimport { JsonCompatibleReadOnly, fail } from \"../util/index.js\";\n\n/**\n * Translates decoded data to encoded data.\n * @remarks Typically paired with an {@link IEncoder}.\n */\nexport interface IEncoder<TDecoded, TEncoded, TContext> {\n\t/**\n\t * Encodes `obj` into some encoded format.\n\t */\n\tencode(obj: TDecoded, context: TContext): TEncoded;\n}\n\n/**\n * Translates encoded data to decoded data.\n * @remarks Typically paired with an {@link IEncoder}.\n */\nexport interface IDecoder<TDecoded, TEncoded, TContext> {\n\t/**\n\t * Decodes `obj` from some encoded format.\n\t */\n\tdecode(obj: TEncoded, context: TContext): TDecoded;\n}\n\n/**\n * Validates data complies with some particular schema.\n * Implementations are typically created by a {@link JsonValidator}.\n * @internal\n */\nexport interface SchemaValidationFunction<Schema extends TSchema> {\n\t/**\n\t * @returns Whether the data matches a schema.\n\t */\n\tcheck(data: unknown): data is Static<Schema>;\n}\n\n/**\n * JSON schema validator compliant with draft 6 schema. See https://json-schema.org.\n * @internal\n */\nexport interface JsonValidator {\n\t/**\n\t * Compiles the provided JSON schema into a validator for that schema.\n\t * @param schema - A valid draft 6 JSON schema\n\t * @remarks IFluidHandles--which have circular property references--are used in various places in SharedTree's persisted\n\t * format. Handles should only be contained in sections of data which are validated against the empty schema `{}`\n\t * (see https://datatracker.ietf.org/doc/html/draft-wright-json-schema-01#section-4.4).\n\t *\n\t * Implementations of `JsonValidator` must therefore tolerate these values, despite the input not being valid JSON.\n\t */\n\tcompile<Schema extends TSchema>(schema: Schema): SchemaValidationFunction<Schema>;\n}\n\n/**\n * Options relating to handling of persisted data.\n * @internal\n */\nexport interface ICodecOptions {\n\t/**\n\t * {@link JsonValidator} which SharedTree uses to validate persisted data it reads & writes\n\t * matches the expected encoded format (i.e. the wire format for ops and summaries).\n\t *\n\t * See {@link noopValidator} and {@link typeboxValidator} for out-of-the-box implementations.\n\t *\n\t * This option is not \"on-by-default\" because JSON schema validation comes with a small but noticeable\n\t * runtime performance cost, and popular schema validation libraries have relatively large bundle size.\n\t *\n\t * SharedTree users are still encouraged to use a non-trivial validator (i.e. not `noopValidator`)\n\t * whenever reasonable: it gives better fail-fast behavior when unexpected encoded data is found,\n\t * which reduces the risk of unrecoverable data corruption.\n\t */\n\treadonly jsonValidator: JsonValidator;\n}\n\n/**\n * `TContext` allows passing context to the codec which may configure how data is encoded/decoded.\n * This parameter is typically used for:\n * - Codecs which can pick from multiple encoding options, and imbue the encoded data with information about which option was used.\n * The caller of such a codec can provide context about which encoding choice to make as part of the `encode` call without creating\n * additional codecs. Note that this pattern can always be implemented by having the caller create multiple codecs and selecting the\n * appropriate one, but depending on API layering this might be less ergonomic.\n * - Context for the object currently being encoded, which might enable more efficient encoding. When used in this fashion, the codec author\n * should be careful to include the context somewhere in the encoded data such that decoding can correctly round-trip.\n * For example, a composed set of codecs could implement a form of [dictionary coding](https://en.wikipedia.org/wiki/Dictionary_coder)\n * using a context map which was created by the top-level codec and passed to the inner codecs.\n * This pattern is used:\n * - To avoid repeatedly encoding session ids on commits (only recording it once at the top level)\n * @remarks `TEncoded` should always be valid Json (i.e. not contain functions), but due to TypeScript's handling\n * of index signatures and `JsonCompatibleReadOnly`'s index signature in the Json object case, specifying this as a\n * type-system level constraint makes code that uses this interface more difficult to write.\n *\n * If provided, `TValidate` allows the input type passed to `decode` to be different than `TEncoded`.\n * This is useful when, for example, the type being decoded is `unknown` and must be validated to be a `TEncoded` before being decoded to a `TDecoded`.\n */\nexport interface IJsonCodec<\n\tTDecoded,\n\tTEncoded = JsonCompatibleReadOnly,\n\tTValidate = TEncoded,\n\tTContext = void,\n> extends IEncoder<TDecoded, TEncoded, TContext>,\n\t\tIDecoder<TDecoded, TValidate, TContext> {\n\tencodedSchema?: TAnySchema;\n}\n\n/**\n * @remarks TODO: We might consider using DataView or some kind of writer instead of IsoBuffer.\n */\nexport interface IBinaryCodec<TDecoded, TContext = void>\n\textends IEncoder<TDecoded, IsoBuffer, TContext>,\n\t\tIDecoder<TDecoded, IsoBuffer, TContext> {}\n\n/**\n * Contains knowledge of how to encode some in-memory type into JSON and binary formats,\n * as well as how to decode those representations.\n *\n * @remarks Codecs are typically used in shared-tree to convert data into some persisted format.\n * For this common use case, any format for encoding that was ever actually used needs to\n * be supported for decoding in all future code versions.\n *\n * Using an {@link ICodecFamily} is the recommended strategy for managing this support, keeping in\n * mind evolution of encodings over time.\n */\nexport interface IMultiFormatCodec<\n\tTDecoded,\n\tTJsonEncoded extends JsonCompatibleReadOnly = JsonCompatibleReadOnly,\n\tTJsonValidate = TJsonEncoded,\n\tTContext = void,\n> {\n\tjson: IJsonCodec<TDecoded, TJsonEncoded, TJsonValidate, TContext>;\n\tbinary: IBinaryCodec<TDecoded, TContext>;\n\n\t/** Ensures multi-format codecs cannot also be single-format codecs. */\n\tencode?: never;\n\t/** Ensures multi-format codecs cannot also be single-format codecs. */\n\tdecode?: never;\n}\n\n/**\n * Represents a family of codecs that can be used to encode and decode data in different formats.\n * The family is identified by a format version, which is typically used to select the codec to use.\n *\n * Separating codecs into families rather than having a single codec support multiple versions (i.e. currying\n * the `formatVersion` parameter)\n * allows avoiding some duplicate work at encode/decode time, since the vast majority of document usage will not\n * involve mixed format versions.\n *\n * @privateRemarks - This interface currently assumes all codecs in a family require the same encode/decode context,\n * which isn't necessarily true.\n * This may need to be relaxed in the future.\n */\nexport interface ICodecFamily<TDecoded, TContext = void> {\n\t/**\n\t * @returns a codec that can be used to encode and decode data in the specified format.\n\t * @throws - if the format version is not supported by this family.\n\t * @remarks Implementations should typically emit telemetry (either indirectly by throwing a well-known error with\n\t * logged properties or directly using some logger) when a format version is requested that is not supported.\n\t * This ensures that applications can diagnose compatibility issues.\n\t */\n\tresolve(\n\t\tformatVersion: number,\n\t): IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>;\n\n\t/**\n\t * @returns an iterable of all format versions supported by this family.\n\t */\n\tgetSupportedFormats(): Iterable<number>;\n}\n\n/**\n * Creates a codec family from a registry of codecs.\n * Any codec that is not a {@link IMultiFormatCodec} will be wrapped with a default binary encoding.\n */\nexport function makeCodecFamily<TDecoded, TContext>(\n\tregistry: Iterable<\n\t\t[\n\t\t\tformatVersion: number,\n\t\t\tcodec:\n\t\t\t\t| IMultiFormatCodec<\n\t\t\t\t\t\tTDecoded,\n\t\t\t\t\t\tJsonCompatibleReadOnly,\n\t\t\t\t\t\tJsonCompatibleReadOnly,\n\t\t\t\t\t\tTContext\n\t\t\t\t >\n\t\t\t\t| IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>,\n\t\t]\n\t>,\n): ICodecFamily<TDecoded, TContext> {\n\tconst codecs: Map<\n\t\tnumber,\n\t\tIMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>\n\t> = new Map();\n\tfor (const [formatVersion, codec] of registry) {\n\t\tif (codecs.has(formatVersion)) {\n\t\t\tfail(\"Duplicate codecs specified.\");\n\t\t}\n\t\tcodecs.set(formatVersion, ensureBinaryEncoding(codec));\n\t}\n\n\treturn {\n\t\tresolve(formatVersion: number) {\n\t\t\tconst codec = codecs.get(formatVersion);\n\t\t\tassert(codec !== undefined, 0x5e6 /* Requested coded for unsupported format. */);\n\t\t\treturn codec;\n\t\t},\n\t\tgetSupportedFormats() {\n\t\t\treturn codecs.keys();\n\t\t},\n\t};\n}\n\nclass DefaultBinaryCodec<TDecoded, TContext> implements IBinaryCodec<TDecoded, TContext> {\n\tpublic constructor(\n\t\tprivate readonly jsonCodec: IJsonCodec<TDecoded, unknown, unknown, TContext>,\n\t) {}\n\n\tpublic encode(change: TDecoded, context: TContext): IsoBuffer {\n\t\tconst jsonable = this.jsonCodec.encode(change, context);\n\t\tconst json = JSON.stringify(jsonable);\n\t\treturn IsoBuffer.from(json);\n\t}\n\n\tpublic decode(change: IsoBuffer, context: TContext): TDecoded {\n\t\tconst json = bufferToString(change, \"utf8\");\n\t\tconst jsonable = JSON.parse(json);\n\t\treturn this.jsonCodec.decode(jsonable, context);\n\t}\n}\n\nfunction isJsonCodec<TDecoded, TContext>(\n\tcodec:\n\t\t| IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>\n\t\t| IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>,\n): codec is IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\n\treturn typeof codec.encode === \"function\" && typeof codec.decode === \"function\";\n}\n\n/**\n * Constructs a {@link IMultiFormatCodec} from a `IJsonCodec` using a generic binary encoding that simply writes\n * the json representation of the object to a buffer.\n */\nexport function withDefaultBinaryEncoding<TDecoded, TContext>(\n\tjsonCodec: IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>,\n): IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\n\treturn {\n\t\tjson: jsonCodec,\n\t\tbinary: new DefaultBinaryCodec(jsonCodec),\n\t};\n}\n\n/**\n * Ensures that the provided single or multi-format codec has a binary encoding.\n * Adapts the json encoding using {@link withDefaultBinaryEncoding} if necessary.\n */\nexport function ensureBinaryEncoding<TDecoded, TContext>(\n\tcodec:\n\t\t| IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>\n\t\t| IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>,\n): IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\n\treturn isJsonCodec(codec) ? withDefaultBinaryEncoding(codec) : codec;\n}\n\n/**\n * Codec for objects which carry no information.\n */\nexport const unitCodec: IMultiFormatCodec<0, JsonCompatibleReadOnly, JsonCompatibleReadOnly, any> =\n\t{\n\t\tjson: {\n\t\t\tencode: () => 0,\n\t\t\tdecode: () => 0,\n\t\t},\n\t\tbinary: {\n\t\t\tencode: () => IsoBuffer.from(\"\"),\n\t\t\tdecode: () => 0,\n\t\t},\n\t};\n\n/**\n * Wraps a codec with JSON schema validation for its encoded type.\n * @returns An {@link IJsonCodec} which validates the data it encodes and decodes matches the provided schema.\n */\nexport function withSchemaValidation<\n\tTInMemoryFormat,\n\tEncodedSchema extends TSchema,\n\tTEncodedFormat = JsonCompatibleReadOnly,\n\tTValidate = TEncodedFormat,\n\tTContext = ChangeEncodingContext,\n>(\n\tschema: EncodedSchema,\n\tcodec: IJsonCodec<TInMemoryFormat, TEncodedFormat, TValidate, TContext>,\n\tvalidator?: JsonValidator,\n): IJsonCodec<TInMemoryFormat, TEncodedFormat, TValidate, TContext> {\n\tif (!validator) {\n\t\treturn codec;\n\t}\n\tconst compiledFormat = validator.compile(schema);\n\treturn {\n\t\tencode: (obj: TInMemoryFormat, context: TContext) => {\n\t\t\tconst encoded = codec.encode(obj, context);\n\t\t\tif (!compiledFormat.check(encoded)) {\n\t\t\t\tfail(\"Encoded schema should validate\");\n\t\t\t}\n\t\t\treturn encoded;\n\t\t},\n\t\tdecode: (encoded: TValidate, context: TContext) => {\n\t\t\tif (!compiledFormat.check(encoded)) {\n\t\t\t\tfail(\"Encoded schema should validate\");\n\t\t\t}\n\t\t\t// TODO: would be nice to provide a more specific validate type to the inner codec than the outer one gets.\n\t\t\treturn codec.decode(encoded, context) as unknown as TInMemoryFormat;\n\t\t},\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"discriminatedUnions.d.ts","sourceRoot":"","sources":["../../src/codec/discriminatedUnions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAqB,MAAM,kBAAkB,CAAC;AAEnE;;;;GAIG;AAEH;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,aAI1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,qBAAa,4BAA4B,CAAC,MAAM,SAAS,MAAM,EAAE,KAAK,SAAS,GAAG,EAAE,EAAE,OAAO;IAC5F,OAAO,CAAC,QAAQ,CAAC,OAAO,CAGtB;gBAGD,OAAO,EAAE;QACR;YACC,QAAQ,EAAE,QAAQ,IAAI,MAAM,MAAM,CAAC,CAAC,GAAG,CACtC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACjC,GAAG,IAAI,EAAE,KAAK,KACV,OAAO;SACZ;KACD,CAAC,YAAY,CAAC;IAOT,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,GAAG,OAAO;CAYvD"}
1
+ {"version":3,"file":"discriminatedUnions.d.ts","sourceRoot":"","sources":["../../src/codec/discriminatedUnions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAqB,MAAM,kBAAkB,CAAC;AAEnE;;;;GAIG;AAEH;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,aAI1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,qBAAa,4BAA4B,CAAC,MAAM,SAAS,MAAM,EAAE,KAAK,SAAS,GAAG,EAAE,EAAE,OAAO;IAC5F,OAAO,CAAC,QAAQ,CAAC,OAAO,CAGtB;gBAGD,OAAO,EAAE;QACR;YACC,QAAQ,EAAE,QAAQ,IAAI,MAAM,MAAM,CAAC,CAAC,GAAG,CACtC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACjC,GAAG,IAAI,EAAE,KAAK,KACV,OAAO;SACZ;KACD,CAAC,YAAY,CAAC;IAOT,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,GAAG,OAAO;CAYvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"discriminatedUnions.js","sourceRoot":"","sources":["../../src/codec/discriminatedUnions.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,2DAAoD;AACpD,+CAAmE;AAEnE;;;;GAIG;AAEH;;;;GAIG;AACU,QAAA,YAAY,GAAkB;IAC1C,oBAAoB,EAAE,KAAK;IAC3B,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAa,4BAA4B;IAMxC,YACC,OAOe;QAEf,IAAI,CAAC,OAAO,GAAG,IAAA,sBAAW,EACzB,OAA4E,CAC5E,CAAC;IACH,CAAC;IAEM,QAAQ,CAAC,KAAa,EAAE,GAAG,IAAW;QAC5C,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpC,IAAA,mBAAM,EACL,IAAI,CAAC,MAAM,KAAK,CAAC,EACjB,KAAK,CAAC,6DAA6D,CACnE,CAAC;QACF,MAAM,GAAG,GAAiB,IAAI,CAAC,CAAC,CAAiB,CAAC;QAClD,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAA,eAAI,EAAC,mCAAmC,CAAC,CAAC;QACnF,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;QACvC,OAAO,MAAM,CAAC;IACf,CAAC;CACD;AAjCD,oEAiCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ObjectOptions } from \"@sinclair/typebox\";\nimport { assert } from \"@fluidframework/core-utils\";\nimport { _InlineTrick, fail, objectToMap } from \"../util/index.js\";\n\n/**\n * This module contains utilities for an encoding of a discriminated union that is efficient to validate using\n * a JSON schema validator.\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\n\n/**\n * Options to configure a TypeBox schema as a discriminated union that is simple to validate data against.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const unionOptions: ObjectOptions = {\n\tadditionalProperties: false,\n\tminProperties: 1,\n\tmaxProperties: 1,\n};\n\n/**\n * Applies a function to the content of a [discriminated union](https://en.wikipedia.org/wiki/Tagged_union)\n * where the function to apply depends on which value from the union it holds.\n *\n * This uses a rather non-standard encoding of the union where it is an object with many differently named optional fields,\n * and which of the fields is populated determines the content type.\n * This union encoding has the advantage that schema validation (such as that implemented by TypeBox) can validate the data efficiently.\n * Other encodings--such as using an untagged union, then tagging the content types with a marker enum--require the schema validator to disambiguate the union members.\n * Most JSON validator implementations fail to recognize the marker enum determines which component of the discriminated union the data must be,\n * and end up checking against all candidate members of the union.\n *\n * @example\n *\n * The following union:\n * ```typescript\n * type Operation = Add | Subtract | Multiply | Divide;\n *\n * interface BinaryOperation {\n * readonly left: number;\n * readonly right: number;\n * }\n *\n * interface Add extends BinaryOperation {\n * readonly type: \"add\";\n * }\n *\n * interface Subtract extends BinaryOperation {\n * readonly type: \"subtract\";\n * }\n *\n * interface Multiply extends BinaryOperation {\n * readonly type: \"multiply\";\n * }\n *\n * interface Divide extends BinaryOperation {\n * readonly type: \"divide\";\n * }\n *\n * ```\n * Would be encoded using this strategy as:\n * ```typescript\n * interface EncodedBinaryOperation {\n * readonly left: number;\n * readonly right: number;\n * }\n *\n * interface EncodedOperation {\n * add?: EncodedBinaryOperation;\n * subtract?: EncodedBinaryOperation;\n * multiply?: EncodedBinaryOperation;\n * divide?: EncodedBinaryOperation;\n * }\n * ```\n * where only a single property of `EncodedOperation` is populated for a given encoded value.\n */\nexport class DiscriminatedUnionDispatcher<TUnion extends object, TArgs extends any[], TResult> {\n\tprivate readonly library: ReadonlyMap<\n\t\tkeyof TUnion,\n\t\t(value: unknown, ...args: TArgs) => TResult\n\t>;\n\n\tpublic constructor(\n\t\tlibrary: [\n\t\t\t{\n\t\t\t\treadonly [Property in keyof TUnion]-?: (\n\t\t\t\t\tvalue: Required<TUnion>[Property],\n\t\t\t\t\t...args: TArgs\n\t\t\t\t) => TResult;\n\t\t\t},\n\t\t][_InlineTrick],\n\t) {\n\t\tthis.library = objectToMap(\n\t\t\tlibrary as Record<keyof TUnion, (value: unknown, ...args: TArgs) => TResult>,\n\t\t);\n\t}\n\n\tpublic dispatch(union: TUnion, ...args: TArgs): TResult {\n\t\tconst keys = Reflect.ownKeys(union);\n\t\tassert(\n\t\t\tkeys.length === 1,\n\t\t\t0x733 /* discriminated union type should have exactly one member */,\n\t\t);\n\t\tconst key: keyof TUnion = keys[0] as keyof TUnion;\n\t\tconst value = union[key];\n\t\tconst factory = this.library.get(key) ?? fail(\"missing function for union member\");\n\t\tconst result = factory(value, ...args);\n\t\treturn result;\n\t}\n}\n"]}
1
+ {"version":3,"file":"discriminatedUnions.js","sourceRoot":"","sources":["../../src/codec/discriminatedUnions.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAEpD,+CAAmE;AAEnE;;;;GAIG;AAEH;;;;GAIG;AACU,QAAA,YAAY,GAAkB;IAC1C,oBAAoB,EAAE,KAAK;IAC3B,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAa,4BAA4B;IAMxC,YACC,OAOe;QAEf,IAAI,CAAC,OAAO,GAAG,IAAA,sBAAW,EACzB,OAA4E,CAC5E,CAAC;IACH,CAAC;IAEM,QAAQ,CAAC,KAAa,EAAE,GAAG,IAAW;QAC5C,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpC,IAAA,mBAAM,EACL,IAAI,CAAC,MAAM,KAAK,CAAC,EACjB,KAAK,CAAC,6DAA6D,CACnE,CAAC;QACF,MAAM,GAAG,GAAiB,IAAI,CAAC,CAAC,CAAiB,CAAC;QAClD,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAA,eAAI,EAAC,mCAAmC,CAAC,CAAC;QACnF,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;QACvC,OAAO,MAAM,CAAC;IACf,CAAC;CACD;AAjCD,oEAiCC","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\";\nimport { ObjectOptions } from \"@sinclair/typebox\";\nimport { _InlineTrick, fail, objectToMap } from \"../util/index.js\";\n\n/**\n * This module contains utilities for an encoding of a discriminated union that is efficient to validate using\n * a JSON schema validator.\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\n\n/**\n * Options to configure a TypeBox schema as a discriminated union that is simple to validate data against.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const unionOptions: ObjectOptions = {\n\tadditionalProperties: false,\n\tminProperties: 1,\n\tmaxProperties: 1,\n};\n\n/**\n * Applies a function to the content of a [discriminated union](https://en.wikipedia.org/wiki/Tagged_union)\n * where the function to apply depends on which value from the union it holds.\n *\n * This uses a rather non-standard encoding of the union where it is an object with many differently named optional fields,\n * and which of the fields is populated determines the content type.\n * This union encoding has the advantage that schema validation (such as that implemented by TypeBox) can validate the data efficiently.\n * Other encodings--such as using an untagged union, then tagging the content types with a marker enum--require the schema validator to disambiguate the union members.\n * Most JSON validator implementations fail to recognize the marker enum determines which component of the discriminated union the data must be,\n * and end up checking against all candidate members of the union.\n *\n * @example\n *\n * The following union:\n * ```typescript\n * type Operation = Add | Subtract | Multiply | Divide;\n *\n * interface BinaryOperation {\n * readonly left: number;\n * readonly right: number;\n * }\n *\n * interface Add extends BinaryOperation {\n * readonly type: \"add\";\n * }\n *\n * interface Subtract extends BinaryOperation {\n * readonly type: \"subtract\";\n * }\n *\n * interface Multiply extends BinaryOperation {\n * readonly type: \"multiply\";\n * }\n *\n * interface Divide extends BinaryOperation {\n * readonly type: \"divide\";\n * }\n *\n * ```\n * Would be encoded using this strategy as:\n * ```typescript\n * interface EncodedBinaryOperation {\n * readonly left: number;\n * readonly right: number;\n * }\n *\n * interface EncodedOperation {\n * add?: EncodedBinaryOperation;\n * subtract?: EncodedBinaryOperation;\n * multiply?: EncodedBinaryOperation;\n * divide?: EncodedBinaryOperation;\n * }\n * ```\n * where only a single property of `EncodedOperation` is populated for a given encoded value.\n */\nexport class DiscriminatedUnionDispatcher<TUnion extends object, TArgs extends any[], TResult> {\n\tprivate readonly library: ReadonlyMap<\n\t\tkeyof TUnion,\n\t\t(value: unknown, ...args: TArgs) => TResult\n\t>;\n\n\tpublic constructor(\n\t\tlibrary: [\n\t\t\t{\n\t\t\t\treadonly [Property in keyof TUnion]-?: (\n\t\t\t\t\tvalue: Required<TUnion>[Property],\n\t\t\t\t\t...args: TArgs\n\t\t\t\t) => TResult;\n\t\t\t},\n\t\t][_InlineTrick],\n\t) {\n\t\tthis.library = objectToMap(\n\t\t\tlibrary as Record<keyof TUnion, (value: unknown, ...args: TArgs) => TResult>,\n\t\t);\n\t}\n\n\tpublic dispatch(union: TUnion, ...args: TArgs): TResult {\n\t\tconst keys = Reflect.ownKeys(union);\n\t\tassert(\n\t\t\tkeys.length === 1,\n\t\t\t0x733 /* discriminated union type should have exactly one member */,\n\t\t);\n\t\tconst key: keyof TUnion = keys[0] as keyof TUnion;\n\t\tconst value = union[key];\n\t\tconst factory = this.library.get(key) ?? fail(\"missing function for union member\");\n\t\tconst result = factory(value, ...args);\n\t\treturn result;\n\t}\n}\n"]}
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { TSchema } from "@sinclair/typebox";
6
- import { ICodecOptions, IJsonCodec } from "../codec.js";
7
6
  import { JsonCompatibleReadOnly } from "../../util/index.js";
7
+ import { ICodecOptions, IJsonCodec } from "../codec.js";
8
8
  import { Versioned } from "./format.js";
9
9
  export declare function makeVersionedCodec<TDecoded, TEncoded extends Versioned = JsonCompatibleReadOnly & Versioned, TValidate = TEncoded, TContext = void>(supportedVersions: Set<number>, { jsonValidator: validator }: ICodecOptions, inner: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>): IJsonCodec<TDecoded, TEncoded, TValidate, TContext>;
10
10
  export declare function makeVersionedValidatedCodec<EncodedSchema extends TSchema, TDecoded, TEncoded extends Versioned = JsonCompatibleReadOnly & Versioned, TValidate = TEncoded, TContext = void>(options: ICodecOptions, supportedVersions: Set<number>, schema: EncodedSchema, codec: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>): IJsonCodec<TDecoded, TEncoded, TValidate, TContext>;
@@ -1 +1 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../src/codec/versioned/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAwB,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,wBAAgB,kBAAkB,CACjC,QAAQ,EACR,QAAQ,SAAS,SAAS,GAAG,sBAAsB,GAAG,SAAS,EAC/D,SAAS,GAAG,QAAQ,EACpB,QAAQ,GAAG,IAAI,EAEf,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC9B,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,aAAa,EAC3C,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,GACxD,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAwBrD;AAED,wBAAgB,2BAA2B,CAC1C,aAAa,SAAS,OAAO,EAC7B,QAAQ,EACR,QAAQ,SAAS,SAAS,GAAG,sBAAsB,GAAG,SAAS,EAC/D,SAAS,GAAG,QAAQ,EACpB,QAAQ,GAAG,IAAI,EAEf,OAAO,EAAE,aAAa,EACtB,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,E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1D,CAAC;AACH,CAAC;AAjBD,kEAiBC","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\";\nimport { TSchema } from \"@sinclair/typebox\";\nimport { ICodecOptions, IJsonCodec, withSchemaValidation } from \"../codec.js\";\nimport { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport { Versioned } from \"./format.js\";\n\nexport function makeVersionedCodec<\n\tTDecoded,\n\tTEncoded extends Versioned = JsonCompatibleReadOnly & Versioned,\n\tTValidate = TEncoded,\n\tTContext = void,\n>(\n\tsupportedVersions: Set<number>,\n\t{ jsonValidator: validator }: ICodecOptions,\n\tinner: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>,\n): IJsonCodec<TDecoded, TEncoded, TValidate, TContext> {\n\treturn withSchemaValidation(\n\t\tVersioned,\n\t\t{\n\t\t\tencode: (data: TDecoded, context: TContext): TEncoded => {\n\t\t\t\tconst encoded = inner.encode(data, context);\n\t\t\t\tassert(\n\t\t\t\t\tsupportedVersions.has(encoded.version),\n\t\t\t\t\t0x88b /* version being encoded should be supported */,\n\t\t\t\t);\n\t\t\t\treturn encoded;\n\t\t\t},\n\t\t\tdecode: (data: TValidate, context: TContext): TDecoded => {\n\t\t\t\tconst versioned = data as Versioned; // Validated by withSchemaValidation\n\t\t\t\tassert(\n\t\t\t\t\tsupportedVersions.has(versioned.version),\n\t\t\t\t\t0x88c /* version being decoded is not supported */,\n\t\t\t\t);\n\t\t\t\tconst decoded = inner.decode(data, context);\n\t\t\t\treturn decoded;\n\t\t\t},\n\t\t},\n\t\tvalidator,\n\t);\n}\n\nexport function makeVersionedValidatedCodec<\n\tEncodedSchema extends TSchema,\n\tTDecoded,\n\tTEncoded extends Versioned = JsonCompatibleReadOnly & Versioned,\n\tTValidate = TEncoded,\n\tTContext = void,\n>(\n\toptions: ICodecOptions,\n\tsupportedVersions: Set<number>,\n\tschema: EncodedSchema,\n\tcodec: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>,\n): IJsonCodec<TDecoded, TEncoded, TValidate, TContext> {\n\treturn makeVersionedCodec(\n\t\tsupportedVersions,\n\t\toptions,\n\t\twithSchemaValidation(schema, codec, options.jsonValidator),\n\t);\n}\n"]}
1
+ {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/codec/versioned/codec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAGpD,0CAA8E;AAC9E,2CAAwC;AAExC,SAAgB,kBAAkB,CAMjC,iBAA8B,EAC9B,EAAE,aAAa,EAAE,SAAS,EAAiB,EAC3C,KAA0D;IAE1D,OAAO,IAAA,+BAAoB,EAC1B,qBAAS,EACT;QACC,MAAM,EAAE,CAAC,IAAc,EAAE,OAAiB,EAAY,EAAE;YACvD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC5C,IAAA,mBAAM,EACL,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,EACtC,KAAK,CAAC,+CAA+C,CACrD,CAAC;YACF,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,CAAC,IAAe,EAAE,OAAiB,EAAY,EAAE;YACxD,MAAM,SAAS,GAAG,IAAiB,CAAC,CAAC,oCAAoC;YACzE,IAAA,mBAAM,EACL,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,EACxC,KAAK,CAAC,4CAA4C,CAClD,CAAC;YACF,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC5C,OAAO,OAAO,CAAC;QAChB,CAAC;KACD,EACD,SAAS,CACT,CAAC;AACH,CAAC;AAjCD,gDAiCC;AAED,SAAgB,2BAA2B,CAO1C,OAAsB,EACtB,iBAA8B,EAC9B,MAAqB,EACrB,KAA0D;IAE1D,OAAO,kBAAkB,CACxB,iBAAiB,EACjB,OAAO,EACP,IAAA,+BAAoB,EAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,CAC1D,CAAC;AACH,CAAC;AAjBD,kEAiBC","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\";\nimport { TSchema } from \"@sinclair/typebox\";\nimport { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport { ICodecOptions, IJsonCodec, withSchemaValidation } from \"../codec.js\";\nimport { Versioned } from \"./format.js\";\n\nexport function makeVersionedCodec<\n\tTDecoded,\n\tTEncoded extends Versioned = JsonCompatibleReadOnly & Versioned,\n\tTValidate = TEncoded,\n\tTContext = void,\n>(\n\tsupportedVersions: Set<number>,\n\t{ jsonValidator: validator }: ICodecOptions,\n\tinner: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>,\n): IJsonCodec<TDecoded, TEncoded, TValidate, TContext> {\n\treturn withSchemaValidation(\n\t\tVersioned,\n\t\t{\n\t\t\tencode: (data: TDecoded, context: TContext): TEncoded => {\n\t\t\t\tconst encoded = inner.encode(data, context);\n\t\t\t\tassert(\n\t\t\t\t\tsupportedVersions.has(encoded.version),\n\t\t\t\t\t0x88b /* version being encoded should be supported */,\n\t\t\t\t);\n\t\t\t\treturn encoded;\n\t\t\t},\n\t\t\tdecode: (data: TValidate, context: TContext): TDecoded => {\n\t\t\t\tconst versioned = data as Versioned; // Validated by withSchemaValidation\n\t\t\t\tassert(\n\t\t\t\t\tsupportedVersions.has(versioned.version),\n\t\t\t\t\t0x88c /* version being decoded is not supported */,\n\t\t\t\t);\n\t\t\t\tconst decoded = inner.decode(data, context);\n\t\t\t\treturn decoded;\n\t\t\t},\n\t\t},\n\t\tvalidator,\n\t);\n}\n\nexport function makeVersionedValidatedCodec<\n\tEncodedSchema extends TSchema,\n\tTDecoded,\n\tTEncoded extends Versioned = JsonCompatibleReadOnly & Versioned,\n\tTValidate = TEncoded,\n\tTContext = void,\n>(\n\toptions: ICodecOptions,\n\tsupportedVersions: Set<number>,\n\tschema: EncodedSchema,\n\tcodec: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>,\n): IJsonCodec<TDecoded, TEncoded, TValidate, TContext> {\n\treturn makeVersionedCodec(\n\t\tsupportedVersions,\n\t\toptions,\n\t\twithSchemaValidation(schema, codec, options.jsonValidator),\n\t);\n}\n"]}
@@ -4,9 +4,9 @@
4
4
  */
5
5
  import { SessionId } from "@fluidframework/id-compressor";
6
6
  import { ICodecFamily, IJsonCodec } from "../../codec/index.js";
7
- import { ChangeRebaser } from "../rebase/index.js";
8
- import { JsonCompatibleReadOnly } from "../../util/index.js";
9
7
  import { SchemaAndPolicy } from "../../feature-libraries/index.js";
8
+ import { JsonCompatibleReadOnly } from "../../util/index.js";
9
+ import { ChangeRebaser } from "../rebase/index.js";
10
10
  export interface ChangeFamily<TEditor extends ChangeFamilyEditor, TChange> {
11
11
  buildEditor(changeReceiver: (change: TChange) => void): TEditor;
12
12
  readonly rebaser: ChangeRebaser<TChange>;
@@ -1 +1 @@
1
- {"version":3,"file":"changeFamily.d.ts","sourceRoot":"","sources":["../../../src/core/change-family/changeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,MAAM,WAAW,YAAY,CAAC,OAAO,SAAS,kBAAkB,EAAE,OAAO;IACxE,WAAW,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC;IAEhE,QAAQ,CAAC,OAAO,E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Q,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CAClC;AAED,MAAM,MAAM,iBAAiB,CAAC,OAAO,IAAI,UAAU,CAClD,OAAO,EACP,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,CACrB,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAClC;;;;;;;OAOG;IACH,gBAAgB,IAAI,IAAI,CAAC;IAEzB;;;;;;;OAOG;IACH,eAAe,IAAI,IAAI,CAAC;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"changeFamily.js","sourceRoot":"","sources":["../../../src/core/change-family/changeFamily.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SessionId } from \"@fluidframework/id-compressor\";\nimport { ICodecFamily, IJsonCodec } from \"../../codec/index.js\";\nimport { ChangeRebaser } from \"../rebase/index.js\";\nimport { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport { SchemaAndPolicy } from \"../../feature-libraries/index.js\";\n\nexport interface ChangeFamily<TEditor extends ChangeFamilyEditor, TChange> {\n\tbuildEditor(changeReceiver: (change: TChange) => void): TEditor;\n\n\treadonly rebaser: ChangeRebaser<TChange>;\n\treadonly codecs: ICodecFamily<TChange, ChangeEncodingContext>;\n}\n\nexport interface ChangeEncodingContext {\n\treadonly originatorId: SessionId;\n\treadonly schema?: SchemaAndPolicy;\n}\n\nexport type ChangeFamilyCodec<TChange> = IJsonCodec<\n\tTChange,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tChangeEncodingContext\n>;\n\nexport interface ChangeFamilyEditor {\n\t/**\n\t * Must be called when a new transaction starts.\n\t *\n\t * Note: transactions are an optional feature. It is valid to make edits outside of a transaction.\n\t *\n\t * For each call to this function, a matching call to `exitTransaction` must be made at a later time.\n\t * Can be called repeatedly to indicate the start of nesting transactions.\n\t */\n\tenterTransaction(): void;\n\n\t/**\n\t * Must be called when a transaction ends.\n\t *\n\t * Note: transactions are an optional feature. It is valid to make edits outside of a transaction.\n\t *\n\t * For each call to this function, a matching call to `enterTransaction` must be made at an earlier time.\n\t * Can be called repeatedly to indicate the end of nesting transactions.\n\t */\n\texitTransaction(): void;\n}\n"]}
1
+ {"version":3,"file":"changeFamily.js","sourceRoot":"","sources":["../../../src/core/change-family/changeFamily.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SessionId } from \"@fluidframework/id-compressor\";\nimport { ICodecFamily, IJsonCodec } from \"../../codec/index.js\";\nimport { SchemaAndPolicy } from \"../../feature-libraries/index.js\";\nimport { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport { ChangeRebaser } from \"../rebase/index.js\";\n\nexport interface ChangeFamily<TEditor extends ChangeFamilyEditor, TChange> {\n\tbuildEditor(changeReceiver: (change: TChange) => void): TEditor;\n\n\treadonly rebaser: ChangeRebaser<TChange>;\n\treadonly codecs: ICodecFamily<TChange, ChangeEncodingContext>;\n}\n\nexport interface ChangeEncodingContext {\n\treadonly originatorId: SessionId;\n\treadonly schema?: SchemaAndPolicy;\n}\n\nexport type ChangeFamilyCodec<TChange> = IJsonCodec<\n\tTChange,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tChangeEncodingContext\n>;\n\nexport interface ChangeFamilyEditor {\n\t/**\n\t * Must be called when a new transaction starts.\n\t *\n\t * Note: transactions are an optional feature. It is valid to make edits outside of a transaction.\n\t *\n\t * For each call to this function, a matching call to `exitTransaction` must be made at a later time.\n\t * Can be called repeatedly to indicate the start of nesting transactions.\n\t */\n\tenterTransaction(): void;\n\n\t/**\n\t * Must be called when a transaction ends.\n\t *\n\t * Note: transactions are an optional feature. It is valid to make edits outside of a transaction.\n\t *\n\t * For each call to this function, a matching call to `enterTransaction` must be made at an earlier time.\n\t * Can be called repeatedly to indicate the end of nesting transactions.\n\t */\n\texitTransaction(): void;\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { RevisionTagCodec } from "../rebase/index.js";
6
6
  import { FieldKey } from "../schema-stored/index.js";
7
- import { DetachedField, Anchor, ITreeCursorSynchronous, DeltaVisitor } from "../tree/index.js";
7
+ import { Anchor, DeltaVisitor, DetachedField, ITreeCursorSynchronous } from "../tree/index.js";
8
8
  import { IForestSubscription, ITreeSubscriptionCursor } from "./forest.js";
9
9
  /**
10
10
  * Editing APIs.
@@ -1 +1 @@
1
- {"version":3,"file":"editableForest.d.ts","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EACN,aAAa,EACb,MAAM,EACN,sBAAsB,EACtB,YAAY,EAKZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC3D;;;;;;;;;OASG;IACH,cAAc,IAAI,YAAY,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,SAAS,sBAAsB,EAAE,EAC1C,gBAAgB,EAAE,gBAAgB,GAChC,IAAI,CAIN;AAID;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,uBAAuB,GAAG,MAAM,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,GAAG,KAAK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"editableForest.js","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAGpD,+CAS0B;AAqB1B;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAC/B,MAAuB,EACvB,OAA0C,EAC1C,gBAAkC;IAElC,IAAA,mBAAM,EAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACzD,MAAM,KAAK,GAAc,IAAA,qCAA0B,EAAC,OAAO,CAAC,CAAC;IAC7D,IAAA,qBAAU,EAAC,KAAK,EAAE,MAAM,EAAE,IAAA,iCAAsB,EAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAC7E,CAAC;AARD,4CAQC;AAkBD,SAAgB,eAAe,CAAC,KAAoC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AAClC,CAAC;AAFD,0CAEC","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\";\nimport { RevisionTagCodec } from \"../rebase/index.js\";\nimport { FieldKey } from \"../schema-stored/index.js\";\nimport {\n\tDetachedField,\n\tAnchor,\n\tITreeCursorSynchronous,\n\tDeltaVisitor,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tdeltaForRootInitialization,\n\tDeltaRoot,\n} from \"../tree/index.js\";\nimport { IForestSubscription, ITreeSubscriptionCursor } from \"./forest.js\";\n\n/**\n * Editing APIs.\n * @internal\n */\nexport interface IEditableForest extends IForestSubscription {\n\t/**\n\t * Provides a visitor that can be used to mutate the forest.\n\t *\n\t * @returns a visitor that can be used to mutate the forest.\n\t *\n\t * @remarks\n\t * Mutating the forest does NOT update anchors.\n\t * The visitor must be released after use by calling {@link DeltaVisitor.free} on it.\n\t * It is invalid to acquire a visitor without releasing the previous one.\n\t */\n\tacquireVisitor(): DeltaVisitor;\n}\n\n/**\n * Sets the contents of the forest via delta.\n * Requires the fores starts empty.\n *\n * @remarks\n * This does not perform an edit: it updates the forest content as if there was an edit that did that.\n */\nexport function initializeForest(\n\tforest: IEditableForest,\n\tcontent: readonly ITreeCursorSynchronous[],\n\trevisionTagCodec: RevisionTagCodec,\n): void {\n\tassert(forest.isEmpty, 0x747 /* forest must be empty */);\n\tconst delta: DeltaRoot = deltaForRootInitialization(content);\n\tapplyDelta(delta, forest, makeDetachedFieldIndex(\"init\", revisionTagCodec));\n}\n\n// TODO: Types below here may be useful for input into edit building APIs, but are no longer used here directly.\n\n/**\n * Ways to refer to a node in an IEditableForest.\n * @internal\n */\nexport type ForestLocation = ITreeSubscriptionCursor | Anchor;\n\n/**\n * @internal\n */\nexport interface TreeLocation {\n\treadonly range: FieldLocation | DetachedField;\n\treadonly index: number;\n}\n\nexport function isFieldLocation(range: FieldLocation | DetachedField): range is FieldLocation {\n\treturn typeof range === \"object\";\n}\n\n/**\n * Location of a field within a tree that is not a detached/root field.\n * @internal\n */\nexport interface FieldLocation {\n\treadonly key: FieldKey;\n\treadonly parent: ForestLocation;\n}\n"]}
1
+ {"version":3,"file":"editableForest.js","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAGpD,+CAS0B;AAqB1B;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAC/B,MAAuB,EACvB,OAA0C,EAC1C,gBAAkC;IAElC,IAAA,mBAAM,EAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACzD,MAAM,KAAK,GAAc,IAAA,qCAA0B,EAAC,OAAO,CAAC,CAAC;IAC7D,IAAA,qBAAU,EAAC,KAAK,EAAE,MAAM,EAAE,IAAA,iCAAsB,EAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAC7E,CAAC;AARD,4CAQC;AAkBD,SAAgB,eAAe,CAAC,KAAoC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AAClC,CAAC;AAFD,0CAEC","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\";\nimport { RevisionTagCodec } from \"../rebase/index.js\";\nimport { FieldKey } from \"../schema-stored/index.js\";\nimport {\n\tAnchor,\n\tDeltaRoot,\n\tDeltaVisitor,\n\tDetachedField,\n\tITreeCursorSynchronous,\n\tapplyDelta,\n\tdeltaForRootInitialization,\n\tmakeDetachedFieldIndex,\n} from \"../tree/index.js\";\nimport { IForestSubscription, ITreeSubscriptionCursor } from \"./forest.js\";\n\n/**\n * Editing APIs.\n * @internal\n */\nexport interface IEditableForest extends IForestSubscription {\n\t/**\n\t * Provides a visitor that can be used to mutate the forest.\n\t *\n\t * @returns a visitor that can be used to mutate the forest.\n\t *\n\t * @remarks\n\t * Mutating the forest does NOT update anchors.\n\t * The visitor must be released after use by calling {@link DeltaVisitor.free} on it.\n\t * It is invalid to acquire a visitor without releasing the previous one.\n\t */\n\tacquireVisitor(): DeltaVisitor;\n}\n\n/**\n * Sets the contents of the forest via delta.\n * Requires the fores starts empty.\n *\n * @remarks\n * This does not perform an edit: it updates the forest content as if there was an edit that did that.\n */\nexport function initializeForest(\n\tforest: IEditableForest,\n\tcontent: readonly ITreeCursorSynchronous[],\n\trevisionTagCodec: RevisionTagCodec,\n): void {\n\tassert(forest.isEmpty, 0x747 /* forest must be empty */);\n\tconst delta: DeltaRoot = deltaForRootInitialization(content);\n\tapplyDelta(delta, forest, makeDetachedFieldIndex(\"init\", revisionTagCodec));\n}\n\n// TODO: Types below here may be useful for input into edit building APIs, but are no longer used here directly.\n\n/**\n * Ways to refer to a node in an IEditableForest.\n * @internal\n */\nexport type ForestLocation = ITreeSubscriptionCursor | Anchor;\n\n/**\n * @internal\n */\nexport interface TreeLocation {\n\treadonly range: FieldLocation | DetachedField;\n\treadonly index: number;\n}\n\nexport function isFieldLocation(range: FieldLocation | DetachedField): range is FieldLocation {\n\treturn typeof range === \"object\";\n}\n\n/**\n * Location of a field within a tree that is not a detached/root field.\n * @internal\n */\nexport interface FieldLocation {\n\treadonly key: FieldKey;\n\treadonly parent: ForestLocation;\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { ISubscribable } from "../../events/index.js";
6
- import { TreeStoredSchemaSubscription, FieldKey } from "../schema-stored/index.js";
6
+ import { FieldKey, TreeStoredSchemaSubscription } from "../schema-stored/index.js";
7
7
  import { Anchor, AnchorSet, DetachedField, ITreeCursor, ITreeCursorSynchronous, UpPath } from "../tree/index.js";
8
8
  import type { IEditableForest } from "./editableForest.js";
9
9
  /**
@@ -21,6 +21,10 @@ import type { IEditableForest } from "./editableForest.js";
21
21
  * @internal
22
22
  */
23
23
  export interface ForestEvents {
24
+ /**
25
+ * A new root field was just created in this forest.
26
+ */
27
+ afterRootFieldCreated(key: FieldKey): void;
24
28
  /**
25
29
  * The forest is about to be changed.
26
30
  * Emitted before the first change in a batch of changes.
@@ -1 +1 @@
1
- {"version":3,"file":"forest.d.ts","sourceRoot":"","sources":["../../../src/core/forest/forest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,4BAA4B,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EACN,MAAM,EACN,SAAS,EACT,aAAa,EAEb,WAAW,EACX,sBAAsB,EAEtB,MAAM,EACN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B;;;OAGG;IACH,YAAY,IAAI,IAAI,CAAC;IAErB;;;OAGG;IACH,WAAW,IAAI,IAAI,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,m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MAAM,CAAC;IAEtB;;;;;OAKG;IACH,gBAAgB,IAAI,WAAW,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,4BAA4B,CAAC;CAO7C;AAED;;GAEG;AACH,oBAAY,4BAA4B;IACvC;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,KAAK,IAAA;CACL;AAED;;GAEG;AACH,0BAAkB,oBAAoB;IACrC;;OAEG;IACH,QAAQ,KAAK;IAEb;;OAEG;IACH,OAAO,IAAI;IAEX;;OAEG;IACH,EAAE,IAAI;CACN;AAED;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,oBAAoB,CAAC,EAAE,GAAG,oBAAoB,CAAC,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"forest.js","sourceRoot":"","sources":["../../../src/core/forest/forest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAGpD,+CAS0B;AA+G1B;;;GAGG;AACH,SAAgB,UAAU,CAAC,QAAuB,oBAAS;IAC1D,OAAO;QACN,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,IAAA,6BAAkB,EAAC,KAAK,CAAC;KACnC,CAAC;AACH,CAAC;AALD,gCAKC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAClC,MAA2B,EAC3B,YAAqC,EACrC,QAAuB,oBAAS;IAEhC,MAAM,MAAM,GAAG,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC;IAC5E,IAAA,mBAAM,EACL,MAAM,oCAA4B,EAClC,KAAK,CAAC,qDAAqD,CAC3D,CAAC;AACH,CAAC;AAVD,kDAUC;AAmED;;GAEG;AACH,IAAY,4BAaX;AAbD,WAAY,4BAA4B;IACvC;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,iFAAK,CAAA;AACN,CAAC,EAbW,4BAA4B,4CAA5B,4BAA4B,QAavC;AAED;;GAEG;AACH,IAAkB,oBAejB;AAfD,WAAkB,oBAAoB;IACrC;;OAEG;IACH,wEAAa,CAAA;IAEb;;OAEG;IACH,qEAAW,CAAA;IAEX;;OAEG;IACH,2DAAM,CAAA;AACP,CAAC,EAfiB,oBAAoB,oCAApB,oBAAoB,QAerC","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\";\nimport { ISubscribable } from \"../../events/index.js\";\nimport { TreeStoredSchemaSubscription, FieldKey } from \"../schema-stored/index.js\";\nimport {\n\tAnchor,\n\tAnchorSet,\n\tDetachedField,\n\tdetachedFieldAsKey,\n\tITreeCursor,\n\tITreeCursorSynchronous,\n\trootField,\n\tUpPath,\n} from \"../tree/index.js\";\nimport type { IEditableForest } from \"./editableForest.js\";\n\n/**\n * APIs for forest designed so the implementation can be copy on write,\n * or mutate in place, and we can ensure no references are dangling into the forest to allow this.\n *\n * This results in rather manual memory management,\n * but makes it practical to provide highly optimized implementations,\n * for example WASM powered binary formats that can track reference counts and only copy when needed.\n */\n\n/**\n * Events for {@link IForestSubscription}.\n *\n * TODO: consider having before and after events per subtree instead while applying anchor (and this just shows what happens at the root).\n * @internal\n */\nexport interface ForestEvents {\n\t/**\n\t * The forest is about to be changed.\n\t * Emitted before the first change in a batch of changes.\n\t */\n\tbeforeChange(): void;\n\n\t/**\n\t * The forest was just changed.\n\t * Emitted after the last change in a batch of changes.\n\t */\n\tafterChange(): void;\n}\n\n/**\n * Invalidates whenever the tree content changes.\n * For now (might change later) downloading new parts of the forest counts as a change.\n * Not invalidated when schema changes.\n *\n * When invalidating, all outstanding cursors must be freed or cleared.\n * @internal\n */\nexport interface IForestSubscription extends ISubscribable<ForestEvents> {\n\t/**\n\t * Set of anchors this forest is tracking.\n\t *\n\t * To keep these anchors usable, this AnchorSet must be updated / rebased for any changes made to the forest.\n\t * It is the responsibility of the caller of the forest-editing methods to do this, not the forest itself.\n\t * The caller performs these updates because it has more semantic knowledge about the edits, which can be needed to\n\t * update the anchors in a semantically optimal way.\n\t */\n\treadonly anchors: AnchorSet;\n\n\t/**\n\t * Create an independent copy of this forest, that uses the provided schema and anchors.\n\t *\n\t * The new copy will not invalidate observers (dependents) of the old one.\n\t */\n\tclone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): IEditableForest;\n\n\t/**\n\t * Allocates a cursor in the \"cleared\" state.\n\t */\n\tallocateCursor(): ITreeSubscriptionCursor;\n\n\t/**\n\t * Frees an Anchor, stopping tracking its position across edits.\n\t */\n\tforgetAnchor(anchor: Anchor): void;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * Set `cursorToMove` to location described by path.\n\t * This is NOT a relative move: current position is discarded.\n\t * Path must point to existing node.\n\t */\n\tmoveCursorToPath(destination: UpPath, cursorToMove: ITreeSubscriptionCursor): void;\n\n\t/**\n\t * The cursor is moved to a special dummy node above the detached fields.\n\t * This dummy node can be used to read the detached fields,\n\t * but other operations (such as inspecting the dummy node's type or path) should not be relied upon.\n\t * While this method does not return an {@link ITreeSubscriptionCursor}, similar restrictions apply to its use:\n\t * the returned cursor must not used after any edits are made to the forest.\n\t */\n\tgetCursorAboveDetachedFields(): ITreeCursorSynchronous;\n\n\t/**\n\t * True if there are no nodes in the forest at all.\n\t *\n\t * @remarks\n\t * This means no nodes under any detached field, not just the special document root one.\n\t */\n\treadonly isEmpty: boolean;\n}\n\n/**\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function rootAnchor(field: DetachedField = rootField): FieldAnchor {\n\treturn {\n\t\tparent: undefined,\n\t\tfieldKey: detachedFieldAsKey(field),\n\t};\n}\n\n/**\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function moveToDetachedField(\n\tforest: IForestSubscription,\n\tcursorToMove: ITreeSubscriptionCursor,\n\tfield: DetachedField = rootField,\n): void {\n\tconst result = forest.tryMoveCursorToField(rootAnchor(field), cursorToMove);\n\tassert(\n\t\tresult === TreeNavigationResult.Ok,\n\t\t0x42d /* Navigation to detached fields should never fail */,\n\t);\n}\n\n/**\n * Anchor to a field.\n * This is structurally based on the parent, so it will move only as the parent moves.\n * @internal\n */\nexport interface FieldAnchor {\n\t/**\n\t * Node above this field.\n\t * If `undefined`, field is a detached field.\n\t */\n\tparent: Anchor | undefined;\n\tfieldKey: FieldKey;\n}\n\n/**\n * ITreeCursor supporting IForestSubscription and its changes over time.\n * @internal\n */\nexport interface ITreeSubscriptionCursor extends ITreeCursor {\n\t/**\n\t * @returns an independent copy of this cursor at the same location in the tree.\n\t */\n\tfork(): ITreeSubscriptionCursor;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` is forbidden (undefined behavior).\n\t */\n\tfree(): void;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` or passing to `tryGet`\n\t * or calling `free` is forbidden (undefined behavior).\n\t */\n\tclear(): void;\n\n\t/**\n\t * Construct an `Anchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Nodes`.\n\t */\n\tbuildAnchor(): Anchor;\n\n\t/**\n\t * Construct a `FieldAnchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Fields`.\n\t */\n\tbuildFieldAnchor(): FieldAnchor;\n\n\t/**\n\t * Current state.\n\t */\n\treadonly state: ITreeSubscriptionCursorState;\n\n\t/**\n\t * @returns location within parent field or range.\n\t */\n\t// TODO: maybe support this.\n\t// getParentInfo(id: NodeId): TreeLocation;\n}\n\n/**\n * @internal\n */\nexport enum ITreeSubscriptionCursorState {\n\t/**\n\t * On the current revision of the forest.\n\t */\n\tCurrent,\n\t/**\n\t * Empty, but can be reused.\n\t */\n\tCleared,\n\t/**\n\t * Freed and must not be used.\n\t */\n\tFreed,\n}\n\n/**\n * @internal\n */\nexport const enum TreeNavigationResult {\n\t/**\n\t * Attempt to navigate cursor to a key or index that is outside the client's view.\n\t */\n\tNotFound = -1,\n\n\t/**\n\t * Attempt to navigate cursor to a portion of the tree that has not yet been loaded.\n\t */\n\tPending = 0,\n\n\t/**\n\t * ITreeReader successfully navigated to the desired node.\n\t */\n\tOk = 1,\n}\n\n/**\n * TreeNavigationResult, but never \"Pending\".\n * Can be used when data is never pending.\n */\nexport type SynchronousNavigationResult = TreeNavigationResult.Ok | TreeNavigationResult.NotFound;\n"]}
1
+ {"version":3,"file":"forest.js","sourceRoot":"","sources":["../../../src/core/forest/forest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAGpD,+CAS0B;AAoH1B;;;GAGG;AACH,SAAgB,UAAU,CAAC,QAAuB,oBAAS;IAC1D,OAAO;QACN,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,IAAA,6BAAkB,EAAC,KAAK,CAAC;KACnC,CAAC;AACH,CAAC;AALD,gCAKC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAClC,MAA2B,EAC3B,YAAqC,EACrC,QAAuB,oBAAS;IAEhC,MAAM,MAAM,GAAG,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC;IAC5E,IAAA,mBAAM,EACL,MAAM,oCAA4B,EAClC,KAAK,CAAC,qDAAqD,CAC3D,CAAC;AACH,CAAC;AAVD,kDAUC;AAmED;;GAEG;AACH,IAAY,4BAaX;AAbD,WAAY,4BAA4B;IACvC;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,iFAAK,CAAA;AACN,CAAC,EAbW,4BAA4B,4CAA5B,4BAA4B,QAavC;AAED;;GAEG;AACH,IAAkB,oBAejB;AAfD,WAAkB,oBAAoB;IACrC;;OAEG;IACH,wEAAa,CAAA;IAEb;;OAEG;IACH,qEAAW,CAAA;IAEX;;OAEG;IACH,2DAAM,CAAA;AACP,CAAC,EAfiB,oBAAoB,oCAApB,oBAAoB,QAerC","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\";\nimport { ISubscribable } from \"../../events/index.js\";\nimport { FieldKey, TreeStoredSchemaSubscription } from \"../schema-stored/index.js\";\nimport {\n\tAnchor,\n\tAnchorSet,\n\tDetachedField,\n\tITreeCursor,\n\tITreeCursorSynchronous,\n\tUpPath,\n\tdetachedFieldAsKey,\n\trootField,\n} from \"../tree/index.js\";\nimport type { IEditableForest } from \"./editableForest.js\";\n\n/**\n * APIs for forest designed so the implementation can be copy on write,\n * or mutate in place, and we can ensure no references are dangling into the forest to allow this.\n *\n * This results in rather manual memory management,\n * but makes it practical to provide highly optimized implementations,\n * for example WASM powered binary formats that can track reference counts and only copy when needed.\n */\n\n/**\n * Events for {@link IForestSubscription}.\n *\n * TODO: consider having before and after events per subtree instead while applying anchor (and this just shows what happens at the root).\n * @internal\n */\nexport interface ForestEvents {\n\t/**\n\t * A new root field was just created in this forest.\n\t */\n\tafterRootFieldCreated(key: FieldKey): void;\n\n\t/**\n\t * The forest is about to be changed.\n\t * Emitted before the first change in a batch of changes.\n\t */\n\tbeforeChange(): void;\n\n\t/**\n\t * The forest was just changed.\n\t * Emitted after the last change in a batch of changes.\n\t */\n\tafterChange(): void;\n}\n\n/**\n * Invalidates whenever the tree content changes.\n * For now (might change later) downloading new parts of the forest counts as a change.\n * Not invalidated when schema changes.\n *\n * When invalidating, all outstanding cursors must be freed or cleared.\n * @internal\n */\nexport interface IForestSubscription extends ISubscribable<ForestEvents> {\n\t/**\n\t * Set of anchors this forest is tracking.\n\t *\n\t * To keep these anchors usable, this AnchorSet must be updated / rebased for any changes made to the forest.\n\t * It is the responsibility of the caller of the forest-editing methods to do this, not the forest itself.\n\t * The caller performs these updates because it has more semantic knowledge about the edits, which can be needed to\n\t * update the anchors in a semantically optimal way.\n\t */\n\treadonly anchors: AnchorSet;\n\n\t/**\n\t * Create an independent copy of this forest, that uses the provided schema and anchors.\n\t *\n\t * The new copy will not invalidate observers (dependents) of the old one.\n\t */\n\tclone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): IEditableForest;\n\n\t/**\n\t * Allocates a cursor in the \"cleared\" state.\n\t */\n\tallocateCursor(): ITreeSubscriptionCursor;\n\n\t/**\n\t * Frees an Anchor, stopping tracking its position across edits.\n\t */\n\tforgetAnchor(anchor: Anchor): void;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * Set `cursorToMove` to location described by path.\n\t * This is NOT a relative move: current position is discarded.\n\t * Path must point to existing node.\n\t */\n\tmoveCursorToPath(destination: UpPath, cursorToMove: ITreeSubscriptionCursor): void;\n\n\t/**\n\t * The cursor is moved to a special dummy node above the detached fields.\n\t * This dummy node can be used to read the detached fields,\n\t * but other operations (such as inspecting the dummy node's type or path) should not be relied upon.\n\t * While this method does not return an {@link ITreeSubscriptionCursor}, similar restrictions apply to its use:\n\t * the returned cursor must not used after any edits are made to the forest.\n\t */\n\tgetCursorAboveDetachedFields(): ITreeCursorSynchronous;\n\n\t/**\n\t * True if there are no nodes in the forest at all.\n\t *\n\t * @remarks\n\t * This means no nodes under any detached field, not just the special document root one.\n\t */\n\treadonly isEmpty: boolean;\n}\n\n/**\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function rootAnchor(field: DetachedField = rootField): FieldAnchor {\n\treturn {\n\t\tparent: undefined,\n\t\tfieldKey: detachedFieldAsKey(field),\n\t};\n}\n\n/**\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function moveToDetachedField(\n\tforest: IForestSubscription,\n\tcursorToMove: ITreeSubscriptionCursor,\n\tfield: DetachedField = rootField,\n): void {\n\tconst result = forest.tryMoveCursorToField(rootAnchor(field), cursorToMove);\n\tassert(\n\t\tresult === TreeNavigationResult.Ok,\n\t\t0x42d /* Navigation to detached fields should never fail */,\n\t);\n}\n\n/**\n * Anchor to a field.\n * This is structurally based on the parent, so it will move only as the parent moves.\n * @internal\n */\nexport interface FieldAnchor {\n\t/**\n\t * Node above this field.\n\t * If `undefined`, field is a detached field.\n\t */\n\tparent: Anchor | undefined;\n\tfieldKey: FieldKey;\n}\n\n/**\n * ITreeCursor supporting IForestSubscription and its changes over time.\n * @internal\n */\nexport interface ITreeSubscriptionCursor extends ITreeCursor {\n\t/**\n\t * @returns an independent copy of this cursor at the same location in the tree.\n\t */\n\tfork(): ITreeSubscriptionCursor;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` is forbidden (undefined behavior).\n\t */\n\tfree(): void;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` or passing to `tryGet`\n\t * or calling `free` is forbidden (undefined behavior).\n\t */\n\tclear(): void;\n\n\t/**\n\t * Construct an `Anchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Nodes`.\n\t */\n\tbuildAnchor(): Anchor;\n\n\t/**\n\t * Construct a `FieldAnchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Fields`.\n\t */\n\tbuildFieldAnchor(): FieldAnchor;\n\n\t/**\n\t * Current state.\n\t */\n\treadonly state: ITreeSubscriptionCursorState;\n\n\t/**\n\t * @returns location within parent field or range.\n\t */\n\t// TODO: maybe support this.\n\t// getParentInfo(id: NodeId): TreeLocation;\n}\n\n/**\n * @internal\n */\nexport enum ITreeSubscriptionCursorState {\n\t/**\n\t * On the current revision of the forest.\n\t */\n\tCurrent,\n\t/**\n\t * Empty, but can be reused.\n\t */\n\tCleared,\n\t/**\n\t * Freed and must not be used.\n\t */\n\tFreed,\n}\n\n/**\n * @internal\n */\nexport const enum TreeNavigationResult {\n\t/**\n\t * Attempt to navigate cursor to a key or index that is outside the client's view.\n\t */\n\tNotFound = -1,\n\n\t/**\n\t * Attempt to navigate cursor to a portion of the tree that has not yet been loaded.\n\t */\n\tPending = 0,\n\n\t/**\n\t * ITreeReader successfully navigated to the desired node.\n\t */\n\tOk = 1,\n}\n\n/**\n * TreeNavigationResult, but never \"Pending\".\n * Can be used when data is never pending.\n */\nexport type SynchronousNavigationResult = TreeNavigationResult.Ok | TreeNavigationResult.NotFound;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,mBAAmB,EACnB,SAAS,EACT,wBAAwB,EACxB,MAAM,+BAA+B,CAAC;AACvC,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cAAc,CAAC,EAAmC;IACjE,OAAO,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AACtD,CAAC;AAFD,wCAEC;AAgBD;;;;GAIG;AACH,IAAY,UAOX;AAPD,WAAY,UAAU;IACrB,iFAAiF;IACjF,iDAAO,CAAA;IACP,8CAA8C;IAC9C,2CAAI,CAAA;IACJ,6CAA6C;IAC7C,2CAAI,CAAA;AACL,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAkBD;;;;;GAKG;AACH,6EAA6E;AAC7E,6CAA6C;AAC7C,SAAgB,UAAU,CACzB,MAA4B,EAC5B,MAA4C;IAE5C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACpC,OAAO;QACN,QAAQ;QACR,MAAM;QACN,MAAM;KACN,CAAC;AACH,CAAC;AAVD,gCAUC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Type } from \"@sinclair/typebox\";\nimport {\n\tOpSpaceCompressedId,\n\tSessionId,\n\tSessionSpaceCompressedId,\n} from \"@fluidframework/id-compressor\";\nimport {\n\tBrand,\n\tNestedMap,\n\tRangeMap,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\n\n/**\n * The identifier for a particular session/user/client that can generate `GraphCommit`s\n */\nexport const SessionIdSchema = brandedStringType<SessionId>();\n\n/**\n * A unique identifier for a commit. Commits that have been rebased, but are semantically\n * the same, will share the same revision tag.\n *\n * The constant 'root' is reserved for the trunk base: minting a SessionSpaceCompressedId is not\n * possible on readonly clients. These clients generally don't need ids, but must be done at tree initialization time.\n * @internal\n */\nexport type RevisionTag = SessionSpaceCompressedId | \"root\";\nexport type EncodedRevisionTag = Brand<OpSpaceCompressedId, \"EncodedRevisionTag\"> | \"root\";\nexport const RevisionTagSchema = Type.Union([\n\tType.Literal(\"root\"),\n\tbrandedNumberType<Exclude<EncodedRevisionTag, string>>(),\n]);\n\n/**\n * An ID which is unique within a revision of a `ModularChangeset`.\n * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s,\n * but they are unique when qualified by the revision of the change they are used in.\n * @internal\n */\nexport type ChangesetLocalId = Brand<number, \"ChangesetLocalId\">;\n\n/**\n * A globally unique ID for an atom of change, or a node associated with the atom of change.\n * @internal\n *\n * @privateRemarks\n * TODO: Rename this to be more general.\n */\nexport interface ChangeAtomId {\n\t/**\n\t * Uniquely identifies the changeset within which the change was made.\n\t * Only undefined when referring to an anonymous changesets.\n\t */\n\treadonly revision?: RevisionTag;\n\t/**\n\t * Uniquely identifies, in the scope of the changeset, the change made to the field.\n\t */\n\treadonly localId: ChangesetLocalId;\n}\n\nexport type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | ChangesetLocalId;\n\n/**\n * @internal\n */\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n * @internal\n */\nexport type ChangeAtomIdRangeMap<T> = Map<RevisionTag | undefined, RangeMap<T>>;\n\n/**\n * @returns true iff `a` and `b` are the same.\n */\nexport function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean {\n\treturn a.localId === b.localId && a.revision === b.revision;\n}\n\n/**\n * @returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(localId: ChangesetLocalId, revision?: RevisionTag): ChangeAtomId {\n\treturn revision === undefined ? { localId } : { localId, revision };\n}\n\nexport function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId {\n\treturn typeof id === \"object\" ? id : { localId: id };\n}\n\n/**\n * A node in a graph of commits. A commit's parent is the commit on which it was based.\n */\nexport interface GraphCommit<TChange> {\n\t/** The tag for this commit. If this commit is rebased, the corresponding rebased commit will retain this tag. */\n\treadonly revision: RevisionTag;\n\t/** The change that will result from applying this commit */\n\treadonly change: TChange;\n\t/** The parent of this commit, on whose change this commit's change is based */\n\treadonly parent?: GraphCommit<TChange>;\n\t/** The inverse of this commit */\n\tinverse?: TChange;\n}\n\n/**\n * The type of a commit. This is used to describe the context in which the commit was created.\n *\n * @public\n */\nexport enum CommitKind {\n\t/** A commit corresponding to a change that is not the result of an undo/redo. */\n\tDefault,\n\t/** A commit that is the result of an undo. */\n\tUndo,\n\t/** A commit that is the result of a redo. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @public\n */\nexport interface CommitMetadata {\n\t/**\n\t * A {@link CommitKind} enum value describing whether the commit represents an Edit, an Undo, or a Redo.\n\t */\n\tkind: CommitKind;\n\t/**\n\t * Indicates whether the commit is a local edit\n\t */\n\tisLocal: boolean;\n}\n\n/**\n * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.\n * @param parent - the parent of the new commit\n * @param commit - the contents of the new commit object\n * @returns the new commit object\n */\n// Note that this function is synchronous, and therefore it is not a Promise.\n// However, it is still a strong commit-mint.\nexport function mintCommit<TChange>(\n\tparent: GraphCommit<TChange>,\n\tcommit: Omit<GraphCommit<TChange>, \"parent\">,\n): GraphCommit<TChange> {\n\tconst { revision, change } = commit;\n\treturn {\n\t\trevision,\n\t\tchange,\n\t\tparent,\n\t};\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH,+CAAyC;AACzC,kDAM6B;AAE7B;;GAEG;AACU,QAAA,eAAe,GAAG,IAAA,4BAAiB,GAAa,CAAC;AAYjD,QAAA,iBAAiB,GAAG,cAAI,CAAC,KAAK,CAAC;IAC3C,cAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACpB,IAAA,4BAAiB,GAAuC;CACxD,CAAC,CAAC;AAyCH;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAe,EAAE,CAAe;IACrE,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC;AAC7D,CAAC;AAFD,sDAEC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,OAAyB,EAAE,QAAsB;IACjF,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AACrE,CAAC;AAFD,4CAEC;AAED,SAAgB,cAAc,CAAC,EAAmC;IACjE,OAAO,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AACtD,CAAC;AAFD,wCAEC;AAgBD;;;;GAIG;AACH,IAAY,UAOX;AAPD,WAAY,UAAU;IACrB,iFAAiF;IACjF,iDAAO,CAAA;IACP,8CAA8C;IAC9C,2CAAI,CAAA;IACJ,6CAA6C;IAC7C,2CAAI,CAAA;AACL,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAkBD;;;;;GAKG;AACH,6EAA6E;AAC7E,6CAA6C;AAC7C,SAAgB,UAAU,CACzB,MAA4B,EAC5B,MAA4C;IAE5C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACpC,OAAO;QACN,QAAQ;QACR,MAAM;QACN,MAAM;KACN,CAAC;AACH,CAAC;AAVD,gCAUC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tOpSpaceCompressedId,\n\tSessionId,\n\tSessionSpaceCompressedId,\n} from \"@fluidframework/id-compressor\";\nimport { Type } from \"@sinclair/typebox\";\nimport {\n\tBrand,\n\tNestedMap,\n\tRangeMap,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\n\n/**\n * The identifier for a particular session/user/client that can generate `GraphCommit`s\n */\nexport const SessionIdSchema = brandedStringType<SessionId>();\n\n/**\n * A unique identifier for a commit. Commits that have been rebased, but are semantically\n * the same, will share the same revision tag.\n *\n * The constant 'root' is reserved for the trunk base: minting a SessionSpaceCompressedId is not\n * possible on readonly clients. These clients generally don't need ids, but must be done at tree initialization time.\n * @internal\n */\nexport type RevisionTag = SessionSpaceCompressedId | \"root\";\nexport type EncodedRevisionTag = Brand<OpSpaceCompressedId, \"EncodedRevisionTag\"> | \"root\";\nexport const RevisionTagSchema = Type.Union([\n\tType.Literal(\"root\"),\n\tbrandedNumberType<Exclude<EncodedRevisionTag, string>>(),\n]);\n\n/**\n * An ID which is unique within a revision of a `ModularChangeset`.\n * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s,\n * but they are unique when qualified by the revision of the change they are used in.\n * @internal\n */\nexport type ChangesetLocalId = Brand<number, \"ChangesetLocalId\">;\n\n/**\n * A globally unique ID for an atom of change, or a node associated with the atom of change.\n * @internal\n *\n * @privateRemarks\n * TODO: Rename this to be more general.\n */\nexport interface ChangeAtomId {\n\t/**\n\t * Uniquely identifies the changeset within which the change was made.\n\t * Only undefined when referring to an anonymous changesets.\n\t */\n\treadonly revision?: RevisionTag;\n\t/**\n\t * Uniquely identifies, in the scope of the changeset, the change made to the field.\n\t */\n\treadonly localId: ChangesetLocalId;\n}\n\nexport type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | ChangesetLocalId;\n\n/**\n * @internal\n */\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n * @internal\n */\nexport type ChangeAtomIdRangeMap<T> = Map<RevisionTag | undefined, RangeMap<T>>;\n\n/**\n * @returns true iff `a` and `b` are the same.\n */\nexport function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean {\n\treturn a.localId === b.localId && a.revision === b.revision;\n}\n\n/**\n * @returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(localId: ChangesetLocalId, revision?: RevisionTag): ChangeAtomId {\n\treturn revision === undefined ? { localId } : { localId, revision };\n}\n\nexport function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId {\n\treturn typeof id === \"object\" ? id : { localId: id };\n}\n\n/**\n * A node in a graph of commits. A commit's parent is the commit on which it was based.\n */\nexport interface GraphCommit<TChange> {\n\t/** The tag for this commit. If this commit is rebased, the corresponding rebased commit will retain this tag. */\n\treadonly revision: RevisionTag;\n\t/** The change that will result from applying this commit */\n\treadonly change: TChange;\n\t/** The parent of this commit, on whose change this commit's change is based */\n\treadonly parent?: GraphCommit<TChange>;\n\t/** The inverse of this commit */\n\tinverse?: TChange;\n}\n\n/**\n * The type of a commit. This is used to describe the context in which the commit was created.\n *\n * @public\n */\nexport enum CommitKind {\n\t/** A commit corresponding to a change that is not the result of an undo/redo. */\n\tDefault,\n\t/** A commit that is the result of an undo. */\n\tUndo,\n\t/** A commit that is the result of a redo. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @public\n */\nexport interface CommitMetadata {\n\t/**\n\t * A {@link CommitKind} enum value describing whether the commit represents an Edit, an Undo, or a Redo.\n\t */\n\tkind: CommitKind;\n\t/**\n\t * Indicates whether the commit is a local edit\n\t */\n\tisLocal: boolean;\n}\n\n/**\n * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.\n * @param parent - the parent of the new commit\n * @param commit - the contents of the new commit object\n * @returns the new commit object\n */\n// Note that this function is synchronous, and therefore it is not a Promise.\n// However, it is still a strong commit-mint.\nexport function mintCommit<TChange>(\n\tparent: GraphCommit<TChange>,\n\tcommit: Omit<GraphCommit<TChange>, \"parent\">,\n): GraphCommit<TChange> {\n\tconst { revision, change } = commit;\n\treturn {\n\t\trevision,\n\t\tchange,\n\t\tparent,\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/utils.ts"],"names":[],"mappings":"AAAA;;;GA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