@fluidframework/tree 2.3.1 → 2.4.0-297027

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 (674) hide show
  1. package/api-report/tree.alpha.api.md +77 -38
  2. package/api-report/tree.beta.api.md +50 -30
  3. package/api-report/tree.legacy.alpha.api.md +50 -30
  4. package/api-report/tree.legacy.public.api.md +50 -30
  5. package/api-report/tree.public.api.md +50 -30
  6. package/dist/alpha.d.ts +7 -0
  7. package/dist/beta.d.ts +4 -0
  8. package/dist/core/index.d.ts +1 -1
  9. package/dist/core/index.d.ts.map +1 -1
  10. package/dist/core/index.js +2 -1
  11. package/dist/core/index.js.map +1 -1
  12. package/dist/core/rebase/index.d.ts +1 -1
  13. package/dist/core/rebase/index.d.ts.map +1 -1
  14. package/dist/core/rebase/index.js +2 -1
  15. package/dist/core/rebase/index.js.map +1 -1
  16. package/dist/core/rebase/types.d.ts +1 -0
  17. package/dist/core/rebase/types.d.ts.map +1 -1
  18. package/dist/core/rebase/types.js +8 -1
  19. package/dist/core/rebase/types.js.map +1 -1
  20. package/dist/core/schema-stored/schema.d.ts +7 -0
  21. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  22. package/dist/core/schema-stored/schema.js +9 -0
  23. package/dist/core/schema-stored/schema.js.map +1 -1
  24. package/dist/core/tree/anchorSet.d.ts +1 -2
  25. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  26. package/dist/core/tree/anchorSet.js +2 -2
  27. package/dist/core/tree/anchorSet.js.map +1 -1
  28. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  29. package/dist/core/tree/detachedFieldIndex.js +13 -2
  30. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  31. package/dist/core/tree/detachedFieldIndexTypes.d.ts +1 -1
  32. package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
  33. package/dist/feature-libraries/editableTreeBinder.d.ts +3 -230
  34. package/dist/feature-libraries/editableTreeBinder.d.ts.map +1 -1
  35. package/dist/feature-libraries/editableTreeBinder.js +1 -539
  36. package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
  37. package/dist/feature-libraries/flex-tree/context.d.ts +7 -14
  38. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  39. package/dist/feature-libraries/flex-tree/context.js +3 -3
  40. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  41. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -16
  42. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  43. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  44. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts +2 -3
  45. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  46. package/dist/feature-libraries/flex-tree/lazyEntity.js +1 -2
  47. package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  48. package/dist/feature-libraries/flex-tree/lazyField.d.ts +10 -15
  49. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  50. package/dist/feature-libraries/flex-tree/lazyField.js +18 -20
  51. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  52. package/dist/feature-libraries/flex-tree/lazyNode.d.ts +4 -5
  53. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  54. package/dist/feature-libraries/flex-tree/lazyNode.js +13 -23
  55. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  56. package/dist/feature-libraries/flex-tree/utilities.js +1 -1
  57. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  58. package/dist/feature-libraries/index.d.ts +4 -7
  59. package/dist/feature-libraries/index.d.ts.map +1 -1
  60. package/dist/feature-libraries/index.js +5 -31
  61. package/dist/feature-libraries/index.js.map +1 -1
  62. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +7 -0
  63. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  64. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +61 -17
  65. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  66. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  67. package/dist/feature-libraries/sequence-field/compose.js +3 -0
  68. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  69. package/dist/feature-libraries/sequence-field/formatV1.d.ts +18 -18
  70. package/dist/feature-libraries/sequence-field/formatV2.d.ts +18 -18
  71. package/dist/feature-libraries/sequence-field/formatV3.d.ts +27 -27
  72. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  73. package/dist/feature-libraries/sequence-field/utils.js +1 -4
  74. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  75. package/dist/feature-libraries/typed-schema/flexList.d.ts +1 -46
  76. package/dist/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
  77. package/dist/feature-libraries/typed-schema/flexList.js +1 -13
  78. package/dist/feature-libraries/typed-schema/flexList.js.map +1 -1
  79. package/dist/feature-libraries/typed-schema/index.d.ts +2 -4
  80. package/dist/feature-libraries/typed-schema/index.d.ts.map +1 -1
  81. package/dist/feature-libraries/typed-schema/index.js +1 -19
  82. package/dist/feature-libraries/typed-schema/index.js.map +1 -1
  83. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +0 -212
  84. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  85. package/dist/feature-libraries/typed-schema/typedTreeSchema.js +0 -266
  86. package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  87. package/dist/index.d.ts +3 -3
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +2 -1
  90. package/dist/index.js.map +1 -1
  91. package/dist/internalTypes.d.ts +1 -1
  92. package/dist/internalTypes.d.ts.map +1 -1
  93. package/dist/internalTypes.js.map +1 -1
  94. package/dist/legacy.d.ts +4 -0
  95. package/dist/packageVersion.d.ts +1 -1
  96. package/dist/packageVersion.d.ts.map +1 -1
  97. package/dist/packageVersion.js +1 -1
  98. package/dist/packageVersion.js.map +1 -1
  99. package/dist/public.d.ts +4 -0
  100. package/dist/shared-tree/checkoutFlexTreeView.d.ts +3 -3
  101. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  102. package/dist/shared-tree/checkoutFlexTreeView.js +1 -1
  103. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
  104. package/dist/shared-tree/index.d.ts +3 -3
  105. package/dist/shared-tree/index.d.ts.map +1 -1
  106. package/dist/shared-tree/index.js +2 -3
  107. package/dist/shared-tree/index.js.map +1 -1
  108. package/dist/shared-tree/schematizeTree.d.ts +1 -40
  109. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  110. package/dist/shared-tree/schematizeTree.js +2 -11
  111. package/dist/shared-tree/schematizeTree.js.map +1 -1
  112. package/dist/shared-tree/schematizingTreeView.d.ts +9 -7
  113. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  114. package/dist/shared-tree/schematizingTreeView.js +19 -8
  115. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  116. package/dist/shared-tree/sharedTree.d.ts +19 -2
  117. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  118. package/dist/shared-tree/sharedTree.js +10 -2
  119. package/dist/shared-tree/sharedTree.js.map +1 -1
  120. package/dist/shared-tree/treeCheckout.d.ts +71 -41
  121. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  122. package/dist/shared-tree/treeCheckout.js +116 -84
  123. package/dist/shared-tree/treeCheckout.js.map +1 -1
  124. package/dist/shared-tree-core/branch.d.ts +8 -11
  125. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  126. package/dist/shared-tree-core/branch.js +12 -15
  127. package/dist/shared-tree-core/branch.js.map +1 -1
  128. package/dist/simple-tree/api/create.d.ts +1 -1
  129. package/dist/simple-tree/api/create.d.ts.map +1 -1
  130. package/dist/simple-tree/api/create.js +11 -13
  131. package/dist/simple-tree/api/create.js.map +1 -1
  132. package/dist/simple-tree/api/getJsonSchema.d.ts +3 -3
  133. package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
  134. package/dist/simple-tree/api/getJsonSchema.js +1 -1
  135. package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
  136. package/dist/simple-tree/api/getSimpleSchema.d.ts +2 -2
  137. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  138. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  139. package/dist/simple-tree/api/index.d.ts +2 -1
  140. package/dist/simple-tree/api/index.d.ts.map +1 -1
  141. package/dist/simple-tree/api/index.js +3 -1
  142. package/dist/simple-tree/api/index.js.map +1 -1
  143. package/dist/simple-tree/api/jsonSchema.d.ts +13 -14
  144. package/dist/simple-tree/api/jsonSchema.d.ts.map +1 -1
  145. package/dist/simple-tree/api/jsonSchema.js.map +1 -1
  146. package/dist/simple-tree/api/schemaFactory.d.ts +14 -8
  147. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  148. package/dist/simple-tree/api/schemaFactory.js +21 -2
  149. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  150. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +3 -3
  151. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  152. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  153. package/dist/simple-tree/api/simpleSchema.d.ts +18 -10
  154. package/dist/simple-tree/api/simpleSchema.d.ts.map +1 -1
  155. package/dist/simple-tree/api/simpleSchema.js.map +1 -1
  156. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  157. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +30 -17
  158. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  159. package/dist/simple-tree/api/tree.d.ts +16 -6
  160. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  161. package/dist/simple-tree/api/tree.js +4 -4
  162. package/dist/simple-tree/api/tree.js.map +1 -1
  163. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  164. package/dist/simple-tree/api/treeNodeApi.js +8 -6
  165. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  166. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  167. package/dist/simple-tree/api/verboseTree.js +6 -10
  168. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  169. package/{lib/feature-libraries/typed-schema → dist/simple-tree/api}/view.d.ts +4 -11
  170. package/dist/simple-tree/api/view.d.ts.map +1 -0
  171. package/dist/{feature-libraries/typed-schema → simple-tree/api}/view.js +9 -9
  172. package/dist/simple-tree/api/view.js.map +1 -0
  173. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +2 -2
  174. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  175. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +11 -1
  176. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  177. package/dist/simple-tree/arrayNode.d.ts +147 -14
  178. package/dist/simple-tree/arrayNode.d.ts.map +1 -1
  179. package/dist/simple-tree/arrayNode.js +32 -20
  180. package/dist/simple-tree/arrayNode.js.map +1 -1
  181. package/dist/simple-tree/core/context.d.ts +55 -0
  182. package/dist/simple-tree/core/context.d.ts.map +1 -0
  183. package/dist/simple-tree/core/context.js +60 -0
  184. package/dist/simple-tree/core/context.js.map +1 -0
  185. package/dist/simple-tree/core/getOrCreateNode.d.ts +15 -0
  186. package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -0
  187. package/dist/simple-tree/core/getOrCreateNode.js +36 -0
  188. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -0
  189. package/dist/simple-tree/core/index.d.ts +7 -3
  190. package/dist/simple-tree/core/index.d.ts.map +1 -1
  191. package/dist/simple-tree/core/index.js +16 -7
  192. package/dist/simple-tree/core/index.js.map +1 -1
  193. package/dist/simple-tree/core/schemaCaching.d.ts +5 -13
  194. package/dist/simple-tree/core/schemaCaching.d.ts.map +1 -1
  195. package/dist/simple-tree/core/schemaCaching.js +16 -45
  196. package/dist/simple-tree/core/schemaCaching.js.map +1 -1
  197. package/dist/simple-tree/core/treeNodeKernel.d.ts +29 -7
  198. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  199. package/dist/simple-tree/core/treeNodeKernel.js +94 -58
  200. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  201. package/dist/simple-tree/core/treeNodeSchema.d.ts +24 -0
  202. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  203. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  204. package/dist/simple-tree/core/types.d.ts +0 -5
  205. package/dist/simple-tree/core/types.d.ts.map +1 -1
  206. package/dist/simple-tree/core/types.js.map +1 -1
  207. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +139 -0
  208. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -0
  209. package/dist/{feature-libraries/flex-map-tree/mapTreeNode.js → simple-tree/core/unhydratedFlexTree.js} +112 -132
  210. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -0
  211. package/dist/simple-tree/{walkSchema.d.ts → core/walkSchema.d.ts} +8 -4
  212. package/dist/simple-tree/core/walkSchema.d.ts.map +1 -0
  213. package/dist/simple-tree/core/walkSchema.js +34 -0
  214. package/dist/simple-tree/core/walkSchema.js.map +1 -0
  215. package/dist/simple-tree/createContext.d.ts +11 -0
  216. package/dist/simple-tree/createContext.d.ts.map +1 -0
  217. package/dist/simple-tree/createContext.js +25 -0
  218. package/dist/simple-tree/createContext.js.map +1 -0
  219. package/dist/simple-tree/index.d.ts +4 -5
  220. package/dist/simple-tree/index.d.ts.map +1 -1
  221. package/dist/simple-tree/index.js +7 -7
  222. package/dist/simple-tree/index.js.map +1 -1
  223. package/dist/simple-tree/leafNodeSchema.d.ts +1 -0
  224. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  225. package/dist/simple-tree/leafNodeSchema.js +1 -2
  226. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  227. package/dist/simple-tree/mapNode.d.ts +4 -4
  228. package/dist/simple-tree/mapNode.d.ts.map +1 -1
  229. package/dist/simple-tree/mapNode.js +9 -5
  230. package/dist/simple-tree/mapNode.js.map +1 -1
  231. package/dist/simple-tree/objectNode.d.ts +8 -8
  232. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  233. package/dist/simple-tree/objectNode.js +33 -14
  234. package/dist/simple-tree/objectNode.js.map +1 -1
  235. package/dist/simple-tree/objectNodeTypes.d.ts +7 -3
  236. package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -1
  237. package/dist/simple-tree/objectNodeTypes.js.map +1 -1
  238. package/dist/simple-tree/proxies.d.ts +1 -2
  239. package/dist/simple-tree/proxies.d.ts.map +1 -1
  240. package/dist/simple-tree/proxies.js +6 -22
  241. package/dist/simple-tree/proxies.js.map +1 -1
  242. package/dist/simple-tree/schemaTypes.d.ts +44 -4
  243. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  244. package/dist/simple-tree/schemaTypes.js +10 -0
  245. package/dist/simple-tree/schemaTypes.js.map +1 -1
  246. package/dist/simple-tree/toFlexSchema.d.ts +6 -36
  247. package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
  248. package/dist/simple-tree/toFlexSchema.js +58 -142
  249. package/dist/simple-tree/toFlexSchema.js.map +1 -1
  250. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  251. package/dist/simple-tree/toMapTree.js +2 -2
  252. package/dist/simple-tree/toMapTree.js.map +1 -1
  253. package/dist/simple-tree/treeNodeValid.d.ts +13 -5
  254. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  255. package/dist/simple-tree/treeNodeValid.js +19 -10
  256. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  257. package/dist/simple-tree/typesUnsafe.d.ts +4 -4
  258. package/dist/simple-tree/typesUnsafe.d.ts.map +1 -1
  259. package/dist/simple-tree/typesUnsafe.js.map +1 -1
  260. package/dist/simple-tree/walkFieldSchema.d.ts +11 -0
  261. package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -0
  262. package/dist/simple-tree/walkFieldSchema.js +17 -0
  263. package/dist/simple-tree/walkFieldSchema.js.map +1 -0
  264. package/dist/util/index.d.ts +1 -1
  265. package/dist/util/index.d.ts.map +1 -1
  266. package/dist/util/index.js.map +1 -1
  267. package/dist/util/typeUtils.d.ts +14 -45
  268. package/dist/util/typeUtils.d.ts.map +1 -1
  269. package/dist/util/typeUtils.js.map +1 -1
  270. package/lib/alpha.d.ts +7 -0
  271. package/lib/beta.d.ts +4 -0
  272. package/lib/core/index.d.ts +1 -1
  273. package/lib/core/index.d.ts.map +1 -1
  274. package/lib/core/index.js +1 -1
  275. package/lib/core/index.js.map +1 -1
  276. package/lib/core/rebase/index.d.ts +1 -1
  277. package/lib/core/rebase/index.d.ts.map +1 -1
  278. package/lib/core/rebase/index.js +1 -1
  279. package/lib/core/rebase/index.js.map +1 -1
  280. package/lib/core/rebase/types.d.ts +1 -0
  281. package/lib/core/rebase/types.d.ts.map +1 -1
  282. package/lib/core/rebase/types.js +6 -0
  283. package/lib/core/rebase/types.js.map +1 -1
  284. package/lib/core/schema-stored/schema.d.ts +7 -0
  285. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  286. package/lib/core/schema-stored/schema.js +9 -0
  287. package/lib/core/schema-stored/schema.js.map +1 -1
  288. package/lib/core/tree/anchorSet.d.ts +1 -2
  289. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  290. package/lib/core/tree/anchorSet.js +2 -2
  291. package/lib/core/tree/anchorSet.js.map +1 -1
  292. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  293. package/lib/core/tree/detachedFieldIndex.js +13 -2
  294. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  295. package/lib/core/tree/detachedFieldIndexTypes.d.ts +1 -1
  296. package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
  297. package/lib/feature-libraries/editableTreeBinder.d.ts +3 -230
  298. package/lib/feature-libraries/editableTreeBinder.d.ts.map +1 -1
  299. package/lib/feature-libraries/editableTreeBinder.js +1 -532
  300. package/lib/feature-libraries/editableTreeBinder.js.map +1 -1
  301. package/lib/feature-libraries/flex-tree/context.d.ts +7 -14
  302. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  303. package/lib/feature-libraries/flex-tree/context.js +3 -3
  304. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  305. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -16
  306. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  307. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  308. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +2 -3
  309. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  310. package/lib/feature-libraries/flex-tree/lazyEntity.js +1 -2
  311. package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  312. package/lib/feature-libraries/flex-tree/lazyField.d.ts +10 -15
  313. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  314. package/lib/feature-libraries/flex-tree/lazyField.js +18 -20
  315. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  316. package/lib/feature-libraries/flex-tree/lazyNode.d.ts +4 -5
  317. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  318. package/lib/feature-libraries/flex-tree/lazyNode.js +13 -23
  319. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  320. package/lib/feature-libraries/flex-tree/utilities.js +1 -1
  321. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  322. package/lib/feature-libraries/index.d.ts +4 -7
  323. package/lib/feature-libraries/index.d.ts.map +1 -1
  324. package/lib/feature-libraries/index.js +4 -6
  325. package/lib/feature-libraries/index.js.map +1 -1
  326. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +7 -0
  327. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  328. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +62 -18
  329. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  330. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  331. package/lib/feature-libraries/sequence-field/compose.js +3 -0
  332. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  333. package/lib/feature-libraries/sequence-field/formatV1.d.ts +18 -18
  334. package/lib/feature-libraries/sequence-field/formatV2.d.ts +18 -18
  335. package/lib/feature-libraries/sequence-field/formatV3.d.ts +27 -27
  336. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  337. package/lib/feature-libraries/sequence-field/utils.js +2 -5
  338. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  339. package/lib/feature-libraries/typed-schema/flexList.d.ts +1 -46
  340. package/lib/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
  341. package/lib/feature-libraries/typed-schema/flexList.js +0 -11
  342. package/lib/feature-libraries/typed-schema/flexList.js.map +1 -1
  343. package/lib/feature-libraries/typed-schema/index.d.ts +2 -4
  344. package/lib/feature-libraries/typed-schema/index.d.ts.map +1 -1
  345. package/lib/feature-libraries/typed-schema/index.js +0 -3
  346. package/lib/feature-libraries/typed-schema/index.js.map +1 -1
  347. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +0 -212
  348. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  349. package/lib/feature-libraries/typed-schema/typedTreeSchema.js +1 -253
  350. package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  351. package/lib/index.d.ts +3 -3
  352. package/lib/index.d.ts.map +1 -1
  353. package/lib/index.js +1 -1
  354. package/lib/index.js.map +1 -1
  355. package/lib/internalTypes.d.ts +1 -1
  356. package/lib/internalTypes.d.ts.map +1 -1
  357. package/lib/internalTypes.js.map +1 -1
  358. package/lib/legacy.d.ts +4 -0
  359. package/lib/packageVersion.d.ts +1 -1
  360. package/lib/packageVersion.d.ts.map +1 -1
  361. package/lib/packageVersion.js +1 -1
  362. package/lib/packageVersion.js.map +1 -1
  363. package/lib/public.d.ts +4 -0
  364. package/lib/shared-tree/checkoutFlexTreeView.d.ts +3 -3
  365. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  366. package/lib/shared-tree/checkoutFlexTreeView.js +1 -1
  367. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
  368. package/lib/shared-tree/index.d.ts +3 -3
  369. package/lib/shared-tree/index.d.ts.map +1 -1
  370. package/lib/shared-tree/index.js +1 -2
  371. package/lib/shared-tree/index.js.map +1 -1
  372. package/lib/shared-tree/schematizeTree.d.ts +1 -40
  373. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  374. package/lib/shared-tree/schematizeTree.js +1 -9
  375. package/lib/shared-tree/schematizeTree.js.map +1 -1
  376. package/lib/shared-tree/schematizingTreeView.d.ts +9 -7
  377. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  378. package/lib/shared-tree/schematizingTreeView.js +22 -11
  379. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  380. package/lib/shared-tree/sharedTree.d.ts +19 -2
  381. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  382. package/lib/shared-tree/sharedTree.js +10 -3
  383. package/lib/shared-tree/sharedTree.js.map +1 -1
  384. package/lib/shared-tree/treeCheckout.d.ts +71 -41
  385. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  386. package/lib/shared-tree/treeCheckout.js +118 -86
  387. package/lib/shared-tree/treeCheckout.js.map +1 -1
  388. package/lib/shared-tree-core/branch.d.ts +8 -11
  389. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  390. package/lib/shared-tree-core/branch.js +12 -15
  391. package/lib/shared-tree-core/branch.js.map +1 -1
  392. package/lib/simple-tree/api/create.d.ts +1 -1
  393. package/lib/simple-tree/api/create.d.ts.map +1 -1
  394. package/lib/simple-tree/api/create.js +14 -16
  395. package/lib/simple-tree/api/create.js.map +1 -1
  396. package/lib/simple-tree/api/getJsonSchema.d.ts +3 -3
  397. package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
  398. package/lib/simple-tree/api/getJsonSchema.js +1 -1
  399. package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
  400. package/lib/simple-tree/api/getSimpleSchema.d.ts +2 -2
  401. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  402. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
  403. package/lib/simple-tree/api/index.d.ts +2 -1
  404. package/lib/simple-tree/api/index.d.ts.map +1 -1
  405. package/lib/simple-tree/api/index.js +1 -0
  406. package/lib/simple-tree/api/index.js.map +1 -1
  407. package/lib/simple-tree/api/jsonSchema.d.ts +13 -14
  408. package/lib/simple-tree/api/jsonSchema.d.ts.map +1 -1
  409. package/lib/simple-tree/api/jsonSchema.js.map +1 -1
  410. package/lib/simple-tree/api/schemaFactory.d.ts +14 -8
  411. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  412. package/lib/simple-tree/api/schemaFactory.js +21 -2
  413. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  414. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +3 -3
  415. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  416. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  417. package/lib/simple-tree/api/simpleSchema.d.ts +18 -10
  418. package/lib/simple-tree/api/simpleSchema.d.ts.map +1 -1
  419. package/lib/simple-tree/api/simpleSchema.js.map +1 -1
  420. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  421. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +31 -18
  422. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  423. package/lib/simple-tree/api/tree.d.ts +16 -6
  424. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  425. package/lib/simple-tree/api/tree.js +4 -4
  426. package/lib/simple-tree/api/tree.js.map +1 -1
  427. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  428. package/lib/simple-tree/api/treeNodeApi.js +10 -8
  429. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  430. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  431. package/lib/simple-tree/api/verboseTree.js +6 -10
  432. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  433. package/{dist/feature-libraries/typed-schema → lib/simple-tree/api}/view.d.ts +4 -11
  434. package/lib/simple-tree/api/view.d.ts.map +1 -0
  435. package/lib/{feature-libraries/typed-schema → simple-tree/api}/view.js +9 -9
  436. package/lib/simple-tree/api/view.js.map +1 -0
  437. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +2 -2
  438. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  439. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +11 -1
  440. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  441. package/lib/simple-tree/arrayNode.d.ts +147 -14
  442. package/lib/simple-tree/arrayNode.d.ts.map +1 -1
  443. package/lib/simple-tree/arrayNode.js +37 -25
  444. package/lib/simple-tree/arrayNode.js.map +1 -1
  445. package/lib/simple-tree/core/context.d.ts +55 -0
  446. package/lib/simple-tree/core/context.d.ts.map +1 -0
  447. package/lib/simple-tree/core/context.js +55 -0
  448. package/lib/simple-tree/core/context.js.map +1 -0
  449. package/lib/simple-tree/core/getOrCreateNode.d.ts +15 -0
  450. package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -0
  451. package/lib/simple-tree/core/getOrCreateNode.js +32 -0
  452. package/lib/simple-tree/core/getOrCreateNode.js.map +1 -0
  453. package/lib/simple-tree/core/index.d.ts +7 -3
  454. package/lib/simple-tree/core/index.d.ts.map +1 -1
  455. package/lib/simple-tree/core/index.js +6 -2
  456. package/lib/simple-tree/core/index.js.map +1 -1
  457. package/lib/simple-tree/core/schemaCaching.d.ts +5 -13
  458. package/lib/simple-tree/core/schemaCaching.d.ts.map +1 -1
  459. package/lib/simple-tree/core/schemaCaching.js +13 -39
  460. package/lib/simple-tree/core/schemaCaching.js.map +1 -1
  461. package/lib/simple-tree/core/treeNodeKernel.d.ts +29 -7
  462. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  463. package/lib/simple-tree/core/treeNodeKernel.js +89 -54
  464. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  465. package/lib/simple-tree/core/treeNodeSchema.d.ts +24 -0
  466. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  467. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  468. package/lib/simple-tree/core/types.d.ts +0 -5
  469. package/lib/simple-tree/core/types.d.ts.map +1 -1
  470. package/lib/simple-tree/core/types.js.map +1 -1
  471. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +139 -0
  472. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -0
  473. package/lib/{feature-libraries/flex-map-tree/mapTreeNode.js → simple-tree/core/unhydratedFlexTree.js} +110 -128
  474. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -0
  475. package/lib/simple-tree/{walkSchema.d.ts → core/walkSchema.d.ts} +8 -4
  476. package/lib/simple-tree/core/walkSchema.d.ts.map +1 -0
  477. package/lib/simple-tree/core/walkSchema.js +29 -0
  478. package/lib/simple-tree/core/walkSchema.js.map +1 -0
  479. package/lib/simple-tree/createContext.d.ts +11 -0
  480. package/lib/simple-tree/createContext.d.ts.map +1 -0
  481. package/lib/simple-tree/createContext.js +21 -0
  482. package/lib/simple-tree/createContext.js.map +1 -0
  483. package/lib/simple-tree/index.d.ts +4 -5
  484. package/lib/simple-tree/index.d.ts.map +1 -1
  485. package/lib/simple-tree/index.js +3 -4
  486. package/lib/simple-tree/index.js.map +1 -1
  487. package/lib/simple-tree/leafNodeSchema.d.ts +1 -0
  488. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  489. package/lib/simple-tree/leafNodeSchema.js +3 -4
  490. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  491. package/lib/simple-tree/mapNode.d.ts +4 -4
  492. package/lib/simple-tree/mapNode.d.ts.map +1 -1
  493. package/lib/simple-tree/mapNode.js +12 -8
  494. package/lib/simple-tree/mapNode.js.map +1 -1
  495. package/lib/simple-tree/objectNode.d.ts +8 -8
  496. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  497. package/lib/simple-tree/objectNode.js +36 -17
  498. package/lib/simple-tree/objectNode.js.map +1 -1
  499. package/lib/simple-tree/objectNodeTypes.d.ts +7 -3
  500. package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -1
  501. package/lib/simple-tree/objectNodeTypes.js.map +1 -1
  502. package/lib/simple-tree/proxies.d.ts +1 -2
  503. package/lib/simple-tree/proxies.d.ts.map +1 -1
  504. package/lib/simple-tree/proxies.js +7 -22
  505. package/lib/simple-tree/proxies.js.map +1 -1
  506. package/lib/simple-tree/schemaTypes.d.ts +44 -4
  507. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  508. package/lib/simple-tree/schemaTypes.js +10 -0
  509. package/lib/simple-tree/schemaTypes.js.map +1 -1
  510. package/lib/simple-tree/toFlexSchema.d.ts +6 -36
  511. package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
  512. package/lib/simple-tree/toFlexSchema.js +61 -142
  513. package/lib/simple-tree/toFlexSchema.js.map +1 -1
  514. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  515. package/lib/simple-tree/toMapTree.js +4 -4
  516. package/lib/simple-tree/toMapTree.js.map +1 -1
  517. package/lib/simple-tree/treeNodeValid.d.ts +13 -5
  518. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  519. package/lib/simple-tree/treeNodeValid.js +21 -12
  520. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  521. package/lib/simple-tree/typesUnsafe.d.ts +4 -4
  522. package/lib/simple-tree/typesUnsafe.d.ts.map +1 -1
  523. package/lib/simple-tree/typesUnsafe.js.map +1 -1
  524. package/lib/simple-tree/walkFieldSchema.d.ts +11 -0
  525. package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -0
  526. package/lib/simple-tree/walkFieldSchema.js +13 -0
  527. package/lib/simple-tree/walkFieldSchema.js.map +1 -0
  528. package/lib/util/index.d.ts +1 -1
  529. package/lib/util/index.d.ts.map +1 -1
  530. package/lib/util/index.js.map +1 -1
  531. package/lib/util/typeUtils.d.ts +14 -45
  532. package/lib/util/typeUtils.d.ts.map +1 -1
  533. package/lib/util/typeUtils.js.map +1 -1
  534. package/package.json +41 -22
  535. package/src/core/index.ts +1 -0
  536. package/src/core/rebase/index.ts +1 -0
  537. package/src/core/rebase/types.ts +11 -0
  538. package/src/core/schema-stored/schema.ts +18 -0
  539. package/src/core/tree/anchorSet.ts +3 -4
  540. package/src/core/tree/detachedFieldIndex.ts +14 -3
  541. package/src/core/tree/detachedFieldIndexTypes.ts +1 -1
  542. package/src/feature-libraries/editableTreeBinder.ts +2 -915
  543. package/src/feature-libraries/flex-tree/context.ts +7 -20
  544. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +2 -18
  545. package/src/feature-libraries/flex-tree/lazyEntity.ts +1 -4
  546. package/src/feature-libraries/flex-tree/lazyField.ts +22 -78
  547. package/src/feature-libraries/flex-tree/lazyNode.ts +24 -39
  548. package/src/feature-libraries/flex-tree/utilities.ts +1 -1
  549. package/src/feature-libraries/index.ts +3 -71
  550. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +97 -10
  551. package/src/feature-libraries/sequence-field/compose.ts +3 -0
  552. package/src/feature-libraries/sequence-field/utils.ts +2 -4
  553. package/src/feature-libraries/typed-schema/flexList.ts +3 -84
  554. package/src/feature-libraries/typed-schema/index.ts +1 -33
  555. package/src/feature-libraries/typed-schema/typedTreeSchema.ts +0 -458
  556. package/src/index.ts +7 -0
  557. package/src/internalTypes.ts +0 -1
  558. package/src/packageVersion.ts +1 -1
  559. package/src/shared-tree/checkoutFlexTreeView.ts +3 -3
  560. package/src/shared-tree/index.ts +4 -8
  561. package/src/shared-tree/schematizeTree.ts +2 -56
  562. package/src/shared-tree/schematizingTreeView.ts +38 -15
  563. package/src/shared-tree/sharedTree.ts +36 -8
  564. package/src/shared-tree/treeCheckout.ts +225 -128
  565. package/src/shared-tree-core/branch.ts +15 -26
  566. package/src/simple-tree/api/create.ts +18 -20
  567. package/src/simple-tree/api/getJsonSchema.ts +3 -3
  568. package/src/simple-tree/api/getSimpleSchema.ts +2 -2
  569. package/src/simple-tree/api/index.ts +2 -0
  570. package/src/simple-tree/api/jsonSchema.ts +19 -17
  571. package/src/simple-tree/api/schemaFactory.ts +53 -18
  572. package/src/simple-tree/api/schemaFactoryRecursive.ts +3 -6
  573. package/src/simple-tree/api/simpleSchema.ts +20 -10
  574. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +40 -19
  575. package/src/simple-tree/api/tree.ts +20 -9
  576. package/src/simple-tree/api/treeNodeApi.ts +12 -10
  577. package/src/simple-tree/api/verboseTree.ts +6 -12
  578. package/src/{feature-libraries/typed-schema → simple-tree/api}/view.ts +9 -22
  579. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +18 -4
  580. package/src/simple-tree/arrayNode.ts +202 -53
  581. package/src/simple-tree/core/context.ts +78 -0
  582. package/src/simple-tree/core/getOrCreateNode.ts +38 -0
  583. package/src/simple-tree/core/index.ts +11 -7
  584. package/src/simple-tree/core/schemaCaching.ts +13 -50
  585. package/src/simple-tree/core/treeNodeKernel.ts +117 -78
  586. package/src/simple-tree/core/treeNodeSchema.ts +35 -1
  587. package/src/simple-tree/core/types.ts +0 -5
  588. package/src/{feature-libraries/flex-map-tree/mapTreeNode.ts → simple-tree/core/unhydratedFlexTree.ts} +167 -210
  589. package/src/simple-tree/{walkSchema.ts → core/walkSchema.ts} +12 -34
  590. package/src/simple-tree/createContext.ts +24 -0
  591. package/src/simple-tree/index.ts +6 -2
  592. package/src/simple-tree/leafNodeSchema.ts +3 -9
  593. package/src/simple-tree/mapNode.ts +20 -17
  594. package/src/simple-tree/objectNode.ts +63 -38
  595. package/src/simple-tree/objectNodeTypes.ts +8 -5
  596. package/src/simple-tree/proxies.ts +8 -26
  597. package/src/simple-tree/schemaTypes.ts +55 -5
  598. package/src/simple-tree/toFlexSchema.ts +71 -204
  599. package/src/simple-tree/toMapTree.ts +5 -5
  600. package/src/simple-tree/treeNodeValid.ts +28 -22
  601. package/src/simple-tree/typesUnsafe.ts +4 -4
  602. package/src/simple-tree/walkFieldSchema.ts +19 -0
  603. package/src/util/index.ts +1 -5
  604. package/src/util/typeUtils.ts +14 -56
  605. package/dist/feature-libraries/fieldGenerator.d.ts +0 -43
  606. package/dist/feature-libraries/fieldGenerator.d.ts.map +0 -1
  607. package/dist/feature-libraries/fieldGenerator.js +0 -13
  608. package/dist/feature-libraries/fieldGenerator.js.map +0 -1
  609. package/dist/feature-libraries/flex-map-tree/index.d.ts +0 -6
  610. package/dist/feature-libraries/flex-map-tree/index.d.ts.map +0 -1
  611. package/dist/feature-libraries/flex-map-tree/index.js +0 -14
  612. package/dist/feature-libraries/flex-map-tree/index.js.map +0 -1
  613. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts +0 -157
  614. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +0 -1
  615. package/dist/feature-libraries/flex-map-tree/mapTreeNode.js.map +0 -1
  616. package/dist/feature-libraries/storedToViewSchema.d.ts +0 -17
  617. package/dist/feature-libraries/storedToViewSchema.d.ts.map +0 -1
  618. package/dist/feature-libraries/storedToViewSchema.js +0 -67
  619. package/dist/feature-libraries/storedToViewSchema.js.map +0 -1
  620. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts +0 -58
  621. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +0 -1
  622. package/dist/feature-libraries/typed-schema/schemaCollection.js +0 -160
  623. package/dist/feature-libraries/typed-schema/schemaCollection.js.map +0 -1
  624. package/dist/feature-libraries/typed-schema/typeUtils.d.ts +0 -15
  625. package/dist/feature-libraries/typed-schema/typeUtils.d.ts.map +0 -1
  626. package/dist/feature-libraries/typed-schema/typeUtils.js +0 -14
  627. package/dist/feature-libraries/typed-schema/typeUtils.js.map +0 -1
  628. package/dist/feature-libraries/typed-schema/view.d.ts.map +0 -1
  629. package/dist/feature-libraries/typed-schema/view.js.map +0 -1
  630. package/dist/simple-tree/getSimpleFieldSchema.d.ts +0 -14
  631. package/dist/simple-tree/getSimpleFieldSchema.d.ts.map +0 -1
  632. package/dist/simple-tree/getSimpleFieldSchema.js +0 -29
  633. package/dist/simple-tree/getSimpleFieldSchema.js.map +0 -1
  634. package/dist/simple-tree/walkSchema.d.ts.map +0 -1
  635. package/dist/simple-tree/walkSchema.js +0 -49
  636. package/dist/simple-tree/walkSchema.js.map +0 -1
  637. package/lib/feature-libraries/fieldGenerator.d.ts +0 -43
  638. package/lib/feature-libraries/fieldGenerator.d.ts.map +0 -1
  639. package/lib/feature-libraries/fieldGenerator.js +0 -12
  640. package/lib/feature-libraries/fieldGenerator.js.map +0 -1
  641. package/lib/feature-libraries/flex-map-tree/index.d.ts +0 -6
  642. package/lib/feature-libraries/flex-map-tree/index.d.ts.map +0 -1
  643. package/lib/feature-libraries/flex-map-tree/index.js +0 -6
  644. package/lib/feature-libraries/flex-map-tree/index.js.map +0 -1
  645. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts +0 -157
  646. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +0 -1
  647. package/lib/feature-libraries/flex-map-tree/mapTreeNode.js.map +0 -1
  648. package/lib/feature-libraries/storedToViewSchema.d.ts +0 -17
  649. package/lib/feature-libraries/storedToViewSchema.d.ts.map +0 -1
  650. package/lib/feature-libraries/storedToViewSchema.js +0 -62
  651. package/lib/feature-libraries/storedToViewSchema.js.map +0 -1
  652. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts +0 -58
  653. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +0 -1
  654. package/lib/feature-libraries/typed-schema/schemaCollection.js +0 -153
  655. package/lib/feature-libraries/typed-schema/schemaCollection.js.map +0 -1
  656. package/lib/feature-libraries/typed-schema/typeUtils.d.ts +0 -15
  657. package/lib/feature-libraries/typed-schema/typeUtils.d.ts.map +0 -1
  658. package/lib/feature-libraries/typed-schema/typeUtils.js +0 -10
  659. package/lib/feature-libraries/typed-schema/typeUtils.js.map +0 -1
  660. package/lib/feature-libraries/typed-schema/view.d.ts.map +0 -1
  661. package/lib/feature-libraries/typed-schema/view.js.map +0 -1
  662. package/lib/simple-tree/getSimpleFieldSchema.d.ts +0 -14
  663. package/lib/simple-tree/getSimpleFieldSchema.d.ts.map +0 -1
  664. package/lib/simple-tree/getSimpleFieldSchema.js +0 -25
  665. package/lib/simple-tree/getSimpleFieldSchema.js.map +0 -1
  666. package/lib/simple-tree/walkSchema.d.ts.map +0 -1
  667. package/lib/simple-tree/walkSchema.js +0 -43
  668. package/lib/simple-tree/walkSchema.js.map +0 -1
  669. package/src/feature-libraries/fieldGenerator.ts +0 -47
  670. package/src/feature-libraries/flex-map-tree/index.ts +0 -14
  671. package/src/feature-libraries/storedToViewSchema.ts +0 -100
  672. package/src/feature-libraries/typed-schema/schemaCollection.ts +0 -254
  673. package/src/feature-libraries/typed-schema/typeUtils.ts +0 -29
  674. package/src/simple-tree/getSimpleFieldSchema.ts +0 -36
@@ -1,160 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.validateField = exports.validateRootField = exports.validateSchemaCollection = exports.aggregateSchemaLibraries = exports.schemaLintDefault = void 0;
8
- const internal_1 = require("@fluidframework/core-utils/internal");
9
- const index_js_1 = require("../../core/index.js");
10
- const index_js_2 = require("../../util/index.js");
11
- const index_js_3 = require("../default-schema/index.js");
12
- const flexList_js_1 = require("./flexList.js");
13
- const typedTreeSchema_js_1 = require("./typedTreeSchema.js");
14
- {
15
- }
16
- exports.schemaLintDefault = {
17
- rejectForbidden: true,
18
- rejectEmpty: true,
19
- };
20
- /**
21
- * Build and validate a SchemaCollection.
22
- *
23
- * As much as possible tries to detect anything that might be a mistake made by the schema author.
24
- * This will error on some valid but probably never intended to be used patterns
25
- * (like libraries with the same name, nodes which are impossible to create etc).
26
- *
27
- * @param name - Name of the resulting library.
28
- * @param lintConfiguration - configuration for what errors to generate.
29
- * @param libraries - Data to aggregate into the SchemaCollection.
30
- * @param rootFieldSchema - Only validated: not included in the result.
31
- *
32
- * @privateRemarks
33
- * This checks that input works with defaultSchemaPolicy.
34
- * If support fo other policies is added, this will need to take in the policy.
35
- */
36
- function aggregateSchemaLibraries(name, lintConfiguration, libraries, rootFieldSchema) {
37
- const nodeSchema = new Map();
38
- const adapters = { tree: [] };
39
- const errors = [];
40
- const librarySet = new Set();
41
- const libraryNames = new Set();
42
- for (const library of libraries) {
43
- if (librarySet.has(library)) {
44
- // SchemaBuilder should ensure this doesn't happen, but include it here for completeness.
45
- errors.push(`Duplicate library named "${library.name}"`);
46
- continue;
47
- }
48
- librarySet.add(library);
49
- if (libraryNames.has(library.name)) {
50
- // This wouldn't break anything, but could make error messages confusing, so its better to avoid duplicates.
51
- errors.push(`Found another library with name "${library.name}"`);
52
- }
53
- for (const [key, tree] of library.nodeSchema) {
54
- // This check is an assert since if it fails, the other error messages would be incorrect.
55
- (0, internal_1.assert)(tree.builder.name === library.name, 0x6a9 /* tree must be part by the library its in */);
56
- const existing = nodeSchema.get(key);
57
- if (existing !== undefined) {
58
- errors.push(`Multiple tree schema for identifier "${key}". One from library "${existing.builder.name}" and one from "${tree.builder.name}"`);
59
- }
60
- else {
61
- nodeSchema.set(key, tree);
62
- }
63
- }
64
- for (const _adapter of library.adapters.tree ?? []) {
65
- (0, index_js_2.fail)("Adapters not yet supported");
66
- }
67
- }
68
- if (errors.length !== 0) {
69
- (0, index_js_2.fail)(errors.join("\n"));
70
- }
71
- const result = { rootFieldSchema, nodeSchema, adapters, policy: index_js_3.defaultSchemaPolicy };
72
- const errors2 = validateSchemaCollection(lintConfiguration, result, rootFieldSchema);
73
- if (errors2.length !== 0) {
74
- (0, index_js_2.fail)(errors2.join("\n"));
75
- }
76
- return {
77
- name,
78
- nodeSchema,
79
- adapters,
80
- };
81
- }
82
- exports.aggregateSchemaLibraries = aggregateSchemaLibraries;
83
- /**
84
- * Returns an array of descriptions of errors in the collection.
85
- *
86
- * As much as possible tries to detect anything that might be a mistake made by the schema author.
87
- * This will error on some valid but probably never intended to be used patterns (like never nodes).
88
- */
89
- function validateSchemaCollection(lintConfiguration, collection, rootFieldSchema) {
90
- const errors = [];
91
- // TODO: make this check specific to document schema. Replace check here for no tre or field schema (empty library).
92
- if (collection.nodeSchema.size === 0 && lintConfiguration.rejectEmpty) {
93
- errors.push("No tree schema are included, meaning no data can possibly be stored.");
94
- }
95
- // Validate that all schema referenced are included, and none are "never".
96
- if (rootFieldSchema !== undefined) {
97
- validateRootField(lintConfiguration, collection, rootFieldSchema, errors);
98
- }
99
- for (const [identifier, tree] of collection.nodeSchema) {
100
- if (tree instanceof typedTreeSchema_js_1.FlexMapNodeSchema) {
101
- validateField(lintConfiguration, collection, tree.info, () => `Map fields of "${identifier}" schema from library "${tree.builder.name}"`, errors);
102
- if (tree.info.kind.multiplicity === index_js_1.Multiplicity.Single) {
103
- errors.push(`Map fields of "${identifier}" schema from library "${tree.builder.name}" has kind with multiplicity "Single". This is invalid since it requires all possible field keys to have a value under them.`);
104
- }
105
- }
106
- else if (tree instanceof typedTreeSchema_js_1.LeafNodeSchema) {
107
- // No validation for now.
108
- }
109
- else if (tree instanceof typedTreeSchema_js_1.FlexObjectNodeSchema) {
110
- for (const [key, field] of tree.objectNodeFields) {
111
- const description = () => `Object node field "${key}" of "${identifier}" schema from library "${tree.builder.name}"`;
112
- validateField(lintConfiguration, collection, field, description, errors);
113
- }
114
- }
115
- else {
116
- // TODO: there should be a common fallback that works for cases without a specialized implementation.
117
- (0, index_js_2.fail)("unrecognized node kind");
118
- }
119
- }
120
- // TODO: validate adapters
121
- return errors;
122
- }
123
- exports.validateSchemaCollection = validateSchemaCollection;
124
- function validateRootField(lintConfiguration, collection, field, errors) {
125
- const describeField = () => `Root field schema`;
126
- validateField(lintConfiguration, collection, field, describeField, errors);
127
- }
128
- exports.validateRootField = validateRootField;
129
- function validateField(lintConfiguration, collection, field, describeField, errors) {
130
- const types = field.allowedTypes;
131
- const normalizedTypes = (0, flexList_js_1.normalizeFlexListEager)(types);
132
- for (const type of normalizedTypes) {
133
- const referenced = collection.nodeSchema.get(type.name);
134
- if (referenced === undefined) {
135
- errors.push(`${describeField()} references type "${type.name}" from library "${type.builder.name}" which is not defined. Perhaps another type was intended, or that library needs to be added.`);
136
- }
137
- }
138
- if (types.length === 0 && lintConfiguration.rejectEmpty) {
139
- errors.push(`${describeField()} requires children to have a type from a set of zero types. This means the field must always be empty.`);
140
- }
141
- const kind = field.kind;
142
- const kindFromPolicy = index_js_3.defaultSchemaPolicy.fieldKinds.get(kind.identifier);
143
- if (kindFromPolicy === undefined) {
144
- errors.push(`"${describeField()}" has unknown field kind "${kind.identifier}".`);
145
- }
146
- else if (kindFromPolicy !== kind) {
147
- errors.push(`${describeField()} has field kind "${kind.identifier}" which isn't a reference to the default kind with that identifier.`);
148
- }
149
- else if (kind === index_js_3.FieldKinds.forbidden) {
150
- if (lintConfiguration.rejectForbidden) {
151
- errors.push(`${describeField()} explicitly uses "forbidden" kind, which is not recommended.`);
152
- }
153
- } // else if (kind !== counter) {
154
- // errors.push(
155
- // `${describeField()} explicitly uses "counter" kind, which is finished.`,
156
- // );
157
- // }
158
- }
159
- exports.validateField = validateField;
160
- //# sourceMappingURL=schemaCollection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemaCollection.js","sourceRoot":"","sources":["../../../src/feature-libraries/typed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AC,UAAU,CAAC,CAAC;IAC3E,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,CAAC,IAAI,CAAC,IAAI,aAAa,EAAE,6BAA6B,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC;IAClF,CAAC;SAAM,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QACpC,MAAM,CAAC,IAAI,CACV,GAAG,aAAa,EAAE,oBACjB,IAAI,CAAC,UACN,qEAAqE,CACrE,CAAC;IACH,CAAC;SAAM,IAAI,IAAI,KAAK,qBAAU,CAAC,SAAS,EAAE,CAAC;QAC1C,IAAI,iBAAiB,CAAC,eAAe,EAAE,CAAC;YACvC,MAAM,CAAC,IAAI,CACV,GAAG,aAAa,EAAE,8DAA8D,CAChF,CAAC;QACH,CAAC;IACF,CAAC,CAAC,+BAA+B;IACjC,gBAAgB;IAChB,6EAA6E;IAC7E,MAAM;IACN,IAAI;AACL,CAAC;AA/CD,sCA+CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype Adapters,\n\ttype TreeAdapter,\n\ttype TreeNodeSchemaIdentifier,\n\tMultiplicity,\n} from \"../../core/index.js\";\nimport { fail, type requireAssignableTo } from \"../../util/index.js\";\nimport { FieldKinds, defaultSchemaPolicy } from \"../default-schema/index.js\";\n\nimport { normalizeFlexListEager } from \"./flexList.js\";\nimport {\n\ttype FlexFieldSchema,\n\tFlexMapNodeSchema,\n\tFlexObjectNodeSchema,\n\ttype FlexTreeNodeSchema,\n\tLeafNodeSchema,\n\ttype SchemaCollection,\n} from \"./typedTreeSchema.js\";\nimport type { Sourced } from \"./view.js\";\n\n// TODO: tests for this file\n\n/**\n * Schema data collected by a single SchemaBuilder (does not include referenced libraries).\n * @internal\n */\nexport interface SchemaLibraryData extends SchemaCollection {\n\treadonly name: string;\n\treadonly adapters: Adapters;\n}\n\n/**\n * Mutable adapter collection which records the associated factory.\n * See {@link Adapters}.\n */\nexport interface SourcedAdapters {\n\treadonly tree: (Sourced & TreeAdapter)[];\n}\n\n{\n\ttype _check = requireAssignableTo<SourcedAdapters, Adapters>;\n}\n\n/**\n * Allows opting into and out of errors for some unusual schema patterns which are usually bugs.\n * @internal\n */\nexport interface SchemaLintConfiguration {\n\treadonly rejectForbidden: boolean;\n\treadonly rejectEmpty: boolean;\n}\n\nexport const schemaLintDefault: SchemaLintConfiguration = {\n\trejectForbidden: true,\n\trejectEmpty: true,\n};\n\n/**\n * Build and validate a SchemaCollection.\n *\n * As much as possible tries to detect anything that might be a mistake made by the schema author.\n * This will error on some valid but probably never intended to be used patterns\n * (like libraries with the same name, nodes which are impossible to create etc).\n *\n * @param name - Name of the resulting library.\n * @param lintConfiguration - configuration for what errors to generate.\n * @param libraries - Data to aggregate into the SchemaCollection.\n * @param rootFieldSchema - Only validated: not included in the result.\n *\n * @privateRemarks\n * This checks that input works with defaultSchemaPolicy.\n * If support fo other policies is added, this will need to take in the policy.\n */\nexport function aggregateSchemaLibraries(\n\tname: string,\n\tlintConfiguration: SchemaLintConfiguration,\n\tlibraries: Iterable<SchemaLibraryData>,\n\trootFieldSchema?: FlexFieldSchema,\n): SchemaLibraryData {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, FlexTreeNodeSchema> = new Map();\n\tconst adapters: SourcedAdapters = { tree: [] };\n\n\tconst errors: string[] = [];\n\tconst librarySet: Set<SchemaLibraryData> = new Set();\n\tconst libraryNames: Set<string> = new Set();\n\n\tfor (const library of libraries) {\n\t\tif (librarySet.has(library)) {\n\t\t\t// SchemaBuilder should ensure this doesn't happen, but include it here for completeness.\n\t\t\terrors.push(`Duplicate library named \"${library.name}\"`);\n\t\t\tcontinue;\n\t\t}\n\t\tlibrarySet.add(library);\n\t\tif (libraryNames.has(library.name)) {\n\t\t\t// This wouldn't break anything, but could make error messages confusing, so its better to avoid duplicates.\n\t\t\terrors.push(`Found another library with name \"${library.name}\"`);\n\t\t}\n\n\t\tfor (const [key, tree] of library.nodeSchema) {\n\t\t\t// This check is an assert since if it fails, the other error messages would be incorrect.\n\t\t\tassert(\n\t\t\t\ttree.builder.name === library.name,\n\t\t\t\t0x6a9 /* tree must be part by the library its in */,\n\t\t\t);\n\t\t\tconst existing = nodeSchema.get(key);\n\t\t\tif (existing !== undefined) {\n\t\t\t\terrors.push(\n\t\t\t\t\t`Multiple tree schema for identifier \"${key}\". One from library \"${existing.builder.name}\" and one from \"${tree.builder.name}\"`,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tnodeSchema.set(key, tree);\n\t\t\t}\n\t\t}\n\t\tfor (const _adapter of library.adapters.tree ?? []) {\n\t\t\tfail(\"Adapters not yet supported\");\n\t\t}\n\t}\n\n\tif (errors.length !== 0) {\n\t\tfail(errors.join(\"\\n\"));\n\t}\n\n\tconst result = { rootFieldSchema, nodeSchema, adapters, policy: defaultSchemaPolicy };\n\tconst errors2 = validateSchemaCollection(lintConfiguration, result, rootFieldSchema);\n\tif (errors2.length !== 0) {\n\t\tfail(errors2.join(\"\\n\"));\n\t}\n\n\treturn {\n\t\tname,\n\t\tnodeSchema,\n\t\tadapters,\n\t};\n}\n\n/**\n * Returns an array of descriptions of errors in the collection.\n *\n * As much as possible tries to detect anything that might be a mistake made by the schema author.\n * This will error on some valid but probably never intended to be used patterns (like never nodes).\n */\nexport function validateSchemaCollection(\n\tlintConfiguration: SchemaLintConfiguration,\n\tcollection: SchemaCollection,\n\trootFieldSchema?: FlexFieldSchema,\n): string[] {\n\tconst errors: string[] = [];\n\n\t// TODO: make this check specific to document schema. Replace check here for no tre or field schema (empty library).\n\tif (collection.nodeSchema.size === 0 && lintConfiguration.rejectEmpty) {\n\t\terrors.push(\"No tree schema are included, meaning no data can possibly be stored.\");\n\t}\n\n\t// Validate that all schema referenced are included, and none are \"never\".\n\tif (rootFieldSchema !== undefined) {\n\t\tvalidateRootField(lintConfiguration, collection, rootFieldSchema, errors);\n\t}\n\tfor (const [identifier, tree] of collection.nodeSchema) {\n\t\tif (tree instanceof FlexMapNodeSchema) {\n\t\t\tvalidateField(\n\t\t\t\tlintConfiguration,\n\t\t\t\tcollection,\n\t\t\t\ttree.info as FlexFieldSchema,\n\t\t\t\t() => `Map fields of \"${identifier}\" schema from library \"${tree.builder.name}\"`,\n\t\t\t\terrors,\n\t\t\t);\n\t\t\tif ((tree.info as FlexFieldSchema).kind.multiplicity === Multiplicity.Single) {\n\t\t\t\terrors.push(\n\t\t\t\t\t`Map fields of \"${identifier}\" schema from library \"${tree.builder.name}\" has kind with multiplicity \"Single\". This is invalid since it requires all possible field keys to have a value under them.`,\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (tree instanceof LeafNodeSchema) {\n\t\t\t// No validation for now.\n\t\t} else if (tree instanceof FlexObjectNodeSchema) {\n\t\t\tfor (const [key, field] of tree.objectNodeFields) {\n\t\t\t\tconst description = (): string =>\n\t\t\t\t\t`Object node field \"${key}\" of \"${identifier}\" schema from library \"${tree.builder.name}\"`;\n\t\t\t\tvalidateField(lintConfiguration, collection, field, description, errors);\n\t\t\t}\n\t\t} else {\n\t\t\t// TODO: there should be a common fallback that works for cases without a specialized implementation.\n\t\t\tfail(\"unrecognized node kind\");\n\t\t}\n\t}\n\n\t// TODO: validate adapters\n\treturn errors;\n}\n\nexport function validateRootField(\n\tlintConfiguration: SchemaLintConfiguration,\n\tcollection: SchemaCollection,\n\tfield: FlexFieldSchema,\n\terrors: string[],\n): void {\n\tconst describeField = (): string => `Root field schema`;\n\tvalidateField(lintConfiguration, collection, field, describeField, errors);\n}\n\nexport function validateField(\n\tlintConfiguration: SchemaLintConfiguration,\n\tcollection: SchemaCollection,\n\tfield: FlexFieldSchema,\n\tdescribeField: () => string,\n\terrors: string[],\n): void {\n\tconst types = field.allowedTypes;\n\n\tconst normalizedTypes = normalizeFlexListEager(types);\n\tfor (const type of normalizedTypes) {\n\t\tconst referenced = collection.nodeSchema.get(type.name);\n\t\tif (referenced === undefined) {\n\t\t\terrors.push(\n\t\t\t\t`${describeField()} references type \"${type.name}\" from library \"${\n\t\t\t\t\ttype.builder.name\n\t\t\t\t}\" which is not defined. Perhaps another type was intended, or that library needs to be added.`,\n\t\t\t);\n\t\t}\n\t}\n\tif (types.length === 0 && lintConfiguration.rejectEmpty) {\n\t\terrors.push(\n\t\t\t`${describeField()} requires children to have a type from a set of zero types. This means the field must always be empty.`,\n\t\t);\n\t}\n\n\tconst kind = field.kind;\n\tconst kindFromPolicy = defaultSchemaPolicy.fieldKinds.get(kind.identifier);\n\tif (kindFromPolicy === undefined) {\n\t\terrors.push(`\"${describeField()}\" has unknown field kind \"${kind.identifier}\".`);\n\t} else if (kindFromPolicy !== kind) {\n\t\terrors.push(\n\t\t\t`${describeField()} has field kind \"${\n\t\t\t\tkind.identifier\n\t\t\t}\" which isn't a reference to the default kind with that identifier.`,\n\t\t);\n\t} else if (kind === FieldKinds.forbidden) {\n\t\tif (lintConfiguration.rejectForbidden) {\n\t\t\terrors.push(\n\t\t\t\t`${describeField()} explicitly uses \"forbidden\" kind, which is not recommended.`,\n\t\t\t);\n\t\t}\n\t} // else if (kind !== counter) {\n\t// \terrors.push(\n\t// \t\t`${describeField()} explicitly uses \"counter\" kind, which is finished.`,\n\t// \t);\n\t// }\n}\n"]}
@@ -1,15 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- /**
6
- * Utilities for manipulating types.
7
- */
8
- /**
9
- * Convert a object type into the type of a ReadonlyMap from field name to value.
10
- */
11
- export type ObjectToMap<ObjectMap, MapKey extends number | string, MapValue> = ReadonlyMap<MapKey, MapValue> & {
12
- get<TKey extends keyof ObjectMap>(key: TKey): ObjectMap[TKey];
13
- };
14
- export declare function objectToMapTyped<ObjectMap extends Record<MapKey, MapValue>, MapKey extends string, MapValue>(objectMap: ObjectMap): ObjectToMap<ObjectMap, MapKey, MapValue>;
15
- //# sourceMappingURL=typeUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typeUtils.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/typed-schema/typeUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,SAAS,MAAM,GAAG,MAAM,EAAE,QAAQ,IAAI,WAAW,CACzF,MAAM,EACN,QAAQ,CACR,GAAG;IACH,GAAG,CAAC,IAAI,SAAS,MAAM,SAAS,EAAE,GAAG,EAAE,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;CAC9D,CAAC;AAGF,wBAAgB,gBAAgB,CAC/B,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAC1C,MAAM,SAAS,MAAM,EACrB,QAAQ,EACP,SAAS,EAAE,SAAS,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAEhE"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.objectToMapTyped = void 0;
8
- const index_js_1 = require("../../util/index.js");
9
- // TODO: test + document
10
- function objectToMapTyped(objectMap) {
11
- return (0, index_js_1.objectToMap)(objectMap);
12
- }
13
- exports.objectToMapTyped = objectToMapTyped;
14
- //# sourceMappingURL=typeUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typeUtils.js","sourceRoot":"","sources":["../../../src/feature-libraries/typed-schema/typeUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kDAAkD;AAgBlD,wBAAwB;AACxB,SAAgB,gBAAgB,CAI9B,SAAoB;IACrB,OAAO,IAAA,sBAAW,EAAC,SAAS,CAAwD,CAAC;AACtF,CAAC;AAND,4CAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { objectToMap } from \"../../util/index.js\";\n\n/**\n * Utilities for manipulating types.\n */\n\n/**\n * Convert a object type into the type of a ReadonlyMap from field name to value.\n */\nexport type ObjectToMap<ObjectMap, MapKey extends number | string, MapValue> = ReadonlyMap<\n\tMapKey,\n\tMapValue\n> & {\n\tget<TKey extends keyof ObjectMap>(key: TKey): ObjectMap[TKey];\n};\n\n// TODO: test + document\nexport function objectToMapTyped<\n\tObjectMap extends Record<MapKey, MapValue>,\n\tMapKey extends string,\n\tMapValue,\n>(objectMap: ObjectMap): ObjectToMap<ObjectMap, MapKey, MapValue> {\n\treturn objectToMap(objectMap) as unknown as ObjectToMap<ObjectMap, MapKey, MapValue>;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/typed-schema/view.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,KAAK,QAAQ,EACb,aAAa,EAIb,KAAK,gBAAgB,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,KAAK,EAAQ,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACN,KAAK,gBAAgB,EAGrB,MAAM,4BAA4B,CAAC;AAEpC;;GAEG;AACH,qBAAa,UAAU;aAKL,MAAM,EAAE,gBAAgB;aACxB,QAAQ,EAAE,QAAQ;aAClB,YAAY,EAAE,gBAAgB;IAN/C;;OAEG;gBAEc,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,gBAAgB;IAG/C;;;;;;;;;OASG;IACI,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAG;QACpD,IAAI,EAAE,aAAa,CAAC;QACpB,KAAK,EAAE,aAAa,CAAC;QACrB,gCAAgC,EAAE,aAAa,CAAC;KAChD;IA6CD;;;;OAIG;IACI,SAAS,CAAC,MAAM,EAAE,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AC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QAC3C,CAAC;QAED,iEAAiE;QACjE,OAAO,IAAI,4BAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACK,UAAU,CAAC,QAA+B;QACjD,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,KAAK,GAAkC,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACrE,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;gBACrD,IAAI,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;oBAClC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;oBAChC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBAC/B,CAAC;YACF,CAAC;YAED,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;QACvC,CAAC;QACD,OAAO,QAAQ,CAAC;IACjB,CAAC;IAEO,SAAS,CAAC,QAA8B;QAC/C,sDAAsD;QACtD,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD;AAhID,gCAgIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tAdaptedViewSchema,\n\ttype Adapters,\n\tCompatibility,\n\ttype TreeFieldStoredSchema,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n} from \"../../core/index.js\";\nimport { type Named, fail } from \"../../util/index.js\";\nimport {\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\tisNeverTree,\n} from \"../modular-schema/index.js\";\n\n/**\n * A collection of View information for schema, including policy.\n */\nexport class ViewSchema {\n\t/**\n\t * @param storedSchema - Cached conversion of view schema into a stored schema.\n\t */\n\tpublic constructor(\n\t\tpublic readonly policy: FullSchemaPolicy,\n\t\tpublic readonly adapters: Adapters,\n\t\tpublic readonly storedSchema: TreeStoredSchema,\n\t) {}\n\n\t/**\n\t * Determines the compatibility of a stored document\n\t * (based on its stored schema) with a viewer (based on its view schema).\n\t *\n\t * Adapters can be provided to handle differences between the two schema.\n\t * Adapters should only use to types in the `view` SchemaRepository.\n\t *\n\t * TODO: this API violates the parse don't validate design philosophy.\n\t * It should be wrapped with (or replaced by) a parse style API.\n\t */\n\tpublic checkCompatibility(stored: TreeStoredSchema): {\n\t\tread: Compatibility;\n\t\twrite: Compatibility;\n\t\twriteAllowingStoredSchemaUpdates: Compatibility;\n\t} {\n\t\t// TODO: support adapters\n\t\t// const adapted = this.adaptRepo(stored);\n\n\t\tconst read = allowsRepoSuperset(this.policy, stored, this.storedSchema)\n\t\t\t? Compatibility.Compatible\n\t\t\t: // TODO: support adapters\n\t\t\t\t// : allowsRepoSuperset(this.policy, adapted.adaptedForViewSchema, this.storedSchema)\n\t\t\t\t// ? Compatibility.RequiresAdapters\n\t\t\t\tCompatibility.Incompatible;\n\t\t// TODO: Extract subset of adapters that are valid to use on stored\n\t\t// TODO: separate adapters from schema updates\n\t\tconst write = allowsRepoSuperset(this.policy, this.storedSchema, stored)\n\t\t\t? Compatibility.Compatible\n\t\t\t: // TODO: support adapters\n\t\t\t\t// : allowsRepoSuperset(this.policy, this.storedSchema, adapted.adaptedForViewSchema)\n\t\t\t\t// TODO: IThis assumes adapters are bidirectional.\n\t\t\t\t// Compatibility.RequiresAdapters\n\t\t\t\tCompatibility.Incompatible;\n\n\t\t// TODO: compute this properly (and maybe include the set of schema changes needed for it?).\n\t\t// Maybe updates would happen lazily when needed to store data?\n\t\t// When willingness to updates can avoid need for some adapters,\n\t\t// how should it be decided if the adapter should be used to avoid the update?\n\t\t// TODO: is this case actually bi-variant, making this correct if we did it for each schema independently?\n\t\tlet writeAllowingStoredSchemaUpdates =\n\t\t\t// TODO: This should consider just the updates needed\n\t\t\t// (ex: when view covers a subset of stored after stored has a update to that subset).\n\t\t\tallowsRepoSuperset(this.policy, stored, this.storedSchema)\n\t\t\t\t? Compatibility.Compatible\n\t\t\t\t: // TODO: this assumes adapters can translate in both directions. In general this will not be true.\n\t\t\t\t\t// TODO: this also assumes that schema updates to the adapted repo would translate to\n\t\t\t\t\t// updates on the stored schema, which is also likely untrue.\n\t\t\t\t\t// // TODO: support adapters\n\t\t\t\t\t// allowsRepoSuperset(this.policy, adapted.adaptedForViewSchema, this.storedSchema)\n\t\t\t\t\t// ? Compatibility.RequiresAdapters // Requires schema updates. TODO: consider adapters that can update writes.\n\t\t\t\t\tCompatibility.Incompatible;\n\n\t\t// Since the above does not consider partial updates,\n\t\t// we can improve the tolerance a bit by considering the op-op update:\n\t\twriteAllowingStoredSchemaUpdates = Math.max(writeAllowingStoredSchemaUpdates, write);\n\n\t\treturn { read, write, writeAllowingStoredSchemaUpdates };\n\t}\n\n\t/**\n\t * Compute a schema that `original` could be viewed as using adapters as needed.\n\t *\n\t * TODO: have a way for callers to get invalidated on schema updates.\n\t */\n\tpublic adaptRepo(stored: TreeStoredSchema): AdaptedViewSchema {\n\t\t// Sanity check on adapters:\n\t\t// it's probably a bug it they use the never types,\n\t\t// since there never is a reason to have a never type as an adapter input,\n\t\t// and its impossible for an adapter to be correctly implemented if its output type is never\n\t\t// (unless its input is also never).\n\t\tfor (const adapter of this.adapters?.tree ?? []) {\n\t\t\tif (\n\t\t\t\tisNeverTree(\n\t\t\t\t\tthis.policy,\n\t\t\t\t\tthis.storedSchema,\n\t\t\t\t\tthis.storedSchema.nodeSchema.get(adapter.output),\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tfail(\"tree adapter for stored adapter.output should not be never\");\n\t\t\t}\n\t\t}\n\n\t\tconst adapted = {\n\t\t\trootFieldSchema: this.adaptField(stored.rootFieldSchema),\n\t\t\tnodeSchema: new Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema>(),\n\t\t};\n\n\t\tfor (const [key, schema] of stored.nodeSchema) {\n\t\t\tconst adapatedTree = this.adaptTree(schema);\n\t\t\tadapted.nodeSchema.set(key, adapatedTree);\n\t\t}\n\n\t\t// TODO: subset these adapters to the ones that were needed/used.\n\t\treturn new AdaptedViewSchema(this.adapters, adapted);\n\t}\n\n\t/**\n\t * Adapt original such that it allows member types which can be adapted to its specified types.\n\t */\n\tprivate adaptField(original: TreeFieldStoredSchema): TreeFieldStoredSchema {\n\t\tif (original.types !== undefined) {\n\t\t\tconst types: Set<TreeNodeSchemaIdentifier> = new Set(original.types);\n\t\t\tfor (const treeAdapter of this.adapters?.tree ?? []) {\n\t\t\t\tif (types.has(treeAdapter.input)) {\n\t\t\t\t\ttypes.delete(treeAdapter.input);\n\t\t\t\t\ttypes.add(treeAdapter.output);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn { kind: original.kind, types };\n\t\t}\n\t\treturn original;\n\t}\n\n\tprivate adaptTree(original: TreeNodeStoredSchema): TreeNodeStoredSchema {\n\t\t// TODO: support adapters like missing field adapters.\n\t\treturn original;\n\t}\n}\n\n/**\n * Record where a schema came from for error reporting purposes.\n */\nexport interface Sourced {\n\treadonly builder: Named<string>;\n}\n"]}
@@ -1,14 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { FlexFieldSchema } from "../feature-libraries/index.js";
6
- import { type ImplicitFieldSchema, type FieldSchema } from "./schemaTypes.js";
7
- /**
8
- * Gets the {@link FieldSchema} which corresponds with the provided {@link FlexFieldSchema | flexSchema}.
9
- * Caches the result on the provided `flexSchema` for future access.
10
- * @param flexSchema - The flex schema on which the result will be cached.
11
- * @param implicitSimpleSchema - The allowed types from which the `FieldSchema` will be derived.
12
- */
13
- export declare function getSimpleFieldSchema(flexSchema: FlexFieldSchema, implicitSimpleSchema: ImplicitFieldSchema): FieldSchema;
14
- //# sourceMappingURL=getSimpleFieldSchema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getSimpleFieldSchema.d.ts","sourceRoot":"","sources":["../../src/simple-tree/getSimpleFieldSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAEhB,MAAM,kBAAkB,CAAC;AAO1B;;;;;GAKG;AACH,wBAAgB,oBAAoB,CACnC,UAAU,EAAE,eAAe,EAC3B,oBAAoB,EAAE,mBAAmB,GACvC,WAAW,CASb"}
@@ -1,29 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.getSimpleFieldSchema = void 0;
8
- const schemaTypes_js_1 = require("./schemaTypes.js");
9
- /**
10
- * A symbol for storing {@link FieldSchema}s on a {@link FlexFieldSchema}.
11
- */
12
- const simpleFieldSchemaSymbol = Symbol(`simpleFieldSchema`);
13
- /**
14
- * Gets the {@link FieldSchema} which corresponds with the provided {@link FlexFieldSchema | flexSchema}.
15
- * Caches the result on the provided `flexSchema` for future access.
16
- * @param flexSchema - The flex schema on which the result will be cached.
17
- * @param implicitSimpleSchema - The allowed types from which the `FieldSchema` will be derived.
18
- */
19
- function getSimpleFieldSchema(flexSchema, implicitSimpleSchema) {
20
- if (simpleFieldSchemaSymbol in flexSchema) {
21
- return flexSchema[simpleFieldSchemaSymbol];
22
- }
23
- const fieldSchema = (0, schemaTypes_js_1.normalizeFieldSchema)(implicitSimpleSchema);
24
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
- flexSchema[simpleFieldSchemaSymbol] = fieldSchema;
26
- return fieldSchema;
27
- }
28
- exports.getSimpleFieldSchema = getSimpleFieldSchema;
29
- //# sourceMappingURL=getSimpleFieldSchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getSimpleFieldSchema.js","sourceRoot":"","sources":["../../src/simple-tree/getSimpleFieldSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,qDAI0B;AAE1B;;GAEG;AACH,MAAM,uBAAuB,GAAkB,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAE3E;;;;;GAKG;AACH,SAAgB,oBAAoB,CACnC,UAA2B,EAC3B,oBAAyC;IAEzC,IAAI,uBAAuB,IAAI,UAAU,EAAE,CAAC;QAC3C,OAAO,UAAU,CAAC,uBAAuB,CAAgB,CAAC;IAC3D,CAAC;IAED,MAAM,WAAW,GAAG,IAAA,qCAAoB,EAAC,oBAAoB,CAAC,CAAC;IAC/D,8DAA8D;IAC7D,UAAkB,CAAC,uBAAuB,CAAC,GAAG,WAAW,CAAC;IAC3D,OAAO,WAAW,CAAC;AACpB,CAAC;AAZD,oDAYC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { FlexFieldSchema } from \"../feature-libraries/index.js\";\nimport {\n\ttype ImplicitFieldSchema,\n\ttype FieldSchema,\n\tnormalizeFieldSchema,\n} from \"./schemaTypes.js\";\n\n/**\n * A symbol for storing {@link FieldSchema}s on a {@link FlexFieldSchema}.\n */\nconst simpleFieldSchemaSymbol: unique symbol = Symbol(`simpleFieldSchema`);\n\n/**\n * Gets the {@link FieldSchema} which corresponds with the provided {@link FlexFieldSchema | flexSchema}.\n * Caches the result on the provided `flexSchema` for future access.\n * @param flexSchema - The flex schema on which the result will be cached.\n * @param implicitSimpleSchema - The allowed types from which the `FieldSchema` will be derived.\n */\nexport function getSimpleFieldSchema(\n\tflexSchema: FlexFieldSchema,\n\timplicitSimpleSchema: ImplicitFieldSchema,\n): FieldSchema {\n\tif (simpleFieldSchemaSymbol in flexSchema) {\n\t\treturn flexSchema[simpleFieldSchemaSymbol] as FieldSchema;\n\t}\n\n\tconst fieldSchema = normalizeFieldSchema(implicitSimpleSchema);\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(flexSchema as any)[simpleFieldSchemaSymbol] = fieldSchema;\n\treturn fieldSchema;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"walkSchema.d.ts","sourceRoot":"","sources":["../../src/simple-tree/walkSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,iBAAiB,CAAC;AAGhE,OAAO,EAGN,KAAK,mBAAmB,EAExB,MAAM,kBAAkB,CAAC;AAE1B,wBAAgB,cAAc,CAC7B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,GAC7B,IAAI,CAwBN;AAED,wBAAgB,eAAe,CAC9B,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,aAAa,EACtB,UAAU,GAAE,GAAG,CAAC,cAAc,CAAa,GACzC,IAAI,CAEN;AAED,wBAAgB,gBAAgB,CAC/B,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,EACtC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,GAC7B,IAAI,CAKN;AACD;;GAEG;AAEH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IACxC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CAChE"}
@@ -1,49 +0,0 @@
1
- "use strict";
2
- /*!
3
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
- * Licensed under the MIT License.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.walkAllowedTypes = exports.walkFieldSchema = exports.walkNodeSchema = void 0;
8
- const internal_1 = require("@fluidframework/core-utils/internal");
9
- const index_js_1 = require("./core/index.js");
10
- const leafNodeSchema_js_1 = require("./leafNodeSchema.js");
11
- const objectNodeTypes_js_1 = require("./objectNodeTypes.js");
12
- const schemaTypes_js_1 = require("./schemaTypes.js");
13
- function walkNodeSchema(schema, visitor, visitedSet) {
14
- if (visitedSet.has(schema)) {
15
- return;
16
- }
17
- visitedSet.add(schema);
18
- if (schema instanceof leafNodeSchema_js_1.LeafNodeSchema) {
19
- // nothing to do
20
- }
21
- else if ((0, objectNodeTypes_js_1.isObjectNodeSchema)(schema)) {
22
- for (const field of schema.fields.values()) {
23
- walkFieldSchema(field, visitor, visitedSet);
24
- }
25
- }
26
- else {
27
- (0, internal_1.assert)(schema.kind === index_js_1.NodeKind.Array || schema.kind === index_js_1.NodeKind.Map, 0x9b3 /* invalid schema */);
28
- const childTypes = schema.info;
29
- walkAllowedTypes((0, schemaTypes_js_1.normalizeAllowedTypes)(childTypes), visitor, visitedSet);
30
- }
31
- // This visit is done at the end so the traversal order is most inner types first.
32
- // This was picked since when fixing errors,
33
- // working from the inner types out to the types that use them will probably go better than the reverse.
34
- // This does not however ensure all types referenced by a type are visited before it, since in recursive cases thats impossible.
35
- visitor.node?.(schema);
36
- }
37
- exports.walkNodeSchema = walkNodeSchema;
38
- function walkFieldSchema(schema, visitor, visitedSet = new Set()) {
39
- walkAllowedTypes((0, schemaTypes_js_1.normalizeFieldSchema)(schema).allowedTypeSet, visitor, visitedSet);
40
- }
41
- exports.walkFieldSchema = walkFieldSchema;
42
- function walkAllowedTypes(allowedTypes, visitor, visitedSet) {
43
- for (const childType of allowedTypes) {
44
- walkNodeSchema(childType, visitor, visitedSet);
45
- }
46
- visitor.allowedTypes?.(allowedTypes);
47
- }
48
- exports.walkAllowedTypes = walkAllowedTypes;
49
- //# sourceMappingURL=walkSchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"walkSchema.js","sourceRoot":"","sources":["../../src/simple-tree/walkSchema.ts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AACpF,CAAC;AAND,0CAMC;AAED,SAAgB,gBAAgB,CAC/B,YAAsC,EACtC,OAAsB,EACtB,UAA+B;IAE/B,KAAK,MAAM,SAAS,IAAI,YAAY,EAAE,CAAC;QACtC,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,CAAC,YAAY,EAAE,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC;AATD,4CASC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { type TreeNodeSchema, NodeKind } from \"./core/index.js\";\nimport { LeafNodeSchema } from \"./leafNodeSchema.js\";\nimport { isObjectNodeSchema } from \"./objectNodeTypes.js\";\nimport {\n\ttype ImplicitAllowedTypes,\n\tnormalizeAllowedTypes,\n\ttype ImplicitFieldSchema,\n\tnormalizeFieldSchema,\n} from \"./schemaTypes.js\";\n\nexport function walkNodeSchema(\n\tschema: TreeNodeSchema,\n\tvisitor: SchemaVisitor,\n\tvisitedSet: Set<TreeNodeSchema>,\n): void {\n\tif (visitedSet.has(schema)) {\n\t\treturn;\n\t}\n\tvisitedSet.add(schema);\n\tif (schema instanceof LeafNodeSchema) {\n\t\t// nothing to do\n\t} else if (isObjectNodeSchema(schema)) {\n\t\tfor (const field of schema.fields.values()) {\n\t\t\twalkFieldSchema(field, visitor, visitedSet);\n\t\t}\n\t} else {\n\t\tassert(\n\t\t\tschema.kind === NodeKind.Array || schema.kind === NodeKind.Map,\n\t\t\t0x9b3 /* invalid schema */,\n\t\t);\n\t\tconst childTypes = schema.info as ImplicitAllowedTypes;\n\t\twalkAllowedTypes(normalizeAllowedTypes(childTypes), visitor, visitedSet);\n\t}\n\t// This visit is done at the end so the traversal order is most inner types first.\n\t// This was picked since when fixing errors,\n\t// working from the inner types out to the types that use them will probably go better than the reverse.\n\t// This does not however ensure all types referenced by a type are visited before it, since in recursive cases thats impossible.\n\tvisitor.node?.(schema);\n}\n\nexport function walkFieldSchema(\n\tschema: ImplicitFieldSchema,\n\tvisitor: SchemaVisitor,\n\tvisitedSet: Set<TreeNodeSchema> = new Set(),\n): void {\n\twalkAllowedTypes(normalizeFieldSchema(schema).allowedTypeSet, visitor, visitedSet);\n}\n\nexport function walkAllowedTypes(\n\tallowedTypes: Iterable<TreeNodeSchema>,\n\tvisitor: SchemaVisitor,\n\tvisitedSet: Set<TreeNodeSchema>,\n): void {\n\tfor (const childType of allowedTypes) {\n\t\twalkNodeSchema(childType, visitor, visitedSet);\n\t}\n\tvisitor.allowedTypes?.(allowedTypes);\n}\n/**\n * Callbacks for use in {@link walkFieldSchema} / {@link walkAllowedTypes} / {@link walkNodeSchema}.\n */\n\nexport interface SchemaVisitor {\n\t/**\n\t * Called once for each node schema.\n\t */\n\tnode?: (schema: TreeNodeSchema) => void;\n\t/**\n\t * Called once for each set of allowed types.\n\t * Includes implicit allowed types (when a single type was used instead of an array).\n\t *\n\t * This includes every field, but also the allowed types array for maps and arrays and the root if starting at {@link walkAllowedTypes}.\n\t */\n\tallowedTypes?: (allowedTypes: Iterable<TreeNodeSchema>) => void;\n}\n"]}
@@ -1,43 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { FieldKey, MapTree, TreeFieldStoredSchema } from "../core/index.js";
6
- import type { FlexTreeSchema } from "./typed-schema/index.js";
7
- /**
8
- * Information needed to interpret a subtree described by {@link ContextuallyTypedNodeData} and {@link ContextuallyTypedFieldData}.
9
- * TODO:
10
- * Currently being exposed at the package level which also requires us to export MapTree at the package level.
11
- * Refactor the FieldGenerator to use JsonableTree instead of MapTree, and convert them internally.
12
- */
13
- export interface TreeDataContext {
14
- /**
15
- * Schema for the document which the tree will be used in.
16
- */
17
- readonly schema: FlexTreeSchema;
18
- /**
19
- * Procedural data generator for fields.
20
- * Fields which provide generators here can be omitted in the input contextually typed data.
21
- *
22
- * @remarks
23
- * TODO:
24
- * For implementers of this which are not pure (like identifier generation),
25
- * order of invocation should be made consistent and documented.
26
- * This will be important for identifier elision optimizations in tree encoding for session based identifier generation.
27
- */
28
- fieldSource?(key: FieldKey, schema: TreeFieldStoredSchema): undefined | FieldGenerator;
29
- }
30
- /**
31
- * Generates field content for a MapTree on demand.
32
- * TODO:
33
- * Currently being exposed at the package level which also requires us to export MapTree at the package level.
34
- * Refactor the FieldGenerator to use JsonableTree instead of MapTree, and convert them internally.
35
- */
36
- export type FieldGenerator = () => MapTree[];
37
- /**
38
- * Information needed to interpret a subtree described by {@link ContextuallyTypedNodeData} and {@link ContextuallyTypedFieldData}.
39
- * TODO:
40
- * Currently being exposed at the package level which also requires us to export MapTree at the package level.
41
- * Refactor the FieldGenerator to use JsonableTree instead of MapTree, and convert them internally.
42
- */
43
- //# sourceMappingURL=fieldGenerator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fieldGenerator.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/fieldGenerator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAEhC;;;;;;;;;OASG;IACH,WAAW,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,qBAAqB,GAAG,SAAS,GAAG,cAAc,CAAC;CACvF;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,EAAE,CAAC;AAC7C;;;;;GAKG"}
@@ -1,12 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- export {};
6
- /**
7
- * Information needed to interpret a subtree described by {@link ContextuallyTypedNodeData} and {@link ContextuallyTypedFieldData}.
8
- * TODO:
9
- * Currently being exposed at the package level which also requires us to export MapTree at the package level.
10
- * Refactor the FieldGenerator to use JsonableTree instead of MapTree, and convert them internally.
11
- */
12
- //# sourceMappingURL=fieldGenerator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fieldGenerator.js","sourceRoot":"","sources":["../../src/feature-libraries/fieldGenerator.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAsCH;;;;;GAKG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { FieldKey, MapTree, TreeFieldStoredSchema } from \"../core/index.js\";\n\nimport type { FlexTreeSchema } from \"./typed-schema/index.js\";\n\n/**\n * Information needed to interpret a subtree described by {@link ContextuallyTypedNodeData} and {@link ContextuallyTypedFieldData}.\n * TODO:\n * Currently being exposed at the package level which also requires us to export MapTree at the package level.\n * Refactor the FieldGenerator to use JsonableTree instead of MapTree, and convert them internally.\n */\nexport interface TreeDataContext {\n\t/**\n\t * Schema for the document which the tree will be used in.\n\t */\n\treadonly schema: FlexTreeSchema;\n\n\t/**\n\t * Procedural data generator for fields.\n\t * Fields which provide generators here can be omitted in the input contextually typed data.\n\t *\n\t * @remarks\n\t * TODO:\n\t * For implementers of this which are not pure (like identifier generation),\n\t * order of invocation should be made consistent and documented.\n\t * This will be important for identifier elision optimizations in tree encoding for session based identifier generation.\n\t */\n\tfieldSource?(key: FieldKey, schema: TreeFieldStoredSchema): undefined | FieldGenerator;\n}\n\n/**\n * Generates field content for a MapTree on demand.\n * TODO:\n * Currently being exposed at the package level which also requires us to export MapTree at the package level.\n * Refactor the FieldGenerator to use JsonableTree instead of MapTree, and convert them internally.\n */\nexport type FieldGenerator = () => MapTree[];\n/**\n * Information needed to interpret a subtree described by {@link ContextuallyTypedNodeData} and {@link ContextuallyTypedFieldData}.\n * TODO:\n * Currently being exposed at the package level which also requires us to export MapTree at the package level.\n * Refactor the FieldGenerator to use JsonableTree instead of MapTree, and convert them internally.\n */\n"]}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- export { type MapTreeNode, type MapTreeSequenceField, isMapTreeNode, isMapTreeSequenceField, getOrCreateMapTreeNode, tryGetMapTreeNode, UnhydratedContext, } from "./mapTreeNode.js";
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/flex-map-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,kBAAkB,CAAC"}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- export { isMapTreeNode, isMapTreeSequenceField, getOrCreateMapTreeNode, tryGetMapTreeNode, UnhydratedContext, } from "./mapTreeNode.js";
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/flex-map-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGN,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype MapTreeNode,\n\ttype MapTreeSequenceField,\n\tisMapTreeNode,\n\tisMapTreeSequenceField,\n\tgetOrCreateMapTreeNode,\n\ttryGetMapTreeNode,\n\tUnhydratedContext,\n} from \"./mapTreeNode.js\";\n"]}