@fluidframework/tree 2.73.0 → 2.74.0-368706

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 (1294) hide show
  1. package/.vscode/settings.json +2 -2
  2. package/api-report/tree.alpha.api.md +133 -85
  3. package/api-report/tree.beta.api.md +0 -1
  4. package/api-report/tree.legacy.beta.api.md +0 -1
  5. package/api-report/tree.legacy.public.api.md +0 -1
  6. package/api-report/tree.public.api.md +0 -1
  7. package/dist/alpha.d.ts +7 -2
  8. package/dist/codec/codec.d.ts +14 -1
  9. package/dist/codec/codec.d.ts.map +1 -1
  10. package/dist/codec/codec.js +11 -0
  11. package/dist/codec/codec.js.map +1 -1
  12. package/dist/codec/versioned/codec.d.ts +1 -1
  13. package/dist/codec/versioned/codec.d.ts.map +1 -1
  14. package/dist/codec/versioned/codec.js.map +1 -1
  15. package/dist/codec/versioned/format.d.ts +4 -1
  16. package/dist/codec/versioned/format.d.ts.map +1 -1
  17. package/dist/codec/versioned/format.js +4 -1
  18. package/dist/codec/versioned/format.js.map +1 -1
  19. package/dist/core/change-family/changeFamily.d.ts +4 -1
  20. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  21. package/dist/core/change-family/changeFamily.js.map +1 -1
  22. package/dist/core/change-family/index.d.ts +1 -1
  23. package/dist/core/change-family/index.d.ts.map +1 -1
  24. package/dist/core/change-family/index.js.map +1 -1
  25. package/dist/core/index.d.ts +3 -3
  26. package/dist/core/index.d.ts.map +1 -1
  27. package/dist/core/index.js +7 -4
  28. package/dist/core/index.js.map +1 -1
  29. package/dist/core/rebase/changeRebaser.d.ts +6 -1
  30. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  31. package/dist/core/rebase/changeRebaser.js.map +1 -1
  32. package/dist/core/rebase/index.d.ts +1 -1
  33. package/dist/core/rebase/index.d.ts.map +1 -1
  34. package/dist/core/rebase/index.js +2 -1
  35. package/dist/core/rebase/index.js.map +1 -1
  36. package/dist/core/rebase/types.d.ts +2 -1
  37. package/dist/core/rebase/types.d.ts.map +1 -1
  38. package/dist/core/rebase/types.js +5 -1
  39. package/dist/core/rebase/types.js.map +1 -1
  40. package/dist/core/rebase/utils.d.ts.map +1 -1
  41. package/dist/core/rebase/utils.js +25 -7
  42. package/dist/core/rebase/utils.js.map +1 -1
  43. package/dist/core/tree/detachedFieldIndex.d.ts +40 -13
  44. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  45. package/dist/core/tree/detachedFieldIndex.js +21 -12
  46. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  47. package/dist/core/tree/index.d.ts +4 -3
  48. package/dist/core/tree/index.d.ts.map +1 -1
  49. package/dist/core/tree/index.js +6 -2
  50. package/dist/core/tree/index.js.map +1 -1
  51. package/dist/core/tree/pathTree.d.ts +11 -3
  52. package/dist/core/tree/pathTree.d.ts.map +1 -1
  53. package/dist/core/tree/pathTree.js +14 -2
  54. package/dist/core/tree/pathTree.js.map +1 -1
  55. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  56. package/dist/feature-libraries/chunked-forest/basicChunk.js +7 -0
  57. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  58. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  59. package/dist/feature-libraries/chunked-forest/chunkTree.js +4 -1
  60. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  61. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +2 -2
  62. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  63. package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  64. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  65. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +15 -7
  66. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
  67. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
  68. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
  69. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  70. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +90 -42
  71. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  72. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +234 -69
  73. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  74. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +4 -4
  75. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  76. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +33 -28
  77. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  78. package/dist/feature-libraries/default-schema/index.d.ts +2 -1
  79. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  80. package/dist/feature-libraries/default-schema/index.js +4 -2
  81. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  82. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +36 -0
  83. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +1 -0
  84. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +126 -0
  85. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +1 -0
  86. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +7 -6
  87. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  88. package/dist/feature-libraries/default-schema/mappedEditBuilder.js +15 -0
  89. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  90. package/dist/feature-libraries/deltaUtils.d.ts +1 -0
  91. package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
  92. package/dist/feature-libraries/deltaUtils.js +6 -1
  93. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  94. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +30 -8
  95. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  96. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +41 -11
  97. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  98. package/dist/feature-libraries/flex-tree/context.d.ts +9 -0
  99. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  100. package/dist/feature-libraries/flex-tree/context.js +6 -0
  101. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  102. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  103. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  104. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  105. package/dist/feature-libraries/flex-tree/lazyField.d.ts +8 -7
  106. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  107. package/dist/feature-libraries/flex-tree/lazyField.js +37 -8
  108. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  109. package/dist/feature-libraries/forest-summary/codec.d.ts +2 -2
  110. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  111. package/dist/feature-libraries/forest-summary/codec.js +4 -4
  112. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  113. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +9 -13
  114. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  115. package/dist/feature-libraries/forest-summary/forestSummarizer.js +22 -27
  116. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  117. package/dist/feature-libraries/forest-summary/format.d.ts +41 -5
  118. package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
  119. package/dist/feature-libraries/forest-summary/format.js +7 -7
  120. package/dist/feature-libraries/forest-summary/format.js.map +1 -1
  121. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +11 -9
  122. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  123. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +16 -29
  124. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  125. package/dist/feature-libraries/forest-summary/index.d.ts +2 -1
  126. package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
  127. package/dist/feature-libraries/forest-summary/index.js +3 -2
  128. package/dist/feature-libraries/forest-summary/index.js.map +1 -1
  129. package/dist/feature-libraries/forest-summary/summaryTypes.d.ts +47 -0
  130. package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
  131. package/dist/feature-libraries/forest-summary/summaryTypes.js +57 -0
  132. package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
  133. package/dist/feature-libraries/index.d.ts +5 -5
  134. package/dist/feature-libraries/index.d.ts.map +1 -1
  135. package/dist/feature-libraries/index.js +7 -4
  136. package/dist/feature-libraries/index.js.map +1 -1
  137. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  138. package/dist/feature-libraries/mapTreeCursor.js +1 -0
  139. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  140. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  141. package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
  142. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  143. package/dist/feature-libraries/modular-schema/comparison.d.ts +18 -2
  144. package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  145. package/dist/feature-libraries/modular-schema/comparison.js +54 -3
  146. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  147. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +97 -21
  148. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  149. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +4 -7
  150. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  151. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +20 -52
  152. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  153. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  154. package/dist/feature-libraries/modular-schema/fieldKind.d.ts +25 -13
  155. package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  156. package/dist/feature-libraries/modular-schema/fieldKind.js +0 -21
  157. package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  158. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  159. package/dist/feature-libraries/modular-schema/genericFieldKind.js +7 -10
  160. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  161. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +2 -2
  162. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  163. package/dist/feature-libraries/modular-schema/index.d.ts +5 -5
  164. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  165. package/dist/feature-libraries/modular-schema/index.js +12 -8
  166. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  167. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +17 -0
  168. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -0
  169. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +388 -0
  170. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -0
  171. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +17 -0
  172. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -0
  173. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +413 -0
  174. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -0
  175. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +4 -4
  176. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  177. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +8 -284
  178. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  179. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +48 -15
  180. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  181. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +1298 -465
  182. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  183. package/dist/feature-libraries/modular-schema/{modularChangeFormat.d.ts → modularChangeFormatV1.d.ts} +2 -2
  184. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -0
  185. package/dist/feature-libraries/modular-schema/{modularChangeFormat.js → modularChangeFormatV1.js} +5 -5
  186. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -0
  187. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +146 -0
  188. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -0
  189. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +32 -0
  190. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -0
  191. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +50 -10
  192. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  193. package/dist/feature-libraries/modular-schema/modularChangeTypes.js +24 -3
  194. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  195. package/dist/feature-libraries/optional-field/index.d.ts +2 -2
  196. package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
  197. package/dist/feature-libraries/optional-field/index.js +1 -2
  198. package/dist/feature-libraries/optional-field/index.js.map +1 -1
  199. package/dist/feature-libraries/optional-field/optionalField.d.ts +5 -26
  200. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  201. package/dist/feature-libraries/optional-field/optionalField.js +217 -451
  202. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  203. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +24 -33
  204. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  205. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  206. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  207. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  208. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +57 -28
  209. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  210. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +27 -8
  211. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  212. package/dist/feature-libraries/schema-index/schemaSummarizer.js +42 -16
  213. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  214. package/dist/feature-libraries/sequence-field/compose.d.ts +6 -7
  215. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  216. package/dist/feature-libraries/sequence-field/compose.js +80 -256
  217. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  218. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  219. package/dist/feature-libraries/sequence-field/formatV2.js +1 -0
  220. package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
  221. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +14 -10
  222. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  223. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  224. package/dist/feature-libraries/sequence-field/index.d.ts +2 -3
  225. package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
  226. package/dist/feature-libraries/sequence-field/index.js +1 -3
  227. package/dist/feature-libraries/sequence-field/index.js.map +1 -1
  228. package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
  229. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  230. package/dist/feature-libraries/sequence-field/invert.js +65 -167
  231. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  232. package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  233. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  234. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  235. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +4 -56
  236. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  237. package/dist/feature-libraries/sequence-field/moveEffectTable.js +7 -86
  238. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  239. package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
  240. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  241. package/dist/feature-libraries/sequence-field/rebase.js +106 -112
  242. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  243. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  244. package/dist/feature-libraries/sequence-field/replaceRevisions.js +16 -33
  245. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  246. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  247. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +0 -2
  248. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  249. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +22 -4
  250. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  251. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +358 -179
  252. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  253. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  254. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +20 -60
  255. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  256. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  257. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  258. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  259. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  260. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -2
  261. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  262. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +14 -109
  263. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  264. package/dist/feature-libraries/sequence-field/types.d.ts +30 -59
  265. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  266. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  267. package/dist/feature-libraries/sequence-field/utils.d.ts +15 -24
  268. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  269. package/dist/feature-libraries/sequence-field/utils.js +111 -299
  270. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  271. package/dist/feature-libraries/treeCompressionUtils.d.ts +2 -12
  272. package/dist/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
  273. package/dist/feature-libraries/treeCompressionUtils.js +4 -14
  274. package/dist/feature-libraries/treeCompressionUtils.js.map +1 -1
  275. package/dist/index.d.ts +3 -3
  276. package/dist/index.d.ts.map +1 -1
  277. package/dist/index.js +6 -3
  278. package/dist/index.js.map +1 -1
  279. package/dist/packageVersion.d.ts +1 -1
  280. package/dist/packageVersion.d.ts.map +1 -1
  281. package/dist/packageVersion.js +1 -1
  282. package/dist/packageVersion.js.map +1 -1
  283. package/dist/shared-tree/independentView.d.ts +1 -1
  284. package/dist/shared-tree/independentView.d.ts.map +1 -1
  285. package/dist/shared-tree/independentView.js.map +1 -1
  286. package/dist/shared-tree/index.d.ts +1 -1
  287. package/dist/shared-tree/index.d.ts.map +1 -1
  288. package/dist/shared-tree/index.js.map +1 -1
  289. package/dist/shared-tree/schematizeTree.d.ts +4 -4
  290. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  291. package/dist/shared-tree/schematizeTree.js +2 -1
  292. package/dist/shared-tree/schematizeTree.js.map +1 -1
  293. package/dist/shared-tree/schematizingTreeView.d.ts +1 -5
  294. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  295. package/dist/shared-tree/schematizingTreeView.js +32 -33
  296. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  297. package/dist/shared-tree/sharedTree.d.ts +18 -15
  298. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  299. package/dist/shared-tree/sharedTree.js +15 -4
  300. package/dist/shared-tree/sharedTree.js.map +1 -1
  301. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  302. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  303. package/dist/shared-tree/sharedTreeChangeCodecs.js +1 -0
  304. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  305. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +20 -8
  306. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  307. package/dist/shared-tree/sharedTreeChangeEnricher.js +25 -11
  308. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  309. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +6 -6
  310. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  311. package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
  312. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  313. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +16 -6
  314. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  315. package/dist/shared-tree/sharedTreeEditBuilder.js +13 -6
  316. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  317. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  318. package/dist/shared-tree/treeAlpha.js +1 -1
  319. package/dist/shared-tree/treeAlpha.js.map +1 -1
  320. package/dist/shared-tree/treeCheckout.d.ts +14 -12
  321. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  322. package/dist/shared-tree/treeCheckout.js +66 -17
  323. package/dist/shared-tree/treeCheckout.js.map +1 -1
  324. package/dist/shared-tree-core/branch.d.ts +3 -2
  325. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  326. package/dist/shared-tree-core/branch.js +4 -3
  327. package/dist/shared-tree-core/branch.js.map +1 -1
  328. package/dist/shared-tree-core/editManager.d.ts +2 -2
  329. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  330. package/dist/shared-tree-core/editManager.js +9 -9
  331. package/dist/shared-tree-core/editManager.js.map +1 -1
  332. package/dist/shared-tree-core/editManagerCodecs.d.ts +4 -0
  333. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  334. package/dist/shared-tree-core/editManagerCodecs.js +16 -6
  335. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  336. package/{lib/shared-tree-core/editManagerCodecsV5.d.ts → dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts} +3 -3
  337. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -0
  338. package/dist/shared-tree-core/{editManagerCodecsV5.js → editManagerCodecsVSharedBranches.js} +7 -7
  339. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -0
  340. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +20 -6
  341. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  342. package/dist/shared-tree-core/editManagerFormatCommons.js +22 -7
  343. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  344. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  345. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  346. package/dist/shared-tree-core/editManagerFormatV1toV4.js +1 -0
  347. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  348. package/dist/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts} +3 -3
  349. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -0
  350. package/dist/shared-tree-core/{editManagerFormatV5.js → editManagerFormatVSharedBranches.js} +2 -2
  351. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -0
  352. package/dist/shared-tree-core/editManagerSummarizer.d.ts +29 -9
  353. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  354. package/dist/shared-tree-core/editManagerSummarizer.js +41 -13
  355. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  356. package/dist/shared-tree-core/index.d.ts +5 -3
  357. package/dist/shared-tree-core/index.d.ts.map +1 -1
  358. package/dist/shared-tree-core/index.js +8 -1
  359. package/dist/shared-tree-core/index.js.map +1 -1
  360. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
  361. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  362. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  363. package/{lib/shared-tree-core/messageCodecV5.d.ts → dist/shared-tree-core/messageCodecVSharedBranches.d.ts} +2 -2
  364. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -0
  365. package/dist/shared-tree-core/{messageCodecV5.js → messageCodecVSharedBranches.js} +6 -6
  366. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -0
  367. package/dist/shared-tree-core/messageCodecs.d.ts +4 -0
  368. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  369. package/dist/shared-tree-core/messageCodecs.js +16 -6
  370. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  371. package/dist/shared-tree-core/messageFormat.d.ts +20 -6
  372. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  373. package/dist/shared-tree-core/messageFormat.js +22 -7
  374. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  375. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
  376. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  377. package/dist/shared-tree-core/messageFormatV1ToV4.js +8 -1
  378. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  379. package/dist/shared-tree-core/{messageFormatV5.d.ts → messageFormatVSharedBranches.d.ts} +5 -7
  380. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -0
  381. package/dist/shared-tree-core/{messageFormatV5.js → messageFormatVSharedBranches.js} +3 -2
  382. package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -0
  383. package/dist/shared-tree-core/sharedTreeCore.d.ts +14 -47
  384. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  385. package/dist/shared-tree-core/sharedTreeCore.js +30 -18
  386. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  387. package/dist/shared-tree-core/summaryTypes.d.ts +94 -0
  388. package/dist/shared-tree-core/summaryTypes.d.ts.map +1 -0
  389. package/dist/shared-tree-core/summaryTypes.js +47 -0
  390. package/dist/shared-tree-core/summaryTypes.js.map +1 -0
  391. package/dist/shared-tree-core/versionedSummarizer.d.ts +67 -0
  392. package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
  393. package/dist/shared-tree-core/versionedSummarizer.js +63 -0
  394. package/dist/shared-tree-core/versionedSummarizer.js.map +1 -0
  395. package/dist/simple-tree/api/configuration.d.ts +3 -26
  396. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  397. package/dist/simple-tree/api/configuration.js +10 -21
  398. package/dist/simple-tree/api/configuration.js.map +1 -1
  399. package/dist/simple-tree/api/dirtyIndex.d.ts +11 -0
  400. package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
  401. package/dist/simple-tree/api/dirtyIndex.js +7 -0
  402. package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
  403. package/dist/simple-tree/api/discrepancies.d.ts +1 -1
  404. package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
  405. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  406. package/dist/simple-tree/api/getSimpleSchema.d.ts +3 -3
  407. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  408. package/dist/simple-tree/api/getSimpleSchema.js +9 -3
  409. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  410. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +16 -13
  411. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  412. package/dist/simple-tree/api/incrementalAllowedTypes.js +24 -14
  413. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  414. package/dist/simple-tree/api/index.d.ts +4 -5
  415. package/dist/simple-tree/api/index.d.ts.map +1 -1
  416. package/dist/simple-tree/api/index.js +5 -6
  417. package/dist/simple-tree/api/index.js.map +1 -1
  418. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
  419. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  420. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  421. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
  422. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  423. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  424. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  425. package/dist/simple-tree/api/schemaFactoryRecursive.js +0 -1
  426. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  427. package/dist/simple-tree/api/schemaFromSimple.d.ts +6 -1
  428. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  429. package/dist/simple-tree/api/schemaFromSimple.js +5 -0
  430. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  431. package/dist/simple-tree/api/schemaStatics.d.ts +12 -12
  432. package/dist/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
  433. package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
  434. package/dist/simple-tree/api/simpleSchemaCodec.js +18 -6
  435. package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  436. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  437. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  438. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  439. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
  440. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  441. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +13 -8
  442. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  443. package/dist/simple-tree/api/tree.d.ts +1 -1
  444. package/dist/simple-tree/api/tree.js.map +1 -1
  445. package/dist/simple-tree/api/typesUnsafe.d.ts +3 -3
  446. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  447. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  448. package/dist/simple-tree/core/allowedTypes.d.ts +2 -2
  449. package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
  450. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  451. package/dist/simple-tree/core/index.d.ts +1 -1
  452. package/dist/simple-tree/core/index.d.ts.map +1 -1
  453. package/dist/simple-tree/core/index.js +2 -3
  454. package/dist/simple-tree/core/index.js.map +1 -1
  455. package/dist/simple-tree/core/toStored.d.ts +17 -15
  456. package/dist/simple-tree/core/toStored.d.ts.map +1 -1
  457. package/dist/simple-tree/core/toStored.js +5 -40
  458. package/dist/simple-tree/core/toStored.js.map +1 -1
  459. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  460. package/dist/simple-tree/core/treeNodeKernel.js +1 -0
  461. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  462. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +15 -15
  463. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  464. package/dist/simple-tree/core/unhydratedFlexTree.js +59 -8
  465. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  466. package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
  467. package/dist/simple-tree/core/walkSchema.js +4 -0
  468. package/dist/simple-tree/core/walkSchema.js.map +1 -1
  469. package/dist/simple-tree/createContext.d.ts.map +1 -1
  470. package/dist/simple-tree/createContext.js +20 -5
  471. package/dist/simple-tree/createContext.js.map +1 -1
  472. package/dist/simple-tree/fieldSchema.d.ts +7 -7
  473. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  474. package/dist/simple-tree/fieldSchema.js.map +1 -1
  475. package/dist/simple-tree/index.d.ts +8 -7
  476. package/dist/simple-tree/index.d.ts.map +1 -1
  477. package/dist/simple-tree/index.js +16 -13
  478. package/dist/simple-tree/index.js.map +1 -1
  479. package/dist/simple-tree/leafNodeSchema.d.ts +5 -5
  480. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  481. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  482. package/dist/simple-tree/node-kinds/array/arrayNode.js +6 -3
  483. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  484. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +3 -3
  485. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  486. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  487. package/dist/simple-tree/node-kinds/common.d.ts.map +1 -1
  488. package/dist/simple-tree/node-kinds/common.js +1 -1
  489. package/dist/simple-tree/node-kinds/common.js.map +1 -1
  490. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  491. package/dist/simple-tree/node-kinds/map/mapNode.js +2 -2
  492. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  493. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +3 -3
  494. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  495. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  496. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  497. package/dist/simple-tree/node-kinds/object/objectNode.js +19 -18
  498. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  499. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +2 -2
  500. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  501. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  502. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  503. package/dist/simple-tree/node-kinds/record/recordNode.js +4 -2
  504. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  505. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -3
  506. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  507. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  508. package/dist/simple-tree/prepareForInsertion.d.ts +54 -47
  509. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  510. package/dist/simple-tree/prepareForInsertion.js +183 -125
  511. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  512. package/dist/simple-tree/simpleSchema.d.ts +55 -23
  513. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  514. package/dist/simple-tree/simpleSchema.js +17 -0
  515. package/dist/simple-tree/simpleSchema.js.map +1 -1
  516. package/dist/simple-tree/simpleSchemaFormatV1.d.ts +1 -1
  517. package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
  518. package/dist/simple-tree/simpleSchemaFormatV1.js +8 -1
  519. package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  520. package/dist/simple-tree/toStoredSchema.d.ts +58 -11
  521. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  522. package/dist/simple-tree/toStoredSchema.js +205 -30
  523. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  524. package/dist/simple-tree/treeSchema.d.ts +23 -0
  525. package/dist/simple-tree/treeSchema.d.ts.map +1 -0
  526. package/dist/simple-tree/treeSchema.js +25 -0
  527. package/dist/simple-tree/treeSchema.js.map +1 -0
  528. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +13 -4
  529. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  530. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +29 -11
  531. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  532. package/dist/tableSchema.d.ts +117 -63
  533. package/dist/tableSchema.d.ts.map +1 -1
  534. package/dist/tableSchema.js +159 -58
  535. package/dist/tableSchema.js.map +1 -1
  536. package/dist/treeFactory.d.ts +5 -0
  537. package/dist/treeFactory.d.ts.map +1 -1
  538. package/dist/treeFactory.js +29 -8
  539. package/dist/treeFactory.js.map +1 -1
  540. package/dist/util/breakable.js +3 -3
  541. package/dist/util/breakable.js.map +1 -1
  542. package/dist/util/index.d.ts +2 -1
  543. package/dist/util/index.d.ts.map +1 -1
  544. package/dist/util/index.js +4 -1
  545. package/dist/util/index.js.map +1 -1
  546. package/dist/util/rangeMap.d.ts +24 -12
  547. package/dist/util/rangeMap.d.ts.map +1 -1
  548. package/dist/util/rangeMap.js +46 -6
  549. package/dist/util/rangeMap.js.map +1 -1
  550. package/dist/util/readSnapshotBlob.d.ts +13 -0
  551. package/dist/util/readSnapshotBlob.d.ts.map +1 -0
  552. package/dist/util/readSnapshotBlob.js +18 -0
  553. package/dist/util/readSnapshotBlob.js.map +1 -0
  554. package/dist/util/typeCheckTests.d.ts.map +1 -1
  555. package/dist/util/typeCheckTests.js.map +1 -1
  556. package/lib/alpha.d.ts +7 -2
  557. package/lib/codec/codec.d.ts +14 -1
  558. package/lib/codec/codec.d.ts.map +1 -1
  559. package/lib/codec/codec.js +11 -0
  560. package/lib/codec/codec.js.map +1 -1
  561. package/lib/codec/versioned/codec.d.ts +1 -1
  562. package/lib/codec/versioned/codec.d.ts.map +1 -1
  563. package/lib/codec/versioned/codec.js.map +1 -1
  564. package/lib/codec/versioned/format.d.ts +4 -1
  565. package/lib/codec/versioned/format.d.ts.map +1 -1
  566. package/lib/codec/versioned/format.js +4 -1
  567. package/lib/codec/versioned/format.js.map +1 -1
  568. package/lib/core/change-family/changeFamily.d.ts +4 -1
  569. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  570. package/lib/core/change-family/changeFamily.js.map +1 -1
  571. package/lib/core/change-family/index.d.ts +1 -1
  572. package/lib/core/change-family/index.d.ts.map +1 -1
  573. package/lib/core/change-family/index.js.map +1 -1
  574. package/lib/core/index.d.ts +3 -3
  575. package/lib/core/index.d.ts.map +1 -1
  576. package/lib/core/index.js +2 -2
  577. package/lib/core/index.js.map +1 -1
  578. package/lib/core/rebase/changeRebaser.d.ts +6 -1
  579. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  580. package/lib/core/rebase/changeRebaser.js.map +1 -1
  581. package/lib/core/rebase/index.d.ts +1 -1
  582. package/lib/core/rebase/index.d.ts.map +1 -1
  583. package/lib/core/rebase/index.js +1 -1
  584. package/lib/core/rebase/index.js.map +1 -1
  585. package/lib/core/rebase/types.d.ts +2 -1
  586. package/lib/core/rebase/types.d.ts.map +1 -1
  587. package/lib/core/rebase/types.js +3 -0
  588. package/lib/core/rebase/types.js.map +1 -1
  589. package/lib/core/rebase/utils.d.ts.map +1 -1
  590. package/lib/core/rebase/utils.js +25 -7
  591. package/lib/core/rebase/utils.js.map +1 -1
  592. package/lib/core/tree/detachedFieldIndex.d.ts +40 -13
  593. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  594. package/lib/core/tree/detachedFieldIndex.js +22 -13
  595. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  596. package/lib/core/tree/index.d.ts +4 -3
  597. package/lib/core/tree/index.d.ts.map +1 -1
  598. package/lib/core/tree/index.js +3 -2
  599. package/lib/core/tree/index.js.map +1 -1
  600. package/lib/core/tree/pathTree.d.ts +11 -3
  601. package/lib/core/tree/pathTree.d.ts.map +1 -1
  602. package/lib/core/tree/pathTree.js +12 -1
  603. package/lib/core/tree/pathTree.js.map +1 -1
  604. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  605. package/lib/feature-libraries/chunked-forest/basicChunk.js +8 -1
  606. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  607. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  608. package/lib/feature-libraries/chunked-forest/chunkTree.js +4 -1
  609. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  610. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +2 -2
  611. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  612. package/lib/feature-libraries/chunked-forest/codec/codecs.js +2 -2
  613. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  614. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +15 -7
  615. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
  616. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
  617. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
  618. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  619. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +90 -42
  620. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  621. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +232 -69
  622. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  623. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +4 -4
  624. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  625. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +34 -29
  626. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  627. package/lib/feature-libraries/default-schema/index.d.ts +2 -1
  628. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  629. package/lib/feature-libraries/default-schema/index.js +2 -1
  630. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  631. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +36 -0
  632. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +1 -0
  633. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +122 -0
  634. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +1 -0
  635. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +7 -6
  636. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  637. package/lib/feature-libraries/default-schema/mappedEditBuilder.js +15 -0
  638. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  639. package/lib/feature-libraries/deltaUtils.d.ts +1 -0
  640. package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
  641. package/lib/feature-libraries/deltaUtils.js +5 -1
  642. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  643. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +30 -8
  644. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  645. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +38 -8
  646. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  647. package/lib/feature-libraries/flex-tree/context.d.ts +9 -0
  648. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  649. package/lib/feature-libraries/flex-tree/context.js +6 -0
  650. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  651. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  652. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  653. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  654. package/lib/feature-libraries/flex-tree/lazyField.d.ts +8 -7
  655. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  656. package/lib/feature-libraries/flex-tree/lazyField.js +38 -9
  657. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  658. package/lib/feature-libraries/forest-summary/codec.d.ts +2 -2
  659. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  660. package/lib/feature-libraries/forest-summary/codec.js +5 -5
  661. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  662. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +9 -13
  663. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  664. package/lib/feature-libraries/forest-summary/forestSummarizer.js +19 -24
  665. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  666. package/lib/feature-libraries/forest-summary/format.d.ts +41 -5
  667. package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
  668. package/lib/feature-libraries/forest-summary/format.js +3 -3
  669. package/lib/feature-libraries/forest-summary/format.js.map +1 -1
  670. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +11 -9
  671. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  672. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +13 -26
  673. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  674. package/lib/feature-libraries/forest-summary/index.d.ts +2 -1
  675. package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
  676. package/lib/feature-libraries/forest-summary/index.js +2 -1
  677. package/lib/feature-libraries/forest-summary/index.js.map +1 -1
  678. package/lib/feature-libraries/forest-summary/summaryTypes.d.ts +47 -0
  679. package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
  680. package/lib/feature-libraries/forest-summary/summaryTypes.js +53 -0
  681. package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
  682. package/lib/feature-libraries/index.d.ts +5 -5
  683. package/lib/feature-libraries/index.d.ts.map +1 -1
  684. package/lib/feature-libraries/index.js +4 -4
  685. package/lib/feature-libraries/index.js.map +1 -1
  686. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  687. package/lib/feature-libraries/mapTreeCursor.js +2 -1
  688. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  689. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  690. package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
  691. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  692. package/lib/feature-libraries/modular-schema/comparison.d.ts +18 -2
  693. package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  694. package/lib/feature-libraries/modular-schema/comparison.js +55 -5
  695. package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
  696. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +97 -21
  697. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  698. package/lib/feature-libraries/modular-schema/crossFieldQueries.js +3 -5
  699. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  700. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +20 -52
  701. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  702. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  703. package/lib/feature-libraries/modular-schema/fieldKind.d.ts +25 -13
  704. package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  705. package/lib/feature-libraries/modular-schema/fieldKind.js +0 -21
  706. package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  707. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  708. package/lib/feature-libraries/modular-schema/genericFieldKind.js +7 -10
  709. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  710. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js +1 -1
  711. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  712. package/lib/feature-libraries/modular-schema/index.d.ts +5 -5
  713. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  714. package/lib/feature-libraries/modular-schema/index.js +4 -3
  715. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  716. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +17 -0
  717. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -0
  718. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +384 -0
  719. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -0
  720. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +17 -0
  721. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -0
  722. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +409 -0
  723. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -0
  724. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +4 -4
  725. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  726. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +10 -286
  727. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  728. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +48 -15
  729. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  730. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +1284 -458
  731. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  732. package/lib/feature-libraries/modular-schema/{modularChangeFormat.d.ts → modularChangeFormatV1.d.ts} +2 -2
  733. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -0
  734. package/lib/feature-libraries/modular-schema/{modularChangeFormat.js → modularChangeFormatV1.js} +2 -2
  735. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -0
  736. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +146 -0
  737. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -0
  738. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +29 -0
  739. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -0
  740. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +50 -10
  741. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  742. package/lib/feature-libraries/modular-schema/modularChangeTypes.js +20 -2
  743. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  744. package/lib/feature-libraries/optional-field/index.d.ts +2 -2
  745. package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
  746. package/lib/feature-libraries/optional-field/index.js +1 -1
  747. package/lib/feature-libraries/optional-field/index.js.map +1 -1
  748. package/lib/feature-libraries/optional-field/optionalField.d.ts +5 -26
  749. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  750. package/lib/feature-libraries/optional-field/optionalField.js +217 -449
  751. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  752. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +24 -33
  753. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  754. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  755. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  756. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  757. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +55 -26
  758. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  759. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +27 -8
  760. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  761. package/lib/feature-libraries/schema-index/schemaSummarizer.js +38 -12
  762. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  763. package/lib/feature-libraries/sequence-field/compose.d.ts +6 -7
  764. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  765. package/lib/feature-libraries/sequence-field/compose.js +82 -258
  766. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  767. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  768. package/lib/feature-libraries/sequence-field/formatV2.js +1 -0
  769. package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
  770. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +14 -10
  771. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  772. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  773. package/lib/feature-libraries/sequence-field/index.d.ts +2 -3
  774. package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
  775. package/lib/feature-libraries/sequence-field/index.js +0 -1
  776. package/lib/feature-libraries/sequence-field/index.js.map +1 -1
  777. package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
  778. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  779. package/lib/feature-libraries/sequence-field/invert.js +67 -169
  780. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  781. package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  782. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  783. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  784. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +4 -56
  785. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  786. package/lib/feature-libraries/sequence-field/moveEffectTable.js +6 -80
  787. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  788. package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
  789. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  790. package/lib/feature-libraries/sequence-field/rebase.js +108 -114
  791. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  792. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  793. package/lib/feature-libraries/sequence-field/replaceRevisions.js +16 -33
  794. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  795. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  796. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +0 -2
  797. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  798. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +22 -4
  799. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  800. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +350 -175
  801. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  802. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  803. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +21 -61
  804. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  805. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  806. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  807. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  808. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  809. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -2
  810. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  811. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +14 -109
  812. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  813. package/lib/feature-libraries/sequence-field/types.d.ts +30 -59
  814. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  815. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  816. package/lib/feature-libraries/sequence-field/utils.d.ts +15 -24
  817. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  818. package/lib/feature-libraries/sequence-field/utils.js +107 -292
  819. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  820. package/lib/feature-libraries/treeCompressionUtils.d.ts +2 -12
  821. package/lib/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
  822. package/lib/feature-libraries/treeCompressionUtils.js +3 -13
  823. package/lib/feature-libraries/treeCompressionUtils.js.map +1 -1
  824. package/lib/index.d.ts +3 -3
  825. package/lib/index.d.ts.map +1 -1
  826. package/lib/index.js +2 -2
  827. package/lib/index.js.map +1 -1
  828. package/lib/packageVersion.d.ts +1 -1
  829. package/lib/packageVersion.d.ts.map +1 -1
  830. package/lib/packageVersion.js +1 -1
  831. package/lib/packageVersion.js.map +1 -1
  832. package/lib/shared-tree/independentView.d.ts +1 -1
  833. package/lib/shared-tree/independentView.d.ts.map +1 -1
  834. package/lib/shared-tree/independentView.js.map +1 -1
  835. package/lib/shared-tree/index.d.ts +1 -1
  836. package/lib/shared-tree/index.d.ts.map +1 -1
  837. package/lib/shared-tree/index.js.map +1 -1
  838. package/lib/shared-tree/schematizeTree.d.ts +4 -4
  839. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  840. package/lib/shared-tree/schematizeTree.js +3 -2
  841. package/lib/shared-tree/schematizeTree.js.map +1 -1
  842. package/lib/shared-tree/schematizingTreeView.d.ts +1 -5
  843. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  844. package/lib/shared-tree/schematizingTreeView.js +35 -36
  845. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  846. package/lib/shared-tree/sharedTree.d.ts +18 -15
  847. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  848. package/lib/shared-tree/sharedTree.js +15 -4
  849. package/lib/shared-tree/sharedTree.js.map +1 -1
  850. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  851. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  852. package/lib/shared-tree/sharedTreeChangeCodecs.js +1 -0
  853. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  854. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +20 -8
  855. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  856. package/lib/shared-tree/sharedTreeChangeEnricher.js +25 -11
  857. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  858. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +6 -6
  859. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  860. package/lib/shared-tree/sharedTreeChangeFamily.js +3 -3
  861. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  862. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +16 -6
  863. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  864. package/lib/shared-tree/sharedTreeEditBuilder.js +11 -5
  865. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  866. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  867. package/lib/shared-tree/treeAlpha.js +2 -2
  868. package/lib/shared-tree/treeAlpha.js.map +1 -1
  869. package/lib/shared-tree/treeCheckout.d.ts +14 -12
  870. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  871. package/lib/shared-tree/treeCheckout.js +69 -20
  872. package/lib/shared-tree/treeCheckout.js.map +1 -1
  873. package/lib/shared-tree-core/branch.d.ts +3 -2
  874. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  875. package/lib/shared-tree-core/branch.js +4 -3
  876. package/lib/shared-tree-core/branch.js.map +1 -1
  877. package/lib/shared-tree-core/editManager.d.ts +2 -2
  878. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  879. package/lib/shared-tree-core/editManager.js +9 -9
  880. package/lib/shared-tree-core/editManager.js.map +1 -1
  881. package/lib/shared-tree-core/editManagerCodecs.d.ts +4 -0
  882. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  883. package/lib/shared-tree-core/editManagerCodecs.js +14 -5
  884. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  885. package/{dist/shared-tree-core/editManagerCodecsV5.d.ts → lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts} +3 -3
  886. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -0
  887. package/lib/shared-tree-core/{editManagerCodecsV5.js → editManagerCodecsVSharedBranches.js} +4 -4
  888. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -0
  889. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +20 -6
  890. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  891. package/lib/shared-tree-core/editManagerFormatCommons.js +22 -7
  892. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  893. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  894. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  895. package/lib/shared-tree-core/editManagerFormatV1toV4.js +1 -0
  896. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  897. package/lib/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts} +3 -3
  898. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -0
  899. package/lib/shared-tree-core/{editManagerFormatV5.js → editManagerFormatVSharedBranches.js} +2 -2
  900. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -0
  901. package/lib/shared-tree-core/editManagerSummarizer.d.ts +29 -9
  902. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  903. package/lib/shared-tree-core/editManagerSummarizer.js +39 -11
  904. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  905. package/lib/shared-tree-core/index.d.ts +5 -3
  906. package/lib/shared-tree-core/index.d.ts.map +1 -1
  907. package/lib/shared-tree-core/index.js +4 -2
  908. package/lib/shared-tree-core/index.js.map +1 -1
  909. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
  910. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  911. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  912. package/{dist/shared-tree-core/messageCodecV5.d.ts → lib/shared-tree-core/messageCodecVSharedBranches.d.ts} +2 -2
  913. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -0
  914. package/lib/shared-tree-core/{messageCodecV5.js → messageCodecVSharedBranches.js} +3 -3
  915. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -0
  916. package/lib/shared-tree-core/messageCodecs.d.ts +4 -0
  917. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  918. package/lib/shared-tree-core/messageCodecs.js +14 -5
  919. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  920. package/lib/shared-tree-core/messageFormat.d.ts +20 -6
  921. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  922. package/lib/shared-tree-core/messageFormat.js +22 -7
  923. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  924. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
  925. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  926. package/lib/shared-tree-core/messageFormatV1ToV4.js +8 -1
  927. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  928. package/lib/shared-tree-core/{messageFormatV5.d.ts → messageFormatVSharedBranches.d.ts} +5 -7
  929. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -0
  930. package/lib/shared-tree-core/{messageFormatV5.js → messageFormatVSharedBranches.js} +3 -2
  931. package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -0
  932. package/lib/shared-tree-core/sharedTreeCore.d.ts +14 -47
  933. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  934. package/lib/shared-tree-core/sharedTreeCore.js +28 -16
  935. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  936. package/lib/shared-tree-core/summaryTypes.d.ts +94 -0
  937. package/lib/shared-tree-core/summaryTypes.d.ts.map +1 -0
  938. package/lib/shared-tree-core/summaryTypes.js +43 -0
  939. package/lib/shared-tree-core/summaryTypes.js.map +1 -0
  940. package/lib/shared-tree-core/versionedSummarizer.d.ts +67 -0
  941. package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
  942. package/lib/shared-tree-core/versionedSummarizer.js +59 -0
  943. package/lib/shared-tree-core/versionedSummarizer.js.map +1 -0
  944. package/lib/simple-tree/api/configuration.d.ts +3 -26
  945. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  946. package/lib/simple-tree/api/configuration.js +14 -25
  947. package/lib/simple-tree/api/configuration.js.map +1 -1
  948. package/lib/simple-tree/api/dirtyIndex.d.ts +11 -0
  949. package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
  950. package/lib/simple-tree/api/dirtyIndex.js +7 -0
  951. package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
  952. package/lib/simple-tree/api/discrepancies.d.ts +1 -1
  953. package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
  954. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  955. package/lib/simple-tree/api/getSimpleSchema.d.ts +3 -3
  956. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  957. package/lib/simple-tree/api/getSimpleSchema.js +9 -3
  958. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
  959. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +16 -13
  960. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  961. package/lib/simple-tree/api/incrementalAllowedTypes.js +23 -13
  962. package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  963. package/lib/simple-tree/api/index.d.ts +4 -5
  964. package/lib/simple-tree/api/index.d.ts.map +1 -1
  965. package/lib/simple-tree/api/index.js +3 -4
  966. package/lib/simple-tree/api/index.js.map +1 -1
  967. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
  968. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  969. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  970. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
  971. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  972. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  973. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  974. package/lib/simple-tree/api/schemaFactoryRecursive.js +0 -1
  975. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  976. package/lib/simple-tree/api/schemaFromSimple.d.ts +6 -1
  977. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  978. package/lib/simple-tree/api/schemaFromSimple.js +5 -0
  979. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  980. package/lib/simple-tree/api/schemaStatics.d.ts +12 -12
  981. package/lib/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
  982. package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
  983. package/lib/simple-tree/api/simpleSchemaCodec.js +15 -3
  984. package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  985. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  986. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  987. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  988. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
  989. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  990. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +15 -10
  991. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  992. package/lib/simple-tree/api/tree.d.ts +1 -1
  993. package/lib/simple-tree/api/tree.js.map +1 -1
  994. package/lib/simple-tree/api/typesUnsafe.d.ts +3 -3
  995. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  996. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  997. package/lib/simple-tree/core/allowedTypes.d.ts +2 -2
  998. package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
  999. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  1000. package/lib/simple-tree/core/index.d.ts +1 -1
  1001. package/lib/simple-tree/core/index.d.ts.map +1 -1
  1002. package/lib/simple-tree/core/index.js +1 -1
  1003. package/lib/simple-tree/core/index.js.map +1 -1
  1004. package/lib/simple-tree/core/toStored.d.ts +17 -15
  1005. package/lib/simple-tree/core/toStored.d.ts.map +1 -1
  1006. package/lib/simple-tree/core/toStored.js +4 -37
  1007. package/lib/simple-tree/core/toStored.js.map +1 -1
  1008. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  1009. package/lib/simple-tree/core/treeNodeKernel.js +1 -0
  1010. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  1011. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +15 -15
  1012. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  1013. package/lib/simple-tree/core/unhydratedFlexTree.js +58 -8
  1014. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  1015. package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
  1016. package/lib/simple-tree/core/walkSchema.js +5 -1
  1017. package/lib/simple-tree/core/walkSchema.js.map +1 -1
  1018. package/lib/simple-tree/createContext.d.ts.map +1 -1
  1019. package/lib/simple-tree/createContext.js +20 -5
  1020. package/lib/simple-tree/createContext.js.map +1 -1
  1021. package/lib/simple-tree/fieldSchema.d.ts +7 -7
  1022. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  1023. package/lib/simple-tree/fieldSchema.js.map +1 -1
  1024. package/lib/simple-tree/index.d.ts +8 -7
  1025. package/lib/simple-tree/index.d.ts.map +1 -1
  1026. package/lib/simple-tree/index.js +6 -5
  1027. package/lib/simple-tree/index.js.map +1 -1
  1028. package/lib/simple-tree/leafNodeSchema.d.ts +5 -5
  1029. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  1030. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  1031. package/lib/simple-tree/node-kinds/array/arrayNode.js +7 -4
  1032. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  1033. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +3 -3
  1034. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  1035. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  1036. package/lib/simple-tree/node-kinds/common.d.ts.map +1 -1
  1037. package/lib/simple-tree/node-kinds/common.js +2 -2
  1038. package/lib/simple-tree/node-kinds/common.js.map +1 -1
  1039. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  1040. package/lib/simple-tree/node-kinds/map/mapNode.js +2 -2
  1041. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  1042. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +3 -3
  1043. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  1044. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  1045. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  1046. package/lib/simple-tree/node-kinds/object/objectNode.js +20 -19
  1047. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  1048. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +2 -2
  1049. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  1050. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  1051. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  1052. package/lib/simple-tree/node-kinds/record/recordNode.js +4 -2
  1053. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  1054. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -3
  1055. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  1056. package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  1057. package/lib/simple-tree/prepareForInsertion.d.ts +54 -47
  1058. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  1059. package/lib/simple-tree/prepareForInsertion.js +183 -124
  1060. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  1061. package/lib/simple-tree/simpleSchema.d.ts +55 -23
  1062. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  1063. package/lib/simple-tree/simpleSchema.js +16 -1
  1064. package/lib/simple-tree/simpleSchema.js.map +1 -1
  1065. package/lib/simple-tree/simpleSchemaFormatV1.d.ts +1 -1
  1066. package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
  1067. package/lib/simple-tree/simpleSchemaFormatV1.js +8 -1
  1068. package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  1069. package/lib/simple-tree/toStoredSchema.d.ts +58 -11
  1070. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  1071. package/lib/simple-tree/toStoredSchema.js +204 -31
  1072. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  1073. package/lib/simple-tree/treeSchema.d.ts +23 -0
  1074. package/lib/simple-tree/treeSchema.d.ts.map +1 -0
  1075. package/lib/simple-tree/treeSchema.js +21 -0
  1076. package/lib/simple-tree/treeSchema.js.map +1 -0
  1077. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +13 -4
  1078. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  1079. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +26 -9
  1080. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  1081. package/lib/tableSchema.d.ts +117 -63
  1082. package/lib/tableSchema.d.ts.map +1 -1
  1083. package/lib/tableSchema.js +160 -59
  1084. package/lib/tableSchema.js.map +1 -1
  1085. package/lib/treeFactory.d.ts +5 -0
  1086. package/lib/treeFactory.d.ts.map +1 -1
  1087. package/lib/treeFactory.js +28 -8
  1088. package/lib/treeFactory.js.map +1 -1
  1089. package/lib/util/breakable.js +3 -3
  1090. package/lib/util/breakable.js.map +1 -1
  1091. package/lib/util/index.d.ts +2 -1
  1092. package/lib/util/index.d.ts.map +1 -1
  1093. package/lib/util/index.js +2 -1
  1094. package/lib/util/index.js.map +1 -1
  1095. package/lib/util/rangeMap.d.ts +24 -12
  1096. package/lib/util/rangeMap.d.ts.map +1 -1
  1097. package/lib/util/rangeMap.js +44 -5
  1098. package/lib/util/rangeMap.js.map +1 -1
  1099. package/lib/util/readSnapshotBlob.d.ts +13 -0
  1100. package/lib/util/readSnapshotBlob.d.ts.map +1 -0
  1101. package/lib/util/readSnapshotBlob.js +14 -0
  1102. package/lib/util/readSnapshotBlob.js.map +1 -0
  1103. package/lib/util/typeCheckTests.d.ts.map +1 -1
  1104. package/lib/util/typeCheckTests.js.map +1 -1
  1105. package/package.json +22 -22
  1106. package/src/codec/codec.ts +15 -1
  1107. package/src/codec/versioned/codec.ts +1 -1
  1108. package/src/codec/versioned/format.ts +4 -1
  1109. package/src/core/change-family/changeFamily.ts +5 -0
  1110. package/src/core/change-family/index.ts +1 -0
  1111. package/src/core/index.ts +7 -2
  1112. package/src/core/rebase/changeRebaser.ts +6 -1
  1113. package/src/core/rebase/index.ts +1 -0
  1114. package/src/core/rebase/types.ts +8 -1
  1115. package/src/core/rebase/utils.ts +31 -7
  1116. package/src/core/tree/detachedFieldIndex.ts +71 -14
  1117. package/src/core/tree/index.ts +9 -3
  1118. package/src/core/tree/pathTree.ts +16 -4
  1119. package/src/feature-libraries/chunked-forest/basicChunk.ts +7 -1
  1120. package/src/feature-libraries/chunked-forest/chunkTree.ts +6 -1
  1121. package/src/feature-libraries/chunked-forest/codec/codecs.ts +3 -7
  1122. package/src/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.ts +18 -11
  1123. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +9 -9
  1124. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +393 -127
  1125. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +35 -38
  1126. package/src/feature-libraries/default-schema/index.ts +16 -5
  1127. package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +180 -0
  1128. package/src/feature-libraries/default-schema/mappedEditBuilder.ts +35 -9
  1129. package/src/feature-libraries/deltaUtils.ts +6 -1
  1130. package/src/feature-libraries/detachedFieldIndexSummarizer.ts +62 -15
  1131. package/src/feature-libraries/flex-tree/context.ts +17 -0
  1132. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +7 -8
  1133. package/src/feature-libraries/flex-tree/lazyField.ts +66 -24
  1134. package/src/feature-libraries/forest-summary/codec.ts +8 -8
  1135. package/src/feature-libraries/forest-summary/forestSummarizer.ts +47 -39
  1136. package/src/feature-libraries/forest-summary/format.ts +4 -4
  1137. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +23 -39
  1138. package/src/feature-libraries/forest-summary/index.ts +2 -1
  1139. package/src/feature-libraries/forest-summary/summaryTypes.ts +61 -0
  1140. package/src/feature-libraries/index.ts +23 -14
  1141. package/src/feature-libraries/mapTreeCursor.ts +2 -1
  1142. package/src/feature-libraries/mitigatedChangeFamily.ts +3 -1
  1143. package/src/feature-libraries/modular-schema/comparison.ts +63 -5
  1144. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +142 -44
  1145. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +36 -57
  1146. package/src/feature-libraries/modular-schema/fieldKind.ts +24 -40
  1147. package/src/feature-libraries/modular-schema/genericFieldKind.ts +10 -19
  1148. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -1
  1149. package/src/feature-libraries/modular-schema/index.ts +21 -15
  1150. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +732 -0
  1151. package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +790 -0
  1152. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +32 -505
  1153. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2542 -742
  1154. package/src/feature-libraries/modular-schema/{modularChangeFormat.ts → modularChangeFormatV1.ts} +2 -1
  1155. package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +62 -0
  1156. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +98 -10
  1157. package/src/feature-libraries/optional-field/index.ts +1 -3
  1158. package/src/feature-libraries/optional-field/optionalField.ts +317 -574
  1159. package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +24 -38
  1160. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +89 -35
  1161. package/src/feature-libraries/schema-index/schemaSummarizer.ts +59 -18
  1162. package/src/feature-libraries/sequence-field/compose.ts +134 -519
  1163. package/src/feature-libraries/sequence-field/formatV2.ts +1 -0
  1164. package/src/feature-libraries/sequence-field/helperTypes.ts +34 -19
  1165. package/src/feature-libraries/sequence-field/index.ts +0 -9
  1166. package/src/feature-libraries/sequence-field/invert.ts +103 -228
  1167. package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
  1168. package/src/feature-libraries/sequence-field/moveEffectTable.ts +8 -191
  1169. package/src/feature-libraries/sequence-field/rebase.ts +168 -203
  1170. package/src/feature-libraries/sequence-field/replaceRevisions.ts +31 -52
  1171. package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +0 -2
  1172. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +643 -220
  1173. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +56 -68
  1174. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +25 -27
  1175. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +19 -129
  1176. package/src/feature-libraries/sequence-field/types.ts +34 -64
  1177. package/src/feature-libraries/sequence-field/utils.ts +133 -346
  1178. package/src/feature-libraries/treeCompressionUtils.ts +1 -15
  1179. package/src/index.ts +7 -2
  1180. package/src/packageVersion.ts +1 -1
  1181. package/src/shared-tree/independentView.ts +1 -1
  1182. package/src/shared-tree/index.ts +3 -2
  1183. package/src/shared-tree/schematizeTree.ts +21 -8
  1184. package/src/shared-tree/schematizingTreeView.ts +50 -68
  1185. package/src/shared-tree/sharedTree.ts +51 -30
  1186. package/src/shared-tree/sharedTreeChangeCodecs.ts +5 -1
  1187. package/src/shared-tree/sharedTreeChangeEnricher.ts +31 -11
  1188. package/src/shared-tree/sharedTreeChangeFamily.ts +9 -6
  1189. package/src/shared-tree/sharedTreeEditBuilder.ts +46 -12
  1190. package/src/shared-tree/treeAlpha.ts +2 -3
  1191. package/src/shared-tree/treeCheckout.ts +106 -33
  1192. package/src/shared-tree-core/branch.ts +8 -2
  1193. package/src/shared-tree-core/editManager.ts +16 -2
  1194. package/src/shared-tree-core/editManagerCodecs.ts +17 -5
  1195. package/src/shared-tree-core/{editManagerCodecsV5.ts → editManagerCodecsVSharedBranches.ts} +3 -3
  1196. package/src/shared-tree-core/editManagerFormatCommons.ts +22 -7
  1197. package/src/shared-tree-core/editManagerFormatV1toV4.ts +3 -1
  1198. package/src/shared-tree-core/{editManagerFormatV5.ts → editManagerFormatVSharedBranches.ts} +2 -2
  1199. package/src/shared-tree-core/editManagerSummarizer.ts +58 -16
  1200. package/src/shared-tree-core/index.ts +11 -3
  1201. package/src/shared-tree-core/messageCodecV1ToV4.ts +2 -1
  1202. package/src/shared-tree-core/{messageCodecV5.ts → messageCodecVSharedBranches.ts} +3 -3
  1203. package/src/shared-tree-core/messageCodecs.ts +17 -5
  1204. package/src/shared-tree-core/messageFormat.ts +22 -7
  1205. package/src/shared-tree-core/messageFormatV1ToV4.ts +16 -2
  1206. package/src/shared-tree-core/{messageFormatV5.ts → messageFormatVSharedBranches.ts} +4 -6
  1207. package/src/shared-tree-core/sharedTreeCore.ts +67 -76
  1208. package/src/shared-tree-core/summaryTypes.ts +122 -0
  1209. package/src/shared-tree-core/versionedSummarizer.ts +107 -0
  1210. package/src/simple-tree/api/configuration.ts +21 -68
  1211. package/src/simple-tree/api/dirtyIndex.ts +11 -0
  1212. package/src/simple-tree/api/discrepancies.ts +1 -1
  1213. package/src/simple-tree/api/getSimpleSchema.ts +13 -6
  1214. package/src/simple-tree/api/incrementalAllowedTypes.ts +34 -20
  1215. package/src/simple-tree/api/index.ts +4 -5
  1216. package/src/simple-tree/api/schemaCompatibilityTester.ts +1 -1
  1217. package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -2
  1218. package/src/simple-tree/api/schemaFactoryRecursive.ts +0 -2
  1219. package/src/simple-tree/api/schemaFromSimple.ts +11 -5
  1220. package/src/simple-tree/api/simpleSchemaCodec.ts +17 -3
  1221. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -1
  1222. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +18 -10
  1223. package/src/simple-tree/api/tree.ts +1 -1
  1224. package/src/simple-tree/api/typesUnsafe.ts +7 -3
  1225. package/src/simple-tree/core/allowedTypes.ts +3 -3
  1226. package/src/simple-tree/core/index.ts +2 -2
  1227. package/src/simple-tree/core/toStored.ts +22 -55
  1228. package/src/simple-tree/core/treeNodeKernel.ts +1 -0
  1229. package/src/simple-tree/core/unhydratedFlexTree.ts +87 -36
  1230. package/src/simple-tree/core/walkSchema.ts +6 -0
  1231. package/src/simple-tree/createContext.ts +26 -11
  1232. package/src/simple-tree/fieldSchema.ts +16 -7
  1233. package/src/simple-tree/index.ts +13 -12
  1234. package/src/simple-tree/node-kinds/array/arrayNode.ts +14 -7
  1235. package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +3 -3
  1236. package/src/simple-tree/node-kinds/common.ts +2 -5
  1237. package/src/simple-tree/node-kinds/map/mapNode.ts +9 -6
  1238. package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +3 -3
  1239. package/src/simple-tree/node-kinds/object/objectNode.ts +28 -27
  1240. package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +6 -2
  1241. package/src/simple-tree/node-kinds/record/recordNode.ts +15 -11
  1242. package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +3 -3
  1243. package/src/simple-tree/prepareForInsertion.ts +343 -200
  1244. package/src/simple-tree/simpleSchema.ts +79 -32
  1245. package/src/simple-tree/simpleSchemaFormatV1.ts +9 -1
  1246. package/src/simple-tree/toStoredSchema.ts +319 -61
  1247. package/src/simple-tree/treeSchema.ts +54 -0
  1248. package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +42 -14
  1249. package/src/tableSchema.ts +485 -166
  1250. package/src/treeFactory.ts +32 -9
  1251. package/src/util/breakable.ts +4 -4
  1252. package/src/util/index.ts +5 -0
  1253. package/src/util/rangeMap.ts +72 -18
  1254. package/src/util/readSnapshotBlob.ts +23 -0
  1255. package/src/util/typeCheckTests.ts +0 -1
  1256. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +0 -1
  1257. package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +0 -1
  1258. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +0 -9
  1259. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +0 -1
  1260. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +0 -50
  1261. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +0 -1
  1262. package/dist/shared-tree-core/editManagerCodecsV5.d.ts.map +0 -1
  1263. package/dist/shared-tree-core/editManagerCodecsV5.js.map +0 -1
  1264. package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +0 -1
  1265. package/dist/shared-tree-core/editManagerFormatV5.js.map +0 -1
  1266. package/dist/shared-tree-core/messageCodecV5.d.ts.map +0 -1
  1267. package/dist/shared-tree-core/messageCodecV5.js.map +0 -1
  1268. package/dist/shared-tree-core/messageFormatV5.d.ts.map +0 -1
  1269. package/dist/shared-tree-core/messageFormatV5.js.map +0 -1
  1270. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +0 -40
  1271. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +0 -1
  1272. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +0 -177
  1273. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +0 -1
  1274. package/docs/main/sequence-field/move-composition.md +0 -46
  1275. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +0 -1
  1276. package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +0 -1
  1277. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +0 -9
  1278. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +0 -1
  1279. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +0 -46
  1280. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +0 -1
  1281. package/lib/shared-tree-core/editManagerCodecsV5.d.ts.map +0 -1
  1282. package/lib/shared-tree-core/editManagerCodecsV5.js.map +0 -1
  1283. package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +0 -1
  1284. package/lib/shared-tree-core/editManagerFormatV5.js.map +0 -1
  1285. package/lib/shared-tree-core/messageCodecV5.d.ts.map +0 -1
  1286. package/lib/shared-tree-core/messageCodecV5.js.map +0 -1
  1287. package/lib/shared-tree-core/messageFormatV5.d.ts.map +0 -1
  1288. package/lib/shared-tree-core/messageFormatV5.js.map +0 -1
  1289. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +0 -40
  1290. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +0 -1
  1291. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +0 -171
  1292. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +0 -1
  1293. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +0 -57
  1294. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +0 -209
@@ -2,15 +2,15 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import type { TreeSchema } from "./configuration.js";
5
+ import type { TreeSchema } from "../treeSchema.js";
6
6
  import type { IncrementalEncodingPolicy } from "../../feature-libraries/index.js";
7
7
  /**
8
- * A symbol when present in the {@link AnnotatedAllowedTypes.metadata.custom} property as true, opts in the allowed
8
+ * A symbol when present in the {@link AnnotatedAllowedTypes.metadata}'s `custom` property as true, opts in the allowed
9
9
  * types to incremental summary optimization.
10
10
  * These allowed types will be optimized during summary such that if they don't change across summaries,
11
11
  * they will not be encoded and their content will not be included in the summary that is uploaded to the service.
12
12
  * @remarks
13
- * See {@link getShouldIncrementallySummarizeAllowedTypes} for more details.
13
+ * See {@link incrementalEncodingPolicyForAllowedTypes} for more details.
14
14
  *
15
15
  * Use {@link SchemaStaticsBeta.types} to add this metadata to allowed types in a schema.
16
16
  * @example
@@ -22,26 +22,29 @@ import type { IncrementalEncodingPolicy } from "../../feature-libraries/index.js
22
22
  * }),
23
23
  * }) {}
24
24
  * ```
25
+ * @alpha
25
26
  */
26
27
  export declare const incrementalSummaryHint: unique symbol;
27
28
  /**
28
- * This helper function {@link getShouldIncrementallySummarizeAllowedTypes} can be used to generate a callback function
29
- * of type {@link IncrementalEncodingPolicy}.
30
- * This callback can be passed as the value for {@link SharedTreeOptionsInternal.shouldEncodeFieldIncrementally} parameter
29
+ * This helper function {@link incrementalEncodingPolicyForAllowedTypes} can be used to generate a callback function
30
+ * of type {@link IncrementalEncodingPolicy}. It determines if each {@link AllowedTypes} in a schema should be
31
+ * incrementally summarized.
32
+ * This callback can be passed as the value for {@link SharedTreeOptions.shouldEncodeIncrementally} parameter
31
33
  * when creating the tree.
32
- * It will be called for each {@link AllowedTypes} in the schema to determine if it should be incrementally summarized.
33
34
  *
34
35
  * @param rootSchema - The schema for the root of the tree.
35
- * @returns A callback function of type {@link IncrementalEncodingPolicy} which can be used to determine if a field
36
- * should be incrementally summarized based on whether it is an allowed types with the
37
- * {@link incrementalAllowedTypesMetadata} metadata.
36
+ * @returns A callback function of type {@link IncrementalEncodingPolicy} which determines if allowed types should
37
+ * be incrementally summarized based on whether they have opted in via the {@link incrementalSummaryHint} metadata.
38
38
  *
39
39
  * @remarks
40
40
  * This only works for forest type {@link ForestTypeOptimized} and compression strategy
41
- * {@link TreeCompressionStrategyExtended.CompressedIncremental}.
41
+ * {@link TreeCompressionStrategy.CompressedIncremental}.
42
42
  *
43
- * The {@link incrementalAllowedTypesMetadata} will be replaced with a specialized metadata property once the
43
+ * @privateRemarks
44
+ * The {@link incrementalSummaryHint} will be replaced with a specialized metadata property once the
44
45
  * incremental summary feature and APIs are stabilized.
46
+ *
47
+ * @alpha
45
48
  */
46
- export declare function getShouldIncrementallySummarizeAllowedTypes(rootSchema: TreeSchema): IncrementalEncodingPolicy;
49
+ export declare function incrementalEncodingPolicyForAllowedTypes(rootSchema: TreeSchema): IncrementalEncodingPolicy;
47
50
  //# sourceMappingURL=incrementalAllowedTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"incrementalAllowedTypes.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/incrementalAllowedTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAIlF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sBAAsB,EAAE,OAAO,MAAyC,CAAC;AAatF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,2CAA2C,CAC1D,UAAU,EAAE,UAAU,GACpB,yBAAyB,CAwC3B"}
1
+ {"version":3,"file":"incrementalAllowedTypes.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/incrementalAllowedTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAMlF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,sBAAsB,EAAE,OAAO,MAAyC,CAAC;AAatF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,wCAAwC,CACvD,UAAU,EAAE,UAAU,GACpB,yBAAyB,CAkD3B"}
@@ -3,16 +3,17 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { getTreeNodeSchemaPrivateData } from "../core/index.js";
6
- import { isObjectNodeSchema } from "../node-kinds/index.js";
6
+ import { isArrayNodeSchema, isObjectNodeSchema } from "../node-kinds/index.js";
7
7
  import { oneFromIterable } from "../../util/index.js";
8
8
  import { assert } from "@fluidframework/core-utils/internal";
9
+ import { UsageError } from "@fluidframework/telemetry-utils/internal";
9
10
  /**
10
- * A symbol when present in the {@link AnnotatedAllowedTypes.metadata.custom} property as true, opts in the allowed
11
+ * A symbol when present in the {@link AnnotatedAllowedTypes.metadata}'s `custom` property as true, opts in the allowed
11
12
  * types to incremental summary optimization.
12
13
  * These allowed types will be optimized during summary such that if they don't change across summaries,
13
14
  * they will not be encoded and their content will not be included in the summary that is uploaded to the service.
14
15
  * @remarks
15
- * See {@link getShouldIncrementallySummarizeAllowedTypes} for more details.
16
+ * See {@link incrementalEncodingPolicyForAllowedTypes} for more details.
16
17
  *
17
18
  * Use {@link SchemaStaticsBeta.types} to add this metadata to allowed types in a schema.
18
19
  * @example
@@ -24,6 +25,7 @@ import { assert } from "@fluidframework/core-utils/internal";
24
25
  * }),
25
26
  * }) {}
26
27
  * ```
28
+ * @alpha
27
29
  */
28
30
  export const incrementalSummaryHint = Symbol("IncrementalSummaryHint");
29
31
  /**
@@ -35,25 +37,27 @@ function isIncrementalSummaryHintInAllowedTypes(allowedTypes) {
35
37
  customMetadata[incrementalSummaryHint] === true);
36
38
  }
37
39
  /**
38
- * This helper function {@link getShouldIncrementallySummarizeAllowedTypes} can be used to generate a callback function
39
- * of type {@link IncrementalEncodingPolicy}.
40
- * This callback can be passed as the value for {@link SharedTreeOptionsInternal.shouldEncodeFieldIncrementally} parameter
40
+ * This helper function {@link incrementalEncodingPolicyForAllowedTypes} can be used to generate a callback function
41
+ * of type {@link IncrementalEncodingPolicy}. It determines if each {@link AllowedTypes} in a schema should be
42
+ * incrementally summarized.
43
+ * This callback can be passed as the value for {@link SharedTreeOptions.shouldEncodeIncrementally} parameter
41
44
  * when creating the tree.
42
- * It will be called for each {@link AllowedTypes} in the schema to determine if it should be incrementally summarized.
43
45
  *
44
46
  * @param rootSchema - The schema for the root of the tree.
45
- * @returns A callback function of type {@link IncrementalEncodingPolicy} which can be used to determine if a field
46
- * should be incrementally summarized based on whether it is an allowed types with the
47
- * {@link incrementalAllowedTypesMetadata} metadata.
47
+ * @returns A callback function of type {@link IncrementalEncodingPolicy} which determines if allowed types should
48
+ * be incrementally summarized based on whether they have opted in via the {@link incrementalSummaryHint} metadata.
48
49
  *
49
50
  * @remarks
50
51
  * This only works for forest type {@link ForestTypeOptimized} and compression strategy
51
- * {@link TreeCompressionStrategyExtended.CompressedIncremental}.
52
+ * {@link TreeCompressionStrategy.CompressedIncremental}.
52
53
  *
53
- * The {@link incrementalAllowedTypesMetadata} will be replaced with a specialized metadata property once the
54
+ * @privateRemarks
55
+ * The {@link incrementalSummaryHint} will be replaced with a specialized metadata property once the
54
56
  * incremental summary feature and APIs are stabilized.
57
+ *
58
+ * @alpha
55
59
  */
56
- export function getShouldIncrementallySummarizeAllowedTypes(rootSchema) {
60
+ export function incrementalEncodingPolicyForAllowedTypes(rootSchema) {
57
61
  return (targetNodeIdentifier, targetFieldKey) => {
58
62
  if (targetNodeIdentifier === undefined) {
59
63
  // Root fields cannot be allowed types, so we don't incrementally summarize them.
@@ -69,6 +73,9 @@ export function getShouldIncrementallySummarizeAllowedTypes(rootSchema) {
69
73
  return false;
70
74
  }
71
75
  if (isObjectNodeSchema(targetNode)) {
76
+ if (targetFieldKey === undefined) {
77
+ throw new UsageError(`Field key must be provided for object or array node '${targetNodeIdentifier}'`);
78
+ }
72
79
  const targetPropertyKey = targetNode.storedKeyToPropertyKey.get(targetFieldKey);
73
80
  if (targetPropertyKey !== undefined) {
74
81
  const fieldSchema = targetNode.fields.get(targetPropertyKey);
@@ -78,6 +85,9 @@ export function getShouldIncrementallySummarizeAllowedTypes(rootSchema) {
78
85
  }
79
86
  return false;
80
87
  }
88
+ if (targetFieldKey !== undefined && !isArrayNodeSchema(targetNode)) {
89
+ throw new UsageError(`Field key must not be provided for leaf, map or record node '${targetNodeIdentifier}'`);
90
+ }
81
91
  const allowedTypes = oneFromIterable(getTreeNodeSchemaPrivateData(targetNode).childAllowedTypes);
82
92
  assert(allowedTypes !== undefined, 0xc87 /* Non object nodes with fields should only have one allowedTypes entry */);
83
93
  return isIncrementalSummaryHintInAllowedTypes(allowedTypes);
@@ -1 +1 @@
1
- {"version":3,"file":"incrementalAllowedTypes.js","sourceRoot":"","sources":["../../../src/simple-tree/api/incrementalAllowedTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,4BAA4B,EAAyB,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAkB,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAEtF;;GAEG;AACH,SAAS,sCAAsC,CAAC,YAA8B;IAC7E,MAAM,cAAc,GAAG,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;IACpD,OAAO,CACN,cAAc,KAAK,SAAS;QAC3B,cAA0C,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAC5E,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,2CAA2C,CAC1D,UAAsB;IAEtB,OAAO,CACN,oBAA0D,EAC1D,cAAwB,EACvB,EAAE;QACH,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;YACxC,iFAAiF;YACjF,OAAO,KAAK,CAAC;QACd,CAAC;QAED,MAAM,UAAU,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QACpE,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC9B,gDAAgD;YAChD,mIAAmI;YACnI,sCAAsC;YACtC,kEAAkE;YAClE,oIAAoI;YACpI,OAAO,KAAK,CAAC;QACd,CAAC;QAED,IAAI,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;YACpC,MAAM,iBAAiB,GAAG,UAAU,CAAC,sBAAsB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;YAChF,IAAI,iBAAiB,KAAK,SAAS,EAAE,CAAC;gBACrC,MAAM,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;gBAC7D,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;oBAC/B,OAAO,sCAAsC,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;gBAC7E,CAAC;YACF,CAAC;YACD,OAAO,KAAK,CAAC;QACd,CAAC;QAED,MAAM,YAAY,GAAG,eAAe,CACnC,4BAA4B,CAAC,UAAU,CAAC,CAAC,iBAAiB,CAC1D,CAAC;QACF,MAAM,CACL,YAAY,KAAK,SAAS,EAC1B,KAAK,CAAC,0EAA0E,CAChF,CAAC;QACF,OAAO,sCAAsC,CAAC,YAAY,CAAC,CAAC;IAC7D,CAAC,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { FieldKey, TreeNodeSchemaIdentifier } from \"../../core/index.js\";\nimport { getTreeNodeSchemaPrivateData, type AllowedTypesFull } from \"../core/index.js\";\nimport { isObjectNodeSchema } from \"../node-kinds/index.js\";\nimport type { TreeSchema } from \"./configuration.js\";\nimport type { IncrementalEncodingPolicy } from \"../../feature-libraries/index.js\";\nimport { oneFromIterable } from \"../../util/index.js\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\n/**\n * A symbol when present in the {@link AnnotatedAllowedTypes.metadata.custom} property as true, opts in the allowed\n * types to incremental summary optimization.\n * These allowed types will be optimized during summary such that if they don't change across summaries,\n * they will not be encoded and their content will not be included in the summary that is uploaded to the service.\n * @remarks\n * See {@link getShouldIncrementallySummarizeAllowedTypes} for more details.\n *\n * Use {@link SchemaStaticsBeta.types} to add this metadata to allowed types in a schema.\n * @example\n * ```typescript\n * const sf = new SchemaFactoryAlpha(\"IncrementalSummarization\");\n * class Foo extends sf.objectAlpha(\"foo\", {\n * bar: sf.types([{ type: sf.string, metadata: {} }], {\n * custom: { [incrementalSummaryHint]: true },\n * }),\n * }) {}\n * ```\n */\nexport const incrementalSummaryHint: unique symbol = Symbol(\"IncrementalSummaryHint\");\n\n/**\n * Returns true if the provided allowed types's custom metadata has {@link incrementalSummaryHint} as true.\n */\nfunction isIncrementalSummaryHintInAllowedTypes(allowedTypes: AllowedTypesFull): boolean {\n\tconst customMetadata = allowedTypes.metadata.custom;\n\treturn (\n\t\tcustomMetadata !== undefined &&\n\t\t(customMetadata as Record<symbol, unknown>)[incrementalSummaryHint] === true\n\t);\n}\n\n/**\n * This helper function {@link getShouldIncrementallySummarizeAllowedTypes} can be used to generate a callback function\n * of type {@link IncrementalEncodingPolicy}.\n * This callback can be passed as the value for {@link SharedTreeOptionsInternal.shouldEncodeFieldIncrementally} parameter\n * when creating the tree.\n * It will be called for each {@link AllowedTypes} in the schema to determine if it should be incrementally summarized.\n *\n * @param rootSchema - The schema for the root of the tree.\n * @returns A callback function of type {@link IncrementalEncodingPolicy} which can be used to determine if a field\n * should be incrementally summarized based on whether it is an allowed types with the\n * {@link incrementalAllowedTypesMetadata} metadata.\n *\n * @remarks\n * This only works for forest type {@link ForestTypeOptimized} and compression strategy\n * {@link TreeCompressionStrategyExtended.CompressedIncremental}.\n *\n * The {@link incrementalAllowedTypesMetadata} will be replaced with a specialized metadata property once the\n * incremental summary feature and APIs are stabilized.\n */\nexport function getShouldIncrementallySummarizeAllowedTypes(\n\trootSchema: TreeSchema,\n): IncrementalEncodingPolicy {\n\treturn (\n\t\ttargetNodeIdentifier: TreeNodeSchemaIdentifier | undefined,\n\t\ttargetFieldKey: FieldKey,\n\t) => {\n\t\tif (targetNodeIdentifier === undefined) {\n\t\t\t// Root fields cannot be allowed types, so we don't incrementally summarize them.\n\t\t\treturn false;\n\t\t}\n\n\t\tconst targetNode = rootSchema.definitions.get(targetNodeIdentifier);\n\t\tif (targetNode === undefined) {\n\t\t\t// The requested type is unknown to this schema.\n\t\t\t// In this case we have no hints available from the view schema, and fall back to the default behavior of non-incremental encoding.\n\t\t\t// There are two ways this can happen:\n\t\t\t// 1. The view schema being used does not match the stored schema.\n\t\t\t// 2. The view schema is compatible, but there are unknown optional fields which contain new types not described by the view schema.\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isObjectNodeSchema(targetNode)) {\n\t\t\tconst targetPropertyKey = targetNode.storedKeyToPropertyKey.get(targetFieldKey);\n\t\t\tif (targetPropertyKey !== undefined) {\n\t\t\t\tconst fieldSchema = targetNode.fields.get(targetPropertyKey);\n\t\t\t\tif (fieldSchema !== undefined) {\n\t\t\t\t\treturn isIncrementalSummaryHintInAllowedTypes(fieldSchema.allowedTypesFull);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tconst allowedTypes = oneFromIterable(\n\t\t\tgetTreeNodeSchemaPrivateData(targetNode).childAllowedTypes,\n\t\t);\n\t\tassert(\n\t\t\tallowedTypes !== undefined,\n\t\t\t0xc87 /* Non object nodes with fields should only have one allowedTypes entry */,\n\t\t);\n\t\treturn isIncrementalSummaryHintInAllowedTypes(allowedTypes);\n\t};\n}\n"]}
1
+ {"version":3,"file":"incrementalAllowedTypes.js","sourceRoot":"","sources":["../../../src/simple-tree/api/incrementalAllowedTypes.ts"],"names":[],"mappings":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C;YACD,MAAM,iBAAiB,GAAG,UAAU,CAAC,sBAAsB,CAAC,GAAG,CAC9D,cAA0B,CAC1B,CAAC;YACF,IAAI,iBAAiB,KAAK,SAAS,EAAE,CAAC;gBACrC,MAAM,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;gBAC7D,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;oBAC/B,OAAO,sCAAsC,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;gBAC7E,CAAC;YACF,CAAC;YACD,OAAO,KAAK,CAAC;QACd,CAAC;QAED,IAAI,cAAc,KAAK,SAAS,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC;YACpE,MAAM,IAAI,UAAU,CACnB,gEAAgE,oBAAoB,GAAG,CACvF,CAAC;QACH,CAAC;QAED,MAAM,YAAY,GAAG,eAAe,CACnC,4BAA4B,CAAC,UAAU,CAAC,CAAC,iBAAiB,CAC1D,CAAC;QACF,MAAM,CACL,YAAY,KAAK,SAAS,EAC1B,KAAK,CAAC,0EAA0E,CAChF,CAAC;QACF,OAAO,sCAAsC,CAAC,YAAY,CAAC,CAAC;IAC7D,CAAC,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { getTreeNodeSchemaPrivateData, type AllowedTypesFull } from \"../core/index.js\";\nimport { isArrayNodeSchema, isObjectNodeSchema } from \"../node-kinds/index.js\";\nimport type { TreeSchema } from \"../treeSchema.js\";\nimport type { IncrementalEncodingPolicy } from \"../../feature-libraries/index.js\";\nimport { oneFromIterable } from \"../../util/index.js\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { FieldKey } from \"../../core/index.js\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * A symbol when present in the {@link AnnotatedAllowedTypes.metadata}'s `custom` property as true, opts in the allowed\n * types to incremental summary optimization.\n * These allowed types will be optimized during summary such that if they don't change across summaries,\n * they will not be encoded and their content will not be included in the summary that is uploaded to the service.\n * @remarks\n * See {@link incrementalEncodingPolicyForAllowedTypes} for more details.\n *\n * Use {@link SchemaStaticsBeta.types} to add this metadata to allowed types in a schema.\n * @example\n * ```typescript\n * const sf = new SchemaFactoryAlpha(\"IncrementalSummarization\");\n * class Foo extends sf.objectAlpha(\"foo\", {\n * bar: sf.types([{ type: sf.string, metadata: {} }], {\n * custom: { [incrementalSummaryHint]: true },\n * }),\n * }) {}\n * ```\n * @alpha\n */\nexport const incrementalSummaryHint: unique symbol = Symbol(\"IncrementalSummaryHint\");\n\n/**\n * Returns true if the provided allowed types's custom metadata has {@link incrementalSummaryHint} as true.\n */\nfunction isIncrementalSummaryHintInAllowedTypes(allowedTypes: AllowedTypesFull): boolean {\n\tconst customMetadata = allowedTypes.metadata.custom;\n\treturn (\n\t\tcustomMetadata !== undefined &&\n\t\t(customMetadata as Record<symbol, unknown>)[incrementalSummaryHint] === true\n\t);\n}\n\n/**\n * This helper function {@link incrementalEncodingPolicyForAllowedTypes} can be used to generate a callback function\n * of type {@link IncrementalEncodingPolicy}. It determines if each {@link AllowedTypes} in a schema should be\n * incrementally summarized.\n * This callback can be passed as the value for {@link SharedTreeOptions.shouldEncodeIncrementally} parameter\n * when creating the tree.\n *\n * @param rootSchema - The schema for the root of the tree.\n * @returns A callback function of type {@link IncrementalEncodingPolicy} which determines if allowed types should\n * be incrementally summarized based on whether they have opted in via the {@link incrementalSummaryHint} metadata.\n *\n * @remarks\n * This only works for forest type {@link ForestTypeOptimized} and compression strategy\n * {@link TreeCompressionStrategy.CompressedIncremental}.\n *\n * @privateRemarks\n * The {@link incrementalSummaryHint} will be replaced with a specialized metadata property once the\n * incremental summary feature and APIs are stabilized.\n *\n * @alpha\n */\nexport function incrementalEncodingPolicyForAllowedTypes(\n\trootSchema: TreeSchema,\n): IncrementalEncodingPolicy {\n\treturn (targetNodeIdentifier: string | undefined, targetFieldKey?: string) => {\n\t\tif (targetNodeIdentifier === undefined) {\n\t\t\t// Root fields cannot be allowed types, so we don't incrementally summarize them.\n\t\t\treturn false;\n\t\t}\n\n\t\tconst targetNode = rootSchema.definitions.get(targetNodeIdentifier);\n\t\tif (targetNode === undefined) {\n\t\t\t// The requested type is unknown to this schema.\n\t\t\t// In this case we have no hints available from the view schema, and fall back to the default behavior of non-incremental encoding.\n\t\t\t// There are two ways this can happen:\n\t\t\t// 1. The view schema being used does not match the stored schema.\n\t\t\t// 2. The view schema is compatible, but there are unknown optional fields which contain new types not described by the view schema.\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isObjectNodeSchema(targetNode)) {\n\t\t\tif (targetFieldKey === undefined) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t`Field key must be provided for object or array node '${targetNodeIdentifier}'`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst targetPropertyKey = targetNode.storedKeyToPropertyKey.get(\n\t\t\t\ttargetFieldKey as FieldKey,\n\t\t\t);\n\t\t\tif (targetPropertyKey !== undefined) {\n\t\t\t\tconst fieldSchema = targetNode.fields.get(targetPropertyKey);\n\t\t\t\tif (fieldSchema !== undefined) {\n\t\t\t\t\treturn isIncrementalSummaryHintInAllowedTypes(fieldSchema.allowedTypesFull);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tif (targetFieldKey !== undefined && !isArrayNodeSchema(targetNode)) {\n\t\t\tthrow new UsageError(\n\t\t\t\t`Field key must not be provided for leaf, map or record node '${targetNodeIdentifier}'`,\n\t\t\t);\n\t\t}\n\n\t\tconst allowedTypes = oneFromIterable(\n\t\t\tgetTreeNodeSchemaPrivateData(targetNode).childAllowedTypes,\n\t\t);\n\t\tassert(\n\t\t\tallowedTypes !== undefined,\n\t\t\t0xc87 /* Non object nodes with fields should only have one allowedTypes entry */,\n\t\t);\n\t\treturn isIncrementalSummaryHintInAllowedTypes(allowedTypes);\n\t};\n}\n"]}
@@ -2,12 +2,12 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export type { TreeSchema, ITreeViewConfiguration, ITreeConfigurationOptions, } from "./configuration.js";
5
+ export type { ITreeViewConfiguration, ITreeConfigurationOptions, } from "./configuration.js";
6
6
  export { TreeViewConfiguration, TreeViewConfigurationAlpha, } from "./configuration.js";
7
7
  export type { ITree, TreeView, ViewableTree, TreeViewEvents, SchemaCompatibilityStatus, TreeViewAlpha, TreeViewBeta, TreeBranch, TreeBranchAlpha, TreeBranchEvents, ITreeAlpha, } from "./tree.js";
8
8
  export { asTreeViewAlpha } from "./tree.js";
9
9
  export { type SchemaStatics, schemaStatics } from "./schemaStatics.js";
10
- export { SchemaFactory, type ScopedSchemaName, type ObjectSchemaOptionsAlpha, type ObjectSchemaOptions, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, type SchemaFactory_base, } from "./schemaFactory.js";
10
+ export { SchemaFactory, scoped, type ScopedSchemaName, type ObjectSchemaOptionsAlpha, type ObjectSchemaOptions, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, type SchemaFactory_base, } from "./schemaFactory.js";
11
11
  export { SchemaFactoryBeta, type SchemaStaticsBeta } from "./schemaFactoryBeta.js";
12
12
  export { SchemaFactoryAlpha } from "./schemaFactoryAlpha.js";
13
13
  export type { ValidateRecursiveSchema, FixRecursiveArraySchema, ValidateRecursiveSchemaTemplate, FixRecursiveRecursionLimit, } from "./schemaFactoryRecursive.js";
@@ -31,9 +31,8 @@ export { createIdentifierIndex, type IdentifierIndex, } from "./identifierIndex.
31
31
  export { extractPersistedSchema, comparePersistedSchema, } from "./storedSchema.js";
32
32
  export { type TransactionConstraint, type NodeInDocumentConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, rollback, } from "./transactionTypes.js";
33
33
  export { generateSchemaFromSimpleSchema } from "./schemaFromSimple.js";
34
- export { toSimpleTreeSchema } from "./viewSchemaToSimpleSchema.js";
35
34
  export type { TreeChangeEvents } from "./treeChangeEvents.js";
36
- export { getShouldIncrementallySummarizeAllowedTypes, incrementalSummaryHint, } from "./incrementalAllowedTypes.js";
37
- export { encodeSimpleSchema, decodeSimpleSchema, } from "./simpleSchemaCodec.js";
35
+ export { incrementalEncodingPolicyForAllowedTypes, incrementalSummaryHint, } from "./incrementalAllowedTypes.js";
36
+ export { encodeSchemaCompatibilitySnapshot, decodeSchemaCompatibilitySnapshot, } from "./simpleSchemaCodec.js";
38
37
  export { exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, } from "./snapshotCompatibilityChecker.js";
39
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,UAAU,EACV,sBAAsB,EACtB,yBAAyB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACX,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,UAAU,GACV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EACN,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,E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AAO,EACN,2CAA2C,EAC3C,sBAAsB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,kBAAkB,EAClB,kBAAkB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,GAClB,MAAM,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,sBAAsB,EACtB,yBAAyB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACX,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,UAAU,GACV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EACN,aAAa,EACb,MAAM,EACN,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,YAAY,EACX,uBAAuB,EACvB,uBAAuB,EACvB,+BAA+B,EAC/B,0BAA0B,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACN,SAAS,EACT,eAAe,EACf,eAAe,GACf,M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Ac,EACnB,KAAK,eAAe,EACpB,sBAAsB,EACtB,cAAc,EACd,KAAK,eAAe,EACpB,kBAAkB,EAClB,KAAK,kBAAkB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,KAAK,WAAW,EAChB,iBAAiB,EACjB,yBAAyB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,+BAA+B,EAC/B,aAAa,EACb,aAAa,EACb,KAAK,eAAe,EACpB,QAAQ,EACR,KAAK,oBAAoB,GACzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EACN,qBAAqB,EACrB,KAAK,eAAe,GACpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,sBAAsB,EACtB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,QAAQ,GACR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACN,wCAAwC,EACxC,sBAAsB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,iCAAiC,EACjC,iCAAiC,GACjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,GAClB,MAAM,mCAAmC,CAAC"}
@@ -5,7 +5,7 @@
5
5
  export { TreeViewConfiguration, TreeViewConfigurationAlpha, } from "./configuration.js";
6
6
  export { asTreeViewAlpha } from "./tree.js";
7
7
  export { schemaStatics } from "./schemaStatics.js";
8
- export { SchemaFactory, } from "./schemaFactory.js";
8
+ export { SchemaFactory, scoped, } from "./schemaFactory.js";
9
9
  export { SchemaFactoryBeta } from "./schemaFactoryBeta.js";
10
10
  export { SchemaFactoryAlpha } from "./schemaFactoryAlpha.js";
11
11
  export { allowUnused } from "./schemaFactoryRecursive.js";
@@ -25,8 +25,7 @@ export { createIdentifierIndex, } from "./identifierIndex.js";
25
25
  export { extractPersistedSchema, comparePersistedSchema, } from "./storedSchema.js";
26
26
  export { rollback, } from "./transactionTypes.js";
27
27
  export { generateSchemaFromSimpleSchema } from "./schemaFromSimple.js";
28
- export { toSimpleTreeSchema } from "./viewSchemaToSimpleSchema.js";
29
- export { getShouldIncrementallySummarizeAllowedTypes, incrementalSummaryHint, } from "./incrementalAllowedTypes.js";
30
- export { encodeSimpleSchema, decodeSimpleSchema, } from "./simpleSchemaCodec.js";
28
+ export { incrementalEncodingPolicyForAllowedTypes, incrementalSummaryHint, } from "./incrementalAllowedTypes.js";
29
+ export { encodeSchemaCompatibilitySnapshot, decodeSchemaCompatibilitySnapshot, } from "./simpleSchemaCodec.js";
31
30
  export { exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, } from "./snapshotCompatibilityChecker.js";
32
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;AAc5B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAsB,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EACN,aAAa,GAOb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAA0B,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,C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A8B,CAAC;AACtC,OAAO,EACN,kBAAkB,EAClB,kBAAkB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,GAClB,MAAM,mCAAmC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tTreeSchema,\n\tITreeViewConfiguration,\n\tITreeConfigurationOptions,\n} from \"./configuration.js\";\nexport {\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n} from \"./configuration.js\";\nexport type {\n\tITree,\n\tTreeView,\n\tViewableTree,\n\tTreeViewEvents,\n\tSchemaCompatibilityStatus,\n\tTreeViewAlpha,\n\tTreeViewBeta,\n\tTreeBranch,\n\tTreeBranchAlpha,\n\tTreeBranchEvents,\n\tITreeAlpha,\n} from \"./tree.js\";\nexport { asTreeViewAlpha } from \"./tree.js\";\nexport { type SchemaStatics, schemaStatics } from \"./schemaStatics.js\";\nexport {\n\tSchemaFactory,\n\ttype ScopedSchemaName,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype SchemaFactory_base,\n} from \"./schemaFactory.js\";\nexport { SchemaFactoryBeta, type SchemaStaticsBeta } from \"./schemaFactoryBeta.js\";\nexport { SchemaFactoryAlpha } from \"./schemaFactoryAlpha.js\";\nexport type {\n\tValidateRecursiveSchema,\n\tFixRecursiveArraySchema,\n\tValidateRecursiveSchemaTemplate,\n\tFixRecursiveRecursionLimit,\n} from \"./schemaFactoryRecursive.js\";\nexport { allowUnused } from \"./schemaFactoryRecursive.js\";\nexport {\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n} from \"./schemaCreationUtilities.js\";\nexport {\n\tgetIdentifierFromNode,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttryGetSchema,\n} from \"./treeNodeApi.js\";\nexport { createFromCursor } from \"./create.js\";\nexport {\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n} from \"./dirtyIndex.js\";\nexport {\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} from \"./jsonSchema.js\";\nexport type { TreeSchemaEncodingOptions } from \"./getJsonSchema.js\";\nexport { getJsonSchema } from \"./getJsonSchema.js\";\nexport { getSimpleSchema } from \"./getSimpleSchema.js\";\nexport { SchemaCompatibilityTester } from \"./schemaCompatibilityTester.js\";\nexport type {\n\tUnenforced,\n\tFieldSchemaAlphaUnsafe,\n\tArrayNodeCustomizableSchemaUnsafe,\n\tMapNodeCustomizableSchemaUnsafe,\n\tSystem_Unsafe,\n\tTreeRecordNodeUnsafe,\n\tUnannotateAllowedTypeUnsafe,\n\tAnnotatedAllowedTypeUnsafe,\n\tAnnotatedAllowedTypesUnsafe,\n\tAllowedTypesFullUnsafe,\n\tAllowedTypesFullFromMixedUnsafe,\n\tUnannotateAllowedTypesListUnsafe,\n\tAnnotateAllowedTypesListUnsafe,\n} from \"./typesUnsafe.js\";\n\nexport {\n\ttype VerboseTreeNode,\n\ttype VerboseTree,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\treplaceVerboseTreeHandles,\n} from \"./verboseTree.js\";\n\nexport {\n\ttype TreeEncodingOptions,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\treplaceHandles,\n\ttype HandleConverter,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n} from \"./customTree.js\";\n\nexport {\n\ttype ConciseTree,\n\tconciseFromCursor,\n\treplaceConciseTreeHandles,\n} from \"./conciseTree.js\";\n\nexport {\n\tborrowCursorFromTreeNodeOrValue,\n\texportConcise,\n\timportConcise,\n\ttype NodeChangedData,\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n} from \"./treeBeta.js\";\nexport { createSimpleTreeIndex, type SimpleTreeIndex } from \"./simpleTreeIndex.js\";\nexport {\n\tcreateIdentifierIndex,\n\ttype IdentifierIndex,\n} from \"./identifierIndex.js\";\n\nexport {\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n} from \"./storedSchema.js\";\n\nexport {\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} from \"./transactionTypes.js\";\n\nexport { generateSchemaFromSimpleSchema } from \"./schemaFromSimple.js\";\nexport { toSimpleTreeSchema } from \"./viewSchemaToSimpleSchema.js\";\nexport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\nexport {\n\tgetShouldIncrementallySummarizeAllowedTypes,\n\tincrementalSummaryHint,\n} from \"./incrementalAllowedTypes.js\";\nexport {\n\tencodeSimpleSchema,\n\tdecodeSimpleSchema,\n} from \"./simpleSchemaCodec.js\";\nexport {\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n} from \"./snapshotCompatibilityChecker.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAA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E9B,OAAO,EACN,sBAAsB,EACtB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAUN,QAAQ,GACR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EACN,wCAAwC,EACxC,sBAAsB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,iCAAiC,EACjC,iCAAiC,GACjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,GAClB,MAAM,mCAAmC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tITreeViewConfiguration,\n\tITreeConfigurationOptions,\n} from \"./configuration.js\";\nexport {\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n} from \"./configuration.js\";\nexport type {\n\tITree,\n\tTreeView,\n\tViewableTree,\n\tTreeViewEvents,\n\tSchemaCompatibilityStatus,\n\tTreeViewAlpha,\n\tTreeViewBeta,\n\tTreeBranch,\n\tTreeBranchAlpha,\n\tTreeBranchEvents,\n\tITreeAlpha,\n} from \"./tree.js\";\nexport { asTreeViewAlpha } from \"./tree.js\";\nexport { type SchemaStatics, schemaStatics } from \"./schemaStatics.js\";\nexport {\n\tSchemaFactory,\n\tscoped,\n\ttype ScopedSchemaName,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype SchemaFactory_base,\n} from \"./schemaFactory.js\";\nexport { SchemaFactoryBeta, type SchemaStaticsBeta } from \"./schemaFactoryBeta.js\";\nexport { SchemaFactoryAlpha } from \"./schemaFactoryAlpha.js\";\nexport type {\n\tValidateRecursiveSchema,\n\tFixRecursiveArraySchema,\n\tValidateRecursiveSchemaTemplate,\n\tFixRecursiveRecursionLimit,\n} from \"./schemaFactoryRecursive.js\";\nexport { allowUnused } from \"./schemaFactoryRecursive.js\";\nexport {\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n} from \"./schemaCreationUtilities.js\";\nexport {\n\tgetIdentifierFromNode,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttryGetSchema,\n} from \"./treeNodeApi.js\";\nexport { createFromCursor } from \"./create.js\";\nexport {\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n} from \"./dirtyIndex.js\";\nexport {\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} from \"./jsonSchema.js\";\nexport type { TreeSchemaEncodingOptions } from \"./getJsonSchema.js\";\nexport { getJsonSchema } from \"./getJsonSchema.js\";\nexport { getSimpleSchema } from \"./getSimpleSchema.js\";\nexport { SchemaCompatibilityTester } from \"./schemaCompatibilityTester.js\";\nexport type {\n\tUnenforced,\n\tFieldSchemaAlphaUnsafe,\n\tArrayNodeCustomizableSchemaUnsafe,\n\tMapNodeCustomizableSchemaUnsafe,\n\tSystem_Unsafe,\n\tTreeRecordNodeUnsafe,\n\tUnannotateAllowedTypeUnsafe,\n\tAnnotatedAllowedTypeUnsafe,\n\tAnnotatedAllowedTypesUnsafe,\n\tAllowedTypesFullUnsafe,\n\tAllowedTypesFullFromMixedUnsafe,\n\tUnannotateAllowedTypesListUnsafe,\n\tAnnotateAllowedTypesListUnsafe,\n} from \"./typesUnsafe.js\";\n\nexport {\n\ttype VerboseTreeNode,\n\ttype VerboseTree,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\treplaceVerboseTreeHandles,\n} from \"./verboseTree.js\";\n\nexport {\n\ttype TreeEncodingOptions,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\treplaceHandles,\n\ttype HandleConverter,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n} from \"./customTree.js\";\n\nexport {\n\ttype ConciseTree,\n\tconciseFromCursor,\n\treplaceConciseTreeHandles,\n} from \"./conciseTree.js\";\n\nexport {\n\tborrowCursorFromTreeNodeOrValue,\n\texportConcise,\n\timportConcise,\n\ttype NodeChangedData,\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n} from \"./treeBeta.js\";\nexport { createSimpleTreeIndex, type SimpleTreeIndex } from \"./simpleTreeIndex.js\";\nexport {\n\tcreateIdentifierIndex,\n\ttype IdentifierIndex,\n} from \"./identifierIndex.js\";\n\nexport {\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n} from \"./storedSchema.js\";\n\nexport {\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} from \"./transactionTypes.js\";\n\nexport { generateSchemaFromSimpleSchema } from \"./schemaFromSimple.js\";\nexport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\nexport {\n\tincrementalEncodingPolicyForAllowedTypes,\n\tincrementalSummaryHint,\n} from \"./incrementalAllowedTypes.js\";\nexport {\n\tencodeSchemaCompatibilitySnapshot,\n\tdecodeSchemaCompatibilitySnapshot,\n} from \"./simpleSchemaCodec.js\";\nexport {\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n} from \"./snapshotCompatibilityChecker.js\";\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { TreeStoredSchema } from "../../core/index.js";
6
6
  import type { SchemaCompatibilityStatus } from "./tree.js";
7
- import type { TreeSchema } from "./configuration.js";
7
+ import type { TreeSchema } from "../treeSchema.js";
8
8
  /**
9
9
  * A collection of View information for schema
10
10
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"schemaCompatibilityTester.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAG3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;GAIG;AACH,qBAAa,yBAAyB;IAEpC;;OAEG;aACa,UAAU,EAAE,UAAU;;IAHtC;;OAEG;IACa,UAAU,EAAE,UAAU;IAGvC;;;;;;;;;OASG;IACI,kBAAkB,CACxB,MAAM,EAAE,gBAAgB,GACtB,IAAI,CAAC,yBAAyB,EAAE,eAAe,CAAC;CA8BnD"}
1
+ {"version":3,"file":"schemaCompatibilityTester.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAG3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,yBAAyB;IAEpC;;OAEG;aACa,UAAU,EAAE,UAAU;;IAHtC;;OAEG;IACa,UAAU,EAAE,UAAU;IAGvC;;;;;;;;;OASG;IACI,kBAAkB,CACxB,MAAM,EAAE,gBAAgB,GACtB,IAAI,CAAC,yBAAyB,EAAE,eAAe,CAAC;CA8BnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"schemaCompatibilityTester.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAG3F,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD;;;;GAIG;AACH,MAAM,OAAO,yBAAyB;IACrC;IACC;;OAEG;IACa,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IACpC,CAAC;IAEJ;;;;;;;;;OASG;IACI,kBAAkB,CACxB,MAAwB;QAExB,qDAAqD;QACrD,MAAM,MAAM,GAAG,mBAAmB,CAAC;QAEnC,gHAAgH;QAChH,6HAA6H;QAC7H,sDAAsD;QACtD,8HAA8H;QAC9H,IAAI,OAAO,GAAG,IAAI,CAAC;QAEnB,KAAK,MAAM,YAAY,IAAI,gCAAgC,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,CAAC;YACtF,OAAO,GAAG,KAAK,CAAC;YAChB,MAAM;QACP,CAAC;QAED,MAAM,cAAc,GAAG,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAE7D,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;QAEtE,+EAA+E;QAC/E,0HAA0H;QAC1H,MAAM,YAAY,GACjB,OAAO,IAAI,UAAU,IAAI,kBAAkB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;QAE7E,OAAO;YACN,OAAO;YACP,UAAU;YACV,YAAY;SACZ,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TreeStoredSchema } from \"../../core/index.js\";\nimport { allowsRepoSuperset, defaultSchemaPolicy } from \"../../feature-libraries/index.js\";\n\nimport type { SchemaCompatibilityStatus } from \"./tree.js\";\nimport { getDiscrepanciesInAllowedContent } from \"./discrepancies.js\";\nimport { toUpgradeSchema } from \"../toStoredSchema.js\";\nimport type { TreeSchema } from \"./configuration.js\";\n\n/**\n * A collection of View information for schema\n * @remarks\n * This contains everything needed to determine compatibility with a given stored schema.\n */\nexport class SchemaCompatibilityTester {\n\tpublic constructor(\n\t\t/**\n\t\t * Schema for the view\n\t\t */\n\t\tpublic readonly viewSchema: TreeSchema,\n\t) {}\n\n\t/**\n\t * Determines the compatibility of a stored document\n\t * (based on its stored schema) with a viewer (based on its view schema).\n\t *\n\t * Adapters can be provided to handle differences between the two schema.\n\t * Adapters should only use to types in the `view` SchemaRepository.\n\t *\n\t * TODO: this API violates the parse don't validate design philosophy.\n\t * It should be wrapped with (or replaced by) a parse style API.\n\t */\n\tpublic checkCompatibility(\n\t\tstored: TreeStoredSchema,\n\t): Omit<SchemaCompatibilityStatus, \"canInitialize\"> {\n\t\t// The public API surface assumes defaultSchemaPolicy\n\t\tconst policy = defaultSchemaPolicy;\n\n\t\t// View schema allows a subset of documents that stored schema does, and the discrepancies are allowed by policy\n\t\t// determined by the view schema (i.e. objects with extra optional fields in the stored schema have opted into allowing this.\n\t\t// In the future, this would also include things like:\n\t\t// - fields with more allowed types in the stored schema than in the view schema have out-of-schema \"unknown content\" adapters\n\t\tlet canView = true;\n\n\t\tfor (const _discrepancy of getDiscrepanciesInAllowedContent(this.viewSchema, stored)) {\n\t\t\tcanView = false;\n\t\t\tbreak;\n\t\t}\n\n\t\tconst wouldUpgradeTo = toUpgradeSchema(this.viewSchema.root);\n\n\t\tconst canUpgrade = allowsRepoSuperset(policy, stored, wouldUpgradeTo);\n\n\t\t// If true, then upgrading has no effect on what can be stored in the document.\n\t\t// TODO: This should likely be changed to indicate up a schema upgrade would be a no-op, including stored schema metadata.\n\t\tconst isEquivalent =\n\t\t\tcanView && canUpgrade && allowsRepoSuperset(policy, wouldUpgradeTo, stored);\n\n\t\treturn {\n\t\t\tcanView,\n\t\t\tcanUpgrade,\n\t\t\tisEquivalent,\n\t\t};\n\t}\n}\n"]}
1
+ {"version":3,"file":"schemaCompatibilityTester.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAG3F,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD;;;;GAIG;AACH,MAAM,OAAO,yBAAyB;IACrC;IACC;;OAEG;IACa,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IACpC,CAAC;IAEJ;;;;;;;;;OASG;IACI,kBAAkB,CACxB,MAAwB;QAExB,qDAAqD;QACrD,MAAM,MAAM,GAAG,mBAAmB,CAAC;QAEnC,gHAAgH;QAChH,6HAA6H;QAC7H,sDAAsD;QACtD,8HAA8H;QAC9H,IAAI,OAAO,GAAG,IAAI,CAAC;QAEnB,KAAK,MAAM,YAAY,IAAI,gCAAgC,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,CAAC;YACtF,OAAO,GAAG,KAAK,CAAC;YAChB,MAAM;QACP,CAAC;QAED,MAAM,cAAc,GAAG,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAE7D,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;QAEtE,+EAA+E;QAC/E,0HAA0H;QAC1H,MAAM,YAAY,GACjB,OAAO,IAAI,UAAU,IAAI,kBAAkB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;QAE7E,OAAO;YACN,OAAO;YACP,UAAU;YACV,YAAY;SACZ,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TreeStoredSchema } from \"../../core/index.js\";\nimport { allowsRepoSuperset, defaultSchemaPolicy } from \"../../feature-libraries/index.js\";\n\nimport type { SchemaCompatibilityStatus } from \"./tree.js\";\nimport { getDiscrepanciesInAllowedContent } from \"./discrepancies.js\";\nimport { toUpgradeSchema } from \"../toStoredSchema.js\";\nimport type { TreeSchema } from \"../treeSchema.js\";\n\n/**\n * A collection of View information for schema\n * @remarks\n * This contains everything needed to determine compatibility with a given stored schema.\n */\nexport class SchemaCompatibilityTester {\n\tpublic constructor(\n\t\t/**\n\t\t * Schema for the view\n\t\t */\n\t\tpublic readonly viewSchema: TreeSchema,\n\t) {}\n\n\t/**\n\t * Determines the compatibility of a stored document\n\t * (based on its stored schema) with a viewer (based on its view schema).\n\t *\n\t * Adapters can be provided to handle differences between the two schema.\n\t * Adapters should only use to types in the `view` SchemaRepository.\n\t *\n\t * TODO: this API violates the parse don't validate design philosophy.\n\t * It should be wrapped with (or replaced by) a parse style API.\n\t */\n\tpublic checkCompatibility(\n\t\tstored: TreeStoredSchema,\n\t): Omit<SchemaCompatibilityStatus, \"canInitialize\"> {\n\t\t// The public API surface assumes defaultSchemaPolicy\n\t\tconst policy = defaultSchemaPolicy;\n\n\t\t// View schema allows a subset of documents that stored schema does, and the discrepancies are allowed by policy\n\t\t// determined by the view schema (i.e. objects with extra optional fields in the stored schema have opted into allowing this.\n\t\t// In the future, this would also include things like:\n\t\t// - fields with more allowed types in the stored schema than in the view schema have out-of-schema \"unknown content\" adapters\n\t\tlet canView = true;\n\n\t\tfor (const _discrepancy of getDiscrepanciesInAllowedContent(this.viewSchema, stored)) {\n\t\t\tcanView = false;\n\t\t\tbreak;\n\t\t}\n\n\t\tconst wouldUpgradeTo = toUpgradeSchema(this.viewSchema.root);\n\n\t\tconst canUpgrade = allowsRepoSuperset(policy, stored, wouldUpgradeTo);\n\n\t\t// If true, then upgrading has no effect on what can be stored in the document.\n\t\t// TODO: This should likely be changed to indicate up a schema upgrade would be a no-op, including stored schema metadata.\n\t\tconst isEquivalent =\n\t\t\tcanView && canUpgrade && allowsRepoSuperset(policy, wouldUpgradeTo, stored);\n\n\t\treturn {\n\t\t\tcanView,\n\t\t\tcanUpgrade,\n\t\t\tisEquivalent,\n\t\t};\n\t}\n}\n"]}
@@ -8,7 +8,7 @@ import type { ImplicitFieldSchema } from "../fieldSchema.js";
8
8
  import type { RestrictiveStringRecord } from "../../util/index.js";
9
9
  import type { NodeKind, TreeNodeSchemaClass, ImplicitAllowedTypes, WithType } from "../core/index.js";
10
10
  import type { ArrayNodeCustomizableSchemaUnsafe, MapNodeCustomizableSchemaUnsafe, System_Unsafe, TreeRecordNodeUnsafe } from "./typesUnsafe.js";
11
- import type { SimpleObjectNodeSchema } from "../simpleSchema.js";
11
+ import type { SchemaType, SimpleObjectNodeSchema } from "../simpleSchema.js";
12
12
  import { SchemaFactoryBeta } from "./schemaFactoryBeta.js";
13
13
  import type { FieldProps, FieldSchemaAlpha, FieldPropsAlpha, FieldKind } from "../fieldSchema.js";
14
14
  import type { LeafSchema } from "../leafNodeSchema.js";
@@ -47,11 +47,11 @@ export declare class SchemaFactoryAlpha<out TScope extends string | undefined =
47
47
  /**
48
48
  * {@inheritdoc SchemaFactory.objectRecursive}
49
49
  */
50
- objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>, const TCustomMetadata = unknown>(name: Name, t: T, options?: ObjectSchemaOptionsAlpha<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, System_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>, false, T, never, TCustomMetadata> & SimpleObjectNodeSchema<TCustomMetadata> & Pick<ObjectNodeSchema, "fields">;
50
+ objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>, const TCustomMetadata = unknown>(name: Name, t: T, options?: ObjectSchemaOptionsAlpha<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, System_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>, false, T, never, TCustomMetadata> & SimpleObjectNodeSchema<SchemaType.View, TCustomMetadata> & Pick<ObjectNodeSchema, "fields">;
51
51
  /**
52
52
  * {@inheritDoc SchemaStatics.leaves}
53
53
  */
54
- static readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema, LeafSchema<"null", null> & SimpleLeafNodeSchema, LeafSchema<"handle", import("@fluidframework/core-interfaces").IFluidHandle<unknown>> & SimpleLeafNodeSchema];
54
+ static readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", import("@fluidframework/core-interfaces").IFluidHandle<unknown>> & SimpleLeafNodeSchema<SchemaType>];
55
55
  /**
56
56
  * {@inheritDoc SchemaStatics.optional}
57
57
  */
@@ -71,11 +71,11 @@ export declare class SchemaFactoryAlpha<out TScope extends string | undefined =
71
71
  /**
72
72
  * Like {@link SchemaFactory.identifier} but static and a factory function that can be provided {@link FieldProps}.
73
73
  */
74
- static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Identifier, LeafSchema<"string", string> & SimpleLeafNodeSchema, TCustomMetadata>;
74
+ static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Identifier, LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, TCustomMetadata>;
75
75
  /**
76
76
  * {@inheritDoc SchemaStatics.leaves}
77
77
  */
78
- readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema, LeafSchema<"null", null> & SimpleLeafNodeSchema, LeafSchema<"handle", import("@fluidframework/core-interfaces").IFluidHandle<unknown>> & SimpleLeafNodeSchema];
78
+ readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", import("@fluidframework/core-interfaces").IFluidHandle<unknown>> & SimpleLeafNodeSchema<SchemaType>];
79
79
  /**
80
80
  * {@inheritDoc SchemaStatics.optional}
81
81
  */
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFactoryAlpha.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactoryAlpha.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,2BAA2B,EAEhC,KAAK,yBAAyB,EAE9B,KAAK,gBAAgB,EAErB,KAAK,4BAA4B,EAEjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGN,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7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esContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype ArrayNodeCustomizableSchema,\n\tarraySchema,\n\ttype MapNodeCustomizableSchema,\n\tmapSchema,\n\ttype ObjectNodeSchema,\n\tobjectSchema,\n\ttype RecordNodeCustomizableSchema,\n\trecordSchema,\n} from \"../node-kinds/index.js\";\nimport {\n\tdefaultSchemaFactoryObjectOptions,\n\tscoped,\n\ttype NodeSchemaOptionsAlpha,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ScopedSchemaName,\n} from \"./schemaFactory.js\";\nimport { schemaStatics } from \"./schemaStatics.js\";\nimport type { ImplicitFieldSchema } from \"../fieldSchema.js\";\nimport type { RestrictiveStringRecord } from \"../../util/index.js\";\nimport type {\n\tNodeKind,\n\tTreeNodeSchemaClass,\n\tImplicitAllowedTypes,\n\tWithType,\n} from \"../core/index.js\";\nimport type {\n\tArrayNodeCustomizableSchemaUnsafe,\n\tMapNodeCustomizableSchemaUnsafe,\n\tSystem_Unsafe,\n\tTreeRecordNodeUnsafe,\n} from \"./typesUnsafe.js\";\nimport type { SimpleObjectNodeSchema } from \"../simpleSchema.js\";\nimport { SchemaFactoryBeta } from \"./schemaFactoryBeta.js\";\n\n// These imports prevent a large number of type references in the API reports from showing up as *_2.\n/* eslint-disable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars, import-x/no-duplicates */\nimport type {\n\tFieldProps,\n\tFieldSchemaAlpha,\n\tFieldPropsAlpha,\n\tFieldKind,\n} from \"../fieldSchema.js\";\nimport type { LeafSchema } from \"../leafNodeSchema.js\";\nimport type { SimpleLeafNodeSchema } from \"../simpleSchema.js\";\nimport type { FieldSchemaAlphaUnsafe } from \"./typesUnsafe.js\";\n/* eslint-enable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars, import-x/no-duplicates */\n\n/**\n * {@link SchemaFactory} with additional alpha APIs.\n *\n * @alpha\n * @privateRemarks\n * When building schema, when `options` is not provided, `TCustomMetadata` is inferred as `unknown`.\n * If desired, this could be made to infer `undefined` instead by adding overloads for everything,\n * but currently it is not worth the maintenance overhead as there is no use case which this is known to be helpful for.\n */\nexport class SchemaFactoryAlpha<\n\tout TScope extends string | undefined = string | undefined,\n\tTName extends number | string = string,\n> extends SchemaFactoryBeta<TScope, TName> {\n\t/**\n\t * Define a {@link TreeNodeSchemaClass} for a {@link TreeObjectNode}.\n\t *\n\t * @param name - Unique identifier for this schema within this factory's scope.\n\t * @param fields - Schema for fields of the object node's schema. Defines what children can be placed under each key.\n\t * @param options - Additional options for the schema.\n\t */\n\tpublic objectAlpha<\n\t\tconst Name extends TName,\n\t\tconst T extends RestrictiveStringRecord<ImplicitFieldSchema>,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tfields: T,\n\t\toptions?: ObjectSchemaOptionsAlpha<TCustomMetadata>,\n\t): ObjectNodeSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> & {\n\t\t/**\n\t\t * Typing checking workaround: not for for actual use.\n\t\t * @remarks\n\t\t * This API collides with {@link TreeNodeSchemaCore.createFromInsertable} to disable a type checking optimization which produces different and undesired results.\n\t\t * See {@link https://github.com/microsoft/TypeScript/issues/59049#issuecomment-2773459693} for more details.\n\t\t * @privateRemarks\n\t\t * The specific issue here is non-empty POJO mode object schema not being assignable to `ObjectNodeSchema`,\n\t\t * See the above link and the tests in objectNode.spec.ts which reference it.\n\t\t * @system\n\t\t */\n\t\treadonly createFromInsertable: unknown;\n\t} {\n\t\treturn objectSchema(scoped<TScope, TName, Name>(this, name), fields, true, {\n\t\t\t...defaultSchemaFactoryObjectOptions,\n\t\t\t...(options ?? {}),\n\t\t});\n\t}\n\n\t/**\n\t * {@inheritdoc SchemaFactory.objectRecursive}\n\t */\n\tpublic override objectRecursive<\n\t\tconst Name extends TName,\n\t\tconst T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tt: T,\n\t\toptions?: ObjectSchemaOptionsAlpha<TCustomMetadata>,\n\t): TreeNodeSchemaClass<\n\t\tScopedSchemaName<TScope, Name>,\n\t\tNodeKind.Object,\n\t\tSystem_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>,\n\t\tobject & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>,\n\t\tfalse,\n\t\tT,\n\t\tnever,\n\t\tTCustomMetadata\n\t> &\n\t\tSimpleObjectNodeSchema<TCustomMetadata> &\n\t\t// We can't just use non generic `ObjectNodeSchema` here since \"Base constructors must all have the same return type\".\n\t\t// We also can't just use generic `ObjectNodeSchema` here and not `TreeNodeSchemaClass` since that doesn't work with unsafe recursive types.\n\t\t// ObjectNodeSchema<\n\t\t// \tScopedSchemaName<TScope, Name>,\n\t\t// \t// T & RestrictiveStringRecord<ImplicitFieldSchema> would be nice to use here, but it breaks the recursive type self references.\n\t\t// \tRestrictiveStringRecord<ImplicitFieldSchema>,\n\t\t// \tfalse,\n\t\t// \tTCustomMetadata\n\t\t// >\n\t\tPick<ObjectNodeSchema, \"fields\"> {\n\t\t// TODO: syntax highting is vs code is broken here. Don't trust it. Use the compiler instead.\n\t\ttype TScopedName = ScopedSchemaName<TScope, Name>;\n\t\treturn this.objectAlpha(\n\t\t\tname,\n\t\t\tt as T & RestrictiveStringRecord<ImplicitFieldSchema>,\n\t\t\toptions,\n\t\t) as unknown as TreeNodeSchemaClass<\n\t\t\tTScopedName,\n\t\t\tNodeKind.Object,\n\t\t\tSystem_Unsafe.TreeObjectNodeUnsafe<T, TScopedName>,\n\t\t\tobject & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>,\n\t\t\tfalse,\n\t\t\tT,\n\t\t\tnever,\n\t\t\tTCustomMetadata\n\t\t> &\n\t\t\tObjectNodeSchema<\n\t\t\t\tScopedSchemaName<TScope, Name>,\n\t\t\t\tRestrictiveStringRecord<ImplicitFieldSchema>,\n\t\t\t\tfalse,\n\t\t\t\tTCustomMetadata\n\t\t\t>;\n\t}\n\n\t/**\n\t * {@inheritDoc SchemaStatics.leaves}\n\t */\n\tpublic static override readonly leaves = schemaStatics.leaves;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.optional}\n\t */\n\tpublic static override readonly optional = schemaStatics.optional;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.required}\n\t */\n\tpublic static override readonly required = schemaStatics.required;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.optionalRecursive}\n\t */\n\tpublic static override readonly optionalRecursive = schemaStatics.optionalRecursive;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.requiredRecursive}\n\t */\n\tpublic static override readonly requiredRecursive = schemaStatics.requiredRecursive;\n\n\t/**\n\t * Like {@link SchemaFactory.identifier} but static and a factory function that can be provided {@link FieldProps}.\n\t */\n\tpublic static readonly identifier = schemaStatics.identifier;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.leaves}\n\t */\n\tpublic override readonly leaves = schemaStatics.leaves;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.optional}\n\t */\n\tpublic override readonly optional = schemaStatics.optional;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.required}\n\t */\n\tpublic override readonly required = schemaStatics.required;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.optionalRecursive}\n\t */\n\tpublic override readonly optionalRecursive = schemaStatics.optionalRecursive;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.requiredRecursive}\n\t */\n\tpublic override readonly requiredRecursive = schemaStatics.requiredRecursive;\n\n\t/**\n\t * Define a {@link TreeNodeSchema} for a {@link TreeMapNode}.\n\t *\n\t * @param name - Unique identifier for this schema within this factory's scope.\n\t * @param allowedTypes - The types that may appear as values in the map.\n\t * @param options - Additional options for the schema.\n\t *\n\t * @example\n\t * ```typescript\n\t * class NamedMap extends factory.map(\"name\", factory.number, {\n\t * \tmetadata: { description: \"A map of numbers\" }\n\t * }) {}\n\t * ```\n\t */\n\tpublic mapAlpha<\n\t\tName extends TName,\n\t\tconst T extends ImplicitAllowedTypes,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tallowedTypes: T,\n\t\toptions?: NodeSchemaOptionsAlpha<TCustomMetadata>,\n\t): MapNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> {\n\t\treturn mapSchema(\n\t\t\tscoped<TScope, TName, Name>(this, name),\n\t\t\tallowedTypes,\n\t\t\ttrue,\n\t\t\ttrue,\n\t\t\toptions,\n\t\t);\n\t}\n\n\t/**\n\t * {@inheritDoc SchemaFactory.objectRecursive}\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tpublic override mapRecursive<\n\t\tName extends TName,\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>) {\n\t\treturn this.mapAlpha(\n\t\t\tname,\n\t\t\tallowedTypes as T & ImplicitAllowedTypes,\n\t\t\toptions,\n\t\t) as unknown as MapNodeCustomizableSchemaUnsafe<\n\t\t\tScopedSchemaName<TScope, Name>,\n\t\t\tT,\n\t\t\tTCustomMetadata\n\t\t>;\n\t}\n\n\t/**\n\t * Define a {@link TreeNodeSchemaClass} for a {@link (TreeArrayNode:interface)}.\n\t *\n\t * @param name - Unique identifier for this schema within this factory's scope.\n\t * @param allowedTypes - The types that may appear in the array.\n\t * @param options - Additional options for the schema.\n\t *\n\t * @example\n\t * ```typescript\n\t * class NamedArray extends factory.arrayAlpha(\"name\", factory.number) {}\n\t * ```\n\t */\n\tpublic arrayAlpha<\n\t\tconst Name extends TName,\n\t\tconst T extends ImplicitAllowedTypes,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tallowedTypes: T,\n\t\toptions?: NodeSchemaOptionsAlpha<TCustomMetadata>,\n\t): ArrayNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> {\n\t\treturn arraySchema(\n\t\t\tscoped<TScope, TName, Name>(this, name),\n\t\t\tallowedTypes,\n\t\t\ttrue,\n\t\t\ttrue,\n\t\t\toptions ?? {},\n\t\t);\n\t}\n\n\t/**\n\t * {@link SchemaFactory.arrayRecursive} but with support for some alpha features.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tpublic override arrayRecursive<\n\t\tconst Name extends TName,\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>) {\n\t\treturn this.arrayAlpha(\n\t\t\tname,\n\t\t\tallowedTypes as T & ImplicitAllowedTypes,\n\t\t\toptions,\n\t\t) as unknown as ArrayNodeCustomizableSchemaUnsafe<\n\t\t\tScopedSchemaName<TScope, Name>,\n\t\t\tT,\n\t\t\tTCustomMetadata\n\t\t>;\n\t}\n\n\t/**\n\t * Define (and add to this library) a {@link TreeNodeSchemaClass} for a {@link (TreeRecordNode:interface)}.\n\t *\n\t * @param name - Unique identifier for this schema within this factory's scope.\n\t * @param allowedTypes - The types that may appear in the record.\n\t * @param options - Additional options for the schema.\n\t *\n\t * @example\n\t * ```typescript\n\t * class NamedRecord extends factory.recordAlpha(\"name\", factory.number) {}\n\t * ```\n\t */\n\tpublic recordAlpha<\n\t\tconst Name extends TName,\n\t\tconst T extends ImplicitAllowedTypes,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tallowedTypes: T,\n\t\toptions?: NodeSchemaOptionsAlpha<TCustomMetadata>,\n\t): RecordNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> {\n\t\treturn recordSchema({\n\t\t\tidentifier: scoped<TScope, TName, Name>(this, name),\n\t\t\tinfo: allowedTypes,\n\t\t\tcustomizable: true,\n\t\t\timplicitlyConstructable: true,\n\t\t\tnodeOptions: options,\n\t\t});\n\t}\n\n\t/**\n\t * {@link SchemaFactoryBeta.(record:2)} except tweaked to work better for recursive types.\n\t * Use with {@link ValidateRecursiveSchema} for improved type safety.\n\t * @remarks\n\t * This version of `SchemaFactory.record` uses the same workarounds as {@link SchemaFactory.objectRecursive}.\n\t * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tpublic override recordRecursive<\n\t\tName extends TName,\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>) {\n\t\tconst RecordSchema = recordSchema({\n\t\t\tidentifier: scoped<TScope, TName, Name>(this, name),\n\t\t\tinfo: allowedTypes as T & ImplicitAllowedTypes,\n\t\t\tcustomizable: true,\n\t\t\t// Setting this to true seems to work ok currently, but not for other node kinds.\n\t\t\t// Supporting this could be fragile and might break other future changes, so it's being kept as false for now.\n\t\t\timplicitlyConstructable: false,\n\t\t\tnodeOptions: options,\n\t\t});\n\n\t\treturn RecordSchema as TreeNodeSchemaClass<\n\t\t\t/* Name */ ScopedSchemaName<TScope, Name>,\n\t\t\t/* Kind */ NodeKind.Record,\n\t\t\t/* TNode */ TreeRecordNodeUnsafe<T> &\n\t\t\t\tWithType<ScopedSchemaName<TScope, Name>, NodeKind.Record>,\n\t\t\t/* TInsertable */ {\n\t\t\t\t// Ideally this would be\n\t\t\t\t// RestrictiveStringRecord<InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>,\n\t\t\t\t// but doing so breaks recursive types.\n\t\t\t\t// Instead we do a less nice version:\n\t\t\t\treadonly [P in string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;\n\t\t\t},\n\t\t\t/* ImplicitlyConstructable */ false,\n\t\t\t/* Info */ T,\n\t\t\t/* TConstructorExtra */ undefined,\n\t\t\t/* TCustomMetadata */ TCustomMetadata\n\t\t>;\n\t}\n\n\t/**\n\t * {@inheritDoc SchemaFactoryBeta.scopedFactory}\n\t */\n\tpublic scopedFactoryAlpha<\n\t\tconst T extends TName,\n\t\tTNameInner extends number | string = string,\n\t>(name: T): SchemaFactoryAlpha<ScopedSchemaName<TScope, T>, TNameInner> {\n\t\treturn new SchemaFactoryAlpha(scoped<TScope, TName, T>(this, name));\n\t}\n}\n"]}
1
+ {"version":3,"file":"schemaFactoryAlpha.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactoryAlpha.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,WAAW,EAEX,SAAS,EAET,YAAY,EAEZ,YAAY,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,iCAAiC,EACjC,MAAM,GAIN,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAgBnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAa3D,+GAA+G;AAE/G;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAGX,SAAQ,iBAAgC;IAH1C;;QA4HC;;WAEG;QACsB,WAAM,GAAG,aAAa,CAAC,MAAM,CAAC;QAEvD;;WAEG;QACsB,aAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;QAE3D;;WAEG;QACsB,aAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;QAE3D;;WAEG;QACsB,sBAAiB,GAAG,aAAa,CAAC,iBAAiB,CAAC;QAE7E;;WAEG;QACsB,sBAAiB,GAAG,aAAa,CAAC,iBAAiB,CAAC;IAyL9E,CAAC;IAxUA;;;;;;OAMG;IACI,WAAW,CAKjB,IAAU,EACV,MAAS,EACT,OAAmD;QAcnD,OAAO,YAAY,CAAC,MAAM,CAAsB,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;YAC1E,GAAG,iCAAiC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AAO;SACpB,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,4EAA4E;IAC5D,eAAe,CAI7B,IAAU,EAAE,YAAe,EAAE,OAAiD;QAC/E,MAAM,YAAY,GAAG,YAAY,CAAC;YACjC,UAAU,EAAE,MAAM,CAAsB,IAAI,EAAE,IAAI,CAAC;YACnD,IAAI,EAAE,YAAwC;YAC9C,YAAY,EAAE,IAAI;YAClB,iFAAiF;YACjF,8GAA8G;YAC9G,uBAAuB,EAAE,KAAK;YAC9B,WAAW,EAAE,OAAO;SACpB,CAAC,CAAC;QAEH,OAAO,YAgBN,CAAC;IACH,CAAC;IAED;;OAEG;IACI,kBAAkB,CAGvB,IAAO;QACR,OAAO,IAAI,kBAAkB,CAAC,MAAM,CAAmB,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IACrE,CAAC;;AA7OD;;GAEG;AAC6B,yBAAM,GAAG,aAAa,CAAC,MAAM,AAAvB,CAAwB;AAE9D;;GAEG;AAC6B,2BAAQ,GAAG,aAAa,CAAC,QAAQ,AAAzB,CAA0B;AAElE;;GAEG;AAC6B,2BAAQ,GAAG,aAAa,CAAC,QAAQ,AAAzB,CAA0B;AAElE;;GAEG;AAC6B,oCAAiB,GAAG,aAAa,CAAC,iBAAiB,AAAlC,CAAmC;AAEpF;;GAEG;AAC6B,oCAAiB,GAAG,aAAa,CAAC,iBAAiB,AAAlC,CAAmC;AAEpF;;GAEG;AACoB,6BAAU,GAAG,aAAa,CAAC,UAAU,AAA3B,CAA4B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype ArrayNodeCustomizableSchema,\n\tarraySchema,\n\ttype MapNodeCustomizableSchema,\n\tmapSchema,\n\ttype ObjectNodeSchema,\n\tobjectSchema,\n\ttype RecordNodeCustomizableSchema,\n\trecordSchema,\n} from \"../node-kinds/index.js\";\nimport {\n\tdefaultSchemaFactoryObjectOptions,\n\tscoped,\n\ttype NodeSchemaOptionsAlpha,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ScopedSchemaName,\n} from \"./schemaFactory.js\";\nimport { schemaStatics } from \"./schemaStatics.js\";\nimport type { ImplicitFieldSchema } from \"../fieldSchema.js\";\nimport type { RestrictiveStringRecord } from \"../../util/index.js\";\nimport type {\n\tNodeKind,\n\tTreeNodeSchemaClass,\n\tImplicitAllowedTypes,\n\tWithType,\n} from \"../core/index.js\";\nimport type {\n\tArrayNodeCustomizableSchemaUnsafe,\n\tMapNodeCustomizableSchemaUnsafe,\n\tSystem_Unsafe,\n\tTreeRecordNodeUnsafe,\n} from \"./typesUnsafe.js\";\nimport type { SchemaType, SimpleObjectNodeSchema } from \"../simpleSchema.js\";\nimport { SchemaFactoryBeta } from \"./schemaFactoryBeta.js\";\n\n// These imports prevent a large number of type references in the API reports from showing up as *_2.\n/* eslint-disable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars, import-x/no-duplicates */\nimport type {\n\tFieldProps,\n\tFieldSchemaAlpha,\n\tFieldPropsAlpha,\n\tFieldKind,\n} from \"../fieldSchema.js\";\nimport type { LeafSchema } from \"../leafNodeSchema.js\";\nimport type { SimpleLeafNodeSchema } from \"../simpleSchema.js\";\nimport type { FieldSchemaAlphaUnsafe } from \"./typesUnsafe.js\";\n/* eslint-enable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars, import-x/no-duplicates */\n\n/**\n * {@link SchemaFactory} with additional alpha APIs.\n *\n * @alpha\n * @privateRemarks\n * When building schema, when `options` is not provided, `TCustomMetadata` is inferred as `unknown`.\n * If desired, this could be made to infer `undefined` instead by adding overloads for everything,\n * but currently it is not worth the maintenance overhead as there is no use case which this is known to be helpful for.\n */\nexport class SchemaFactoryAlpha<\n\tout TScope extends string | undefined = string | undefined,\n\tTName extends number | string = string,\n> extends SchemaFactoryBeta<TScope, TName> {\n\t/**\n\t * Define a {@link TreeNodeSchemaClass} for a {@link TreeObjectNode}.\n\t *\n\t * @param name - Unique identifier for this schema within this factory's scope.\n\t * @param fields - Schema for fields of the object node's schema. Defines what children can be placed under each key.\n\t * @param options - Additional options for the schema.\n\t */\n\tpublic objectAlpha<\n\t\tconst Name extends TName,\n\t\tconst T extends RestrictiveStringRecord<ImplicitFieldSchema>,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tfields: T,\n\t\toptions?: ObjectSchemaOptionsAlpha<TCustomMetadata>,\n\t): ObjectNodeSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> & {\n\t\t/**\n\t\t * Typing checking workaround: not for for actual use.\n\t\t * @remarks\n\t\t * This API collides with {@link TreeNodeSchemaCore.createFromInsertable} to disable a type checking optimization which produces different and undesired results.\n\t\t * See {@link https://github.com/microsoft/TypeScript/issues/59049#issuecomment-2773459693} for more details.\n\t\t * @privateRemarks\n\t\t * The specific issue here is non-empty POJO mode object schema not being assignable to `ObjectNodeSchema`,\n\t\t * See the above link and the tests in objectNode.spec.ts which reference it.\n\t\t * @system\n\t\t */\n\t\treadonly createFromInsertable: unknown;\n\t} {\n\t\treturn objectSchema(scoped<TScope, TName, Name>(this, name), fields, true, {\n\t\t\t...defaultSchemaFactoryObjectOptions,\n\t\t\t...(options ?? {}),\n\t\t});\n\t}\n\n\t/**\n\t * {@inheritdoc SchemaFactory.objectRecursive}\n\t */\n\tpublic override objectRecursive<\n\t\tconst Name extends TName,\n\t\tconst T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tt: T,\n\t\toptions?: ObjectSchemaOptionsAlpha<TCustomMetadata>,\n\t): TreeNodeSchemaClass<\n\t\tScopedSchemaName<TScope, Name>,\n\t\tNodeKind.Object,\n\t\tSystem_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>,\n\t\tobject & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>,\n\t\tfalse,\n\t\tT,\n\t\tnever,\n\t\tTCustomMetadata\n\t> &\n\t\tSimpleObjectNodeSchema<SchemaType.View, TCustomMetadata> &\n\t\t// We can't just use non generic `ObjectNodeSchema` here since \"Base constructors must all have the same return type\".\n\t\t// We also can't just use generic `ObjectNodeSchema` here and not `TreeNodeSchemaClass` since that doesn't work with unsafe recursive types.\n\t\t// ObjectNodeSchema<\n\t\t// \tScopedSchemaName<TScope, Name>,\n\t\t// \t// T & RestrictiveStringRecord<ImplicitFieldSchema> would be nice to use here, but it breaks the recursive type self references.\n\t\t// \tRestrictiveStringRecord<ImplicitFieldSchema>,\n\t\t// \tfalse,\n\t\t// \tTCustomMetadata\n\t\t// >\n\t\tPick<ObjectNodeSchema, \"fields\"> {\n\t\t// TODO: syntax highting is vs code is broken here. Don't trust it. Use the compiler instead.\n\t\ttype TScopedName = ScopedSchemaName<TScope, Name>;\n\t\treturn this.objectAlpha(\n\t\t\tname,\n\t\t\tt as T & RestrictiveStringRecord<ImplicitFieldSchema>,\n\t\t\toptions,\n\t\t) as unknown as TreeNodeSchemaClass<\n\t\t\tTScopedName,\n\t\t\tNodeKind.Object,\n\t\t\tSystem_Unsafe.TreeObjectNodeUnsafe<T, TScopedName>,\n\t\t\tobject & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>,\n\t\t\tfalse,\n\t\t\tT,\n\t\t\tnever,\n\t\t\tTCustomMetadata\n\t\t> &\n\t\t\tObjectNodeSchema<\n\t\t\t\tScopedSchemaName<TScope, Name>,\n\t\t\t\tRestrictiveStringRecord<ImplicitFieldSchema>,\n\t\t\t\tfalse,\n\t\t\t\tTCustomMetadata\n\t\t\t>;\n\t}\n\n\t/**\n\t * {@inheritDoc SchemaStatics.leaves}\n\t */\n\tpublic static override readonly leaves = schemaStatics.leaves;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.optional}\n\t */\n\tpublic static override readonly optional = schemaStatics.optional;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.required}\n\t */\n\tpublic static override readonly required = schemaStatics.required;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.optionalRecursive}\n\t */\n\tpublic static override readonly optionalRecursive = schemaStatics.optionalRecursive;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.requiredRecursive}\n\t */\n\tpublic static override readonly requiredRecursive = schemaStatics.requiredRecursive;\n\n\t/**\n\t * Like {@link SchemaFactory.identifier} but static and a factory function that can be provided {@link FieldProps}.\n\t */\n\tpublic static readonly identifier = schemaStatics.identifier;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.leaves}\n\t */\n\tpublic override readonly leaves = schemaStatics.leaves;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.optional}\n\t */\n\tpublic override readonly optional = schemaStatics.optional;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.required}\n\t */\n\tpublic override readonly required = schemaStatics.required;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.optionalRecursive}\n\t */\n\tpublic override readonly optionalRecursive = schemaStatics.optionalRecursive;\n\n\t/**\n\t * {@inheritDoc SchemaStatics.requiredRecursive}\n\t */\n\tpublic override readonly requiredRecursive = schemaStatics.requiredRecursive;\n\n\t/**\n\t * Define a {@link TreeNodeSchema} for a {@link TreeMapNode}.\n\t *\n\t * @param name - Unique identifier for this schema within this factory's scope.\n\t * @param allowedTypes - The types that may appear as values in the map.\n\t * @param options - Additional options for the schema.\n\t *\n\t * @example\n\t * ```typescript\n\t * class NamedMap extends factory.map(\"name\", factory.number, {\n\t * \tmetadata: { description: \"A map of numbers\" }\n\t * }) {}\n\t * ```\n\t */\n\tpublic mapAlpha<\n\t\tName extends TName,\n\t\tconst T extends ImplicitAllowedTypes,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tallowedTypes: T,\n\t\toptions?: NodeSchemaOptionsAlpha<TCustomMetadata>,\n\t): MapNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> {\n\t\treturn mapSchema(\n\t\t\tscoped<TScope, TName, Name>(this, name),\n\t\t\tallowedTypes,\n\t\t\ttrue,\n\t\t\ttrue,\n\t\t\toptions,\n\t\t);\n\t}\n\n\t/**\n\t * {@inheritDoc SchemaFactory.objectRecursive}\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tpublic override mapRecursive<\n\t\tName extends TName,\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>) {\n\t\treturn this.mapAlpha(\n\t\t\tname,\n\t\t\tallowedTypes as T & ImplicitAllowedTypes,\n\t\t\toptions,\n\t\t) as unknown as MapNodeCustomizableSchemaUnsafe<\n\t\t\tScopedSchemaName<TScope, Name>,\n\t\t\tT,\n\t\t\tTCustomMetadata\n\t\t>;\n\t}\n\n\t/**\n\t * Define a {@link TreeNodeSchemaClass} for a {@link (TreeArrayNode:interface)}.\n\t *\n\t * @param name - Unique identifier for this schema within this factory's scope.\n\t * @param allowedTypes - The types that may appear in the array.\n\t * @param options - Additional options for the schema.\n\t *\n\t * @example\n\t * ```typescript\n\t * class NamedArray extends factory.arrayAlpha(\"name\", factory.number) {}\n\t * ```\n\t */\n\tpublic arrayAlpha<\n\t\tconst Name extends TName,\n\t\tconst T extends ImplicitAllowedTypes,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tallowedTypes: T,\n\t\toptions?: NodeSchemaOptionsAlpha<TCustomMetadata>,\n\t): ArrayNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> {\n\t\treturn arraySchema(\n\t\t\tscoped<TScope, TName, Name>(this, name),\n\t\t\tallowedTypes,\n\t\t\ttrue,\n\t\t\ttrue,\n\t\t\toptions ?? {},\n\t\t);\n\t}\n\n\t/**\n\t * {@link SchemaFactory.arrayRecursive} but with support for some alpha features.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tpublic override arrayRecursive<\n\t\tconst Name extends TName,\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>) {\n\t\treturn this.arrayAlpha(\n\t\t\tname,\n\t\t\tallowedTypes as T & ImplicitAllowedTypes,\n\t\t\toptions,\n\t\t) as unknown as ArrayNodeCustomizableSchemaUnsafe<\n\t\t\tScopedSchemaName<TScope, Name>,\n\t\t\tT,\n\t\t\tTCustomMetadata\n\t\t>;\n\t}\n\n\t/**\n\t * Define (and add to this library) a {@link TreeNodeSchemaClass} for a {@link (TreeRecordNode:interface)}.\n\t *\n\t * @param name - Unique identifier for this schema within this factory's scope.\n\t * @param allowedTypes - The types that may appear in the record.\n\t * @param options - Additional options for the schema.\n\t *\n\t * @example\n\t * ```typescript\n\t * class NamedRecord extends factory.recordAlpha(\"name\", factory.number) {}\n\t * ```\n\t */\n\tpublic recordAlpha<\n\t\tconst Name extends TName,\n\t\tconst T extends ImplicitAllowedTypes,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tallowedTypes: T,\n\t\toptions?: NodeSchemaOptionsAlpha<TCustomMetadata>,\n\t): RecordNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> {\n\t\treturn recordSchema({\n\t\t\tidentifier: scoped<TScope, TName, Name>(this, name),\n\t\t\tinfo: allowedTypes,\n\t\t\tcustomizable: true,\n\t\t\timplicitlyConstructable: true,\n\t\t\tnodeOptions: options,\n\t\t});\n\t}\n\n\t/**\n\t * {@link SchemaFactoryBeta.(record:2)} except tweaked to work better for recursive types.\n\t * Use with {@link ValidateRecursiveSchema} for improved type safety.\n\t * @remarks\n\t * This version of `SchemaFactory.record` uses the same workarounds as {@link SchemaFactory.objectRecursive}.\n\t * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tpublic override recordRecursive<\n\t\tName extends TName,\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>) {\n\t\tconst RecordSchema = recordSchema({\n\t\t\tidentifier: scoped<TScope, TName, Name>(this, name),\n\t\t\tinfo: allowedTypes as T & ImplicitAllowedTypes,\n\t\t\tcustomizable: true,\n\t\t\t// Setting this to true seems to work ok currently, but not for other node kinds.\n\t\t\t// Supporting this could be fragile and might break other future changes, so it's being kept as false for now.\n\t\t\timplicitlyConstructable: false,\n\t\t\tnodeOptions: options,\n\t\t});\n\n\t\treturn RecordSchema as TreeNodeSchemaClass<\n\t\t\t/* Name */ ScopedSchemaName<TScope, Name>,\n\t\t\t/* Kind */ NodeKind.Record,\n\t\t\t/* TNode */ TreeRecordNodeUnsafe<T> &\n\t\t\t\tWithType<ScopedSchemaName<TScope, Name>, NodeKind.Record>,\n\t\t\t/* TInsertable */ {\n\t\t\t\t// Ideally this would be\n\t\t\t\t// RestrictiveStringRecord<InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>,\n\t\t\t\t// but doing so breaks recursive types.\n\t\t\t\t// Instead we do a less nice version:\n\t\t\t\treadonly [P in string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;\n\t\t\t},\n\t\t\t/* ImplicitlyConstructable */ false,\n\t\t\t/* Info */ T,\n\t\t\t/* TConstructorExtra */ undefined,\n\t\t\t/* TCustomMetadata */ TCustomMetadata\n\t\t>;\n\t}\n\n\t/**\n\t * {@inheritDoc SchemaFactoryBeta.scopedFactory}\n\t */\n\tpublic scopedFactoryAlpha<\n\t\tconst T extends TName,\n\t\tTNameInner extends number | string = string,\n\t>(name: T): SchemaFactoryAlpha<ScopedSchemaName<TScope, T>, TNameInner> {\n\t\treturn new SchemaFactoryAlpha(scoped<TScope, TName, T>(this, name));\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AAgB,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAG;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC,SAAS,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC"}
@@ -2,7 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- /* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag */
6
5
  /**
7
6
  * Does nothing with the provided value, but appears to use it to make unused locals warnings and errors go away.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFactoryRecursive.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactoryRecursive.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+OH,mEAAmE;AAEnE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAI,CAAK,IAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { RestrictiveStringRecord } from \"../../util/index.js\";\nimport type {\n\tNodeKind,\n\tTreeNodeSchema,\n\tWithType,\n\tTreeNode,\n\tImplicitAllowedTypes,\n\tInsertableTreeNodeFromImplicitAllowedTypes,\n\tTreeNodeSchemaClass,\n} from \"../core/index.js\";\nimport type { InsertableObjectFromSchemaRecord } from \"../node-kinds/index.js\";\nimport type { ImplicitFieldSchema } from \"../fieldSchema.js\";\n\n/**\n * Compile time check for validity of a recursive schema.\n * This type also serves as a central location for documenting the requirements and issues related to recursive schema.\n *\n * @example\n * ```typescript\n * class Test extends sf.arrayRecursive(\"Test\", [() => Test]) {}\n * {\n * type _check = ValidateRecursiveSchema<typeof Test>;\n * }\n * ```\n * @remarks\n * In this context recursive schema are defined as all {@link FieldSchema} and {@link TreeNodeSchema} schema which are part of a cycle such that walking down through each {@link TreeNodeSchemaCore.childTypes} the given starting schema can be reached again.\n * Schema referencing the recursive schema and schema they reference that are not part of a cycle are not considered recursive.\n *\n * TypeScript puts a lot of limitations on the typing of recursive schema.\n * To help avoid running into these limitations and thus getting schema that do not type check (or only type checks sometimes!),\n * {@link SchemaFactory} provides APIs (postfixed with `Recursive`) for writing recursive schema.\n * These APIs when combined with the patterns documented below should ensure that the schema provide robust type checking.\n * These special patterns (other than {@link LazyItem} forward references which are not recursion specific)\n * are not required for correct runtime behavior: they exist entirely to mitigate TypeScript type checking limitations and bugs.\n * Ideally TypeScript's type checker would be able to handle all of these cases and more, removing the need for recursive type specific guidance, rules and APIs.\n * Currently however there are open issues preventing this:\n * {@link https://github.com/microsoft/TypeScript/issues/59550 | 1},\n * {@link https://github.com/microsoft/TypeScript/issues/55832 | 2},\n * {@link https://github.com/microsoft/TypeScript/issues/55758 | 3}.\n * Note that the proposed resolution to some of these issues is for the compiler to error rather than allow the case,\n * so even if these are all resolved the recursive type workarounds may still be needed.\n *\n * # Patterns\n *\n * Below are patterns for how to use recursive schema.\n *\n * ## General Patterns\n *\n * When defining a recursive {@link TreeNodeSchema}, use the `*Recursive` {@link SchemaFactory} methods.\n * The returned class should be used as the base class for the recursive schema, which should then be passed to {@link ValidateRecursiveSchema}.\n *\n * Using {@link ValidateRecursiveSchema} will provide compile error for some of the cases of malformed schema.\n * This can be used to help mitigate the issue that recursive schema definitions are {@link Unenforced}.\n * If an issue is encountered where a mistake in a recursive schema is made which produces an invalid schema but is not rejected by this checker,\n * it should be considered a bug and this should be updated to handle that case (or have a disclaimer added to these docs that it misses that case).\n *\n * The non-recursive versions of the schema building methods will run into several issues when used recursively.\n * Consider the following example:\n *\n * ```typescript\n * const Test = sf.array(Test); // Bad\n * ```\n *\n * This has several issues:\n *\n * 1. It is a structurally named schema.\n * Structurally named schema derive their name from the names of their child types, which is not possible when the type is recursive since its name would include itself.\n * Instead a name must be explicitly provided.\n *\n * 2. The schema accesses itself before it's defined.\n * This would be a runtime error if the TypeScript compiler allowed it.\n * This can be fixed by wrapping the type in a function, which also requires explicitly listing the allowed types in an array (`[() => Test]`).\n *\n * 3. TypeScript fails to infer the recursive type and falls back to `any` with this warning or error (depending on the compiler configuration):\n * `'Test' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.ts(7022)`.\n * This issue is what the specialized recursive schema building methods fix.\n * This fix comes at a cost: to make the recursive cases work, the `extends` clauses had to be removed.\n * This means that mistakes declaring recursive schema often don't give compile errors in the schema.\n * Additionally support for implicit construction had to be disabled.\n * This means that new nested {@link Unhydrated} nodes can not be created like `new Test([[]])`.\n * Instead the nested nodes must be created explicitly using the construction like`new Test([new Test([])])`.\n *\n * 4. It is using \"POJO\" mode since it's not explicitly declaring a new class.\n * This means that the generated d.ts files for the schema replace recursive references with `any`, breaking use of recursive schema across compilation boundaries.\n * This is fixed by explicitly creating a class which extends the returned schema.\n *\n * All together, the fixed version looks like:\n * ```typescript\n * class Test extends sf.arrayRecursive(\"Test\", [() => Test]) {} // Good\n * ```\n *\n * Be very careful when declaring recursive schema.\n * Due to the removed extends clauses, subtle mistakes will compile just fine but cause strange errors when the schema is used.\n *\n * For example if a reference to a schema is malformed (in this case boxed inside an object):\n *\n * ```typescript\n * class Test extends sf.arrayRecursive(\"Test\", [() => ({ Test })]) {} // Bad\n * ```\n * This schema will still compile, and some (but not all) usages of it may look like they work correctly while other usages will produce generally unintelligible compile errors.\n * This issue can be partially mitigated using {@link ValidateRecursiveSchema}:\n *\n * ```typescript\n * class Test extends sf.arrayRecursive(\"Test\", [() => ({ Test })]) {} // Bad\n * {\n * type _check = ValidateRecursiveSchema<typeof Test>; // Reports compile error due to invalid schema above.\n * }\n * ```\n *\n * If your TypeScript configuration objects to this patten due to the unused local, you can use {@link allowUnused} to suppress the error:\n *\n * ```typescript\n * class Test extends sf.arrayRecursive(\"Test\", [() => ({ Test })]) {} // Bad\n * allowUnused<ValidateRecursiveSchema<typeof Test>>(); // Reports compile error due to invalid schema above.\n * ```\n *\n * ## Object Schema\n *\n * When defining fields, if the fields is part of the recursive cycle, use the `*Recursive` {@link SchemaFactory} methods for defining the {@link FieldSchema}.\n *\n * ## Array Schema\n *\n * See {@link FixRecursiveArraySchema} for array specific details.\n *\n * @privateRemarks\n * There are probably mistakes this misses: it's hard to guess all the wrong things people will accidentally do and defend against them.\n * Hopefully over time this can grow toward being robust, at least for common mistakes.\n *\n * This check duplicates logic that ideally would be entirely decided by the actual schema building methods.\n * Therefore changes to those methods may require updating `ValidateRecursiveSchema`.\n *\n * TODO: this currently does not reject `any`, but ideally should.\n * @public\n */\nexport type ValidateRecursiveSchema<T extends ValidateRecursiveSchemaTemplate<T>> = true;\n\n/**\n * Validation logic used by {@link ValidateRecursiveSchema}.\n * @privateRemarks\n * Recursive types should always be using TreeNodeSchemaClass (not TreeNodeSchemaNonClass) as that's part of the requirements for the type to work across compilation boundaries correctly.\n * @system @public\n */\nexport type ValidateRecursiveSchemaTemplate<T extends TreeNodeSchemaClass> =\n\tTreeNodeSchemaClass<\n\t\t// Name: This validator places no restrictions on the name other than that it's a string (as required by TreeNodeSchemaClass).\n\t\tstring,\n\t\t// NodeKind: These are the NodeKinds which currently can be used recursively.\n\t\tNodeKind.Array | NodeKind.Map | NodeKind.Object | NodeKind.Record,\n\t\t// TNode: The produced node API. This is pretty minimal validation: more could be added if similar to how TInsertable works below if needed.\n\t\tTreeNode & WithType<T[\"identifier\"], T[\"kind\"]>,\n\t\t// TInsertable: What can be passed to the constructor. This should be enough to catch most issues with incorrect schema.\n\t\t// These match whats defined in the recursive methods on `SchemaFactory` except they do not use `Unenforced`.\n\t\t{\n\t\t\t[NodeKind.Object]: T[\"info\"] extends RestrictiveStringRecord<ImplicitFieldSchema>\n\t\t\t\t? InsertableObjectFromSchemaRecord<T[\"info\"]>\n\t\t\t\t: unknown;\n\t\t\t[NodeKind.Array]: T[\"info\"] extends ImplicitAllowedTypes\n\t\t\t\t? Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T[\"info\"]>>\n\t\t\t\t: unknown;\n\t\t\t[NodeKind.Map]: T[\"info\"] extends ImplicitAllowedTypes\n\t\t\t\t? Iterable<[string, InsertableTreeNodeFromImplicitAllowedTypes<T[\"info\"]>]>\n\t\t\t\t: unknown;\n\t\t\t[NodeKind.Record]: {\n\t\t\t\treadonly [P in string]: InsertableTreeNodeFromImplicitAllowedTypes<T>;\n\t\t\t};\n\t\t\t[NodeKind.Leaf]: unknown;\n\t\t}[T[\"kind\"]],\n\t\t// ImplicitlyConstructable: recursive types are currently not implicitly constructable.\n\t\tfalse,\n\t\t// Info: What's passed to the method to create the schema. Constraining these here should be about as effective as if the actual constraints existed on the actual method itself.\n\t\t{\n\t\t\t[NodeKind.Object]: RestrictiveStringRecord<ImplicitFieldSchema>;\n\t\t\t[NodeKind.Array]: ImplicitAllowedTypes;\n\t\t\t[NodeKind.Map]: ImplicitAllowedTypes;\n\t\t\t[NodeKind.Record]: ImplicitAllowedTypes;\n\t\t\t[NodeKind.Leaf]: unknown;\n\t\t}[T[\"kind\"]]\n\t>;\n\n/* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */\n/**\n * Workaround for \"Type instantiation is excessively deep and possibly infinite.ts\" errors.\n * @remarks\n *\n * Generally this workaround should be avoided if possible,\n * especially for exported types, as it is likely to result in issues when exporting or importing schema where the user will be forced to use the workaround as well.\n * This is particularly problematic since in some cases it may not be possible for the user to replicate the pattern.\n * Additionally, which cases hit these limits may vary based on TypeScript version and implementation details of this library.\n *\n * This workaround is provided and documented as a last resort to be able to keep an app compiling.\n * Future version of SharedTree should provide schema type erasure functionality as a better alternative for most cases.\n *\n * When TypeScript gives the error \"Error (TS2589) Type instantiation is excessively deep and possibly infinite.\" on the invocation of `ValidateRecursiveSchema`\n * for a large schema, it can sometimes be worked around by repeating the usage of the type multiple times.\n * This works because the TypeScript compiler caches some of the intermediate results from the first usage, and thus can get further on the second.\n *\n * This utility can be referenced when applying this pattern.\n * For recursive types this can be used directly:\n *\n * ```typescript\n * {\n * // @ts-expect-error Recursion limit\n * type _check1 = FixRecursiveRecursionLimit<typeof LargeType>;\n * type _check2 = FixRecursiveRecursionLimit<typeof LargeType>;\n * type _check3 = ValidateRecursiveSchemaTemplate<typeof LargeType>;\n * }\n * ```\n *\n * For non-recursive types, they can be ported to the more flexible recursive APIs and use the pattern above.\n *\n * Non-recursive types can also use this workaround by making a duplicate copy of the problematic schema written using the recursive APIs.\n * Then this pattern can be applied to the duplicate copy.\n *\n * ```typescript\n * // Workaround TypeScript recursion limit\n * \t{\n * \t\tclass LargeUnionObjectNode_Fix extends schema.objectRecursive(\"ObjectNode\", {\n * \t\t\tx: largeUnion,\n * \t\t}) {}\n *\n * \t\t// @ts-expect-error Recursion limit\n * \t\tallowUnused<FixRecursiveRecursionLimit<typeof LargeUnionObjectNode_Fix>>();\n * \t\tallowUnused<FixRecursiveRecursionLimit<typeof LargeUnionObjectNode_Fix>>();\n * \t\tallowUnused<ValidateRecursiveSchema<typeof LargeUnionObjectNode_Fix>>();\n * \t\t}\n *\n * \t// Fails to compile without the above workaround.\n * \tclass LargeUnionObjectNode extends schema.object(\"ObjectNode\", { x: largeUnion }) {}\n * ```\n * @privateRemarks\n * Using this is real sketchy, and leads to a lot of issues (errors which depend on how the schema is compiled, making different build setups produce different results and complicating exports).\n * This is being kept as internal for now: if a customer really needs it, we have this as a documented workaround, but it would be much better to find an alternative solution before using this one.\n * This uses ValidateRecursiveSchemaTemplate since it was found to evaluate enough of the type to work.\n * @internal\n */\nexport type FixRecursiveRecursionLimit<T extends TreeNodeSchemaClass> =\n\tT extends ValidateRecursiveSchemaTemplate<T> ? undefined : undefined;\n/* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag */\n\n/**\n * Does nothing with the provided value, but appears to use it to make unused locals warnings and errors go away.\n *\n * @remarks\n * When TypeScript is configured with \"noUnusedLocals\", it will produce an error if a local variable is declared but never used.\n * When you want to have this check enabled, but not follow it for a specific variable, you can pass the type or value to this function.\n *\n * Instead of using this, consider disabling \"noUnusedLocals\" in your tsconfig.json file, and enabling a similar check via a linter.\n * This will allow you to still have the check, but have more control over it, for example being able to suppress it, or enable patterns like allowing unused locals with an \"_\" prefix.\n * @alpha\n */\nexport function allowUnused<T>(t?: T): void {}\n\n/**\n * Workaround for fixing errors resulting from an issue with recursive ArrayNode schema exports.\n * @remarks\n * Importing a recursive ArrayNode schema via a d.ts file can produce an error like\n * `error TS2310: Type 'RecursiveArray' recursively references itself as a base type.`\n * if using a tsconfig with `\"skipLibCheck\": false`.\n *\n * This error occurs due to the TypeScript compiler splitting the class definition into two separate declarations in the d.ts file (one for the base, and one for the actual class).\n * For unknown reasons, splitting the class declaration in this way breaks the recursive type handling, leading to the mentioned error.\n *\n * This type always evaluates to `undefined` to ensure the dummy export (which doesn't exist at runtime) is typed correctly.\n *\n * {@link https://github.com/microsoft/TypeScript/issues/59550|TypeScript Issue 59550} tracks a suggestion which would make this workaround unnecessary.\n *\n * @example Usage\n * Since recursive type handling in TypeScript is order dependent, putting just the right kind of usages of the type before the declarations can cause it to not hit this error.\n * For the case of ArrayNodes, this can be done via usage that looks like this:\n *\n * This example should use a doc comment to ensure the workaround comment shows up in the intellisense for the dummy export,\n * however doing so is impossible due to how this example is included in a doc comment.\n * ```typescript\n * // Workaround to avoid\n * // `error TS2310: Type 'RecursiveArray' recursively references itself as a base type.` in the d.ts file.\n * export declare type _RecursiveArrayWorkaround = FixRecursiveArraySchema<typeof RecursiveArray>;\n * export class RecursiveArray extends schema.arrayRecursive(\"RA\", [() => RecursiveArray]) {}\n * {\n * \ttype _check = ValidateRecursiveSchema<typeof RecursiveArray>;\n * }\n * ```\n *\n * @beta\n */\nexport type FixRecursiveArraySchema<T> = T extends TreeNodeSchema ? undefined : undefined;\n"]}
1
+ {"version":3,"file":"schemaFactoryRecursive.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactoryRecursive.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+OH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAI,CAAK,IAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { RestrictiveStringRecord } from \"../../util/index.js\";\nimport type {\n\tNodeKind,\n\tTreeNodeSchema,\n\tWithType,\n\tTreeNode,\n\tImplicitAllowedTypes,\n\tInsertableTreeNodeFromImplicitAllowedTypes,\n\tTreeNodeSchemaClass,\n} from \"../core/index.js\";\nimport type { InsertableObjectFromSchemaRecord } from \"../node-kinds/index.js\";\nimport type { ImplicitFieldSchema } from \"../fieldSchema.js\";\n\n/**\n * Compile time check for validity of a recursive schema.\n * This type also serves as a central location for documenting the requirements and issues related to recursive schema.\n *\n * @example\n * ```typescript\n * class Test extends sf.arrayRecursive(\"Test\", [() => Test]) {}\n * {\n * type _check = ValidateRecursiveSchema<typeof Test>;\n * }\n * ```\n * @remarks\n * In this context recursive schema are defined as all {@link FieldSchema} and {@link TreeNodeSchema} schema which are part of a cycle such that walking down through each {@link TreeNodeSchemaCore.childTypes} the given starting schema can be reached again.\n * Schema referencing the recursive schema and schema they reference that are not part of a cycle are not considered recursive.\n *\n * TypeScript puts a lot of limitations on the typing of recursive schema.\n * To help avoid running into these limitations and thus getting schema that do not type check (or only type checks sometimes!),\n * {@link SchemaFactory} provides APIs (postfixed with `Recursive`) for writing recursive schema.\n * These APIs when combined with the patterns documented below should ensure that the schema provide robust type checking.\n * These special patterns (other than {@link LazyItem} forward references which are not recursion specific)\n * are not required for correct runtime behavior: they exist entirely to mitigate TypeScript type checking limitations and bugs.\n * Ideally TypeScript's type checker would be able to handle all of these cases and more, removing the need for recursive type specific guidance, rules and APIs.\n * Currently however there are open issues preventing this:\n * {@link https://github.com/microsoft/TypeScript/issues/59550 | 1},\n * {@link https://github.com/microsoft/TypeScript/issues/55832 | 2},\n * {@link https://github.com/microsoft/TypeScript/issues/55758 | 3}.\n * Note that the proposed resolution to some of these issues is for the compiler to error rather than allow the case,\n * so even if these are all resolved the recursive type workarounds may still be needed.\n *\n * # Patterns\n *\n * Below are patterns for how to use recursive schema.\n *\n * ## General Patterns\n *\n * When defining a recursive {@link TreeNodeSchema}, use the `*Recursive` {@link SchemaFactory} methods.\n * The returned class should be used as the base class for the recursive schema, which should then be passed to {@link ValidateRecursiveSchema}.\n *\n * Using {@link ValidateRecursiveSchema} will provide compile error for some of the cases of malformed schema.\n * This can be used to help mitigate the issue that recursive schema definitions are {@link Unenforced}.\n * If an issue is encountered where a mistake in a recursive schema is made which produces an invalid schema but is not rejected by this checker,\n * it should be considered a bug and this should be updated to handle that case (or have a disclaimer added to these docs that it misses that case).\n *\n * The non-recursive versions of the schema building methods will run into several issues when used recursively.\n * Consider the following example:\n *\n * ```typescript\n * const Test = sf.array(Test); // Bad\n * ```\n *\n * This has several issues:\n *\n * 1. It is a structurally named schema.\n * Structurally named schema derive their name from the names of their child types, which is not possible when the type is recursive since its name would include itself.\n * Instead a name must be explicitly provided.\n *\n * 2. The schema accesses itself before it's defined.\n * This would be a runtime error if the TypeScript compiler allowed it.\n * This can be fixed by wrapping the type in a function, which also requires explicitly listing the allowed types in an array (`[() => Test]`).\n *\n * 3. TypeScript fails to infer the recursive type and falls back to `any` with this warning or error (depending on the compiler configuration):\n * `'Test' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.ts(7022)`.\n * This issue is what the specialized recursive schema building methods fix.\n * This fix comes at a cost: to make the recursive cases work, the `extends` clauses had to be removed.\n * This means that mistakes declaring recursive schema often don't give compile errors in the schema.\n * Additionally support for implicit construction had to be disabled.\n * This means that new nested {@link Unhydrated} nodes can not be created like `new Test([[]])`.\n * Instead the nested nodes must be created explicitly using the construction like`new Test([new Test([])])`.\n *\n * 4. It is using \"POJO\" mode since it's not explicitly declaring a new class.\n * This means that the generated d.ts files for the schema replace recursive references with `any`, breaking use of recursive schema across compilation boundaries.\n * This is fixed by explicitly creating a class which extends the returned schema.\n *\n * All together, the fixed version looks like:\n * ```typescript\n * class Test extends sf.arrayRecursive(\"Test\", [() => Test]) {} // Good\n * ```\n *\n * Be very careful when declaring recursive schema.\n * Due to the removed extends clauses, subtle mistakes will compile just fine but cause strange errors when the schema is used.\n *\n * For example if a reference to a schema is malformed (in this case boxed inside an object):\n *\n * ```typescript\n * class Test extends sf.arrayRecursive(\"Test\", [() => ({ Test })]) {} // Bad\n * ```\n * This schema will still compile, and some (but not all) usages of it may look like they work correctly while other usages will produce generally unintelligible compile errors.\n * This issue can be partially mitigated using {@link ValidateRecursiveSchema}:\n *\n * ```typescript\n * class Test extends sf.arrayRecursive(\"Test\", [() => ({ Test })]) {} // Bad\n * {\n * type _check = ValidateRecursiveSchema<typeof Test>; // Reports compile error due to invalid schema above.\n * }\n * ```\n *\n * If your TypeScript configuration objects to this patten due to the unused local, you can use {@link allowUnused} to suppress the error:\n *\n * ```typescript\n * class Test extends sf.arrayRecursive(\"Test\", [() => ({ Test })]) {} // Bad\n * allowUnused<ValidateRecursiveSchema<typeof Test>>(); // Reports compile error due to invalid schema above.\n * ```\n *\n * ## Object Schema\n *\n * When defining fields, if the fields is part of the recursive cycle, use the `*Recursive` {@link SchemaFactory} methods for defining the {@link FieldSchema}.\n *\n * ## Array Schema\n *\n * See {@link FixRecursiveArraySchema} for array specific details.\n *\n * @privateRemarks\n * There are probably mistakes this misses: it's hard to guess all the wrong things people will accidentally do and defend against them.\n * Hopefully over time this can grow toward being robust, at least for common mistakes.\n *\n * This check duplicates logic that ideally would be entirely decided by the actual schema building methods.\n * Therefore changes to those methods may require updating `ValidateRecursiveSchema`.\n *\n * TODO: this currently does not reject `any`, but ideally should.\n * @public\n */\nexport type ValidateRecursiveSchema<T extends ValidateRecursiveSchemaTemplate<T>> = true;\n\n/**\n * Validation logic used by {@link ValidateRecursiveSchema}.\n * @privateRemarks\n * Recursive types should always be using TreeNodeSchemaClass (not TreeNodeSchemaNonClass) as that's part of the requirements for the type to work across compilation boundaries correctly.\n * @system @public\n */\nexport type ValidateRecursiveSchemaTemplate<T extends TreeNodeSchemaClass> =\n\tTreeNodeSchemaClass<\n\t\t// Name: This validator places no restrictions on the name other than that it's a string (as required by TreeNodeSchemaClass).\n\t\tstring,\n\t\t// NodeKind: These are the NodeKinds which currently can be used recursively.\n\t\tNodeKind.Array | NodeKind.Map | NodeKind.Object | NodeKind.Record,\n\t\t// TNode: The produced node API. This is pretty minimal validation: more could be added if similar to how TInsertable works below if needed.\n\t\tTreeNode & WithType<T[\"identifier\"], T[\"kind\"]>,\n\t\t// TInsertable: What can be passed to the constructor. This should be enough to catch most issues with incorrect schema.\n\t\t// These match whats defined in the recursive methods on `SchemaFactory` except they do not use `Unenforced`.\n\t\t{\n\t\t\t[NodeKind.Object]: T[\"info\"] extends RestrictiveStringRecord<ImplicitFieldSchema>\n\t\t\t\t? InsertableObjectFromSchemaRecord<T[\"info\"]>\n\t\t\t\t: unknown;\n\t\t\t[NodeKind.Array]: T[\"info\"] extends ImplicitAllowedTypes\n\t\t\t\t? Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T[\"info\"]>>\n\t\t\t\t: unknown;\n\t\t\t[NodeKind.Map]: T[\"info\"] extends ImplicitAllowedTypes\n\t\t\t\t? Iterable<[string, InsertableTreeNodeFromImplicitAllowedTypes<T[\"info\"]>]>\n\t\t\t\t: unknown;\n\t\t\t[NodeKind.Record]: {\n\t\t\t\treadonly [P in string]: InsertableTreeNodeFromImplicitAllowedTypes<T>;\n\t\t\t};\n\t\t\t[NodeKind.Leaf]: unknown;\n\t\t}[T[\"kind\"]],\n\t\t// ImplicitlyConstructable: recursive types are currently not implicitly constructable.\n\t\tfalse,\n\t\t// Info: What's passed to the method to create the schema. Constraining these here should be about as effective as if the actual constraints existed on the actual method itself.\n\t\t{\n\t\t\t[NodeKind.Object]: RestrictiveStringRecord<ImplicitFieldSchema>;\n\t\t\t[NodeKind.Array]: ImplicitAllowedTypes;\n\t\t\t[NodeKind.Map]: ImplicitAllowedTypes;\n\t\t\t[NodeKind.Record]: ImplicitAllowedTypes;\n\t\t\t[NodeKind.Leaf]: unknown;\n\t\t}[T[\"kind\"]]\n\t>;\n\n/**\n * Workaround for \"Type instantiation is excessively deep and possibly infinite.ts\" errors.\n * @remarks\n *\n * Generally this workaround should be avoided if possible,\n * especially for exported types, as it is likely to result in issues when exporting or importing schema where the user will be forced to use the workaround as well.\n * This is particularly problematic since in some cases it may not be possible for the user to replicate the pattern.\n * Additionally, which cases hit these limits may vary based on TypeScript version and implementation details of this library.\n *\n * This workaround is provided and documented as a last resort to be able to keep an app compiling.\n * Future version of SharedTree should provide schema type erasure functionality as a better alternative for most cases.\n *\n * When TypeScript gives the error \"Error (TS2589) Type instantiation is excessively deep and possibly infinite.\" on the invocation of `ValidateRecursiveSchema`\n * for a large schema, it can sometimes be worked around by repeating the usage of the type multiple times.\n * This works because the TypeScript compiler caches some of the intermediate results from the first usage, and thus can get further on the second.\n *\n * This utility can be referenced when applying this pattern.\n * For recursive types this can be used directly:\n *\n * ```typescript\n * {\n * // @ts-expect-error Recursion limit\n * type _check1 = FixRecursiveRecursionLimit<typeof LargeType>;\n * type _check2 = FixRecursiveRecursionLimit<typeof LargeType>;\n * type _check3 = ValidateRecursiveSchemaTemplate<typeof LargeType>;\n * }\n * ```\n *\n * For non-recursive types, they can be ported to the more flexible recursive APIs and use the pattern above.\n *\n * Non-recursive types can also use this workaround by making a duplicate copy of the problematic schema written using the recursive APIs.\n * Then this pattern can be applied to the duplicate copy.\n *\n * ```typescript\n * // Workaround TypeScript recursion limit\n * \t{\n * \t\tclass LargeUnionObjectNode_Fix extends schema.objectRecursive(\"ObjectNode\", {\n * \t\t\tx: largeUnion,\n * \t\t}) {}\n *\n * \t\t// @ts-expect-error Recursion limit\n * \t\tallowUnused<FixRecursiveRecursionLimit<typeof LargeUnionObjectNode_Fix>>();\n * \t\tallowUnused<FixRecursiveRecursionLimit<typeof LargeUnionObjectNode_Fix>>();\n * \t\tallowUnused<ValidateRecursiveSchema<typeof LargeUnionObjectNode_Fix>>();\n * \t\t}\n *\n * \t// Fails to compile without the above workaround.\n * \tclass LargeUnionObjectNode extends schema.object(\"ObjectNode\", { x: largeUnion }) {}\n * ```\n * @privateRemarks\n * Using this is real sketchy, and leads to a lot of issues (errors which depend on how the schema is compiled, making different build setups produce different results and complicating exports).\n * This is being kept as internal for now: if a customer really needs it, we have this as a documented workaround, but it would be much better to find an alternative solution before using this one.\n * This uses ValidateRecursiveSchemaTemplate since it was found to evaluate enough of the type to work.\n * @internal\n */\nexport type FixRecursiveRecursionLimit<T extends TreeNodeSchemaClass> =\n\tT extends ValidateRecursiveSchemaTemplate<T> ? undefined : undefined;\n\n/**\n * Does nothing with the provided value, but appears to use it to make unused locals warnings and errors go away.\n *\n * @remarks\n * When TypeScript is configured with \"noUnusedLocals\", it will produce an error if a local variable is declared but never used.\n * When you want to have this check enabled, but not follow it for a specific variable, you can pass the type or value to this function.\n *\n * Instead of using this, consider disabling \"noUnusedLocals\" in your tsconfig.json file, and enabling a similar check via a linter.\n * This will allow you to still have the check, but have more control over it, for example being able to suppress it, or enable patterns like allowing unused locals with an \"_\" prefix.\n * @alpha\n */\nexport function allowUnused<T>(t?: T): void {}\n\n/**\n * Workaround for fixing errors resulting from an issue with recursive ArrayNode schema exports.\n * @remarks\n * Importing a recursive ArrayNode schema via a d.ts file can produce an error like\n * `error TS2310: Type 'RecursiveArray' recursively references itself as a base type.`\n * if using a tsconfig with `\"skipLibCheck\": false`.\n *\n * This error occurs due to the TypeScript compiler splitting the class definition into two separate declarations in the d.ts file (one for the base, and one for the actual class).\n * For unknown reasons, splitting the class declaration in this way breaks the recursive type handling, leading to the mentioned error.\n *\n * This type always evaluates to `undefined` to ensure the dummy export (which doesn't exist at runtime) is typed correctly.\n *\n * {@link https://github.com/microsoft/TypeScript/issues/59550|TypeScript Issue 59550} tracks a suggestion which would make this workaround unnecessary.\n *\n * @example Usage\n * Since recursive type handling in TypeScript is order dependent, putting just the right kind of usages of the type before the declarations can cause it to not hit this error.\n * For the case of ArrayNodes, this can be done via usage that looks like this:\n *\n * This example should use a doc comment to ensure the workaround comment shows up in the intellisense for the dummy export,\n * however doing so is impossible due to how this example is included in a doc comment.\n * ```typescript\n * // Workaround to avoid\n * // `error TS2310: Type 'RecursiveArray' recursively references itself as a base type.` in the d.ts file.\n * export declare type _RecursiveArrayWorkaround = FixRecursiveArraySchema<typeof RecursiveArray>;\n * export class RecursiveArray extends schema.arrayRecursive(\"RA\", [() => RecursiveArray]) {}\n * {\n * \ttype _check = ValidateRecursiveSchema<typeof RecursiveArray>;\n * }\n * ```\n *\n * @beta\n */\nexport type FixRecursiveArraySchema<T> = T extends TreeNodeSchema ? undefined : undefined;\n"]}