@fluidframework/tree 2.52.0 → 2.53.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 (488) hide show
  1. package/.eslintrc.cjs +14 -2
  2. package/CHANGELOG.md +125 -0
  3. package/api-report/tree.alpha.api.md +48 -41
  4. package/dist/alpha.d.ts +2 -1
  5. package/dist/core/tree/visitDelta.d.ts +1 -1
  6. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  7. package/dist/core/tree/visitDelta.js.map +1 -1
  8. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -0
  9. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  10. package/dist/feature-libraries/chunked-forest/index.js +3 -1
  11. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  12. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +2 -4
  13. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  14. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +3 -0
  15. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  16. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  17. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +1 -0
  18. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  19. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts +1 -1
  20. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  21. package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  22. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +4 -0
  23. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  24. package/dist/feature-libraries/forest-summary/forestSummarizer.js +5 -5
  25. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  26. package/dist/feature-libraries/index.d.ts +1 -1
  27. package/dist/feature-libraries/index.d.ts.map +1 -1
  28. package/dist/feature-libraries/index.js +4 -2
  29. package/dist/feature-libraries/index.js.map +1 -1
  30. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -0
  31. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  32. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js +1 -0
  33. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  34. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  35. package/dist/feature-libraries/modular-schema/genericFieldKind.js +1 -0
  36. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  37. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -0
  38. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  39. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -1
  40. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  41. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +49 -20
  42. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  43. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  44. package/dist/feature-libraries/optional-field/optionalField.js +3 -0
  45. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  46. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +1 -0
  47. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
  48. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +4 -0
  49. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
  50. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  51. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  52. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  53. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +1 -1
  54. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  55. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  56. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  57. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  58. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  59. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  60. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  61. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  62. package/dist/feature-libraries/sequence-field/types.d.ts +1 -1
  63. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  64. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +3 -2
  68. package/dist/index.js.map +1 -1
  69. package/dist/jsonDomainSchema.d.ts +5 -3
  70. package/dist/jsonDomainSchema.d.ts.map +1 -1
  71. package/dist/jsonDomainSchema.js.map +1 -1
  72. package/dist/packageVersion.d.ts +1 -1
  73. package/dist/packageVersion.js +1 -1
  74. package/dist/packageVersion.js.map +1 -1
  75. package/dist/shared-tree/independentView.d.ts.map +1 -1
  76. package/dist/shared-tree/independentView.js +1 -1
  77. package/dist/shared-tree/independentView.js.map +1 -1
  78. package/dist/shared-tree/index.d.ts +0 -1
  79. package/dist/shared-tree/index.d.ts.map +1 -1
  80. package/dist/shared-tree/index.js.map +1 -1
  81. package/dist/shared-tree/schematizeTree.d.ts +23 -60
  82. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  83. package/dist/shared-tree/schematizeTree.js +59 -151
  84. package/dist/shared-tree/schematizeTree.js.map +1 -1
  85. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  86. package/dist/shared-tree/schematizingTreeView.js +11 -11
  87. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  88. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  89. package/dist/shared-tree/treeAlpha.js +9 -3
  90. package/dist/shared-tree/treeAlpha.js.map +1 -1
  91. package/dist/shared-tree-core/defaultResubmitMachine.d.ts +2 -1
  92. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  93. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  94. package/dist/simple-tree/api/configuration.d.ts +3 -0
  95. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  96. package/dist/simple-tree/api/configuration.js +5 -1
  97. package/dist/simple-tree/api/configuration.js.map +1 -1
  98. package/dist/simple-tree/api/create.d.ts +4 -4
  99. package/dist/simple-tree/api/create.d.ts.map +1 -1
  100. package/dist/simple-tree/api/create.js +3 -6
  101. package/dist/simple-tree/api/create.js.map +1 -1
  102. package/dist/simple-tree/api/discrepancies.d.ts +5 -9
  103. package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
  104. package/dist/simple-tree/api/discrepancies.js +11 -10
  105. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  106. package/dist/simple-tree/api/index.d.ts +3 -2
  107. package/dist/simple-tree/api/index.d.ts.map +1 -1
  108. package/dist/simple-tree/api/index.js +3 -2
  109. package/dist/simple-tree/api/index.js.map +1 -1
  110. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  111. package/dist/simple-tree/api/schemaCompatibilityTester.js +3 -4
  112. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  113. package/dist/simple-tree/api/schemaFactory.d.ts +9 -155
  114. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  115. package/dist/simple-tree/api/schemaFactory.js +4 -47
  116. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  117. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +157 -16
  118. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  119. package/dist/simple-tree/api/schemaFactoryAlpha.js +33 -11
  120. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  121. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -3
  122. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  123. package/dist/simple-tree/api/schemaFactoryRecursive.js +1 -7
  124. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  125. package/dist/simple-tree/api/schemaStatics.d.ts +158 -0
  126. package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -0
  127. package/dist/simple-tree/api/schemaStatics.js +59 -0
  128. package/dist/simple-tree/api/schemaStatics.js.map +1 -0
  129. package/dist/simple-tree/api/storedSchema.d.ts +5 -3
  130. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  131. package/dist/simple-tree/api/storedSchema.js +4 -2
  132. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  133. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  134. package/dist/simple-tree/api/treeBeta.js +12 -6
  135. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  136. package/dist/simple-tree/core/allowedTypes.d.ts +46 -30
  137. package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
  138. package/dist/simple-tree/core/allowedTypes.js +20 -12
  139. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  140. package/dist/simple-tree/core/index.d.ts +5 -3
  141. package/dist/simple-tree/core/index.d.ts.map +1 -1
  142. package/dist/simple-tree/core/index.js +6 -1
  143. package/dist/simple-tree/core/index.js.map +1 -1
  144. package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts +25 -0
  145. package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -0
  146. package/dist/simple-tree/core/simpleNodeSchemaBase.js +7 -0
  147. package/dist/simple-tree/core/simpleNodeSchemaBase.js.map +1 -0
  148. package/dist/simple-tree/core/toStored.d.ts +32 -0
  149. package/dist/simple-tree/core/toStored.d.ts.map +1 -0
  150. package/dist/simple-tree/core/toStored.js +37 -0
  151. package/dist/simple-tree/core/toStored.js.map +1 -0
  152. package/dist/simple-tree/core/treeNode.d.ts +0 -3
  153. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  154. package/dist/simple-tree/core/treeNode.js +3 -3
  155. package/dist/simple-tree/core/treeNode.js.map +1 -1
  156. package/dist/simple-tree/core/treeNodeSchema.d.ts +7 -2
  157. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  158. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  159. package/dist/simple-tree/core/treeNodeValid.d.ts +6 -1
  160. package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  161. package/dist/simple-tree/core/treeNodeValid.js +11 -6
  162. package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
  163. package/dist/simple-tree/core/walkSchema.d.ts +19 -5
  164. package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
  165. package/dist/simple-tree/core/walkSchema.js +4 -2
  166. package/dist/simple-tree/core/walkSchema.js.map +1 -1
  167. package/dist/simple-tree/createContext.d.ts.map +1 -1
  168. package/dist/simple-tree/createContext.js +1 -1
  169. package/dist/simple-tree/createContext.js.map +1 -1
  170. package/dist/simple-tree/fieldSchema.d.ts +2 -1
  171. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  172. package/dist/simple-tree/fieldSchema.js +1 -1
  173. package/dist/simple-tree/fieldSchema.js.map +1 -1
  174. package/dist/simple-tree/index.d.ts +4 -4
  175. package/dist/simple-tree/index.d.ts.map +1 -1
  176. package/dist/simple-tree/index.js +9 -2
  177. package/dist/simple-tree/index.js.map +1 -1
  178. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  179. package/dist/simple-tree/leafNodeSchema.js +1 -0
  180. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  181. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  182. package/dist/simple-tree/node-kinds/array/arrayNode.js +18 -4
  183. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  184. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  185. package/dist/simple-tree/node-kinds/map/mapNode.js +9 -2
  186. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  187. package/dist/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
  188. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  189. package/dist/simple-tree/node-kinds/object/objectNode.js +37 -26
  190. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  191. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  192. package/dist/simple-tree/node-kinds/record/recordNode.js +9 -2
  193. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  194. package/dist/simple-tree/prepareForInsertion.d.ts +5 -5
  195. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  196. package/dist/simple-tree/prepareForInsertion.js +10 -10
  197. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  198. package/dist/simple-tree/simpleSchema.d.ts +6 -21
  199. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  200. package/dist/simple-tree/simpleSchema.js.map +1 -1
  201. package/dist/simple-tree/toStoredSchema.d.ts +35 -11
  202. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  203. package/dist/simple-tree/toStoredSchema.js +68 -33
  204. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  205. package/dist/tableSchema.d.ts +25 -32
  206. package/dist/tableSchema.d.ts.map +1 -1
  207. package/dist/tableSchema.js +10 -24
  208. package/dist/tableSchema.js.map +1 -1
  209. package/docs/.attachments/cell-ordering/C-knows-of-ABC.png +0 -0
  210. package/docs/.attachments/cell-ordering/C-knows-of-C.png +0 -0
  211. package/docs/.attachments/cell-ordering/XvsA.png +0 -0
  212. package/docs/.attachments/cell-ordering/compose-a-b.png +0 -0
  213. package/docs/.attachments/cell-ordering/compose-a-ref-p1-b-ref-p2.png +0 -0
  214. package/docs/.attachments/cell-ordering/compose-b-no-ref-to-ca.png +0 -0
  215. package/docs/.attachments/cell-ordering/rebase-ab-over-x.png +0 -0
  216. package/docs/.attachments/cell-ordering/rebase-b-over-x.png +0 -0
  217. package/docs/.attachments/cell-ordering/rebase-b2-over-x.png +0 -0
  218. package/docs/.attachments/cell-ordering/rebase-b2.png +0 -0
  219. package/docs/.attachments/cell-ordering/rebase-to-abprime.png +0 -0
  220. package/docs/.attachments/cell-ordering/rebase-to-bprime.png +0 -0
  221. package/docs/main/cell-ordering.md +638 -0
  222. package/lib/alpha.d.ts +2 -1
  223. package/lib/core/tree/visitDelta.d.ts +1 -1
  224. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  225. package/lib/core/tree/visitDelta.js.map +1 -1
  226. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -0
  227. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  228. package/lib/feature-libraries/chunked-forest/index.js +1 -0
  229. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  230. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +2 -4
  231. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  232. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +4 -1
  233. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  234. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  235. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -0
  236. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  237. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts +1 -1
  238. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  239. package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  240. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +4 -0
  241. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  242. package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -1
  243. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  244. package/lib/feature-libraries/index.d.ts +1 -1
  245. package/lib/feature-libraries/index.d.ts.map +1 -1
  246. package/lib/feature-libraries/index.js +1 -1
  247. package/lib/feature-libraries/index.js.map +1 -1
  248. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -0
  249. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  250. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js +1 -0
  251. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  252. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  253. package/lib/feature-libraries/modular-schema/genericFieldKind.js +1 -0
  254. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  255. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -0
  256. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  257. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -1
  258. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  259. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +50 -21
  260. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  261. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  262. package/lib/feature-libraries/optional-field/optionalField.js +3 -0
  263. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  264. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +1 -0
  265. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
  266. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +4 -0
  267. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
  268. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  269. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  270. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  271. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  272. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +1 -1
  273. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  274. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  275. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  276. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  277. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  278. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +1 -1
  279. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  280. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  281. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  282. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  283. package/lib/feature-libraries/sequence-field/types.d.ts +1 -1
  284. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  285. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  286. package/lib/index.d.ts +1 -1
  287. package/lib/index.d.ts.map +1 -1
  288. package/lib/index.js +1 -1
  289. package/lib/index.js.map +1 -1
  290. package/lib/jsonDomainSchema.d.ts +5 -3
  291. package/lib/jsonDomainSchema.d.ts.map +1 -1
  292. package/lib/jsonDomainSchema.js.map +1 -1
  293. package/lib/packageVersion.d.ts +1 -1
  294. package/lib/packageVersion.js +1 -1
  295. package/lib/packageVersion.js.map +1 -1
  296. package/lib/shared-tree/independentView.d.ts.map +1 -1
  297. package/lib/shared-tree/independentView.js +2 -2
  298. package/lib/shared-tree/independentView.js.map +1 -1
  299. package/lib/shared-tree/index.d.ts +0 -1
  300. package/lib/shared-tree/index.d.ts.map +1 -1
  301. package/lib/shared-tree/index.js.map +1 -1
  302. package/lib/shared-tree/schematizeTree.d.ts +23 -60
  303. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  304. package/lib/shared-tree/schematizeTree.js +60 -150
  305. package/lib/shared-tree/schematizeTree.js.map +1 -1
  306. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  307. package/lib/shared-tree/schematizingTreeView.js +14 -14
  308. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  309. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  310. package/lib/shared-tree/treeAlpha.js +10 -4
  311. package/lib/shared-tree/treeAlpha.js.map +1 -1
  312. package/lib/shared-tree-core/defaultResubmitMachine.d.ts +2 -1
  313. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  314. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  315. package/lib/simple-tree/api/configuration.d.ts +3 -0
  316. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  317. package/lib/simple-tree/api/configuration.js +6 -2
  318. package/lib/simple-tree/api/configuration.js.map +1 -1
  319. package/lib/simple-tree/api/create.d.ts +4 -4
  320. package/lib/simple-tree/api/create.d.ts.map +1 -1
  321. package/lib/simple-tree/api/create.js +3 -6
  322. package/lib/simple-tree/api/create.js.map +1 -1
  323. package/lib/simple-tree/api/discrepancies.d.ts +5 -9
  324. package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
  325. package/lib/simple-tree/api/discrepancies.js +11 -10
  326. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  327. package/lib/simple-tree/api/index.d.ts +3 -2
  328. package/lib/simple-tree/api/index.d.ts.map +1 -1
  329. package/lib/simple-tree/api/index.js +2 -1
  330. package/lib/simple-tree/api/index.js.map +1 -1
  331. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  332. package/lib/simple-tree/api/schemaCompatibilityTester.js +4 -5
  333. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  334. package/lib/simple-tree/api/schemaFactory.d.ts +9 -155
  335. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  336. package/lib/simple-tree/api/schemaFactory.js +2 -45
  337. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  338. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +157 -16
  339. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  340. package/lib/simple-tree/api/schemaFactoryAlpha.js +23 -1
  341. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  342. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -3
  343. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  344. package/lib/simple-tree/api/schemaFactoryRecursive.js +0 -5
  345. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  346. package/lib/simple-tree/api/schemaStatics.d.ts +158 -0
  347. package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -0
  348. package/lib/simple-tree/api/schemaStatics.js +56 -0
  349. package/lib/simple-tree/api/schemaStatics.js.map +1 -0
  350. package/lib/simple-tree/api/storedSchema.d.ts +5 -3
  351. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  352. package/lib/simple-tree/api/storedSchema.js +6 -4
  353. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  354. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  355. package/lib/simple-tree/api/treeBeta.js +8 -2
  356. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  357. package/lib/simple-tree/core/allowedTypes.d.ts +46 -30
  358. package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
  359. package/lib/simple-tree/core/allowedTypes.js +23 -12
  360. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  361. package/lib/simple-tree/core/index.d.ts +5 -3
  362. package/lib/simple-tree/core/index.d.ts.map +1 -1
  363. package/lib/simple-tree/core/index.js +3 -2
  364. package/lib/simple-tree/core/index.js.map +1 -1
  365. package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts +25 -0
  366. package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -0
  367. package/lib/simple-tree/core/simpleNodeSchemaBase.js +6 -0
  368. package/lib/simple-tree/core/simpleNodeSchemaBase.js.map +1 -0
  369. package/lib/simple-tree/core/toStored.d.ts +32 -0
  370. package/lib/simple-tree/core/toStored.d.ts.map +1 -0
  371. package/lib/simple-tree/core/toStored.js +32 -0
  372. package/lib/simple-tree/core/toStored.js.map +1 -0
  373. package/lib/simple-tree/core/treeNode.d.ts +0 -3
  374. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  375. package/lib/simple-tree/core/treeNode.js +3 -3
  376. package/lib/simple-tree/core/treeNode.js.map +1 -1
  377. package/lib/simple-tree/core/treeNodeSchema.d.ts +7 -2
  378. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  379. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  380. package/lib/simple-tree/core/treeNodeValid.d.ts +6 -1
  381. package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  382. package/lib/simple-tree/core/treeNodeValid.js +9 -5
  383. package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
  384. package/lib/simple-tree/core/walkSchema.d.ts +19 -5
  385. package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
  386. package/lib/simple-tree/core/walkSchema.js +4 -2
  387. package/lib/simple-tree/core/walkSchema.js.map +1 -1
  388. package/lib/simple-tree/createContext.d.ts.map +1 -1
  389. package/lib/simple-tree/createContext.js +2 -2
  390. package/lib/simple-tree/createContext.js.map +1 -1
  391. package/lib/simple-tree/fieldSchema.d.ts +2 -1
  392. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  393. package/lib/simple-tree/fieldSchema.js +1 -1
  394. package/lib/simple-tree/fieldSchema.js.map +1 -1
  395. package/lib/simple-tree/index.d.ts +4 -4
  396. package/lib/simple-tree/index.d.ts.map +1 -1
  397. package/lib/simple-tree/index.js +2 -2
  398. package/lib/simple-tree/index.js.map +1 -1
  399. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  400. package/lib/simple-tree/leafNodeSchema.js +2 -1
  401. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  402. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  403. package/lib/simple-tree/node-kinds/array/arrayNode.js +21 -7
  404. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  405. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  406. package/lib/simple-tree/node-kinds/map/mapNode.js +12 -5
  407. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  408. package/lib/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
  409. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  410. package/lib/simple-tree/node-kinds/object/objectNode.js +16 -5
  411. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  412. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  413. package/lib/simple-tree/node-kinds/record/recordNode.js +12 -5
  414. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  415. package/lib/simple-tree/prepareForInsertion.d.ts +5 -5
  416. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  417. package/lib/simple-tree/prepareForInsertion.js +10 -10
  418. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  419. package/lib/simple-tree/simpleSchema.d.ts +6 -21
  420. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  421. package/lib/simple-tree/simpleSchema.js.map +1 -1
  422. package/lib/simple-tree/toStoredSchema.d.ts +35 -11
  423. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  424. package/lib/simple-tree/toStoredSchema.js +67 -34
  425. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  426. package/lib/tableSchema.d.ts +25 -32
  427. package/lib/tableSchema.d.ts.map +1 -1
  428. package/lib/tableSchema.js +11 -25
  429. package/lib/tableSchema.js.map +1 -1
  430. package/package.json +21 -21
  431. package/src/core/tree/visitDelta.ts +3 -1
  432. package/src/feature-libraries/chunked-forest/index.ts +1 -0
  433. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +12 -5
  434. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -0
  435. package/src/feature-libraries/default-schema/noChangeCodecs.ts +1 -1
  436. package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
  437. package/src/feature-libraries/index.ts +2 -0
  438. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +9 -0
  439. package/src/feature-libraries/modular-schema/genericFieldKind.ts +1 -0
  440. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +1 -0
  441. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +61 -19
  442. package/src/feature-libraries/optional-field/optionalField.ts +4 -0
  443. package/src/feature-libraries/sequence-field/sequenceFieldChangeRebaser.ts +4 -0
  444. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +4 -2
  445. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +4 -2
  446. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +4 -2
  447. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +1 -1
  448. package/src/feature-libraries/sequence-field/types.ts +1 -1
  449. package/src/index.ts +2 -1
  450. package/src/jsonDomainSchema.ts +4 -0
  451. package/src/packageVersion.ts +1 -1
  452. package/src/shared-tree/independentView.ts +6 -2
  453. package/src/shared-tree/index.ts +0 -2
  454. package/src/shared-tree/schematizeTree.ts +83 -199
  455. package/src/shared-tree/schematizingTreeView.ts +26 -12
  456. package/src/shared-tree/treeAlpha.ts +18 -4
  457. package/src/shared-tree-core/defaultResubmitMachine.ts +2 -1
  458. package/src/simple-tree/api/configuration.ts +10 -2
  459. package/src/simple-tree/api/create.ts +5 -10
  460. package/src/simple-tree/api/discrepancies.ts +18 -17
  461. package/src/simple-tree/api/index.ts +2 -3
  462. package/src/simple-tree/api/schemaCompatibilityTester.ts +5 -9
  463. package/src/simple-tree/api/schemaFactory.ts +6 -250
  464. package/src/simple-tree/api/schemaFactoryAlpha.ts +174 -1
  465. package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -25
  466. package/src/simple-tree/api/schemaStatics.ts +291 -0
  467. package/src/simple-tree/api/storedSchema.ts +12 -5
  468. package/src/simple-tree/api/treeBeta.ts +9 -2
  469. package/src/simple-tree/core/allowedTypes.ts +71 -42
  470. package/src/simple-tree/core/index.ts +9 -1
  471. package/src/simple-tree/core/simpleNodeSchemaBase.ts +30 -0
  472. package/src/simple-tree/core/toStored.ts +58 -0
  473. package/src/simple-tree/core/treeNode.ts +3 -3
  474. package/src/simple-tree/core/treeNodeSchema.ts +8 -2
  475. package/src/simple-tree/core/treeNodeValid.ts +14 -5
  476. package/src/simple-tree/core/walkSchema.ts +23 -6
  477. package/src/simple-tree/createContext.ts +5 -2
  478. package/src/simple-tree/fieldSchema.ts +4 -2
  479. package/src/simple-tree/index.ts +15 -6
  480. package/src/simple-tree/leafNodeSchema.ts +2 -1
  481. package/src/simple-tree/node-kinds/array/arrayNode.ts +58 -37
  482. package/src/simple-tree/node-kinds/map/mapNode.ts +26 -2
  483. package/src/simple-tree/node-kinds/object/objectNode.ts +37 -4
  484. package/src/simple-tree/node-kinds/record/recordNode.ts +23 -2
  485. package/src/simple-tree/prepareForInsertion.ts +12 -7
  486. package/src/simple-tree/simpleSchema.ts +6 -26
  487. package/src/simple-tree/toStoredSchema.ts +107 -44
  488. package/src/tableSchema.ts +40 -35
@@ -0,0 +1,638 @@
1
+ # Cell Ordering
2
+
3
+ This document's current purpose is to make it easier to refresh one's understanding of the cell ordering scheme currently used by arrays/sequence fields.
4
+ That doesn't make it a great document for readers who do not already have some familiarity of the topic and related topics such as rebasing.
5
+ This document may serve as the basis for a more approachable and higher-quality document in the future.
6
+
7
+ ## Cells
8
+
9
+ The idea of cells is introduced in [cell-model-of-collaborative-editing.md](cell-model-of-collaborative-editing.md).
10
+ The core idea is that, in addition to requiring a way to refer to positions that nodes occupy
11
+ (which we accomplish using integer indices for nodes in a given sequence, at a given point in the commit graph)
12
+ we need a way to refer to the empty locations that nodes may occupy or have occupied in the past.
13
+ We call these "cells".
14
+
15
+ We accomplish this by assigning a unique ID to each such cell
16
+ and using that ID in commits that need to refer to the cell.
17
+
18
+ Being able to refer to empty cells makes it possible for commits to convey position information relative to such cells.
19
+ For example, if some commit `A` inserts content before some empty cell `c`
20
+ while some other commit `X` concurrently inserts content after that same cell `c`,
21
+ then we know that the content inserted by `A` should come before the content inserted by commit `X`
22
+ no matter the order in which the commits `A` and `X` end up sequenced in the commit history.
23
+ If these commits had not been able to refer to `c`, then they would not have been able to guarantee the relative ordering of their inserted contents.
24
+
25
+ ## Cell References In Commits
26
+
27
+ There are some important properties when it comes to cell references in commits.
28
+
29
+ ### All or Nothing
30
+
31
+ When a commit `C` includes a reference to a cell introduced in some commit `A`
32
+ (`A` is either `C` itself or one of its ancestors),
33
+ `C` will include references to all cells introduced by `A`.
34
+
35
+ ### Ordering of References
36
+
37
+ For any pair of references `ra` and `rb` that commits `C` contains,
38
+ `C` also includes enough information to totally order `ra` relative to `rb`.
39
+
40
+ Note that the above two properties, when taken together, entail that we should never be tie-breaking pairs of cells introduced by the same commit.
41
+
42
+
43
+ ## Cell IDs and Commits
44
+
45
+ Each cell ID includes the ID of the commit that introduced it,
46
+ which makes it easy to check if a given commit introduced a given cell ID.
47
+
48
+ There are two cases where a commit introduces a new cell ID:
49
+
50
+ 1. Inserting a new node in a sequence typically introduces a cell ID to refer to the cell that will hold the node.
51
+ In the input context of the commit, the cell is empty.
52
+ In the output context of the commit the cell is populated with the inserted node.
53
+ 2. Moving or removing a node from a sequence typically introduces a cell ID to refer to the cell that held the node.
54
+ In the input context of the commit, the cell is populated with the node.
55
+ In the output context of the commit, the cell is empty.
56
+
57
+ The qualifier "typically" is needed because rollback commits can reuse past cell IDs for that same cell. See below.
58
+
59
+ While a single cell ID can only refer to a single cell,
60
+ a single cell may be referred to by multiple IDs over time.
61
+ This is really relevant to cell ordering.
62
+
63
+ Commits can also refer to a cell using an ID that was introduced by a prior commit.
64
+ This occurs in two cases:
65
+
66
+ 1. An inverse commit (whether a rollback or revert) refers to all cells that the commit it is the inverse of referred to and uses the same IDs to do so.
67
+ For example, if commit `A` removes a node and therefore introduces cell ID `Id1` to refer to the cell it empties,
68
+ then the inverse of `A` will restore that node to the same cell, referring to that cell using `Id1`.
69
+
70
+ 2. Rebasing a commit `A` over a commit `X` leads to a commit `A'` that refers to all cells that either `A` or `X` referred to.
71
+ For example, if `A` inserts a node next to a node `n`, and `X` removes `n` thereby introducing cell ID `Id1` to refer to the cell where `n` used to be,
72
+ then `A'` will carry a mark that uses `Id1` in order to describe the location of the cell that used to contain `n`.
73
+
74
+ ## The Cell Reference Accumulation Invariant
75
+
76
+ One can infer from the above that for a given commit `C`...
77
+ * `C` refers to all cells introduced by `C`.
78
+ * `C` refers to all cells introduced by ancestors of `C` up to some ancestor `A`.
79
+
80
+ The commits that introduce cells that `C` refers to therefore form a contiguous subsequence always including and ending in `C`.
81
+ In other words, when considering a single branch,
82
+ if a commit `C` has a reference to a cell introduced by commit `A`,
83
+ then it also has references to every cell introduced by `A`,
84
+ references to every cell introduced by commits sequenced between `A` and `C`,
85
+ as well as references to every cell introduced by `C`.
86
+
87
+ Note that rollback commits are excluded from this invariant because they are not truly considered to be part of any branch.
88
+ See the [Rollback commits](#rollback-commits) section for more details.
89
+
90
+ In commit graph diagrams, we can represent this contiguous subsequence visually with a segment that extends from `C` backwards under all the commits that introduced cells that `C` refers to:
91
+
92
+ ![C refers to cells in C](../.attachments/cell-ordering/C-knows-of-C.png)<br />
93
+ _`C` refers to all cells introduced by `C` and all its ancestors up to and excluding `B`._
94
+
95
+
96
+ ![C refers to cells in A, B and C](../.attachments/cell-ordering/C-knows-of-ABC.png)<br />
97
+ _`C` refers to all cells introduced by `C` and all its ancestors up to and including `A`._
98
+
99
+ In this last example, the cell reference accumulation invariant means that since `C` refers to cells introduced by `A`,
100
+ it must also refer to cells introduced by `B`.
101
+
102
+ ## Cell Reference Accumulation In Practice
103
+
104
+ The above invariant can be interpreted to mean that the following is true for any commit `C`:
105
+ * There is a commit `OldestRef(C)` that is the commit which introduces the oldest cell that `C` refers to.
106
+ * `OldestRef(C)` is either `C` itself or one of `C`'s ancestors.
107
+ * `C` contains references to all cells introduced by commits `OldestRef(C)`, `C`, and all commits in between.
108
+
109
+ Since this property stems from inverses and rebases,
110
+ it's tempting to think that the `OldestRef(C)` of any commit `C` is the earliest commit it rebased over if `C` has been rebased,
111
+ or that is otherwise is the commit `C` is the inverse of if `C` is the inverse of a commit and has not been rebased,
112
+ or that is otherwise is `C` itself.
113
+ This intuition is wrong.
114
+ In practice, the `OldestRef(C)` of any commit `C` can be an earlier commit.
115
+ This is due to the following:
116
+ 1. When we invert `C`, the inverse will contain references to all cells that `C` referred to,
117
+ not just the ones that `C` introduced.
118
+ 2. When we rebase `C` over `X`, we don't just include in `C'` references to cell introduced by `X`,
119
+ we also includes references to all cells that `X` has references to.
120
+ 3. Rebasing `B` over a rollback commit `A⁻¹` adds to the rebased commit references to cells referenced by `A`.
121
+ These references are not dropped when later rebasing that commit over `A'`.
122
+
123
+ This can lead to more cells references than strictly necessary.
124
+ We may attempt to reduce the number of unnecessary references in [the future](#future-work).
125
+
126
+ ## Tie-Breaking: Cell Ordering From Commit Ordering
127
+
128
+ While cells help specify the relative order of content in sequences,
129
+ there are some situation where the information contained in commits only specifies a partial order.
130
+ Through a process known as "tie-breaking", the rebasing system is responsible for picking a total ordering that is consistent across peers.
131
+ It does this based on the relative sequencing order of the commits in the commit graph.
132
+ This happens in two cases:
133
+
134
+ 1. When cells are being introduced by the same gap by concurrent commits.<br />
135
+ ![X and A are concurrent](../.attachments/cell-ordering/XvsA.png)<br />
136
+ _`X` and `A` are concurrent so the relative order of cells they introduced by the same gap is unspecified.<br />
137
+ The colors have no intrinsic meaning. Their purpose is to depict which commit refers to cells introduced by which commit._
138
+
139
+ 2. When a commit `C` introduces cells in a gap where one of its ancestors (commit `A`) introduced cells that are empty in the input context of `C`,
140
+ and `C` does not include references to the cells introduced by `A`.<br />
141
+ ![A is an ancestor of C](../.attachments/cell-ordering/C-knows-of-C.png)<br />
142
+ _`C` does not refer to cells introduced by its ancestor `A`,
143
+ so the relative order of cells `C` and `A` introduce in the same gap is unspecified._
144
+
145
+ In both of these cases we order the cells introduced by the later commit left of the cells introduced by the earlier commit.
146
+ This leads to a system where,
147
+ in order to determine the relative order of two cells,
148
+ we sometimes need to know the relative order of the two commits that introduced the cells.
149
+
150
+ ## Compose
151
+
152
+ In this section, we consider the cell-ordering scenarios (tie-breaking and otherwise) that compose operations face.
153
+
154
+ When composing `A ○ B`, we know the following about the commit graph:
155
+
156
+ * `A` comes before `B` in sequencing order.
157
+ * `A` and `B` are not concurrent.
158
+ * There are no commits between `A` and `B` in sequencing order.
159
+ * There may be commits before `A` that either `A` and/or `B` can refer to.
160
+
161
+ We can represent this situation with the following commit graph:<br />
162
+ ![P1->P2->A->B](../.attachments/cell-ordering/compose-a-b.png)<br />
163
+ `P1` and `P2` are prior commits (which are not being composed).
164
+ They are included here because `A` and/or `B` may refer to cells that `P1` and `P2` introduce.
165
+ While there may be any number of such prior commits that introduced cells that `A` and/or `B` may refer to,
166
+ using two commits is sufficient to fully consider the relevant cases.
167
+
168
+ For each pair of cells (`ca`, `cb`) referred to by `A` and `B` respectively,
169
+ we need to be able to determine the relative ordering of `ca` and `cb`.
170
+ The space of possible comparisons looks like this:
171
+ ```
172
+ +---------------------+
173
+ | cb introduced by |
174
+ +----+----+-----+-----+
175
+ | P1 | P2 | A | B |
176
+ +------------------+----+----+----+-----+-----+
177
+ | | P1 | | | | |
178
+ | +----+----+----+-----+-----+
179
+ | ca introduced by | P2 | | | | |
180
+ | +----+----+----+-----+-----+
181
+ | | A | | | | |
182
+ +------------------+----+----+----+-----+-----+
183
+ ```
184
+
185
+ There are multiple ways the implementation of compose could be structured to deal with these cases.
186
+ For the purposes of this document, we are not interested in coming up with or describing a specific implementation.
187
+ We instead consider what information and techniques are available to possible implementations.
188
+
189
+ Reminder: given a commit `C` and a reference to a cell `c`,
190
+ we can use the cell ID used to reference `c` to check if `c` was introduced by `C`.
191
+
192
+ ### Pairs of Cells Introduced by The Same Commit
193
+
194
+ If `ca` and `cb` both refer to cells introduced by the same commit
195
+ (whether or not they refer to the exact same cell), then,
196
+ because commits always contain ordered references to either none or all cells introduced by a commit,
197
+ `A` or `B` must both contain ordered references both `ca` and `cb`.
198
+ This ordering can be looked up in either commit.
199
+ This takes care of the following cases:
200
+ ```
201
+ +---------------------+
202
+ | cb introduced by |
203
+ +----+----+-----+-----+
204
+ | P1 | P2 | A | B |
205
+ +------------------+----+----+----+-----+-----+
206
+ | | P1 | ## | | | |
207
+ | +----+----+----+-----+-----+
208
+ | ca introduced by | P2 | | ## | | |
209
+ | +----+----+----+-----+-----+
210
+ | | A | | | ### | |
211
+ +------------------+----+----+----+-----+-----+
212
+ ```
213
+
214
+ ### Pairs of Cells Introduced by Different Input Commits
215
+
216
+ The compose function can detect cases where `ca` refers to `A` and `cb` refers to `B`
217
+ because it has access to commits `A` and `B`.
218
+ These cases are trivially resolvable because we know `A` comes before `B` in sequencing order.
219
+ This takes care of the following cases:
220
+ ```
221
+ +---------------------+
222
+ | cb introduced by |
223
+ +----+----+-----+-----+
224
+ | P1 | P2 | A | B |
225
+ +------------------+----+----+----+-----+-----+
226
+ | | P1 | | | | |
227
+ | +----+----+----+-----+-----+
228
+ | ca introduced by | P2 | | | | |
229
+ | +----+----+----+-----+-----+
230
+ | | A | | | | ### |
231
+ +------------------+----+----+----+-----+-----+
232
+ ```
233
+
234
+ ### Pairs of Cells With One Cell Introduced by Either Input Commit
235
+
236
+ Being able to detect whether `ca` and/or `cb` were introduced by `A` or `B` also allows us to handle cases where only one of `ca` and `cb` refers to a cell introduced by `A` or `B`.
237
+ This is because any commit other than `A` and `B` that introduced cells that `A` or `B` might refer to must be an ancestor of `A` and `B`,
238
+ thus making the corresponding cell older.
239
+ This takes care of the following cases:
240
+ ```
241
+ +---------------------+
242
+ | cb introduced by |
243
+ +----+----+-----+-----+
244
+ | P1 | P2 | A | B |
245
+ +------------------+----+----+----+-----+-----+
246
+ | | P1 | | | ### | ### |
247
+ | +----+----+----+-----+-----+
248
+ | ca introduced by | P2 | | | ### | ### |
249
+ | +----+----+----+-----+-----+
250
+ | | A | ## | ## | | |
251
+ +------------------+----+----+----+-----+-----+
252
+ ```
253
+
254
+ ### Pairs of Cells Both Referred to by Either Commit
255
+
256
+ If `A` refers to both `ca` and `cb`, then the relative order of `ca` and `cb` can be looked up in `A`.
257
+ Similarly, if `B` refers to both `ca` and `cb`, then the relative order of `ca` and `cb` can be looked up in `B`.
258
+
259
+ This insight requires taking into consideration how the set of commits that have introduced cells that `A` refers to relates to the set of commits that have introduced cells that `B` refers to.
260
+ Specifically, it requires taking into consideration where these sets intersect.
261
+
262
+ As an example, consider the following scenario:<br />
263
+ ![](../.attachments/cell-ordering/compose-a-ref-p1-b-ref-p2.png)<br />
264
+ _`A` refers to cells introduced by `P1`, `P2`, and `A`.
265
+ `B` refers to cells introduced by `P2`, `A`, and `B`._
266
+
267
+ Because `A` and `B` both refer to cells introduced by `P2` and `A`,
268
+ no matter which commit introduced the cell that `ca` refers to,
269
+ any time `cb` refers to a cell introduced by `P2` or by `A`,
270
+ the relative ordering of `ca` and `cb` can be found in `A`.
271
+ This allows us to handle the following cases:
272
+ ```
273
+ +----------------+
274
+ |cb introduced by|
275
+ +----+-----+-----+
276
+ | P2 | A | B |
277
+ +------------------+----+----+-----+-----+
278
+ | | P1 | ## | ### | |
279
+ | +----+----+-----+-----+
280
+ | ca introduced by | P2 | ## | ### | |
281
+ | +----+----+-----+-----+
282
+ | | A | ## | ### | |
283
+ +------------------+----+----+-----+-----+
284
+ ```
285
+
286
+ Similarly, no matter which commit introduced the cell that `cb` refers to,
287
+ any time `ca` refers to a cell introduced by `P2` or by `A`,
288
+ the relative ordering of `ca` and `cb` can be found in `B`.
289
+ This allows us to handle the following cases:
290
+ ```
291
+ +----------------+
292
+ |cb introduced by|
293
+ +----+-----+-----+
294
+ | P2 | A | B |
295
+ +------------------+----+----+-----+-----+
296
+ | | P1 | | | |
297
+ | +----+----+-----+-----+
298
+ | ca introduced by | P2 | ## | ### | ### |
299
+ | +----+----+-----+-----+
300
+ | | A | ## | ### | ### |
301
+ +------------------+----+----+-----+-----+
302
+ ```
303
+
304
+ While this is only applicable to that scenario,
305
+ and different scenarios would yield different ordering capabilities using this approach,
306
+ we can intuit that this approach can at least be leveraged whenever the inclusion in one of the input commits of references to cells introduced by some commit entail the inclusion of references cells introduced by other commits.
307
+ This is the case here because the inclusion of one reference to a cell introduced by `P2` entails the inclusion of references to all cells introduced by `P2` and `P1`.
308
+ Similarly, the inclusion of one reference to a cell introduced by `P1` entails the inclusion of references to all cells introduced by `P1` and `A`.
309
+ This means that this approach can tackle the following cases:
310
+ ```
311
+ +---------------------+
312
+ | cb introduced by |
313
+ +----+----+-----+-----+
314
+ | P1 | P2 | A | B |
315
+ +------------------+----+----+----+-----+-----+
316
+ | | P1 | ## | ## | ### | |
317
+ | +----+----+----+-----+-----+
318
+ | ca introduced by | P2 | ## | ## | ### | |
319
+ | +----+----+----+-----+-----+
320
+ | | A | ## | ## | ### | |
321
+ +------------------+----+----+----+-----+-----+
322
+ ```
323
+
324
+ Note that we don't need to know which scenario we find ourselves in to benefit from this approach.
325
+ We can just check whether `A` contains a reference to `cb` or `B` contains a reference to `ca` and leverage whichever is the case.
326
+
327
+ ### Pairs of Cell Where `ca` Is Unknown to `B`
328
+
329
+ Whenever `ca` refers to a cell that `B` has no reference to,
330
+ we can be sure that `ca` was introduced by a commit that is older than whichever one introduced the cell that `cb` refers to.
331
+
332
+ To see this is true, consider all the possible scenarios where `A` could make a reference to a cell that `B` does not refer to:<br />
333
+ ![](../.attachments/cell-ordering/compose-b-no-ref-to-ca.png)
334
+
335
+ In all such scenarios, cells known to `A` and unknown to `B` are introduced by commits that have a blue underline but no red underline,
336
+ while `cb` must be introduced by a commit that has a red underline (whether or not it also has blue underline).
337
+ One can see from the diagrams that the former always precedes the latter in sequencing order.
338
+
339
+ ### Pairs of Cell Where `cb` Is Unknown to `A` But Not Introduced by `B`
340
+
341
+ Whenever `cb` refers to a cell that `A` has no reference to,
342
+ and `cb` was not introduced by `B`,
343
+ then we know that `cb` must have been introduced by either `P1` or `P2`,
344
+ and that `A` has no reference to cells introduced that far back.
345
+ This means that `cb` refers to a cell introduced before `ca` was introduced.
346
+
347
+ ### Putting it All Together
348
+
349
+ By looking at which cases each of these approaches can handle,
350
+ we can see that, when taken together, they are sufficient to address any cell ordering scenario in compositions.
351
+ This shows how implementations of compose need not rely on extra metadata in order to correctly order cells.*
352
+
353
+ *See the [Rollback commits](#rollback-commits) section to see how they fit into this.
354
+
355
+ ## Rebase
356
+
357
+ In this section, we consider the cell-ordering scenarios (tie-breaking and otherwise) that rebase operations face.
358
+
359
+ When rebasing `B ↷ X`, we know the following about the commit graph:
360
+
361
+ * `X` and `B` are concurrent.
362
+ * `X` comes before `B` in sequencing order.
363
+
364
+ In the simplest case, it's also true that `X` and `B` have the same ancestry and therefore the same input context.
365
+ This is true when rebasing a branch that contains a single commit:<br />
366
+ ![](../.attachments/cell-ordering/rebase-b-over-x.png)<br />
367
+ with the goal to produce `B'`:<br />
368
+ ![](../.attachments/cell-ordering/rebase-to-bprime.png)<br />
369
+
370
+ In the more general case, there can be any number of commits between `P` and `B` on the branch to be rebased:<br />
371
+ ![](../.attachments/cell-ordering/rebase-ab-over-x.png)<br />
372
+ with the goal to produce rebased versions of each before `B'`:<br />
373
+ ![](../.attachments/cell-ordering/rebase-to-abprime.png)<br />
374
+
375
+ This prevents us from directly rebasing `B` over `X` because they have different input context.
376
+ When confronted to this general case,
377
+ we first rebase `B` over the inverses of all the commits between `B` and its lowest common ancestor with `X` (`P2` here).
378
+ This maneuver produces to a commit `B2` whose input context is *compatible* with `X`'s:<br />
379
+ ![](../.attachments/cell-ordering/rebase-b2.png)
380
+
381
+ It is this `B2` commit that is passed to the rebase function when performing `B ↷ X`.
382
+ The graph of relevant commits in the general case therefore looks like this:<br />
383
+ ![](../.attachments/cell-ordering/rebase-b2-over-x.png)
384
+
385
+ When we say that `B2`'s input context is compatible with `X`'s,
386
+ what we means is that they are only different in ways that rebase is equipped to handle.
387
+ Specifically, rebase can handle the fact that `B2` may refer to cells that were introduced by ancestors that it does not share with `X` (`A` in our example).
388
+
389
+ In the remainder of this section, we use `B` to refer to all variants of `B`,
390
+ and `B2` when statements more specifically apply to that particular variant of `B`.
391
+
392
+ For each pair of cells (`cb`, `cx`) referred to by `B2` and `X` respectively,
393
+ we need to be able to determine the relative ordering of `cb` and `cx`.
394
+ The space of possible comparisons looks like this:
395
+ ```
396
+ +---------------------+
397
+ | cb introduced by |
398
+ +----+----+-----+-----+
399
+ | P1 | P2 | A | B |
400
+ +------------------+----+----+----+-----+-----+
401
+ | | P1 | | | | |
402
+ | +----+----+----+-----+-----+
403
+ | cx introduced by | P2 | | | | |
404
+ | +----+----+----+-----+-----+
405
+ | | X | | | | |
406
+ +------------------+----+----+----+-----+-----+
407
+ ```
408
+
409
+ While there may be any number of commits between `P2` and `B` on the rebased branch,
410
+ we only consider the case with a single commit (`A`) as opposed to, e.g., `A1` and `A2`.
411
+ This is sufficient because the set of cell ordering case involving such commits is the same:
412
+ they might need to be ordered relative to cells introduced by `P1`, `P2`, or `X`
413
+ and there's nothing that would make this process different for `A1` compared to `A2`.
414
+
415
+ As we did for compose, we consider what information and techniques are available to possible implementations.
416
+ We gloss over the explanation when it is the same as it was for compose.
417
+
418
+ ### Pairs of Cells Introduced by The Same Commit
419
+
420
+ As for compose, this takes care of the following cases:
421
+ ```
422
+ +---------------------+
423
+ | cb introduced by |
424
+ +----+----+-----+-----+
425
+ | P1 | P2 | A | B |
426
+ +------------------+----+----+----+-----+-----+
427
+ | | P1 | ## | | | |
428
+ | +----+----+----+-----+-----+
429
+ | cx introduced by | P2 | | ## | | |
430
+ | +----+----+----+-----+-----+
431
+ | | X | | | | |
432
+ +------------------+----+----+----+-----+-----+
433
+ ```
434
+
435
+ ### Pairs of Cells Introduced by Different Input Commits
436
+
437
+ As for compose, this takes care of the following cases:
438
+ ```
439
+ +---------------------+
440
+ | cb introduced by |
441
+ +----+----+-----+-----+
442
+ | P1 | P2 | A | B |
443
+ +------------------+----+----+----+-----+-----+
444
+ | | P1 | | | | |
445
+ | +----+----+----+-----+-----+
446
+ | cx introduced by | P2 | | | | |
447
+ | +----+----+----+-----+-----+
448
+ | | X | | | | ### |
449
+ +------------------+----+----+----+-----+-----+
450
+ ```
451
+
452
+ ### Pairs of Cells With One Cell Introduced by `B`
453
+
454
+ If `cb` refers to a cell introduced by `B`,
455
+ then we know that `cx` is older that `cb` because any commit that introduced a cell that `cx` might refer to is older than `B`.
456
+ This takes care of the following cases:
457
+ ```
458
+ +---------------------+
459
+ | cb introduced by |
460
+ +----+----+-----+-----+
461
+ | P1 | P2 | A | B |
462
+ +------------------+----+----+----+-----+-----+
463
+ | | P1 | | | | ### |
464
+ | +----+----+----+-----+-----+
465
+ | cx introduced by | P2 | | | | ### |
466
+ | +----+----+----+-----+-----+
467
+ | | X | | | | ### |
468
+ +------------------+----+----+----+-----+-----+
469
+ ```
470
+
471
+ Note that we cannot handle cases where `cx` refers to a cell introduced by `X` and `cb` does not refer to a cell introduced by `B`
472
+ because `cb` might refer either to a cell introduced by `P1`, `P2` or `A`,
473
+ which have different implications for cell ordering relative to cells introduced by `X`.
474
+
475
+ ### Pairs of Cells Both Referred to by Either Commit
476
+
477
+ This works the same as in compose,
478
+ though it only applies to cells introduced by `P1` or `P2`:
479
+ ```
480
+ +---------------------+
481
+ | cb introduced by |
482
+ +----+----+-----+-----+
483
+ | P1 | P2 | A | B |
484
+ +------------------+----+----+----+-----+-----+
485
+ | | P1 | ## | ## | | |
486
+ | +----+----+----+-----+-----+
487
+ | cx introduced by | P2 | ## | ## | | |
488
+ | +----+----+----+-----+-----+
489
+ | | X | | | | |
490
+ +------------------+----+----+----+-----+-----+
491
+ ```
492
+
493
+ ### Pairs of Cell Where `cx` Is Unknown to `B`
494
+
495
+ This works the same as in compose.
496
+
497
+ ### Pairs of Cell Where `cb` Is Unknown to `X` But Not Introduced by `B`
498
+
499
+ We cannot leverage this situation for ordering cells because `cb` could be introduced in either `A`, `P1`, or `P2`,
500
+ which have different ordering implication with respect to `cx`.
501
+
502
+ ### Putting it All Together
503
+
504
+ By looking at which cases each of these approaches can handle,
505
+ we can see that they are enough to collectively address the following cases:
506
+ ```
507
+ +---------------------+
508
+ | cb introduced by |
509
+ +----+----+-----+-----+
510
+ | P1 | P2 | A | B |
511
+ +------------------+----+----+----+-----+-----+
512
+ | | P1 | ## | ## | | ### |
513
+ | +----+----+----+-----+-----+
514
+ | cx introduced by | P2 | ## | ## | | ### |
515
+ | +----+----+----+-----+-----+
516
+ | | X | | | | ### |
517
+ +------------------+----+----+----+-----+-----+
518
+ ```
519
+
520
+ The three cases where `cb` is a cell introduced by `A` seem like they ought to be straightforward:
521
+ `A` comes after `P1`, `P2`, and `X`, so `cx` is older than `cb`.
522
+ The problem is that we don't know how to differentiate these cases from the ones were `cb` was introduced by by `P1` or `P2`.
523
+ This is because the rebase implementation has no way of determining if `cb` was introduced by `A`.
524
+
525
+ ### Providing Metadata
526
+
527
+ In order to be able to tackle the remaining cases,
528
+ rebase needs to be able to detect references to cells that were introduced by any commit between `B` and the lowest common ancestor of `X` and `B`.
529
+ In other words, rebase needs to be able to check if a cell was introduced by a commit on the branch that is being rebased.
530
+
531
+ ### A Different Way?
532
+
533
+ It's interesting to note that rebase's need for metadata only comes from our choice of scheme for handling branch rebasing.
534
+ We can imagine a different approach where all commits on the branch are composed together into a single commit that is then rebased as a unit.
535
+ Such an approach would ensure that the rebased commit and the commit that it is rebased over truly have the same ancestry and the same input context,
536
+ and it would remove the need for the extra metadata.
537
+
538
+ ## Rollback Commits
539
+
540
+ Rollback commits are a tool that the high-level rebasing algorithm uses in order to leverage low-level rebasing operations for the purpose of performing branch rebases and for computing the net change on a tree whose local edits have been rebased.
541
+
542
+ Rollback commits are not real commits:
543
+ * They don't represent a user edit.
544
+ * They don't define a valid revision in the document history.
545
+ * They are not rebasable.
546
+
547
+ Rollback commits do not abide by the cell reference accumulation invariant.
548
+ Consider the scenario where a branch with commits `A` and `B` is being rebased over `X`:
549
+ producing the net change requires composing `B⁻¹ ○ A⁻¹ ○ X ○ A' ○ B'`.
550
+ The rollback commits `B⁻¹` and `A⁻¹` may refer to cells that are introduced by commits `B'` and `A'`,
551
+ which come later in the composition order.
552
+ Also, composing `B⁻¹` with `A⁻¹` might require tie-breaking cells introduced by `A` and `B`.
553
+ This would normally be done based on the ordering of the commit passed to the compose operation,
554
+ but using such an order would yield the wrong tie-break behavior since `B⁻¹` and `A⁻¹` are passed to compose in the order that is the reverse of the actual sequencing order.
555
+ The same is true for compositions that involve rollback commits and normal commits, such as `A⁻¹ ○ X`.
556
+
557
+ ### In Compose
558
+
559
+ Each rollback commit contains information about which commit it is a rollback of.
560
+ You could say each rollback comes with its own metadata.
561
+ The compose implementation can leverage this metadata to infer the sequencing order of commits from the order of the commits it is given.
562
+
563
+ Compose having to know about the existence of rollback commits is a downward leak from the high-level rebasing algorithm.
564
+
565
+ ### In Rebase
566
+
567
+ Rollback commits do not cause additional cell-ordering challenges during rebasing.
568
+ The rollback commits themselves are never rebased.
569
+ When rebasing over a rollback commit,
570
+ the commit being rebased is always a commit that was sequenced after the commit being rolled back.
571
+ This is in line with rebase's expectations when it comes to the relative sequence ordering of the commits it is passed as input.
572
+
573
+ ### Tiding Up
574
+
575
+ We could avoid ever passing rollback commits to compose
576
+ (and therefore not require logic in the compose implementation to watch out for rollback commits).
577
+
578
+ For rebasing commit `C` when rebasing branch `[A, B, C]` over commit `X`,
579
+ we currently do `C ↷ (B⁻¹ ○ A⁻¹ ○ X ○ A' ○ B')`.
580
+ Instead, we could do `(C ↷ (A ○ B)⁻¹) ↷ (X ○ A' ○ B')`.
581
+
582
+ We could define an `unbase` operation that performs `C ↷ (A ○ B)⁻¹` as an implementation detail.
583
+ The advantage of that is that the changeset produced by `(A ○ B)⁻¹` wouldn't exist outside the scope of this `unbase` operation.
584
+
585
+ For updating the tree state when rebasing branch `[A, B]` over commit `X`,
586
+ we currently apply a single delta that is generated by computing `Δ(B⁻¹ ○ A⁻¹ ○ X ○ A' ○ B')`.
587
+ Instead, we could apply `Δ((A ○ B)⁻¹)` then apply `Δ(X ○ A' ○ B')`.
588
+ The trouble with that, is that it will feed a lot of change notifications to delta visitors (and ultimately the app)
589
+ even when the net change is minimal.
590
+
591
+ Instead we could try to implement composition for delta and apply the composition of these two deltas
592
+ (which should largely cancel out).
593
+
594
+ ## Commit With Constraint Violations
595
+
596
+ Commits with constraint violations may introduce cells that downstream commits depend on for ordering.
597
+ (See the test "Rebase over a commit that depends on a commit that has become conflicted" for an example.)
598
+ We currently handle this by ensuring that rebasing over a commit with constraint violations does add the necessary references.
599
+
600
+ [Longer term](#future-work), we would rather change the system so that such rebases are not needed.
601
+
602
+ ## Future Work
603
+
604
+ At a high level, cell ordering is defined by a combination of two things:
605
+ * The partial order that stems from edit operations that impose a relative order between nodes and their corresponding cells.
606
+ * The tie-breaking behavior.
607
+
608
+ Commits must include enough information to convey the partial order (at least when it goes against the ordering that tie-breaking would yield).
609
+ Tie-breaking requires information about the relative ordering of commits on the relevant branch.
610
+
611
+ Our current scheme for cell ordering tries to minimize the amount of metadata that needs to be passed to operations like rebase and compose.
612
+ It does so by relying on the commit order that is implicitly conveyed when passing commits to these operations,
613
+ and by adding cell references during rebases even when such references are not truly needed to convey the partial order.
614
+ This last part is noticeable in the "Rebase over a commit that depends on a commit that has become conflicted" test:
615
+ A commit that rebases over a conflicted commit needs to acquire new cell references for the sole purpose of making later rebase operations work without knowledge of the relative ordering of the commits that introduced the cells.
616
+
617
+ Our current scheme therefore has the following smells:
618
+ 1. It tries to minimize the use of metadata, but never fully succeeds in making it unnecessary.
619
+ 1. It relies on the commit order that is implicitly conveyed when passing commits to rebase and compose,
620
+ but that order doesn't always match the true sequencing order.
621
+ 1. Storing extra cell references inside commits in order to make up of a lack of commit ordering information later on
622
+ is inefficient and makes it harder to keep track of what references are needed and why.
623
+ It also leads to situations where we rebase over conflicted commits which goes against the reasonable intuition that such commits make no changes and therefore shouldn't need to be rebased over.
624
+
625
+ The current scheme is designed around the flawed assumption that the commits passed to rebase and compose operations contain all the information that these operations requires
626
+ or that such information can be inferred from the call (e.g., `A ○ B` implies `A` was sequenced before `B`).
627
+ We then make up for this flaw in convoluted ways.
628
+ We should instead move to a system where we fully embrace the fact that commit ordering information about some commits might be needed in operations that don't directly involve these commits.
629
+
630
+ Such as system would be more in tune with how we would like to think of cells being introduced:
631
+ merely as being a declaration that such a cell exists, has existed for all time, and will continue to exist for all time.
632
+ Such a declaration should not constitute a change (and therefore does not need to be rebased over).
633
+ In fact, under this model, it would be wrong for the rebase logic to take such a declaration into account.
634
+
635
+ We want to make metadata about commit sequencing fully available to rebase and compose operations.
636
+ This will allow us to only use cell references where they are truly needed for the purpose of capturing information about the partial ordering of empty cells.
637
+ It will also make the scenarios where the true commit ordering doesn't match the implicit order of commits less special since the ordering metadata will provide the source of truth for these cases just as it does for more normal cases.
638
+ This effectively reduces the amount of leakage from the high-level rebase logic to the low-level rebase and compose operations.
package/lib/alpha.d.ts CHANGED
@@ -171,6 +171,8 @@ export {
171
171
  RunTransactionParams,
172
172
  SchemaFactoryAlpha,
173
173
  SchemaFactoryObjectOptions,
174
+ SchemaStaticsAlpha,
175
+ SchemaUpgrade,
174
176
  SchemaValidationFunction,
175
177
  SharedTreeFormatOptions,
176
178
  SharedTreeFormatVersion,
@@ -210,7 +212,6 @@ export {
210
212
  TreeViewAlpha,
211
213
  TreeViewConfigurationAlpha,
212
214
  UnannotateAllowedType,
213
- UnannotateAllowedTypeOrLazyItem,
214
215
  UnannotateAllowedTypes,
215
216
  UnannotateAllowedTypesList,
216
217
  UnannotateImplicitAllowedTypes,
@@ -2,12 +2,12 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import type { RevisionTag } from "../index.js";
6
5
  import type { FieldKey } from "../schema-stored/index.js";
7
6
  import { type ITreeCursorSynchronous } from "./cursor.js";
8
7
  import type * as Delta from "./delta.js";
9
8
  import type { DetachedFieldIndex } from "./detachedFieldIndex.js";
10
9
  import type { NodeIndex, PlaceIndex, Range } from "./pathTree.js";
10
+ import type { RevisionTag } from "../rebase/index.js";
11
11
  /**
12
12
  * Implementation notes:
13
13
  *