@fluidframework/tree 2.21.0 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +1 -0
  3. package/api-report/tree.alpha.api.md +29 -4
  4. package/api-report/tree.beta.api.md +29 -4
  5. package/api-report/tree.legacy.alpha.api.md +29 -4
  6. package/api-report/tree.legacy.public.api.md +29 -4
  7. package/api-report/tree.public.api.md +29 -4
  8. package/dist/alpha.d.ts +1 -0
  9. package/dist/beta.d.ts +1 -0
  10. package/dist/core/forest/editableForest.js +1 -1
  11. package/dist/core/forest/editableForest.js.map +1 -1
  12. package/dist/core/index.d.ts +1 -1
  13. package/dist/core/index.d.ts.map +1 -1
  14. package/dist/core/index.js.map +1 -1
  15. package/dist/core/tree/anchorSet.d.ts +2 -5
  16. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  17. package/dist/core/tree/anchorSet.js +1 -151
  18. package/dist/core/tree/anchorSet.js.map +1 -1
  19. package/dist/core/tree/index.d.ts +1 -2
  20. package/dist/core/tree/index.d.ts.map +1 -1
  21. package/dist/core/tree/index.js.map +1 -1
  22. package/dist/core/tree/pathTree.d.ts +0 -11
  23. package/dist/core/tree/pathTree.d.ts.map +1 -1
  24. package/dist/core/tree/pathTree.js.map +1 -1
  25. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  26. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  27. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
  28. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  29. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -2
  30. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  31. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +0 -9
  32. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  33. package/dist/feature-libraries/flex-tree/treeEvents.d.ts +2 -4
  34. package/dist/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  35. package/dist/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  36. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -2
  37. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  38. package/dist/feature-libraries/forest-summary/forestSummarizer.js +0 -9
  39. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  40. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +6 -2
  41. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  42. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  43. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -4
  44. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  45. package/dist/feature-libraries/modular-schema/genericFieldKind.js +4 -19
  46. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  47. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  48. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +11 -12
  49. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  50. package/dist/feature-libraries/node-key/mockNodeKeyManager.js +1 -1
  51. package/dist/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
  52. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  53. package/dist/feature-libraries/optional-field/optionalField.js +7 -3
  54. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  55. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +3 -5
  56. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  57. package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -11
  58. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  59. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +1 -1
  60. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  61. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +13 -1
  62. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  63. package/dist/index.d.ts +3 -3
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +4 -4
  66. package/dist/index.js.map +1 -1
  67. package/dist/legacy.d.ts +1 -0
  68. package/dist/packageVersion.d.ts +1 -1
  69. package/dist/packageVersion.js +1 -1
  70. package/dist/packageVersion.js.map +1 -1
  71. package/dist/public.d.ts +1 -0
  72. package/dist/shared-tree/index.d.ts +1 -3
  73. package/dist/shared-tree/index.d.ts.map +1 -1
  74. package/dist/shared-tree/index.js +1 -7
  75. package/dist/shared-tree/index.js.map +1 -1
  76. package/dist/shared-tree/schematizingTreeView.d.ts +4 -5
  77. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  78. package/dist/shared-tree/schematizingTreeView.js +9 -10
  79. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  80. package/dist/shared-tree/sharedTree.d.ts +39 -39
  81. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  82. package/dist/shared-tree/sharedTree.js +81 -52
  83. package/dist/shared-tree/sharedTree.js.map +1 -1
  84. package/dist/shared-tree/treeApi.d.ts +2 -2
  85. package/dist/shared-tree/treeApi.d.ts.map +1 -1
  86. package/dist/shared-tree/treeApi.js +9 -3
  87. package/dist/shared-tree/treeApi.js.map +1 -1
  88. package/dist/shared-tree/treeCheckout.d.ts +3 -3
  89. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  90. package/dist/shared-tree/treeCheckout.js +3 -2
  91. package/dist/shared-tree/treeCheckout.js.map +1 -1
  92. package/dist/shared-tree-core/editManager.js +1 -1
  93. package/dist/shared-tree-core/editManager.js.map +1 -1
  94. package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -2
  95. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  96. package/dist/shared-tree-core/editManagerSummarizer.js +0 -9
  97. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  98. package/dist/shared-tree-core/sequenceIdUtils.d.ts +12 -1
  99. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  100. package/dist/shared-tree-core/sequenceIdUtils.js +25 -7
  101. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  102. package/dist/shared-tree-core/sharedTreeCore.d.ts +25 -30
  103. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  104. package/dist/shared-tree-core/sharedTreeCore.js +20 -49
  105. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  106. package/dist/simple-tree/api/index.d.ts +3 -2
  107. package/dist/simple-tree/api/index.d.ts.map +1 -1
  108. package/dist/simple-tree/api/index.js +3 -1
  109. package/dist/simple-tree/api/index.js.map +1 -1
  110. package/dist/simple-tree/api/schemaFactory.d.ts +156 -63
  111. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  112. package/dist/simple-tree/api/schemaFactory.js +179 -86
  113. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  114. package/dist/{shared-tree → simple-tree/api}/transactionTypes.d.ts +1 -1
  115. package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -0
  116. package/dist/{shared-tree → simple-tree/api}/transactionTypes.js.map +1 -1
  117. package/dist/simple-tree/api/tree.d.ts +23 -2
  118. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  119. package/dist/simple-tree/api/tree.js.map +1 -1
  120. package/dist/simple-tree/index.d.ts +1 -1
  121. package/dist/simple-tree/index.d.ts.map +1 -1
  122. package/dist/simple-tree/index.js +3 -2
  123. package/dist/simple-tree/index.js.map +1 -1
  124. package/dist/simple-tree/schemaTypes.d.ts +2 -2
  125. package/dist/simple-tree/schemaTypes.js +1 -1
  126. package/dist/simple-tree/schemaTypes.js.map +1 -1
  127. package/dist/simple-tree/treeNodeValid.js +1 -2
  128. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  129. package/dist/treeFactory.d.ts +16 -5
  130. package/dist/treeFactory.d.ts.map +1 -1
  131. package/dist/treeFactory.js +21 -12
  132. package/dist/treeFactory.js.map +1 -1
  133. package/dist/util/breakable.d.ts +1 -1
  134. package/dist/util/breakable.d.ts.map +1 -1
  135. package/dist/util/breakable.js.map +1 -1
  136. package/dist/util/rangeMap.d.ts +1 -1
  137. package/dist/util/rangeMap.js +1 -1
  138. package/dist/util/rangeMap.js.map +1 -1
  139. package/lib/alpha.d.ts +1 -0
  140. package/lib/beta.d.ts +1 -0
  141. package/lib/core/forest/editableForest.js +1 -1
  142. package/lib/core/forest/editableForest.js.map +1 -1
  143. package/lib/core/index.d.ts +1 -1
  144. package/lib/core/index.d.ts.map +1 -1
  145. package/lib/core/index.js.map +1 -1
  146. package/lib/core/tree/anchorSet.d.ts +2 -5
  147. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  148. package/lib/core/tree/anchorSet.js +1 -151
  149. package/lib/core/tree/anchorSet.js.map +1 -1
  150. package/lib/core/tree/index.d.ts +1 -2
  151. package/lib/core/tree/index.d.ts.map +1 -1
  152. package/lib/core/tree/index.js.map +1 -1
  153. package/lib/core/tree/pathTree.d.ts +0 -11
  154. package/lib/core/tree/pathTree.d.ts.map +1 -1
  155. package/lib/core/tree/pathTree.js.map +1 -1
  156. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  157. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  158. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
  159. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  160. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -2
  161. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  162. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +0 -9
  163. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  164. package/lib/feature-libraries/flex-tree/treeEvents.d.ts +2 -4
  165. package/lib/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  166. package/lib/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  167. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -2
  168. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  169. package/lib/feature-libraries/forest-summary/forestSummarizer.js +0 -9
  170. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  171. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +6 -2
  172. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  173. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  174. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -4
  175. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  176. package/lib/feature-libraries/modular-schema/genericFieldKind.js +4 -19
  177. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  178. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  179. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +11 -12
  180. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  181. package/lib/feature-libraries/node-key/mockNodeKeyManager.js +1 -1
  182. package/lib/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
  183. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  184. package/lib/feature-libraries/optional-field/optionalField.js +7 -3
  185. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  186. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +3 -5
  187. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  188. package/lib/feature-libraries/schema-index/schemaSummarizer.js +1 -11
  189. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  190. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +1 -1
  191. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  192. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +13 -1
  193. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  194. package/lib/index.d.ts +3 -3
  195. package/lib/index.d.ts.map +1 -1
  196. package/lib/index.js +3 -3
  197. package/lib/index.js.map +1 -1
  198. package/lib/legacy.d.ts +1 -0
  199. package/lib/packageVersion.d.ts +1 -1
  200. package/lib/packageVersion.js +1 -1
  201. package/lib/packageVersion.js.map +1 -1
  202. package/lib/public.d.ts +1 -0
  203. package/lib/shared-tree/index.d.ts +1 -3
  204. package/lib/shared-tree/index.d.ts.map +1 -1
  205. package/lib/shared-tree/index.js +1 -3
  206. package/lib/shared-tree/index.js.map +1 -1
  207. package/lib/shared-tree/schematizingTreeView.d.ts +4 -5
  208. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  209. package/lib/shared-tree/schematizingTreeView.js +4 -5
  210. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  211. package/lib/shared-tree/sharedTree.d.ts +39 -39
  212. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  213. package/lib/shared-tree/sharedTree.js +79 -50
  214. package/lib/shared-tree/sharedTree.js.map +1 -1
  215. package/lib/shared-tree/treeApi.d.ts +2 -2
  216. package/lib/shared-tree/treeApi.d.ts.map +1 -1
  217. package/lib/shared-tree/treeApi.js +8 -2
  218. package/lib/shared-tree/treeApi.js.map +1 -1
  219. package/lib/shared-tree/treeCheckout.d.ts +3 -3
  220. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  221. package/lib/shared-tree/treeCheckout.js +4 -3
  222. package/lib/shared-tree/treeCheckout.js.map +1 -1
  223. package/lib/shared-tree-core/editManager.js +2 -2
  224. package/lib/shared-tree-core/editManager.js.map +1 -1
  225. package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -2
  226. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  227. package/lib/shared-tree-core/editManagerSummarizer.js +0 -9
  228. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  229. package/lib/shared-tree-core/sequenceIdUtils.d.ts +12 -1
  230. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  231. package/lib/shared-tree-core/sequenceIdUtils.js +23 -5
  232. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  233. package/lib/shared-tree-core/sharedTreeCore.d.ts +25 -30
  234. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  235. package/lib/shared-tree-core/sharedTreeCore.js +19 -48
  236. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  237. package/lib/simple-tree/api/index.d.ts +3 -2
  238. package/lib/simple-tree/api/index.d.ts.map +1 -1
  239. package/lib/simple-tree/api/index.js +1 -0
  240. package/lib/simple-tree/api/index.js.map +1 -1
  241. package/lib/simple-tree/api/schemaFactory.d.ts +156 -63
  242. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  243. package/lib/simple-tree/api/schemaFactory.js +178 -85
  244. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  245. package/lib/{shared-tree → simple-tree/api}/transactionTypes.d.ts +1 -1
  246. package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -0
  247. package/lib/{shared-tree → simple-tree/api}/transactionTypes.js.map +1 -1
  248. package/lib/simple-tree/api/tree.d.ts +23 -2
  249. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  250. package/lib/simple-tree/api/tree.js.map +1 -1
  251. package/lib/simple-tree/index.d.ts +1 -1
  252. package/lib/simple-tree/index.d.ts.map +1 -1
  253. package/lib/simple-tree/index.js +1 -1
  254. package/lib/simple-tree/index.js.map +1 -1
  255. package/lib/simple-tree/schemaTypes.d.ts +2 -2
  256. package/lib/simple-tree/schemaTypes.js +1 -1
  257. package/lib/simple-tree/schemaTypes.js.map +1 -1
  258. package/lib/simple-tree/treeNodeValid.js +1 -2
  259. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  260. package/lib/treeFactory.d.ts +16 -5
  261. package/lib/treeFactory.d.ts.map +1 -1
  262. package/lib/treeFactory.js +20 -11
  263. package/lib/treeFactory.js.map +1 -1
  264. package/lib/util/breakable.d.ts +1 -1
  265. package/lib/util/breakable.d.ts.map +1 -1
  266. package/lib/util/breakable.js.map +1 -1
  267. package/lib/util/rangeMap.d.ts +1 -1
  268. package/lib/util/rangeMap.js +1 -1
  269. package/lib/util/rangeMap.js.map +1 -1
  270. package/package.json +21 -21
  271. package/src/core/forest/editableForest.ts +1 -1
  272. package/src/core/index.ts +0 -3
  273. package/src/core/tree/anchorSet.ts +4 -197
  274. package/src/core/tree/index.ts +0 -3
  275. package/src/core/tree/pathTree.ts +0 -13
  276. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -1
  277. package/src/feature-libraries/detachedFieldIndexSummarizer.ts +0 -11
  278. package/src/feature-libraries/flex-tree/treeEvents.ts +2 -4
  279. package/src/feature-libraries/forest-summary/forestSummarizer.ts +0 -11
  280. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +6 -2
  281. package/src/feature-libraries/modular-schema/genericFieldKind.ts +3 -35
  282. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +9 -42
  283. package/src/feature-libraries/optional-field/optionalField.ts +10 -3
  284. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -16
  285. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +13 -2
  286. package/src/index.ts +15 -12
  287. package/src/packageVersion.ts +1 -1
  288. package/src/shared-tree/index.ts +3 -19
  289. package/src/shared-tree/schematizingTreeView.ts +18 -16
  290. package/src/shared-tree/sharedTree.ts +203 -100
  291. package/src/shared-tree/treeApi.ts +10 -1
  292. package/src/shared-tree/treeCheckout.ts +11 -8
  293. package/src/shared-tree-core/editManager.ts +2 -2
  294. package/src/shared-tree-core/editManagerSummarizer.ts +0 -11
  295. package/src/shared-tree-core/sequenceIdUtils.ts +26 -5
  296. package/src/shared-tree-core/sharedTreeCore.ts +30 -87
  297. package/src/simple-tree/api/index.ts +15 -0
  298. package/src/simple-tree/api/schemaFactory.ts +203 -89
  299. package/src/{shared-tree → simple-tree/api}/transactionTypes.ts +1 -1
  300. package/src/simple-tree/api/tree.ts +31 -6
  301. package/src/simple-tree/index.ts +12 -0
  302. package/src/simple-tree/schemaTypes.ts +2 -2
  303. package/src/treeFactory.ts +29 -11
  304. package/src/util/breakable.ts +1 -1
  305. package/src/util/rangeMap.ts +1 -1
  306. package/dist/core/tree/visitPath.d.ts +0 -101
  307. package/dist/core/tree/visitPath.d.ts.map +0 -1
  308. package/dist/core/tree/visitPath.js +0 -7
  309. package/dist/core/tree/visitPath.js.map +0 -1
  310. package/dist/shared-tree/publicContracts.d.ts +0 -18
  311. package/dist/shared-tree/publicContracts.d.ts.map +0 -1
  312. package/dist/shared-tree/publicContracts.js +0 -24
  313. package/dist/shared-tree/publicContracts.js.map +0 -1
  314. package/dist/shared-tree/transactionTypes.d.ts.map +0 -1
  315. package/lib/core/tree/visitPath.d.ts +0 -101
  316. package/lib/core/tree/visitPath.d.ts.map +0 -1
  317. package/lib/core/tree/visitPath.js +0 -6
  318. package/lib/core/tree/visitPath.js.map +0 -1
  319. package/lib/shared-tree/publicContracts.d.ts +0 -18
  320. package/lib/shared-tree/publicContracts.d.ts.map +0 -1
  321. package/lib/shared-tree/publicContracts.js +0 -21
  322. package/lib/shared-tree/publicContracts.js.map +0 -1
  323. package/lib/shared-tree/transactionTypes.d.ts.map +0 -1
  324. package/src/core/tree/visitPath.ts +0 -124
  325. package/src/shared-tree/publicContracts.ts +0 -24
  326. /package/dist/{shared-tree → simple-tree/api}/transactionTypes.js +0 -0
  327. /package/lib/{shared-tree → simple-tree/api}/transactionTypes.js +0 -0
@@ -13,11 +13,6 @@ import type {
13
13
  } from "../../core/index.js";
14
14
 
15
15
  import type {
16
- RunTransactionParams,
17
- VoidTransactionCallbackStatus,
18
- TransactionCallbackStatus,
19
- TransactionResult,
20
- TransactionResultExt,
21
16
  // This is referenced by doc comments.
22
17
  // eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports
23
18
  TreeAlpha,
@@ -42,6 +37,15 @@ import { markSchemaMostDerived } from "./schemaFactory.js";
42
37
  import { fail, getOrCreate } from "../../util/index.js";
43
38
  import type { MakeNominal } from "../../util/index.js";
44
39
  import { walkFieldSchema } from "../walkFieldSchema.js";
40
+ import type { VerboseTree } from "./verboseTree.js";
41
+ import type { SimpleTreeSchema } from "./simpleSchema.js";
42
+ import type {
43
+ RunTransactionParams,
44
+ TransactionCallbackStatus,
45
+ TransactionResult,
46
+ TransactionResultExt,
47
+ VoidTransactionCallbackStatus,
48
+ } from "./transactionTypes.js";
45
49
  /**
46
50
  * A tree from which a {@link TreeView} can be created.
47
51
  *
@@ -52,7 +56,6 @@ import { walkFieldSchema } from "../walkFieldSchema.js";
52
56
  * Maybe rename "exportJsonSchema" to align on "concise" terminology.
53
57
  * Ensure schema exporting APIs here align and reference APIs for exporting view schema to the same formats (which should include stored vs property key choice).
54
58
  * Make sure users of independentView can use these export APIs (maybe provide a reference back to the ViewableTree from the TreeView to accomplish that).
55
- * Some of these APIs are on ISharedTree and can get moved here.
56
59
  * @system @sealed @public
57
60
  */
58
61
  export interface ViewableTree {
@@ -101,6 +104,28 @@ export interface ViewableTree {
101
104
  */
102
105
  export interface ITree extends ViewableTree, IFluidLoadable {}
103
106
 
107
+ /**
108
+ * {@link ITree} extended with some alpha APIs.
109
+ * @privateRemarks
110
+ * TODO: Promote this to alpha.
111
+ * @internal
112
+ */
113
+ export interface ITreeAlpha extends ITree {
114
+ /**
115
+ * Exports root in the same format as {@link TreeAlpha.(exportVerbose:1)} using stored keys.
116
+ * @remarks
117
+ * This is `undefined` if and only if the root field is empty (this can only happen if the root field is optional).
118
+ */
119
+ exportVerbose(): VerboseTree | undefined;
120
+
121
+ /**
122
+ * Exports the SimpleTreeSchema that is stored in the tree, using stored keys for object fields.
123
+ * @remarks
124
+ * To get the schema using property keys, use {@link getSimpleSchema} on the view schema.
125
+ */
126
+ exportSimpleSchema(): SimpleTreeSchema;
127
+ }
128
+
104
129
  /**
105
130
  * Options when constructing a tree view.
106
131
  * @public
@@ -124,6 +124,18 @@ export {
124
124
  type CustomTreeNode,
125
125
  type CustomTreeValue,
126
126
  tryStoredSchemaAsArray,
127
+ type schemaStatics,
128
+ type ITreeAlpha,
129
+ type TransactionConstraint,
130
+ type NodeInDocumentConstraint,
131
+ type RunTransactionParams,
132
+ type VoidTransactionCallbackStatus,
133
+ type TransactionCallbackStatus,
134
+ type TransactionResult,
135
+ type TransactionResultExt,
136
+ type TransactionResultSuccess,
137
+ type TransactionResultFailed,
138
+ rollback,
127
139
  } from "./api/index.js";
128
140
  export {
129
141
  type NodeFromSchema,
@@ -281,7 +281,7 @@ export let createFieldSchema: <
281
281
  * including functionality that does not have to be kept consistent across versions or deterministic.
282
282
  *
283
283
  * This can include policy for how to use this schema for "view" purposes, and well as how to expose editing APIs.
284
- * Use {@link SchemaFactory} to create the FieldSchema instances, for example {@link SchemaFactory.optional}.
284
+ * Use {@link SchemaFactory} to create the FieldSchema instances, for example {@link schemaStatics.optional}.
285
285
  * @privateRemarks
286
286
  * Public access to the constructor is removed to prevent creating expressible but unsupported (or not stable) configurations.
287
287
  * {@link createFieldSchema} can be used internally to create instances.
@@ -822,7 +822,7 @@ export type NodeBuilderData<T extends TreeNodeSchemaCore<string, NodeKind, boole
822
822
  /**
823
823
  * Value that may be stored as a leaf node.
824
824
  * @remarks
825
- * Some limitations apply, see the documentation for {@link SchemaFactory.number} and {@link SchemaFactory.string} for those restrictions.
825
+ * Some limitations apply, see the documentation for {@link schemaStatics.number} and {@link schemaStatics.string} for those restrictions.
826
826
  * @public
827
827
  */
828
828
  // eslint-disable-next-line @rushstack/no-new-null
@@ -15,25 +15,43 @@ import {
15
15
  createSharedObjectKind,
16
16
  } from "@fluidframework/shared-object-base/internal";
17
17
 
18
- import { pkgVersion } from "./packageVersion.js";
19
- import { SharedTree as SharedTreeImpl, type SharedTreeOptions } from "./shared-tree/index.js";
18
+ import {
19
+ SharedTree as SharedTreeImpl,
20
+ type SharedTreeOptions,
21
+ type SharedTreeOptionsInternal,
22
+ } from "./shared-tree/index.js";
20
23
  import type { ITree } from "./simple-tree/index.js";
21
24
 
25
+ import { pkgVersion } from "./packageVersion.js";
26
+
27
+ /**
28
+ * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory."type"}
29
+ * @alpha
30
+ * @legacy
31
+ */
32
+ export const SharedTreeFactoryType = "https://graph.microsoft.com/types/tree";
33
+
34
+ /**
35
+ * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.attributes}
36
+ * @alpha
37
+ * @legacy
38
+ */
39
+ export const SharedTreeAttributes: IChannelAttributes = {
40
+ type: SharedTreeFactoryType,
41
+ snapshotFormatVersion: "0.0.0",
42
+ packageVersion: pkgVersion,
43
+ };
44
+
22
45
  /**
23
46
  * A channel factory that creates an {@link ITree}.
24
47
  */
25
48
  export class TreeFactory implements IChannelFactory<ITree> {
26
- public static readonly Type = "https://graph.microsoft.com/types/tree";
27
- public static readonly attributes: IChannelAttributes = {
28
- type: this.Type,
29
- snapshotFormatVersion: "0.0.0",
30
- packageVersion: pkgVersion,
31
- };
49
+ public static Type: string = SharedTreeFactoryType;
50
+ public readonly type: string = SharedTreeFactoryType;
32
51
 
33
- public readonly type = TreeFactory.Type;
34
- public readonly attributes: IChannelAttributes = TreeFactory.attributes;
52
+ public readonly attributes: IChannelAttributes = SharedTreeAttributes;
35
53
 
36
- public constructor(private readonly options: SharedTreeOptions) {}
54
+ public constructor(private readonly options: SharedTreeOptionsInternal) {}
37
55
 
38
56
  public async load(
39
57
  runtime: IFluidDataStoreRuntime,
@@ -47,7 +47,7 @@ export class Breakable {
47
47
  * @privateRemarks
48
48
  * If there is a use-case, this should be made public.
49
49
  */
50
- private rethrowCaught(brokenBy: unknown): never {
50
+ public rethrowCaught(brokenBy: unknown): never {
51
51
  if (brokenBy instanceof Error) {
52
52
  this.break(brokenBy);
53
53
  }
@@ -61,7 +61,7 @@ export class RangeMap<K, V> {
61
61
  * Retrieves the values for all keys in the query range.
62
62
  *
63
63
  * @param start - The first key in the range being queried
64
- * @param length - The length of the query range
64
+ * @param length - The length of the query range
65
65
  * @returns A list of entries, each describing the value for some subrange of the query.
66
66
  * The entries are in the same order as the keys, and there is an entry for every key with a non `undefined` value.
67
67
  */
@@ -1,101 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { ProtoNodes } from "./delta.js";
6
- import type { DetachedPlaceUpPath, DetachedRangeUpPath, PlaceUpPath, RangeUpPath, UpPath } from "./pathTree.js";
7
- /**
8
- * Delta visitor for the path tree.
9
- *
10
- * For any of these events, the paths are guaranteed to be valid at the time of the event,
11
- * and it is valid to read from the Forest at that path.
12
- */
13
- export interface PathVisitor {
14
- /**
15
- * Invoked after the creation of a range of nodes.
16
- * @param content - The content that was created.
17
- */
18
- afterCreate(content: DetachedRangeUpPath): void;
19
- /**
20
- * Invoked before the attaching of a range of nodes.
21
- * Not invoked for replacements.
22
- * @param source - The content that will be attached.
23
- * @param destination - The location where the content will be attached.
24
- * @param kind - The kind of replacement that will occur.
25
- */
26
- beforeAttach(source: DetachedRangeUpPath, destination: PlaceUpPath): void;
27
- /**
28
- * Invoked after the attaching of a range of nodes.
29
- * Not invoked for replacements.
30
- * @param source - The location where the content originated.
31
- * @param destination - The content that was attached.
32
- * @param kind - The kind of replacement that will occur.
33
- */
34
- afterAttach(source: DetachedPlaceUpPath, destination: RangeUpPath): void;
35
- /**
36
- * Invoked before the detaching of a range of nodes.
37
- * Not invoked for replacements.
38
- * @param source - The content that will be detached.
39
- * @param destination - The location where the content will be sent to.
40
- * @param kind - The kind of replacement that will occur.
41
- */
42
- beforeDetach(source: RangeUpPath, destination: DetachedPlaceUpPath): void;
43
- /**
44
- * Invoked after the detaching of a range of nodes.
45
- * Not invoked for replacements.
46
- * @param source - The content that was detached.
47
- * @param destination - The location where the content will be attached.
48
- * @param kind - The kind of replacement that will occur.
49
- */
50
- afterDetach(source: PlaceUpPath, destination: DetachedRangeUpPath): void;
51
- /**
52
- * Invoked before the replacement of a range of nodes.
53
- *
54
- * Note that the `newContent` range length will always match the `oldContent` range length.
55
- * A replace might actually be separate detaches and attaches which have been coalesced.
56
- *
57
- * @param newContent - The content that will be attached in place of the old.
58
- * @param oldContent - The old that will be replaced.
59
- * @param oldContentDestination - The destination of the old content.
60
- * @param kind - The kind of replacement that will occur.
61
- */
62
- beforeReplace(newContent: DetachedRangeUpPath, oldContent: RangeUpPath, oldContentDestination: DetachedPlaceUpPath): void;
63
- /**
64
- * Invoked after the replacement of a range of nodes.
65
- *
66
- * Note that the `newContent` range length will always match the `oldContent` range length.
67
- * A replace might actually be separate detaches and attaches which have been coalesced.
68
- *
69
- * @param newContentSource - The place that the new content came from.
70
- * @param newContent - The new content.
71
- * @param oldContent - The content that was replaced.
72
- */
73
- afterReplace(newContentSource: DetachedPlaceUpPath, newContent: RangeUpPath, oldContent: DetachedRangeUpPath): void;
74
- /**
75
- * Invoked before content is destroyed.
76
- * @param content - The content that will be destroyed
77
- */
78
- beforeDestroy(content: DetachedRangeUpPath): void;
79
- /**
80
- * A sequence of nodes of length `count` is being removed starting with `path`.
81
- * Called when these nodes are no longer parented under their previous parent, and do not have a new parent.
82
- * It is possible they may be restored in the future (for example by a conflicted merge or undo).
83
- *
84
- * Not called for children of removed nodes.
85
- *
86
- * @param path - first node in the removed range.
87
- * @param count - length of removed range.
88
- *
89
- * @deprecated Migrate to using the other events.
90
- */
91
- onRemove(path: UpPath, count: number): void;
92
- /**
93
- * @param path - location which first node of inserted range will have after insert.
94
- * Any nodes at this index (or after it) will be moved to the right (have their indexes increased by `content.length`).
95
- * @param content - content which is being inserted.
96
- *
97
- * @deprecated Migrate to using the other events.
98
- */
99
- onInsert(path: UpPath, content: ProtoNodes): void;
100
- }
101
- //# sourceMappingURL=visitPath.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"visitPath.d.ts","sourceRoot":"","sources":["../../../src/core/tree/visitPath.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACX,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,MAAM,EACN,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC3B;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAEhD;;;;;;OAMG;IACH,YAAY,CAAC,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAE1E;;;;;;OAMG;IACH,WAAW,CAAC,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAEzE;;;;;;OAMG;IACH,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAE1E;;;;;;OAMG;IACH,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAEzE;;;;;;;;;;OAUG;IACH,aAAa,CACZ,UAAU,EAAE,mBAAmB,EAC/B,UAAU,EAAE,WAAW,EACvB,qBAAqB,EAAE,mBAAmB,GACxC,IAAI,CAAC;IAER;;;;;;;;;OASG;IACH,YAAY,CACX,gBAAgB,EAAE,mBAAmB,EACrC,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,mBAAmB,GAC7B,IAAI,CAAC;IAER;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAElD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;CAClD"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- //# sourceMappingURL=visitPath.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"visitPath.js","sourceRoot":"","sources":["../../../src/core/tree/visitPath.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ProtoNodes } from \"./delta.js\";\nimport type {\n\tDetachedPlaceUpPath,\n\tDetachedRangeUpPath,\n\tPlaceUpPath,\n\tRangeUpPath,\n\tUpPath,\n} from \"./pathTree.js\";\n\n/**\n * Delta visitor for the path tree.\n *\n * For any of these events, the paths are guaranteed to be valid at the time of the event,\n * and it is valid to read from the Forest at that path.\n */\nexport interface PathVisitor {\n\t/**\n\t * Invoked after the creation of a range of nodes.\n\t * @param content - The content that was created.\n\t */\n\tafterCreate(content: DetachedRangeUpPath): void;\n\n\t/**\n\t * Invoked before the attaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that will be attached.\n\t * @param destination - The location where the content will be attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeAttach(source: DetachedRangeUpPath, destination: PlaceUpPath): void;\n\n\t/**\n\t * Invoked after the attaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The location where the content originated.\n\t * @param destination - The content that was attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tafterAttach(source: DetachedPlaceUpPath, destination: RangeUpPath): void;\n\n\t/**\n\t * Invoked before the detaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that will be detached.\n\t * @param destination - The location where the content will be sent to.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeDetach(source: RangeUpPath, destination: DetachedPlaceUpPath): void;\n\n\t/**\n\t * Invoked after the detaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that was detached.\n\t * @param destination - The location where the content will be attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tafterDetach(source: PlaceUpPath, destination: DetachedRangeUpPath): void;\n\n\t/**\n\t * Invoked before the replacement of a range of nodes.\n\t *\n\t * Note that the `newContent` range length will always match the `oldContent` range length.\n\t * A replace might actually be separate detaches and attaches which have been coalesced.\n\t *\n\t * @param newContent - The content that will be attached in place of the old.\n\t * @param oldContent - The old that will be replaced.\n\t * @param oldContentDestination - The destination of the old content.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeReplace(\n\t\tnewContent: DetachedRangeUpPath,\n\t\toldContent: RangeUpPath,\n\t\toldContentDestination: DetachedPlaceUpPath,\n\t): void;\n\n\t/**\n\t * Invoked after the replacement of a range of nodes.\n\t *\n\t * Note that the `newContent` range length will always match the `oldContent` range length.\n\t * A replace might actually be separate detaches and attaches which have been coalesced.\n\t *\n\t * @param newContentSource - The place that the new content came from.\n\t * @param newContent - The new content.\n\t * @param oldContent - The content that was replaced.\n\t */\n\tafterReplace(\n\t\tnewContentSource: DetachedPlaceUpPath,\n\t\tnewContent: RangeUpPath,\n\t\toldContent: DetachedRangeUpPath,\n\t): void;\n\n\t/**\n\t * Invoked before content is destroyed.\n\t * @param content - The content that will be destroyed\n\t */\n\tbeforeDestroy(content: DetachedRangeUpPath): void;\n\n\t/**\n\t * A sequence of nodes of length `count` is being removed starting with `path`.\n\t * Called when these nodes are no longer parented under their previous parent, and do not have a new parent.\n\t * It is possible they may be restored in the future (for example by a conflicted merge or undo).\n\t *\n\t * Not called for children of removed nodes.\n\t *\n\t * @param path - first node in the removed range.\n\t * @param count - length of removed range.\n\t *\n\t * @deprecated Migrate to using the other events.\n\t */\n\tonRemove(path: UpPath, count: number): void;\n\t/**\n\t * @param path - location which first node of inserted range will have after insert.\n\t * Any nodes at this index (or after it) will be moved to the right (have their indexes increased by `content.length`).\n\t * @param content - content which is being inserted.\n\t *\n\t * @deprecated Migrate to using the other events.\n\t */\n\tonInsert(path: UpPath, content: ProtoNodes): void;\n}\n"]}
@@ -1,18 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { IChannelAttributes } from "@fluidframework/datastore-definitions/internal";
6
- /**
7
- * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory."type"}
8
- * @alpha
9
- * @legacy
10
- */
11
- export declare const SharedTreeFactoryType = "https://graph.microsoft.com/types/tree";
12
- /**
13
- * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.attributes}
14
- * @alpha
15
- * @legacy
16
- */
17
- export declare const SharedTreeAttributes: IChannelAttributes;
18
- //# sourceMappingURL=publicContracts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publicContracts.d.ts","sourceRoot":"","sources":["../../src/shared-tree/publicContracts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEzF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,2CAA2C,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,kBAIlC,CAAC"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.SharedTreeAttributes = exports.SharedTreeFactoryType = void 0;
8
- /**
9
- * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory."type"}
10
- * @alpha
11
- * @legacy
12
- */
13
- exports.SharedTreeFactoryType = "https://graph.microsoft.com/types/tree";
14
- /**
15
- * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.attributes}
16
- * @alpha
17
- * @legacy
18
- */
19
- exports.SharedTreeAttributes = {
20
- type: exports.SharedTreeFactoryType,
21
- snapshotFormatVersion: "0.0.0",
22
- packageVersion: "0.0.0",
23
- };
24
- //# sourceMappingURL=publicContracts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publicContracts.js","sourceRoot":"","sources":["../../src/shared-tree/publicContracts.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;;GAIG;AACU,QAAA,qBAAqB,GAAG,wCAAwC,CAAC;AAE9E;;;;GAIG;AACU,QAAA,oBAAoB,GAAuB;IACvD,IAAI,EAAE,6BAAqB;IAC3B,qBAAqB,EAAE,OAAO;IAC9B,cAAc,EAAE,OAAO;CACvB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IChannelAttributes } from \"@fluidframework/datastore-definitions/internal\";\n\n/**\n * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.\"type\"}\n * @alpha\n * @legacy\n */\nexport const SharedTreeFactoryType = \"https://graph.microsoft.com/types/tree\";\n\n/**\n * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.attributes}\n * @alpha\n * @legacy\n */\nexport const SharedTreeAttributes: IChannelAttributes = {\n\ttype: SharedTreeFactoryType,\n\tsnapshotFormatVersion: \"0.0.0\",\n\tpackageVersion: \"0.0.0\",\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionTypes.d.ts","sourceRoot":"","sources":["../../src/shared-tree/transactionTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,QAAQ,eAA4C,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG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,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAC1D"}
@@ -1,101 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { ProtoNodes } from "./delta.js";
6
- import type { DetachedPlaceUpPath, DetachedRangeUpPath, PlaceUpPath, RangeUpPath, UpPath } from "./pathTree.js";
7
- /**
8
- * Delta visitor for the path tree.
9
- *
10
- * For any of these events, the paths are guaranteed to be valid at the time of the event,
11
- * and it is valid to read from the Forest at that path.
12
- */
13
- export interface PathVisitor {
14
- /**
15
- * Invoked after the creation of a range of nodes.
16
- * @param content - The content that was created.
17
- */
18
- afterCreate(content: DetachedRangeUpPath): void;
19
- /**
20
- * Invoked before the attaching of a range of nodes.
21
- * Not invoked for replacements.
22
- * @param source - The content that will be attached.
23
- * @param destination - The location where the content will be attached.
24
- * @param kind - The kind of replacement that will occur.
25
- */
26
- beforeAttach(source: DetachedRangeUpPath, destination: PlaceUpPath): void;
27
- /**
28
- * Invoked after the attaching of a range of nodes.
29
- * Not invoked for replacements.
30
- * @param source - The location where the content originated.
31
- * @param destination - The content that was attached.
32
- * @param kind - The kind of replacement that will occur.
33
- */
34
- afterAttach(source: DetachedPlaceUpPath, destination: RangeUpPath): void;
35
- /**
36
- * Invoked before the detaching of a range of nodes.
37
- * Not invoked for replacements.
38
- * @param source - The content that will be detached.
39
- * @param destination - The location where the content will be sent to.
40
- * @param kind - The kind of replacement that will occur.
41
- */
42
- beforeDetach(source: RangeUpPath, destination: DetachedPlaceUpPath): void;
43
- /**
44
- * Invoked after the detaching of a range of nodes.
45
- * Not invoked for replacements.
46
- * @param source - The content that was detached.
47
- * @param destination - The location where the content will be attached.
48
- * @param kind - The kind of replacement that will occur.
49
- */
50
- afterDetach(source: PlaceUpPath, destination: DetachedRangeUpPath): void;
51
- /**
52
- * Invoked before the replacement of a range of nodes.
53
- *
54
- * Note that the `newContent` range length will always match the `oldContent` range length.
55
- * A replace might actually be separate detaches and attaches which have been coalesced.
56
- *
57
- * @param newContent - The content that will be attached in place of the old.
58
- * @param oldContent - The old that will be replaced.
59
- * @param oldContentDestination - The destination of the old content.
60
- * @param kind - The kind of replacement that will occur.
61
- */
62
- beforeReplace(newContent: DetachedRangeUpPath, oldContent: RangeUpPath, oldContentDestination: DetachedPlaceUpPath): void;
63
- /**
64
- * Invoked after the replacement of a range of nodes.
65
- *
66
- * Note that the `newContent` range length will always match the `oldContent` range length.
67
- * A replace might actually be separate detaches and attaches which have been coalesced.
68
- *
69
- * @param newContentSource - The place that the new content came from.
70
- * @param newContent - The new content.
71
- * @param oldContent - The content that was replaced.
72
- */
73
- afterReplace(newContentSource: DetachedPlaceUpPath, newContent: RangeUpPath, oldContent: DetachedRangeUpPath): void;
74
- /**
75
- * Invoked before content is destroyed.
76
- * @param content - The content that will be destroyed
77
- */
78
- beforeDestroy(content: DetachedRangeUpPath): void;
79
- /**
80
- * A sequence of nodes of length `count` is being removed starting with `path`.
81
- * Called when these nodes are no longer parented under their previous parent, and do not have a new parent.
82
- * It is possible they may be restored in the future (for example by a conflicted merge or undo).
83
- *
84
- * Not called for children of removed nodes.
85
- *
86
- * @param path - first node in the removed range.
87
- * @param count - length of removed range.
88
- *
89
- * @deprecated Migrate to using the other events.
90
- */
91
- onRemove(path: UpPath, count: number): void;
92
- /**
93
- * @param path - location which first node of inserted range will have after insert.
94
- * Any nodes at this index (or after it) will be moved to the right (have their indexes increased by `content.length`).
95
- * @param content - content which is being inserted.
96
- *
97
- * @deprecated Migrate to using the other events.
98
- */
99
- onInsert(path: UpPath, content: ProtoNodes): void;
100
- }
101
- //# sourceMappingURL=visitPath.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"visitPath.d.ts","sourceRoot":"","sources":["../../../src/core/tree/visitPath.ts"],"names":[],"mappings":"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@@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- export {};
6
- //# sourceMappingURL=visitPath.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"visitPath.js","sourceRoot":"","sources":["../../../src/core/tree/visitPath.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ProtoNodes } from \"./delta.js\";\nimport type {\n\tDetachedPlaceUpPath,\n\tDetachedRangeUpPath,\n\tPlaceUpPath,\n\tRangeUpPath,\n\tUpPath,\n} from \"./pathTree.js\";\n\n/**\n * Delta visitor for the path tree.\n *\n * For any of these events, the paths are guaranteed to be valid at the time of the event,\n * and it is valid to read from the Forest at that path.\n */\nexport interface PathVisitor {\n\t/**\n\t * Invoked after the creation of a range of nodes.\n\t * @param content - The content that was created.\n\t */\n\tafterCreate(content: DetachedRangeUpPath): void;\n\n\t/**\n\t * Invoked before the attaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that will be attached.\n\t * @param destination - The location where the content will be attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeAttach(source: DetachedRangeUpPath, destination: PlaceUpPath): void;\n\n\t/**\n\t * Invoked after the attaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The location where the content originated.\n\t * @param destination - The content that was attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tafterAttach(source: DetachedPlaceUpPath, destination: RangeUpPath): void;\n\n\t/**\n\t * Invoked before the detaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that will be detached.\n\t * @param destination - The location where the content will be sent to.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeDetach(source: RangeUpPath, destination: DetachedPlaceUpPath): void;\n\n\t/**\n\t * Invoked after the detaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that was detached.\n\t * @param destination - The location where the content will be attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tafterDetach(source: PlaceUpPath, destination: DetachedRangeUpPath): void;\n\n\t/**\n\t * Invoked before the replacement of a range of nodes.\n\t *\n\t * Note that the `newContent` range length will always match the `oldContent` range length.\n\t * A replace might actually be separate detaches and attaches which have been coalesced.\n\t *\n\t * @param newContent - The content that will be attached in place of the old.\n\t * @param oldContent - The old that will be replaced.\n\t * @param oldContentDestination - The destination of the old content.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeReplace(\n\t\tnewContent: DetachedRangeUpPath,\n\t\toldContent: RangeUpPath,\n\t\toldContentDestination: DetachedPlaceUpPath,\n\t): void;\n\n\t/**\n\t * Invoked after the replacement of a range of nodes.\n\t *\n\t * Note that the `newContent` range length will always match the `oldContent` range length.\n\t * A replace might actually be separate detaches and attaches which have been coalesced.\n\t *\n\t * @param newContentSource - The place that the new content came from.\n\t * @param newContent - The new content.\n\t * @param oldContent - The content that was replaced.\n\t */\n\tafterReplace(\n\t\tnewContentSource: DetachedPlaceUpPath,\n\t\tnewContent: RangeUpPath,\n\t\toldContent: DetachedRangeUpPath,\n\t): void;\n\n\t/**\n\t * Invoked before content is destroyed.\n\t * @param content - The content that will be destroyed\n\t */\n\tbeforeDestroy(content: DetachedRangeUpPath): void;\n\n\t/**\n\t * A sequence of nodes of length `count` is being removed starting with `path`.\n\t * Called when these nodes are no longer parented under their previous parent, and do not have a new parent.\n\t * It is possible they may be restored in the future (for example by a conflicted merge or undo).\n\t *\n\t * Not called for children of removed nodes.\n\t *\n\t * @param path - first node in the removed range.\n\t * @param count - length of removed range.\n\t *\n\t * @deprecated Migrate to using the other events.\n\t */\n\tonRemove(path: UpPath, count: number): void;\n\t/**\n\t * @param path - location which first node of inserted range will have after insert.\n\t * Any nodes at this index (or after it) will be moved to the right (have their indexes increased by `content.length`).\n\t * @param content - content which is being inserted.\n\t *\n\t * @deprecated Migrate to using the other events.\n\t */\n\tonInsert(path: UpPath, content: ProtoNodes): void;\n}\n"]}
@@ -1,18 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { IChannelAttributes } from "@fluidframework/datastore-definitions/internal";
6
- /**
7
- * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory."type"}
8
- * @alpha
9
- * @legacy
10
- */
11
- export declare const SharedTreeFactoryType = "https://graph.microsoft.com/types/tree";
12
- /**
13
- * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.attributes}
14
- * @alpha
15
- * @legacy
16
- */
17
- export declare const SharedTreeAttributes: IChannelAttributes;
18
- //# sourceMappingURL=publicContracts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publicContracts.d.ts","sourceRoot":"","sources":["../../src/shared-tree/publicContracts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEzF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,2CAA2C,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,kBAIlC,CAAC"}
@@ -1,21 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- /**
6
- * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory."type"}
7
- * @alpha
8
- * @legacy
9
- */
10
- export const SharedTreeFactoryType = "https://graph.microsoft.com/types/tree";
11
- /**
12
- * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.attributes}
13
- * @alpha
14
- * @legacy
15
- */
16
- export const SharedTreeAttributes = {
17
- type: SharedTreeFactoryType,
18
- snapshotFormatVersion: "0.0.0",
19
- packageVersion: "0.0.0",
20
- };
21
- //# sourceMappingURL=publicContracts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publicContracts.js","sourceRoot":"","sources":["../../src/shared-tree/publicContracts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,wCAAwC,CAAC;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAuB;IACvD,IAAI,EAAE,qBAAqB;IAC3B,qBAAqB,EAAE,OAAO;IAC9B,cAAc,EAAE,OAAO;CACvB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IChannelAttributes } from \"@fluidframework/datastore-definitions/internal\";\n\n/**\n * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.\"type\"}\n * @alpha\n * @legacy\n */\nexport const SharedTreeFactoryType = \"https://graph.microsoft.com/types/tree\";\n\n/**\n * {@inheritDoc @fluidframework/shared-object-base#ISharedObjectFactory.attributes}\n * @alpha\n * @legacy\n */\nexport const SharedTreeAttributes: IChannelAttributes = {\n\ttype: SharedTreeFactoryType,\n\tsnapshotFormatVersion: \"0.0.0\",\n\tpackageVersion: \"0.0.0\",\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionTypes.d.ts","sourceRoot":"","sources":["../../src/shared-tree/transactionTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,QAAQ,eAA4C,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,MAAM,yBAAyB,CAAC,aAAa,EAAE,aAAa,IAAI,CACnE;IACA,gEAAgE;IAChE,QAAQ,C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