@fluidframework/tree 2.21.0 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +1 -0
  3. package/api-report/tree.alpha.api.md +29 -4
  4. package/api-report/tree.beta.api.md +29 -4
  5. package/api-report/tree.legacy.alpha.api.md +29 -4
  6. package/api-report/tree.legacy.public.api.md +29 -4
  7. package/api-report/tree.public.api.md +29 -4
  8. package/dist/alpha.d.ts +1 -0
  9. package/dist/beta.d.ts +1 -0
  10. package/dist/core/forest/editableForest.js +1 -1
  11. package/dist/core/forest/editableForest.js.map +1 -1
  12. package/dist/core/index.d.ts +1 -1
  13. package/dist/core/index.d.ts.map +1 -1
  14. package/dist/core/index.js.map +1 -1
  15. package/dist/core/tree/anchorSet.d.ts +2 -5
  16. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  17. package/dist/core/tree/anchorSet.js +1 -151
  18. package/dist/core/tree/anchorSet.js.map +1 -1
  19. package/dist/core/tree/index.d.ts +1 -2
  20. package/dist/core/tree/index.d.ts.map +1 -1
  21. package/dist/core/tree/index.js.map +1 -1
  22. package/dist/core/tree/pathTree.d.ts +0 -11
  23. package/dist/core/tree/pathTree.d.ts.map +1 -1
  24. package/dist/core/tree/pathTree.js.map +1 -1
  25. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  26. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  27. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
  28. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  29. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -2
  30. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  31. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +0 -9
  32. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  33. package/dist/feature-libraries/flex-tree/treeEvents.d.ts +2 -4
  34. package/dist/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  35. package/dist/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  36. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -2
  37. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  38. package/dist/feature-libraries/forest-summary/forestSummarizer.js +0 -9
  39. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  40. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +6 -2
  41. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  42. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  43. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -4
  44. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  45. package/dist/feature-libraries/modular-schema/genericFieldKind.js +4 -19
  46. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  47. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  48. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +11 -12
  49. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  50. package/dist/feature-libraries/node-key/mockNodeKeyManager.js +1 -1
  51. package/dist/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
  52. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  53. package/dist/feature-libraries/optional-field/optionalField.js +7 -3
  54. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  55. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +3 -5
  56. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  57. package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -11
  58. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  59. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +1 -1
  60. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  61. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +13 -1
  62. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  63. package/dist/index.d.ts +3 -3
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +4 -4
  66. package/dist/index.js.map +1 -1
  67. package/dist/legacy.d.ts +1 -0
  68. package/dist/packageVersion.d.ts +1 -1
  69. package/dist/packageVersion.js +1 -1
  70. package/dist/packageVersion.js.map +1 -1
  71. package/dist/public.d.ts +1 -0
  72. package/dist/shared-tree/index.d.ts +1 -3
  73. package/dist/shared-tree/index.d.ts.map +1 -1
  74. package/dist/shared-tree/index.js +1 -7
  75. package/dist/shared-tree/index.js.map +1 -1
  76. package/dist/shared-tree/schematizingTreeView.d.ts +4 -5
  77. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  78. package/dist/shared-tree/schematizingTreeView.js +9 -10
  79. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  80. package/dist/shared-tree/sharedTree.d.ts +39 -39
  81. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  82. package/dist/shared-tree/sharedTree.js +81 -52
  83. package/dist/shared-tree/sharedTree.js.map +1 -1
  84. package/dist/shared-tree/treeApi.d.ts +2 -2
  85. package/dist/shared-tree/treeApi.d.ts.map +1 -1
  86. package/dist/shared-tree/treeApi.js +9 -3
  87. package/dist/shared-tree/treeApi.js.map +1 -1
  88. package/dist/shared-tree/treeCheckout.d.ts +3 -3
  89. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  90. package/dist/shared-tree/treeCheckout.js +3 -2
  91. package/dist/shared-tree/treeCheckout.js.map +1 -1
  92. package/dist/shared-tree-core/editManager.js +1 -1
  93. package/dist/shared-tree-core/editManager.js.map +1 -1
  94. package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -2
  95. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  96. package/dist/shared-tree-core/editManagerSummarizer.js +0 -9
  97. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  98. package/dist/shared-tree-core/sequenceIdUtils.d.ts +12 -1
  99. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  100. package/dist/shared-tree-core/sequenceIdUtils.js +25 -7
  101. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  102. package/dist/shared-tree-core/sharedTreeCore.d.ts +25 -30
  103. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  104. package/dist/shared-tree-core/sharedTreeCore.js +20 -49
  105. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  106. package/dist/simple-tree/api/index.d.ts +3 -2
  107. package/dist/simple-tree/api/index.d.ts.map +1 -1
  108. package/dist/simple-tree/api/index.js +3 -1
  109. package/dist/simple-tree/api/index.js.map +1 -1
  110. package/dist/simple-tree/api/schemaFactory.d.ts +156 -63
  111. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  112. package/dist/simple-tree/api/schemaFactory.js +179 -86
  113. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  114. package/dist/{shared-tree → simple-tree/api}/transactionTypes.d.ts +1 -1
  115. package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -0
  116. package/dist/{shared-tree → simple-tree/api}/transactionTypes.js.map +1 -1
  117. package/dist/simple-tree/api/tree.d.ts +23 -2
  118. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  119. package/dist/simple-tree/api/tree.js.map +1 -1
  120. package/dist/simple-tree/index.d.ts +1 -1
  121. package/dist/simple-tree/index.d.ts.map +1 -1
  122. package/dist/simple-tree/index.js +3 -2
  123. package/dist/simple-tree/index.js.map +1 -1
  124. package/dist/simple-tree/schemaTypes.d.ts +2 -2
  125. package/dist/simple-tree/schemaTypes.js +1 -1
  126. package/dist/simple-tree/schemaTypes.js.map +1 -1
  127. package/dist/simple-tree/treeNodeValid.js +1 -2
  128. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  129. package/dist/treeFactory.d.ts +16 -5
  130. package/dist/treeFactory.d.ts.map +1 -1
  131. package/dist/treeFactory.js +21 -12
  132. package/dist/treeFactory.js.map +1 -1
  133. package/dist/util/breakable.d.ts +1 -1
  134. package/dist/util/breakable.d.ts.map +1 -1
  135. package/dist/util/breakable.js.map +1 -1
  136. package/dist/util/rangeMap.d.ts +1 -1
  137. package/dist/util/rangeMap.js +1 -1
  138. package/dist/util/rangeMap.js.map +1 -1
  139. package/lib/alpha.d.ts +1 -0
  140. package/lib/beta.d.ts +1 -0
  141. package/lib/core/forest/editableForest.js +1 -1
  142. package/lib/core/forest/editableForest.js.map +1 -1
  143. package/lib/core/index.d.ts +1 -1
  144. package/lib/core/index.d.ts.map +1 -1
  145. package/lib/core/index.js.map +1 -1
  146. package/lib/core/tree/anchorSet.d.ts +2 -5
  147. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  148. package/lib/core/tree/anchorSet.js +1 -151
  149. package/lib/core/tree/anchorSet.js.map +1 -1
  150. package/lib/core/tree/index.d.ts +1 -2
  151. package/lib/core/tree/index.d.ts.map +1 -1
  152. package/lib/core/tree/index.js.map +1 -1
  153. package/lib/core/tree/pathTree.d.ts +0 -11
  154. package/lib/core/tree/pathTree.d.ts.map +1 -1
  155. package/lib/core/tree/pathTree.js.map +1 -1
  156. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  157. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  158. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
  159. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  160. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -2
  161. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  162. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +0 -9
  163. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  164. package/lib/feature-libraries/flex-tree/treeEvents.d.ts +2 -4
  165. package/lib/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  166. package/lib/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  167. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -2
  168. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  169. package/lib/feature-libraries/forest-summary/forestSummarizer.js +0 -9
  170. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  171. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +6 -2
  172. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  173. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  174. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -4
  175. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  176. package/lib/feature-libraries/modular-schema/genericFieldKind.js +4 -19
  177. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  178. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  179. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +11 -12
  180. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  181. package/lib/feature-libraries/node-key/mockNodeKeyManager.js +1 -1
  182. package/lib/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
  183. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  184. package/lib/feature-libraries/optional-field/optionalField.js +7 -3
  185. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  186. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +3 -5
  187. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  188. package/lib/feature-libraries/schema-index/schemaSummarizer.js +1 -11
  189. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  190. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +1 -1
  191. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  192. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +13 -1
  193. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  194. package/lib/index.d.ts +3 -3
  195. package/lib/index.d.ts.map +1 -1
  196. package/lib/index.js +3 -3
  197. package/lib/index.js.map +1 -1
  198. package/lib/legacy.d.ts +1 -0
  199. package/lib/packageVersion.d.ts +1 -1
  200. package/lib/packageVersion.js +1 -1
  201. package/lib/packageVersion.js.map +1 -1
  202. package/lib/public.d.ts +1 -0
  203. package/lib/shared-tree/index.d.ts +1 -3
  204. package/lib/shared-tree/index.d.ts.map +1 -1
  205. package/lib/shared-tree/index.js +1 -3
  206. package/lib/shared-tree/index.js.map +1 -1
  207. package/lib/shared-tree/schematizingTreeView.d.ts +4 -5
  208. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  209. package/lib/shared-tree/schematizingTreeView.js +4 -5
  210. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  211. package/lib/shared-tree/sharedTree.d.ts +39 -39
  212. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  213. package/lib/shared-tree/sharedTree.js +79 -50
  214. package/lib/shared-tree/sharedTree.js.map +1 -1
  215. package/lib/shared-tree/treeApi.d.ts +2 -2
  216. package/lib/shared-tree/treeApi.d.ts.map +1 -1
  217. package/lib/shared-tree/treeApi.js +8 -2
  218. package/lib/shared-tree/treeApi.js.map +1 -1
  219. package/lib/shared-tree/treeCheckout.d.ts +3 -3
  220. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  221. package/lib/shared-tree/treeCheckout.js +4 -3
  222. package/lib/shared-tree/treeCheckout.js.map +1 -1
  223. package/lib/shared-tree-core/editManager.js +2 -2
  224. package/lib/shared-tree-core/editManager.js.map +1 -1
  225. package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -2
  226. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  227. package/lib/shared-tree-core/editManagerSummarizer.js +0 -9
  228. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  229. package/lib/shared-tree-core/sequenceIdUtils.d.ts +12 -1
  230. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  231. package/lib/shared-tree-core/sequenceIdUtils.js +23 -5
  232. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  233. package/lib/shared-tree-core/sharedTreeCore.d.ts +25 -30
  234. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  235. package/lib/shared-tree-core/sharedTreeCore.js +19 -48
  236. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  237. package/lib/simple-tree/api/index.d.ts +3 -2
  238. package/lib/simple-tree/api/index.d.ts.map +1 -1
  239. package/lib/simple-tree/api/index.js +1 -0
  240. package/lib/simple-tree/api/index.js.map +1 -1
  241. package/lib/simple-tree/api/schemaFactory.d.ts +156 -63
  242. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  243. package/lib/simple-tree/api/schemaFactory.js +178 -85
  244. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  245. package/lib/{shared-tree → simple-tree/api}/transactionTypes.d.ts +1 -1
  246. package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -0
  247. package/lib/{shared-tree → simple-tree/api}/transactionTypes.js.map +1 -1
  248. package/lib/simple-tree/api/tree.d.ts +23 -2
  249. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  250. package/lib/simple-tree/api/tree.js.map +1 -1
  251. package/lib/simple-tree/index.d.ts +1 -1
  252. package/lib/simple-tree/index.d.ts.map +1 -1
  253. package/lib/simple-tree/index.js +1 -1
  254. package/lib/simple-tree/index.js.map +1 -1
  255. package/lib/simple-tree/schemaTypes.d.ts +2 -2
  256. package/lib/simple-tree/schemaTypes.js +1 -1
  257. package/lib/simple-tree/schemaTypes.js.map +1 -1
  258. package/lib/simple-tree/treeNodeValid.js +1 -2
  259. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  260. package/lib/treeFactory.d.ts +16 -5
  261. package/lib/treeFactory.d.ts.map +1 -1
  262. package/lib/treeFactory.js +20 -11
  263. package/lib/treeFactory.js.map +1 -1
  264. package/lib/util/breakable.d.ts +1 -1
  265. package/lib/util/breakable.d.ts.map +1 -1
  266. package/lib/util/breakable.js.map +1 -1
  267. package/lib/util/rangeMap.d.ts +1 -1
  268. package/lib/util/rangeMap.js +1 -1
  269. package/lib/util/rangeMap.js.map +1 -1
  270. package/package.json +21 -21
  271. package/src/core/forest/editableForest.ts +1 -1
  272. package/src/core/index.ts +0 -3
  273. package/src/core/tree/anchorSet.ts +4 -197
  274. package/src/core/tree/index.ts +0 -3
  275. package/src/core/tree/pathTree.ts +0 -13
  276. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -1
  277. package/src/feature-libraries/detachedFieldIndexSummarizer.ts +0 -11
  278. package/src/feature-libraries/flex-tree/treeEvents.ts +2 -4
  279. package/src/feature-libraries/forest-summary/forestSummarizer.ts +0 -11
  280. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +6 -2
  281. package/src/feature-libraries/modular-schema/genericFieldKind.ts +3 -35
  282. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +9 -42
  283. package/src/feature-libraries/optional-field/optionalField.ts +10 -3
  284. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -16
  285. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +13 -2
  286. package/src/index.ts +15 -12
  287. package/src/packageVersion.ts +1 -1
  288. package/src/shared-tree/index.ts +3 -19
  289. package/src/shared-tree/schematizingTreeView.ts +18 -16
  290. package/src/shared-tree/sharedTree.ts +203 -100
  291. package/src/shared-tree/treeApi.ts +10 -1
  292. package/src/shared-tree/treeCheckout.ts +11 -8
  293. package/src/shared-tree-core/editManager.ts +2 -2
  294. package/src/shared-tree-core/editManagerSummarizer.ts +0 -11
  295. package/src/shared-tree-core/sequenceIdUtils.ts +26 -5
  296. package/src/shared-tree-core/sharedTreeCore.ts +30 -87
  297. package/src/simple-tree/api/index.ts +15 -0
  298. package/src/simple-tree/api/schemaFactory.ts +203 -89
  299. package/src/{shared-tree → simple-tree/api}/transactionTypes.ts +1 -1
  300. package/src/simple-tree/api/tree.ts +31 -6
  301. package/src/simple-tree/index.ts +12 -0
  302. package/src/simple-tree/schemaTypes.ts +2 -2
  303. package/src/treeFactory.ts +29 -11
  304. package/src/util/breakable.ts +1 -1
  305. package/src/util/rangeMap.ts +1 -1
  306. package/dist/core/tree/visitPath.d.ts +0 -101
  307. package/dist/core/tree/visitPath.d.ts.map +0 -1
  308. package/dist/core/tree/visitPath.js +0 -7
  309. package/dist/core/tree/visitPath.js.map +0 -1
  310. package/dist/shared-tree/publicContracts.d.ts +0 -18
  311. package/dist/shared-tree/publicContracts.d.ts.map +0 -1
  312. package/dist/shared-tree/publicContracts.js +0 -24
  313. package/dist/shared-tree/publicContracts.js.map +0 -1
  314. package/dist/shared-tree/transactionTypes.d.ts.map +0 -1
  315. package/lib/core/tree/visitPath.d.ts +0 -101
  316. package/lib/core/tree/visitPath.d.ts.map +0 -1
  317. package/lib/core/tree/visitPath.js +0 -6
  318. package/lib/core/tree/visitPath.js.map +0 -1
  319. package/lib/shared-tree/publicContracts.d.ts +0 -18
  320. package/lib/shared-tree/publicContracts.d.ts.map +0 -1
  321. package/lib/shared-tree/publicContracts.js +0 -21
  322. package/lib/shared-tree/publicContracts.js.map +0 -1
  323. package/lib/shared-tree/transactionTypes.d.ts.map +0 -1
  324. package/src/core/tree/visitPath.ts +0 -124
  325. package/src/shared-tree/publicContracts.ts +0 -24
  326. /package/dist/{shared-tree → simple-tree/api}/transactionTypes.js +0 -0
  327. /package/lib/{shared-tree → simple-tree/api}/transactionTypes.js +0 -0
@@ -72,6 +72,105 @@ export declare const defaultSchemaFactoryObjectOptions: Required<Omit<SchemaFact
72
72
  * @system @public
73
73
  */
74
74
  export type ScopedSchemaName<TScope extends string | undefined, TName extends number | string> = TScope extends undefined ? `${TName}` : `${TScope}.${TName}`;
75
+ /**
76
+ * Stateless APIs exposed via {@link SchemaFactory} as both instance properties and as statics.
77
+ * @privateRemarks
78
+ * We have no way to make linkable members which exist both as statics and instance properties since API-Extractor does not support this.
79
+ * As a workaround, we have this type as a third place which can be linked.
80
+ * @system @sealed @public
81
+ */
82
+ export declare const schemaStatics: {
83
+ /**
84
+ * {@link TreeNodeSchema} for holding a JavaScript `string`.
85
+ *
86
+ * @remarks
87
+ * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.
88
+ *
89
+ * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.
90
+ * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.
91
+ * @privateRemarks
92
+ * TODO:
93
+ * We should be much more clear about what happens if you use problematic values.
94
+ * We should validate and/or normalize them when inserting content.
95
+ */
96
+ readonly string: TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>;
97
+ /**
98
+ * {@link TreeNodeSchema} for holding a JavaScript `number`.
99
+ *
100
+ * @remarks
101
+ * The number is a {@link https://en.wikipedia.org/wiki/Double-precision_floating-point_format | double-precision 64-bit binary format IEEE 754} value, however there are some exceptions:
102
+ * - `NaN`, and the infinities are converted to `null` (and may therefore only be used where `null` is allowed by the schema).
103
+ * - `-0` may be converted to `0` in some cases.
104
+ *
105
+ * These limitations match the limitations of JSON.
106
+ * @privateRemarks
107
+ * TODO:
108
+ * We should be much more clear about what happens if you use problematic values.
109
+ * We should validate and/or normalize them when inserting content.
110
+ */
111
+ readonly number: TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>;
112
+ /**
113
+ * {@link TreeNodeSchema} for holding a boolean.
114
+ */
115
+ readonly boolean: TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>;
116
+ /**
117
+ * {@link TreeNodeSchema} for JavaScript `null`.
118
+ *
119
+ * @remarks
120
+ * There are good {@link https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null | reasons to avoid using null} in JavaScript, however sometimes it is desired.
121
+ * This {@link TreeNodeSchema} node provides the option to include nulls in trees when desired.
122
+ * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.
123
+ */
124
+ readonly null: TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>;
125
+ /**
126
+ * {@link TreeNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.
127
+ */
128
+ readonly handle: TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>;
129
+ /**
130
+ * {@link AllowedTypes} for holding any of the leaf types.
131
+ */
132
+ readonly leaves: readonly [TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>];
133
+ /**
134
+ * Make a field optional instead of the default, which is required.
135
+ *
136
+ * @param t - The types allowed under the field.
137
+ * @param props - Optional properties to associate with the field.
138
+ *
139
+ * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
140
+ * See {@link FieldSchemaMetadata.custom}.
141
+ */
142
+ readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
143
+ /**
144
+ * Make a field explicitly required.
145
+ *
146
+ * @param t - The types allowed under the field.
147
+ * @param props - Optional properties to associate with the field.
148
+ *
149
+ * @remarks
150
+ * Fields are required by default, but this API can be used to make the required nature explicit in the schema,
151
+ * and allows associating custom {@link FieldProps | properties} with the field.
152
+ *
153
+ * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
154
+ * See {@link FieldSchemaMetadata.custom}.
155
+ */
156
+ readonly required: <const T_1 extends ImplicitAllowedTypes, const TCustomMetadata_1 = unknown>(t: T_1, props?: Omit<FieldProps<TCustomMetadata_1>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T_1, TCustomMetadata_1>;
157
+ /**
158
+ * {@link schemaStatics.optional} except tweaked to work better for recursive types.
159
+ * Use with {@link ValidateRecursiveSchema} for improved type safety.
160
+ * @remarks
161
+ * This version of {@link schemaStatics.optional} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
162
+ * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
163
+ */
164
+ readonly optionalRecursive: <const T_2 extends unknown>(t: T_2, props?: Omit<FieldProps, "defaultProvider">) => FieldSchemaUnsafe<FieldKind.Optional, T_2>;
165
+ /**
166
+ * {@link schemaStatics.required} except tweaked to work better for recursive types.
167
+ * Use with {@link ValidateRecursiveSchema} for improved type safety.
168
+ * @remarks
169
+ * This version of {@link schemaStatics.required} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
170
+ * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
171
+ */
172
+ readonly requiredRecursive: <const T_3 extends unknown>(t: T_3, props?: Omit<FieldProps, "defaultProvider">) => FieldSchemaUnsafe<FieldKind.Required, T_3>;
173
+ };
75
174
  /**
76
175
  * Creates various types of {@link TreeNodeSchema|schema} for {@link TreeNode}s.
77
176
  *
@@ -246,51 +345,53 @@ export declare class SchemaFactory<out TScope extends string | undefined = strin
246
345
  scope: TScope);
247
346
  private scoped;
248
347
  /**
249
- * {@link TreeNodeSchema} for holding a JavaScript `string`.
250
- *
251
- * @remarks
252
- * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.
253
- *
254
- * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.
255
- * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.
256
- * @privateRemarks
257
- * TODO:
258
- * We should be much more clear about what happens if you use problematic values.
259
- * We should validate and/or normalize them when inserting content.
348
+ * {@inheritDoc schemaStatics.string}
260
349
  */
261
350
  readonly string: TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>;
262
351
  /**
263
- * {@link TreeNodeSchema} for holding a JavaScript `number`.
264
- *
265
- * @remarks
266
- * The number is a [double-precision 64-bit binary format IEEE 754](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) value, however there are some exceptions:
267
- * - `NaN`, and the infinities are converted to `null` (and may therefore only be used where `null` is allowed by the schema).
268
- * - `-0` may be converted to `0` in some cases.
269
- *
270
- * These limitations match the limitations of JSON.
271
- * @privateRemarks
272
- * TODO:
273
- * We should be much more clear about what happens if you use problematic values.
274
- * We should validate and/or normalize them when inserting content.
352
+ * {@inheritDoc schemaStatics.number}
275
353
  */
276
354
  readonly number: TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>;
277
355
  /**
278
- * {@link TreeNodeSchema} for holding a boolean.
356
+ * {@inheritDoc schemaStatics.boolean}
279
357
  */
280
358
  readonly boolean: TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>;
281
359
  /**
282
- * {@link TreeNodeSchema} for JavaScript `null`.
283
- *
284
- * @remarks
285
- * There are good [reasons to avoid using null](https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null) in JavaScript, however sometimes it is desired.
286
- * This {@link TreeNodeSchema} node provides the option to include nulls in trees when desired.
287
- * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.
360
+ * {@inheritDoc schemaStatics.null}
288
361
  */
289
362
  readonly null: TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>;
290
363
  /**
291
- * {@link TreeNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.
364
+ * {@inheritDoc schemaStatics.handle}
292
365
  */
293
366
  readonly handle: TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>;
367
+ /**
368
+ * {@inheritDoc schemaStatics.leaves}
369
+ */
370
+ readonly leaves: readonly [TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>];
371
+ /**
372
+ * {@inheritDoc schemaStatics.string}
373
+ */
374
+ static readonly string: TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>;
375
+ /**
376
+ * {@inheritDoc schemaStatics.number}
377
+ */
378
+ static readonly number: TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>;
379
+ /**
380
+ * {@inheritDoc schemaStatics.boolean}
381
+ */
382
+ static readonly boolean: TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>;
383
+ /**
384
+ * {@inheritDoc schemaStatics.null}
385
+ */
386
+ static readonly null: TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>;
387
+ /**
388
+ * {@inheritDoc schemaStatics.handle}
389
+ */
390
+ static readonly handle: TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>;
391
+ /**
392
+ * {@inheritDoc schemaStatics.leaves}
393
+ */
394
+ static readonly leaves: readonly [TreeNodeSchemaNonClass<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.boolean", NodeKind.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.null", NodeKind.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass<"com.fluidframework.leaf.handle", NodeKind.Leaf, _dummyImport<unknown>, _dummyImport<unknown>, true, unknown, never, unknown>];
294
395
  /**
295
396
  * Define a {@link TreeNodeSchemaClass} for a {@link TreeObjectNode}.
296
397
  *
@@ -403,45 +504,37 @@ export declare class SchemaFactory<out TScope extends string | undefined = strin
403
504
  */
404
505
  private namedArray;
405
506
  /**
406
- * Make a field optional instead of the default, which is required.
407
- *
408
- * @param t - The types allowed under the field.
409
- * @param props - Optional properties to associate with the field.
410
- *
411
- * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
412
- * See {@link FieldSchemaMetadata.custom}.
507
+ * {@inheritDoc schemaStatics.optional}
413
508
  */
414
- optional<const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">): FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
509
+ readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
415
510
  /**
416
- * Make a field explicitly required.
417
- *
418
- * @param t - The types allowed under the field.
419
- * @param props - Optional properties to associate with the field.
420
- *
421
- * @remarks
422
- * Fields are required by default, but this API can be used to make the required nature explicit in the schema,
423
- * and allows associating custom {@link FieldProps | properties} with the field.
424
- *
425
- * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
426
- * See {@link FieldSchemaMetadata.custom}.
511
+ * {@inheritDoc schemaStatics.required}
427
512
  */
428
- required<const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">): FieldSchema<FieldKind.Required, T, TCustomMetadata>;
513
+ readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
429
514
  /**
430
- * {@link SchemaFactory.optional} except tweaked to work better for recursive types.
431
- * Use with {@link ValidateRecursiveSchema} for improved type safety.
432
- * @remarks
433
- * This version of {@link SchemaFactory.optional} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
434
- * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
515
+ * {@inheritDoc schemaStatics.optionalRecursive}
435
516
  */
436
- optionalRecursive<const T extends Unenforced<ImplicitAllowedTypes>>(t: T, props?: Omit<FieldProps, "defaultProvider">): FieldSchemaUnsafe<FieldKind.Optional, T>;
517
+ readonly optionalRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<unknown>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Optional, T>;
437
518
  /**
438
- * {@link SchemaFactory.required} except tweaked to work better for recursive types.
439
- * Use with {@link ValidateRecursiveSchema} for improved type safety.
440
- * @remarks
441
- * This version of {@link SchemaFactory.required} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
442
- * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
519
+ * {@inheritDoc schemaStatics.requiredRecursive}
520
+ */
521
+ readonly requiredRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<unknown>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Required, T>;
522
+ /**
523
+ * {@inheritDoc schemaStatics.optional}
524
+ */
525
+ static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
526
+ /**
527
+ * {@inheritDoc schemaStatics.required}
528
+ */
529
+ static readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
530
+ /**
531
+ * {@inheritDoc schemaStatics.optionalRecursive}
532
+ */
533
+ static readonly optionalRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<unknown>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Optional, T>;
534
+ /**
535
+ * {@inheritDoc schemaStatics.requiredRecursive}
443
536
  */
444
- requiredRecursive<const T extends Unenforced<ImplicitAllowedTypes>>(t: T, props?: Omit<FieldProps, "defaultProvider">): FieldSchemaUnsafe<FieldKind.Required, T>;
537
+ static readonly requiredRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<unknown>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Required, T>;
445
538
  /**
446
539
  * A special field which holds a unique identifier for an object node.
447
540
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFactory.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK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AMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAelE"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.markSchemaMostDerived = exports.structuralName = exports.SchemaFactory = exports.defaultSchemaFactoryObjectOptions = exports.schemaFromValue = void 0;
7
+ exports.markSchemaMostDerived = exports.structuralName = exports.SchemaFactory = exports.schemaStatics = exports.defaultSchemaFactoryObjectOptions = exports.schemaFromValue = void 0;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const internal_2 = require("@fluidframework/telemetry-utils/internal");
10
10
  const internal_3 = require("@fluidframework/runtime-utils/internal");
@@ -45,6 +45,119 @@ exports.defaultSchemaFactoryObjectOptions = {
45
45
  allowUnknownOptionalFields: false,
46
46
  };
47
47
  // > = `${TScope extends undefined ? "" : `${TScope}.`}${TName}`;
48
+ /**
49
+ * Stateless APIs exposed via {@link SchemaFactory} as both instance properties and as statics.
50
+ * @privateRemarks
51
+ * We have no way to make linkable members which exist both as statics and instance properties since API-Extractor does not support this.
52
+ * As a workaround, we have this type as a third place which can be linked.
53
+ * @system @sealed @public
54
+ */
55
+ exports.schemaStatics = {
56
+ /**
57
+ * {@link TreeNodeSchema} for holding a JavaScript `string`.
58
+ *
59
+ * @remarks
60
+ * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.
61
+ *
62
+ * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.
63
+ * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.
64
+ * @privateRemarks
65
+ * TODO:
66
+ * We should be much more clear about what happens if you use problematic values.
67
+ * We should validate and/or normalize them when inserting content.
68
+ */
69
+ string: leafNodeSchema_js_1.stringSchema,
70
+ /**
71
+ * {@link TreeNodeSchema} for holding a JavaScript `number`.
72
+ *
73
+ * @remarks
74
+ * The number is a {@link https://en.wikipedia.org/wiki/Double-precision_floating-point_format | double-precision 64-bit binary format IEEE 754} value, however there are some exceptions:
75
+ * - `NaN`, and the infinities are converted to `null` (and may therefore only be used where `null` is allowed by the schema).
76
+ * - `-0` may be converted to `0` in some cases.
77
+ *
78
+ * These limitations match the limitations of JSON.
79
+ * @privateRemarks
80
+ * TODO:
81
+ * We should be much more clear about what happens if you use problematic values.
82
+ * We should validate and/or normalize them when inserting content.
83
+ */
84
+ number: leafNodeSchema_js_1.numberSchema,
85
+ /**
86
+ * {@link TreeNodeSchema} for holding a boolean.
87
+ */
88
+ boolean: leafNodeSchema_js_1.booleanSchema,
89
+ /**
90
+ * {@link TreeNodeSchema} for JavaScript `null`.
91
+ *
92
+ * @remarks
93
+ * There are good {@link https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null | reasons to avoid using null} in JavaScript, however sometimes it is desired.
94
+ * This {@link TreeNodeSchema} node provides the option to include nulls in trees when desired.
95
+ * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.
96
+ */
97
+ null: leafNodeSchema_js_1.nullSchema,
98
+ /**
99
+ * {@link TreeNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.
100
+ */
101
+ handle: leafNodeSchema_js_1.handleSchema,
102
+ /**
103
+ * {@link AllowedTypes} for holding any of the leaf types.
104
+ */
105
+ leaves: [leafNodeSchema_js_1.stringSchema, leafNodeSchema_js_1.numberSchema, leafNodeSchema_js_1.booleanSchema, leafNodeSchema_js_1.nullSchema, leafNodeSchema_js_1.handleSchema],
106
+ /**
107
+ * Make a field optional instead of the default, which is required.
108
+ *
109
+ * @param t - The types allowed under the field.
110
+ * @param props - Optional properties to associate with the field.
111
+ *
112
+ * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
113
+ * See {@link FieldSchemaMetadata.custom}.
114
+ */
115
+ optional: (t, props) => {
116
+ const defaultOptionalProvider = (0, schemaTypes_js_1.getDefaultProvider)(() => {
117
+ return undefined;
118
+ });
119
+ return (0, schemaTypes_js_1.createFieldSchema)(schemaTypes_js_1.FieldKind.Optional, t, {
120
+ defaultProvider: defaultOptionalProvider,
121
+ ...props,
122
+ });
123
+ },
124
+ /**
125
+ * Make a field explicitly required.
126
+ *
127
+ * @param t - The types allowed under the field.
128
+ * @param props - Optional properties to associate with the field.
129
+ *
130
+ * @remarks
131
+ * Fields are required by default, but this API can be used to make the required nature explicit in the schema,
132
+ * and allows associating custom {@link FieldProps | properties} with the field.
133
+ *
134
+ * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
135
+ * See {@link FieldSchemaMetadata.custom}.
136
+ */
137
+ required: (t, props) => {
138
+ return (0, schemaTypes_js_1.createFieldSchema)(schemaTypes_js_1.FieldKind.Required, t, props);
139
+ },
140
+ /**
141
+ * {@link schemaStatics.optional} except tweaked to work better for recursive types.
142
+ * Use with {@link ValidateRecursiveSchema} for improved type safety.
143
+ * @remarks
144
+ * This version of {@link schemaStatics.optional} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
145
+ * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
146
+ */
147
+ optionalRecursive: (t, props) => {
148
+ return (0, schemaFactoryRecursive_js_1.createFieldSchemaUnsafe)(schemaTypes_js_1.FieldKind.Optional, t, props);
149
+ },
150
+ /**
151
+ * {@link schemaStatics.required} except tweaked to work better for recursive types.
152
+ * Use with {@link ValidateRecursiveSchema} for improved type safety.
153
+ * @remarks
154
+ * This version of {@link schemaStatics.required} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
155
+ * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
156
+ */
157
+ requiredRecursive: (t, props) => {
158
+ return (0, schemaFactoryRecursive_js_1.createFieldSchemaUnsafe)(schemaTypes_js_1.FieldKind.Required, t, props);
159
+ },
160
+ };
48
161
  // TODO:
49
162
  // SchemaFactory.array references should link to the correct overloads, however the syntax for this does not seems to work currently for methods unless the they are not qualified with the class.
50
163
  // API-Extractor requires such links to be qualified with the class, so it can't work.
@@ -191,51 +304,45 @@ class SchemaFactory {
191
304
  */
192
305
  this.structuralTypes = new Map();
193
306
  /**
194
- * {@link TreeNodeSchema} for holding a JavaScript `string`.
195
- *
196
- * @remarks
197
- * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.
198
- *
199
- * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.
200
- * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.
201
- * @privateRemarks
202
- * TODO:
203
- * We should be much more clear about what happens if you use problematic values.
204
- * We should validate and/or normalize them when inserting content.
307
+ * {@inheritDoc schemaStatics.string}
205
308
  */
206
309
  this.string = leafNodeSchema_js_1.stringSchema;
207
310
  /**
208
- * {@link TreeNodeSchema} for holding a JavaScript `number`.
209
- *
210
- * @remarks
211
- * The number is a [double-precision 64-bit binary format IEEE 754](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) value, however there are some exceptions:
212
- * - `NaN`, and the infinities are converted to `null` (and may therefore only be used where `null` is allowed by the schema).
213
- * - `-0` may be converted to `0` in some cases.
214
- *
215
- * These limitations match the limitations of JSON.
216
- * @privateRemarks
217
- * TODO:
218
- * We should be much more clear about what happens if you use problematic values.
219
- * We should validate and/or normalize them when inserting content.
311
+ * {@inheritDoc schemaStatics.number}
220
312
  */
221
313
  this.number = leafNodeSchema_js_1.numberSchema;
222
314
  /**
223
- * {@link TreeNodeSchema} for holding a boolean.
315
+ * {@inheritDoc schemaStatics.boolean}
224
316
  */
225
317
  this.boolean = leafNodeSchema_js_1.booleanSchema;
226
318
  /**
227
- * {@link TreeNodeSchema} for JavaScript `null`.
228
- *
229
- * @remarks
230
- * There are good [reasons to avoid using null](https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null) in JavaScript, however sometimes it is desired.
231
- * This {@link TreeNodeSchema} node provides the option to include nulls in trees when desired.
232
- * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.
319
+ * {@inheritDoc schemaStatics.null}
233
320
  */
234
321
  this.null = leafNodeSchema_js_1.nullSchema;
235
322
  /**
236
- * {@link TreeNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.
323
+ * {@inheritDoc schemaStatics.handle}
237
324
  */
238
325
  this.handle = leafNodeSchema_js_1.handleSchema;
326
+ /**
327
+ * {@inheritDoc schemaStatics.leaves}
328
+ */
329
+ this.leaves = exports.schemaStatics.leaves;
330
+ /**
331
+ * {@inheritDoc schemaStatics.optional}
332
+ */
333
+ this.optional = exports.schemaStatics.optional;
334
+ /**
335
+ * {@inheritDoc schemaStatics.required}
336
+ */
337
+ this.required = exports.schemaStatics.required;
338
+ /**
339
+ * {@inheritDoc schemaStatics.optionalRecursive}
340
+ */
341
+ this.optionalRecursive = exports.schemaStatics.optionalRecursive;
342
+ /**
343
+ * {@inheritDoc schemaStatics.requiredRecursive}
344
+ */
345
+ this.requiredRecursive = exports.schemaStatics.requiredRecursive;
239
346
  }
240
347
  scoped(name) {
241
348
  return (this.scope === undefined ? `${name}` : `${this.scope}.${name}`);
@@ -304,60 +411,6 @@ class SchemaFactory {
304
411
  namedArray(name, allowedTypes, customizable, implicitlyConstructable) {
305
412
  return (0, arrayNode_js_1.arraySchema)(this.scoped(name), allowedTypes, implicitlyConstructable, customizable);
306
413
  }
307
- /**
308
- * Make a field optional instead of the default, which is required.
309
- *
310
- * @param t - The types allowed under the field.
311
- * @param props - Optional properties to associate with the field.
312
- *
313
- * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
314
- * See {@link FieldSchemaMetadata.custom}.
315
- */
316
- optional(t, props) {
317
- const defaultOptionalProvider = (0, schemaTypes_js_1.getDefaultProvider)(() => {
318
- return undefined;
319
- });
320
- return (0, schemaTypes_js_1.createFieldSchema)(schemaTypes_js_1.FieldKind.Optional, t, {
321
- defaultProvider: defaultOptionalProvider,
322
- ...props,
323
- });
324
- }
325
- /**
326
- * Make a field explicitly required.
327
- *
328
- * @param t - The types allowed under the field.
329
- * @param props - Optional properties to associate with the field.
330
- *
331
- * @remarks
332
- * Fields are required by default, but this API can be used to make the required nature explicit in the schema,
333
- * and allows associating custom {@link FieldProps | properties} with the field.
334
- *
335
- * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.
336
- * See {@link FieldSchemaMetadata.custom}.
337
- */
338
- required(t, props) {
339
- return (0, schemaTypes_js_1.createFieldSchema)(schemaTypes_js_1.FieldKind.Required, t, props);
340
- }
341
- /**
342
- * {@link SchemaFactory.optional} except tweaked to work better for recursive types.
343
- * Use with {@link ValidateRecursiveSchema} for improved type safety.
344
- * @remarks
345
- * This version of {@link SchemaFactory.optional} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
346
- * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
347
- */
348
- optionalRecursive(t, props) {
349
- return (0, schemaFactoryRecursive_js_1.createFieldSchemaUnsafe)(schemaTypes_js_1.FieldKind.Optional, t, props);
350
- }
351
- /**
352
- * {@link SchemaFactory.required} except tweaked to work better for recursive types.
353
- * Use with {@link ValidateRecursiveSchema} for improved type safety.
354
- * @remarks
355
- * This version of {@link SchemaFactory.required} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.
356
- * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.
357
- */
358
- requiredRecursive(t, props) {
359
- return (0, schemaFactoryRecursive_js_1.createFieldSchemaUnsafe)(schemaTypes_js_1.FieldKind.Required, t, props);
360
- }
361
414
  /**
362
415
  * A special field which holds a unique identifier for an object node.
363
416
  * @remarks
@@ -429,6 +482,46 @@ class SchemaFactory {
429
482
  }
430
483
  }
431
484
  exports.SchemaFactory = SchemaFactory;
485
+ /**
486
+ * {@inheritDoc schemaStatics.string}
487
+ */
488
+ SchemaFactory.string = leafNodeSchema_js_1.stringSchema;
489
+ /**
490
+ * {@inheritDoc schemaStatics.number}
491
+ */
492
+ SchemaFactory.number = leafNodeSchema_js_1.numberSchema;
493
+ /**
494
+ * {@inheritDoc schemaStatics.boolean}
495
+ */
496
+ SchemaFactory.boolean = leafNodeSchema_js_1.booleanSchema;
497
+ /**
498
+ * {@inheritDoc schemaStatics.null}
499
+ */
500
+ SchemaFactory.null = leafNodeSchema_js_1.nullSchema;
501
+ /**
502
+ * {@inheritDoc schemaStatics.handle}
503
+ */
504
+ SchemaFactory.handle = leafNodeSchema_js_1.handleSchema;
505
+ /**
506
+ * {@inheritDoc schemaStatics.leaves}
507
+ */
508
+ SchemaFactory.leaves = exports.schemaStatics.leaves;
509
+ /**
510
+ * {@inheritDoc schemaStatics.optional}
511
+ */
512
+ SchemaFactory.optional = exports.schemaStatics.optional;
513
+ /**
514
+ * {@inheritDoc schemaStatics.required}
515
+ */
516
+ SchemaFactory.required = exports.schemaStatics.required;
517
+ /**
518
+ * {@inheritDoc schemaStatics.optionalRecursive}
519
+ */
520
+ SchemaFactory.optionalRecursive = exports.schemaStatics.optionalRecursive;
521
+ /**
522
+ * {@inheritDoc schemaStatics.requiredRecursive}
523
+ */
524
+ SchemaFactory.requiredRecursive = exports.schemaStatics.requiredRecursive;
432
525
  function structuralName(collectionName, allowedTypes) {
433
526
  let inner;
434
527
  if (!(0, index_js_1.isReadonlyArray)(allowedTypes)) {