@fluidframework/tree 2.51.0 → 2.52.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 (579) hide show
  1. package/.vscode/settings.json +0 -1
  2. package/CHANGELOG.md +43 -0
  3. package/api-report/tree.alpha.api.md +3 -2
  4. package/dist/codec/codec.d.ts +2 -1
  5. package/dist/codec/codec.d.ts.map +1 -1
  6. package/dist/codec/codec.js +4 -3
  7. package/dist/codec/codec.js.map +1 -1
  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 +3 -2
  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 +3 -1
  17. package/dist/core/rebase/types.d.ts.map +1 -1
  18. package/dist/core/rebase/types.js +2 -1
  19. package/dist/core/rebase/types.js.map +1 -1
  20. package/dist/core/schema-stored/schema.d.ts +1 -23
  21. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  22. package/dist/core/schema-stored/schema.js +2 -2
  23. package/dist/core/schema-stored/schema.js.map +1 -1
  24. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  25. package/dist/core/tree/detachedFieldIndex.js +2 -3
  26. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  27. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +17 -0
  28. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -0
  29. package/dist/core/tree/detachedFieldIndexCodecCommon.js +68 -0
  30. package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -0
  31. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts +11 -0
  32. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -0
  33. package/dist/core/tree/detachedFieldIndexCodecV1.js +55 -0
  34. package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -0
  35. package/dist/core/tree/detachedFieldIndexCodecV2.d.ts +11 -0
  36. package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -0
  37. package/dist/core/tree/detachedFieldIndexCodecV2.js +49 -0
  38. package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -0
  39. package/dist/core/tree/detachedFieldIndexCodecs.d.ts +11 -0
  40. package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -0
  41. package/dist/core/tree/detachedFieldIndexCodecs.js +26 -0
  42. package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -0
  43. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +37 -0
  44. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -0
  45. package/dist/core/tree/{detachedFieldIndexFormat.js → detachedFieldIndexFormatCommon.js} +18 -13
  46. package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -0
  47. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts +13 -0
  48. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -0
  49. package/dist/core/tree/detachedFieldIndexFormatV1.js +12 -0
  50. package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -0
  51. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +14 -0
  52. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -0
  53. package/dist/core/tree/detachedFieldIndexFormatV2.js +14 -0
  54. package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -0
  55. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +9 -9
  56. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  57. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +21 -21
  58. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  59. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +4 -2
  60. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  61. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +4 -4
  62. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  63. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +50 -31
  64. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  65. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +74 -61
  66. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  67. package/dist/feature-libraries/chunked-forest/codec/format.d.ts +20 -14
  68. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  69. package/dist/feature-libraries/chunked-forest/codec/format.js +18 -12
  70. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  71. package/{lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts → dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts} +20 -14
  72. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -0
  73. package/dist/feature-libraries/chunked-forest/codec/{nodeShape.js → nodeEncoder.js} +23 -17
  74. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -0
  75. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +7 -7
  76. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  77. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +22 -22
  78. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  79. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +2 -2
  80. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  81. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +5 -1
  82. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  83. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +14 -2
  84. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  85. package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
  86. package/dist/feature-libraries/default-schema/defaultSchema.js +0 -2
  87. package/dist/feature-libraries/default-schema/defaultSchema.js.map +1 -1
  88. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  89. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  90. package/dist/feature-libraries/default-schema/index.js +2 -2
  91. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  92. package/dist/feature-libraries/default-schema/schemaChecker.d.ts +14 -4
  93. package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  94. package/dist/feature-libraries/default-schema/schemaChecker.js +31 -26
  95. package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  96. package/dist/feature-libraries/index.d.ts +1 -2
  97. package/dist/feature-libraries/index.d.ts.map +1 -1
  98. package/dist/feature-libraries/index.js +2 -4
  99. package/dist/feature-libraries/index.js.map +1 -1
  100. package/dist/feature-libraries/modular-schema/comparison.d.ts +5 -6
  101. package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  102. package/dist/feature-libraries/modular-schema/comparison.js +15 -16
  103. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  104. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +9 -3
  105. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  106. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  107. package/dist/feature-libraries/object-forest/objectForest.js +2 -3
  108. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  109. package/dist/index.d.ts +1 -1
  110. package/dist/index.d.ts.map +1 -1
  111. package/dist/index.js +6 -2
  112. package/dist/index.js.map +1 -1
  113. package/dist/packageVersion.d.ts +1 -1
  114. package/dist/packageVersion.js +1 -1
  115. package/dist/packageVersion.js.map +1 -1
  116. package/dist/shared-tree/independentView.d.ts +8 -0
  117. package/dist/shared-tree/independentView.d.ts.map +1 -1
  118. package/dist/shared-tree/independentView.js +23 -11
  119. package/dist/shared-tree/independentView.js.map +1 -1
  120. package/dist/shared-tree/schematizeTree.js +1 -1
  121. package/dist/shared-tree/schematizeTree.js.map +1 -1
  122. package/dist/shared-tree/schematizingTreeView.d.ts +0 -1
  123. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  124. package/dist/shared-tree/schematizingTreeView.js +7 -10
  125. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  126. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  127. package/dist/shared-tree/sharedTree.js +1 -29
  128. package/dist/shared-tree/sharedTree.js.map +1 -1
  129. package/dist/shared-tree/treeAlpha.d.ts +20 -6
  130. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  131. package/dist/shared-tree/treeAlpha.js +9 -4
  132. package/dist/shared-tree/treeAlpha.js.map +1 -1
  133. package/dist/shared-tree/treeCheckout.d.ts +2 -1
  134. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  135. package/dist/shared-tree/treeCheckout.js +32 -0
  136. package/dist/shared-tree/treeCheckout.js.map +1 -1
  137. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  138. package/dist/shared-tree-core/branch.js +1 -1
  139. package/dist/shared-tree-core/branch.js.map +1 -1
  140. package/dist/simple-tree/api/conciseTree.d.ts +2 -2
  141. package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
  142. package/dist/simple-tree/api/conciseTree.js +6 -6
  143. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  144. package/dist/simple-tree/api/configuration.d.ts +8 -2
  145. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  146. package/dist/simple-tree/api/configuration.js.map +1 -1
  147. package/dist/simple-tree/api/create.d.ts +8 -7
  148. package/dist/simple-tree/api/create.d.ts.map +1 -1
  149. package/dist/simple-tree/api/create.js +35 -22
  150. package/dist/simple-tree/api/create.js.map +1 -1
  151. package/dist/simple-tree/api/customTree.d.ts +25 -4
  152. package/dist/simple-tree/api/customTree.d.ts.map +1 -1
  153. package/dist/simple-tree/api/customTree.js +42 -16
  154. package/dist/simple-tree/api/customTree.js.map +1 -1
  155. package/dist/simple-tree/api/discrepancies.d.ts +98 -0
  156. package/dist/simple-tree/api/discrepancies.d.ts.map +1 -0
  157. package/dist/simple-tree/api/discrepancies.js +255 -0
  158. package/dist/simple-tree/api/discrepancies.js.map +1 -0
  159. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +9 -7
  160. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  161. package/dist/simple-tree/api/schemaCompatibilityTester.js +18 -117
  162. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  163. package/dist/simple-tree/api/schemaFactory.d.ts +7 -4
  164. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  165. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  166. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  167. package/dist/simple-tree/api/storedSchema.js +5 -1
  168. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  169. package/dist/simple-tree/api/treeBeta.d.ts +2 -2
  170. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  171. package/dist/simple-tree/api/treeBeta.js +10 -4
  172. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  173. package/dist/simple-tree/api/verboseTree.d.ts +2 -2
  174. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  175. package/dist/simple-tree/api/verboseTree.js +15 -15
  176. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  177. package/dist/simple-tree/core/allowedTypes.d.ts +20 -4
  178. package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
  179. package/dist/simple-tree/core/allowedTypes.js +45 -13
  180. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  181. package/dist/simple-tree/core/context.d.ts +13 -2
  182. package/dist/simple-tree/core/context.d.ts.map +1 -1
  183. package/dist/simple-tree/core/context.js +22 -9
  184. package/dist/simple-tree/core/context.js.map +1 -1
  185. package/dist/simple-tree/core/index.d.ts +2 -2
  186. package/dist/simple-tree/core/index.d.ts.map +1 -1
  187. package/dist/simple-tree/core/index.js +3 -1
  188. package/dist/simple-tree/core/index.js.map +1 -1
  189. package/dist/simple-tree/core/treeNodeKernel.d.ts +1 -1
  190. package/dist/simple-tree/core/treeNodeKernel.js +1 -1
  191. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  192. package/dist/simple-tree/core/treeNodeValid.d.ts +1 -1
  193. package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  194. package/dist/simple-tree/core/treeNodeValid.js +8 -1
  195. package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
  196. package/dist/simple-tree/core/walkSchema.d.ts +3 -0
  197. package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
  198. package/dist/simple-tree/core/walkSchema.js +2 -0
  199. package/dist/simple-tree/core/walkSchema.js.map +1 -1
  200. package/dist/simple-tree/createContext.d.ts +2 -0
  201. package/dist/simple-tree/createContext.d.ts.map +1 -1
  202. package/dist/simple-tree/createContext.js +3 -1
  203. package/dist/simple-tree/createContext.js.map +1 -1
  204. package/dist/simple-tree/fieldSchema.d.ts +1 -0
  205. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  206. package/dist/simple-tree/fieldSchema.js +1 -0
  207. package/dist/simple-tree/fieldSchema.js.map +1 -1
  208. package/dist/simple-tree/index.d.ts +4 -4
  209. package/dist/simple-tree/index.d.ts.map +1 -1
  210. package/dist/simple-tree/index.js +7 -8
  211. package/dist/simple-tree/index.js.map +1 -1
  212. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  213. package/dist/simple-tree/node-kinds/array/arrayNode.js +1 -1
  214. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  215. package/dist/simple-tree/node-kinds/index.d.ts +1 -1
  216. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -1
  217. package/dist/simple-tree/node-kinds/index.js +1 -2
  218. package/dist/simple-tree/node-kinds/index.js.map +1 -1
  219. package/dist/simple-tree/node-kinds/object/index.d.ts +1 -1
  220. package/dist/simple-tree/node-kinds/object/index.d.ts.map +1 -1
  221. package/dist/simple-tree/node-kinds/object/index.js +1 -2
  222. package/dist/simple-tree/node-kinds/object/index.js.map +1 -1
  223. package/dist/simple-tree/node-kinds/object/objectNode.d.ts +2 -7
  224. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  225. package/dist/simple-tree/node-kinds/object/objectNode.js +4 -18
  226. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  227. package/dist/simple-tree/prepareForInsertion.d.ts +5 -5
  228. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  229. package/dist/simple-tree/prepareForInsertion.js +9 -3
  230. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  231. package/dist/simple-tree/toStoredSchema.d.ts +3 -0
  232. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  233. package/dist/simple-tree/toStoredSchema.js +3 -0
  234. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  235. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +2 -2
  236. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  237. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  238. package/dist/simple-tree/walkFieldSchema.d.ts +1 -0
  239. package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -1
  240. package/dist/simple-tree/walkFieldSchema.js +1 -0
  241. package/dist/simple-tree/walkFieldSchema.js.map +1 -1
  242. package/lib/codec/codec.d.ts +2 -1
  243. package/lib/codec/codec.d.ts.map +1 -1
  244. package/lib/codec/codec.js +4 -3
  245. package/lib/codec/codec.js.map +1 -1
  246. package/lib/core/index.d.ts +1 -1
  247. package/lib/core/index.d.ts.map +1 -1
  248. package/lib/core/index.js +1 -1
  249. package/lib/core/index.js.map +1 -1
  250. package/lib/core/rebase/index.d.ts +1 -1
  251. package/lib/core/rebase/index.d.ts.map +1 -1
  252. package/lib/core/rebase/index.js +1 -1
  253. package/lib/core/rebase/index.js.map +1 -1
  254. package/lib/core/rebase/types.d.ts +3 -1
  255. package/lib/core/rebase/types.d.ts.map +1 -1
  256. package/lib/core/rebase/types.js +1 -0
  257. package/lib/core/rebase/types.js.map +1 -1
  258. package/lib/core/schema-stored/schema.d.ts +1 -23
  259. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  260. package/lib/core/schema-stored/schema.js +2 -2
  261. package/lib/core/schema-stored/schema.js.map +1 -1
  262. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  263. package/lib/core/tree/detachedFieldIndex.js +2 -3
  264. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  265. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +17 -0
  266. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -0
  267. package/lib/core/tree/detachedFieldIndexCodecCommon.js +64 -0
  268. package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -0
  269. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts +11 -0
  270. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -0
  271. package/lib/core/tree/detachedFieldIndexCodecV1.js +51 -0
  272. package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -0
  273. package/lib/core/tree/detachedFieldIndexCodecV2.d.ts +11 -0
  274. package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -0
  275. package/lib/core/tree/detachedFieldIndexCodecV2.js +45 -0
  276. package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -0
  277. package/lib/core/tree/detachedFieldIndexCodecs.d.ts +11 -0
  278. package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -0
  279. package/lib/core/tree/detachedFieldIndexCodecs.js +21 -0
  280. package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -0
  281. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +37 -0
  282. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -0
  283. package/lib/core/tree/{detachedFieldIndexFormat.js → detachedFieldIndexFormatCommon.js} +13 -10
  284. package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -0
  285. package/lib/core/tree/detachedFieldIndexFormatV1.d.ts +13 -0
  286. package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -0
  287. package/lib/core/tree/detachedFieldIndexFormatV1.js +9 -0
  288. package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -0
  289. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +14 -0
  290. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -0
  291. package/lib/core/tree/detachedFieldIndexFormatV2.js +11 -0
  292. package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -0
  293. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +9 -9
  294. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  295. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +19 -19
  296. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  297. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +4 -2
  298. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  299. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +4 -4
  300. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  301. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +50 -31
  302. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  303. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +70 -57
  304. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  305. package/lib/feature-libraries/chunked-forest/codec/format.d.ts +20 -14
  306. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  307. package/lib/feature-libraries/chunked-forest/codec/format.js +17 -11
  308. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  309. package/{dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts → lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts} +20 -14
  310. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -0
  311. package/lib/feature-libraries/chunked-forest/codec/{nodeShape.js → nodeEncoder.js} +21 -15
  312. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -0
  313. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +7 -7
  314. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  315. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +19 -19
  316. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  317. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +2 -2
  318. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  319. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +5 -1
  320. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  321. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +14 -2
  322. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  323. package/lib/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
  324. package/lib/feature-libraries/default-schema/defaultSchema.js +0 -2
  325. package/lib/feature-libraries/default-schema/defaultSchema.js.map +1 -1
  326. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  327. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  328. package/lib/feature-libraries/default-schema/index.js +1 -1
  329. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  330. package/lib/feature-libraries/default-schema/schemaChecker.d.ts +14 -4
  331. package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  332. package/lib/feature-libraries/default-schema/schemaChecker.js +29 -24
  333. package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  334. package/lib/feature-libraries/index.d.ts +1 -2
  335. package/lib/feature-libraries/index.d.ts.map +1 -1
  336. package/lib/feature-libraries/index.js +1 -2
  337. package/lib/feature-libraries/index.js.map +1 -1
  338. package/lib/feature-libraries/modular-schema/comparison.d.ts +5 -6
  339. package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  340. package/lib/feature-libraries/modular-schema/comparison.js +14 -14
  341. package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
  342. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +9 -3
  343. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  344. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  345. package/lib/feature-libraries/object-forest/objectForest.js +3 -4
  346. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  347. package/lib/index.d.ts +1 -1
  348. package/lib/index.d.ts.map +1 -1
  349. package/lib/index.js +2 -2
  350. package/lib/index.js.map +1 -1
  351. package/lib/packageVersion.d.ts +1 -1
  352. package/lib/packageVersion.js +1 -1
  353. package/lib/packageVersion.js.map +1 -1
  354. package/lib/shared-tree/independentView.d.ts +8 -0
  355. package/lib/shared-tree/independentView.d.ts.map +1 -1
  356. package/lib/shared-tree/independentView.js +21 -10
  357. package/lib/shared-tree/independentView.js.map +1 -1
  358. package/lib/shared-tree/schematizeTree.js +1 -1
  359. package/lib/shared-tree/schematizeTree.js.map +1 -1
  360. package/lib/shared-tree/schematizingTreeView.d.ts +0 -1
  361. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  362. package/lib/shared-tree/schematizingTreeView.js +8 -11
  363. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  364. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  365. package/lib/shared-tree/sharedTree.js +2 -30
  366. package/lib/shared-tree/sharedTree.js.map +1 -1
  367. package/lib/shared-tree/treeAlpha.d.ts +20 -6
  368. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  369. package/lib/shared-tree/treeAlpha.js +10 -5
  370. package/lib/shared-tree/treeAlpha.js.map +1 -1
  371. package/lib/shared-tree/treeCheckout.d.ts +2 -1
  372. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  373. package/lib/shared-tree/treeCheckout.js +33 -1
  374. package/lib/shared-tree/treeCheckout.js.map +1 -1
  375. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  376. package/lib/shared-tree-core/branch.js +1 -1
  377. package/lib/shared-tree-core/branch.js.map +1 -1
  378. package/lib/simple-tree/api/conciseTree.d.ts +2 -2
  379. package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
  380. package/lib/simple-tree/api/conciseTree.js +6 -6
  381. package/lib/simple-tree/api/conciseTree.js.map +1 -1
  382. package/lib/simple-tree/api/configuration.d.ts +8 -2
  383. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  384. package/lib/simple-tree/api/configuration.js.map +1 -1
  385. package/lib/simple-tree/api/create.d.ts +8 -7
  386. package/lib/simple-tree/api/create.d.ts.map +1 -1
  387. package/lib/simple-tree/api/create.js +38 -25
  388. package/lib/simple-tree/api/create.js.map +1 -1
  389. package/lib/simple-tree/api/customTree.d.ts +25 -4
  390. package/lib/simple-tree/api/customTree.d.ts.map +1 -1
  391. package/lib/simple-tree/api/customTree.js +43 -17
  392. package/lib/simple-tree/api/customTree.js.map +1 -1
  393. package/lib/simple-tree/api/discrepancies.d.ts +98 -0
  394. package/lib/simple-tree/api/discrepancies.d.ts.map +1 -0
  395. package/lib/simple-tree/{discrepancies.js → api/discrepancies.js} +80 -206
  396. package/lib/simple-tree/api/discrepancies.js.map +1 -0
  397. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +9 -7
  398. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  399. package/lib/simple-tree/api/schemaCompatibilityTester.js +19 -118
  400. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  401. package/lib/simple-tree/api/schemaFactory.d.ts +7 -4
  402. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  403. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  404. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  405. package/lib/simple-tree/api/storedSchema.js +6 -2
  406. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  407. package/lib/simple-tree/api/treeBeta.d.ts +2 -2
  408. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  409. package/lib/simple-tree/api/treeBeta.js +8 -2
  410. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  411. package/lib/simple-tree/api/verboseTree.d.ts +2 -2
  412. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  413. package/lib/simple-tree/api/verboseTree.js +9 -9
  414. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  415. package/lib/simple-tree/core/allowedTypes.d.ts +20 -4
  416. package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
  417. package/lib/simple-tree/core/allowedTypes.js +42 -12
  418. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  419. package/lib/simple-tree/core/context.d.ts +13 -2
  420. package/lib/simple-tree/core/context.d.ts.map +1 -1
  421. package/lib/simple-tree/core/context.js +22 -9
  422. package/lib/simple-tree/core/context.js.map +1 -1
  423. package/lib/simple-tree/core/index.d.ts +2 -2
  424. package/lib/simple-tree/core/index.d.ts.map +1 -1
  425. package/lib/simple-tree/core/index.js +2 -2
  426. package/lib/simple-tree/core/index.js.map +1 -1
  427. package/lib/simple-tree/core/treeNodeKernel.d.ts +1 -1
  428. package/lib/simple-tree/core/treeNodeKernel.js +1 -1
  429. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  430. package/lib/simple-tree/core/treeNodeValid.d.ts +1 -1
  431. package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  432. package/lib/simple-tree/core/treeNodeValid.js +8 -1
  433. package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
  434. package/lib/simple-tree/core/walkSchema.d.ts +3 -0
  435. package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
  436. package/lib/simple-tree/core/walkSchema.js +2 -0
  437. package/lib/simple-tree/core/walkSchema.js.map +1 -1
  438. package/lib/simple-tree/createContext.d.ts +2 -0
  439. package/lib/simple-tree/createContext.d.ts.map +1 -1
  440. package/lib/simple-tree/createContext.js +3 -1
  441. package/lib/simple-tree/createContext.js.map +1 -1
  442. package/lib/simple-tree/fieldSchema.d.ts +1 -0
  443. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  444. package/lib/simple-tree/fieldSchema.js +1 -0
  445. package/lib/simple-tree/fieldSchema.js.map +1 -1
  446. package/lib/simple-tree/index.d.ts +4 -4
  447. package/lib/simple-tree/index.d.ts.map +1 -1
  448. package/lib/simple-tree/index.js +4 -4
  449. package/lib/simple-tree/index.js.map +1 -1
  450. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  451. package/lib/simple-tree/node-kinds/array/arrayNode.js +1 -1
  452. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  453. package/lib/simple-tree/node-kinds/index.d.ts +1 -1
  454. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -1
  455. package/lib/simple-tree/node-kinds/index.js +1 -1
  456. package/lib/simple-tree/node-kinds/index.js.map +1 -1
  457. package/lib/simple-tree/node-kinds/object/index.d.ts +1 -1
  458. package/lib/simple-tree/node-kinds/object/index.d.ts.map +1 -1
  459. package/lib/simple-tree/node-kinds/object/index.js +1 -1
  460. package/lib/simple-tree/node-kinds/object/index.js.map +1 -1
  461. package/lib/simple-tree/node-kinds/object/objectNode.d.ts +2 -7
  462. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  463. package/lib/simple-tree/node-kinds/object/objectNode.js +3 -16
  464. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  465. package/lib/simple-tree/prepareForInsertion.d.ts +5 -5
  466. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  467. package/lib/simple-tree/prepareForInsertion.js +11 -5
  468. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  469. package/lib/simple-tree/toStoredSchema.d.ts +3 -0
  470. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  471. package/lib/simple-tree/toStoredSchema.js +3 -0
  472. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  473. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +2 -2
  474. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  475. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +1 -1
  476. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  477. package/lib/simple-tree/walkFieldSchema.d.ts +1 -0
  478. package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -1
  479. package/lib/simple-tree/walkFieldSchema.js +1 -0
  480. package/lib/simple-tree/walkFieldSchema.js.map +1 -1
  481. package/package.json +23 -23
  482. package/src/codec/codec.ts +4 -3
  483. package/src/core/index.ts +2 -0
  484. package/src/core/rebase/index.ts +2 -0
  485. package/src/core/rebase/types.ts +4 -0
  486. package/src/core/schema-stored/schema.ts +2 -26
  487. package/src/core/tree/detachedFieldIndex.ts +4 -6
  488. package/src/core/tree/detachedFieldIndexCodecCommon.ts +87 -0
  489. package/src/core/tree/{detachedFieldIndexCodec.ts → detachedFieldIndexCodecV1.ts} +22 -68
  490. package/src/core/tree/detachedFieldIndexCodecV2.ts +72 -0
  491. package/src/core/tree/detachedFieldIndexCodecs.ts +44 -0
  492. package/src/core/tree/{detachedFieldIndexFormat.ts → detachedFieldIndexFormatCommon.ts} +32 -23
  493. package/src/core/tree/detachedFieldIndexFormatV1.ts +15 -0
  494. package/src/core/tree/detachedFieldIndexFormatV2.ts +17 -0
  495. package/src/feature-libraries/chunked-forest/codec/README.md +1 -1
  496. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +25 -25
  497. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +10 -6
  498. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +96 -73
  499. package/src/feature-libraries/chunked-forest/codec/format.ts +20 -14
  500. package/src/feature-libraries/chunked-forest/codec/{nodeShape.ts → nodeEncoder.ts} +23 -17
  501. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +34 -34
  502. package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +5 -5
  503. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +10 -0
  504. package/src/feature-libraries/default-schema/defaultSchema.ts +0 -2
  505. package/src/feature-libraries/default-schema/index.ts +1 -1
  506. package/src/feature-libraries/default-schema/schemaChecker.ts +47 -30
  507. package/src/feature-libraries/index.ts +1 -3
  508. package/src/feature-libraries/modular-schema/comparison.ts +14 -29
  509. package/src/feature-libraries/object-forest/objectForest.ts +10 -6
  510. package/src/index.ts +5 -0
  511. package/src/packageVersion.ts +1 -1
  512. package/src/shared-tree/independentView.ts +45 -19
  513. package/src/shared-tree/schematizeTree.ts +1 -1
  514. package/src/shared-tree/schematizingTreeView.ts +16 -13
  515. package/src/shared-tree/sharedTree.ts +2 -42
  516. package/src/shared-tree/treeAlpha.ts +30 -18
  517. package/src/shared-tree/treeCheckout.ts +54 -10
  518. package/src/shared-tree-core/branch.ts +1 -6
  519. package/src/simple-tree/api/conciseTree.ts +9 -7
  520. package/src/simple-tree/api/configuration.ts +8 -2
  521. package/src/simple-tree/api/create.ts +49 -36
  522. package/src/simple-tree/api/customTree.ts +59 -20
  523. package/src/simple-tree/{discrepancies.ts → api/discrepancies.ts} +128 -303
  524. package/src/simple-tree/api/schemaCompatibilityTester.ts +27 -151
  525. package/src/simple-tree/api/schemaFactory.ts +7 -4
  526. package/src/simple-tree/api/storedSchema.ts +6 -9
  527. package/src/simple-tree/api/treeBeta.ts +17 -4
  528. package/src/simple-tree/api/verboseTree.ts +17 -8
  529. package/src/simple-tree/core/allowedTypes.ts +54 -21
  530. package/src/simple-tree/core/context.ts +24 -22
  531. package/src/simple-tree/core/index.ts +2 -1
  532. package/src/simple-tree/core/treeNodeKernel.ts +1 -1
  533. package/src/simple-tree/core/treeNodeValid.ts +9 -2
  534. package/src/simple-tree/core/walkSchema.ts +3 -0
  535. package/src/simple-tree/createContext.ts +6 -1
  536. package/src/simple-tree/fieldSchema.ts +1 -0
  537. package/src/simple-tree/index.ts +5 -10
  538. package/src/simple-tree/node-kinds/array/arrayNode.ts +32 -19
  539. package/src/simple-tree/node-kinds/index.ts +0 -1
  540. package/src/simple-tree/node-kinds/object/index.ts +0 -1
  541. package/src/simple-tree/node-kinds/object/objectNode.ts +9 -27
  542. package/src/simple-tree/prepareForInsertion.ts +17 -9
  543. package/src/simple-tree/toStoredSchema.ts +3 -0
  544. package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +6 -2
  545. package/src/simple-tree/walkFieldSchema.ts +1 -0
  546. package/dist/core/tree/detachedFieldIndexCodec.d.ts +0 -11
  547. package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +0 -1
  548. package/dist/core/tree/detachedFieldIndexCodec.js +0 -100
  549. package/dist/core/tree/detachedFieldIndexCodec.js.map +0 -1
  550. package/dist/core/tree/detachedFieldIndexFormat.d.ts +0 -33
  551. package/dist/core/tree/detachedFieldIndexFormat.d.ts.map +0 -1
  552. package/dist/core/tree/detachedFieldIndexFormat.js.map +0 -1
  553. package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +0 -1
  554. package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +0 -1
  555. package/dist/feature-libraries/initializeForest.d.ts +0 -18
  556. package/dist/feature-libraries/initializeForest.d.ts.map +0 -1
  557. package/dist/feature-libraries/initializeForest.js +0 -35
  558. package/dist/feature-libraries/initializeForest.js.map +0 -1
  559. package/dist/simple-tree/discrepancies.d.ts +0 -167
  560. package/dist/simple-tree/discrepancies.d.ts.map +0 -1
  561. package/dist/simple-tree/discrepancies.js +0 -382
  562. package/dist/simple-tree/discrepancies.js.map +0 -1
  563. package/lib/core/tree/detachedFieldIndexCodec.d.ts +0 -11
  564. package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +0 -1
  565. package/lib/core/tree/detachedFieldIndexCodec.js +0 -96
  566. package/lib/core/tree/detachedFieldIndexCodec.js.map +0 -1
  567. package/lib/core/tree/detachedFieldIndexFormat.d.ts +0 -33
  568. package/lib/core/tree/detachedFieldIndexFormat.d.ts.map +0 -1
  569. package/lib/core/tree/detachedFieldIndexFormat.js.map +0 -1
  570. package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +0 -1
  571. package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +0 -1
  572. package/lib/feature-libraries/initializeForest.d.ts +0 -18
  573. package/lib/feature-libraries/initializeForest.d.ts.map +0 -1
  574. package/lib/feature-libraries/initializeForest.js +0 -31
  575. package/lib/feature-libraries/initializeForest.js.map +0 -1
  576. package/lib/simple-tree/discrepancies.d.ts +0 -167
  577. package/lib/simple-tree/discrepancies.d.ts.map +0 -1
  578. package/lib/simple-tree/discrepancies.js.map +0 -1
  579. package/src/feature-libraries/initializeForest.ts +0 -55
@@ -185,6 +185,7 @@ exports.FieldSchemaAlpha = FieldSchemaAlpha;
185
185
  })();
186
186
  /**
187
187
  * Normalizes a {@link ImplicitFieldSchema} or {@link ImplicitAnnotatedFieldSchema} to a {@link FieldSchema}.
188
+ * @internal
188
189
  */
189
190
  function normalizeFieldSchema(schema) {
190
191
  return schema instanceof FieldSchema
@@ -1 +1 @@
1
- {"version":3,"file":"fieldSchema.js","sourceRoot":"","sources":["../../src/simple-tree/fieldSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA2D;AAC3D,uEAAsE;AAItE,+CAQ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A2C;IAE3C,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACd,CAAC;IAED,+GAA+G;IAC/G,iCAAiC;IACjC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAEvC,OAAO,YAAY,KAAK,YAAY,CAAC;AACtC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType } from \"@fluidframework/core-interfaces\";\nimport { Lazy } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { FieldKey } from \"../core/index.js\";\nimport type { FlexTreeHydratedContextMinimal } from \"../feature-libraries/index.js\";\nimport {\n\ttype MakeNominal,\n\tbrand,\n\ttype UnionToIntersection,\n\tcompareSets,\n\ttype requireTrue,\n\ttype areOnlyKeys,\n\ttype JsonCompatibleReadOnlyObject,\n} from \"../util/index.js\";\n\nimport type {\n\tTreeNodeSchema,\n\tTreeNode,\n\tUnhydratedFlexTreeNode,\n\tNormalizedAnnotatedAllowedTypes,\n\tImplicitAllowedTypes,\n\tImplicitAnnotatedAllowedTypes,\n\tUnannotateImplicitAllowedTypes,\n\tAllowedTypesMetadata,\n\tTreeNodeFromImplicitAllowedTypes,\n\tTreeLeafValue,\n\tInsertableTreeNodeFromImplicitAllowedTypes,\n} from \"./core/index.js\";\nimport {\n\tisAnnotatedAllowedTypes,\n\tnormalizeAllowedTypes,\n\tnormalizeAnnotatedAllowedTypes,\n\tunannotateImplicitAllowedTypes,\n} from \"./core/index.js\";\n\nimport type { SimpleFieldSchema } from \"./simpleSchema.js\";\nimport type { UnsafeUnknownSchema } from \"./unsafeUnknownSchema.js\";\nimport type { InsertableContent } from \"./unhydratedFlexTreeFromInsertable.js\";\n\n/**\n * Kind of a field on an {@link TreeObjectNode}.\n * @remarks\n * More kinds may be added over time, so do not assume this is an exhaustive set.\n * See {@link FieldSchema} for where these are used, and {@link SchemaFactory} for how to create schema which use them.\n * @public\n */\nexport enum FieldKind {\n\t/**\n\t * A field which can be empty or filled.\n\t * @remarks\n\t * Allows 0 or one child.\n\t */\n\tOptional,\n\t/**\n\t * A field which must always be filled.\n\t * @remarks\n\t * Only allows exactly one child.\n\t */\n\tRequired,\n\t/**\n\t * A special readonly field used for node identifier strings.\n\t * @remarks\n\t * Only allows exactly one child.\n\t *\n\t * See {@link SchemaFactory.identifier} for more details.\n\t */\n\tIdentifier,\n}\n\n/**\n * Maps from a property key to its corresponding {@link FieldProps.key | stored key} for the provided\n * {@link ImplicitFieldSchema | field schema}.\n *\n * @remarks\n * If an explicit stored key was specified in the schema, it will be used.\n * Otherwise, the stored key is the same as the property key.\n */\nexport function getStoredKey(\n\tpropertyKey: string,\n\tfieldSchema: ImplicitAnnotatedFieldSchema,\n): FieldKey {\n\treturn brand(getExplicitStoredKey(fieldSchema) ?? propertyKey);\n}\n\n/**\n * Gets the {@link FieldProps.key | stored key} specified by the schema, if one was explicitly specified.\n * Otherwise, returns undefined.\n */\nexport function getExplicitStoredKey(\n\tfieldSchema: ImplicitAnnotatedFieldSchema,\n): string | undefined {\n\treturn fieldSchema instanceof FieldSchema ? fieldSchema.props?.key : undefined;\n}\n\n/**\n * Additional information to provide to a {@link FieldSchema}.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @public\n */\nexport interface FieldProps<TCustomMetadata = unknown> {\n\t/**\n\t * The unique identifier of a field, used in the persisted form of the tree.\n\t *\n\t * @remarks\n\t * If not explicitly set via the schema, this is the same as the schema's property key.\n\t *\n\t * Specifying a stored key that differs from the property key is particularly useful in refactoring scenarios.\n\t * To update the developer-facing API, while maintaining backwards compatibility with existing SharedTree data,\n\t * you can change the property key and specify the previous property key as the stored key.\n\t *\n\t * Notes:\n\t *\n\t * - Stored keys have no impact on standard JavaScript behavior, on tree nodes. For example, `Object.keys`\n\t * will always return the property keys specified in the schema, ignoring any stored keys that differ from\n\t * the property keys.\n\t *\n\t * - When specifying stored keys in an object schema, you must ensure that the final set of stored keys\n\t * (accounting for those implicitly derived from property keys) contains no duplicates.\n\t * This is validated at runtime.\n\t *\n\t * @example Refactoring code without breaking compatibility with existing data\n\t *\n\t * Consider some existing object schema:\n\t *\n\t * ```TypeScript\n\t * class Point extends schemaFactory.object(\"Point\", {\n\t * \txPosition: schemaFactory.number,\n\t * \tyPosition: schemaFactory.number,\n\t * \tzPosition: schemaFactory.optional(schemaFactory.number),\n\t * });\n\t * ```\n\t *\n\t * Developers using nodes of this type would access the the `xPosition` property as `point.xPosition`.\n\t *\n\t * We would like to refactor the schema to omit \"Position\" from the property keys, but application data has\n\t * already been persisted using the original property keys. To maintain compatibility with existing data,\n\t * we can refactor the schema as follows:\n\t *\n\t * ```TypeScript\n\t * class Point extends schemaFactory.object(\"Point\", {\n\t * \tx: schemaFactory.required(schemaFactory.number, { key: \"xPosition\" }),\n\t * \ty: schemaFactory.required(schemaFactory.number, { key: \"yPosition\" }),\n\t * \tz: schemaFactory.optional(schemaFactory.number, { key: \"zPosition\" }),\n\t * });\n\t * ```\n\t *\n\t * Now, developers can access the `x` property as `point.x`, while existing data can still be collaborated on.\n\t *\n\t * @defaultValue If not specified, the key that is persisted is the property key that was specified in the schema.\n\t */\n\treadonly key?: string;\n\n\t/**\n\t * A default provider used for fields which were not provided any values.\n\t * @privateRemarks\n\t * We are using an erased type here, as we want to expose this API but `InsertableContent` and `NodeKeyManager` are not public.\n\t */\n\treadonly defaultProvider?: DefaultProvider;\n\n\t/**\n\t * Optional metadata to associate with the field.\n\t *\n\t * @remarks\n\t * Note: this metadata is not persisted nor made part of the collaborative state; it is strictly client-local.\n\t * Different clients in the same collaborative session may see different metadata for the same field.\n\t */\n\treadonly metadata?: FieldSchemaMetadata<TCustomMetadata>;\n}\n\n/**\n * {@link FieldProps} extended with additional `alpha` options.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @alpha @input\n */\nexport interface FieldPropsAlpha<TCustomMetadata = unknown>\n\textends FieldProps<TCustomMetadata> {\n\t/**\n\t * The persisted metadata for this schema element.\n\t */\n\treadonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;\n}\n\n/**\n * A {@link FieldProvider} which requires additional context in order to produce its content\n */\nexport type ContextualFieldProvider = (\n\tcontext: FlexTreeHydratedContextMinimal | \"UseGlobalContext\",\n) => UnhydratedFlexTreeNode[];\n/**\n * A {@link FieldProvider} which can produce its content in a vacuum.\n */\nexport type ConstantFieldProvider = () => UnhydratedFlexTreeNode[];\n/**\n * A function which produces content for a field every time that it is called.\n */\nexport type FieldProvider = ContextualFieldProvider | ConstantFieldProvider;\n/**\n * Returns true if the given {@link FieldProvider} is a {@link ConstantFieldProvider}\n */\nexport function isConstant(\n\tfieldProvider: FieldProvider,\n): fieldProvider is ConstantFieldProvider {\n\treturn fieldProvider.length === 0;\n}\n\n/**\n * Provides a default value for a field.\n * @remarks\n * If present in a `FieldSchema`, when constructing new tree content that field can be omitted, and a default will be provided.\n * @system @sealed @public\n */\nexport interface DefaultProvider extends ErasedType<\"@fluidframework/tree.FieldProvider\"> {}\n\nexport function extractFieldProvider(input: DefaultProvider): FieldProvider {\n\treturn input as unknown as FieldProvider;\n}\n\nexport function getDefaultProvider(input: FieldProvider): DefaultProvider {\n\treturn input as unknown as DefaultProvider;\n}\n\n/**\n * Metadata associated with a {@link FieldSchema}.\n *\n * @remarks Specified via {@link FieldProps.metadata}.\n *\n * @sealed\n * @public\n */\nexport interface FieldSchemaMetadata<TCustomMetadata = unknown> {\n\t/**\n\t * User-defined metadata.\n\t */\n\treadonly custom?: TCustomMetadata;\n\n\t/**\n\t * The description of the field.\n\t *\n\t * @remarks\n\t *\n\t * If provided, will be used by the system in scenarios where a description of the field is useful.\n\t * E.g., when converting a field schema to {@link https://json-schema.org/ | JSON Schema}, this description will be\n\t * used as the `description` field.\n\t */\n\treadonly description?: string | undefined;\n}\n\n/**\n * Metadata associated with a {@link FieldSchema}. Includes fields used by alpha features.\n *\n * @remarks Specified via {@link FieldProps.metadata}.\n *\n * @sealed\n * @alpha\n */\nexport interface FieldSchemaMetadataAlpha<TCustomMetadata = unknown>\n\textends FieldSchemaMetadata<TCustomMetadata> {\n\t/**\n\t * The persisted metadata for this schema element.\n\t */\n\treadonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;\n}\n\n/**\n * Package internal construction API.\n */\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAllowedTypes,\n\tTCustomMetadata = unknown,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n): FieldSchemaAlpha<Kind, Types, TCustomMetadata>;\n\n/**\n * Package internal construction API that supports annotations for allowed types.\n */\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAnnotatedAllowedTypes,\n\tTCustomMetadata = unknown,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n): FieldSchemaAlpha<Kind, UnannotateImplicitAllowedTypes<Types>, TCustomMetadata>;\n\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAnnotatedAllowedTypes,\n\tTCustomMetadata = unknown,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n): FieldSchemaAlpha<Kind, UnannotateImplicitAllowedTypes<Types>, TCustomMetadata> {\n\treturn createFieldSchemaPrivate(kind, annotatedTypes, props);\n}\n\n/**\n * Implementation for {@link createFieldSchema}\n */\nlet createFieldSchemaPrivate: <\n\tKind extends FieldKind,\n\tTypes extends ImplicitAnnotatedAllowedTypes,\n\tTCustomMetadata,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n) => FieldSchemaAlpha<Kind, UnannotateImplicitAllowedTypes<Types>, TCustomMetadata>;\n\n/**\n * All policy for a specific field,\n * including functionality that does not have to be kept consistent across versions or deterministic.\n *\n * This can include policy for how to use this schema for \"view\" purposes, and well as how to expose editing APIs.\n * Use {@link SchemaFactory} to create the FieldSchema instances, for example {@link SchemaStatics.optional}.\n * @privateRemarks\n * Public access to the constructor is removed to prevent creating expressible but unsupported (or not stable) configurations.\n * {@link createFieldSchema} can be used internally to create instances.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @remarks\n * All implementations of this are actually {@link FieldSchemaAlpha} which exposes some additional alpha APIs.\n *\n * @sealed @public\n */\nexport class FieldSchema<\n\tout Kind extends FieldKind = FieldKind,\n\tout Types extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\tout TCustomMetadata = unknown,\n> {\n\t/**\n\t * This class is used with instanceof, and therefore should have nominal typing.\n\t * This field enforces that.\n\t */\n\tprotected _typeCheck!: MakeNominal;\n\n\tprivate readonly lazyTypes: Lazy<ReadonlySet<TreeNodeSchema>>;\n\n\t/**\n\t * What types of tree nodes are allowed in this field.\n\t * @remarks Counterpart to {@link FieldSchema.allowedTypes}, with any lazy definitions evaluated.\n\t */\n\tpublic get allowedTypeSet(): ReadonlySet<TreeNodeSchema> {\n\t\treturn this.lazyTypes.value;\n\t}\n\n\t/**\n\t * True if and only if, when constructing a node with this field, a value must be provided for it.\n\t */\n\tpublic readonly requiresValue: boolean;\n\n\t/**\n\t * {@inheritDoc FieldProps.metadata}\n\t */\n\tpublic get metadata(): FieldSchemaMetadata<TCustomMetadata> {\n\t\treturn this.props?.metadata ?? {};\n\t}\n\n\t/**\n\t * This class is `@sealed`: protected members like this constructor are for internal use only.\n\t * Use {@link SchemaFactory} to create the FieldSchema instances.\n\t */\n\tprotected constructor(\n\t\t/**\n\t\t * The {@link https://en.wikipedia.org/wiki/Kind_(type_theory) | kind } of this field.\n\t\t * Determines the multiplicity, viewing and editing APIs as well as the merge resolution policy.\n\t\t */\n\t\tpublic readonly kind: Kind,\n\t\t/**\n\t\t * What types of tree nodes are allowed in this field.\n\t\t */\n\t\tpublic readonly allowedTypes: Types,\n\t\t/**\n\t\t * Optional properties associated with the field.\n\t\t */\n\t\tpublic readonly props?: FieldProps<TCustomMetadata>,\n\t) {\n\t\tif (!(this instanceof FieldSchemaAlpha)) {\n\t\t\tthrow new UsageError(\"FieldSchema is @sealed: sub-classing is not allowed.\");\n\t\t}\n\n\t\tthis.lazyTypes = new Lazy(() => normalizeAllowedTypes(this.allowedTypes));\n\t\t// TODO: optional fields should (by default) get a default provider that returns undefined, removing the need to special case them here:\n\t\tthis.requiresValue =\n\t\t\tthis.props?.defaultProvider === undefined && this.kind !== FieldKind.Optional;\n\t}\n}\n\n/**\n * {@link FieldSchema} including alpha APIs (currently {@link SimpleFieldSchema}).\n * @remarks\n * This class will go away once the alpha APIs are stable and implemented by {@link FieldSchema}.\n * @sealed @alpha\n */\nexport class FieldSchemaAlpha<\n\t\tKind extends FieldKind = FieldKind,\n\t\tTypes extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t\tTCustomMetadata = unknown,\n\t>\n\textends FieldSchema<Kind, Types, TCustomMetadata>\n\timplements SimpleFieldSchema\n{\n\tprivate readonly lazyIdentifiers: Lazy<ReadonlySet<string>>;\n\tprivate readonly lazyAnnotatedTypes: Lazy<NormalizedAnnotatedAllowedTypes>;\n\tprivate readonly propsAlpha: FieldPropsAlpha<TCustomMetadata> | undefined;\n\n\t/**\n\t * Metadata on the types of tree nodes allowed on this field.\n\t */\n\tpublic readonly allowedTypesMetadata: AllowedTypesMetadata;\n\n\t/**\n\t * Persisted metadata for this field schema.\n\t */\n\tpublic get persistedMetadata(): JsonCompatibleReadOnlyObject | undefined {\n\t\treturn this.propsAlpha?.persistedMetadata;\n\t}\n\n\tstatic {\n\t\tcreateFieldSchemaPrivate = <\n\t\t\tKind2 extends FieldKind,\n\t\t\tTypes2 extends ImplicitAnnotatedAllowedTypes,\n\t\t\tTCustomMetadata2,\n\t\t>(\n\t\t\tkind: Kind2,\n\t\t\tannotatedAllowedTypes: Types2,\n\t\t\tprops?: FieldPropsAlpha<TCustomMetadata2>,\n\t\t) =>\n\t\t\tnew FieldSchemaAlpha(\n\t\t\t\tkind,\n\t\t\t\tunannotateImplicitAllowedTypes(annotatedAllowedTypes),\n\t\t\t\tannotatedAllowedTypes,\n\t\t\t\tprops,\n\t\t\t);\n\t}\n\n\tprotected constructor(\n\t\tkind: Kind,\n\t\ttypes: Types,\n\t\tpublic readonly annotatedAllowedTypes: ImplicitAnnotatedAllowedTypes,\n\t\tprops?: FieldPropsAlpha<TCustomMetadata>,\n\t) {\n\t\tsuper(kind, types, props);\n\n\t\tthis.allowedTypesMetadata = isAnnotatedAllowedTypes(annotatedAllowedTypes)\n\t\t\t? annotatedAllowedTypes.metadata\n\t\t\t: {};\n\t\tthis.lazyAnnotatedTypes = new Lazy(() =>\n\t\t\tnormalizeAnnotatedAllowedTypes(annotatedAllowedTypes),\n\t\t);\n\t\tthis.lazyIdentifiers = new Lazy(\n\t\t\t() => new Set([...this.allowedTypeSet].map((t) => t.identifier)),\n\t\t);\n\t\tthis.propsAlpha = props;\n\t}\n\n\tpublic get allowedTypesIdentifiers(): ReadonlySet<string> {\n\t\treturn this.lazyIdentifiers.value;\n\t}\n\n\t/**\n\t * What types of tree nodes are allowed in this field and their annotations.\n\t * @remarks Counterpart to {@link FieldSchemaAlpha.annotatedAllowedTypes}, with any lazy definitions evaluated.\n\t */\n\tpublic get annotatedAllowedTypesNormalized(): NormalizedAnnotatedAllowedTypes {\n\t\treturn this.lazyAnnotatedTypes.value;\n\t}\n}\n\n/**\n * Normalizes a {@link ImplicitFieldSchema} or {@link ImplicitAnnotatedFieldSchema} to a {@link FieldSchema}.\n */\nexport function normalizeFieldSchema(\n\tschema: ImplicitFieldSchema | ImplicitAnnotatedFieldSchema,\n): FieldSchemaAlpha {\n\treturn schema instanceof FieldSchema\n\t\t? (schema as FieldSchemaAlpha)\n\t\t: createFieldSchema(FieldKind.Required, schema);\n}\n\n/**\n * Returns true if the given {@link ImplicitFieldSchema} are equivalent, otherwise false.\n * @remarks Two ImplicitFieldSchema are considered equivalent if all of the following are true:\n * 1. They have the same {@link FieldKind | kinds}.\n * 2. They have {@link areFieldPropsEqual | equivalent FieldProps}.\n * 3. They have the same exact set of allowed types. The allowed types must be (respectively) reference equal.\n *\n * For example, comparing an ImplicitFieldSchema that is a {@link TreeNodeSchema} to an ImplicitFieldSchema that is a {@link FieldSchema}\n * will return true if they are the same kind, the FieldSchema has exactly one allowed type (the TreeNodeSchema), and they have equivalent FieldProps.\n */\nexport function areImplicitFieldSchemaEqual(\n\ta: ImplicitFieldSchema,\n\tb: ImplicitFieldSchema,\n): boolean {\n\treturn areFieldSchemaEqual(normalizeFieldSchema(a), normalizeFieldSchema(b));\n}\n\n/**\n * Returns true if the given {@link FieldSchema} are equivalent, otherwise false.\n * @remarks Two FieldSchema are considered equivalent if all of the following are true:\n * 1. They have the same {@link FieldKind | kinds}.\n * 2. They have {@link areFieldPropsEqual | equivalent FieldProps}.\n * 3. They have the same exact set of allowed types. The allowed types must be reference equal.\n */\nexport function areFieldSchemaEqual(a: FieldSchema, b: FieldSchema): boolean {\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\tif (a.kind !== b.kind) {\n\t\treturn false;\n\t}\n\n\tif (!areFieldPropsEqual(a.props, b.props)) {\n\t\treturn false;\n\t}\n\n\treturn compareSets({ a: a.allowedTypeSet, b: b.allowedTypeSet });\n}\n\n/**\n * Returns true if the given {@link FieldProps} are equivalent, otherwise false.\n * @remarks FieldProps are considered equivalent if their keys and default providers are reference equal, and their metadata are {@link areMetadataEqual | equivalent}.\n */\nfunction areFieldPropsEqual(a: FieldProps | undefined, b: FieldProps | undefined): boolean {\n\t// If any new fields are added to FieldProps, this check will stop compiling as a reminder that this function needs to be updated.\n\ttype _keys = requireTrue<areOnlyKeys<FieldProps, \"key\" | \"defaultProvider\" | \"metadata\">>;\n\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\tif (a?.key !== b?.key || a?.defaultProvider !== b?.defaultProvider) {\n\t\treturn false;\n\t}\n\n\tif (!areMetadataEqual(a?.metadata, b?.metadata)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns true if the given {@link FieldSchemaMetadata} are equivalent, otherwise false.\n * @remarks FieldSchemaMetadata are considered equivalent if their custom data and descriptions are (respectively) reference equal.\n */\nfunction areMetadataEqual(\n\ta: FieldSchemaMetadataAlpha | undefined,\n\tb: FieldSchemaMetadataAlpha | undefined,\n): boolean {\n\t// If any new fields are added to FieldSchemaMetadata, this check will stop compiling as a reminder that this function needs to be updated.\n\ttype _keys = requireTrue<\n\t\tareOnlyKeys<FieldSchemaMetadataAlpha, \"custom\" | \"description\" | \"persistedMetadata\">\n\t>;\n\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\treturn (\n\t\tObject.is(a?.custom, b?.custom) &&\n\t\ta?.description === b?.description &&\n\t\tarePersistedMetadataEqual(a?.persistedMetadata, b?.persistedMetadata)\n\t);\n}\n\n/**\n * Returns true if the given persisted metadata fields are equivalent, otherwise false.\n * @remarks\n * Currently only handles shallow equality in the case where the keys are in the same order. This is acceptable for current use cases.\n */\nfunction arePersistedMetadataEqual(\n\ta: JsonCompatibleReadOnlyObject | undefined,\n\tb: JsonCompatibleReadOnlyObject | undefined,\n): boolean {\n\tif (Object.is(a, b)) {\n\t\treturn true;\n\t}\n\n\tif (a === undefined || b === undefined) {\n\t\treturn false;\n\t}\n\n\t// Note that the key order matters. If `a` and `b` have the same content but the keys are in a different order,\n\t// this method will return false.\n\tconst aStringified = JSON.stringify(a);\n\tconst bStringified = JSON.stringify(b);\n\n\treturn aStringified === bStringified;\n}\n\n/**\n * Schema for a field of a tree node.\n * @remarks\n * Implicitly treats {@link ImplicitAllowedTypes} as a Required field of that type.\n * @public\n */\nexport type ImplicitFieldSchema = FieldSchema | ImplicitAllowedTypes;\n\n/**\n * Annotated schema for a field of a tree node.\n * @alpha\n */\nexport type ImplicitAnnotatedFieldSchema = FieldSchema | ImplicitAnnotatedAllowedTypes;\n\n/**\n * Removes annotations from an annotated field schema.\n * @system @alpha\n */\nexport type UnannotateImplicitFieldSchema<T extends ImplicitAnnotatedFieldSchema> =\n\tT extends ImplicitAnnotatedAllowedTypes ? UnannotateImplicitAllowedTypes<T> : T;\n\n/**\n * Converts an `ImplicitFieldSchema` to a property type suitable for reading a field with this that schema.\n *\n * @typeparam TSchema - When non-exact schema are provided this errors on the side of returning too general of a type (a conservative union of all possibilities).\n * This is ideal for \"output APIs\" - i.e. it converts the schema type to the runtime type that a user will _read_ from the tree.\n * Examples of such \"non-exact\" schema include `ImplicitFieldSchema`, `ImplicitAllowedTypes`, and TypeScript unions of schema types.\n * @public\n */\nexport type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> =\n\tTSchema extends FieldSchema<infer Kind, infer Types>\n\t\t? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind>\n\t\t: TSchema extends ImplicitAllowedTypes\n\t\t\t? TreeNodeFromImplicitAllowedTypes<TSchema>\n\t\t\t: TreeNode | TreeLeafValue | undefined;\n\n/**\n * Type of content that can be inserted into the tree for a field of the given schema.\n *\n * @see {@link Input}\n *\n * @typeparam TSchemaInput - Schema to process.\n * @typeparam TSchema - Do not specify: default value used as implementation detail.\n * @public\n */\nexport type InsertableTreeFieldFromImplicitField<\n\tTSchemaInput extends ImplicitFieldSchema,\n\tTSchema = UnionToIntersection<TSchemaInput>,\n> = [TSchema] extends [FieldSchema<infer Kind, infer Types>]\n\t? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypes<Types>, Kind, true>\n\t: [TSchema] extends [ImplicitAllowedTypes]\n\t\t? InsertableTreeNodeFromImplicitAllowedTypes<TSchema>\n\t\t: never;\n\n/**\n * Content which could be inserted into a field within a tree.\n *\n * @see {@link Input}\n * @remarks\n * Extended version of {@link InsertableTreeFieldFromImplicitField} that also allows {@link (UnsafeUnknownSchema:type)}.\n * @alpha\n */\nexport type InsertableField<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> = [\n\tTSchema,\n] extends [ImplicitFieldSchema]\n\t? InsertableTreeFieldFromImplicitField<TSchema>\n\t: [TSchema] extends [UnsafeUnknownSchema]\n\t\t? InsertableContent | undefined\n\t\t: never;\n\n/**\n * Content which could be read from a field within a tree.\n *\n * @remarks\n * Extended version of {@link TreeFieldFromImplicitField} that also allows {@link (UnsafeUnknownSchema:type)}.\n * Since reading from fields with non-exact schema is still safe, this is only useful (compared to {@link TreeFieldFromImplicitField}) when the schema is also used as input and thus allows {@link (UnsafeUnknownSchema:type)}\n * for use\n * @system @alpha\n */\nexport type ReadableField<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> =\n\tTreeFieldFromImplicitField<ReadSchema<TSchema>>;\n\n/**\n * Adapter to remove {@link (UnsafeUnknownSchema:type)} from a schema type so it can be used with types for generating APIs for reading data.\n *\n * @remarks\n * Since reading with non-exact schema is still safe, this is mainly useful when the schema is also used as input and thus allows {@link (UnsafeUnknownSchema:type)}.\n * @system @alpha\n */\nexport type ReadSchema<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> = [\n\tTSchema,\n] extends [ImplicitFieldSchema]\n\t? TSchema\n\t: ImplicitFieldSchema;\n\n/**\n * Suitable for output.\n * For input must error on side of excluding undefined instead.\n * @system @public\n */\nexport type ApplyKind<T, Kind extends FieldKind> = {\n\t[FieldKind.Required]: T;\n\t[FieldKind.Optional]: T | undefined;\n\t[FieldKind.Identifier]: T;\n}[Kind];\n\n/**\n * Suitable for input.\n *\n * @see {@link Input}\n * @system @public\n */\nexport type ApplyKindInput<T, Kind extends FieldKind, DefaultsAreOptional extends boolean> = [\n\tKind,\n] extends [FieldKind.Required]\n\t? T\n\t: [Kind] extends [FieldKind.Optional]\n\t\t? T | undefined\n\t\t: [Kind] extends [FieldKind.Identifier]\n\t\t\t? DefaultsAreOptional extends true\n\t\t\t\t? T | undefined\n\t\t\t\t: T\n\t\t\t: never;\n"]}
1
+ {"version":3,"file":"fieldSchema.js","sourceRoot":"","sources":["../../src/simple-tree/fieldSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA2D;AAC3D,uEAAsE;AAItE,+CAQ0B;AAe1B,8CAKyB;AAMzB;;;;;;GAMG;AACH,IAAY,SAqBX;AArBD,WAAY,SAAS;IACpB;;;;OAIG;IACH,iDAAQ,CAAA;IACR;;;;OAIG;IACH,iDAAQ,CAAA;IACR;;;;;;OAMG;IACH,qDAAU,CAAA;AACX,CAAC,EArBW,SAAS,yBAAT,SAAS,QAqBpB;AAED;;;;;;;GAOG;AACH,SAAgB,YAAY,CAC3B,WAAmB,EACnB,WAAyC;IAEzC,OAAO,IAAA,gBAAK,EAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,CAAC;AAChE,CAAC;AALD,oCAKC;AAED;;;GAGG;AACH,SAAgB,oBAAoB,CACnC,WAAyC;IAEzC,OAAO,WAAW,YAAY,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AAChF,CAAC;AAJD,oDAIC;AA8GD;;GAEG;AACH,SAAgB,UAAU,CACzB,aAA4B;IAE5B,OAAO,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC;AACnC,CAAC;AAJD,gCAIC;AAUD,SAAgB,oBAAoB,CAAC,KAAsB;IAC1D,OAAO,KAAiC,CAAC;AAC1C,CAAC;AAFD,oDAEC;AAED,SAAgB,kBAAkB,CAAC,KAAoB;IACtD,OAAO,K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,gBAAgB,CACxB,CAAuC,EACvC,CAAuC;IAOvC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,CACN,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC;QAC/B,CAAC,EAAE,WAAW,KAAK,CAAC,EAAE,WAAW;QACjC,yBAAyB,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,CAAC,CACrE,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,yBAAyB,CACjC,CAA2C,EAC3C,CAA2C;IAE3C,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACd,CAAC;IAED,+GAA+G;IAC/G,iCAAiC;IACjC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAEvC,OAAO,YAAY,KAAK,YAAY,CAAC;AACtC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType } from \"@fluidframework/core-interfaces\";\nimport { Lazy } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { FieldKey } from \"../core/index.js\";\nimport type { FlexTreeHydratedContextMinimal } from \"../feature-libraries/index.js\";\nimport {\n\ttype MakeNominal,\n\tbrand,\n\ttype UnionToIntersection,\n\tcompareSets,\n\ttype requireTrue,\n\ttype areOnlyKeys,\n\ttype JsonCompatibleReadOnlyObject,\n} from \"../util/index.js\";\n\nimport type {\n\tTreeNodeSchema,\n\tTreeNode,\n\tUnhydratedFlexTreeNode,\n\tNormalizedAnnotatedAllowedTypes,\n\tImplicitAllowedTypes,\n\tImplicitAnnotatedAllowedTypes,\n\tUnannotateImplicitAllowedTypes,\n\tAllowedTypesMetadata,\n\tTreeNodeFromImplicitAllowedTypes,\n\tTreeLeafValue,\n\tInsertableTreeNodeFromImplicitAllowedTypes,\n} from \"./core/index.js\";\nimport {\n\tisAnnotatedAllowedTypes,\n\tnormalizeAllowedTypes,\n\tnormalizeAnnotatedAllowedTypes,\n\tunannotateImplicitAllowedTypes,\n} from \"./core/index.js\";\n\nimport type { SimpleFieldSchema } from \"./simpleSchema.js\";\nimport type { UnsafeUnknownSchema } from \"./unsafeUnknownSchema.js\";\nimport type { InsertableContent } from \"./unhydratedFlexTreeFromInsertable.js\";\n\n/**\n * Kind of a field on an {@link TreeObjectNode}.\n * @remarks\n * More kinds may be added over time, so do not assume this is an exhaustive set.\n * See {@link FieldSchema} for where these are used, and {@link SchemaFactory} for how to create schema which use them.\n * @public\n */\nexport enum FieldKind {\n\t/**\n\t * A field which can be empty or filled.\n\t * @remarks\n\t * Allows 0 or one child.\n\t */\n\tOptional,\n\t/**\n\t * A field which must always be filled.\n\t * @remarks\n\t * Only allows exactly one child.\n\t */\n\tRequired,\n\t/**\n\t * A special readonly field used for node identifier strings.\n\t * @remarks\n\t * Only allows exactly one child.\n\t *\n\t * See {@link SchemaFactory.identifier} for more details.\n\t */\n\tIdentifier,\n}\n\n/**\n * Maps from a property key to its corresponding {@link FieldProps.key | stored key} for the provided\n * {@link ImplicitFieldSchema | field schema}.\n *\n * @remarks\n * If an explicit stored key was specified in the schema, it will be used.\n * Otherwise, the stored key is the same as the property key.\n */\nexport function getStoredKey(\n\tpropertyKey: string,\n\tfieldSchema: ImplicitAnnotatedFieldSchema,\n): FieldKey {\n\treturn brand(getExplicitStoredKey(fieldSchema) ?? propertyKey);\n}\n\n/**\n * Gets the {@link FieldProps.key | stored key} specified by the schema, if one was explicitly specified.\n * Otherwise, returns undefined.\n */\nexport function getExplicitStoredKey(\n\tfieldSchema: ImplicitAnnotatedFieldSchema,\n): string | undefined {\n\treturn fieldSchema instanceof FieldSchema ? fieldSchema.props?.key : undefined;\n}\n\n/**\n * Additional information to provide to a {@link FieldSchema}.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @public\n */\nexport interface FieldProps<TCustomMetadata = unknown> {\n\t/**\n\t * The unique identifier of a field, used in the persisted form of the tree.\n\t *\n\t * @remarks\n\t * If not explicitly set via the schema, this is the same as the schema's property key.\n\t *\n\t * Specifying a stored key that differs from the property key is particularly useful in refactoring scenarios.\n\t * To update the developer-facing API, while maintaining backwards compatibility with existing SharedTree data,\n\t * you can change the property key and specify the previous property key as the stored key.\n\t *\n\t * Notes:\n\t *\n\t * - Stored keys have no impact on standard JavaScript behavior, on tree nodes. For example, `Object.keys`\n\t * will always return the property keys specified in the schema, ignoring any stored keys that differ from\n\t * the property keys.\n\t *\n\t * - When specifying stored keys in an object schema, you must ensure that the final set of stored keys\n\t * (accounting for those implicitly derived from property keys) contains no duplicates.\n\t * This is validated at runtime.\n\t *\n\t * @example Refactoring code without breaking compatibility with existing data\n\t *\n\t * Consider some existing object schema:\n\t *\n\t * ```TypeScript\n\t * class Point extends schemaFactory.object(\"Point\", {\n\t * \txPosition: schemaFactory.number,\n\t * \tyPosition: schemaFactory.number,\n\t * \tzPosition: schemaFactory.optional(schemaFactory.number),\n\t * });\n\t * ```\n\t *\n\t * Developers using nodes of this type would access the the `xPosition` property as `point.xPosition`.\n\t *\n\t * We would like to refactor the schema to omit \"Position\" from the property keys, but application data has\n\t * already been persisted using the original property keys. To maintain compatibility with existing data,\n\t * we can refactor the schema as follows:\n\t *\n\t * ```TypeScript\n\t * class Point extends schemaFactory.object(\"Point\", {\n\t * \tx: schemaFactory.required(schemaFactory.number, { key: \"xPosition\" }),\n\t * \ty: schemaFactory.required(schemaFactory.number, { key: \"yPosition\" }),\n\t * \tz: schemaFactory.optional(schemaFactory.number, { key: \"zPosition\" }),\n\t * });\n\t * ```\n\t *\n\t * Now, developers can access the `x` property as `point.x`, while existing data can still be collaborated on.\n\t *\n\t * @defaultValue If not specified, the key that is persisted is the property key that was specified in the schema.\n\t */\n\treadonly key?: string;\n\n\t/**\n\t * A default provider used for fields which were not provided any values.\n\t * @privateRemarks\n\t * We are using an erased type here, as we want to expose this API but `InsertableContent` and `NodeKeyManager` are not public.\n\t */\n\treadonly defaultProvider?: DefaultProvider;\n\n\t/**\n\t * Optional metadata to associate with the field.\n\t *\n\t * @remarks\n\t * Note: this metadata is not persisted nor made part of the collaborative state; it is strictly client-local.\n\t * Different clients in the same collaborative session may see different metadata for the same field.\n\t */\n\treadonly metadata?: FieldSchemaMetadata<TCustomMetadata>;\n}\n\n/**\n * {@link FieldProps} extended with additional `alpha` options.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @alpha @input\n */\nexport interface FieldPropsAlpha<TCustomMetadata = unknown>\n\textends FieldProps<TCustomMetadata> {\n\t/**\n\t * The persisted metadata for this schema element.\n\t */\n\treadonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;\n}\n\n/**\n * A {@link FieldProvider} which requires additional context in order to produce its content\n */\nexport type ContextualFieldProvider = (\n\tcontext: FlexTreeHydratedContextMinimal | \"UseGlobalContext\",\n) => UnhydratedFlexTreeNode[];\n/**\n * A {@link FieldProvider} which can produce its content in a vacuum.\n */\nexport type ConstantFieldProvider = () => UnhydratedFlexTreeNode[];\n/**\n * A function which produces content for a field every time that it is called.\n */\nexport type FieldProvider = ContextualFieldProvider | ConstantFieldProvider;\n/**\n * Returns true if the given {@link FieldProvider} is a {@link ConstantFieldProvider}\n */\nexport function isConstant(\n\tfieldProvider: FieldProvider,\n): fieldProvider is ConstantFieldProvider {\n\treturn fieldProvider.length === 0;\n}\n\n/**\n * Provides a default value for a field.\n * @remarks\n * If present in a `FieldSchema`, when constructing new tree content that field can be omitted, and a default will be provided.\n * @system @sealed @public\n */\nexport interface DefaultProvider extends ErasedType<\"@fluidframework/tree.FieldProvider\"> {}\n\nexport function extractFieldProvider(input: DefaultProvider): FieldProvider {\n\treturn input as unknown as FieldProvider;\n}\n\nexport function getDefaultProvider(input: FieldProvider): DefaultProvider {\n\treturn input as unknown as DefaultProvider;\n}\n\n/**\n * Metadata associated with a {@link FieldSchema}.\n *\n * @remarks Specified via {@link FieldProps.metadata}.\n *\n * @sealed\n * @public\n */\nexport interface FieldSchemaMetadata<TCustomMetadata = unknown> {\n\t/**\n\t * User-defined metadata.\n\t */\n\treadonly custom?: TCustomMetadata;\n\n\t/**\n\t * The description of the field.\n\t *\n\t * @remarks\n\t *\n\t * If provided, will be used by the system in scenarios where a description of the field is useful.\n\t * E.g., when converting a field schema to {@link https://json-schema.org/ | JSON Schema}, this description will be\n\t * used as the `description` field.\n\t */\n\treadonly description?: string | undefined;\n}\n\n/**\n * Metadata associated with a {@link FieldSchema}. Includes fields used by alpha features.\n *\n * @remarks Specified via {@link FieldProps.metadata}.\n *\n * @sealed\n * @alpha\n */\nexport interface FieldSchemaMetadataAlpha<TCustomMetadata = unknown>\n\textends FieldSchemaMetadata<TCustomMetadata> {\n\t/**\n\t * The persisted metadata for this schema element.\n\t */\n\treadonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;\n}\n\n/**\n * Package internal construction API.\n */\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAllowedTypes,\n\tTCustomMetadata = unknown,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n): FieldSchemaAlpha<Kind, Types, TCustomMetadata>;\n\n/**\n * Package internal construction API that supports annotations for allowed types.\n */\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAnnotatedAllowedTypes,\n\tTCustomMetadata = unknown,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n): FieldSchemaAlpha<Kind, UnannotateImplicitAllowedTypes<Types>, TCustomMetadata>;\n\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAnnotatedAllowedTypes,\n\tTCustomMetadata = unknown,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n): FieldSchemaAlpha<Kind, UnannotateImplicitAllowedTypes<Types>, TCustomMetadata> {\n\treturn createFieldSchemaPrivate(kind, annotatedTypes, props);\n}\n\n/**\n * Implementation for {@link createFieldSchema}\n */\nlet createFieldSchemaPrivate: <\n\tKind extends FieldKind,\n\tTypes extends ImplicitAnnotatedAllowedTypes,\n\tTCustomMetadata,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n) => FieldSchemaAlpha<Kind, UnannotateImplicitAllowedTypes<Types>, TCustomMetadata>;\n\n/**\n * All policy for a specific field,\n * including functionality that does not have to be kept consistent across versions or deterministic.\n *\n * This can include policy for how to use this schema for \"view\" purposes, and well as how to expose editing APIs.\n * Use {@link SchemaFactory} to create the FieldSchema instances, for example {@link SchemaStatics.optional}.\n * @privateRemarks\n * Public access to the constructor is removed to prevent creating expressible but unsupported (or not stable) configurations.\n * {@link createFieldSchema} can be used internally to create instances.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @remarks\n * All implementations of this are actually {@link FieldSchemaAlpha} which exposes some additional alpha APIs.\n *\n * @sealed @public\n */\nexport class FieldSchema<\n\tout Kind extends FieldKind = FieldKind,\n\tout Types extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\tout TCustomMetadata = unknown,\n> {\n\t/**\n\t * This class is used with instanceof, and therefore should have nominal typing.\n\t * This field enforces that.\n\t */\n\tprotected _typeCheck!: MakeNominal;\n\n\tprivate readonly lazyTypes: Lazy<ReadonlySet<TreeNodeSchema>>;\n\n\t/**\n\t * What types of tree nodes are allowed in this field.\n\t * @remarks Counterpart to {@link FieldSchema.allowedTypes}, with any lazy definitions evaluated.\n\t */\n\tpublic get allowedTypeSet(): ReadonlySet<TreeNodeSchema> {\n\t\treturn this.lazyTypes.value;\n\t}\n\n\t/**\n\t * True if and only if, when constructing a node with this field, a value must be provided for it.\n\t */\n\tpublic readonly requiresValue: boolean;\n\n\t/**\n\t * {@inheritDoc FieldProps.metadata}\n\t */\n\tpublic get metadata(): FieldSchemaMetadata<TCustomMetadata> {\n\t\treturn this.props?.metadata ?? {};\n\t}\n\n\t/**\n\t * This class is `@sealed`: protected members like this constructor are for internal use only.\n\t * Use {@link SchemaFactory} to create the FieldSchema instances.\n\t */\n\tprotected constructor(\n\t\t/**\n\t\t * The {@link https://en.wikipedia.org/wiki/Kind_(type_theory) | kind } of this field.\n\t\t * Determines the multiplicity, viewing and editing APIs as well as the merge resolution policy.\n\t\t */\n\t\tpublic readonly kind: Kind,\n\t\t/**\n\t\t * What types of tree nodes are allowed in this field.\n\t\t */\n\t\tpublic readonly allowedTypes: Types,\n\t\t/**\n\t\t * Optional properties associated with the field.\n\t\t */\n\t\tpublic readonly props?: FieldProps<TCustomMetadata>,\n\t) {\n\t\tif (!(this instanceof FieldSchemaAlpha)) {\n\t\t\tthrow new UsageError(\"FieldSchema is @sealed: sub-classing is not allowed.\");\n\t\t}\n\n\t\tthis.lazyTypes = new Lazy(() => normalizeAllowedTypes(this.allowedTypes));\n\t\t// TODO: optional fields should (by default) get a default provider that returns undefined, removing the need to special case them here:\n\t\tthis.requiresValue =\n\t\t\tthis.props?.defaultProvider === undefined && this.kind !== FieldKind.Optional;\n\t}\n}\n\n/**\n * {@link FieldSchema} including alpha APIs (currently {@link SimpleFieldSchema}).\n * @remarks\n * This class will go away once the alpha APIs are stable and implemented by {@link FieldSchema}.\n * @sealed @alpha\n */\nexport class FieldSchemaAlpha<\n\t\tKind extends FieldKind = FieldKind,\n\t\tTypes extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t\tTCustomMetadata = unknown,\n\t>\n\textends FieldSchema<Kind, Types, TCustomMetadata>\n\timplements SimpleFieldSchema\n{\n\tprivate readonly lazyIdentifiers: Lazy<ReadonlySet<string>>;\n\tprivate readonly lazyAnnotatedTypes: Lazy<NormalizedAnnotatedAllowedTypes>;\n\tprivate readonly propsAlpha: FieldPropsAlpha<TCustomMetadata> | undefined;\n\n\t/**\n\t * Metadata on the types of tree nodes allowed on this field.\n\t */\n\tpublic readonly allowedTypesMetadata: AllowedTypesMetadata;\n\n\t/**\n\t * Persisted metadata for this field schema.\n\t */\n\tpublic get persistedMetadata(): JsonCompatibleReadOnlyObject | undefined {\n\t\treturn this.propsAlpha?.persistedMetadata;\n\t}\n\n\tstatic {\n\t\tcreateFieldSchemaPrivate = <\n\t\t\tKind2 extends FieldKind,\n\t\t\tTypes2 extends ImplicitAnnotatedAllowedTypes,\n\t\t\tTCustomMetadata2,\n\t\t>(\n\t\t\tkind: Kind2,\n\t\t\tannotatedAllowedTypes: Types2,\n\t\t\tprops?: FieldPropsAlpha<TCustomMetadata2>,\n\t\t) =>\n\t\t\tnew FieldSchemaAlpha(\n\t\t\t\tkind,\n\t\t\t\tunannotateImplicitAllowedTypes(annotatedAllowedTypes),\n\t\t\t\tannotatedAllowedTypes,\n\t\t\t\tprops,\n\t\t\t);\n\t}\n\n\tprotected constructor(\n\t\tkind: Kind,\n\t\ttypes: Types,\n\t\tpublic readonly annotatedAllowedTypes: ImplicitAnnotatedAllowedTypes,\n\t\tprops?: FieldPropsAlpha<TCustomMetadata>,\n\t) {\n\t\tsuper(kind, types, props);\n\n\t\tthis.allowedTypesMetadata = isAnnotatedAllowedTypes(annotatedAllowedTypes)\n\t\t\t? annotatedAllowedTypes.metadata\n\t\t\t: {};\n\t\tthis.lazyAnnotatedTypes = new Lazy(() =>\n\t\t\tnormalizeAnnotatedAllowedTypes(annotatedAllowedTypes),\n\t\t);\n\t\tthis.lazyIdentifiers = new Lazy(\n\t\t\t() => new Set([...this.allowedTypeSet].map((t) => t.identifier)),\n\t\t);\n\t\tthis.propsAlpha = props;\n\t}\n\n\tpublic get allowedTypesIdentifiers(): ReadonlySet<string> {\n\t\treturn this.lazyIdentifiers.value;\n\t}\n\n\t/**\n\t * What types of tree nodes are allowed in this field and their annotations.\n\t * @remarks Counterpart to {@link FieldSchemaAlpha.annotatedAllowedTypes}, with any lazy definitions evaluated.\n\t */\n\tpublic get annotatedAllowedTypesNormalized(): NormalizedAnnotatedAllowedTypes {\n\t\treturn this.lazyAnnotatedTypes.value;\n\t}\n}\n\n/**\n * Normalizes a {@link ImplicitFieldSchema} or {@link ImplicitAnnotatedFieldSchema} to a {@link FieldSchema}.\n * @internal\n */\nexport function normalizeFieldSchema(\n\tschema: ImplicitFieldSchema | ImplicitAnnotatedFieldSchema,\n): FieldSchemaAlpha {\n\treturn schema instanceof FieldSchema\n\t\t? (schema as FieldSchemaAlpha)\n\t\t: createFieldSchema(FieldKind.Required, schema);\n}\n\n/**\n * Returns true if the given {@link ImplicitFieldSchema} are equivalent, otherwise false.\n * @remarks Two ImplicitFieldSchema are considered equivalent if all of the following are true:\n * 1. They have the same {@link FieldKind | kinds}.\n * 2. They have {@link areFieldPropsEqual | equivalent FieldProps}.\n * 3. They have the same exact set of allowed types. The allowed types must be (respectively) reference equal.\n *\n * For example, comparing an ImplicitFieldSchema that is a {@link TreeNodeSchema} to an ImplicitFieldSchema that is a {@link FieldSchema}\n * will return true if they are the same kind, the FieldSchema has exactly one allowed type (the TreeNodeSchema), and they have equivalent FieldProps.\n */\nexport function areImplicitFieldSchemaEqual(\n\ta: ImplicitFieldSchema,\n\tb: ImplicitFieldSchema,\n): boolean {\n\treturn areFieldSchemaEqual(normalizeFieldSchema(a), normalizeFieldSchema(b));\n}\n\n/**\n * Returns true if the given {@link FieldSchema} are equivalent, otherwise false.\n * @remarks Two FieldSchema are considered equivalent if all of the following are true:\n * 1. They have the same {@link FieldKind | kinds}.\n * 2. They have {@link areFieldPropsEqual | equivalent FieldProps}.\n * 3. They have the same exact set of allowed types. The allowed types must be reference equal.\n */\nexport function areFieldSchemaEqual(a: FieldSchema, b: FieldSchema): boolean {\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\tif (a.kind !== b.kind) {\n\t\treturn false;\n\t}\n\n\tif (!areFieldPropsEqual(a.props, b.props)) {\n\t\treturn false;\n\t}\n\n\treturn compareSets({ a: a.allowedTypeSet, b: b.allowedTypeSet });\n}\n\n/**\n * Returns true if the given {@link FieldProps} are equivalent, otherwise false.\n * @remarks FieldProps are considered equivalent if their keys and default providers are reference equal, and their metadata are {@link areMetadataEqual | equivalent}.\n */\nfunction areFieldPropsEqual(a: FieldProps | undefined, b: FieldProps | undefined): boolean {\n\t// If any new fields are added to FieldProps, this check will stop compiling as a reminder that this function needs to be updated.\n\ttype _keys = requireTrue<areOnlyKeys<FieldProps, \"key\" | \"defaultProvider\" | \"metadata\">>;\n\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\tif (a?.key !== b?.key || a?.defaultProvider !== b?.defaultProvider) {\n\t\treturn false;\n\t}\n\n\tif (!areMetadataEqual(a?.metadata, b?.metadata)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns true if the given {@link FieldSchemaMetadata} are equivalent, otherwise false.\n * @remarks FieldSchemaMetadata are considered equivalent if their custom data and descriptions are (respectively) reference equal.\n */\nfunction areMetadataEqual(\n\ta: FieldSchemaMetadataAlpha | undefined,\n\tb: FieldSchemaMetadataAlpha | undefined,\n): boolean {\n\t// If any new fields are added to FieldSchemaMetadata, this check will stop compiling as a reminder that this function needs to be updated.\n\ttype _keys = requireTrue<\n\t\tareOnlyKeys<FieldSchemaMetadataAlpha, \"custom\" | \"description\" | \"persistedMetadata\">\n\t>;\n\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\treturn (\n\t\tObject.is(a?.custom, b?.custom) &&\n\t\ta?.description === b?.description &&\n\t\tarePersistedMetadataEqual(a?.persistedMetadata, b?.persistedMetadata)\n\t);\n}\n\n/**\n * Returns true if the given persisted metadata fields are equivalent, otherwise false.\n * @remarks\n * Currently only handles shallow equality in the case where the keys are in the same order. This is acceptable for current use cases.\n */\nfunction arePersistedMetadataEqual(\n\ta: JsonCompatibleReadOnlyObject | undefined,\n\tb: JsonCompatibleReadOnlyObject | undefined,\n): boolean {\n\tif (Object.is(a, b)) {\n\t\treturn true;\n\t}\n\n\tif (a === undefined || b === undefined) {\n\t\treturn false;\n\t}\n\n\t// Note that the key order matters. If `a` and `b` have the same content but the keys are in a different order,\n\t// this method will return false.\n\tconst aStringified = JSON.stringify(a);\n\tconst bStringified = JSON.stringify(b);\n\n\treturn aStringified === bStringified;\n}\n\n/**\n * Schema for a field of a tree node.\n * @remarks\n * Implicitly treats {@link ImplicitAllowedTypes} as a Required field of that type.\n * @public\n */\nexport type ImplicitFieldSchema = FieldSchema | ImplicitAllowedTypes;\n\n/**\n * Annotated schema for a field of a tree node.\n * @alpha\n */\nexport type ImplicitAnnotatedFieldSchema = FieldSchema | ImplicitAnnotatedAllowedTypes;\n\n/**\n * Removes annotations from an annotated field schema.\n * @system @alpha\n */\nexport type UnannotateImplicitFieldSchema<T extends ImplicitAnnotatedFieldSchema> =\n\tT extends ImplicitAnnotatedAllowedTypes ? UnannotateImplicitAllowedTypes<T> : T;\n\n/**\n * Converts an `ImplicitFieldSchema` to a property type suitable for reading a field with this that schema.\n *\n * @typeparam TSchema - When non-exact schema are provided this errors on the side of returning too general of a type (a conservative union of all possibilities).\n * This is ideal for \"output APIs\" - i.e. it converts the schema type to the runtime type that a user will _read_ from the tree.\n * Examples of such \"non-exact\" schema include `ImplicitFieldSchema`, `ImplicitAllowedTypes`, and TypeScript unions of schema types.\n * @public\n */\nexport type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> =\n\tTSchema extends FieldSchema<infer Kind, infer Types>\n\t\t? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind>\n\t\t: TSchema extends ImplicitAllowedTypes\n\t\t\t? TreeNodeFromImplicitAllowedTypes<TSchema>\n\t\t\t: TreeNode | TreeLeafValue | undefined;\n\n/**\n * Type of content that can be inserted into the tree for a field of the given schema.\n *\n * @see {@link Input}\n *\n * @typeparam TSchemaInput - Schema to process.\n * @typeparam TSchema - Do not specify: default value used as implementation detail.\n * @public\n */\nexport type InsertableTreeFieldFromImplicitField<\n\tTSchemaInput extends ImplicitFieldSchema,\n\tTSchema = UnionToIntersection<TSchemaInput>,\n> = [TSchema] extends [FieldSchema<infer Kind, infer Types>]\n\t? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypes<Types>, Kind, true>\n\t: [TSchema] extends [ImplicitAllowedTypes]\n\t\t? InsertableTreeNodeFromImplicitAllowedTypes<TSchema>\n\t\t: never;\n\n/**\n * Content which could be inserted into a field within a tree.\n *\n * @see {@link Input}\n * @remarks\n * Extended version of {@link InsertableTreeFieldFromImplicitField} that also allows {@link (UnsafeUnknownSchema:type)}.\n * @alpha\n */\nexport type InsertableField<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> = [\n\tTSchema,\n] extends [ImplicitFieldSchema]\n\t? InsertableTreeFieldFromImplicitField<TSchema>\n\t: [TSchema] extends [UnsafeUnknownSchema]\n\t\t? InsertableContent | undefined\n\t\t: never;\n\n/**\n * Content which could be read from a field within a tree.\n *\n * @remarks\n * Extended version of {@link TreeFieldFromImplicitField} that also allows {@link (UnsafeUnknownSchema:type)}.\n * Since reading from fields with non-exact schema is still safe, this is only useful (compared to {@link TreeFieldFromImplicitField}) when the schema is also used as input and thus allows {@link (UnsafeUnknownSchema:type)}\n * for use\n * @system @alpha\n */\nexport type ReadableField<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> =\n\tTreeFieldFromImplicitField<ReadSchema<TSchema>>;\n\n/**\n * Adapter to remove {@link (UnsafeUnknownSchema:type)} from a schema type so it can be used with types for generating APIs for reading data.\n *\n * @remarks\n * Since reading with non-exact schema is still safe, this is mainly useful when the schema is also used as input and thus allows {@link (UnsafeUnknownSchema:type)}.\n * @system @alpha\n */\nexport type ReadSchema<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> = [\n\tTSchema,\n] extends [ImplicitFieldSchema]\n\t? TSchema\n\t: ImplicitFieldSchema;\n\n/**\n * Suitable for output.\n * For input must error on side of excluding undefined instead.\n * @system @public\n */\nexport type ApplyKind<T, Kind extends FieldKind> = {\n\t[FieldKind.Required]: T;\n\t[FieldKind.Optional]: T | undefined;\n\t[FieldKind.Identifier]: T;\n}[Kind];\n\n/**\n * Suitable for input.\n *\n * @see {@link Input}\n * @system @public\n */\nexport type ApplyKindInput<T, Kind extends FieldKind, DefaultsAreOptional extends boolean> = [\n\tKind,\n] extends [FieldKind.Required]\n\t? T\n\t: [Kind] extends [FieldKind.Optional]\n\t\t? T | undefined\n\t\t: [Kind] extends [FieldKind.Identifier]\n\t\t\t? DefaultsAreOptional extends true\n\t\t\t\t? T | undefined\n\t\t\t\t: T\n\t\t\t: never;\n"]}
@@ -2,17 +2,17 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { typeNameSymbol, typeSchemaSymbol, type WithType, type TreeNodeSchema, type AnnotatedAllowedType, type NormalizedAnnotatedAllowedTypes, NodeKind, type TreeNodeSchemaClass, type TreeNodeSchemaNonClass, type TreeNodeSchemaCore, type TreeNode, type Unhydrated, type InternalTreeNode, isTreeNode, tryDisposeTreeNode, HydratedContext, SimpleContextSlot, getOrCreateInnerNode, getOrCreateNodeFromInnerNode, getOrCreateNodeFromInnerUnboxedNode, getKernel, type NodeFromSchema, isTreeNodeSchemaClass, type TreeNodeFromImplicitAllowedTypes, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, type AllowedTypes, type InsertableTreeNodeFromAllowedTypes, type InsertableTypedNode, type NodeBuilderData, type Input, normalizeAllowedTypes, type NodeSchemaMetadata, type ImplicitAllowedTypes, type ImplicitAnnotatedAllowedTypes, type UnannotateImplicitAllowedTypes, type AllowedTypesMetadata, evaluateLazySchema, type UnannotateAllowedTypes, type UnannotateAllowedType, type UnannotateAllowedTypesList, type UnannotateAllowedTypeOrLazyItem, type AllowedTypeMetadata, type AnnotatedAllowedTypes, type LazyItem, type FlexList, type FlexListToUnion, type ExtractItemType, } from "./core/index.js";
5
+ export { typeNameSymbol, typeSchemaSymbol, type WithType, type TreeNodeSchema, type AnnotatedAllowedType, type NormalizedAnnotatedAllowedTypes, NodeKind, type TreeNodeSchemaClass, type TreeNodeSchemaNonClass, type TreeNodeSchemaCore, type TreeNode, type Unhydrated, type InternalTreeNode, isTreeNode, tryDisposeTreeNode, HydratedContext, SimpleContextSlot, getOrCreateInnerNode, getOrCreateNodeFromInnerNode, getOrCreateNodeFromInnerUnboxedNode, getKernel, type NodeFromSchema, isTreeNodeSchemaClass, type TreeNodeFromImplicitAllowedTypes, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, type AllowedTypes, type InsertableTreeNodeFromAllowedTypes, type InsertableTypedNode, type NodeBuilderData, type Input, normalizeAllowedTypes, type NodeSchemaMetadata, type ImplicitAllowedTypes, type ImplicitAnnotatedAllowedTypes, type UnannotateImplicitAllowedTypes, type AllowedTypesMetadata, evaluateLazySchema, type UnannotateAllowedTypes, type UnannotateAllowedType, type UnannotateAllowedTypesList, type UnannotateAllowedTypeOrLazyItem, type AllowedTypeMetadata, type AnnotatedAllowedTypes, type LazyItem, type FlexList, type FlexListToUnion, type ExtractItemType, walkNodeSchema, walkAllowedTypes, type SchemaVisitor, } from "./core/index.js";
6
+ export { walkFieldSchema } from "./walkFieldSchema.js";
6
7
  export type { UnsafeUnknownSchema, Insertable } from "./unsafeUnknownSchema.js";
7
8
  export { type ITree, type TreeView, type ViewableTree, type TreeViewEvents, TreeViewConfiguration, TreeViewConfigurationAlpha, type ITreeViewConfiguration, type SchemaCompatibilityStatus, type ITreeConfigurationOptions, SchemaFactory, SchemaFactoryAlpha, type SchemaFactoryObjectOptions, type ScopedSchemaName, type ValidateRecursiveSchema, type FixRecursiveArraySchema, adaptEnum, enumFromStrings, singletonSchema, treeNodeApi, type TreeNodeApi, type NodeChangedData, TreeBeta, type TreeChangeEventsBeta, type SimpleTreeIndex, type IdentifierIndex, createSimpleTreeIndex, createIdentifierIndex, type JsonSchemaId, type JsonSchemaType, type JsonObjectNodeSchema, type JsonArrayNodeSchema, type JsonMapNodeSchema, type JsonLeafNodeSchema, type JsonSchemaRef, type JsonRefPath, type JsonNodeSchema, type JsonNodeSchemaBase, type JsonTreeSchema, type JsonFieldSchema, type JsonLeafSchemaType, type JsonRecordNodeSchema, type JsonStringKeyPatternProperties, type TreeSchemaEncodingOptions, getJsonSchema, getSimpleSchema, type VerboseTreeNode, type TreeEncodingOptions, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, SchemaCompatibilityTester, type Unenforced, type System_Unsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type TreeViewAlpha, type TreeBranch, type TreeBranchEvents, getPropertyKeyFromStoredKey, getStoredKey, tryGetSchema, applySchemaToParserOptions, cursorFromVerbose, verboseFromCursor, conciseFromCursor, createFromCursor, asTreeViewAlpha, customFromCursorStored, type CustomTreeNode, type CustomTreeValue, tryStoredSchemaAsArray, type SchemaStatics, type ITreeAlpha, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, rollback, generateSchemaFromSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type FieldSchemaAlphaUnsafe, getIdentifierFromNode, type TreeSchema, type ValidateRecursiveSchemaTemplate, type FixRecursiveRecursionLimit, schemaStatics, type TreeChangeEvents, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, } from "./api/index.js";
8
9
  export type { SimpleTreeSchema, SimpleNodeSchema, SimpleFieldSchema, SimpleLeafNodeSchema, SimpleMapNodeSchema, SimpleArrayNodeSchema, SimpleObjectNodeSchema, SimpleNodeSchemaBase, SimpleNodeSchemaBaseAlpha, SimpleObjectFieldSchema, SimpleRecordNodeSchema, } from "./simpleSchema.js";
9
- export { type ImplicitFieldSchema, type ImplicitAnnotatedFieldSchema, type TreeFieldFromImplicitField, type UnannotateImplicitFieldSchema, FieldKind, FieldSchema, type FieldSchemaAlpha, type InsertableTreeFieldFromImplicitField, type DefaultProvider, type FieldProps, type FieldPropsAlpha, normalizeFieldSchema, areFieldSchemaEqual, areImplicitFieldSchemaEqual, type ApplyKind, type FieldSchemaMetadata, type InsertableField, type ApplyKindInput, type ReadableField, type ReadSchema, } from "./fieldSchema.js";
10
+ export { type ImplicitFieldSchema, type ImplicitAnnotatedFieldSchema, type TreeFieldFromImplicitField, type UnannotateImplicitFieldSchema, FieldKind, FieldSchema, FieldSchemaAlpha, type InsertableTreeFieldFromImplicitField, type DefaultProvider, type FieldProps, type FieldPropsAlpha, normalizeFieldSchema, areFieldSchemaEqual, areImplicitFieldSchemaEqual, type ApplyKind, type FieldSchemaMetadata, type InsertableField, type ApplyKindInput, type ReadableField, type ReadSchema, } from "./fieldSchema.js";
10
11
  export { tryGetTreeNodeForField } from "./getTreeNodeForField.js";
11
- export { type ArrayNodeCustomizableSchema, type ArrayNodePojoEmulationSchema, ArrayNodeSchema, asIndex, isArrayNodeSchema, IterableTreeArrayContent, type ReadonlyArrayNode, TreeArrayNode, type MapNodeCustomizableSchema, type MapNodePojoEmulationSchema, MapNodeSchema, isMapNodeSchema, type TreeMapNode, type MapNodeInsertableData, type FieldHasDefault, type InsertableObjectFromSchemaRecord, type ObjectFromSchemaRecord, ObjectNodeSchema, type ObjectNodeSchemaPrivate, isObjectNodeSchema, type InsertableObjectFromAnnotatedSchemaRecord, type TreeObjectNode, setField, createUnknownOptionalFieldPolicy, isRecordNodeSchema, type RecordNodeCustomizableSchema, type RecordNodeInsertableData, type RecordNodePojoEmulationSchema, RecordNodeSchema, type TreeRecordNode, type UnannotateSchemaRecord, } from "./node-kinds/index.js";
12
+ export { type ArrayNodeCustomizableSchema, type ArrayNodePojoEmulationSchema, ArrayNodeSchema, asIndex, isArrayNodeSchema, IterableTreeArrayContent, type ReadonlyArrayNode, TreeArrayNode, type MapNodeCustomizableSchema, type MapNodePojoEmulationSchema, MapNodeSchema, isMapNodeSchema, type TreeMapNode, type MapNodeInsertableData, type FieldHasDefault, type InsertableObjectFromSchemaRecord, type ObjectFromSchemaRecord, ObjectNodeSchema, type ObjectNodeSchemaPrivate, isObjectNodeSchema, type InsertableObjectFromAnnotatedSchemaRecord, type TreeObjectNode, setField, isRecordNodeSchema, type RecordNodeCustomizableSchema, type RecordNodeInsertableData, type RecordNodePojoEmulationSchema, RecordNodeSchema, type TreeRecordNode, type UnannotateSchemaRecord, } from "./node-kinds/index.js";
12
13
  export { unhydratedFlexTreeFromInsertable, type InsertableContent, type FactoryContent, type FactoryContentObject, } from "./unhydratedFlexTreeFromInsertable.js";
13
14
  export { prepareForInsertion, prepareForInsertionContextless, } from "./prepareForInsertion.js";
14
15
  export { toStoredSchema, getStoredSchema, convertFieldKind } from "./toStoredSchema.js";
15
16
  export { numberSchema, stringSchema, booleanSchema, handleSchema, nullSchema, } from "./leafNodeSchema.js";
16
17
  export type { LeafSchema } from "./leafNodeSchema.js";
17
- export { getAllowedContentDiscrepancies, type FieldDiscrepancy, comparePosetElements, fieldRealizer, type Realizer, PosetComparisonResult, } from "./discrepancies.js";
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simple-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,o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AgC,EAChC,kBAAkB,EAClB,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,sBAAsB,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,gCAAgC,EAChC,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,GACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACN,mBAAmB,EACnB,8BAA8B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,GACV,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACN,8BAA8B,EAC9B,KAAK,gBAAgB,EACrB,oBAAoB,EACpB,aAAa,EACb,KAAK,QAAQ,EACb,qBAAqB,GACrB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simple-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACpC,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EAGvB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,4BAA4B,EAC5B,mCAAmC,EACnC,SAAS,EACT,KAAK,cAAc,EACnB,qBAAqB,EACrB,KAAK,gCAAgC,EACrC,KAAK,0CAA0C,EAC/C,KAAK,aAAa,E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O,EACN,mBAAmB,EACnB,8BAA8B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,GACV,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
@@ -4,8 +4,8 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.FieldKind = exports.schemaStatics = exports.getIdentifierFromNode = exports.allowUnused = exports.replaceVerboseTreeHandles = exports.replaceHandles = exports.replaceConciseTreeHandles = exports.generateSchemaFromSimpleSchema = exports.rollback = exports.tryStoredSchemaAsArray = exports.customFromCursorStored = exports.asTreeViewAlpha = exports.createFromCursor = exports.conciseFromCursor = exports.verboseFromCursor = exports.cursorFromVerbose = exports.applySchemaToParserOptions = exports.tryGetSchema = exports.getStoredKey = exports.getPropertyKeyFromStoredKey = exports.SchemaCompatibilityTester = exports.comparePersistedSchema = exports.extractPersistedSchema = exports.getSimpleSchema = exports.getJsonSchema = exports.createIdentifierIndex = exports.createSimpleTreeIndex = exports.TreeBeta = exports.treeNodeApi = exports.singletonSchema = exports.enumFromStrings = exports.adaptEnum = exports.SchemaFactoryAlpha = exports.SchemaFactory = exports.TreeViewConfigurationAlpha = exports.TreeViewConfiguration = exports.evaluateLazySchema = exports.normalizeAllowedTypes = exports.isTreeNodeSchemaClass = exports.getKernel = exports.getOrCreateNodeFromInnerUnboxedNode = exports.getOrCreateNodeFromInnerNode = exports.getOrCreateInnerNode = exports.SimpleContextSlot = exports.HydratedContext = exports.tryDisposeTreeNode = exports.isTreeNode = exports.NodeKind = exports.typeSchemaSymbol = exports.typeNameSymbol = void 0;
8
- exports.PosetComparisonResult = exports.fieldRealizer = exports.comparePosetElements = exports.getAllowedContentDiscrepancies = exports.nullSchema = exports.handleSchema = exports.booleanSchema = exports.stringSchema = exports.numberSchema = exports.convertFieldKind = exports.getStoredSchema = exports.toStoredSchema = exports.prepareForInsertionContextless = exports.prepareForInsertion = exports.unhydratedFlexTreeFromInsertable = exports.RecordNodeSchema = exports.isRecordNodeSchema = exports.createUnknownOptionalFieldPolicy = exports.setField = exports.isObjectNodeSchema = exports.ObjectNodeSchema = exports.isMapNodeSchema = exports.MapNodeSchema = exports.TreeArrayNode = exports.IterableTreeArrayContent = exports.isArrayNodeSchema = exports.asIndex = exports.ArrayNodeSchema = exports.tryGetTreeNodeForField = exports.areImplicitFieldSchemaEqual = exports.areFieldSchemaEqual = exports.normalizeFieldSchema = exports.FieldSchema = void 0;
7
+ exports.allowUnused = exports.replaceVerboseTreeHandles = exports.replaceHandles = exports.replaceConciseTreeHandles = exports.generateSchemaFromSimpleSchema = exports.rollback = exports.tryStoredSchemaAsArray = exports.customFromCursorStored = exports.asTreeViewAlpha = exports.createFromCursor = exports.conciseFromCursor = exports.verboseFromCursor = exports.cursorFromVerbose = exports.applySchemaToParserOptions = exports.tryGetSchema = exports.getStoredKey = exports.getPropertyKeyFromStoredKey = exports.SchemaCompatibilityTester = exports.comparePersistedSchema = exports.extractPersistedSchema = exports.getSimpleSchema = exports.getJsonSchema = exports.createIdentifierIndex = exports.createSimpleTreeIndex = exports.TreeBeta = exports.treeNodeApi = exports.singletonSchema = exports.enumFromStrings = exports.adaptEnum = exports.SchemaFactoryAlpha = exports.SchemaFactory = exports.TreeViewConfigurationAlpha = exports.TreeViewConfiguration = exports.walkFieldSchema = exports.walkAllowedTypes = exports.walkNodeSchema = exports.evaluateLazySchema = exports.normalizeAllowedTypes = exports.isTreeNodeSchemaClass = exports.getKernel = exports.getOrCreateNodeFromInnerUnboxedNode = exports.getOrCreateNodeFromInnerNode = exports.getOrCreateInnerNode = exports.SimpleContextSlot = exports.HydratedContext = exports.tryDisposeTreeNode = exports.isTreeNode = exports.NodeKind = exports.typeSchemaSymbol = exports.typeNameSymbol = void 0;
8
+ exports.nullSchema = exports.handleSchema = exports.booleanSchema = exports.stringSchema = exports.numberSchema = exports.convertFieldKind = exports.getStoredSchema = exports.toStoredSchema = exports.prepareForInsertionContextless = exports.prepareForInsertion = exports.unhydratedFlexTreeFromInsertable = exports.RecordNodeSchema = exports.isRecordNodeSchema = exports.setField = exports.isObjectNodeSchema = exports.ObjectNodeSchema = exports.isMapNodeSchema = exports.MapNodeSchema = exports.TreeArrayNode = exports.IterableTreeArrayContent = exports.isArrayNodeSchema = exports.asIndex = exports.ArrayNodeSchema = exports.tryGetTreeNodeForField = exports.areImplicitFieldSchemaEqual = exports.areFieldSchemaEqual = exports.normalizeFieldSchema = exports.FieldSchemaAlpha = exports.FieldSchema = exports.FieldKind = exports.schemaStatics = exports.getIdentifierFromNode = void 0;
9
9
  var index_js_1 = require("./core/index.js");
10
10
  Object.defineProperty(exports, "typeNameSymbol", { enumerable: true, get: function () { return index_js_1.typeNameSymbol; } });
11
11
  Object.defineProperty(exports, "typeSchemaSymbol", { enumerable: true, get: function () { return index_js_1.typeSchemaSymbol; } });
@@ -21,6 +21,10 @@ Object.defineProperty(exports, "getKernel", { enumerable: true, get: function ()
21
21
  Object.defineProperty(exports, "isTreeNodeSchemaClass", { enumerable: true, get: function () { return index_js_1.isTreeNodeSchemaClass; } });
22
22
  Object.defineProperty(exports, "normalizeAllowedTypes", { enumerable: true, get: function () { return index_js_1.normalizeAllowedTypes; } });
23
23
  Object.defineProperty(exports, "evaluateLazySchema", { enumerable: true, get: function () { return index_js_1.evaluateLazySchema; } });
24
+ Object.defineProperty(exports, "walkNodeSchema", { enumerable: true, get: function () { return index_js_1.walkNodeSchema; } });
25
+ Object.defineProperty(exports, "walkAllowedTypes", { enumerable: true, get: function () { return index_js_1.walkAllowedTypes; } });
26
+ var walkFieldSchema_js_1 = require("./walkFieldSchema.js");
27
+ Object.defineProperty(exports, "walkFieldSchema", { enumerable: true, get: function () { return walkFieldSchema_js_1.walkFieldSchema; } });
24
28
  var index_js_2 = require("./api/index.js");
25
29
  Object.defineProperty(exports, "TreeViewConfiguration", { enumerable: true, get: function () { return index_js_2.TreeViewConfiguration; } });
26
30
  Object.defineProperty(exports, "TreeViewConfigurationAlpha", { enumerable: true, get: function () { return index_js_2.TreeViewConfigurationAlpha; } });
@@ -60,6 +64,7 @@ Object.defineProperty(exports, "schemaStatics", { enumerable: true, get: functio
60
64
  var fieldSchema_js_1 = require("./fieldSchema.js");
61
65
  Object.defineProperty(exports, "FieldKind", { enumerable: true, get: function () { return fieldSchema_js_1.FieldKind; } });
62
66
  Object.defineProperty(exports, "FieldSchema", { enumerable: true, get: function () { return fieldSchema_js_1.FieldSchema; } });
67
+ Object.defineProperty(exports, "FieldSchemaAlpha", { enumerable: true, get: function () { return fieldSchema_js_1.FieldSchemaAlpha; } });
63
68
  Object.defineProperty(exports, "normalizeFieldSchema", { enumerable: true, get: function () { return fieldSchema_js_1.normalizeFieldSchema; } });
64
69
  Object.defineProperty(exports, "areFieldSchemaEqual", { enumerable: true, get: function () { return fieldSchema_js_1.areFieldSchemaEqual; } });
65
70
  Object.defineProperty(exports, "areImplicitFieldSchemaEqual", { enumerable: true, get: function () { return fieldSchema_js_1.areImplicitFieldSchemaEqual; } });
@@ -76,7 +81,6 @@ Object.defineProperty(exports, "isMapNodeSchema", { enumerable: true, get: funct
76
81
  Object.defineProperty(exports, "ObjectNodeSchema", { enumerable: true, get: function () { return index_js_3.ObjectNodeSchema; } });
77
82
  Object.defineProperty(exports, "isObjectNodeSchema", { enumerable: true, get: function () { return index_js_3.isObjectNodeSchema; } });
78
83
  Object.defineProperty(exports, "setField", { enumerable: true, get: function () { return index_js_3.setField; } });
79
- Object.defineProperty(exports, "createUnknownOptionalFieldPolicy", { enumerable: true, get: function () { return index_js_3.createUnknownOptionalFieldPolicy; } });
80
84
  Object.defineProperty(exports, "isRecordNodeSchema", { enumerable: true, get: function () { return index_js_3.isRecordNodeSchema; } });
81
85
  Object.defineProperty(exports, "RecordNodeSchema", { enumerable: true, get: function () { return index_js_3.RecordNodeSchema; } });
82
86
  var unhydratedFlexTreeFromInsertable_js_1 = require("./unhydratedFlexTreeFromInsertable.js");
@@ -94,9 +98,4 @@ Object.defineProperty(exports, "stringSchema", { enumerable: true, get: function
94
98
  Object.defineProperty(exports, "booleanSchema", { enumerable: true, get: function () { return leafNodeSchema_js_1.booleanSchema; } });
95
99
  Object.defineProperty(exports, "handleSchema", { enumerable: true, get: function () { return leafNodeSchema_js_1.handleSchema; } });
96
100
  Object.defineProperty(exports, "nullSchema", { enumerable: true, get: function () { return leafNodeSchema_js_1.nullSchema; } });
97
- var discrepancies_js_1 = require("./discrepancies.js");
98
- Object.defineProperty(exports, "getAllowedContentDiscrepancies", { enumerable: true, get: function () { return discrepancies_js_1.getAllowedContentDiscrepancies; } });
99
- Object.defineProperty(exports, "comparePosetElements", { enumerable: true, get: function () { return discrepancies_js_1.comparePosetElements; } });
100
- Object.defineProperty(exports, "fieldRealizer", { enumerable: true, get: function () { return discrepancies_js_1.fieldRealizer; } });
101
- Object.defineProperty(exports, "PosetComparisonResult", { enumerable: true, get: function () { return discrepancies_js_1.PosetComparisonResult; } });
102
101
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/simple-tree/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,4CAmDyB;AAlDxB,0GAAA,cAAc,OAAA;AACd,4GAAA,gBAAgB,OAAA;AAKhB,oGAAA,QAAQ,OAAA;AASR,sGAAA,UAAU,OAAA;AACV,8GAAA,kBAAkB,OAAA;AAClB,2GAAA,eAAe,OAAA;AACf,6GAAA,iBAAiB,OAAA;AACjB,gHAAA,oBAAoB,OAAA;AACpB,wHAAA,4BAA4B,OAAA;AAC5B,+HAAA,mCAAmC,OAAA;AACnC,qGAAA,SAAS,OAAA;AAET,iHAAA,qBAAqB,OAAA;AASrB,iHAAA,qBAAqB,OAAA;AAMrB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A,OAAO,OAAA;AACP,6GAAA,iBAAiB,OAAA;AACjB,oHAAA,wBAAwB,OAAA;AAExB,yGAAA,aAAa,OAAA;AAGb,yGAAA,aAAa,OAAA;AACb,2GAAA,eAAe,OAAA;AAMf,4GAAA,gBAAgB,OAAA;AAEhB,8GAAA,kBAAkB,OAAA;AAGlB,oGAAA,QAAQ,OAAA;AACR,4HAAA,gCAAgC,OAAA;AAChC,8GAAA,kBAAkB,OAAA;AAIlB,4GAAA,gBAAgB,OAAA;AAIjB,6FAK+C;AAJ9C,uJAAA,gCAAgC,OAAA;AAKjC,mEAGkC;AAFjC,6HAAA,mBAAmB,OAAA;AACnB,wIAAA,8BAA8B,OAAA;AAE/B,yDAAwF;AAA/E,mHAAA,cAAc,OAAA;AAAE,oHAAA,eAAe,OAAA;AAAE,qHAAA,gBAAgB,OAAA;AAC1D,yDAM6B;AAL5B,iHAAA,YAAY,OAAA;AACZ,iHAAA,YAAY,OAAA;AACZ,kHAAA,aAAa,OAAA;AACb,iHAAA,YAAY,OAAA;AACZ,+GAAA,UAAU,OAAA;AAGX,uDAO4B;AAN3B,kIAAA,8BAA8B,OAAA;AAE9B,wHAAA,oBAAoB,OAAA;AACpB,iHAAA,aAAa,OAAA;AAEb,yHAAA,qBAAqB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttypeNameSymbol,\n\ttypeSchemaSymbol,\n\ttype WithType,\n\ttype TreeNodeSchema,\n\ttype AnnotatedAllowedType,\n\ttype NormalizedAnnotatedAllowedTypes,\n\tNodeKind,\n\ttype TreeNodeSchemaClass,\n\ttype TreeNodeSchemaNonClass,\n\ttype TreeNodeSchemaCore,\n\t// TreeNode is only type exported, which prevents use of the class object for unsupported use-cases like direct sub-classing and instanceof.\n\t// See docs on TreeNode for more details.\n\ttype TreeNode,\n\ttype Unhydrated,\n\ttype InternalTreeNode,\n\tisTreeNode,\n\ttryDisposeTreeNode,\n\tHydratedContext,\n\tSimpleContextSlot,\n\tgetOrCreateInnerNode,\n\tgetOrCreateNodeFromInnerNode,\n\tgetOrCreateNodeFromInnerUnboxedNode,\n\tgetKernel,\n\ttype NodeFromSchema,\n\tisTreeNodeSchemaClass,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\ttype AllowedTypes,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype InsertableTypedNode,\n\ttype NodeBuilderData,\n\ttype Input,\n\tnormalizeAllowedTypes,\n\ttype NodeSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype ImplicitAnnotatedAllowedTypes,\n\ttype UnannotateImplicitAllowedTypes,\n\ttype AllowedTypesMetadata,\n\tevaluateLazySchema,\n\ttype UnannotateAllowedTypes,\n\ttype UnannotateAllowedType,\n\ttype UnannotateAllowedTypesList,\n\ttype UnannotateAllowedTypeOrLazyItem,\n\ttype AllowedTypeMetadata,\n\ttype AnnotatedAllowedTypes,\n\ttype LazyItem,\n\ttype FlexList,\n\ttype FlexListToUnion,\n\ttype ExtractItemType,\n} from \"./core/index.js\";\nexport type { UnsafeUnknownSchema, Insertable } from \"./unsafeUnknownSchema.js\";\nexport {\n\ttype ITree,\n\ttype TreeView,\n\ttype ViewableTree,\n\ttype TreeViewEvents,\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n\ttype ITreeViewConfiguration,\n\ttype SchemaCompatibilityStatus,\n\ttype ITreeConfigurationOptions,\n\tSchemaFactory,\n\tSchemaFactoryAlpha,\n\ttype SchemaFactoryObjectOptions,\n\ttype ScopedSchemaName,\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttype NodeChangedData,\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\ttype SimpleTreeIndex,\n\ttype IdentifierIndex,\n\tcreateSimpleTreeIndex,\n\tcreateIdentifierIndex,\n\ttype JsonSchemaId,\n\ttype JsonSchemaType,\n\ttype JsonObjectNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonLeafNodeSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonTreeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\ttype TreeSchemaEncodingOptions,\n\tgetJsonSchema,\n\tgetSimpleSchema,\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\tSchemaCompatibilityTester,\n\ttype Unenforced,\n\ttype System_Unsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype TreeViewAlpha,\n\ttype TreeBranch,\n\ttype TreeBranchEvents,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttryGetSchema,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\tconciseFromCursor,\n\tcreateFromCursor,\n\tasTreeViewAlpha,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype FieldSchemaAlphaUnsafe,\n\tgetIdentifierFromNode,\n\ttype TreeSchema,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tschemaStatics,\n\ttype TreeChangeEvents,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n} from \"./api/index.js\";\nexport type {\n\tSimpleTreeSchema,\n\tSimpleNodeSchema,\n\tSimpleFieldSchema,\n\tSimpleLeafNodeSchema,\n\tSimpleMapNodeSchema,\n\tSimpleArrayNodeSchema,\n\tSimpleObjectNodeSchema,\n\tSimpleNodeSchemaBase,\n\tSimpleNodeSchemaBaseAlpha,\n\tSimpleObjectFieldSchema,\n\tSimpleRecordNodeSchema,\n} from \"./simpleSchema.js\";\nexport {\n\ttype ImplicitFieldSchema,\n\ttype ImplicitAnnotatedFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype UnannotateImplicitFieldSchema,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaAlpha,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype DefaultProvider,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\tareFieldSchemaEqual,\n\tareImplicitFieldSchemaEqual,\n\ttype ApplyKind,\n\ttype FieldSchemaMetadata,\n\ttype InsertableField,\n\ttype ApplyKindInput,\n\ttype ReadableField,\n\ttype ReadSchema,\n} from \"./fieldSchema.js\";\nexport { tryGetTreeNodeForField } from \"./getTreeNodeForField.js\";\nexport {\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\tasIndex,\n\tisArrayNodeSchema,\n\tIterableTreeArrayContent,\n\ttype ReadonlyArrayNode,\n\tTreeArrayNode,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\tisMapNodeSchema,\n\ttype TreeMapNode,\n\ttype MapNodeInsertableData,\n\ttype FieldHasDefault,\n\ttype InsertableObjectFromSchemaRecord,\n\ttype ObjectFromSchemaRecord,\n\tObjectNodeSchema,\n\ttype ObjectNodeSchemaPrivate,\n\tisObjectNodeSchema,\n\ttype InsertableObjectFromAnnotatedSchemaRecord,\n\ttype TreeObjectNode,\n\tsetField,\n\tcreateUnknownOptionalFieldPolicy,\n\tisRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\tRecordNodeSchema,\n\ttype TreeRecordNode,\n\ttype UnannotateSchemaRecord,\n} from \"./node-kinds/index.js\";\nexport {\n\tunhydratedFlexTreeFromInsertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n} from \"./unhydratedFlexTreeFromInsertable.js\";\nexport {\n\tprepareForInsertion,\n\tprepareForInsertionContextless,\n} from \"./prepareForInsertion.js\";\nexport { toStoredSchema, getStoredSchema, convertFieldKind } from \"./toStoredSchema.js\";\nexport {\n\tnumberSchema,\n\tstringSchema,\n\tbooleanSchema,\n\thandleSchema,\n\tnullSchema,\n} from \"./leafNodeSchema.js\";\nexport type { LeafSchema } from \"./leafNodeSchema.js\";\nexport {\n\tgetAllowedContentDiscrepancies,\n\ttype FieldDiscrepancy,\n\tcomparePosetElements,\n\tfieldRealizer,\n\ttype Realizer,\n\tPosetComparisonResult,\n} from \"./discrepancies.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/simple-tree/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,4CAsDyB;AArDxB,0GAAA,cAAc,OAAA;AACd,4GAAA,gBAAgB,OAAA;AAKhB,oGAAA,QAAQ,OAAA;AASR,sGAAA,UAAU,OAAA;AACV,8GAAA,kBAAkB,OAAA;AAClB,2GAAA,eAAe,OAAA;AACf,6GAAA,iBAAiB,OAAA;AACjB,gHAAA,oB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kBd,mDAqB0B;AAhBzB,2GAAA,SAAS,OAAA;AACT,6GAAA,WAAW,OAAA;AACX,kHAAA,gBAAgB,OAAA;AAKhB,sHAAA,oBAAoB,OAAA;AACpB,qHAAA,mBAAmB,OAAA;AACnB,6HAAA,2BAA2B,OAAA;AAQ5B,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,kDA+B+B;AA5B9B,2GAAA,eAAe,OAAA;AACf,mGAAA,OAAO,OAAA;AACP,6GAAA,iBAAiB,OAAA;AACjB,oHAAA,wBAAwB,OAAA;AAExB,yGAAA,aAAa,OAAA;AAGb,yGAAA,aAAa,OAAA;AACb,2GAAA,eAAe,OAAA;AAMf,4GAAA,gBAAgB,OAAA;AAEhB,8GAAA,kBAAkB,OAAA;AAGlB,oGAAA,QAAQ,OAAA;AACR,8GAAA,kBAAkB,OAAA;AAIlB,4GAAA,gBAAgB,OAAA;AAIjB,6FAK+C;AAJ9C,uJAAA,gCAAgC,OAAA;AAKjC,mEAGkC;AAFjC,6HAAA,mBAAmB,OAAA;AACnB,wIAAA,8BAA8B,OAAA;AAE/B,yDAAwF;AAA/E,mHAAA,cAAc,OAAA;AAAE,oHAAA,eAAe,OAAA;AAAE,qHAAA,gBAAgB,OAAA;AAC1D,yDAM6B;AAL5B,iHAAA,YAAY,OAAA;AACZ,iHAAA,YAAY,OAAA;AACZ,kHAAA,aAAa,OAAA;AACb,iHAAA,YAAY,OAAA;AACZ,+GAAA,UAAU,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttypeNameSymbol,\n\ttypeSchemaSymbol,\n\ttype WithType,\n\ttype TreeNodeSchema,\n\ttype AnnotatedAllowedType,\n\ttype NormalizedAnnotatedAllowedTypes,\n\tNodeKind,\n\ttype TreeNodeSchemaClass,\n\ttype TreeNodeSchemaNonClass,\n\ttype TreeNodeSchemaCore,\n\t// TreeNode is only type exported, which prevents use of the class object for unsupported use-cases like direct sub-classing and instanceof.\n\t// See docs on TreeNode for more details.\n\ttype TreeNode,\n\ttype Unhydrated,\n\ttype InternalTreeNode,\n\tisTreeNode,\n\ttryDisposeTreeNode,\n\tHydratedContext,\n\tSimpleContextSlot,\n\tgetOrCreateInnerNode,\n\tgetOrCreateNodeFromInnerNode,\n\tgetOrCreateNodeFromInnerUnboxedNode,\n\tgetKernel,\n\ttype NodeFromSchema,\n\tisTreeNodeSchemaClass,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\ttype AllowedTypes,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype InsertableTypedNode,\n\ttype NodeBuilderData,\n\ttype Input,\n\tnormalizeAllowedTypes,\n\ttype NodeSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype ImplicitAnnotatedAllowedTypes,\n\ttype UnannotateImplicitAllowedTypes,\n\ttype AllowedTypesMetadata,\n\tevaluateLazySchema,\n\ttype UnannotateAllowedTypes,\n\ttype UnannotateAllowedType,\n\ttype UnannotateAllowedTypesList,\n\ttype UnannotateAllowedTypeOrLazyItem,\n\ttype AllowedTypeMetadata,\n\ttype AnnotatedAllowedTypes,\n\ttype LazyItem,\n\ttype FlexList,\n\ttype FlexListToUnion,\n\ttype ExtractItemType,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n} from \"./core/index.js\";\nexport { walkFieldSchema } from \"./walkFieldSchema.js\";\nexport type { UnsafeUnknownSchema, Insertable } from \"./unsafeUnknownSchema.js\";\nexport {\n\ttype ITree,\n\ttype TreeView,\n\ttype ViewableTree,\n\ttype TreeViewEvents,\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n\ttype ITreeViewConfiguration,\n\ttype SchemaCompatibilityStatus,\n\ttype ITreeConfigurationOptions,\n\tSchemaFactory,\n\tSchemaFactoryAlpha,\n\ttype SchemaFactoryObjectOptions,\n\ttype ScopedSchemaName,\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttype NodeChangedData,\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\ttype SimpleTreeIndex,\n\ttype IdentifierIndex,\n\tcreateSimpleTreeIndex,\n\tcreateIdentifierIndex,\n\ttype JsonSchemaId,\n\ttype JsonSchemaType,\n\ttype JsonObjectNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonLeafNodeSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonTreeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\ttype TreeSchemaEncodingOptions,\n\tgetJsonSchema,\n\tgetSimpleSchema,\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\tSchemaCompatibilityTester,\n\ttype Unenforced,\n\ttype System_Unsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype TreeViewAlpha,\n\ttype TreeBranch,\n\ttype TreeBranchEvents,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttryGetSchema,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\tconciseFromCursor,\n\tcreateFromCursor,\n\tasTreeViewAlpha,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype FieldSchemaAlphaUnsafe,\n\tgetIdentifierFromNode,\n\ttype TreeSchema,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tschemaStatics,\n\ttype TreeChangeEvents,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n} from \"./api/index.js\";\nexport type {\n\tSimpleTreeSchema,\n\tSimpleNodeSchema,\n\tSimpleFieldSchema,\n\tSimpleLeafNodeSchema,\n\tSimpleMapNodeSchema,\n\tSimpleArrayNodeSchema,\n\tSimpleObjectNodeSchema,\n\tSimpleNodeSchemaBase,\n\tSimpleNodeSchemaBaseAlpha,\n\tSimpleObjectFieldSchema,\n\tSimpleRecordNodeSchema,\n} from \"./simpleSchema.js\";\nexport {\n\ttype ImplicitFieldSchema,\n\ttype ImplicitAnnotatedFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype UnannotateImplicitFieldSchema,\n\tFieldKind,\n\tFieldSchema,\n\tFieldSchemaAlpha,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype DefaultProvider,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\tareFieldSchemaEqual,\n\tareImplicitFieldSchemaEqual,\n\ttype ApplyKind,\n\ttype FieldSchemaMetadata,\n\ttype InsertableField,\n\ttype ApplyKindInput,\n\ttype ReadableField,\n\ttype ReadSchema,\n} from \"./fieldSchema.js\";\nexport { tryGetTreeNodeForField } from \"./getTreeNodeForField.js\";\nexport {\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\tasIndex,\n\tisArrayNodeSchema,\n\tIterableTreeArrayContent,\n\ttype ReadonlyArrayNode,\n\tTreeArrayNode,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\tisMapNodeSchema,\n\ttype TreeMapNode,\n\ttype MapNodeInsertableData,\n\ttype FieldHasDefault,\n\ttype InsertableObjectFromSchemaRecord,\n\ttype ObjectFromSchemaRecord,\n\tObjectNodeSchema,\n\ttype ObjectNodeSchemaPrivate,\n\tisObjectNodeSchema,\n\ttype InsertableObjectFromAnnotatedSchemaRecord,\n\ttype TreeObjectNode,\n\tsetField,\n\tisRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\tRecordNodeSchema,\n\ttype TreeRecordNode,\n\ttype UnannotateSchemaRecord,\n} from \"./node-kinds/index.js\";\nexport {\n\tunhydratedFlexTreeFromInsertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n} from \"./unhydratedFlexTreeFromInsertable.js\";\nexport {\n\tprepareForInsertion,\n\tprepareForInsertionContextless,\n} from \"./prepareForInsertion.js\";\nexport { toStoredSchema, getStoredSchema, convertFieldKind } from \"./toStoredSchema.js\";\nexport {\n\tnumberSchema,\n\tstringSchema,\n\tbooleanSchema,\n\thandleSchema,\n\tnullSchema,\n} from \"./leafNodeSchema.js\";\nexport type { LeafSchema } from \"./leafNodeSchema.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"arrayNode.d.ts","sourceRoot":"","sources":["../../../../src/simple-tree/node-kinds/array/arrayNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,OAAO,EAEN,KAAK,QAAQ,EAGb,QAAQ,EACR,KAAK,QAAQ,EAcb,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,0CAA0C,EAC/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AAC,CAAC;CACvB,CAAC;AAQX;;;;GAIG;AACH,qBAAa,wBAAwB,CAAC,CAAC,CAAE,YAAW,QAAQ,CAAC,CAAC,CAAC;IAK1C,OAAO,CAAC,QAAQ,CAAC,OAAO;IAA5C,OAAO;IAEP;;OAEG;IACI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;CAGvC;AAsND;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAqBtF;AA8YD;;;;;GAKG;AAEH,wBAAgB,WAAW,CAC1B,KAAK,SAAS,MAAM,EACpB,KAAK,CAAC,CAAC,SAAS,6BAA6B,EAC7C,KAAK,CAAC,uBAAuB,SAAS,OAAO,EAC7C,KAAK,CAAC,eAAe,GAAG,OAAO,EAE/B,UAAU,EAAE,KAAK,EACjB,IAAI,EAAE,CAAC,EACP,uBAAuB,EAAE,uBAAuB,EAChD,YAAY,EAAE,OAAO,EACrB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,EAC9C,iBAAiB,CAAC,EAAE,4BAA4B,GAAG,SAAS,sPA+H5D"}
@@ -498,7 +498,7 @@ function arraySchema(identifier, info, implicitlyConstructable, customizable, me
498
498
  return Schema.constructorCached?.constructor;
499
499
  }
500
500
  get simpleSchema() {
501
- return unannotatedTypes;
501
+ return info;
502
502
  }
503
503
  get allowedTypes() {
504
504
  return lazyChildTypes.value;