@fluidframework/tree 2.52.0 → 2.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/.eslintrc.cjs +14 -2
  2. package/CHANGELOG.md +125 -0
  3. package/api-report/tree.alpha.api.md +48 -41
  4. package/dist/alpha.d.ts +2 -1
  5. package/dist/core/tree/visitDelta.d.ts +1 -1
  6. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  7. package/dist/core/tree/visitDelta.js.map +1 -1
  8. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -0
  9. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  10. package/dist/feature-libraries/chunked-forest/index.js +3 -1
  11. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  12. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +2 -4
  13. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  14. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +3 -0
  15. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  16. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  17. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +1 -0
  18. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  19. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts +1 -1
  20. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  21. package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  22. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +4 -0
  23. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  24. package/dist/feature-libraries/forest-summary/forestSummarizer.js +5 -5
  25. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  26. package/dist/feature-libraries/index.d.ts +1 -1
  27. package/dist/feature-libraries/index.d.ts.map +1 -1
  28. package/dist/feature-libraries/index.js +4 -2
  29. package/dist/feature-libraries/index.js.map +1 -1
  30. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -0
  31. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  32. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js +1 -0
  33. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  34. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  35. package/dist/feature-libraries/modular-schema/genericFieldKind.js +1 -0
  36. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  37. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -0
  38. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  39. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -1
  40. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  41. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +49 -20
  42. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  43. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  44. package/dist/feature-libraries/optional-field/optionalField.js +3 -0
  45. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  46. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +1 -0
  47. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
  48. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +4 -0
  49. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
  50. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  51. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  52. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  53. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +1 -1
  54. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  55. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  56. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  57. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  58. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  59. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  60. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  61. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  62. package/dist/feature-libraries/sequence-field/types.d.ts +1 -1
  63. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  64. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +3 -2
  68. package/dist/index.js.map +1 -1
  69. package/dist/jsonDomainSchema.d.ts +5 -3
  70. package/dist/jsonDomainSchema.d.ts.map +1 -1
  71. package/dist/jsonDomainSchema.js.map +1 -1
  72. package/dist/packageVersion.d.ts +1 -1
  73. package/dist/packageVersion.js +1 -1
  74. package/dist/packageVersion.js.map +1 -1
  75. package/dist/shared-tree/independentView.d.ts.map +1 -1
  76. package/dist/shared-tree/independentView.js +1 -1
  77. package/dist/shared-tree/independentView.js.map +1 -1
  78. package/dist/shared-tree/index.d.ts +0 -1
  79. package/dist/shared-tree/index.d.ts.map +1 -1
  80. package/dist/shared-tree/index.js.map +1 -1
  81. package/dist/shared-tree/schematizeTree.d.ts +23 -60
  82. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  83. package/dist/shared-tree/schematizeTree.js +59 -151
  84. package/dist/shared-tree/schematizeTree.js.map +1 -1
  85. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  86. package/dist/shared-tree/schematizingTreeView.js +11 -11
  87. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  88. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  89. package/dist/shared-tree/treeAlpha.js +9 -3
  90. package/dist/shared-tree/treeAlpha.js.map +1 -1
  91. package/dist/shared-tree-core/defaultResubmitMachine.d.ts +2 -1
  92. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  93. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  94. package/dist/simple-tree/api/configuration.d.ts +3 -0
  95. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  96. package/dist/simple-tree/api/configuration.js +5 -1
  97. package/dist/simple-tree/api/configuration.js.map +1 -1
  98. package/dist/simple-tree/api/create.d.ts +4 -4
  99. package/dist/simple-tree/api/create.d.ts.map +1 -1
  100. package/dist/simple-tree/api/create.js +3 -6
  101. package/dist/simple-tree/api/create.js.map +1 -1
  102. package/dist/simple-tree/api/discrepancies.d.ts +5 -9
  103. package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
  104. package/dist/simple-tree/api/discrepancies.js +11 -10
  105. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  106. package/dist/simple-tree/api/index.d.ts +3 -2
  107. package/dist/simple-tree/api/index.d.ts.map +1 -1
  108. package/dist/simple-tree/api/index.js +3 -2
  109. package/dist/simple-tree/api/index.js.map +1 -1
  110. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  111. package/dist/simple-tree/api/schemaCompatibilityTester.js +3 -4
  112. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  113. package/dist/simple-tree/api/schemaFactory.d.ts +9 -155
  114. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  115. package/dist/simple-tree/api/schemaFactory.js +4 -47
  116. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  117. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +157 -16
  118. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  119. package/dist/simple-tree/api/schemaFactoryAlpha.js +33 -11
  120. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  121. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -3
  122. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  123. package/dist/simple-tree/api/schemaFactoryRecursive.js +1 -7
  124. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  125. package/dist/simple-tree/api/schemaStatics.d.ts +158 -0
  126. package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -0
  127. package/dist/simple-tree/api/schemaStatics.js +59 -0
  128. package/dist/simple-tree/api/schemaStatics.js.map +1 -0
  129. package/dist/simple-tree/api/storedSchema.d.ts +5 -3
  130. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  131. package/dist/simple-tree/api/storedSchema.js +4 -2
  132. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  133. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  134. package/dist/simple-tree/api/treeBeta.js +12 -6
  135. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  136. package/dist/simple-tree/core/allowedTypes.d.ts +46 -30
  137. package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
  138. package/dist/simple-tree/core/allowedTypes.js +20 -12
  139. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  140. package/dist/simple-tree/core/index.d.ts +5 -3
  141. package/dist/simple-tree/core/index.d.ts.map +1 -1
  142. package/dist/simple-tree/core/index.js +6 -1
  143. package/dist/simple-tree/core/index.js.map +1 -1
  144. package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts +25 -0
  145. package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -0
  146. package/dist/simple-tree/core/simpleNodeSchemaBase.js +7 -0
  147. package/dist/simple-tree/core/simpleNodeSchemaBase.js.map +1 -0
  148. package/dist/simple-tree/core/toStored.d.ts +32 -0
  149. package/dist/simple-tree/core/toStored.d.ts.map +1 -0
  150. package/dist/simple-tree/core/toStored.js +37 -0
  151. package/dist/simple-tree/core/toStored.js.map +1 -0
  152. package/dist/simple-tree/core/treeNode.d.ts +0 -3
  153. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  154. package/dist/simple-tree/core/treeNode.js +3 -3
  155. package/dist/simple-tree/core/treeNode.js.map +1 -1
  156. package/dist/simple-tree/core/treeNodeSchema.d.ts +7 -2
  157. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  158. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  159. package/dist/simple-tree/core/treeNodeValid.d.ts +6 -1
  160. package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  161. package/dist/simple-tree/core/treeNodeValid.js +11 -6
  162. package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
  163. package/dist/simple-tree/core/walkSchema.d.ts +19 -5
  164. package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
  165. package/dist/simple-tree/core/walkSchema.js +4 -2
  166. package/dist/simple-tree/core/walkSchema.js.map +1 -1
  167. package/dist/simple-tree/createContext.d.ts.map +1 -1
  168. package/dist/simple-tree/createContext.js +1 -1
  169. package/dist/simple-tree/createContext.js.map +1 -1
  170. package/dist/simple-tree/fieldSchema.d.ts +2 -1
  171. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  172. package/dist/simple-tree/fieldSchema.js +1 -1
  173. package/dist/simple-tree/fieldSchema.js.map +1 -1
  174. package/dist/simple-tree/index.d.ts +4 -4
  175. package/dist/simple-tree/index.d.ts.map +1 -1
  176. package/dist/simple-tree/index.js +9 -2
  177. package/dist/simple-tree/index.js.map +1 -1
  178. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  179. package/dist/simple-tree/leafNodeSchema.js +1 -0
  180. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  181. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  182. package/dist/simple-tree/node-kinds/array/arrayNode.js +18 -4
  183. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  184. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  185. package/dist/simple-tree/node-kinds/map/mapNode.js +9 -2
  186. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  187. package/dist/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
  188. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  189. package/dist/simple-tree/node-kinds/object/objectNode.js +37 -26
  190. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  191. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  192. package/dist/simple-tree/node-kinds/record/recordNode.js +9 -2
  193. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  194. package/dist/simple-tree/prepareForInsertion.d.ts +5 -5
  195. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  196. package/dist/simple-tree/prepareForInsertion.js +10 -10
  197. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  198. package/dist/simple-tree/simpleSchema.d.ts +6 -21
  199. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  200. package/dist/simple-tree/simpleSchema.js.map +1 -1
  201. package/dist/simple-tree/toStoredSchema.d.ts +35 -11
  202. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  203. package/dist/simple-tree/toStoredSchema.js +68 -33
  204. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  205. package/dist/tableSchema.d.ts +25 -32
  206. package/dist/tableSchema.d.ts.map +1 -1
  207. package/dist/tableSchema.js +10 -24
  208. package/dist/tableSchema.js.map +1 -1
  209. package/docs/.attachments/cell-ordering/C-knows-of-ABC.png +0 -0
  210. package/docs/.attachments/cell-ordering/C-knows-of-C.png +0 -0
  211. package/docs/.attachments/cell-ordering/XvsA.png +0 -0
  212. package/docs/.attachments/cell-ordering/compose-a-b.png +0 -0
  213. package/docs/.attachments/cell-ordering/compose-a-ref-p1-b-ref-p2.png +0 -0
  214. package/docs/.attachments/cell-ordering/compose-b-no-ref-to-ca.png +0 -0
  215. package/docs/.attachments/cell-ordering/rebase-ab-over-x.png +0 -0
  216. package/docs/.attachments/cell-ordering/rebase-b-over-x.png +0 -0
  217. package/docs/.attachments/cell-ordering/rebase-b2-over-x.png +0 -0
  218. package/docs/.attachments/cell-ordering/rebase-b2.png +0 -0
  219. package/docs/.attachments/cell-ordering/rebase-to-abprime.png +0 -0
  220. package/docs/.attachments/cell-ordering/rebase-to-bprime.png +0 -0
  221. package/docs/main/cell-ordering.md +638 -0
  222. package/lib/alpha.d.ts +2 -1
  223. package/lib/core/tree/visitDelta.d.ts +1 -1
  224. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  225. package/lib/core/tree/visitDelta.js.map +1 -1
  226. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -0
  227. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  228. package/lib/feature-libraries/chunked-forest/index.js +1 -0
  229. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  230. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +2 -4
  231. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  232. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +4 -1
  233. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  234. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  235. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -0
  236. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  237. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts +1 -1
  238. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  239. package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  240. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +4 -0
  241. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  242. package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -1
  243. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  244. package/lib/feature-libraries/index.d.ts +1 -1
  245. package/lib/feature-libraries/index.d.ts.map +1 -1
  246. package/lib/feature-libraries/index.js +1 -1
  247. package/lib/feature-libraries/index.js.map +1 -1
  248. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -0
  249. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  250. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js +1 -0
  251. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  252. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  253. package/lib/feature-libraries/modular-schema/genericFieldKind.js +1 -0
  254. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  255. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -0
  256. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  257. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -1
  258. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  259. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +50 -21
  260. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  261. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  262. package/lib/feature-libraries/optional-field/optionalField.js +3 -0
  263. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  264. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +1 -0
  265. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
  266. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +4 -0
  267. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
  268. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  269. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  270. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  271. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  272. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +1 -1
  273. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  274. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  275. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  276. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  277. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  278. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +1 -1
  279. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  280. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  281. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  282. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  283. package/lib/feature-libraries/sequence-field/types.d.ts +1 -1
  284. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  285. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  286. package/lib/index.d.ts +1 -1
  287. package/lib/index.d.ts.map +1 -1
  288. package/lib/index.js +1 -1
  289. package/lib/index.js.map +1 -1
  290. package/lib/jsonDomainSchema.d.ts +5 -3
  291. package/lib/jsonDomainSchema.d.ts.map +1 -1
  292. package/lib/jsonDomainSchema.js.map +1 -1
  293. package/lib/packageVersion.d.ts +1 -1
  294. package/lib/packageVersion.js +1 -1
  295. package/lib/packageVersion.js.map +1 -1
  296. package/lib/shared-tree/independentView.d.ts.map +1 -1
  297. package/lib/shared-tree/independentView.js +2 -2
  298. package/lib/shared-tree/independentView.js.map +1 -1
  299. package/lib/shared-tree/index.d.ts +0 -1
  300. package/lib/shared-tree/index.d.ts.map +1 -1
  301. package/lib/shared-tree/index.js.map +1 -1
  302. package/lib/shared-tree/schematizeTree.d.ts +23 -60
  303. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  304. package/lib/shared-tree/schematizeTree.js +60 -150
  305. package/lib/shared-tree/schematizeTree.js.map +1 -1
  306. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  307. package/lib/shared-tree/schematizingTreeView.js +14 -14
  308. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  309. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  310. package/lib/shared-tree/treeAlpha.js +10 -4
  311. package/lib/shared-tree/treeAlpha.js.map +1 -1
  312. package/lib/shared-tree-core/defaultResubmitMachine.d.ts +2 -1
  313. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  314. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  315. package/lib/simple-tree/api/configuration.d.ts +3 -0
  316. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  317. package/lib/simple-tree/api/configuration.js +6 -2
  318. package/lib/simple-tree/api/configuration.js.map +1 -1
  319. package/lib/simple-tree/api/create.d.ts +4 -4
  320. package/lib/simple-tree/api/create.d.ts.map +1 -1
  321. package/lib/simple-tree/api/create.js +3 -6
  322. package/lib/simple-tree/api/create.js.map +1 -1
  323. package/lib/simple-tree/api/discrepancies.d.ts +5 -9
  324. package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
  325. package/lib/simple-tree/api/discrepancies.js +11 -10
  326. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  327. package/lib/simple-tree/api/index.d.ts +3 -2
  328. package/lib/simple-tree/api/index.d.ts.map +1 -1
  329. package/lib/simple-tree/api/index.js +2 -1
  330. package/lib/simple-tree/api/index.js.map +1 -1
  331. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  332. package/lib/simple-tree/api/schemaCompatibilityTester.js +4 -5
  333. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  334. package/lib/simple-tree/api/schemaFactory.d.ts +9 -155
  335. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  336. package/lib/simple-tree/api/schemaFactory.js +2 -45
  337. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  338. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +157 -16
  339. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  340. package/lib/simple-tree/api/schemaFactoryAlpha.js +23 -1
  341. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  342. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -3
  343. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  344. package/lib/simple-tree/api/schemaFactoryRecursive.js +0 -5
  345. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  346. package/lib/simple-tree/api/schemaStatics.d.ts +158 -0
  347. package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -0
  348. package/lib/simple-tree/api/schemaStatics.js +56 -0
  349. package/lib/simple-tree/api/schemaStatics.js.map +1 -0
  350. package/lib/simple-tree/api/storedSchema.d.ts +5 -3
  351. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  352. package/lib/simple-tree/api/storedSchema.js +6 -4
  353. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  354. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  355. package/lib/simple-tree/api/treeBeta.js +8 -2
  356. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  357. package/lib/simple-tree/core/allowedTypes.d.ts +46 -30
  358. package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
  359. package/lib/simple-tree/core/allowedTypes.js +23 -12
  360. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  361. package/lib/simple-tree/core/index.d.ts +5 -3
  362. package/lib/simple-tree/core/index.d.ts.map +1 -1
  363. package/lib/simple-tree/core/index.js +3 -2
  364. package/lib/simple-tree/core/index.js.map +1 -1
  365. package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts +25 -0
  366. package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -0
  367. package/lib/simple-tree/core/simpleNodeSchemaBase.js +6 -0
  368. package/lib/simple-tree/core/simpleNodeSchemaBase.js.map +1 -0
  369. package/lib/simple-tree/core/toStored.d.ts +32 -0
  370. package/lib/simple-tree/core/toStored.d.ts.map +1 -0
  371. package/lib/simple-tree/core/toStored.js +32 -0
  372. package/lib/simple-tree/core/toStored.js.map +1 -0
  373. package/lib/simple-tree/core/treeNode.d.ts +0 -3
  374. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  375. package/lib/simple-tree/core/treeNode.js +3 -3
  376. package/lib/simple-tree/core/treeNode.js.map +1 -1
  377. package/lib/simple-tree/core/treeNodeSchema.d.ts +7 -2
  378. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  379. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  380. package/lib/simple-tree/core/treeNodeValid.d.ts +6 -1
  381. package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  382. package/lib/simple-tree/core/treeNodeValid.js +9 -5
  383. package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
  384. package/lib/simple-tree/core/walkSchema.d.ts +19 -5
  385. package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
  386. package/lib/simple-tree/core/walkSchema.js +4 -2
  387. package/lib/simple-tree/core/walkSchema.js.map +1 -1
  388. package/lib/simple-tree/createContext.d.ts.map +1 -1
  389. package/lib/simple-tree/createContext.js +2 -2
  390. package/lib/simple-tree/createContext.js.map +1 -1
  391. package/lib/simple-tree/fieldSchema.d.ts +2 -1
  392. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  393. package/lib/simple-tree/fieldSchema.js +1 -1
  394. package/lib/simple-tree/fieldSchema.js.map +1 -1
  395. package/lib/simple-tree/index.d.ts +4 -4
  396. package/lib/simple-tree/index.d.ts.map +1 -1
  397. package/lib/simple-tree/index.js +2 -2
  398. package/lib/simple-tree/index.js.map +1 -1
  399. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  400. package/lib/simple-tree/leafNodeSchema.js +2 -1
  401. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  402. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  403. package/lib/simple-tree/node-kinds/array/arrayNode.js +21 -7
  404. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  405. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  406. package/lib/simple-tree/node-kinds/map/mapNode.js +12 -5
  407. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  408. package/lib/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
  409. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  410. package/lib/simple-tree/node-kinds/object/objectNode.js +16 -5
  411. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  412. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  413. package/lib/simple-tree/node-kinds/record/recordNode.js +12 -5
  414. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  415. package/lib/simple-tree/prepareForInsertion.d.ts +5 -5
  416. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  417. package/lib/simple-tree/prepareForInsertion.js +10 -10
  418. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  419. package/lib/simple-tree/simpleSchema.d.ts +6 -21
  420. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  421. package/lib/simple-tree/simpleSchema.js.map +1 -1
  422. package/lib/simple-tree/toStoredSchema.d.ts +35 -11
  423. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  424. package/lib/simple-tree/toStoredSchema.js +67 -34
  425. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  426. package/lib/tableSchema.d.ts +25 -32
  427. package/lib/tableSchema.d.ts.map +1 -1
  428. package/lib/tableSchema.js +11 -25
  429. package/lib/tableSchema.js.map +1 -1
  430. package/package.json +21 -21
  431. package/src/core/tree/visitDelta.ts +3 -1
  432. package/src/feature-libraries/chunked-forest/index.ts +1 -0
  433. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +12 -5
  434. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -0
  435. package/src/feature-libraries/default-schema/noChangeCodecs.ts +1 -1
  436. package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
  437. package/src/feature-libraries/index.ts +2 -0
  438. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +9 -0
  439. package/src/feature-libraries/modular-schema/genericFieldKind.ts +1 -0
  440. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +1 -0
  441. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +61 -19
  442. package/src/feature-libraries/optional-field/optionalField.ts +4 -0
  443. package/src/feature-libraries/sequence-field/sequenceFieldChangeRebaser.ts +4 -0
  444. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +4 -2
  445. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +4 -2
  446. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +4 -2
  447. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +1 -1
  448. package/src/feature-libraries/sequence-field/types.ts +1 -1
  449. package/src/index.ts +2 -1
  450. package/src/jsonDomainSchema.ts +4 -0
  451. package/src/packageVersion.ts +1 -1
  452. package/src/shared-tree/independentView.ts +6 -2
  453. package/src/shared-tree/index.ts +0 -2
  454. package/src/shared-tree/schematizeTree.ts +83 -199
  455. package/src/shared-tree/schematizingTreeView.ts +26 -12
  456. package/src/shared-tree/treeAlpha.ts +18 -4
  457. package/src/shared-tree-core/defaultResubmitMachine.ts +2 -1
  458. package/src/simple-tree/api/configuration.ts +10 -2
  459. package/src/simple-tree/api/create.ts +5 -10
  460. package/src/simple-tree/api/discrepancies.ts +18 -17
  461. package/src/simple-tree/api/index.ts +2 -3
  462. package/src/simple-tree/api/schemaCompatibilityTester.ts +5 -9
  463. package/src/simple-tree/api/schemaFactory.ts +6 -250
  464. package/src/simple-tree/api/schemaFactoryAlpha.ts +174 -1
  465. package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -25
  466. package/src/simple-tree/api/schemaStatics.ts +291 -0
  467. package/src/simple-tree/api/storedSchema.ts +12 -5
  468. package/src/simple-tree/api/treeBeta.ts +9 -2
  469. package/src/simple-tree/core/allowedTypes.ts +71 -42
  470. package/src/simple-tree/core/index.ts +9 -1
  471. package/src/simple-tree/core/simpleNodeSchemaBase.ts +30 -0
  472. package/src/simple-tree/core/toStored.ts +58 -0
  473. package/src/simple-tree/core/treeNode.ts +3 -3
  474. package/src/simple-tree/core/treeNodeSchema.ts +8 -2
  475. package/src/simple-tree/core/treeNodeValid.ts +14 -5
  476. package/src/simple-tree/core/walkSchema.ts +23 -6
  477. package/src/simple-tree/createContext.ts +5 -2
  478. package/src/simple-tree/fieldSchema.ts +4 -2
  479. package/src/simple-tree/index.ts +15 -6
  480. package/src/simple-tree/leafNodeSchema.ts +2 -1
  481. package/src/simple-tree/node-kinds/array/arrayNode.ts +58 -37
  482. package/src/simple-tree/node-kinds/map/mapNode.ts +26 -2
  483. package/src/simple-tree/node-kinds/object/objectNode.ts +37 -4
  484. package/src/simple-tree/node-kinds/record/recordNode.ts +23 -2
  485. package/src/simple-tree/prepareForInsertion.ts +12 -7
  486. package/src/simple-tree/simpleSchema.ts +6 -26
  487. package/src/simple-tree/toStoredSchema.ts +107 -44
  488. package/src/tableSchema.ts +40 -35
@@ -1 +1 @@
1
- {"version":3,"file":"sequenceFieldCodecV3.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,4BAA4B,EAAmB,MAAM,sBAAsB,CAAC;AAQrF,OAAO,EAAE,oBA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,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;gBAC3E,CAAC;gBACD,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;oBAChC,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACxD,CAAC;gBACD,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACzB,CAAC;YACD,OAAO,KAAK,CAAC;QACd,CAAC;QACD,aAAa,EAAE,eAAe,CAAC,oBAAoB,CAAC;KACpD,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport { DiscriminatedUnionDispatcher, type IJsonCodec } from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport type { FieldChangeEncodingContext } from \"../index.js\";\nimport { EncodedNodeChangeset } from \"../modular-schema/index.js\";\n\nimport { Changeset as ChangesetSchema, type Encoded } from \"./formatV3.js\";\nimport { makeV2CodecHelpers } from \"./sequenceFieldCodecV2.js\";\nimport type { Changeset, Mark, MarkEffect, Rename } from \"./types.js\";\nimport { isNoopMark } from \"./utils.js\";\n\nexport function makeV3Codec(\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n): IJsonCodec<\n\tChangeset,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tFieldChangeEncodingContext\n> {\n\tconst {\n\t\tchangeAtomIdCodec: atomIdCodec,\n\t\tmarkEffectCodec: markEffectV2Codec,\n\t\tdecoderLibrary: decoderLibraryV2,\n\t} = makeV2CodecHelpers(revisionTagCodec);\n\n\tconst markEffectCodec: IJsonCodec<\n\t\tMarkEffect,\n\t\tEncoded.MarkEffect,\n\t\tEncoded.MarkEffect,\n\t\tChangeEncodingContext\n\t> = {\n\t\tencode(effect: MarkEffect, context: ChangeEncodingContext): Encoded.MarkEffect {\n\t\t\tconst type = effect.type;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"Rename\":\n\t\t\t\t\treturn {\n\t\t\t\t\t\trename: {\n\t\t\t\t\t\t\tidOverride: atomIdCodec.encode(effect.idOverride, context),\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\treturn markEffectV2Codec.encode(effect, context);\n\t\t\t}\n\t\t},\n\t\tdecode(encoded: Encoded.MarkEffect, context: ChangeEncodingContext): MarkEffect {\n\t\t\treturn decoderLibrary.dispatch(encoded, context);\n\t\t},\n\t};\n\n\tconst decoderLibrary = new DiscriminatedUnionDispatcher<\n\t\tEncoded.MarkEffect,\n\t\t/* args */ [context: ChangeEncodingContext],\n\t\tMarkEffect\n\t>({\n\t\t...decoderLibraryV2,\n\t\trename(encoded: Encoded.Rename, context: ChangeEncodingContext): Rename {\n\t\t\treturn {\n\t\t\t\ttype: \"Rename\",\n\t\t\t\tidOverride: atomIdCodec.decode(encoded.idOverride, context),\n\t\t\t};\n\t\t},\n\t});\n\n\t/**\n\t * If we want to make the node change aspect of this codec more type-safe, we could adjust generics\n\t * to be in terms of the schema rather than the concrete type of the node change.\n\t */\n\ttype NodeChangeSchema = TAnySchema;\n\n\treturn {\n\t\tencode: (\n\t\t\tchangeset: Changeset,\n\t\t\tcontext: FieldChangeEncodingContext,\n\t\t): JsonCompatibleReadOnly & Encoded.Changeset<NodeChangeSchema> => {\n\t\t\tconst jsonMarks: Encoded.Changeset<NodeChangeSchema> = [];\n\t\t\tfor (const mark of changeset) {\n\t\t\t\tconst encodedMark: Encoded.Mark<NodeChangeSchema> = {\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t};\n\t\t\t\tif (!isNoopMark(mark)) {\n\t\t\t\t\tencodedMark.effect = markEffectCodec.encode(mark, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.cellId !== undefined) {\n\t\t\t\t\tencodedMark.cellId = atomIdCodec.encode(mark.cellId, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.changes !== undefined) {\n\t\t\t\t\tencodedMark.changes = context.encodeNode(mark.changes);\n\t\t\t\t}\n\t\t\t\tjsonMarks.push(encodedMark);\n\t\t\t}\n\t\t\treturn jsonMarks;\n\t\t},\n\t\tdecode: (\n\t\t\tchangeset: Encoded.Changeset<NodeChangeSchema>,\n\t\t\tcontext: FieldChangeEncodingContext,\n\t\t): Changeset => {\n\t\t\tconst marks: Changeset = [];\n\t\t\tfor (const mark of changeset) {\n\t\t\t\tconst decodedMark: Mark = {\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t};\n\n\t\t\t\tif (mark.effect !== undefined) {\n\t\t\t\t\tObject.assign(decodedMark, markEffectCodec.decode(mark.effect, context.baseContext));\n\t\t\t\t}\n\t\t\t\tif (mark.cellId !== undefined) {\n\t\t\t\t\tdecodedMark.cellId = atomIdCodec.decode(mark.cellId, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.changes !== undefined) {\n\t\t\t\t\tdecodedMark.changes = context.decodeNode(mark.changes);\n\t\t\t\t}\n\t\t\t\tmarks.push(decodedMark);\n\t\t\t}\n\t\t\treturn marks;\n\t\t},\n\t\tencodedSchema: ChangesetSchema(EncodedNodeChangeset),\n\t};\n}\n"]}
1
+ {"version":3,"file":"sequenceFieldCodecV3.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,4BAA4B,EAAmB,MAAM,sBAAsB,CAAC;AAOrF,OAAO,EACN,oBAAoB,GAEpB,MAAM,4BAA4B,CAAC;AAEpC,OAA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I,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;gBAC3E,CAAC;gBACD,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;oBAChC,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACxD,CAAC;gBACD,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACzB,CAAC;YACD,OAAO,KAAK,CAAC;QACd,CAAC;QACD,aAAa,EAAE,eAAe,CAAC,oBAAoB,CAAC;KACpD,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport { DiscriminatedUnionDispatcher, type IJsonCodec } from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport {\n\tEncodedNodeChangeset,\n\ttype FieldChangeEncodingContext,\n} from \"../modular-schema/index.js\";\n\nimport { Changeset as ChangesetSchema, type Encoded } from \"./formatV3.js\";\nimport { makeV2CodecHelpers } from \"./sequenceFieldCodecV2.js\";\nimport type { Changeset, Mark, MarkEffect, Rename } from \"./types.js\";\nimport { isNoopMark } from \"./utils.js\";\n\nexport function makeV3Codec(\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n): IJsonCodec<\n\tChangeset,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tFieldChangeEncodingContext\n> {\n\tconst {\n\t\tchangeAtomIdCodec: atomIdCodec,\n\t\tmarkEffectCodec: markEffectV2Codec,\n\t\tdecoderLibrary: decoderLibraryV2,\n\t} = makeV2CodecHelpers(revisionTagCodec);\n\n\tconst markEffectCodec: IJsonCodec<\n\t\tMarkEffect,\n\t\tEncoded.MarkEffect,\n\t\tEncoded.MarkEffect,\n\t\tChangeEncodingContext\n\t> = {\n\t\tencode(effect: MarkEffect, context: ChangeEncodingContext): Encoded.MarkEffect {\n\t\t\tconst type = effect.type;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"Rename\":\n\t\t\t\t\treturn {\n\t\t\t\t\t\trename: {\n\t\t\t\t\t\t\tidOverride: atomIdCodec.encode(effect.idOverride, context),\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\treturn markEffectV2Codec.encode(effect, context);\n\t\t\t}\n\t\t},\n\t\tdecode(encoded: Encoded.MarkEffect, context: ChangeEncodingContext): MarkEffect {\n\t\t\treturn decoderLibrary.dispatch(encoded, context);\n\t\t},\n\t};\n\n\tconst decoderLibrary = new DiscriminatedUnionDispatcher<\n\t\tEncoded.MarkEffect,\n\t\t/* args */ [context: ChangeEncodingContext],\n\t\tMarkEffect\n\t>({\n\t\t...decoderLibraryV2,\n\t\trename(encoded: Encoded.Rename, context: ChangeEncodingContext): Rename {\n\t\t\treturn {\n\t\t\t\ttype: \"Rename\",\n\t\t\t\tidOverride: atomIdCodec.decode(encoded.idOverride, context),\n\t\t\t};\n\t\t},\n\t});\n\n\t/**\n\t * If we want to make the node change aspect of this codec more type-safe, we could adjust generics\n\t * to be in terms of the schema rather than the concrete type of the node change.\n\t */\n\ttype NodeChangeSchema = TAnySchema;\n\n\treturn {\n\t\tencode: (\n\t\t\tchangeset: Changeset,\n\t\t\tcontext: FieldChangeEncodingContext,\n\t\t): JsonCompatibleReadOnly & Encoded.Changeset<NodeChangeSchema> => {\n\t\t\tconst jsonMarks: Encoded.Changeset<NodeChangeSchema> = [];\n\t\t\tfor (const mark of changeset) {\n\t\t\t\tconst encodedMark: Encoded.Mark<NodeChangeSchema> = {\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t};\n\t\t\t\tif (!isNoopMark(mark)) {\n\t\t\t\t\tencodedMark.effect = markEffectCodec.encode(mark, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.cellId !== undefined) {\n\t\t\t\t\tencodedMark.cellId = atomIdCodec.encode(mark.cellId, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.changes !== undefined) {\n\t\t\t\t\tencodedMark.changes = context.encodeNode(mark.changes);\n\t\t\t\t}\n\t\t\t\tjsonMarks.push(encodedMark);\n\t\t\t}\n\t\t\treturn jsonMarks;\n\t\t},\n\t\tdecode: (\n\t\t\tchangeset: Encoded.Changeset<NodeChangeSchema>,\n\t\t\tcontext: FieldChangeEncodingContext,\n\t\t): Changeset => {\n\t\t\tconst marks: Changeset = [];\n\t\t\tfor (const mark of changeset) {\n\t\t\t\tconst decodedMark: Mark = {\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t};\n\n\t\t\t\tif (mark.effect !== undefined) {\n\t\t\t\t\tObject.assign(decodedMark, markEffectCodec.decode(mark.effect, context.baseContext));\n\t\t\t\t}\n\t\t\t\tif (mark.cellId !== undefined) {\n\t\t\t\t\tdecodedMark.cellId = atomIdCodec.decode(mark.cellId, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.changes !== undefined) {\n\t\t\t\t\tdecodedMark.changes = context.decodeNode(mark.changes);\n\t\t\t\t}\n\t\t\t\tmarks.push(decodedMark);\n\t\t\t}\n\t\t\treturn marks;\n\t\t},\n\t\tencodedSchema: ChangesetSchema(EncodedNodeChangeset),\n\t};\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type IJsonCodec, type ICodecFamily } from "../../codec/index.js";
6
6
  import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag } from "../../core/index.js";
7
- import type { FieldChangeEncodingContext } from "../index.js";
7
+ import type { FieldChangeEncodingContext } from "../modular-schema/index.js";
8
8
  import type { MarkList } from "./types.js";
9
9
  export declare const sequenceFieldChangeCodecFactory: (revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>) => ICodecFamily<MarkList, FieldChangeEncodingContext>;
10
10
  //# sourceMappingURL=sequenceFieldCodecs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sequenceFieldCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAmB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAK9D,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtD,eAAO,MAAM,+BAA+B,qBACzB,WACjB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,KACC,aAAa,QAAQ,EAAE,0BAA0B,CAKjD,CAAC"}
1
+ {"version":3,"file":"sequenceFieldCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAmB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAK7E,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtD,eAAO,MAAM,+BAA+B,qBACzB,WACjB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,KACC,aAAa,QAAQ,EAAE,0BAA0B,CAKjD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sequenceFieldCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmB,eAAe,EAAqB,MAAM,sBAAsB,CAAC;AAQ3F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC9C,gBAKC,EACoD,EAAE,CACvD,eAAe,CAAwC;IACtD,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAClC,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAClC,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;CAClC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IJsonCodec, makeCodecFamily, type ICodecFamily } from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport type { FieldChangeEncodingContext } from \"../index.js\";\n\nimport { makeV1Codec } from \"./sequenceFieldCodecV1.js\";\nimport { makeV2Codec } from \"./sequenceFieldCodecV2.js\";\nimport { makeV3Codec } from \"./sequenceFieldCodecV3.js\";\nimport type { Changeset, MarkList } from \"./types.js\";\n\nexport const sequenceFieldChangeCodecFactory = (\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n): ICodecFamily<MarkList, FieldChangeEncodingContext> =>\n\tmakeCodecFamily<Changeset, FieldChangeEncodingContext>([\n\t\t[1, makeV1Codec(revisionTagCodec)],\n\t\t[2, makeV2Codec(revisionTagCodec)],\n\t\t[3, makeV3Codec(revisionTagCodec)],\n\t]);\n"]}
1
+ {"version":3,"file":"sequenceFieldCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmB,eAAe,EAAqB,MAAM,sBAAsB,CAAC;AAQ3F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC9C,gBAKC,EACoD,EAAE,CACvD,eAAe,CAAwC;IACtD,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAClC,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAClC,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;CAClC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IJsonCodec, makeCodecFamily, type ICodecFamily } from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport type { FieldChangeEncodingContext } from \"../modular-schema/index.js\";\n\nimport { makeV1Codec } from \"./sequenceFieldCodecV1.js\";\nimport { makeV2Codec } from \"./sequenceFieldCodecV2.js\";\nimport { makeV3Codec } from \"./sequenceFieldCodecV3.js\";\nimport type { Changeset, MarkList } from \"./types.js\";\n\nexport const sequenceFieldChangeCodecFactory = (\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n): ICodecFamily<MarkList, FieldChangeEncodingContext> =>\n\tmakeCodecFamily<Changeset, FieldChangeEncodingContext>([\n\t\t[1, makeV1Codec(revisionTagCodec)],\n\t\t[2, makeV2Codec(revisionTagCodec)],\n\t\t[3, makeV3Codec(revisionTagCodec)],\n\t]);\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { ChangeAtomId, ChangesetLocalId, RevisionTag } from "../../core/index.js";
6
- import type { NodeId } from "../index.js";
6
+ import type { NodeId } from "../modular-schema/index.js";
7
7
  export type CellCount = number;
8
8
  /**
9
9
  * A monotonically increasing positive integer assigned to an individual mark within the changeset.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,MAAM,MAAM,GAAG,gBAAgB,CAAC;AAEtC,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,MAAO,SAAQ,YAAY;CAAG;AAE/C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,KAAK,EAAE,SAAS,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,WAAY,CAAC;AACtC,MAAM,WAAW,QAAQ;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,YAAY,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;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AED,MAAM,WAAW,YAAY;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,MAAO,SAAQ,cAAc,EAAE,YAAY;IAC3D,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,gBAAgB,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,OAAQ,SAAQ,aAAa,EAAE,YAAY;IAC3D,IAAI,EAAE,SAAS,CAAC;CAChB;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,iBAAiB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,MAAM;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,eAAe,GAAG,MAAM,CAAC;AAE/E,MAAM,MAAM,QAAQ,CAAC,KAAK,IAAI,KAAK,GAAG,aAAa,CAAC;AAEpD,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AAExC,MAAM,MAAM,QAAQ,GAAG,IAAI,EAAE,CAAC;AAE9B,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ChangeAtomId, ChangesetLocalId, RevisionTag } from \"../../core/index.js\";\nimport type { NodeId } from \"../index.js\";\n\nexport type CellCount = number;\n\n/**\n * A monotonically increasing positive integer assigned to an individual mark within the changeset.\n * MoveIds are scoped to a single changeset, so referring to MoveIds across changesets requires\n * qualifying them by change tag.\n *\n * The uniqueness of IDs is leveraged to uniquely identify the matching move-out for a move-in/return and vice-versa.\n */\nexport type MoveId = ChangesetLocalId;\n\nexport interface HasMoveId {\n\t/**\n\t * The sequential ID assigned to a change within a transaction.\n\t */\n\tid: MoveId;\n}\n\nexport interface CellId extends ChangeAtomId {}\n\n/**\n * Mark which targets a range of existing cells instead of creating new cells.\n */\nexport interface HasMarkFields {\n\t/**\n\t * Describes the detach which last emptied the target cells,\n\t * or the attach which allocated the cells if the cells have never been filled.\n\t * Undefined if the target cells are not empty in this mark's input context.\n\t */\n\tcellId?: CellId;\n\n\tchanges?: NodeId;\n\n\tcount: CellCount;\n}\n\nexport const NoopMarkType = undefined;\nexport interface NoopMark {\n\t/**\n\t * Declared for consistency with other marks.\n\t * Left undefined for terseness.\n\t */\n\ttype?: typeof NoopMarkType;\n}\n\nexport interface HasRevisionTag {\n\t/**\n\t * The revision this mark is part of.\n\t * Only set for marks in fields which are a composition of multiple revisions.\n\t */\n\trevision?: RevisionTag;\n}\n\n/**\n * Moves detached roots into cells.\n * The specific content being moved in is determined by the IDs of the cells this mark targets.\n * Always brings about the desired outcome: the content is in the targeted cells.\n *\n * Rebasing this mark never causes it to insert/restore a different set of nodes.\n * Rebasing this mark never causes it to fill a different set of cells\n * (though the way those cells are identified may change).\n *\n * Carries a `MoveId` in case it is rebased over the content being moved out, in which case this mark\n * will transform into a pair of returns which will move the content back into this cell.\n */\nexport interface Insert extends HasMoveId, HasRevisionTag {\n\ttype: \"Insert\";\n}\n\nexport interface HasMoveFields extends HasMoveId, HasRevisionTag {\n\t/**\n\t * Used when this mark represents the beginning or end of a chain of moves within a changeset.\n\t * If this mark is the start of the chain, this is the ID of the end mark of the chain, and vice-versa if this is the end of the chain.\n\t */\n\tfinalEndpoint?: ChangeAtomId;\n}\n\n/**\n * Fills empty cells with content that is moved out from another cell.\n * Always brings about the desired outcome: the nodes being moved are in the target cells.\n * Note that this may not require any changes if these nodes are already in the target cells when this mark is applied.\n *\n * Rebasing this mark never causes it to move-in a different set of nodes.\n * Rebasing this mark never causes it to fill a different set of cells\n * (though the way those cells are identified may change).\n *\n * Only ever targets empty cells. It transforms into a idempotent Insert if the target cells are not empty.\n */\nexport interface MoveIn extends HasMoveFields {\n\ttype: \"MoveIn\";\n}\n\nexport interface DetachFields {\n\t/**\n\t * When set, the detach should use the `CellId` specified in this object to characterize the cell being emptied.\n\t *\n\t * This is used in two situations:\n\t * - to restore the prior ID of a cell in a rollback changeset\n\t * - to represent the impact of a detach composed with a rename\n\t */\n\treadonly idOverride?: CellId;\n}\n\n/**\n * Removes nodes from their cells.\n * Always brings about the desired outcome: the targeted nodes are removed from their cells.\n * Note that this may not require any changes if targeted nodes are already removed when this mark is applied.\n *\n * Rebasing this mark never causes it to target different set of nodes.\n * Rebasing this mark can cause it to clear a different set of cells.\n */\nexport interface Remove extends HasRevisionTag, DetachFields {\n\ttype: \"Remove\";\n\tid: ChangesetLocalId;\n}\n\n/**\n * Removes nodes from their cells so they can be moved into other cells.\n * Always brings about the desired outcome: the targeted nodes are removed from their cells.\n * Note that this may not require any changes if targeted nodes are already removed when this mark is applied.\n *\n * Rebasing this mark never causes it to target different set of nodes.\n * Rebasing this mark can cause it to clear a different set of cells.\n */\nexport interface MoveOut extends HasMoveFields, DetachFields {\n\ttype: \"MoveOut\";\n}\n\nexport type Attach = Insert | MoveIn;\n\nexport type Detach = Remove | MoveOut;\n\n/**\n * Fills then empties cells.\n *\n * Only ever targets empty cells.\n *\n * As a matter of normalization, we only use an AttachAndDetach to represent MoveIn ○ Remove.\n *\n * We do NOT use AttachAndDetach to represent the following compositions:\n * - Insert/Revive ○ Remove (represented by a Remove)\n * - Insert/Revive ○ MoveOut (represented by a MoveOut)\n * - MoveIn ○ MoveOut (represented by a Rename)\n */\nexport interface AttachAndDetach {\n\ttype: \"AttachAndDetach\";\n\tattach: Attach;\n\tdetach: Detach;\n}\n\n/**\n * Represents the renaming of an empty cell.\n *\n * Only ever targets empty cells.\n *\n * Occurs when a MoveIn is composed with a MoveOut.\n * TODO: Use Rename when an Insert/Revive is composed with a Remove.\n */\nexport interface Rename {\n\ttype: \"Rename\";\n\treadonly idOverride: CellId;\n}\n\nexport type MarkEffect = NoopMark | Attach | Detach | AttachAndDetach | Rename;\n\nexport type CellMark<TMark> = TMark & HasMarkFields;\n\nexport type Mark = CellMark<MarkEffect>;\n\nexport type MarkList = Mark[];\n\nexport type Changeset = MarkList;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ChangeAtomId, ChangesetLocalId, RevisionTag } from \"../../core/index.js\";\nimport type { NodeId } from \"../modular-schema/index.js\";\n\nexport type CellCount = number;\n\n/**\n * A monotonically increasing positive integer assigned to an individual mark within the changeset.\n * MoveIds are scoped to a single changeset, so referring to MoveIds across changesets requires\n * qualifying them by change tag.\n *\n * The uniqueness of IDs is leveraged to uniquely identify the matching move-out for a move-in/return and vice-versa.\n */\nexport type MoveId = ChangesetLocalId;\n\nexport interface HasMoveId {\n\t/**\n\t * The sequential ID assigned to a change within a transaction.\n\t */\n\tid: MoveId;\n}\n\nexport interface CellId extends ChangeAtomId {}\n\n/**\n * Mark which targets a range of existing cells instead of creating new cells.\n */\nexport interface HasMarkFields {\n\t/**\n\t * Describes the detach which last emptied the target cells,\n\t * or the attach which allocated the cells if the cells have never been filled.\n\t * Undefined if the target cells are not empty in this mark's input context.\n\t */\n\tcellId?: CellId;\n\n\tchanges?: NodeId;\n\n\tcount: CellCount;\n}\n\nexport const NoopMarkType = undefined;\nexport interface NoopMark {\n\t/**\n\t * Declared for consistency with other marks.\n\t * Left undefined for terseness.\n\t */\n\ttype?: typeof NoopMarkType;\n}\n\nexport interface HasRevisionTag {\n\t/**\n\t * The revision this mark is part of.\n\t * Only set for marks in fields which are a composition of multiple revisions.\n\t */\n\trevision?: RevisionTag;\n}\n\n/**\n * Moves detached roots into cells.\n * The specific content being moved in is determined by the IDs of the cells this mark targets.\n * Always brings about the desired outcome: the content is in the targeted cells.\n *\n * Rebasing this mark never causes it to insert/restore a different set of nodes.\n * Rebasing this mark never causes it to fill a different set of cells\n * (though the way those cells are identified may change).\n *\n * Carries a `MoveId` in case it is rebased over the content being moved out, in which case this mark\n * will transform into a pair of returns which will move the content back into this cell.\n */\nexport interface Insert extends HasMoveId, HasRevisionTag {\n\ttype: \"Insert\";\n}\n\nexport interface HasMoveFields extends HasMoveId, HasRevisionTag {\n\t/**\n\t * Used when this mark represents the beginning or end of a chain of moves within a changeset.\n\t * If this mark is the start of the chain, this is the ID of the end mark of the chain, and vice-versa if this is the end of the chain.\n\t */\n\tfinalEndpoint?: ChangeAtomId;\n}\n\n/**\n * Fills empty cells with content that is moved out from another cell.\n * Always brings about the desired outcome: the nodes being moved are in the target cells.\n * Note that this may not require any changes if these nodes are already in the target cells when this mark is applied.\n *\n * Rebasing this mark never causes it to move-in a different set of nodes.\n * Rebasing this mark never causes it to fill a different set of cells\n * (though the way those cells are identified may change).\n *\n * Only ever targets empty cells. It transforms into a idempotent Insert if the target cells are not empty.\n */\nexport interface MoveIn extends HasMoveFields {\n\ttype: \"MoveIn\";\n}\n\nexport interface DetachFields {\n\t/**\n\t * When set, the detach should use the `CellId` specified in this object to characterize the cell being emptied.\n\t *\n\t * This is used in two situations:\n\t * - to restore the prior ID of a cell in a rollback changeset\n\t * - to represent the impact of a detach composed with a rename\n\t */\n\treadonly idOverride?: CellId;\n}\n\n/**\n * Removes nodes from their cells.\n * Always brings about the desired outcome: the targeted nodes are removed from their cells.\n * Note that this may not require any changes if targeted nodes are already removed when this mark is applied.\n *\n * Rebasing this mark never causes it to target different set of nodes.\n * Rebasing this mark can cause it to clear a different set of cells.\n */\nexport interface Remove extends HasRevisionTag, DetachFields {\n\ttype: \"Remove\";\n\tid: ChangesetLocalId;\n}\n\n/**\n * Removes nodes from their cells so they can be moved into other cells.\n * Always brings about the desired outcome: the targeted nodes are removed from their cells.\n * Note that this may not require any changes if targeted nodes are already removed when this mark is applied.\n *\n * Rebasing this mark never causes it to target different set of nodes.\n * Rebasing this mark can cause it to clear a different set of cells.\n */\nexport interface MoveOut extends HasMoveFields, DetachFields {\n\ttype: \"MoveOut\";\n}\n\nexport type Attach = Insert | MoveIn;\n\nexport type Detach = Remove | MoveOut;\n\n/**\n * Fills then empties cells.\n *\n * Only ever targets empty cells.\n *\n * As a matter of normalization, we only use an AttachAndDetach to represent MoveIn ○ Remove.\n *\n * We do NOT use AttachAndDetach to represent the following compositions:\n * - Insert/Revive ○ Remove (represented by a Remove)\n * - Insert/Revive ○ MoveOut (represented by a MoveOut)\n * - MoveIn ○ MoveOut (represented by a Rename)\n */\nexport interface AttachAndDetach {\n\ttype: \"AttachAndDetach\";\n\tattach: Attach;\n\tdetach: Detach;\n}\n\n/**\n * Represents the renaming of an empty cell.\n *\n * Only ever targets empty cells.\n *\n * Occurs when a MoveIn is composed with a MoveOut.\n * TODO: Use Rename when an Insert/Revive is composed with a Remove.\n */\nexport interface Rename {\n\ttype: \"Rename\";\n\treadonly idOverride: CellId;\n}\n\nexport type MarkEffect = NoopMark | Attach | Detach | AttachAndDetach | Rename;\n\nexport type CellMark<TMark> = TMark & HasMarkFields;\n\nexport type Mark = CellMark<MarkEffect>;\n\nexport type MarkList = Mark[];\n\nexport type Changeset = MarkList;\n"]}
package/lib/index.d.ts CHANGED
@@ -30,7 +30,7 @@ export type Listenable<T extends object> = EventListenable<T>;
30
30
  export type Off = EventOff;
31
31
  export { TreeStatus, TreeCompressionStrategy, type TreeIndex, type TreeIndexKey, type TreeIndexNodes, } from "./feature-libraries/index.js";
32
32
  export { type ITreeInternal, type SharedTreeOptions, type ForestType, type SharedTreeFormatOptions, SharedTreeFormatVersion, Tree, type RunTransaction, type ForestOptions, getBranch, type BranchableTree, type TreeBranchFork, independentInitializedView, type ViewContent, TreeAlpha, type TreeIdentifierUtils, independentView, ForestTypeOptimized, ForestTypeExpensiveDebug, ForestTypeReference, } from "./shared-tree/index.js";
33
- export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, SchemaFactoryAlpha, type SchemaFactoryObjectOptions, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaAlpha, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, ObjectNodeSchema, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type FieldPropsAlpha, normalizeFieldSchema, type InternalTreeNode, type WithType, type NodeChangedData, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type System_Unsafe, type FieldSchemaAlphaUnsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, type SimpleTreeIndex, type IdentifierIndex, createSimpleTreeIndex, createIdentifierIndex, adaptEnum, enumFromStrings, singletonSchema, type UnsafeUnknownSchema, type TreeViewAlpha, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, type ReadableField, type ReadSchema, type ImplicitAnnotatedAllowedTypes, type ImplicitAnnotatedFieldSchema, type AnnotatedAllowedType, type AnnotatedAllowedTypes, type NormalizedAnnotatedAllowedTypes, type AllowedTypeMetadata, type AllowedTypesMetadata, type InsertableObjectFromAnnotatedSchemaRecord, type UnannotateImplicitAllowedTypes, type UnannotateAllowedTypes, type UnannotateAllowedType, type UnannotateAllowedTypesList, type UnannotateAllowedTypeOrLazyItem, type UnannotateImplicitFieldSchema, type UnannotateSchemaRecord, TreeBeta, type TreeChangeEventsBeta, type VerboseTreeNode, type TreeEncodingOptions, type TreeSchemaEncodingOptions, type TreeSchema, TreeViewConfigurationAlpha, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, 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, type JsonRecordNodeSchema, type JsonStringKeyPatternProperties, getJsonSchema, type LazyItem, type Unenforced, type SimpleNodeSchemaBase, type SimpleNodeSchemaBaseAlpha, type SimpleTreeSchema, type SimpleNodeSchema, type SimpleFieldSchema, type SimpleLeafNodeSchema, type SimpleMapNodeSchema, type SimpleArrayNodeSchema, type SimpleObjectNodeSchema, type SimpleObjectFieldSchema, type SimpleRecordNodeSchema, normalizeAllowedTypes, walkFieldSchema, walkNodeSchema, walkAllowedTypes, type SchemaVisitor, getSimpleSchema, type ReadonlyArrayNode, type InsertableTreeNodeFromAllowedTypes, type Input, type TreeBranch, type TreeBranchEvents, asTreeViewAlpha, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, type NodeSchemaMetadata, type SchemaStatics, type ITreeAlpha, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type LeafSchema, type ArrayNodeCustomizableSchema, type ArrayNodePojoEmulationSchema, ArrayNodeSchema, type MapNodeCustomizableSchema, type MapNodePojoEmulationSchema, MapNodeSchema, type ObjectFromSchemaRecord, type ValidateRecursiveSchemaTemplate, type FixRecursiveRecursionLimit, RecordNodeSchema, type RecordNodeCustomizableSchema, type RecordNodeInsertableData, type RecordNodePojoEmulationSchema, type TreeRecordNode, } from "./simple-tree/index.js";
33
+ export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, SchemaFactoryAlpha, type SchemaFactoryObjectOptions, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaAlpha, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, ObjectNodeSchema, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type FieldPropsAlpha, normalizeFieldSchema, type InternalTreeNode, type WithType, type NodeChangedData, type SchemaUpgrade, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type System_Unsafe, type FieldSchemaAlphaUnsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, type SimpleTreeIndex, type IdentifierIndex, createSimpleTreeIndex, createIdentifierIndex, adaptEnum, enumFromStrings, singletonSchema, type UnsafeUnknownSchema, type TreeViewAlpha, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, type ReadableField, type ReadSchema, type ImplicitAnnotatedAllowedTypes, type ImplicitAnnotatedFieldSchema, type AnnotatedAllowedType, type AnnotatedAllowedTypes, type NormalizedAnnotatedAllowedTypes, type AllowedTypeMetadata, type AllowedTypesMetadata, type InsertableObjectFromAnnotatedSchemaRecord, type UnannotateImplicitAllowedTypes, type UnannotateAllowedTypes, type UnannotateAllowedType, type UnannotateAllowedTypesList, type UnannotateImplicitFieldSchema, type UnannotateSchemaRecord, type SchemaStaticsAlpha, TreeBeta, type TreeChangeEventsBeta, type VerboseTreeNode, type TreeEncodingOptions, type TreeSchemaEncodingOptions, type TreeSchema, TreeViewConfigurationAlpha, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, 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, type JsonRecordNodeSchema, type JsonStringKeyPatternProperties, getJsonSchema, type LazyItem, type Unenforced, type SimpleNodeSchemaBase, type SimpleNodeSchemaBaseAlpha, type SimpleTreeSchema, type SimpleNodeSchema, type SimpleFieldSchema, type SimpleLeafNodeSchema, type SimpleMapNodeSchema, type SimpleArrayNodeSchema, type SimpleObjectNodeSchema, type SimpleObjectFieldSchema, type SimpleRecordNodeSchema, normalizeAllowedTypes, walkFieldSchema, walkNodeSchema, walkAllowedTypes, type SchemaVisitor, getSimpleSchema, type ReadonlyArrayNode, type InsertableTreeNodeFromAllowedTypes, type Input, type TreeBranch, type TreeBranchEvents, asTreeViewAlpha, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, type NodeSchemaMetadata, type SchemaStatics, type ITreeAlpha, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type LeafSchema, type ArrayNodeCustomizableSchema, type ArrayNodePojoEmulationSchema, ArrayNodeSchema, type MapNodeCustomizableSchema, type MapNodePojoEmulationSchema, MapNodeSchema, type ObjectFromSchemaRecord, type ValidateRecursiveSchemaTemplate, type FixRecursiveRecursionLimit, RecordNodeSchema, type RecordNodeCustomizableSchema, type RecordNodeInsertableData, type RecordNodePojoEmulationSchema, type TreeRecordNode, } from "./simple-tree/index.js";
34
34
  export { SharedTree, configuredSharedTree, } from "./treeFactory.js";
35
35
  export { SharedTreeAttributes, SharedTreeFactoryType } from "./sharedTreeAttributes.js";
36
36
  export { persistedToSimpleSchema } from "./shared-tree/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,KAAK,UAAU,EACf,UAAU,EACV,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACX,SAAS,IAAI,cAAc,EAC3B,UAAU,IAAI,eAAe,EAC7B,UAAU,IAAI,eAAe,EAC7B,GAAG,IAAI,QAAQ,EACf,MAAM,iCAAiC,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;AAC5D;;;;GAIG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC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,EAEX,yBAAyB,EACzB,uBAAuB,EACvB,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,4BAA4B,GAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO;AACN;;;GAGG;AACH,aAAa,GACb,CAAC;AAKF,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
package/lib/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  export { ValueSchema, CommitKind, RevertibleStatus, } from "./core/index.js";
6
6
  export { TreeStatus, TreeCompressionStrategy, } from "./feature-libraries/index.js";
7
7
  export { SharedTreeFormatVersion, Tree, getBranch, independentInitializedView, TreeAlpha, independentView, ForestTypeOptimized, ForestTypeExpensiveDebug, ForestTypeReference, } from "./shared-tree/index.js";
8
- export { TreeArrayNode, IterableTreeArrayContent, TreeViewConfiguration, SchemaFactory, SchemaFactoryAlpha, FieldKind, FieldSchema, NodeKind, ObjectNodeSchema, normalizeFieldSchema, createSimpleTreeIndex, createIdentifierIndex,
8
+ export { TreeArrayNode, IterableTreeArrayContent, TreeNode, TreeViewConfiguration, SchemaFactory, SchemaFactoryAlpha, FieldKind, FieldSchema, NodeKind, ObjectNodeSchema, normalizeFieldSchema, createSimpleTreeIndex, createIdentifierIndex,
9
9
  // experimental @alpha APIs:
10
10
  adaptEnum, enumFromStrings, singletonSchema,
11
11
  // Beta APIs
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","source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A+B,CAAC;AAwBjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO;AACN;;;GAGG;AACH,aAAa,GACb,CAAC;AAOF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tValueSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./core/index.js\";\n\nimport type {\n\tListeners as EventListeners,\n\tIsListener as EventIsListener,\n\tListenable as EventListenable,\n\tOff as EventOff,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listeners}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listeners<T extends object> = EventListeners<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#IsListener}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type IsListener<T> = EventIsListener<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listenable}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listenable<T extends object> = EventListenable<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Off}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Off = EventOff;\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ITreeInternal,\n\ttype SharedTreeOptions,\n\ttype ForestType,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tTree,\n\ttype RunTransaction,\n\ttype ForestOptions,\n\tgetBranch,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n\tindependentInitializedView,\n\ttype ViewContent,\n\tTreeAlpha,\n\ttype TreeIdentifierUtils,\n\tindependentView,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\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\tSchemaFactoryAlpha,\n\ttype SchemaFactoryObjectOptions,\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 FieldSchemaAlpha,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\tObjectNodeSchema,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\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 System_Unsafe,\n\ttype FieldSchemaAlphaUnsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\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// Index APIs\n\ttype SimpleTreeIndex,\n\ttype IdentifierIndex,\n\tcreateSimpleTreeIndex,\n\tcreateIdentifierIndex,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype ImplicitAnnotatedAllowedTypes,\n\ttype ImplicitAnnotatedFieldSchema,\n\ttype AnnotatedAllowedType,\n\ttype AnnotatedAllowedTypes,\n\ttype NormalizedAnnotatedAllowedTypes,\n\ttype AllowedTypeMetadata,\n\ttype AllowedTypesMetadata,\n\ttype InsertableObjectFromAnnotatedSchemaRecord,\n\ttype UnannotateImplicitAllowedTypes,\n\ttype UnannotateAllowedTypes,\n\ttype UnannotateAllowedType,\n\ttype UnannotateAllowedTypesList,\n\ttype UnannotateAllowedTypeOrLazyItem,\n\ttype UnannotateImplicitFieldSchema,\n\ttype UnannotateSchemaRecord,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\t// Other\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype TreeSchemaEncodingOptions,\n\ttype TreeSchema,\n\tTreeViewConfigurationAlpha,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\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\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype SimpleNodeSchemaBase,\n\ttype SimpleNodeSchemaBaseAlpha,\n\ttype SimpleTreeSchema,\n\ttype SimpleNodeSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleLeafNodeSchema,\n\ttype SimpleMapNodeSchema,\n\ttype SimpleArrayNodeSchema,\n\ttype SimpleObjectNodeSchema,\n\ttype SimpleObjectFieldSchema,\n\ttype SimpleRecordNodeSchema,\n\tnormalizeAllowedTypes,\n\twalkFieldSchema,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\tgetSimpleSchema,\n\ttype ReadonlyArrayNode,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype Input,\n\ttype TreeBranch,\n\ttype TreeBranchEvents,\n\tasTreeViewAlpha,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype NodeSchemaMetadata,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\tevaluateLazySchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype LeafSchema,\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\ttype ObjectFromSchemaRecord,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\ttype TreeRecordNode,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tconfiguredSharedTree,\n} from \"./treeFactory.js\";\nexport { SharedTreeAttributes, SharedTreeFactoryType } from \"./sharedTreeAttributes.js\";\nexport { persistedToSimpleSchema } from \"./shared-tree/index.js\";\n\nexport {\n\ttype ICodecOptions,\n\ttype CodecWriteOptions,\n\ttype JsonValidator,\n\ttype SchemaValidationFunction,\n\tFluidClientVersion,\n} from \"./codec/index.js\";\nexport { noopValidator } from \"./codec/index.js\";\nexport { typeboxValidator } from \"./external-utilities/index.js\";\n\nexport type {\n\t// Type Testing\n\trequireTrue,\n\trequireFalse,\n\trequireAssignableTo,\n\tareSafelyAssignable,\n\tisAssignableTo,\n\tisAny,\n\teitherIsAny,\n\t// Other\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\tMakeNominal,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n\tJsonCompatible,\n\tJsonCompatibleObject,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlyObject,\n} from \"./util/index.js\";\nexport { cloneWithReplacements } 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 { JsonAsTree } from \"./jsonDomainSchema.js\";\nexport { FluidSerializableAsTree } from \"./serializableDomainSchema.js\";\nexport { TableSchema, type System_TableSchema } from \"./tableSchema.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EAEX,UAAU,EACV,gBAAgB,GAKhB,MAAM,iBAAiB,CAAC;AAkCzB,OAAO,EACN,UAAU,EACV,uBAAuB,GAIvB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAKN,uBAAuB,EACvB,IAAI,EAGJ,SAAS,EAGT,0BAA0B,EAE1B,SAAS,EAET,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,aAAa,EAEb,wBAAwB,EACxB,QAAQ,EAIR,qBAAqB,EAKrB,aAAa,EACb,kBAAkB,EASlB,SAAS,EACT,WAAW,EAMX,QAAQ,EAER,gBAAgB,EAMhB,oBAAoB,EA4BpB,qBAAqB,EACrB,qBAAqB;AACrB,4BAA4B;AAC5B,SAAS,EACT,eAAe,EACf,eAAe;AAyBf,YAAY;AACZ,QAAQ,EAOR,0BAA0B,EAE1B,sBAAsB,EACtB,sBAAsB,EAkBtB,aAAa,EAcb,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,gBAAgB,EAEhB,eAAe,EAMf,eAAe,EAef,QAAQ,EACR,8BAA8B,EAC9B,kBAAkB,EAClB,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EAEzB,WAAW,EAIX,eAAe,EAGf,aAAa,EAIb,gBAAgB,GAKhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,UAAU,EACV,oBAAoB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAKN,kBAAkB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAwBjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO;AACN;;;GAGG;AACH,aAAa,GACb,CAAC;AAOF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tValueSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./core/index.js\";\n\nimport type {\n\tListeners as EventListeners,\n\tIsListener as EventIsListener,\n\tListenable as EventListenable,\n\tOff as EventOff,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listeners}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listeners<T extends object> = EventListeners<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#IsListener}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type IsListener<T> = EventIsListener<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listenable}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listenable<T extends object> = EventListenable<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Off}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Off = EventOff;\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ITreeInternal,\n\ttype SharedTreeOptions,\n\ttype ForestType,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tTree,\n\ttype RunTransaction,\n\ttype ForestOptions,\n\tgetBranch,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n\tindependentInitializedView,\n\ttype ViewContent,\n\tTreeAlpha,\n\ttype TreeIdentifierUtils,\n\tindependentView,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\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\tSchemaFactoryAlpha,\n\ttype SchemaFactoryObjectOptions,\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 FieldSchemaAlpha,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\tObjectNodeSchema,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype NodeChangedData,\n\ttype SchemaUpgrade,\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 System_Unsafe,\n\ttype FieldSchemaAlphaUnsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\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// Index APIs\n\ttype SimpleTreeIndex,\n\ttype IdentifierIndex,\n\tcreateSimpleTreeIndex,\n\tcreateIdentifierIndex,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype ImplicitAnnotatedAllowedTypes,\n\ttype ImplicitAnnotatedFieldSchema,\n\ttype AnnotatedAllowedType,\n\ttype AnnotatedAllowedTypes,\n\ttype NormalizedAnnotatedAllowedTypes,\n\ttype AllowedTypeMetadata,\n\ttype AllowedTypesMetadata,\n\ttype InsertableObjectFromAnnotatedSchemaRecord,\n\ttype UnannotateImplicitAllowedTypes,\n\ttype UnannotateAllowedTypes,\n\ttype UnannotateAllowedType,\n\ttype UnannotateAllowedTypesList,\n\ttype UnannotateImplicitFieldSchema,\n\ttype UnannotateSchemaRecord,\n\ttype SchemaStaticsAlpha,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\t// Other\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype TreeSchemaEncodingOptions,\n\ttype TreeSchema,\n\tTreeViewConfigurationAlpha,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\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\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype SimpleNodeSchemaBase,\n\ttype SimpleNodeSchemaBaseAlpha,\n\ttype SimpleTreeSchema,\n\ttype SimpleNodeSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleLeafNodeSchema,\n\ttype SimpleMapNodeSchema,\n\ttype SimpleArrayNodeSchema,\n\ttype SimpleObjectNodeSchema,\n\ttype SimpleObjectFieldSchema,\n\ttype SimpleRecordNodeSchema,\n\tnormalizeAllowedTypes,\n\twalkFieldSchema,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\tgetSimpleSchema,\n\ttype ReadonlyArrayNode,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype Input,\n\ttype TreeBranch,\n\ttype TreeBranchEvents,\n\tasTreeViewAlpha,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype NodeSchemaMetadata,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\tevaluateLazySchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype LeafSchema,\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\ttype ObjectFromSchemaRecord,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\ttype TreeRecordNode,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tconfiguredSharedTree,\n} from \"./treeFactory.js\";\nexport { SharedTreeAttributes, SharedTreeFactoryType } from \"./sharedTreeAttributes.js\";\nexport { persistedToSimpleSchema } from \"./shared-tree/index.js\";\n\nexport {\n\ttype ICodecOptions,\n\ttype CodecWriteOptions,\n\ttype JsonValidator,\n\ttype SchemaValidationFunction,\n\tFluidClientVersion,\n} from \"./codec/index.js\";\nexport { noopValidator } from \"./codec/index.js\";\nexport { typeboxValidator } from \"./external-utilities/index.js\";\n\nexport type {\n\t// Type Testing\n\trequireTrue,\n\trequireFalse,\n\trequireAssignableTo,\n\tareSafelyAssignable,\n\tisAssignableTo,\n\tisAny,\n\teitherIsAny,\n\t// Other\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\tMakeNominal,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n\tJsonCompatible,\n\tJsonCompatibleObject,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlyObject,\n} from \"./util/index.js\";\nexport { cloneWithReplacements } 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 { JsonAsTree } from \"./jsonDomainSchema.js\";\nexport { FluidSerializableAsTree } from \"./serializableDomainSchema.js\";\nexport { TableSchema, type System_TableSchema } from \"./tableSchema.js\";\n"]}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import type { FixRecursiveArraySchema, TreeNodeFromImplicitAllowedTypes, System_Unsafe, TreeNodeSchemaClass, NodeKind, WithType, LeafSchema } from "./simple-tree/index.js";
5
+ import type { FixRecursiveArraySchema, TreeNodeFromImplicitAllowedTypes, ArrayNodeCustomizableSchemaUnsafe, System_Unsafe, TreeNodeSchemaClass, TreeRecordNodeUnsafe, NodeKind, WithType, LeafSchema } from "./simple-tree/index.js";
6
6
  /**
7
7
  * Utilities for storing JSON data in {@link TreeNode}s.
8
8
  * @remarks
@@ -25,6 +25,7 @@ export declare namespace JsonAsTree {
25
25
  */
26
26
  const Primitive: readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>];
27
27
  /**
28
+ * {@inheritDoc JsonAsTree.(Primitive:variable)}
28
29
  * @alpha
29
30
  */
30
31
  type Primitive = TreeNodeFromImplicitAllowedTypes<typeof Primitive>;
@@ -43,6 +44,7 @@ export declare namespace JsonAsTree {
43
44
  */
44
45
  const Tree: readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array];
45
46
  /**
47
+ * {@inheritDoc JsonAsTree.(Tree:variable)}
46
48
  * @alpha
47
49
  */
48
50
  type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;
@@ -50,7 +52,7 @@ export declare namespace JsonAsTree {
50
52
  * Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.
51
53
  * @system @alpha
52
54
  */
53
- const _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass<"com.fluidframework.json.object", NodeKind.Record, import("./simple-tree/index.js").TreeRecordNodeUnsafe<readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array]> & WithType<"com.fluidframework.json.object", NodeKind.Record, unknown>, {
55
+ const _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass<"com.fluidframework.json.object", NodeKind.Record, TreeRecordNodeUnsafe<readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array]> & WithType<"com.fluidframework.json.object", NodeKind.Record, unknown>, {
54
56
  readonly [x: string]: string | number | JsonObject | Array | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | null;
55
57
  }, false, readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array], undefined>;
56
58
  /**
@@ -84,7 +86,7 @@ export declare namespace JsonAsTree {
84
86
  * Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.
85
87
  * @system @alpha
86
88
  */
87
- const _APIExtractorWorkaroundArrayBase: import("./simple-tree/index.js").ArrayNodeCustomizableSchemaUnsafe<"com.fluidframework.json.array", readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array], unknown>;
89
+ const _APIExtractorWorkaroundArrayBase: ArrayNodeCustomizableSchemaUnsafe<"com.fluidframework.json.array", readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array], unknown>;
88
90
  /**
89
91
  * Arbitrary JSON array as a {@link TreeNode}.
90
92
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"jsonDomainSchema.d.ts","sourceRoot":"","sources":["../src/jsonDomainSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAEX,uBAAuB,EACvB,gCAAgC,EAIhC,aAAa,EAEb,mBAAmB,EACnB,QAAQ,EAER,QAAQ,EACR,UAAU,EAGV,MAAM,wBAAwB,CAAC;AAIhC;;;;;;;;;;;;;;GAcG;AACH,yBAAiB,UAAU,CAAC;IAC3B;;;OAGG;IACI,MAAM,SAAS,iIAKW,CAAC;IAElC;;OAEG;IACH,KAAY,SAAS,GAAG,gCAAgC,CAAC,OAAO,SAAS,CAAC,CAAC;IAE3E;;;;;;;;;;;;OAYG;IACI,MAAM,IAAI,8KAAyD,CAAC;IAE3E;;OAEG;IACH,KAAY,IAAI,GAAG,gCAAgC,CAAC,OAAO,IAAI,CAAC,CAAC;IAEjE;;;OAGG;IACI,MAAM,iCAAiC;;sMAAqC,CAAC;IAEpF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAa,UAAW,SAAQ,iCAAiC;KAAG;IAKpE;;;;;;OAMG;IACH,KAAoB,kCAAkC,GAAG,uBAAuB,CAC/E,OAAO,KAAK,CACZ,CAAC;IAEF;;;OAGG;IACI,MAAM,gCAAgC,4RAAmC,CAAC;IAEjF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAa,KAAM,SAAQ,gCAAgC;KAAG;CAI9D"}
1
+ {"version":3,"file":"jsonDomainSchema.d.ts","sourceRoot":"","sources":["../src/jsonDomainSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAEX,uBAAuB,EACvB,gCAAgC,EAIhC,iCAAiC,EACjC,aAAa,EAEb,mBAAmB,EACnB,oBAAoB,EACpB,QAAQ,EAER,QAAQ,EACR,UAAU,EAGV,MAAM,wBAAwB,CAAC;AAIhC;;;;;;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C;IAO3E;;;OAGG;IACU,4CAAiC,GAAG,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,WAAA,IAAI,CAAC,CAAC;IAEpF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAa,UAAW,SAAQ,WAAA,iCAAiC;KAAG;IAAvD,qBAAU,aAA6C,CAAA;IACpE,CAAC;IAED,CAAC;IAaD;;;OAGG;IACU,2CAAgC,GAAG,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,WAAA,IAAI,CAAC,CAAC;IAEjF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAa,KAAM,SAAQ,WAAA,gCAAgC;KAAG;IAAjD,gBAAK,QAA4C,CAAA;IAC9D,CAAC;IAED,CAAC;AACF,CAAC,EAvGgB,UAAU,KAAV,UAAU,QAuG1B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SchemaFactory, SchemaFactoryAlpha } from \"./simple-tree/index.js\";\nimport type {\n\tAllowedTypes,\n\tFixRecursiveArraySchema,\n\tTreeNodeFromImplicitAllowedTypes,\n\tValidateRecursiveSchema,\n\t// #region Unused imports to make d.ts cleaner\n\t/* eslint-disable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars */\n\tSystem_Unsafe,\n\tTreeNodeSchemaNonClass,\n\tTreeNodeSchemaClass,\n\tNodeKind,\n\tTreeNodeSchemaCore,\n\tWithType,\n\tLeafSchema,\n\t/* eslint-enable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars */\n\t// #endregion\n} from \"./simple-tree/index.js\";\n\nconst sf = new SchemaFactoryAlpha(\"com.fluidframework.json\");\n\n/**\n * Utilities for storing JSON data in {@link TreeNode}s.\n * @remarks\n * Schema which replicate the JSON data model with {@link TreeNode}s.\n *\n * This allows JSON to be losslessly round-tripped through a tree with the following limitations:\n *\n * 1. Only information that would be preserved by JSON.parse is preserved. This means (among other things) that numbers are limited to JavasScript's numeric precision.\n *\n * 2. The order of fields on an object is not preserved. The resulting order is arbitrary.\n *\n * JSON data can be imported from JSON into this format using `JSON.parse` then {@link (TreeAlpha:interface).importConcise} with the {@link JsonAsTree.(Tree:variable)} schema.\n *\n * @alpha\n */\nexport namespace JsonAsTree {\n\t/**\n\t * {@link AllowedTypes} for primitives types allowed in JSON.\n\t * @alpha\n\t */\n\texport const Primitive = [\n\t\tSchemaFactory.null,\n\t\tSchemaFactory.number,\n\t\tSchemaFactory.string,\n\t\tSchemaFactory.boolean,\n\t] as const satisfies AllowedTypes;\n\n\t/**\n\t * @alpha\n\t */\n\texport type Primitive = TreeNodeFromImplicitAllowedTypes<typeof Primitive>;\n\n\t/**\n\t * {@link AllowedTypes} for any content allowed in the {@link JsonAsTree} domain.\n\t * @example\n\t * ```typescript\n\t * const tree = TreeAlpha.importConcise(JsonAsTree.Union, { example: { nested: true }, value: 5 });\n\t * ```\n\t * @privateRemarks\n\t * The order here should not matter for any functionality related reasons.\n\t * In an attempt to improve readability of derived types (in errors, api-reports, IntelliSense etc.)\n\t * and possibly reduce incremental build related order dependence issues,\n\t * the simpler non-recursive types are listed first, followed by the recursive types.\n\t * @alpha\n\t */\n\texport const Tree = [...Primitive, () => JsonObject, () => Array] as const;\n\n\t/**\n\t * @alpha\n\t */\n\texport type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;\n\n\t/**\n\t * Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.\n\t * @system @alpha\n\t */\n\texport const _APIExtractorWorkaroundObjectBase = sf.recordRecursive(\"object\", Tree);\n\n\t/**\n\t * Arbitrary JSON object as a {@link TreeNode}.\n\t * @remarks\n\t * API of the tree node is more aligned with an es6 map than a JS object using its properties like a map.\n\t * @example\n\t * ```typescript\n\t * // Due to TypeScript restrictions on recursive types, the constructor and be somewhat limiting.\n\t * const fromArray = new JsonAsTreeObject([[\"a\", 0]]);\n\t * // Using `importConcise` can work better for JSON data:\n\t * const imported = TreeAlpha.importConcise(JsonAsTree.Object, { a: 0 });\n\t * // Node API is like a Map:\n\t * const value = imported.get(\"a\");\n\t * ```\n\t * @privateRemarks\n\t * Due to https://github.com/microsoft/TypeScript/issues/61270 this can't be named `Object`.\n\t * @sealed @alpha\n\t */\n\texport class JsonObject extends _APIExtractorWorkaroundObjectBase {}\n\t{\n\t\ttype _check = ValidateRecursiveSchema<typeof JsonObject>;\n\t}\n\n\t/**\n\t * D.ts bug workaround, see {@link FixRecursiveArraySchema}.\n\t * @privateRemarks\n\t * In the past this this had to reference the base type (_APIExtractorWorkaroundArrayBase).\n\t * Testing for this in examples/utils/import-testing now shows it has to reference JsonAsTree.Array instead.\n\t * @system @alpha\n\t */\n\texport declare type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<\n\t\ttypeof Array\n\t>;\n\n\t/**\n\t * Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.\n\t * @system @alpha\n\t */\n\texport const _APIExtractorWorkaroundArrayBase = sf.arrayRecursive(\"array\", Tree);\n\n\t/**\n\t * Arbitrary JSON array as a {@link TreeNode}.\n\t * @remarks\n\t * This can be imported using {@link (TreeAlpha:interface).importConcise}.\n\t * @example\n\t * ```typescript\n\t * // Due to TypeScript restrictions on recursive types, the constructor can be somewhat limiting.\n\t * const usingConstructor = new JsonAsTree.Array([\"a\", 0, new JsonAsTree.Array([1])]);\n\t * // Using `importConcise` can work better for JSON data:\n\t * const imported = TreeAlpha.importConcise(JsonAsTree.Array, [\"a\", 0, [1]]);\n\t * // Node API is like an Array:\n\t * const inner: JsonAsTree.Tree = imported[2];\n\t * assert(Tree.is(inner, JsonAsTree.Array));\n\t * const leaf = inner[0];\n\t * ```\n\t * @sealed @alpha\n\t */\n\texport class Array extends _APIExtractorWorkaroundArrayBase {}\n\t{\n\t\ttype _check = ValidateRecursiveSchema<typeof Array>;\n\t}\n}\n"]}
1
+ {"version":3,"file":"jsonDomainSchema.js","sourceRoot":"","sources":["../src/jsonDomainSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAqB3E,MAAM,EAAE,GAAG,IAAI,kBAAkB,CAAC,yBAAyB,CAAC,CAAC;AAE7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,KAAW,UAAU,CAyG1B;AAzGD,WAAiB,UAAU;IAC1B;;;OAGG;IACU,oBAAS,GAAG;QACxB,aAAa,CAAC,IAAI;QAClB,aAAa,CAAC,MAAM;QACpB,aAAa,CAAC,MAAM;QACpB,aAAa,CAAC,OAAO;KACW,CAAC;IAQlC;;;;;;;;;;;;OAYG;IACU,eAAI,GAAG,CAAC,GAAG,WAAA,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,KAAK,CAAU,CAAC;IAQ3E;;;OAGG;IACU,4CAAiC,GAAG,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,WAAA,IAAI,CAAC,CAAC;IAEpF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAa,UAAW,SAAQ,WAAA,iCAAiC;KAAG;IAAvD,qBAAU,aAA6C,CAAA;IACpE,CAAC;IAED,CAAC;IAaD;;;OAGG;IACU,2CAAgC,GAAG,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,WAAA,IAAI,CAAC,CAAC;IAEjF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAa,KAAM,SAAQ,WAAA,gCAAgC;KAAG;IAAjD,gBAAK,QAA4C,CAAA;IAC9D,CAAC;IAED,CAAC;AACF,CAAC,EAzGgB,UAAU,KAAV,UAAU,QAyG1B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SchemaFactory, SchemaFactoryAlpha } from \"./simple-tree/index.js\";\nimport type {\n\tAllowedTypes,\n\tFixRecursiveArraySchema,\n\tTreeNodeFromImplicitAllowedTypes,\n\tValidateRecursiveSchema,\n\t// #region Unused imports to make d.ts cleaner\n\t/* eslint-disable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars */\n\tArrayNodeCustomizableSchemaUnsafe,\n\tSystem_Unsafe,\n\tTreeNodeSchemaNonClass,\n\tTreeNodeSchemaClass,\n\tTreeRecordNodeUnsafe,\n\tNodeKind,\n\tTreeNodeSchemaCore,\n\tWithType,\n\tLeafSchema,\n\t/* eslint-enable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars */\n\t// #endregion\n} from \"./simple-tree/index.js\";\n\nconst sf = new SchemaFactoryAlpha(\"com.fluidframework.json\");\n\n/**\n * Utilities for storing JSON data in {@link TreeNode}s.\n * @remarks\n * Schema which replicate the JSON data model with {@link TreeNode}s.\n *\n * This allows JSON to be losslessly round-tripped through a tree with the following limitations:\n *\n * 1. Only information that would be preserved by JSON.parse is preserved. This means (among other things) that numbers are limited to JavasScript's numeric precision.\n *\n * 2. The order of fields on an object is not preserved. The resulting order is arbitrary.\n *\n * JSON data can be imported from JSON into this format using `JSON.parse` then {@link (TreeAlpha:interface).importConcise} with the {@link JsonAsTree.(Tree:variable)} schema.\n *\n * @alpha\n */\nexport namespace JsonAsTree {\n\t/**\n\t * {@link AllowedTypes} for primitives types allowed in JSON.\n\t * @alpha\n\t */\n\texport const Primitive = [\n\t\tSchemaFactory.null,\n\t\tSchemaFactory.number,\n\t\tSchemaFactory.string,\n\t\tSchemaFactory.boolean,\n\t] as const satisfies AllowedTypes;\n\n\t/**\n\t * {@inheritDoc JsonAsTree.(Primitive:variable)}\n\t * @alpha\n\t */\n\texport type Primitive = TreeNodeFromImplicitAllowedTypes<typeof Primitive>;\n\n\t/**\n\t * {@link AllowedTypes} for any content allowed in the {@link JsonAsTree} domain.\n\t * @example\n\t * ```typescript\n\t * const tree = TreeAlpha.importConcise(JsonAsTree.Union, { example: { nested: true }, value: 5 });\n\t * ```\n\t * @privateRemarks\n\t * The order here should not matter for any functionality related reasons.\n\t * In an attempt to improve readability of derived types (in errors, api-reports, IntelliSense etc.)\n\t * and possibly reduce incremental build related order dependence issues,\n\t * the simpler non-recursive types are listed first, followed by the recursive types.\n\t * @alpha\n\t */\n\texport const Tree = [...Primitive, () => JsonObject, () => Array] as const;\n\n\t/**\n\t * {@inheritDoc JsonAsTree.(Tree:variable)}\n\t * @alpha\n\t */\n\texport type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;\n\n\t/**\n\t * Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.\n\t * @system @alpha\n\t */\n\texport const _APIExtractorWorkaroundObjectBase = sf.recordRecursive(\"object\", Tree);\n\n\t/**\n\t * Arbitrary JSON object as a {@link TreeNode}.\n\t * @remarks\n\t * API of the tree node is more aligned with an es6 map than a JS object using its properties like a map.\n\t * @example\n\t * ```typescript\n\t * // Due to TypeScript restrictions on recursive types, the constructor and be somewhat limiting.\n\t * const fromArray = new JsonAsTreeObject([[\"a\", 0]]);\n\t * // Using `importConcise` can work better for JSON data:\n\t * const imported = TreeAlpha.importConcise(JsonAsTree.Object, { a: 0 });\n\t * // Node API is like a Map:\n\t * const value = imported.get(\"a\");\n\t * ```\n\t * @privateRemarks\n\t * Due to https://github.com/microsoft/TypeScript/issues/61270 this can't be named `Object`.\n\t * @sealed @alpha\n\t */\n\texport class JsonObject extends _APIExtractorWorkaroundObjectBase {}\n\t{\n\t\ttype _check = ValidateRecursiveSchema<typeof JsonObject>;\n\t}\n\n\t/**\n\t * D.ts bug workaround, see {@link FixRecursiveArraySchema}.\n\t * @privateRemarks\n\t * In the past this this had to reference the base type (_APIExtractorWorkaroundArrayBase).\n\t * Testing for this in examples/utils/import-testing now shows it has to reference JsonAsTree.Array instead.\n\t * @system @alpha\n\t */\n\texport declare type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<\n\t\ttypeof Array\n\t>;\n\n\t/**\n\t * Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.\n\t * @system @alpha\n\t */\n\texport const _APIExtractorWorkaroundArrayBase = sf.arrayRecursive(\"array\", Tree);\n\n\t/**\n\t * Arbitrary JSON array as a {@link TreeNode}.\n\t * @remarks\n\t * This can be imported using {@link (TreeAlpha:interface).importConcise}.\n\t * @example\n\t * ```typescript\n\t * // Due to TypeScript restrictions on recursive types, the constructor can be somewhat limiting.\n\t * const usingConstructor = new JsonAsTree.Array([\"a\", 0, new JsonAsTree.Array([1])]);\n\t * // Using `importConcise` can work better for JSON data:\n\t * const imported = TreeAlpha.importConcise(JsonAsTree.Array, [\"a\", 0, [1]]);\n\t * // Node API is like an Array:\n\t * const inner: JsonAsTree.Tree = imported[2];\n\t * assert(Tree.is(inner, JsonAsTree.Array));\n\t * const leaf = inner[0];\n\t * ```\n\t * @sealed @alpha\n\t */\n\texport class Array extends _APIExtractorWorkaroundArrayBase {}\n\t{\n\t\ttype _check = ValidateRecursiveSchema<typeof Array>;\n\t}\n}\n"]}
@@ -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.52.0";
8
+ export declare const pkgVersion = "2.53.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/tree";
8
- export const pkgVersion = "2.52.0";
8
+ export const pkgVersion = "2.53.0";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,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.52.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,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.53.0\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"independentView.d.ts","sourceRoot":"","sources":["../../src/shared-tree/independentView.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EACN,KAAK,aAAa,EAElB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACN,KAAK,sBAAsB,EAI3B,KAAK,gBAAgB,EAErB,MAAM,kBAAkB,CAAC;AAW1B,OAAO,KAAK,EACX,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAA+B,KAAK,cAAc,EAAa,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAGN,KAAK,aAAa,EAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA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ACH,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;CACrC"}
@@ -10,7 +10,7 @@ import { Breakable } from "../util/index.js";
10
10
  import { buildConfiguredForest, defaultSharedTreeOptions, } from "./sharedTree.js";
11
11
  import { createTreeCheckout } from "./treeCheckout.js";
12
12
  import { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
13
- import { initialize } from "./schematizeTree.js";
13
+ import { initialize, initializerFromChunk } from "./schematizeTree.js";
14
14
  /**
15
15
  * Create an uninitialized {@link TreeView} that is not tied to any {@link ITree} instance.
16
16
  *
@@ -79,7 +79,7 @@ export function independentInitializedViewInternal(config, options, schema, root
79
79
  schema: schemaRepository,
80
80
  breaker,
81
81
  });
82
- initialize(checkout, { schema, initialTree: rootFieldCursor });
82
+ initialize(checkout, schema, initializerFromChunk(checkout, () => checkout.forest.chunkField(rootFieldCursor)));
83
83
  return new SchematizingSimpleTreeView(checkout, config, createNodeIdentifierManager(idCompressor));
84
84
  }
85
85
  //# sourceMappingURL=independentView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"independentView.js","sourceRoot":"","sources":["../../src/shared-tree/independentView.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAEN,kBAAkB,GAClB,MAAM,wCAAwC,CAAC;AAGhD,OAAO,EAGN,gBAAgB,EAChB,aAAa,EAEb,0BAA0B,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,2BAA2B,EAC3B,mBAAmB,EACnB,eAAe,EAEf,mBAAmB,EACnB,uBAAuB,GACvB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAoD,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EACN,qBAAqB,EACrB,wBAAwB,GAExB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,E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,CAAC,CAAC;IAEH,UAAU,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/D,OAAO,IAAI,0BAA0B,CACpC,QAAQ,EACR,MAAM,EACN,2BAA2B,CAAC,YAAY,CAAC,CACzC,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\ttype IIdCompressor,\n\tcreateIdCompressor,\n} from \"@fluidframework/id-compressor/internal\";\n\nimport type { ICodecOptions } from \"../codec/index.js\";\nimport {\n\ttype ITreeCursorSynchronous,\n\ttype RevisionTag,\n\tRevisionTagCodec,\n\tSchemaVersion,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n} from \"../core/index.js\";\nimport {\n\tcreateNodeIdentifierManager,\n\tmakeFieldBatchCodec,\n\tmakeSchemaCodec,\n\ttype FieldBatchEncodingContext,\n\tdefaultSchemaPolicy,\n\tTreeCompressionStrategy,\n} from \"../feature-libraries/index.js\";\n// eslint-disable-next-line import/no-internal-modules\nimport type { Format } from \"../feature-libraries/schema-index/formatV1.js\";\nimport type {\n\tTreeViewConfiguration,\n\tImplicitFieldSchema,\n\tTreeViewAlpha,\n} from \"../simple-tree/index.js\";\nimport { type JsonCompatibleReadOnly, type JsonCompatible, Breakable } from \"../util/index.js\";\nimport {\n\tbuildConfiguredForest,\n\tdefaultSharedTreeOptions,\n\ttype ForestOptions,\n} from \"./sharedTree.js\";\nimport { createTreeCheckout } from \"./treeCheckout.js\";\nimport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\nimport { initialize } from \"./schematizeTree.js\";\n\n/**\n * Create an uninitialized {@link TreeView} that is not tied to any {@link ITree} instance.\n *\n * @remarks\n * Such a view can never experience collaboration or be persisted to to a Fluid Container.\n *\n * This can be useful for testing, as well as use-cases like working on local files instead of documents stored in some Fluid service.\n * @alpha\n */\nexport function independentView<const TSchema extends ImplicitFieldSchema>(\n\tconfig: TreeViewConfiguration<TSchema>,\n\toptions: ForestOptions & { idCompressor?: IIdCompressor | undefined },\n): TreeViewAlpha<TSchema> {\n\tconst breaker = new Breakable(\"independentView\");\n\tconst idCompressor: IIdCompressor = options.idCompressor ?? createIdCompressor();\n\tconst mintRevisionTag = (): RevisionTag => idCompressor.generateCompressedId();\n\tconst revisionTagCodec = new RevisionTagCodec(idCompressor);\n\tconst schema = new TreeStoredSchemaRepository();\n\tconst forest = buildConfiguredForest(\n\t\tbreaker,\n\t\toptions.forest ?? defaultSharedTreeOptions.forest,\n\t\tschema,\n\t\tidCompressor,\n\t);\n\tconst checkout = createTreeCheckout(idCompressor, mintRevisionTag, revisionTagCodec, {\n\t\tforest,\n\t\tschema,\n\t\tbreaker,\n\t});\n\tconst out: TreeViewAlpha<TSchema> = new SchematizingSimpleTreeView<TSchema>(\n\t\tcheckout,\n\t\tconfig,\n\t\tcreateNodeIdentifierManager(idCompressor),\n\t);\n\treturn out;\n}\n/**\n * Create an initialized {@link TreeView} that is not tied to any {@link ITree} instance.\n *\n * @remarks\n * Such a view can never experience collaboration or be persisted to to a Fluid Container.\n *\n * This can be useful for testing, as well as use-cases like working on local files instead of documents stored in some Fluid service.\n * @privateRemarks\n * TODO: Providing an API which generates a {@link ViewableTree} extended with export options from {@link ITreeAlpha} and maybe even branching APIs would likely be better that just exposing a {@link TreeViewAlpha}.\n * @alpha\n */\nexport function independentInitializedView<const TSchema extends ImplicitFieldSchema>(\n\tconfig: TreeViewConfiguration<TSchema>,\n\toptions: ForestOptions & ICodecOptions,\n\tcontent: ViewContent,\n): TreeViewAlpha<TSchema> {\n\tconst idCompressor: IIdCompressor = content.idCompressor;\n\tconst fieldBatchCodec = makeFieldBatchCodec(options, 1);\n\tconst schemaCodec = makeSchemaCodec(options, SchemaVersion.v1);\n\n\tconst schema = schemaCodec.decode(content.schema as Format);\n\tconst context: FieldBatchEncodingContext = {\n\t\tencodeType: TreeCompressionStrategy.Compressed,\n\t\tidCompressor,\n\t\toriginatorId: idCompressor.localSessionId, // Is this right? If so, why is is needed?\n\t\tschema: { schema, policy: defaultSchemaPolicy },\n\t};\n\n\tconst fieldCursors = fieldBatchCodec.decode(content.tree as JsonCompatibleReadOnly, context);\n\tassert(fieldCursors.length === 1, 0xa5b /* must have exactly 1 field in batch */);\n\n\treturn independentInitializedViewInternal(\n\t\tconfig,\n\t\toptions,\n\t\tschema,\n\t\t// Checked above.\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\tfieldCursors[0]!,\n\t\tidCompressor,\n\t);\n}\n\n/**\n * {@link independentInitializedView} but using internal types instead of persisted data formats.\n */\nexport function independentInitializedViewInternal<const TSchema extends ImplicitFieldSchema>(\n\tconfig: TreeViewConfiguration<TSchema>,\n\toptions: ForestOptions & ICodecOptions,\n\tschema: TreeStoredSchema,\n\trootFieldCursor: ITreeCursorSynchronous,\n\tidCompressor: IIdCompressor,\n): SchematizingSimpleTreeView<TSchema> {\n\tconst breaker = new Breakable(\"independentInitializedView\");\n\tconst revisionTagCodec = new RevisionTagCodec(idCompressor);\n\tconst mintRevisionTag = (): RevisionTag => idCompressor.generateCompressedId();\n\n\t// To ensure the forest is in schema when constructed, start it with an empty schema and set the schema repository content later.\n\tconst schemaRepository = new TreeStoredSchemaRepository();\n\n\tconst forest = buildConfiguredForest(\n\t\tbreaker,\n\t\toptions.forest ?? defaultSharedTreeOptions.forest,\n\t\tschemaRepository,\n\t\tidCompressor,\n\t);\n\n\tconst checkout = createTreeCheckout(idCompressor, mintRevisionTag, revisionTagCodec, {\n\t\tforest,\n\t\tschema: schemaRepository,\n\t\tbreaker,\n\t});\n\n\tinitialize(checkout, { schema, initialTree: rootFieldCursor });\n\treturn new SchematizingSimpleTreeView<TSchema>(\n\t\tcheckout,\n\t\tconfig,\n\t\tcreateNodeIdentifierManager(idCompressor),\n\t);\n}\n\n/**\n * The portion of SharedTree data typically persisted by the container.\n * Usable with {@link independentInitializedView} to create a {@link TreeView}\n * without loading a container.\n * @alpha\n */\nexport interface ViewContent {\n\t/**\n\t * Compressed tree from {@link (TreeAlpha:interface).exportCompressed}.\n\t * @remarks\n\t * This is an owning reference:\n\t * consumers of this content might modify this data in place (for example when applying edits) to avoid copying.\n\t */\n\treadonly tree: JsonCompatible<IFluidHandle>;\n\t/**\n\t * Persisted schema from {@link extractPersistedSchema}.\n\t */\n\treadonly schema: JsonCompatible;\n\t/**\n\t * IIdCompressor which will be used to decompress any compressed identifiers in `tree`\n\t * as well as for any other identifiers added to the view.\n\t */\n\treadonly idCompressor: IIdCompressor;\n}\n"]}
1
+ {"version":3,"file":"independentView.js","sourceRoot":"","sources":["../../src/shared-tree/independentView.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAEN,kBAAkB,GAClB,MAAM,wCAAwC,CAAC;AAGhD,OAAO,EAGN,gBAAgB,EAChB,aAAa,EAEb,0BAA0B,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,2BAA2B,EAC3B,mBAAmB,EACnB,eAAe,EAEf,mBAAmB,EACnB,uBAAuB,GACvB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAoD,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EACN,qBAAqB,EACrB,wBAAwB,GAExB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEvE;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC9B,MAAsC,EACtC,OAAqE;IAErE,MAAM,OAAO,GAAG,IAAI,SAAS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AAY,CAAC,CACzC,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\ttype IIdCompressor,\n\tcreateIdCompressor,\n} from \"@fluidframework/id-compressor/internal\";\n\nimport type { ICodecOptions } from \"../codec/index.js\";\nimport {\n\ttype ITreeCursorSynchronous,\n\ttype RevisionTag,\n\tRevisionTagCodec,\n\tSchemaVersion,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n} from \"../core/index.js\";\nimport {\n\tcreateNodeIdentifierManager,\n\tmakeFieldBatchCodec,\n\tmakeSchemaCodec,\n\ttype FieldBatchEncodingContext,\n\tdefaultSchemaPolicy,\n\tTreeCompressionStrategy,\n} from \"../feature-libraries/index.js\";\n// eslint-disable-next-line import/no-internal-modules\nimport type { Format } from \"../feature-libraries/schema-index/formatV1.js\";\nimport type {\n\tTreeViewConfiguration,\n\tImplicitFieldSchema,\n\tTreeViewAlpha,\n} from \"../simple-tree/index.js\";\nimport { type JsonCompatibleReadOnly, type JsonCompatible, Breakable } from \"../util/index.js\";\nimport {\n\tbuildConfiguredForest,\n\tdefaultSharedTreeOptions,\n\ttype ForestOptions,\n} from \"./sharedTree.js\";\nimport { createTreeCheckout } from \"./treeCheckout.js\";\nimport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\nimport { initialize, initializerFromChunk } from \"./schematizeTree.js\";\n\n/**\n * Create an uninitialized {@link TreeView} that is not tied to any {@link ITree} instance.\n *\n * @remarks\n * Such a view can never experience collaboration or be persisted to to a Fluid Container.\n *\n * This can be useful for testing, as well as use-cases like working on local files instead of documents stored in some Fluid service.\n * @alpha\n */\nexport function independentView<const TSchema extends ImplicitFieldSchema>(\n\tconfig: TreeViewConfiguration<TSchema>,\n\toptions: ForestOptions & { idCompressor?: IIdCompressor | undefined },\n): TreeViewAlpha<TSchema> {\n\tconst breaker = new Breakable(\"independentView\");\n\tconst idCompressor: IIdCompressor = options.idCompressor ?? createIdCompressor();\n\tconst mintRevisionTag = (): RevisionTag => idCompressor.generateCompressedId();\n\tconst revisionTagCodec = new RevisionTagCodec(idCompressor);\n\tconst schema = new TreeStoredSchemaRepository();\n\tconst forest = buildConfiguredForest(\n\t\tbreaker,\n\t\toptions.forest ?? defaultSharedTreeOptions.forest,\n\t\tschema,\n\t\tidCompressor,\n\t);\n\tconst checkout = createTreeCheckout(idCompressor, mintRevisionTag, revisionTagCodec, {\n\t\tforest,\n\t\tschema,\n\t\tbreaker,\n\t});\n\tconst out: TreeViewAlpha<TSchema> = new SchematizingSimpleTreeView<TSchema>(\n\t\tcheckout,\n\t\tconfig,\n\t\tcreateNodeIdentifierManager(idCompressor),\n\t);\n\treturn out;\n}\n/**\n * Create an initialized {@link TreeView} that is not tied to any {@link ITree} instance.\n *\n * @remarks\n * Such a view can never experience collaboration or be persisted to to a Fluid Container.\n *\n * This can be useful for testing, as well as use-cases like working on local files instead of documents stored in some Fluid service.\n * @privateRemarks\n * TODO: Providing an API which generates a {@link ViewableTree} extended with export options from {@link ITreeAlpha} and maybe even branching APIs would likely be better that just exposing a {@link TreeViewAlpha}.\n * @alpha\n */\nexport function independentInitializedView<const TSchema extends ImplicitFieldSchema>(\n\tconfig: TreeViewConfiguration<TSchema>,\n\toptions: ForestOptions & ICodecOptions,\n\tcontent: ViewContent,\n): TreeViewAlpha<TSchema> {\n\tconst idCompressor: IIdCompressor = content.idCompressor;\n\tconst fieldBatchCodec = makeFieldBatchCodec(options, 1);\n\tconst schemaCodec = makeSchemaCodec(options, SchemaVersion.v1);\n\n\tconst schema = schemaCodec.decode(content.schema as Format);\n\tconst context: FieldBatchEncodingContext = {\n\t\tencodeType: TreeCompressionStrategy.Compressed,\n\t\tidCompressor,\n\t\toriginatorId: idCompressor.localSessionId, // Is this right? If so, why is is needed?\n\t\tschema: { schema, policy: defaultSchemaPolicy },\n\t};\n\n\tconst fieldCursors = fieldBatchCodec.decode(content.tree as JsonCompatibleReadOnly, context);\n\tassert(fieldCursors.length === 1, 0xa5b /* must have exactly 1 field in batch */);\n\n\treturn independentInitializedViewInternal(\n\t\tconfig,\n\t\toptions,\n\t\tschema,\n\t\t// Checked above.\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\tfieldCursors[0]!,\n\t\tidCompressor,\n\t);\n}\n\n/**\n * {@link independentInitializedView} but using internal types instead of persisted data formats.\n */\nexport function independentInitializedViewInternal<const TSchema extends ImplicitFieldSchema>(\n\tconfig: TreeViewConfiguration<TSchema>,\n\toptions: ForestOptions & ICodecOptions,\n\tschema: TreeStoredSchema,\n\trootFieldCursor: ITreeCursorSynchronous,\n\tidCompressor: IIdCompressor,\n): SchematizingSimpleTreeView<TSchema> {\n\tconst breaker = new Breakable(\"independentInitializedView\");\n\tconst revisionTagCodec = new RevisionTagCodec(idCompressor);\n\tconst mintRevisionTag = (): RevisionTag => idCompressor.generateCompressedId();\n\n\t// To ensure the forest is in schema when constructed, start it with an empty schema and set the schema repository content later.\n\tconst schemaRepository = new TreeStoredSchemaRepository();\n\n\tconst forest = buildConfiguredForest(\n\t\tbreaker,\n\t\toptions.forest ?? defaultSharedTreeOptions.forest,\n\t\tschemaRepository,\n\t\tidCompressor,\n\t);\n\n\tconst checkout = createTreeCheckout(idCompressor, mintRevisionTag, revisionTagCodec, {\n\t\tforest,\n\t\tschema: schemaRepository,\n\t\tbreaker,\n\t});\n\n\tinitialize(\n\t\tcheckout,\n\t\tschema,\n\t\tinitializerFromChunk(checkout, () => checkout.forest.chunkField(rootFieldCursor)),\n\t);\n\treturn new SchematizingSimpleTreeView<TSchema>(\n\t\tcheckout,\n\t\tconfig,\n\t\tcreateNodeIdentifierManager(idCompressor),\n\t);\n}\n\n/**\n * The portion of SharedTree data typically persisted by the container.\n * Usable with {@link independentInitializedView} to create a {@link TreeView}\n * without loading a container.\n * @alpha\n */\nexport interface ViewContent {\n\t/**\n\t * Compressed tree from {@link (TreeAlpha:interface).exportCompressed}.\n\t * @remarks\n\t * This is an owning reference:\n\t * consumers of this content might modify this data in place (for example when applying edits) to avoid copying.\n\t */\n\treadonly tree: JsonCompatible<IFluidHandle>;\n\t/**\n\t * Persisted schema from {@link extractPersistedSchema}.\n\t */\n\treadonly schema: JsonCompatible;\n\t/**\n\t * IIdCompressor which will be used to decompress any compressed identifiers in `tree`\n\t * as well as for any other identifiers added to the view.\n\t */\n\treadonly idCompressor: IIdCompressor;\n}\n"]}
@@ -4,7 +4,6 @@
4
4
  */
5
5
  export { type ITreePrivate, type SharedTreeOptionsInternal, type SharedTreeOptions, SharedTreeKernel, getBranch, type ForestType, type SharedTreeContentSnapshot, type SharedTreeFormatOptions, SharedTreeFormatVersion, buildConfiguredForest, defaultSharedTreeOptions, type ForestOptions, type ITreeInternal, ForestTypeOptimized, ForestTypeExpensiveDebug, ForestTypeReference, exportSimpleSchema, type SharedTreeKernelView, persistedToSimpleSchema, } from "./sharedTree.js";
6
6
  export { createTreeCheckout, TreeCheckout, type ITreeCheckout, type CheckoutEvents, type ITreeCheckoutFork, type BranchableTree, type TreeBranchFork, } from "./treeCheckout.js";
7
- export { type TreeStoredContent } from "./schematizeTree.js";
8
7
  export { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
9
8
  export type { ISharedTreeEditor, ISchemaEditor, SharedTreeEditBuilder, } from "./sharedTreeEditBuilder.js";
10
9
  export { Tree } from "./tree.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,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,SAAS,EACT,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,oBAAoB,EACzB,uBAAuB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,kBAAkB,EAClB,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,cAAc,GACnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,YAAY,EACX,iBAAiB,EACjB,aAAa,EACb,qBAAqB,GACrB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EACN,SAAS,EACT,KAAK,mBAAmB,GACxB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACN,0BAA0B,EAC1B,KAAK,WAAW,EAChB,eAAe,GACf,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,SAAS,EACT,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,oBAAoB,EACzB,uBAAuB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,kBAAkB,EAClB,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,cAAc,GACnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,YAAY,EACX,iBAAiB,EACjB,aAAa,EACb,qBAAqB,GACrB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EACN,SAAS,EACT,KAAK,mBAAmB,GACxB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACN,0BAA0B,EAC1B,KAAK,WAAW,EAChB,eAAe,GACf,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAIN,gBAAgB,EAChB,SAAS,EAIT,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EAGxB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAElB,uBAAuB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,kBAAkB,EAClB,YAAY,GAMZ,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAQvE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EACN,SAAS,GAET,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACN,0BAA0B,EAE1B,eAAe,GACf,MAAM,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype ITreePrivate,\n\ttype SharedTreeOptionsInternal,\n\ttype SharedTreeOptions,\n\tSharedTreeKernel,\n\tgetBranch,\n\ttype ForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tbuildConfiguredForest,\n\tdefaultSharedTreeOptions,\n\ttype ForestOptions,\n\ttype ITreeInternal,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n\texportSimpleSchema,\n\ttype SharedTreeKernelView,\n\tpersistedToSimpleSchema,\n} from \"./sharedTree.js\";\n\nexport {\n\tcreateTreeCheckout,\n\tTreeCheckout,\n\ttype ITreeCheckout,\n\ttype CheckoutEvents,\n\ttype ITreeCheckoutFork,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n} from \"./treeCheckout.js\";\n\nexport { type TreeStoredContent } from \"./schematizeTree.js\";\n\nexport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\n\nexport type {\n\tISharedTreeEditor,\n\tISchemaEditor,\n\tSharedTreeEditBuilder,\n} from \"./sharedTreeEditBuilder.js\";\n\nexport { Tree } from \"./tree.js\";\nexport type { RunTransaction } from \"./tree.js\";\n\nexport {\n\tTreeAlpha,\n\ttype TreeIdentifierUtils,\n} from \"./treeAlpha.js\";\n\nexport {\n\tindependentInitializedView,\n\ttype ViewContent,\n\tindependentView,\n} from \"./independentView.js\";\n\nexport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAIN,gBAAgB,EAChB,SAAS,EAIT,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EAGxB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAElB,uBAAuB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,kBAAkB,EAClB,YAAY,GAMZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAQvE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EACN,SAAS,GAET,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACN,0BAA0B,EAE1B,eAAe,GACf,MAAM,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype ITreePrivate,\n\ttype SharedTreeOptionsInternal,\n\ttype SharedTreeOptions,\n\tSharedTreeKernel,\n\tgetBranch,\n\ttype ForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tbuildConfiguredForest,\n\tdefaultSharedTreeOptions,\n\ttype ForestOptions,\n\ttype ITreeInternal,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n\texportSimpleSchema,\n\ttype SharedTreeKernelView,\n\tpersistedToSimpleSchema,\n} from \"./sharedTree.js\";\n\nexport {\n\tcreateTreeCheckout,\n\tTreeCheckout,\n\ttype ITreeCheckout,\n\ttype CheckoutEvents,\n\ttype ITreeCheckoutFork,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n} from \"./treeCheckout.js\";\n\nexport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\n\nexport type {\n\tISharedTreeEditor,\n\tISchemaEditor,\n\tSharedTreeEditBuilder,\n} from \"./sharedTreeEditBuilder.js\";\n\nexport { Tree } from \"./tree.js\";\nexport type { RunTransaction } from \"./tree.js\";\n\nexport {\n\tTreeAlpha,\n\ttype TreeIdentifierUtils,\n} from \"./treeAlpha.js\";\n\nexport {\n\tindependentInitializedView,\n\ttype ViewContent,\n\tindependentView,\n} from \"./independentView.js\";\n\nexport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\n"]}
@@ -2,75 +2,38 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type ITreeCursorSynchronous, type TreeStoredSchema } from "../core/index.js";
6
- import { type SchemaCompatibilityTester } from "../simple-tree/index.js";
5
+ import { type TreeStoredSchema } from "../core/index.js";
6
+ import { type IDefaultEditBuilder, type TreeChunk } from "../feature-libraries/index.js";
7
7
  import type { ITreeCheckout } from "./treeCheckout.js";
8
- /**
9
- * Modify `storedSchema` and invoke `setInitialTree` when it's time to set the tree content.
10
- *
11
- * Requires `storedSchema` to be in its default/empty state.
12
- *
13
- * This is done in such a way that if the content (implicitly assumed to start empty)
14
- * is never out of schema.
15
- * This means that if the root field of the new schema requires content (like a value field),
16
- * a temporary intermediate schema is used so the initial empty state is not out of schema.
17
- *
18
- * Since this makes multiple changes, callers may want to wrap it in a transaction.
19
- */
20
- export declare function initializeContent(schemaRepository: {
21
- storedSchema: ITreeCheckout["storedSchema"];
22
- updateSchema: ITreeCheckout["updateSchema"];
23
- }, newSchema: TreeStoredSchema, setInitialTree: () => void): void;
24
- export declare enum UpdateType {
25
- /**
26
- * Already compatible, no update needed.
27
- */
28
- None = 0,
29
- /**
30
- * Schema can be upgraded leaving tree as is.
31
- */
32
- SchemaCompatible = 1,
33
- /**
34
- * No update currently supported.
35
- */
36
- Incompatible = 2
37
- }
38
- /**
39
- * Returns how compatible updating checkout's schema is with the viewSchema.
40
- */
41
- export declare function evaluateUpdate(viewSchema: SchemaCompatibilityTester, checkout: ITreeCheckout): UpdateType;
42
8
  export declare function canInitialize(checkout: ITreeCheckout): boolean;
43
9
  /**
44
10
  * Initialize a checkout with a schema and tree content.
45
11
  * This function should only be called when the tree is uninitialized (no schema or content).
46
- * @remarks
47
12
  *
48
- * If the proposed schema (from `treeContent`) is not compatible with the empty tree, this function handles using an intermediate schema
13
+ * @param checkout - The tree checkout to initialize.
14
+ * @param newSchema - The new schema to apply.
15
+ * @param contentFactory - A function that sets the initial tree content.
16
+ * Invoked after a schema containing all nodes from newSchema is applied.
17
+ * Note that the final root field schema may not have been applied yet: if the root is required, it will be optional at this time
18
+ * (so the root being empty before the insertion is not out of schema).
19
+ * @remarks
20
+ * If `newSchema` is not compatible with the empty tree, this function handles it using an intermediate schema
49
21
  * which supports the empty tree as well as the final tree content.
22
+ * @privateRemarks
23
+ * This takes in a checkout using a subset of the checkout interface to enable easier unit testing.
50
24
  */
51
- export declare function initialize(checkout: ITreeCheckout, treeContent: TreeStoredContent): void;
25
+ export declare function initialize(checkout: Pick<ITreeCheckout, "storedSchema" | "updateSchema">, newSchema: TreeStoredSchema, setInitialTree: () => void): void;
52
26
  /**
53
- * Ensure a {@link ITreeCheckout} can be used with a given {@link SchemaCompatibilityTester}.
54
- *
27
+ * Construct a general purpose `setInitialTree` for use with {@link initialize} from a function that returns a chunk.
28
+ * @param contentFactory - A function that returns the initial tree content as a chunk.
29
+ * Invoked after a schema containing all nodes from newSchema is applied.
30
+ * Note that the final root field schema may not have been applied yet: if the root is required, it will be optional at this time
31
+ * (so the root being empty before the insertion is not out of schema).
55
32
  * @remarks
56
- * It is up to the caller to ensure that compatibility is reevaluated if the checkout's stored schema is edited in the future.
57
- *
58
- * @param viewSchema - View schema that `checkout` should be made compatible with.
59
- * @param allowedSchemaModifications - Flags enum describing the ways this is allowed to modify `checkout`.
60
- * @param checkout - To be modified as needed to be compatible with `viewSchema`.
61
- * @param treeContent - Content to be used to initialize `checkout`'s the tree if needed and allowed.
62
- * @returns true iff checkout now is compatible with `viewSchema`.
63
- */
64
- export declare function ensureSchema(viewSchema: SchemaCompatibilityTester, checkout: ITreeCheckout): boolean;
65
- /**
66
- * Content that can populate a `SharedTree`.
33
+ * This does not support sequence roots as they are not allowed in the public API surface.
34
+ * A test utility for them can be found as `initializeSequenceRoot` for testing internal logic which uses a sequence root.
67
35
  */
68
- export interface TreeStoredContent {
69
- readonly schema: TreeStoredSchema;
70
- /**
71
- * Default tree content to initialize the tree with iff the tree is uninitialized
72
- * (meaning it does not even have any schema set at all).
73
- */
74
- readonly initialTree: readonly ITreeCursorSynchronous[] | ITreeCursorSynchronous | undefined;
75
- }
36
+ export declare function initializerFromChunk(checkout: Pick<ITreeCheckout, "storedSchema"> & {
37
+ readonly editor: IDefaultEditBuilder;
38
+ }, contentFactory: () => TreeChunk): () => void;
76
39
  //# sourceMappingURL=schematizeTree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schematizeTree.d.ts","sourceRoot":"","sources":["../../src/shared-tree/schematizeTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAEN,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EAGrB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EAAkB,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAGzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAChC,gBAAgB,EAAE;IACjB,YAAY,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC5C,YAAY,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;CAC5C,EACD,SAAS,EAAE,gBAAgB,EAC3B,cAAc,EAAE,MAAM,IAAI,GACxB,IAAI,CA4CN;AAED,oBAAY,UAAU;IACrB;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,gBAAgB,IAAA;IAChB;;OAEG;IACH,YAAY,IAAA;CACZ;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC7B,UAAU,EAAE,yBAAyB,EACrC,QAAQ,EAAE,aAAa,GACrB,UAAU,CAiBZ;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAG9D;AAoBD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAgCxF;AAED;;;;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