@fluidframework/tree 2.3.0-288113 → 2.4.0-294316

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 (900) hide show
  1. package/.dependency-cruiser-known-violations.json +28 -40
  2. package/.vscode/Tree.code-workspace +0 -2
  3. package/CHANGELOG.md +92 -0
  4. package/README.md +6 -0
  5. package/alpha.d.ts +11 -0
  6. package/api-extractor/api-extractor-lint-alpha.cjs.json +5 -0
  7. package/api-extractor/api-extractor-lint-alpha.esm.json +5 -0
  8. package/api-extractor/api-extractor-lint-legacy.cjs.json +5 -0
  9. package/api-extractor/api-extractor-lint-legacy.esm.json +5 -0
  10. package/api-extractor/api-extractor.current.json +8 -0
  11. package/api-extractor/api-extractor.legacy.json +4 -0
  12. package/api-extractor.json +1 -1
  13. package/api-report/tree.alpha.api.md +42 -54
  14. package/api-report/tree.beta.api.md +35 -16
  15. package/api-report/tree.legacy.alpha.api.md +571 -0
  16. package/api-report/tree.legacy.public.api.md +568 -0
  17. package/api-report/tree.public.api.md +22 -18
  18. package/dist/alpha.d.ts +103 -0
  19. package/dist/beta.d.ts +7 -2
  20. package/dist/core/index.d.ts +2 -2
  21. package/dist/core/index.d.ts.map +1 -1
  22. package/dist/core/index.js +4 -3
  23. package/dist/core/index.js.map +1 -1
  24. package/dist/core/rebase/index.d.ts +1 -1
  25. package/dist/core/rebase/index.d.ts.map +1 -1
  26. package/dist/core/rebase/index.js +2 -1
  27. package/dist/core/rebase/index.js.map +1 -1
  28. package/dist/core/rebase/types.d.ts +1 -0
  29. package/dist/core/rebase/types.d.ts.map +1 -1
  30. package/dist/core/rebase/types.js +8 -1
  31. package/dist/core/rebase/types.js.map +1 -1
  32. package/dist/core/{revertible/revertible.d.ts → revertible.d.ts} +12 -0
  33. package/dist/core/revertible.d.ts.map +1 -0
  34. package/dist/core/revertible.js.map +1 -0
  35. package/dist/core/schema-stored/format.d.ts +3 -3
  36. package/dist/core/schema-stored/format.js +1 -1
  37. package/dist/core/schema-stored/format.js.map +1 -1
  38. package/dist/core/schema-stored/schema.d.ts +2 -7
  39. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  40. package/dist/core/schema-stored/schema.js +4 -6
  41. package/dist/core/schema-stored/schema.js.map +1 -1
  42. package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  43. package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  44. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  45. package/dist/core/tree/anchorSet.js +6 -2
  46. package/dist/core/tree/anchorSet.js.map +1 -1
  47. package/dist/core/tree/detachedFieldIndex.d.ts +0 -1
  48. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  49. package/dist/core/tree/detachedFieldIndex.js +1 -0
  50. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  51. package/dist/core/tree/visitDelta.d.ts +7 -2
  52. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  53. package/dist/core/tree/visitDelta.js.map +1 -1
  54. package/dist/events/emitter.d.ts +127 -0
  55. package/dist/events/emitter.d.ts.map +1 -0
  56. package/dist/events/{events.js → emitter.js} +48 -30
  57. package/dist/events/emitter.js.map +1 -0
  58. package/dist/events/index.d.ts +2 -1
  59. package/dist/events/index.d.ts.map +1 -1
  60. package/dist/events/index.js +4 -5
  61. package/dist/events/index.js.map +1 -1
  62. package/dist/events/interop.d.ts +36 -0
  63. package/dist/events/interop.d.ts.map +1 -0
  64. package/dist/{core/revertible/index.d.ts → events/interop.js} +3 -2
  65. package/dist/events/interop.js.map +1 -0
  66. package/dist/events/listeners.d.ts +65 -0
  67. package/dist/events/listeners.d.ts.map +1 -0
  68. package/{lib/core/revertible/index.d.ts → dist/events/listeners.js} +3 -2
  69. package/dist/events/listeners.js.map +1 -0
  70. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +25 -7
  71. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  72. package/dist/feature-libraries/chunked-forest/chunkTree.js +36 -15
  73. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  74. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +4 -2
  75. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  76. package/dist/feature-libraries/chunked-forest/chunkedForest.js +12 -5
  77. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +15 -2
  79. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  80. package/dist/feature-libraries/chunked-forest/uniformChunk.js +28 -2
  81. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  82. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -1
  83. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  84. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +5 -4
  85. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  86. package/dist/feature-libraries/flex-map-tree/index.d.ts +1 -1
  87. package/dist/feature-libraries/flex-map-tree/index.d.ts.map +1 -1
  88. package/dist/feature-libraries/flex-map-tree/index.js +2 -1
  89. package/dist/feature-libraries/flex-map-tree/index.js.map +1 -1
  90. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts +35 -33
  91. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
  92. package/dist/feature-libraries/flex-map-tree/mapTreeNode.js +82 -103
  93. package/dist/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
  94. package/dist/feature-libraries/flex-tree/context.d.ts +30 -14
  95. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  96. package/dist/feature-libraries/flex-tree/context.js +10 -7
  97. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  98. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +57 -190
  99. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  100. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +15 -3
  101. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  102. package/dist/feature-libraries/flex-tree/index.d.ts +2 -3
  103. package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
  104. package/dist/feature-libraries/flex-tree/index.js.map +1 -1
  105. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts +3 -3
  106. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  107. package/dist/feature-libraries/flex-tree/lazyEntity.js +2 -10
  108. package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  109. package/dist/feature-libraries/flex-tree/lazyField.d.ts +26 -28
  110. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  111. package/dist/feature-libraries/flex-tree/lazyField.js +11 -14
  112. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  113. package/dist/feature-libraries/flex-tree/lazyNode.d.ts +5 -26
  114. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  115. package/dist/feature-libraries/flex-tree/lazyNode.js +23 -74
  116. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  117. package/dist/feature-libraries/flex-tree/unboxed.d.ts +4 -16
  118. package/dist/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
  119. package/dist/feature-libraries/flex-tree/unboxed.js +7 -41
  120. package/dist/feature-libraries/flex-tree/unboxed.js.map +1 -1
  121. package/dist/feature-libraries/flex-tree/utilities.d.ts +2 -2
  122. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  123. package/dist/feature-libraries/flex-tree/utilities.js +3 -6
  124. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  125. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  126. package/dist/feature-libraries/forest-summary/forestSummarizer.js +4 -1
  127. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  128. package/dist/feature-libraries/index.d.ts +3 -5
  129. package/dist/feature-libraries/index.d.ts.map +1 -1
  130. package/dist/feature-libraries/index.js +5 -11
  131. package/dist/feature-libraries/index.js.map +1 -1
  132. package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  133. package/dist/feature-libraries/modular-schema/comparison.js +3 -6
  134. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  135. package/dist/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
  136. package/dist/feature-libraries/modular-schema/discrepancies.js +3 -13
  137. package/dist/feature-libraries/modular-schema/discrepancies.js.map +1 -1
  138. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +4 -1
  139. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  140. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -1
  141. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  142. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +73 -22
  143. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  144. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +6 -6
  145. package/dist/feature-libraries/schema-index/format.d.ts +3 -3
  146. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  147. package/dist/feature-libraries/sequence-field/compose.js +3 -0
  148. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  149. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  150. package/dist/feature-libraries/sequence-field/utils.js +1 -4
  151. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  152. package/dist/feature-libraries/storedToViewSchema.d.ts.map +1 -1
  153. package/dist/feature-libraries/storedToViewSchema.js +2 -4
  154. package/dist/feature-libraries/storedToViewSchema.js.map +1 -1
  155. package/dist/feature-libraries/typed-schema/flexList.d.ts +3 -3
  156. package/dist/feature-libraries/typed-schema/flexList.js.map +1 -1
  157. package/dist/feature-libraries/typed-schema/index.d.ts +2 -2
  158. package/dist/feature-libraries/typed-schema/index.d.ts.map +1 -1
  159. package/dist/feature-libraries/typed-schema/index.js +2 -2
  160. package/dist/feature-libraries/typed-schema/index.js.map +1 -1
  161. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
  162. package/dist/feature-libraries/typed-schema/schemaCollection.js +8 -10
  163. package/dist/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
  164. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +17 -48
  165. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  166. package/dist/feature-libraries/typed-schema/typedTreeSchema.js +5 -37
  167. package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  168. package/dist/feature-libraries/typed-schema/view.d.ts +4 -6
  169. package/dist/feature-libraries/typed-schema/view.d.ts.map +1 -1
  170. package/dist/feature-libraries/typed-schema/view.js +5 -4
  171. package/dist/feature-libraries/typed-schema/view.js.map +1 -1
  172. package/dist/index.d.ts +4 -4
  173. package/dist/index.d.ts.map +1 -1
  174. package/dist/index.js +33 -36
  175. package/dist/index.js.map +1 -1
  176. package/dist/legacy.d.ts +84 -0
  177. package/dist/packageVersion.d.ts +1 -1
  178. package/dist/packageVersion.js +1 -1
  179. package/dist/packageVersion.js.map +1 -1
  180. package/dist/public.d.ts +1 -1
  181. package/dist/shared-tree/checkoutFlexTreeView.d.ts +53 -0
  182. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -0
  183. package/dist/shared-tree/{treeView.js → checkoutFlexTreeView.js} +28 -6
  184. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -0
  185. package/dist/shared-tree/index.d.ts +3 -3
  186. package/dist/shared-tree/index.d.ts.map +1 -1
  187. package/dist/shared-tree/index.js +2 -2
  188. package/dist/shared-tree/index.js.map +1 -1
  189. package/dist/shared-tree/schematizeTree.d.ts +15 -4
  190. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  191. package/dist/shared-tree/schematizeTree.js +7 -8
  192. package/dist/shared-tree/schematizeTree.js.map +1 -1
  193. package/dist/shared-tree/schematizingTreeView.d.ts +10 -4
  194. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  195. package/dist/shared-tree/schematizingTreeView.js +28 -12
  196. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  197. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  198. package/dist/shared-tree/sharedTree.js +2 -2
  199. package/dist/shared-tree/sharedTree.js.map +1 -1
  200. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +3 -1
  201. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  202. package/dist/shared-tree/sharedTreeChangeEnricher.js +6 -2
  203. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  204. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +3 -1
  205. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  206. package/dist/shared-tree/sharedTreeChangeFamily.js +3 -2
  207. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  208. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +2 -1
  209. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  210. package/dist/shared-tree/sharedTreeEditBuilder.js +2 -2
  211. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  212. package/dist/shared-tree/treeApi.d.ts +1 -3
  213. package/dist/shared-tree/treeApi.d.ts.map +1 -1
  214. package/dist/shared-tree/treeApi.js +6 -4
  215. package/dist/shared-tree/treeApi.js.map +1 -1
  216. package/dist/shared-tree/treeCheckout.d.ts +2 -13
  217. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  218. package/dist/shared-tree/treeCheckout.js +17 -1
  219. package/dist/shared-tree/treeCheckout.js.map +1 -1
  220. package/dist/shared-tree-core/branch.js +1 -1
  221. package/dist/shared-tree-core/branch.js.map +1 -1
  222. package/dist/simple-tree/api/create.d.ts.map +1 -1
  223. package/dist/simple-tree/api/create.js +1 -1
  224. package/dist/simple-tree/api/create.js.map +1 -1
  225. package/{lib/simple-tree → dist/simple-tree/api}/getJsonSchema.d.ts +1 -1
  226. package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -0
  227. package/dist/simple-tree/{getJsonSchema.js → api/getJsonSchema.js} +1 -1
  228. package/dist/simple-tree/api/getJsonSchema.js.map +1 -0
  229. package/{lib/simple-tree → dist/simple-tree/api}/getSimpleSchema.d.ts +1 -1
  230. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -0
  231. package/dist/simple-tree/{getSimpleSchema.js → api/getSimpleSchema.js} +1 -1
  232. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -0
  233. package/dist/simple-tree/api/index.d.ts +5 -0
  234. package/dist/simple-tree/api/index.d.ts.map +1 -1
  235. package/dist/simple-tree/api/index.js +7 -1
  236. package/dist/simple-tree/api/index.js.map +1 -1
  237. package/{lib/simple-tree → dist/simple-tree/api}/jsonSchema.d.ts +14 -15
  238. package/dist/simple-tree/api/jsonSchema.d.ts.map +1 -0
  239. package/dist/simple-tree/api/jsonSchema.js.map +1 -0
  240. package/dist/simple-tree/api/schemaFactory.d.ts +53 -16
  241. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  242. package/dist/simple-tree/api/schemaFactory.js +49 -12
  243. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  244. package/dist/simple-tree/{simpleSchema.d.ts → api/simpleSchema.d.ts} +8 -4
  245. package/dist/simple-tree/api/simpleSchema.d.ts.map +1 -0
  246. package/dist/simple-tree/api/simpleSchema.js.map +1 -0
  247. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -0
  248. package/dist/simple-tree/{simpleSchemaToJsonSchema.js → api/simpleSchemaToJsonSchema.js} +34 -21
  249. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -0
  250. package/dist/simple-tree/api/tree.d.ts +5 -21
  251. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  252. package/dist/simple-tree/api/tree.js +3 -38
  253. package/dist/simple-tree/api/tree.js.map +1 -1
  254. package/dist/simple-tree/api/treeApiBeta.d.ts +79 -0
  255. package/dist/simple-tree/api/treeApiBeta.d.ts.map +1 -0
  256. package/dist/simple-tree/api/treeApiBeta.js +26 -0
  257. package/dist/simple-tree/api/treeApiBeta.js.map +1 -0
  258. package/dist/simple-tree/api/treeNodeApi.d.ts +1 -1
  259. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  260. package/dist/simple-tree/api/treeNodeApi.js +21 -19
  261. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  262. package/dist/simple-tree/api/verboseTree.js +2 -2
  263. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  264. package/dist/simple-tree/{viewSchemaToSimpleSchema.d.ts → api/viewSchemaToSimpleSchema.d.ts} +1 -1
  265. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -0
  266. package/dist/simple-tree/{viewSchemaToSimpleSchema.js → api/viewSchemaToSimpleSchema.js} +8 -4
  267. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -0
  268. package/dist/simple-tree/arrayNode.d.ts +2 -2
  269. package/dist/simple-tree/arrayNode.d.ts.map +1 -1
  270. package/dist/simple-tree/arrayNode.js +30 -21
  271. package/dist/simple-tree/arrayNode.js.map +1 -1
  272. package/dist/simple-tree/core/index.d.ts +3 -3
  273. package/dist/simple-tree/core/index.d.ts.map +1 -1
  274. package/dist/simple-tree/core/index.js +4 -1
  275. package/dist/simple-tree/core/index.js.map +1 -1
  276. package/dist/simple-tree/core/schemaCaching.d.ts +5 -0
  277. package/dist/simple-tree/core/schemaCaching.d.ts.map +1 -1
  278. package/dist/simple-tree/core/schemaCaching.js +10 -1
  279. package/dist/simple-tree/core/schemaCaching.js.map +1 -1
  280. package/dist/simple-tree/core/treeNodeKernel.d.ts +61 -3
  281. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  282. package/dist/simple-tree/core/treeNodeKernel.js +166 -13
  283. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  284. package/dist/simple-tree/core/treeNodeSchema.d.ts +1 -1
  285. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  286. package/dist/simple-tree/core/types.d.ts +17 -20
  287. package/dist/simple-tree/core/types.d.ts.map +1 -1
  288. package/dist/simple-tree/core/types.js.map +1 -1
  289. package/dist/simple-tree/core/withType.d.ts +3 -2
  290. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  291. package/dist/simple-tree/core/withType.js.map +1 -1
  292. package/dist/simple-tree/index.d.ts +8 -10
  293. package/dist/simple-tree/index.d.ts.map +1 -1
  294. package/dist/simple-tree/index.js +15 -6
  295. package/dist/simple-tree/index.js.map +1 -1
  296. package/dist/simple-tree/leafNodeSchema.d.ts +7 -9
  297. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  298. package/dist/simple-tree/leafNodeSchema.js +13 -11
  299. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  300. package/dist/simple-tree/mapNode.d.ts +1 -1
  301. package/dist/simple-tree/mapNode.d.ts.map +1 -1
  302. package/dist/simple-tree/mapNode.js +38 -29
  303. package/dist/simple-tree/mapNode.js.map +1 -1
  304. package/dist/simple-tree/objectNode.d.ts +9 -7
  305. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  306. package/dist/simple-tree/objectNode.js +37 -31
  307. package/dist/simple-tree/objectNode.js.map +1 -1
  308. package/dist/simple-tree/proxies.d.ts +1 -14
  309. package/dist/simple-tree/proxies.d.ts.map +1 -1
  310. package/dist/simple-tree/proxies.js +12 -15
  311. package/dist/simple-tree/proxies.js.map +1 -1
  312. package/dist/simple-tree/proxyBinding.d.ts +2 -62
  313. package/dist/simple-tree/proxyBinding.d.ts.map +1 -1
  314. package/dist/simple-tree/proxyBinding.js +8 -181
  315. package/dist/simple-tree/proxyBinding.js.map +1 -1
  316. package/dist/simple-tree/schemaTypes.d.ts +51 -11
  317. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  318. package/dist/simple-tree/schemaTypes.js +14 -4
  319. package/dist/simple-tree/schemaTypes.js.map +1 -1
  320. package/dist/simple-tree/toFlexSchema.d.ts +11 -1
  321. package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
  322. package/dist/simple-tree/toFlexSchema.js +54 -31
  323. package/dist/simple-tree/toFlexSchema.js.map +1 -1
  324. package/dist/simple-tree/toMapTree.d.ts +25 -37
  325. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  326. package/dist/simple-tree/toMapTree.js +53 -16
  327. package/dist/simple-tree/toMapTree.js.map +1 -1
  328. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  329. package/dist/simple-tree/treeNodeValid.js +7 -10
  330. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  331. package/dist/simple-tree/typesUnsafe.d.ts +13 -13
  332. package/dist/simple-tree/typesUnsafe.js.map +1 -1
  333. package/dist/simple-tree/walkSchema.d.ts +26 -0
  334. package/dist/simple-tree/walkSchema.d.ts.map +1 -0
  335. package/dist/simple-tree/walkSchema.js +49 -0
  336. package/dist/simple-tree/walkSchema.js.map +1 -0
  337. package/dist/treeFactory.d.ts +2 -1
  338. package/dist/treeFactory.d.ts.map +1 -1
  339. package/dist/treeFactory.js +2 -1
  340. package/dist/treeFactory.js.map +1 -1
  341. package/dist/util/typeUtils.d.ts +2 -2
  342. package/dist/util/typeUtils.js.map +1 -1
  343. package/legacy.d.ts +11 -0
  344. package/lib/alpha.d.ts +103 -0
  345. package/lib/beta.d.ts +7 -2
  346. package/lib/core/index.d.ts +2 -2
  347. package/lib/core/index.d.ts.map +1 -1
  348. package/lib/core/index.js +2 -2
  349. package/lib/core/index.js.map +1 -1
  350. package/lib/core/rebase/index.d.ts +1 -1
  351. package/lib/core/rebase/index.d.ts.map +1 -1
  352. package/lib/core/rebase/index.js +1 -1
  353. package/lib/core/rebase/index.js.map +1 -1
  354. package/lib/core/rebase/types.d.ts +1 -0
  355. package/lib/core/rebase/types.d.ts.map +1 -1
  356. package/lib/core/rebase/types.js +6 -0
  357. package/lib/core/rebase/types.js.map +1 -1
  358. package/lib/core/{revertible/revertible.d.ts → revertible.d.ts} +12 -0
  359. package/lib/core/revertible.d.ts.map +1 -0
  360. package/lib/core/revertible.js.map +1 -0
  361. package/lib/core/schema-stored/format.d.ts +3 -3
  362. package/lib/core/schema-stored/format.js +1 -1
  363. package/lib/core/schema-stored/format.js.map +1 -1
  364. package/lib/core/schema-stored/schema.d.ts +2 -7
  365. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  366. package/lib/core/schema-stored/schema.js +4 -6
  367. package/lib/core/schema-stored/schema.js.map +1 -1
  368. package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  369. package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  370. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  371. package/lib/core/tree/anchorSet.js +6 -2
  372. package/lib/core/tree/anchorSet.js.map +1 -1
  373. package/lib/core/tree/detachedFieldIndex.d.ts +0 -1
  374. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  375. package/lib/core/tree/detachedFieldIndex.js +1 -0
  376. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  377. package/lib/core/tree/visitDelta.d.ts +7 -2
  378. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  379. package/lib/core/tree/visitDelta.js.map +1 -1
  380. package/lib/events/emitter.d.ts +127 -0
  381. package/lib/events/emitter.d.ts.map +1 -0
  382. package/lib/events/{events.js → emitter.js} +48 -29
  383. package/lib/events/emitter.js.map +1 -0
  384. package/lib/events/index.d.ts +2 -1
  385. package/lib/events/index.d.ts.map +1 -1
  386. package/lib/events/index.js +1 -1
  387. package/lib/events/index.js.map +1 -1
  388. package/lib/events/interop.d.ts +36 -0
  389. package/lib/events/interop.d.ts.map +1 -0
  390. package/{src/core/revertible/index.ts → lib/events/interop.js} +2 -2
  391. package/lib/events/interop.js.map +1 -0
  392. package/lib/events/listeners.d.ts +65 -0
  393. package/lib/events/listeners.d.ts.map +1 -0
  394. package/lib/{core/revertible/index.js → events/listeners.js} +2 -2
  395. package/lib/events/listeners.js.map +1 -0
  396. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +25 -7
  397. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  398. package/lib/feature-libraries/chunked-forest/chunkTree.js +37 -16
  399. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  400. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +4 -2
  401. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  402. package/lib/feature-libraries/chunked-forest/chunkedForest.js +12 -5
  403. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  404. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +15 -2
  405. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  406. package/lib/feature-libraries/chunked-forest/uniformChunk.js +28 -2
  407. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  408. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -1
  409. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  410. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +5 -4
  411. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  412. package/lib/feature-libraries/flex-map-tree/index.d.ts +1 -1
  413. package/lib/feature-libraries/flex-map-tree/index.d.ts.map +1 -1
  414. package/lib/feature-libraries/flex-map-tree/index.js +1 -1
  415. package/lib/feature-libraries/flex-map-tree/index.js.map +1 -1
  416. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts +35 -33
  417. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
  418. package/lib/feature-libraries/flex-map-tree/mapTreeNode.js +83 -104
  419. package/lib/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
  420. package/lib/feature-libraries/flex-tree/context.d.ts +30 -14
  421. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  422. package/lib/feature-libraries/flex-tree/context.js +10 -7
  423. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  424. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +57 -190
  425. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  426. package/lib/feature-libraries/flex-tree/flexTreeTypes.js +15 -2
  427. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  428. package/lib/feature-libraries/flex-tree/index.d.ts +2 -3
  429. package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
  430. package/lib/feature-libraries/flex-tree/index.js +1 -1
  431. package/lib/feature-libraries/flex-tree/index.js.map +1 -1
  432. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +3 -3
  433. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  434. package/lib/feature-libraries/flex-tree/lazyEntity.js +2 -10
  435. package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  436. package/lib/feature-libraries/flex-tree/lazyField.d.ts +26 -28
  437. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  438. package/lib/feature-libraries/flex-tree/lazyField.js +11 -13
  439. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  440. package/lib/feature-libraries/flex-tree/lazyNode.d.ts +5 -26
  441. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  442. package/lib/feature-libraries/flex-tree/lazyNode.js +23 -72
  443. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  444. package/lib/feature-libraries/flex-tree/unboxed.d.ts +4 -16
  445. package/lib/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
  446. package/lib/feature-libraries/flex-tree/unboxed.js +5 -37
  447. package/lib/feature-libraries/flex-tree/unboxed.js.map +1 -1
  448. package/lib/feature-libraries/flex-tree/utilities.d.ts +2 -2
  449. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  450. package/lib/feature-libraries/flex-tree/utilities.js +3 -6
  451. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  452. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  453. package/lib/feature-libraries/forest-summary/forestSummarizer.js +4 -1
  454. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  455. package/lib/feature-libraries/index.d.ts +3 -5
  456. package/lib/feature-libraries/index.d.ts.map +1 -1
  457. package/lib/feature-libraries/index.js +5 -5
  458. package/lib/feature-libraries/index.js.map +1 -1
  459. package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  460. package/lib/feature-libraries/modular-schema/comparison.js +3 -6
  461. package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
  462. package/lib/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
  463. package/lib/feature-libraries/modular-schema/discrepancies.js +3 -13
  464. package/lib/feature-libraries/modular-schema/discrepancies.js.map +1 -1
  465. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +4 -1
  466. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  467. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -1
  468. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  469. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +74 -23
  470. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  471. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +6 -6
  472. package/lib/feature-libraries/schema-index/format.d.ts +3 -3
  473. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  474. package/lib/feature-libraries/sequence-field/compose.js +3 -0
  475. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  476. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  477. package/lib/feature-libraries/sequence-field/utils.js +2 -5
  478. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  479. package/lib/feature-libraries/storedToViewSchema.d.ts.map +1 -1
  480. package/lib/feature-libraries/storedToViewSchema.js +3 -5
  481. package/lib/feature-libraries/storedToViewSchema.js.map +1 -1
  482. package/lib/feature-libraries/typed-schema/flexList.d.ts +3 -3
  483. package/lib/feature-libraries/typed-schema/flexList.js.map +1 -1
  484. package/lib/feature-libraries/typed-schema/index.d.ts +2 -2
  485. package/lib/feature-libraries/typed-schema/index.d.ts.map +1 -1
  486. package/lib/feature-libraries/typed-schema/index.js +2 -2
  487. package/lib/feature-libraries/typed-schema/index.js.map +1 -1
  488. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
  489. package/lib/feature-libraries/typed-schema/schemaCollection.js +9 -11
  490. package/lib/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
  491. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +17 -48
  492. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  493. package/lib/feature-libraries/typed-schema/typedTreeSchema.js +5 -36
  494. package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  495. package/lib/feature-libraries/typed-schema/view.d.ts +4 -6
  496. package/lib/feature-libraries/typed-schema/view.d.ts.map +1 -1
  497. package/lib/feature-libraries/typed-schema/view.js +5 -4
  498. package/lib/feature-libraries/typed-schema/view.js.map +1 -1
  499. package/lib/index.d.ts +4 -4
  500. package/lib/index.d.ts.map +1 -1
  501. package/lib/index.js +3 -5
  502. package/lib/index.js.map +1 -1
  503. package/lib/legacy.d.ts +84 -0
  504. package/lib/packageVersion.d.ts +1 -1
  505. package/lib/packageVersion.js +1 -1
  506. package/lib/packageVersion.js.map +1 -1
  507. package/lib/public.d.ts +1 -1
  508. package/lib/shared-tree/checkoutFlexTreeView.d.ts +53 -0
  509. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -0
  510. package/lib/shared-tree/{treeView.js → checkoutFlexTreeView.js} +26 -5
  511. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -0
  512. package/lib/shared-tree/index.d.ts +3 -3
  513. package/lib/shared-tree/index.d.ts.map +1 -1
  514. package/lib/shared-tree/index.js +1 -1
  515. package/lib/shared-tree/index.js.map +1 -1
  516. package/lib/shared-tree/schematizeTree.d.ts +15 -4
  517. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  518. package/lib/shared-tree/schematizeTree.js +8 -9
  519. package/lib/shared-tree/schematizeTree.js.map +1 -1
  520. package/lib/shared-tree/schematizingTreeView.d.ts +10 -4
  521. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  522. package/lib/shared-tree/schematizingTreeView.js +29 -13
  523. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  524. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  525. package/lib/shared-tree/sharedTree.js +2 -2
  526. package/lib/shared-tree/sharedTree.js.map +1 -1
  527. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +3 -1
  528. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  529. package/lib/shared-tree/sharedTreeChangeEnricher.js +6 -2
  530. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  531. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +3 -1
  532. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  533. package/lib/shared-tree/sharedTreeChangeFamily.js +3 -2
  534. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  535. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +2 -1
  536. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  537. package/lib/shared-tree/sharedTreeEditBuilder.js +2 -2
  538. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  539. package/lib/shared-tree/treeApi.d.ts +1 -3
  540. package/lib/shared-tree/treeApi.d.ts.map +1 -1
  541. package/lib/shared-tree/treeApi.js +7 -5
  542. package/lib/shared-tree/treeApi.js.map +1 -1
  543. package/lib/shared-tree/treeCheckout.d.ts +2 -13
  544. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  545. package/lib/shared-tree/treeCheckout.js +18 -2
  546. package/lib/shared-tree/treeCheckout.js.map +1 -1
  547. package/lib/shared-tree-core/branch.js +1 -1
  548. package/lib/shared-tree-core/branch.js.map +1 -1
  549. package/lib/simple-tree/api/create.d.ts.map +1 -1
  550. package/lib/simple-tree/api/create.js +2 -2
  551. package/lib/simple-tree/api/create.js.map +1 -1
  552. package/{dist/simple-tree → lib/simple-tree/api}/getJsonSchema.d.ts +1 -1
  553. package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -0
  554. package/lib/simple-tree/{getJsonSchema.js → api/getJsonSchema.js} +1 -1
  555. package/lib/simple-tree/api/getJsonSchema.js.map +1 -0
  556. package/{dist/simple-tree → lib/simple-tree/api}/getSimpleSchema.d.ts +1 -1
  557. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -0
  558. package/lib/simple-tree/{getSimpleSchema.js → api/getSimpleSchema.js} +1 -1
  559. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -0
  560. package/lib/simple-tree/api/index.d.ts +5 -0
  561. package/lib/simple-tree/api/index.d.ts.map +1 -1
  562. package/lib/simple-tree/api/index.js +3 -0
  563. package/lib/simple-tree/api/index.js.map +1 -1
  564. package/{dist/simple-tree → lib/simple-tree/api}/jsonSchema.d.ts +14 -15
  565. package/lib/simple-tree/api/jsonSchema.d.ts.map +1 -0
  566. package/lib/simple-tree/api/jsonSchema.js.map +1 -0
  567. package/lib/simple-tree/api/schemaFactory.d.ts +53 -16
  568. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  569. package/lib/simple-tree/api/schemaFactory.js +49 -12
  570. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  571. package/lib/simple-tree/{simpleSchema.d.ts → api/simpleSchema.d.ts} +8 -4
  572. package/lib/simple-tree/api/simpleSchema.d.ts.map +1 -0
  573. package/lib/simple-tree/api/simpleSchema.js.map +1 -0
  574. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -0
  575. package/lib/simple-tree/{simpleSchemaToJsonSchema.js → api/simpleSchemaToJsonSchema.js} +35 -22
  576. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -0
  577. package/lib/simple-tree/api/tree.d.ts +5 -21
  578. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  579. package/lib/simple-tree/api/tree.js +2 -34
  580. package/lib/simple-tree/api/tree.js.map +1 -1
  581. package/lib/simple-tree/api/treeApiBeta.d.ts +79 -0
  582. package/lib/simple-tree/api/treeApiBeta.d.ts.map +1 -0
  583. package/lib/simple-tree/api/treeApiBeta.js +23 -0
  584. package/lib/simple-tree/api/treeApiBeta.js.map +1 -0
  585. package/lib/simple-tree/api/treeNodeApi.d.ts +1 -1
  586. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  587. package/lib/simple-tree/api/treeNodeApi.js +23 -21
  588. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  589. package/lib/simple-tree/api/verboseTree.js +1 -1
  590. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  591. package/lib/simple-tree/{viewSchemaToSimpleSchema.d.ts → api/viewSchemaToSimpleSchema.d.ts} +1 -1
  592. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -0
  593. package/lib/simple-tree/{viewSchemaToSimpleSchema.js → api/viewSchemaToSimpleSchema.js} +8 -4
  594. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -0
  595. package/lib/simple-tree/arrayNode.d.ts +2 -2
  596. package/lib/simple-tree/arrayNode.d.ts.map +1 -1
  597. package/lib/simple-tree/arrayNode.js +33 -24
  598. package/lib/simple-tree/arrayNode.js.map +1 -1
  599. package/lib/simple-tree/core/index.d.ts +3 -3
  600. package/lib/simple-tree/core/index.d.ts.map +1 -1
  601. package/lib/simple-tree/core/index.js +2 -2
  602. package/lib/simple-tree/core/index.js.map +1 -1
  603. package/lib/simple-tree/core/schemaCaching.d.ts +5 -0
  604. package/lib/simple-tree/core/schemaCaching.d.ts.map +1 -1
  605. package/lib/simple-tree/core/schemaCaching.js +8 -0
  606. package/lib/simple-tree/core/schemaCaching.js.map +1 -1
  607. package/lib/simple-tree/core/treeNodeKernel.d.ts +61 -3
  608. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  609. package/lib/simple-tree/core/treeNodeKernel.js +156 -5
  610. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  611. package/lib/simple-tree/core/treeNodeSchema.d.ts +1 -1
  612. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  613. package/lib/simple-tree/core/types.d.ts +17 -20
  614. package/lib/simple-tree/core/types.d.ts.map +1 -1
  615. package/lib/simple-tree/core/types.js.map +1 -1
  616. package/lib/simple-tree/core/withType.d.ts +3 -2
  617. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  618. package/lib/simple-tree/core/withType.js.map +1 -1
  619. package/lib/simple-tree/index.d.ts +8 -10
  620. package/lib/simple-tree/index.d.ts.map +1 -1
  621. package/lib/simple-tree/index.js +5 -5
  622. package/lib/simple-tree/index.js.map +1 -1
  623. package/lib/simple-tree/leafNodeSchema.d.ts +7 -9
  624. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  625. package/lib/simple-tree/leafNodeSchema.js +14 -12
  626. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  627. package/lib/simple-tree/mapNode.d.ts +1 -1
  628. package/lib/simple-tree/mapNode.d.ts.map +1 -1
  629. package/lib/simple-tree/mapNode.js +38 -29
  630. package/lib/simple-tree/mapNode.js.map +1 -1
  631. package/lib/simple-tree/objectNode.d.ts +9 -7
  632. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  633. package/lib/simple-tree/objectNode.js +40 -34
  634. package/lib/simple-tree/objectNode.js.map +1 -1
  635. package/lib/simple-tree/proxies.d.ts +1 -14
  636. package/lib/simple-tree/proxies.d.ts.map +1 -1
  637. package/lib/simple-tree/proxies.js +11 -14
  638. package/lib/simple-tree/proxies.js.map +1 -1
  639. package/lib/simple-tree/proxyBinding.d.ts +2 -62
  640. package/lib/simple-tree/proxyBinding.d.ts.map +1 -1
  641. package/lib/simple-tree/proxyBinding.js +6 -174
  642. package/lib/simple-tree/proxyBinding.js.map +1 -1
  643. package/lib/simple-tree/schemaTypes.d.ts +51 -11
  644. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  645. package/lib/simple-tree/schemaTypes.js +14 -4
  646. package/lib/simple-tree/schemaTypes.js.map +1 -1
  647. package/lib/simple-tree/toFlexSchema.d.ts +11 -1
  648. package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
  649. package/lib/simple-tree/toFlexSchema.js +29 -8
  650. package/lib/simple-tree/toFlexSchema.js.map +1 -1
  651. package/lib/simple-tree/toMapTree.d.ts +25 -37
  652. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  653. package/lib/simple-tree/toMapTree.js +54 -17
  654. package/lib/simple-tree/toMapTree.js.map +1 -1
  655. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  656. package/lib/simple-tree/treeNodeValid.js +8 -11
  657. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  658. package/lib/simple-tree/typesUnsafe.d.ts +13 -13
  659. package/lib/simple-tree/typesUnsafe.js.map +1 -1
  660. package/lib/simple-tree/walkSchema.d.ts +26 -0
  661. package/lib/simple-tree/walkSchema.d.ts.map +1 -0
  662. package/lib/simple-tree/walkSchema.js +43 -0
  663. package/lib/simple-tree/walkSchema.js.map +1 -0
  664. package/lib/treeFactory.d.ts +2 -1
  665. package/lib/treeFactory.d.ts.map +1 -1
  666. package/lib/treeFactory.js +2 -1
  667. package/lib/treeFactory.js.map +1 -1
  668. package/lib/tsdoc-metadata.json +1 -1
  669. package/lib/util/typeUtils.d.ts +2 -2
  670. package/lib/util/typeUtils.js.map +1 -1
  671. package/package.json +68 -26
  672. package/src/core/index.ts +2 -1
  673. package/src/core/rebase/index.ts +1 -0
  674. package/src/core/rebase/types.ts +11 -0
  675. package/src/core/{revertible/revertible.ts → revertible.ts} +15 -0
  676. package/src/core/schema-stored/format.ts +1 -1
  677. package/src/core/schema-stored/schema.ts +7 -13
  678. package/src/core/tree/anchorSet.ts +18 -3
  679. package/src/core/tree/detachedFieldIndex.ts +6 -5
  680. package/src/core/tree/visitDelta.ts +7 -2
  681. package/src/events/{events.ts → emitter.ts} +52 -139
  682. package/src/events/index.ts +7 -7
  683. package/src/events/interop.ts +49 -0
  684. package/src/events/listeners.ts +68 -0
  685. package/src/feature-libraries/chunked-forest/chunkTree.ts +63 -18
  686. package/src/feature-libraries/chunked-forest/chunkedForest.ts +18 -4
  687. package/src/feature-libraries/chunked-forest/uniformChunk.ts +33 -0
  688. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +5 -3
  689. package/src/feature-libraries/flex-map-tree/index.ts +1 -0
  690. package/src/feature-libraries/flex-map-tree/mapTreeNode.ts +135 -210
  691. package/src/feature-libraries/flex-tree/README.md +4 -75
  692. package/src/feature-libraries/flex-tree/context.ts +37 -16
  693. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +69 -291
  694. package/src/feature-libraries/flex-tree/index.ts +7 -13
  695. package/src/feature-libraries/flex-tree/lazyEntity.ts +2 -11
  696. package/src/feature-libraries/flex-tree/lazyField.ts +49 -73
  697. package/src/feature-libraries/flex-tree/lazyNode.ts +25 -154
  698. package/src/feature-libraries/flex-tree/unboxed.ts +9 -68
  699. package/src/feature-libraries/flex-tree/utilities.ts +4 -8
  700. package/src/feature-libraries/forest-summary/forestSummarizer.ts +4 -1
  701. package/src/feature-libraries/index.ts +2 -27
  702. package/src/feature-libraries/modular-schema/comparison.ts +4 -6
  703. package/src/feature-libraries/modular-schema/discrepancies.ts +7 -16
  704. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +4 -1
  705. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +111 -14
  706. package/src/feature-libraries/sequence-field/compose.ts +3 -0
  707. package/src/feature-libraries/sequence-field/utils.ts +2 -4
  708. package/src/feature-libraries/storedToViewSchema.ts +5 -6
  709. package/src/feature-libraries/typed-schema/flexList.ts +3 -3
  710. package/src/feature-libraries/typed-schema/index.ts +1 -3
  711. package/src/feature-libraries/typed-schema/schemaCollection.ts +15 -17
  712. package/src/feature-libraries/typed-schema/typedTreeSchema.ts +35 -127
  713. package/src/feature-libraries/typed-schema/view.ts +4 -13
  714. package/src/index.ts +5 -8
  715. package/src/packageVersion.ts +1 -1
  716. package/src/shared-tree/checkoutFlexTreeView.ts +89 -0
  717. package/src/shared-tree/index.ts +2 -7
  718. package/src/shared-tree/schematizeTree.ts +23 -12
  719. package/src/shared-tree/schematizingTreeView.ts +38 -24
  720. package/src/shared-tree/sharedTree.ts +6 -1
  721. package/src/shared-tree/sharedTreeChangeEnricher.ts +6 -1
  722. package/src/shared-tree/sharedTreeChangeFamily.ts +7 -1
  723. package/src/shared-tree/sharedTreeEditBuilder.ts +9 -4
  724. package/src/shared-tree/treeApi.ts +10 -10
  725. package/src/shared-tree/treeCheckout.ts +26 -15
  726. package/src/shared-tree-core/branch.ts +1 -1
  727. package/src/simple-tree/ProxyBinding.md +23 -23
  728. package/src/simple-tree/api/create.ts +8 -3
  729. package/src/simple-tree/{getJsonSchema.ts → api/getJsonSchema.ts} +3 -3
  730. package/src/simple-tree/{getSimpleSchema.ts → api/getSimpleSchema.ts} +3 -3
  731. package/src/simple-tree/api/index.ts +20 -0
  732. package/src/simple-tree/{jsonSchema.ts → api/jsonSchema.ts} +20 -18
  733. package/src/simple-tree/api/schemaFactory.ts +56 -19
  734. package/src/simple-tree/{simpleSchema.ts → api/simpleSchema.ts} +9 -4
  735. package/src/simple-tree/{simpleSchemaToJsonSchema.ts → api/simpleSchemaToJsonSchema.ts} +43 -22
  736. package/src/simple-tree/api/tree.ts +7 -71
  737. package/src/simple-tree/api/treeApiBeta.ts +101 -0
  738. package/src/simple-tree/api/treeNodeApi.ts +32 -23
  739. package/src/simple-tree/api/verboseTree.ts +1 -1
  740. package/src/simple-tree/{viewSchemaToSimpleSchema.ts → api/viewSchemaToSimpleSchema.ts} +11 -6
  741. package/src/simple-tree/arrayNode.ts +37 -31
  742. package/src/simple-tree/core/index.ts +4 -1
  743. package/src/simple-tree/core/schemaCaching.ts +10 -0
  744. package/src/simple-tree/core/treeNodeKernel.ts +198 -5
  745. package/src/simple-tree/core/treeNodeSchema.ts +1 -1
  746. package/src/simple-tree/core/types.ts +16 -27
  747. package/src/simple-tree/core/withType.ts +3 -1
  748. package/src/simple-tree/index.ts +30 -21
  749. package/src/simple-tree/leafNodeSchema.ts +24 -28
  750. package/src/simple-tree/mapNode.ts +47 -29
  751. package/src/simple-tree/objectNode.ts +51 -46
  752. package/src/simple-tree/proxies.ts +22 -51
  753. package/src/simple-tree/proxyBinding.ts +3 -254
  754. package/src/simple-tree/schemaTypes.ts +63 -13
  755. package/src/simple-tree/toFlexSchema.ts +40 -7
  756. package/src/simple-tree/toMapTree.ts +113 -79
  757. package/src/simple-tree/treeNodeValid.ts +10 -13
  758. package/src/simple-tree/typesUnsafe.ts +13 -13
  759. package/src/simple-tree/walkSchema.ts +81 -0
  760. package/src/treeFactory.ts +2 -1
  761. package/src/util/typeUtils.ts +2 -2
  762. package/dist/core/revertible/index.d.ts.map +0 -1
  763. package/dist/core/revertible/index.js +0 -10
  764. package/dist/core/revertible/index.js.map +0 -1
  765. package/dist/core/revertible/revertible.d.ts.map +0 -1
  766. package/dist/core/revertible/revertible.js.map +0 -1
  767. package/dist/domains/index.d.ts +0 -8
  768. package/dist/domains/index.d.ts.map +0 -1
  769. package/dist/domains/index.js +0 -20
  770. package/dist/domains/index.js.map +0 -1
  771. package/dist/domains/json/index.d.ts +0 -7
  772. package/dist/domains/json/index.d.ts.map +0 -1
  773. package/dist/domains/json/index.js +0 -17
  774. package/dist/domains/json/index.js.map +0 -1
  775. package/dist/domains/json/jsonCursor.d.ts +0 -52
  776. package/dist/domains/json/jsonCursor.d.ts.map +0 -1
  777. package/dist/domains/json/jsonCursor.js +0 -197
  778. package/dist/domains/json/jsonCursor.js.map +0 -1
  779. package/dist/domains/json/jsonDomainSchema.d.ts +0 -24
  780. package/dist/domains/json/jsonDomainSchema.d.ts.map +0 -1
  781. package/dist/domains/json/jsonDomainSchema.js +0 -32
  782. package/dist/domains/json/jsonDomainSchema.js.map +0 -1
  783. package/dist/domains/leafDomain.d.ts +0 -72
  784. package/dist/domains/leafDomain.d.ts.map +0 -1
  785. package/dist/domains/leafDomain.js +0 -88
  786. package/dist/domains/leafDomain.js.map +0 -1
  787. package/dist/domains/schemaBuilder.d.ts +0 -103
  788. package/dist/domains/schemaBuilder.d.ts.map +0 -1
  789. package/dist/domains/schemaBuilder.js +0 -121
  790. package/dist/domains/schemaBuilder.js.map +0 -1
  791. package/dist/domains/testRecursiveDomain.d.ts +0 -17
  792. package/dist/domains/testRecursiveDomain.d.ts.map +0 -1
  793. package/dist/domains/testRecursiveDomain.js +0 -35
  794. package/dist/domains/testRecursiveDomain.js.map +0 -1
  795. package/dist/events/events.d.ts +0 -207
  796. package/dist/events/events.d.ts.map +0 -1
  797. package/dist/events/events.js.map +0 -1
  798. package/dist/feature-libraries/schemaBuilder.d.ts +0 -31
  799. package/dist/feature-libraries/schemaBuilder.d.ts.map +0 -1
  800. package/dist/feature-libraries/schemaBuilder.js +0 -40
  801. package/dist/feature-libraries/schemaBuilder.js.map +0 -1
  802. package/dist/feature-libraries/schemaBuilderBase.d.ts +0 -191
  803. package/dist/feature-libraries/schemaBuilderBase.d.ts.map +0 -1
  804. package/dist/feature-libraries/schemaBuilderBase.js +0 -201
  805. package/dist/feature-libraries/schemaBuilderBase.js.map +0 -1
  806. package/dist/shared-tree/treeView.d.ts +0 -73
  807. package/dist/shared-tree/treeView.d.ts.map +0 -1
  808. package/dist/shared-tree/treeView.js.map +0 -1
  809. package/dist/simple-tree/getJsonSchema.d.ts.map +0 -1
  810. package/dist/simple-tree/getJsonSchema.js.map +0 -1
  811. package/dist/simple-tree/getSimpleSchema.d.ts.map +0 -1
  812. package/dist/simple-tree/getSimpleSchema.js.map +0 -1
  813. package/dist/simple-tree/jsonSchema.d.ts.map +0 -1
  814. package/dist/simple-tree/jsonSchema.js.map +0 -1
  815. package/dist/simple-tree/simpleSchema.d.ts.map +0 -1
  816. package/dist/simple-tree/simpleSchema.js.map +0 -1
  817. package/dist/simple-tree/simpleSchemaToJsonSchema.d.ts.map +0 -1
  818. package/dist/simple-tree/simpleSchemaToJsonSchema.js.map +0 -1
  819. package/dist/simple-tree/viewSchemaToSimpleSchema.d.ts.map +0 -1
  820. package/dist/simple-tree/viewSchemaToSimpleSchema.js.map +0 -1
  821. package/lib/core/revertible/index.d.ts.map +0 -1
  822. package/lib/core/revertible/index.js.map +0 -1
  823. package/lib/core/revertible/revertible.d.ts.map +0 -1
  824. package/lib/core/revertible/revertible.js.map +0 -1
  825. package/lib/domains/index.d.ts +0 -8
  826. package/lib/domains/index.d.ts.map +0 -1
  827. package/lib/domains/index.js +0 -8
  828. package/lib/domains/index.js.map +0 -1
  829. package/lib/domains/json/index.d.ts +0 -7
  830. package/lib/domains/json/index.d.ts.map +0 -1
  831. package/lib/domains/json/index.js +0 -7
  832. package/lib/domains/json/index.js.map +0 -1
  833. package/lib/domains/json/jsonCursor.d.ts +0 -52
  834. package/lib/domains/json/jsonCursor.d.ts.map +0 -1
  835. package/lib/domains/json/jsonCursor.js +0 -192
  836. package/lib/domains/json/jsonCursor.js.map +0 -1
  837. package/lib/domains/json/jsonDomainSchema.d.ts +0 -24
  838. package/lib/domains/json/jsonDomainSchema.d.ts.map +0 -1
  839. package/lib/domains/json/jsonDomainSchema.js +0 -29
  840. package/lib/domains/json/jsonDomainSchema.js.map +0 -1
  841. package/lib/domains/leafDomain.d.ts +0 -72
  842. package/lib/domains/leafDomain.d.ts.map +0 -1
  843. package/lib/domains/leafDomain.js +0 -85
  844. package/lib/domains/leafDomain.js.map +0 -1
  845. package/lib/domains/schemaBuilder.d.ts +0 -103
  846. package/lib/domains/schemaBuilder.d.ts.map +0 -1
  847. package/lib/domains/schemaBuilder.js +0 -117
  848. package/lib/domains/schemaBuilder.js.map +0 -1
  849. package/lib/domains/testRecursiveDomain.d.ts +0 -17
  850. package/lib/domains/testRecursiveDomain.d.ts.map +0 -1
  851. package/lib/domains/testRecursiveDomain.js +0 -32
  852. package/lib/domains/testRecursiveDomain.js.map +0 -1
  853. package/lib/events/events.d.ts +0 -207
  854. package/lib/events/events.d.ts.map +0 -1
  855. package/lib/events/events.js.map +0 -1
  856. package/lib/feature-libraries/schemaBuilder.d.ts +0 -31
  857. package/lib/feature-libraries/schemaBuilder.d.ts.map +0 -1
  858. package/lib/feature-libraries/schemaBuilder.js +0 -36
  859. package/lib/feature-libraries/schemaBuilder.js.map +0 -1
  860. package/lib/feature-libraries/schemaBuilderBase.d.ts +0 -191
  861. package/lib/feature-libraries/schemaBuilderBase.d.ts.map +0 -1
  862. package/lib/feature-libraries/schemaBuilderBase.js +0 -195
  863. package/lib/feature-libraries/schemaBuilderBase.js.map +0 -1
  864. package/lib/shared-tree/treeView.d.ts +0 -73
  865. package/lib/shared-tree/treeView.d.ts.map +0 -1
  866. package/lib/shared-tree/treeView.js.map +0 -1
  867. package/lib/simple-tree/getJsonSchema.d.ts.map +0 -1
  868. package/lib/simple-tree/getJsonSchema.js.map +0 -1
  869. package/lib/simple-tree/getSimpleSchema.d.ts.map +0 -1
  870. package/lib/simple-tree/getSimpleSchema.js.map +0 -1
  871. package/lib/simple-tree/jsonSchema.d.ts.map +0 -1
  872. package/lib/simple-tree/jsonSchema.js.map +0 -1
  873. package/lib/simple-tree/simpleSchema.d.ts.map +0 -1
  874. package/lib/simple-tree/simpleSchema.js.map +0 -1
  875. package/lib/simple-tree/simpleSchemaToJsonSchema.d.ts.map +0 -1
  876. package/lib/simple-tree/simpleSchemaToJsonSchema.js.map +0 -1
  877. package/lib/simple-tree/viewSchemaToSimpleSchema.d.ts.map +0 -1
  878. package/lib/simple-tree/viewSchemaToSimpleSchema.js.map +0 -1
  879. package/src/domains/README.md +0 -6
  880. package/src/domains/fence.json +0 -5
  881. package/src/domains/index.ts +0 -19
  882. package/src/domains/json/fence.json +0 -5
  883. package/src/domains/json/index.ts +0 -13
  884. package/src/domains/json/jsonCursor.ts +0 -247
  885. package/src/domains/json/jsonDomainSchema.ts +0 -47
  886. package/src/domains/leafDomain.ts +0 -97
  887. package/src/domains/schemaBuilder.ts +0 -153
  888. package/src/domains/testRecursiveDomain.ts +0 -38
  889. package/src/events/fence.json +0 -5
  890. package/src/feature-libraries/schemaBuilder.ts +0 -45
  891. package/src/feature-libraries/schemaBuilderBase.ts +0 -393
  892. package/src/shared-tree/treeView.ts +0 -113
  893. /package/dist/core/{revertible/revertible.js → revertible.js} +0 -0
  894. /package/dist/simple-tree/{jsonSchema.js → api/jsonSchema.js} +0 -0
  895. /package/dist/simple-tree/{simpleSchema.js → api/simpleSchema.js} +0 -0
  896. /package/dist/simple-tree/{simpleSchemaToJsonSchema.d.ts → api/simpleSchemaToJsonSchema.d.ts} +0 -0
  897. /package/lib/core/{revertible/revertible.js → revertible.js} +0 -0
  898. /package/lib/simple-tree/{jsonSchema.js → api/jsonSchema.js} +0 -0
  899. /package/lib/simple-tree/{simpleSchema.js → api/simpleSchema.js} +0 -0
  900. /package/lib/simple-tree/{simpleSchemaToJsonSchema.d.ts → api/simpleSchemaToJsonSchema.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walkSchema.js","sourceRoot":"","sources":["../../src/simple-tree/walkSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,8CAAgE;AAChE,2DAAqD;AACrD,6DAA0D;AAC1D,qDAK0B;AAE1B,SAAgB,cAAc,CAC7B,MAAsB,EACtB,OAAsB,EACtB,UAA+B;IAE/B,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,C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AAY,EAAE,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC;AATD,4CASC","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 { type TreeNodeSchema, NodeKind } from \"./core/index.js\";\nimport { LeafNodeSchema } from \"./leafNodeSchema.js\";\nimport { isObjectNodeSchema } from \"./objectNodeTypes.js\";\nimport {\n\ttype ImplicitAllowedTypes,\n\tnormalizeAllowedTypes,\n\ttype ImplicitFieldSchema,\n\tnormalizeFieldSchema,\n} from \"./schemaTypes.js\";\n\nexport function walkNodeSchema(\n\tschema: TreeNodeSchema,\n\tvisitor: SchemaVisitor,\n\tvisitedSet: Set<TreeNodeSchema>,\n): void {\n\tif (visitedSet.has(schema)) {\n\t\treturn;\n\t}\n\tvisitedSet.add(schema);\n\tif (schema instanceof LeafNodeSchema) {\n\t\t// nothing to do\n\t} else if (isObjectNodeSchema(schema)) {\n\t\tfor (const field of schema.fields.values()) {\n\t\t\twalkFieldSchema(field, visitor, visitedSet);\n\t\t}\n\t} else {\n\t\tassert(\n\t\t\tschema.kind === NodeKind.Array || schema.kind === NodeKind.Map,\n\t\t\t0x9b3 /* invalid schema */,\n\t\t);\n\t\tconst childTypes = schema.info as ImplicitAllowedTypes;\n\t\twalkAllowedTypes(normalizeAllowedTypes(childTypes), visitor, visitedSet);\n\t}\n\t// This visit is done at the end so the traversal order is most inner types first.\n\t// This was picked since when fixing errors,\n\t// working from the inner types out to the types that use them will probably go better than the reverse.\n\t// This does not however ensure all types referenced by a type are visited before it, since in recursive cases thats impossible.\n\tvisitor.node?.(schema);\n}\n\nexport function walkFieldSchema(\n\tschema: ImplicitFieldSchema,\n\tvisitor: SchemaVisitor,\n\tvisitedSet: Set<TreeNodeSchema> = new Set(),\n): void {\n\twalkAllowedTypes(normalizeFieldSchema(schema).allowedTypeSet, visitor, visitedSet);\n}\n\nexport function walkAllowedTypes(\n\tallowedTypes: Iterable<TreeNodeSchema>,\n\tvisitor: SchemaVisitor,\n\tvisitedSet: Set<TreeNodeSchema>,\n): void {\n\tfor (const childType of allowedTypes) {\n\t\twalkNodeSchema(childType, visitor, visitedSet);\n\t}\n\tvisitor.allowedTypes?.(allowedTypes);\n}\n/**\n * Callbacks for use in {@link walkFieldSchema} / {@link walkAllowedTypes} / {@link walkNodeSchema}.\n */\n\nexport interface SchemaVisitor {\n\t/**\n\t * Called once for each node schema.\n\t */\n\tnode?: (schema: TreeNodeSchema) => void;\n\t/**\n\t * Called once for each set of allowed types.\n\t * Includes implicit allowed types (when a single type was used instead of an array).\n\t *\n\t * This includes every field, but also the allowed types array for maps and arrays and the root if starting at {@link walkAllowedTypes}.\n\t */\n\tallowedTypes?: (allowedTypes: Iterable<TreeNodeSchema>) => void;\n}\n"]}
@@ -23,7 +23,8 @@ export declare class TreeFactory implements IChannelFactory<ITree> {
23
23
  /**
24
24
  * SharedTree is a hierarchical data structure for collaboratively editing strongly typed JSON-like trees
25
25
  * of objects, arrays, and other data types.
26
- * @internal
26
+ * @legacy
27
+ * @alpha
27
28
  */
28
29
  export declare const SharedTree: ISharedObjectKind<ITree> & SharedObjectKind<ITree>;
29
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"treeFactory.d.ts","sourceRoot":"","sources":["../src/treeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EACN,KAAK,iBAAiB,EAEtB,MAAM,6CAA6C,CAAC;AAGrD,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;GAE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,CAAC;IAWtC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAV3C,gBAAuB,IAAI,4CAA4C;IACvE,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF,SAAgB,IAAI,4CAAoB;IACxC,SAAgB,UAAU,EAAE,kBAAkB,CAA0B;gBAEpC,OAAO,EAAE,iBAAiB;IAEjD,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,iBAAiB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAC7C,OAAO,CAAC,cAAc,CAAC;IAMnB,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,cAAc;CAK1E;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,oDAA2B,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,iBAAiB,GACxB,iBAAiB,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAOpD"}
@@ -40,7 +40,8 @@ TreeFactory.attributes = {
40
40
  /**
41
41
  * SharedTree is a hierarchical data structure for collaboratively editing strongly typed JSON-like trees
42
42
  * of objects, arrays, and other data types.
43
- * @internal
43
+ * @legacy
44
+ * @alpha
44
45
  */
45
46
  exports.SharedTree = configuredSharedTree({});
46
47
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"treeFactory.js","sourceRoot":"","sources":["../src/treeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AASH,0EAGqD;AAErD,2DAAiD;AACjD,qDAA8F;AAG9F;;GAEG;AACH,MAAa,WAAW;IAWvB,YAAoC,OAA0B;QAA1B,YAAO,GAAP,OAAO,CAAmB;QAH9C,SAAI,GAAG,EAAW,CAAC,IAAI,CAAC;QACxB,eAAU,GAAuB,EAAW,CAAC,UAAU,CAAC;IAEP,CAAC;IAE3D,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,iBAA+C;QAE/C,MAAM,IAAI,GAAG,IAAI,qBAAc,CAAC,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9E,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,IAAI,GAAG,IAAI,qBAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5E,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,CAAC;;AA5BF,kCA6BC;;AA5BuB,gBAAI,GAAG,wCAAwC,AAA3C,CAA4C;AAChD,sBAAU,GAAuB;IACvD,IAAI,EAAE,EAAI,CAAC,IAAI;IACf,qBAAqB,EAAE,OAAO;IAC9B,cAAc,EAAE,8BAAU;CAC1B,AAJgC,CAI/B;AAyBH;;;;GAIG;AACU,QAAA,UAAU,GAAG,oBAAoB,CAAC,EAAE,CAAC,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,oBAAoB,CACnC,OAA0B;IAE1B,MAAM,iBAAkB,SAAQ,WAAW;QAC1C;YACC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChB,CAAC;KACD;IACD,OAAO,IAAA,iCAAsB,EAAQ,iBAAiB,CAAC,CAAC;AACzD,CAAC;AATD,oDASC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nimport {\n\ttype ISharedObjectKind,\n\tcreateSharedObjectKind,\n} from \"@fluidframework/shared-object-base/internal\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\nimport { SharedTree as SharedTreeImpl, type SharedTreeOptions } from \"./shared-tree/index.js\";\nimport type { ITree } from \"./simple-tree/index.js\";\n\n/**\n * A channel factory that creates an {@link ITree}.\n */\nexport class TreeFactory implements IChannelFactory<ITree> {\n\tpublic static readonly Type = \"https://graph.microsoft.com/types/tree\";\n\tpublic static readonly attributes: IChannelAttributes = {\n\t\ttype: this.Type,\n\t\tsnapshotFormatVersion: \"0.0.0\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\tpublic readonly type = TreeFactory.Type;\n\tpublic readonly attributes: IChannelAttributes = TreeFactory.attributes;\n\n\tpublic constructor(private readonly options: SharedTreeOptions) {}\n\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tchannelAttributes: Readonly<IChannelAttributes>,\n\t): Promise<SharedTreeImpl> {\n\t\tconst tree = new SharedTreeImpl(id, runtime, channelAttributes, this.options);\n\t\tawait tree.load(services);\n\t\treturn tree;\n\t}\n\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): SharedTreeImpl {\n\t\tconst tree = new SharedTreeImpl(id, runtime, this.attributes, this.options);\n\t\ttree.initializeLocal();\n\t\treturn tree;\n\t}\n}\n\n/**\n * SharedTree is a hierarchical data structure for collaboratively editing strongly typed JSON-like trees\n * of objects, arrays, and other data types.\n * @internal\n */\nexport const SharedTree = configuredSharedTree({});\n\n/**\n * {@link SharedTree} but allowing a non-default configuration.\n * @remarks\n * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.\n * @example\n * ```typescript\n * import {\n * \tForestType,\n * \tTreeCompressionStrategy,\n * \tconfiguredSharedTree,\n * \ttypeboxValidator,\n * \t// eslint-disable-next-line import/no-internal-modules\n * } from \"@fluidframework/tree/internal\";\n * const SharedTree = configuredSharedTree({\n * \tforest: ForestType.Reference,\n * \tjsonValidator: typeboxValidator,\n * \ttreeEncodeType: TreeCompressionStrategy.Uncompressed,\n * });\n * ```\n * @privateRemarks\n * TODO:\n * Expose Ajv validator for better error message quality somehow.\n * Maybe as part of a test utils or dev-tool package?\n * @internal\n */\nexport function configuredSharedTree(\n\toptions: SharedTreeOptions,\n): ISharedObjectKind<ITree> & SharedObjectKind<ITree> {\n\tclass ConfiguredFactory extends TreeFactory {\n\t\tpublic constructor() {\n\t\t\tsuper(options);\n\t\t}\n\t}\n\treturn createSharedObjectKind<ITree>(ConfiguredFactory);\n}\n"]}
1
+ {"version":3,"file":"treeFactory.js","sourceRoot":"","sources":["../src/treeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AASH,0EAGqD;AAErD,2DAAiD;AACjD,qDAA8F;AAG9F;;GAEG;AACH,MAAa,WAAW;IAWvB,YAAoC,OAA0B;QAA1B,YAAO,GAAP,OAAO,CAAmB;QAH9C,SAAI,GAAG,EAAW,CAAC,IAAI,CAAC;QACxB,eAAU,GAAuB,EAAW,CAAC,UAAU,CAAC;IAEP,CAAC;IAE3D,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,iBAA+C;QAE/C,MAAM,IAAI,GAAG,IAAI,qBAAc,CAAC,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9E,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,IAAI,GAAG,IAAI,qBAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5E,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,CAAC;;AA5BF,kCA6BC;;AA5BuB,gBAAI,GAAG,wCAAwC,AAA3C,CAA4C;AAChD,sBAAU,GAAuB;IACvD,IAAI,EAAE,EAAI,CAAC,IAAI;IACf,qBAAqB,EAAE,OAAO;IAC9B,cAAc,EAAE,8BAAU;CAC1B,AAJgC,CAI/B;AAyBH;;;;;GAKG;AACU,QAAA,UAAU,GAAG,oBAAoB,CAAC,EAAE,CAAC,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,oBAAoB,CACnC,OAA0B;IAE1B,MAAM,iBAAkB,SAAQ,WAAW;QAC1C;YACC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChB,CAAC;KACD;IACD,OAAO,IAAA,iCAAsB,EAAQ,iBAAiB,CAAC,CAAC;AACzD,CAAC;AATD,oDASC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nimport {\n\ttype ISharedObjectKind,\n\tcreateSharedObjectKind,\n} from \"@fluidframework/shared-object-base/internal\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\nimport { SharedTree as SharedTreeImpl, type SharedTreeOptions } from \"./shared-tree/index.js\";\nimport type { ITree } from \"./simple-tree/index.js\";\n\n/**\n * A channel factory that creates an {@link ITree}.\n */\nexport class TreeFactory implements IChannelFactory<ITree> {\n\tpublic static readonly Type = \"https://graph.microsoft.com/types/tree\";\n\tpublic static readonly attributes: IChannelAttributes = {\n\t\ttype: this.Type,\n\t\tsnapshotFormatVersion: \"0.0.0\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\tpublic readonly type = TreeFactory.Type;\n\tpublic readonly attributes: IChannelAttributes = TreeFactory.attributes;\n\n\tpublic constructor(private readonly options: SharedTreeOptions) {}\n\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tchannelAttributes: Readonly<IChannelAttributes>,\n\t): Promise<SharedTreeImpl> {\n\t\tconst tree = new SharedTreeImpl(id, runtime, channelAttributes, this.options);\n\t\tawait tree.load(services);\n\t\treturn tree;\n\t}\n\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): SharedTreeImpl {\n\t\tconst tree = new SharedTreeImpl(id, runtime, this.attributes, this.options);\n\t\ttree.initializeLocal();\n\t\treturn tree;\n\t}\n}\n\n/**\n * SharedTree is a hierarchical data structure for collaboratively editing strongly typed JSON-like trees\n * of objects, arrays, and other data types.\n * @legacy\n * @alpha\n */\nexport const SharedTree = configuredSharedTree({});\n\n/**\n * {@link SharedTree} but allowing a non-default configuration.\n * @remarks\n * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.\n * @example\n * ```typescript\n * import {\n * \tForestType,\n * \tTreeCompressionStrategy,\n * \tconfiguredSharedTree,\n * \ttypeboxValidator,\n * \t// eslint-disable-next-line import/no-internal-modules\n * } from \"@fluidframework/tree/internal\";\n * const SharedTree = configuredSharedTree({\n * \tforest: ForestType.Reference,\n * \tjsonValidator: typeboxValidator,\n * \ttreeEncodeType: TreeCompressionStrategy.Uncompressed,\n * });\n * ```\n * @privateRemarks\n * TODO:\n * Expose Ajv validator for better error message quality somehow.\n * Maybe as part of a test utils or dev-tool package?\n * @internal\n */\nexport function configuredSharedTree(\n\toptions: SharedTreeOptions,\n): ISharedObjectKind<ITree> & SharedObjectKind<ITree> {\n\tclass ConfiguredFactory extends TreeFactory {\n\t\tpublic constructor() {\n\t\t\tsuper(options);\n\t\t}\n\t}\n\treturn createSharedObjectKind<ITree>(ConfiguredFactory);\n}\n"]}
@@ -8,7 +8,7 @@
8
8
  /**
9
9
  * Return a type thats equivalent to the input, but with different IntelliSense.
10
10
  * This tends to convert unions and intersections into objects.
11
- * @public
11
+ * @system @public
12
12
  */
13
13
  export type FlattenKeys<T> = [{
14
14
  [Property in keyof T]: T[Property];
@@ -71,7 +71,7 @@ export type AllowOptional<T> = [
71
71
  *
72
72
  * This constant is defined to provide a way to find this documentation from types which use this pattern,
73
73
  * and to locate types which use this pattern in case they need updating for compiler changes.
74
- * @public
74
+ * @system @public
75
75
  */
76
76
  export type _InlineTrick = 0;
77
77
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"typeUtils.js","sourceRoot":"","sources":["../../src/util/typeUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA4HH,wIAAwI;AACxI,CAAC;IAwBA,qDAAqD;AACtD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Utilities for manipulating types.\n */\n\n/**\n * Return a type thats equivalent to the input, but with different IntelliSense.\n * This tends to convert unions and intersections into objects.\n * @public\n */\nexport type FlattenKeys<T> = [{ [Property in keyof T]: T[Property] }][_InlineTrick];\n\n/**\n * Remove all fields which permit undefined from `T`.\n */\nexport type RequiredFields<T> = [\n\t{\n\t\t[P in keyof T as undefined extends T[P] ? never : P]: T[P];\n\t},\n][_InlineTrick];\n\n/**\n * Extract fields which permit undefined but can also hold other types.\n */\nexport type OptionalFields<T> = [\n\t{\n\t\t[P in keyof T as undefined extends T[P]\n\t\t\t? T[P] extends undefined\n\t\t\t\t? never\n\t\t\t\t: P\n\t\t\t: never]?: T[P];\n\t},\n][_InlineTrick];\n\n/**\n * Converts properties of an object which permit undefined into optional properties.\n * Removes fields which only allow undefined.\n *\n * @remarks\n * This version does not flatten the resulting type.\n * This version exists because some cases recursive types need to avoid this\n * flattening since it causes complication issues.\n *\n * See also `AllowOptional`.\n */\n// export type AllowOptionalNotFlattened<T> = [RequiredFields<T> & OptionalFields<T>][_InlineTrick];\nexport type AllowOptionalNotFlattened<T> = [\n\tRequiredFields<T> & OptionalFields<T>,\n][_InlineTrick];\n\n/**\n * Converts properties of an object which permit undefined into optional properties.\n * Removes fields which only allow undefined.\n */\nexport type AllowOptional<T> = [\n\tFlattenKeys<RequiredFields<T> & OptionalFields<T>>,\n][_InlineTrick];\n\n/**\n * Use for trick to \"inline\" generic types.\n *\n * @remarks\n * The TypeScript compiler can be convinced to inline a generic type\n * (so the result of evaluating the generic type show up in IntelliSense and error messages instead of just the invocation of the generic type)\n * by creating an object with a field, and returning the type of that field.\n *\n * For example:\n * ```typescript\n * type MyGeneric<T1, T2> = {x: T1 extends [] ? T1 : T2 };\n * type MyGenericExpanded<T1, T2> = [{x: T1 extends [] ? T1 : T2 }][_InlineTrick]\n *\n * // Type is MyGeneric<5, string>\n * const foo: MyGeneric<5, string> = {x: \"x\"}\n * // Type is {x: \"x\"}\n * const foo2: MyGenericExpanded<5, string> = {x: \"x\"}\n * ```\n *\n * This constant is defined to provide a way to find this documentation from types which use this pattern,\n * and to locate types which use this pattern in case they need updating for compiler changes.\n * @public\n */\nexport type _InlineTrick = 0;\n\n/**\n * Use for trick to prevent self reference error `ts(2456)`.\n *\n * Prefix a type expression with `K extends _RecursiveTrick ? _RecursiveTrick : ` for some K to break the cycle.\n *\n * @remarks\n * The TypeScript compiler handles some cases of recursive types, but not others.\n * Sometimes adding an otherwise needless conditional can make a type compile.\n * Use this type in such cases.\n *\n *For example:\n * ```typescript\n * // The TypeScript compiler can't handle this case\n * type Broken<T> = FlattenKeys<\n *\t{\n * \t\t[K in keyof T]: 0;\n * \t} & {\n * \t\t[K in keyof T]: Broken<T[K]>;\n * \t}\n * >;\n *\n * // Adding `K extends _RecursiveTrick ? _RecursiveTrick :` makes it compile, and has no effect on the type produced.\n * type Works<T> = FlattenKeys<\n * \t{\n * \t\t[K in keyof T]: 0;\n * \t} & {\n * \t\t// Trick added here. Since `k` never extends `never`, the second conditional option is always taken,\n * \t\t// making this equivalent to the broken version, except this one compiles.\n * \t\t[K in keyof T]: K extends _RecursiveTrick ? _RecursiveTrick : Works<T[K]>;\n * \t}\n * >;\n * ```\n *\n * This trick appears to start working in TypeScript 4.1 and is confirmed to still work in 5.0.4.\n *\n * This constant is defined to provide a way to find this documentation from types which use this pattern,\n * and to locate types which use this pattern in case they need updating for compiler changes.\n */\nexport type _RecursiveTrick = never;\n\n// This block is kept here to ensure the above example behaves as documented, and can be copied into the example to update it as needed.\n{\n\t/* eslint-disable @typescript-eslint/no-unused-vars */\n\n\t// @ts-expect-error The TypeScript compiler can't handle this case\n\ttype Broken<T> = FlattenKeys<\n\t\t{\n\t\t\t[K in keyof T]: 0;\n\t\t} & {\n\t\t\t// @ts-expect-error Same error as above.\n\t\t\t[K in keyof T]: Broken<T[K]>;\n\t\t}\n\t>;\n\n\t// Adding `K extends _RecursiveTrick ? _RecursiveTrick:` OR `T extends _RecursiveTrick ? _RecursiveTrick :` makes it compile and has no effect on the type produced.\n\ttype Works<T> = FlattenKeys<\n\t\t{\n\t\t\t[K in keyof T]: 0;\n\t\t} & {\n\t\t\t// Trick added here. Since `K` never extends `never`, the second conditional option is always taken,\n\t\t\t// making this equivalent to the broken version, except this one compiles.\n\t\t\t[K in keyof T]: T extends _RecursiveTrick ? _RecursiveTrick : Works<T[K]>;\n\t\t}\n\t>;\n\n\t/* eslint-enable @typescript-eslint/no-unused-vars */\n}\n\n/**\n * Alternative to the built in Record type which does not permit unexpected members,\n * and is readonly.\n *\n * @privateRemarks\n * `number` is not allowed as a key here since doing so causes the compiler to reject recursive schema.\n * The cause for this is unclear, but empirically it was the case when this comment was written.\n * @public\n */\nexport type RestrictiveReadonlyRecord<K extends symbol | string, T> = {\n\treadonly [P in symbol | string]: P extends K ? T : never;\n};\n\n/**\n * Assume that `TInput` is a `TAssumeToBe`.\n *\n * @remarks\n * This is useful in generic code when it is impractical (or messy)\n * to to convince the compiler that a generic type `TInput` will extend `TAssumeToBe`.\n * In these cases `TInput` can be replaced with `Assume<TInput, TAssumeToBe>` to allow compilation of the generic code.\n * When the generic code is parameterized with a concrete type, if that type actually does extend `TAssumeToBe`,\n * it will behave like `TInput` was used directly.\n */\nexport type Assume<TInput, TAssumeToBe> = [TInput] extends [TAssumeToBe]\n\t? TInput\n\t: TAssumeToBe;\n"]}
1
+ {"version":3,"file":"typeUtils.js","sourceRoot":"","sources":["../../src/util/typeUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA4HH,wIAAwI;AACxI,CAAC;IAwBA,qDAAqD;AACtD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Utilities for manipulating types.\n */\n\n/**\n * Return a type thats equivalent to the input, but with different IntelliSense.\n * This tends to convert unions and intersections into objects.\n * @system @public\n */\nexport type FlattenKeys<T> = [{ [Property in keyof T]: T[Property] }][_InlineTrick];\n\n/**\n * Remove all fields which permit undefined from `T`.\n */\nexport type RequiredFields<T> = [\n\t{\n\t\t[P in keyof T as undefined extends T[P] ? never : P]: T[P];\n\t},\n][_InlineTrick];\n\n/**\n * Extract fields which permit undefined but can also hold other types.\n */\nexport type OptionalFields<T> = [\n\t{\n\t\t[P in keyof T as undefined extends T[P]\n\t\t\t? T[P] extends undefined\n\t\t\t\t? never\n\t\t\t\t: P\n\t\t\t: never]?: T[P];\n\t},\n][_InlineTrick];\n\n/**\n * Converts properties of an object which permit undefined into optional properties.\n * Removes fields which only allow undefined.\n *\n * @remarks\n * This version does not flatten the resulting type.\n * This version exists because some cases recursive types need to avoid this\n * flattening since it causes complication issues.\n *\n * See also `AllowOptional`.\n */\n// export type AllowOptionalNotFlattened<T> = [RequiredFields<T> & OptionalFields<T>][_InlineTrick];\nexport type AllowOptionalNotFlattened<T> = [\n\tRequiredFields<T> & OptionalFields<T>,\n][_InlineTrick];\n\n/**\n * Converts properties of an object which permit undefined into optional properties.\n * Removes fields which only allow undefined.\n */\nexport type AllowOptional<T> = [\n\tFlattenKeys<RequiredFields<T> & OptionalFields<T>>,\n][_InlineTrick];\n\n/**\n * Use for trick to \"inline\" generic types.\n *\n * @remarks\n * The TypeScript compiler can be convinced to inline a generic type\n * (so the result of evaluating the generic type show up in IntelliSense and error messages instead of just the invocation of the generic type)\n * by creating an object with a field, and returning the type of that field.\n *\n * For example:\n * ```typescript\n * type MyGeneric<T1, T2> = {x: T1 extends [] ? T1 : T2 };\n * type MyGenericExpanded<T1, T2> = [{x: T1 extends [] ? T1 : T2 }][_InlineTrick]\n *\n * // Type is MyGeneric<5, string>\n * const foo: MyGeneric<5, string> = {x: \"x\"}\n * // Type is {x: \"x\"}\n * const foo2: MyGenericExpanded<5, string> = {x: \"x\"}\n * ```\n *\n * This constant is defined to provide a way to find this documentation from types which use this pattern,\n * and to locate types which use this pattern in case they need updating for compiler changes.\n * @system @public\n */\nexport type _InlineTrick = 0;\n\n/**\n * Use for trick to prevent self reference error `ts(2456)`.\n *\n * Prefix a type expression with `K extends _RecursiveTrick ? _RecursiveTrick : ` for some K to break the cycle.\n *\n * @remarks\n * The TypeScript compiler handles some cases of recursive types, but not others.\n * Sometimes adding an otherwise needless conditional can make a type compile.\n * Use this type in such cases.\n *\n *For example:\n * ```typescript\n * // The TypeScript compiler can't handle this case\n * type Broken<T> = FlattenKeys<\n *\t{\n * \t\t[K in keyof T]: 0;\n * \t} & {\n * \t\t[K in keyof T]: Broken<T[K]>;\n * \t}\n * >;\n *\n * // Adding `K extends _RecursiveTrick ? _RecursiveTrick :` makes it compile, and has no effect on the type produced.\n * type Works<T> = FlattenKeys<\n * \t{\n * \t\t[K in keyof T]: 0;\n * \t} & {\n * \t\t// Trick added here. Since `k` never extends `never`, the second conditional option is always taken,\n * \t\t// making this equivalent to the broken version, except this one compiles.\n * \t\t[K in keyof T]: K extends _RecursiveTrick ? _RecursiveTrick : Works<T[K]>;\n * \t}\n * >;\n * ```\n *\n * This trick appears to start working in TypeScript 4.1 and is confirmed to still work in 5.0.4.\n *\n * This constant is defined to provide a way to find this documentation from types which use this pattern,\n * and to locate types which use this pattern in case they need updating for compiler changes.\n */\nexport type _RecursiveTrick = never;\n\n// This block is kept here to ensure the above example behaves as documented, and can be copied into the example to update it as needed.\n{\n\t/* eslint-disable @typescript-eslint/no-unused-vars */\n\n\t// @ts-expect-error The TypeScript compiler can't handle this case\n\ttype Broken<T> = FlattenKeys<\n\t\t{\n\t\t\t[K in keyof T]: 0;\n\t\t} & {\n\t\t\t// @ts-expect-error Same error as above.\n\t\t\t[K in keyof T]: Broken<T[K]>;\n\t\t}\n\t>;\n\n\t// Adding `K extends _RecursiveTrick ? _RecursiveTrick:` OR `T extends _RecursiveTrick ? _RecursiveTrick :` makes it compile and has no effect on the type produced.\n\ttype Works<T> = FlattenKeys<\n\t\t{\n\t\t\t[K in keyof T]: 0;\n\t\t} & {\n\t\t\t// Trick added here. Since `K` never extends `never`, the second conditional option is always taken,\n\t\t\t// making this equivalent to the broken version, except this one compiles.\n\t\t\t[K in keyof T]: T extends _RecursiveTrick ? _RecursiveTrick : Works<T[K]>;\n\t\t}\n\t>;\n\n\t/* eslint-enable @typescript-eslint/no-unused-vars */\n}\n\n/**\n * Alternative to the built in Record type which does not permit unexpected members,\n * and is readonly.\n *\n * @privateRemarks\n * `number` is not allowed as a key here since doing so causes the compiler to reject recursive schema.\n * The cause for this is unclear, but empirically it was the case when this comment was written.\n * @public\n */\nexport type RestrictiveReadonlyRecord<K extends symbol | string, T> = {\n\treadonly [P in symbol | string]: P extends K ? T : never;\n};\n\n/**\n * Assume that `TInput` is a `TAssumeToBe`.\n *\n * @remarks\n * This is useful in generic code when it is impractical (or messy)\n * to to convince the compiler that a generic type `TInput` will extend `TAssumeToBe`.\n * In these cases `TInput` can be replaced with `Assume<TInput, TAssumeToBe>` to allow compilation of the generic code.\n * When the generic code is parameterized with a concrete type, if that type actually does extend `TAssumeToBe`,\n * it will behave like `TInput` was used directly.\n */\nexport type Assume<TInput, TAssumeToBe> = [TInput] extends [TAssumeToBe]\n\t? TInput\n\t: TAssumeToBe;\n"]}
package/legacy.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ export * from "./lib/legacy.js";
package/lib/alpha.d.ts ADDED
@@ -0,0 +1,103 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
9
+ */
10
+
11
+ export {
12
+ // Unrestricted APIs
13
+ InternalTypes,
14
+
15
+ // @public APIs
16
+ AllowedTypes,
17
+ CommitKind,
18
+ CommitMetadata,
19
+ FieldKind,
20
+ FieldProps,
21
+ FieldSchema,
22
+ FieldSchemaMetadata,
23
+ FieldSchemaUnsafe,
24
+ ITree,
25
+ ITreeConfigurationOptions,
26
+ ITreeViewConfiguration,
27
+ ImplicitAllowedTypes,
28
+ ImplicitFieldSchema,
29
+ InsertableObjectFromSchemaRecordUnsafe,
30
+ InsertableTreeFieldFromImplicitField,
31
+ InsertableTreeFieldFromImplicitFieldUnsafe,
32
+ InsertableTreeNodeFromImplicitAllowedTypes,
33
+ InsertableTreeNodeFromImplicitAllowedTypesUnsafe,
34
+ InsertableTypedNode,
35
+ InternalTreeNode,
36
+ IsListener,
37
+ IterableTreeArrayContent,
38
+ LazyItem,
39
+ Listenable,
40
+ Listeners,
41
+ MakeNominal,
42
+ MapNodeInsertableData,
43
+ NodeFromSchema,
44
+ NodeInDocumentConstraint,
45
+ NodeKind,
46
+ Off,
47
+ RestrictiveReadonlyRecord,
48
+ Revertible,
49
+ RevertibleFactory,
50
+ RevertibleStatus,
51
+ RunTransaction,
52
+ SchemaCompatibilityStatus,
53
+ SchemaFactory,
54
+ TransactionConstraint,
55
+ Tree,
56
+ TreeArrayNode,
57
+ TreeArrayNodeUnsafe,
58
+ TreeChangeEvents,
59
+ TreeFieldFromImplicitField,
60
+ TreeLeafValue,
61
+ TreeMapNode,
62
+ TreeMapNodeUnsafe,
63
+ TreeNode,
64
+ TreeNodeApi,
65
+ TreeNodeFromImplicitAllowedTypes,
66
+ TreeNodeSchema,
67
+ TreeNodeSchemaClass,
68
+ TreeNodeSchemaCore,
69
+ TreeObjectNode,
70
+ TreeObjectNodeUnsafe,
71
+ TreeStatus,
72
+ TreeView,
73
+ TreeViewConfiguration,
74
+ TreeViewEvents,
75
+ Unenforced,
76
+ Unhydrated,
77
+ ValidateRecursiveSchema,
78
+ WithType,
79
+ rollback,
80
+ typeSchemaSymbol,
81
+
82
+ // @beta APIs
83
+ NodeChangedData,
84
+ TreeBeta,
85
+ TreeChangeEventsBeta,
86
+
87
+ // @alpha APIs
88
+ FixRecursiveArraySchema,
89
+ JsonArrayNodeSchema,
90
+ JsonFieldSchema,
91
+ JsonLeafNodeSchema,
92
+ JsonLeafSchemaType,
93
+ JsonMapNodeSchema,
94
+ JsonNodeSchema,
95
+ JsonNodeSchemaBase,
96
+ JsonObjectNodeSchema,
97
+ JsonRefPath,
98
+ JsonSchemaId,
99
+ JsonSchemaRef,
100
+ JsonSchemaType,
101
+ JsonTreeSchema,
102
+ getJsonSchema
103
+ } from "./index.js";
package/lib/beta.d.ts CHANGED
@@ -19,6 +19,7 @@ export {
19
19
  FieldKind,
20
20
  FieldProps,
21
21
  FieldSchema,
22
+ FieldSchemaMetadata,
22
23
  FieldSchemaUnsafe,
23
24
  ITree,
24
25
  ITreeConfigurationOptions,
@@ -39,7 +40,6 @@ export {
39
40
  Listeners,
40
41
  MakeNominal,
41
42
  MapNodeInsertableData,
42
- NodeChangedData,
43
43
  NodeFromSchema,
44
44
  NodeInDocumentConstraint,
45
45
  NodeKind,
@@ -77,5 +77,10 @@ export {
77
77
  ValidateRecursiveSchema,
78
78
  WithType,
79
79
  rollback,
80
- typeSchemaSymbol
80
+ typeSchemaSymbol,
81
+
82
+ // @beta APIs
83
+ NodeChangedData,
84
+ TreeBeta,
85
+ TreeChangeEventsBeta
81
86
  } from "./index.js";
@@ -6,7 +6,7 @@ export { EmptyKey, type TreeType, type Value, type TreeValue, AnchorSet, type De
6
6
  export { TreeNavigationResult, type IEditableForest, type IForestSubscription, type TreeLocation, type FieldLocation, type ForestLocation, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, initializeForest, type FieldAnchor, moveToDetachedField, type ForestEvents, } from "./forest/index.js";
7
7
  export { type FieldKey, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type TreeStoredSchemaSubscription as TreeStoredSchemaSubscription, type MutableTreeStoredSchema, type FieldKindIdentifier, type FieldKindData, type TreeTypeSet, type TreeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, type SchemaEvents, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, type StoredSchemaCollection, schemaFormat, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, toTreeNodeSchemaDataFormat, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, type ErasedTreeNodeSchemaDataFormat, type SchemaAndPolicy, Multiplicity, type SchemaPolicy, } from "./schema-stored/index.js";
8
8
  export { type ChangeFamily, type ChangeFamilyCodec, type ChangeEncodingContext, type ChangeFamilyEditor, EditBuilder, } from "./change-family/index.js";
9
- export { areEqualChangeAtomIds, makeChangeAtomId, asChangeAtomId, type ChangeRebaser, findAncestor, findCommonAncestor, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, RevisionTagCodec, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, type TaggedChange, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, type RevisionMetadataSource, revisionMetadataSourceFromInfo, type RevisionInfo, type EncodedRevisionTag, type EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, } from "./rebase/index.js";
9
+ export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, type ChangeRebaser, findAncestor, findCommonAncestor, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, RevisionTagCodec, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, type TaggedChange, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, type RevisionMetadataSource, revisionMetadataSourceFromInfo, type RevisionInfo, type EncodedRevisionTag, type EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, } from "./rebase/index.js";
10
10
  export { type Adapters, AdaptedViewSchema, Compatibility, type TreeAdapter, AllowedUpdateType, } from "./schema-view/index.js";
11
- export { type Revertible, RevertibleStatus } from "./revertible/index.js";
11
+ export { type Revertible, RevertibleStatus, type RevertibleFactory } from "./revertible.js";
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eA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Y,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,uBAAuB,GAC5B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,iBAAiB,EACjB,aAAa,EACb,KAAK,WAAW,EAChB,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,KAAK,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,KAAK,OAAO,EACZ,kBAAkB,EAClB,kBAAkB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AiB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,KAAK,UAAU,EAAE,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
package/lib/core/index.js CHANGED
@@ -6,7 +6,7 @@ export { EmptyKey, AnchorSet, EncodedJsonableTree, rootFieldKey, rootField, Curs
6
6
  export { TreeNavigationResult, ITreeSubscriptionCursorState, initializeForest, moveToDetachedField, } from "./forest/index.js";
7
7
  export { ValueSchema, TreeNodeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, schemaFormat, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, toTreeNodeSchemaDataFormat, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, Multiplicity, } from "./schema-stored/index.js";
8
8
  export { EditBuilder, } from "./change-family/index.js";
9
- export { areEqualChangeAtomIds, makeChangeAtomId, asChangeAtomId, findAncestor, findCommonAncestor, CommitKind, RevisionTagSchema, RevisionTagCodec, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, rebaseChange, rebaseChangeOverChanges, revisionMetadataSourceFromInfo, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, } from "./rebase/index.js";
9
+ export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, findAncestor, findCommonAncestor, CommitKind, RevisionTagSchema, RevisionTagCodec, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, rebaseChange, rebaseChangeOverChanges, revisionMetadataSourceFromInfo, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, } from "./rebase/index.js";
10
10
  export { AdaptedViewSchema, Compatibility, AllowedUpdateType, } from "./schema-view/index.js";
11
- export { RevertibleStatus } from "./revertible/index.js";
11
+ export { RevertibleStatus } from "./revertible.js";
12
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EAIR,SAAS,EAmBT,mBAAmB,EACnB,YAAY,EACZ,SAAS,EAET,kBAAkB,EAElB,uBAAuB,EAGvB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAElB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EAInB,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,YAAY,EAEZ,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,UAAU,EAGV,UAAU,EAEV,aAAa,EACb,YAAY,EAIZ,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAElB,8BAA8B,EAC9B,oBAAoB,EAYpB,eAAe,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,oBAAoB,EAOpB,4BAA4B,EAC5B,gBAAgB,EAEhB,mBAAmB,GAEnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAIN,WAAW,EACX,oBAAoB,EAOpB,0BAA0B,EAC1B,iBAAiB,EAEjB,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EAEtB,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,4BAA4B,EAG5B,YAAY,GAEZ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAKN,WAAW,GACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACZ,kBAAkB,EAElB,UAAU,EAGV,iBAAiB,EACjB,gBAAgB,EAKhB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EAEZ,YAAY,EACZ,uBAAuB,EAEvB,8BAA8B,EAI9B,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,GAGb,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAEN,iBAAiB,EACjB,aAAa,EAEb,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAmB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype DetachedPlaceUpPath,\n\ttype DetachedRangeUpPath,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\tEncodedJsonableTree,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\tcastCursorToSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tgenericTreeDeleteIfEmpty,\n\tgetDepth,\n\tmapCursorField,\n\tmapCursorFields,\n\titerateCursorField,\n\ttype MapTree,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\tvisitDelta,\n\tcombineVisitors,\n\tannounceDelta,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tsetGenericTreeField,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\ttype PathVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\temptyFieldChanges,\n\tisEmptyFieldChanges,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaProtoNode,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype ExclusiveMapTree,\n\tdeepCopyMapTree,\n} from \"./tree/index.js\";\n\nexport {\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\tinitializeForest,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest/index.js\";\n\nexport {\n\ttype FieldKey,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription as TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype FieldKindData,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tschemaFormat,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\ttoTreeNodeSchemaDataFormat,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tstoredSchemaDecodeDispatcher,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\n} from \"./schema-stored/index.js\";\n\nexport {\n\ttype ChangeFamily,\n\ttype ChangeFamilyCodec,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamilyEditor,\n\tEditBuilder,\n} from \"./change-family/index.js\";\n\nexport {\n\tareEqualChangeAtomIds,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\ttype ChangeRebaser,\n\tfindAncestor,\n\tfindCommonAncestor,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tRevisionTagCodec,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\tSessionIdSchema,\n\tmintCommit,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\ttype RevisionMetadataSource,\n\trevisionMetadataSourceFromInfo,\n\ttype RevisionInfo,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\tCompatibility,\n\ttype TreeAdapter,\n\tAllowedUpdateType,\n} from \"./schema-view/index.js\";\n\nexport { type Revertible, RevertibleStatus } from \"./revertible/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EAIR,SAAS,EAmBT,mBAAmB,EACnB,YAAY,EACZ,SAAS,EAET,kBAAkB,EAElB,uBAAuB,EAGvB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAElB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EAInB,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,YAAY,EAEZ,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,UAAU,EAGV,UAAU,EAEV,aAAa,EACb,YAAY,EAIZ,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAElB,8BAA8B,EAC9B,oBAAoB,EAYpB,eAAe,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,oBAAoB,EAOpB,4BAA4B,EAC5B,gBAAgB,EAEhB,mBAAmB,GAEnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAIN,WAAW,EACX,oBAAoB,EAOpB,0BAA0B,EAC1B,iBAAiB,EAEjB,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EAEtB,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,4BAA4B,EAG5B,YAAY,GAEZ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAKN,WAAW,GACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACN,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACZ,kBAAkB,EAElB,UAAU,EAGV,iBAAiB,EACjB,gBAAgB,EAKhB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EAEZ,YAAY,EACZ,uBAAuB,EAEvB,8BAA8B,EAI9B,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,GAGb,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAEN,iBAAiB,EACjB,aAAa,EAEb,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAmB,gBAAgB,EAA0B,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype DetachedPlaceUpPath,\n\ttype DetachedRangeUpPath,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\tEncodedJsonableTree,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\tcastCursorToSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tgenericTreeDeleteIfEmpty,\n\tgetDepth,\n\tmapCursorField,\n\tmapCursorFields,\n\titerateCursorField,\n\ttype MapTree,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\tvisitDelta,\n\tcombineVisitors,\n\tannounceDelta,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tsetGenericTreeField,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\ttype PathVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\temptyFieldChanges,\n\tisEmptyFieldChanges,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaProtoNode,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype ExclusiveMapTree,\n\tdeepCopyMapTree,\n} from \"./tree/index.js\";\n\nexport {\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\tinitializeForest,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest/index.js\";\n\nexport {\n\ttype FieldKey,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription as TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype FieldKindData,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tschemaFormat,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\ttoTreeNodeSchemaDataFormat,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tstoredSchemaDecodeDispatcher,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\n} from \"./schema-stored/index.js\";\n\nexport {\n\ttype ChangeFamily,\n\ttype ChangeFamilyCodec,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamilyEditor,\n\tEditBuilder,\n} from \"./change-family/index.js\";\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\ttype ChangeRebaser,\n\tfindAncestor,\n\tfindCommonAncestor,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tRevisionTagCodec,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\tSessionIdSchema,\n\tmintCommit,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\ttype RevisionMetadataSource,\n\trevisionMetadataSourceFromInfo,\n\ttype RevisionInfo,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\tCompatibility,\n\ttype TreeAdapter,\n\tAllowedUpdateType,\n} from \"./schema-view/index.js\";\n\nexport { type Revertible, RevertibleStatus, type RevertibleFactory } from \"./revertible.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
- export { areEqualChangeAtomIds, makeChangeAtomId, asChangeAtomId, mintCommit, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, type EncodedRevisionTag, type EncodedChangeAtomId, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, SessionIdSchema, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, } from "./types.js";
5
+ export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, mintCommit, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, type EncodedRevisionTag, type EncodedChangeAtomId, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, SessionIdSchema, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, } from "./types.js";
6
6
  export { RevisionTagCodec } from "./revisionTagCodec.js";
7
7
  export { type ChangeRebaser, type FinalChange, FinalChangeStatus, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, type TaggedChange, type RevisionMetadataSource, type RevisionInfo, } from "./changeRebaser.js";
8
8
  export { findAncestor, findCommonAncestor, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, revisionMetadataSourceFromInfo, type RebaseStats, type RebaseStatsWithDuration, } from "./utils.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,8BAA8B,EAC9B,KAAK,WAAW,EAChB,KAAK,uBAAuB,GAC5B,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,8BAA8B,EAC9B,KAAK,WAAW,EAChB,KAAK,uBAAuB,GAC5B,MAAM,YAAY,CAAC"}
@@ -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
- export { areEqualChangeAtomIds, makeChangeAtomId, asChangeAtomId, mintCommit, CommitKind, RevisionTagSchema, SessionIdSchema, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, } from "./types.js";
5
+ export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, mintCommit, CommitKind, RevisionTagSchema, SessionIdSchema, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, } from "./types.js";
6
6
  export { RevisionTagCodec } from "./revisionTagCodec.js";
7
7
  export { FinalChangeStatus, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, } from "./changeRebaser.js";
8
8
  export { findAncestor, findCommonAncestor, rebaseBranch, rebaseChange, rebaseChangeOverChanges, revisionMetadataSourceFromInfo, } from "./utils.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,UAAU,EAEV,UAAU,EAGV,iBAAiB,EAMjB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAGN,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,GAIlB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,YAAY,EAEZ,YAAY,EACZ,uBAAuB,EACvB,8BAA8B,GAG9B,MAAM,YAAY,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tareEqualChangeAtomIds,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\tmintCommit,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\tSessionIdSchema,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\treplaceAtomRevisions,\n\treplaceChange,\n} from \"./types.js\";\nexport { RevisionTagCodec } from \"./revisionTagCodec.js\";\nexport {\n\ttype ChangeRebaser,\n\ttype FinalChange,\n\tFinalChangeStatus,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\ttype TaggedChange,\n\ttype RevisionMetadataSource,\n\ttype RevisionInfo,\n} from \"./changeRebaser.js\";\nexport {\n\tfindAncestor,\n\tfindCommonAncestor,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\trevisionMetadataSourceFromInfo,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n} from \"./utils.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,UAAU,EAEV,UAAU,EAGV,iBAAiB,EAMjB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAGN,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,GAIlB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,YAAY,EAEZ,YAAY,EACZ,uBAAuB,EACvB,8BAA8B,GAG9B,MAAM,YAAY,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\tmintCommit,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\tSessionIdSchema,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\treplaceAtomRevisions,\n\treplaceChange,\n} from \"./types.js\";\nexport { RevisionTagCodec } from \"./revisionTagCodec.js\";\nexport {\n\ttype ChangeRebaser,\n\ttype FinalChange,\n\tFinalChangeStatus,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\ttype TaggedChange,\n\ttype RevisionMetadataSource,\n\ttype RevisionInfo,\n} from \"./changeRebaser.js\";\nexport {\n\tfindAncestor,\n\tfindCommonAncestor,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\trevisionMetadataSourceFromInfo,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n} from \"./utils.js\";\n"]}
@@ -53,6 +53,7 @@ export type ChangeAtomIdRangeMap<T> = Map<RevisionTag | undefined, RangeMap<T>>;
53
53
  * @returns true iff `a` and `b` are the same.
54
54
  */
55
55
  export declare function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean;
56
+ export declare function areEqualChangeAtomIdOpts(a: ChangeAtomId | undefined, b: ChangeAtomId | undefined): boolean;
56
57
  /**
57
58
  * @returns a ChangeAtomId with the given revision and local ID.
58
59
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,mBAAmB,EACnB,SAAS,EACT,wBAAwB,EACxB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACN,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,QAAQ,EAIb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,eAAe,gDAAiC,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,wBAAwB,GAAG,MAAM,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,GAAG,MAAM,CAAC;AAC3F,eAAO,MAAM,iB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AC9B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AAGH,wBAAgB,UAAU,CAAC,OAAO,EACjC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAC5B,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,GAC1C,WAAW,CAAC,OAAO,CAAC,CAOtB;AAED,wBAAgB,aAAa,CAAC,OAAO,EACpC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAC5B,MAAM,EAAE,OAAO,GACb,WAAW,CAAC,OAAO,CAAC,CAItB"}
@@ -18,6 +18,12 @@ export const RevisionTagSchema = Type.Union([
18
18
  export function areEqualChangeAtomIds(a, b) {
19
19
  return a.localId === b.localId && a.revision === b.revision;
20
20
  }
21
+ export function areEqualChangeAtomIdOpts(a, b) {
22
+ if (a === undefined || b === undefined) {
23
+ return a === b;
24
+ }
25
+ return areEqualChangeAtomIds(a, b);
26
+ }
21
27
  /**
22
28
  * @returns a ChangeAtomId with the given revision and local ID.
23
29
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAIN,KAAK,EACL,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,qBAAqB,CAAC;AAG7B;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,EAAa,CAAC;AAW9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC;IAC3C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACpB,iBAAiB,EAAuC;CACxD,CAAC,CAAC;AAqCH;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,CAA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C,EAAE,CAAC;AAC/E,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAgB,EAAE,QAAiC;IAC5E,MAAM,OAAO,GAAG,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,CAAC;IACpC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,OAAO,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,OAAO,OAAO,CAAC;AAChB,CAAC;AAgBD;;;;GAIG;AACH,MAAM,CAAN,IAAY,UAOX;AAPD,WAAY,UAAU;IACrB,iFAAiF;IACjF,iDAAO,CAAA;IACP,8CAA8C;IAC9C,2CAAI,CAAA;IACJ,6CAA6C;IAC7C,2CAAI,CAAA;AACL,CAAC,EAPW,UAAU,KAAV,UAAU,QAOrB;AAkBD;;;;;GAKG;AACH,6EAA6E;AAC7E,6CAA6C;AAC7C,MAAM,UAAU,UAAU,CACzB,MAA4B,EAC5B,MAA4C;IAE5C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACpC,OAAO;QACN,QAAQ;QACR,MAAM;QACN,MAAM;KACN,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAC5B,MAA4B,EAC5B,MAAe;IAEf,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC;IACrC,OAAO,MAAM,CAAC,QAAQ,CAAC;IACvB,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tOpSpaceCompressedId,\n\tSessionId,\n\tSessionSpaceCompressedId,\n} from \"@fluidframework/id-compressor\";\nimport { Type } from \"@sinclair/typebox\";\n\nimport {\n\ttype Brand,\n\ttype NestedMap,\n\ttype RangeMap,\n\tbrand,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\nimport type { TaggedChange } from \"./changeRebaser.js\";\n\n/**\n * The identifier for a particular session/user/client that can generate `GraphCommit`s\n */\nexport const SessionIdSchema = brandedStringType<SessionId>();\n\n/**\n * A unique identifier for a commit. Commits that have been rebased, but are semantically\n * the same, will share the same revision tag.\n *\n * The constant 'root' is reserved for the trunk base: minting a SessionSpaceCompressedId is not\n * possible on readonly clients. These clients generally don't need ids, but must be done at tree initialization time.\n */\nexport type RevisionTag = SessionSpaceCompressedId | \"root\";\nexport type EncodedRevisionTag = Brand<OpSpaceCompressedId, \"EncodedRevisionTag\"> | \"root\";\nexport const RevisionTagSchema = Type.Union([\n\tType.Literal(\"root\"),\n\tbrandedNumberType<Exclude<EncodedRevisionTag, string>>(),\n]);\n\n/**\n * An ID which is unique within a revision of a `ModularChangeset`.\n * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s,\n * but they are unique when qualified by the revision of the change they are used in.\n */\nexport type ChangesetLocalId = Brand<number, \"ChangesetLocalId\">;\n\n/**\n * A globally unique ID for an atom of change, or a node associated with the atom of change.\n * *\n * @privateRemarks\n * TODO: Rename this to be more general.\n */\nexport interface ChangeAtomId {\n\t/**\n\t * Uniquely identifies the changeset within which the change was made.\n\t * Only undefined when referring to an anonymous changesets.\n\t */\n\treadonly revision?: RevisionTag;\n\t/**\n\t * Uniquely identifies, in the scope of the changeset, the change made to the field.\n\t */\n\treadonly localId: ChangesetLocalId;\n}\n\nexport type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | ChangesetLocalId;\n\n/**\n */\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n */\nexport type ChangeAtomIdRangeMap<T> = Map<RevisionTag | undefined, RangeMap<T>>;\n\n/**\n * @returns true iff `a` and `b` are the same.\n */\nexport function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean {\n\treturn a.localId === b.localId && a.revision === b.revision;\n}\n\n/**\n * @returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(\n\tlocalId: ChangesetLocalId,\n\trevision?: RevisionTag,\n): ChangeAtomId {\n\treturn revision === undefined ? { localId } : { localId, revision };\n}\n\nexport function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId {\n\treturn typeof id === \"object\" ? id : { localId: id };\n}\n\nexport function taggedAtomId(\n\tid: ChangeAtomId,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn makeChangeAtomId(id.localId, id.revision ?? revision);\n}\n\nexport function taggedOptAtomId(\n\tid: ChangeAtomId | undefined,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId | undefined {\n\tif (id === undefined) {\n\t\treturn undefined;\n\t}\n\treturn taggedAtomId(id, revision);\n}\n\nexport function offsetChangeAtomId(id: ChangeAtomId, offset: number): ChangeAtomId {\n\treturn { ...id, localId: brand(id.localId + offset) };\n}\n\nexport function replaceAtomRevisions(\n\tid: ChangeAtomId,\n\toldRevisions: Set<RevisionTag | undefined>,\n\tnewRevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn oldRevisions.has(id.revision) ? atomWithRevision(id, newRevision) : id;\n}\n\nfunction atomWithRevision(id: ChangeAtomId, revision: RevisionTag | undefined): ChangeAtomId {\n\tconst updated = { ...id, revision };\n\tif (revision === undefined) {\n\t\tdelete updated.revision;\n\t}\n\n\treturn updated;\n}\n\n/**\n * A node in a graph of commits. A commit's parent is the commit on which it was based.\n */\nexport interface GraphCommit<TChange> {\n\t/** The tag for this commit. If this commit is rebased, the corresponding rebased commit will retain this tag. */\n\treadonly revision: RevisionTag;\n\t/** The change that will result from applying this commit */\n\treadonly change: TChange;\n\t/** The parent of this commit, on whose change this commit's change is based */\n\treadonly parent?: GraphCommit<TChange>;\n\t/** The rollback of this commit */\n\trollback?: TaggedChange<TChange, RevisionTag>;\n}\n\n/**\n * The type of a commit. This is used to describe the context in which the commit was created.\n *\n * @public\n */\nexport enum CommitKind {\n\t/** A commit corresponding to a change that is not the result of an undo/redo. */\n\tDefault,\n\t/** A commit that is the result of an undo. */\n\tUndo,\n\t/** A commit that is the result of a redo. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @sealed @public\n */\nexport interface CommitMetadata {\n\t/**\n\t * A {@link CommitKind} enum value describing whether the commit represents an Edit, an Undo, or a Redo.\n\t */\n\treadonly kind: CommitKind;\n\t/**\n\t * Indicates whether the commit is a local edit\n\t */\n\treadonly isLocal: boolean;\n}\n\n/**\n * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.\n * @param parent - the parent of the new commit\n * @param commit - the contents of the new commit object\n * @returns the new commit object\n */\n// Note that this function is synchronous, and therefore it is not a Promise.\n// However, it is still a strong commit-mint.\nexport function mintCommit<TChange>(\n\tparent: GraphCommit<TChange>,\n\tcommit: Omit<GraphCommit<TChange>, \"parent\">,\n): GraphCommit<TChange> {\n\tconst { revision, change } = commit;\n\treturn {\n\t\trevision,\n\t\tchange,\n\t\tparent,\n\t};\n}\n\nexport function replaceChange<TChange>(\n\tcommit: GraphCommit<TChange>,\n\tchange: TChange,\n): GraphCommit<TChange> {\n\tconst output = { ...commit, change };\n\tdelete output.rollback;\n\treturn output;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAIN,KAAK,EACL,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,qBAAqB,CAAC;AAG7B;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,EAAa,CAAC;AAW9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC;IAC3C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACpB,iBAAiB,EAAuC;CACxD,CAAC,CAAC;AAqCH;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,CAAe,EAAE,CAAe;IACrE,OAAO,CAAC,CA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AAED,MAAM,UAAU,oBAAoB,CACnC,EAAgB,EAChB,YAA0C,EAC1C,WAAoC;IAEpC,OAAO,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/E,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAgB,EAAE,QAAiC;IAC5E,MAAM,OAAO,GAAG,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,CAAC;IACpC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,OAAO,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,OAAO,OAAO,CAAC;AAChB,CAAC;AAgBD;;;;GAIG;AACH,MAAM,CAAN,IAAY,UAOX;AAPD,WAAY,UAAU;IACrB,iFAAiF;IACjF,iDAAO,CAAA;IACP,8CAA8C;IAC9C,2CAAI,CAAA;IACJ,6CAA6C;IAC7C,2CAAI,CAAA;AACL,CAAC,EAPW,UAAU,KAAV,UAAU,QAOrB;AAkBD;;;;;GAKG;AACH,6EAA6E;AAC7E,6CAA6C;AAC7C,MAAM,UAAU,UAAU,CACzB,MAA4B,EAC5B,MAA4C;IAE5C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACpC,OAAO;QACN,QAAQ;QACR,MAAM;QACN,MAAM;KACN,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAC5B,MAA4B,EAC5B,MAAe;IAEf,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC;IACrC,OAAO,MAAM,CAAC,QAAQ,CAAC;IACvB,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tOpSpaceCompressedId,\n\tSessionId,\n\tSessionSpaceCompressedId,\n} from \"@fluidframework/id-compressor\";\nimport { Type } from \"@sinclair/typebox\";\n\nimport {\n\ttype Brand,\n\ttype NestedMap,\n\ttype RangeMap,\n\tbrand,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\nimport type { TaggedChange } from \"./changeRebaser.js\";\n\n/**\n * The identifier for a particular session/user/client that can generate `GraphCommit`s\n */\nexport const SessionIdSchema = brandedStringType<SessionId>();\n\n/**\n * A unique identifier for a commit. Commits that have been rebased, but are semantically\n * the same, will share the same revision tag.\n *\n * The constant 'root' is reserved for the trunk base: minting a SessionSpaceCompressedId is not\n * possible on readonly clients. These clients generally don't need ids, but must be done at tree initialization time.\n */\nexport type RevisionTag = SessionSpaceCompressedId | \"root\";\nexport type EncodedRevisionTag = Brand<OpSpaceCompressedId, \"EncodedRevisionTag\"> | \"root\";\nexport const RevisionTagSchema = Type.Union([\n\tType.Literal(\"root\"),\n\tbrandedNumberType<Exclude<EncodedRevisionTag, string>>(),\n]);\n\n/**\n * An ID which is unique within a revision of a `ModularChangeset`.\n * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s,\n * but they are unique when qualified by the revision of the change they are used in.\n */\nexport type ChangesetLocalId = Brand<number, \"ChangesetLocalId\">;\n\n/**\n * A globally unique ID for an atom of change, or a node associated with the atom of change.\n * *\n * @privateRemarks\n * TODO: Rename this to be more general.\n */\nexport interface ChangeAtomId {\n\t/**\n\t * Uniquely identifies the changeset within which the change was made.\n\t * Only undefined when referring to an anonymous changesets.\n\t */\n\treadonly revision?: RevisionTag;\n\t/**\n\t * Uniquely identifies, in the scope of the changeset, the change made to the field.\n\t */\n\treadonly localId: ChangesetLocalId;\n}\n\nexport type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | ChangesetLocalId;\n\n/**\n */\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n */\nexport type ChangeAtomIdRangeMap<T> = Map<RevisionTag | undefined, RangeMap<T>>;\n\n/**\n * @returns true iff `a` and `b` are the same.\n */\nexport function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean {\n\treturn a.localId === b.localId && a.revision === b.revision;\n}\n\nexport function areEqualChangeAtomIdOpts(\n\ta: ChangeAtomId | undefined,\n\tb: ChangeAtomId | undefined,\n): boolean {\n\tif (a === undefined || b === undefined) {\n\t\treturn a === b;\n\t}\n\n\treturn areEqualChangeAtomIds(a, b);\n}\n\n/**\n * @returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(\n\tlocalId: ChangesetLocalId,\n\trevision?: RevisionTag,\n): ChangeAtomId {\n\treturn revision === undefined ? { localId } : { localId, revision };\n}\n\nexport function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId {\n\treturn typeof id === \"object\" ? id : { localId: id };\n}\n\nexport function taggedAtomId(\n\tid: ChangeAtomId,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn makeChangeAtomId(id.localId, id.revision ?? revision);\n}\n\nexport function taggedOptAtomId(\n\tid: ChangeAtomId | undefined,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId | undefined {\n\tif (id === undefined) {\n\t\treturn undefined;\n\t}\n\treturn taggedAtomId(id, revision);\n}\n\nexport function offsetChangeAtomId(id: ChangeAtomId, offset: number): ChangeAtomId {\n\treturn { ...id, localId: brand(id.localId + offset) };\n}\n\nexport function replaceAtomRevisions(\n\tid: ChangeAtomId,\n\toldRevisions: Set<RevisionTag | undefined>,\n\tnewRevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn oldRevisions.has(id.revision) ? atomWithRevision(id, newRevision) : id;\n}\n\nfunction atomWithRevision(id: ChangeAtomId, revision: RevisionTag | undefined): ChangeAtomId {\n\tconst updated = { ...id, revision };\n\tif (revision === undefined) {\n\t\tdelete updated.revision;\n\t}\n\n\treturn updated;\n}\n\n/**\n * A node in a graph of commits. A commit's parent is the commit on which it was based.\n */\nexport interface GraphCommit<TChange> {\n\t/** The tag for this commit. If this commit is rebased, the corresponding rebased commit will retain this tag. */\n\treadonly revision: RevisionTag;\n\t/** The change that will result from applying this commit */\n\treadonly change: TChange;\n\t/** The parent of this commit, on whose change this commit's change is based */\n\treadonly parent?: GraphCommit<TChange>;\n\t/** The rollback of this commit */\n\trollback?: TaggedChange<TChange, RevisionTag>;\n}\n\n/**\n * The type of a commit. This is used to describe the context in which the commit was created.\n *\n * @public\n */\nexport enum CommitKind {\n\t/** A commit corresponding to a change that is not the result of an undo/redo. */\n\tDefault,\n\t/** A commit that is the result of an undo. */\n\tUndo,\n\t/** A commit that is the result of a redo. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @sealed @public\n */\nexport interface CommitMetadata {\n\t/**\n\t * A {@link CommitKind} enum value describing whether the commit represents an Edit, an Undo, or a Redo.\n\t */\n\treadonly kind: CommitKind;\n\t/**\n\t * Indicates whether the commit is a local edit\n\t */\n\treadonly isLocal: boolean;\n}\n\n/**\n * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.\n * @param parent - the parent of the new commit\n * @param commit - the contents of the new commit object\n * @returns the new commit object\n */\n// Note that this function is synchronous, and therefore it is not a Promise.\n// However, it is still a strong commit-mint.\nexport function mintCommit<TChange>(\n\tparent: GraphCommit<TChange>,\n\tcommit: Omit<GraphCommit<TChange>, \"parent\">,\n): GraphCommit<TChange> {\n\tconst { revision, change } = commit;\n\treturn {\n\t\trevision,\n\t\tchange,\n\t\tparent,\n\t};\n}\n\nexport function replaceChange<TChange>(\n\tcommit: GraphCommit<TChange>,\n\tchange: TChange,\n): GraphCommit<TChange> {\n\tconst output = { ...commit, change };\n\tdelete output.rollback;\n\treturn output;\n}\n"]}
@@ -43,4 +43,16 @@ export declare enum RevertibleStatus {
43
43
  /** The revertible has been disposed. Reverting it will have no effect. */
44
44
  Disposed = 1
45
45
  }
46
+ /**
47
+ * Factory for creating a {@link Revertible}.
48
+ * Will error if invoked outside the scope of the `commitApplied` event that provides it, or if invoked multiple times.
49
+ *
50
+ * @param onRevertibleDisposed - A callback that will be invoked when the `Revertible` generated by this factory is disposed.
51
+ * This happens when the `Revertible` is disposed manually, or when the `TreeView` that the `Revertible` belongs to is disposed,
52
+ * whichever happens first.
53
+ * This is typically used to clean up any resources associated with the `Revertible` in the host application.
54
+ *
55
+ * @sealed @public
56
+ */
57
+ export type RevertibleFactory = (onRevertibleDisposed?: (revertible: Revertible) => void) => Revertible;
46
58
  //# sourceMappingURL=revertible.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revertible.d.ts","sourceRoot":"","sources":["../../src/core/revertible.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAElC;;OAEG;IACH,MAAM,IAAI,IAAI,CAAC;IACf;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CAChB;AAED;;;;GAIG;AACH,oBAAY,gBAAgB;IAC3B,sCAAsC;IACtC,KAAK,IAAA;IACL,0EAA0E;IAC1E,QAAQ,IAAA;CACR;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC/B,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,KACnD,UAAU,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revertible.js","sourceRoot":"","sources":["../../src/core/revertible.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmCH;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC3B,sCAAsC;IACtC,yDAAK,CAAA;IACL,0EAA0E;IAC1E,+DAAQ,CAAA;AACT,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Allows reversion of a change made to SharedTree.\n *\n * @remarks\n * Applications wanting to implement undo/redo support might typically maintain two stacks of Revertibles, with optional eviction policy to free up memory.\n *\n * @sealed @public\n */\nexport interface Revertible {\n\t/**\n\t * The current status of the revertible.\n\t */\n\treadonly status: RevertibleStatus;\n\n\t/**\n\t * Reverts the associated change and disposes it.\n\t */\n\trevert(): void;\n\t/**\n\t * Reverts the associated change and optionally disposes it.\n\t *\n\t * @param dispose - If true, the revertible will be disposed after being reverted.\n\t * If false, the revertible will remain valid. This can be useful for scenarios where the revert may be dropped\n\t * due to merge conflicts, and one wants to attempt reverting again.\n\t */\n\trevert(dispose: boolean): void;\n\n\t/**\n\t * Disposes this revertible, allowing associated resources to be released.\n\t */\n\tdispose(): void;\n}\n\n/**\n * The status of a {@link Revertible}.\n *\n * @public\n */\nexport enum RevertibleStatus {\n\t/** The revertible can be reverted. */\n\tValid,\n\t/** The revertible has been disposed. Reverting it will have no effect. */\n\tDisposed,\n}\n\n/**\n * Factory for creating a {@link Revertible}.\n * Will error if invoked outside the scope of the `commitApplied` event that provides it, or if invoked multiple times.\n *\n * @param onRevertibleDisposed - A callback that will be invoked when the `Revertible` generated by this factory is disposed.\n * This happens when the `Revertible` is disposed manually, or when the `TreeView` that the `Revertible` belongs to is disposed,\n * whichever happens first.\n * This is typically used to clean up any resources associated with the `Revertible` in the host application.\n *\n * @sealed @public\n */\nexport type RevertibleFactory = (\n\tonRevertibleDisposed?: (revertible: Revertible) => void,\n) => Revertible;\n"]}
@@ -39,7 +39,7 @@ export declare const FieldKindIdentifierSchema: import("@sinclair/typebox").TUns
39
39
  export declare const TreeNodeSchemaIdentifierSchema: import("@sinclair/typebox").TUnsafe<TreeNodeSchemaIdentifier<string>>;
40
40
  export declare const FieldSchemaFormat: import("@sinclair/typebox").TObject<{
41
41
  kind: import("@sinclair/typebox").TUnsafe<FieldKindIdentifier>;
42
- types: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<TreeNodeSchemaIdentifier<string>>>>;
42
+ types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<TreeNodeSchemaIdentifier<string>>>;
43
43
  }>;
44
44
  /**
45
45
  * Persisted version of {@link ValueSchema}.
@@ -62,14 +62,14 @@ export declare const TreeNodeSchemaDataFormat: import("@sinclair/typebox").TObje
62
62
  */
63
63
  object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
64
64
  kind: import("@sinclair/typebox").TUnsafe<FieldKindIdentifier>;
65
- types: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<TreeNodeSchemaIdentifier<string>>>>;
65
+ types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<TreeNodeSchemaIdentifier<string>>>;
66
66
  }>>>;
67
67
  /**
68
68
  * Map node union member.
69
69
  */
70
70
  map: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
71
71
  kind: import("@sinclair/typebox").TUnsafe<FieldKindIdentifier>;
72
- types: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<TreeNodeSchemaIdentifier<string>>>>;
72
+ types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<TreeNodeSchemaIdentifier<string>>>;
73
73
  }>>;
74
74
  /**
75
75
  * Leaf node union member.
@@ -17,7 +17,7 @@ export const FieldKindIdentifierSchema = brandedStringType();
17
17
  export const TreeNodeSchemaIdentifierSchema = brandedStringType();
18
18
  const FieldSchemaFormatBase = Type.Object({
19
19
  kind: FieldKindIdentifierSchema,
20
- types: Type.Optional(Type.Array(TreeNodeSchemaIdentifierSchema)),
20
+ types: Type.Array(TreeNodeSchemaIdentifierSchema),
21
21
  });
22
22
  const noAdditionalProps = { additionalProperties: false };
23
23
  export const FieldSchemaFormat = Type.Composite([FieldSchemaFormatBase], noAdditionalProps);
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/core/schema-stored/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmC,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAc,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAU,CAAC;AAUlC;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,EAAY,CAAC;AAsB5D,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,EAAuB,CAAC;AAElF;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,iBAAiB,EAA4B,CAAC;AAE5F,MAAM,qBAAqB,GAAG,IAAI,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,yBAAyB;IAC/B,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;CAChE,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAE5F;;GAEG;AACH,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC/B,mEAAM,CAAA;IACN,mEAAM,CAAA;IACN,qEAAO,CAAA;IACP,6EAAW,CAAA;IACX,+DAAI,CAAA;AACL,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CAClD;IACC;;OAEG;IACH,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,iBAAiB,CAAC,CAAC;IACpE;;OAEG;IACH,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;CACpD,EACD,YAAY,CACZ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport { type Brand, brandedStringType } from \"../../util/index.js\";\n\nexport const version = 1 as const;\n\n/**\n * Key (aka Name or Label) for a field which is scoped to a specific TreeNodeStoredSchema.\n *\n * Stable identifier, used when persisting data.\n * @internal\n */\nexport type FieldKey = Brand<string, \"tree.FieldKey\">;\n\n/**\n * TypeBox Schema for encoding {@link FieldKey} in persisted data.\n */\nexport const FieldKeySchema = brandedStringType<FieldKey>();\n\n/**\n * Identifier for a TreeNode schema.\n * Also known as \"Definition\"\n *\n * Stable identifier, used when persisting data.\n * @internal\n */\nexport type TreeNodeSchemaIdentifier<TName extends string = string> = Brand<\n\tTName,\n\t\"tree.TreeNodeSchemaIdentifier\"\n>;\n\n/**\n * Identifier for a FieldKind.\n * Refers to an exact stable policy (ex: specific version of a policy),\n * for how to handle (ex: edit and merge edits to) fields marked with this kind.\n * Persisted in documents as part of stored schema.\n * @internal\n */\nexport type FieldKindIdentifier = Brand<string, \"tree.FieldKindIdentifier\">;\nexport const FieldKindIdentifierSchema = brandedStringType<FieldKindIdentifier>();\n\n/**\n * TypeBox Schema for encoding {@link TreeNodeSchemaIdentifiers} in persisted data.\n */\nexport const TreeNodeSchemaIdentifierSchema = brandedStringType<TreeNodeSchemaIdentifier>();\n\nconst FieldSchemaFormatBase = Type.Object({\n\tkind: FieldKindIdentifierSchema,\n\ttypes: Type.Optional(Type.Array(TreeNodeSchemaIdentifierSchema)),\n});\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport const FieldSchemaFormat = Type.Composite([FieldSchemaFormatBase], noAdditionalProps);\n\n/**\n * Persisted version of {@link ValueSchema}.\n */\nexport enum PersistedValueSchema {\n\tNumber,\n\tString,\n\tBoolean,\n\tFluidHandle,\n\tNull,\n}\n\n/**\n * Discriminated union content of tree node schema.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const TreeNodeSchemaDataFormat = Type.Object(\n\t{\n\t\t/**\n\t\t * Object node union member.\n\t\t */\n\t\tobject: Type.Optional(Type.Record(Type.String(), FieldSchemaFormat)),\n\t\t/**\n\t\t * Map node union member.\n\t\t */\n\t\tmap: Type.Optional(FieldSchemaFormat),\n\t\t/**\n\t\t * Leaf node union member.\n\t\t */\n\t\tleaf: Type.Optional(Type.Enum(PersistedValueSchema)),\n\t},\n\tunionOptions,\n);\n\nexport type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;\n\nexport type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;\n"]}
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/core/schema-stored/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmC,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAc,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAU,CAAC;AAUlC;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,EAAY,CAAC;AAsB5D,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,EAAuB,CAAC;AAElF;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,iBAAiB,EAA4B,CAAC;AAE5F,MAAM,qBAAqB,GAAG,IAAI,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,yBAAyB;IAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC;CACjD,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAE5F;;GAEG;AACH,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC/B,mEAAM,CAAA;IACN,mEAAM,CAAA;IACN,qEAAO,CAAA;IACP,6EAAW,CAAA;IACX,+DAAI,CAAA;AACL,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CAClD;IACC;;OAEG;IACH,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,iBAAiB,CAAC,CAAC;IACpE;;OAEG;IACH,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;CACpD,EACD,YAAY,CACZ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport { type Brand, brandedStringType } from \"../../util/index.js\";\n\nexport const version = 1 as const;\n\n/**\n * Key (aka Name or Label) for a field which is scoped to a specific TreeNodeStoredSchema.\n *\n * Stable identifier, used when persisting data.\n * @internal\n */\nexport type FieldKey = Brand<string, \"tree.FieldKey\">;\n\n/**\n * TypeBox Schema for encoding {@link FieldKey} in persisted data.\n */\nexport const FieldKeySchema = brandedStringType<FieldKey>();\n\n/**\n * Identifier for a TreeNode schema.\n * Also known as \"Definition\"\n *\n * Stable identifier, used when persisting data.\n * @internal\n */\nexport type TreeNodeSchemaIdentifier<TName extends string = string> = Brand<\n\tTName,\n\t\"tree.TreeNodeSchemaIdentifier\"\n>;\n\n/**\n * Identifier for a FieldKind.\n * Refers to an exact stable policy (ex: specific version of a policy),\n * for how to handle (ex: edit and merge edits to) fields marked with this kind.\n * Persisted in documents as part of stored schema.\n * @internal\n */\nexport type FieldKindIdentifier = Brand<string, \"tree.FieldKindIdentifier\">;\nexport const FieldKindIdentifierSchema = brandedStringType<FieldKindIdentifier>();\n\n/**\n * TypeBox Schema for encoding {@link TreeNodeSchemaIdentifiers} in persisted data.\n */\nexport const TreeNodeSchemaIdentifierSchema = brandedStringType<TreeNodeSchemaIdentifier>();\n\nconst FieldSchemaFormatBase = Type.Object({\n\tkind: FieldKindIdentifierSchema,\n\ttypes: Type.Array(TreeNodeSchemaIdentifierSchema),\n});\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport const FieldSchemaFormat = Type.Composite([FieldSchemaFormatBase], noAdditionalProps);\n\n/**\n * Persisted version of {@link ValueSchema}.\n */\nexport enum PersistedValueSchema {\n\tNumber,\n\tString,\n\tBoolean,\n\tFluidHandle,\n\tNull,\n}\n\n/**\n * Discriminated union content of tree node schema.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const TreeNodeSchemaDataFormat = Type.Object(\n\t{\n\t\t/**\n\t\t * Object node union member.\n\t\t */\n\t\tobject: Type.Optional(Type.Record(Type.String(), FieldSchemaFormat)),\n\t\t/**\n\t\t * Map node union member.\n\t\t */\n\t\tmap: Type.Optional(FieldSchemaFormat),\n\t\t/**\n\t\t * Leaf node union member.\n\t\t */\n\t\tleaf: Type.Optional(Type.Enum(PersistedValueSchema)),\n\t},\n\tunionOptions,\n);\n\nexport type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;\n\nexport type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;\n"]}
@@ -22,11 +22,6 @@ export declare enum ValueSchema {
22
22
  * Set of allowed tree types.
23
23
  * Providing multiple values here allows polymorphism, tagged union style.
24
24
  *
25
- * If not specified, types are unconstrained
26
- * (equivalent to the set containing every TreeNodeSchemaIdentifier defined in the document).
27
- *
28
- * Note that even when unconstrained, children must still be in-schema for their own type.
29
- *
30
25
  * In the future, this could be extended to allow inlining a TreeNodeStoredSchema here
31
26
  * (or some similar structural schema system).
32
27
  * For structural types which could go here, there are a few interesting options:
@@ -48,7 +43,7 @@ export declare enum ValueSchema {
48
43
  * Care would need to be taken to make sure this is sound for the schema updating mechanisms.
49
44
  * @internal
50
45
  */
51
- export type TreeTypeSet = ReadonlySet<TreeNodeSchemaIdentifier> | undefined;
46
+ export type TreeTypeSet = ReadonlySet<TreeNodeSchemaIdentifier>;
52
47
  /**
53
48
  * Declarative portion of a Field Kind.
54
49
  *
@@ -94,7 +89,7 @@ export interface TreeFieldStoredSchema {
94
89
  * The set of allowed child types.
95
90
  * If not specified, types are unconstrained.
96
91
  */
97
- readonly types?: TreeTypeSet;
92
+ readonly types: TreeTypeSet;
98
93
  }
99
94
  /**
100
95
  * Identifier used for the FieldKind for fields which must be empty.
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/core/schema-stored/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,KAAK,WAAW,EAA0B,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,mBAA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