@fluidframework/tree 2.41.0-338401 → 2.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (974) hide show
  1. package/CHANGELOG.md +341 -0
  2. package/api-report/tree.alpha.api.md +10 -0
  3. package/dist/alpha.d.ts +1 -0
  4. package/dist/codec/codec.d.ts +10 -0
  5. package/dist/codec/codec.d.ts.map +1 -1
  6. package/dist/codec/codec.js +13 -3
  7. package/dist/codec/codec.js.map +1 -1
  8. package/dist/core/index.d.ts +1 -1
  9. package/dist/core/index.d.ts.map +1 -1
  10. package/dist/core/index.js +2 -1
  11. package/dist/core/index.js.map +1 -1
  12. package/dist/core/rebase/types.d.ts +2 -2
  13. package/dist/core/rebase/types.js +2 -2
  14. package/dist/core/rebase/types.js.map +1 -1
  15. package/dist/core/rebase/utils.d.ts +0 -2
  16. package/dist/core/rebase/utils.d.ts.map +1 -1
  17. package/dist/core/rebase/utils.js +6 -10
  18. package/dist/core/rebase/utils.js.map +1 -1
  19. package/dist/core/schema-stored/formatV1.d.ts +0 -1
  20. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  21. package/dist/core/schema-stored/formatV1.js +1 -2
  22. package/dist/core/schema-stored/formatV1.js.map +1 -1
  23. package/dist/core/schema-stored/index.d.ts +1 -1
  24. package/dist/core/schema-stored/index.d.ts.map +1 -1
  25. package/dist/core/schema-stored/index.js +2 -1
  26. package/dist/core/schema-stored/index.js.map +1 -1
  27. package/dist/core/schema-stored/schema.d.ts +6 -0
  28. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  29. package/dist/core/schema-stored/schema.js +8 -1
  30. package/dist/core/schema-stored/schema.js.map +1 -1
  31. package/dist/core/tree/anchorSet.d.ts +2 -1
  32. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  33. package/dist/core/tree/anchorSet.js +2 -1
  34. package/dist/core/tree/anchorSet.js.map +1 -1
  35. package/dist/core/tree/pathTree.d.ts +12 -11
  36. package/dist/core/tree/pathTree.d.ts.map +1 -1
  37. package/dist/core/tree/pathTree.js +8 -7
  38. package/dist/core/tree/pathTree.js.map +1 -1
  39. package/dist/core/tree/treeTextFormat.d.ts +1 -1
  40. package/dist/core/tree/treeTextFormat.js +1 -1
  41. package/dist/core/tree/treeTextFormat.js.map +1 -1
  42. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -1
  43. package/dist/feature-libraries/chunked-forest/chunkedForest.js +1 -1
  44. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  45. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  46. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  47. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  48. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  49. package/dist/feature-libraries/default-schema/index.js +2 -2
  50. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  51. package/dist/feature-libraries/default-schema/schemaChecker.d.ts +15 -15
  52. package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  53. package/dist/feature-libraries/default-schema/schemaChecker.js +50 -35
  54. package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  55. package/dist/feature-libraries/flex-tree/context.d.ts +18 -2
  56. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  57. package/dist/feature-libraries/flex-tree/context.js +22 -6
  58. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  59. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +3 -2
  60. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  61. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +3 -2
  62. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  63. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  64. package/dist/feature-libraries/flex-tree/lazyField.js +1 -1
  65. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  66. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  67. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  68. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -1
  69. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  70. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  71. package/dist/feature-libraries/index.d.ts +2 -2
  72. package/dist/feature-libraries/index.d.ts.map +1 -1
  73. package/dist/feature-libraries/index.js +3 -4
  74. package/dist/feature-libraries/index.js.map +1 -1
  75. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  76. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  77. package/dist/feature-libraries/indexing/anchorTreeIndex.js +15 -15
  78. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  79. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  80. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  81. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  82. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  83. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  84. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  85. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  86. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  87. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  88. package/dist/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  89. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  90. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  91. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  92. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  93. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  94. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  95. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  96. package/dist/feature-libraries/modular-schema/isNeverTree.js +0 -2
  97. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  98. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  99. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  100. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  101. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  102. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  103. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  104. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  105. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  106. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  107. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  108. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  109. package/dist/feature-libraries/object-forest/objectForest.d.ts +22 -5
  110. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  111. package/dist/feature-libraries/object-forest/objectForest.js +296 -207
  112. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  113. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  114. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  115. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +3 -2
  116. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  117. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  118. package/dist/feature-libraries/schema-index/codec.d.ts +6 -12
  119. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  120. package/dist/feature-libraries/schema-index/codec.js +8 -15
  121. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  122. package/dist/feature-libraries/schema-index/formatV1.d.ts +2 -2
  123. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  124. package/dist/feature-libraries/schema-index/formatV1.js +1 -1
  125. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  126. package/dist/feature-libraries/schema-index/index.d.ts +1 -1
  127. package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
  128. package/dist/feature-libraries/schema-index/index.js +1 -2
  129. package/dist/feature-libraries/schema-index/index.js.map +1 -1
  130. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  131. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  132. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  133. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  134. package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
  135. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  136. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  137. package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  138. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  139. package/dist/feature-libraries/sequence-field/rebase.js +1 -1
  140. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  141. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  142. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  143. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  144. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  145. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  146. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  147. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  148. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  149. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  150. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  151. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  152. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  153. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  154. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  155. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  156. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  157. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  158. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  159. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  160. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  161. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  162. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  163. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  164. package/dist/feature-libraries/sequence-field/utils.d.ts +7 -5
  165. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  166. package/dist/feature-libraries/sequence-field/utils.js +7 -5
  167. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  168. package/dist/feature-libraries/treeCursorUtils.js +2 -2
  169. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  170. package/dist/feature-libraries/treeTextCursor.d.ts +1 -1
  171. package/dist/feature-libraries/treeTextCursor.js +1 -1
  172. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  173. package/dist/index.d.ts +2 -2
  174. package/dist/index.d.ts.map +1 -1
  175. package/dist/index.js +2 -6
  176. package/dist/index.js.map +1 -1
  177. package/dist/packageVersion.d.ts +1 -1
  178. package/dist/packageVersion.d.ts.map +1 -1
  179. package/dist/packageVersion.js +1 -1
  180. package/dist/packageVersion.js.map +1 -1
  181. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  182. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
  183. package/dist/shared-tree/independentView.d.ts +1 -1
  184. package/dist/shared-tree/independentView.d.ts.map +1 -1
  185. package/dist/shared-tree/independentView.js +8 -3
  186. package/dist/shared-tree/independentView.js.map +1 -1
  187. package/dist/shared-tree/index.d.ts +1 -1
  188. package/dist/shared-tree/index.d.ts.map +1 -1
  189. package/dist/shared-tree/index.js.map +1 -1
  190. package/dist/shared-tree/schematizeTree.d.ts +1 -1
  191. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  192. package/dist/shared-tree/schematizeTree.js.map +1 -1
  193. package/dist/shared-tree/schematizingTreeView.d.ts +1 -1
  194. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  195. package/dist/shared-tree/schematizingTreeView.js +1 -1
  196. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  197. package/dist/shared-tree/sharedTree.d.ts +3 -3
  198. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  199. package/dist/shared-tree/sharedTree.js +8 -8
  200. package/dist/shared-tree/sharedTree.js.map +1 -1
  201. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  202. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  203. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  204. package/dist/shared-tree/tree.js +1 -1
  205. package/dist/shared-tree/tree.js.map +1 -1
  206. package/dist/shared-tree/treeAlpha.d.ts +76 -2
  207. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  208. package/dist/shared-tree/treeAlpha.js +62 -16
  209. package/dist/shared-tree/treeAlpha.js.map +1 -1
  210. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  211. package/dist/shared-tree/treeCheckout.js +3 -2
  212. package/dist/shared-tree/treeCheckout.js.map +1 -1
  213. package/dist/shared-tree-core/branch.d.ts +2 -2
  214. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  215. package/dist/shared-tree-core/branch.js +2 -2
  216. package/dist/shared-tree-core/branch.js.map +1 -1
  217. package/dist/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  218. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  219. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  220. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  221. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  222. package/dist/shared-tree-core/editManager.d.ts +3 -1
  223. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  224. package/dist/shared-tree-core/editManager.js +4 -2
  225. package/dist/shared-tree-core/editManager.js.map +1 -1
  226. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  227. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  228. package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  229. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  230. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  231. package/dist/shared-tree-core/messageCodecs.d.ts +1 -1
  232. package/dist/shared-tree-core/messageCodecs.js +1 -1
  233. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  234. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  235. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  236. package/dist/shared-tree-core/sharedTreeCore.d.ts +2 -2
  237. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  238. package/dist/shared-tree-core/sharedTreeCore.js +4 -4
  239. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  240. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  241. package/dist/shared-tree-core/transaction.js +1 -1
  242. package/dist/shared-tree-core/transaction.js.map +1 -1
  243. package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  244. package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
  245. package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
  246. package/dist/simple-tree/api/conciseTree.js +1 -1
  247. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  248. package/dist/simple-tree/api/configuration.js +4 -4
  249. package/dist/simple-tree/api/configuration.js.map +1 -1
  250. package/dist/simple-tree/api/create.d.ts +2 -26
  251. package/dist/simple-tree/api/create.d.ts.map +1 -1
  252. package/dist/simple-tree/api/create.js +4 -41
  253. package/dist/simple-tree/api/create.js.map +1 -1
  254. package/dist/simple-tree/api/customTree.d.ts +1 -1
  255. package/dist/simple-tree/api/customTree.d.ts.map +1 -1
  256. package/dist/simple-tree/api/customTree.js +24 -24
  257. package/dist/simple-tree/api/customTree.js.map +1 -1
  258. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  259. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  260. package/dist/simple-tree/api/identifierIndex.js +2 -2
  261. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  262. package/dist/simple-tree/api/index.d.ts +2 -3
  263. package/dist/simple-tree/api/index.d.ts.map +1 -1
  264. package/dist/simple-tree/api/index.js +2 -9
  265. package/dist/simple-tree/api/index.js.map +1 -1
  266. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  267. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  268. package/dist/simple-tree/api/schemaFactory.d.ts +5 -5
  269. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  270. package/dist/simple-tree/api/schemaFactory.js +8 -8
  271. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  272. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  273. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  274. package/dist/simple-tree/api/schemaFactoryAlpha.js +4 -6
  275. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  276. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  277. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  278. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  279. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  280. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  281. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  282. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  283. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +4 -6
  284. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  285. package/dist/simple-tree/api/storedSchema.d.ts +1 -1
  286. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  287. package/dist/simple-tree/api/storedSchema.js +7 -6
  288. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  289. package/dist/simple-tree/api/tree.d.ts +2 -2
  290. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  291. package/dist/simple-tree/api/tree.js.map +1 -1
  292. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  293. package/dist/simple-tree/api/treeBeta.js +1 -1
  294. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  295. package/dist/simple-tree/api/treeNodeApi.d.ts +30 -3
  296. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  297. package/dist/simple-tree/api/treeNodeApi.js +40 -28
  298. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  299. package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
  300. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  301. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  302. package/dist/simple-tree/api/verboseTree.js +3 -3
  303. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  304. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  305. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +4 -6
  306. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  307. package/dist/simple-tree/core/context.d.ts.map +1 -1
  308. package/dist/simple-tree/core/context.js.map +1 -1
  309. package/dist/simple-tree/core/getOrCreateNode.d.ts +1 -1
  310. package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  311. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
  312. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  313. package/dist/simple-tree/core/treeNode.js +1 -1
  314. package/dist/simple-tree/core/treeNode.js.map +1 -1
  315. package/dist/simple-tree/core/treeNodeKernel.d.ts +3 -3
  316. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  317. package/dist/simple-tree/core/treeNodeKernel.js +2 -2
  318. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  319. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  320. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  321. package/dist/simple-tree/core/types.d.ts.map +1 -1
  322. package/dist/simple-tree/core/types.js.map +1 -1
  323. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  324. package/dist/simple-tree/core/unhydratedFlexTree.js +21 -21
  325. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  326. package/dist/simple-tree/core/withType.d.ts +1 -1
  327. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  328. package/dist/simple-tree/core/withType.js.map +1 -1
  329. package/dist/simple-tree/createContext.d.ts.map +1 -1
  330. package/dist/simple-tree/createContext.js.map +1 -1
  331. package/dist/simple-tree/getTreeNodeForField.d.ts.map +1 -1
  332. package/dist/simple-tree/getTreeNodeForField.js.map +1 -1
  333. package/dist/simple-tree/index.d.ts +2 -9
  334. package/dist/simple-tree/index.d.ts.map +1 -1
  335. package/dist/simple-tree/index.js +13 -21
  336. package/dist/simple-tree/index.js.map +1 -1
  337. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  338. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  339. package/dist/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  340. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  341. package/dist/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +9 -9
  342. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  343. package/dist/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  344. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  345. package/dist/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  346. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -0
  347. package/dist/simple-tree/node-kinds/array/index.d.ts +7 -0
  348. package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  349. package/dist/simple-tree/node-kinds/array/index.js +16 -0
  350. package/dist/simple-tree/node-kinds/array/index.js.map +1 -0
  351. package/dist/simple-tree/node-kinds/index.d.ts +8 -0
  352. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -0
  353. package/dist/simple-tree/node-kinds/index.js +26 -0
  354. package/dist/simple-tree/node-kinds/index.js.map +1 -0
  355. package/dist/simple-tree/node-kinds/map/index.d.ts +7 -0
  356. package/dist/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  357. package/dist/simple-tree/node-kinds/map/index.js +13 -0
  358. package/dist/simple-tree/node-kinds/map/index.js.map +1 -0
  359. package/{lib/simple-tree → dist/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  360. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  361. package/dist/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +8 -8
  362. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  363. package/dist/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  364. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  365. package/dist/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  366. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  367. package/dist/simple-tree/node-kinds/object/index.d.ts +7 -0
  368. package/dist/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  369. package/dist/simple-tree/node-kinds/object/index.js +16 -0
  370. package/dist/simple-tree/node-kinds/object/index.js.map +1 -0
  371. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNode.d.ts +17 -6
  372. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  373. package/dist/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +47 -24
  374. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  375. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  376. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  377. package/dist/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  378. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  379. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  380. package/dist/simple-tree/schemaTypes.d.ts +2 -2
  381. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  382. package/dist/simple-tree/schemaTypes.js.map +1 -1
  383. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  384. package/dist/simple-tree/simpleSchema.js.map +1 -1
  385. package/dist/simple-tree/toMapTree.d.ts +1 -16
  386. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  387. package/dist/simple-tree/toMapTree.js +41 -1
  388. package/dist/simple-tree/toMapTree.js.map +1 -1
  389. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  390. package/dist/simple-tree/toStoredSchema.js +1 -1
  391. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  392. package/dist/simple-tree/treeNodeValid.d.ts +1 -1
  393. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  394. package/dist/simple-tree/treeNodeValid.js +10 -10
  395. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  396. package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -1
  397. package/dist/simple-tree/walkFieldSchema.js.map +1 -1
  398. package/dist/tableSchema.d.ts +10 -10
  399. package/dist/treeFactory.d.ts +1 -1
  400. package/dist/treeFactory.js +1 -1
  401. package/dist/treeFactory.js.map +1 -1
  402. package/dist/util/bTreeUtils.d.ts.map +1 -1
  403. package/dist/util/bTreeUtils.js.map +1 -1
  404. package/dist/util/breakable.d.ts +23 -4
  405. package/dist/util/breakable.d.ts.map +1 -1
  406. package/dist/util/breakable.js +12 -3
  407. package/dist/util/breakable.js.map +1 -1
  408. package/docs/SharedTree Philosophy.md +5 -5
  409. package/lib/alpha.d.ts +1 -0
  410. package/lib/codec/codec.d.ts +10 -0
  411. package/lib/codec/codec.d.ts.map +1 -1
  412. package/lib/codec/codec.js +13 -3
  413. package/lib/codec/codec.js.map +1 -1
  414. package/lib/core/index.d.ts +1 -1
  415. package/lib/core/index.d.ts.map +1 -1
  416. package/lib/core/index.js +1 -1
  417. package/lib/core/index.js.map +1 -1
  418. package/lib/core/rebase/types.d.ts +2 -2
  419. package/lib/core/rebase/types.js +2 -2
  420. package/lib/core/rebase/types.js.map +1 -1
  421. package/lib/core/rebase/utils.d.ts +0 -2
  422. package/lib/core/rebase/utils.d.ts.map +1 -1
  423. package/lib/core/rebase/utils.js +6 -10
  424. package/lib/core/rebase/utils.js.map +1 -1
  425. package/lib/core/schema-stored/formatV1.d.ts +0 -1
  426. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  427. package/lib/core/schema-stored/formatV1.js +0 -1
  428. package/lib/core/schema-stored/formatV1.js.map +1 -1
  429. package/lib/core/schema-stored/index.d.ts +1 -1
  430. package/lib/core/schema-stored/index.d.ts.map +1 -1
  431. package/lib/core/schema-stored/index.js +1 -1
  432. package/lib/core/schema-stored/index.js.map +1 -1
  433. package/lib/core/schema-stored/schema.d.ts +6 -0
  434. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  435. package/lib/core/schema-stored/schema.js +7 -0
  436. package/lib/core/schema-stored/schema.js.map +1 -1
  437. package/lib/core/tree/anchorSet.d.ts +2 -1
  438. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  439. package/lib/core/tree/anchorSet.js +2 -1
  440. package/lib/core/tree/anchorSet.js.map +1 -1
  441. package/lib/core/tree/pathTree.d.ts +12 -11
  442. package/lib/core/tree/pathTree.d.ts.map +1 -1
  443. package/lib/core/tree/pathTree.js +8 -7
  444. package/lib/core/tree/pathTree.js.map +1 -1
  445. package/lib/core/tree/treeTextFormat.d.ts +1 -1
  446. package/lib/core/tree/treeTextFormat.js +1 -1
  447. package/lib/core/tree/treeTextFormat.js.map +1 -1
  448. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -1
  449. package/lib/feature-libraries/chunked-forest/chunkedForest.js +1 -1
  450. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  451. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  452. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  453. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  454. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  455. package/lib/feature-libraries/default-schema/index.js +1 -1
  456. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  457. package/lib/feature-libraries/default-schema/schemaChecker.d.ts +15 -15
  458. package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  459. package/lib/feature-libraries/default-schema/schemaChecker.js +49 -34
  460. package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  461. package/lib/feature-libraries/flex-tree/context.d.ts +18 -2
  462. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  463. package/lib/feature-libraries/flex-tree/context.js +23 -7
  464. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  465. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +3 -2
  466. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  467. package/lib/feature-libraries/flex-tree/flexTreeTypes.js +3 -2
  468. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  469. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  470. package/lib/feature-libraries/flex-tree/lazyField.js +1 -1
  471. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  472. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  473. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  474. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -1
  475. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  476. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  477. package/lib/feature-libraries/index.d.ts +2 -2
  478. package/lib/feature-libraries/index.d.ts.map +1 -1
  479. package/lib/feature-libraries/index.js +2 -2
  480. package/lib/feature-libraries/index.js.map +1 -1
  481. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  482. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  483. package/lib/feature-libraries/indexing/anchorTreeIndex.js +1 -1
  484. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  485. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  486. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  487. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  488. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  489. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  490. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  491. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  492. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  493. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  494. package/lib/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  495. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  496. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  497. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  498. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  499. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  500. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  501. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  502. package/lib/feature-libraries/modular-schema/isNeverTree.js +0 -2
  503. package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  504. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  505. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  506. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  507. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  508. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  509. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  510. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  511. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  512. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  513. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  514. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  515. package/lib/feature-libraries/object-forest/objectForest.d.ts +22 -5
  516. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  517. package/lib/feature-libraries/object-forest/objectForest.js +299 -209
  518. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  519. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  520. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  521. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +4 -3
  522. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  523. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  524. package/lib/feature-libraries/schema-index/codec.d.ts +6 -12
  525. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  526. package/lib/feature-libraries/schema-index/codec.js +8 -15
  527. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  528. package/lib/feature-libraries/schema-index/formatV1.d.ts +2 -2
  529. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  530. package/lib/feature-libraries/schema-index/formatV1.js +2 -2
  531. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  532. package/lib/feature-libraries/schema-index/index.d.ts +1 -1
  533. package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
  534. package/lib/feature-libraries/schema-index/index.js +1 -1
  535. package/lib/feature-libraries/schema-index/index.js.map +1 -1
  536. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  537. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  538. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  539. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  540. package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
  541. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  542. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  543. package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  544. package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
  545. package/lib/feature-libraries/sequence-field/rebase.js +1 -1
  546. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  547. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  548. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  549. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  550. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  551. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  552. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  553. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  554. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  555. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  556. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  557. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  558. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  559. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  560. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  561. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  562. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  563. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  564. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  565. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  566. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  567. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  568. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  569. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  570. package/lib/feature-libraries/sequence-field/utils.d.ts +7 -5
  571. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  572. package/lib/feature-libraries/sequence-field/utils.js +7 -5
  573. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  574. package/lib/feature-libraries/treeCursorUtils.js +2 -2
  575. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  576. package/lib/feature-libraries/treeTextCursor.d.ts +1 -1
  577. package/lib/feature-libraries/treeTextCursor.js +1 -1
  578. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  579. package/lib/index.d.ts +2 -2
  580. package/lib/index.d.ts.map +1 -1
  581. package/lib/index.js +0 -2
  582. package/lib/index.js.map +1 -1
  583. package/lib/packageVersion.d.ts +1 -1
  584. package/lib/packageVersion.d.ts.map +1 -1
  585. package/lib/packageVersion.js +1 -1
  586. package/lib/packageVersion.js.map +1 -1
  587. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  588. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
  589. package/lib/shared-tree/independentView.d.ts +1 -1
  590. package/lib/shared-tree/independentView.d.ts.map +1 -1
  591. package/lib/shared-tree/independentView.js +10 -5
  592. package/lib/shared-tree/independentView.js.map +1 -1
  593. package/lib/shared-tree/index.d.ts +1 -1
  594. package/lib/shared-tree/index.d.ts.map +1 -1
  595. package/lib/shared-tree/index.js +1 -1
  596. package/lib/shared-tree/index.js.map +1 -1
  597. package/lib/shared-tree/schematizeTree.d.ts +1 -1
  598. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  599. package/lib/shared-tree/schematizeTree.js.map +1 -1
  600. package/lib/shared-tree/schematizingTreeView.d.ts +1 -1
  601. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  602. package/lib/shared-tree/schematizingTreeView.js +1 -1
  603. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  604. package/lib/shared-tree/sharedTree.d.ts +3 -3
  605. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  606. package/lib/shared-tree/sharedTree.js +10 -10
  607. package/lib/shared-tree/sharedTree.js.map +1 -1
  608. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  609. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  610. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  611. package/lib/shared-tree/tree.js +1 -1
  612. package/lib/shared-tree/tree.js.map +1 -1
  613. package/lib/shared-tree/treeAlpha.d.ts +76 -2
  614. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  615. package/lib/shared-tree/treeAlpha.js +50 -4
  616. package/lib/shared-tree/treeAlpha.js.map +1 -1
  617. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  618. package/lib/shared-tree/treeCheckout.js +3 -2
  619. package/lib/shared-tree/treeCheckout.js.map +1 -1
  620. package/lib/shared-tree-core/branch.d.ts +2 -2
  621. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  622. package/lib/shared-tree-core/branch.js +2 -2
  623. package/lib/shared-tree-core/branch.js.map +1 -1
  624. package/lib/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  625. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  626. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  627. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  628. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  629. package/lib/shared-tree-core/editManager.d.ts +3 -1
  630. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  631. package/lib/shared-tree-core/editManager.js +4 -2
  632. package/lib/shared-tree-core/editManager.js.map +1 -1
  633. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  634. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  635. package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  636. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  637. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  638. package/lib/shared-tree-core/messageCodecs.d.ts +1 -1
  639. package/lib/shared-tree-core/messageCodecs.js +1 -1
  640. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  641. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  642. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  643. package/lib/shared-tree-core/sharedTreeCore.d.ts +2 -2
  644. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  645. package/lib/shared-tree-core/sharedTreeCore.js +4 -4
  646. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  647. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  648. package/lib/shared-tree-core/transaction.js +1 -1
  649. package/lib/shared-tree-core/transaction.js.map +1 -1
  650. package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  651. package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
  652. package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
  653. package/lib/simple-tree/api/conciseTree.js +1 -1
  654. package/lib/simple-tree/api/conciseTree.js.map +1 -1
  655. package/lib/simple-tree/api/configuration.js +1 -1
  656. package/lib/simple-tree/api/configuration.js.map +1 -1
  657. package/lib/simple-tree/api/create.d.ts +2 -26
  658. package/lib/simple-tree/api/create.d.ts.map +1 -1
  659. package/lib/simple-tree/api/create.js +2 -37
  660. package/lib/simple-tree/api/create.js.map +1 -1
  661. package/lib/simple-tree/api/customTree.d.ts +1 -1
  662. package/lib/simple-tree/api/customTree.d.ts.map +1 -1
  663. package/lib/simple-tree/api/customTree.js +3 -3
  664. package/lib/simple-tree/api/customTree.js.map +1 -1
  665. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  666. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
  667. package/lib/simple-tree/api/identifierIndex.js +1 -1
  668. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  669. package/lib/simple-tree/api/index.d.ts +2 -3
  670. package/lib/simple-tree/api/index.d.ts.map +1 -1
  671. package/lib/simple-tree/api/index.js +2 -5
  672. package/lib/simple-tree/api/index.js.map +1 -1
  673. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  674. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  675. package/lib/simple-tree/api/schemaFactory.d.ts +5 -5
  676. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  677. package/lib/simple-tree/api/schemaFactory.js +5 -5
  678. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  679. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  680. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  681. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -3
  682. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  683. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  684. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  685. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  686. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  687. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  688. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  689. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  690. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +1 -3
  691. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  692. package/lib/simple-tree/api/storedSchema.d.ts +1 -1
  693. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  694. package/lib/simple-tree/api/storedSchema.js +3 -2
  695. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  696. package/lib/simple-tree/api/tree.d.ts +2 -2
  697. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  698. package/lib/simple-tree/api/tree.js.map +1 -1
  699. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  700. package/lib/simple-tree/api/treeBeta.js +1 -1
  701. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  702. package/lib/simple-tree/api/treeNodeApi.d.ts +30 -3
  703. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  704. package/lib/simple-tree/api/treeNodeApi.js +37 -26
  705. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  706. package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
  707. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  708. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  709. package/lib/simple-tree/api/verboseTree.js +1 -1
  710. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  711. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  712. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +1 -3
  713. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  714. package/lib/simple-tree/core/context.d.ts.map +1 -1
  715. package/lib/simple-tree/core/context.js.map +1 -1
  716. package/lib/simple-tree/core/getOrCreateNode.d.ts +1 -1
  717. package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  718. package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
  719. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  720. package/lib/simple-tree/core/treeNode.js +1 -1
  721. package/lib/simple-tree/core/treeNode.js.map +1 -1
  722. package/lib/simple-tree/core/treeNodeKernel.d.ts +3 -3
  723. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  724. package/lib/simple-tree/core/treeNodeKernel.js +2 -2
  725. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  726. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  727. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  728. package/lib/simple-tree/core/types.d.ts.map +1 -1
  729. package/lib/simple-tree/core/types.js.map +1 -1
  730. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  731. package/lib/simple-tree/core/unhydratedFlexTree.js +3 -3
  732. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  733. package/lib/simple-tree/core/withType.d.ts +1 -1
  734. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  735. package/lib/simple-tree/core/withType.js.map +1 -1
  736. package/lib/simple-tree/createContext.d.ts.map +1 -1
  737. package/lib/simple-tree/createContext.js.map +1 -1
  738. package/lib/simple-tree/getTreeNodeForField.d.ts.map +1 -1
  739. package/lib/simple-tree/getTreeNodeForField.js.map +1 -1
  740. package/lib/simple-tree/index.d.ts +2 -9
  741. package/lib/simple-tree/index.d.ts.map +1 -1
  742. package/lib/simple-tree/index.js +2 -6
  743. package/lib/simple-tree/index.js.map +1 -1
  744. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  745. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  746. package/lib/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  747. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  748. package/lib/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +9 -9
  749. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  750. package/lib/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  751. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  752. package/lib/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  753. package/{dist/simple-tree → lib/simple-tree/node-kinds/array}/arrayNodeTypes.js.map +1 -1
  754. package/lib/simple-tree/node-kinds/array/index.d.ts +7 -0
  755. package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  756. package/lib/simple-tree/node-kinds/array/index.js +7 -0
  757. package/lib/simple-tree/node-kinds/array/index.js.map +1 -0
  758. package/lib/simple-tree/node-kinds/index.d.ts +8 -0
  759. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -0
  760. package/lib/simple-tree/node-kinds/index.js +8 -0
  761. package/lib/simple-tree/node-kinds/index.js.map +1 -0
  762. package/lib/simple-tree/node-kinds/map/index.d.ts +7 -0
  763. package/lib/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  764. package/lib/simple-tree/node-kinds/map/index.js +7 -0
  765. package/lib/simple-tree/node-kinds/map/index.js.map +1 -0
  766. package/{dist/simple-tree → lib/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  767. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  768. package/lib/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +8 -8
  769. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  770. package/lib/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  771. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  772. package/lib/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  773. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  774. package/lib/simple-tree/node-kinds/object/index.d.ts +7 -0
  775. package/lib/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  776. package/lib/simple-tree/node-kinds/object/index.js +7 -0
  777. package/lib/simple-tree/node-kinds/object/index.js.map +1 -0
  778. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNode.d.ts +17 -6
  779. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  780. package/lib/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +35 -13
  781. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  782. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  783. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  784. package/lib/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  785. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  786. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  787. package/lib/simple-tree/schemaTypes.d.ts +2 -2
  788. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  789. package/lib/simple-tree/schemaTypes.js.map +1 -1
  790. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  791. package/lib/simple-tree/simpleSchema.js.map +1 -1
  792. package/lib/simple-tree/toMapTree.d.ts +1 -16
  793. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  794. package/lib/simple-tree/toMapTree.js +41 -1
  795. package/lib/simple-tree/toMapTree.js.map +1 -1
  796. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  797. package/lib/simple-tree/toStoredSchema.js +1 -1
  798. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  799. package/lib/simple-tree/treeNodeValid.d.ts +1 -1
  800. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  801. package/lib/simple-tree/treeNodeValid.js +2 -2
  802. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  803. package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -1
  804. package/lib/simple-tree/walkFieldSchema.js.map +1 -1
  805. package/lib/tableSchema.d.ts +10 -10
  806. package/lib/treeFactory.d.ts +1 -1
  807. package/lib/treeFactory.js +1 -1
  808. package/lib/treeFactory.js.map +1 -1
  809. package/lib/util/bTreeUtils.d.ts.map +1 -1
  810. package/lib/util/bTreeUtils.js.map +1 -1
  811. package/lib/util/breakable.d.ts +23 -4
  812. package/lib/util/breakable.d.ts.map +1 -1
  813. package/lib/util/breakable.js +12 -3
  814. package/lib/util/breakable.js.map +1 -1
  815. package/package.json +21 -21
  816. package/src/codec/codec.ts +13 -3
  817. package/src/core/index.ts +1 -0
  818. package/src/core/rebase/types.ts +2 -2
  819. package/src/core/rebase/utils.ts +10 -10
  820. package/src/core/schema-stored/formatV1.ts +0 -2
  821. package/src/core/schema-stored/index.ts +1 -0
  822. package/src/core/schema-stored/schema.ts +7 -0
  823. package/src/core/tree/anchorSet.ts +2 -1
  824. package/src/core/tree/pathTree.ts +12 -11
  825. package/src/core/tree/treeTextFormat.ts +1 -1
  826. package/src/feature-libraries/chunked-forest/chunkedForest.ts +1 -1
  827. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +1 -1
  828. package/src/feature-libraries/default-schema/index.ts +1 -1
  829. package/src/feature-libraries/default-schema/schemaChecker.ts +44 -29
  830. package/src/feature-libraries/flex-tree/context.ts +29 -8
  831. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +3 -2
  832. package/src/feature-libraries/flex-tree/lazyField.ts +1 -1
  833. package/src/feature-libraries/flex-tree/utilities.ts +1 -1
  834. package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
  835. package/src/feature-libraries/index.ts +1 -2
  836. package/src/feature-libraries/indexing/anchorTreeIndex.ts +4 -2
  837. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +1 -0
  838. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +1 -1
  839. package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +1 -1
  840. package/src/feature-libraries/modular-schema/genericFieldKind.ts +4 -2
  841. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -0
  842. package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +1 -0
  843. package/src/feature-libraries/modular-schema/isNeverTree.ts +0 -2
  844. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +1 -1
  845. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2 -0
  846. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +1 -0
  847. package/src/feature-libraries/node-identifier/mockNodeIdentifierManager.ts +11 -5
  848. package/src/feature-libraries/object-forest/objectForest.ts +65 -7
  849. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +5 -8
  850. package/src/feature-libraries/schema-index/codec.ts +13 -21
  851. package/src/feature-libraries/schema-index/formatV1.ts +2 -2
  852. package/src/feature-libraries/schema-index/index.ts +0 -1
  853. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -1
  854. package/src/feature-libraries/sequence-field/formatV3.ts +1 -0
  855. package/src/feature-libraries/sequence-field/markQueue.ts +1 -0
  856. package/src/feature-libraries/sequence-field/prune.ts +1 -0
  857. package/src/feature-libraries/sequence-field/rebase.ts +1 -1
  858. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +1 -1
  859. package/src/feature-libraries/sequence-field/replaceRevisions.ts +3 -1
  860. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +2 -2
  861. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +3 -3
  862. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +3 -3
  863. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +2 -2
  864. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +1 -1
  865. package/src/feature-libraries/sequence-field/utils.ts +7 -5
  866. package/src/feature-libraries/treeCursorUtils.ts +2 -2
  867. package/src/feature-libraries/treeTextCursor.ts +1 -1
  868. package/src/index.ts +1 -4
  869. package/src/packageVersion.ts +1 -1
  870. package/src/shared-tree/checkoutFlexTreeView.ts +1 -0
  871. package/src/shared-tree/independentView.ts +10 -3
  872. package/src/shared-tree/index.ts +4 -1
  873. package/src/shared-tree/schematizeTree.ts +2 -1
  874. package/src/shared-tree/schematizingTreeView.ts +2 -2
  875. package/src/shared-tree/sharedTree.ts +26 -19
  876. package/src/shared-tree/sharedTreeChangeFamily.ts +1 -1
  877. package/src/shared-tree/tree.ts +1 -1
  878. package/src/shared-tree/treeAlpha.ts +142 -18
  879. package/src/shared-tree/treeCheckout.ts +3 -2
  880. package/src/shared-tree-core/branch.ts +3 -4
  881. package/src/shared-tree-core/branchCommitEnricher.ts +3 -1
  882. package/src/shared-tree-core/defaultResubmitMachine.ts +2 -0
  883. package/src/shared-tree-core/editManager.ts +4 -2
  884. package/src/shared-tree-core/editManagerCodecs.ts +1 -0
  885. package/src/shared-tree-core/editManagerSummarizer.ts +1 -1
  886. package/src/shared-tree-core/messageCodecs.ts +1 -1
  887. package/src/shared-tree-core/sequenceIdUtils.ts +1 -0
  888. package/src/shared-tree-core/sharedTreeCore.ts +5 -5
  889. package/src/shared-tree-core/transaction.ts +4 -2
  890. package/src/shared-tree-core/transactionEnricher.ts +2 -0
  891. package/src/simple-tree/api/conciseTree.ts +3 -2
  892. package/src/simple-tree/api/configuration.ts +1 -1
  893. package/src/simple-tree/api/create.ts +3 -80
  894. package/src/simple-tree/api/customTree.ts +4 -4
  895. package/src/simple-tree/api/getSimpleSchema.ts +1 -0
  896. package/src/simple-tree/api/identifierIndex.ts +1 -1
  897. package/src/simple-tree/api/index.ts +1 -10
  898. package/src/simple-tree/api/schemaCompatibilityTester.ts +2 -0
  899. package/src/simple-tree/api/schemaFactory.ts +28 -23
  900. package/src/simple-tree/api/schemaFactoryAlpha.ts +8 -6
  901. package/src/simple-tree/api/schemaFactoryRecursive.ts +3 -3
  902. package/src/simple-tree/api/schemaFromSimple.ts +3 -1
  903. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -3
  904. package/src/simple-tree/api/storedSchema.ts +5 -4
  905. package/src/simple-tree/api/tree.ts +3 -4
  906. package/src/simple-tree/api/treeBeta.ts +3 -2
  907. package/src/simple-tree/api/treeNodeApi.ts +89 -40
  908. package/src/simple-tree/api/typesUnsafe.ts +1 -1
  909. package/src/simple-tree/api/verboseTree.ts +1 -1
  910. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +1 -3
  911. package/src/simple-tree/core/context.ts +1 -0
  912. package/src/simple-tree/core/getOrCreateNode.ts +2 -1
  913. package/src/simple-tree/core/treeNode.ts +1 -1
  914. package/src/simple-tree/core/treeNodeKernel.ts +10 -8
  915. package/src/simple-tree/core/treeNodeSchema.ts +1 -0
  916. package/src/simple-tree/core/types.ts +1 -1
  917. package/src/simple-tree/core/unhydratedFlexTree.ts +4 -3
  918. package/src/simple-tree/core/withType.ts +1 -1
  919. package/src/simple-tree/createContext.ts +1 -0
  920. package/src/simple-tree/getTreeNodeForField.ts +2 -0
  921. package/src/simple-tree/index.ts +14 -21
  922. package/src/simple-tree/leafNodeSchema.ts +1 -0
  923. package/src/simple-tree/{arrayNode.ts → node-kinds/array/arrayNode.ts} +10 -10
  924. package/src/simple-tree/{arrayNodeTypes.ts → node-kinds/array/arrayNodeTypes.ts} +3 -3
  925. package/src/simple-tree/node-kinds/array/index.ts +18 -0
  926. package/src/simple-tree/node-kinds/index.ts +40 -0
  927. package/src/simple-tree/node-kinds/map/index.ts +16 -0
  928. package/src/simple-tree/{mapNode.ts → node-kinds/map/mapNode.ts} +10 -10
  929. package/src/simple-tree/{mapNodeTypes.ts → node-kinds/map/mapNodeTypes.ts} +3 -3
  930. package/src/simple-tree/node-kinds/object/index.ts +17 -0
  931. package/src/simple-tree/{objectNode.ts → node-kinds/object/objectNode.ts} +63 -34
  932. package/src/simple-tree/{objectNodeTypes.ts → node-kinds/object/objectNodeTypes.ts} +5 -5
  933. package/src/simple-tree/prepareForInsertion.ts +1 -1
  934. package/src/simple-tree/schemaTypes.ts +4 -3
  935. package/src/simple-tree/simpleSchema.ts +1 -0
  936. package/src/simple-tree/toMapTree.ts +11 -30
  937. package/src/simple-tree/toStoredSchema.ts +3 -2
  938. package/src/simple-tree/treeNodeValid.ts +3 -3
  939. package/src/simple-tree/walkFieldSchema.ts +0 -1
  940. package/src/treeFactory.ts +1 -1
  941. package/src/util/bTreeUtils.ts +1 -0
  942. package/src/util/breakable.ts +19 -4
  943. package/dist/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  944. package/dist/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  945. package/dist/simple-tree/api/testRecursiveDomain.js +0 -45
  946. package/dist/simple-tree/api/testRecursiveDomain.js.map +0 -1
  947. package/dist/simple-tree/arrayNode.d.ts.map +0 -1
  948. package/dist/simple-tree/arrayNode.js.map +0 -1
  949. package/dist/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  950. package/dist/simple-tree/mapNode.d.ts.map +0 -1
  951. package/dist/simple-tree/mapNode.js.map +0 -1
  952. package/dist/simple-tree/mapNodeTypes.d.ts.map +0 -1
  953. package/dist/simple-tree/mapNodeTypes.js.map +0 -1
  954. package/dist/simple-tree/objectNode.d.ts.map +0 -1
  955. package/dist/simple-tree/objectNode.js.map +0 -1
  956. package/dist/simple-tree/objectNodeTypes.d.ts.map +0 -1
  957. package/dist/simple-tree/objectNodeTypes.js.map +0 -1
  958. package/lib/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  959. package/lib/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  960. package/lib/simple-tree/api/testRecursiveDomain.js +0 -41
  961. package/lib/simple-tree/api/testRecursiveDomain.js.map +0 -1
  962. package/lib/simple-tree/arrayNode.d.ts.map +0 -1
  963. package/lib/simple-tree/arrayNode.js.map +0 -1
  964. package/lib/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  965. package/lib/simple-tree/arrayNodeTypes.js.map +0 -1
  966. package/lib/simple-tree/mapNode.d.ts.map +0 -1
  967. package/lib/simple-tree/mapNode.js.map +0 -1
  968. package/lib/simple-tree/mapNodeTypes.d.ts.map +0 -1
  969. package/lib/simple-tree/mapNodeTypes.js.map +0 -1
  970. package/lib/simple-tree/objectNode.d.ts.map +0 -1
  971. package/lib/simple-tree/objectNode.js.map +0 -1
  972. package/lib/simple-tree/objectNodeTypes.d.ts.map +0 -1
  973. package/lib/simple-tree/objectNodeTypes.js.map +0 -1
  974. package/src/simple-tree/api/testRecursiveDomain.ts +0 -53
package/CHANGELOG.md CHANGED
@@ -1,5 +1,346 @@
1
1
  # @fluidframework/tree
2
2
 
3
+ ## 2.41.0
4
+
5
+ ### Minor Changes
6
+
7
+ - TreeAlpha.create now accepts unhydrated nodes ([#24629](https://github.com/microsoft/FluidFramework/pull/24629)) [e63af87aeb](https://github.com/microsoft/FluidFramework/commit/e63af87aeb7ece1ff0969027904c3b18f122d2d1)
8
+
9
+ [TreeAlpha.create](https://fluidframework.com/docs/api/fluid-framework/treealpha-interface#create-methodsignature) now accepts [unhydrated](https://fluidframework.com/docs/api/fluid-framework/unhydrated-typealias) nodes.
10
+ `TreeAlpha.create`'s documentation has been updated to clarify that this is supported.
11
+
12
+ Additionally `TreeAlpha.create` no longer throws a "Tree does not conform to schema" error when given a tree omitting an identifier.
13
+ Instead, the identifier behaves like it would for other ways to build unhydrated nodes: remaining unreadable until hydrated.
14
+
15
+ - SharedTrees's FluidClientVersion enum (alpha) has been redesigned ([#24638](https://github.com/microsoft/FluidFramework/pull/24638)) [5f3b9d7b7d](https://github.com/microsoft/FluidFramework/commit/5f3b9d7b7d12307d89cbd4b88f5e2d6e1833680d)
16
+
17
+ Users of [FluidClientVersion](https://fluidframework.com/docs/api/fluid-framework/fluidclientversion-enum)'s `v2_1`, `v2_2`, and `v2_3` entries should specify `v2_0` instead.
18
+ This will result in no functional differences since no code currently opts into any additional functionality based on specifying those versions.
19
+ The new approach avoids listing versions which there is currently no reason to select, and thus these options have been removed.
20
+ If future work adds support to opt into features which only work starting with some of those versions, they will be re-added at that time.
21
+
22
+ - ForestTypeExpensiveDebug now validates content against schema ([#24658](https://github.com/microsoft/FluidFramework/pull/24658)) [9d600aae88](https://github.com/microsoft/FluidFramework/commit/9d600aae88b9045392067719638258ea7407c2eb)
23
+
24
+ When opting into using [ForestTypeExpensiveDebug](https://fluidframework.com/docs/api/fluid-framework/#foresttypeexpensivedebug-variable) using [configuredSharedTree](https://fluidframework.com/docs/api/fluid-framework/#configuredsharedtree-function), the tree is now checked against the schema on load and after every edit.
25
+ This should help detect and diagnose document corruption bugs.
26
+
27
+ ```typescript
28
+ const DebugSharedTree = configuredSharedTree({
29
+ jsonValidator: typeboxValidator,
30
+ // Now detects corrupted documents which are out of schema.
31
+ forest: ForestTypeExpensiveDebug,
32
+ });
33
+ ```
34
+
35
+ - The comparePersistedSchema function (alpha) has had its canInitialize parameter removed ([#24606](https://github.com/microsoft/FluidFramework/pull/24606)) [d083a1780a](https://github.com/microsoft/FluidFramework/commit/d083a1780a1db74a922cbfb451d23ab932c0eb32)
36
+
37
+ [comparePersistedSchema](https://fluidframework.com/docs/api/tree/#comparepersistedschema-function) has had its `canInitialize` parameter removed.
38
+ This parameter was only used to add to the output [SchemaCompatibilityStatus](https://fluidframework.com/docs/api/fluid-framework/schemacompatibilitystatus-interface).
39
+ If a full `SchemaCompatibilityStatus` is still desired, the `canInitialize` value can be added to the result:
40
+
41
+ ```typescript
42
+ // old
43
+ const result = comparePersistedSchema(a, b, canInitialize);
44
+ // new
45
+ const result = { ...comparePersistedSchema(a, b), canInitialize };
46
+ ```
47
+
48
+ - TreeNodes now implicitly generate identifiers on access instead of throwing ([#24665](https://github.com/microsoft/FluidFramework/pull/24665)) [cd5976b959](https://github.com/microsoft/FluidFramework/commit/cd5976b959d6b7a5259e3bb9ef816f842724bc6e)
49
+
50
+ Accessing a defaulted [identifier](https://fluidframework.com/docs/api/fluid-framework/schemafactory-class#identifier-property) on an [Unhydrated](https://fluidframework.com/docs/api/fluid-framework/unhydrated-typealias) `TreeNode` no longer throws a usage error.
51
+ Instead, a new UUID is allocated for the identifier and returned.
52
+ These UUIDs will be more compressible than random ones, since they all come from a single sequence (starting with a random UUID).
53
+ They will not be fully compressed like the identifiers generated after hydration that leverage the document's [IIdCompressor](https://fluidframework.com/docs/api/id-compressor/iidcompressor-interface).
54
+
55
+ ```typescript
56
+ const factory = new SchemaFactory("test");
57
+ class HasIdentifier extends schema.object("A", { id: factory.identifier }) {}
58
+ // This used to throw an error:
59
+ const id = new HasIdentifier({}).id;
60
+ ```
61
+
62
+ - New TableSchema (alpha) APIs ([#24579](https://github.com/microsoft/FluidFramework/pull/24579)) [e565f6838b](https://github.com/microsoft/FluidFramework/commit/e565f6838b31d3e777da942c806606575123f6d6)
63
+
64
+ A `TableSchema` utility has been added to Shared Tree for managing dynamic, tabular data.
65
+ This new `TableSchema` namespace contains APIs for creating column, row, and table [node schema](https://fluidframework.com/docs/api/fluid-framework/treenodeschema-typealias).
66
+
67
+ Note: these APIs require the use of [SchemaFactoryAlpha](https://fluidframework.com/docs/api/fluid-framework/schemafactoryalpha-class).
68
+
69
+ > [!WARNING]
70
+ > These APIs are in preview and are subject to change.
71
+ > Until these APIs have stabilized, it is not recommended to use them in production code.
72
+ > There may be breaking changes to these APIs and their underlying data format.
73
+ > Using these APIs in production code may result in data loss or corruption.
74
+
75
+ #### Creating a table
76
+
77
+ You can craft a table schema with `TableSchema.table`.
78
+ This includes providing a schema for the cells that will appear in the table:
79
+
80
+ ```typescript
81
+ class MyTable extends TableSchema.table({
82
+ schemaFactory,
83
+ cell: schemaFactory.string,
84
+ }) {}
85
+
86
+ const table = new MyTable({
87
+ columns: [{ id: "column-0" }],
88
+ rows: [{ id: "row-0", cells: { "column-0": "Hello world!" } }],
89
+ });
90
+ ```
91
+
92
+ #### Creating a table with custom column and row schema
93
+
94
+ To associate additional data with your rows or columns, generate custom row and column schema using `TableSchema.column` and `TableSchema.row`.
95
+ These schema can then be provided to `TableSchema.table`:
96
+
97
+ ```typescript
98
+ class MyColumn extends TableSchema.column({
99
+ schemaFactory,
100
+ cell: Cell,
101
+ props: schemaFactory.object("TableColumnProps", {
102
+ label: schemaFactory.string,
103
+ }),
104
+ }) {}
105
+
106
+ class MyRow extends TableSchema.row({
107
+ schemaFactory,
108
+ cell: Cell,
109
+ }) {}
110
+
111
+ class MyTable extends TableSchema.table({
112
+ schemaFactory,
113
+ cell: Cell,
114
+ column: MyColumn,
115
+ row: MyRow,
116
+ }) {}
117
+
118
+ const table = new MyTable({
119
+ columns: [
120
+ new MyColumn({ props: { label: "Entry" } }),
121
+ new MyColumn({ props: { label: "Date" } }),
122
+ new MyColumn({ props: { label: "Amount" } }),
123
+ ],
124
+ rows: [],
125
+ });
126
+ ```
127
+
128
+ #### Interacting with the table
129
+
130
+ Table trees created using `TableSchema` offer various APIs to make working with tabular data easy.
131
+ These include:
132
+
133
+ - Insertion and removal of columns, rows, and cells.
134
+ - Cell access by column/row.
135
+
136
+ ```typescript
137
+ // Create an empty table
138
+ const table = MyTable.empty();
139
+
140
+ const column0 = new MyColumn({
141
+ props: { label: "Column 0" },
142
+ });
143
+
144
+ // Append a column to the end of the table.
145
+ table.insertColumn({
146
+ column: column0,
147
+ });
148
+
149
+ const rows = [new MyRow({ cells: {} }), new MyRow({ cells: {} })];
150
+
151
+ // Insert rows at the beginning of the table.
152
+ table.insertRows({
153
+ index: 0,
154
+ rows,
155
+ });
156
+
157
+ // Set cell at row 0, column 0.
158
+ table.setCell({
159
+ key: {
160
+ column: column0,
161
+ row: rows[0],
162
+ },
163
+ cell: "Hello",
164
+ });
165
+
166
+ // Set cell at row 1, column 0.
167
+ table.setCell({
168
+ key: {
169
+ column: column0,
170
+ row: rows[1],
171
+ },
172
+ cell: "World",
173
+ });
174
+
175
+ // Remove the first row.
176
+ // Note: this will also remove the row's cell.
177
+ table.removeRow(rows[0]);
178
+
179
+ // Remove the column.
180
+ // Note: this will *not* remove the remaining cell under this column.
181
+ table.removeColumn(column0);
182
+ ```
183
+
184
+ #### Listening for changes
185
+
186
+ Listening for changes to table trees behaves just like it would for any other nodes in a Shared Tree (see [here](https://fluidframework.com/docs/data-structures/tree/events) for more details).
187
+
188
+ The most straightforward option is to listen for any changes to the table node and its descendants.
189
+ For example:
190
+
191
+ ```typescript
192
+ class Cell extends schemaFactory.object("TableCell", {
193
+ value: schemaFactory.string,
194
+ }) {}
195
+
196
+ class Table extends TableSchema.table({
197
+ schemaFactory,
198
+ cell: Cell,
199
+ }) {}
200
+
201
+ const table = new Table({
202
+ columns: [{ id: "column-0" }],
203
+ rows: [{ id: "row-0", cells: {} }],
204
+ });
205
+
206
+ // Listen for any changes to the table and its children.
207
+ // The "treeChanged" event will fire when the `table` node or any of its descendants change.
208
+ Tree.on(table, "treeChanged", () => {
209
+ // Respond to the change.
210
+ });
211
+ ```
212
+
213
+ If you need more granular eventing to meet your performance needs, that is possible as well.
214
+ For example, if you wish to know when the table's list of rows changes, you could do the following:
215
+
216
+ ```typescript
217
+ class Cell extends schemaFactory.object("TableCell", {
218
+ value: schemaFactory.string,
219
+ }) {}
220
+
221
+ class Table extends TableSchema.table({
222
+ schemaFactory,
223
+ cell: Cell,
224
+ }) {}
225
+
226
+ const table = new Table({
227
+ columns: [{ id: "column-0" }],
228
+ rows: [{ id: "row-0", cells: {} }],
229
+ });
230
+
231
+ // Listen for any changes to the list of rows.
232
+ // The "nodeChanged" event will fire only when the `rows` node itself changes (i.e., its own properties change).
233
+ // In this case, the event will fire when a row is added or removed, or the order of the list is changed.
234
+ // But it won't fire when a row's properties change, or when the row's cells change, etc.
235
+ Tree.on(table.rows, "nodeChanged", () => {
236
+ // Respond to the change.
237
+ });
238
+ ```
239
+
240
+ #### Limitations
241
+
242
+ ##### Orphaned cells
243
+
244
+ Cells in the table may become "orphaned."
245
+ That is, it is possible to enter a state where one or more rows contain cells with no corresponding column.
246
+ To reduce the likelihood of this, you can manually remove corresponding cells when removing columns.
247
+
248
+ For example:
249
+
250
+ ```typescript
251
+ // Remove column1 and all of its cells.
252
+ // The "transaction" method will ensure that all changes are applied atomically.
253
+ Tree.runTransaction(table, () => {
254
+ // Remove column1
255
+ table.removeColumn(column1);
256
+
257
+ // Remove the cell at column1 for each row.
258
+ for (const row of table.rows) {
259
+ table.removeCell({
260
+ column: column1,
261
+ row,
262
+ });
263
+ }
264
+ });
265
+ ```
266
+
267
+ > [!WARNING]
268
+ > Note that even with the above precaution, it is possible to enter such an orphaned cell state via the merging of edits.
269
+ > For example: one client might add a row while another concurrently removes a column, orphaning the cell where the column and row intersected.
270
+
271
+ - New TreeAlpha.key2 API ([#24623](https://github.com/microsoft/FluidFramework/pull/24623)) [0ddd6b030b](https://github.com/microsoft/FluidFramework/commit/0ddd6b030bf21ef2f315b84e428954ecfe951728)
272
+
273
+ The `TreeAlpha.key2` method is meant to eventually replace the public `Tree.key` method.
274
+ This new method returns `undefined` in the case where there is a root node.
275
+
276
+ - New TreeAlpha identifier APIs for converting, retrieving, and generating identifiers ([#24218](https://github.com/microsoft/FluidFramework/pull/24218)) [e5b2882132](https://github.com/microsoft/FluidFramework/commit/e5b28821323566112096f05805281b8d5321077d)
277
+
278
+ #### TreeAlpha.identifier
279
+
280
+ You can retrieve the long identifier with `TreeAlpha.identifier(node)`, where `node` is a `TreeNode`. The long identifier is a stable, compressible UUID generated by the tree.
281
+ In cases where the node does not yet have an identifier assigned, this will return `undefined`.
282
+ These cases include:
283
+
284
+ - The node does not contain an identifier field.
285
+ - The node is a non-hydrated node with a user provided identifier. Note that if it is a non-hydrated node without an identifier provided, it will throw an error.
286
+
287
+ #### TreeAlpha.identifier.shorten
288
+
289
+ You can shorten a long identifier with `TreeAlpha.identifier.shorten(branch, identifier)`, where `branch` is a `TreeBranch`, and `identifier` is a `string`.
290
+ If the method returns a valid short identifier, this identifier can be passed into `TreeAlpha.identifier.lengthen`
291
+ to get the original valid long `identifier` back.
292
+ In the cases where it's not possible to shorten the `identifier`, it will return `undefined`.
293
+ These cases include:
294
+
295
+ - A compressible long identifier, but it is unrecognized by the tree that the node belongs to. This can occur if the identifier is not generated from the tree.
296
+ - An identifier which is not compressible by the tree. This can occur if the node's identifier was a user provided string.
297
+
298
+ #### TreeAlpha.identifier.lengthen
299
+
300
+ You can lengthen a short identifier with `TreeAlpha.identifier.lengthen(branch, identifier)`, where `branch` is a `TreeBranch`, and `identifier` is a `number`.
301
+ If the method returns a valid long identifier, this identifier can be passed into `TreeAlpha.identifier.shorten` to get the original `identifier` back.
302
+ In the cases where it's not possible to lengthen the `identifier`, this method will throw an error.
303
+ These cases include:
304
+
305
+ - An unrecognized short identifier. This can occur if the identifier is not generated from the tree.
306
+
307
+ #### TreeAlpha.identifier.getShort
308
+
309
+ You can retrieve the short identifier from a node with `TreeAlpha.identifier.getShort(node)` where `node` is a `TreeNode`.
310
+ If it is not possible to retrieve the short identifier, it will return `undefined`
311
+
312
+ ##### Example for a node with valid identifier
313
+
314
+ ```typescript
315
+ // This will retrieve the short identifier from the node.
316
+ const shortIdentifier = TreeAlpha.identifier.getShort(
317
+ nodeWithValidIdentifier,
318
+ );
319
+ ```
320
+
321
+ ##### Examples for when you get undefined
322
+
323
+ In cases where the node provided does not contain an identifier that is recognized or compressible by the tree that the node belongs to, this method will return undefined.
324
+ This will occur in the following cases:
325
+
326
+ - The node is an non-hydrated node with a user provided identifier. Note that if it is an non-hydrated node without an identifier provided, it will throw an error.
327
+ - The node does not contain an identifier field.
328
+ - The node contains a compressible long identifier, but it is unrecognized by the tree that the node belongs to. This can occur if the identifier is not generated from the tree.
329
+ - The node contains an identifier which is not compressible by its id compressor. This can occur if the node's identifier was a user provided string.
330
+
331
+ ```typescript
332
+ // This will return undefined
333
+ const shortIdentifier = TreeAlpha.identifier.getShort(node);
334
+ ```
335
+
336
+ #### TreeAlpha.identifier.create
337
+
338
+ You can create a long identifier from a branch with `TreeAlpha.identifier.create(branch)` where `branch` is a `TreeBranch`.
339
+
340
+ ```typescript
341
+ const createdIdentifier = TreeAlpha.identifier.create(branch);
342
+ ```
343
+
3
344
  ## 2.40.0
4
345
 
5
346
  ### Minor Changes
@@ -1181,6 +1181,7 @@ export interface TreeAlpha {
1181
1181
  exportConcise(node: TreeNode | TreeLeafValue, options?: TreeEncodingOptions): ConciseTree;
1182
1182
  exportConcise(node: TreeNode | TreeLeafValue | undefined, options?: TreeEncodingOptions): ConciseTree | undefined;
1183
1183
  exportVerbose(node: TreeNode | TreeLeafValue, options?: TreeEncodingOptions): VerboseTree;
1184
+ readonly identifier: TreeIdentifierUtils;
1184
1185
  importCompressed<const TSchema extends ImplicitFieldSchema>(schema: TSchema, compressedData: JsonCompatible<IFluidHandle>, options: {
1185
1186
  idCompressor?: IIdCompressor;
1186
1187
  } & ICodecOptions): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
@@ -1274,6 +1275,15 @@ export interface TreeEncodingOptions {
1274
1275
  // @public
1275
1276
  export type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> = TSchema extends FieldSchema<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind> : TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes<TSchema> : TreeNode | TreeLeafValue | undefined;
1276
1277
 
1278
+ // @alpha @sealed
1279
+ export interface TreeIdentifierUtils {
1280
+ (node: TreeNode): string | undefined;
1281
+ create(branch: TreeBranch): string;
1282
+ getShort(node: TreeNode): number | undefined;
1283
+ lengthen(branch: TreeBranch, nodeIdentifier: number): string;
1284
+ shorten(branch: TreeBranch, nodeIdentifier: string): number | undefined;
1285
+ }
1286
+
1277
1287
  // @alpha
1278
1288
  export interface TreeIndex<TKey extends TreeIndexKey, TValue> extends ReadonlyMap<TKey, TValue> {
1279
1289
  dispose(): void;
package/dist/alpha.d.ts CHANGED
@@ -181,6 +181,7 @@ export {
181
181
  TreeBranchFork,
182
182
  TreeCompressionStrategy,
183
183
  TreeEncodingOptions,
184
+ TreeIdentifierUtils,
184
185
  TreeIndex,
185
186
  TreeIndexKey,
186
187
  TreeIndexNodes,
@@ -200,6 +200,14 @@ export declare function withSchemaValidation<TInMemoryFormat, EncodedSchema exte
200
200
  * Versions with no notable impact can be omitted.
201
201
  *
202
202
  * These use numeric values for easy threshold comparisons.
203
+ * Without zero padding, version 2.10 is treated as 2.1, which is numerically less than 2.2.
204
+ * Adding leading zeros to the minor version ensures correct comparisons.
205
+ * For example, version 2.20.0 is encoded as 2.020, and version 2.2.0 is encoded as 2.002.
206
+ * For example FF 2.20.0 is encoded as 2.020 and FF 2.2.0 is encoded as 2.002.
207
+ *
208
+ * Three digits was selected as that will likely be enough, while two digits could easily be too few.
209
+ * If three digits ends up being too few, minor releases of 1000 and higher
210
+ * could still be handled using something like 2.999_00001 without having to change the lower releases.
203
211
  *
204
212
  * This scheme assumes a single version will always be enough to communicate compatibility.
205
213
  * For this to work, compatibility has to be strictly increasing.
@@ -208,6 +216,8 @@ export declare function withSchemaValidation<TInMemoryFormat, EncodedSchema exte
208
216
  * such a system can be added if/when its needed since it will be opt in and thus non-breaking.
209
217
  *
210
218
  * TODO: this should likely be defined higher in the stack and specified when creating the container, possibly as part of its schema.
219
+ * TODO: compatibility requirements for how this enum can and cannot be changed should be clarified when/if it's used across multiple layers in the stack.
220
+ * For example, if needed, would adding more leading zeros to the minor version break things.
211
221
  * @alpha
212
222
  */
213
223
  export declare enum FluidClientVersion {
@@ -1 +1 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/codec/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAkB,MAAM,8BAA8B,CAAC;AAEzE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ;IACrD;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACnD;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ;IACrD;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACnD;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB,CAAC,MAAM,SAAS,OAAO;IAC/D;;OAEG;IACH,KAAK,CAAC,IAA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AiB,CAAC,QAAQ,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,QAAQ,CAAC,CAKvF;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EACtD,KAAK,EACF,iBAAiB,CAAC,QAAQ,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,QAAQ,CAAC,GACrF,UAAU,CAAC,QAAQ,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,QAAQ,CAAC,GAC/E,iBAAiB,CAAC,QAAQ,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,QAAQ,CAAC,CAEvF;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,iBAAiB,CACxC,CAAC,EACD,sBAAsB,EACtB,sBAAsB,EACtB,OAAO,CAUP,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,eAAe,EACf,aAAa,SAAS,OAAO,EAC7B,cAAc,GAAG,sBAAsB,EACvC,SAAS,GAAG,cAAc,EAC1B,QAAQ,GAAG,qBAAqB,EAEhC,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,UAAU,CAAC,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,CAAC,EACvE,SAAS,CAAC,EAAE,aAAa,GACvB,UAAU,CAAC,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,CAAC,CAqBlE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,oBAAY,kBAAkB;IAC7B;;;;;;OAMG;IAGH,4CAA4C;IAC5C,IAAI,IAAM;IAEV,4CAA4C;IAM5C,6CAA6C;IAI7C;;;;;;;;OAQG;IACH,sBAAiD;CACjD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,EAAE,kBAA4C,CAAC"}
@@ -128,6 +128,14 @@ exports.withSchemaValidation = withSchemaValidation;
128
128
  * Versions with no notable impact can be omitted.
129
129
  *
130
130
  * These use numeric values for easy threshold comparisons.
131
+ * Without zero padding, version 2.10 is treated as 2.1, which is numerically less than 2.2.
132
+ * Adding leading zeros to the minor version ensures correct comparisons.
133
+ * For example, version 2.20.0 is encoded as 2.020, and version 2.2.0 is encoded as 2.002.
134
+ * For example FF 2.20.0 is encoded as 2.020 and FF 2.2.0 is encoded as 2.002.
135
+ *
136
+ * Three digits was selected as that will likely be enough, while two digits could easily be too few.
137
+ * If three digits ends up being too few, minor releases of 1000 and higher
138
+ * could still be handled using something like 2.999_00001 without having to change the lower releases.
131
139
  *
132
140
  * This scheme assumes a single version will always be enough to communicate compatibility.
133
141
  * For this to work, compatibility has to be strictly increasing.
@@ -136,6 +144,8 @@ exports.withSchemaValidation = withSchemaValidation;
136
144
  * such a system can be added if/when its needed since it will be opt in and thus non-breaking.
137
145
  *
138
146
  * TODO: this should likely be defined higher in the stack and specified when creating the container, possibly as part of its schema.
147
+ * TODO: compatibility requirements for how this enum can and cannot be changed should be clarified when/if it's used across multiple layers in the stack.
148
+ * For example, if needed, would adding more leading zeros to the minor version break things.
139
149
  * @alpha
140
150
  */
141
151
  var FluidClientVersion;
@@ -147,17 +157,17 @@ var FluidClientVersion;
147
157
  * @privateRemarks
148
158
  * As long as this code is in Tree, there is no reason to have this option as SharedTree did not exist in 1.4.
149
159
  */
150
- // v1_4 = 1.4,
160
+ // v1_4 = 1.004,
151
161
  /** Fluid Framework Client 2.0 and newer. */
152
162
  FluidClientVersion[FluidClientVersion["v2_0"] = 2] = "v2_0";
153
163
  /** Fluid Framework Client 2.1 and newer. */
154
164
  // If we think we might want to start allowing opting into something that landed in 2.1 (without opting into something newer),
155
165
  // we could add an entry like this to allow users to indicate that they can be opted in once we are ready,
156
- // then update it to "v2_1" once we actually have the opt in working.
166
+ // then update it to "2.001" once we actually have the opt in working.
157
167
  // v2_1 = v2_0,
158
168
  /** Fluid Framework Client 2.41 and newer. */
159
169
  // If we land some new formats in 2.41, we can enable selecting
160
- // v2_41 = 2.41,
170
+ // v2_41 = 2.041,
161
171
  /**
162
172
  * Enable unreleased and unfinished features.
163
173
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/codec/codec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAyE;AACzE,kEAAmE;AAmLnE;;;GAGG;AACH,SAAgB,eAAe,CAC9B,QAOC;IAED,MAAM,MAAM,GAGR,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,QAAQ,EAAE,CAAC;QAC/C,IAAI,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;YAC/B,IAAA,eAAI,EAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;QAC/C,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,OAAO;QACN,OAAO,CACN,aAAqB;YAErB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YACxC,IAAA,iBAAM,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;AAjCD,0CAiCC;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,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACtC,OAAO,wBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAE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,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO;QACN,MAAM,EAAE,CAAC,GAAoB,EAAE,OAAiB,EAAkB,EAAE;YACnE,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YAC3C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;gBACpC,IAAA,eAAI,EAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;YAClD,CAAC;YACD,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,CAAC,OAAkB,EAAE,OAAiB,EAAmB,EAAE;YAClE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;gBACpC,IAAA,eAAI,EAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;YAClD,CAAC;YACD,2GAA2G;YAC3G,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAA+B,CAAC;QACrE,CAAC;KACD,CAAC;AACH,CAAC;AA/BD,oDA+BC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,IAAY,kBAiCX;AAjCD,WAAY,kBAAkB;IAC7B;;;;;;OAMG;IACH,cAAc;IAEd,4CAA4C;IAC5C,2DAAU,CAAA;IAEV,4CAA4C;IAC5C,8HAA8H;IAC9H,0GAA0G;IAC1G,qEAAqE;IACrE,eAAe;IAEf,6CAA6C;IAC7C,+DAA+D;IAC/D,gBAAgB;IAEhB;;;;;;;;OAQG;IACH,kEAAyB,MAAM,CAAC,iBAAiB,4BAAA,CAAA;AAClD,CAAC,EAjCW,kBAAkB,kCAAlB,kBAAkB,QAiC7B;AAED;;;;;;;;GAQG;AACU,QAAA,cAAc,GAAuB,kBAAkB,CAAC,IAAI,CAAC","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, fail } from \"@fluidframework/core-utils/internal\";\nimport type { Static, TAnySchema, TSchema } from \"@sinclair/typebox\";\n\nimport type { ChangeEncodingContext } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } 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 * @alpha\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 * @alpha\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 * @alpha\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: FormatVersion,\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<FormatVersion>;\n}\n\n/**\n * A version stamp for encoded data.\n *\n * Undefined is tolerated to enable the scenario where data was not initially versioned.\n */\nexport type FormatVersion = number | undefined;\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: FormatVersion,\n\t\t\tcodec:\n\t\t\t\t| IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>\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\tFormatVersion,\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(0xabf /* Duplicate codecs specified. */);\n\t\t}\n\t\tcodecs.set(formatVersion, ensureBinaryEncoding(codec));\n\t}\n\n\treturn {\n\t\tresolve(\n\t\t\tformatVersion: number,\n\t\t): IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\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(): Iterable<FormatVersion> {\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<\n\t0,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tunknown\n> = {\n\tjson: {\n\t\tencode: () => 0,\n\t\tdecode: () => 0,\n\t},\n\tbinary: {\n\t\tencode: () => IsoBuffer.from(\"\"),\n\t\tdecode: () => 0,\n\t},\n};\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): TEncodedFormat => {\n\t\t\tconst encoded = codec.encode(obj, context);\n\t\t\tif (!compiledFormat.check(encoded)) {\n\t\t\t\tfail(0xac0 /* Encoded schema should validate */);\n\t\t\t}\n\t\t\treturn encoded;\n\t\t},\n\t\tdecode: (encoded: TValidate, context: TContext): TInMemoryFormat => {\n\t\t\tif (!compiledFormat.check(encoded)) {\n\t\t\t\tfail(0xac1 /* 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\n/**\n * Versions of Fluid Framework client packages.\n * @remarks\n * Used to express compatibility requirements by indicating the oldest version with which compatibility must be maintained.\n *\n * When no compatibility-impacting change is made in a given version, the value associated with its enum entry may point to the older version which it's fully compatible with.\n * Note that this can change if a future version of the framework introduces an option to use something which is only supported at a particular version. In which case, the values of the enum may shift,\n * but the semantics of keys in this enum will not change.\n *\n * Do not depend on the value of this enums's entries: only depend on the keys (enum members) themselves.\n *\n * Some release may also be omitted if there is currently no need to express that specific version.\n * If the need arises, they might be added in the future.\n *\n * @privateRemarks\n * Entries in these enums should document the user facing impact of opting into a particular version.\n * For example, document if there is an encoding efficiency improvement of oping into that version or newer.\n * Versions with no notable impact can be omitted.\n *\n * These use numeric values for easy threshold comparisons.\n *\n * This scheme assumes a single version will always be enough to communicate compatibility.\n * For this to work, compatibility has to be strictly increasing.\n * If this is violated (for example a subset of incompatible features from 3.x that are not in 3.0 are back ported to 2.x),\n * a more complex scheme may be needed to allow safely opting into incompatible features in those cases:\n * such a system can be added if/when its needed since it will be opt in and thus non-breaking.\n *\n * TODO: this should likely be defined higher in the stack and specified when creating the container, possibly as part of its schema.\n * @alpha\n */\nexport enum FluidClientVersion {\n\t/**\n\t * Fluid Framework Client 1.4 and newer.\n\t * @remarks\n\t * This opts into support for the 1.4 LTS branch.\n\t * @privateRemarks\n\t * As long as this code is in Tree, there is no reason to have this option as SharedTree did not exist in 1.4.\n\t */\n\t// v1_4 = 1.4,\n\n\t/** Fluid Framework Client 2.0 and newer. */\n\tv2_0 = 2.0,\n\n\t/** Fluid Framework Client 2.1 and newer. */\n\t// If we think we might want to start allowing opting into something that landed in 2.1 (without opting into something newer),\n\t// we could add an entry like this to allow users to indicate that they can be opted in once we are ready,\n\t// then update it to \"v2_1\" once we actually have the opt in working.\n\t// v2_1 = v2_0,\n\n\t/** Fluid Framework Client 2.41 and newer. */\n\t// If we land some new formats in 2.41, we can enable selecting\n\t// v2_41 = 2.41,\n\n\t/**\n\t * Enable unreleased and unfinished features.\n\t * @remarks\n\t * Using this value can result in documents which can not be opened in future versions of the framework.\n\t * It can also result in data corruption by enabling unfinished features which may not handle all cases correctly.\n\t *\n\t * This can be used with specific APIs when the caller has knowledge of what specific features those APIs will be opted into with it.\n\t * This is useful for testing features before they are released, but should not be used in production code.\n\t */\n\tEnableUnstableFeatures = Number.POSITIVE_INFINITY,\n}\n\n/**\n * An up to date version which includes all the important stable features.\n * @remarks\n * Use for cases when data is not persisted and thus would only ever be read by the current version of the framework.\n *\n * @privateRemarks\n * Update as needed.\n * TODO: Consider using packageVersion.ts to keep this current.\n */\nexport const currentVersion: FluidClientVersion = FluidClientVersion.v2_0;\n"]}
1
+ {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/codec/codec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAyE;AACzE,kEAAmE;AAmLnE;;;GAGG;AACH,SAAgB,eAAe,CAC9B,QAOC;IAED,MAAM,MAAM,GAGR,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,QAAQ,EAAE,CAAC;QAC/C,IAAI,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;YAC/B,IAAA,eAAI,EAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;QAC/C,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,OAAO;QACN,OAAO,CACN,aAAqB;YAErB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YACxC,IAAA,iBAAM,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;AAjCD,0CAiCC;AAED,MAAM,kBAAkB;IACvB,YACkB,SAA2D;QAA3D,cAAS,GAAT,SAAS,CAAkD;IAC1E,CAAC;IAEG,MAAM,CAAC,MAAgB,EAAE,OA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AAM,CAAC,iBAAiB,4BAAA,CAAA;AAClD,CAAC,EAjCW,kBAAkB,kCAAlB,kBAAkB,QAiC7B;AAED;;;;;;;;GAQG;AACU,QAAA,cAAc,GAAuB,kBAAkB,CAAC,IAAI,CAAC","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, fail } from \"@fluidframework/core-utils/internal\";\nimport type { Static, TAnySchema, TSchema } from \"@sinclair/typebox\";\n\nimport type { ChangeEncodingContext } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } 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 * @alpha\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 * @alpha\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 * @alpha\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: FormatVersion,\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<FormatVersion>;\n}\n\n/**\n * A version stamp for encoded data.\n *\n * Undefined is tolerated to enable the scenario where data was not initially versioned.\n */\nexport type FormatVersion = number | undefined;\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: FormatVersion,\n\t\t\tcodec:\n\t\t\t\t| IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>\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\tFormatVersion,\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(0xabf /* Duplicate codecs specified. */);\n\t\t}\n\t\tcodecs.set(formatVersion, ensureBinaryEncoding(codec));\n\t}\n\n\treturn {\n\t\tresolve(\n\t\t\tformatVersion: number,\n\t\t): IMultiFormatCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\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(): Iterable<FormatVersion> {\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<\n\t0,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tunknown\n> = {\n\tjson: {\n\t\tencode: () => 0,\n\t\tdecode: () => 0,\n\t},\n\tbinary: {\n\t\tencode: () => IsoBuffer.from(\"\"),\n\t\tdecode: () => 0,\n\t},\n};\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): TEncodedFormat => {\n\t\t\tconst encoded = codec.encode(obj, context);\n\t\t\tif (!compiledFormat.check(encoded)) {\n\t\t\t\tfail(0xac0 /* Encoded schema should validate */);\n\t\t\t}\n\t\t\treturn encoded;\n\t\t},\n\t\tdecode: (encoded: TValidate, context: TContext): TInMemoryFormat => {\n\t\t\tif (!compiledFormat.check(encoded)) {\n\t\t\t\tfail(0xac1 /* 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\n/**\n * Versions of Fluid Framework client packages.\n * @remarks\n * Used to express compatibility requirements by indicating the oldest version with which compatibility must be maintained.\n *\n * When no compatibility-impacting change is made in a given version, the value associated with its enum entry may point to the older version which it's fully compatible with.\n * Note that this can change if a future version of the framework introduces an option to use something which is only supported at a particular version. In which case, the values of the enum may shift,\n * but the semantics of keys in this enum will not change.\n *\n * Do not depend on the value of this enums's entries: only depend on the keys (enum members) themselves.\n *\n * Some release may also be omitted if there is currently no need to express that specific version.\n * If the need arises, they might be added in the future.\n *\n * @privateRemarks\n * Entries in these enums should document the user facing impact of opting into a particular version.\n * For example, document if there is an encoding efficiency improvement of oping into that version or newer.\n * Versions with no notable impact can be omitted.\n *\n * These use numeric values for easy threshold comparisons.\n * Without zero padding, version 2.10 is treated as 2.1, which is numerically less than 2.2.\n * Adding leading zeros to the minor version ensures correct comparisons.\n * For example, version 2.20.0 is encoded as 2.020, and version 2.2.0 is encoded as 2.002.\n * For example FF 2.20.0 is encoded as 2.020 and FF 2.2.0 is encoded as 2.002.\n *\n * Three digits was selected as that will likely be enough, while two digits could easily be too few.\n * If three digits ends up being too few, minor releases of 1000 and higher\n * could still be handled using something like 2.999_00001 without having to change the lower releases.\n *\n * This scheme assumes a single version will always be enough to communicate compatibility.\n * For this to work, compatibility has to be strictly increasing.\n * If this is violated (for example a subset of incompatible features from 3.x that are not in 3.0 are back ported to 2.x),\n * a more complex scheme may be needed to allow safely opting into incompatible features in those cases:\n * such a system can be added if/when its needed since it will be opt in and thus non-breaking.\n *\n * TODO: this should likely be defined higher in the stack and specified when creating the container, possibly as part of its schema.\n * TODO: compatibility requirements for how this enum can and cannot be changed should be clarified when/if it's used across multiple layers in the stack.\n * For example, if needed, would adding more leading zeros to the minor version break things.\n * @alpha\n */\nexport enum FluidClientVersion {\n\t/**\n\t * Fluid Framework Client 1.4 and newer.\n\t * @remarks\n\t * This opts into support for the 1.4 LTS branch.\n\t * @privateRemarks\n\t * As long as this code is in Tree, there is no reason to have this option as SharedTree did not exist in 1.4.\n\t */\n\t// v1_4 = 1.004,\n\n\t/** Fluid Framework Client 2.0 and newer. */\n\tv2_0 = 2.0,\n\n\t/** Fluid Framework Client 2.1 and newer. */\n\t// If we think we might want to start allowing opting into something that landed in 2.1 (without opting into something newer),\n\t// we could add an entry like this to allow users to indicate that they can be opted in once we are ready,\n\t// then update it to \"2.001\" once we actually have the opt in working.\n\t// v2_1 = v2_0,\n\n\t/** Fluid Framework Client 2.41 and newer. */\n\t// If we land some new formats in 2.41, we can enable selecting\n\t// v2_41 = 2.041,\n\n\t/**\n\t * Enable unreleased and unfinished features.\n\t * @remarks\n\t * Using this value can result in documents which can not be opened in future versions of the framework.\n\t * It can also result in data corruption by enabling unfinished features which may not handle all cases correctly.\n\t *\n\t * This can be used with specific APIs when the caller has knowledge of what specific features those APIs will be opted into with it.\n\t * This is useful for testing features before they are released, but should not be used in production code.\n\t */\n\tEnableUnstableFeatures = Number.POSITIVE_INFINITY,\n}\n\n/**\n * An up to date version which includes all the important stable features.\n * @remarks\n * Use for cases when data is not persisted and thus would only ever be read by the current version of the framework.\n *\n * @privateRemarks\n * Update as needed.\n * TODO: Consider using packageVersion.ts to keep this current.\n */\nexport const currentVersion: FluidClientVersion = FluidClientVersion.v2_0;\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export { EmptyKey, type TreeType, type Value, type TreeValue, AnchorSet, type DetachedField, type UpPath, type NormalizedUpPath, type INormalizedUpPath, type NormalizedFieldUpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, type FieldUpPath, type Anchor, type RootField, type ChildCollection, type ChildLocation, type FieldMapObject, type NodeData, type GenericTreeNode, type JsonableTree, EncodedJsonableTree, rootFieldKey, rootField, type ITreeCursor, CursorLocationType, type ITreeCursorSynchronous, castCursorToSynchronous, type GenericFieldsNode, type AnchorLocator, genericTreeKeys, getGenericTreeField, genericTreeDeleteIfEmpty, getDepth, mapCursorField, mapCursorFields, iterateCursorField, type MapTree, detachedFieldAsKey, keyAsDetachedField, visitDelta, createAnnouncedVisitor, combineVisitors, announceDelta, applyDelta, makeDetachedFieldIndex, setGenericTreeField, type DeltaVisitor, type AnnouncedVisitor, SparseNode, getDescendant, compareUpPaths, clonePath, topDownPath, compareFieldUpPaths, forEachNode, forEachNodeInSubtree, forEachField, type PathRootPrefix, deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, type AnchorSlot, type AnchorNode, anchorSlot, type UpPathDefault, isDetachedUpPath, inCursorField, inCursorNode, type AnchorEvents, type AnchorSetRootEvents, type ProtoNodes, CursorMarker, isCursor, DetachedFieldIndex, type ForestRootId, getDetachedFieldContainingPath, aboveRootPlaceholder, type DeltaRoot, type DeltaMark, type DeltaDetachedNodeId, type DeltaFieldMap, type DeltaDetachedNodeChanges, type DeltaDetachedNodeBuild, type DeltaDetachedNodeDestruction, type DeltaDetachedNodeRename, type DeltaFieldChanges, type ExclusiveMapTree, deepCopyMapTree, type TreeChunk, dummyRoot, cursorChunk, tryGetChunk, type ChunkedCursor, } from "./tree/index.js";
6
6
  export { TreeNavigationResult, type IEditableForest, type IForestSubscription, type TreeLocation, type FieldLocation, type ForestLocation, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, type FieldAnchor, moveToDetachedField, type ForestEvents, } from "./forest/index.js";
7
- export { type FieldKey, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type TreeStoredSchemaSubscription, type MutableTreeStoredSchema, type FieldKindIdentifier, type FieldKindData, type TreeTypeSet, type TreeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, type SchemaEvents, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, type StoredSchemaCollection, schemaFormatV1, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, type SchemaAndPolicy, Multiplicity, type SchemaPolicy, } from "./schema-stored/index.js";
7
+ export { type FieldKey, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type TreeStoredSchemaSubscription, type MutableTreeStoredSchema, type FieldKindIdentifier, type FieldKindData, type TreeTypeSet, type TreeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, type SchemaEvents, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, type StoredSchemaCollection, schemaFormatV1, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, type SchemaAndPolicy, Multiplicity, type SchemaPolicy, SchemaVersion, } from "./schema-stored/index.js";
8
8
  export { type ChangeFamily, type ChangeFamilyCodec, type ChangeEncodingContext, type ChangeFamilyEditor, EditBuilder, } from "./change-family/index.js";
9
9
  export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, type ChangeRebaser, findAncestor, findCommonAncestor, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, RevisionTagCodec, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, type TaggedChange, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, type RevisionMetadataSource, revisionMetadataSourceFromInfo, type RevisionInfo, type EncodedRevisionTag, type EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, subtractChangeAtomIds, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, isAncestor, type ChangeAtomIdRangeMap, newChangeAtomIdRangeMap, compareRevisions, } from "./rebase/index.js";
10
10
  export { type Adapters, AdaptedViewSchema, type TreeAdapter, } from "./schema-view/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,KAAK,OAAO,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,KAAK,cAAc,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,KAAK,UAAU,EACf,KAAK,UAAU,EACf,UAAU,EACV,KAAK,aAAa,EAClB,gBAAgB,EAChB,aAAa,EAC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K,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,WAAW,GACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACN,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,KAAK,aAAa,EAClB,YAAY,EACZ,kBAAkB,EAClB,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,UAAU,EACV,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,iBAAiB,EACjB,KAAK,WAAW,GAChB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,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KAAK,WAAW,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,UAAU,EACV,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,iBAAiB,EACjB,KAAK,WAAW,GAChB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC"}
@@ -5,7 +5,7 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.TreeNavigationResult = exports.tryGetChunk = exports.cursorChunk = exports.dummyRoot = exports.deepCopyMapTree = exports.aboveRootPlaceholder = exports.getDetachedFieldContainingPath = exports.DetachedFieldIndex = exports.isCursor = exports.CursorMarker = exports.inCursorNode = exports.inCursorField = exports.isDetachedUpPath = exports.anchorSlot = exports.emptyDelta = exports.offsetDetachId = exports.makeDetachedNodeId = exports.deltaForRootInitialization = exports.forEachField = exports.forEachNodeInSubtree = exports.forEachNode = exports.compareFieldUpPaths = exports.topDownPath = exports.clonePath = exports.compareUpPaths = exports.getDescendant = exports.SparseNode = exports.setGenericTreeField = exports.makeDetachedFieldIndex = exports.applyDelta = exports.announceDelta = exports.combineVisitors = exports.createAnnouncedVisitor = exports.visitDelta = exports.keyAsDetachedField = exports.detachedFieldAsKey = exports.iterateCursorField = exports.mapCursorFields = exports.mapCursorField = exports.getDepth = exports.genericTreeDeleteIfEmpty = exports.getGenericTreeField = exports.genericTreeKeys = exports.castCursorToSynchronous = exports.CursorLocationType = exports.rootField = exports.rootFieldKey = exports.EncodedJsonableTree = exports.AnchorSet = exports.EmptyKey = void 0;
8
- exports.RevertibleStatus = exports.AdaptedViewSchema = exports.compareRevisions = exports.newChangeAtomIdRangeMap = exports.isAncestor = exports.replaceChange = exports.replaceAtomRevisions = exports.subtractChangeAtomIds = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.mintCommit = exports.SessionIdSchema = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.RevisionTagCodec = exports.RevisionTagSchema = exports.CommitKind = exports.findCommonAncestor = exports.findAncestor = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = exports.EditBuilder = exports.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchema = exports.decodeFieldSchema = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormatV1 = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.moveToDetachedField = exports.ITreeSubscriptionCursorState = void 0;
8
+ exports.RevertibleStatus = exports.AdaptedViewSchema = exports.compareRevisions = exports.newChangeAtomIdRangeMap = exports.isAncestor = exports.replaceChange = exports.replaceAtomRevisions = exports.subtractChangeAtomIds = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.mintCommit = exports.SessionIdSchema = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.RevisionTagCodec = exports.RevisionTagSchema = exports.CommitKind = exports.findCommonAncestor = exports.findAncestor = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = exports.EditBuilder = exports.SchemaVersion = exports.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchema = exports.decodeFieldSchema = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormatV1 = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.moveToDetachedField = exports.ITreeSubscriptionCursorState = void 0;
9
9
  var index_js_1 = require("./tree/index.js");
10
10
  Object.defineProperty(exports, "EmptyKey", { enumerable: true, get: function () { return index_js_1.EmptyKey; } });
11
11
  Object.defineProperty(exports, "AnchorSet", { enumerable: true, get: function () { return index_js_1.AnchorSet; } });
@@ -76,6 +76,7 @@ Object.defineProperty(exports, "decodeFieldSchema", { enumerable: true, get: fun
76
76
  Object.defineProperty(exports, "encodeFieldSchema", { enumerable: true, get: function () { return index_js_3.encodeFieldSchema; } });
77
77
  Object.defineProperty(exports, "storedSchemaDecodeDispatcher", { enumerable: true, get: function () { return index_js_3.storedSchemaDecodeDispatcher; } });
78
78
  Object.defineProperty(exports, "Multiplicity", { enumerable: true, get: function () { return index_js_3.Multiplicity; } });
79
+ Object.defineProperty(exports, "SchemaVersion", { enumerable: true, get: function () { return index_js_3.SchemaVersion; } });
79
80
  var index_js_4 = require("./change-family/index.js");
80
81
  Object.defineProperty(exports, "EditBuilder", { enumerable: true, get: function () { return index_js_4.EditBuilder; } });
81
82
  var index_js_5 = require("./rebase/index.js");