@fluidframework/tree 2.81.1 → 2.82.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 (579) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/api-report/tree.alpha.api.md +54 -22
  3. package/api-report/tree.beta.api.md +150 -1
  4. package/api-report/tree.legacy.beta.api.md +150 -1
  5. package/api-report/tree.legacy.public.api.md +1 -0
  6. package/api-report/tree.public.api.md +1 -0
  7. package/dist/alpha.d.ts +8 -2
  8. package/dist/beta.d.ts +3 -0
  9. package/dist/codec/codec.d.ts +17 -8
  10. package/dist/codec/codec.d.ts.map +1 -1
  11. package/dist/codec/codec.js +8 -1
  12. package/dist/codec/codec.js.map +1 -1
  13. package/dist/codec/index.d.ts +1 -1
  14. package/dist/codec/index.d.ts.map +1 -1
  15. package/dist/codec/index.js +2 -1
  16. package/dist/codec/index.js.map +1 -1
  17. package/dist/codec/versioned/codec.d.ts +1 -1
  18. package/dist/codec/versioned/codec.d.ts.map +1 -1
  19. package/dist/codec/versioned/codec.js.map +1 -1
  20. package/dist/core/index.d.ts +1 -1
  21. package/dist/core/index.d.ts.map +1 -1
  22. package/dist/core/index.js +4 -2
  23. package/dist/core/index.js.map +1 -1
  24. package/dist/core/rebase/changeRebaser.d.ts +3 -2
  25. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  26. package/dist/core/rebase/changeRebaser.js.map +1 -1
  27. package/dist/core/rebase/index.d.ts +1 -1
  28. package/dist/core/rebase/index.d.ts.map +1 -1
  29. package/dist/core/rebase/index.js +4 -2
  30. package/dist/core/rebase/index.js.map +1 -1
  31. package/dist/core/rebase/types.d.ts +23 -3
  32. package/dist/core/rebase/types.d.ts.map +1 -1
  33. package/dist/core/rebase/types.js +30 -16
  34. package/dist/core/rebase/types.js.map +1 -1
  35. package/dist/core/schema-stored/formatV1.d.ts +2 -2
  36. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  37. package/dist/core/schema-stored/formatV1.js +0 -5
  38. package/dist/core/schema-stored/formatV1.js.map +1 -1
  39. package/dist/core/schema-stored/formatV2.d.ts +11 -10
  40. package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
  41. package/dist/core/schema-stored/formatV2.js +1 -6
  42. package/dist/core/schema-stored/formatV2.js.map +1 -1
  43. package/dist/core/schema-stored/index.d.ts.map +1 -1
  44. package/dist/core/schema-stored/index.js.map +1 -1
  45. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  46. package/dist/core/schema-stored/schema.js.map +1 -1
  47. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  48. package/dist/core/tree/anchorSet.js.map +1 -1
  49. package/dist/core/tree/delta.d.ts +9 -7
  50. package/dist/core/tree/delta.d.ts.map +1 -1
  51. package/dist/core/tree/delta.js.map +1 -1
  52. package/dist/core/tree/deltaUtil.js +1 -1
  53. package/dist/core/tree/deltaUtil.js.map +1 -1
  54. package/dist/core/tree/visitDelta.js +2 -2
  55. package/dist/core/tree/visitDelta.js.map +1 -1
  56. package/dist/extensibleSchemaUnion.d.ts +72 -0
  57. package/dist/extensibleSchemaUnion.d.ts.map +1 -0
  58. package/dist/extensibleSchemaUnion.js +79 -0
  59. package/dist/extensibleSchemaUnion.js.map +1 -0
  60. package/dist/feature-libraries/changeAtomIdBTree.d.ts +4 -2
  61. package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  62. package/dist/feature-libraries/changeAtomIdBTree.js +9 -1
  63. package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
  64. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -3
  65. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  66. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +20 -21
  67. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  68. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  69. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  70. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  71. package/dist/feature-libraries/forest-summary/codec.d.ts +2 -1
  72. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  73. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  74. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  75. package/dist/feature-libraries/forest-summary/forestSummarizer.js +5 -2
  76. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  77. package/dist/feature-libraries/forest-summary/formatCommon.d.ts +1 -39
  78. package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  79. package/dist/feature-libraries/forest-summary/formatCommon.js +1 -2
  80. package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  81. package/dist/feature-libraries/forest-summary/formatV1.d.ts +1 -39
  82. package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
  83. package/dist/feature-libraries/forest-summary/formatV2.d.ts +1 -39
  84. package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
  85. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +1 -1
  86. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  87. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +1 -1
  88. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  89. package/dist/feature-libraries/index.d.ts +3 -3
  90. package/dist/feature-libraries/index.d.ts.map +1 -1
  91. package/dist/feature-libraries/index.js +4 -3
  92. package/dist/feature-libraries/index.js.map +1 -1
  93. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts +2 -2
  94. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts.map +1 -1
  95. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js +42 -22
  96. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
  97. package/dist/feature-libraries/modular-schema/genericFieldKind.js +1 -1
  98. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  99. package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
  100. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  101. package/dist/feature-libraries/modular-schema/index.js +2 -1
  102. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  103. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +1 -1
  104. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  105. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +9 -5
  106. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  107. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +11 -1
  108. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  109. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +30 -7
  110. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  111. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  112. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +38 -27
  113. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  114. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +10 -127
  115. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  116. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js +2 -4
  117. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  118. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +3 -79
  119. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  120. package/dist/feature-libraries/optional-field/optionalField.js +1 -1
  121. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  122. package/dist/feature-libraries/optional-field/requiredField.d.ts.map +1 -1
  123. package/dist/feature-libraries/optional-field/requiredField.js.map +1 -1
  124. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  125. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  126. package/dist/feature-libraries/schema-index/formatV2.d.ts +4 -4
  127. package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -1
  128. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  129. package/dist/feature-libraries/sequence-field/invert.js +2 -2
  130. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  131. package/dist/feature-libraries/sequence-field/replaceRevisions.js +16 -16
  132. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  133. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +1 -1
  134. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  135. package/dist/index.d.ts +5 -5
  136. package/dist/index.d.ts.map +1 -1
  137. package/dist/index.js +4 -1
  138. package/dist/index.js.map +1 -1
  139. package/dist/legacy.d.ts +3 -0
  140. package/dist/packageVersion.d.ts +1 -1
  141. package/dist/packageVersion.js +1 -1
  142. package/dist/packageVersion.js.map +1 -1
  143. package/dist/shared-tree/independentView.d.ts +36 -13
  144. package/dist/shared-tree/independentView.d.ts.map +1 -1
  145. package/dist/shared-tree/independentView.js +1 -0
  146. package/dist/shared-tree/independentView.js.map +1 -1
  147. package/dist/shared-tree/index.d.ts +1 -1
  148. package/dist/shared-tree/index.d.ts.map +1 -1
  149. package/dist/shared-tree/index.js.map +1 -1
  150. package/dist/shared-tree/schematizingTreeView.d.ts +10 -0
  151. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  152. package/dist/shared-tree/schematizingTreeView.js +25 -9
  153. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  154. package/dist/shared-tree/sharedTree.d.ts +3 -3
  155. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  156. package/dist/shared-tree/sharedTree.js +8 -32
  157. package/dist/shared-tree/sharedTree.js.map +1 -1
  158. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +11 -3
  159. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  160. package/dist/shared-tree/sharedTreeChangeCodecs.js +38 -4
  161. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  162. package/dist/shared-tree/sharedTreeChangeFormat.d.ts +4 -4
  163. package/dist/shared-tree/tree.js +1 -1
  164. package/dist/shared-tree/tree.js.map +1 -1
  165. package/dist/shared-tree/treeCheckout.d.ts +20 -0
  166. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  167. package/dist/shared-tree/treeCheckout.js +39 -3
  168. package/dist/shared-tree/treeCheckout.js.map +1 -1
  169. package/dist/shared-tree-core/editManagerSummarizer.js +1 -1
  170. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  171. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  172. package/dist/shared-tree-core/messageCodecV1ToV4.js +2 -2
  173. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  174. package/dist/shared-tree-core/transaction.d.ts +14 -3
  175. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  176. package/dist/shared-tree-core/transaction.js +59 -16
  177. package/dist/shared-tree-core/transaction.js.map +1 -1
  178. package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  179. package/dist/shared-tree-core/versionedSummarizer.js +1 -1
  180. package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
  181. package/dist/simple-tree/api/index.d.ts +1 -1
  182. package/dist/simple-tree/api/index.d.ts.map +1 -1
  183. package/dist/simple-tree/api/index.js +3 -2
  184. package/dist/simple-tree/api/index.js.map +1 -1
  185. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +9 -0
  186. package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  187. package/dist/simple-tree/api/schemaCreationUtilities.js +16 -1
  188. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  189. package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
  190. package/dist/simple-tree/api/transactionTypes.d.ts +10 -0
  191. package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
  192. package/dist/simple-tree/api/transactionTypes.js.map +1 -1
  193. package/dist/simple-tree/api/tree.d.ts +81 -6
  194. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  195. package/dist/simple-tree/api/tree.js.map +1 -1
  196. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  197. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  198. package/dist/simple-tree/index.d.ts +2 -2
  199. package/dist/simple-tree/index.d.ts.map +1 -1
  200. package/dist/simple-tree/index.js +4 -2
  201. package/dist/simple-tree/index.js.map +1 -1
  202. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  203. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  204. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +63 -0
  205. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  206. package/dist/simple-tree/node-kinds/array/arrayNode.js +43 -1
  207. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  208. package/dist/simple-tree/node-kinds/array/index.d.ts +1 -1
  209. package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -1
  210. package/dist/simple-tree/node-kinds/array/index.js +2 -1
  211. package/dist/simple-tree/node-kinds/array/index.js.map +1 -1
  212. package/dist/simple-tree/node-kinds/index.d.ts +1 -1
  213. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -1
  214. package/dist/simple-tree/node-kinds/index.js +2 -1
  215. package/dist/simple-tree/node-kinds/index.js.map +1 -1
  216. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  217. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  218. package/dist/tableSchema.d.ts +71 -48
  219. package/dist/tableSchema.d.ts.map +1 -1
  220. package/dist/tableSchema.js +200 -98
  221. package/dist/tableSchema.js.map +1 -1
  222. package/dist/text/textDomainFormatted.js +1 -1
  223. package/dist/text/textDomainFormatted.js.map +1 -1
  224. package/dist/util/bTreeUtils.d.ts +30 -4
  225. package/dist/util/bTreeUtils.d.ts.map +1 -1
  226. package/dist/util/bTreeUtils.js +29 -17
  227. package/dist/util/bTreeUtils.js.map +1 -1
  228. package/dist/util/brand.d.ts.map +1 -1
  229. package/dist/util/brand.js.map +1 -1
  230. package/dist/util/brandedMap.d.ts.map +1 -1
  231. package/dist/util/brandedMap.js.map +1 -1
  232. package/dist/util/breakable.d.ts.map +1 -1
  233. package/dist/util/breakable.js +2 -1
  234. package/dist/util/breakable.js.map +1 -1
  235. package/dist/util/index.d.ts +2 -2
  236. package/dist/util/index.d.ts.map +1 -1
  237. package/dist/util/index.js +6 -3
  238. package/dist/util/index.js.map +1 -1
  239. package/dist/util/opaque.d.ts.map +1 -1
  240. package/dist/util/opaque.js.map +1 -1
  241. package/dist/util/rangeMap.d.ts +3 -2
  242. package/dist/util/rangeMap.d.ts.map +1 -1
  243. package/dist/util/rangeMap.js +7 -1
  244. package/dist/util/rangeMap.js.map +1 -1
  245. package/dist/util/readSnapshotBlob.d.ts +1 -1
  246. package/dist/util/readSnapshotBlob.d.ts.map +1 -1
  247. package/dist/util/readSnapshotBlob.js.map +1 -1
  248. package/dist/util/typeCheck.d.ts.map +1 -1
  249. package/dist/util/typeCheck.js.map +1 -1
  250. package/dist/util/utils.d.ts +20 -16
  251. package/dist/util/utils.d.ts.map +1 -1
  252. package/dist/util/utils.js +49 -17
  253. package/dist/util/utils.js.map +1 -1
  254. package/eslint.config.mts +0 -9
  255. package/lib/alpha.d.ts +8 -2
  256. package/lib/beta.d.ts +3 -0
  257. package/lib/codec/codec.d.ts +17 -8
  258. package/lib/codec/codec.d.ts.map +1 -1
  259. package/lib/codec/codec.js +6 -0
  260. package/lib/codec/codec.js.map +1 -1
  261. package/lib/codec/index.d.ts +1 -1
  262. package/lib/codec/index.d.ts.map +1 -1
  263. package/lib/codec/index.js +1 -1
  264. package/lib/codec/index.js.map +1 -1
  265. package/lib/codec/versioned/codec.d.ts +1 -1
  266. package/lib/codec/versioned/codec.d.ts.map +1 -1
  267. package/lib/codec/versioned/codec.js.map +1 -1
  268. package/lib/core/index.d.ts +1 -1
  269. package/lib/core/index.d.ts.map +1 -1
  270. package/lib/core/index.js +1 -1
  271. package/lib/core/index.js.map +1 -1
  272. package/lib/core/rebase/changeRebaser.d.ts +3 -2
  273. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  274. package/lib/core/rebase/changeRebaser.js.map +1 -1
  275. package/lib/core/rebase/index.d.ts +1 -1
  276. package/lib/core/rebase/index.d.ts.map +1 -1
  277. package/lib/core/rebase/index.js +1 -1
  278. package/lib/core/rebase/index.js.map +1 -1
  279. package/lib/core/rebase/types.d.ts +23 -3
  280. package/lib/core/rebase/types.d.ts.map +1 -1
  281. package/lib/core/rebase/types.js +27 -15
  282. package/lib/core/rebase/types.js.map +1 -1
  283. package/lib/core/schema-stored/formatV1.d.ts +2 -2
  284. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  285. package/lib/core/schema-stored/formatV1.js +0 -5
  286. package/lib/core/schema-stored/formatV1.js.map +1 -1
  287. package/lib/core/schema-stored/formatV2.d.ts +11 -10
  288. package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
  289. package/lib/core/schema-stored/formatV2.js +1 -6
  290. package/lib/core/schema-stored/formatV2.js.map +1 -1
  291. package/lib/core/schema-stored/index.d.ts.map +1 -1
  292. package/lib/core/schema-stored/index.js +2 -0
  293. package/lib/core/schema-stored/index.js.map +1 -1
  294. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  295. package/lib/core/schema-stored/schema.js.map +1 -1
  296. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  297. package/lib/core/tree/anchorSet.js.map +1 -1
  298. package/lib/core/tree/delta.d.ts +9 -7
  299. package/lib/core/tree/delta.d.ts.map +1 -1
  300. package/lib/core/tree/delta.js.map +1 -1
  301. package/lib/core/tree/deltaUtil.js +1 -1
  302. package/lib/core/tree/deltaUtil.js.map +1 -1
  303. package/lib/core/tree/visitDelta.js +2 -2
  304. package/lib/core/tree/visitDelta.js.map +1 -1
  305. package/lib/extensibleSchemaUnion.d.ts +72 -0
  306. package/lib/extensibleSchemaUnion.d.ts.map +1 -0
  307. package/lib/extensibleSchemaUnion.js +76 -0
  308. package/lib/extensibleSchemaUnion.js.map +1 -0
  309. package/lib/feature-libraries/changeAtomIdBTree.d.ts +4 -2
  310. package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  311. package/lib/feature-libraries/changeAtomIdBTree.js +7 -0
  312. package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
  313. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -3
  314. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  315. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +4 -5
  316. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  317. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  318. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  319. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  320. package/lib/feature-libraries/forest-summary/codec.d.ts +2 -1
  321. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  322. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  323. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  324. package/lib/feature-libraries/forest-summary/forestSummarizer.js +6 -3
  325. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  326. package/lib/feature-libraries/forest-summary/formatCommon.d.ts +1 -39
  327. package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  328. package/lib/feature-libraries/forest-summary/formatCommon.js +2 -3
  329. package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  330. package/lib/feature-libraries/forest-summary/formatV1.d.ts +1 -39
  331. package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
  332. package/lib/feature-libraries/forest-summary/formatV2.d.ts +1 -39
  333. package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
  334. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +1 -1
  335. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  336. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +1 -1
  337. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  338. package/lib/feature-libraries/index.d.ts +3 -3
  339. package/lib/feature-libraries/index.d.ts.map +1 -1
  340. package/lib/feature-libraries/index.js +3 -3
  341. package/lib/feature-libraries/index.js.map +1 -1
  342. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts +2 -2
  343. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts.map +1 -1
  344. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js +41 -21
  345. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
  346. package/lib/feature-libraries/modular-schema/genericFieldKind.js +1 -1
  347. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  348. package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
  349. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  350. package/lib/feature-libraries/modular-schema/index.js +1 -1
  351. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  352. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +1 -1
  353. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  354. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +10 -6
  355. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  356. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +11 -1
  357. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  358. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +29 -6
  359. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  360. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  361. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +41 -30
  362. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  363. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +10 -127
  364. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  365. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js +2 -4
  366. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  367. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +3 -79
  368. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  369. package/lib/feature-libraries/optional-field/optionalField.js +1 -1
  370. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  371. package/lib/feature-libraries/optional-field/requiredField.d.ts.map +1 -1
  372. package/lib/feature-libraries/optional-field/requiredField.js.map +1 -1
  373. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  374. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  375. package/lib/feature-libraries/schema-index/formatV2.d.ts +4 -4
  376. package/lib/feature-libraries/schema-index/schemaSummarizer.js +1 -1
  377. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  378. package/lib/feature-libraries/sequence-field/invert.js +2 -2
  379. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  380. package/lib/feature-libraries/sequence-field/replaceRevisions.js +16 -16
  381. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  382. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +1 -1
  383. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  384. package/lib/index.d.ts +5 -5
  385. package/lib/index.d.ts.map +1 -1
  386. package/lib/index.js +4 -3
  387. package/lib/index.js.map +1 -1
  388. package/lib/legacy.d.ts +3 -0
  389. package/lib/packageVersion.d.ts +1 -1
  390. package/lib/packageVersion.js +1 -1
  391. package/lib/packageVersion.js.map +1 -1
  392. package/lib/shared-tree/independentView.d.ts +36 -13
  393. package/lib/shared-tree/independentView.d.ts.map +1 -1
  394. package/lib/shared-tree/independentView.js +1 -0
  395. package/lib/shared-tree/independentView.js.map +1 -1
  396. package/lib/shared-tree/index.d.ts +1 -1
  397. package/lib/shared-tree/index.d.ts.map +1 -1
  398. package/lib/shared-tree/index.js.map +1 -1
  399. package/lib/shared-tree/schematizingTreeView.d.ts +10 -0
  400. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  401. package/lib/shared-tree/schematizingTreeView.js +25 -9
  402. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  403. package/lib/shared-tree/sharedTree.d.ts +3 -3
  404. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  405. package/lib/shared-tree/sharedTree.js +10 -34
  406. package/lib/shared-tree/sharedTree.js.map +1 -1
  407. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +11 -3
  408. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  409. package/lib/shared-tree/sharedTreeChangeCodecs.js +39 -5
  410. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  411. package/lib/shared-tree/sharedTreeChangeFormat.d.ts +4 -4
  412. package/lib/shared-tree/tree.js +1 -1
  413. package/lib/shared-tree/tree.js.map +1 -1
  414. package/lib/shared-tree/treeCheckout.d.ts +20 -0
  415. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  416. package/lib/shared-tree/treeCheckout.js +39 -3
  417. package/lib/shared-tree/treeCheckout.js.map +1 -1
  418. package/lib/shared-tree-core/editManagerSummarizer.js +1 -1
  419. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  420. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  421. package/lib/shared-tree-core/messageCodecV1ToV4.js +2 -2
  422. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  423. package/lib/shared-tree-core/transaction.d.ts +14 -3
  424. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  425. package/lib/shared-tree-core/transaction.js +61 -18
  426. package/lib/shared-tree-core/transaction.js.map +1 -1
  427. package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  428. package/lib/shared-tree-core/versionedSummarizer.js +1 -1
  429. package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
  430. package/lib/simple-tree/api/index.d.ts +1 -1
  431. package/lib/simple-tree/api/index.d.ts.map +1 -1
  432. package/lib/simple-tree/api/index.js +1 -1
  433. package/lib/simple-tree/api/index.js.map +1 -1
  434. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +9 -0
  435. package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  436. package/lib/simple-tree/api/schemaCreationUtilities.js +14 -0
  437. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  438. package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
  439. package/lib/simple-tree/api/transactionTypes.d.ts +10 -0
  440. package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
  441. package/lib/simple-tree/api/transactionTypes.js.map +1 -1
  442. package/lib/simple-tree/api/tree.d.ts +81 -6
  443. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  444. package/lib/simple-tree/api/tree.js.map +1 -1
  445. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  446. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  447. package/lib/simple-tree/index.d.ts +2 -2
  448. package/lib/simple-tree/index.d.ts.map +1 -1
  449. package/lib/simple-tree/index.js +2 -2
  450. package/lib/simple-tree/index.js.map +1 -1
  451. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  452. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  453. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +63 -0
  454. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  455. package/lib/simple-tree/node-kinds/array/arrayNode.js +41 -0
  456. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  457. package/lib/simple-tree/node-kinds/array/index.d.ts +1 -1
  458. package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -1
  459. package/lib/simple-tree/node-kinds/array/index.js +1 -1
  460. package/lib/simple-tree/node-kinds/array/index.js.map +1 -1
  461. package/lib/simple-tree/node-kinds/index.d.ts +1 -1
  462. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -1
  463. package/lib/simple-tree/node-kinds/index.js +1 -1
  464. package/lib/simple-tree/node-kinds/index.js.map +1 -1
  465. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  466. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  467. package/lib/tableSchema.d.ts +71 -48
  468. package/lib/tableSchema.d.ts.map +1 -1
  469. package/lib/tableSchema.js +201 -99
  470. package/lib/tableSchema.js.map +1 -1
  471. package/lib/text/textDomainFormatted.js +1 -1
  472. package/lib/text/textDomainFormatted.js.map +1 -1
  473. package/lib/util/bTreeUtils.d.ts +30 -4
  474. package/lib/util/bTreeUtils.d.ts.map +1 -1
  475. package/lib/util/bTreeUtils.js +27 -16
  476. package/lib/util/bTreeUtils.js.map +1 -1
  477. package/lib/util/brand.d.ts.map +1 -1
  478. package/lib/util/brand.js.map +1 -1
  479. package/lib/util/brandedMap.d.ts.map +1 -1
  480. package/lib/util/brandedMap.js.map +1 -1
  481. package/lib/util/breakable.d.ts.map +1 -1
  482. package/lib/util/breakable.js +2 -1
  483. package/lib/util/breakable.js.map +1 -1
  484. package/lib/util/index.d.ts +2 -2
  485. package/lib/util/index.d.ts.map +1 -1
  486. package/lib/util/index.js +2 -2
  487. package/lib/util/index.js.map +1 -1
  488. package/lib/util/opaque.d.ts.map +1 -1
  489. package/lib/util/opaque.js.map +1 -1
  490. package/lib/util/rangeMap.d.ts +3 -2
  491. package/lib/util/rangeMap.d.ts.map +1 -1
  492. package/lib/util/rangeMap.js +7 -1
  493. package/lib/util/rangeMap.js.map +1 -1
  494. package/lib/util/readSnapshotBlob.d.ts +1 -1
  495. package/lib/util/readSnapshotBlob.d.ts.map +1 -1
  496. package/lib/util/readSnapshotBlob.js.map +1 -1
  497. package/lib/util/typeCheck.d.ts.map +1 -1
  498. package/lib/util/typeCheck.js.map +1 -1
  499. package/lib/util/utils.d.ts +20 -16
  500. package/lib/util/utils.d.ts.map +1 -1
  501. package/lib/util/utils.js +44 -15
  502. package/lib/util/utils.js.map +1 -1
  503. package/package.json +22 -22
  504. package/src/codec/codec.ts +30 -11
  505. package/src/codec/index.ts +2 -0
  506. package/src/codec/versioned/codec.ts +9 -13
  507. package/src/core/index.ts +3 -1
  508. package/src/core/rebase/changeRebaser.ts +3 -2
  509. package/src/core/rebase/index.ts +3 -1
  510. package/src/core/rebase/types.ts +51 -13
  511. package/src/core/schema-stored/formatV1.ts +2 -4
  512. package/src/core/schema-stored/formatV2.ts +9 -7
  513. package/src/core/schema-stored/index.ts +2 -0
  514. package/src/core/schema-stored/schema.ts +4 -1
  515. package/src/core/tree/anchorSet.ts +1 -3
  516. package/src/core/tree/delta.ts +9 -7
  517. package/src/core/tree/deltaUtil.ts +1 -1
  518. package/src/core/tree/visitDelta.ts +2 -2
  519. package/src/extensibleSchemaUnion.ts +135 -0
  520. package/src/feature-libraries/changeAtomIdBTree.ts +17 -2
  521. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +5 -6
  522. package/src/feature-libraries/default-schema/index.ts +0 -1
  523. package/src/feature-libraries/forest-summary/codec.ts +7 -2
  524. package/src/feature-libraries/forest-summary/forestSummarizer.ts +15 -3
  525. package/src/feature-libraries/forest-summary/formatCommon.ts +2 -3
  526. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +4 -5
  527. package/src/feature-libraries/index.ts +3 -2
  528. package/src/feature-libraries/modular-schema/defaultRevisionReplacer.ts +57 -31
  529. package/src/feature-libraries/modular-schema/genericFieldKind.ts +1 -1
  530. package/src/feature-libraries/modular-schema/index.ts +4 -1
  531. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +7 -6
  532. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +32 -7
  533. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +54 -33
  534. package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +2 -4
  535. package/src/feature-libraries/optional-field/optionalField.ts +1 -1
  536. package/src/feature-libraries/optional-field/requiredField.ts +2 -4
  537. package/src/feature-libraries/schema-index/codec.ts +1 -1
  538. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -1
  539. package/src/feature-libraries/sequence-field/invert.ts +2 -2
  540. package/src/feature-libraries/sequence-field/replaceRevisions.ts +17 -10
  541. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +1 -1
  542. package/src/index.ts +12 -7
  543. package/src/packageVersion.ts +1 -1
  544. package/src/shared-tree/independentView.ts +42 -6
  545. package/src/shared-tree/index.ts +2 -0
  546. package/src/shared-tree/schematizingTreeView.ts +63 -18
  547. package/src/shared-tree/sharedTree.ts +19 -37
  548. package/src/shared-tree/sharedTreeChangeCodecs.ts +43 -9
  549. package/src/shared-tree/tree.ts +1 -1
  550. package/src/shared-tree/treeCheckout.ts +50 -3
  551. package/src/shared-tree-core/editManagerSummarizer.ts +1 -1
  552. package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -3
  553. package/src/shared-tree-core/transaction.ts +125 -23
  554. package/src/shared-tree-core/versionedSummarizer.ts +3 -2
  555. package/src/simple-tree/api/index.ts +1 -0
  556. package/src/simple-tree/api/schemaCreationUtilities.ts +35 -5
  557. package/src/simple-tree/api/simpleTreeIndex.ts +1 -1
  558. package/src/simple-tree/api/transactionTypes.ts +10 -0
  559. package/src/simple-tree/api/tree.ts +88 -6
  560. package/src/simple-tree/core/treeNodeSchema.ts +5 -8
  561. package/src/simple-tree/index.ts +3 -0
  562. package/src/simple-tree/leafNodeSchema.ts +3 -2
  563. package/src/simple-tree/node-kinds/array/arrayNode.ts +86 -0
  564. package/src/simple-tree/node-kinds/array/index.ts +2 -0
  565. package/src/simple-tree/node-kinds/index.ts +2 -0
  566. package/src/simple-tree/node-kinds/object/objectNode.ts +19 -18
  567. package/src/tableSchema.ts +280 -140
  568. package/src/text/textDomainFormatted.ts +1 -1
  569. package/src/util/bTreeUtils.ts +45 -26
  570. package/src/util/brand.ts +4 -12
  571. package/src/util/brandedMap.ts +2 -6
  572. package/src/util/breakable.ts +3 -2
  573. package/src/util/index.ts +9 -3
  574. package/src/util/opaque.ts +2 -6
  575. package/src/util/rangeMap.ts +11 -5
  576. package/src/util/readSnapshotBlob.ts +3 -3
  577. package/src/util/typeCheck.ts +11 -9
  578. package/src/util/utils.ts +57 -28
  579. package/biome.jsonc +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,QAAQ,EACb,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,mBAAmB,EACnB,KAA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EpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EACN,KAAK,YAAY,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EACN,KAAK,SAAS,EACd,eAAe,EACf,UAAU,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,KAAK,iBAAiB,EACtB,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,QAAQ,EACb,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,mBAAmB,EACnB,KAAK,aAAa,EAClB,UAAU,EACV,eAAe,EACf,KAAK,cAAc,EACnB,oBAAoB,GACpB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A4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EACN,KAAK,YAAY,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EACN,KAAK,SAAS,EACd,eAAe,EACf,UAAU,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,KAAK,iBAAiB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,wBAAwB,CAAC"}
@@ -27,8 +27,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
27
27
  return result;
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.makeFieldBatchCodec = exports.makeTreeChunker = exports.getCodecTreeForFieldBatchFormat = exports.FieldBatchFormatVersion = exports.defaultChunkPolicy = exports.buildChunkedForest = exports.chunkFieldSingle = exports.chunkField = exports.chunkTree = exports.mapRootChanges = exports.DefaultRevisionReplacer = exports.isNeverTree = exports.updateRefreshers = exports.EncodedModularChangesetV2 = exports.EncodedModularChangesetV1 = exports.ModularChangeFamily = exports.genericFieldKind = exports.allowsRepoSuperset = exports.FlexFieldKind = exports.CrossFieldTarget = exports.makeModularChangeCodecFamily = exports.ModularEditBuilder = exports.isNeverField = exports.SequenceField = exports.jsonableTreeFromForest = exports.jsonableTreeFromFieldCursor = exports.jsonableTreeFromCursor = exports.cursorForJsonableTreeField = exports.cursorForJsonableTreeNode = exports.stackTreeFieldCursor = exports.prefixFieldPath = exports.prefixPath = exports.stackTreeNodeCursor = exports.schemaCodecBuilder = exports.makeSchemaCodec = exports.SchemaSummarizer = exports.buildForest = exports.mapTreeWithField = exports.mapTreeFieldsWithField = exports.mapTreeFieldFromCursor = exports.mapTreeFromCursor = exports.cursorForMapTreeNode = exports.cursorForMapTreeField = exports.ForestFormatVersion = exports.getCodecTreeForForestFormat = exports.ForestSummarizer = exports.isTreeValue = exports.assertAllowedValue = exports.allowsValue = exports.toDownPath = void 0;
31
- exports.setInChangeAtomIdMap = exports.getFromChangeAtomIdMap = exports.hasElement = exports.AnchorTreeIndex = exports.makeMitigatedChangeFamily = exports.getCodecTreeForSchemaChangeFormat = exports.EncodedSchemaChange = exports.makeSchemaChangeCodecs = exports.DetachedFieldIndexSummarizer = exports.valueSchemaAllows = exports.TreeCompressionStrategy = exports.withObservation = exports.currentObserver = exports.getOrCreateHydratedFlexTreeNode = exports.FlexTreeEntityKind = exports.indexForAt = exports.treeStatusFromAnchorCache = exports.LazyEntity = exports.getSchemaAndPolicy = exports.flexTreeSlot = exports.assertFlexTreeEntityNotFreed = exports.flexTreeMarker = exports.ContextSlot = exports.isFlexTreeNode = exports.Context = exports.TreeStatus = exports.throwOutOfSchema = exports.isFieldInSchema = exports.isNodeInSchema = exports.SchemaValidationError = exports.getCodecTreeForModularChangeFormat = exports.relevantRemovedRoots = exports.intoDelta = exports.fieldKindConfigurations = exports.fieldKinds = exports.defaultSchemaPolicy = exports.DefaultEditBuilder = exports.DefaultChangeFamily = exports.FieldKinds = exports.nodeKeyTreeIdentifier = exports.MockNodeIdentifierManager = exports.isStableNodeIdentifier = exports.createNodeIdentifierManager = exports.compareLocalNodeIdentifiers = exports.defaultIncrementalEncodingPolicy = exports.combineChunks = exports.emptyChunk = void 0;
30
+ exports.makeTreeChunker = exports.getCodecTreeForFieldBatchFormat = exports.FieldBatchFormatVersion = exports.defaultChunkPolicy = exports.buildChunkedForest = exports.chunkFieldSingle = exports.chunkField = exports.chunkTree = exports.mapRootChanges = exports.ModularChangeFormatVersion = exports.DefaultRevisionReplacer = exports.isNeverTree = exports.updateRefreshers = exports.EncodedModularChangesetV2 = exports.EncodedModularChangesetV1 = exports.ModularChangeFamily = exports.genericFieldKind = exports.allowsRepoSuperset = exports.FlexFieldKind = exports.CrossFieldTarget = exports.makeModularChangeCodecFamily = exports.ModularEditBuilder = exports.isNeverField = exports.SequenceField = exports.jsonableTreeFromForest = exports.jsonableTreeFromFieldCursor = exports.jsonableTreeFromCursor = exports.cursorForJsonableTreeField = exports.cursorForJsonableTreeNode = exports.stackTreeFieldCursor = exports.prefixFieldPath = exports.prefixPath = exports.stackTreeNodeCursor = exports.schemaCodecBuilder = exports.makeSchemaCodec = exports.SchemaSummarizer = exports.buildForest = exports.mapTreeWithField = exports.mapTreeFieldsWithField = exports.mapTreeFieldFromCursor = exports.mapTreeFromCursor = exports.cursorForMapTreeNode = exports.cursorForMapTreeField = exports.ForestFormatVersion = exports.getCodecTreeForForestFormat = exports.ForestSummarizer = exports.isTreeValue = exports.assertAllowedValue = exports.allowsValue = exports.toDownPath = void 0;
31
+ exports.setInChangeAtomIdMap = exports.getFromChangeAtomIdMap = exports.newChangeAtomIdBTree = exports.hasElement = exports.AnchorTreeIndex = exports.makeMitigatedChangeFamily = exports.getCodecTreeForSchemaChangeFormat = exports.EncodedSchemaChange = exports.makeSchemaChangeCodecs = exports.DetachedFieldIndexSummarizer = exports.valueSchemaAllows = exports.TreeCompressionStrategy = exports.withObservation = exports.currentObserver = exports.getOrCreateHydratedFlexTreeNode = exports.FlexTreeEntityKind = exports.indexForAt = exports.treeStatusFromAnchorCache = exports.LazyEntity = exports.getSchemaAndPolicy = exports.flexTreeSlot = exports.assertFlexTreeEntityNotFreed = exports.flexTreeMarker = exports.ContextSlot = exports.isFlexTreeNode = exports.Context = exports.TreeStatus = exports.throwOutOfSchema = exports.isFieldInSchema = exports.isNodeInSchema = exports.SchemaValidationError = exports.getCodecTreeForModularChangeFormat = exports.relevantRemovedRoots = exports.intoDelta = exports.fieldKindConfigurations = exports.fieldKinds = exports.defaultSchemaPolicy = exports.DefaultEditBuilder = exports.DefaultChangeFamily = exports.FieldKinds = exports.nodeKeyTreeIdentifier = exports.MockNodeIdentifierManager = exports.isStableNodeIdentifier = exports.createNodeIdentifierManager = exports.compareLocalNodeIdentifiers = exports.defaultIncrementalEncodingPolicy = exports.combineChunks = exports.emptyChunk = exports.makeFieldBatchCodec = void 0;
32
32
  var editableTreeBinder_js_1 = require("./editableTreeBinder.js");
33
33
  Object.defineProperty(exports, "toDownPath", { enumerable: true, get: function () { return editableTreeBinder_js_1.toDownPath; } });
34
34
  var valueUtilities_js_1 = require("./valueUtilities.js");
@@ -63,7 +63,6 @@ Object.defineProperty(exports, "cursorForJsonableTreeField", { enumerable: true,
63
63
  Object.defineProperty(exports, "jsonableTreeFromCursor", { enumerable: true, get: function () { return treeTextCursor_js_1.jsonableTreeFromCursor; } });
64
64
  Object.defineProperty(exports, "jsonableTreeFromFieldCursor", { enumerable: true, get: function () { return treeTextCursor_js_1.jsonableTreeFromFieldCursor; } });
65
65
  Object.defineProperty(exports, "jsonableTreeFromForest", { enumerable: true, get: function () { return treeTextCursor_js_1.jsonableTreeFromForest; } });
66
- // Split this up into separate import and export for compatibility with API-Extractor.
67
66
  const SequenceField = __importStar(require("./sequence-field/index.js"));
68
67
  exports.SequenceField = SequenceField;
69
68
  var index_js_4 = require("./modular-schema/index.js");
@@ -80,6 +79,7 @@ Object.defineProperty(exports, "EncodedModularChangesetV2", { enumerable: true,
80
79
  Object.defineProperty(exports, "updateRefreshers", { enumerable: true, get: function () { return index_js_4.updateRefreshers; } });
81
80
  Object.defineProperty(exports, "isNeverTree", { enumerable: true, get: function () { return index_js_4.isNeverTree; } });
82
81
  Object.defineProperty(exports, "DefaultRevisionReplacer", { enumerable: true, get: function () { return index_js_4.DefaultRevisionReplacer; } });
82
+ Object.defineProperty(exports, "ModularChangeFormatVersion", { enumerable: true, get: function () { return index_js_4.ModularChangeFormatVersion; } });
83
83
  var deltaUtils_js_1 = require("./deltaUtils.js");
84
84
  Object.defineProperty(exports, "mapRootChanges", { enumerable: true, get: function () { return deltaUtils_js_1.mapRootChanges; } });
85
85
  var index_js_5 = require("./chunked-forest/index.js");
@@ -149,6 +149,7 @@ var index_js_10 = require("./indexing/index.js");
149
149
  Object.defineProperty(exports, "AnchorTreeIndex", { enumerable: true, get: function () { return index_js_10.AnchorTreeIndex; } });
150
150
  Object.defineProperty(exports, "hasElement", { enumerable: true, get: function () { return index_js_10.hasElement; } });
151
151
  var changeAtomIdBTree_js_1 = require("./changeAtomIdBTree.js");
152
+ Object.defineProperty(exports, "newChangeAtomIdBTree", { enumerable: true, get: function () { return changeAtomIdBTree_js_1.newChangeAtomIdBTree; } });
152
153
  Object.defineProperty(exports, "getFromChangeAtomIdMap", { enumerable: true, get: function () { return changeAtomIdBTree_js_1.getFromChangeAtomIdMap; } });
153
154
  Object.defineProperty(exports, "setInChangeAtomIdMap", { enumerable: true, get: function () { return changeAtomIdBTree_js_1.setInChangeAtomIdMap; } });
154
155
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iEAGiC;AADhC,mHAAA,UAAU,OAAA;AAEX,yDAAmF;AAA1E,gHAAA,WAAW,OAAA;AAAE,uHAAA,kBAAkB,OAAA;AAAE,gHAAA,WAAW,OAAA;AAErD,sDAImC;AAHlC,4GAAA,gBAAgB,OAAA;AAChB,uHAAA,2BAA2B,OAAA;AAC3B,+GAAA,mBAAmB,OAAA;AAEpB,uDAW4B;AAV3B,yHAAA,qBAAqB,OAAA;AACrB,wHAAA,oBAAoB,OAAA;AACpB,qHAAA,iBAAiB,OAAA;AACjB,0HAAA,sBAAsB,OAAA;AAEtB,0HAAA,sBAAsB,OAAA;AACtB,oHAAA,gBAAgB,OAAA;AAKjB,qDAAuD;AAA9C,uGAAA,WAAW,OAAA;AACpB,oDAIiC;AAHhC,4GAAA,gBAAgB,OAAA;AAChB,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAEnB,2DAO8B;AAN7B,yHAAA,mBAAmB,OAAA;AAEnB,gHAAA,UAAU,OAA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A;AACnB,8GAAA,kBAAkB,OAAA;AAKlB,+GAAA,mBAAmB,OAAA;AACnB,sGAAA,UAAU,OAAA;AACV,mHAAA,uBAAuB,OAAA;AACvB,qGAAA,SAAS,OAAA;AACT,gHAAA,oBAAoB,OAAA;AACpB,8HAAA,kCAAkC,OAAA;AAInC,uDAK4B;AAJ3B,yHAAA,qBAAqB,OAAA;AACrB,kHAAA,cAAc,OAAA;AACd,mHAAA,eAAe,OAAA;AACf,oHAAA,gBAAgB,OAAA;AAGjB,iDAiC8B;AAvB7B,sGAAA,UAAU,OAAA;AACV,mGAAA,OAAO,OAAA;AAGP,0GAAA,cAAc,OAAA;AACd,uGAAA,WAAW,OAAA;AACX,WAAW;AACX,0GAAA,cAAc,OAAA;AACd,wHAAA,4BAA4B,OAAA;AAC5B,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAClB,sGAAA,UAAU,OAAA;AACV,qHAAA,yBAAyB,OAAA;AACzB,sGAAA,UAAU,OAAA;AACV,8GAAA,kBAAkB,OAAA;AAKlB,2HAAA,+BAA+B,OAAA;AAC/B,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AAIhB,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAEhC,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAE1B,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AAErC,oDAKiC;AAHhC,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AACnB,6HAAA,iCAAiC,OAAA;AAGlC,uEAAuE;AAA9D,qIAAA,yBAAyB,OAAA;AAElC,iDAO6B;AAL5B,4GAAA,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA;AAMX,+DAIgC;AAF/B,8HAAA,sBAAsB,OAAA;AACtB,4HAAA,oBAAoB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport {\n\tForestSummarizer,\n\tgetCodecTreeForForestFormat,\n\tForestFormatVersion,\n} from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n\ttype MinimalMapTreeNodeView,\n\tmapTreeFieldsWithField,\n\tmapTreeWithField,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype MinimalFieldMap,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport {\n\tSchemaSummarizer,\n\tmakeSchemaCodec,\n\tschemaCodecBuilder,\n} from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\n// Split this up into separate import and export for compatibility with API-Extractor.\nimport * as SequenceField from \"./sequence-field/index.js\";\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tModularChangeFamily,\n\ttype RelevantRemovedRootsFromChild,\n\tEncodedModularChangesetV1,\n\tEncodedModularChangesetV2,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tisNeverTree,\n\tDefaultRevisionReplacer,\n} from \"./modular-schema/index.js\";\n\nexport { mapRootChanges } from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkField,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tFieldBatchFormatVersion,\n\tgetCodecTreeForFieldBatchFormat,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\temptyChunk,\n\tcombineChunks,\n\ttype IncrementalEncodingPolicy,\n\tdefaultIncrementalEncodingPolicy,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype DefaultChangeset,\n\tDefaultChangeFamily,\n\tDefaultEditBuilder,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tgetCodecTreeForModularChangeFormat,\n\ttype ModularChangeFormatVersion,\n} from \"./default-schema/index.js\";\n\nexport {\n\tSchemaValidationError,\n\tisNodeInSchema,\n\tisFieldInSchema,\n\tthrowOutOfSchema,\n} from \"./schemaChecker.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n\ttype FlexibleNodeContent,\n\ttype FlexibleFieldContent,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype HydratedFlexTreeNode,\n\tgetOrCreateHydratedFlexTreeNode,\n\tcurrentObserver,\n\twithObservation,\n\ttype Observer,\n} from \"./flex-tree/index.js\";\n\nexport { TreeCompressionStrategy } from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n\tgetCodecTreeForSchemaChangeFormat,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n\nexport {\n\ttype ChangeAtomIdBTree,\n\tgetFromChangeAtomIdMap,\n\tsetInChangeAtomIdMap,\n} from \"./changeAtomIdBTree.js\";\n"]}
1
+ {"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A;AAC5B,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAClB,sGAAA,UAAU,OAAA;AACV,qHAAA,yBAAyB,OAAA;AACzB,sGAAA,UAAU,OAAA;AACV,8GAAA,kBAAkB,OAAA;AAKlB,2HAAA,+BAA+B,OAAA;AAC/B,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AAIhB,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAEhC,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAE1B,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AAErC,oDAKiC;AAHhC,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AACnB,6HAAA,iCAAiC,OAAA;AAGlC,uEAAuE;AAA9D,qIAAA,yBAAyB,OAAA;AAElC,iDAO6B;AAL5B,4GAAA,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA;AAMX,+DAKgC;AAH/B,4HAAA,oBAAoB,OAAA;AACpB,8HAAA,sBAAsB,OAAA;AACtB,4HAAA,oBAAoB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport {\n\tForestSummarizer,\n\tgetCodecTreeForForestFormat,\n\tForestFormatVersion,\n} from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n\ttype MinimalMapTreeNodeView,\n\tmapTreeFieldsWithField,\n\tmapTreeWithField,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype MinimalFieldMap,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport {\n\tSchemaSummarizer,\n\tmakeSchemaCodec,\n\tschemaCodecBuilder,\n} from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\nimport * as SequenceField from \"./sequence-field/index.js\";\n// eslint-disable-next-line unicorn/prefer-export-from -- fixing requires `export * as` (breaks API-Extractor) or named exports (changes public API)\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tModularChangeFamily,\n\ttype RelevantRemovedRootsFromChild,\n\tEncodedModularChangesetV1,\n\tEncodedModularChangesetV2,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tisNeverTree,\n\tDefaultRevisionReplacer,\n\tModularChangeFormatVersion,\n} from \"./modular-schema/index.js\";\n\nexport { mapRootChanges } from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkField,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tFieldBatchFormatVersion,\n\tgetCodecTreeForFieldBatchFormat,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\temptyChunk,\n\tcombineChunks,\n\ttype IncrementalEncodingPolicy,\n\tdefaultIncrementalEncodingPolicy,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype DefaultChangeset,\n\tDefaultChangeFamily,\n\tDefaultEditBuilder,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tgetCodecTreeForModularChangeFormat,\n} from \"./default-schema/index.js\";\n\nexport {\n\tSchemaValidationError,\n\tisNodeInSchema,\n\tisFieldInSchema,\n\tthrowOutOfSchema,\n} from \"./schemaChecker.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n\ttype FlexibleNodeContent,\n\ttype FlexibleFieldContent,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype HydratedFlexTreeNode,\n\tgetOrCreateHydratedFlexTreeNode,\n\tcurrentObserver,\n\twithObservation,\n\ttype Observer,\n} from \"./flex-tree/index.js\";\n\nexport { TreeCompressionStrategy } from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n\tgetCodecTreeForSchemaChangeFormat,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n\nexport {\n\ttype ChangeAtomIdBTree,\n\tnewChangeAtomIdBTree,\n\tgetFromChangeAtomIdMap,\n\tsetInChangeAtomIdMap,\n} from \"./changeAtomIdBTree.js\";\n"]}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import type { ChangeAtomId, RevisionReplacer, RevisionTag } from "../../core/index.js";
5
+ import { type ChangeAtomId, type RevisionReplacer, type RevisionTag } from "../../core/index.js";
6
6
  export declare class DefaultRevisionReplacer implements RevisionReplacer {
7
7
  readonly updatedRevision: RevisionTag;
8
8
  private readonly obsoleteRevisions;
@@ -20,6 +20,6 @@ export declare class DefaultRevisionReplacer implements RevisionReplacer {
20
20
  private maxSeen;
21
21
  constructor(updatedRevision: RevisionTag, obsoleteRevisions: Set<RevisionTag | undefined>);
22
22
  isObsolete(revision: RevisionTag | undefined): boolean;
23
- getUpdatedAtomId<T extends ChangeAtomId>(id: T): T;
23
+ getUpdatedAtomId<T extends ChangeAtomId>(id: T, count?: number): T;
24
24
  }
25
25
  //# sourceMappingURL=defaultRevisionReplacer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultRevisionReplacer.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/defaultRevisionReplacer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,YAAY,EAEZ,gBAAgB,EAChB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAQ7B,qBAAa,uBAAwB,YAAW,gBAAgB;aAe9C,eAAe,EAAE,WAAW;IAC5C,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAfnC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAwD;IACxF;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoC;IAC7D;;OAEG;IACH,OAAO,CAAC,OAAO,CAAsC;gBAGpC,eAAe,EAAE,WAAW,EAC3B,iBAAiB,EAAE,GAAG,CAAC,WAAW,GAAG,SAAS,CAAC;IAG1D,UAAU,CAAC,QAAQ,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO;IAItD,gBAAgB,CAAC,CAAC,SAAS,YAAY,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC;CA4BzD"}
1
+ {"version":3,"file":"defaultRevisionReplacer.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/defaultRevisionReplacer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAGN,KAAK,YAAY,EAGjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,MAAM,qBAAqB,CAAC;AAY7B,qBAAa,uBAAwB,YAAW,gBAAgB;aAgB9C,eAAe,EAAE,WAAW;IAC5C,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAhBnC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,eAAe,CACiB;IACjD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0D;IACnF;;OAEG;IACH,OAAO,CAAC,OAAO,CAAsC;gBAGpC,eAAe,EAAE,WAAW,EAC3B,iBAAiB,EAAE,GAAG,CAAC,WAAW,GAAG,SAAS,CAAC;IAG1D,UAAU,CAAC,QAAQ,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO;IAItD,gBAAgB,CAAC,CAAC,SAAS,YAAY,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,GAAE,MAAU,GAAG,CAAC;CA4C5E"}
@@ -5,8 +5,10 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.DefaultRevisionReplacer = void 0;
8
- const index_js_1 = require("../../util/index.js");
9
- const changeAtomIdBTree_js_1 = require("../changeAtomIdBTree.js");
8
+ const internal_1 = require("@fluidframework/core-utils/internal");
9
+ const index_js_1 = require("../../core/index.js");
10
+ const index_js_2 = require("../../util/index.js");
11
+ const offsetChangesetLocalId = (value, offset) => (0, index_js_2.brand)(value + offset);
10
12
  class DefaultRevisionReplacer {
11
13
  constructor(updatedRevision, obsoleteRevisions) {
12
14
  this.updatedRevision = updatedRevision;
@@ -14,41 +16,59 @@ class DefaultRevisionReplacer {
14
16
  /**
15
17
  * Mapping from (obsolete revision tag, original local id) to the updated local id.
16
18
  */
17
- this.updatedLocalIds = (0, index_js_1.newTupleBTree)();
19
+ this.updatedLocalIds = (0, index_js_1.newChangeAtomIdRangeMap)(offsetChangesetLocalId);
18
20
  /**
19
21
  * The set of local IDs already used in the scope of the updated revision.
20
22
  */
21
- this.localIds = new Set();
23
+ this.localIds = (0, index_js_2.newIntegerRangeMap)();
22
24
  /**
23
25
  * The maximum local ID seen so far in the scope of the updated revision.
24
26
  */
25
- this.maxSeen = (0, index_js_1.brandConst)(-1)();
27
+ this.maxSeen = (0, index_js_2.brandConst)(-1)();
26
28
  }
27
29
  isObsolete(revision) {
28
30
  return this.obsoleteRevisions.has(revision);
29
31
  }
30
- getUpdatedAtomId(id) {
32
+ getUpdatedAtomId(id, count = 1) {
33
+ (0, internal_1.assert)(count >= 1, 0xcc9 /* Count must be at least 1 */);
31
34
  if (this.isObsolete(id.revision)) {
32
35
  const updated = { ...id, revision: this.updatedRevision };
33
- const prior = (0, changeAtomIdBTree_js_1.getFromChangeAtomIdMap)(this.updatedLocalIds, id);
34
- if (prior === undefined) {
35
- let localId;
36
- if (this.localIds.has(id.localId)) {
37
- this.maxSeen = (0, index_js_1.brand)(this.maxSeen + 1);
38
- localId = this.maxSeen;
36
+ let continuingOutputId;
37
+ let remainderCount = count;
38
+ let remainderStart = id;
39
+ while (remainderCount > 0) {
40
+ const prior = this.updatedLocalIds.getFirst(remainderStart, remainderCount);
41
+ if (prior.value === undefined) {
42
+ const defaultOutputId = continuingOutputId ?? remainderStart.localId;
43
+ const newLocalId = this.localIds.getAll(defaultOutputId, prior.length).length > 0
44
+ ? // Some of the IDs in this range have already been used in the scope of the updated revision.
45
+ // We need to allocate new local IDs.
46
+ (0, index_js_2.brand)(this.maxSeen + 1)
47
+ : // This change atom ID uses a local ID that has not yet been used in the scope of the updated revision.
48
+ // We reuse it as is to minimize the number of IDs that need to be updated.
49
+ defaultOutputId;
50
+ this.maxSeen = (0, index_js_2.brand)(Math.max(this.maxSeen, newLocalId + prior.length - 1));
51
+ this.localIds.set(newLocalId, prior.length, true);
52
+ this.updatedLocalIds.set(remainderStart, prior.length, newLocalId);
53
+ if (continuingOutputId === undefined) {
54
+ updated.localId = newLocalId;
55
+ }
56
+ else if (newLocalId !== continuingOutputId) {
57
+ (0, internal_1.fail)(0xcca /* TODO: Handle non-contiguous ranges */);
58
+ }
59
+ continuingOutputId = offsetChangesetLocalId(newLocalId, prior.length);
39
60
  }
40
61
  else {
41
- // This change atom ID uses a local ID that has not yet been used in the scope of the updated revision.
42
- // We reuse it as is to minimize the number of IDs that need to be updated.
43
- localId = id.localId;
44
- this.maxSeen = (0, index_js_1.brand)(Math.max(this.maxSeen, localId));
45
- this.localIds.add(id.localId);
62
+ if (continuingOutputId === undefined) {
63
+ updated.localId = prior.value;
64
+ }
65
+ else if (prior.value !== continuingOutputId) {
66
+ (0, internal_1.fail)(0xccb /* TODO: Handle non-contiguous ranges */);
67
+ }
68
+ continuingOutputId = offsetChangesetLocalId(prior.value, prior.length);
46
69
  }
47
- (0, changeAtomIdBTree_js_1.setInChangeAtomIdMap)(this.updatedLocalIds, id, localId);
48
- updated.localId = localId;
49
- }
50
- else {
51
- updated.localId = prior;
70
+ remainderStart = (0, index_js_1.offsetChangeAtomId)(remainderStart, prior.length);
71
+ remainderCount -= prior.length;
52
72
  }
53
73
  return updated;
54
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"defaultRevisionReplacer.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/defaultRevisionReplacer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,kDAAqF;AACrF,kEAIiC;AAEjC,MAAa,uBAAuB;IAcnC,YACiB,eAA4B,EAC3B,iBAA+C;QADhD,oBAAe,GAAf,eAAe,CAAa;QAC3B,sBAAiB,GAAjB,iBAAiB,CAA8B;QAfjE;;WAEG;QACc,oBAAe,GAAwC,IAAA,wBAAa,GAAE,CAAC;QACxF;;WAEG;QACc,aAAQ,GAA0B,IAAI,GAAG,EAAE,CAAC;QAC7D;;WAEG;QACK,YAAO,GAAqB,IAAA,qBAAU,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAKlD,CAAC;IAEG,UAAU,CAAC,QAAiC;QAClD,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAEM,gBAAgB,CAAyB,EAAK;QACpD,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClC,MAAM,OAAO,GAAe,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;YACtE,MAAM,KAAK,GAAiC,IAAA,6CAAsB,EACjE,IAAI,CAAC,eAAe,EACpB,EAAE,CACF,CAAC;YACF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACzB,IAAI,OAAyB,CAAC;gBAC9B,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;oBACnC,IAAI,CAAC,OAAO,GAAG,IAAA,gBAAK,EAAC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;oBACvC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;gBACxB,CAAC;qBAAM,CAAC;oBACP,uGAAuG;oBACvG,2EAA2E;oBAC3E,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC;oBACrB,IAAI,CAAC,OAAO,GAAG,IAAA,gBAAK,EAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;oBACtD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;gBAC/B,CAAC;gBACD,IAAA,2CAAoB,EAAC,IAAI,CAAC,eAAe,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;gBACxD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACP,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;YACzB,CAAC;YACD,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,OAAO,EAAE,CAAC;IACX,CAAC;CACD;AAnDD,0DAmDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tChangeAtomId,\n\tChangesetLocalId,\n\tRevisionReplacer,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport { brand, brandConst, newTupleBTree, type Mutable } from \"../../util/index.js\";\nimport {\n\tgetFromChangeAtomIdMap,\n\tsetInChangeAtomIdMap,\n\ttype ChangeAtomIdBTree,\n} from \"../changeAtomIdBTree.js\";\n\nexport class DefaultRevisionReplacer implements RevisionReplacer {\n\t/**\n\t * Mapping from (obsolete revision tag, original local id) to the updated local id.\n\t */\n\tprivate readonly updatedLocalIds: ChangeAtomIdBTree<ChangesetLocalId> = newTupleBTree();\n\t/**\n\t * The set of local IDs already used in the scope of the updated revision.\n\t */\n\tprivate readonly localIds: Set<ChangesetLocalId> = new Set();\n\t/**\n\t * The maximum local ID seen so far in the scope of the updated revision.\n\t */\n\tprivate maxSeen: ChangesetLocalId = brandConst(-1)();\n\n\tpublic constructor(\n\t\tpublic readonly updatedRevision: RevisionTag,\n\t\tprivate readonly obsoleteRevisions: Set<RevisionTag | undefined>,\n\t) {}\n\n\tpublic isObsolete(revision: RevisionTag | undefined): boolean {\n\t\treturn this.obsoleteRevisions.has(revision);\n\t}\n\n\tpublic getUpdatedAtomId<T extends ChangeAtomId>(id: T): T {\n\t\tif (this.isObsolete(id.revision)) {\n\t\t\tconst updated: Mutable<T> = { ...id, revision: this.updatedRevision };\n\t\t\tconst prior: ChangesetLocalId | undefined = getFromChangeAtomIdMap(\n\t\t\t\tthis.updatedLocalIds,\n\t\t\t\tid,\n\t\t\t);\n\t\t\tif (prior === undefined) {\n\t\t\t\tlet localId: ChangesetLocalId;\n\t\t\t\tif (this.localIds.has(id.localId)) {\n\t\t\t\t\tthis.maxSeen = brand(this.maxSeen + 1);\n\t\t\t\t\tlocalId = this.maxSeen;\n\t\t\t\t} else {\n\t\t\t\t\t// This change atom ID uses a local ID that has not yet been used in the scope of the updated revision.\n\t\t\t\t\t// We reuse it as is to minimize the number of IDs that need to be updated.\n\t\t\t\t\tlocalId = id.localId;\n\t\t\t\t\tthis.maxSeen = brand(Math.max(this.maxSeen, localId));\n\t\t\t\t\tthis.localIds.add(id.localId);\n\t\t\t\t}\n\t\t\t\tsetInChangeAtomIdMap(this.updatedLocalIds, id, localId);\n\t\t\t\tupdated.localId = localId;\n\t\t\t} else {\n\t\t\t\tupdated.localId = prior;\n\t\t\t}\n\t\t\treturn updated;\n\t\t}\n\t\treturn id;\n\t}\n}\n"]}
1
+ {"version":3,"file":"defaultRevisionReplacer.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/defaultRevisionReplacer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAmE;AAEnE,kDAQ6B;AAC7B,kDAM6B;AAE7B,MAAM,sBAAsB,GAAG,CAAC,KAAuB,EAAE,MAAc,EAAoB,EAAE,CAC5F,IAAA,gBAAK,EAAC,KAAK,GAAG,MAAM,CAAC,CAAC;AAEvB,MAAa,uBAAuB;IAenC,YACiB,eAA4B,EAC3B,iBAA+C;QADhD,oBAAe,GAAf,eAAe,CAAa;QAC3B,sBAAiB,GAAjB,iBAAiB,CAA8B;QAhBjE;;WAEG;QACc,oBAAe,GAC/B,IAAA,kCAAuB,EAAC,sBAAsB,CAAC,CAAC;QACjD;;WAEG;QACc,aAAQ,GAAqC,IAAA,6BAAkB,GAAE,CAAC;QACnF;;WAEG;QACK,YAAO,GAAqB,IAAA,qBAAU,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAKlD,CAAC;IAEG,UAAU,CAAC,QAAiC;QAClD,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAEM,gBAAgB,CAAyB,EAAK,EAAE,QAAgB,CAAC;QACvE,IAAA,iBAAM,EAAC,KAAK,IAAI,CAAC,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACzD,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClC,MAAM,OAAO,GAAe,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;YACtE,IAAI,kBAAgD,CAAC;YACrD,IAAI,cAAc,GAAG,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K,CAAC,MAAM,CAAC,CAAC;gBACvE,CAAC;qBAAM,CAAC;oBACP,IAAI,kBAAkB,KAAK,SAAS,EAAE,CAAC;wBACtC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC;oBAC/B,CAAC;yBAAM,IAAI,KAAK,CAAC,KAAK,KAAK,kBAAkB,EAAE,CAAC;wBAC/C,IAAA,eAAI,EAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;oBACtD,CAAC;oBACD,kBAAkB,GAAG,sBAAsB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBACxE,CAAC;gBACD,cAAc,GAAG,IAAA,6BAAkB,EAAC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBAClE,cAAc,IAAI,KAAK,CAAC,MAAM,CAAC;YAChC,CAAC;YACD,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,OAAO,EAAE,CAAC;IACX,CAAC;CACD;AApED,0DAoEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tnewChangeAtomIdRangeMap,\n\toffsetChangeAtomId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdRangeMap,\n\ttype ChangesetLocalId,\n\ttype RevisionReplacer,\n\ttype RevisionTag,\n} from \"../../core/index.js\";\nimport {\n\tbrand,\n\tbrandConst,\n\tnewIntegerRangeMap,\n\ttype RangeMap,\n\ttype Mutable,\n} from \"../../util/index.js\";\n\nconst offsetChangesetLocalId = (value: ChangesetLocalId, offset: number): ChangesetLocalId =>\n\tbrand(value + offset);\n\nexport class DefaultRevisionReplacer implements RevisionReplacer {\n\t/**\n\t * Mapping from (obsolete revision tag, original local id) to the updated local id.\n\t */\n\tprivate readonly updatedLocalIds: ChangeAtomIdRangeMap<ChangesetLocalId> =\n\t\tnewChangeAtomIdRangeMap(offsetChangesetLocalId);\n\t/**\n\t * The set of local IDs already used in the scope of the updated revision.\n\t */\n\tprivate readonly localIds: RangeMap<ChangesetLocalId, true> = newIntegerRangeMap();\n\t/**\n\t * The maximum local ID seen so far in the scope of the updated revision.\n\t */\n\tprivate maxSeen: ChangesetLocalId = brandConst(-1)();\n\n\tpublic constructor(\n\t\tpublic readonly updatedRevision: RevisionTag,\n\t\tprivate readonly obsoleteRevisions: Set<RevisionTag | undefined>,\n\t) {}\n\n\tpublic isObsolete(revision: RevisionTag | undefined): boolean {\n\t\treturn this.obsoleteRevisions.has(revision);\n\t}\n\n\tpublic getUpdatedAtomId<T extends ChangeAtomId>(id: T, count: number = 1): T {\n\t\tassert(count >= 1, 0xcc9 /* Count must be at least 1 */);\n\t\tif (this.isObsolete(id.revision)) {\n\t\t\tconst updated: Mutable<T> = { ...id, revision: this.updatedRevision };\n\t\t\tlet continuingOutputId: ChangesetLocalId | undefined;\n\t\t\tlet remainderCount = count;\n\t\t\tlet remainderStart = id;\n\t\t\twhile (remainderCount > 0) {\n\t\t\t\tconst prior = this.updatedLocalIds.getFirst(remainderStart, remainderCount);\n\t\t\t\tif (prior.value === undefined) {\n\t\t\t\t\tconst defaultOutputId = continuingOutputId ?? remainderStart.localId;\n\t\t\t\t\tconst newLocalId =\n\t\t\t\t\t\tthis.localIds.getAll(defaultOutputId, prior.length).length > 0\n\t\t\t\t\t\t\t? // Some of the IDs in this range have already been used in the scope of the updated revision.\n\t\t\t\t\t\t\t\t// We need to allocate new local IDs.\n\t\t\t\t\t\t\t\tbrand<ChangesetLocalId>(this.maxSeen + 1)\n\t\t\t\t\t\t\t: // This change atom ID uses a local ID that has not yet been used in the scope of the updated revision.\n\t\t\t\t\t\t\t\t// We reuse it as is to minimize the number of IDs that need to be updated.\n\t\t\t\t\t\t\t\tdefaultOutputId;\n\n\t\t\t\t\tthis.maxSeen = brand(Math.max(this.maxSeen, newLocalId + prior.length - 1));\n\t\t\t\t\tthis.localIds.set(newLocalId, prior.length, true);\n\t\t\t\t\tthis.updatedLocalIds.set(remainderStart, prior.length, newLocalId);\n\t\t\t\t\tif (continuingOutputId === undefined) {\n\t\t\t\t\t\tupdated.localId = newLocalId;\n\t\t\t\t\t} else if (newLocalId !== continuingOutputId) {\n\t\t\t\t\t\tfail(0xcca /* TODO: Handle non-contiguous ranges */);\n\t\t\t\t\t}\n\t\t\t\t\tcontinuingOutputId = offsetChangesetLocalId(newLocalId, prior.length);\n\t\t\t\t} else {\n\t\t\t\t\tif (continuingOutputId === undefined) {\n\t\t\t\t\t\tupdated.localId = prior.value;\n\t\t\t\t\t} else if (prior.value !== continuingOutputId) {\n\t\t\t\t\t\tfail(0xccb /* TODO: Handle non-contiguous ranges */);\n\t\t\t\t\t}\n\t\t\t\t\tcontinuingOutputId = offsetChangesetLocalId(prior.value, prior.length);\n\t\t\t\t}\n\t\t\t\tremainderStart = offsetChangeAtomId(remainderStart, prior.length);\n\t\t\t\tremainderCount -= prior.length;\n\t\t\t}\n\t\t\treturn updated;\n\t\t}\n\t\treturn id;\n\t}\n}\n"]}
@@ -42,7 +42,7 @@ exports.genericChangeHandler = {
42
42
  markList.push({ count: 1, fields: deltaFromChild(nodeChange) });
43
43
  nodeIndex += 1;
44
44
  }
45
- return { local: markList };
45
+ return { local: { marks: markList } };
46
46
  },
47
47
  relevantRemovedRoots,
48
48
  isEmpty: (change) => change.length === 0,
@@ -1 +1 @@
1
- {"version":3,"file":"genericFieldKind.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/genericFieldKind.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,gEAAkD;AAElD,kDAM6B;AAC7B,kDAAiD;AAYjD,iDAA+C;AAC/C,2EAAqE;AACrE,yEAAwF;AAGxF;;GAEG;AACU,QAAA,oBAAoB,GAAyC;IACzE,OAAO,EAAE;QACR,OAAO;QACP,MAAM,EAAE,CAAC,MAAwB,EAAoB,EAAE,CAAC,MAAM;QAC9D,MAAM,EAAE,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AU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACzB,CAAC;IACF,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,gBAAgB,CACxB,SAA2B,EAC3B,QAA0B;IAE1B,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;AACvE,CAAC;AAED;;GAEG;AACU,QAAA,gBAAgB,GAAkB,IAAI,4BAAa,CAC/D,IAAA,qBAAU,EAAC,4BAA4B,CAAC,EAAuB,EAC/D,uBAAY,CAAC,QAAQ,EACrB;IACC,aAAa,EAAE,4BAAoB;IACnC,yBAAyB,EAAE,IAAI,GAAG,EAAE;CACpC,CACD,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,oBAAoB,CACnC,SAA2B,EAC3B,MAAmC;IAEnC,OAAO,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;AAC7D,CAAC;AALD,oDAKC;AAED,QAAQ,CAAC,CAAC,oBAAoB,CAC7B,MAAwB,EACxB,6BAA4D;IAE5D,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;QAC1C,KAAK,CAAC,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { BTree } from \"@tylerbu/sorted-btree-es6\";\n\nimport {\n\ttype DeltaDetachedNodeId,\n\ttype DeltaMark,\n\ttype FieldKindIdentifier,\n\tMultiplicity,\n\ttype RevisionReplacer,\n} from \"../../core/index.js\";\nimport { brandConst } from \"../../util/index.js\";\n\nimport type {\n\tFieldChangeDelta,\n\tFieldChangeHandler,\n\tNestedChangesIndices,\n\tNodeChangeComposer,\n\tNodeChangePruner,\n\tNodeChangeRebaser,\n\tRelevantRemovedRootsFromChild,\n\tToDelta,\n} from \"./fieldChangeHandler.js\";\nimport { FlexFieldKind } from \"./fieldKind.js\";\nimport { makeGenericChangeCodec } from \"./genericFieldKindCodecs.js\";\nimport { newGenericChangeset, type GenericChangeset } from \"./genericFieldKindTypes.js\";\nimport type { NodeId } from \"./modularChangeTypes.js\";\n\n/**\n * {@link FieldChangeHandler} implementation for {@link GenericChangeset}.\n */\nexport const genericChangeHandler: FieldChangeHandler<GenericChangeset> = {\n\trebaser: {\n\t\tcompose,\n\t\tinvert: (change: GenericChangeset): GenericChangeset => change,\n\t\trebase: rebaseGenericChange,\n\t\tprune: pruneGenericChange,\n\t\treplaceRevisions,\n\t\tmute: (change: GenericChangeset): GenericChangeset => change,\n\t},\n\tcodecsFactory: makeGenericChangeCodec,\n\teditor: {\n\t\tbuildChildChanges(changes: Iterable<[number, NodeId]>): GenericChangeset {\n\t\t\treturn newGenericChangeset([...changes]);\n\t\t},\n\t},\n\tintoDelta: (change: GenericChangeset, deltaFromChild: ToDelta): FieldChangeDelta => {\n\t\tlet nodeIndex = 0;\n\t\tconst markList: DeltaMark[] = [];\n\t\tfor (const [index, nodeChange] of change.entries()) {\n\t\t\tif (nodeIndex < index) {\n\t\t\t\tconst offset = index - nodeIndex;\n\t\t\t\tmarkList.push({ count: offset });\n\t\t\t\tnodeIndex = index;\n\t\t\t}\n\t\t\tmarkList.push({ count: 1, fields: deltaFromChild(nodeChange) });\n\t\t\tnodeIndex += 1;\n\t\t}\n\t\treturn { local: markList };\n\t},\n\trelevantRemovedRoots,\n\tisEmpty: (change: GenericChangeset): boolean => change.length === 0,\n\tgetNestedChanges,\n\tcreateEmpty: newGenericChangeset,\n\tgetCrossFieldKeys: (_change) => [],\n};\n\nfunction compose(\n\tchange1: GenericChangeset,\n\tchange2: GenericChangeset,\n\tcomposeChildren: NodeChangeComposer,\n): GenericChangeset {\n\tconst composed = change1.clone();\n\tfor (const [index, id2] of change2.entries()) {\n\t\tconst id1 = composed.get(index);\n\t\tconst idComposed = id1 === undefined ? id2 : composeChildren(id1, id2);\n\t\tcomposed.set(index, idComposed);\n\t}\n\n\treturn composed;\n}\n\nfunction getNestedChanges(change: GenericChangeset): NestedChangesIndices {\n\t// For generic changeset, the indices in the input and output contexts are the same.\n\treturn change.toArray().map(([index, nodeChange]) => [nodeChange, index, index]);\n}\n\nfunction rebaseGenericChange(\n\tchange: GenericChangeset,\n\tover: GenericChangeset,\n\trebaseChild: NodeChangeRebaser,\n): GenericChangeset {\n\tconst rebased: GenericChangeset = new BTree();\n\tlet nextIndex = 0;\n\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst newEntry = change.getPairOrNextHigher(nextIndex);\n\t\tconst baseEntry = over.getPairOrNextHigher(nextIndex);\n\n\t\tif (baseEntry === undefined && newEntry === undefined) {\n\t\t\tbreak;\n\t\t}\n\n\t\tconst newIndex = newEntry?.[0] ?? Number.POSITIVE_INFINITY;\n\t\tconst baseIndex = baseEntry?.[0] ?? Number.POSITIVE_INFINITY;\n\t\tlet newNodeChange: NodeId | undefined;\n\t\tlet baseNodeChange: NodeId | undefined;\n\t\tlet index: number;\n\t\tif (newIndex === baseIndex) {\n\t\t\tassert(\n\t\t\t\tnewEntry !== undefined && baseEntry !== undefined,\n\t\t\t\t0xa0d /* Entries should be defined */,\n\t\t\t);\n\t\t\tindex = newIndex;\n\t\t\tnewNodeChange = newEntry[1];\n\t\t\tbaseNodeChange = baseEntry[1];\n\t\t} else if (newIndex < baseIndex) {\n\t\t\tassert(newEntry !== undefined, 0xa0e /* Entry should be defined */);\n\t\t\tindex = newIndex;\n\t\t\tnewNodeChange = newEntry[1];\n\t\t} else {\n\t\t\tassert(baseEntry !== undefined, 0xa0f /* Entry should be defined */);\n\t\t\tindex = baseIndex;\n\t\t\tbaseNodeChange = baseEntry[1];\n\t\t}\n\n\t\tconst nodeChange = rebaseChild(newNodeChange, baseNodeChange);\n\t\tif (nodeChange !== undefined) {\n\t\t\trebased.set(index, nodeChange);\n\t\t}\n\n\t\tnextIndex = index + 1;\n\t}\n\n\treturn rebased;\n}\n\nfunction pruneGenericChange(\n\tchangeset: GenericChangeset,\n\tpruneChild: NodeChangePruner,\n): GenericChangeset {\n\tconst pruned: GenericChangeset = new BTree();\n\tfor (const [index, node] of changeset.entries()) {\n\t\tconst prunedNode = pruneChild(node);\n\t\tif (prunedNode !== undefined) {\n\t\t\tpruned.set(index, node);\n\t\t}\n\t}\n\treturn pruned;\n}\n\nfunction replaceRevisions(\n\tchangeset: GenericChangeset,\n\treplacer: RevisionReplacer,\n): GenericChangeset {\n\treturn changeset.mapValues((node) => replacer.getUpdatedAtomId(node));\n}\n\n/**\n * {@link FieldKind} used to represent changes to elements of a field in a field-kind-agnostic format.\n */\nexport const genericFieldKind: FlexFieldKind = new FlexFieldKind(\n\tbrandConst(\"ModularEditBuilder.Generic\")<FieldKindIdentifier>(),\n\tMultiplicity.Sequence,\n\t{\n\t\tchangeHandler: genericChangeHandler,\n\t\tallowMonotonicUpgradeFrom: new Set(),\n\t},\n);\n\n/**\n * Converts a {@link GenericChangeset} into a field-kind-specific `TChange`.\n * @param changeset - The generic changeset to convert.\n * @param target - The {@link FieldChangeHandler} for the `FieldKind` that the returned change should target.\n * @param composeChild - A delegate to compose {@link NodeChangeset}s.\n * @returns An equivalent changeset as represented by the `target` field-kind.\n */\nexport function convertGenericChange<TChange>(\n\tchangeset: GenericChangeset,\n\ttarget: FieldChangeHandler<TChange>,\n): TChange {\n\treturn target.editor.buildChildChanges(changeset.entries());\n}\n\nfunction* relevantRemovedRoots(\n\tchange: GenericChangeset,\n\trelevantRemovedRootsFromChild: RelevantRemovedRootsFromChild,\n): Iterable<DeltaDetachedNodeId> {\n\tfor (const nodeChange of change.values()) {\n\t\tyield* relevantRemovedRootsFromChild(nodeChange);\n\t}\n}\n"]}
1
+ {"version":3,"file":"genericFieldKind.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/genericFieldKind.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,gEAAkD;AAElD,kDAM6B;AAC7B,kDAAiD;AAYjD,iDAA+C;AAC/C,2EAAqE;AACrE,yEAAwF;AAGxF;;GAEG;AACU,QAAA,oBAAoB,GAAyC;IACzE,OAAO,EAAE;QACR,OAAO;QACP,MAAM,EAAE,CAAC,MAAwB,EAAoB,EAAE,CAAC,MAAM;QAC9D,MAAM,EAAE,mBAAmB;QAC3B,KAAK,EAAE,kBAAkB;QACzB,gBAAgB;QAChB,IAAI,EAAE,CAAC,MAAwB,EAAoB,EAAE,CAAC,MAAM;KAC5D;IACD,aAAa,EAAE,kDAAsB;IACrC,MAAM,EAAE;QACP,iBAAiB,CAAC,OAAmC;YACpD,OAAO,IAAA,8CAAmB,EAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QAC1C,CAAC;KACD;IACD,SAAS,EAAE,CAAC,MAAwB,EAAE,cAAuB,EAAoB,EAAE;QAClF,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,MAAM,QAAQ,GAAgB,EAAE,CAAC;QACjC,KAAK,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;YACpD,IAAI,SAAS,GAAG,KAAK,EAAE,CAAC;gBACvB,MAAM,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;gBACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;gBACjC,SAAS,GAAG,KAAK,CAAC;YACnB,CAAC;YACD,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;Y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,oBAAoB,CAC7B,MAAwB,EACxB,6BAA4D;IAE5D,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;QAC1C,KAAK,CAAC,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { BTree } from \"@tylerbu/sorted-btree-es6\";\n\nimport {\n\ttype DeltaDetachedNodeId,\n\ttype DeltaMark,\n\ttype FieldKindIdentifier,\n\tMultiplicity,\n\ttype RevisionReplacer,\n} from \"../../core/index.js\";\nimport { brandConst } from \"../../util/index.js\";\n\nimport type {\n\tFieldChangeDelta,\n\tFieldChangeHandler,\n\tNestedChangesIndices,\n\tNodeChangeComposer,\n\tNodeChangePruner,\n\tNodeChangeRebaser,\n\tRelevantRemovedRootsFromChild,\n\tToDelta,\n} from \"./fieldChangeHandler.js\";\nimport { FlexFieldKind } from \"./fieldKind.js\";\nimport { makeGenericChangeCodec } from \"./genericFieldKindCodecs.js\";\nimport { newGenericChangeset, type GenericChangeset } from \"./genericFieldKindTypes.js\";\nimport type { NodeId } from \"./modularChangeTypes.js\";\n\n/**\n * {@link FieldChangeHandler} implementation for {@link GenericChangeset}.\n */\nexport const genericChangeHandler: FieldChangeHandler<GenericChangeset> = {\n\trebaser: {\n\t\tcompose,\n\t\tinvert: (change: GenericChangeset): GenericChangeset => change,\n\t\trebase: rebaseGenericChange,\n\t\tprune: pruneGenericChange,\n\t\treplaceRevisions,\n\t\tmute: (change: GenericChangeset): GenericChangeset => change,\n\t},\n\tcodecsFactory: makeGenericChangeCodec,\n\teditor: {\n\t\tbuildChildChanges(changes: Iterable<[number, NodeId]>): GenericChangeset {\n\t\t\treturn newGenericChangeset([...changes]);\n\t\t},\n\t},\n\tintoDelta: (change: GenericChangeset, deltaFromChild: ToDelta): FieldChangeDelta => {\n\t\tlet nodeIndex = 0;\n\t\tconst markList: DeltaMark[] = [];\n\t\tfor (const [index, nodeChange] of change.entries()) {\n\t\t\tif (nodeIndex < index) {\n\t\t\t\tconst offset = index - nodeIndex;\n\t\t\t\tmarkList.push({ count: offset });\n\t\t\t\tnodeIndex = index;\n\t\t\t}\n\t\t\tmarkList.push({ count: 1, fields: deltaFromChild(nodeChange) });\n\t\t\tnodeIndex += 1;\n\t\t}\n\t\treturn { local: { marks: markList } };\n\t},\n\trelevantRemovedRoots,\n\tisEmpty: (change: GenericChangeset): boolean => change.length === 0,\n\tgetNestedChanges,\n\tcreateEmpty: newGenericChangeset,\n\tgetCrossFieldKeys: (_change) => [],\n};\n\nfunction compose(\n\tchange1: GenericChangeset,\n\tchange2: GenericChangeset,\n\tcomposeChildren: NodeChangeComposer,\n): GenericChangeset {\n\tconst composed = change1.clone();\n\tfor (const [index, id2] of change2.entries()) {\n\t\tconst id1 = composed.get(index);\n\t\tconst idComposed = id1 === undefined ? id2 : composeChildren(id1, id2);\n\t\tcomposed.set(index, idComposed);\n\t}\n\n\treturn composed;\n}\n\nfunction getNestedChanges(change: GenericChangeset): NestedChangesIndices {\n\t// For generic changeset, the indices in the input and output contexts are the same.\n\treturn change.toArray().map(([index, nodeChange]) => [nodeChange, index, index]);\n}\n\nfunction rebaseGenericChange(\n\tchange: GenericChangeset,\n\tover: GenericChangeset,\n\trebaseChild: NodeChangeRebaser,\n): GenericChangeset {\n\tconst rebased: GenericChangeset = new BTree();\n\tlet nextIndex = 0;\n\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst newEntry = change.getPairOrNextHigher(nextIndex);\n\t\tconst baseEntry = over.getPairOrNextHigher(nextIndex);\n\n\t\tif (baseEntry === undefined && newEntry === undefined) {\n\t\t\tbreak;\n\t\t}\n\n\t\tconst newIndex = newEntry?.[0] ?? Number.POSITIVE_INFINITY;\n\t\tconst baseIndex = baseEntry?.[0] ?? Number.POSITIVE_INFINITY;\n\t\tlet newNodeChange: NodeId | undefined;\n\t\tlet baseNodeChange: NodeId | undefined;\n\t\tlet index: number;\n\t\tif (newIndex === baseIndex) {\n\t\t\tassert(\n\t\t\t\tnewEntry !== undefined && baseEntry !== undefined,\n\t\t\t\t0xa0d /* Entries should be defined */,\n\t\t\t);\n\t\t\tindex = newIndex;\n\t\t\tnewNodeChange = newEntry[1];\n\t\t\tbaseNodeChange = baseEntry[1];\n\t\t} else if (newIndex < baseIndex) {\n\t\t\tassert(newEntry !== undefined, 0xa0e /* Entry should be defined */);\n\t\t\tindex = newIndex;\n\t\t\tnewNodeChange = newEntry[1];\n\t\t} else {\n\t\t\tassert(baseEntry !== undefined, 0xa0f /* Entry should be defined */);\n\t\t\tindex = baseIndex;\n\t\t\tbaseNodeChange = baseEntry[1];\n\t\t}\n\n\t\tconst nodeChange = rebaseChild(newNodeChange, baseNodeChange);\n\t\tif (nodeChange !== undefined) {\n\t\t\trebased.set(index, nodeChange);\n\t\t}\n\n\t\tnextIndex = index + 1;\n\t}\n\n\treturn rebased;\n}\n\nfunction pruneGenericChange(\n\tchangeset: GenericChangeset,\n\tpruneChild: NodeChangePruner,\n): GenericChangeset {\n\tconst pruned: GenericChangeset = new BTree();\n\tfor (const [index, node] of changeset.entries()) {\n\t\tconst prunedNode = pruneChild(node);\n\t\tif (prunedNode !== undefined) {\n\t\t\tpruned.set(index, node);\n\t\t}\n\t}\n\treturn pruned;\n}\n\nfunction replaceRevisions(\n\tchangeset: GenericChangeset,\n\treplacer: RevisionReplacer,\n): GenericChangeset {\n\treturn changeset.mapValues((node) => replacer.getUpdatedAtomId(node));\n}\n\n/**\n * {@link FieldKind} used to represent changes to elements of a field in a field-kind-agnostic format.\n */\nexport const genericFieldKind: FlexFieldKind = new FlexFieldKind(\n\tbrandConst(\"ModularEditBuilder.Generic\")<FieldKindIdentifier>(),\n\tMultiplicity.Sequence,\n\t{\n\t\tchangeHandler: genericChangeHandler,\n\t\tallowMonotonicUpgradeFrom: new Set(),\n\t},\n);\n\n/**\n * Converts a {@link GenericChangeset} into a field-kind-specific `TChange`.\n * @param changeset - The generic changeset to convert.\n * @param target - The {@link FieldChangeHandler} for the `FieldKind` that the returned change should target.\n * @param composeChild - A delegate to compose {@link NodeChangeset}s.\n * @returns An equivalent changeset as represented by the `target` field-kind.\n */\nexport function convertGenericChange<TChange>(\n\tchangeset: GenericChangeset,\n\ttarget: FieldChangeHandler<TChange>,\n): TChange {\n\treturn target.editor.buildChildChanges(changeset.entries());\n}\n\nfunction* relevantRemovedRoots(\n\tchange: GenericChangeset,\n\trelevantRemovedRootsFromChild: RelevantRemovedRootsFromChild,\n): Iterable<DeltaDetachedNodeId> {\n\tfor (const nodeChange of change.values()) {\n\t\tyield* relevantRemovedRootsFromChild(nodeChange);\n\t}\n}\n"]}
@@ -13,7 +13,7 @@ export type { CrossFieldKey, CrossFieldKeyRange, FieldChange, FieldChangeMap, Fi
13
13
  export { convertGenericChange, genericChangeHandler, genericFieldKind, } from "./genericFieldKind.js";
14
14
  export type { GenericChangeset } from "./genericFieldKindTypes.js";
15
15
  export { ModularChangeFamily, ModularEditBuilder, type EditDescription, type GlobalEditDescription, type FieldEditDescription, rebaseRevisionMetadataFromInfo, intoDelta, relevantRemovedRoots, updateRefreshers, } from "./modularChangeFamily.js";
16
- export { makeModularChangeCodecFamily } from "./modularChangeCodecs.js";
16
+ export { ModularChangeFormatVersion, makeModularChangeCodecFamily, } from "./modularChangeCodecs.js";
17
17
  export type { FieldKindConfiguration, FieldKindConfigurationEntry, } from "./fieldKindConfiguration.js";
18
18
  export { DefaultRevisionReplacer } from "./defaultRevisionReplacer.js";
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,kCAAkC,EAClC,mBAAmB,EACnB,kBAAkB,EAClB,0BAA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ACpB,gBAAgB,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,YAAY,EACX,sBAAsB,EACtB,2BAA2B,GAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,kCAAkC,EAClC,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACN,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,+BAA+B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EAClC,KAAK,OAAO,EACZ,eAAe,EACf,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,GACzB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACX,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,MAAM,GACN,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACN,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,8BAA8B,EAC9B,SAAS,EACT,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,0BAA0B,EAC1B,4BAA4B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACX,sBAAsB,EACtB,2BAA2B,GAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.DefaultRevisionReplacer = exports.makeModularChangeCodecFamily = exports.updateRefreshers = exports.relevantRemovedRoots = exports.intoDelta = exports.rebaseRevisionMetadataFromInfo = exports.ModularEditBuilder = exports.ModularChangeFamily = exports.genericFieldKind = exports.genericChangeHandler = exports.convertGenericChange = exports.NodeAttachState = exports.referenceFreeFieldChangeRebaser = exports.FlexFieldKind = exports.EncodedModularChangesetV2 = exports.EncodedNodeChangeset = exports.EncodedModularChangesetV1 = exports.EncodedRevisionInfo = exports.EncodedChangeAtomId = exports.ChangesetLocalIdSchema = exports.setInCrossFieldMap = exports.CrossFieldTarget = exports.addCrossFieldQuery = exports.isNeverTree = exports.isNeverField = exports.allowsMultiplicitySuperset = exports.allowsTreeSuperset = exports.allowsFieldSuperset = exports.allowsTreeSchemaIdentifierSuperset = exports.allowsRepoSuperset = void 0;
7
+ exports.DefaultRevisionReplacer = exports.makeModularChangeCodecFamily = exports.ModularChangeFormatVersion = exports.updateRefreshers = exports.relevantRemovedRoots = exports.intoDelta = exports.rebaseRevisionMetadataFromInfo = exports.ModularEditBuilder = exports.ModularChangeFamily = exports.genericFieldKind = exports.genericChangeHandler = exports.convertGenericChange = exports.NodeAttachState = exports.referenceFreeFieldChangeRebaser = exports.FlexFieldKind = exports.EncodedModularChangesetV2 = exports.EncodedNodeChangeset = exports.EncodedModularChangesetV1 = exports.EncodedRevisionInfo = exports.EncodedChangeAtomId = exports.ChangesetLocalIdSchema = exports.setInCrossFieldMap = exports.CrossFieldTarget = exports.addCrossFieldQuery = exports.isNeverTree = exports.isNeverField = exports.allowsMultiplicitySuperset = exports.allowsTreeSuperset = exports.allowsFieldSuperset = exports.allowsTreeSchemaIdentifierSuperset = exports.allowsRepoSuperset = void 0;
8
8
  var comparison_js_1 = require("./comparison.js");
9
9
  Object.defineProperty(exports, "allowsRepoSuperset", { enumerable: true, get: function () { return comparison_js_1.allowsRepoSuperset; } });
10
10
  Object.defineProperty(exports, "allowsTreeSchemaIdentifierSuperset", { enumerable: true, get: function () { return comparison_js_1.allowsTreeSchemaIdentifierSuperset; } });
@@ -43,6 +43,7 @@ Object.defineProperty(exports, "intoDelta", { enumerable: true, get: function ()
43
43
  Object.defineProperty(exports, "relevantRemovedRoots", { enumerable: true, get: function () { return modularChangeFamily_js_1.relevantRemovedRoots; } });
44
44
  Object.defineProperty(exports, "updateRefreshers", { enumerable: true, get: function () { return modularChangeFamily_js_1.updateRefreshers; } });
45
45
  var modularChangeCodecs_js_1 = require("./modularChangeCodecs.js");
46
+ Object.defineProperty(exports, "ModularChangeFormatVersion", { enumerable: true, get: function () { return modularChangeCodecs_js_1.ModularChangeFormatVersion; } });
46
47
  Object.defineProperty(exports, "makeModularChangeCodecFamily", { enumerable: true, get: function () { return modularChangeCodecs_js_1.makeModularChangeCodecFamily; } });
47
48
  var defaultRevisionReplacer_js_1 = require("./defaultRevisionReplacer.js");
48
49
  Object.defineProperty(exports, "DefaultRevisionReplacer", { enumerable: true, get: function () { return defaultRevisionReplacer_js_1.DefaultRevisionReplacer; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAMyB;AALxB,mHAAA,kBAAkB,OAAA;AAClB,mIAAA,kCAAkC,OAAA;AAClC,oHAAA,mBAAmB,OAAA;AACnB,mHAAA,kBAAkB,OAAA;AAClB,2HAAA,0BAA0B,OAAA;AAE3B,mDAA6D;AAApD,8GAAA,YAAY,OAAA;AAAE,6GAAA,WAAW,OAAA;AAClC,+DAOgC;AAN/B,0HAAA,kBAAkB,OAAA;AAIlB,wHAAA,gBAAgB,OAAA;AAChB,0HAAA,kBAAkB,OAAA;AAEnB,uEAMoC;AALnC,kIAAA,sBAAsB,OAAA;AACtB,+HAAA,mBAAmB,OAAA;AACnB,+HAAA,mBAAmB,OAAA;AACnB,qIAAA,yBAAyB,OAAA;AACzB,gIAAA,oBAAoB,OAAA;AAErB,uEAAuE;AAA9D,qIAAA,yBAAyB,OAAA;AAClC,+CAAsE;AAA7D,6GAAA,aAAa,OAAA;AACtB,iEAgBiC;AAPhC,wIAAA,+BAA+B,OAAA;AAI/B,wHAAA,eAAe,OAAA;AAgBhB,6DAI+B;AAH9B,2HAAA,oBAAoB,OAAA;AACpB,2HAAA,oBAAoB,OAAA;AACpB,uHAAA,gBAAgB,OAAA;AAGjB,mEAUkC;AATjC,6HAAA,mBAAmB,OAAA;AACnB,4HAAA,kBAAkB,OAAA;AAIlB,wIAAA,8BAA8B,OAAA;AAC9B,mHAAA,SAAS,OAAA;AACT,8HAAA,oBAAoB,OAAA;AACpB,0HAAA,gBAAgB,OAAA;AAEjB,mEAAwE;AAA/D,sIAAA,4BAA4B,OAAA;AAKrC,2EAAuE;AAA9D,qIAAA,uBAAuB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tallowsRepoSuperset,\n\tallowsTreeSchemaIdentifierSuperset,\n\tallowsFieldSuperset,\n\tallowsTreeSuperset,\n\tallowsMultiplicitySuperset,\n} from \"./comparison.js\";\nexport { isNeverField, isNeverTree } from \"./isNeverTree.js\";\nexport {\n\taddCrossFieldQuery,\n\ttype CrossFieldManager,\n\ttype CrossFieldMap,\n\ttype CrossFieldQuerySet,\n\tCrossFieldTarget,\n\tsetInCrossFieldMap,\n} from \"./crossFieldQueries.js\";\nexport {\n\tChangesetLocalIdSchema,\n\tEncodedChangeAtomId,\n\tEncodedRevisionInfo,\n\tEncodedModularChangesetV1,\n\tEncodedNodeChangeset,\n} from \"./modularChangeFormatV1.js\";\nexport { EncodedModularChangesetV2 } from \"./modularChangeFormatV2.js\";\nexport { FlexFieldKind, type FullSchemaPolicy } from \"./fieldKind.js\";\nexport {\n\ttype FieldChangeHandler,\n\ttype FieldChangeDelta,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\treferenceFreeFieldChangeRebaser,\n\ttype RebaseRevisionMetadata,\n\ttype RelevantRemovedRootsFromChild,\n\ttype ToDelta,\n\tNodeAttachState,\n\ttype FieldChangeEncodingContext,\n\ttype NestedChangesIndices,\n} from \"./fieldChangeHandler.js\";\nexport type {\n\tCrossFieldKey,\n\tCrossFieldKeyRange,\n\tFieldChange,\n\tFieldChangeMap,\n\tFieldChangeset,\n\tHasFieldChanges,\n\tModularChangeset,\n\tNoChangeConstraint,\n\tNodeExistsConstraint,\n\tNodeId,\n} from \"./modularChangeTypes.js\";\nexport {\n\tconvertGenericChange,\n\tgenericChangeHandler,\n\tgenericFieldKind,\n} from \"./genericFieldKind.js\";\nexport type { GenericChangeset } from \"./genericFieldKindTypes.js\";\nexport {\n\tModularChangeFamily,\n\tModularEditBuilder,\n\ttype EditDescription,\n\ttype GlobalEditDescription,\n\ttype FieldEditDescription,\n\trebaseRevisionMetadataFromInfo,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tupdateRefreshers,\n} from \"./modularChangeFamily.js\";\nexport { makeModularChangeCodecFamily } from \"./modularChangeCodecs.js\";\nexport type {\n\tFieldKindConfiguration,\n\tFieldKindConfigurationEntry,\n} from \"./fieldKindConfiguration.js\";\nexport { DefaultRevisionReplacer } from \"./defaultRevisionReplacer.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAMyB;AALxB,mHAAA,kBAAkB,OAAA;AAClB,mIAAA,kCAAkC,OAAA;AAClC,oHAAA,mBAAmB,OAAA;AACnB,mHAAA,kBAAkB,OAAA;AAClB,2HAAA,0BAA0B,OAAA;AAE3B,mDAA6D;AAApD,8GAAA,YAAY,OAAA;AAAE,6GAAA,WAAW,OAAA;AAClC,+DAOgC;AAN/B,0HAAA,kBAAkB,OAAA;AAIlB,wHAAA,gBAAgB,OAAA;AAChB,0HAAA,kBAAkB,OAAA;AAEnB,uEAMoC;AALnC,kIAAA,sBAAsB,OAAA;AACtB,+HAAA,mBAAmB,OAAA;AACnB,+HAAA,mBAAmB,OAAA;AACnB,qIAAA,yBAAyB,OAAA;AACzB,gIAAA,oBAAoB,OAAA;AAErB,uEAAuE;AAA9D,qIAAA,yBAAyB,OAAA;AAClC,+CAAsE;AAA7D,6GAAA,aAAa,OAAA;AACtB,iEAgBiC;AAPhC,wIAAA,+BAA+B,OAAA;AAI/B,wHAAA,eAAe,OAAA;AAgBhB,6DAI+B;AAH9B,2HAAA,oBAAoB,OAAA;AACpB,2HAAA,oBAAoB,OAAA;AACpB,uHAAA,gBAAgB,OAAA;AAGjB,mEAUkC;AATjC,6HAAA,mBAAmB,OAAA;AACnB,4HAAA,kBAAkB,OAAA;AAIlB,wIAAA,8BAA8B,OAAA;AAC9B,mHAAA,SAAS,OAAA;AACT,8HAAA,oBAAoB,OAAA;AACpB,0HAAA,gBAAgB,OAAA;AAEjB,mEAGkC;AAFjC,oIAAA,0BAA0B,OAAA;AAC1B,sIAAA,4BAA4B,OAAA;AAM7B,2EAAuE;AAA9D,qIAAA,uBAAuB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tallowsRepoSuperset,\n\tallowsTreeSchemaIdentifierSuperset,\n\tallowsFieldSuperset,\n\tallowsTreeSuperset,\n\tallowsMultiplicitySuperset,\n} from \"./comparison.js\";\nexport { isNeverField, isNeverTree } from \"./isNeverTree.js\";\nexport {\n\taddCrossFieldQuery,\n\ttype CrossFieldManager,\n\ttype CrossFieldMap,\n\ttype CrossFieldQuerySet,\n\tCrossFieldTarget,\n\tsetInCrossFieldMap,\n} from \"./crossFieldQueries.js\";\nexport {\n\tChangesetLocalIdSchema,\n\tEncodedChangeAtomId,\n\tEncodedRevisionInfo,\n\tEncodedModularChangesetV1,\n\tEncodedNodeChangeset,\n} from \"./modularChangeFormatV1.js\";\nexport { EncodedModularChangesetV2 } from \"./modularChangeFormatV2.js\";\nexport { FlexFieldKind, type FullSchemaPolicy } from \"./fieldKind.js\";\nexport {\n\ttype FieldChangeHandler,\n\ttype FieldChangeDelta,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\treferenceFreeFieldChangeRebaser,\n\ttype RebaseRevisionMetadata,\n\ttype RelevantRemovedRootsFromChild,\n\ttype ToDelta,\n\tNodeAttachState,\n\ttype FieldChangeEncodingContext,\n\ttype NestedChangesIndices,\n} from \"./fieldChangeHandler.js\";\nexport type {\n\tCrossFieldKey,\n\tCrossFieldKeyRange,\n\tFieldChange,\n\tFieldChangeMap,\n\tFieldChangeset,\n\tHasFieldChanges,\n\tModularChangeset,\n\tNoChangeConstraint,\n\tNodeExistsConstraint,\n\tNodeId,\n} from \"./modularChangeTypes.js\";\nexport {\n\tconvertGenericChange,\n\tgenericChangeHandler,\n\tgenericFieldKind,\n} from \"./genericFieldKind.js\";\nexport type { GenericChangeset } from \"./genericFieldKindTypes.js\";\nexport {\n\tModularChangeFamily,\n\tModularEditBuilder,\n\ttype EditDescription,\n\ttype GlobalEditDescription,\n\ttype FieldEditDescription,\n\trebaseRevisionMetadataFromInfo,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tupdateRefreshers,\n} from \"./modularChangeFamily.js\";\nexport {\n\tModularChangeFormatVersion,\n\tmakeModularChangeCodecFamily,\n} from \"./modularChangeCodecs.js\";\nexport type {\n\tFieldKindConfiguration,\n\tFieldKindConfigurationEntry,\n} from \"./fieldKindConfiguration.js\";\nexport { DefaultRevisionReplacer } from \"./defaultRevisionReplacer.js\";\n"]}
@@ -6,7 +6,7 @@ import type { TAnySchema } from "@sinclair/typebox";
6
6
  import { type ICodecOptions, type IJsonCodec, type IMultiFormatCodec, type SchemaValidationFunction } from "../../codec/index.js";
7
7
  import type { ChangeEncodingContext, EncodedRevisionTag, FieldKindIdentifier, RevisionInfo, RevisionTag } from "../../core/index.js";
8
8
  import { type IdAllocator, type JsonCompatibleReadOnly, type Mutable } from "../../util/index.js";
9
- import type { ChangeAtomIdBTree } from "../changeAtomIdBTree.js";
9
+ import { type ChangeAtomIdBTree } from "../changeAtomIdBTree.js";
10
10
  import { type FieldBatchCodec, type TreeChunk } from "../chunked-forest/index.js";
11
11
  import { TreeCompressionStrategy } from "../treeCompressionUtils.js";
12
12
  import type { FieldChangeEncodingContext } from "./fieldChangeHandler.js";
@@ -1 +1 @@
1
- {"version":3,"file":"modularChangeCodecV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,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EAAE,uBAAuB,GAC/C,yBAAyB,CA+B3B;AAED,wBAAgB,YAAY,CAC3B,aAAa,EAAE,yBAAyB,EACxC,OAAO,EAAE,qBAAqB,EAC9B,UAAU,EAAE,sBAAsB,EAClC,oBAAoB,EAAE,GAAG,CACxB,mBAAmB,EACnB;IACC,cAAc,CAAC,EAAE,wBAAwB,CAAC,UAAU,CAAC,CAAC;IACtD,KAAK,EAAE,UAAU,CAAC;CAClB,CACD,EACD,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,WAAW,EAAE,eAAe,EAC5B,wBAAwB,EAAE,uBAAuB,GAC/C,OAAO,CAAC,gBAAgB,CAAC,CAsD3B;AAED,wBAAgB,uBAAuB,CACtC,UAAU,EAAE,sBAAsB,EAClC,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,YAAY,EAAE,aAAa,GACzB,GAAG,CACL,mBAAmB,EACnB;IAAE,cAAc,CAAC,EAAE,wBAAwB,CAAC,UAAU,CAAC,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAC5E,CAmCA;AAED,wBAAgB,wBAAwB,CACvC,UAAU,EAAE,sBAAsB,EAClC,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,WAAW,EAAE,eAAe,EAC5B,YAAY,EAAE,aAAa,EAC3B,wBAAwB,GAAE,uBAA4D,GACpF,kBAAkB,CAkCpB"}
1
+ {"version":3,"file":"modularChangeCodecV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KA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ACxC,OAAO,EAAE,qBAAqB,EAC9B,UAAU,EAAE,sBAAsB,EAClC,oBAAoB,EAAE,GAAG,CACxB,mBAAmB,EACnB;IACC,cAAc,CAAC,EAAE,wBAAwB,CAAC,UAAU,CAAC,CAAC;IACtD,KAAK,EAAE,UAAU,CAAC;CAClB,CACD,EACD,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,WAAW,EAAE,eAAe,EAC5B,wBAAwB,EAAE,uBAAuB,GAC/C,OAAO,CAAC,gBAAgB,CAAC,CAsD3B;AAED,wBAAgB,uBAAuB,CACtC,UAAU,EAAE,sBAAsB,EAClC,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,YAAY,EAAE,aAAa,GACzB,GAAG,CACL,mBAAmB,EACnB;IAAE,cAAc,CAAC,EAAE,wBAAwB,CAAC,UAAU,CAAC,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAC5E,CAmCA;AAED,wBAAgB,wBAAwB,CACvC,UAAU,EAAE,sBAAsB,EAClC,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,WAAW,EAAE,eAAe,EAC5B,YAAY,EAAE,aAAa,EAC3B,wBAAwB,GAAE,uBAA4D,GACpF,kBAAkB,CAkCpB"}
@@ -8,6 +8,7 @@ exports.makeModularChangeCodecV1 = exports.getFieldChangesetCodecs = exports.dec
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const index_js_1 = require("../../codec/index.js");
10
10
  const index_js_2 = require("../../util/index.js");
11
+ const changeAtomIdBTree_js_1 = require("../changeAtomIdBTree.js");
11
12
  const index_js_3 = require("../chunked-forest/index.js");
12
13
  const treeCompressionUtils_js_1 = require("../treeCompressionUtils.js");
13
14
  const genericFieldKind_js_1 = require("./genericFieldKind.js");
@@ -166,7 +167,7 @@ function decodeDetachedNodes(encoded, context, revisionTagCodec, fieldsCodec, ch
166
167
  idCompressor: context.idCompressor,
167
168
  });
168
169
  };
169
- const map = (0, index_js_2.newTupleBTree)();
170
+ const map = (0, changeAtomIdBTree_js_1.newChangeAtomIdBTree)();
170
171
  // eslint-disable-next-line unicorn/no-array-for-each -- Codec internals: minimizing changes to serialization logic
171
172
  encoded.builds.forEach((build) => {
172
173
  // EncodedRevisionTag cannot be an array so this ensures that we can isolate the tuple
@@ -184,7 +185,10 @@ function decodeDetachedNodes(encoded, context, revisionTagCodec, fieldsCodec, ch
184
185
  exports.decodeDetachedNodes = decodeDetachedNodes;
185
186
  function encodeRevisionInfos(revisions, context, revisionTagCodec) {
186
187
  if (context.revision !== undefined) {
187
- (0, internal_1.assert)(revisions.length === 1 &&
188
+ (0, internal_1.assert)(
189
+ // eslint-disable-next-line @typescript-eslint/prefer-optional-chain -- Using optional chaining here would change behavior: `revisions[0]?.rollbackOf === undefined` is true when revisions[0] is undefined, but this check requires revisions[0] to be defined. As currently written, such a change would be safe because context.revision is included in the check and from a couple lines above is confirmed not undefined. But this more verbose form is clearer.
190
+ revisions.length === 1 &&
191
+ // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
188
192
  revisions[0] !== undefined &&
189
193
  revisions[0].revision === context.revision &&
190
194
  revisions[0].rollbackOf === undefined, 0x964 /* A tagged change should only contain the tagged revision */);
@@ -238,9 +242,9 @@ exports.encodeChange = encodeChange;
238
242
  function decodeChange(encodedChange, context, fieldKinds, fieldChangesetCodecs, revisionTagCodec, fieldsCodec, chunkCompressionStrategy) {
239
243
  const decoded = {
240
244
  fieldChanges: new Map(),
241
- nodeChanges: (0, index_js_2.newTupleBTree)(),
242
- nodeToParent: (0, index_js_2.newTupleBTree)(),
243
- nodeAliases: (0, index_js_2.newTupleBTree)(),
245
+ nodeChanges: (0, changeAtomIdBTree_js_1.newChangeAtomIdBTree)(),
246
+ nodeToParent: (0, changeAtomIdBTree_js_1.newChangeAtomIdBTree)(),
247
+ nodeAliases: (0, changeAtomIdBTree_js_1.newChangeAtomIdBTree)(),
244
248
  crossFieldKeys: (0, modularChangeTypes_js_1.newCrossFieldKeyTable)(),
245
249
  };
246
250
  decoded.fieldChanges = decodeFieldChangesFromJson(encodedChange.changes, undefined, decoded, context, (0, index_js_2.idAllocatorFromMaxId)(encodedChange.maxId), fieldKinds, fieldChangesetCodecs);