@fluidframework/tree 2.70.0 → 2.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (684) hide show
  1. package/CHANGELOG.md +84 -40
  2. package/api-report/tree.alpha.api.md +52 -22
  3. package/api-report/tree.beta.api.md +45 -0
  4. package/api-report/tree.legacy.beta.api.md +45 -0
  5. package/dist/alpha.d.ts +12 -7
  6. package/dist/api.js +1 -1
  7. package/dist/api.js.map +1 -1
  8. package/dist/beta.d.ts +8 -0
  9. package/dist/codec/codec.d.ts +16 -1
  10. package/dist/codec/codec.d.ts.map +1 -1
  11. package/dist/codec/codec.js +16 -3
  12. package/dist/codec/codec.js.map +1 -1
  13. package/dist/codec/discriminatedUnions.d.ts +1 -1
  14. package/dist/codec/discriminatedUnions.js +1 -1
  15. package/dist/codec/discriminatedUnions.js.map +1 -1
  16. package/dist/core/index.d.ts +1 -1
  17. package/dist/core/index.d.ts.map +1 -1
  18. package/dist/core/index.js +2 -2
  19. package/dist/core/index.js.map +1 -1
  20. package/dist/core/schema-stored/index.d.ts +1 -1
  21. package/dist/core/schema-stored/index.d.ts.map +1 -1
  22. package/dist/core/schema-stored/index.js +2 -2
  23. package/dist/core/schema-stored/index.js.map +1 -1
  24. package/dist/core/schema-stored/schema.d.ts +6 -6
  25. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  26. package/dist/core/schema-stored/schema.js +6 -7
  27. package/dist/core/schema-stored/schema.js.map +1 -1
  28. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +2 -1
  29. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  30. package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  31. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts +1 -1
  32. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  33. package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -2
  34. package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  35. package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  36. package/dist/core/tree/detachedFieldIndexCodecV2.js +3 -1
  37. package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  38. package/dist/core/tree/detachedFieldIndexCodecs.d.ts +2 -3
  39. package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  40. package/dist/core/tree/detachedFieldIndexCodecs.js +29 -8
  41. package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  42. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +10 -1
  43. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  44. package/dist/core/tree/detachedFieldIndexFormatCommon.js +8 -1
  45. package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  46. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts +2 -2
  47. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
  48. package/dist/core/tree/detachedFieldIndexFormatV1.js +3 -3
  49. package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
  50. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
  51. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  52. package/dist/core/tree/detachedFieldIndexFormatV2.js +3 -3
  53. package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  54. package/dist/core/tree/index.d.ts +2 -1
  55. package/dist/core/tree/index.d.ts.map +1 -1
  56. package/dist/core/tree/index.js.map +1 -1
  57. package/dist/external-utilities/typeboxValidator.js +1 -1
  58. package/dist/external-utilities/typeboxValidator.js.map +1 -1
  59. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -10
  60. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  61. package/dist/feature-libraries/chunked-forest/codec/codecs.js +12 -8
  62. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  63. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  64. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  65. package/dist/feature-libraries/chunked-forest/codec/format.d.ts +8 -3
  66. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  67. package/dist/feature-libraries/chunked-forest/codec/format.js +9 -4
  68. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  69. package/dist/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
  70. package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  71. package/dist/feature-libraries/chunked-forest/codec/index.js +1 -2
  72. package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  73. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  74. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +1 -1
  75. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  76. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
  77. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/index.js +1 -2
  79. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  80. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -9
  81. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  82. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +3 -21
  83. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  84. package/dist/feature-libraries/forest-summary/codec.d.ts +4 -5
  85. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  86. package/dist/feature-libraries/forest-summary/codec.js +15 -4
  87. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  88. package/dist/feature-libraries/forest-summary/forestSummarizer.js +1 -1
  89. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  90. package/dist/feature-libraries/forest-summary/format.d.ts +8 -1
  91. package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
  92. package/dist/feature-libraries/forest-summary/format.js +8 -3
  93. package/dist/feature-libraries/forest-summary/format.js.map +1 -1
  94. package/dist/feature-libraries/forest-summary/index.d.ts +2 -1
  95. package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
  96. package/dist/feature-libraries/forest-summary/index.js +3 -1
  97. package/dist/feature-libraries/forest-summary/index.js.map +1 -1
  98. package/dist/feature-libraries/index.d.ts +3 -3
  99. package/dist/feature-libraries/index.d.ts.map +1 -1
  100. package/dist/feature-libraries/index.js +2 -2
  101. package/dist/feature-libraries/index.js.map +1 -1
  102. package/dist/feature-libraries/schema-edits/index.d.ts +1 -1
  103. package/dist/feature-libraries/schema-edits/index.d.ts.map +1 -1
  104. package/dist/feature-libraries/schema-edits/index.js.map +1 -1
  105. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -7
  106. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  107. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +5 -4
  108. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  109. package/dist/feature-libraries/schema-index/codec.d.ts +10 -10
  110. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  111. package/dist/feature-libraries/schema-index/codec.js +22 -18
  112. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  113. package/dist/feature-libraries/schema-index/formatV1.d.ts +2 -2
  114. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  115. package/dist/feature-libraries/schema-index/formatV1.js +1 -1
  116. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  117. package/dist/feature-libraries/schema-index/formatV2.d.ts +1 -2
  118. package/dist/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
  119. package/dist/feature-libraries/schema-index/formatV2.js +1 -1
  120. package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
  121. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
  122. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  123. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  124. package/dist/index.d.ts +2 -2
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/index.js +6 -2
  127. package/dist/index.js.map +1 -1
  128. package/dist/legacy.d.ts +8 -0
  129. package/dist/packageVersion.d.ts +1 -1
  130. package/dist/packageVersion.js +1 -1
  131. package/dist/packageVersion.js.map +1 -1
  132. package/dist/shared-tree/independentView.d.ts +75 -6
  133. package/dist/shared-tree/independentView.d.ts.map +1 -1
  134. package/dist/shared-tree/independentView.js +116 -43
  135. package/dist/shared-tree/independentView.js.map +1 -1
  136. package/dist/shared-tree/index.d.ts +2 -1
  137. package/dist/shared-tree/index.d.ts.map +1 -1
  138. package/dist/shared-tree/index.js +6 -1
  139. package/dist/shared-tree/index.js.map +1 -1
  140. package/dist/shared-tree/sharedTree.d.ts +12 -16
  141. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  142. package/dist/shared-tree/sharedTree.js +105 -130
  143. package/dist/shared-tree/sharedTree.js.map +1 -1
  144. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +7 -6
  145. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  146. package/dist/shared-tree/sharedTreeChangeCodecs.js +12 -11
  147. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  148. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
  149. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  150. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  151. package/dist/shared-tree/treeAlpha.d.ts +1 -1
  152. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  153. package/dist/shared-tree/treeAlpha.js +4 -2
  154. package/dist/shared-tree/treeAlpha.js.map +1 -1
  155. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  156. package/dist/shared-tree/treeCheckout.js +1 -3
  157. package/dist/shared-tree/treeCheckout.js.map +1 -1
  158. package/dist/shared-tree-core/editManagerCodecs.d.ts +19 -6
  159. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  160. package/dist/shared-tree-core/editManagerCodecs.js +35 -17
  161. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  162. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +37 -0
  163. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  164. package/dist/shared-tree-core/editManagerFormatCommons.js +43 -1
  165. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  166. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  167. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  168. package/dist/shared-tree-core/editManagerFormatV1toV4.js +4 -4
  169. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  170. package/dist/shared-tree-core/editManagerFormatV5.d.ts +2 -2
  171. package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +1 -1
  172. package/dist/shared-tree-core/editManagerFormatV5.js +1 -1
  173. package/dist/shared-tree-core/editManagerFormatV5.js.map +1 -1
  174. package/dist/shared-tree-core/index.d.ts +5 -3
  175. package/dist/shared-tree-core/index.d.ts.map +1 -1
  176. package/dist/shared-tree-core/index.js +11 -3
  177. package/dist/shared-tree-core/index.js.map +1 -1
  178. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -1
  179. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  180. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  181. package/dist/shared-tree-core/messageCodecV5.d.ts +2 -1
  182. package/dist/shared-tree-core/messageCodecV5.d.ts.map +1 -1
  183. package/dist/shared-tree-core/messageCodecV5.js.map +1 -1
  184. package/dist/shared-tree-core/messageCodecs.d.ts +19 -6
  185. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  186. package/dist/shared-tree-core/messageCodecs.js +38 -21
  187. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  188. package/dist/shared-tree-core/messageFormat.d.ts +50 -0
  189. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -0
  190. package/dist/shared-tree-core/messageFormat.js +51 -0
  191. package/dist/shared-tree-core/messageFormat.js.map +1 -0
  192. package/dist/shared-tree-core/sharedTreeCore.d.ts +8 -8
  193. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  194. package/dist/shared-tree-core/sharedTreeCore.js +3 -3
  195. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  196. package/dist/simple-tree/api/discrepancies.d.ts +2 -2
  197. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  198. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
  199. package/dist/simple-tree/api/incrementalAllowedTypes.js +1 -1
  200. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  201. package/dist/simple-tree/api/index.d.ts +3 -2
  202. package/dist/simple-tree/api/index.d.ts.map +1 -1
  203. package/dist/simple-tree/api/index.js +4 -1
  204. package/dist/simple-tree/api/index.js.map +1 -1
  205. package/dist/simple-tree/api/schemaFactory.d.ts +2 -2
  206. package/dist/simple-tree/api/schemaFactory.js +2 -2
  207. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  208. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +2 -98
  209. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  210. package/dist/simple-tree/api/schemaFactoryAlpha.js +1 -52
  211. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  212. package/dist/simple-tree/api/schemaFactoryBeta.d.ts +98 -2
  213. package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  214. package/dist/simple-tree/api/schemaFactoryBeta.js +61 -7
  215. package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  216. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  217. package/dist/simple-tree/api/schemaFactoryRecursive.js +1 -0
  218. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  219. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  220. package/dist/simple-tree/api/schemaFromSimple.js +15 -8
  221. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  222. package/dist/simple-tree/api/simpleSchemaCodec.d.ts +28 -0
  223. package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -0
  224. package/dist/simple-tree/api/simpleSchemaCodec.js +292 -0
  225. package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -0
  226. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  227. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +4 -2
  228. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  229. package/dist/simple-tree/api/storedSchema.d.ts +2 -2
  230. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  231. package/dist/simple-tree/api/storedSchema.js +8 -6
  232. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  233. package/dist/simple-tree/api/tree.d.ts +2 -2
  234. package/dist/simple-tree/api/tree.js.map +1 -1
  235. package/dist/simple-tree/api/typesUnsafe.d.ts +6 -6
  236. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  237. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +17 -1
  238. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  239. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +71 -7
  240. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  241. package/dist/simple-tree/core/allowedTypes.d.ts +12 -7
  242. package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
  243. package/dist/simple-tree/core/allowedTypes.js +18 -5
  244. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  245. package/dist/simple-tree/core/treeNode.js +1 -1
  246. package/dist/simple-tree/core/treeNode.js.map +1 -1
  247. package/dist/simple-tree/fieldSchema.d.ts +2 -1
  248. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  249. package/dist/simple-tree/fieldSchema.js +10 -0
  250. package/dist/simple-tree/fieldSchema.js.map +1 -1
  251. package/dist/simple-tree/index.d.ts +3 -2
  252. package/dist/simple-tree/index.d.ts.map +1 -1
  253. package/dist/simple-tree/index.js +4 -0
  254. package/dist/simple-tree/index.js.map +1 -1
  255. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  256. package/dist/simple-tree/node-kinds/array/arrayNode.js +7 -1
  257. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  258. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  259. package/dist/simple-tree/node-kinds/map/mapNode.js +7 -1
  260. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  261. package/dist/simple-tree/node-kinds/object/objectNode.d.ts +17 -0
  262. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  263. package/dist/simple-tree/node-kinds/object/objectNode.js +21 -8
  264. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  265. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  266. package/dist/simple-tree/node-kinds/record/recordNode.js +8 -2
  267. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  268. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +16 -0
  269. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  270. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  271. package/dist/simple-tree/simpleSchema.d.ts +30 -6
  272. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  273. package/dist/simple-tree/simpleSchema.js.map +1 -1
  274. package/dist/simple-tree/simpleSchemaFormatV1.d.ts +249 -0
  275. package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -0
  276. package/dist/simple-tree/simpleSchemaFormatV1.js +115 -0
  277. package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -0
  278. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  279. package/dist/simple-tree/toStoredSchema.js +6 -3
  280. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  281. package/dist/tableSchema.d.ts.map +1 -1
  282. package/dist/tableSchema.js +1 -1
  283. package/dist/tableSchema.js.map +1 -1
  284. package/dist/treeFactory.d.ts +3 -1
  285. package/dist/treeFactory.d.ts.map +1 -1
  286. package/dist/treeFactory.js +26 -2
  287. package/dist/treeFactory.js.map +1 -1
  288. package/dist/util/brand.d.ts +31 -2
  289. package/dist/util/brand.d.ts.map +1 -1
  290. package/dist/util/brand.js +28 -2
  291. package/dist/util/brand.js.map +1 -1
  292. package/dist/util/brandedMap.d.ts +3 -1
  293. package/dist/util/brandedMap.d.ts.map +1 -1
  294. package/dist/util/brandedMap.js.map +1 -1
  295. package/dist/util/index.d.ts +1 -1
  296. package/dist/util/index.d.ts.map +1 -1
  297. package/dist/util/index.js +3 -2
  298. package/dist/util/index.js.map +1 -1
  299. package/dist/util/referenceCounting.d.ts.map +1 -1
  300. package/dist/util/referenceCounting.js +1 -0
  301. package/dist/util/referenceCounting.js.map +1 -1
  302. package/lib/alpha.d.ts +12 -7
  303. package/lib/api.js +2 -2
  304. package/lib/api.js.map +1 -1
  305. package/lib/beta.d.ts +8 -0
  306. package/lib/codec/codec.d.ts +16 -1
  307. package/lib/codec/codec.d.ts.map +1 -1
  308. package/lib/codec/codec.js +16 -3
  309. package/lib/codec/codec.js.map +1 -1
  310. package/lib/codec/discriminatedUnions.d.ts +1 -1
  311. package/lib/codec/discriminatedUnions.js +1 -1
  312. package/lib/codec/discriminatedUnions.js.map +1 -1
  313. package/lib/core/index.d.ts +1 -1
  314. package/lib/core/index.d.ts.map +1 -1
  315. package/lib/core/index.js +1 -1
  316. package/lib/core/index.js.map +1 -1
  317. package/lib/core/schema-stored/index.d.ts +1 -1
  318. package/lib/core/schema-stored/index.d.ts.map +1 -1
  319. package/lib/core/schema-stored/index.js +1 -1
  320. package/lib/core/schema-stored/index.js.map +1 -1
  321. package/lib/core/schema-stored/schema.d.ts +6 -6
  322. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  323. package/lib/core/schema-stored/schema.js +6 -7
  324. package/lib/core/schema-stored/schema.js.map +1 -1
  325. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +2 -1
  326. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  327. package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  328. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts +1 -1
  329. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  330. package/lib/core/tree/detachedFieldIndexCodecV1.js +3 -2
  331. package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  332. package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  333. package/lib/core/tree/detachedFieldIndexCodecV2.js +4 -2
  334. package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  335. package/lib/core/tree/detachedFieldIndexCodecs.d.ts +2 -3
  336. package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  337. package/lib/core/tree/detachedFieldIndexCodecs.js +29 -8
  338. package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  339. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +10 -1
  340. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  341. package/lib/core/tree/detachedFieldIndexFormatCommon.js +7 -0
  342. package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  343. package/lib/core/tree/detachedFieldIndexFormatV1.d.ts +2 -2
  344. package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
  345. package/lib/core/tree/detachedFieldIndexFormatV1.js +3 -3
  346. package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
  347. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
  348. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  349. package/lib/core/tree/detachedFieldIndexFormatV2.js +3 -3
  350. package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  351. package/lib/core/tree/index.d.ts +2 -1
  352. package/lib/core/tree/index.d.ts.map +1 -1
  353. package/lib/core/tree/index.js +1 -1
  354. package/lib/core/tree/index.js.map +1 -1
  355. package/lib/external-utilities/typeboxValidator.js +1 -1
  356. package/lib/external-utilities/typeboxValidator.js.map +1 -1
  357. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -10
  358. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  359. package/lib/feature-libraries/chunked-forest/codec/codecs.js +13 -8
  360. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  361. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +2 -2
  362. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  363. package/lib/feature-libraries/chunked-forest/codec/format.d.ts +8 -3
  364. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  365. package/lib/feature-libraries/chunked-forest/codec/format.js +8 -3
  366. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  367. package/lib/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
  368. package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  369. package/lib/feature-libraries/chunked-forest/codec/index.js +2 -2
  370. package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  371. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  372. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +2 -2
  373. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  374. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
  375. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  376. package/lib/feature-libraries/chunked-forest/index.js +1 -1
  377. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  378. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -9
  379. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  380. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +2 -20
  381. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  382. package/lib/feature-libraries/forest-summary/codec.d.ts +4 -5
  383. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  384. package/lib/feature-libraries/forest-summary/codec.js +16 -5
  385. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  386. package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -1
  387. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  388. package/lib/feature-libraries/forest-summary/format.d.ts +8 -1
  389. package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
  390. package/lib/feature-libraries/forest-summary/format.js +7 -2
  391. package/lib/feature-libraries/forest-summary/format.js.map +1 -1
  392. package/lib/feature-libraries/forest-summary/index.d.ts +2 -1
  393. package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
  394. package/lib/feature-libraries/forest-summary/index.js +1 -0
  395. package/lib/feature-libraries/forest-summary/index.js.map +1 -1
  396. package/lib/feature-libraries/index.d.ts +3 -3
  397. package/lib/feature-libraries/index.d.ts.map +1 -1
  398. package/lib/feature-libraries/index.js +2 -2
  399. package/lib/feature-libraries/index.js.map +1 -1
  400. package/lib/feature-libraries/schema-edits/index.d.ts +1 -1
  401. package/lib/feature-libraries/schema-edits/index.d.ts.map +1 -1
  402. package/lib/feature-libraries/schema-edits/index.js.map +1 -1
  403. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -7
  404. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  405. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +6 -5
  406. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  407. package/lib/feature-libraries/schema-index/codec.d.ts +10 -10
  408. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  409. package/lib/feature-libraries/schema-index/codec.js +24 -20
  410. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  411. package/lib/feature-libraries/schema-index/formatV1.d.ts +2 -2
  412. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  413. package/lib/feature-libraries/schema-index/formatV1.js +2 -2
  414. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  415. package/lib/feature-libraries/schema-index/formatV2.d.ts +1 -2
  416. package/lib/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
  417. package/lib/feature-libraries/schema-index/formatV2.js +2 -2
  418. package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
  419. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
  420. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  421. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  422. package/lib/index.d.ts +2 -2
  423. package/lib/index.d.ts.map +1 -1
  424. package/lib/index.js +2 -2
  425. package/lib/index.js.map +1 -1
  426. package/lib/legacy.d.ts +8 -0
  427. package/lib/packageVersion.d.ts +1 -1
  428. package/lib/packageVersion.js +1 -1
  429. package/lib/packageVersion.js.map +1 -1
  430. package/lib/shared-tree/independentView.d.ts +75 -6
  431. package/lib/shared-tree/independentView.d.ts.map +1 -1
  432. package/lib/shared-tree/independentView.js +111 -39
  433. package/lib/shared-tree/independentView.js.map +1 -1
  434. package/lib/shared-tree/index.d.ts +2 -1
  435. package/lib/shared-tree/index.d.ts.map +1 -1
  436. package/lib/shared-tree/index.js +2 -1
  437. package/lib/shared-tree/index.js.map +1 -1
  438. package/lib/shared-tree/sharedTree.d.ts +12 -16
  439. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  440. package/lib/shared-tree/sharedTree.js +108 -133
  441. package/lib/shared-tree/sharedTree.js.map +1 -1
  442. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +7 -6
  443. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  444. package/lib/shared-tree/sharedTreeChangeCodecs.js +7 -6
  445. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  446. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
  447. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  448. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  449. package/lib/shared-tree/treeAlpha.d.ts +1 -1
  450. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  451. package/lib/shared-tree/treeAlpha.js +5 -3
  452. package/lib/shared-tree/treeAlpha.js.map +1 -1
  453. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  454. package/lib/shared-tree/treeCheckout.js +1 -3
  455. package/lib/shared-tree/treeCheckout.js.map +1 -1
  456. package/lib/shared-tree-core/editManagerCodecs.d.ts +19 -6
  457. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  458. package/lib/shared-tree-core/editManagerCodecs.js +32 -16
  459. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  460. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +37 -0
  461. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  462. package/lib/shared-tree-core/editManagerFormatCommons.js +42 -0
  463. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  464. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  465. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  466. package/lib/shared-tree-core/editManagerFormatV1toV4.js +5 -5
  467. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  468. package/lib/shared-tree-core/editManagerFormatV5.d.ts +2 -2
  469. package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +1 -1
  470. package/lib/shared-tree-core/editManagerFormatV5.js +2 -2
  471. package/lib/shared-tree-core/editManagerFormatV5.js.map +1 -1
  472. package/lib/shared-tree-core/index.d.ts +5 -3
  473. package/lib/shared-tree-core/index.d.ts.map +1 -1
  474. package/lib/shared-tree-core/index.js +4 -2
  475. package/lib/shared-tree-core/index.js.map +1 -1
  476. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -1
  477. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  478. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  479. package/lib/shared-tree-core/messageCodecV5.d.ts +2 -1
  480. package/lib/shared-tree-core/messageCodecV5.d.ts.map +1 -1
  481. package/lib/shared-tree-core/messageCodecV5.js.map +1 -1
  482. package/lib/shared-tree-core/messageCodecs.d.ts +19 -6
  483. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  484. package/lib/shared-tree-core/messageCodecs.js +35 -20
  485. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  486. package/lib/shared-tree-core/messageFormat.d.ts +50 -0
  487. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -0
  488. package/lib/shared-tree-core/messageFormat.js +48 -0
  489. package/lib/shared-tree-core/messageFormat.js.map +1 -0
  490. package/lib/shared-tree-core/sharedTreeCore.d.ts +8 -8
  491. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  492. package/lib/shared-tree-core/sharedTreeCore.js +3 -3
  493. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  494. package/lib/simple-tree/api/discrepancies.d.ts +2 -2
  495. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  496. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
  497. package/lib/simple-tree/api/incrementalAllowedTypes.js +1 -1
  498. package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  499. package/lib/simple-tree/api/index.d.ts +3 -2
  500. package/lib/simple-tree/api/index.d.ts.map +1 -1
  501. package/lib/simple-tree/api/index.js +1 -0
  502. package/lib/simple-tree/api/index.js.map +1 -1
  503. package/lib/simple-tree/api/schemaFactory.d.ts +2 -2
  504. package/lib/simple-tree/api/schemaFactory.js +2 -2
  505. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  506. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +2 -98
  507. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  508. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -52
  509. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  510. package/lib/simple-tree/api/schemaFactoryBeta.d.ts +98 -2
  511. package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  512. package/lib/simple-tree/api/schemaFactoryBeta.js +58 -4
  513. package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  514. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  515. package/lib/simple-tree/api/schemaFactoryRecursive.js +1 -0
  516. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  517. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  518. package/lib/simple-tree/api/schemaFromSimple.js +15 -8
  519. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  520. package/lib/simple-tree/api/simpleSchemaCodec.d.ts +28 -0
  521. package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -0
  522. package/lib/simple-tree/api/simpleSchemaCodec.js +264 -0
  523. package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -0
  524. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  525. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +4 -2
  526. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  527. package/lib/simple-tree/api/storedSchema.d.ts +2 -2
  528. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  529. package/lib/simple-tree/api/storedSchema.js +5 -3
  530. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  531. package/lib/simple-tree/api/tree.d.ts +2 -2
  532. package/lib/simple-tree/api/tree.js.map +1 -1
  533. package/lib/simple-tree/api/typesUnsafe.d.ts +6 -6
  534. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  535. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +17 -1
  536. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  537. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +69 -7
  538. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  539. package/lib/simple-tree/core/allowedTypes.d.ts +12 -7
  540. package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
  541. package/lib/simple-tree/core/allowedTypes.js +19 -6
  542. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  543. package/lib/simple-tree/core/treeNode.js +1 -1
  544. package/lib/simple-tree/core/treeNode.js.map +1 -1
  545. package/lib/simple-tree/fieldSchema.d.ts +2 -1
  546. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  547. package/lib/simple-tree/fieldSchema.js +10 -0
  548. package/lib/simple-tree/fieldSchema.js.map +1 -1
  549. package/lib/simple-tree/index.d.ts +3 -2
  550. package/lib/simple-tree/index.d.ts.map +1 -1
  551. package/lib/simple-tree/index.js +1 -0
  552. package/lib/simple-tree/index.js.map +1 -1
  553. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  554. package/lib/simple-tree/node-kinds/array/arrayNode.js +9 -3
  555. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  556. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  557. package/lib/simple-tree/node-kinds/map/mapNode.js +9 -3
  558. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  559. package/lib/simple-tree/node-kinds/object/objectNode.d.ts +17 -0
  560. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  561. package/lib/simple-tree/node-kinds/object/objectNode.js +22 -9
  562. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  563. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  564. package/lib/simple-tree/node-kinds/record/recordNode.js +10 -4
  565. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  566. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +16 -0
  567. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  568. package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  569. package/lib/simple-tree/simpleSchema.d.ts +30 -6
  570. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  571. package/lib/simple-tree/simpleSchema.js.map +1 -1
  572. package/lib/simple-tree/simpleSchemaFormatV1.d.ts +249 -0
  573. package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -0
  574. package/lib/simple-tree/simpleSchemaFormatV1.js +112 -0
  575. package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -0
  576. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  577. package/lib/simple-tree/toStoredSchema.js +6 -3
  578. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  579. package/lib/tableSchema.d.ts.map +1 -1
  580. package/lib/tableSchema.js +1 -1
  581. package/lib/tableSchema.js.map +1 -1
  582. package/lib/treeFactory.d.ts +3 -1
  583. package/lib/treeFactory.d.ts.map +1 -1
  584. package/lib/treeFactory.js +23 -1
  585. package/lib/treeFactory.js.map +1 -1
  586. package/lib/util/brand.d.ts +31 -2
  587. package/lib/util/brand.d.ts.map +1 -1
  588. package/lib/util/brand.js +26 -1
  589. package/lib/util/brand.js.map +1 -1
  590. package/lib/util/brandedMap.d.ts +3 -1
  591. package/lib/util/brandedMap.d.ts.map +1 -1
  592. package/lib/util/brandedMap.js.map +1 -1
  593. package/lib/util/index.d.ts +1 -1
  594. package/lib/util/index.d.ts.map +1 -1
  595. package/lib/util/index.js +1 -1
  596. package/lib/util/index.js.map +1 -1
  597. package/lib/util/referenceCounting.d.ts.map +1 -1
  598. package/lib/util/referenceCounting.js +1 -0
  599. package/lib/util/referenceCounting.js.map +1 -1
  600. package/package.json +26 -26
  601. package/src/api.ts +2 -2
  602. package/src/codec/codec.ts +17 -3
  603. package/src/codec/discriminatedUnions.ts +1 -1
  604. package/src/core/index.ts +1 -2
  605. package/src/core/schema-stored/index.ts +1 -2
  606. package/src/core/schema-stored/schema.ts +10 -7
  607. package/src/core/tree/detachedFieldIndexCodecCommon.ts +2 -1
  608. package/src/core/tree/detachedFieldIndexCodecV1.ts +4 -2
  609. package/src/core/tree/detachedFieldIndexCodecV2.ts +4 -6
  610. package/src/core/tree/detachedFieldIndexCodecs.ts +33 -11
  611. package/src/core/tree/detachedFieldIndexFormatCommon.ts +17 -2
  612. package/src/core/tree/detachedFieldIndexFormatV1.ts +6 -4
  613. package/src/core/tree/detachedFieldIndexFormatV2.ts +6 -4
  614. package/src/core/tree/index.ts +2 -4
  615. package/src/external-utilities/typeboxValidator.ts +1 -1
  616. package/src/feature-libraries/chunked-forest/codec/codecs.ts +18 -13
  617. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +2 -2
  618. package/src/feature-libraries/chunked-forest/codec/format.ts +15 -4
  619. package/src/feature-libraries/chunked-forest/codec/index.ts +4 -2
  620. package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +2 -2
  621. package/src/feature-libraries/chunked-forest/index.ts +0 -1
  622. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +2 -29
  623. package/src/feature-libraries/forest-summary/codec.ts +24 -9
  624. package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
  625. package/src/feature-libraries/forest-summary/format.ts +12 -2
  626. package/src/feature-libraries/forest-summary/index.ts +2 -1
  627. package/src/feature-libraries/index.ts +1 -2
  628. package/src/feature-libraries/schema-edits/index.ts +0 -1
  629. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +16 -16
  630. package/src/feature-libraries/schema-index/codec.ts +34 -22
  631. package/src/feature-libraries/schema-index/formatV1.ts +2 -2
  632. package/src/feature-libraries/schema-index/formatV2.ts +2 -2
  633. package/src/feature-libraries/schema-index/schemaSummarizer.ts +2 -1
  634. package/src/index.ts +6 -1
  635. package/src/packageVersion.ts +1 -1
  636. package/src/shared-tree/independentView.ts +161 -75
  637. package/src/shared-tree/index.ts +4 -0
  638. package/src/shared-tree/sharedTree.ts +137 -175
  639. package/src/shared-tree/sharedTreeChangeCodecs.ts +15 -9
  640. package/src/shared-tree/sharedTreeChangeFamily.ts +2 -2
  641. package/src/shared-tree/treeAlpha.ts +6 -5
  642. package/src/shared-tree/treeCheckout.ts +1 -3
  643. package/src/shared-tree-core/editManagerCodecs.ts +56 -19
  644. package/src/shared-tree-core/editManagerFormatCommons.ts +47 -0
  645. package/src/shared-tree-core/editManagerFormatV1toV4.ts +10 -5
  646. package/src/shared-tree-core/editManagerFormatV5.ts +3 -3
  647. package/src/shared-tree-core/index.ts +11 -5
  648. package/src/shared-tree-core/messageCodecV1ToV4.ts +6 -1
  649. package/src/shared-tree-core/messageCodecV5.ts +2 -1
  650. package/src/shared-tree-core/messageCodecs.ts +60 -26
  651. package/src/shared-tree-core/messageFormat.ts +56 -0
  652. package/src/shared-tree-core/sharedTreeCore.ts +11 -13
  653. package/src/simple-tree/api/discrepancies.ts +2 -2
  654. package/src/simple-tree/api/incrementalAllowedTypes.ts +1 -1
  655. package/src/simple-tree/api/index.ts +6 -2
  656. package/src/simple-tree/api/schemaFactory.ts +2 -2
  657. package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -168
  658. package/src/simple-tree/api/schemaFactoryBeta.ts +180 -14
  659. package/src/simple-tree/api/schemaFactoryRecursive.ts +2 -0
  660. package/src/simple-tree/api/schemaFromSimple.ts +23 -17
  661. package/src/simple-tree/api/simpleSchemaCodec.ts +360 -0
  662. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +8 -2
  663. package/src/simple-tree/api/storedSchema.ts +8 -5
  664. package/src/simple-tree/api/tree.ts +2 -2
  665. package/src/simple-tree/api/typesUnsafe.ts +6 -6
  666. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +76 -7
  667. package/src/simple-tree/core/allowedTypes.ts +29 -16
  668. package/src/simple-tree/core/treeNode.ts +2 -2
  669. package/src/simple-tree/fieldSchema.ts +14 -1
  670. package/src/simple-tree/index.ts +6 -1
  671. package/src/simple-tree/node-kinds/array/arrayNode.ts +11 -2
  672. package/src/simple-tree/node-kinds/map/mapNode.ts +11 -2
  673. package/src/simple-tree/node-kinds/object/objectNode.ts +57 -21
  674. package/src/simple-tree/node-kinds/record/recordNode.ts +12 -3
  675. package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +16 -0
  676. package/src/simple-tree/simpleSchema.ts +32 -6
  677. package/src/simple-tree/simpleSchemaFormatV1.ts +179 -0
  678. package/src/simple-tree/toStoredSchema.ts +12 -3
  679. package/src/tableSchema.ts +5 -2
  680. package/src/treeFactory.ts +33 -1
  681. package/src/util/brand.ts +40 -2
  682. package/src/util/brandedMap.ts +3 -1
  683. package/src/util/index.ts +1 -0
  684. package/src/util/referenceCounting.ts +1 -0
@@ -5,7 +5,7 @@
5
5
  import type { Covariant } from "./typeCheck.js";
6
6
  /**
7
7
  * Constructs a "Branded" type, adding a type-checking only field to `ValueType`.
8
- *
8
+ * @remarks
9
9
  * Two usages of `Brand` should never use the same `Name`.
10
10
  * If they do, the resulting types will be assignable which defeats the point of this type.
11
11
  *
@@ -14,10 +14,16 @@ import type { Covariant } from "./typeCheck.js";
14
14
  * `Type 'Name1' is not assignable to type 'Name2'.`
15
15
  *
16
16
  * These branded types are not opaque: A `Brand<A, B>` can still be used as a `A`.
17
+ *
18
+ * @example Simple usage:
19
+ * ```typescript
20
+ * export type StrongId = Brand<string, "tree.StrongId">;
21
+ * const x: StrongId = brand("myId");
22
+ * ```
17
23
  */
18
24
  export type Brand<ValueType, Name> = ValueType & BrandedType<ValueType, Name>;
19
25
  /**
20
- * Helper for {@link Brand}.
26
+ * Implementation detail for {@link Brand}.
21
27
  *
22
28
  * See `MakeNominal` for some more details.
23
29
  *
@@ -74,6 +80,11 @@ export type NameFromBranded<T extends BrandedType<unknown, unknown>> = T extends
74
80
  * Adds a type {@link Brand} to a value.
75
81
  *
76
82
  * Only do this when specifically allowed by the requirements of the type being converted to.
83
+ * @remarks
84
+ * This infers the branded type from context so it can very easily be used to a semantically invalid conversion.
85
+ * Treat this like "as" casts: they are an indicator that the user/reader must ensure the conversion is valid.
86
+ *
87
+ * If branding a constant, and wanting to preserve the exact typing of the constant, use {@link brandConst} instead.
77
88
  * @privateRemarks
78
89
  * Leaving `T` unconstrained here allows for better type inference when branding unions.
79
90
  * For example when assigning `brand(number)` a number to an optional branded number field,
@@ -83,4 +94,22 @@ export type NameFromBranded<T extends BrandedType<unknown, unknown>> = T extends
83
94
  * this is an intended restriction as it causes compile errors for misuse of this function (like using brand when the relevant type is not a branded type).
84
95
  */
85
96
  export declare function brand<T>(value: T extends BrandedType<infer ValueType, unknown> ? ValueType : never): T;
97
+ /**
98
+ * Adds a type {@link Brand} to a value, while preserving the exact type of the value being branded.
99
+ * @remarks
100
+ * This takes in the type to brand to as a required type parameter, unlike {@link brand} which infers it from context.
101
+ * This also preserves the exact type of the value being branded.
102
+ * TypeScript has no way to take an explicit type parameter and infer another in a single generic context.
103
+ * To work around this, two generic contexts are used, first a function to infer the parameter type,
104
+ * and a second function (returned) to take the explicit type parameter.
105
+ *
106
+ * This is intended for use when branding constants.
107
+ * @example
108
+ * ```typescript
109
+ * const requiredIdentifier = brandConst("Value")<FieldKindIdentifier>();
110
+ * ```
111
+ * @privateRemarks
112
+ * The dummy parameter is used to produce a compile error in the event where the value being branded is incompatible with the branded type.
113
+ */
114
+ export declare function brandConst<const T>(value: T): <T2 extends BrandedType<unknown, unknown>>(...dummy: T extends (T2 extends BrandedType<infer ValueType, unknown> ? ValueType : never) ? [] : [never]) => T2 & T;
86
115
  //# sourceMappingURL=brand.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/util/brand.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,KAAK,CAAC,SAAS,EAAE,IAAI,IAAI,SAAS,GAAG,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,8BAAsB,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI;IACpD,SAAS,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5C;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAE5C;;OAEG;IACH,OAAO;IAEP;;;;OAIG;WACW,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,KAAK;CAKhE;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,WAAW,CAC5F,MAAM,SAAS,EACf,OAAO,CACP,GACE,SAAS,GACT,KAAK,CAAC;AAET;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,WAAW,CAC3F,OAAO,EACP,MAAM,IAAI,CACV,GACE,IAAI,GACJ,KAAK,CAAC;AAET;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,CAAC,CAAC,EACtB,KAAK,EAAE,CAAC,SAAS,WAAW,CAAC,MAAM,SAAS,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,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;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,KAAK,CAAC,CAAC,EACjC,KAAK,EAAE,CAAC,GACN,CAAC,EAAE,SAAS,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,EAC3C,GAAG,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,WAAW,CAAC,MAAM,SAAS,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC,GACvF,EAAE,GACF,CAAC,KAAK,CAAC,KACN,EAAE,GAAG,CAAC,CAEV"}
@@ -4,10 +4,10 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.brand = exports.BrandedType = void 0;
7
+ exports.brandConst = exports.brand = exports.BrandedType = void 0;
8
8
  const internal_1 = require("@fluidframework/telemetry-utils/internal");
9
9
  /**
10
- * Helper for {@link Brand}.
10
+ * Implementation detail for {@link Brand}.
11
11
  *
12
12
  * See `MakeNominal` for some more details.
13
13
  *
@@ -46,6 +46,11 @@ exports.BrandedType = BrandedType;
46
46
  * Adds a type {@link Brand} to a value.
47
47
  *
48
48
  * Only do this when specifically allowed by the requirements of the type being converted to.
49
+ * @remarks
50
+ * This infers the branded type from context so it can very easily be used to a semantically invalid conversion.
51
+ * Treat this like "as" casts: they are an indicator that the user/reader must ensure the conversion is valid.
52
+ *
53
+ * If branding a constant, and wanting to preserve the exact typing of the constant, use {@link brandConst} instead.
49
54
  * @privateRemarks
50
55
  * Leaving `T` unconstrained here allows for better type inference when branding unions.
51
56
  * For example when assigning `brand(number)` a number to an optional branded number field,
@@ -58,4 +63,25 @@ function brand(value) {
58
63
  return value;
59
64
  }
60
65
  exports.brand = brand;
66
+ /**
67
+ * Adds a type {@link Brand} to a value, while preserving the exact type of the value being branded.
68
+ * @remarks
69
+ * This takes in the type to brand to as a required type parameter, unlike {@link brand} which infers it from context.
70
+ * This also preserves the exact type of the value being branded.
71
+ * TypeScript has no way to take an explicit type parameter and infer another in a single generic context.
72
+ * To work around this, two generic contexts are used, first a function to infer the parameter type,
73
+ * and a second function (returned) to take the explicit type parameter.
74
+ *
75
+ * This is intended for use when branding constants.
76
+ * @example
77
+ * ```typescript
78
+ * const requiredIdentifier = brandConst("Value")<FieldKindIdentifier>();
79
+ * ```
80
+ * @privateRemarks
81
+ * The dummy parameter is used to produce a compile error in the event where the value being branded is incompatible with the branded type.
82
+ */
83
+ function brandConst(value) {
84
+ return () => value;
85
+ }
86
+ exports.brandConst = brandConst;
61
87
  //# sourceMappingURL=brand.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"brand.js","sourceRoot":"","sources":["../../src/util/brand.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uEAAsE;AAkBtE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAsB,WAAW;IAahC;;OAEG;IACH,gBAAuB,CAAC;IAExB;;;;OAIG;IACI,MAAM,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,KAAY;QAC9C,MAAM,IAAI,qBAAU,CACnB,0GAA0G,CAC1G,CAAC;IACH,CAAC;CACD;AA5BD,kCA4BC;AAwBD;;;;;;;;;;;GAWG;AACH,SAAgB,KAAK,CACpB,KAA0E;IAE1E,OAAO,KAAU,CAAC;AACnB,CAAC;AAJD,sBAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { Covariant } from \"./typeCheck.js\";\n\n/**\n * Constructs a \"Branded\" type, adding a type-checking only field to `ValueType`.\n *\n * Two usages of `Brand` should never use the same `Name`.\n * If they do, the resulting types will be assignable which defeats the point of this type.\n *\n * This type is constructed such that the first line of type errors when assigning\n * mismatched branded types will be:\n * `Type 'Name1' is not assignable to type 'Name2'.`\n *\n * These branded types are not opaque: A `Brand<A, B>` can still be used as a `A`.\n */\nexport type Brand<ValueType, Name> = ValueType & BrandedType<ValueType, Name>;\n\n/**\n * Helper for {@link Brand}.\n *\n * See `MakeNominal` for some more details.\n *\n * Do not use this class with `instanceof`: this will always be false at runtime,\n * but the compiler may think it's true in some cases.\n *\n * @remarks\n * This is covariant over ValueType.\n * This is suitable for when ValueType is immutable (like string or number),\n * which is the common use-case for branding.\n *\n * @privateRemarks\n * This is split out into its own type as that's the only way to:\n *\n * - make the member protected (so you can't accidentally try and access it).\n * - get nominal typing (so types produced without using this class can never be assignable to it).\n *\n * @sealed\n */\nexport abstract class BrandedType<out ValueType, Name> {\n\tprotected _typeCheck?: Covariant<ValueType>;\n\t/**\n\t * Compile time only marker to make type checking more strict.\n\t * This method will not exist at runtime and accessing it is invalid.\n\t * See {@link Brand} for details.\n\t *\n\t * @privateRemarks\n\t * `Name` is used as the return type of a method rather than a a simple readonly member as this allows types with two brands to be intersected without getting `never`.\n\t * The method takes in never to help emphasize that its not callable.\n\t */\n\tprotected abstract brand(dummy: never): Name;\n\n\t/**\n\t * This class should never exist at runtime, so make it un-constructable.\n\t */\n\tprivate constructor() {}\n\n\t/**\n\t * Since this class is a compile time only type brand, `instanceof` will never work with it.\n\t * This `Symbol.hasInstance` implementation ensures that `instanceof` will error if used,\n\t * and in TypeScript 5.3 and newer will produce a compile time error if used.\n\t */\n\tpublic static [Symbol.hasInstance](value: never): value is never {\n\t\tthrow new UsageError(\n\t\t\t\"BrandedType is a compile time type brand not a real class that can be used with `instanceof` at runtime.\",\n\t\t);\n\t}\n}\n\n/**\n * Implementation detail of type branding. Should not be used directly outside this file,\n * but shows up as part of branded types so API-Extractor requires it to be exported.\n */\nexport type ValueFromBranded<T extends BrandedType<unknown, unknown>> = T extends BrandedType<\n\tinfer ValueType,\n\tunknown\n>\n\t? ValueType\n\t: never;\n\n/**\n * Implementation detail of type branding. Should not be used directly outside this file,\n * but shows up as part of branded types so API-Extractor requires it to be exported.\n */\nexport type NameFromBranded<T extends BrandedType<unknown, unknown>> = T extends BrandedType<\n\tunknown,\n\tinfer Name\n>\n\t? Name\n\t: never;\n\n/**\n * Adds a type {@link Brand} to a value.\n *\n * Only do this when specifically allowed by the requirements of the type being converted to.\n * @privateRemarks\n * Leaving `T` unconstrained here allows for better type inference when branding unions.\n * For example when assigning `brand(number)` a number to an optional branded number field,\n * constraining T to `BrandedType<unknown, string>` causes the inference to fail and requires explicitly providing the type parameter.\n * For example leaving T unconstrained instead allows the union of `BrandedType | undefined` to distribute over the conditional allowing the branding only the the union members which should be branded.\n * This does not permit branding an optional value into an optional field since non branded union members are still excluded from input to this function:\n * this is an intended restriction as it causes compile errors for misuse of this function (like using brand when the relevant type is not a branded type).\n */\nexport function brand<T>(\n\tvalue: T extends BrandedType<infer ValueType, unknown> ? ValueType : never,\n): T {\n\treturn value as T;\n}\n"]}
1
+ {"version":3,"file":"brand.js","sourceRoot":"","sources":["../../src/util/brand.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uEAAsE;AAwBtE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAsB,WAAW;IAahC;;OAEG;IACH,gBAAuB,CAAC;IAExB;;;;OAIG;IACI,MAAM,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,KAAY;QAC9C,MAAM,IAAI,qBAAU,CACnB,0GAA0G,CAC1G,CAAC;IACH,CAAC;CACD;AA5BD,kCA4BC;AAwBD;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,KAAK,CACpB,KAA0E;IAE1E,OAAO,KAAU,CAAC;AACnB,CAAC;AAJD,sBAIC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,UAAU,CACzB,KAAQ;IAMR,OAAO,GAAO,EAAE,CAAC,KAAe,CAAC;AAClC,CAAC;AARD,gCAQC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { Covariant } from \"./typeCheck.js\";\n\n/**\n * Constructs a \"Branded\" type, adding a type-checking only field to `ValueType`.\n * @remarks\n * Two usages of `Brand` should never use the same `Name`.\n * If they do, the resulting types will be assignable which defeats the point of this type.\n *\n * This type is constructed such that the first line of type errors when assigning\n * mismatched branded types will be:\n * `Type 'Name1' is not assignable to type 'Name2'.`\n *\n * These branded types are not opaque: A `Brand<A, B>` can still be used as a `A`.\n *\n * @example Simple usage:\n * ```typescript\n * export type StrongId = Brand<string, \"tree.StrongId\">;\n * const x: StrongId = brand(\"myId\");\n * ```\n */\nexport type Brand<ValueType, Name> = ValueType & BrandedType<ValueType, Name>;\n\n/**\n * Implementation detail for {@link Brand}.\n *\n * See `MakeNominal` for some more details.\n *\n * Do not use this class with `instanceof`: this will always be false at runtime,\n * but the compiler may think it's true in some cases.\n *\n * @remarks\n * This is covariant over ValueType.\n * This is suitable for when ValueType is immutable (like string or number),\n * which is the common use-case for branding.\n *\n * @privateRemarks\n * This is split out into its own type as that's the only way to:\n *\n * - make the member protected (so you can't accidentally try and access it).\n * - get nominal typing (so types produced without using this class can never be assignable to it).\n *\n * @sealed\n */\nexport abstract class BrandedType<out ValueType, Name> {\n\tprotected _typeCheck?: Covariant<ValueType>;\n\t/**\n\t * Compile time only marker to make type checking more strict.\n\t * This method will not exist at runtime and accessing it is invalid.\n\t * See {@link Brand} for details.\n\t *\n\t * @privateRemarks\n\t * `Name` is used as the return type of a method rather than a a simple readonly member as this allows types with two brands to be intersected without getting `never`.\n\t * The method takes in never to help emphasize that its not callable.\n\t */\n\tprotected abstract brand(dummy: never): Name;\n\n\t/**\n\t * This class should never exist at runtime, so make it un-constructable.\n\t */\n\tprivate constructor() {}\n\n\t/**\n\t * Since this class is a compile time only type brand, `instanceof` will never work with it.\n\t * This `Symbol.hasInstance` implementation ensures that `instanceof` will error if used,\n\t * and in TypeScript 5.3 and newer will produce a compile time error if used.\n\t */\n\tpublic static [Symbol.hasInstance](value: never): value is never {\n\t\tthrow new UsageError(\n\t\t\t\"BrandedType is a compile time type brand not a real class that can be used with `instanceof` at runtime.\",\n\t\t);\n\t}\n}\n\n/**\n * Implementation detail of type branding. Should not be used directly outside this file,\n * but shows up as part of branded types so API-Extractor requires it to be exported.\n */\nexport type ValueFromBranded<T extends BrandedType<unknown, unknown>> = T extends BrandedType<\n\tinfer ValueType,\n\tunknown\n>\n\t? ValueType\n\t: never;\n\n/**\n * Implementation detail of type branding. Should not be used directly outside this file,\n * but shows up as part of branded types so API-Extractor requires it to be exported.\n */\nexport type NameFromBranded<T extends BrandedType<unknown, unknown>> = T extends BrandedType<\n\tunknown,\n\tinfer Name\n>\n\t? Name\n\t: never;\n\n/**\n * Adds a type {@link Brand} to a value.\n *\n * Only do this when specifically allowed by the requirements of the type being converted to.\n * @remarks\n * This infers the branded type from context so it can very easily be used to a semantically invalid conversion.\n * Treat this like \"as\" casts: they are an indicator that the user/reader must ensure the conversion is valid.\n *\n * If branding a constant, and wanting to preserve the exact typing of the constant, use {@link brandConst} instead.\n * @privateRemarks\n * Leaving `T` unconstrained here allows for better type inference when branding unions.\n * For example when assigning `brand(number)` a number to an optional branded number field,\n * constraining T to `BrandedType<unknown, string>` causes the inference to fail and requires explicitly providing the type parameter.\n * For example leaving T unconstrained instead allows the union of `BrandedType | undefined` to distribute over the conditional allowing the branding only the the union members which should be branded.\n * This does not permit branding an optional value into an optional field since non branded union members are still excluded from input to this function:\n * this is an intended restriction as it causes compile errors for misuse of this function (like using brand when the relevant type is not a branded type).\n */\nexport function brand<T>(\n\tvalue: T extends BrandedType<infer ValueType, unknown> ? ValueType : never,\n): T {\n\treturn value as T;\n}\n\n/**\n * Adds a type {@link Brand} to a value, while preserving the exact type of the value being branded.\n * @remarks\n * This takes in the type to brand to as a required type parameter, unlike {@link brand} which infers it from context.\n * This also preserves the exact type of the value being branded.\n * TypeScript has no way to take an explicit type parameter and infer another in a single generic context.\n * To work around this, two generic contexts are used, first a function to infer the parameter type,\n * and a second function (returned) to take the explicit type parameter.\n *\n * This is intended for use when branding constants.\n * @example\n * ```typescript\n * const requiredIdentifier = brandConst(\"Value\")<FieldKindIdentifier>();\n * ```\n * @privateRemarks\n * The dummy parameter is used to produce a compile error in the event where the value being branded is incompatible with the branded type.\n */\nexport function brandConst<const T>(\n\tvalue: T,\n): <T2 extends BrandedType<unknown, unknown>>(\n\t...dummy: T extends (T2 extends BrandedType<infer ValueType, unknown> ? ValueType : never)\n\t\t? []\n\t\t: [never]\n) => T2 & T {\n\treturn <T2>() => value as T2 & T;\n}\n"]}
@@ -8,10 +8,12 @@ import type { Invariant } from "./typeCheck.js";
8
8
  /**
9
9
  * Key in a {@link BrandedMapSubset}.
10
10
  * @remarks
11
+ * `TContent` is used as part of the brand to strongly associate the key type with the type of the values it looks up.
12
+ *
11
13
  * Due to the `TContent` type parameter being invariant (which it has to be since keys are used to both read and write data),
12
14
  * generic collections end up needing to constrain their key's `TContent` to `any`.
13
15
  */
14
- export type BrandedKey<TKey, TContent> = TKey & Invariant<TContent>;
16
+ export type BrandedKey<TKey, TContent> = Brand<TKey, ["BrandedKey", Invariant<TContent>]>;
15
17
  export type BrandedKeyContent<TKey extends BrandedKey<unknown, any>> = TKey extends BrandedKey<unknown, infer TContent> ? TContent : never;
16
18
  /**
17
19
  * A Map where the keys carry the types of values which they correspond to.
@@ -1 +1 @@
1
- {"version":3,"file":"brandedMap.d.ts","sourceRoot":"","sources":["../../src/util/brandedMap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,CAAC,IAAI,EAAE,QAAQ,IAAI,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAGpE,MAAM,MAAM,iBAAiB,CAAC,IAAI,SAAS,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC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,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,KACjE,KAAK,CAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"brandedMap.js","sourceRoot":"","sources":["../../src/util/brandedMap.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,yCAAyC;AAwCzC;;;;GAIG;AACH,SAAgB,sBAAsB,CACrC,GAAgD,EAChD,GAAqB,EACrB,YAAmD;IAEnD,OAAO,IAAA,sBAAW,EAAsB,GAAG,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;AACjE,CAAC;AAND,wDAMC;AAED;;;;GAIG;AACH,IAAI,WAAW,GAAG,CAAC,CAAC;AAEpB;;GAEG;AACH,SAAgB,WAAW;IAK1B,OAAO,WAAW,EAAW,CAAC;AAC/B,CAAC;AAND,kCAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Brand } from \"./brand.js\";\nimport type { Opaque } from \"./opaque.js\";\nimport type { Invariant } from \"./typeCheck.js\";\nimport { getOrCreate } from \"./utils.js\";\n\n/**\n * Key in a {@link BrandedMapSubset}.\n * @remarks\n * Due to the `TContent` type parameter being invariant (which it has to be since keys are used to both read and write data),\n * generic collections end up needing to constrain their key's `TContent` to `any`.\n */\nexport type BrandedKey<TKey, TContent> = TKey & Invariant<TContent>;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type BrandedKeyContent<TKey extends BrandedKey<unknown, any>> = TKey extends BrandedKey<\n\tunknown,\n\tinfer TContent\n>\n\t? TContent\n\t: never;\n\n/**\n * A Map where the keys carry the types of values which they correspond to.\n *\n * Example usage:\n * ```typescript\n * type FooSlot<TContent> = BrandedKey<Opaque<Brand<number, \"FooSlot\">>, TContent>;\n * const counterSlot = brandedSlot<FooSlot<number>>();\n * const slots: BrandedMapSubset<FooSlot<any>> = new Map();\n * slots.set(counterSlot, slots.get(counterSlot) ?? 0 + 1);\n * ```\n *\n * @remarks\n * These APIs are designed so that a Map can be used to implement this type.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface BrandedMapSubset<K extends BrandedKey<unknown, any>> {\n\tget<K2 extends K>(key: K2): BrandedKeyContent<K2> | undefined;\n\thas(key: K): boolean;\n\tset<K2 extends K>(key: K2, value: BrandedKeyContent<K2>): this;\n\tdelete(key: K): boolean;\n}\n\n/**\n * Version of {@link getOrCreate} with better typing for {@link BrandedMapSubset}.\n * @privateRemarks\n * Only infers type from key to avoid inferring `any` from map's key.\n */\nexport function getOrCreateSlotContent<K, V>(\n\tmap: NoInfer<BrandedMapSubset<BrandedKey<K, V>>>,\n\tkey: BrandedKey<K, V>,\n\tdefaultValue: NoInfer<(key: BrandedKey<K, V>) => V>,\n): V {\n\treturn getOrCreate<BrandedKey<K, V>, V>(map, key, defaultValue);\n}\n\n/**\n * A counter used to allocate unique numbers (See {@link brandedSlot}) to use as {@link BrandedKey}s.\n * This allows the keys to be small integers, which are efficient to use as keys in maps.\n * See {@link BrandedMapSubset}.\n */\nlet slotCounter = 0;\n\n/**\n * Define a strongly typed slot in which data can be stored in a {@link BrandedMapSubset}.\n */\nexport function brandedSlot<\n\t// See note on BrandedKey.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlot extends BrandedKey<number | Opaque<Brand<number, string>>, any>,\n>(): TSlot {\n\treturn slotCounter++ as TSlot;\n}\n"]}
1
+ {"version":3,"file":"brandedMap.js","sourceRoot":"","sources":["../../src/util/brandedMap.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,yCAAyC;AA0CzC;;;;GAIG;AACH,SAAgB,sBAAsB,CACrC,GAAgD,EAChD,GAAqB,EACrB,YAAmD;IAEnD,OAAO,IAAA,sBAAW,EAAsB,GAAG,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;AACjE,CAAC;AAND,wDAMC;AAED;;;;GAIG;AACH,IAAI,WAAW,GAAG,CAAC,CAAC;AAEpB;;GAEG;AACH,SAAgB,WAAW;IAK1B,OAAO,WAAW,EAAW,CAAC;AAC/B,CAAC;AAND,kCAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Brand } from \"./brand.js\";\nimport type { Opaque } from \"./opaque.js\";\nimport type { Invariant } from \"./typeCheck.js\";\nimport { getOrCreate } from \"./utils.js\";\n\n/**\n * Key in a {@link BrandedMapSubset}.\n * @remarks\n * `TContent` is used as part of the brand to strongly associate the key type with the type of the values it looks up.\n *\n * Due to the `TContent` type parameter being invariant (which it has to be since keys are used to both read and write data),\n * generic collections end up needing to constrain their key's `TContent` to `any`.\n */\nexport type BrandedKey<TKey, TContent> = Brand<TKey, [\"BrandedKey\", Invariant<TContent>]>;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type BrandedKeyContent<TKey extends BrandedKey<unknown, any>> = TKey extends BrandedKey<\n\tunknown,\n\tinfer TContent\n>\n\t? TContent\n\t: never;\n\n/**\n * A Map where the keys carry the types of values which they correspond to.\n *\n * Example usage:\n * ```typescript\n * type FooSlot<TContent> = BrandedKey<Opaque<Brand<number, \"FooSlot\">>, TContent>;\n * const counterSlot = brandedSlot<FooSlot<number>>();\n * const slots: BrandedMapSubset<FooSlot<any>> = new Map();\n * slots.set(counterSlot, slots.get(counterSlot) ?? 0 + 1);\n * ```\n *\n * @remarks\n * These APIs are designed so that a Map can be used to implement this type.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface BrandedMapSubset<K extends BrandedKey<unknown, any>> {\n\tget<K2 extends K>(key: K2): BrandedKeyContent<K2> | undefined;\n\thas(key: K): boolean;\n\tset<K2 extends K>(key: K2, value: BrandedKeyContent<K2>): this;\n\tdelete(key: K): boolean;\n}\n\n/**\n * Version of {@link getOrCreate} with better typing for {@link BrandedMapSubset}.\n * @privateRemarks\n * Only infers type from key to avoid inferring `any` from map's key.\n */\nexport function getOrCreateSlotContent<K, V>(\n\tmap: NoInfer<BrandedMapSubset<BrandedKey<K, V>>>,\n\tkey: BrandedKey<K, V>,\n\tdefaultValue: NoInfer<(key: BrandedKey<K, V>) => V>,\n): V {\n\treturn getOrCreate<BrandedKey<K, V>, V>(map, key, defaultValue);\n}\n\n/**\n * A counter used to allocate unique numbers (See {@link brandedSlot}) to use as {@link BrandedKey}s.\n * This allows the keys to be small integers, which are efficient to use as keys in maps.\n * See {@link BrandedMapSubset}.\n */\nlet slotCounter = 0;\n\n/**\n * Define a strongly typed slot in which data can be stored in a {@link BrandedMapSubset}.\n */\nexport function brandedSlot<\n\t// See note on BrandedKey.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlot extends BrandedKey<number | Opaque<Brand<number, string>>, any>,\n>(): TSlot {\n\treturn slotCounter++ as TSlot;\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { brand, type Brand, BrandedType, type NameFromBranded, type ValueFromBranded, } from "./brand.js";
5
+ export { brand, type Brand, BrandedType, type NameFromBranded, type ValueFromBranded, brandConst, } from "./brand.js";
6
6
  export { brandedNumberType, brandedStringType } from "./typeboxBrand.js";
7
7
  export { brandOpaque, extractFromOpaque, type ExtractFromOpaque, type Opaque, } from "./opaque.js";
8
8
  export { deleteFromNestedMap, getOrAddInNestedMap, getOrDefaultInNestedMap, forEachInNestedMap, type NestedMap, type ReadonlyNestedMap, SizedNestedMap, populateNestedMap, setInNestedMap, tryAddToNestedMap, tryGetFromNestedMap, mapNestedMap, nestedMapToFlatList, nestedMapFromFlatList, getOrCreateInNestedMap, } from "./nestedMap.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,EACL,KAAK,KAAK,EACV,WA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ACX,SAAS,EACT,eAAe,EACf,KAAK,KAAK,EACV,YAAY,EACZ,aAAa,EACb,KAAK,WAAW,EAChB,UAAU,EACV,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,EACd,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,SAAS,EACT,wBAAwB,EACxB,qBAAqB,IAAI,YAAY,EACrC,aAAa,EACb,eAAe,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAErF,YAAY,EACX,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,YAAY,EACZ,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,QAAQ,GACR,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EACN,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,WAAW,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,QAAQ,EACR,KAAK,gBAAgB,EACrB,kBAAkB,GAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACN,KAAK,WAAW,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,eAAe,GACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,SAAS,EACT,KAAK,aAAa,EAClB,cAAc,EACd,aAAa,EACb,aAAa,GACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,EACL,KAAK,KAAK,EACV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EAC5B,WAAW,EACX,SAAS,EACT,eAAe,EACf,KAAK,KAAK,EACV,YAAY,EACZ,aAAa,EACb,KAAK,WAAW,EAChB,UAAU,EACV,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,EACd,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,SAAS,EACT,wBAAwB,EACxB,qBAAqB,IAAI,YAAY,EACrC,aAAa,EACb,eAAe,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAErF,YAAY,EACX,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,YAAY,EACZ,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,QAAQ,GACR,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EACN,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,WAAW,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,QAAQ,EACR,KAAK,gBAAgB,EACrB,kBAAkB,GAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACN,KAAK,WAAW,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,eAAe,GACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,SAAS,EACT,KAAK,aAAa,EAClB,cAAc,EACd,aAAa,EACb,aAAa,GACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -4,11 +4,12 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.getLast = exports.count = exports.find = exports.compareStrings = exports.transformObjectMap = exports.assertValidRangeIndices = exports.capitalize = exports.disposeSymbol = exports.compareNamed = exports.oneFromIterable = exports.invertMap = exports.objectToMap = exports.assertNonNegativeSafeInteger = exports.assertValidRange = exports.assertValidIndex = exports.filterIterable = exports.mapIterable = exports.makeArray = exports.JsonCompatibleReadOnlySchema = exports.isReadonlyArray = exports.isJsonObject = exports.getOrCreate = exports.getOrAddEmptyToMap = exports.compareSets = exports.clone = exports.balancedReduce = exports.asMutable = exports.StackyIterator = exports.OffsetListFactory = exports.nestedSetContains = exports.addToNestedSet = exports.getOrCreateInNestedMap = exports.nestedMapFromFlatList = exports.nestedMapToFlatList = exports.mapNestedMap = exports.tryGetFromNestedMap = exports.tryAddToNestedMap = exports.setInNestedMap = exports.populateNestedMap = exports.SizedNestedMap = exports.forEachInNestedMap = exports.getOrDefaultInNestedMap = exports.getOrAddInNestedMap = exports.deleteFromNestedMap = exports.extractFromOpaque = exports.brandOpaque = exports.brandedStringType = exports.brandedNumberType = exports.BrandedType = exports.brand = void 0;
8
- exports.cloneWithReplacements = exports.mergeTupleBTrees = exports.newTupleBTree = exports.breakingClass = exports.throwIfBroken = exports.breakingMethod = exports.Breakable = exports.fakeIdAllocator = exports.idAllocatorFromState = exports.idAllocatorFromMaxId = exports.newIntegerRangeMap = exports.RangeMap = exports.brandedSlot = exports.getOrCreateSlotContent = exports.unsafeArrayToTuple = exports.ReferenceCountedBase = exports.iterableHasSome = exports.getOrAddInMap = exports.copyProperty = exports.defineLazyCachedProperty = exports.hasSingle = exports.hasSome = void 0;
7
+ exports.count = exports.find = exports.compareStrings = exports.transformObjectMap = exports.assertValidRangeIndices = exports.capitalize = exports.disposeSymbol = exports.compareNamed = exports.oneFromIterable = exports.invertMap = exports.objectToMap = exports.assertNonNegativeSafeInteger = exports.assertValidRange = exports.assertValidIndex = exports.filterIterable = exports.mapIterable = exports.makeArray = exports.JsonCompatibleReadOnlySchema = exports.isReadonlyArray = exports.isJsonObject = exports.getOrCreate = exports.getOrAddEmptyToMap = exports.compareSets = exports.clone = exports.balancedReduce = exports.asMutable = exports.StackyIterator = exports.OffsetListFactory = exports.nestedSetContains = exports.addToNestedSet = exports.getOrCreateInNestedMap = exports.nestedMapFromFlatList = exports.nestedMapToFlatList = exports.mapNestedMap = exports.tryGetFromNestedMap = exports.tryAddToNestedMap = exports.setInNestedMap = exports.populateNestedMap = exports.SizedNestedMap = exports.forEachInNestedMap = exports.getOrDefaultInNestedMap = exports.getOrAddInNestedMap = exports.deleteFromNestedMap = exports.extractFromOpaque = exports.brandOpaque = exports.brandedStringType = exports.brandedNumberType = exports.brandConst = exports.BrandedType = exports.brand = void 0;
8
+ exports.cloneWithReplacements = exports.mergeTupleBTrees = exports.newTupleBTree = exports.breakingClass = exports.throwIfBroken = exports.breakingMethod = exports.Breakable = exports.fakeIdAllocator = exports.idAllocatorFromState = exports.idAllocatorFromMaxId = exports.newIntegerRangeMap = exports.RangeMap = exports.brandedSlot = exports.getOrCreateSlotContent = exports.unsafeArrayToTuple = exports.ReferenceCountedBase = exports.iterableHasSome = exports.getOrAddInMap = exports.copyProperty = exports.defineLazyCachedProperty = exports.hasSingle = exports.hasSome = exports.getLast = void 0;
9
9
  var brand_js_1 = require("./brand.js");
10
10
  Object.defineProperty(exports, "brand", { enumerable: true, get: function () { return brand_js_1.brand; } });
11
11
  Object.defineProperty(exports, "BrandedType", { enumerable: true, get: function () { return brand_js_1.BrandedType; } });
12
+ Object.defineProperty(exports, "brandConst", { enumerable: true, get: function () { return brand_js_1.brandConst; } });
12
13
  var typeboxBrand_js_1 = require("./typeboxBrand.js");
13
14
  Object.defineProperty(exports, "brandedNumberType", { enumerable: true, get: function () { return typeboxBrand_js_1.brandedNumberType; } });
14
15
  Object.defineProperty(exports, "brandedStringType", { enumerable: true, get: function () { return typeboxBrand_js_1.brandedStringType; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";AAAA;;;GA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AY,OAAA;AACZ,yGAAA,aAAa,OAAA;AAEb,sGAAA,UAAU,OAAA;AACV,mHAAA,uBAAuB,OAAA;AACvB,8GAAA,kBAAkB,OAAA;AAClB,0GAAA,cAAc,OAAA;AACd,gGAAA,IAAI,OAAA;AACJ,iGAAA,KAAK,OAAA;AACL,mGAAA,OAAO,OAAA;AACP,mGAAA,OAAO,OAAA;AACP,qGAAA,SAAS,OAAA;AACT,oHAAA,wBAAwB,OAAA;AACxB,wGAAA,qBAAqB,OAAgB;AACrC,yGAAA,aAAa,OAAA;AACb,2GAAA,eAAe,OAAA;AAEhB,+DAAqF;AAA5E,4HAAA,oBAAoB,OAAA;AAc7B,+CAAoD;AAA3C,kHAAA,kBAAkB,OAAA;AAE3B,iDAMyB;AAFxB,uHAAA,sBAAsB,OAAA;AACtB,4GAAA,WAAW,OAAA;AAGZ,6CAIuB;AAHtB,uGAAA,QAAQ,OAAA;AAER,iHAAA,kBAAkB,OAAA;AAGnB,mDAM0B;AAJzB,sHAAA,oBAAoB,OAAA;AACpB,sHAAA,oBAAoB,OAAA;AAEpB,iHAAA,eAAe,OAAA;AAGhB,+CAMwB;AALvB,yGAAA,SAAS,OAAA;AAET,8GAAA,cAAc,OAAA;AACd,6GAAA,aAAa,OAAA;AACb,6GAAA,aAAa,OAAA;AAGd,iDAAmF;AAAzD,8GAAA,aAAa,OAAA;AAAE,iHAAA,gBAAgB,OAAA;AAEzD,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tbrand,\n\ttype Brand,\n\tBrandedType,\n\ttype NameFromBranded,\n\ttype ValueFromBranded,\n} from \"./brand.js\";\nexport { brandedNumberType, brandedStringType } from \"./typeboxBrand.js\";\nexport {\n\tbrandOpaque,\n\textractFromOpaque,\n\ttype ExtractFromOpaque,\n\ttype Opaque,\n} from \"./opaque.js\";\nexport {\n\tdeleteFromNestedMap,\n\tgetOrAddInNestedMap,\n\tgetOrDefaultInNestedMap,\n\tforEachInNestedMap,\n\ttype NestedMap,\n\ttype ReadonlyNestedMap,\n\tSizedNestedMap,\n\tpopulateNestedMap,\n\tsetInNestedMap,\n\ttryAddToNestedMap,\n\ttryGetFromNestedMap,\n\tmapNestedMap,\n\tnestedMapToFlatList,\n\tnestedMapFromFlatList,\n\tgetOrCreateInNestedMap,\n} from \"./nestedMap.js\";\nexport { addToNestedSet, type NestedSet, nestedSetContains } from \"./nestedSet.js\";\nexport { type OffsetList, OffsetListFactory } from \"./offsetList.js\";\nexport type {\n\tareSafelyAssignable,\n\tContravariant,\n\tCovariant,\n\teitherIsAny,\n\tEnforceTypeCheckTests,\n\tInvariant,\n\tisAny,\n\tisAssignableTo,\n\tisStrictSubset,\n\tMakeNominal,\n\trequireFalse,\n\trequireTrue,\n\trequireAssignableTo,\n\tareOnlyKeys,\n} from \"./typeCheck.js\";\nexport { StackyIterator } from \"./stackyIterator.js\";\nexport {\n\tasMutable,\n\tbalancedReduce,\n\tclone,\n\tcompareSets,\n\tgetOrAddEmptyToMap,\n\tgetOrCreate,\n\tisJsonObject,\n\tisReadonlyArray,\n\ttype JsonCompatible,\n\ttype JsonCompatibleObject,\n\ttype JsonCompatibleReadOnly,\n\ttype JsonCompatibleReadOnlyObject,\n\tJsonCompatibleReadOnlySchema,\n\tmakeArray,\n\tmapIterable,\n\tfilterIterable,\n\ttype Mutable,\n\ttype Populated,\n\ttype RecursiveReadonly,\n\tassertValidIndex,\n\tassertValidRange,\n\tassertNonNegativeSafeInteger,\n\tobjectToMap,\n\tinvertMap,\n\toneFromIterable,\n\ttype Named,\n\tcompareNamed,\n\tdisposeSymbol,\n\ttype IDisposable,\n\tcapitalize,\n\tassertValidRangeIndices,\n\ttransformObjectMap,\n\tcompareStrings,\n\tfind,\n\tcount,\n\tgetLast,\n\thasSome,\n\thasSingle,\n\tdefineLazyCachedProperty,\n\tcopyPropertyIfDefined as copyProperty,\n\tgetOrAddInMap,\n\titerableHasSome,\n} from \"./utils.js\";\nexport { ReferenceCountedBase, type ReferenceCounted } from \"./referenceCounting.js\";\n\nexport type {\n\t_RecursiveTrick,\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\t_InlineTrick,\n\tFlattenKeys,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n} from \"./typeUtils.js\";\n\nexport { unsafeArrayToTuple } from \"./typeUtils.js\";\n\nexport {\n\ttype BrandedKey,\n\ttype BrandedKeyContent,\n\ttype BrandedMapSubset,\n\tgetOrCreateSlotContent,\n\tbrandedSlot,\n} from \"./brandedMap.js\";\n\nexport {\n\tRangeMap,\n\ttype RangeQueryResult,\n\tnewIntegerRangeMap,\n} from \"./rangeMap.js\";\n\nexport {\n\ttype IdAllocator,\n\tidAllocatorFromMaxId,\n\tidAllocatorFromState,\n\ttype IdAllocationState,\n\tfakeIdAllocator,\n} from \"./idAllocator.js\";\n\nexport {\n\tBreakable,\n\ttype WithBreakable,\n\tbreakingMethod,\n\tthrowIfBroken,\n\tbreakingClass,\n} from \"./breakable.js\";\n\nexport { type TupleBTree, newTupleBTree, mergeTupleBTrees } from \"./bTreeUtils.js\";\n\nexport { cloneWithReplacements } from \"./cloneWithReplacements.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,uCAOoB;AANnB,iGAAA,KAAK,OAAA;AAEL,uGAAA,WAAW,OAAA;AAGX,sGAAA,UAAU,OAAA;AAEX,qDAAyE;AAAhE,oHAAA,iBAAiB,OAAA;AAAE,oHAAA,iBAAiB,OAAA;AAC7C,yCAKqB;AAJpB,wGAAA,WAAW,OAAA;AACX,8GAAA,iBAAiB,OAAA;AAIlB,+CAgBwB;AAfvB,mHAAA,mBAAmB,OAAA;AACnB,mHAAA,mBAAmB,OAAA;AACnB,uHAAA,uBAAuB,OAAA;AACvB,kHAA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AAA,aAAa,OAAA;AACb,2GAAA,eAAe,OAAA;AAEhB,+DAAqF;AAA5E,4HAAA,oBAAoB,OAAA;AAc7B,+CAAoD;AAA3C,kHAAA,kBAAkB,OAAA;AAE3B,iDAMyB;AAFxB,uHAAA,sBAAsB,OAAA;AACtB,4GAAA,WAAW,OAAA;AAGZ,6CAIuB;AAHtB,uGAAA,QAAQ,OAAA;AAER,iHAAA,kBAAkB,OAAA;AAGnB,mDAM0B;AAJzB,sHAAA,oBAAoB,OAAA;AACpB,sHAAA,oBAAoB,OAAA;AAEpB,iHAAA,eAAe,OAAA;AAGhB,+CAMwB;AALvB,yGAAA,SAAS,OAAA;AAET,8GAAA,cAAc,OAAA;AACd,6GAAA,aAAa,OAAA;AACb,6GAAA,aAAa,OAAA;AAGd,iDAAmF;AAAzD,8GAAA,aAAa,OAAA;AAAE,iHAAA,gBAAgB,OAAA;AAEzD,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tbrand,\n\ttype Brand,\n\tBrandedType,\n\ttype NameFromBranded,\n\ttype ValueFromBranded,\n\tbrandConst,\n} from \"./brand.js\";\nexport { brandedNumberType, brandedStringType } from \"./typeboxBrand.js\";\nexport {\n\tbrandOpaque,\n\textractFromOpaque,\n\ttype ExtractFromOpaque,\n\ttype Opaque,\n} from \"./opaque.js\";\nexport {\n\tdeleteFromNestedMap,\n\tgetOrAddInNestedMap,\n\tgetOrDefaultInNestedMap,\n\tforEachInNestedMap,\n\ttype NestedMap,\n\ttype ReadonlyNestedMap,\n\tSizedNestedMap,\n\tpopulateNestedMap,\n\tsetInNestedMap,\n\ttryAddToNestedMap,\n\ttryGetFromNestedMap,\n\tmapNestedMap,\n\tnestedMapToFlatList,\n\tnestedMapFromFlatList,\n\tgetOrCreateInNestedMap,\n} from \"./nestedMap.js\";\nexport { addToNestedSet, type NestedSet, nestedSetContains } from \"./nestedSet.js\";\nexport { type OffsetList, OffsetListFactory } from \"./offsetList.js\";\nexport type {\n\tareSafelyAssignable,\n\tContravariant,\n\tCovariant,\n\teitherIsAny,\n\tEnforceTypeCheckTests,\n\tInvariant,\n\tisAny,\n\tisAssignableTo,\n\tisStrictSubset,\n\tMakeNominal,\n\trequireFalse,\n\trequireTrue,\n\trequireAssignableTo,\n\tareOnlyKeys,\n} from \"./typeCheck.js\";\nexport { StackyIterator } from \"./stackyIterator.js\";\nexport {\n\tasMutable,\n\tbalancedReduce,\n\tclone,\n\tcompareSets,\n\tgetOrAddEmptyToMap,\n\tgetOrCreate,\n\tisJsonObject,\n\tisReadonlyArray,\n\ttype JsonCompatible,\n\ttype JsonCompatibleObject,\n\ttype JsonCompatibleReadOnly,\n\ttype JsonCompatibleReadOnlyObject,\n\tJsonCompatibleReadOnlySchema,\n\tmakeArray,\n\tmapIterable,\n\tfilterIterable,\n\ttype Mutable,\n\ttype Populated,\n\ttype RecursiveReadonly,\n\tassertValidIndex,\n\tassertValidRange,\n\tassertNonNegativeSafeInteger,\n\tobjectToMap,\n\tinvertMap,\n\toneFromIterable,\n\ttype Named,\n\tcompareNamed,\n\tdisposeSymbol,\n\ttype IDisposable,\n\tcapitalize,\n\tassertValidRangeIndices,\n\ttransformObjectMap,\n\tcompareStrings,\n\tfind,\n\tcount,\n\tgetLast,\n\thasSome,\n\thasSingle,\n\tdefineLazyCachedProperty,\n\tcopyPropertyIfDefined as copyProperty,\n\tgetOrAddInMap,\n\titerableHasSome,\n} from \"./utils.js\";\nexport { ReferenceCountedBase, type ReferenceCounted } from \"./referenceCounting.js\";\n\nexport type {\n\t_RecursiveTrick,\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\t_InlineTrick,\n\tFlattenKeys,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n} from \"./typeUtils.js\";\n\nexport { unsafeArrayToTuple } from \"./typeUtils.js\";\n\nexport {\n\ttype BrandedKey,\n\ttype BrandedKeyContent,\n\ttype BrandedMapSubset,\n\tgetOrCreateSlotContent,\n\tbrandedSlot,\n} from \"./brandedMap.js\";\n\nexport {\n\tRangeMap,\n\ttype RangeQueryResult,\n\tnewIntegerRangeMap,\n} from \"./rangeMap.js\";\n\nexport {\n\ttype IdAllocator,\n\tidAllocatorFromMaxId,\n\tidAllocatorFromState,\n\ttype IdAllocationState,\n\tfakeIdAllocator,\n} from \"./idAllocator.js\";\n\nexport {\n\tBreakable,\n\ttype WithBreakable,\n\tbreakingMethod,\n\tthrowIfBroken,\n\tbreakingClass,\n} from \"./breakable.js\";\n\nexport { type TupleBTree, newTupleBTree, mergeTupleBTrees } from \"./bTreeUtils.js\";\n\nexport { cloneWithReplacements } from \"./cloneWithReplacements.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"referenceCounting.d.ts","sourceRoot":"","sources":["../../src/util/referenceCounting.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;;OAKG;IACH,cAAc,IAAI,IAAI,CAAC;IACvB;;;;OAIG;IACH,gBAAgB,IAAI,IAAI,CAAC;IAEzB;;;;OAIG;IACH,QAAQ,IAAI,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,8BAAsB,oBAAqB,YAAW,gBAAgB;IAC/C,OAAO,CAAC,QAAQ;IAAtC,SAAS,aAAqB,QAAQ,GAAE,MAAU;IAE3C,cAAc,CAAC,KAAK,SAAI,GAAG,IAAI;IAI/B,gBAAgB,CAAC,KAAK,SAAI,GAAG,IAAI;IAQjC,QAAQ,IAAI,OAAO;IAInB,cAAc,IAAI,OAAO;IAIhC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,cAAc,IAAI,IAAI;CACzC"}
1
+ {"version":3,"file":"referenceCounting.d.ts","sourceRoot":"","sources":["../../src/util/referenceCounting.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;;OAKG;IACH,cAAc,IAAI,IAAI,CAAC;IACvB;;;;OAIG;IACH,gBAAgB,IAAI,IAAI,CAAC;IAEzB;;;;OAIG;IACH,QAAQ,IAAI,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,8BAAsB,oBAAqB,YAAW,gBAAgB;IAE/C,OAAO,CAAC,QAAQ;IAAtC,SAAS,aAAqB,QAAQ,GAAE,MAAU;IAE3C,cAAc,CAAC,KAAK,SAAI,GAAG,IAAI;IAI/B,gBAAgB,CAAC,KAAK,SAAI,GAAG,IAAI;IAQjC,QAAQ,IAAI,OAAO;IAInB,cAAc,IAAI,OAAO;IAIhC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,cAAc,IAAI,IAAI;CACzC"}
@@ -10,6 +10,7 @@ const internal_1 = require("@fluidframework/core-utils/internal");
10
10
  * Base class to assist with implementing ReferenceCounted.
11
11
  */
12
12
  class ReferenceCountedBase {
13
+ // eslint-disable-next-line @typescript-eslint/prefer-readonly -- false positive; modified in multiple places
13
14
  constructor(refCount = 1) {
14
15
  this.refCount = refCount;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"referenceCounting.js","sourceRoot":"","sources":["../../src/util/referenceCounting.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAgC7D;;GAEG;AACH,MAAsB,oBAAoB;IACzC,YAA8B,WAAmB,CAAC;QAApB,aAAQ,GAAR,QAAQ,CAAY;IAAG,CAAC;IAE/C,cAAc,CAAC,KAAK,GAAG,CAAC;QAC9B,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC;IACxB,CAAC;IAEM,gBAAgB,CAAC,KAAK,GAAG,CAAC;QAChC,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC;QACvB,IAAA,iBAAM,EAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC3D,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,cAAc,EAAE,CAAC;QACvB,CAAC;IACF,CAAC;IAEM,QAAQ;QACd,OAAO,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IAC1B,CAAC;IAEM,cAAc;QACpB,OAAO,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC;IAC5B,CAAC;CAMD;AA3BD,oDA2BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\n/**\n * An object which counts the number of users / references to it.\n * @remarks\n * This implements the {@link https://en.wikipedia.org/wiki/Reference_counting | Reference counting} pattern.\n * Getting the reference count correct is difficult in TypeScript and great care must be used.\n * Because of this, this interface should not be used in the public API.\n */\nexport interface ReferenceCounted {\n\t/**\n\t * Called to increase the reference count tracked by this object.\n\t * @remarks\n\t * When a user of this object allows something else to use it,\n\t * this should be called.\n\t */\n\treferenceAdded(): void;\n\t/**\n\t * Called to decrease the reference count tracked by this object.\n\t * @remarks\n\t * When a user of this object will no longer use it, this should be called.\n\t */\n\treferenceRemoved(): void;\n\n\t/**\n\t * @returns true if mutating this object may impact other users of it.\n\t *\n\t * Implementations can return true if the refcount is 1 OR the content is logically immutable.\n\t */\n\tisShared(): boolean;\n}\n\n/**\n * Base class to assist with implementing ReferenceCounted.\n */\nexport abstract class ReferenceCountedBase implements ReferenceCounted {\n\tprotected constructor(private refCount: number = 1) {}\n\n\tpublic referenceAdded(count = 1): void {\n\t\tthis.refCount += count;\n\t}\n\n\tpublic referenceRemoved(count = 1): void {\n\t\tthis.refCount -= count;\n\t\tassert(this.refCount >= 0, 0x4c4 /* Negative ref count */);\n\t\tif (this.refCount === 0) {\n\t\t\tthis.onUnreferenced();\n\t\t}\n\t}\n\n\tpublic isShared(): boolean {\n\t\treturn this.refCount > 1;\n\t}\n\n\tpublic isUnreferenced(): boolean {\n\t\treturn this.refCount === 0;\n\t}\n\n\t/**\n\t * Called when refcount reaches 0.\n\t */\n\tprotected abstract onUnreferenced(): void;\n}\n"]}
1
+ {"version":3,"file":"referenceCounting.js","sourceRoot":"","sources":["../../src/util/referenceCounting.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAgC7D;;GAEG;AACH,MAAsB,oBAAoB;IACzC,6GAA6G;IAC7G,YAA8B,WAAmB,CAAC;QAApB,aAAQ,GAAR,QAAQ,CAAY;IAAG,CAAC;IAE/C,cAAc,CAAC,KAAK,GAAG,CAAC;QAC9B,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC;IACxB,CAAC;IAEM,gBAAgB,CAAC,KAAK,GAAG,CAAC;QAChC,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC;QACvB,IAAA,iBAAM,EAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC3D,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,cAAc,EAAE,CAAC;QACvB,CAAC;IACF,CAAC;IAEM,QAAQ;QACd,OAAO,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IAC1B,CAAC;IAEM,cAAc;QACpB,OAAO,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC;IAC5B,CAAC;CAMD;AA5BD,oDA4BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\n/**\n * An object which counts the number of users / references to it.\n * @remarks\n * This implements the {@link https://en.wikipedia.org/wiki/Reference_counting | Reference counting} pattern.\n * Getting the reference count correct is difficult in TypeScript and great care must be used.\n * Because of this, this interface should not be used in the public API.\n */\nexport interface ReferenceCounted {\n\t/**\n\t * Called to increase the reference count tracked by this object.\n\t * @remarks\n\t * When a user of this object allows something else to use it,\n\t * this should be called.\n\t */\n\treferenceAdded(): void;\n\t/**\n\t * Called to decrease the reference count tracked by this object.\n\t * @remarks\n\t * When a user of this object will no longer use it, this should be called.\n\t */\n\treferenceRemoved(): void;\n\n\t/**\n\t * @returns true if mutating this object may impact other users of it.\n\t *\n\t * Implementations can return true if the refcount is 1 OR the content is logically immutable.\n\t */\n\tisShared(): boolean;\n}\n\n/**\n * Base class to assist with implementing ReferenceCounted.\n */\nexport abstract class ReferenceCountedBase implements ReferenceCounted {\n\t// eslint-disable-next-line @typescript-eslint/prefer-readonly -- false positive; modified in multiple places\n\tprotected constructor(private refCount: number = 1) {}\n\n\tpublic referenceAdded(count = 1): void {\n\t\tthis.refCount += count;\n\t}\n\n\tpublic referenceRemoved(count = 1): void {\n\t\tthis.refCount -= count;\n\t\tassert(this.refCount >= 0, 0x4c4 /* Negative ref count */);\n\t\tif (this.refCount === 0) {\n\t\t\tthis.onUnreferenced();\n\t\t}\n\t}\n\n\tpublic isShared(): boolean {\n\t\treturn this.refCount > 1;\n\t}\n\n\tpublic isUnreferenced(): boolean {\n\t\treturn this.refCount === 0;\n\t}\n\n\t/**\n\t * Called when refcount reaches 0.\n\t */\n\tprotected abstract onUnreferenced(): void;\n}\n"]}
package/lib/alpha.d.ts CHANGED
@@ -97,10 +97,14 @@ export {
97
97
  AllowedTypesFull,
98
98
  AllowedTypesFullEvaluated,
99
99
  AllowedTypesFullFromMixed,
100
+ AllowedTypesFullFromMixedUnsafe,
100
101
  AllowedTypesMetadata,
101
102
  AnnotateAllowedTypesList,
103
+ AnnotateAllowedTypesListUnsafe,
102
104
  AnnotatedAllowedType,
105
+ AnnotatedAllowedTypeUnsafe,
103
106
  AnnotatedAllowedTypes,
107
+ AnnotatedAllowedTypesUnsafe,
104
108
  ConciseTree,
105
109
  FixRecursiveArraySchema,
106
110
  FluidSerializableAsTree,
@@ -117,6 +121,7 @@ export {
117
121
  PopUnion,
118
122
  RecordNodeInsertableData,
119
123
  SchemaFactoryBeta,
124
+ SchemaStaticsBeta,
120
125
  SchemaUpgrade,
121
126
  SharedTreeOptionsBeta,
122
127
  TreeBeta,
@@ -126,21 +131,20 @@ export {
126
131
  TreeRecordNode,
127
132
  TreeRecordNodeUnsafe,
128
133
  TreeViewBeta,
134
+ UnannotateAllowedTypeUnsafe,
129
135
  UnannotateAllowedTypesList,
136
+ UnannotateAllowedTypesListUnsafe,
130
137
  UnionToTuple,
131
138
  adaptEnum,
132
139
  asBeta,
133
140
  configuredSharedTreeBeta,
141
+ createIndependentTreeBeta,
134
142
  enumFromStrings,
135
143
  singletonSchema,
136
144
  // #endregion
137
145
 
138
146
  // #region @alpha APIs
139
- AllowedTypesFullFromMixedUnsafe,
140
147
  AllowedTypesFullUnsafe,
141
- AnnotateAllowedTypesListUnsafe,
142
- AnnotatedAllowedTypeUnsafe,
143
- AnnotatedAllowedTypesUnsafe,
144
148
  ArrayNodeCustomizableSchema,
145
149
  ArrayNodeCustomizableSchemaUnsafe,
146
150
  ArrayNodePojoEmulationSchema,
@@ -200,10 +204,10 @@ export {
200
204
  RevertibleAlphaFactory,
201
205
  RunTransactionParams,
202
206
  SchemaFactoryAlpha,
203
- SchemaStaticsAlpha,
204
207
  SharedTreeFormatOptions,
205
208
  SharedTreeFormatVersion,
206
209
  SharedTreeOptions,
210
+ SimpleAllowedTypeAttributes,
207
211
  SimpleArrayNodeSchema,
208
212
  SimpleFieldSchema,
209
213
  SimpleLeafNodeSchema,
@@ -236,8 +240,6 @@ export {
236
240
  TreeSchemaEncodingOptions,
237
241
  TreeViewAlpha,
238
242
  TreeViewConfigurationAlpha,
239
- UnannotateAllowedTypeUnsafe,
240
- UnannotateAllowedTypesListUnsafe,
241
243
  UnsafeUnknownSchema,
242
244
  ValueSchema,
243
245
  VerboseTree,
@@ -251,7 +253,10 @@ export {
251
253
  comparePersistedSchema,
252
254
  contentSchemaSymbol,
253
255
  createIdentifierIndex,
256
+ createIndependentTreeAlpha,
254
257
  createSimpleTreeIndex,
258
+ decodeSimpleSchema,
259
+ encodeSimpleSchema,
255
260
  evaluateLazySchema,
256
261
  extractPersistedSchema,
257
262
  generateSchemaFromSimpleSchema,
package/lib/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import {
6
- // eslint-disable-next-line import/no-deprecated
6
+ // eslint-disable-next-line import-x/no-deprecated
7
7
  asTreeViewAlpha, } from "./simple-tree/index.js";
8
8
  /**
9
9
  * Module entry points for retrieving alternate (alpha/beta) versions of tree APIs.
@@ -16,7 +16,7 @@ asTreeViewAlpha, } from "./simple-tree/index.js";
16
16
  * @alpha
17
17
  */
18
18
  export function asAlpha(view) {
19
- // eslint-disable-next-line import/no-deprecated
19
+ // eslint-disable-next-line import-x/no-deprecated
20
20
  return asTreeViewAlpha(view);
21
21
  }
22
22
  /**
package/lib/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO;AAKN,gDAAgD;AAChD,eAAe,GACf,MAAM,wBAAwB,CAAC;AAEhC;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,UAAU,OAAO,CACtB,IAAuB;IAEvB,gDAAgD;IAChD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CACrB,IAAuB;IAEvB,OAAO,IAA6B,CAAC;AACtC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype TreeView,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype ImplicitFieldSchema,\n\t// eslint-disable-next-line import/no-deprecated\n\tasTreeViewAlpha,\n} from \"./simple-tree/index.js\";\n\n/**\n * Module entry points for retrieving alternate (alpha/beta) versions of tree APIs.\n * For each API (usually a class) that has an alpha/beta version, add overloads to the function(s) below.\n * In the future, `asBeta` may be added here too.\n * These functions should only be used by external consumers, not referenced internally within the tree package, to avoid circular import dependencies.\n */\n\n/**\n * Retrieve the {@link TreeViewAlpha | alpha API} for a {@link TreeView}.\n * @alpha\n */\nexport function asAlpha<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): TreeViewAlpha<TSchema> {\n\t// eslint-disable-next-line import/no-deprecated\n\treturn asTreeViewAlpha(view);\n}\n\n/**\n * Retrieve the {@link TreeViewBeta | beta API} for a {@link TreeView}.\n * @beta\n */\nexport function asBeta<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): TreeViewBeta<TSchema> {\n\treturn view as TreeViewBeta<TSchema>;\n}\n"]}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO;AAKN,kDAAkD;AAClD,eAAe,GACf,MAAM,wBAAwB,CAAC;AAEhC;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,UAAU,OAAO,CACtB,IAAuB;IAEvB,kDAAkD;IAClD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CACrB,IAAuB;IAEvB,OAAO,IAA6B,CAAC;AACtC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype TreeView,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype ImplicitFieldSchema,\n\t// eslint-disable-next-line import-x/no-deprecated\n\tasTreeViewAlpha,\n} from \"./simple-tree/index.js\";\n\n/**\n * Module entry points for retrieving alternate (alpha/beta) versions of tree APIs.\n * For each API (usually a class) that has an alpha/beta version, add overloads to the function(s) below.\n * In the future, `asBeta` may be added here too.\n * These functions should only be used by external consumers, not referenced internally within the tree package, to avoid circular import dependencies.\n */\n\n/**\n * Retrieve the {@link TreeViewAlpha | alpha API} for a {@link TreeView}.\n * @alpha\n */\nexport function asAlpha<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): TreeViewAlpha<TSchema> {\n\t// eslint-disable-next-line import-x/no-deprecated\n\treturn asTreeViewAlpha(view);\n}\n\n/**\n * Retrieve the {@link TreeViewBeta | beta API} for a {@link TreeView}.\n * @beta\n */\nexport function asBeta<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): TreeViewBeta<TSchema> {\n\treturn view as TreeViewBeta<TSchema>;\n}\n"]}
package/lib/beta.d.ts CHANGED
@@ -97,10 +97,14 @@ export {
97
97
  AllowedTypesFull,
98
98
  AllowedTypesFullEvaluated,
99
99
  AllowedTypesFullFromMixed,
100
+ AllowedTypesFullFromMixedUnsafe,
100
101
  AllowedTypesMetadata,
101
102
  AnnotateAllowedTypesList,
103
+ AnnotateAllowedTypesListUnsafe,
102
104
  AnnotatedAllowedType,
105
+ AnnotatedAllowedTypeUnsafe,
103
106
  AnnotatedAllowedTypes,
107
+ AnnotatedAllowedTypesUnsafe,
104
108
  ConciseTree,
105
109
  FixRecursiveArraySchema,
106
110
  FluidSerializableAsTree,
@@ -117,6 +121,7 @@ export {
117
121
  PopUnion,
118
122
  RecordNodeInsertableData,
119
123
  SchemaFactoryBeta,
124
+ SchemaStaticsBeta,
120
125
  SchemaUpgrade,
121
126
  SharedTreeOptionsBeta,
122
127
  TreeBeta,
@@ -126,11 +131,14 @@ export {
126
131
  TreeRecordNode,
127
132
  TreeRecordNodeUnsafe,
128
133
  TreeViewBeta,
134
+ UnannotateAllowedTypeUnsafe,
129
135
  UnannotateAllowedTypesList,
136
+ UnannotateAllowedTypesListUnsafe,
130
137
  UnionToTuple,
131
138
  adaptEnum,
132
139
  asBeta,
133
140
  configuredSharedTreeBeta,
141
+ createIndependentTreeBeta,
134
142
  enumFromStrings,
135
143
  singletonSchema
136
144
  // #endregion
@@ -305,7 +305,22 @@ export declare const FluidClientVersion: {
305
305
  */
306
306
  readonly v2_0: "2.0.0";
307
307
  /** Fluid Framework Client 2.1 and newer. */
308
- /** Fluid Framework Client 2.52 and newer. */
308
+ /**
309
+ * Fluid Framework Client 2.43 and newer.
310
+ *
311
+ * New formats introduced in 2.43:
312
+ * - SchemaFormatVersion.v2
313
+ * - MessageFormatVersion.v4
314
+ * - EditManagerFormatVersion.v4
315
+ * - Sequence format version 3
316
+ */
317
+ readonly v2_43: "2.43.0";
318
+ /**
319
+ * Fluid Framework Client 2.52 and newer.
320
+ *
321
+ * New formats introduced in 2.52:
322
+ * - DetachedFieldIndexFormatVersion.v2
323
+ */
309
324
  readonly v2_52: "2.52.0";
310
325
  };
311
326
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/codec/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAkB,MAAM,8BAA8B,CAAC;AAEzE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAE5F;;;GAGG;AACH,MAAM,WAAW,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ;IACrD;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACnD;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ;IACrD;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACnD;AAED;;;GAGG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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,kBAAkB;IAC9B;;;;;;OAMG;IAGH;;OAEG;;IAGH,4CAA4C;IAM5C;;;;;;;;OAQG;;IAGH;;;;;OAKG;;CAEwD,CAAC;AAE7D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,EAAE,uBAAiD,CAAC;AAE/E,MAAM,WAAW,SAAS;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;CACzC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,sBAAsB,CAMzE"}
@@ -195,9 +195,22 @@ export const FluidClientVersion = {
195
195
  // we could add an entry like this to allow users to indicate that they can be opted in once we are ready,
196
196
  // then update it to "2.001" once we actually have the opt in working.
197
197
  // v2_1 = v2_0,
198
- /** Fluid Framework Client 2.52 and newer. */
199
- // New formats introduced in 2.52:
200
- // - DetachedFieldIndex FormatV2
198
+ /**
199
+ * Fluid Framework Client 2.43 and newer.
200
+ *
201
+ * New formats introduced in 2.43:
202
+ * - SchemaFormatVersion.v2
203
+ * - MessageFormatVersion.v4
204
+ * - EditManagerFormatVersion.v4
205
+ * - Sequence format version 3
206
+ */
207
+ v2_43: "2.43.0",
208
+ /**
209
+ * Fluid Framework Client 2.52 and newer.
210
+ *
211
+ * New formats introduced in 2.52:
212
+ * - DetachedFieldIndexFormatVersion.v2
213
+ */
201
214
  v2_52: "2.52.0",
202
215
  };
203
216
  /**