@fluidframework/tree 2.81.0-374083 → 2.81.1

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 (1522) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/api-report/tree.alpha.api.md +0 -1
  3. package/dist/codec/codec.d.ts +2 -2
  4. package/dist/codec/codec.d.ts.map +1 -1
  5. package/dist/codec/codec.js +8 -8
  6. package/dist/codec/codec.js.map +1 -1
  7. package/dist/codec/versioned/codec.d.ts +1 -1
  8. package/dist/codec/versioned/codec.d.ts.map +1 -1
  9. package/dist/codec/versioned/codec.js +12 -12
  10. package/dist/codec/versioned/codec.js.map +1 -1
  11. package/dist/core/change-family/changeFamily.d.ts +1 -4
  12. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  13. package/dist/core/change-family/changeFamily.js.map +1 -1
  14. package/dist/core/change-family/index.d.ts +1 -1
  15. package/dist/core/change-family/index.d.ts.map +1 -1
  16. package/dist/core/change-family/index.js.map +1 -1
  17. package/dist/core/index.d.ts +3 -3
  18. package/dist/core/index.d.ts.map +1 -1
  19. package/dist/core/index.js +4 -6
  20. package/dist/core/index.js.map +1 -1
  21. package/dist/core/rebase/changeRebaser.d.ts +1 -6
  22. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  23. package/dist/core/rebase/changeRebaser.js.map +1 -1
  24. package/dist/core/rebase/index.d.ts +1 -1
  25. package/dist/core/rebase/index.d.ts.map +1 -1
  26. package/dist/core/rebase/index.js +1 -2
  27. package/dist/core/rebase/index.js.map +1 -1
  28. package/dist/core/rebase/types.d.ts +1 -2
  29. package/dist/core/rebase/types.d.ts.map +1 -1
  30. package/dist/core/rebase/types.js +1 -5
  31. package/dist/core/rebase/types.js.map +1 -1
  32. package/dist/core/rebase/utils.d.ts.map +1 -1
  33. package/dist/core/rebase/utils.js +7 -25
  34. package/dist/core/rebase/utils.js.map +1 -1
  35. package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
  36. package/dist/core/schema-stored/formatV2.js +4 -4
  37. package/dist/core/schema-stored/formatV2.js.map +1 -1
  38. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  39. package/dist/core/tree/anchorSet.js +1 -1
  40. package/dist/core/tree/anchorSet.js.map +1 -1
  41. package/dist/core/tree/detachedFieldIndex.d.ts +0 -6
  42. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  43. package/dist/core/tree/detachedFieldIndex.js +0 -9
  44. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  45. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
  46. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  47. package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  48. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  49. package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -3
  50. package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  51. package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  52. package/dist/core/tree/detachedFieldIndexCodecV2.js +2 -2
  53. package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  54. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
  55. package/dist/core/tree/detachedFieldIndexFormatV1.js +3 -3
  56. package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
  57. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  58. package/dist/core/tree/detachedFieldIndexFormatV2.js +4 -4
  59. package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  60. package/dist/core/tree/index.d.ts +1 -1
  61. package/dist/core/tree/index.d.ts.map +1 -1
  62. package/dist/core/tree/index.js +3 -4
  63. package/dist/core/tree/index.js.map +1 -1
  64. package/dist/core/tree/pathTree.d.ts +3 -11
  65. package/dist/core/tree/pathTree.d.ts.map +1 -1
  66. package/dist/core/tree/pathTree.js +2 -14
  67. package/dist/core/tree/pathTree.js.map +1 -1
  68. package/dist/core/tree/visitDelta.d.ts +1 -1
  69. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  70. package/dist/core/tree/visitDelta.js.map +1 -1
  71. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  72. package/dist/core/tree/visitorUtils.js +1 -1
  73. package/dist/core/tree/visitorUtils.js.map +1 -1
  74. package/dist/feature-libraries/changeAtomIdBTree.d.ts +3 -4
  75. package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  76. package/dist/feature-libraries/changeAtomIdBTree.js +2 -16
  77. package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  79. package/dist/feature-libraries/chunked-forest/basicChunk.js +0 -7
  80. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  81. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
  82. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  83. package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -4
  84. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  85. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  86. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  87. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  88. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
  89. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  90. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  91. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
  92. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  93. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  94. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +1 -1
  95. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  96. package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  97. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  98. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  99. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  100. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  101. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  102. package/dist/feature-libraries/chunked-forest/codec/format.js +1 -1
  103. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  104. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  105. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  106. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  107. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  108. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
  109. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  110. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
  111. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  112. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +78 -245
  113. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  114. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
  115. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  116. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +25 -75
  117. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  118. package/dist/feature-libraries/default-schema/index.d.ts +2 -3
  119. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  120. package/dist/feature-libraries/default-schema/index.js +2 -5
  121. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  122. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
  123. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  124. package/dist/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
  125. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  126. package/dist/feature-libraries/deltaUtils.d.ts +0 -1
  127. package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
  128. package/dist/feature-libraries/deltaUtils.js +1 -6
  129. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  130. package/dist/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
  131. package/dist/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
  132. package/dist/feature-libraries/fieldKindIdentifiers.js +16 -0
  133. package/dist/feature-libraries/fieldKindIdentifiers.js.map +1 -0
  134. package/dist/feature-libraries/flex-tree/context.d.ts +0 -9
  135. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  136. package/dist/feature-libraries/flex-tree/context.js +0 -6
  137. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  138. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  139. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  140. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  141. package/dist/feature-libraries/flex-tree/lazyField.d.ts +7 -8
  142. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  143. package/dist/feature-libraries/flex-tree/lazyField.js +17 -48
  144. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  145. package/dist/feature-libraries/flex-tree/observer.d.ts +1 -1
  146. package/dist/feature-libraries/flex-tree/observer.d.ts.map +1 -1
  147. package/dist/feature-libraries/flex-tree/observer.js.map +1 -1
  148. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  149. package/dist/feature-libraries/forest-summary/codec.js +1 -1
  150. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  151. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  152. package/dist/feature-libraries/forest-summary/forestSummarizer.js +3 -3
  153. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  154. package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
  155. package/dist/feature-libraries/forest-summary/formatV1.js.map +1 -1
  156. package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
  157. package/dist/feature-libraries/forest-summary/formatV2.js.map +1 -1
  158. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
  159. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  160. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
  161. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  162. package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
  163. package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
  164. package/dist/feature-libraries/index.d.ts +3 -3
  165. package/dist/feature-libraries/index.d.ts.map +1 -1
  166. package/dist/feature-libraries/index.js +3 -8
  167. package/dist/feature-libraries/index.js.map +1 -1
  168. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  169. package/dist/feature-libraries/mapTreeCursor.js +0 -1
  170. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  171. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  172. package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
  173. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  174. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +21 -97
  175. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  176. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +7 -4
  177. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  178. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
  179. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  180. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  181. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  182. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  183. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
  184. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  185. package/dist/feature-libraries/modular-schema/genericFieldKind.js +11 -5
  186. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  187. package/dist/feature-libraries/modular-schema/index.d.ts +4 -4
  188. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  189. package/dist/feature-libraries/modular-schema/index.js +2 -2
  190. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  191. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
  192. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  193. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +162 -254
  194. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  195. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  196. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
  197. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  198. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  199. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
  200. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  201. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
  202. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  203. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +460 -1325
  204. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  205. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  206. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  207. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
  208. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  209. package/dist/feature-libraries/modular-schema/modularChangeTypes.js +3 -3
  210. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  211. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  212. package/dist/feature-libraries/object-forest/objectForest.js +2 -2
  213. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  214. package/dist/feature-libraries/optional-field/index.d.ts +2 -2
  215. package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
  216. package/dist/feature-libraries/optional-field/index.js +4 -7
  217. package/dist/feature-libraries/optional-field/index.js.map +1 -1
  218. package/dist/feature-libraries/optional-field/optionalField.d.ts +34 -5
  219. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  220. package/dist/feature-libraries/optional-field/optionalField.js +455 -221
  221. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  222. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
  223. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  224. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  225. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  226. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  227. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +28 -57
  228. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  229. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  230. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
  231. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  232. package/dist/feature-libraries/optional-field/requiredField.d.ts +36 -0
  233. package/dist/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
  234. package/dist/feature-libraries/optional-field/requiredField.js +27 -0
  235. package/dist/feature-libraries/optional-field/requiredField.js.map +1 -0
  236. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
  237. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  238. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +7 -7
  239. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  240. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  241. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  242. package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
  243. package/dist/feature-libraries/schemaChecker.js +1 -1
  244. package/dist/feature-libraries/schemaChecker.js.map +1 -1
  245. package/dist/feature-libraries/sequence-field/compose.d.ts +7 -6
  246. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  247. package/dist/feature-libraries/sequence-field/compose.js +259 -83
  248. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  249. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
  250. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  251. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  252. package/dist/feature-libraries/sequence-field/index.d.ts +2 -13
  253. package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
  254. package/dist/feature-libraries/sequence-field/index.js +3 -28
  255. package/dist/feature-libraries/sequence-field/index.js.map +1 -1
  256. package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
  257. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  258. package/dist/feature-libraries/sequence-field/invert.js +167 -65
  259. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  260. package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  261. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  262. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  263. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
  264. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  265. package/dist/feature-libraries/sequence-field/moveEffectTable.js +90 -7
  266. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  267. package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
  268. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  269. package/dist/feature-libraries/sequence-field/rebase.js +114 -107
  270. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  271. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
  272. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
  273. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +50 -0
  274. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
  275. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  276. package/dist/feature-libraries/sequence-field/replaceRevisions.js +31 -18
  277. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  278. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  279. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -0
  280. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  281. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
  282. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  283. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +187 -365
  284. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  285. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  286. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +62 -20
  287. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  288. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  289. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  290. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  291. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  292. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  293. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  294. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
  295. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  296. package/dist/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
  297. package/dist/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
  298. package/dist/feature-libraries/sequence-field/sequenceKind.js +24 -0
  299. package/dist/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
  300. package/dist/feature-libraries/sequence-field/types.d.ts +59 -30
  301. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  302. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  303. package/dist/feature-libraries/sequence-field/utils.d.ts +24 -15
  304. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  305. package/dist/feature-libraries/sequence-field/utils.js +305 -116
  306. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  307. package/dist/index.d.ts +1 -1
  308. package/dist/index.d.ts.map +1 -1
  309. package/dist/index.js +2 -1
  310. package/dist/index.js.map +1 -1
  311. package/dist/packageVersion.d.ts +1 -1
  312. package/dist/packageVersion.d.ts.map +1 -1
  313. package/dist/packageVersion.js +1 -1
  314. package/dist/packageVersion.js.map +1 -1
  315. package/dist/shared-tree/independentView.d.ts.map +1 -1
  316. package/dist/shared-tree/independentView.js +7 -7
  317. package/dist/shared-tree/independentView.js.map +1 -1
  318. package/dist/shared-tree/index.d.ts +1 -1
  319. package/dist/shared-tree/index.d.ts.map +1 -1
  320. package/dist/shared-tree/index.js.map +1 -1
  321. package/dist/shared-tree/schematizeTree.d.ts +4 -4
  322. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  323. package/dist/shared-tree/schematizeTree.js +1 -2
  324. package/dist/shared-tree/schematizeTree.js.map +1 -1
  325. package/dist/shared-tree/schematizingTreeView.d.ts +5 -1
  326. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  327. package/dist/shared-tree/schematizingTreeView.js +39 -40
  328. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  329. package/dist/shared-tree/sharedTree.d.ts +5 -11
  330. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  331. package/dist/shared-tree/sharedTree.js +5 -43
  332. package/dist/shared-tree/sharedTree.js.map +1 -1
  333. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  334. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  335. package/dist/shared-tree/sharedTreeChangeCodecs.js +0 -1
  336. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  337. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
  338. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  339. package/dist/shared-tree/sharedTreeChangeEnricher.js +75 -58
  340. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  341. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
  342. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  343. package/dist/shared-tree/sharedTreeChangeFamily.js +4 -10
  344. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  345. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
  346. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  347. package/dist/shared-tree/sharedTreeEditBuilder.js +7 -14
  348. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  349. package/dist/shared-tree/tree.d.ts.map +1 -1
  350. package/dist/shared-tree/tree.js +14 -14
  351. package/dist/shared-tree/tree.js.map +1 -1
  352. package/dist/shared-tree/treeAlpha.d.ts +1 -1
  353. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  354. package/dist/shared-tree/treeAlpha.js +77 -77
  355. package/dist/shared-tree/treeAlpha.js.map +1 -1
  356. package/dist/shared-tree/treeCheckout.d.ts +29 -13
  357. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  358. package/dist/shared-tree/treeCheckout.js +80 -79
  359. package/dist/shared-tree/treeCheckout.js.map +1 -1
  360. package/dist/shared-tree-core/branch.d.ts +3 -4
  361. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  362. package/dist/shared-tree-core/branch.js +3 -4
  363. package/dist/shared-tree-core/branch.js.map +1 -1
  364. package/dist/shared-tree-core/branchCommitEnricher.d.ts +18 -31
  365. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  366. package/dist/shared-tree-core/branchCommitEnricher.js +24 -76
  367. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  368. package/dist/shared-tree-core/branchIdCodec.d.ts.map +1 -1
  369. package/dist/shared-tree-core/branchIdCodec.js.map +1 -1
  370. package/dist/shared-tree-core/changeEnricher.d.ts +8 -43
  371. package/dist/shared-tree-core/changeEnricher.d.ts.map +1 -1
  372. package/dist/shared-tree-core/changeEnricher.js +0 -13
  373. package/dist/shared-tree-core/changeEnricher.js.map +1 -1
  374. package/dist/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
  375. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  376. package/dist/shared-tree-core/defaultResubmitMachine.js +26 -36
  377. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  378. package/dist/shared-tree-core/editManager.d.ts +3 -3
  379. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  380. package/dist/shared-tree-core/editManager.js +11 -11
  381. package/dist/shared-tree-core/editManager.js.map +1 -1
  382. package/dist/shared-tree-core/editManagerCodecs.d.ts +1 -5
  383. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  384. package/dist/shared-tree-core/editManagerCodecs.js +2 -10
  385. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  386. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
  387. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  388. package/dist/shared-tree-core/editManagerCodecsCommons.js +1 -2
  389. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  390. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  391. package/dist/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
  392. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  393. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  394. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
  395. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  396. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
  397. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  398. package/dist/shared-tree-core/editManagerFormatCommons.js +0 -6
  399. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  400. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  401. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  402. package/dist/shared-tree-core/editManagerFormatV1toV4.js +0 -1
  403. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  404. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  405. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  406. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
  407. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  408. package/dist/shared-tree-core/index.d.ts +4 -4
  409. package/dist/shared-tree-core/index.d.ts.map +1 -1
  410. package/dist/shared-tree-core/index.js +1 -5
  411. package/dist/shared-tree-core/index.js.map +1 -1
  412. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
  413. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  414. package/dist/shared-tree-core/messageCodecV1ToV4.js +1 -1
  415. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  416. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
  417. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  418. package/dist/shared-tree-core/messageCodecVSharedBranches.js +2 -2
  419. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  420. package/dist/shared-tree-core/messageCodecs.d.ts +2 -6
  421. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  422. package/dist/shared-tree-core/messageCodecs.js +2 -10
  423. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  424. package/dist/shared-tree-core/messageFormat.d.ts +0 -1
  425. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  426. package/dist/shared-tree-core/messageFormat.js +0 -6
  427. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  428. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
  429. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  430. package/dist/shared-tree-core/messageFormatV1ToV4.js +0 -1
  431. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  432. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  433. package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  434. package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
  435. package/dist/shared-tree-core/messageTypes.js.map +1 -1
  436. package/dist/shared-tree-core/sharedTreeCore.d.ts +8 -5
  437. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  438. package/dist/shared-tree-core/sharedTreeCore.js +14 -14
  439. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  440. package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  441. package/dist/shared-tree-core/versionedSummarizer.js +1 -1
  442. package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
  443. package/dist/simple-tree/api/configuration.d.ts +2 -2
  444. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  445. package/dist/simple-tree/api/configuration.js +14 -14
  446. package/dist/simple-tree/api/configuration.js.map +1 -1
  447. package/dist/simple-tree/api/create.d.ts +1 -1
  448. package/dist/simple-tree/api/create.d.ts.map +1 -1
  449. package/dist/simple-tree/api/create.js +7 -7
  450. package/dist/simple-tree/api/create.js.map +1 -1
  451. package/dist/simple-tree/api/dirtyIndex.d.ts +1 -1
  452. package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
  453. package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
  454. package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
  455. package/dist/simple-tree/api/discrepancies.js +23 -23
  456. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  457. package/dist/simple-tree/api/getJsonSchema.d.ts +1 -1
  458. package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
  459. package/dist/simple-tree/api/getJsonSchema.js +1 -1
  460. package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
  461. package/dist/simple-tree/api/identifierIndex.d.ts +2 -2
  462. package/dist/simple-tree/api/identifierIndex.d.ts.map +1 -1
  463. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  464. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
  465. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  466. package/dist/simple-tree/api/incrementalAllowedTypes.js +6 -6
  467. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  468. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
  469. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  470. package/dist/simple-tree/api/schemaCompatibilityTester.js +1 -1
  471. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  472. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
  473. package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  474. package/dist/simple-tree/api/schemaCreationUtilities.js +7 -7
  475. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  476. package/dist/simple-tree/api/schemaFactory.d.ts +2 -2
  477. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  478. package/dist/simple-tree/api/schemaFactory.js +7 -7
  479. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  480. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
  481. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  482. package/dist/simple-tree/api/schemaFactoryAlpha.js +1 -1
  483. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  484. package/dist/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
  485. package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  486. package/dist/simple-tree/api/schemaFactoryBeta.js +1 -0
  487. package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  488. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
  489. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  490. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  491. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  492. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  493. package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
  494. package/dist/simple-tree/api/schemaStatics.js.map +1 -1
  495. package/dist/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
  496. package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
  497. package/dist/simple-tree/api/simpleSchemaCodec.js +17 -17
  498. package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  499. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
  500. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  501. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
  502. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  503. package/dist/simple-tree/api/simpleTreeIndex.d.ts +1 -1
  504. package/dist/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
  505. package/dist/simple-tree/api/simpleTreeIndex.js +1 -1
  506. package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
  507. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  508. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +14 -14
  509. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  510. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  511. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  512. package/dist/simple-tree/api/tree.d.ts +2 -2
  513. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  514. package/dist/simple-tree/api/tree.js.map +1 -1
  515. package/dist/simple-tree/api/treeBeta.d.ts +1 -1
  516. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  517. package/dist/simple-tree/api/treeBeta.js +2 -2
  518. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  519. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  520. package/dist/simple-tree/api/treeNodeApi.js +4 -4
  521. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  522. package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
  523. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  524. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  525. package/dist/simple-tree/api/verboseTree.d.ts +1 -1
  526. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  527. package/dist/simple-tree/api/verboseTree.js +22 -22
  528. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  529. package/dist/simple-tree/core/allowedTypes.d.ts +1 -1
  530. package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
  531. package/dist/simple-tree/core/allowedTypes.js +7 -7
  532. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  533. package/dist/simple-tree/core/context.d.ts.map +1 -1
  534. package/dist/simple-tree/core/context.js.map +1 -1
  535. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  536. package/dist/simple-tree/core/treeNode.js +1 -1
  537. package/dist/simple-tree/core/treeNode.js.map +1 -1
  538. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  539. package/dist/simple-tree/core/treeNodeKernel.js +1 -3
  540. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  541. package/dist/simple-tree/core/treeNodeSchema.d.ts +5 -5
  542. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  543. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  544. package/dist/simple-tree/core/treeNodeValid.d.ts +3 -3
  545. package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  546. package/dist/simple-tree/core/treeNodeValid.js +2 -2
  547. package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
  548. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
  549. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  550. package/dist/simple-tree/core/unhydratedFlexTree.js +8 -59
  551. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  552. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  553. package/dist/simple-tree/core/withType.js.map +1 -1
  554. package/dist/simple-tree/createContext.d.ts.map +1 -1
  555. package/dist/simple-tree/createContext.js.map +1 -1
  556. package/dist/simple-tree/fieldSchema.d.ts +5 -5
  557. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  558. package/dist/simple-tree/fieldSchema.js.map +1 -1
  559. package/dist/simple-tree/index.d.ts +2 -2
  560. package/dist/simple-tree/index.d.ts.map +1 -1
  561. package/dist/simple-tree/index.js +1 -1
  562. package/dist/simple-tree/index.js.map +1 -1
  563. package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
  564. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  565. package/dist/simple-tree/leafNodeSchema.js +15 -15
  566. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  567. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +1 -1
  568. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  569. package/dist/simple-tree/node-kinds/array/arrayNode.js +47 -49
  570. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  571. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
  572. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  573. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  574. package/dist/simple-tree/node-kinds/common.d.ts.map +1 -1
  575. package/dist/simple-tree/node-kinds/common.js +1 -1
  576. package/dist/simple-tree/node-kinds/common.js.map +1 -1
  577. package/dist/simple-tree/node-kinds/map/mapNode.d.ts +2 -2
  578. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  579. package/dist/simple-tree/node-kinds/map/mapNode.js +26 -26
  580. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  581. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
  582. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  583. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  584. package/dist/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
  585. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  586. package/dist/simple-tree/node-kinds/object/objectNode.js +28 -28
  587. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  588. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
  589. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  590. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  591. package/dist/simple-tree/node-kinds/record/recordNode.d.ts +1 -1
  592. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  593. package/dist/simple-tree/node-kinds/record/recordNode.js +36 -38
  594. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  595. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
  596. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  597. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  598. package/dist/simple-tree/prepareForInsertion.d.ts +47 -54
  599. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  600. package/dist/simple-tree/prepareForInsertion.js +128 -186
  601. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  602. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  603. package/dist/simple-tree/simpleSchema.js.map +1 -1
  604. package/dist/simple-tree/treeSchema.d.ts.map +1 -1
  605. package/dist/simple-tree/treeSchema.js.map +1 -1
  606. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
  607. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  608. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +22 -40
  609. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  610. package/dist/tableSchema.d.ts.map +1 -1
  611. package/dist/tableSchema.js +22 -21
  612. package/dist/tableSchema.js.map +1 -1
  613. package/dist/text/index.d.ts +1 -0
  614. package/dist/text/index.d.ts.map +1 -1
  615. package/dist/text/index.js +3 -1
  616. package/dist/text/index.js.map +1 -1
  617. package/dist/text/textDomain.d.ts +8 -0
  618. package/dist/text/textDomain.d.ts.map +1 -1
  619. package/dist/text/textDomain.js +2 -1
  620. package/dist/text/textDomain.js.map +1 -1
  621. package/dist/text/textDomainFormatted.d.ts +572 -0
  622. package/dist/text/textDomainFormatted.d.ts.map +1 -0
  623. package/dist/text/textDomainFormatted.js +183 -0
  624. package/dist/text/textDomainFormatted.js.map +1 -0
  625. package/dist/treeFactory.d.ts.map +1 -1
  626. package/dist/treeFactory.js +11 -21
  627. package/dist/treeFactory.js.map +1 -1
  628. package/dist/util/bTreeUtils.d.ts.map +1 -1
  629. package/dist/util/bTreeUtils.js +1 -1
  630. package/dist/util/bTreeUtils.js.map +1 -1
  631. package/dist/util/index.d.ts +1 -1
  632. package/dist/util/index.d.ts.map +1 -1
  633. package/dist/util/index.js +1 -2
  634. package/dist/util/index.js.map +1 -1
  635. package/dist/util/rangeMap.d.ts +12 -24
  636. package/dist/util/rangeMap.d.ts.map +1 -1
  637. package/dist/util/rangeMap.js +6 -46
  638. package/dist/util/rangeMap.js.map +1 -1
  639. package/dist/util/readSnapshotBlob.d.ts +1 -1
  640. package/dist/util/readSnapshotBlob.d.ts.map +1 -1
  641. package/dist/util/readSnapshotBlob.js.map +1 -1
  642. package/docs/main/sequence-field/move-composition.md +46 -0
  643. package/eslint.config.mts +4 -4
  644. package/lib/codec/codec.d.ts +2 -2
  645. package/lib/codec/codec.d.ts.map +1 -1
  646. package/lib/codec/codec.js +1 -1
  647. package/lib/codec/codec.js.map +1 -1
  648. package/lib/codec/versioned/codec.d.ts +1 -1
  649. package/lib/codec/versioned/codec.d.ts.map +1 -1
  650. package/lib/codec/versioned/codec.js +2 -2
  651. package/lib/codec/versioned/codec.js.map +1 -1
  652. package/lib/core/change-family/changeFamily.d.ts +1 -4
  653. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  654. package/lib/core/change-family/changeFamily.js.map +1 -1
  655. package/lib/core/change-family/index.d.ts +1 -1
  656. package/lib/core/change-family/index.d.ts.map +1 -1
  657. package/lib/core/change-family/index.js.map +1 -1
  658. package/lib/core/index.d.ts +3 -3
  659. package/lib/core/index.d.ts.map +1 -1
  660. package/lib/core/index.js +2 -2
  661. package/lib/core/index.js.map +1 -1
  662. package/lib/core/rebase/changeRebaser.d.ts +1 -6
  663. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  664. package/lib/core/rebase/changeRebaser.js.map +1 -1
  665. package/lib/core/rebase/index.d.ts +1 -1
  666. package/lib/core/rebase/index.d.ts.map +1 -1
  667. package/lib/core/rebase/index.js +1 -1
  668. package/lib/core/rebase/index.js.map +1 -1
  669. package/lib/core/rebase/types.d.ts +1 -2
  670. package/lib/core/rebase/types.d.ts.map +1 -1
  671. package/lib/core/rebase/types.js +0 -3
  672. package/lib/core/rebase/types.js.map +1 -1
  673. package/lib/core/rebase/utils.d.ts.map +1 -1
  674. package/lib/core/rebase/utils.js +7 -25
  675. package/lib/core/rebase/utils.js.map +1 -1
  676. package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
  677. package/lib/core/schema-stored/formatV2.js +1 -1
  678. package/lib/core/schema-stored/formatV2.js.map +1 -1
  679. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  680. package/lib/core/tree/anchorSet.js +1 -1
  681. package/lib/core/tree/anchorSet.js.map +1 -1
  682. package/lib/core/tree/detachedFieldIndex.d.ts +0 -6
  683. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  684. package/lib/core/tree/detachedFieldIndex.js +1 -10
  685. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  686. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
  687. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  688. package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  689. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  690. package/lib/core/tree/detachedFieldIndexCodecV1.js +1 -1
  691. package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  692. package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  693. package/lib/core/tree/detachedFieldIndexCodecV2.js +2 -2
  694. package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  695. package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
  696. package/lib/core/tree/detachedFieldIndexFormatV1.js +2 -2
  697. package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
  698. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  699. package/lib/core/tree/detachedFieldIndexFormatV2.js +2 -2
  700. package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  701. package/lib/core/tree/index.d.ts +1 -1
  702. package/lib/core/tree/index.d.ts.map +1 -1
  703. package/lib/core/tree/index.js +1 -1
  704. package/lib/core/tree/index.js.map +1 -1
  705. package/lib/core/tree/pathTree.d.ts +3 -11
  706. package/lib/core/tree/pathTree.d.ts.map +1 -1
  707. package/lib/core/tree/pathTree.js +1 -12
  708. package/lib/core/tree/pathTree.js.map +1 -1
  709. package/lib/core/tree/visitDelta.d.ts +1 -1
  710. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  711. package/lib/core/tree/visitDelta.js.map +1 -1
  712. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  713. package/lib/core/tree/visitorUtils.js +1 -1
  714. package/lib/core/tree/visitorUtils.js.map +1 -1
  715. package/lib/feature-libraries/changeAtomIdBTree.d.ts +3 -4
  716. package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  717. package/lib/feature-libraries/changeAtomIdBTree.js +1 -14
  718. package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
  719. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  720. package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -8
  721. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  722. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
  723. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  724. package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -4
  725. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  726. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  727. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  728. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  729. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
  730. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  731. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  732. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
  733. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  734. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  735. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +1 -1
  736. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  737. package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  738. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  739. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  740. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  741. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  742. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  743. package/lib/feature-libraries/chunked-forest/codec/format.js +1 -1
  744. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  745. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  746. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  747. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  748. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  749. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
  750. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  751. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
  752. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  753. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +73 -237
  754. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  755. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
  756. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  757. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +6 -56
  758. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  759. package/lib/feature-libraries/default-schema/index.d.ts +2 -3
  760. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  761. package/lib/feature-libraries/default-schema/index.js +1 -2
  762. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  763. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
  764. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  765. package/lib/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
  766. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  767. package/lib/feature-libraries/deltaUtils.d.ts +0 -1
  768. package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
  769. package/lib/feature-libraries/deltaUtils.js +1 -5
  770. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  771. package/lib/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
  772. package/lib/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
  773. package/lib/feature-libraries/fieldKindIdentifiers.js +13 -0
  774. package/lib/feature-libraries/fieldKindIdentifiers.js.map +1 -0
  775. package/lib/feature-libraries/flex-tree/context.d.ts +0 -9
  776. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  777. package/lib/feature-libraries/flex-tree/context.js +0 -6
  778. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  779. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  780. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  781. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  782. package/lib/feature-libraries/flex-tree/lazyField.d.ts +7 -8
  783. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  784. package/lib/feature-libraries/flex-tree/lazyField.js +11 -42
  785. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  786. package/lib/feature-libraries/flex-tree/observer.d.ts +1 -1
  787. package/lib/feature-libraries/flex-tree/observer.d.ts.map +1 -1
  788. package/lib/feature-libraries/flex-tree/observer.js.map +1 -1
  789. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  790. package/lib/feature-libraries/forest-summary/codec.js +1 -1
  791. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  792. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  793. package/lib/feature-libraries/forest-summary/forestSummarizer.js +3 -3
  794. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  795. package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
  796. package/lib/feature-libraries/forest-summary/formatV1.js.map +1 -1
  797. package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
  798. package/lib/feature-libraries/forest-summary/formatV2.js.map +1 -1
  799. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
  800. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  801. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
  802. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  803. package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
  804. package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
  805. package/lib/feature-libraries/index.d.ts +3 -3
  806. package/lib/feature-libraries/index.d.ts.map +1 -1
  807. package/lib/feature-libraries/index.js +2 -2
  808. package/lib/feature-libraries/index.js.map +1 -1
  809. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  810. package/lib/feature-libraries/mapTreeCursor.js +1 -2
  811. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  812. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  813. package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
  814. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  815. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +21 -97
  816. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  817. package/lib/feature-libraries/modular-schema/crossFieldQueries.js +5 -3
  818. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  819. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
  820. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  821. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  822. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  823. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  824. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
  825. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  826. package/lib/feature-libraries/modular-schema/genericFieldKind.js +11 -5
  827. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  828. package/lib/feature-libraries/modular-schema/index.d.ts +4 -4
  829. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  830. package/lib/feature-libraries/modular-schema/index.js +2 -2
  831. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  832. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
  833. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  834. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +144 -246
  835. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  836. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  837. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
  838. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  839. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  840. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
  841. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  842. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
  843. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  844. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +463 -1319
  845. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  846. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  847. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  848. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
  849. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  850. package/lib/feature-libraries/modular-schema/modularChangeTypes.js +1 -1
  851. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  852. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  853. package/lib/feature-libraries/object-forest/objectForest.js +2 -2
  854. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  855. package/lib/feature-libraries/optional-field/index.d.ts +2 -2
  856. package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
  857. package/lib/feature-libraries/optional-field/index.js +2 -2
  858. package/lib/feature-libraries/optional-field/index.js.map +1 -1
  859. package/lib/feature-libraries/optional-field/optionalField.d.ts +34 -5
  860. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  861. package/lib/feature-libraries/optional-field/optionalField.js +453 -221
  862. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  863. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
  864. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  865. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  866. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  867. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  868. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +26 -55
  869. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  870. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  871. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
  872. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  873. package/lib/feature-libraries/optional-field/requiredField.d.ts +36 -0
  874. package/lib/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
  875. package/lib/feature-libraries/optional-field/requiredField.js +24 -0
  876. package/lib/feature-libraries/optional-field/requiredField.js.map +1 -0
  877. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
  878. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  879. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +1 -1
  880. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  881. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  882. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  883. package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
  884. package/lib/feature-libraries/schemaChecker.js +1 -1
  885. package/lib/feature-libraries/schemaChecker.js.map +1 -1
  886. package/lib/feature-libraries/sequence-field/compose.d.ts +7 -6
  887. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  888. package/lib/feature-libraries/sequence-field/compose.js +261 -85
  889. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  890. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
  891. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  892. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  893. package/lib/feature-libraries/sequence-field/index.d.ts +2 -13
  894. package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
  895. package/lib/feature-libraries/sequence-field/index.js +1 -12
  896. package/lib/feature-libraries/sequence-field/index.js.map +1 -1
  897. package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
  898. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  899. package/lib/feature-libraries/sequence-field/invert.js +169 -67
  900. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  901. package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  902. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  903. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  904. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
  905. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  906. package/lib/feature-libraries/sequence-field/moveEffectTable.js +84 -6
  907. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  908. package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
  909. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  910. package/lib/feature-libraries/sequence-field/rebase.js +116 -109
  911. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  912. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
  913. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
  914. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +46 -0
  915. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
  916. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  917. package/lib/feature-libraries/sequence-field/replaceRevisions.js +31 -18
  918. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  919. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  920. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -0
  921. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  922. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
  923. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  924. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +182 -356
  925. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  926. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  927. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +63 -21
  928. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  929. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  930. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  931. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  932. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  933. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  934. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  935. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
  936. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  937. package/lib/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
  938. package/lib/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
  939. package/lib/feature-libraries/sequence-field/sequenceKind.js +21 -0
  940. package/lib/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
  941. package/lib/feature-libraries/sequence-field/types.d.ts +59 -30
  942. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  943. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  944. package/lib/feature-libraries/sequence-field/utils.d.ts +24 -15
  945. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  946. package/lib/feature-libraries/sequence-field/utils.js +298 -112
  947. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  948. package/lib/index.d.ts +1 -1
  949. package/lib/index.d.ts.map +1 -1
  950. package/lib/index.js +1 -1
  951. package/lib/index.js.map +1 -1
  952. package/lib/packageVersion.d.ts +1 -1
  953. package/lib/packageVersion.d.ts.map +1 -1
  954. package/lib/packageVersion.js +1 -1
  955. package/lib/packageVersion.js.map +1 -1
  956. package/lib/shared-tree/independentView.d.ts.map +1 -1
  957. package/lib/shared-tree/independentView.js +3 -3
  958. package/lib/shared-tree/independentView.js.map +1 -1
  959. package/lib/shared-tree/index.d.ts +1 -1
  960. package/lib/shared-tree/index.d.ts.map +1 -1
  961. package/lib/shared-tree/index.js.map +1 -1
  962. package/lib/shared-tree/schematizeTree.d.ts +4 -4
  963. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  964. package/lib/shared-tree/schematizeTree.js +2 -3
  965. package/lib/shared-tree/schematizeTree.js.map +1 -1
  966. package/lib/shared-tree/schematizingTreeView.d.ts +5 -1
  967. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  968. package/lib/shared-tree/schematizingTreeView.js +42 -43
  969. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  970. package/lib/shared-tree/sharedTree.d.ts +5 -11
  971. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  972. package/lib/shared-tree/sharedTree.js +5 -43
  973. package/lib/shared-tree/sharedTree.js.map +1 -1
  974. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  975. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  976. package/lib/shared-tree/sharedTreeChangeCodecs.js +0 -1
  977. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  978. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
  979. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  980. package/lib/shared-tree/sharedTreeChangeEnricher.js +74 -56
  981. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  982. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
  983. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  984. package/lib/shared-tree/sharedTreeChangeFamily.js +5 -11
  985. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  986. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
  987. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  988. package/lib/shared-tree/sharedTreeEditBuilder.js +6 -12
  989. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  990. package/lib/shared-tree/tree.d.ts.map +1 -1
  991. package/lib/shared-tree/tree.js +7 -7
  992. package/lib/shared-tree/tree.js.map +1 -1
  993. package/lib/shared-tree/treeAlpha.d.ts +1 -1
  994. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  995. package/lib/shared-tree/treeAlpha.js +3 -3
  996. package/lib/shared-tree/treeAlpha.js.map +1 -1
  997. package/lib/shared-tree/treeCheckout.d.ts +29 -13
  998. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  999. package/lib/shared-tree/treeCheckout.js +55 -54
  1000. package/lib/shared-tree/treeCheckout.js.map +1 -1
  1001. package/lib/shared-tree-core/branch.d.ts +3 -4
  1002. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  1003. package/lib/shared-tree-core/branch.js +3 -4
  1004. package/lib/shared-tree-core/branch.js.map +1 -1
  1005. package/lib/shared-tree-core/branchCommitEnricher.d.ts +18 -31
  1006. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  1007. package/lib/shared-tree-core/branchCommitEnricher.js +24 -76
  1008. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  1009. package/lib/shared-tree-core/branchIdCodec.d.ts.map +1 -1
  1010. package/lib/shared-tree-core/branchIdCodec.js.map +1 -1
  1011. package/lib/shared-tree-core/changeEnricher.d.ts +8 -43
  1012. package/lib/shared-tree-core/changeEnricher.d.ts.map +1 -1
  1013. package/lib/shared-tree-core/changeEnricher.js +1 -11
  1014. package/lib/shared-tree-core/changeEnricher.js.map +1 -1
  1015. package/lib/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
  1016. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  1017. package/lib/shared-tree-core/defaultResubmitMachine.js +28 -38
  1018. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  1019. package/lib/shared-tree-core/editManager.d.ts +3 -3
  1020. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  1021. package/lib/shared-tree-core/editManager.js +11 -11
  1022. package/lib/shared-tree-core/editManager.js.map +1 -1
  1023. package/lib/shared-tree-core/editManagerCodecs.d.ts +1 -5
  1024. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  1025. package/lib/shared-tree-core/editManagerCodecs.js +1 -8
  1026. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  1027. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
  1028. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  1029. package/lib/shared-tree-core/editManagerCodecsCommons.js +1 -2
  1030. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  1031. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  1032. package/lib/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
  1033. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  1034. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  1035. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
  1036. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  1037. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
  1038. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  1039. package/lib/shared-tree-core/editManagerFormatCommons.js +0 -6
  1040. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  1041. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  1042. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  1043. package/lib/shared-tree-core/editManagerFormatV1toV4.js +0 -1
  1044. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  1045. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  1046. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  1047. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
  1048. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  1049. package/lib/shared-tree-core/index.d.ts +4 -4
  1050. package/lib/shared-tree-core/index.d.ts.map +1 -1
  1051. package/lib/shared-tree-core/index.js +2 -3
  1052. package/lib/shared-tree-core/index.js.map +1 -1
  1053. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
  1054. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  1055. package/lib/shared-tree-core/messageCodecV1ToV4.js +1 -1
  1056. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  1057. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
  1058. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  1059. package/lib/shared-tree-core/messageCodecVSharedBranches.js +2 -2
  1060. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  1061. package/lib/shared-tree-core/messageCodecs.d.ts +2 -6
  1062. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  1063. package/lib/shared-tree-core/messageCodecs.js +1 -8
  1064. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  1065. package/lib/shared-tree-core/messageFormat.d.ts +0 -1
  1066. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  1067. package/lib/shared-tree-core/messageFormat.js +0 -6
  1068. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  1069. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
  1070. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  1071. package/lib/shared-tree-core/messageFormatV1ToV4.js +0 -1
  1072. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  1073. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  1074. package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  1075. package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
  1076. package/lib/shared-tree-core/messageTypes.js.map +1 -1
  1077. package/lib/shared-tree-core/sharedTreeCore.d.ts +8 -5
  1078. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  1079. package/lib/shared-tree-core/sharedTreeCore.js +15 -15
  1080. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  1081. package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  1082. package/lib/shared-tree-core/versionedSummarizer.js +1 -1
  1083. package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
  1084. package/lib/simple-tree/api/configuration.d.ts +2 -2
  1085. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  1086. package/lib/simple-tree/api/configuration.js +4 -4
  1087. package/lib/simple-tree/api/configuration.js.map +1 -1
  1088. package/lib/simple-tree/api/create.d.ts +1 -1
  1089. package/lib/simple-tree/api/create.d.ts.map +1 -1
  1090. package/lib/simple-tree/api/create.js +1 -1
  1091. package/lib/simple-tree/api/create.js.map +1 -1
  1092. package/lib/simple-tree/api/dirtyIndex.d.ts +1 -1
  1093. package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
  1094. package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
  1095. package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
  1096. package/lib/simple-tree/api/discrepancies.js +3 -3
  1097. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  1098. package/lib/simple-tree/api/getJsonSchema.d.ts +1 -1
  1099. package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
  1100. package/lib/simple-tree/api/getJsonSchema.js +1 -1
  1101. package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
  1102. package/lib/simple-tree/api/identifierIndex.d.ts +2 -2
  1103. package/lib/simple-tree/api/identifierIndex.d.ts.map +1 -1
  1104. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  1105. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
  1106. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  1107. package/lib/simple-tree/api/incrementalAllowedTypes.js +3 -3
  1108. package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  1109. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
  1110. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  1111. package/lib/simple-tree/api/schemaCompatibilityTester.js +1 -1
  1112. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  1113. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
  1114. package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  1115. package/lib/simple-tree/api/schemaCreationUtilities.js +1 -1
  1116. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  1117. package/lib/simple-tree/api/schemaFactory.d.ts +2 -2
  1118. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  1119. package/lib/simple-tree/api/schemaFactory.js +2 -2
  1120. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  1121. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
  1122. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  1123. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -1
  1124. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  1125. package/lib/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
  1126. package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  1127. package/lib/simple-tree/api/schemaFactoryBeta.js +1 -0
  1128. package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  1129. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
  1130. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  1131. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  1132. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  1133. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  1134. package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
  1135. package/lib/simple-tree/api/schemaStatics.js.map +1 -1
  1136. package/lib/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
  1137. package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
  1138. package/lib/simple-tree/api/simpleSchemaCodec.js +3 -3
  1139. package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  1140. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
  1141. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  1142. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
  1143. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  1144. package/lib/simple-tree/api/simpleTreeIndex.d.ts +1 -1
  1145. package/lib/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
  1146. package/lib/simple-tree/api/simpleTreeIndex.js +1 -1
  1147. package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
  1148. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  1149. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +5 -5
  1150. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  1151. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  1152. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  1153. package/lib/simple-tree/api/tree.d.ts +2 -2
  1154. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  1155. package/lib/simple-tree/api/tree.js.map +1 -1
  1156. package/lib/simple-tree/api/treeBeta.d.ts +1 -1
  1157. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  1158. package/lib/simple-tree/api/treeBeta.js +2 -2
  1159. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  1160. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  1161. package/lib/simple-tree/api/treeNodeApi.js +4 -4
  1162. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  1163. package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
  1164. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  1165. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  1166. package/lib/simple-tree/api/verboseTree.d.ts +1 -1
  1167. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  1168. package/lib/simple-tree/api/verboseTree.js +3 -3
  1169. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  1170. package/lib/simple-tree/core/allowedTypes.d.ts +1 -1
  1171. package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
  1172. package/lib/simple-tree/core/allowedTypes.js +2 -2
  1173. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  1174. package/lib/simple-tree/core/context.d.ts.map +1 -1
  1175. package/lib/simple-tree/core/context.js.map +1 -1
  1176. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  1177. package/lib/simple-tree/core/treeNode.js +1 -1
  1178. package/lib/simple-tree/core/treeNode.js.map +1 -1
  1179. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  1180. package/lib/simple-tree/core/treeNodeKernel.js +1 -3
  1181. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  1182. package/lib/simple-tree/core/treeNodeSchema.d.ts +5 -5
  1183. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  1184. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  1185. package/lib/simple-tree/core/treeNodeValid.d.ts +3 -3
  1186. package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  1187. package/lib/simple-tree/core/treeNodeValid.js +2 -2
  1188. package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
  1189. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
  1190. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  1191. package/lib/simple-tree/core/unhydratedFlexTree.js +8 -58
  1192. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  1193. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  1194. package/lib/simple-tree/core/withType.js.map +1 -1
  1195. package/lib/simple-tree/createContext.d.ts.map +1 -1
  1196. package/lib/simple-tree/createContext.js.map +1 -1
  1197. package/lib/simple-tree/fieldSchema.d.ts +5 -5
  1198. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  1199. package/lib/simple-tree/fieldSchema.js.map +1 -1
  1200. package/lib/simple-tree/index.d.ts +2 -2
  1201. package/lib/simple-tree/index.d.ts.map +1 -1
  1202. package/lib/simple-tree/index.js +1 -1
  1203. package/lib/simple-tree/index.js.map +1 -1
  1204. package/lib/simple-tree/leafNodeSchema.d.ts +1 -1
  1205. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  1206. package/lib/simple-tree/leafNodeSchema.js +2 -2
  1207. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  1208. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +1 -1
  1209. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  1210. package/lib/simple-tree/node-kinds/array/arrayNode.js +6 -8
  1211. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  1212. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
  1213. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  1214. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  1215. package/lib/simple-tree/node-kinds/common.d.ts.map +1 -1
  1216. package/lib/simple-tree/node-kinds/common.js +2 -2
  1217. package/lib/simple-tree/node-kinds/common.js.map +1 -1
  1218. package/lib/simple-tree/node-kinds/map/mapNode.d.ts +2 -2
  1219. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  1220. package/lib/simple-tree/node-kinds/map/mapNode.js +8 -8
  1221. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  1222. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
  1223. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  1224. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  1225. package/lib/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
  1226. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  1227. package/lib/simple-tree/node-kinds/object/objectNode.js +22 -22
  1228. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  1229. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
  1230. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  1231. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  1232. package/lib/simple-tree/node-kinds/record/recordNode.d.ts +1 -1
  1233. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  1234. package/lib/simple-tree/node-kinds/record/recordNode.js +6 -8
  1235. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  1236. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
  1237. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  1238. package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  1239. package/lib/simple-tree/prepareForInsertion.d.ts +47 -54
  1240. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  1241. package/lib/simple-tree/prepareForInsertion.js +125 -184
  1242. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  1243. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  1244. package/lib/simple-tree/simpleSchema.js.map +1 -1
  1245. package/lib/simple-tree/treeSchema.d.ts.map +1 -1
  1246. package/lib/simple-tree/treeSchema.js.map +1 -1
  1247. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
  1248. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  1249. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +13 -30
  1250. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  1251. package/lib/tableSchema.d.ts.map +1 -1
  1252. package/lib/tableSchema.js +2 -1
  1253. package/lib/tableSchema.js.map +1 -1
  1254. package/lib/text/index.d.ts +1 -0
  1255. package/lib/text/index.d.ts.map +1 -1
  1256. package/lib/text/index.js +1 -0
  1257. package/lib/text/index.js.map +1 -1
  1258. package/lib/text/textDomain.d.ts +8 -0
  1259. package/lib/text/textDomain.d.ts.map +1 -1
  1260. package/lib/text/textDomain.js +1 -1
  1261. package/lib/text/textDomain.js.map +1 -1
  1262. package/lib/text/textDomainFormatted.d.ts +572 -0
  1263. package/lib/text/textDomainFormatted.d.ts.map +1 -0
  1264. package/lib/text/textDomainFormatted.js +180 -0
  1265. package/lib/text/textDomainFormatted.js.map +1 -0
  1266. package/lib/treeFactory.d.ts.map +1 -1
  1267. package/lib/treeFactory.js +4 -14
  1268. package/lib/treeFactory.js.map +1 -1
  1269. package/lib/util/bTreeUtils.d.ts.map +1 -1
  1270. package/lib/util/bTreeUtils.js +1 -1
  1271. package/lib/util/bTreeUtils.js.map +1 -1
  1272. package/lib/util/index.d.ts +1 -1
  1273. package/lib/util/index.d.ts.map +1 -1
  1274. package/lib/util/index.js +1 -1
  1275. package/lib/util/index.js.map +1 -1
  1276. package/lib/util/rangeMap.d.ts +12 -24
  1277. package/lib/util/rangeMap.d.ts.map +1 -1
  1278. package/lib/util/rangeMap.js +5 -44
  1279. package/lib/util/rangeMap.js.map +1 -1
  1280. package/lib/util/readSnapshotBlob.d.ts +1 -1
  1281. package/lib/util/readSnapshotBlob.d.ts.map +1 -1
  1282. package/lib/util/readSnapshotBlob.js.map +1 -1
  1283. package/package.json +22 -22
  1284. package/src/codec/codec.ts +10 -7
  1285. package/src/codec/versioned/codec.ts +3 -3
  1286. package/src/core/change-family/changeFamily.ts +0 -5
  1287. package/src/core/change-family/index.ts +0 -1
  1288. package/src/core/index.ts +1 -4
  1289. package/src/core/rebase/changeRebaser.ts +1 -6
  1290. package/src/core/rebase/index.ts +0 -1
  1291. package/src/core/rebase/types.ts +1 -8
  1292. package/src/core/rebase/utils.ts +7 -31
  1293. package/src/core/schema-stored/formatV2.ts +2 -1
  1294. package/src/core/tree/anchorSet.ts +1 -1
  1295. package/src/core/tree/detachedFieldIndex.ts +2 -18
  1296. package/src/core/tree/detachedFieldIndexCodecCommon.ts +2 -1
  1297. package/src/core/tree/detachedFieldIndexCodecV1.ts +2 -2
  1298. package/src/core/tree/detachedFieldIndexCodecV2.ts +3 -3
  1299. package/src/core/tree/detachedFieldIndexFormatV1.ts +3 -2
  1300. package/src/core/tree/detachedFieldIndexFormatV2.ts +3 -2
  1301. package/src/core/tree/index.ts +1 -2
  1302. package/src/core/tree/pathTree.ts +4 -16
  1303. package/src/core/tree/visitDelta.ts +2 -3
  1304. package/src/core/tree/visitorUtils.ts +2 -1
  1305. package/src/feature-libraries/changeAtomIdBTree.ts +4 -28
  1306. package/src/feature-libraries/chunked-forest/basicChunk.ts +1 -7
  1307. package/src/feature-libraries/chunked-forest/chunkTree.ts +2 -7
  1308. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +1 -1
  1309. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -1
  1310. package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -1
  1311. package/src/feature-libraries/chunked-forest/codec/codecs.ts +2 -2
  1312. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
  1313. package/src/feature-libraries/chunked-forest/codec/format.ts +1 -1
  1314. package/src/feature-libraries/chunked-forest/codec/formatGeneric.ts +1 -0
  1315. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +3 -3
  1316. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +128 -405
  1317. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +27 -123
  1318. package/src/feature-libraries/default-schema/index.ts +5 -22
  1319. package/src/feature-libraries/default-schema/mappedEditBuilder.ts +9 -35
  1320. package/src/feature-libraries/deltaUtils.ts +1 -6
  1321. package/src/feature-libraries/fieldKindIdentifiers.ts +16 -0
  1322. package/src/feature-libraries/flex-tree/context.ts +0 -17
  1323. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +8 -7
  1324. package/src/feature-libraries/flex-tree/lazyField.ts +26 -69
  1325. package/src/feature-libraries/flex-tree/observer.ts +3 -1
  1326. package/src/feature-libraries/forest-summary/codec.ts +1 -1
  1327. package/src/feature-libraries/forest-summary/forestSummarizer.ts +6 -6
  1328. package/src/feature-libraries/forest-summary/formatV1.ts +1 -0
  1329. package/src/feature-libraries/forest-summary/formatV2.ts +1 -0
  1330. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +9 -7
  1331. package/src/feature-libraries/forest-summary/summaryTypes.ts +1 -0
  1332. package/src/feature-libraries/index.ts +8 -27
  1333. package/src/feature-libraries/mapTreeCursor.ts +2 -3
  1334. package/src/feature-libraries/mitigatedChangeFamily.ts +1 -3
  1335. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +44 -142
  1336. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +58 -32
  1337. package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +1 -0
  1338. package/src/feature-libraries/modular-schema/genericFieldKind.ts +20 -8
  1339. package/src/feature-libraries/modular-schema/index.ts +15 -16
  1340. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +336 -543
  1341. package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +2 -2
  1342. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +3 -15
  1343. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +753 -2582
  1344. package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +0 -1
  1345. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +8 -55
  1346. package/src/feature-libraries/object-forest/objectForest.ts +2 -2
  1347. package/src/feature-libraries/optional-field/index.ts +5 -5
  1348. package/src/feature-libraries/optional-field/optionalField.ts +592 -317
  1349. package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +38 -24
  1350. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +35 -89
  1351. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +1 -5
  1352. package/src/feature-libraries/optional-field/requiredField.ts +62 -0
  1353. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +1 -1
  1354. package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +1 -0
  1355. package/src/feature-libraries/schemaChecker.ts +3 -2
  1356. package/src/feature-libraries/sequence-field/compose.ts +522 -139
  1357. package/src/feature-libraries/sequence-field/helperTypes.ts +19 -34
  1358. package/src/feature-libraries/sequence-field/index.ts +2 -42
  1359. package/src/feature-libraries/sequence-field/invert.ts +228 -103
  1360. package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
  1361. package/src/feature-libraries/sequence-field/moveEffectTable.ts +195 -8
  1362. package/src/feature-libraries/sequence-field/rebase.ts +205 -169
  1363. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +57 -0
  1364. package/src/feature-libraries/sequence-field/replaceRevisions.ts +47 -25
  1365. package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +2 -0
  1366. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +228 -648
  1367. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +70 -56
  1368. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +27 -25
  1369. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +129 -19
  1370. package/src/feature-libraries/sequence-field/sequenceKind.ts +40 -0
  1371. package/src/feature-libraries/sequence-field/types.ts +64 -34
  1372. package/src/feature-libraries/sequence-field/utils.ts +353 -139
  1373. package/src/index.ts +1 -1
  1374. package/src/packageVersion.ts +1 -1
  1375. package/src/shared-tree/independentView.ts +4 -3
  1376. package/src/shared-tree/index.ts +2 -3
  1377. package/src/shared-tree/schematizeTree.ts +8 -21
  1378. package/src/shared-tree/schematizingTreeView.ts +79 -61
  1379. package/src/shared-tree/sharedTree.ts +10 -64
  1380. package/src/shared-tree/sharedTreeChangeCodecs.ts +2 -5
  1381. package/src/shared-tree/sharedTreeChangeEnricher.ts +87 -68
  1382. package/src/shared-tree/sharedTreeChangeFamily.ts +5 -15
  1383. package/src/shared-tree/sharedTreeEditBuilder.ts +8 -39
  1384. package/src/shared-tree/tree.ts +10 -10
  1385. package/src/shared-tree/treeAlpha.ts +26 -25
  1386. package/src/shared-tree/treeCheckout.ts +119 -94
  1387. package/src/shared-tree-core/branch.ts +6 -12
  1388. package/src/shared-tree-core/branchCommitEnricher.ts +25 -77
  1389. package/src/shared-tree-core/branchIdCodec.ts +1 -0
  1390. package/src/shared-tree-core/changeEnricher.ts +8 -52
  1391. package/src/shared-tree-core/defaultResubmitMachine.ts +39 -51
  1392. package/src/shared-tree-core/editManager.ts +8 -22
  1393. package/src/shared-tree-core/editManagerCodecs.ts +3 -13
  1394. package/src/shared-tree-core/editManagerCodecsCommons.ts +7 -6
  1395. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +1 -1
  1396. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +2 -2
  1397. package/src/shared-tree-core/editManagerFormatCommons.ts +1 -6
  1398. package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -3
  1399. package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +3 -2
  1400. package/src/shared-tree-core/index.ts +2 -7
  1401. package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -5
  1402. package/src/shared-tree-core/messageCodecVSharedBranches.ts +4 -4
  1403. package/src/shared-tree-core/messageCodecs.ts +3 -13
  1404. package/src/shared-tree-core/messageFormat.ts +0 -6
  1405. package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -3
  1406. package/src/shared-tree-core/messageFormatVSharedBranches.ts +1 -0
  1407. package/src/shared-tree-core/messageTypes.ts +1 -0
  1408. package/src/shared-tree-core/sharedTreeCore.ts +27 -31
  1409. package/src/shared-tree-core/versionedSummarizer.ts +3 -1
  1410. package/src/simple-tree/api/configuration.ts +9 -9
  1411. package/src/simple-tree/api/create.ts +7 -6
  1412. package/src/simple-tree/api/dirtyIndex.ts +4 -2
  1413. package/src/simple-tree/api/discrepancies.ts +9 -8
  1414. package/src/simple-tree/api/getJsonSchema.ts +4 -3
  1415. package/src/simple-tree/api/identifierIndex.ts +4 -2
  1416. package/src/simple-tree/api/incrementalAllowedTypes.ts +6 -5
  1417. package/src/simple-tree/api/schemaCompatibilityTester.ts +3 -3
  1418. package/src/simple-tree/api/schemaCreationUtilities.ts +4 -3
  1419. package/src/simple-tree/api/schemaFactory.ts +16 -17
  1420. package/src/simple-tree/api/schemaFactoryAlpha.ts +21 -21
  1421. package/src/simple-tree/api/schemaFactoryBeta.ts +17 -15
  1422. package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -1
  1423. package/src/simple-tree/api/schemaFromSimple.ts +1 -1
  1424. package/src/simple-tree/api/schemaStatics.ts +2 -0
  1425. package/src/simple-tree/api/simpleSchemaCodec.ts +12 -11
  1426. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +20 -18
  1427. package/src/simple-tree/api/simpleTreeIndex.ts +6 -4
  1428. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +7 -5
  1429. package/src/simple-tree/api/storedSchema.ts +2 -1
  1430. package/src/simple-tree/api/tree.ts +2 -2
  1431. package/src/simple-tree/api/treeBeta.ts +3 -3
  1432. package/src/simple-tree/api/treeNodeApi.ts +14 -13
  1433. package/src/simple-tree/api/typesUnsafe.ts +7 -8
  1434. package/src/simple-tree/api/verboseTree.ts +6 -5
  1435. package/src/simple-tree/core/allowedTypes.ts +4 -4
  1436. package/src/simple-tree/core/context.ts +1 -1
  1437. package/src/simple-tree/core/treeNode.ts +1 -1
  1438. package/src/simple-tree/core/treeNodeKernel.ts +1 -3
  1439. package/src/simple-tree/core/treeNodeSchema.ts +7 -6
  1440. package/src/simple-tree/core/treeNodeValid.ts +9 -9
  1441. package/src/simple-tree/core/unhydratedFlexTree.ts +37 -88
  1442. package/src/simple-tree/core/withType.ts +3 -2
  1443. package/src/simple-tree/createContext.ts +1 -0
  1444. package/src/simple-tree/fieldSchema.ts +5 -8
  1445. package/src/simple-tree/index.ts +1 -2
  1446. package/src/simple-tree/leafNodeSchema.ts +3 -3
  1447. package/src/simple-tree/node-kinds/array/arrayNode.ts +20 -21
  1448. package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +2 -2
  1449. package/src/simple-tree/node-kinds/common.ts +6 -3
  1450. package/src/simple-tree/node-kinds/map/mapNode.ts +20 -19
  1451. package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +2 -2
  1452. package/src/simple-tree/node-kinds/object/objectNode.ts +37 -37
  1453. package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +8 -7
  1454. package/src/simple-tree/node-kinds/record/recordNode.ts +21 -22
  1455. package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +1 -2
  1456. package/src/simple-tree/prepareForInsertion.ts +205 -345
  1457. package/src/simple-tree/simpleSchema.ts +1 -0
  1458. package/src/simple-tree/treeSchema.ts +1 -0
  1459. package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +16 -44
  1460. package/src/tableSchema.ts +3 -1
  1461. package/src/text/index.ts +1 -0
  1462. package/src/text/textDomain.ts +1 -1
  1463. package/src/text/textDomainFormatted.ts +309 -0
  1464. package/src/treeFactory.ts +8 -18
  1465. package/src/util/bTreeUtils.ts +1 -1
  1466. package/src/util/index.ts +0 -3
  1467. package/src/util/rangeMap.ts +18 -72
  1468. package/src/util/readSnapshotBlob.ts +4 -2
  1469. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
  1470. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
  1471. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -132
  1472. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
  1473. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
  1474. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
  1475. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -393
  1476. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
  1477. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
  1478. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
  1479. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -32
  1480. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
  1481. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
  1482. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
  1483. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -31
  1484. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
  1485. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
  1486. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
  1487. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -57
  1488. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
  1489. package/dist/shared-tree-core/transactionEnricher.d.ts +0 -23
  1490. package/dist/shared-tree-core/transactionEnricher.d.ts.map +0 -1
  1491. package/dist/shared-tree-core/transactionEnricher.js +0 -74
  1492. package/dist/shared-tree-core/transactionEnricher.js.map +0 -1
  1493. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
  1494. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
  1495. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -128
  1496. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
  1497. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
  1498. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
  1499. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -389
  1500. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
  1501. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
  1502. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
  1503. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -29
  1504. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
  1505. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
  1506. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
  1507. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -27
  1508. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
  1509. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
  1510. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
  1511. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -53
  1512. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
  1513. package/lib/shared-tree-core/transactionEnricher.d.ts +0 -23
  1514. package/lib/shared-tree-core/transactionEnricher.d.ts.map +0 -1
  1515. package/lib/shared-tree-core/transactionEnricher.js +0 -70
  1516. package/lib/shared-tree-core/transactionEnricher.js.map +0 -1
  1517. package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +0 -188
  1518. package/src/feature-libraries/modular-schema/modularChangeCodecV3.ts +0 -760
  1519. package/src/feature-libraries/modular-schema/modularChangeFormatV3.ts +0 -62
  1520. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV3.ts +0 -45
  1521. package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +0 -94
  1522. package/src/shared-tree-core/transactionEnricher.ts +0 -74
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFactoryBeta.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactoryBeta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAIN,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAGN,KAAK,gCAAgC,EACrC,KAAK,wBAAw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C,eAAe,GAAG,OAAO,EAE/B,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,EACf,OAAO,CAAC,EAAE,iBAAiB,CAAC,eAAe,CAAC,GAC1C,mBAAmB,CACV,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,EAC9B,QAAQ,CAAC,MAAM,EACd,cAAc,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,EACvE,wBAAwB,CAAC,CAAC,CAAC,EACf,IAAI,EACvB,CAAC,EACY,SAAS,EACX,eAAe,CACrC;IA0DD;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;IA8BnB;;;;;;OAMG;IAEI,eAAe,CACrB,IAAI,SAAS,KAAK,EAClB,KAAK,CAAC,CAAC,SAAS,aAAa,CAAC,0BAA0B,EACxD,KAAK,CAAC,eAAe,GAAG,OAAO,EAC9B,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC,eAAe,CAAC;;;CA6B3E"}
@@ -6,6 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.SchemaFactoryBeta = void 0;
8
8
  const index_js_1 = require("../core/index.js");
9
+ /* eslint-enable unused-imports/no-unused-imports, import-x/no-duplicates */
9
10
  const index_js_2 = require("../node-kinds/index.js");
10
11
  const schemaFactory_js_1 = require("./schemaFactory.js");
11
12
  const staged = (t) => {
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFactoryBeta.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactoryBeta.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAe0B;AAE1B,qDAOgC;AAChC,yDAQ4B;AA4G5B,MAAM,MAAM,GAAG,CACd,CAA8B,EACJ,EAAE;IAC5B,MAAM,aAAa,GAAG,IAAA,0CAA+B,EAAC,CAAC,CAAC,CAA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H,CAAC;;AAlWF,8CAmWC;AA/VA;;GAEG;AACW,wBAAM,GAAG,iBAAiB,CAAC,MAAM,AAA3B,CAA4B;AAOhD;;GAEG;AACW,iCAAe,GAAG,iBAAiB,CAAC,eAAe,AAApC,CAAqC;AAOlE;;GAEG;AACW,uBAAK,GAAG,iBAAiB,CAAC,KAAK,AAA1B,CAA2B;AAO9C;;GAEG;AACW,gCAAc,GAAG,iBAAiB,CAAC,cAAc,AAAnC,CAAoC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tAnnotatedAllowedTypesInternal,\n\tcreateSchemaUpgrade,\n\tnormalizeToAnnotatedAllowedType,\n\ttype AllowedTypesFullFromMixed,\n\ttype AllowedTypesMetadata,\n\ttype AnnotatedAllowedType,\n\ttype ImplicitAllowedTypes,\n\ttype LazyItem,\n\ttype NodeKind,\n\ttype TreeNodeSchema,\n\ttype TreeNodeSchemaBoth,\n\ttype TreeNodeSchemaClass,\n\ttype TreeNodeSchemaNonClass,\n\ttype WithType,\n} from \"../core/index.js\";\n\nimport {\n\tobjectSchema,\n\trecordSchema,\n\ttype InsertableObjectFromSchemaRecord,\n\ttype RecordNodeInsertableData,\n\ttype TreeObjectNode,\n\ttype TreeRecordNode,\n} from \"../node-kinds/index.js\";\nimport {\n\tdefaultSchemaFactoryObjectOptions,\n\tSchemaFactory,\n\tscoped,\n\tstructuralName,\n\ttype NodeSchemaOptions,\n\ttype ObjectSchemaOptions,\n\ttype ScopedSchemaName,\n} from \"./schemaFactory.js\";\nimport type {\n\tAllowedTypesFullFromMixedUnsafe,\n\tAnnotatedAllowedTypeUnsafe,\n\tSystem_Unsafe,\n\tTreeRecordNodeUnsafe,\n\tUnannotateAllowedTypeUnsafe,\n\tUnenforced,\n} from \"./typesUnsafe.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\tImplicitFieldSchema,\n} from \"../fieldSchema.js\";\nimport type { LeafSchema } from \"../leafNodeSchema.js\";\nimport type { SimpleLeafNodeSchema } from \"../simpleSchema.js\";\nimport type { RestrictiveStringRecord } from \"../../util/index.js\";\n/* eslint-enable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars, import-x/no-duplicates */\n\n/**\n * Stateless APIs exposed via {@link SchemaFactoryBeta} as both instance properties and as statics.\n * @see {@link SchemaStatics} for why this is useful.\n * @system @sealed @beta\n */\nexport interface SchemaStaticsBeta {\n\t/**\n\t * Declares a staged type in a set of {@link AllowedTypes}.\n\t *\n\t * @remarks\n\t * Staged allowed types add support for loading documents which may contain that type at the declared location.\n\t * This allows for an incremental rollout of a schema change to add a {@link TreeNodeSchema} to an {@link AllowedTypes} without breaking cross version collaboration.\n\t * A guide on this process can be found here: https://fluidframework.com/docs/data-structures/tree/schema-evolution/allowed-types-rollout\n\t *\n\t * Once enough clients have the type staged (and thus can read documents which allow it), documents can start being created and upgraded to allow the staged type.\n\t * This is done by deploying a new version of the app which removes the `staged` wrapper around the allowed type in the the schema definition.\n\t * This will also require {@link TreeView.upgradeSchema|upgrading the schema} for existing documents.\n\t *\n\t * Using a staged allowed type in a schema is just like using the schema as an allowed type with the following exceptions:\n\t *\n\t * 1. {@link TreeView.initialize} will omit the staged allowed type from the newly created stored schema.\n\t * 2. {@link TreeView.upgradeSchema} will omit the staged allowed type from the the upgraded stored schema.\n\t * 3. When evaluating {@link TreeView.compatibility}, it will be viewable even if the staged allowed type is not present in the stored schema's corresponding allowed types.\n\t * 4. Because of the above, it is possible to get errors when inserting content which uses the staged allowed type into a tree whose stored schema does not permit it.\n\t *\n\t * For recursive schemas, use {@link SchemaStaticsBeta.stagedRecursive} instead.\n\t * It offers equivalent runtime behavior with relaxed compile-time typing for recursive type.\n\t *\n\t * @example\n\t * A full code example of the schema migration process can be found in our {@link https://github.com/microsoft/FluidFramework/blob/main/packages/dds/tree/src/test/simple-tree/api/stagedSchemaUpgrade.spec.ts | tests}.\n\t *\n\t * @privateRemarks\n\t * TODO:#44317 staged allowed types rely on schema validation of stored schema to output errors, these errors are not very\n\t * user friendly and should be improved, particularly in the case of staged allowed types\n\t *\n\t * TODO: AB#45711: Update the docs above when recursive type support is added.\n\t */\n\treadonly staged: <const T extends LazyItem<TreeNodeSchema>>(\n\t\tt: T | AnnotatedAllowedType<T>,\n\t) => AnnotatedAllowedType<T>;\n\n\t/**\n\t * Normalize information about a set of {@link AllowedTypes} into an {@link AllowedTypesFull}.\n\t * @remarks\n\t * This can take in {@link AnnotatedAllowedType} to preserve their annotations.\n\t */\n\treadonly types: <\n\t\tconst T extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[],\n\t>(\n\t\tt: T,\n\t\tmetadata?: AllowedTypesMetadata,\n\t) => AllowedTypesFullFromMixed<T>;\n\n\t/**\n\t * {@link SchemaStaticsBeta.staged} 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 {@link SchemaStaticsBeta.staged} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.\n\t * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.\n\t */\n\tstagedRecursive: <\n\t\tconst T extends Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>,\n\t>(\n\t\tt: T,\n\t) => AnnotatedAllowedTypeUnsafe<UnannotateAllowedTypeUnsafe<T>>;\n\n\t/**\n\t * {@link SchemaStaticsBeta.types} 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 {@link SchemaStaticsBeta.types} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.\n\t * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.\n\t * @privateRemarks\n\t * If all inputs (at least recursive ones) were required to be annotated, this could be typed more strongly.\n\t * In that case it could use `T extends readonly (AnnotatedAllowedTypeUnsafe | LazyItem<System_Unsafe.TreeNodeSchemaUnsafe>)[]`.\n\t */\n\treadonly typesRecursive: <\n\t\tconst T extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[],\n\t>(\n\t\tt: T,\n\t\tmetadata?: AllowedTypesMetadata,\n\t) => AllowedTypesFullFromMixedUnsafe<T>;\n}\n\nconst staged = <const T extends LazyItem<TreeNodeSchema>>(\n\tt: T | AnnotatedAllowedType<T>,\n): AnnotatedAllowedType<T> => {\n\tconst annotatedType = normalizeToAnnotatedAllowedType(t);\n\treturn {\n\t\ttype: annotatedType.type,\n\t\tmetadata: {\n\t\t\t...annotatedType.metadata,\n\t\t\tstagedSchemaUpgrade: createSchemaUpgrade(),\n\t\t},\n\t};\n};\n\nconst types = <const T extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[]>(\n\tt: T,\n\tmetadata: AllowedTypesMetadata = {},\n): AllowedTypesFullFromMixed<T> => {\n\treturn AnnotatedAllowedTypesInternal.createMixed<T>(t, metadata);\n};\n\nconst schemaStaticsBeta: SchemaStaticsBeta = {\n\tstaged,\n\ttypes,\n\n\tstagedRecursive: staged as SchemaStaticsBeta[\"stagedRecursive\"],\n\ttypesRecursive: types as unknown as SchemaStaticsBeta[\"typesRecursive\"],\n};\n\n/**\n * {@link SchemaFactory} with additional beta APIs.\n * @beta\n * @privateRemarks\n */\nexport class SchemaFactoryBeta<\n\tout TScope extends string | undefined = string | undefined,\n\tTName extends number | string = string,\n> extends SchemaFactory<TScope, TName> {\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.staged}\n\t */\n\tpublic static staged = schemaStaticsBeta.staged;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.staged}\n\t */\n\tpublic staged = schemaStaticsBeta.staged;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.stagedRecursive}\n\t */\n\tpublic static stagedRecursive = schemaStaticsBeta.stagedRecursive;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.stagedRecursive}\n\t */\n\tpublic stagedRecursive = schemaStaticsBeta.stagedRecursive;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.types}\n\t */\n\tpublic static types = schemaStaticsBeta.types;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.types}\n\t */\n\tpublic types = schemaStaticsBeta.types;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.typesRecursive}\n\t */\n\tpublic static typesRecursive = schemaStaticsBeta.typesRecursive;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.typesRecursive}\n\t */\n\tpublic typesRecursive = schemaStaticsBeta.typesRecursive;\n\n\t/**\n\t * Create a {@link SchemaFactory} with a {@link SchemaFactory.scope|scope} which is a combination of this factory's scope and the provided name.\n\t * @remarks\n\t * The main use-case for this is when creating a collection of related schema (for example using a function that creates multiple schema).\n\t * Creating such related schema using a sub-scope helps ensure they won't collide with other schema in the parent scope.\n\t */\n\tpublic scopedFactory<const T extends TName, TNameInner extends number | string = string>(\n\t\tname: T,\n\t): SchemaFactoryBeta<ScopedSchemaName<TScope, T>, TNameInner> {\n\t\treturn new SchemaFactoryBeta(scoped<TScope, TName, T>(this, name));\n\t}\n\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 override object<\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?: ObjectSchemaOptions<TCustomMetadata>,\n\t): TreeNodeSchemaClass<\n\t\tScopedSchemaName<TScope, Name>,\n\t\tNodeKind.Object,\n\t\tTreeObjectNode<T, ScopedSchemaName<TScope, Name>>,\n\t\tobject & InsertableObjectFromSchemaRecord<T>,\n\t\ttrue,\n\t\tT,\n\t\tnever,\n\t\tTCustomMetadata\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\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?: ObjectSchemaOptions<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\ttype TScopedName = ScopedSchemaName<TScope, Name>;\n\t\treturn this.object(\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}\n\n\t/**\n\t * Define a structurally typed {@link TreeNodeSchema} for a {@link (TreeRecordNode:interface)}.\n\t *\n\t * @param allowedTypes - The types that may appear in the record.\n\t *\n\t * @remarks\n\t * The identifier for this record is defined as a function of the provided types.\n\t * It is still scoped to this `SchemaFactory`, but multiple calls with the same arguments will return the same\n\t * schema object, providing somewhat structural typing.\n\t * This does not support recursive types.\n\t *\n\t * If using these structurally named records, other types in this schema builder should avoid names of the form `Record<${string}>`.\n\t *\n\t * The underlying data format for `Record` nodes is the same as that for `Map` nodes.\n\t * Therefore, changing an existing `Map` schema to a `Record` schema (or vice versa) is\n\t * a non-breaking change and does not require schema migration.\n\t *\n\t * @example\n\t * The returned schema should be used as a schema directly:\n\t * ```typescript\n\t * const MyRecord = factory.record(factory.number);\n\t * type MyRecord = NodeFromSchema<typeof Record>;\n\t * ```\n\t * Or inline:\n\t * ```typescript\n\t * factory.object(\"Foo\", { myRecord: factory.record(factory.number) });\n\t * ```\n\t *\n\t * @privateRemarks\n\t * The name produced at the type-level here is not as specific as it could be; however, doing type-level sorting and escaping is a real mess.\n\t * There are cases where not having this full type provided will be less than ideal, since TypeScript's structural types will allow assignment between runtime incompatible types at compile time.\n\t * For example, attempts to narrow unions of structural records by name won't work.\n\t * Planned future changes to move to a class based schema system as well as factor function based node construction should mostly avoid these issues,\n\t * though there may still be some problematic cases even after that work is done.\n\t *\n\t * The return value is a class, but its type is intentionally not specific enough to indicate it is a class.\n\t * This prevents callers of this from sub-classing it, which is unlikely to work well (due to the ease of accidentally giving two different calls to this different subclasses)\n\t * when working with structural typing.\n\t *\n\t * {@label STRUCTURAL}\n\t */\n\tpublic record<const T extends TreeNodeSchema | readonly TreeNodeSchema[]>(\n\t\tallowedTypes: T,\n\t): TreeNodeSchemaNonClass<\n\t\t/* Name */ ScopedSchemaName<TScope, `Record<${string}>`>,\n\t\t/* Kind */ NodeKind.Record,\n\t\t/* TNode */ TreeRecordNode<T> &\n\t\t\tWithType<ScopedSchemaName<TScope, `Record<${string}>`>, NodeKind.Record>,\n\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t/* ImplicitlyConstructable */ true,\n\t\t/* Info */ T,\n\t\t/* TConstructorExtra */ undefined\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 * @remarks\n\t * The underlying data format for `Record` nodes is the same as that for `Map` nodes.\n\t * Therefore, changing an existing `Map` schema to a `Record` schema (or vice versa) is\n\t * a non-breaking change and does not require schema migration.\n\t *\n\t * Like TypeScript `Record`s, record nodes have some potential pitfalls.\n\t * For example: TypeScript makes assumptions about built-in keys being present (e.g. `toString`, `hasOwnProperty`, etc.).\n\t * Since these are otherwise valid keys in a record, this can lead to unexpected behavior.\n\t * To prevent inconsistent behavior, these built-ins are hidden by record nodes.\n\t * This means that if you try to call these built-ins (e.g. `toString()`) on a record node, you will get an error.\n\t *\n\t * @example\n\t * ```typescript\n\t * class NamedRecord extends factory.record(\"name\", factory.number) {}\n\t * ```\n\t *\n\t * {@label NAMED}\n\t */\n\tpublic record<\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?: NodeSchemaOptions<TCustomMetadata>,\n\t): TreeNodeSchemaClass<\n\t\t/* Name */ ScopedSchemaName<TScope, Name>,\n\t\t/* Kind */ NodeKind.Record,\n\t\t/* TNode */ TreeRecordNode<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Record>,\n\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t/* ImplicitlyConstructable */ true,\n\t\t/* Info */ T,\n\t\t/* TConstructorExtra */ undefined,\n\t\t/* TCustomMetadata */ TCustomMetadata\n\t>;\n\n\t/**\n\t * {@link SchemaFactoryBeta.record} implementation.\n\t *\n\t * @privateRemarks\n\t * This should return {@link TreeNodeSchemaBoth}: see note on {@link SchemaFactory.map} implementation for details.\n\t */\n\tpublic record<const T extends ImplicitAllowedTypes>(\n\t\tnameOrAllowedTypes: TName | ((T & TreeNodeSchema) | readonly TreeNodeSchema[]),\n\t\tmaybeAllowedTypes?: T,\n\t\toptions?: NodeSchemaOptions,\n\t): TreeNodeSchema<\n\t\t/* Name */ ScopedSchemaName<TScope, string>,\n\t\t/* Kind */ NodeKind.Record,\n\t\t/* TNode */ TreeRecordNode<T>,\n\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t/* ImplicitlyConstructable */ true,\n\t\t/* Info */ T\n\t> {\n\t\tif (maybeAllowedTypes === undefined) {\n\t\t\tconst nodeTypes = nameOrAllowedTypes as (T & TreeNodeSchema) | readonly TreeNodeSchema[];\n\t\t\tconst fullName = structuralName(\"Record\", nodeTypes);\n\t\t\treturn this.getStructuralType(fullName, nodeTypes, () =>\n\t\t\t\tthis.namedRecord(\n\t\t\t\t\tfullName,\n\t\t\t\t\tnameOrAllowedTypes as T,\n\t\t\t\t\t/* customizable */ false,\n\t\t\t\t\t/* implicitlyConstructable */ true,\n\t\t\t\t),\n\t\t\t) as TreeNodeSchemaClass<\n\t\t\t\t/* Name */ ScopedSchemaName<TScope, string>,\n\t\t\t\t/* Kind */ NodeKind.Record,\n\t\t\t\t/* TNode */ TreeRecordNode<T>,\n\t\t\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t\t\t/* ImplicitlyConstructable */ true,\n\t\t\t\t/* Info */ T,\n\t\t\t\t/* TConstructorExtra */ undefined\n\t\t\t>;\n\t\t}\n\t\tconst out: TreeNodeSchemaBoth<\n\t\t\t/* Name */ ScopedSchemaName<TScope, string>,\n\t\t\t/* Kind */ NodeKind.Record,\n\t\t\t/* TNode */ TreeRecordNode<T>,\n\t\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t\t/* ImplicitlyConstructable */ true,\n\t\t\t/* Info */ T,\n\t\t\t/* TConstructorExtra */ undefined\n\t\t> = this.namedRecord(\n\t\t\tnameOrAllowedTypes as TName,\n\t\t\tmaybeAllowedTypes,\n\t\t\t/* customizable */ true,\n\t\t\t/* implicitlyConstructable */ true,\n\t\t\toptions,\n\t\t);\n\t\treturn out;\n\t}\n\n\t/**\n\t * Define a {@link TreeNodeSchema} for a {@link (TreeRecordNode:interface)}.\n\t *\n\t * @param name - Unique identifier for this schema within this factory's scope.\n\t *\n\t * @remarks\n\t * This is not intended to be used directly, use the overload of `record` which takes a name instead.\n\t */\n\tprivate namedRecord<\n\t\tName extends TName | string,\n\t\tconst T extends ImplicitAllowedTypes,\n\t\tconst ImplicitlyConstructable extends boolean,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tallowedTypes: T,\n\t\tcustomizable: boolean,\n\t\timplicitlyConstructable: ImplicitlyConstructable,\n\t\toptions?: NodeSchemaOptions<TCustomMetadata>,\n\t): TreeNodeSchemaBoth<\n\t\t/* Name */ ScopedSchemaName<TScope, Name>,\n\t\t/* Kind */ NodeKind.Record,\n\t\t/* TNode */ TreeRecordNode<T> &\n\t\t\tWithType<ScopedSchemaName<TScope, string>, NodeKind.Record>,\n\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t/* ImplicitlyConstructable */ ImplicitlyConstructable,\n\t\t/* Info */ T,\n\t\t/* TConstructorExtra */ undefined\n\t> {\n\t\treturn recordSchema({\n\t\t\tidentifier: scoped<TScope, TName, Name>(this, name),\n\t\t\tinfo: allowedTypes,\n\t\t\tcustomizable,\n\t\t\timplicitlyConstructable,\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 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?: NodeSchemaOptions<TCustomMetadata>) {\n\t\tconst RecordSchema = this.namedRecord(\n\t\t\tname,\n\t\t\tallowedTypes as T & ImplicitAllowedTypes,\n\t\t\t/* customizable */ 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\t/* implicitlyConstructable */ false,\n\t\t\toptions,\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"]}
1
+ {"version":3,"file":"schemaFactoryBeta.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactoryBeta.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,+CAe0B;AAW1B,4EAA4E;AAC5E,qDAOgC;AAIhC,yDAQ4B;AA8F5B,MAAM,MAAM,GAAG,CACd,CAA8B,EACJ,EAAE;IAC5B,MAAM,aAAa,GAAG,IAAA,0CAA+B,EAAC,CAAC,CAAC,CAAC;IACzD,OAAO;QACN,IAAI,EAAE,aAAa,CAAC,IAAI;QACxB,QAAQ,EAAE;YACT,GAAG,aAAa,CAAC,QAAQ;YACzB,mBAAmB,EAAE,IAAA,8B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AAiB,CAAC,eAAe,AAApC,CAAqC;AAOlE;;GAEG;AACW,uBAAK,GAAG,iBAAiB,CAAC,KAAK,AAA1B,CAA2B;AAO9C;;GAEG;AACW,gCAAc,GAAG,iBAAiB,CAAC,cAAc,AAAnC,CAAoC","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\";\n// eslint-disable-next-line unused-imports/no-unused-imports, import-x/no-duplicates -- This import prevents a large number of type references in the API reports from showing up as *_2.\nimport type { RestrictiveStringRecord as _RestrictiveStringRecord } from \"../../util/index.js\";\nimport {\n\tAnnotatedAllowedTypesInternal,\n\tcreateSchemaUpgrade,\n\tnormalizeToAnnotatedAllowedType,\n\ttype AllowedTypesFullFromMixed,\n\ttype AllowedTypesMetadata,\n\ttype AnnotatedAllowedType,\n\ttype ImplicitAllowedTypes,\n\ttype LazyItem,\n\ttype NodeKind,\n\ttype TreeNodeSchema,\n\ttype TreeNodeSchemaBoth,\n\ttype TreeNodeSchemaClass,\n\ttype TreeNodeSchemaNonClass,\n\ttype WithType,\n} from \"../core/index.js\";\nimport type { ImplicitFieldSchema } from \"../fieldSchema.js\";\n/* eslint-disable unused-imports/no-unused-imports, import-x/no-duplicates -- These imports prevent a large number of type references in the API reports from showing up as *_2. */\nimport type {\n\tFieldProps as _FieldProps,\n\tFieldSchemaAlpha as _FieldSchemaAlpha,\n\tFieldPropsAlpha as _FieldPropsAlpha,\n\tFieldKind as _FieldKind,\n\tImplicitFieldSchema as _ImplicitFieldSchema,\n} from \"../fieldSchema.js\";\nimport type { LeafSchema as _LeafSchema } from \"../leafNodeSchema.js\";\n/* eslint-enable unused-imports/no-unused-imports, import-x/no-duplicates */\nimport {\n\tobjectSchema,\n\trecordSchema,\n\ttype InsertableObjectFromSchemaRecord,\n\ttype RecordNodeInsertableData,\n\ttype TreeObjectNode,\n\ttype TreeRecordNode,\n} from \"../node-kinds/index.js\";\n// eslint-disable-next-line unused-imports/no-unused-imports -- This import prevents a large number of type references in the API reports from showing up as *_2.\nimport type { SimpleLeafNodeSchema as _SimpleLeafNodeSchema } from \"../simpleSchema.js\";\n\nimport {\n\tdefaultSchemaFactoryObjectOptions,\n\tSchemaFactory,\n\tscoped,\n\tstructuralName,\n\ttype NodeSchemaOptions,\n\ttype ObjectSchemaOptions,\n\ttype ScopedSchemaName,\n} from \"./schemaFactory.js\";\nimport type {\n\tAllowedTypesFullFromMixedUnsafe,\n\tAnnotatedAllowedTypeUnsafe,\n\tSystem_Unsafe,\n\tTreeRecordNodeUnsafe,\n\tUnannotateAllowedTypeUnsafe,\n\tUnenforced,\n} from \"./typesUnsafe.js\";\n\n/**\n * Stateless APIs exposed via {@link SchemaFactoryBeta} as both instance properties and as statics.\n * @see {@link SchemaStatics} for why this is useful.\n * @system @sealed @beta\n */\nexport interface SchemaStaticsBeta {\n\t/**\n\t * Declares a staged type in a set of {@link AllowedTypes}.\n\t *\n\t * @remarks\n\t * Staged allowed types add support for loading documents which may contain that type at the declared location.\n\t * This allows for an incremental rollout of a schema change to add a {@link TreeNodeSchema} to an {@link AllowedTypes} without breaking cross version collaboration.\n\t * A guide on this process can be found here: https://fluidframework.com/docs/data-structures/tree/schema-evolution/allowed-types-rollout\n\t *\n\t * Once enough clients have the type staged (and thus can read documents which allow it), documents can start being created and upgraded to allow the staged type.\n\t * This is done by deploying a new version of the app which removes the `staged` wrapper around the allowed type in the the schema definition.\n\t * This will also require {@link TreeView.upgradeSchema|upgrading the schema} for existing documents.\n\t *\n\t * Using a staged allowed type in a schema is just like using the schema as an allowed type with the following exceptions:\n\t *\n\t * 1. {@link TreeView.initialize} will omit the staged allowed type from the newly created stored schema.\n\t * 2. {@link TreeView.upgradeSchema} will omit the staged allowed type from the the upgraded stored schema.\n\t * 3. When evaluating {@link TreeView.compatibility}, it will be viewable even if the staged allowed type is not present in the stored schema's corresponding allowed types.\n\t * 4. Because of the above, it is possible to get errors when inserting content which uses the staged allowed type into a tree whose stored schema does not permit it.\n\t *\n\t * For recursive schemas, use {@link SchemaStaticsBeta.stagedRecursive} instead.\n\t * It offers equivalent runtime behavior with relaxed compile-time typing for recursive type.\n\t *\n\t * @example\n\t * A full code example of the schema migration process can be found in our {@link https://github.com/microsoft/FluidFramework/blob/main/packages/dds/tree/src/test/simple-tree/api/stagedSchemaUpgrade.spec.ts | tests}.\n\t *\n\t * @privateRemarks\n\t * TODO:#44317 staged allowed types rely on schema validation of stored schema to output errors, these errors are not very\n\t * user friendly and should be improved, particularly in the case of staged allowed types\n\t *\n\t * TODO: AB#45711: Update the docs above when recursive type support is added.\n\t */\n\treadonly staged: <const T extends LazyItem<TreeNodeSchema>>(\n\t\tt: T | AnnotatedAllowedType<T>,\n\t) => AnnotatedAllowedType<T>;\n\n\t/**\n\t * Normalize information about a set of {@link AllowedTypes} into an {@link AllowedTypesFull}.\n\t * @remarks\n\t * This can take in {@link AnnotatedAllowedType} to preserve their annotations.\n\t */\n\treadonly types: <\n\t\tconst T extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[],\n\t>(\n\t\tt: T,\n\t\tmetadata?: AllowedTypesMetadata,\n\t) => AllowedTypesFullFromMixed<T>;\n\n\t/**\n\t * {@link SchemaStaticsBeta.staged} 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 {@link SchemaStaticsBeta.staged} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.\n\t * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.\n\t */\n\tstagedRecursive: <\n\t\tconst T extends Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>,\n\t>(\n\t\tt: T,\n\t) => AnnotatedAllowedTypeUnsafe<UnannotateAllowedTypeUnsafe<T>>;\n\n\t/**\n\t * {@link SchemaStaticsBeta.types} 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 {@link SchemaStaticsBeta.types} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.\n\t * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.\n\t * @privateRemarks\n\t * If all inputs (at least recursive ones) were required to be annotated, this could be typed more strongly.\n\t * In that case it could use `T extends readonly (AnnotatedAllowedTypeUnsafe | LazyItem<System_Unsafe.TreeNodeSchemaUnsafe>)[]`.\n\t */\n\treadonly typesRecursive: <\n\t\tconst T extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[],\n\t>(\n\t\tt: T,\n\t\tmetadata?: AllowedTypesMetadata,\n\t) => AllowedTypesFullFromMixedUnsafe<T>;\n}\n\nconst staged = <const T extends LazyItem<TreeNodeSchema>>(\n\tt: T | AnnotatedAllowedType<T>,\n): AnnotatedAllowedType<T> => {\n\tconst annotatedType = normalizeToAnnotatedAllowedType(t);\n\treturn {\n\t\ttype: annotatedType.type,\n\t\tmetadata: {\n\t\t\t...annotatedType.metadata,\n\t\t\tstagedSchemaUpgrade: createSchemaUpgrade(),\n\t\t},\n\t};\n};\n\nconst types = <const T extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[]>(\n\tt: T,\n\tmetadata: AllowedTypesMetadata = {},\n): AllowedTypesFullFromMixed<T> => {\n\treturn AnnotatedAllowedTypesInternal.createMixed<T>(t, metadata);\n};\n\nconst schemaStaticsBeta: SchemaStaticsBeta = {\n\tstaged,\n\ttypes,\n\n\tstagedRecursive: staged as SchemaStaticsBeta[\"stagedRecursive\"],\n\ttypesRecursive: types as unknown as SchemaStaticsBeta[\"typesRecursive\"],\n};\n\n/**\n * {@link SchemaFactory} with additional beta APIs.\n * @beta\n * @privateRemarks\n */\nexport class SchemaFactoryBeta<\n\tout TScope extends string | undefined = string | undefined,\n\tTName extends number | string = string,\n> extends SchemaFactory<TScope, TName> {\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.staged}\n\t */\n\tpublic static staged = schemaStaticsBeta.staged;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.staged}\n\t */\n\tpublic staged = schemaStaticsBeta.staged;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.stagedRecursive}\n\t */\n\tpublic static stagedRecursive = schemaStaticsBeta.stagedRecursive;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.stagedRecursive}\n\t */\n\tpublic stagedRecursive = schemaStaticsBeta.stagedRecursive;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.types}\n\t */\n\tpublic static types = schemaStaticsBeta.types;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.types}\n\t */\n\tpublic types = schemaStaticsBeta.types;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.typesRecursive}\n\t */\n\tpublic static typesRecursive = schemaStaticsBeta.typesRecursive;\n\n\t/**\n\t * {@inheritDoc SchemaStaticsBeta.typesRecursive}\n\t */\n\tpublic typesRecursive = schemaStaticsBeta.typesRecursive;\n\n\t/**\n\t * Create a {@link SchemaFactory} with a {@link SchemaFactory.scope|scope} which is a combination of this factory's scope and the provided name.\n\t * @remarks\n\t * The main use-case for this is when creating a collection of related schema (for example using a function that creates multiple schema).\n\t * Creating such related schema using a sub-scope helps ensure they won't collide with other schema in the parent scope.\n\t */\n\tpublic scopedFactory<const T extends TName, TNameInner extends number | string = string>(\n\t\tname: T,\n\t): SchemaFactoryBeta<ScopedSchemaName<TScope, T>, TNameInner> {\n\t\treturn new SchemaFactoryBeta(scoped<TScope, TName, T>(this, name));\n\t}\n\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 override object<\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?: ObjectSchemaOptions<TCustomMetadata>,\n\t): TreeNodeSchemaClass<\n\t\tScopedSchemaName<TScope, Name>,\n\t\tNodeKind.Object,\n\t\tTreeObjectNode<T, ScopedSchemaName<TScope, Name>>,\n\t\tobject & InsertableObjectFromSchemaRecord<T>,\n\t\ttrue,\n\t\tT,\n\t\tnever,\n\t\tTCustomMetadata\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\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?: ObjectSchemaOptions<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\ttype TScopedName = ScopedSchemaName<TScope, Name>;\n\t\treturn this.object(\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}\n\n\t/**\n\t * Define a structurally typed {@link TreeNodeSchema} for a {@link (TreeRecordNode:interface)}.\n\t *\n\t * @param allowedTypes - The types that may appear in the record.\n\t *\n\t * @remarks\n\t * The identifier for this record is defined as a function of the provided types.\n\t * It is still scoped to this `SchemaFactory`, but multiple calls with the same arguments will return the same\n\t * schema object, providing somewhat structural typing.\n\t * This does not support recursive types.\n\t *\n\t * If using these structurally named records, other types in this schema builder should avoid names of the form `Record<${string}>`.\n\t *\n\t * The underlying data format for `Record` nodes is the same as that for `Map` nodes.\n\t * Therefore, changing an existing `Map` schema to a `Record` schema (or vice versa) is\n\t * a non-breaking change and does not require schema migration.\n\t *\n\t * @example\n\t * The returned schema should be used as a schema directly:\n\t * ```typescript\n\t * const MyRecord = factory.record(factory.number);\n\t * type MyRecord = NodeFromSchema<typeof Record>;\n\t * ```\n\t * Or inline:\n\t * ```typescript\n\t * factory.object(\"Foo\", { myRecord: factory.record(factory.number) });\n\t * ```\n\t *\n\t * @privateRemarks\n\t * The name produced at the type-level here is not as specific as it could be; however, doing type-level sorting and escaping is a real mess.\n\t * There are cases where not having this full type provided will be less than ideal, since TypeScript's structural types will allow assignment between runtime incompatible types at compile time.\n\t * For example, attempts to narrow unions of structural records by name won't work.\n\t * Planned future changes to move to a class based schema system as well as factor function based node construction should mostly avoid these issues,\n\t * though there may still be some problematic cases even after that work is done.\n\t *\n\t * The return value is a class, but its type is intentionally not specific enough to indicate it is a class.\n\t * This prevents callers of this from sub-classing it, which is unlikely to work well (due to the ease of accidentally giving two different calls to this different subclasses)\n\t * when working with structural typing.\n\t *\n\t * {@label STRUCTURAL}\n\t */\n\tpublic record<const T extends TreeNodeSchema | readonly TreeNodeSchema[]>(\n\t\tallowedTypes: T,\n\t): TreeNodeSchemaNonClass<\n\t\t/* Name */ ScopedSchemaName<TScope, `Record<${string}>`>,\n\t\t/* Kind */ NodeKind.Record,\n\t\t/* TNode */ TreeRecordNode<T> &\n\t\t\tWithType<ScopedSchemaName<TScope, `Record<${string}>`>, NodeKind.Record>,\n\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t/* ImplicitlyConstructable */ true,\n\t\t/* Info */ T,\n\t\t/* TConstructorExtra */ undefined\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 * @remarks\n\t * The underlying data format for `Record` nodes is the same as that for `Map` nodes.\n\t * Therefore, changing an existing `Map` schema to a `Record` schema (or vice versa) is\n\t * a non-breaking change and does not require schema migration.\n\t *\n\t * Like TypeScript `Record`s, record nodes have some potential pitfalls.\n\t * For example: TypeScript makes assumptions about built-in keys being present (e.g. `toString`, `hasOwnProperty`, etc.).\n\t * Since these are otherwise valid keys in a record, this can lead to unexpected behavior.\n\t * To prevent inconsistent behavior, these built-ins are hidden by record nodes.\n\t * This means that if you try to call these built-ins (e.g. `toString()`) on a record node, you will get an error.\n\t *\n\t * @example\n\t * ```typescript\n\t * class NamedRecord extends factory.record(\"name\", factory.number) {}\n\t * ```\n\t *\n\t * {@label NAMED}\n\t */\n\tpublic record<\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?: NodeSchemaOptions<TCustomMetadata>,\n\t): TreeNodeSchemaClass<\n\t\t/* Name */ ScopedSchemaName<TScope, Name>,\n\t\t/* Kind */ NodeKind.Record,\n\t\t/* TNode */ TreeRecordNode<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Record>,\n\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t/* ImplicitlyConstructable */ true,\n\t\t/* Info */ T,\n\t\t/* TConstructorExtra */ undefined,\n\t\t/* TCustomMetadata */ TCustomMetadata\n\t>;\n\n\t/**\n\t * {@link SchemaFactoryBeta.record} implementation.\n\t *\n\t * @privateRemarks\n\t * This should return {@link TreeNodeSchemaBoth}: see note on {@link SchemaFactory.map} implementation for details.\n\t */\n\tpublic record<const T extends ImplicitAllowedTypes>(\n\t\tnameOrAllowedTypes: TName | ((T & TreeNodeSchema) | readonly TreeNodeSchema[]),\n\t\tmaybeAllowedTypes?: T,\n\t\toptions?: NodeSchemaOptions,\n\t): TreeNodeSchema<\n\t\t/* Name */ ScopedSchemaName<TScope, string>,\n\t\t/* Kind */ NodeKind.Record,\n\t\t/* TNode */ TreeRecordNode<T>,\n\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t/* ImplicitlyConstructable */ true,\n\t\t/* Info */ T\n\t> {\n\t\tif (maybeAllowedTypes === undefined) {\n\t\t\tconst nodeTypes = nameOrAllowedTypes as (T & TreeNodeSchema) | readonly TreeNodeSchema[];\n\t\t\tconst fullName = structuralName(\"Record\", nodeTypes);\n\t\t\treturn this.getStructuralType(fullName, nodeTypes, () =>\n\t\t\t\tthis.namedRecord(\n\t\t\t\t\tfullName,\n\t\t\t\t\tnameOrAllowedTypes as T,\n\t\t\t\t\t/* customizable */ false,\n\t\t\t\t\t/* implicitlyConstructable */ true,\n\t\t\t\t),\n\t\t\t) as TreeNodeSchemaClass<\n\t\t\t\t/* Name */ ScopedSchemaName<TScope, string>,\n\t\t\t\t/* Kind */ NodeKind.Record,\n\t\t\t\t/* TNode */ TreeRecordNode<T>,\n\t\t\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t\t\t/* ImplicitlyConstructable */ true,\n\t\t\t\t/* Info */ T,\n\t\t\t\t/* TConstructorExtra */ undefined\n\t\t\t>;\n\t\t}\n\t\tconst out: TreeNodeSchemaBoth<\n\t\t\t/* Name */ ScopedSchemaName<TScope, string>,\n\t\t\t/* Kind */ NodeKind.Record,\n\t\t\t/* TNode */ TreeRecordNode<T>,\n\t\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t\t/* ImplicitlyConstructable */ true,\n\t\t\t/* Info */ T,\n\t\t\t/* TConstructorExtra */ undefined\n\t\t> = this.namedRecord(\n\t\t\tnameOrAllowedTypes as TName,\n\t\t\tmaybeAllowedTypes,\n\t\t\t/* customizable */ true,\n\t\t\t/* implicitlyConstructable */ true,\n\t\t\toptions,\n\t\t);\n\t\treturn out;\n\t}\n\n\t/**\n\t * Define a {@link TreeNodeSchema} for a {@link (TreeRecordNode:interface)}.\n\t *\n\t * @param name - Unique identifier for this schema within this factory's scope.\n\t *\n\t * @remarks\n\t * This is not intended to be used directly, use the overload of `record` which takes a name instead.\n\t */\n\tprivate namedRecord<\n\t\tName extends TName | string,\n\t\tconst T extends ImplicitAllowedTypes,\n\t\tconst ImplicitlyConstructable extends boolean,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tname: Name,\n\t\tallowedTypes: T,\n\t\tcustomizable: boolean,\n\t\timplicitlyConstructable: ImplicitlyConstructable,\n\t\toptions?: NodeSchemaOptions<TCustomMetadata>,\n\t): TreeNodeSchemaBoth<\n\t\t/* Name */ ScopedSchemaName<TScope, Name>,\n\t\t/* Kind */ NodeKind.Record,\n\t\t/* TNode */ TreeRecordNode<T> &\n\t\t\tWithType<ScopedSchemaName<TScope, string>, NodeKind.Record>,\n\t\t/* TInsertable */ RecordNodeInsertableData<T>,\n\t\t/* ImplicitlyConstructable */ ImplicitlyConstructable,\n\t\t/* Info */ T,\n\t\t/* TConstructorExtra */ undefined\n\t> {\n\t\treturn recordSchema({\n\t\t\tidentifier: scoped<TScope, TName, Name>(this, name),\n\t\t\tinfo: allowedTypes,\n\t\t\tcustomizable,\n\t\t\timplicitlyConstructable,\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 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?: NodeSchemaOptions<TCustomMetadata>) {\n\t\tconst RecordSchema = this.namedRecord(\n\t\t\tname,\n\t\t\tallowedTypes as T & ImplicitAllowedTypes,\n\t\t\t/* customizable */ 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\t/* implicitlyConstructable */ false,\n\t\t\toptions,\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"]}
@@ -4,8 +4,8 @@
4
4
  */
5
5
  import type { RestrictiveStringRecord } from "../../util/index.js";
6
6
  import type { NodeKind, TreeNodeSchema, WithType, TreeNode, ImplicitAllowedTypes, InsertableTreeNodeFromImplicitAllowedTypes, TreeNodeSchemaClass } from "../core/index.js";
7
- import type { InsertableObjectFromSchemaRecord } from "../node-kinds/index.js";
8
7
  import type { ImplicitFieldSchema } from "../fieldSchema.js";
8
+ import type { InsertableObjectFromSchemaRecord } from "../node-kinds/index.js";
9
9
  /**
10
10
  * Compile time check for validity of a recursive schema.
11
11
  * This type also serves as a central location for documenting the requirements and issues related to recursive schema.
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFactoryRecursive.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactoryRecursive.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EACX,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,0CAA0C,EAC1C,mBAAmB,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwHG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAEzF;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,CAAC,CAAC,SAAS,mBAAmB,IACxE,mBAAmB,CAElB,MAAM,EAEN,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,GAAG,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,EAEjE,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAG/C;IACC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,uBAAuB,CAAC,mBAAmB,CAAC,GAC9E,gCAAgC,CAAC,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,IACnE,CAAC,SAAS,+BAA+B,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,wBAAgB,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFactoryRecursive.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactoryRecursive.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA+OH;;;;;;;;;;GAUG;AACH,SAAgB,WAAW,CAAI,CAAK,IAAS,CAAC;AAA9C,kCAA8C","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"]}
1
+ {"version":3,"file":"schemaFactoryRecursive.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactoryRecursive.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA+OH;;;;;;;;;;GAUG;AACH,SAAgB,WAAW,CAAI,CAAK,IAAS,CAAC;AAA9C,kCAA8C","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 { ImplicitFieldSchema } from \"../fieldSchema.js\";\nimport type { InsertableObjectFromSchemaRecord } from \"../node-kinds/index.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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFromSimple.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFromSimple.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,OAAO,KAAK,EAKX,gBAAgB,EAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,CAmBnF"}
1
+ {"version":3,"file":"schemaFromSimple.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFromSimple.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,OAAO,KAAK,EAKX,gBAAgB,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,CAmBnF"}
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFromSimple.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFromSimple.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA4E;AAE5E,+CAK0B;AAC1B,sDAK2B;AAU3B,mEAA6D;AAE7D,MAAM,OAAO,GAAG,IAAI,0CAAkB,CAAC,SAAS,CAAC,CAAC;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,8BAA8B,CAAC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the MIT License.\n */\n\nimport { unreachableCase, fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tNodeKind,\n\ttype TreeNodeSchema,\n\ttype AllowedTypesFull,\n\tSchemaUpgrade,\n} from \"../core/index.js\";\nimport {\n\ttype FieldSchema,\n\ttype FieldSchemaAlpha,\n\tFieldKind,\n\ttype FieldProps,\n} from \"../fieldSchema.js\";\nimport type {\n\tSchemaType,\n\tSimpleAllowedTypeAttributes,\n\tSimpleFieldSchema,\n\tSimpleNodeSchema,\n\tSimpleTreeSchema,\n} from \"../simpleSchema.js\";\n\nimport type { TreeSchema } from \"../treeSchema.js\";\nimport { SchemaFactoryAlpha } from \"./schemaFactoryAlpha.js\";\n\nconst factory = new SchemaFactoryAlpha(undefined);\n\n/**\n * Create {@link FieldSchema} from a SimpleTreeSchema.\n * @remarks\n * Only use this API if hand written schema (produced using {@link SchemaFactory} cannot be provided.\n *\n * Using generated schema with schema aware APIs (designed to work with strongly typed schema) like {@link TreeViewConfiguration}\n * will produce a poor TypeScript typing experience which is subject to change.\n *\n * Editing through a view produced using this schema can easily violate invariants other users of the document might expect and must be done with great care.\n *\n * This API bakes in some arbitrary policy choices for how to handle data that is not included in the SimpleTreeSchema API, for example the value of `allowUnknownOptionalFields`.\n * If any particular choice is required for such cases, this API should not be used.\n *\n * @privateRemarks\n * TODO: Add the ability for consumers to inject custom policy.\n * For example, allow nodes with table schema identifiers to dispatch to `TableSchema` factory APIs.\n *\n * @alpha\n */\nexport function generateSchemaFromSimpleSchema(simple: SimpleTreeSchema): TreeSchema {\n\tconst context: Context = new Map(\n\t\t[...simple.definitions].map(\n\t\t\t([id, schema]): [string, () => TreeNodeSchema & SimpleNodeSchema<SchemaType.View>] => [\n\t\t\t\tid,\n\t\t\t\t// This relies on the caching in evaluateLazySchema so that it only runs once.\n\t\t\t\t() => generateNode(id, schema, context),\n\t\t\t],\n\t\t),\n\t);\n\tconst root = generateFieldSchema(simple.root, context, undefined);\n\tconst definitions = new Map<string, TreeNodeSchema & SimpleNodeSchema<SchemaType.View>>();\n\tfor (const [id, lazy] of context) {\n\t\tdefinitions.set(id, lazy());\n\t}\n\treturn {\n\t\troot,\n\t\tdefinitions,\n\t};\n}\n\ntype Context = ReadonlyMap<string, () => TreeNodeSchema & SimpleNodeSchema<SchemaType.View>>;\n\nfunction generateFieldSchema(\n\tsimple: SimpleFieldSchema,\n\tcontext: Context,\n\tstoredKey: string | undefined,\n): FieldSchemaAlpha {\n\tconst allowed = generateAllowedTypes(simple.simpleAllowedTypes, context);\n\tconst props: Omit<FieldProps, \"defaultProvider\"> = {\n\t\tmetadata: simple.metadata,\n\t\tkey: storedKey,\n\t};\n\n\t// Using createFieldSchema could work, but would require setting up the default providers.\n\tswitch (simple.kind) {\n\t\tcase FieldKind.Identifier: {\n\t\t\treturn SchemaFactoryAlpha.identifier(props);\n\t\t}\n\t\tcase FieldKind.Optional: {\n\t\t\treturn SchemaFactoryAlpha.optional(allowed, props);\n\t\t}\n\t\tcase FieldKind.Required: {\n\t\t\treturn SchemaFactoryAlpha.required(allowed, props);\n\t\t}\n\t\tdefault: {\n\t\t\treturn unreachableCase(simple.kind);\n\t\t}\n\t}\n}\n\nfunction generateAllowedTypes(\n\tallowed: ReadonlyMap<string, SimpleAllowedTypeAttributes>,\n\tcontext: Context,\n): AllowedTypesFull {\n\tconst types = Array.from(allowed.entries(), ([id, attributes]) => {\n\t\tconst schema = context.get(id) ?? fail(0xb5a /* Missing schema */);\n\t\treturn attributes.isStaged instanceof SchemaUpgrade ? factory.staged(schema) : schema;\n\t});\n\t// TODO: AB#53315: `AllowedTypesFullFromMixed` does not correctly handle the `(AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[]` case.\n\t// We have to cast here in order to produce an allowed types list that can be used in tree node factory methods (e.g., `SchemaFactoryAlpha.objectAlpha`).\n\treturn SchemaFactoryAlpha.types(types) as AllowedTypesFull;\n}\n\nfunction generateNode(\n\tid: string,\n\tschema: SimpleNodeSchema,\n\tcontext: Context,\n): TreeNodeSchema & SimpleNodeSchema<SchemaType.View> {\n\tswitch (schema.kind) {\n\t\tcase NodeKind.Object: {\n\t\t\tconst fields: Record<string, FieldSchema> = {};\n\t\t\tfor (const [key, field] of schema.fields) {\n\t\t\t\tfields[key] = generateFieldSchema(field, context, field.storedKey);\n\t\t\t}\n\t\t\t// Here allowUnknownOptionalFields is implicitly defaulting in the case where the input schema does not explicitly specify the value.\n\t\t\t// This is a subjective policy choice: users of this code are expected to handle what ever choice this code makes for cases like this.\n\t\t\treturn factory.objectAlpha(id, fields, {\n\t\t\t\tmetadata: schema.metadata,\n\t\t\t\tallowUnknownOptionalFields: schema.allowUnknownOptionalFields ?? false,\n\t\t\t});\n\t\t}\n\t\tcase NodeKind.Array: {\n\t\t\treturn factory.arrayAlpha(id, generateAllowedTypes(schema.simpleAllowedTypes, context), {\n\t\t\t\tmetadata: schema.metadata,\n\t\t\t});\n\t\t}\n\t\tcase NodeKind.Map: {\n\t\t\treturn factory.mapAlpha(id, generateAllowedTypes(schema.simpleAllowedTypes, context), {\n\t\t\t\tmetadata: schema.metadata,\n\t\t\t});\n\t\t}\n\t\tcase NodeKind.Record: {\n\t\t\treturn factory.recordAlpha(\n\t\t\t\tid,\n\t\t\t\tgenerateAllowedTypes(schema.simpleAllowedTypes, context),\n\t\t\t\t{ metadata: schema.metadata },\n\t\t\t);\n\t\t}\n\t\tcase NodeKind.Leaf: {\n\t\t\treturn (\n\t\t\t\tSchemaFactoryAlpha.leaves.find((leaf) => leaf.identifier === id) ??\n\t\t\t\tfail(0xb5b /* Missing schema */)\n\t\t\t);\n\t\t}\n\t\tdefault: {\n\t\t\treturn unreachableCase(schema);\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"schemaFromSimple.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFromSimple.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA4E;AAE5E,+CAK0B;AAC1B,sDAK2B;AAU3B,mEAA6D;AAE7D,MAAM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AAM,CAAC,CAAC;QAChC,CAAC;IACF,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { unreachableCase, fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tNodeKind,\n\ttype TreeNodeSchema,\n\ttype AllowedTypesFull,\n\tSchemaUpgrade,\n} from \"../core/index.js\";\nimport {\n\ttype FieldSchema,\n\ttype FieldSchemaAlpha,\n\tFieldKind,\n\ttype FieldProps,\n} from \"../fieldSchema.js\";\nimport type {\n\tSchemaType,\n\tSimpleAllowedTypeAttributes,\n\tSimpleFieldSchema,\n\tSimpleNodeSchema,\n\tSimpleTreeSchema,\n} from \"../simpleSchema.js\";\nimport type { TreeSchema } from \"../treeSchema.js\";\n\nimport { SchemaFactoryAlpha } from \"./schemaFactoryAlpha.js\";\n\nconst factory = new SchemaFactoryAlpha(undefined);\n\n/**\n * Create {@link FieldSchema} from a SimpleTreeSchema.\n * @remarks\n * Only use this API if hand written schema (produced using {@link SchemaFactory} cannot be provided.\n *\n * Using generated schema with schema aware APIs (designed to work with strongly typed schema) like {@link TreeViewConfiguration}\n * will produce a poor TypeScript typing experience which is subject to change.\n *\n * Editing through a view produced using this schema can easily violate invariants other users of the document might expect and must be done with great care.\n *\n * This API bakes in some arbitrary policy choices for how to handle data that is not included in the SimpleTreeSchema API, for example the value of `allowUnknownOptionalFields`.\n * If any particular choice is required for such cases, this API should not be used.\n *\n * @privateRemarks\n * TODO: Add the ability for consumers to inject custom policy.\n * For example, allow nodes with table schema identifiers to dispatch to `TableSchema` factory APIs.\n *\n * @alpha\n */\nexport function generateSchemaFromSimpleSchema(simple: SimpleTreeSchema): TreeSchema {\n\tconst context: Context = new Map(\n\t\t[...simple.definitions].map(\n\t\t\t([id, schema]): [string, () => TreeNodeSchema & SimpleNodeSchema<SchemaType.View>] => [\n\t\t\t\tid,\n\t\t\t\t// This relies on the caching in evaluateLazySchema so that it only runs once.\n\t\t\t\t() => generateNode(id, schema, context),\n\t\t\t],\n\t\t),\n\t);\n\tconst root = generateFieldSchema(simple.root, context, undefined);\n\tconst definitions = new Map<string, TreeNodeSchema & SimpleNodeSchema<SchemaType.View>>();\n\tfor (const [id, lazy] of context) {\n\t\tdefinitions.set(id, lazy());\n\t}\n\treturn {\n\t\troot,\n\t\tdefinitions,\n\t};\n}\n\ntype Context = ReadonlyMap<string, () => TreeNodeSchema & SimpleNodeSchema<SchemaType.View>>;\n\nfunction generateFieldSchema(\n\tsimple: SimpleFieldSchema,\n\tcontext: Context,\n\tstoredKey: string | undefined,\n): FieldSchemaAlpha {\n\tconst allowed = generateAllowedTypes(simple.simpleAllowedTypes, context);\n\tconst props: Omit<FieldProps, \"defaultProvider\"> = {\n\t\tmetadata: simple.metadata,\n\t\tkey: storedKey,\n\t};\n\n\t// Using createFieldSchema could work, but would require setting up the default providers.\n\tswitch (simple.kind) {\n\t\tcase FieldKind.Identifier: {\n\t\t\treturn SchemaFactoryAlpha.identifier(props);\n\t\t}\n\t\tcase FieldKind.Optional: {\n\t\t\treturn SchemaFactoryAlpha.optional(allowed, props);\n\t\t}\n\t\tcase FieldKind.Required: {\n\t\t\treturn SchemaFactoryAlpha.required(allowed, props);\n\t\t}\n\t\tdefault: {\n\t\t\treturn unreachableCase(simple.kind);\n\t\t}\n\t}\n}\n\nfunction generateAllowedTypes(\n\tallowed: ReadonlyMap<string, SimpleAllowedTypeAttributes>,\n\tcontext: Context,\n): AllowedTypesFull {\n\tconst types = Array.from(allowed.entries(), ([id, attributes]) => {\n\t\tconst schema = context.get(id) ?? fail(0xb5a /* Missing schema */);\n\t\treturn attributes.isStaged instanceof SchemaUpgrade ? factory.staged(schema) : schema;\n\t});\n\t// TODO: AB#53315: `AllowedTypesFullFromMixed` does not correctly handle the `(AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[]` case.\n\t// We have to cast here in order to produce an allowed types list that can be used in tree node factory methods (e.g., `SchemaFactoryAlpha.objectAlpha`).\n\treturn SchemaFactoryAlpha.types(types) as AllowedTypesFull;\n}\n\nfunction generateNode(\n\tid: string,\n\tschema: SimpleNodeSchema,\n\tcontext: Context,\n): TreeNodeSchema & SimpleNodeSchema<SchemaType.View> {\n\tswitch (schema.kind) {\n\t\tcase NodeKind.Object: {\n\t\t\tconst fields: Record<string, FieldSchema> = {};\n\t\t\tfor (const [key, field] of schema.fields) {\n\t\t\t\tfields[key] = generateFieldSchema(field, context, field.storedKey);\n\t\t\t}\n\t\t\t// Here allowUnknownOptionalFields is implicitly defaulting in the case where the input schema does not explicitly specify the value.\n\t\t\t// This is a subjective policy choice: users of this code are expected to handle what ever choice this code makes for cases like this.\n\t\t\treturn factory.objectAlpha(id, fields, {\n\t\t\t\tmetadata: schema.metadata,\n\t\t\t\tallowUnknownOptionalFields: schema.allowUnknownOptionalFields ?? false,\n\t\t\t});\n\t\t}\n\t\tcase NodeKind.Array: {\n\t\t\treturn factory.arrayAlpha(id, generateAllowedTypes(schema.simpleAllowedTypes, context), {\n\t\t\t\tmetadata: schema.metadata,\n\t\t\t});\n\t\t}\n\t\tcase NodeKind.Map: {\n\t\t\treturn factory.mapAlpha(id, generateAllowedTypes(schema.simpleAllowedTypes, context), {\n\t\t\t\tmetadata: schema.metadata,\n\t\t\t});\n\t\t}\n\t\tcase NodeKind.Record: {\n\t\t\treturn factory.recordAlpha(\n\t\t\t\tid,\n\t\t\t\tgenerateAllowedTypes(schema.simpleAllowedTypes, context),\n\t\t\t\t{ metadata: schema.metadata },\n\t\t\t);\n\t\t}\n\t\tcase NodeKind.Leaf: {\n\t\t\treturn (\n\t\t\t\tSchemaFactoryAlpha.leaves.find((leaf) => leaf.identifier === id) ??\n\t\t\t\tfail(0xb5b /* Missing schema */)\n\t\t\t);\n\t\t}\n\t\tdefault: {\n\t\t\treturn unreachableCase(schema);\n\t\t}\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"schemaStatics.d.ts","sourceRoot":"","sources":["../../../src/simple-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AA4C,EAC5C,KAAK,CACmD,CAAC;AAC3D,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport type { ImplicitAllowedTypes } from \"../core/index.js\";\nimport { FieldKind, getDefaultProvider, createFieldSchema } from \"../fieldSchema.js\";\nimport type {\n\tFieldProps,\n\tFieldSchema,\n\tDefaultProvider,\n\tFieldPropsAlpha,\n\tFieldSchemaAlpha,\n} from \"../fieldSchema.js\";\nimport type { LeafSchema } from \"../leafNodeSchema.js\";\nimport {\n\tstringSchema,\n\tnumberSchema,\n\tbooleanSchema,\n\tnullSchema,\n\thandleSchema,\n} from \"../leafNodeSchema.js\";\nimport type { System_Unsafe, FieldSchemaAlphaUnsafe } from \"./typesUnsafe.js\";\n\n/**\n * Stateless APIs exposed via {@link SchemaFactory} as both instance properties and as statics.\n * @privateRemarks\n * We have no way to make linkable members which exist both as statics and instance properties since API-Extractor does not support this.\n * As a workaround, we have this type as a third place which can be linked.\n * @system @sealed @public\n */\nexport interface SchemaStatics {\n\t/**\n\t * {@link TreeNodeSchema} for holding a JavaScript `string`.\n\t *\n\t * @remarks\n\t * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.\n\t *\n\t * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.\n\t * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.\n\t * @privateRemarks\n\t * TODO:\n\t * We should be much more clear about what happens if you use problematic values.\n\t * We should validate and/or normalize them when inserting content.\n\t */\n\treadonly string: LeafSchema<\"string\", string>;\n\n\t/**\n\t * {@link TreeNodeSchema} for holding a JavaScript `number`.\n\t *\n\t * @remarks\n\t * The number is a {@link https://en.wikipedia.org/wiki/Double-precision_floating-point_format | double-precision 64-bit binary format IEEE 754} value, however there are some exceptions:\n\t *\n\t * - `NaN`, and the infinities are converted to `null` (and may therefore only be used where `null` is allowed by the schema).\n\t *\n\t * - `-0` may be converted to `0` in some cases.\n\t *\n\t * These limitations match the limitations of JSON.\n\t * @privateRemarks\n\t * TODO:\n\t * We should be much more clear about what happens if you use problematic values.\n\t * We should validate and/or normalize them when inserting content.\n\t */\n\treadonly number: LeafSchema<\"number\", number>;\n\n\t/**\n\t * {@link TreeNodeSchema} for holding a boolean.\n\t */\n\treadonly boolean: LeafSchema<\"boolean\", boolean>;\n\n\t/**\n\t * {@link TreeNodeSchema} for JavaScript `null`.\n\t *\n\t * @remarks\n\t * There are good {@link https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null | reasons to avoid using null} in JavaScript, however sometimes it is desired.\n\t * This {@link TreeNodeSchema} node provides the option to include nulls in trees when desired.\n\t * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\treadonly null: LeafSchema<\"null\", null>;\n\n\t/**\n\t * {@link TreeNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.\n\t */\n\treadonly handle: LeafSchema<\"handle\", IFluidHandle>;\n\n\t/**\n\t * {@link AllowedTypes} for holding any of the leaf types.\n\t */\n\treadonly leaves: readonly [\n\t\tSchemaStatics[\"string\"],\n\t\tSchemaStatics[\"number\"],\n\t\tSchemaStatics[\"boolean\"],\n\t\tSchemaStatics[\"null\"],\n\t\tSchemaStatics[\"handle\"],\n\t];\n\n\t/**\n\t * Make a field optional instead of the default, which is required.\n\t *\n\t * @param t - The types allowed under the field.\n\t * @param props - Optional properties to associate with the field.\n\t *\n\t * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n\t * See {@link FieldSchemaMetadata.custom}.\n\t */\n\treadonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(\n\t\tt: T,\n\t\tprops?: Omit<FieldProps<TCustomMetadata>, \"defaultProvider\">,\n\t) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;\n\n\t/**\n\t * Make a field explicitly required.\n\t *\n\t * @param t - The types allowed under the field.\n\t * @param props - Optional properties to associate with the field.\n\t *\n\t * @remarks\n\t * Fields are required by default, but this API can be used to make the required nature explicit in the schema,\n\t * and allows associating custom {@link FieldProps | properties} with the field.\n\t *\n\t * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n\t * See {@link FieldSchemaMetadata.custom}.\n\t */\n\treadonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(\n\t\tt: T,\n\t\tprops?: Omit<FieldProps<TCustomMetadata>, \"defaultProvider\">,\n\t) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;\n\n\t/**\n\t * {@link SchemaStatics.optional} 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 {@link SchemaStatics.optional} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.\n\t * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.\n\t */\n\treadonly optionalRecursive: <\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tt: T,\n\t\tprops?: Omit<FieldProps<TCustomMetadata>, \"defaultProvider\">,\n\t) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;\n\n\t/**\n\t * {@link SchemaStatics.required} 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 {@link SchemaStatics.required} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.\n\t * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.\n\t */\n\treadonly requiredRecursive: <\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tt: T,\n\t\tprops?: Omit<FieldProps<TCustomMetadata>, \"defaultProvider\">,\n\t) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;\n}\n\nconst defaultOptionalProvider: DefaultProvider = getDefaultProvider(() => []);\n\n/**\n * Implementation of {@link SchemaStatics}.\n * @remarks\n * Entries can use more specific types than {@link SchemaStatics} requires to be more useful for non-public consumers.\n * Additional non-public members are in {@link schemaStatics}.\n */\nexport const schemaStaticsStable = {\n\tstring: stringSchema,\n\tnumber: numberSchema,\n\tboolean: booleanSchema,\n\tnull: nullSchema,\n\thandle: handleSchema,\n\tleaves: [stringSchema, numberSchema, booleanSchema, nullSchema, handleSchema],\n\n\toptional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(\n\t\tt: T,\n\t\tprops?: Omit<FieldPropsAlpha<TCustomMetadata>, \"defaultProvider\">,\n\t): FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata> => {\n\t\treturn createFieldSchema(FieldKind.Optional, t, {\n\t\t\tdefaultProvider: defaultOptionalProvider,\n\t\t\t...props,\n\t\t});\n\t},\n\n\trequired: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(\n\t\tt: T,\n\t\tprops?: Omit<FieldPropsAlpha<TCustomMetadata>, \"defaultProvider\">,\n\t): FieldSchemaAlpha<FieldKind.Required, T, TCustomMetadata> => {\n\t\treturn createFieldSchema(FieldKind.Required, t, props);\n\t},\n\n\toptionalRecursive: <\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tt: T,\n\t\tprops?: Omit<FieldPropsAlpha<TCustomMetadata>, \"defaultProvider\">,\n\t): FieldSchemaAlphaUnsafe<FieldKind.Optional, T, TCustomMetadata> => {\n\t\treturn createFieldSchemaUnsafe(FieldKind.Optional, t, {\n\t\t\tdefaultProvider: defaultOptionalProvider,\n\t\t\t...props,\n\t\t});\n\t},\n\n\trequiredRecursive: <\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tt: T,\n\t\tprops?: Omit<FieldPropsAlpha<TCustomMetadata>, \"defaultProvider\">,\n\t): FieldSchemaAlphaUnsafe<FieldKind.Required, T, TCustomMetadata> => {\n\t\treturn createFieldSchemaUnsafe(FieldKind.Required, t, props);\n\t},\n} as const satisfies SchemaStatics;\n\n/**\n * Unstable extensions to {@link schemaStaticsStable}.\n */\nexport const schemaStatics = {\n\t...schemaStaticsStable,\n\tidentifier: <const TCustomMetadata = unknown>(\n\t\tprops?: Omit<FieldProps<TCustomMetadata>, \"defaultProvider\">,\n\t): FieldSchemaAlpha<FieldKind.Identifier, typeof stringSchema, TCustomMetadata> => {\n\t\treturn createFieldSchema(FieldKind.Identifier, stringSchema, props);\n\t},\n} as const;\n\n/**\n * {@link Unenforced} version of {@link createFieldSchema}.\n */\nfunction createFieldSchemaUnsafe<\n\tKind extends FieldKind,\n\tTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\tTCustomMetadata = unknown,\n>(\n\tkind: Kind,\n\tallowedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n): FieldSchemaAlphaUnsafe<Kind, Types, TCustomMetadata> {\n\t// At runtime, we still want this to be a FieldSchema instance, but we can't satisfy its extends clause, so just return it as an FieldSchemaUnsafe\n\treturn createFieldSchema(\n\t\tkind,\n\t\tallowedTypes as ImplicitAllowedTypes & Types,\n\t\tprops,\n\t) as FieldSchemaAlphaUnsafe<Kind, Types, TCustomMetadata>;\n}\n"]}
1
+ {"version":3,"file":"schemaStatics.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaStatics.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,sDAAqF;AASrF,4DAM8B;AA4I9B,MAAM,uBAAuB,GAAoB,IAAA,mCAAkB,EAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAE9E;;;;;GAKG;AACU,QAAA,mBAAmB,GAAG;IAClC,MAAM,EAAE,gCAAY;IACpB,MAAM,EAAE,gCAAY;IACpB,OAAO,EAAE,iCAAa;IACtB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;AAC3D,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\n\nimport type { ImplicitAllowedTypes } from \"../core/index.js\";\nimport { FieldKind, getDefaultProvider, createFieldSchema } from \"../fieldSchema.js\";\nimport type {\n\tFieldProps,\n\tFieldSchema,\n\tDefaultProvider,\n\tFieldPropsAlpha,\n\tFieldSchemaAlpha,\n} from \"../fieldSchema.js\";\nimport type { LeafSchema } from \"../leafNodeSchema.js\";\nimport {\n\tstringSchema,\n\tnumberSchema,\n\tbooleanSchema,\n\tnullSchema,\n\thandleSchema,\n} from \"../leafNodeSchema.js\";\n\nimport type { System_Unsafe, FieldSchemaAlphaUnsafe } from \"./typesUnsafe.js\";\n\n/**\n * Stateless APIs exposed via {@link SchemaFactory} as both instance properties and as statics.\n * @privateRemarks\n * We have no way to make linkable members which exist both as statics and instance properties since API-Extractor does not support this.\n * As a workaround, we have this type as a third place which can be linked.\n * @system @sealed @public\n */\nexport interface SchemaStatics {\n\t/**\n\t * {@link TreeNodeSchema} for holding a JavaScript `string`.\n\t *\n\t * @remarks\n\t * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.\n\t *\n\t * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.\n\t * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.\n\t * @privateRemarks\n\t * TODO:\n\t * We should be much more clear about what happens if you use problematic values.\n\t * We should validate and/or normalize them when inserting content.\n\t */\n\treadonly string: LeafSchema<\"string\", string>;\n\n\t/**\n\t * {@link TreeNodeSchema} for holding a JavaScript `number`.\n\t *\n\t * @remarks\n\t * The number is a {@link https://en.wikipedia.org/wiki/Double-precision_floating-point_format | double-precision 64-bit binary format IEEE 754} value, however there are some exceptions:\n\t *\n\t * - `NaN`, and the infinities are converted to `null` (and may therefore only be used where `null` is allowed by the schema).\n\t *\n\t * - `-0` may be converted to `0` in some cases.\n\t *\n\t * These limitations match the limitations of JSON.\n\t * @privateRemarks\n\t * TODO:\n\t * We should be much more clear about what happens if you use problematic values.\n\t * We should validate and/or normalize them when inserting content.\n\t */\n\treadonly number: LeafSchema<\"number\", number>;\n\n\t/**\n\t * {@link TreeNodeSchema} for holding a boolean.\n\t */\n\treadonly boolean: LeafSchema<\"boolean\", boolean>;\n\n\t/**\n\t * {@link TreeNodeSchema} for JavaScript `null`.\n\t *\n\t * @remarks\n\t * There are good {@link https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null | reasons to avoid using null} in JavaScript, however sometimes it is desired.\n\t * This {@link TreeNodeSchema} node provides the option to include nulls in trees when desired.\n\t * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\treadonly null: LeafSchema<\"null\", null>;\n\n\t/**\n\t * {@link TreeNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.\n\t */\n\treadonly handle: LeafSchema<\"handle\", IFluidHandle>;\n\n\t/**\n\t * {@link AllowedTypes} for holding any of the leaf types.\n\t */\n\treadonly leaves: readonly [\n\t\tSchemaStatics[\"string\"],\n\t\tSchemaStatics[\"number\"],\n\t\tSchemaStatics[\"boolean\"],\n\t\tSchemaStatics[\"null\"],\n\t\tSchemaStatics[\"handle\"],\n\t];\n\n\t/**\n\t * Make a field optional instead of the default, which is required.\n\t *\n\t * @param t - The types allowed under the field.\n\t * @param props - Optional properties to associate with the field.\n\t *\n\t * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n\t * See {@link FieldSchemaMetadata.custom}.\n\t */\n\treadonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(\n\t\tt: T,\n\t\tprops?: Omit<FieldProps<TCustomMetadata>, \"defaultProvider\">,\n\t) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;\n\n\t/**\n\t * Make a field explicitly required.\n\t *\n\t * @param t - The types allowed under the field.\n\t * @param props - Optional properties to associate with the field.\n\t *\n\t * @remarks\n\t * Fields are required by default, but this API can be used to make the required nature explicit in the schema,\n\t * and allows associating custom {@link FieldProps | properties} with the field.\n\t *\n\t * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n\t * See {@link FieldSchemaMetadata.custom}.\n\t */\n\treadonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(\n\t\tt: T,\n\t\tprops?: Omit<FieldProps<TCustomMetadata>, \"defaultProvider\">,\n\t) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;\n\n\t/**\n\t * {@link SchemaStatics.optional} 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 {@link SchemaStatics.optional} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.\n\t * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.\n\t */\n\treadonly optionalRecursive: <\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tt: T,\n\t\tprops?: Omit<FieldProps<TCustomMetadata>, \"defaultProvider\">,\n\t) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;\n\n\t/**\n\t * {@link SchemaStatics.required} 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 {@link SchemaStatics.required} has fewer type constraints to work around TypeScript limitations, see {@link Unenforced}.\n\t * See {@link ValidateRecursiveSchema} for additional information about using recursive schema.\n\t */\n\treadonly requiredRecursive: <\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tt: T,\n\t\tprops?: Omit<FieldProps<TCustomMetadata>, \"defaultProvider\">,\n\t) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;\n}\n\nconst defaultOptionalProvider: DefaultProvider = getDefaultProvider(() => []);\n\n/**\n * Implementation of {@link SchemaStatics}.\n * @remarks\n * Entries can use more specific types than {@link SchemaStatics} requires to be more useful for non-public consumers.\n * Additional non-public members are in {@link schemaStatics}.\n */\nexport const schemaStaticsStable = {\n\tstring: stringSchema,\n\tnumber: numberSchema,\n\tboolean: booleanSchema,\n\tnull: nullSchema,\n\thandle: handleSchema,\n\tleaves: [stringSchema, numberSchema, booleanSchema, nullSchema, handleSchema],\n\n\toptional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(\n\t\tt: T,\n\t\tprops?: Omit<FieldPropsAlpha<TCustomMetadata>, \"defaultProvider\">,\n\t): FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata> => {\n\t\treturn createFieldSchema(FieldKind.Optional, t, {\n\t\t\tdefaultProvider: defaultOptionalProvider,\n\t\t\t...props,\n\t\t});\n\t},\n\n\trequired: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(\n\t\tt: T,\n\t\tprops?: Omit<FieldPropsAlpha<TCustomMetadata>, \"defaultProvider\">,\n\t): FieldSchemaAlpha<FieldKind.Required, T, TCustomMetadata> => {\n\t\treturn createFieldSchema(FieldKind.Required, t, props);\n\t},\n\n\toptionalRecursive: <\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tt: T,\n\t\tprops?: Omit<FieldPropsAlpha<TCustomMetadata>, \"defaultProvider\">,\n\t): FieldSchemaAlphaUnsafe<FieldKind.Optional, T, TCustomMetadata> => {\n\t\treturn createFieldSchemaUnsafe(FieldKind.Optional, t, {\n\t\t\tdefaultProvider: defaultOptionalProvider,\n\t\t\t...props,\n\t\t});\n\t},\n\n\trequiredRecursive: <\n\t\tconst T extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\t\tconst TCustomMetadata = unknown,\n\t>(\n\t\tt: T,\n\t\tprops?: Omit<FieldPropsAlpha<TCustomMetadata>, \"defaultProvider\">,\n\t): FieldSchemaAlphaUnsafe<FieldKind.Required, T, TCustomMetadata> => {\n\t\treturn createFieldSchemaUnsafe(FieldKind.Required, t, props);\n\t},\n} as const satisfies SchemaStatics;\n\n/**\n * Unstable extensions to {@link schemaStaticsStable}.\n */\nexport const schemaStatics = {\n\t...schemaStaticsStable,\n\tidentifier: <const TCustomMetadata = unknown>(\n\t\tprops?: Omit<FieldProps<TCustomMetadata>, \"defaultProvider\">,\n\t): FieldSchemaAlpha<FieldKind.Identifier, typeof stringSchema, TCustomMetadata> => {\n\t\treturn createFieldSchema(FieldKind.Identifier, stringSchema, props);\n\t},\n} as const;\n\n/**\n * {@link Unenforced} version of {@link createFieldSchema}.\n */\nfunction createFieldSchemaUnsafe<\n\tKind extends FieldKind,\n\tTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe,\n\tTCustomMetadata = unknown,\n>(\n\tkind: Kind,\n\tallowedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n): FieldSchemaAlphaUnsafe<Kind, Types, TCustomMetadata> {\n\t// At runtime, we still want this to be a FieldSchema instance, but we can't satisfy its extends clause, so just return it as an FieldSchemaUnsafe\n\treturn createFieldSchema(\n\t\tkind,\n\t\tallowedTypes as ImplicitAllowedTypes & Types,\n\t\tprops,\n\t) as FieldSchemaAlphaUnsafe<Kind, Types, TCustomMetadata>;\n}\n"]}
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import { type FormatValidator } from "../../codec/index.js";
5
6
  import { type JsonCompatibleReadOnly } from "../../util/index.js";
6
7
  import type { SimpleTreeSchema } from "../simpleSchema.js";
7
- import { type FormatValidator } from "../../codec/index.js";
8
8
  /**
9
9
  * Encodes the compatibility impacting subset of simple schema (view or stored) into a serializable format.
10
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"simpleSchemaCodec.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/simpleSchemaCodec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,KAAK,EAUX,gBAAgB,EAChB,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EAIN,KAAK,eAAe,EACpB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iCAAiC,CAChD,YAAY,EAAE,gBAAgB,GAC5B,sBAAsB,CAgBxB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iCAAiC,CAChD,aAAa,EAAE,sBAAsB,EACrC,SAAS,CAAC,EAAE,eAAe,GACzB,gBAAgB,CAmBlB"}
1
+ {"version":3,"file":"simpleSchemaCodec.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/simpleSchemaCodec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAIN,KAAK,eAAe,EACpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAe,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAG/E,OAAO,KAAK,EAUX,gBAAgB,EAChB,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iCAAiC,CAChD,YAAY,EAAE,gBAAgB,GAC5B,sBAAsB,CAgBxB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iCAAiC,CAChD,aAAa,EAAE,sBAAsB,EACrC,SAAS,CAAC,EAAE,eAAe,GACzB,gBAAgB,CAmBlB"}
@@ -28,12 +28,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.decodeSchemaCompatibilitySnapshot = exports.encodeSchemaCompatibilitySnapshot = void 0;
31
- const index_js_1 = require("../../util/index.js");
32
31
  const internal_1 = require("@fluidframework/core-utils/internal");
33
- const index_js_2 = require("../core/index.js");
34
32
  const internal_2 = require("@fluidframework/telemetry-utils/internal");
33
+ const index_js_1 = require("../../codec/index.js");
34
+ const index_js_2 = require("../../util/index.js");
35
+ const index_js_3 = require("../core/index.js");
35
36
  const Format = __importStar(require("../simpleSchemaFormatV1.js"));
36
- const index_js_3 = require("../../codec/index.js");
37
37
  /**
38
38
  * Encodes the compatibility impacting subset of simple schema (view or stored) into a serializable format.
39
39
  *
@@ -80,14 +80,14 @@ exports.encodeSchemaCompatibilitySnapshot = encodeSchemaCompatibilitySnapshot;
80
80
  * @alpha
81
81
  */
82
82
  function decodeSchemaCompatibilitySnapshot(encodedSchema, validator) {
83
- const effectiveValidator = validator ?? index_js_3.FormatValidatorNoOp;
84
- const compiledValidator = (0, index_js_3.extractJsonValidator)(effectiveValidator).compile(Format.SimpleTreeSchemaFormat);
83
+ const effectiveValidator = validator ?? index_js_1.FormatValidatorNoOp;
84
+ const compiledValidator = (0, index_js_1.extractJsonValidator)(effectiveValidator).compile(Format.SimpleTreeSchemaFormat);
85
85
  if (!compiledValidator.check(encodedSchema)) {
86
86
  throw new internal_2.UsageError("The provided simple schema is not valid according to the schema format.");
87
87
  }
88
88
  return {
89
89
  root: decodeSimpleFieldSchema(encodedSchema.root),
90
- definitions: new Map((0, internal_1.transformMapValues)((0, index_js_1.objectToMap)(encodedSchema.definitions), (value, key) => {
90
+ definitions: new Map((0, internal_1.transformMapValues)((0, index_js_2.objectToMap)(encodedSchema.definitions), (value, key) => {
91
91
  return decodeNodeSchema(value);
92
92
  })),
93
93
  };
@@ -101,19 +101,19 @@ exports.decodeSchemaCompatibilitySnapshot = decodeSchemaCompatibilitySnapshot;
101
101
  function encodeNodeSchema(schema) {
102
102
  const kind = schema.kind;
103
103
  switch (kind) {
104
- case index_js_2.NodeKind.Leaf: {
104
+ case index_js_3.NodeKind.Leaf: {
105
105
  return { leaf: encodeLeafNode(schema) };
106
106
  }
107
- case index_js_2.NodeKind.Array: {
107
+ case index_js_3.NodeKind.Array: {
108
108
  return { array: encodeContainerNode(schema) };
109
109
  }
110
- case index_js_2.NodeKind.Map: {
110
+ case index_js_3.NodeKind.Map: {
111
111
  return { map: encodeContainerNode(schema) };
112
112
  }
113
- case index_js_2.NodeKind.Record: {
113
+ case index_js_3.NodeKind.Record: {
114
114
  return { record: encodeContainerNode(schema) };
115
115
  }
116
- case index_js_2.NodeKind.Object: {
116
+ case index_js_3.NodeKind.Object: {
117
117
  return { object: encodeObjectNode(schema) };
118
118
  }
119
119
  default: {
@@ -152,7 +152,7 @@ function encodeContainerNode(schema) {
152
152
  function encodeSimpleAllowedTypes(simpleAllowedTypes) {
153
153
  const encodedAllowedTypes = {};
154
154
  for (const [identifier, attributes] of simpleAllowedTypes) {
155
- const isStaged = attributes.isStaged instanceof index_js_2.SchemaUpgrade ? true : attributes.isStaged;
155
+ const isStaged = attributes.isStaged instanceof index_js_3.SchemaUpgrade ? true : attributes.isStaged;
156
156
  encodedAllowedTypes[identifier] = { isStaged };
157
157
  }
158
158
  return encodedAllowedTypes;
@@ -193,7 +193,7 @@ function encodeField(fieldSchema) {
193
193
  simpleAllowedTypes: encodeSimpleAllowedTypes(fieldSchema.simpleAllowedTypes),
194
194
  };
195
195
  }
196
- const decodeNodeSchemaDispatcher = new index_js_3.DiscriminatedUnionDispatcher({
196
+ const decodeNodeSchemaDispatcher = new index_js_1.DiscriminatedUnionDispatcher({
197
197
  leaf: decodeLeafNode,
198
198
  array: decodeContainerNode,
199
199
  map: decodeContainerNode,
@@ -229,7 +229,7 @@ function decodeContainerNode(encodedContainerSchema) {
229
229
  */
230
230
  function decodeLeafNode(encodedLeafSchema) {
231
231
  return {
232
- kind: index_js_2.NodeKind.Leaf,
232
+ kind: index_js_3.NodeKind.Leaf,
233
233
  leafKind: encodedLeafSchema.leafKind,
234
234
  // We cannot encode persistedMetadata or metadata, so we explicitly set them to empty values.
235
235
  persistedMetadata: undefined,
@@ -243,7 +243,7 @@ function decodeLeafNode(encodedLeafSchema) {
243
243
  */
244
244
  function decodeObjectNode(encodedObjectSchema) {
245
245
  return {
246
- kind: index_js_2.NodeKind.Object,
246
+ kind: index_js_3.NodeKind.Object,
247
247
  fields: decodeObjectFields(encodedObjectSchema.fields),
248
248
  // It is possible for allowUnknownOptionalFields to be undefined. This happens when serializing a Simple Schema derived
249
249
  // from a stored schema.
@@ -297,9 +297,9 @@ function decodeSimpleFieldSchema(encodedField) {
297
297
  * @returns A map of the decoded simple allowed types.
298
298
  */
299
299
  function decodeSimpleAllowedTypes(encodedAllowedTypes) {
300
- const untypedMap = (0, index_js_1.objectToMap)(encodedAllowedTypes);
300
+ const untypedMap = (0, index_js_2.objectToMap)(encodedAllowedTypes);
301
301
  const simpleAllowedTypes = (0, internal_1.transformMapValues)(untypedMap, (value) => {
302
- const isStaged = value.isStaged === true ? (0, index_js_2.createSchemaUpgrade)() : value.isStaged;
302
+ const isStaged = value.isStaged === true ? (0, index_js_3.createSchemaUpgrade)() : value.isStaged;
303
303
  return { isStaged };
304
304
  });
305
305
  return simpleAllowedTypes;