@fluidframework/tree 2.4.0-297027 → 2.4.0-299374

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 (559) hide show
  1. package/.dependency-cruiser-known-violations.json +0 -14
  2. package/.vscode/settings.json +9 -1
  3. package/api-report/tree.alpha.api.md +178 -21
  4. package/api-report/tree.beta.api.md +46 -21
  5. package/api-report/tree.legacy.alpha.api.md +46 -21
  6. package/api-report/tree.legacy.public.api.md +46 -21
  7. package/api-report/tree.public.api.md +46 -21
  8. package/dist/alpha.d.ts +29 -1
  9. package/dist/beta.d.ts +2 -0
  10. package/dist/codec/codec.d.ts +4 -4
  11. package/dist/codec/codec.js.map +1 -1
  12. package/dist/codec/noopValidator.d.ts +1 -1
  13. package/dist/codec/noopValidator.js +1 -1
  14. package/dist/codec/noopValidator.js.map +1 -1
  15. package/dist/core/change-family/changeFamily.d.ts +2 -2
  16. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  17. package/dist/core/change-family/changeFamily.js.map +1 -1
  18. package/dist/core/change-family/editBuilder.d.ts +3 -2
  19. package/dist/core/change-family/editBuilder.d.ts.map +1 -1
  20. package/dist/core/change-family/editBuilder.js.map +1 -1
  21. package/dist/core/rebase/changeRebaser.d.ts +2 -1
  22. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  23. package/dist/core/rebase/changeRebaser.js.map +1 -1
  24. package/dist/core/rebase/utils.js +1 -1
  25. package/dist/core/rebase/utils.js.map +1 -1
  26. package/dist/core/tree/anchorSet.d.ts +159 -2
  27. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  28. package/dist/core/tree/anchorSet.js +54 -12
  29. package/dist/core/tree/anchorSet.js.map +1 -1
  30. package/dist/external-utilities/typeboxValidator.d.ts +1 -1
  31. package/dist/external-utilities/typeboxValidator.js +1 -1
  32. package/dist/external-utilities/typeboxValidator.js.map +1 -1
  33. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +4 -3
  34. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  35. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +41 -30
  36. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  37. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +4 -6
  38. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  39. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  40. package/dist/feature-libraries/flex-tree/lazyField.d.ts +4 -0
  41. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  42. package/dist/feature-libraries/flex-tree/lazyField.js +38 -6
  43. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  44. package/dist/feature-libraries/index.d.ts +0 -1
  45. package/dist/feature-libraries/index.d.ts.map +1 -1
  46. package/dist/feature-libraries/index.js +46 -49
  47. package/dist/feature-libraries/index.js.map +1 -1
  48. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  49. package/dist/feature-libraries/mitigatedChangeFamily.js +4 -4
  50. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  51. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  52. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  53. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  54. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +12 -8
  55. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  56. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +179 -60
  57. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  58. package/dist/feature-libraries/optional-field/optionalField.d.ts +10 -9
  59. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  60. package/dist/feature-libraries/optional-field/optionalField.js +9 -7
  61. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  62. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +3 -10
  63. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  64. package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -8
  65. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  66. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  67. package/dist/feature-libraries/sequence-field/compose.js +32 -20
  68. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  69. package/dist/feature-libraries/sequence-field/invert.d.ts +6 -1
  70. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  71. package/dist/feature-libraries/sequence-field/invert.js +25 -9
  72. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  73. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +17 -16
  74. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  75. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +19 -11
  76. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  77. package/dist/feature-libraries/treeCompressionUtils.d.ts +1 -1
  78. package/dist/feature-libraries/treeCompressionUtils.js +1 -1
  79. package/dist/feature-libraries/treeCompressionUtils.js.map +1 -1
  80. package/dist/index.d.ts +6 -5
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +4 -2
  83. package/dist/index.js.map +1 -1
  84. package/dist/internalTypes.d.ts +2 -2
  85. package/dist/internalTypes.d.ts.map +1 -1
  86. package/dist/internalTypes.js.map +1 -1
  87. package/dist/legacy.d.ts +2 -0
  88. package/dist/packageVersion.d.ts +1 -1
  89. package/dist/packageVersion.js +1 -1
  90. package/dist/packageVersion.js.map +1 -1
  91. package/dist/public.d.ts +2 -0
  92. package/dist/shared-tree/index.d.ts +2 -1
  93. package/dist/shared-tree/index.d.ts.map +1 -1
  94. package/dist/shared-tree/index.js +5 -1
  95. package/dist/shared-tree/index.js.map +1 -1
  96. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  97. package/dist/shared-tree/schematizingTreeView.js +1 -14
  98. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  99. package/dist/shared-tree/sharedTree.d.ts +24 -9
  100. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  101. package/dist/shared-tree/sharedTree.js +21 -9
  102. package/dist/shared-tree/sharedTree.js.map +1 -1
  103. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
  104. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  105. package/dist/shared-tree/sharedTreeChangeFamily.js +4 -4
  106. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  107. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +2 -2
  108. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  109. package/dist/shared-tree/sharedTreeEditBuilder.js +15 -11
  110. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  111. package/dist/shared-tree/treeApi.d.ts +6 -6
  112. package/dist/shared-tree/treeApi.d.ts.map +1 -1
  113. package/dist/shared-tree/treeApi.js.map +1 -1
  114. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  115. package/dist/shared-tree/treeCheckout.js +4 -3
  116. package/dist/shared-tree/treeCheckout.js.map +1 -1
  117. package/dist/shared-tree-core/branch.d.ts +2 -3
  118. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  119. package/dist/shared-tree-core/branch.js +10 -11
  120. package/dist/shared-tree-core/branch.js.map +1 -1
  121. package/dist/shared-tree-core/defaultResubmitMachine.d.ts +5 -5
  122. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  123. package/dist/shared-tree-core/defaultResubmitMachine.js +4 -4
  124. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  125. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  126. package/dist/shared-tree-core/editManager.js +1 -1
  127. package/dist/shared-tree-core/editManager.js.map +1 -1
  128. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  129. package/dist/shared-tree-core/sharedTreeCore.js +2 -2
  130. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  131. package/dist/simple-tree/api/conciseTree.d.ts +29 -0
  132. package/dist/simple-tree/api/conciseTree.d.ts.map +1 -0
  133. package/dist/simple-tree/api/conciseTree.js +25 -0
  134. package/dist/simple-tree/api/conciseTree.js.map +1 -0
  135. package/dist/simple-tree/api/customTree.d.ts +44 -0
  136. package/dist/simple-tree/api/customTree.d.ts.map +1 -0
  137. package/dist/simple-tree/api/customTree.js +63 -0
  138. package/dist/simple-tree/api/customTree.js.map +1 -0
  139. package/dist/simple-tree/api/index.d.ts +7 -2
  140. package/dist/simple-tree/api/index.d.ts.map +1 -1
  141. package/dist/simple-tree/api/index.js +5 -1
  142. package/dist/simple-tree/api/index.js.map +1 -1
  143. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +41 -26
  144. package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  145. package/dist/simple-tree/api/schemaCreationUtilities.js +43 -15
  146. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  147. package/dist/simple-tree/api/schemaFactory.d.ts +1 -2
  148. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  149. package/dist/simple-tree/api/schemaFactory.js +8 -8
  150. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  151. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -2
  152. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  153. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  154. package/dist/simple-tree/api/storedSchema.d.ts +78 -0
  155. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -0
  156. package/dist/simple-tree/api/storedSchema.js +107 -0
  157. package/dist/simple-tree/api/storedSchema.js.map +1 -0
  158. package/dist/simple-tree/api/testRecursiveDomain.d.ts +10 -10
  159. package/dist/simple-tree/api/tree.d.ts +12 -3
  160. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  161. package/dist/simple-tree/api/tree.js.map +1 -1
  162. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  163. package/dist/simple-tree/api/treeNodeApi.js +5 -5
  164. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  165. package/dist/simple-tree/{typesUnsafe.d.ts → api/typesUnsafe.d.ts} +58 -10
  166. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -0
  167. package/dist/simple-tree/api/typesUnsafe.js.map +1 -0
  168. package/dist/simple-tree/api/verboseTree.d.ts +6 -20
  169. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  170. package/dist/simple-tree/api/verboseTree.js +10 -48
  171. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  172. package/dist/simple-tree/arrayNode.d.ts +14 -3
  173. package/dist/simple-tree/arrayNode.d.ts.map +1 -1
  174. package/dist/simple-tree/arrayNode.js +1 -2
  175. package/dist/simple-tree/arrayNode.js.map +1 -1
  176. package/dist/simple-tree/core/index.d.ts +1 -1
  177. package/dist/simple-tree/core/index.d.ts.map +1 -1
  178. package/dist/simple-tree/core/index.js +2 -1
  179. package/dist/simple-tree/core/index.js.map +1 -1
  180. package/dist/simple-tree/core/treeNodeKernel.d.ts +9 -0
  181. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  182. package/dist/simple-tree/core/treeNodeKernel.js +14 -1
  183. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  184. package/dist/simple-tree/core/treeNodeSchema.d.ts +6 -5
  185. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  186. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  187. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  188. package/dist/simple-tree/core/unhydratedFlexTree.js +3 -1
  189. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  190. package/dist/simple-tree/core/withType.d.ts +3 -1
  191. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  192. package/dist/simple-tree/core/withType.js.map +1 -1
  193. package/dist/simple-tree/flexList.d.ts.map +1 -0
  194. package/dist/simple-tree/flexList.js.map +1 -0
  195. package/dist/simple-tree/index.d.ts +6 -7
  196. package/dist/simple-tree/index.d.ts.map +1 -1
  197. package/dist/simple-tree/index.js +5 -3
  198. package/dist/simple-tree/index.js.map +1 -1
  199. package/dist/simple-tree/mapNode.d.ts.map +1 -1
  200. package/dist/simple-tree/mapNode.js +2 -3
  201. package/dist/simple-tree/mapNode.js.map +1 -1
  202. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  203. package/dist/simple-tree/objectNode.js +3 -4
  204. package/dist/simple-tree/objectNode.js.map +1 -1
  205. package/dist/simple-tree/schemaTypes.d.ts +60 -7
  206. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  207. package/dist/simple-tree/schemaTypes.js +11 -6
  208. package/dist/simple-tree/schemaTypes.js.map +1 -1
  209. package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
  210. package/dist/simple-tree/toFlexSchema.js +13 -15
  211. package/dist/simple-tree/toFlexSchema.js.map +1 -1
  212. package/dist/simple-tree/toMapTree.d.ts +4 -2
  213. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  214. package/dist/simple-tree/toMapTree.js +3 -3
  215. package/dist/simple-tree/toMapTree.js.map +1 -1
  216. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  217. package/dist/simple-tree/treeNodeValid.js +2 -1
  218. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  219. package/dist/treeFactory.d.ts +1 -0
  220. package/dist/treeFactory.d.ts.map +1 -1
  221. package/dist/treeFactory.js +1 -0
  222. package/dist/treeFactory.js.map +1 -1
  223. package/dist/util/utils.d.ts +10 -8
  224. package/dist/util/utils.d.ts.map +1 -1
  225. package/dist/util/utils.js.map +1 -1
  226. package/docs/main/detached-trees.md +8 -8
  227. package/lib/alpha.d.ts +29 -1
  228. package/lib/beta.d.ts +2 -0
  229. package/lib/codec/codec.d.ts +4 -4
  230. package/lib/codec/codec.js.map +1 -1
  231. package/lib/codec/noopValidator.d.ts +1 -1
  232. package/lib/codec/noopValidator.js +1 -1
  233. package/lib/codec/noopValidator.js.map +1 -1
  234. package/lib/core/change-family/changeFamily.d.ts +2 -2
  235. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  236. package/lib/core/change-family/changeFamily.js.map +1 -1
  237. package/lib/core/change-family/editBuilder.d.ts +3 -2
  238. package/lib/core/change-family/editBuilder.d.ts.map +1 -1
  239. package/lib/core/change-family/editBuilder.js.map +1 -1
  240. package/lib/core/rebase/changeRebaser.d.ts +2 -1
  241. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  242. package/lib/core/rebase/changeRebaser.js.map +1 -1
  243. package/lib/core/rebase/utils.js +1 -1
  244. package/lib/core/rebase/utils.js.map +1 -1
  245. package/lib/core/tree/anchorSet.d.ts +159 -2
  246. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  247. package/lib/core/tree/anchorSet.js +54 -12
  248. package/lib/core/tree/anchorSet.js.map +1 -1
  249. package/lib/external-utilities/typeboxValidator.d.ts +1 -1
  250. package/lib/external-utilities/typeboxValidator.js +1 -1
  251. package/lib/external-utilities/typeboxValidator.js.map +1 -1
  252. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +4 -3
  253. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  254. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +41 -30
  255. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  256. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +4 -6
  257. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  258. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  259. package/lib/feature-libraries/flex-tree/lazyField.d.ts +4 -0
  260. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  261. package/lib/feature-libraries/flex-tree/lazyField.js +36 -5
  262. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  263. package/lib/feature-libraries/index.d.ts +0 -1
  264. package/lib/feature-libraries/index.d.ts.map +1 -1
  265. package/lib/feature-libraries/index.js +0 -1
  266. package/lib/feature-libraries/index.js.map +1 -1
  267. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  268. package/lib/feature-libraries/mitigatedChangeFamily.js +4 -4
  269. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  270. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  271. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  272. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  273. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +12 -8
  274. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  275. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +180 -61
  276. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  277. package/lib/feature-libraries/optional-field/optionalField.d.ts +10 -9
  278. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  279. package/lib/feature-libraries/optional-field/optionalField.js +9 -7
  280. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  281. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +3 -10
  282. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  283. package/lib/feature-libraries/schema-index/schemaSummarizer.js +1 -8
  284. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  285. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  286. package/lib/feature-libraries/sequence-field/compose.js +32 -20
  287. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  288. package/lib/feature-libraries/sequence-field/invert.d.ts +6 -1
  289. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  290. package/lib/feature-libraries/sequence-field/invert.js +25 -9
  291. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  292. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +17 -16
  293. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  294. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +19 -11
  295. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  296. package/lib/feature-libraries/treeCompressionUtils.d.ts +1 -1
  297. package/lib/feature-libraries/treeCompressionUtils.js +1 -1
  298. package/lib/feature-libraries/treeCompressionUtils.js.map +1 -1
  299. package/lib/index.d.ts +6 -5
  300. package/lib/index.d.ts.map +1 -1
  301. package/lib/index.js +3 -3
  302. package/lib/index.js.map +1 -1
  303. package/lib/internalTypes.d.ts +2 -2
  304. package/lib/internalTypes.d.ts.map +1 -1
  305. package/lib/internalTypes.js.map +1 -1
  306. package/lib/legacy.d.ts +2 -0
  307. package/lib/packageVersion.d.ts +1 -1
  308. package/lib/packageVersion.js +1 -1
  309. package/lib/packageVersion.js.map +1 -1
  310. package/lib/public.d.ts +2 -0
  311. package/lib/shared-tree/index.d.ts +2 -1
  312. package/lib/shared-tree/index.d.ts.map +1 -1
  313. package/lib/shared-tree/index.js +2 -1
  314. package/lib/shared-tree/index.js.map +1 -1
  315. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  316. package/lib/shared-tree/schematizingTreeView.js +2 -15
  317. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  318. package/lib/shared-tree/sharedTree.d.ts +24 -9
  319. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  320. package/lib/shared-tree/sharedTree.js +20 -9
  321. package/lib/shared-tree/sharedTree.js.map +1 -1
  322. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
  323. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  324. package/lib/shared-tree/sharedTreeChangeFamily.js +4 -4
  325. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  326. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +2 -2
  327. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  328. package/lib/shared-tree/sharedTreeEditBuilder.js +15 -11
  329. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  330. package/lib/shared-tree/treeApi.d.ts +6 -6
  331. package/lib/shared-tree/treeApi.d.ts.map +1 -1
  332. package/lib/shared-tree/treeApi.js.map +1 -1
  333. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  334. package/lib/shared-tree/treeCheckout.js +5 -4
  335. package/lib/shared-tree/treeCheckout.js.map +1 -1
  336. package/lib/shared-tree-core/branch.d.ts +2 -3
  337. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  338. package/lib/shared-tree-core/branch.js +11 -12
  339. package/lib/shared-tree-core/branch.js.map +1 -1
  340. package/lib/shared-tree-core/defaultResubmitMachine.d.ts +5 -5
  341. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  342. package/lib/shared-tree-core/defaultResubmitMachine.js +4 -4
  343. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  344. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  345. package/lib/shared-tree-core/editManager.js +2 -2
  346. package/lib/shared-tree-core/editManager.js.map +1 -1
  347. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  348. package/lib/shared-tree-core/sharedTreeCore.js +2 -2
  349. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  350. package/lib/simple-tree/api/conciseTree.d.ts +29 -0
  351. package/lib/simple-tree/api/conciseTree.d.ts.map +1 -0
  352. package/lib/simple-tree/api/conciseTree.js +21 -0
  353. package/lib/simple-tree/api/conciseTree.js.map +1 -0
  354. package/lib/simple-tree/api/customTree.d.ts +44 -0
  355. package/lib/simple-tree/api/customTree.d.ts.map +1 -0
  356. package/lib/simple-tree/api/customTree.js +59 -0
  357. package/lib/simple-tree/api/customTree.js.map +1 -0
  358. package/lib/simple-tree/api/index.d.ts +7 -2
  359. package/lib/simple-tree/api/index.d.ts.map +1 -1
  360. package/lib/simple-tree/api/index.js +1 -0
  361. package/lib/simple-tree/api/index.js.map +1 -1
  362. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +41 -26
  363. package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  364. package/lib/simple-tree/api/schemaCreationUtilities.js +43 -15
  365. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  366. package/lib/simple-tree/api/schemaFactory.d.ts +1 -2
  367. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  368. package/lib/simple-tree/api/schemaFactory.js +1 -1
  369. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  370. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -2
  371. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  372. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  373. package/lib/simple-tree/api/storedSchema.d.ts +78 -0
  374. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -0
  375. package/lib/simple-tree/api/storedSchema.js +101 -0
  376. package/lib/simple-tree/api/storedSchema.js.map +1 -0
  377. package/lib/simple-tree/api/testRecursiveDomain.d.ts +10 -10
  378. package/lib/simple-tree/api/tree.d.ts +12 -3
  379. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  380. package/lib/simple-tree/api/tree.js.map +1 -1
  381. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  382. package/lib/simple-tree/api/treeNodeApi.js +3 -3
  383. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  384. package/lib/simple-tree/{typesUnsafe.d.ts → api/typesUnsafe.d.ts} +58 -10
  385. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -0
  386. package/lib/simple-tree/api/typesUnsafe.js.map +1 -0
  387. package/lib/simple-tree/api/verboseTree.d.ts +6 -20
  388. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  389. package/lib/simple-tree/api/verboseTree.js +11 -49
  390. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  391. package/lib/simple-tree/arrayNode.d.ts +14 -3
  392. package/lib/simple-tree/arrayNode.d.ts.map +1 -1
  393. package/lib/simple-tree/arrayNode.js +1 -2
  394. package/lib/simple-tree/arrayNode.js.map +1 -1
  395. package/lib/simple-tree/core/index.d.ts +1 -1
  396. package/lib/simple-tree/core/index.d.ts.map +1 -1
  397. package/lib/simple-tree/core/index.js +1 -1
  398. package/lib/simple-tree/core/index.js.map +1 -1
  399. package/lib/simple-tree/core/treeNodeKernel.d.ts +9 -0
  400. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  401. package/lib/simple-tree/core/treeNodeKernel.js +12 -0
  402. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  403. package/lib/simple-tree/core/treeNodeSchema.d.ts +6 -5
  404. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  405. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  406. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  407. package/lib/simple-tree/core/unhydratedFlexTree.js +3 -1
  408. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  409. package/lib/simple-tree/core/withType.d.ts +3 -1
  410. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  411. package/lib/simple-tree/core/withType.js.map +1 -1
  412. package/lib/simple-tree/flexList.d.ts.map +1 -0
  413. package/lib/simple-tree/flexList.js.map +1 -0
  414. package/lib/simple-tree/index.d.ts +6 -7
  415. package/lib/simple-tree/index.d.ts.map +1 -1
  416. package/lib/simple-tree/index.js +3 -4
  417. package/lib/simple-tree/index.js.map +1 -1
  418. package/lib/simple-tree/mapNode.d.ts.map +1 -1
  419. package/lib/simple-tree/mapNode.js +1 -2
  420. package/lib/simple-tree/mapNode.js.map +1 -1
  421. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  422. package/lib/simple-tree/objectNode.js +1 -2
  423. package/lib/simple-tree/objectNode.js.map +1 -1
  424. package/lib/simple-tree/schemaTypes.d.ts +60 -7
  425. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  426. package/lib/simple-tree/schemaTypes.js +6 -1
  427. package/lib/simple-tree/schemaTypes.js.map +1 -1
  428. package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
  429. package/lib/simple-tree/toFlexSchema.js +1 -3
  430. package/lib/simple-tree/toFlexSchema.js.map +1 -1
  431. package/lib/simple-tree/toMapTree.d.ts +4 -2
  432. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  433. package/lib/simple-tree/toMapTree.js +3 -3
  434. package/lib/simple-tree/toMapTree.js.map +1 -1
  435. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  436. package/lib/simple-tree/treeNodeValid.js +2 -1
  437. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  438. package/lib/treeFactory.d.ts +1 -0
  439. package/lib/treeFactory.d.ts.map +1 -1
  440. package/lib/treeFactory.js +1 -0
  441. package/lib/treeFactory.js.map +1 -1
  442. package/lib/util/utils.d.ts +10 -8
  443. package/lib/util/utils.d.ts.map +1 -1
  444. package/lib/util/utils.js.map +1 -1
  445. package/package.json +44 -27
  446. package/src/codec/codec.ts +4 -4
  447. package/src/codec/noopValidator.ts +1 -1
  448. package/src/core/change-family/changeFamily.ts +5 -2
  449. package/src/core/change-family/editBuilder.ts +3 -2
  450. package/src/core/rebase/changeRebaser.ts +6 -1
  451. package/src/core/rebase/utils.ts +1 -1
  452. package/src/core/tree/anchorSet.ts +63 -13
  453. package/src/external-utilities/typeboxValidator.ts +1 -1
  454. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +92 -47
  455. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +7 -7
  456. package/src/feature-libraries/flex-tree/lazyField.ts +44 -7
  457. package/src/feature-libraries/index.ts +0 -10
  458. package/src/feature-libraries/mitigatedChangeFamily.ts +11 -4
  459. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +1 -0
  460. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +218 -175
  461. package/src/feature-libraries/optional-field/optionalField.ts +21 -17
  462. package/src/feature-libraries/schema-index/schemaSummarizer.ts +2 -10
  463. package/src/feature-libraries/sequence-field/compose.ts +67 -58
  464. package/src/feature-libraries/sequence-field/invert.ts +30 -6
  465. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +65 -19
  466. package/src/feature-libraries/treeCompressionUtils.ts +1 -1
  467. package/src/index.ts +26 -6
  468. package/src/internalTypes.ts +4 -1
  469. package/src/packageVersion.ts +1 -1
  470. package/src/shared-tree/index.ts +5 -0
  471. package/src/shared-tree/schematizingTreeView.ts +7 -16
  472. package/src/shared-tree/sharedTree.ts +55 -23
  473. package/src/shared-tree/sharedTreeChangeFamily.ts +5 -1
  474. package/src/shared-tree/sharedTreeEditBuilder.ts +23 -12
  475. package/src/shared-tree/treeApi.ts +19 -9
  476. package/src/shared-tree/treeCheckout.ts +7 -6
  477. package/src/shared-tree-core/branch.ts +11 -14
  478. package/src/shared-tree-core/defaultResubmitMachine.ts +4 -4
  479. package/src/shared-tree-core/editManager.ts +2 -1
  480. package/src/shared-tree-core/sharedTreeCore.ts +4 -2
  481. package/src/simple-tree/api/conciseTree.ts +58 -0
  482. package/src/simple-tree/api/customTree.ts +119 -0
  483. package/src/simple-tree/api/index.ts +39 -1
  484. package/src/simple-tree/api/schemaCreationUtilities.ts +55 -36
  485. package/src/simple-tree/api/schemaFactory.ts +4 -6
  486. package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -2
  487. package/src/simple-tree/api/storedSchema.ts +126 -0
  488. package/src/simple-tree/api/tree.ts +24 -2
  489. package/src/simple-tree/api/treeNodeApi.ts +3 -8
  490. package/src/simple-tree/{typesUnsafe.ts → api/typesUnsafe.ts} +95 -21
  491. package/src/simple-tree/api/verboseTree.ts +21 -76
  492. package/src/simple-tree/arrayNode.ts +35 -15
  493. package/src/simple-tree/core/index.ts +1 -0
  494. package/src/simple-tree/core/treeNodeKernel.ts +13 -0
  495. package/src/simple-tree/core/treeNodeSchema.ts +7 -5
  496. package/src/simple-tree/core/unhydratedFlexTree.ts +6 -1
  497. package/src/simple-tree/core/withType.ts +10 -1
  498. package/src/simple-tree/index.ts +41 -21
  499. package/src/simple-tree/mapNode.ts +1 -1
  500. package/src/simple-tree/objectNode.ts +1 -1
  501. package/src/simple-tree/schemaTypes.ts +70 -11
  502. package/src/simple-tree/toFlexSchema.ts +1 -3
  503. package/src/simple-tree/toMapTree.ts +7 -4
  504. package/src/simple-tree/treeNodeValid.ts +2 -1
  505. package/src/treeFactory.ts +1 -0
  506. package/src/util/utils.ts +10 -8
  507. package/dist/feature-libraries/flex-tree/unboxed.d.ts +0 -12
  508. package/dist/feature-libraries/flex-tree/unboxed.d.ts.map +0 -1
  509. package/dist/feature-libraries/flex-tree/unboxed.js +0 -20
  510. package/dist/feature-libraries/flex-tree/unboxed.js.map +0 -1
  511. package/dist/feature-libraries/typed-schema/flexList.d.ts.map +0 -1
  512. package/dist/feature-libraries/typed-schema/flexList.js.map +0 -1
  513. package/dist/feature-libraries/typed-schema/index.d.ts +0 -7
  514. package/dist/feature-libraries/typed-schema/index.d.ts.map +0 -1
  515. package/dist/feature-libraries/typed-schema/index.js +0 -12
  516. package/dist/feature-libraries/typed-schema/index.js.map +0 -1
  517. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +0 -14
  518. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +0 -1
  519. package/dist/feature-libraries/typed-schema/typedTreeSchema.js +0 -7
  520. package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +0 -1
  521. package/dist/simple-tree/proxyBinding.d.ts +0 -15
  522. package/dist/simple-tree/proxyBinding.d.ts.map +0 -1
  523. package/dist/simple-tree/proxyBinding.js +0 -22
  524. package/dist/simple-tree/proxyBinding.js.map +0 -1
  525. package/dist/simple-tree/typesUnsafe.d.ts.map +0 -1
  526. package/dist/simple-tree/typesUnsafe.js.map +0 -1
  527. package/lib/feature-libraries/flex-tree/unboxed.d.ts +0 -12
  528. package/lib/feature-libraries/flex-tree/unboxed.d.ts.map +0 -1
  529. package/lib/feature-libraries/flex-tree/unboxed.js +0 -16
  530. package/lib/feature-libraries/flex-tree/unboxed.js.map +0 -1
  531. package/lib/feature-libraries/typed-schema/flexList.d.ts.map +0 -1
  532. package/lib/feature-libraries/typed-schema/flexList.js.map +0 -1
  533. package/lib/feature-libraries/typed-schema/index.d.ts +0 -7
  534. package/lib/feature-libraries/typed-schema/index.d.ts.map +0 -1
  535. package/lib/feature-libraries/typed-schema/index.js +0 -6
  536. package/lib/feature-libraries/typed-schema/index.js.map +0 -1
  537. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +0 -14
  538. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +0 -1
  539. package/lib/feature-libraries/typed-schema/typedTreeSchema.js +0 -6
  540. package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +0 -1
  541. package/lib/simple-tree/proxyBinding.d.ts +0 -15
  542. package/lib/simple-tree/proxyBinding.d.ts.map +0 -1
  543. package/lib/simple-tree/proxyBinding.js +0 -18
  544. package/lib/simple-tree/proxyBinding.js.map +0 -1
  545. package/lib/simple-tree/typesUnsafe.d.ts.map +0 -1
  546. package/lib/simple-tree/typesUnsafe.js.map +0 -1
  547. package/src/feature-libraries/flex-tree/unboxed.ts +0 -24
  548. package/src/feature-libraries/typed-schema/README.md +0 -6
  549. package/src/feature-libraries/typed-schema/index.ts +0 -16
  550. package/src/feature-libraries/typed-schema/typedTreeSchema.ts +0 -14
  551. package/src/simple-tree/proxyBinding.ts +0 -20
  552. /package/dist/simple-tree/{typesUnsafe.js → api/typesUnsafe.js} +0 -0
  553. /package/dist/{feature-libraries/typed-schema → simple-tree}/flexList.d.ts +0 -0
  554. /package/dist/{feature-libraries/typed-schema → simple-tree}/flexList.js +0 -0
  555. /package/lib/simple-tree/{typesUnsafe.js → api/typesUnsafe.js} +0 -0
  556. /package/lib/{feature-libraries/typed-schema → simple-tree}/flexList.d.ts +0 -0
  557. /package/lib/{feature-libraries/typed-schema → simple-tree}/flexList.js +0 -0
  558. /package/src/simple-tree/{ProxyBinding.md → core/TreeNodeBinding.md} +0 -0
  559. /package/src/{feature-libraries/typed-schema → simple-tree}/flexList.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"sequenceFieldEditor.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldEditor.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAK7D,6DAAuD;AAWvD,yCAAuC;AAwC1B,QAAA,mBAAmB,GAAG;IAClC,gBAAgB,EAAE,CAAC,KAAa,EAAE,MAAc,EAAa,EAAE,CAC9D,WAAW,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,MAAM,EAAE,CAAC,KAAa,EAAE,KAAa,EAAE,OAAyB,EAAa,EAAE;QAC9E,MAAM,IAAI,GAAqB;YAC9B,IAAI,EAAE,QAAQ;YACd,EAAE,EAAE,OAAO;YACX,KAAK;YACL,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;SAC5B,CAAC;QACF,OAAO,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IACD,MAAM,EAAE,CAAC,KAAa,EAAE,KAAa,EAAE,EAAoB,EAAa,EAAE,CACzE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IAErE,MAAM,EAAE,CAAC,KAAa,EAAE,KAAa,EAAE,WAAmB,EAAa,EAAE;QACxE,IAAA,iBAAM,EAAC,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AAC,MAAM,CAAC,CAAC;IAC3B,CAAC;SAAM,CAAC;QACP,MAAM,kBAAkB,GAAG,SAAS,GAAG,WAAW,CAAC;QACnD,iDAAiD;QACjD,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,IAAA,oBAAS,EAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;QACjE,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC3B,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC1B,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC;AACnB,CAAC;AAED,SAAS,WAAW,CAAC,KAAa,EAAE,IAAU;IAC7C,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { ChangesetLocalId } from \"../../core/index.js\";\nimport type { FieldEditor, NodeId } from \"../modular-schema/index.js\";\n\nimport { MarkListFactory } from \"./markListFactory.js\";\nimport type {\n\tCellId,\n\tCellMark,\n\tChangeset,\n\tInsert,\n\tMark,\n\tMarkList,\n\tMoveIn,\n\tMoveOut,\n} from \"./types.js\";\nimport { splitMark } from \"./utils.js\";\n\nexport interface SequenceFieldEditor extends FieldEditor<Changeset> {\n\tinsert(index: number, count: number, firstId: ChangesetLocalId): Changeset;\n\tremove(index: number, count: number, id: ChangesetLocalId): Changeset;\n\trevive(index: number, count: number, detachEvent: CellId, isIntention?: true): Changeset;\n\n\t/**\n\t *\n\t * @param sourceIndex - The index of the first node move\n\t * @param count - The number of nodes to move\n\t * @param destIndex - The index the nodes should be moved to, interpreted before detaching the moved nodes\n\t * @param detachCellId - The local ID to assign to the first cell being emptied by the move\n\t * @param attachCellId - The local ID to assign to the first cell being filled by the move\n\t */\n\tmove(\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestIndex: number,\n\t\tdetachCellId: ChangesetLocalId,\n\t\tattachCellId: ChangesetLocalId,\n\t): Changeset;\n\n\tmoveOut(sourceIndex: number, count: number, id: ChangesetLocalId): Changeset;\n\tmoveIn(\n\t\tdestIndex: number,\n\t\tcount: number,\n\t\tmoveId: ChangesetLocalId,\n\t\tattachCellId: ChangesetLocalId,\n\t): Changeset;\n\n\treturn(\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestIndex: number,\n\t\tdetachCellId: CellId,\n\t\tattachCellId: CellId,\n\t): Changeset;\n}\n\nexport const sequenceFieldEditor = {\n\tbuildChildChange: (index: number, change: NodeId): Changeset =>\n\t\tmarkAtIndex(index, { count: 1, changes: change }),\n\tinsert: (index: number, count: number, firstId: ChangesetLocalId): Changeset => {\n\t\tconst mark: CellMark<Insert> = {\n\t\t\ttype: \"Insert\",\n\t\t\tid: firstId,\n\t\t\tcount,\n\t\t\tcellId: { localId: firstId },\n\t\t};\n\t\treturn markAtIndex(index, mark);\n\t},\n\tremove: (index: number, count: number, id: ChangesetLocalId): Changeset =>\n\t\tcount === 0 ? [] : markAtIndex(index, { type: \"Remove\", count, id }),\n\n\trevive: (index: number, count: number, detachEvent: CellId): Changeset => {\n\t\tassert(detachEvent.revision !== undefined, 0x724 /* Detach event must have a revision */);\n\t\tconst mark: CellMark<Insert> = {\n\t\t\ttype: \"Insert\",\n\t\t\tid: detachEvent.localId,\n\t\t\tcount,\n\t\t\tcellId: detachEvent,\n\t\t};\n\t\treturn count === 0 ? [] : markAtIndex(index, mark);\n\t},\n\n\tmove(\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestIndex: number,\n\t\tdetachCellId: ChangesetLocalId,\n\t\tattachCellId: ChangesetLocalId,\n\t): Changeset {\n\t\tconst moveIn: Mark = {\n\t\t\ttype: \"MoveIn\",\n\t\t\tid: detachCellId,\n\t\t\tcount,\n\t\t\tcellId: { localId: attachCellId },\n\t\t};\n\t\tconst moveOut: Mark = {\n\t\t\ttype: \"MoveOut\",\n\t\t\tid: detachCellId,\n\t\t\tcount,\n\t\t};\n\t\treturn moveMarksToMarkList(sourceIndex, count, destIndex, moveOut, moveIn);\n\t},\n\n\tmoveOut(sourceIndex: number, count: number, detachCellId: ChangesetLocalId): Changeset {\n\t\tconst moveOut: Mark = {\n\t\t\ttype: \"MoveOut\",\n\t\t\tid: detachCellId,\n\t\t\tcount,\n\t\t};\n\t\treturn markAtIndex(sourceIndex, moveOut);\n\t},\n\n\tmoveIn(\n\t\tdestIndex: number,\n\t\tcount: number,\n\t\tmoveId: ChangesetLocalId,\n\t\tattachCellId: ChangesetLocalId,\n\t): Changeset {\n\t\tconst moveIn: Mark = {\n\t\t\ttype: \"MoveIn\",\n\t\t\tid: moveId,\n\t\t\tcount,\n\t\t\tcellId: { localId: attachCellId },\n\t\t};\n\t\treturn markAtIndex(destIndex, moveIn);\n\t},\n\n\treturn(\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestIndex: number,\n\t\tdetachCellId: CellId,\n\t\tattachCellId: CellId,\n\t): Changeset {\n\t\tconst moveOut: CellMark<MoveOut> = {\n\t\t\ttype: \"MoveOut\",\n\t\t\tid: attachCellId.localId,\n\t\t\tidOverride: detachCellId,\n\t\t\tcount,\n\t\t};\n\n\t\tconst returnTo: CellMark<MoveIn> = {\n\t\t\ttype: \"MoveIn\",\n\t\t\tid: attachCellId.localId,\n\t\t\tcount,\n\t\t\tcellId: attachCellId,\n\t\t};\n\n\t\treturn moveMarksToMarkList(sourceIndex, count, destIndex, moveOut, returnTo);\n\t},\n} satisfies SequenceFieldEditor;\n\nfunction moveMarksToMarkList(\n\tsourceIndex: number,\n\tcount: number,\n\tdestIndex: number,\n\tdetach: CellMark<MoveOut>,\n\tattach: CellMark<MoveIn>,\n): MarkList {\n\tif (count === 0) {\n\t\treturn [];\n\t}\n\tconst firstIndexBeyondMoveOut = sourceIndex + count;\n\tconst marks = new MarkListFactory();\n\tmarks.pushOffset(Math.min(sourceIndex, destIndex));\n\tif (destIndex <= sourceIndex) {\n\t\t// The destination is fully before the source\n\t\tmarks.pushContent(attach);\n\t\tmarks.pushOffset(sourceIndex - destIndex);\n\t\tmarks.pushContent(detach);\n\t} else if (firstIndexBeyondMoveOut <= destIndex) {\n\t\t// The destination is fully after the source\n\t\tmarks.pushContent(detach);\n\t\tmarks.pushOffset(destIndex - firstIndexBeyondMoveOut);\n\t\tmarks.pushContent(attach);\n\t} else {\n\t\tconst firstSectionLength = destIndex - sourceIndex;\n\t\t// The destination is in the middle of the source\n\t\tconst [detach1, detach2] = splitMark(detach, firstSectionLength);\n\t\tmarks.pushContent(detach1);\n\t\tmarks.pushContent(attach);\n\t\tmarks.pushContent(detach2);\n\t}\n\treturn marks.list;\n}\n\nfunction markAtIndex(index: number, mark: Mark): Changeset {\n\treturn index === 0 ? [mark] : [{ count: index }, mark];\n}\n"]}
1
+ {"version":3,"file":"sequenceFieldEditor.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldEditor.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAK7D,6DAAuD;AAWvD,yCAAuC;AAuD1B,QAAA,mBAAmB,GAAG;IAClC,gBAAgB,EAAE,CAAC,KAAa,EAAE,MAAc,EAAa,EAAE,CAC9D,WAAW,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,MAAM,EAAE,CACP,KAAa,EACb,KAAa,EACb,OAAe,EACf,QAAiC,EACrB,EAAE;QACd,MAAM,IAAI,GAAqB;YAC9B,IAAI,EAAE,QAAQ;YACd,EAAE,EAAE,OAAO,CAAC,OAAO;YACnB,KAAK;YACL,MAAM,EAAE,OAAO;YACf,QAAQ;SACR,CAAC;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AAC,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;IACnD,IAAI,SAAS,IAAI,WAAW,EAAE,CAAC;QAC9B,6CAA6C;QAC7C,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC1B,KAAK,CAAC,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;QAC1C,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;SAAM,IAAI,uBAAuB,IAAI,SAAS,EAAE,CAAC;QACjD,4CAA4C;QAC5C,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC1B,KAAK,CAAC,UAAU,CAAC,SAAS,GAAG,uBAAuB,CAAC,CAAC;QACtD,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;SAAM,CAAC;QACP,MAAM,kBAAkB,GAAG,SAAS,GAAG,WAAW,CAAC;QACnD,iDAAiD;QACjD,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,IAAA,oBAAS,EAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;QACjE,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC3B,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC1B,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC;AACnB,CAAC;AAED,SAAS,WAAW,CAAC,KAAa,EAAE,IAAU;IAC7C,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { ChangesetLocalId, RevisionTag } from \"../../core/index.js\";\nimport type { FieldEditor, NodeId } from \"../modular-schema/index.js\";\n\nimport { MarkListFactory } from \"./markListFactory.js\";\nimport type {\n\tCellId,\n\tCellMark,\n\tChangeset,\n\tInsert,\n\tMark,\n\tMarkList,\n\tMoveIn,\n\tMoveOut,\n} from \"./types.js\";\nimport { splitMark } from \"./utils.js\";\n\nexport interface SequenceFieldEditor extends FieldEditor<Changeset> {\n\tinsert(index: number, count: number, firstId: CellId, revision: RevisionTag): Changeset;\n\tremove(index: number, count: number, id: ChangesetLocalId, revision: RevisionTag): Changeset;\n\trevive(\n\t\tindex: number,\n\t\tcount: number,\n\t\tdetachEvent: CellId,\n\t\trevision: RevisionTag,\n\t\tisIntention?: true,\n\t): Changeset;\n\n\t/**\n\t *\n\t * @param sourceIndex - The index of the first node move\n\t * @param count - The number of nodes to move\n\t * @param destIndex - The index the nodes should be moved to, interpreted before detaching the moved nodes\n\t * @param detachCellId - The local ID to assign to the first cell being emptied by the move\n\t * @param attachCellId - The ID to assign to the first cell being filled by the move\n\t * @param revision - The revision to assign to the move marks\n\t */\n\tmove(\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestIndex: number,\n\t\tdetachCellId: ChangesetLocalId,\n\t\tattachCellId: CellId,\n\t\trevision: RevisionTag,\n\t): Changeset;\n\n\tmoveOut(\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tid: ChangesetLocalId,\n\t\trevision: RevisionTag,\n\t): Changeset;\n\tmoveIn(\n\t\tdestIndex: number,\n\t\tcount: number,\n\t\tmoveId: ChangesetLocalId,\n\t\tattachCellId: CellId,\n\t\trevision: RevisionTag,\n\t): Changeset;\n\n\treturn(\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestIndex: number,\n\t\tdetachCellId: CellId,\n\t\tattachCellId: CellId,\n\t\trevision: RevisionTag,\n\t): Changeset;\n}\n\nexport const sequenceFieldEditor = {\n\tbuildChildChange: (index: number, change: NodeId): Changeset =>\n\t\tmarkAtIndex(index, { count: 1, changes: change }),\n\tinsert: (\n\t\tindex: number,\n\t\tcount: number,\n\t\tfirstId: CellId,\n\t\trevision: RevisionTag | undefined,\n\t): Changeset => {\n\t\tconst mark: CellMark<Insert> = {\n\t\t\ttype: \"Insert\",\n\t\t\tid: firstId.localId,\n\t\t\tcount,\n\t\t\tcellId: firstId,\n\t\t\trevision,\n\t\t};\n\t\treturn markAtIndex(index, mark);\n\t},\n\tremove: (\n\t\tindex: number,\n\t\tcount: number,\n\t\tid: ChangesetLocalId,\n\t\trevision: RevisionTag | undefined,\n\t): Changeset =>\n\t\tcount === 0 ? [] : markAtIndex(index, { type: \"Remove\", count, id, revision }),\n\n\trevive: (\n\t\tindex: number,\n\t\tcount: number,\n\t\tdetachEvent: CellId,\n\t\trevision: RevisionTag | undefined,\n\t): Changeset => {\n\t\tassert(detachEvent.revision !== undefined, 0x724 /* Detach event must have a revision */);\n\t\tconst mark: CellMark<Insert> = {\n\t\t\ttype: \"Insert\",\n\t\t\tid: detachEvent.localId,\n\t\t\tcount,\n\t\t\tcellId: detachEvent,\n\t\t\trevision,\n\t\t};\n\t\treturn count === 0 ? [] : markAtIndex(index, mark);\n\t},\n\n\tmove(\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestIndex: number,\n\t\tdetachCellId: ChangesetLocalId,\n\t\tattachCellId: CellId,\n\t\trevision: RevisionTag | undefined,\n\t): Changeset {\n\t\tconst moveIn: Mark = {\n\t\t\ttype: \"MoveIn\",\n\t\t\tid: detachCellId,\n\t\t\tcount,\n\t\t\tcellId: attachCellId,\n\t\t\trevision,\n\t\t};\n\t\tconst moveOut: Mark = {\n\t\t\ttype: \"MoveOut\",\n\t\t\tid: detachCellId,\n\t\t\tcount,\n\t\t\trevision,\n\t\t};\n\t\treturn moveMarksToMarkList(sourceIndex, count, destIndex, moveOut, moveIn);\n\t},\n\n\tmoveOut(\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdetachCellId: ChangesetLocalId,\n\t\trevision: RevisionTag,\n\t): Changeset {\n\t\tconst moveOut: Mark = {\n\t\t\ttype: \"MoveOut\",\n\t\t\tid: detachCellId,\n\t\t\tcount,\n\t\t\trevision,\n\t\t};\n\t\treturn markAtIndex(sourceIndex, moveOut);\n\t},\n\n\tmoveIn(\n\t\tdestIndex: number,\n\t\tcount: number,\n\t\tmoveId: ChangesetLocalId,\n\t\tattachCellId: CellId,\n\t\trevision: RevisionTag,\n\t): Changeset {\n\t\tconst moveIn: Mark = {\n\t\t\ttype: \"MoveIn\",\n\t\t\tid: moveId,\n\t\t\tcount,\n\t\t\tcellId: attachCellId,\n\t\t\trevision,\n\t\t};\n\t\treturn markAtIndex(destIndex, moveIn);\n\t},\n\n\treturn(\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestIndex: number,\n\t\tdetachCellId: CellId,\n\t\tattachCellId: CellId,\n\t\trevision: RevisionTag | undefined,\n\t): Changeset {\n\t\tconst moveOut: CellMark<MoveOut> = {\n\t\t\ttype: \"MoveOut\",\n\t\t\tid: attachCellId.localId,\n\t\t\tidOverride: detachCellId,\n\t\t\tcount,\n\t\t\trevision,\n\t\t};\n\n\t\tconst returnTo: CellMark<MoveIn> = {\n\t\t\ttype: \"MoveIn\",\n\t\t\tid: attachCellId.localId,\n\t\t\tcount,\n\t\t\tcellId: attachCellId,\n\t\t\trevision,\n\t\t};\n\n\t\treturn moveMarksToMarkList(sourceIndex, count, destIndex, moveOut, returnTo);\n\t},\n} satisfies SequenceFieldEditor;\n\nfunction moveMarksToMarkList(\n\tsourceIndex: number,\n\tcount: number,\n\tdestIndex: number,\n\tdetach: CellMark<MoveOut>,\n\tattach: CellMark<MoveIn>,\n): MarkList {\n\tif (count === 0) {\n\t\treturn [];\n\t}\n\tconst firstIndexBeyondMoveOut = sourceIndex + count;\n\tconst marks = new MarkListFactory();\n\tmarks.pushOffset(Math.min(sourceIndex, destIndex));\n\tif (destIndex <= sourceIndex) {\n\t\t// The destination is fully before the source\n\t\tmarks.pushContent(attach);\n\t\tmarks.pushOffset(sourceIndex - destIndex);\n\t\tmarks.pushContent(detach);\n\t} else if (firstIndexBeyondMoveOut <= destIndex) {\n\t\t// The destination is fully after the source\n\t\tmarks.pushContent(detach);\n\t\tmarks.pushOffset(destIndex - firstIndexBeyondMoveOut);\n\t\tmarks.pushContent(attach);\n\t} else {\n\t\tconst firstSectionLength = destIndex - sourceIndex;\n\t\t// The destination is in the middle of the source\n\t\tconst [detach1, detach2] = splitMark(detach, firstSectionLength);\n\t\tmarks.pushContent(detach1);\n\t\tmarks.pushContent(attach);\n\t\tmarks.pushContent(detach2);\n\t}\n\treturn marks.list;\n}\n\nfunction markAtIndex(index: number, mark: Mark): Changeset {\n\treturn index === 0 ? [mark] : [{ count: index }, mark];\n}\n"]}
@@ -6,7 +6,7 @@
6
6
  * Selects which heuristics to use when encoding tree content.
7
7
  * All encoding options here are compatible with the same decoder:
8
8
  * the selection here does not impact compatibility.
9
- * @internal
9
+ * @alpha
10
10
  */
11
11
  export declare enum TreeCompressionStrategy {
12
12
  /**
@@ -9,7 +9,7 @@ exports.TreeCompressionStrategy = void 0;
9
9
  * Selects which heuristics to use when encoding tree content.
10
10
  * All encoding options here are compatible with the same decoder:
11
11
  * the selection here does not impact compatibility.
12
- * @internal
12
+ * @alpha
13
13
  */
14
14
  var TreeCompressionStrategy;
15
15
  (function (TreeCompressionStrategy) {
@@ -1 +1 @@
1
- {"version":3,"file":"treeCompressionUtils.js","sourceRoot":"","sources":["../../src/feature-libraries/treeCompressionUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;GAKG;AACH,IAAY,uBAWX;AAXD,WAAY,uBAAuB;IAClC;;;OAGG;IACH,iFAAc,CAAA;IACd;;;OAGG;IACH,qFAAgB,CAAA;AACjB,CAAC,EAXW,uBAAuB,uCAAvB,uBAAuB,QAWlC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Selects which heuristics to use when encoding tree content.\n * All encoding options here are compatible with the same decoder:\n * the selection here does not impact compatibility.\n * @internal\n */\nexport enum TreeCompressionStrategy {\n\t/**\n\t * Optimized for encoded size.\n\t * Use this in production to reduce bandwidth and storage use.\n\t */\n\tCompressed = 0,\n\t/**\n\t * Optimized for human readability.\n\t * Use this when debugging or testing and needing to inspect encoded tree content.\n\t */\n\tUncompressed = 1,\n}\n"]}
1
+ {"version":3,"file":"treeCompressionUtils.js","sourceRoot":"","sources":["../../src/feature-libraries/treeCompressionUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;GAKG;AACH,IAAY,uBAWX;AAXD,WAAY,uBAAuB;IAClC;;;OAGG;IACH,iFAAc,CAAA;IACd;;;OAGG;IACH,qFAAgB,CAAA;AACjB,CAAC,EAXW,uBAAuB,uCAAvB,uBAAuB,QAWlC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Selects which heuristics to use when encoding tree content.\n * All encoding options here are compatible with the same decoder:\n * the selection here does not impact compatibility.\n * @alpha\n */\nexport enum TreeCompressionStrategy {\n\t/**\n\t * Optimized for encoded size.\n\t * Use this in production to reduce bandwidth and storage use.\n\t */\n\tCompressed = 0,\n\t/**\n\t * Optimized for human readability.\n\t * Use this when debugging or testing and needing to inspect encoded tree content.\n\t */\n\tUncompressed = 1,\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -5,11 +5,11 @@
5
5
  export { EmptyKey, type FieldKey, type TreeValue, type FieldMapObject, type NodeData, type GenericTreeNode, type JsonableTree, type GenericFieldsNode, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type FieldKindIdentifier, type TreeTypeSet, type TreeStoredSchema, type Revertible, CommitKind, RevertibleStatus, type CommitMetadata, type StoredSchemaCollection, type ErasedTreeNodeSchemaDataFormat, ObjectNodeStoredSchema, MapNodeStoredSchema, LeafNodeStoredSchema, type RevertibleFactory, } from "./core/index.js";
6
6
  export { type Brand } from "./util/index.js";
7
7
  export { type Listeners, type IsListener, type Listenable, type Off, } from "./events/index.js";
8
- export { type LazyItem, TreeStatus, type Unenforced, TreeCompressionStrategy, } from "./feature-libraries/index.js";
9
- export { type ISharedTree, type SharedTreeOptions, ForestType, type SharedTreeContentSnapshot, type SharedTreeFormatOptions, SharedTreeFormatVersion, Tree, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransaction, rollback, getBranch, type TreeBranch, type TreeBranchFork, } from "./shared-tree/index.js";
10
- export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type InternalTreeNode, type WithType, type NodeChangedData, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type TreeObjectNodeUnsafe, type InsertableTreeNodeFromImplicitAllowedTypesUnsafe, type TreeArrayNodeUnsafe, type TreeMapNodeUnsafe, type InsertableObjectFromSchemaRecordUnsafe, type InsertableTreeFieldFromImplicitFieldUnsafe, type FieldSchemaUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, adaptEnum, enumFromStrings, singletonSchema, typedObjectValues, type EmptyObject, test_RecursiveObject, test_RecursiveObject_base, test_RecursiveObjectPojoMode, TreeBeta, type TreeChangeEventsBeta, type JsonTreeSchema, type JsonSchemaId, type JsonNodeSchema, type JsonNodeSchemaBase, type JsonLeafNodeSchema, type JsonMapNodeSchema, type JsonArrayNodeSchema, type JsonObjectNodeSchema, type JsonFieldSchema, type JsonSchemaRef, type JsonRefPath, type JsonSchemaType, type JsonLeafSchemaType, getJsonSchema, } from "./simple-tree/index.js";
11
- export { SharedTree, configuredSharedTree } from "./treeFactory.js";
12
- export type { ICodecOptions, JsonValidator, SchemaValidationFunction } from "./codec/index.js";
8
+ export { TreeStatus, TreeCompressionStrategy, } from "./feature-libraries/index.js";
9
+ export { type ISharedTree, type SharedTreeOptions, ForestType, type SharedTreeContentSnapshot, type SharedTreeFormatOptions, SharedTreeFormatVersion, Tree, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransaction, rollback, type ForestOptions, getBranch, type TreeBranch, type TreeBranchFork, } from "./shared-tree/index.js";
10
+ export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type InternalTreeNode, type WithType, type NodeChangedData, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type TreeObjectNodeUnsafe, type InsertableTreeNodeFromImplicitAllowedTypesUnsafe, type TreeArrayNodeUnsafe, type TreeMapNodeUnsafe, type InsertableObjectFromSchemaRecordUnsafe, type InsertableTreeFieldFromImplicitFieldUnsafe, type FieldSchemaUnsafe, type TreeNodeSchemaClassUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, adaptEnum, enumFromStrings, singletonSchema, typedObjectValues, type UnsafeUnknownSchema, type TreeViewAlpha, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, test_RecursiveObject, test_RecursiveObject_base, test_RecursiveObjectPojoMode, TreeBeta, type TreeChangeEventsBeta, extractPersistedSchema, comparePersistedSchema, type JsonTreeSchema, type JsonSchemaId, type JsonNodeSchema, type JsonNodeSchemaBase, type JsonLeafNodeSchema, type JsonMapNodeSchema, type JsonArrayNodeSchema, type JsonObjectNodeSchema, type JsonFieldSchema, type JsonSchemaRef, type JsonRefPath, type JsonSchemaType, type JsonLeafSchemaType, getJsonSchema, type LazyItem, type Unenforced, type ReadonlyArrayNode, } from "./simple-tree/index.js";
11
+ export { SharedTree, configuredSharedTree, } from "./treeFactory.js";
12
+ export type { ICodecOptions, JsonValidator, SchemaValidationFunction, } from "./codec/index.js";
13
13
  export { noopValidator } from "./codec/index.js";
14
14
  export { typeboxValidator } from "./external-utilities/index.js";
15
15
  export { type Covariant, BrandedType, type RestrictiveReadonlyRecord, type RestrictiveStringRecord, type MakeNominal, } from "./util/index.js";
@@ -21,4 +21,5 @@ export {
21
21
  */
22
22
  InternalTypes, };
23
23
  export type { MapNodeInsertableData } from "./simple-tree/index.js";
24
+ export type { JsonCompatible, JsonCompatibleObject } from "./util/index.js";
24
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,WAAW,EACX,oBAAoB,EACpB,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oB,EACzB,sBAAsB,EACtB,sBAAsB,EAEtB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,iBAAiB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,UAAU,EACV,oBAAoB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACX,aAAa,EACb,aAAa,EACb,wBAAwB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EACN,KAAK,SAAS,EACd,WAAW,EACX,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,WAAW,GAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO;AACN;;;GAGG;AACH,aAAa,GACb,CAAC;AAKF,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
27
27
  return result;
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.InternalTypes = exports.BrandedType = exports.typeboxValidator = exports.noopValidator = exports.configuredSharedTree = exports.SharedTree = exports.getJsonSchema = exports.TreeBeta = exports.test_RecursiveObjectPojoMode = exports.test_RecursiveObject_base = exports.test_RecursiveObject = exports.typedObjectValues = exports.singletonSchema = exports.enumFromStrings = exports.adaptEnum = exports.NodeKind = exports.FieldSchema = exports.FieldKind = exports.SchemaFactory = exports.TreeViewConfiguration = exports.IterableTreeArrayContent = exports.TreeArrayNode = exports.getBranch = exports.rollback = exports.Tree = exports.SharedTreeFormatVersion = exports.ForestType = exports.TreeCompressionStrategy = exports.TreeStatus = exports.LeafNodeStoredSchema = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.RevertibleStatus = exports.CommitKind = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.EmptyKey = void 0;
30
+ exports.InternalTypes = exports.BrandedType = exports.typeboxValidator = exports.noopValidator = exports.configuredSharedTree = exports.SharedTree = exports.getJsonSchema = exports.comparePersistedSchema = exports.extractPersistedSchema = exports.TreeBeta = exports.test_RecursiveObjectPojoMode = exports.test_RecursiveObject_base = exports.test_RecursiveObject = exports.typedObjectValues = exports.singletonSchema = exports.enumFromStrings = exports.adaptEnum = exports.NodeKind = exports.FieldSchema = exports.FieldKind = exports.SchemaFactory = exports.TreeViewConfiguration = exports.IterableTreeArrayContent = exports.TreeArrayNode = exports.getBranch = exports.rollback = exports.Tree = exports.SharedTreeFormatVersion = exports.ForestType = exports.TreeCompressionStrategy = exports.TreeStatus = exports.LeafNodeStoredSchema = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.RevertibleStatus = exports.CommitKind = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.EmptyKey = void 0;
31
31
  var index_js_1 = require("./core/index.js");
32
32
  Object.defineProperty(exports, "EmptyKey", { enumerable: true, get: function () { return index_js_1.EmptyKey; } });
33
33
  Object.defineProperty(exports, "ValueSchema", { enumerable: true, get: function () { return index_js_1.ValueSchema; } });
@@ -54,7 +54,7 @@ Object.defineProperty(exports, "SchemaFactory", { enumerable: true, get: functio
54
54
  Object.defineProperty(exports, "FieldKind", { enumerable: true, get: function () { return index_js_4.FieldKind; } });
55
55
  Object.defineProperty(exports, "FieldSchema", { enumerable: true, get: function () { return index_js_4.FieldSchema; } });
56
56
  Object.defineProperty(exports, "NodeKind", { enumerable: true, get: function () { return index_js_4.NodeKind; } });
57
- // experimental @internal APIs:
57
+ // experimental @alpha APIs:
58
58
  Object.defineProperty(exports, "adaptEnum", { enumerable: true, get: function () { return index_js_4.adaptEnum; } });
59
59
  Object.defineProperty(exports, "enumFromStrings", { enumerable: true, get: function () { return index_js_4.enumFromStrings; } });
60
60
  Object.defineProperty(exports, "singletonSchema", { enumerable: true, get: function () { return index_js_4.singletonSchema; } });
@@ -65,6 +65,8 @@ Object.defineProperty(exports, "test_RecursiveObject_base", { enumerable: true,
65
65
  Object.defineProperty(exports, "test_RecursiveObjectPojoMode", { enumerable: true, get: function () { return index_js_4.test_RecursiveObjectPojoMode; } });
66
66
  // Beta APIs
67
67
  Object.defineProperty(exports, "TreeBeta", { enumerable: true, get: function () { return index_js_4.TreeBeta; } });
68
+ Object.defineProperty(exports, "extractPersistedSchema", { enumerable: true, get: function () { return index_js_4.extractPersistedSchema; } });
69
+ Object.defineProperty(exports, "comparePersistedSchema", { enumerable: true, get: function () { return index_js_4.comparePersistedSchema; } });
68
70
  Object.defineProperty(exports, "getJsonSchema", { enumerable: true, get: function () { return index_js_4.getJsonSchema; } });
69
71
  var treeFactory_js_1 = require("./treeFactory.js");
70
72
  Object.defineProperty(exports, "SharedTree", { enumerable: true, get: function () { return treeFactory_js_1.SharedTree; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CA0ByB;AAzBxB,oGAAA,QAAQ,OAAA;AAUR,uGAAA,WAAW,OAAA;AACX,gHAAA,oBAAoB,OAAA;AAKpB,sGAAA,UAAU,OAAA;AACV,4GAAA,gBAAgB,OAAA;AAIhB,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AACnB,gHAAA,oBAAoB,OAAA;AAYrB,yDAKsC;AAHrC,sGAAA,UAAU,OAAA;AAEV,mHAAA,uBAAuB,OAAA;AAGxB,mDAegC;AAZ/B,sGAAA,UAAU,OAAA;AAGV,mHAAA,uBAAuB,OAAA;AACvB,gGAAA,IAAI,OAAA;AAIJ,oGAAA,QAAQ,OAAA;AACR,qGAAA,SAAS,OAAA;AAKV,mDAsFgC;AArF/B,yGAAA,aAAa,OAAA;AAEb,oHAAA,wBAAwB,OAAA;AAKxB,iHAAA,qBAAqB,OAAA;AAKrB,yGAAA,aAAa,OAAA;AAQb,qGAAA,SAAS,OAAA;AACT,uGAAA,WAAW,OAAA;AAKX,oGAAA,QAAQ,OAAA;AA+BR,+BAA+B;AAC/B,qGAAA,SAAS,OAAA;AACT,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,6GAAA,iBAAiB,OAAA;AAEjB,8EAA8E;AAC9E,gHAAA,oBAAoB,OAAA;AACpB,qHAAA,yBAAyB,OAAA;AACzB,wHAAA,4BAA4B,OAAA;AAC5B,YAAY;AACZ,oGAAA,QAAQ,OAAA;AAgBR,yGAAA,aAAa,OAAA;AAEd,mDAAoE;AAA3D,4GAAA,UAAU,OAAA;AAAE,sHAAA,oBAAoB,OAAA;AAGzC,6CAAiD;AAAxC,yGAAA,aAAa,OAAA;AACtB,0DAAiE;AAAxD,4GAAA,gBAAgB,OAAA;AAEzB,4CAMyB;AAJxB,uGAAA,WAAW,OAAA;AAMZ,kEAAoD;AAMnD,sCAAa","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype FieldKey,\n\ttype TreeValue,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\ttype GenericFieldsNode,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype StoredSchemaCollection,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tLeafNodeStoredSchema,\n\ttype RevertibleFactory,\n} from \"./core/index.js\";\nexport { type Brand } from \"./util/index.js\";\n\nexport {\n\ttype Listeners,\n\ttype IsListener,\n\ttype Listenable,\n\ttype Off,\n} from \"./events/index.js\";\n\nexport {\n\ttype LazyItem,\n\tTreeStatus,\n\ttype Unenforced,\n\tTreeCompressionStrategy,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ISharedTree,\n\ttype SharedTreeOptions,\n\tForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tTree,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransaction,\n\trollback,\n\tgetBranch,\n\ttype TreeBranch,\n\ttype TreeBranchFork,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ViewableTree,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeChangeEvents,\n\ttype NodeFromSchema,\n\ttype TreeMapNode,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype NodeChangedData,\n\t// Types not really intended for public use, but used in links.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package \"@fluidframework/tree\" does not have an export \"TreeNodeApi\"\n\ttype TreeNodeApi,\n\ttype TreeNodeSchemaCore,\n\t// Types not really intended for public use, but used in inferred types exposed in the public API.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// error TS2742: The inferred type of 'Inventory' cannot be named without a reference to '../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\n\ttype AllowedTypes,\n\ttype TreeObjectNodeUnsafe,\n\ttype InsertableTreeNodeFromImplicitAllowedTypesUnsafe,\n\ttype TreeArrayNodeUnsafe,\n\ttype TreeMapNodeUnsafe,\n\ttype InsertableObjectFromSchemaRecordUnsafe,\n\ttype InsertableTreeFieldFromImplicitFieldUnsafe,\n\ttype FieldSchemaUnsafe,\n\t// System types (not in Internal types for various reasons, like doc links or cannot be named errors).\n\ttype typeSchemaSymbol,\n\ttype TreeNodeSchemaNonClass,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\t// experimental @internal APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttypedObjectValues,\n\ttype EmptyObject,\n\t// test recursive schema for checking that d.ts files handles schema correctly\n\ttest_RecursiveObject,\n\ttest_RecursiveObject_base,\n\ttest_RecursiveObjectPojoMode,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\t// Back to normal types\n\ttype JsonTreeSchema,\n\ttype JsonSchemaId,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonLeafNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonObjectNodeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonSchemaType,\n\ttype JsonLeafSchemaType,\n\tgetJsonSchema,\n} from \"./simple-tree/index.js\";\nexport { SharedTree, configuredSharedTree } from \"./treeFactory.js\";\n\nexport type { ICodecOptions, JsonValidator, SchemaValidationFunction } from \"./codec/index.js\";\nexport { noopValidator } from \"./codec/index.js\";\nexport { typeboxValidator } from \"./external-utilities/index.js\";\n\nexport {\n\ttype Covariant,\n\tBrandedType,\n\ttype RestrictiveReadonlyRecord,\n\ttype RestrictiveStringRecord,\n\ttype MakeNominal,\n} from \"./util/index.js\";\n\nimport * as InternalTypes from \"./internalTypes.js\";\nexport {\n\t/**\n\t * Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.\n\t * They are used internally to implement API aspects, but are not intended for use by external consumers.\n\t */\n\tInternalTypes,\n};\n\n// Internal/System types:\n// These would be put in `internalTypes` except doing so tents to cause errors like:\n// The inferred type of 'NodeMap' cannot be named without a reference to '../../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\nexport type { MapNodeInsertableData } from \"./simple-tree/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CA0ByB;AAzBxB,oGAAA,QAAQ,OAAA;AAUR,uGAAA,WAAW,OAAA;AACX,gHAAA,oBAAoB,OAAA;AAKpB,sGAAA,UAAU,OAAA;AACV,4GAAA,gBAAgB,OAAA;AAIhB,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AACnB,gHAAA,oBAAoB,OAAA;AAYrB,yDAGsC;AAFrC,sGAAA,UAAU,OAAA;AACV,mHAAA,uBAAuB,OAAA;AAGxB,mDAgBgC;AAb/B,sGAAA,UAAU,OAAA;AAGV,mHAAA,uBAAuB,OAAA;AACvB,gGAAA,IAAI,OAAA;AAIJ,oGAAA,QAAQ,OAAA;AAER,qGAAA,SAAS,OAAA;AAKV,mDAkGgC;AAjG/B,yGAAA,aAAa,OAAA;AAEb,oHAAA,wBAAwB,OAAA;AAKxB,iHAAA,qBAAqB,OAAA;AAKrB,yGAAA,aAAa,OAAA;AAQb,qGAAA,SAAS,OAAA;AACT,uGAAA,WAAW,OAAA;AAKX,oGAAA,QAAQ,OAAA;AAgCR,4BAA4B;AAC5B,qGAAA,SAAS,OAAA;AACT,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,6GAAA,iBAAiB,OAAA;AAQjB,8EAA8E;AAC9E,gHAAA,oBAAoB,OAAA;AACpB,qHAAA,yBAAyB,OAAA;AACzB,wHAAA,4BAA4B,OAAA;AAC5B,YAAY;AACZ,oGAAA,QAAQ,OAAA;AAER,kHAAA,sBAAsB,OAAA;AACtB,kHAAA,sBAAsB,OAAA;AAetB,yGAAA,aAAa,OAAA;AAKd,mDAG0B;AAFzB,4GAAA,UAAU,OAAA;AACV,sHAAA,oBAAoB,OAAA;AAQrB,6CAAiD;AAAxC,yGAAA,aAAa,OAAA;AACtB,0DAAiE;AAAxD,4GAAA,gBAAgB,OAAA;AAEzB,4CAMyB;AAJxB,uGAAA,WAAW,OAAA;AAMZ,kEAAoD;AAMnD,sCAAa","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype FieldKey,\n\ttype TreeValue,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\ttype GenericFieldsNode,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype StoredSchemaCollection,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tLeafNodeStoredSchema,\n\ttype RevertibleFactory,\n} from \"./core/index.js\";\nexport { type Brand } from \"./util/index.js\";\n\nexport {\n\ttype Listeners,\n\ttype IsListener,\n\ttype Listenable,\n\ttype Off,\n} from \"./events/index.js\";\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ISharedTree,\n\ttype SharedTreeOptions,\n\tForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tTree,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransaction,\n\trollback,\n\ttype ForestOptions,\n\tgetBranch,\n\ttype TreeBranch,\n\ttype TreeBranchFork,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ViewableTree,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeChangeEvents,\n\ttype NodeFromSchema,\n\ttype TreeMapNode,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype NodeChangedData,\n\t// Types not really intended for public use, but used in links.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package \"@fluidframework/tree\" does not have an export \"TreeNodeApi\"\n\ttype TreeNodeApi,\n\ttype TreeNodeSchemaCore,\n\t// Types not really intended for public use, but used in inferred types exposed in the public API.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// error TS2742: The inferred type of 'Inventory' cannot be named without a reference to '../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\n\ttype AllowedTypes,\n\ttype TreeObjectNodeUnsafe,\n\ttype InsertableTreeNodeFromImplicitAllowedTypesUnsafe,\n\ttype TreeArrayNodeUnsafe,\n\ttype TreeMapNodeUnsafe,\n\ttype InsertableObjectFromSchemaRecordUnsafe,\n\ttype InsertableTreeFieldFromImplicitFieldUnsafe,\n\ttype FieldSchemaUnsafe,\n\ttype TreeNodeSchemaClassUnsafe,\n\t// System types (not in Internal types for various reasons, like doc links or cannot be named errors).\n\ttype typeSchemaSymbol,\n\ttype TreeNodeSchemaNonClass,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttypedObjectValues,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\t// test recursive schema for checking that d.ts files handles schema correctly\n\ttest_RecursiveObject,\n\ttest_RecursiveObject_base,\n\ttest_RecursiveObjectPojoMode,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\t// Back to normal types\n\ttype JsonTreeSchema,\n\ttype JsonSchemaId,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonLeafNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonObjectNodeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonSchemaType,\n\ttype JsonLeafSchemaType,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype ReadonlyArrayNode,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tconfiguredSharedTree,\n} from \"./treeFactory.js\";\n\nexport type {\n\tICodecOptions,\n\tJsonValidator,\n\tSchemaValidationFunction,\n} from \"./codec/index.js\";\nexport { noopValidator } from \"./codec/index.js\";\nexport { typeboxValidator } from \"./external-utilities/index.js\";\n\nexport {\n\ttype Covariant,\n\tBrandedType,\n\ttype RestrictiveReadonlyRecord,\n\ttype RestrictiveStringRecord,\n\ttype MakeNominal,\n} from \"./util/index.js\";\n\nimport * as InternalTypes from \"./internalTypes.js\";\nexport {\n\t/**\n\t * Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.\n\t * They are used internally to implement API aspects, but are not intended for use by external consumers.\n\t */\n\tInternalTypes,\n};\n\n// Internal/System types:\n// These would be put in `internalTypes` except doing so tents to cause errors like:\n// The inferred type of 'NodeMap' cannot be named without a reference to '../../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\nexport type { MapNodeInsertableData } from \"./simple-tree/index.js\";\n\nexport type { JsonCompatible, JsonCompatibleObject } from \"./util/index.js\";\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export type { _InlineTrick, FlattenKeys } from "./util/index.js";
6
- export type { ApplyKind, NodeBuilderData, FieldHasDefault, TreeArrayNodeBase, ScopedSchemaName, DefaultProvider, typeNameSymbol, InsertableObjectFromSchemaRecord, ObjectFromSchemaRecord, FieldHasDefaultUnsafe, ObjectFromSchemaRecordUnsafe, TreeObjectNodeUnsafe, TreeFieldFromImplicitFieldUnsafe, TreeNodeFromImplicitAllowedTypesUnsafe, InsertableTreeNodeFromImplicitAllowedTypesUnsafe, TreeArrayNodeUnsafe, TreeMapNodeUnsafe, InsertableObjectFromSchemaRecordUnsafe, InsertableTreeFieldFromImplicitFieldUnsafe, InsertableTypedNodeUnsafe, NodeBuilderDataUnsafe, NodeFromSchemaUnsafe, ReadonlyMapInlined, } from "./simple-tree/index.js";
7
- export type { FlexList, FlexListToUnion, ExtractItemType } from "./feature-libraries/index.js";
6
+ export type { ApplyKind, NodeBuilderData, FieldHasDefault, TreeArrayNodeBase, ScopedSchemaName, DefaultProvider, typeNameSymbol, InsertableObjectFromSchemaRecord, ObjectFromSchemaRecord, FieldHasDefaultUnsafe, ObjectFromSchemaRecordUnsafe, TreeObjectNodeUnsafe, TreeFieldFromImplicitFieldUnsafe, TreeNodeFromImplicitAllowedTypesUnsafe, InsertableTreeNodeFromImplicitAllowedTypesUnsafe, TreeArrayNodeUnsafe, TreeMapNodeUnsafe, InsertableObjectFromSchemaRecordUnsafe, InsertableTreeFieldFromImplicitFieldUnsafe, InsertableTypedNodeUnsafe, NodeBuilderDataUnsafe, NodeFromSchemaUnsafe, ReadonlyMapInlined, TreeNodeSchemaUnsafe, AllowedTypesUnsafe, TreeNodeSchemaNonClassUnsafe, } from "./simple-tree/index.js";
7
+ export type { FlexList, FlexListToUnion, ExtractItemType } from "./simple-tree/index.js";
8
8
  export type { TreeApi } from "./shared-tree/index.js";
9
9
  //# sourceMappingURL=internalTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internalTypes.d.ts","sourceRoot":"","sources":["../src/internalTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACjE,YAAY,EACX,SAAS,EACT,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,gCAAgC,EAChC,sBAAsB,EAEtB,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,EACpB,gCAAgC,EAChC,sCAAsC,EACtC,gDAAgD,EAChD,mBAAmB,EACnB,iBAAiB,EACjB,sCAAsC,EACtC,0CAA0C,EAC1C,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GAClB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/F,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"internalTypes.d.ts","sourceRoot":"","sources":["../src/internalTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACjE,YAAY,EACX,SAAS,EACT,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,gCAAgC,EAChC,sBAAsB,EAEtB,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,EACpB,gCAAgC,EAChC,sCAAsC,EACtC,gDAAgD,EAChD,mBAAmB,EACnB,iBAAiB,EACjB,sCAAsC,EACtC,0CAA0C,EAC1C,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,4BAA4B,GAC5B,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzF,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"internalTypes.js","sourceRoot":"","sources":["../src/internalTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Used by public types, but not part of the desired API surface.\n// Since these are used in the public API, changing them can still be a breaking change, but renaming or inlining them should not be.\n// Note that this should only contain types which are `@public` since this is reexported as a namespace and our rollup generator does not filter that.\n\nexport type { _InlineTrick, FlattenKeys } from \"./util/index.js\";\nexport type {\n\tApplyKind,\n\tNodeBuilderData,\n\tFieldHasDefault,\n\tTreeArrayNodeBase,\n\tScopedSchemaName,\n\tDefaultProvider,\n\ttypeNameSymbol,\n\tInsertableObjectFromSchemaRecord,\n\tObjectFromSchemaRecord,\n\t// Recursive Schema APIs\n\tFieldHasDefaultUnsafe,\n\tObjectFromSchemaRecordUnsafe,\n\tTreeObjectNodeUnsafe,\n\tTreeFieldFromImplicitFieldUnsafe,\n\tTreeNodeFromImplicitAllowedTypesUnsafe,\n\tInsertableTreeNodeFromImplicitAllowedTypesUnsafe,\n\tTreeArrayNodeUnsafe,\n\tTreeMapNodeUnsafe,\n\tInsertableObjectFromSchemaRecordUnsafe,\n\tInsertableTreeFieldFromImplicitFieldUnsafe,\n\tInsertableTypedNodeUnsafe,\n\tNodeBuilderDataUnsafe,\n\tNodeFromSchemaUnsafe,\n\tReadonlyMapInlined,\n} from \"./simple-tree/index.js\";\nexport type { FlexList, FlexListToUnion, ExtractItemType } from \"./feature-libraries/index.js\";\n\nexport type { TreeApi } from \"./shared-tree/index.js\";\n"]}
1
+ {"version":3,"file":"internalTypes.js","sourceRoot":"","sources":["../src/internalTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Used by public types, but not part of the desired API surface.\n// Since these are used in the public API, changing them can still be a breaking change, but renaming or inlining them should not be.\n// Note that this should only contain types which are `@public` since this is reexported as a namespace and our rollup generator does not filter that.\n\nexport type { _InlineTrick, FlattenKeys } from \"./util/index.js\";\nexport type {\n\tApplyKind,\n\tNodeBuilderData,\n\tFieldHasDefault,\n\tTreeArrayNodeBase,\n\tScopedSchemaName,\n\tDefaultProvider,\n\ttypeNameSymbol,\n\tInsertableObjectFromSchemaRecord,\n\tObjectFromSchemaRecord,\n\t// Recursive Schema APIs\n\tFieldHasDefaultUnsafe,\n\tObjectFromSchemaRecordUnsafe,\n\tTreeObjectNodeUnsafe,\n\tTreeFieldFromImplicitFieldUnsafe,\n\tTreeNodeFromImplicitAllowedTypesUnsafe,\n\tInsertableTreeNodeFromImplicitAllowedTypesUnsafe,\n\tTreeArrayNodeUnsafe,\n\tTreeMapNodeUnsafe,\n\tInsertableObjectFromSchemaRecordUnsafe,\n\tInsertableTreeFieldFromImplicitFieldUnsafe,\n\tInsertableTypedNodeUnsafe,\n\tNodeBuilderDataUnsafe,\n\tNodeFromSchemaUnsafe,\n\tReadonlyMapInlined,\n\tTreeNodeSchemaUnsafe,\n\tAllowedTypesUnsafe,\n\tTreeNodeSchemaNonClassUnsafe,\n} from \"./simple-tree/index.js\";\nexport type { FlexList, FlexListToUnion, ExtractItemType } from \"./simple-tree/index.js\";\n\nexport type { TreeApi } from \"./shared-tree/index.js\";\n"]}
package/dist/legacy.d.ts CHANGED
@@ -44,6 +44,7 @@ export {
44
44
  NodeInDocumentConstraint,
45
45
  NodeKind,
46
46
  Off,
47
+ ReadonlyArrayNode,
47
48
  RestrictiveReadonlyRecord,
48
49
  RestrictiveStringRecord,
49
50
  Revertible,
@@ -66,6 +67,7 @@ export {
66
67
  TreeNodeFromImplicitAllowedTypes,
67
68
  TreeNodeSchema,
68
69
  TreeNodeSchemaClass,
70
+ TreeNodeSchemaClassUnsafe,
69
71
  TreeNodeSchemaCore,
70
72
  TreeNodeSchemaNonClass,
71
73
  TreeObjectNode,
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/tree";
8
- export declare const pkgVersion = "2.4.0-297027";
8
+ export declare const pkgVersion = "2.4.0-299374";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/tree";
11
- exports.pkgVersion = "2.4.0-297027";
11
+ exports.pkgVersion = "2.4.0-299374";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sBAAsB,CAAC;AACjC,QAAA,UAAU,GAAG,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tree\";\nexport const pkgVersion = \"2.4.0-297027\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sBAAsB,CAAC;AACjC,QAAA,UAAU,GAAG,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tree\";\nexport const pkgVersion = \"2.4.0-299374\";\n"]}
package/dist/public.d.ts CHANGED
@@ -44,6 +44,7 @@ export {
44
44
  NodeInDocumentConstraint,
45
45
  NodeKind,
46
46
  Off,
47
+ ReadonlyArrayNode,
47
48
  RestrictiveReadonlyRecord,
48
49
  RestrictiveStringRecord,
49
50
  Revertible,
@@ -66,6 +67,7 @@ export {
66
67
  TreeNodeFromImplicitAllowedTypes,
67
68
  TreeNodeSchema,
68
69
  TreeNodeSchemaClass,
70
+ TreeNodeSchemaClassUnsafe,
69
71
  TreeNodeSchemaCore,
70
72
  TreeNodeSchemaNonClass,
71
73
  TreeObjectNode,
@@ -2,9 +2,10 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { type ISharedTree, SharedTreeFactory, type SharedTreeOptions, SharedTree, getBranch, ForestType, type SharedTreeContentSnapshot, type SharedTreeFormatOptions, SharedTreeFormatVersion, } from "./sharedTree.js";
5
+ export { type ISharedTree, SharedTreeFactory, type SharedTreeOptions, SharedTree, getBranch, ForestType, type SharedTreeContentSnapshot, type SharedTreeFormatOptions, SharedTreeFormatVersion, buildConfiguredForest, defaultSharedTreeOptions, type ForestOptions, } from "./sharedTree.js";
6
6
  export { createTreeCheckout, TreeCheckout, type ITreeCheckout, runSynchronous, type CheckoutEvents, type ITransaction, type ITreeCheckoutFork, type TreeBranch, type TreeBranchFork, } from "./treeCheckout.js";
7
7
  export { type TreeStoredContent } from "./schematizeTree.js";
8
+ export { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
8
9
  export { CheckoutFlexTreeView } from "./checkoutFlexTreeView.js";
9
10
  export type { ISharedTreeEditor, ISchemaEditor } from "./sharedTreeEditBuilder.js";
10
11
  export { treeApi as Tree, type TreeApi, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransaction, rollback, } from "./treeApi.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,UAAU,EACV,SAAS,EACT,UAAU,EACV,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,uB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,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,EACN,OAAO,IAAI,IAAI,EACf,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,QAAQ,GACR,MAAM,cAAc,CAAC"}
@@ -4,17 +4,21 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.rollback = exports.Tree = exports.CheckoutFlexTreeView = exports.runSynchronous = exports.TreeCheckout = exports.createTreeCheckout = exports.SharedTreeFormatVersion = exports.ForestType = exports.getBranch = exports.SharedTree = exports.SharedTreeFactory = void 0;
7
+ exports.rollback = exports.Tree = exports.CheckoutFlexTreeView = exports.SchematizingSimpleTreeView = exports.runSynchronous = exports.TreeCheckout = exports.createTreeCheckout = exports.defaultSharedTreeOptions = exports.buildConfiguredForest = exports.SharedTreeFormatVersion = exports.ForestType = exports.getBranch = exports.SharedTree = exports.SharedTreeFactory = void 0;
8
8
  var sharedTree_js_1 = require("./sharedTree.js");
9
9
  Object.defineProperty(exports, "SharedTreeFactory", { enumerable: true, get: function () { return sharedTree_js_1.SharedTreeFactory; } });
10
10
  Object.defineProperty(exports, "SharedTree", { enumerable: true, get: function () { return sharedTree_js_1.SharedTree; } });
11
11
  Object.defineProperty(exports, "getBranch", { enumerable: true, get: function () { return sharedTree_js_1.getBranch; } });
12
12
  Object.defineProperty(exports, "ForestType", { enumerable: true, get: function () { return sharedTree_js_1.ForestType; } });
13
13
  Object.defineProperty(exports, "SharedTreeFormatVersion", { enumerable: true, get: function () { return sharedTree_js_1.SharedTreeFormatVersion; } });
14
+ Object.defineProperty(exports, "buildConfiguredForest", { enumerable: true, get: function () { return sharedTree_js_1.buildConfiguredForest; } });
15
+ Object.defineProperty(exports, "defaultSharedTreeOptions", { enumerable: true, get: function () { return sharedTree_js_1.defaultSharedTreeOptions; } });
14
16
  var treeCheckout_js_1 = require("./treeCheckout.js");
15
17
  Object.defineProperty(exports, "createTreeCheckout", { enumerable: true, get: function () { return treeCheckout_js_1.createTreeCheckout; } });
16
18
  Object.defineProperty(exports, "TreeCheckout", { enumerable: true, get: function () { return treeCheckout_js_1.TreeCheckout; } });
17
19
  Object.defineProperty(exports, "runSynchronous", { enumerable: true, get: function () { return treeCheckout_js_1.runSynchronous; } });
20
+ var schematizingTreeView_js_1 = require("./schematizingTreeView.js");
21
+ Object.defineProperty(exports, "SchematizingSimpleTreeView", { enumerable: true, get: function () { return schematizingTreeView_js_1.SchematizingSimpleTreeView; } });
18
22
  var checkoutFlexTreeView_js_1 = require("./checkoutFlexTreeView.js");
19
23
  Object.defineProperty(exports, "CheckoutFlexTreeView", { enumerable: true, get: function () { return checkoutFlexTreeView_js_1.CheckoutFlexTreeView; } });
20
24
  var treeApi_js_1 = require("./treeApi.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAUyB;AARxB,kHAAA,iBAAiB,OAAA;AAEjB,2GAAA,UAAU,OAAA;AACV,0GAAA,SAAS,OAAA;AACT,2GAAA,UAAU,OAAA;AAGV,wHAAA,uBAAuB,OAAA;AAGxB,qDAU2B;AAT1B,qHAAA,kBAAkB,OAAA;AAClB,+GAAA,YAAY,OAAA;AAEZ,iHAAA,cAAc,OAAA;AAUf,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAI7B,2CAOsB;AANrB,kGAAA,OAAO,OAAQ;AAKf,sGAAA,QAAQ,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype ISharedTree,\n\tSharedTreeFactory,\n\ttype SharedTreeOptions,\n\tSharedTree,\n\tgetBranch,\n\tForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n} from \"./sharedTree.js\";\n\nexport {\n\tcreateTreeCheckout,\n\tTreeCheckout,\n\ttype ITreeCheckout,\n\trunSynchronous,\n\ttype CheckoutEvents,\n\ttype ITransaction,\n\ttype ITreeCheckoutFork,\n\ttype TreeBranch,\n\ttype TreeBranchFork,\n} from \"./treeCheckout.js\";\n\nexport { type TreeStoredContent } from \"./schematizeTree.js\";\n\nexport { CheckoutFlexTreeView } from \"./checkoutFlexTreeView.js\";\n\nexport type { ISharedTreeEditor, ISchemaEditor } from \"./sharedTreeEditBuilder.js\";\n\nexport {\n\ttreeApi as Tree,\n\ttype TreeApi,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransaction,\n\trollback,\n} from \"./treeApi.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAayB;AAXxB,kHAAA,iBAAiB,OAAA;AAEjB,2GAAA,UAAU,OAAA;AACV,0GAAA,SAAS,OAAA;AACT,2GAAA,UAAU,OAAA;AAGV,wHAAA,uBAAuB,OAAA;AACvB,sHAAA,qBAAqB,OAAA;AACrB,yHAAA,wBAAwB,OAAA;AAIzB,qDAU2B;AAT1B,qHAAA,kBAAkB,OAAA;AAClB,+GAAA,YAAY,OAAA;AAEZ,iHAAA,cAAc,OAAA;AAUf,qEAAuE;AAA9D,qIAAA,0BAA0B,OAAA;AAEnC,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAI7B,2CAOsB;AANrB,kGAAA,OAAO,OAAQ;AAKf,sGAAA,QAAQ,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype ISharedTree,\n\tSharedTreeFactory,\n\ttype SharedTreeOptions,\n\tSharedTree,\n\tgetBranch,\n\tForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tbuildConfiguredForest,\n\tdefaultSharedTreeOptions,\n\ttype ForestOptions,\n} from \"./sharedTree.js\";\n\nexport {\n\tcreateTreeCheckout,\n\tTreeCheckout,\n\ttype ITreeCheckout,\n\trunSynchronous,\n\ttype CheckoutEvents,\n\ttype ITransaction,\n\ttype ITreeCheckoutFork,\n\ttype TreeBranch,\n\ttype TreeBranchFork,\n} from \"./treeCheckout.js\";\n\nexport { type TreeStoredContent } from \"./schematizeTree.js\";\n\nexport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\n\nexport { CheckoutFlexTreeView } from \"./checkoutFlexTreeView.js\";\n\nexport type { ISharedTreeEditor, ISchemaEditor } from \"./sharedTreeEditBuilder.js\";\n\nexport {\n\ttreeApi as Tree,\n\ttype TreeApi,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransaction,\n\trollback,\n} from \"./treeApi.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"schematizingTreeView.d.ts","sourceRoot":"","sources":["../../src/shared-tree/schematizingTreeView.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,UAAU,EAEf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,KAAK,cAAc,EAInB,KAAK,gBAAgB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEN,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,0BAA0B,EAC/B,KAAK,QAAQ,EACb,KAAK,cAAc,EAInB,UAAU,EAEV,KAAK,qBAAqB,EAI1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAgC,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAG/F,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MA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B,CAKpD;IAEM,OAAO,IAAI,IAAI;IAQtB,IAAW,IAAI,IAAI,0BAA0B,CAAC,WAAW,CAAC,CASzD;IAED,IAAW,IAAI,CAAC,OAAO,EAAE,oCAAoC,CAAC,WAAW,CAAC,EASzE;CACD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC5B,QAAQ,EAAE,aAAa,EACvB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,IAAI,EACrB,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,gBAAgB,GAC5B,oBAAoB,CAiBtB"}
@@ -175,20 +175,7 @@ let SchematizingSimpleTreeView = (() => {
175
175
  */
176
176
  update() {
177
177
  this.disposeView();
178
- const result = this.viewSchema.checkCompatibility(this.checkout.storedSchema);
179
- // TODO: AB#8121: Weaken this check to support viewing under additional circumstances.
180
- // In the near term, this should support viewing documents with additional optional fields in their schema on object types.
181
- // Longer-term (as demand arises), we could also add APIs to constructing view schema to allow for more flexibility
182
- // (e.g. out-of-schema content handlers could allow support for viewing docs which have extra allowed types in a particular field)
183
- const canView = result.write === index_js_1.Compatibility.Compatible && result.read === index_js_1.Compatibility.Compatible;
184
- const canUpgrade = result.read === index_js_1.Compatibility.Compatible;
185
- const isEquivalent = canView && canUpgrade;
186
- const compatibility = {
187
- canView,
188
- canUpgrade,
189
- isEquivalent,
190
- canInitialize: (0, schematizeTree_js_1.canInitialize)(this.checkout),
191
- };
178
+ const compatibility = (0, index_js_4.comparePersistedSchemaInternal)(this.checkout.storedSchema, this.viewSchema, (0, schematizeTree_js_1.canInitialize)(this.checkout));
192
179
  let lastRoot = this.compatibility.canView && this.view !== undefined ? this.root : undefined;
193
180
  this.currentCompatibility = compatibility;
194
181
  if (compatibility.canView) {
@@ -1 +1 @@
1
- {"version":3,"file":"schematizingTreeView.js","sourceRoot":"","sources":["../../src/shared-tree/schematizingTreeView.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;gBACjC,MAAM,IAAI,qBAAU,CACnB,yFAAyF,CACzF,CAAC;YACH,CAAC;YACD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YAC5B,IAAA,mBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,OAA4B,CAAC,CAAC;QACjF,CAAC;;;;;QAtTF,6KAuTC;;;QAvTY,uDAA0B;;;;AAA1B,gEAA0B;AAyTvC;;;GAGG;AACH,SAAgB,aAAa,CAC5B,QAAuB,EACvB,UAAsB,EACtB,SAAqB,EACrB,cAA8B,EAC9B,YAA8B;IAE9B,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5C,IAAA,iBAAM,EAAC,CAAC,KAAK,CAAC,GAAG,CAAC,sBAAW,CAAC,EAAE,KAAK,CAAC,6CAA6C,CAAC,CAAC;IAErF,CAAC;QACA,MAAM,aAAa,GAAG,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAC3E,IAAA,iBAAM,EACL,aAAa,CAAC,KAAK,KAAK,wBAAa,CAAC,UAAU;YAC/C,aAAa,CAAC,IAAI,KAAK,wBAAa,CAAC,UAAU,EAChD,KAAK,CAAC,oDAAoD,CAC1D,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,8CAAoB,CAAC,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IACzF,IAAA,iBAAM,EAAC,KAAK,CAAC,GAAG,CAAC,sBAAW,CAAC,EAAE,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAE9E,OAAO,IAAI,CAAC;AACb,CAAC;AAvBD,sCAuBC","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 { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\tAllowedUpdateType,\n\tanchorSlot,\n\tCompatibility,\n\ttype SchemaPolicy,\n} from \"../core/index.js\";\nimport {\n\ttype HasListeners,\n\ttype IEmitter,\n\ttype Listenable,\n\tcreateEmitter,\n} from \"../events/index.js\";\nimport {\n\ttype NodeKeyManager,\n\tdefaultSchemaPolicy,\n\tContextSlot,\n\tcursorForMapTreeNode,\n\ttype FullSchemaPolicy,\n} from \"../feature-libraries/index.js\";\nimport {\n\ttype FieldSchema,\n\ttype ImplicitFieldSchema,\n\ttype SchemaCompatibilityStatus,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tgetTreeNodeForField,\n\tsetField,\n\tnormalizeFieldSchema,\n\tViewSchema,\n\ttype InsertableContent,\n\ttype TreeViewConfiguration,\n\tmapTreeFromNodeData,\n\tprepareContentForHydration,\n\ttoStoredSchema,\n} from \"../simple-tree/index.js\";\nimport { Breakable, breakingClass, disposeSymbol, type WithBreakable } from \"../util/index.js\";\n\nimport { canInitialize, ensureSchema, initialize } from \"./schematizeTree.js\";\nimport type { ITreeCheckout, TreeCheckout } from \"./treeCheckout.js\";\nimport { CheckoutFlexTreeView } from \"./checkoutFlexTreeView.js\";\nimport { HydratedContext, SimpleContextSlot } from \"../simple-tree/index.js\";\n/**\n * Creating multiple tree views from the same checkout is not supported. This slot is used to detect if one already\n * exists and error if creating a second.\n */\nexport const ViewSlot = anchorSlot<TreeView<ImplicitFieldSchema>>();\n\n/**\n * Implementation of TreeView wrapping a FlexTreeView.\n */\n@breakingClass\nexport class SchematizingSimpleTreeView<in out TRootSchema extends ImplicitFieldSchema>\n\timplements TreeView<TRootSchema>, WithBreakable\n{\n\t/**\n\t * The view is set to undefined when this object is disposed or the view schema does not support viewing the document's stored schema.\n\t *\n\t * The view schema may be incompatible with the stored schema. Use `compatibility` to check.\n\t */\n\tprivate view: CheckoutFlexTreeView | undefined;\n\n\t/**\n\t * Undefined iff uninitialized or disposed.\n\t */\n\tprivate currentCompatibility: SchemaCompatibilityStatus | undefined;\n\tprivate readonly schemaPolicy: SchemaPolicy;\n\tpublic readonly events: Listenable<TreeViewEvents> &\n\t\tIEmitter<TreeViewEvents> &\n\t\tHasListeners<TreeViewEvents> = createEmitter();\n\n\tprivate readonly viewSchema: ViewSchema;\n\n\tprivate readonly unregisterCallbacks = new Set<() => void>();\n\n\tpublic disposed = false;\n\t/**\n\t * This is set to true while an edit impacting the document schema is in progress.\n\t * This allows suppressing extra rootChanged / schemaChanged events until the edit concludes.\n\t * This is useful especially for some initialization edits, since document initialization can involve transient schemas\n\t * which are implementation details and should not be exposed to the user.\n\t */\n\tprivate midUpgrade = false;\n\n\tprivate readonly rootFieldSchema: FieldSchema;\n\n\tpublic constructor(\n\t\tpublic readonly checkout: TreeCheckout,\n\t\tpublic readonly config: TreeViewConfiguration<TRootSchema>,\n\t\tpublic readonly nodeKeyManager: NodeKeyManager,\n\t\tpublic readonly breaker: Breakable = new Breakable(\"SchematizingSimpleTreeView\"),\n\t\tprivate readonly onDispose?: () => void,\n\t) {\n\t\tif (checkout.forest.anchors.slots.has(ViewSlot)) {\n\t\t\tthrow new UsageError(\"Cannot create a second tree view from the same checkout\");\n\t\t}\n\t\tcheckout.forest.anchors.slots.set(ViewSlot, this);\n\n\t\tconst policy = {\n\t\t\t...defaultSchemaPolicy,\n\t\t\tvalidateSchema: config.enableSchemaValidation,\n\t\t};\n\t\tthis.rootFieldSchema = normalizeFieldSchema(config.schema);\n\t\tthis.schemaPolicy = defaultSchemaPolicy;\n\n\t\tthis.viewSchema = new ViewSchema(policy, {}, toStoredSchema(this.rootFieldSchema));\n\t\t// This must be initialized before `update` can be called.\n\t\tthis.currentCompatibility = {\n\t\t\tcanView: false,\n\t\t\tcanUpgrade: true,\n\t\t\tisEquivalent: false,\n\t\t\tcanInitialize: true,\n\t\t};\n\t\tthis.update();\n\n\t\tthis.unregisterCallbacks.add(\n\t\t\tthis.checkout.events.on(\"commitApplied\", (data, getRevertible) =>\n\t\t\t\tthis.events.emit(\"commitApplied\", data, getRevertible),\n\t\t\t),\n\t\t);\n\t}\n\n\tpublic get schema(): TRootSchema {\n\t\treturn this.config.schema;\n\t}\n\n\tpublic initialize(content: InsertableTreeFieldFromImplicitField<TRootSchema>): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (!compatibility.canInitialize) {\n\t\t\tthrow new UsageError(\"Tree cannot be initialized more than once.\");\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst mapTree = mapTreeFromNodeData(\n\t\t\t\tcontent as InsertableContent,\n\t\t\t\tthis.rootFieldSchema,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t\t{\n\t\t\t\t\tschema: this.checkout.storedSchema,\n\t\t\t\t\tpolicy: {\n\t\t\t\t\t\t...defaultSchemaPolicy,\n\t\t\t\t\t\tvalidateSchema: this.config.enableSchemaValidation,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tprepareContentForHydration(mapTree, this.checkout.forest);\n\t\t\tinitialize(this.checkout, {\n\t\t\t\tschema: this.viewSchema.schema,\n\t\t\t\tinitialTree: mapTree === undefined ? undefined : cursorForMapTreeNode(mapTree),\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic upgradeSchema(): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (compatibility.isEquivalent) {\n\t\t\t// No-op\n\t\t\treturn;\n\t\t}\n\n\t\tif (!compatibility.canUpgrade) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Existing stored schema can not be upgraded (see TreeView.compatibility.canUpgrade).\",\n\t\t\t);\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst result = ensureSchema(\n\t\t\t\tthis.viewSchema,\n\t\t\t\tAllowedUpdateType.SchemaCompatible,\n\t\t\t\tthis.checkout,\n\t\t\t\t{\n\t\t\t\t\tschema: this.viewSchema.schema,\n\t\t\t\t\tinitialTree: undefined,\n\t\t\t\t},\n\t\t\t);\n\t\t\tassert(result, 0x8bf /* Schema upgrade should always work if canUpgrade is set. */);\n\t\t});\n\t}\n\n\t/**\n\t * Gets the view. Throws when disposed.\n\t */\n\tpublic getView(): CheckoutFlexTreeView {\n\t\tthis.ensureUndisposed();\n\t\tassert(this.view !== undefined, 0x8c0 /* unexpected getViewOrError */);\n\t\treturn this.view;\n\t}\n\n\tprivate ensureUndisposed(): void {\n\t\tif (this.disposed) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t}\n\n\tprivate failDisposed(): never {\n\t\tthrow new UsageError(\"Accessed a disposed TreeView.\");\n\t}\n\n\t/**\n\t * Updates `this.view` and the current compatibility status.\n\t * Invoked during initialization and when `this.view` needs to be replaced due to stored schema changes.\n\t * Handles re-registering for events to call update in the future.\n\t * @remarks\n\t * This does not check if the view needs to be replaced, it replaces it unconditionally:\n\t * callers should do any checking to detect if it's really needed before calling `update`.\n\t * @privateRemarks\n\t * This implementation avoids making any edits, which prevents it from being invoked reentrantly.\n\t * If implicit initialization (or some other edit) is desired, it should be done outside of this method.\n\t */\n\tprivate update(): void {\n\t\tthis.disposeView();\n\n\t\tconst result = this.viewSchema.checkCompatibility(this.checkout.storedSchema);\n\n\t\t// TODO: AB#8121: Weaken this check to support viewing under additional circumstances.\n\t\t// In the near term, this should support viewing documents with additional optional fields in their schema on object types.\n\t\t// Longer-term (as demand arises), we could also add APIs to constructing view schema to allow for more flexibility\n\t\t// (e.g. out-of-schema content handlers could allow support for viewing docs which have extra allowed types in a particular field)\n\t\tconst canView =\n\t\t\tresult.write === Compatibility.Compatible && result.read === Compatibility.Compatible;\n\t\tconst canUpgrade = result.read === Compatibility.Compatible;\n\t\tconst isEquivalent = canView && canUpgrade;\n\t\tconst compatibility: SchemaCompatibilityStatus = {\n\t\t\tcanView,\n\t\t\tcanUpgrade,\n\t\t\tisEquivalent,\n\t\t\tcanInitialize: canInitialize(this.checkout),\n\t\t};\n\t\tlet lastRoot =\n\t\t\tthis.compatibility.canView && this.view !== undefined ? this.root : undefined;\n\t\tthis.currentCompatibility = compatibility;\n\n\t\tif (compatibility.canView) {\n\t\t\t// Trigger \"rootChanged\" if the root changes in the future.\n\t\t\t// Currently there is no good way to do this as FlexTreeField has no events for changes.\n\t\t\t// this.view.flexTree.on(????)\n\t\t\t// As a workaround for the above, trigger \"rootChanged\" in \"afterBatch\"\n\t\t\t// which isn't the correct time since we normally do events during the batch when the forest is modified, but its better than nothing.\n\t\t\t// TODO: provide a better event: this.view.flexTree.on(????)\n\t\t\tconst cleanupCheckOutEvents = this.checkout.events.on(\"afterBatch\", () => {\n\t\t\t\t// In the initialization flow, this event is raised before the correct compatibility w.r.t the new schema is calculated.\n\t\t\t\t// Accessing `this.root` in that case can throw. It's OK to ignore this because:\n\t\t\t\t// - The rootChanged event will already be raised at the end of the current upgrade\n\t\t\t\t// - It doesn't matter that `lastRoot` isn't updated in this case, because `update` will be called again before the upgrade\n\t\t\t\t// completes (at which point this callback and the `lastRoot` captured here will be out of scope anyway)\n\t\t\t\tif (!this.midUpgrade && lastRoot !== this.root) {\n\t\t\t\t\tlastRoot = this.root;\n\t\t\t\t\tthis.events.emit(\"rootChanged\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconst onViewDispose = (): void => {\n\t\t\t\tcleanupCheckOutEvents();\n\t\t\t\tthis.view = undefined;\n\t\t\t\tif (!this.disposed) {\n\t\t\t\t\tthis.update();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst view = requireSchema(\n\t\t\t\tthis.checkout,\n\t\t\t\tthis.viewSchema,\n\t\t\t\tonViewDispose,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t\tthis.schemaPolicy,\n\t\t\t);\n\t\t\tthis.view = view;\n\t\t\tassert(\n\t\t\t\t!this.checkout.forest.anchors.slots.has(SimpleContextSlot),\n\t\t\t\t\"extra simple tree context\",\n\t\t\t);\n\t\t\tthis.checkout.forest.anchors.slots.set(\n\t\t\t\tSimpleContextSlot,\n\t\t\t\tnew HydratedContext(this.rootFieldSchema.allowedTypeSet, view.context),\n\t\t\t);\n\n\t\t\tconst unregister = this.checkout.storedSchema.on(\"afterSchemaChange\", () => {\n\t\t\t\tunregister();\n\t\t\t\tthis.unregisterCallbacks.delete(unregister);\n\t\t\t\tview[disposeSymbol]();\n\t\t\t});\n\t\t\tthis.unregisterCallbacks.add(unregister);\n\t\t} else {\n\t\t\tthis.view = undefined;\n\t\t\tthis.checkout.forest.anchors.slots.delete(SimpleContextSlot);\n\n\t\t\tconst unregister = this.checkout.storedSchema.on(\"afterSchemaChange\", () => {\n\t\t\t\tunregister();\n\t\t\t\tthis.unregisterCallbacks.delete(unregister);\n\t\t\t\tthis.update();\n\t\t\t});\n\t\t\tthis.unregisterCallbacks.add(unregister);\n\t\t}\n\n\t\tif (!this.midUpgrade) {\n\t\t\tthis.events.emit(\"schemaChanged\");\n\t\t\tthis.events.emit(\"rootChanged\");\n\t\t}\n\t}\n\n\tprivate runSchemaEdit(edit: () => void): void {\n\t\tthis.midUpgrade = true;\n\t\ttry {\n\t\t\tedit();\n\t\t} finally {\n\t\t\tthis.midUpgrade = false;\n\t\t}\n\t\tthis.events.emit(\"schemaChanged\");\n\t\tthis.events.emit(\"rootChanged\");\n\t}\n\n\tprivate disposeView(): void {\n\t\tif (this.view !== undefined) {\n\t\t\tthis.view[disposeSymbol]();\n\t\t\tthis.view = undefined;\n\t\t\tthis.checkout.forest.anchors.slots.delete(SimpleContextSlot);\n\t\t\tthis.unregisterCallbacks.forEach((unregister) => unregister());\n\t\t}\n\t\tthis.checkout.forest.anchors.slots.delete(SimpleContextSlot);\n\t}\n\n\tpublic get compatibility(): SchemaCompatibilityStatus {\n\t\tif (!this.currentCompatibility) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t\treturn this.currentCompatibility;\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.disposed = true;\n\t\tthis.disposeView();\n\t\tthis.checkout.forest.anchors.slots.delete(ViewSlot);\n\t\tthis.currentCompatibility = undefined;\n\t\tthis.onDispose?.();\n\t}\n\n\tpublic get root(): TreeFieldFromImplicitField<TRootSchema> {\n\t\tthis.breaker.use();\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getView();\n\t\treturn getTreeNodeForField(view.flexTree) as TreeFieldFromImplicitField<TRootSchema>;\n\t}\n\n\tpublic set root(newRoot: InsertableTreeFieldFromImplicitField<TRootSchema>) {\n\t\tthis.breaker.use();\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getView();\n\t\tsetField(view.context.root, this.rootFieldSchema, newRoot as InsertableContent);\n\t}\n}\n\n/**\n * Creates a view that self-disposes whenenever the stored schema changes.\n * This may only be called when the schema is already known to be compatible (typically via ensureSchema).\n */\nexport function requireSchema(\n\tcheckout: ITreeCheckout,\n\tviewSchema: ViewSchema,\n\tonDispose: () => void,\n\tnodeKeyManager: NodeKeyManager,\n\tschemaPolicy: FullSchemaPolicy,\n): CheckoutFlexTreeView {\n\tconst slots = checkout.forest.anchors.slots;\n\tassert(!slots.has(ContextSlot), 0x8c2 /* Cannot create second view from checkout */);\n\n\t{\n\t\tconst compatibility = viewSchema.checkCompatibility(checkout.storedSchema);\n\t\tassert(\n\t\t\tcompatibility.write === Compatibility.Compatible &&\n\t\t\t\tcompatibility.read === Compatibility.Compatible,\n\t\t\t0x8c3 /* requireSchema invoked with incompatible schema */,\n\t\t);\n\t}\n\n\tconst view = new CheckoutFlexTreeView(checkout, schemaPolicy, nodeKeyManager, onDispose);\n\tassert(slots.has(ContextSlot), 0x90d /* Context should be tracked in slot */);\n\n\treturn view;\n}\n"]}
1
+ {"version":3,"file":"schematizingTreeView.js","sourceRoot":"","sources":["../../src/shared-tree/schematizingTreeView.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,kEAA6D;AAC7D,uEAAsE;AAEtE,+CAK0B;AAC1B,iDAK4B;AAC5B,4DAMuC;AACvC,sDAkBiC;AACjC,+CAA+F;AAE/F,2DAA8E;AAE9E,uEAAiE;AACjE,sDAA6E;AAC7E;;;GAGG;AACU,QAAA,QAAQ,GAAG,IAAA,qBAAU,GAAiC,CAAC;AAEpE;;GAEG;IAEU,0BAA0B;4BADtC,wBAAa;;;;;QAmCb,YACiB,QAAsB,EACtB,MAA0C,EAC1C,cAA8B,EAC9B,UAAqB,IAAI,oBAAS,CAAC,4BAA4B,CAAC,EAC/D,SAAsB;YAJvB,aAAQ,GAAR,QAAQ,CAAc;YACtB,WAAM,GAAN,MAAM,CAAoC;YAC1C,mBAAc,GAAd,cAAc,CAAgB;YAC9B,YAAO,GAAP,OAAO,CAAyD;YAC/D,cAAS,GAAT,SAAS,CAAa;YAxBxB,WAAM,GAEU,IAAA,wBAAa,GAAE,CAAC;YAI/B,wBAAmB,GAAG,IAAI,GAAG,EAAc,CAAC;YAEtD,aAAQ,GAAG,KAAK,CAAC;YACxB;;;;;eAKG;YACK,eAAU,GAAG,KAAK,CAAC;YAW1B,IAAI,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAQ,CAAC,EAAE,CAAC;gBACjD,MAAM,IAAI,qBAAU,CAAC,yDAAyD,CAAC,CAAC;YACjF,CAAC;YACD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAQ,EAAE,IAAI,CAAC,CAAC;YAElD,MAAM,MAAM,GAAG;gBACd,GAAG,8BAAmB;gBACtB,cAAc,EAAE,MAAM,CA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,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,OAA4B,CAAC,CAAC;QACjF,CAAC;;;;;QA5SF,6KA6SC;;;QA7SY,uDAA0B;;;;AAA1B,gEAA0B;AA+SvC;;;GAGG;AACH,SAAgB,aAAa,CAC5B,QAAuB,EACvB,UAAsB,EACtB,SAAqB,EACrB,cAA8B,EAC9B,YAA8B;IAE9B,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5C,IAAA,iBAAM,EAAC,CAAC,KAAK,CAAC,GAAG,CAAC,sBAAW,CAAC,EAAE,KAAK,CAAC,6CAA6C,CAAC,CAAC;IAErF,CAAC;QACA,MAAM,aAAa,GAAG,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAC3E,IAAA,iBAAM,EACL,aAAa,CAAC,KAAK,KAAK,wBAAa,CAAC,UAAU;YAC/C,aAAa,CAAC,IAAI,KAAK,wBAAa,CAAC,UAAU,EAChD,KAAK,CAAC,oDAAoD,CAC1D,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,8CAAoB,CAAC,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IACzF,IAAA,iBAAM,EAAC,KAAK,CAAC,GAAG,CAAC,sBAAW,CAAC,EAAE,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAE9E,OAAO,IAAI,CAAC;AACb,CAAC;AAvBD,sCAuBC","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 { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\tAllowedUpdateType,\n\tanchorSlot,\n\tCompatibility,\n\ttype SchemaPolicy,\n} from \"../core/index.js\";\nimport {\n\ttype HasListeners,\n\ttype IEmitter,\n\ttype Listenable,\n\tcreateEmitter,\n} from \"../events/index.js\";\nimport {\n\ttype NodeKeyManager,\n\tdefaultSchemaPolicy,\n\tContextSlot,\n\tcursorForMapTreeNode,\n\ttype FullSchemaPolicy,\n} from \"../feature-libraries/index.js\";\nimport {\n\ttype FieldSchema,\n\ttype ImplicitFieldSchema,\n\ttype SchemaCompatibilityStatus,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tgetTreeNodeForField,\n\tsetField,\n\tnormalizeFieldSchema,\n\tViewSchema,\n\ttype InsertableContent,\n\ttype TreeViewConfiguration,\n\tmapTreeFromNodeData,\n\tprepareContentForHydration,\n\tcomparePersistedSchemaInternal,\n\ttoStoredSchema,\n} from \"../simple-tree/index.js\";\nimport { Breakable, breakingClass, disposeSymbol, type WithBreakable } from \"../util/index.js\";\n\nimport { canInitialize, ensureSchema, initialize } from \"./schematizeTree.js\";\nimport type { ITreeCheckout, TreeCheckout } from \"./treeCheckout.js\";\nimport { CheckoutFlexTreeView } from \"./checkoutFlexTreeView.js\";\nimport { HydratedContext, SimpleContextSlot } from \"../simple-tree/index.js\";\n/**\n * Creating multiple tree views from the same checkout is not supported. This slot is used to detect if one already\n * exists and error if creating a second.\n */\nexport const ViewSlot = anchorSlot<TreeView<ImplicitFieldSchema>>();\n\n/**\n * Implementation of TreeView wrapping a FlexTreeView.\n */\n@breakingClass\nexport class SchematizingSimpleTreeView<in out TRootSchema extends ImplicitFieldSchema>\n\timplements TreeView<TRootSchema>, WithBreakable\n{\n\t/**\n\t * The view is set to undefined when this object is disposed or the view schema does not support viewing the document's stored schema.\n\t *\n\t * The view schema may be incompatible with the stored schema. Use `compatibility` to check.\n\t */\n\tprivate view: CheckoutFlexTreeView | undefined;\n\n\t/**\n\t * Undefined iff uninitialized or disposed.\n\t */\n\tprivate currentCompatibility: SchemaCompatibilityStatus | undefined;\n\tprivate readonly schemaPolicy: SchemaPolicy;\n\tpublic readonly events: Listenable<TreeViewEvents> &\n\t\tIEmitter<TreeViewEvents> &\n\t\tHasListeners<TreeViewEvents> = createEmitter();\n\n\tprivate readonly viewSchema: ViewSchema;\n\n\tprivate readonly unregisterCallbacks = new Set<() => void>();\n\n\tpublic disposed = false;\n\t/**\n\t * This is set to true while an edit impacting the document schema is in progress.\n\t * This allows suppressing extra rootChanged / schemaChanged events until the edit concludes.\n\t * This is useful especially for some initialization edits, since document initialization can involve transient schemas\n\t * which are implementation details and should not be exposed to the user.\n\t */\n\tprivate midUpgrade = false;\n\n\tprivate readonly rootFieldSchema: FieldSchema;\n\n\tpublic constructor(\n\t\tpublic readonly checkout: TreeCheckout,\n\t\tpublic readonly config: TreeViewConfiguration<TRootSchema>,\n\t\tpublic readonly nodeKeyManager: NodeKeyManager,\n\t\tpublic readonly breaker: Breakable = new Breakable(\"SchematizingSimpleTreeView\"),\n\t\tprivate readonly onDispose?: () => void,\n\t) {\n\t\tif (checkout.forest.anchors.slots.has(ViewSlot)) {\n\t\t\tthrow new UsageError(\"Cannot create a second tree view from the same checkout\");\n\t\t}\n\t\tcheckout.forest.anchors.slots.set(ViewSlot, this);\n\n\t\tconst policy = {\n\t\t\t...defaultSchemaPolicy,\n\t\t\tvalidateSchema: config.enableSchemaValidation,\n\t\t};\n\t\tthis.rootFieldSchema = normalizeFieldSchema(config.schema);\n\t\tthis.schemaPolicy = defaultSchemaPolicy;\n\n\t\tthis.viewSchema = new ViewSchema(policy, {}, toStoredSchema(this.rootFieldSchema));\n\t\t// This must be initialized before `update` can be called.\n\t\tthis.currentCompatibility = {\n\t\t\tcanView: false,\n\t\t\tcanUpgrade: true,\n\t\t\tisEquivalent: false,\n\t\t\tcanInitialize: true,\n\t\t};\n\t\tthis.update();\n\n\t\tthis.unregisterCallbacks.add(\n\t\t\tthis.checkout.events.on(\"commitApplied\", (data, getRevertible) =>\n\t\t\t\tthis.events.emit(\"commitApplied\", data, getRevertible),\n\t\t\t),\n\t\t);\n\t}\n\n\tpublic get schema(): TRootSchema {\n\t\treturn this.config.schema;\n\t}\n\n\tpublic initialize(content: InsertableTreeFieldFromImplicitField<TRootSchema>): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (!compatibility.canInitialize) {\n\t\t\tthrow new UsageError(\"Tree cannot be initialized more than once.\");\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst mapTree = mapTreeFromNodeData(\n\t\t\t\tcontent as InsertableContent,\n\t\t\t\tthis.rootFieldSchema,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t\t{\n\t\t\t\t\tschema: this.checkout.storedSchema,\n\t\t\t\t\tpolicy: {\n\t\t\t\t\t\t...defaultSchemaPolicy,\n\t\t\t\t\t\tvalidateSchema: this.config.enableSchemaValidation,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tprepareContentForHydration(mapTree, this.checkout.forest);\n\t\t\tinitialize(this.checkout, {\n\t\t\t\tschema: this.viewSchema.schema,\n\t\t\t\tinitialTree: mapTree === undefined ? undefined : cursorForMapTreeNode(mapTree),\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic upgradeSchema(): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (compatibility.isEquivalent) {\n\t\t\t// No-op\n\t\t\treturn;\n\t\t}\n\n\t\tif (!compatibility.canUpgrade) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Existing stored schema can not be upgraded (see TreeView.compatibility.canUpgrade).\",\n\t\t\t);\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst result = ensureSchema(\n\t\t\t\tthis.viewSchema,\n\t\t\t\tAllowedUpdateType.SchemaCompatible,\n\t\t\t\tthis.checkout,\n\t\t\t\t{\n\t\t\t\t\tschema: this.viewSchema.schema,\n\t\t\t\t\tinitialTree: undefined,\n\t\t\t\t},\n\t\t\t);\n\t\t\tassert(result, 0x8bf /* Schema upgrade should always work if canUpgrade is set. */);\n\t\t});\n\t}\n\n\t/**\n\t * Gets the view. Throws when disposed.\n\t */\n\tpublic getView(): CheckoutFlexTreeView {\n\t\tthis.ensureUndisposed();\n\t\tassert(this.view !== undefined, 0x8c0 /* unexpected getViewOrError */);\n\t\treturn this.view;\n\t}\n\n\tprivate ensureUndisposed(): void {\n\t\tif (this.disposed) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t}\n\n\tprivate failDisposed(): never {\n\t\tthrow new UsageError(\"Accessed a disposed TreeView.\");\n\t}\n\n\t/**\n\t * Updates `this.view` and the current compatibility status.\n\t * Invoked during initialization and when `this.view` needs to be replaced due to stored schema changes.\n\t * Handles re-registering for events to call update in the future.\n\t * @remarks\n\t * This does not check if the view needs to be replaced, it replaces it unconditionally:\n\t * callers should do any checking to detect if it's really needed before calling `update`.\n\t * @privateRemarks\n\t * This implementation avoids making any edits, which prevents it from being invoked reentrantly.\n\t * If implicit initialization (or some other edit) is desired, it should be done outside of this method.\n\t */\n\tprivate update(): void {\n\t\tthis.disposeView();\n\n\t\tconst compatibility = comparePersistedSchemaInternal(\n\t\t\tthis.checkout.storedSchema,\n\t\t\tthis.viewSchema,\n\t\t\tcanInitialize(this.checkout),\n\t\t);\n\n\t\tlet lastRoot =\n\t\t\tthis.compatibility.canView && this.view !== undefined ? this.root : undefined;\n\t\tthis.currentCompatibility = compatibility;\n\n\t\tif (compatibility.canView) {\n\t\t\t// Trigger \"rootChanged\" if the root changes in the future.\n\t\t\t// Currently there is no good way to do this as FlexTreeField has no events for changes.\n\t\t\t// this.view.flexTree.on(????)\n\t\t\t// As a workaround for the above, trigger \"rootChanged\" in \"afterBatch\"\n\t\t\t// which isn't the correct time since we normally do events during the batch when the forest is modified, but its better than nothing.\n\t\t\t// TODO: provide a better event: this.view.flexTree.on(????)\n\t\t\tconst cleanupCheckOutEvents = this.checkout.events.on(\"afterBatch\", () => {\n\t\t\t\t// In the initialization flow, this event is raised before the correct compatibility w.r.t the new schema is calculated.\n\t\t\t\t// Accessing `this.root` in that case can throw. It's OK to ignore this because:\n\t\t\t\t// - The rootChanged event will already be raised at the end of the current upgrade\n\t\t\t\t// - It doesn't matter that `lastRoot` isn't updated in this case, because `update` will be called again before the upgrade\n\t\t\t\t// completes (at which point this callback and the `lastRoot` captured here will be out of scope anyway)\n\t\t\t\tif (!this.midUpgrade && lastRoot !== this.root) {\n\t\t\t\t\tlastRoot = this.root;\n\t\t\t\t\tthis.events.emit(\"rootChanged\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconst onViewDispose = (): void => {\n\t\t\t\tcleanupCheckOutEvents();\n\t\t\t\tthis.view = undefined;\n\t\t\t\tif (!this.disposed) {\n\t\t\t\t\tthis.update();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst view = requireSchema(\n\t\t\t\tthis.checkout,\n\t\t\t\tthis.viewSchema,\n\t\t\t\tonViewDispose,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t\tthis.schemaPolicy,\n\t\t\t);\n\t\t\tthis.view = view;\n\t\t\tassert(\n\t\t\t\t!this.checkout.forest.anchors.slots.has(SimpleContextSlot),\n\t\t\t\t\"extra simple tree context\",\n\t\t\t);\n\t\t\tthis.checkout.forest.anchors.slots.set(\n\t\t\t\tSimpleContextSlot,\n\t\t\t\tnew HydratedContext(this.rootFieldSchema.allowedTypeSet, view.context),\n\t\t\t);\n\n\t\t\tconst unregister = this.checkout.storedSchema.on(\"afterSchemaChange\", () => {\n\t\t\t\tunregister();\n\t\t\t\tthis.unregisterCallbacks.delete(unregister);\n\t\t\t\tview[disposeSymbol]();\n\t\t\t});\n\t\t\tthis.unregisterCallbacks.add(unregister);\n\t\t} else {\n\t\t\tthis.view = undefined;\n\t\t\tthis.checkout.forest.anchors.slots.delete(SimpleContextSlot);\n\n\t\t\tconst unregister = this.checkout.storedSchema.on(\"afterSchemaChange\", () => {\n\t\t\t\tunregister();\n\t\t\t\tthis.unregisterCallbacks.delete(unregister);\n\t\t\t\tthis.update();\n\t\t\t});\n\t\t\tthis.unregisterCallbacks.add(unregister);\n\t\t}\n\n\t\tif (!this.midUpgrade) {\n\t\t\tthis.events.emit(\"schemaChanged\");\n\t\t\tthis.events.emit(\"rootChanged\");\n\t\t}\n\t}\n\n\tprivate runSchemaEdit(edit: () => void): void {\n\t\tthis.midUpgrade = true;\n\t\ttry {\n\t\t\tedit();\n\t\t} finally {\n\t\t\tthis.midUpgrade = false;\n\t\t}\n\t\tthis.events.emit(\"schemaChanged\");\n\t\tthis.events.emit(\"rootChanged\");\n\t}\n\n\tprivate disposeView(): void {\n\t\tif (this.view !== undefined) {\n\t\t\tthis.view[disposeSymbol]();\n\t\t\tthis.view = undefined;\n\t\t\tthis.checkout.forest.anchors.slots.delete(SimpleContextSlot);\n\t\t\tthis.unregisterCallbacks.forEach((unregister) => unregister());\n\t\t}\n\t\tthis.checkout.forest.anchors.slots.delete(SimpleContextSlot);\n\t}\n\n\tpublic get compatibility(): SchemaCompatibilityStatus {\n\t\tif (!this.currentCompatibility) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t\treturn this.currentCompatibility;\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.disposed = true;\n\t\tthis.disposeView();\n\t\tthis.checkout.forest.anchors.slots.delete(ViewSlot);\n\t\tthis.currentCompatibility = undefined;\n\t\tthis.onDispose?.();\n\t}\n\n\tpublic get root(): TreeFieldFromImplicitField<TRootSchema> {\n\t\tthis.breaker.use();\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getView();\n\t\treturn getTreeNodeForField(view.flexTree) as TreeFieldFromImplicitField<TRootSchema>;\n\t}\n\n\tpublic set root(newRoot: InsertableTreeFieldFromImplicitField<TRootSchema>) {\n\t\tthis.breaker.use();\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getView();\n\t\tsetField(view.context.root, this.rootFieldSchema, newRoot as InsertableContent);\n\t}\n}\n\n/**\n * Creates a view that self-disposes whenenever the stored schema changes.\n * This may only be called when the schema is already known to be compatible (typically via ensureSchema).\n */\nexport function requireSchema(\n\tcheckout: ITreeCheckout,\n\tviewSchema: ViewSchema,\n\tonDispose: () => void,\n\tnodeKeyManager: NodeKeyManager,\n\tschemaPolicy: FullSchemaPolicy,\n): CheckoutFlexTreeView {\n\tconst slots = checkout.forest.anchors.slots;\n\tassert(!slots.has(ContextSlot), 0x8c2 /* Cannot create second view from checkout */);\n\n\t{\n\t\tconst compatibility = viewSchema.checkCompatibility(checkout.storedSchema);\n\t\tassert(\n\t\t\tcompatibility.write === Compatibility.Compatible &&\n\t\t\t\tcompatibility.read === Compatibility.Compatible,\n\t\t\t0x8c3 /* requireSchema invoked with incompatible schema */,\n\t\t);\n\t}\n\n\tconst view = new CheckoutFlexTreeView(checkout, schemaPolicy, nodeKeyManager, onDispose);\n\tassert(slots.has(ContextSlot), 0x90d /* Context should be tracked in slot */);\n\n\treturn view;\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  import type { IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime, IChannelServices, IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
6
6
  import type { ISharedObject } from "@fluidframework/shared-object-base/internal";
7
7
  import { type ICodecOptions } from "../codec/index.js";
8
- import { type JsonableTree, type TreeStoredSchema, TreeStoredSchemaRepository } from "../core/index.js";
8
+ import { type IEditableForest, type JsonableTree, type TreeStoredSchema, TreeStoredSchemaRepository, type TreeStoredSchemaSubscription } from "../core/index.js";
9
9
  import { TreeCompressionStrategy } from "../feature-libraries/index.js";
10
10
  import { SharedTreeCore } from "../shared-tree-core/index.js";
11
11
  import type { ITree, ImplicitFieldSchema, TreeView, TreeViewConfiguration } from "../simple-tree/index.js";
@@ -13,6 +13,7 @@ import { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
13
13
  import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
14
14
  import type { SharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
15
15
  import { type TreeCheckout, type TreeBranch } from "./treeCheckout.js";
16
+ import type { IIdCompressor } from "@fluidframework/id-compressor";
16
17
  /**
17
18
  * Copy of data from an {@link ISharedTree} at some point in time.
18
19
  * @remarks
@@ -51,6 +52,10 @@ export interface ISharedTree extends ISharedObject, ITree {
51
52
  */
52
53
  contentSnapshot(): SharedTreeContentSnapshot;
53
54
  }
55
+ /**
56
+ * Build and return a forest of the requested type.
57
+ */
58
+ export declare function buildConfiguredForest(type: ForestType, schema: TreeStoredSchemaSubscription, idCompressor: IIdCompressor): IEditableForest;
54
59
  /**
55
60
  * Shared tree, configured with a good set of indexes and field kinds which will maintain compatibility over time.
56
61
  *
@@ -86,7 +91,7 @@ export declare function getBranch(view: TreeView<ImplicitFieldSchema>): TreeBran
86
91
  * Format versions supported by SharedTree.
87
92
  *
88
93
  * Each version documents a required minimum version of the \@fluidframework/tree package.
89
- * @internal
94
+ * @alpha
90
95
  */
91
96
  export declare const SharedTreeFormatVersion: {
92
97
  /**
@@ -109,23 +114,33 @@ export declare const SharedTreeFormatVersion: {
109
114
  * Format versions supported by SharedTree.
110
115
  *
111
116
  * Each version documents a required minimum version of the \@fluidframework/tree package.
112
- * @internal
117
+ * @alpha
113
118
  * @privateRemarks
114
119
  * See packages/dds/tree/docs/main/compatibility.md for information on how to add support for a new format.
120
+ *
121
+ * TODO: Before this gets promoted past Alpha,
122
+ * a separate abstraction more suited for use in the public API should be adopted rather than reusing the same types used internally.
123
+ * Such an abstraction should probably be in the form of a Fluid-Framework wide compatibility enum.
115
124
  */
116
125
  export type SharedTreeFormatVersion = typeof SharedTreeFormatVersion;
117
126
  /**
118
- * @internal
127
+ * Configuration options for SharedTree.
128
+ * @alpha
119
129
  */
120
- export type SharedTreeOptions = Partial<ICodecOptions> & Partial<SharedTreeFormatOptions> & {
130
+ export type SharedTreeOptions = Partial<ICodecOptions> & Partial<SharedTreeFormatOptions> & ForestOptions;
131
+ /**
132
+ * Configuration options for SharedTree's internal tree storage.
133
+ * @alpha
134
+ */
135
+ export interface ForestOptions {
121
136
  /**
122
137
  * The {@link ForestType} indicating which forest type should be created for the SharedTree.
123
138
  */
124
- forest?: ForestType;
125
- };
139
+ readonly forest?: ForestType;
140
+ }
126
141
  /**
127
142
  * Options for configuring the persisted format SharedTree uses.
128
- * @internal
143
+ * @alpha
129
144
  */
130
145
  export interface SharedTreeFormatOptions {
131
146
  /**
@@ -148,7 +163,7 @@ export interface SharedTreeFormatOptions {
148
163
  }
149
164
  /**
150
165
  * Used to distinguish between different forest types.
151
- * @internal
166
+ * @alpha
152
167
  */
153
168
  export declare enum ForestType {
154
169
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sharedTree.d.ts","sourceRoot":"","sources":["../../src/shared-tree/sharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAGjF,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,mBAAmB,CAAC;AACtE,OAAO,EACN,KAAK,YAAY,EAEjB,KAAK,gBAAgB,EACrB,0BAA0B,EAG1B,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAIN,uBAAuB,EAQvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAGN,cAAc,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACX,KAAK,EACL,mBAAmB,EACnB,QAAQ,EACR,qBAAqB,EACrB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC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