@fluidframework/tree 2.81.1 → 2.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (579) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/api-report/tree.alpha.api.md +54 -22
  3. package/api-report/tree.beta.api.md +150 -1
  4. package/api-report/tree.legacy.beta.api.md +150 -1
  5. package/api-report/tree.legacy.public.api.md +1 -0
  6. package/api-report/tree.public.api.md +1 -0
  7. package/dist/alpha.d.ts +8 -2
  8. package/dist/beta.d.ts +3 -0
  9. package/dist/codec/codec.d.ts +17 -8
  10. package/dist/codec/codec.d.ts.map +1 -1
  11. package/dist/codec/codec.js +8 -1
  12. package/dist/codec/codec.js.map +1 -1
  13. package/dist/codec/index.d.ts +1 -1
  14. package/dist/codec/index.d.ts.map +1 -1
  15. package/dist/codec/index.js +2 -1
  16. package/dist/codec/index.js.map +1 -1
  17. package/dist/codec/versioned/codec.d.ts +1 -1
  18. package/dist/codec/versioned/codec.d.ts.map +1 -1
  19. package/dist/codec/versioned/codec.js.map +1 -1
  20. package/dist/core/index.d.ts +1 -1
  21. package/dist/core/index.d.ts.map +1 -1
  22. package/dist/core/index.js +4 -2
  23. package/dist/core/index.js.map +1 -1
  24. package/dist/core/rebase/changeRebaser.d.ts +3 -2
  25. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  26. package/dist/core/rebase/changeRebaser.js.map +1 -1
  27. package/dist/core/rebase/index.d.ts +1 -1
  28. package/dist/core/rebase/index.d.ts.map +1 -1
  29. package/dist/core/rebase/index.js +4 -2
  30. package/dist/core/rebase/index.js.map +1 -1
  31. package/dist/core/rebase/types.d.ts +23 -3
  32. package/dist/core/rebase/types.d.ts.map +1 -1
  33. package/dist/core/rebase/types.js +30 -16
  34. package/dist/core/rebase/types.js.map +1 -1
  35. package/dist/core/schema-stored/formatV1.d.ts +2 -2
  36. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  37. package/dist/core/schema-stored/formatV1.js +0 -5
  38. package/dist/core/schema-stored/formatV1.js.map +1 -1
  39. package/dist/core/schema-stored/formatV2.d.ts +11 -10
  40. package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
  41. package/dist/core/schema-stored/formatV2.js +1 -6
  42. package/dist/core/schema-stored/formatV2.js.map +1 -1
  43. package/dist/core/schema-stored/index.d.ts.map +1 -1
  44. package/dist/core/schema-stored/index.js.map +1 -1
  45. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  46. package/dist/core/schema-stored/schema.js.map +1 -1
  47. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  48. package/dist/core/tree/anchorSet.js.map +1 -1
  49. package/dist/core/tree/delta.d.ts +9 -7
  50. package/dist/core/tree/delta.d.ts.map +1 -1
  51. package/dist/core/tree/delta.js.map +1 -1
  52. package/dist/core/tree/deltaUtil.js +1 -1
  53. package/dist/core/tree/deltaUtil.js.map +1 -1
  54. package/dist/core/tree/visitDelta.js +2 -2
  55. package/dist/core/tree/visitDelta.js.map +1 -1
  56. package/dist/extensibleSchemaUnion.d.ts +72 -0
  57. package/dist/extensibleSchemaUnion.d.ts.map +1 -0
  58. package/dist/extensibleSchemaUnion.js +79 -0
  59. package/dist/extensibleSchemaUnion.js.map +1 -0
  60. package/dist/feature-libraries/changeAtomIdBTree.d.ts +4 -2
  61. package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  62. package/dist/feature-libraries/changeAtomIdBTree.js +9 -1
  63. package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
  64. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -3
  65. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  66. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +20 -21
  67. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  68. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  69. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  70. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  71. package/dist/feature-libraries/forest-summary/codec.d.ts +2 -1
  72. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  73. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  74. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  75. package/dist/feature-libraries/forest-summary/forestSummarizer.js +5 -2
  76. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  77. package/dist/feature-libraries/forest-summary/formatCommon.d.ts +1 -39
  78. package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  79. package/dist/feature-libraries/forest-summary/formatCommon.js +1 -2
  80. package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  81. package/dist/feature-libraries/forest-summary/formatV1.d.ts +1 -39
  82. package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
  83. package/dist/feature-libraries/forest-summary/formatV2.d.ts +1 -39
  84. package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
  85. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +1 -1
  86. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  87. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +1 -1
  88. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  89. package/dist/feature-libraries/index.d.ts +3 -3
  90. package/dist/feature-libraries/index.d.ts.map +1 -1
  91. package/dist/feature-libraries/index.js +4 -3
  92. package/dist/feature-libraries/index.js.map +1 -1
  93. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts +2 -2
  94. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts.map +1 -1
  95. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js +42 -22
  96. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
  97. package/dist/feature-libraries/modular-schema/genericFieldKind.js +1 -1
  98. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  99. package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
  100. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  101. package/dist/feature-libraries/modular-schema/index.js +2 -1
  102. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  103. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +1 -1
  104. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  105. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +9 -5
  106. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  107. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +11 -1
  108. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  109. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +30 -7
  110. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  111. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  112. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +38 -27
  113. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  114. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +10 -127
  115. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  116. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js +2 -4
  117. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  118. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +3 -79
  119. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  120. package/dist/feature-libraries/optional-field/optionalField.js +1 -1
  121. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  122. package/dist/feature-libraries/optional-field/requiredField.d.ts.map +1 -1
  123. package/dist/feature-libraries/optional-field/requiredField.js.map +1 -1
  124. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  125. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  126. package/dist/feature-libraries/schema-index/formatV2.d.ts +4 -4
  127. package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -1
  128. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  129. package/dist/feature-libraries/sequence-field/invert.js +2 -2
  130. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  131. package/dist/feature-libraries/sequence-field/replaceRevisions.js +16 -16
  132. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  133. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +1 -1
  134. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  135. package/dist/index.d.ts +5 -5
  136. package/dist/index.d.ts.map +1 -1
  137. package/dist/index.js +4 -1
  138. package/dist/index.js.map +1 -1
  139. package/dist/legacy.d.ts +3 -0
  140. package/dist/packageVersion.d.ts +1 -1
  141. package/dist/packageVersion.js +1 -1
  142. package/dist/packageVersion.js.map +1 -1
  143. package/dist/shared-tree/independentView.d.ts +36 -13
  144. package/dist/shared-tree/independentView.d.ts.map +1 -1
  145. package/dist/shared-tree/independentView.js +1 -0
  146. package/dist/shared-tree/independentView.js.map +1 -1
  147. package/dist/shared-tree/index.d.ts +1 -1
  148. package/dist/shared-tree/index.d.ts.map +1 -1
  149. package/dist/shared-tree/index.js.map +1 -1
  150. package/dist/shared-tree/schematizingTreeView.d.ts +10 -0
  151. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  152. package/dist/shared-tree/schematizingTreeView.js +25 -9
  153. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  154. package/dist/shared-tree/sharedTree.d.ts +3 -3
  155. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  156. package/dist/shared-tree/sharedTree.js +8 -32
  157. package/dist/shared-tree/sharedTree.js.map +1 -1
  158. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +11 -3
  159. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  160. package/dist/shared-tree/sharedTreeChangeCodecs.js +38 -4
  161. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  162. package/dist/shared-tree/sharedTreeChangeFormat.d.ts +4 -4
  163. package/dist/shared-tree/tree.js +1 -1
  164. package/dist/shared-tree/tree.js.map +1 -1
  165. package/dist/shared-tree/treeCheckout.d.ts +20 -0
  166. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  167. package/dist/shared-tree/treeCheckout.js +39 -3
  168. package/dist/shared-tree/treeCheckout.js.map +1 -1
  169. package/dist/shared-tree-core/editManagerSummarizer.js +1 -1
  170. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  171. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  172. package/dist/shared-tree-core/messageCodecV1ToV4.js +2 -2
  173. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  174. package/dist/shared-tree-core/transaction.d.ts +14 -3
  175. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  176. package/dist/shared-tree-core/transaction.js +59 -16
  177. package/dist/shared-tree-core/transaction.js.map +1 -1
  178. package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  179. package/dist/shared-tree-core/versionedSummarizer.js +1 -1
  180. package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
  181. package/dist/simple-tree/api/index.d.ts +1 -1
  182. package/dist/simple-tree/api/index.d.ts.map +1 -1
  183. package/dist/simple-tree/api/index.js +3 -2
  184. package/dist/simple-tree/api/index.js.map +1 -1
  185. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +9 -0
  186. package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  187. package/dist/simple-tree/api/schemaCreationUtilities.js +16 -1
  188. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  189. package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
  190. package/dist/simple-tree/api/transactionTypes.d.ts +10 -0
  191. package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
  192. package/dist/simple-tree/api/transactionTypes.js.map +1 -1
  193. package/dist/simple-tree/api/tree.d.ts +81 -6
  194. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  195. package/dist/simple-tree/api/tree.js.map +1 -1
  196. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  197. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  198. package/dist/simple-tree/index.d.ts +2 -2
  199. package/dist/simple-tree/index.d.ts.map +1 -1
  200. package/dist/simple-tree/index.js +4 -2
  201. package/dist/simple-tree/index.js.map +1 -1
  202. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  203. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  204. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +63 -0
  205. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  206. package/dist/simple-tree/node-kinds/array/arrayNode.js +43 -1
  207. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  208. package/dist/simple-tree/node-kinds/array/index.d.ts +1 -1
  209. package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -1
  210. package/dist/simple-tree/node-kinds/array/index.js +2 -1
  211. package/dist/simple-tree/node-kinds/array/index.js.map +1 -1
  212. package/dist/simple-tree/node-kinds/index.d.ts +1 -1
  213. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -1
  214. package/dist/simple-tree/node-kinds/index.js +2 -1
  215. package/dist/simple-tree/node-kinds/index.js.map +1 -1
  216. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  217. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  218. package/dist/tableSchema.d.ts +71 -48
  219. package/dist/tableSchema.d.ts.map +1 -1
  220. package/dist/tableSchema.js +200 -98
  221. package/dist/tableSchema.js.map +1 -1
  222. package/dist/text/textDomainFormatted.js +1 -1
  223. package/dist/text/textDomainFormatted.js.map +1 -1
  224. package/dist/util/bTreeUtils.d.ts +30 -4
  225. package/dist/util/bTreeUtils.d.ts.map +1 -1
  226. package/dist/util/bTreeUtils.js +29 -17
  227. package/dist/util/bTreeUtils.js.map +1 -1
  228. package/dist/util/brand.d.ts.map +1 -1
  229. package/dist/util/brand.js.map +1 -1
  230. package/dist/util/brandedMap.d.ts.map +1 -1
  231. package/dist/util/brandedMap.js.map +1 -1
  232. package/dist/util/breakable.d.ts.map +1 -1
  233. package/dist/util/breakable.js +2 -1
  234. package/dist/util/breakable.js.map +1 -1
  235. package/dist/util/index.d.ts +2 -2
  236. package/dist/util/index.d.ts.map +1 -1
  237. package/dist/util/index.js +6 -3
  238. package/dist/util/index.js.map +1 -1
  239. package/dist/util/opaque.d.ts.map +1 -1
  240. package/dist/util/opaque.js.map +1 -1
  241. package/dist/util/rangeMap.d.ts +3 -2
  242. package/dist/util/rangeMap.d.ts.map +1 -1
  243. package/dist/util/rangeMap.js +7 -1
  244. package/dist/util/rangeMap.js.map +1 -1
  245. package/dist/util/readSnapshotBlob.d.ts +1 -1
  246. package/dist/util/readSnapshotBlob.d.ts.map +1 -1
  247. package/dist/util/readSnapshotBlob.js.map +1 -1
  248. package/dist/util/typeCheck.d.ts.map +1 -1
  249. package/dist/util/typeCheck.js.map +1 -1
  250. package/dist/util/utils.d.ts +20 -16
  251. package/dist/util/utils.d.ts.map +1 -1
  252. package/dist/util/utils.js +49 -17
  253. package/dist/util/utils.js.map +1 -1
  254. package/eslint.config.mts +0 -9
  255. package/lib/alpha.d.ts +8 -2
  256. package/lib/beta.d.ts +3 -0
  257. package/lib/codec/codec.d.ts +17 -8
  258. package/lib/codec/codec.d.ts.map +1 -1
  259. package/lib/codec/codec.js +6 -0
  260. package/lib/codec/codec.js.map +1 -1
  261. package/lib/codec/index.d.ts +1 -1
  262. package/lib/codec/index.d.ts.map +1 -1
  263. package/lib/codec/index.js +1 -1
  264. package/lib/codec/index.js.map +1 -1
  265. package/lib/codec/versioned/codec.d.ts +1 -1
  266. package/lib/codec/versioned/codec.d.ts.map +1 -1
  267. package/lib/codec/versioned/codec.js.map +1 -1
  268. package/lib/core/index.d.ts +1 -1
  269. package/lib/core/index.d.ts.map +1 -1
  270. package/lib/core/index.js +1 -1
  271. package/lib/core/index.js.map +1 -1
  272. package/lib/core/rebase/changeRebaser.d.ts +3 -2
  273. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  274. package/lib/core/rebase/changeRebaser.js.map +1 -1
  275. package/lib/core/rebase/index.d.ts +1 -1
  276. package/lib/core/rebase/index.d.ts.map +1 -1
  277. package/lib/core/rebase/index.js +1 -1
  278. package/lib/core/rebase/index.js.map +1 -1
  279. package/lib/core/rebase/types.d.ts +23 -3
  280. package/lib/core/rebase/types.d.ts.map +1 -1
  281. package/lib/core/rebase/types.js +27 -15
  282. package/lib/core/rebase/types.js.map +1 -1
  283. package/lib/core/schema-stored/formatV1.d.ts +2 -2
  284. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  285. package/lib/core/schema-stored/formatV1.js +0 -5
  286. package/lib/core/schema-stored/formatV1.js.map +1 -1
  287. package/lib/core/schema-stored/formatV2.d.ts +11 -10
  288. package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
  289. package/lib/core/schema-stored/formatV2.js +1 -6
  290. package/lib/core/schema-stored/formatV2.js.map +1 -1
  291. package/lib/core/schema-stored/index.d.ts.map +1 -1
  292. package/lib/core/schema-stored/index.js +2 -0
  293. package/lib/core/schema-stored/index.js.map +1 -1
  294. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  295. package/lib/core/schema-stored/schema.js.map +1 -1
  296. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  297. package/lib/core/tree/anchorSet.js.map +1 -1
  298. package/lib/core/tree/delta.d.ts +9 -7
  299. package/lib/core/tree/delta.d.ts.map +1 -1
  300. package/lib/core/tree/delta.js.map +1 -1
  301. package/lib/core/tree/deltaUtil.js +1 -1
  302. package/lib/core/tree/deltaUtil.js.map +1 -1
  303. package/lib/core/tree/visitDelta.js +2 -2
  304. package/lib/core/tree/visitDelta.js.map +1 -1
  305. package/lib/extensibleSchemaUnion.d.ts +72 -0
  306. package/lib/extensibleSchemaUnion.d.ts.map +1 -0
  307. package/lib/extensibleSchemaUnion.js +76 -0
  308. package/lib/extensibleSchemaUnion.js.map +1 -0
  309. package/lib/feature-libraries/changeAtomIdBTree.d.ts +4 -2
  310. package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  311. package/lib/feature-libraries/changeAtomIdBTree.js +7 -0
  312. package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
  313. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -3
  314. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  315. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +4 -5
  316. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  317. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  318. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  319. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  320. package/lib/feature-libraries/forest-summary/codec.d.ts +2 -1
  321. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  322. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  323. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  324. package/lib/feature-libraries/forest-summary/forestSummarizer.js +6 -3
  325. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  326. package/lib/feature-libraries/forest-summary/formatCommon.d.ts +1 -39
  327. package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  328. package/lib/feature-libraries/forest-summary/formatCommon.js +2 -3
  329. package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  330. package/lib/feature-libraries/forest-summary/formatV1.d.ts +1 -39
  331. package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
  332. package/lib/feature-libraries/forest-summary/formatV2.d.ts +1 -39
  333. package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
  334. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +1 -1
  335. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  336. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +1 -1
  337. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  338. package/lib/feature-libraries/index.d.ts +3 -3
  339. package/lib/feature-libraries/index.d.ts.map +1 -1
  340. package/lib/feature-libraries/index.js +3 -3
  341. package/lib/feature-libraries/index.js.map +1 -1
  342. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts +2 -2
  343. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts.map +1 -1
  344. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js +41 -21
  345. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
  346. package/lib/feature-libraries/modular-schema/genericFieldKind.js +1 -1
  347. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  348. package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
  349. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  350. package/lib/feature-libraries/modular-schema/index.js +1 -1
  351. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  352. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +1 -1
  353. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  354. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +10 -6
  355. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  356. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +11 -1
  357. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  358. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +29 -6
  359. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  360. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  361. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +41 -30
  362. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  363. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +10 -127
  364. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  365. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js +2 -4
  366. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  367. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +3 -79
  368. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  369. package/lib/feature-libraries/optional-field/optionalField.js +1 -1
  370. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  371. package/lib/feature-libraries/optional-field/requiredField.d.ts.map +1 -1
  372. package/lib/feature-libraries/optional-field/requiredField.js.map +1 -1
  373. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  374. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  375. package/lib/feature-libraries/schema-index/formatV2.d.ts +4 -4
  376. package/lib/feature-libraries/schema-index/schemaSummarizer.js +1 -1
  377. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  378. package/lib/feature-libraries/sequence-field/invert.js +2 -2
  379. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  380. package/lib/feature-libraries/sequence-field/replaceRevisions.js +16 -16
  381. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  382. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +1 -1
  383. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  384. package/lib/index.d.ts +5 -5
  385. package/lib/index.d.ts.map +1 -1
  386. package/lib/index.js +4 -3
  387. package/lib/index.js.map +1 -1
  388. package/lib/legacy.d.ts +3 -0
  389. package/lib/packageVersion.d.ts +1 -1
  390. package/lib/packageVersion.js +1 -1
  391. package/lib/packageVersion.js.map +1 -1
  392. package/lib/shared-tree/independentView.d.ts +36 -13
  393. package/lib/shared-tree/independentView.d.ts.map +1 -1
  394. package/lib/shared-tree/independentView.js +1 -0
  395. package/lib/shared-tree/independentView.js.map +1 -1
  396. package/lib/shared-tree/index.d.ts +1 -1
  397. package/lib/shared-tree/index.d.ts.map +1 -1
  398. package/lib/shared-tree/index.js.map +1 -1
  399. package/lib/shared-tree/schematizingTreeView.d.ts +10 -0
  400. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  401. package/lib/shared-tree/schematizingTreeView.js +25 -9
  402. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  403. package/lib/shared-tree/sharedTree.d.ts +3 -3
  404. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  405. package/lib/shared-tree/sharedTree.js +10 -34
  406. package/lib/shared-tree/sharedTree.js.map +1 -1
  407. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +11 -3
  408. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  409. package/lib/shared-tree/sharedTreeChangeCodecs.js +39 -5
  410. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  411. package/lib/shared-tree/sharedTreeChangeFormat.d.ts +4 -4
  412. package/lib/shared-tree/tree.js +1 -1
  413. package/lib/shared-tree/tree.js.map +1 -1
  414. package/lib/shared-tree/treeCheckout.d.ts +20 -0
  415. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  416. package/lib/shared-tree/treeCheckout.js +39 -3
  417. package/lib/shared-tree/treeCheckout.js.map +1 -1
  418. package/lib/shared-tree-core/editManagerSummarizer.js +1 -1
  419. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  420. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  421. package/lib/shared-tree-core/messageCodecV1ToV4.js +2 -2
  422. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  423. package/lib/shared-tree-core/transaction.d.ts +14 -3
  424. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  425. package/lib/shared-tree-core/transaction.js +61 -18
  426. package/lib/shared-tree-core/transaction.js.map +1 -1
  427. package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  428. package/lib/shared-tree-core/versionedSummarizer.js +1 -1
  429. package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
  430. package/lib/simple-tree/api/index.d.ts +1 -1
  431. package/lib/simple-tree/api/index.d.ts.map +1 -1
  432. package/lib/simple-tree/api/index.js +1 -1
  433. package/lib/simple-tree/api/index.js.map +1 -1
  434. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +9 -0
  435. package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  436. package/lib/simple-tree/api/schemaCreationUtilities.js +14 -0
  437. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  438. package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
  439. package/lib/simple-tree/api/transactionTypes.d.ts +10 -0
  440. package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
  441. package/lib/simple-tree/api/transactionTypes.js.map +1 -1
  442. package/lib/simple-tree/api/tree.d.ts +81 -6
  443. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  444. package/lib/simple-tree/api/tree.js.map +1 -1
  445. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  446. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  447. package/lib/simple-tree/index.d.ts +2 -2
  448. package/lib/simple-tree/index.d.ts.map +1 -1
  449. package/lib/simple-tree/index.js +2 -2
  450. package/lib/simple-tree/index.js.map +1 -1
  451. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  452. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  453. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +63 -0
  454. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  455. package/lib/simple-tree/node-kinds/array/arrayNode.js +41 -0
  456. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  457. package/lib/simple-tree/node-kinds/array/index.d.ts +1 -1
  458. package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -1
  459. package/lib/simple-tree/node-kinds/array/index.js +1 -1
  460. package/lib/simple-tree/node-kinds/array/index.js.map +1 -1
  461. package/lib/simple-tree/node-kinds/index.d.ts +1 -1
  462. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -1
  463. package/lib/simple-tree/node-kinds/index.js +1 -1
  464. package/lib/simple-tree/node-kinds/index.js.map +1 -1
  465. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  466. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  467. package/lib/tableSchema.d.ts +71 -48
  468. package/lib/tableSchema.d.ts.map +1 -1
  469. package/lib/tableSchema.js +201 -99
  470. package/lib/tableSchema.js.map +1 -1
  471. package/lib/text/textDomainFormatted.js +1 -1
  472. package/lib/text/textDomainFormatted.js.map +1 -1
  473. package/lib/util/bTreeUtils.d.ts +30 -4
  474. package/lib/util/bTreeUtils.d.ts.map +1 -1
  475. package/lib/util/bTreeUtils.js +27 -16
  476. package/lib/util/bTreeUtils.js.map +1 -1
  477. package/lib/util/brand.d.ts.map +1 -1
  478. package/lib/util/brand.js.map +1 -1
  479. package/lib/util/brandedMap.d.ts.map +1 -1
  480. package/lib/util/brandedMap.js.map +1 -1
  481. package/lib/util/breakable.d.ts.map +1 -1
  482. package/lib/util/breakable.js +2 -1
  483. package/lib/util/breakable.js.map +1 -1
  484. package/lib/util/index.d.ts +2 -2
  485. package/lib/util/index.d.ts.map +1 -1
  486. package/lib/util/index.js +2 -2
  487. package/lib/util/index.js.map +1 -1
  488. package/lib/util/opaque.d.ts.map +1 -1
  489. package/lib/util/opaque.js.map +1 -1
  490. package/lib/util/rangeMap.d.ts +3 -2
  491. package/lib/util/rangeMap.d.ts.map +1 -1
  492. package/lib/util/rangeMap.js +7 -1
  493. package/lib/util/rangeMap.js.map +1 -1
  494. package/lib/util/readSnapshotBlob.d.ts +1 -1
  495. package/lib/util/readSnapshotBlob.d.ts.map +1 -1
  496. package/lib/util/readSnapshotBlob.js.map +1 -1
  497. package/lib/util/typeCheck.d.ts.map +1 -1
  498. package/lib/util/typeCheck.js.map +1 -1
  499. package/lib/util/utils.d.ts +20 -16
  500. package/lib/util/utils.d.ts.map +1 -1
  501. package/lib/util/utils.js +44 -15
  502. package/lib/util/utils.js.map +1 -1
  503. package/package.json +22 -22
  504. package/src/codec/codec.ts +30 -11
  505. package/src/codec/index.ts +2 -0
  506. package/src/codec/versioned/codec.ts +9 -13
  507. package/src/core/index.ts +3 -1
  508. package/src/core/rebase/changeRebaser.ts +3 -2
  509. package/src/core/rebase/index.ts +3 -1
  510. package/src/core/rebase/types.ts +51 -13
  511. package/src/core/schema-stored/formatV1.ts +2 -4
  512. package/src/core/schema-stored/formatV2.ts +9 -7
  513. package/src/core/schema-stored/index.ts +2 -0
  514. package/src/core/schema-stored/schema.ts +4 -1
  515. package/src/core/tree/anchorSet.ts +1 -3
  516. package/src/core/tree/delta.ts +9 -7
  517. package/src/core/tree/deltaUtil.ts +1 -1
  518. package/src/core/tree/visitDelta.ts +2 -2
  519. package/src/extensibleSchemaUnion.ts +135 -0
  520. package/src/feature-libraries/changeAtomIdBTree.ts +17 -2
  521. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +5 -6
  522. package/src/feature-libraries/default-schema/index.ts +0 -1
  523. package/src/feature-libraries/forest-summary/codec.ts +7 -2
  524. package/src/feature-libraries/forest-summary/forestSummarizer.ts +15 -3
  525. package/src/feature-libraries/forest-summary/formatCommon.ts +2 -3
  526. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +4 -5
  527. package/src/feature-libraries/index.ts +3 -2
  528. package/src/feature-libraries/modular-schema/defaultRevisionReplacer.ts +57 -31
  529. package/src/feature-libraries/modular-schema/genericFieldKind.ts +1 -1
  530. package/src/feature-libraries/modular-schema/index.ts +4 -1
  531. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +7 -6
  532. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +32 -7
  533. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +54 -33
  534. package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +2 -4
  535. package/src/feature-libraries/optional-field/optionalField.ts +1 -1
  536. package/src/feature-libraries/optional-field/requiredField.ts +2 -4
  537. package/src/feature-libraries/schema-index/codec.ts +1 -1
  538. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -1
  539. package/src/feature-libraries/sequence-field/invert.ts +2 -2
  540. package/src/feature-libraries/sequence-field/replaceRevisions.ts +17 -10
  541. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +1 -1
  542. package/src/index.ts +12 -7
  543. package/src/packageVersion.ts +1 -1
  544. package/src/shared-tree/independentView.ts +42 -6
  545. package/src/shared-tree/index.ts +2 -0
  546. package/src/shared-tree/schematizingTreeView.ts +63 -18
  547. package/src/shared-tree/sharedTree.ts +19 -37
  548. package/src/shared-tree/sharedTreeChangeCodecs.ts +43 -9
  549. package/src/shared-tree/tree.ts +1 -1
  550. package/src/shared-tree/treeCheckout.ts +50 -3
  551. package/src/shared-tree-core/editManagerSummarizer.ts +1 -1
  552. package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -3
  553. package/src/shared-tree-core/transaction.ts +125 -23
  554. package/src/shared-tree-core/versionedSummarizer.ts +3 -2
  555. package/src/simple-tree/api/index.ts +1 -0
  556. package/src/simple-tree/api/schemaCreationUtilities.ts +35 -5
  557. package/src/simple-tree/api/simpleTreeIndex.ts +1 -1
  558. package/src/simple-tree/api/transactionTypes.ts +10 -0
  559. package/src/simple-tree/api/tree.ts +88 -6
  560. package/src/simple-tree/core/treeNodeSchema.ts +5 -8
  561. package/src/simple-tree/index.ts +3 -0
  562. package/src/simple-tree/leafNodeSchema.ts +3 -2
  563. package/src/simple-tree/node-kinds/array/arrayNode.ts +86 -0
  564. package/src/simple-tree/node-kinds/array/index.ts +2 -0
  565. package/src/simple-tree/node-kinds/index.ts +2 -0
  566. package/src/simple-tree/node-kinds/object/objectNode.ts +19 -18
  567. package/src/tableSchema.ts +280 -140
  568. package/src/text/textDomainFormatted.ts +1 -1
  569. package/src/util/bTreeUtils.ts +45 -26
  570. package/src/util/brand.ts +4 -12
  571. package/src/util/brandedMap.ts +2 -6
  572. package/src/util/breakable.ts +3 -2
  573. package/src/util/index.ts +9 -3
  574. package/src/util/opaque.ts +2 -6
  575. package/src/util/rangeMap.ts +11 -5
  576. package/src/util/readSnapshotBlob.ts +3 -3
  577. package/src/util/typeCheck.ts +11 -9
  578. package/src/util/utils.ts +57 -28
  579. package/biome.jsonc +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,+CAAyC;AAEzC,kDAQ6B;AAG7B;;GAEG;AACU,QAAA,eAAe,GAAG,IAAA,4BAAiB,GAAa,CAAC;AAWjD,QAAA,iBAAiB,GAAG,cAAI,CAAC,KAAK,CAAC;IAC3C,cAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACpB,IAAA,4BAAiB,GAAuC;CACxD,CAAC,CAAC;AAGU,QAAA,cAAc,GAAG,cAAI,CAAC,MAAM,EAAE,CAAC;AA+B5C;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAe,EAAE,CAAe;IACrE,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC;AAC7D,CAAC;AAFD,sDAEC;AAED,SAAgB,wBAAwB,CACvC,CAA2B,EAC3B,CAA2B;IAE3B,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE,C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contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tOpSpaceCompressedId,\n\tSessionId,\n\tSessionSpaceCompressedId,\n\tStableId,\n} from \"@fluidframework/id-compressor\";\nimport { Type } from \"@sinclair/typebox\";\n\nimport {\n\ttype Brand,\n\ttype JsonCompatibleReadOnly,\n\ttype NestedMap,\n\tRangeMap,\n\tbrand,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\nimport type { RevertibleAlpha } from \"../revertible.js\";\n\n/**\n * The identifier for a particular session/user/client that can generate `GraphCommit`s\n */\nexport const SessionIdSchema = brandedStringType<SessionId>();\n\n/**\n * A unique identifier for a commit. Commits that have been rebased, but are semantically\n * the same, will share the same revision tag.\n *\n * The constant 'root' is reserved for the trunk base: minting a SessionSpaceCompressedId is not\n * possible on readonly clients. These clients generally don't need ids, but must be done at tree initialization time.\n */\nexport type RevisionTag = SessionSpaceCompressedId | \"root\";\nexport type EncodedRevisionTag = Brand<OpSpaceCompressedId, \"EncodedRevisionTag\"> | \"root\";\nexport const RevisionTagSchema = Type.Union([\n\tType.Literal(\"root\"),\n\tbrandedNumberType<Exclude<EncodedRevisionTag, string>>(),\n]);\n\nexport type EncodedStableId = Brand<StableId, \"EncodedStableId\">;\nexport const StableIdSchema = Type.String();\n\n/**\n * An ID which is unique within a revision of a `ModularChangeset`.\n * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s,\n * but they are unique when qualified by the revision of the change they are used in.\n */\nexport type ChangesetLocalId = Brand<number, \"ChangesetLocalId\">;\n\n/**\n * A globally unique ID for an atom of change, or a node associated with the atom of change.\n * *\n * @privateRemarks\n * TODO: Rename this to be more general.\n */\nexport interface ChangeAtomId {\n\t/**\n\t * Uniquely identifies the changeset within which the change was made.\n\t * Only undefined when referring to an anonymous changesets.\n\t */\n\treadonly revision?: RevisionTag;\n\t/**\n\t * Uniquely identifies, in the scope of the changeset, the change made to the field.\n\t */\n\treadonly localId: ChangesetLocalId;\n}\n\nexport type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | ChangesetLocalId;\n\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n * Returns true iff `a` and `b` are the same.\n */\nexport function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean {\n\treturn a.localId === b.localId && a.revision === b.revision;\n}\n\nexport function areEqualChangeAtomIdOpts(\n\ta: ChangeAtomId | undefined,\n\tb: ChangeAtomId | undefined,\n): boolean {\n\tif (a === undefined || b === undefined) {\n\t\treturn a === b;\n\t}\n\n\treturn areEqualChangeAtomIds(a, b);\n}\n\n/**\n * Returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(\n\tlocalId: ChangesetLocalId,\n\trevision?: RevisionTag,\n): ChangeAtomId {\n\treturn revision === undefined ? { localId } : { localId, revision };\n}\n\nexport function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId {\n\treturn typeof id === \"object\" ? id : { localId: id };\n}\n\nexport function taggedAtomId(\n\tid: ChangeAtomId,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn makeChangeAtomId(id.localId, id.revision ?? revision);\n}\n\nexport function taggedOptAtomId(\n\tid: ChangeAtomId | undefined,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId | undefined {\n\tif (id === undefined) {\n\t\treturn undefined;\n\t}\n\treturn taggedAtomId(id, revision);\n}\n\nexport function offsetChangeAtomId(id: ChangeAtomId, offset: number): ChangeAtomId {\n\treturn { ...id, localId: brand(id.localId + offset) };\n}\n\n/**\n * A node in a graph of commits. A commit's parent is the commit on which it was based.\n */\nexport interface GraphCommit<TChange> {\n\t/**\n\t * The tag for this commit.\n\t * @remarks\n\t * If this commit is rebased, the corresponding rebased commit will retain this tag.\n\t * With the exception of transaction commits (which all share the same tag), this tag is unique within a given branch history.\n\t */\n\treadonly revision: RevisionTag;\n\t/** The change that will result from applying this commit */\n\treadonly change: TChange;\n\t/** The parent of this commit, on whose change this commit's change is based */\n\treadonly parent?: GraphCommit<TChange>;\n}\n\n/**\n * The type of a commit. This is used to describe the context in which the commit was created.\n *\n * @public\n */\nexport enum CommitKind {\n\t/** A commit corresponding to a change that is not the result of an undo/redo from this client. */\n\tDefault,\n\t/** A commit that is the result of an undo from this client. */\n\tUndo,\n\t/** A commit that is the result of a redo from this client. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @sealed @public\n */\nexport interface CommitMetadata {\n\t/**\n\t * A {@link CommitKind} enum value describing whether the commit represents an Edit, an Undo, or a Redo.\n\t */\n\treadonly kind: CommitKind;\n\t/**\n\t * Indicates whether the commit is a local edit\n\t */\n\treadonly isLocal: boolean;\n}\n\n/**\n * Information about a change that has been applied by the local client.\n * @sealed @alpha\n */\nexport interface LocalChangeMetadata extends CommitMetadata {\n\t/**\n\t * Whether the change was made on the local machine/client or received from a remote client.\n\t */\n\treadonly isLocal: true;\n\t/**\n\t * Returns a serializable object that encodes the change.\n\t * @remarks This is only available for local changes.\n\t * This change object can be {@link TreeBranchAlpha.applyChange | applied to another branch} in the same state as the one which generated it.\n\t * The change object must be applied to a SharedTree with the same IdCompressor session ID as it was created from.\n\t * @privateRemarks\n\t * This is a `SerializedChange` from treeCheckout.ts.\n\t */\n\tgetChange(): JsonCompatibleReadOnly;\n\t/**\n\t * Returns an object (a {@link RevertibleAlpha | \"revertible\"}) that can be used to revert the change that produced this event.\n\t * @remarks This is only available for local changes.\n\t * If the change is not revertible (for example, it was a change to the application schema), then this will return `undefined`.\n\t * Revertibles should be disposed when they are no longer needed.\n\t * @param onDisposed - A callback that will be invoked when the `Revertible` is disposed.\n\t * This happens when the `Revertible` is disposed manually or when the `TreeView` that the `Revertible` belongs to is disposed - whichever happens first.\n\t * This is typically used to clean up any resources associated with the `Revertible` in the host application.\n\t * @throws Throws an error if called outside the scope of the `changed` event that provided it.\n\t */\n\tgetRevertible(\n\t\tonDisposed?: (revertible: RevertibleAlpha) => void,\n\t): RevertibleAlpha | undefined;\n}\n\n/**\n * Information about a change that has been applied by a remote client.\n * @sealed @alpha\n */\nexport interface RemoteChangeMetadata extends CommitMetadata {\n\t/**\n\t * Whether the change was made on the local machine/client or received from a remote client.\n\t */\n\treadonly isLocal: false;\n\t/**\n\t * Returns a serializable object that encodes the change.\n\t * @remarks This is only available for {@link LocalChangeMetadata | local changes}.\n\t */\n\treadonly getChange?: undefined;\n\t/**\n\t * Returns an object (a {@link RevertibleAlpha | \"revertible\"}) that can be used to revert the change that produced this event.\n\t * @remarks This is only available for {@link LocalChangeMetadata | local changes}.\n\t */\n\treadonly getRevertible?: undefined;\n}\n\n/**\n * Information about a {@link LocalChangeMetadata | local} or {@link RemoteChangeMetadata | remote} change that has been applied.\n * @sealed @alpha\n */\nexport type ChangeMetadata = LocalChangeMetadata | RemoteChangeMetadata;\n\n/**\n * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.\n * @param parent - the parent of the new commit\n * @param commit - the contents of the new commit object\n * @returns the new commit object\n */\n// Note that this function is synchronous, and therefore it is not a Promise.\n// However, it is still a strong commit-mint.\nexport function mintCommit<TChange>(\n\tparent: GraphCommit<TChange>,\n\tcommit: Omit<GraphCommit<TChange>, \"parent\">,\n): GraphCommit<TChange> {\n\tconst { revision, change } = commit;\n\treturn {\n\t\trevision,\n\t\tchange,\n\t\tparent,\n\t};\n}\n\nexport type ChangeAtomIdRangeMap<V> = RangeMap<ChangeAtomId, V>;\n\nexport function newChangeAtomIdRangeMap<V>(): ChangeAtomIdRangeMap<V> {\n\treturn new RangeMap(offsetChangeAtomId, subtractChangeAtomIds);\n}\n\nexport function subtractChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): number {\n\tconst cmp = compareRevisions(a.revision, b.revision);\n\tif (cmp !== 0) {\n\t\treturn cmp * Number.POSITIVE_INFINITY;\n\t}\n\n\treturn a.localId - b.localId;\n}\n\nexport function compareRevisions(\n\ta: RevisionTag | undefined,\n\tb: RevisionTag | undefined,\n): number {\n\tif (a === undefined) {\n\t\treturn b === undefined ? 0 : -1;\n\t} else if (b === undefined) {\n\t\treturn 1;\n\t} else if (a < b) {\n\t\treturn -1;\n\t} else if (a > b) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,+CAAyC;AAEzC,kDAS6B;AAG7B;;GAEG;AACU,QAAA,eAAe,GAAG,IAAA,4BAAiB,GAAa,CAAC;AAWjD,QAAA,iBAAiB,GAAG,cAAI,CAAC,KAAK,CAAC;IAC3C,cAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACpB,IAAA,4BAAiB,GAAuC;CACxD,CAAC,CAAC;AAGU,QAAA,cAAc,GAAG,cAAI,CAAC,MAAM,EAAE,CAAC;AAkC5C;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAe,EAAE,CAAe;IACrE,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC;AAC7D,CAAC;AAFD,sDAEC;AAED,SAAgB,wBAAwB,CACvC,CAA2B,EAC3B,CAA2B;IAE3B,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChB,CAAC;IAED,OAAO,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,CAAC;AATD,4DASC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAC/B,OAAyB,EACzB,QAAsB;IAEtB,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AACrE,CAAC;AALD,4CAKC;AAED,SAAgB,cAAc,CAAC,EA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AE,CAAC,CAAC,CAAC;AACpC,CAAC;AAXD,0DAWC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tOpSpaceCompressedId,\n\tSessionId,\n\tSessionSpaceCompressedId,\n\tStableId,\n} from \"@fluidframework/id-compressor\";\nimport { Type } from \"@sinclair/typebox\";\n\nimport {\n\ttype Brand,\n\ttype JsonCompatibleReadOnly,\n\ttype NestedMap,\n\tRangeMap,\n\tbrand,\n\tbrandedNumberType,\n\tbrandedStringType,\n\tcomparePartialStrings,\n} from \"../../util/index.js\";\nimport type { RevertibleAlpha } from \"../revertible.js\";\n\n/**\n * The identifier for a particular session/user/client that can generate `GraphCommit`s\n */\nexport const SessionIdSchema = brandedStringType<SessionId>();\n\n/**\n * A unique identifier for a commit. Commits that have been rebased, but are semantically\n * the same, will share the same revision tag.\n *\n * The constant 'root' is reserved for the trunk base: minting a SessionSpaceCompressedId is not\n * possible on readonly clients. These clients generally don't need ids, but must be done at tree initialization time.\n */\nexport type RevisionTag = SessionSpaceCompressedId | \"root\";\nexport type EncodedRevisionTag = Brand<OpSpaceCompressedId, \"EncodedRevisionTag\"> | \"root\";\nexport const RevisionTagSchema = Type.Union([\n\tType.Literal(\"root\"),\n\tbrandedNumberType<Exclude<EncodedRevisionTag, string>>(),\n]);\n\nexport type EncodedStableId = Brand<StableId, \"EncodedStableId\">;\nexport const StableIdSchema = Type.String();\n\n/**\n * An ID which is unique within a revision of a `ModularChangeset`.\n * @remarks\n * Always a real number (never `NaN` or +/- `Infinity`).\n *\n * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s,\n * but they are unique when qualified by the revision of the change they are used in.\n */\nexport type ChangesetLocalId = Brand<number, \"ChangesetLocalId\">;\n\n/**\n * A globally unique ID for an atom of change, or a node associated with the atom of change.\n * *\n * @privateRemarks\n * TODO: Rename this to be more general.\n */\nexport interface ChangeAtomId {\n\t/**\n\t * Uniquely identifies the changeset within which the change was made.\n\t * Only undefined when referring to an anonymous changesets.\n\t */\n\treadonly revision?: RevisionTag;\n\t/**\n\t * Uniquely identifies, in the scope of the changeset, the change made to the field.\n\t */\n\treadonly localId: ChangesetLocalId;\n}\n\nexport type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | ChangesetLocalId;\n\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n * Returns true iff `a` and `b` are the same.\n */\nexport function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean {\n\treturn a.localId === b.localId && a.revision === b.revision;\n}\n\nexport function areEqualChangeAtomIdOpts(\n\ta: ChangeAtomId | undefined,\n\tb: ChangeAtomId | undefined,\n): boolean {\n\tif (a === undefined || b === undefined) {\n\t\treturn a === b;\n\t}\n\n\treturn areEqualChangeAtomIds(a, b);\n}\n\n/**\n * Returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(\n\tlocalId: ChangesetLocalId,\n\trevision?: RevisionTag,\n): ChangeAtomId {\n\treturn revision === undefined ? { localId } : { localId, revision };\n}\n\nexport function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId {\n\treturn typeof id === \"object\" ? id : { localId: id };\n}\n\nexport function taggedAtomId(\n\tid: ChangeAtomId,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn makeChangeAtomId(id.localId, id.revision ?? revision);\n}\n\nexport function taggedOptAtomId(\n\tid: ChangeAtomId | undefined,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId | undefined {\n\tif (id === undefined) {\n\t\treturn undefined;\n\t}\n\treturn taggedAtomId(id, revision);\n}\n\nexport function offsetChangeAtomId<T extends ChangeAtomId>(id: T, offset: number): T {\n\treturn { ...id, localId: brand(id.localId + offset) };\n}\n\n// #region These comparison functions are used instead of e.g. `compareNumbers` as a performance optimization\n\nexport function compareChangesetLocalIds(a: ChangesetLocalId, b: ChangesetLocalId): number {\n\treturn a - b; // No need to consider `NaN` or `Infinity` since ChangesetLocalId is always a real number\n}\n\nexport function comparePartialChangesetLocalIds(\n\ta: ChangesetLocalId | undefined,\n\tb: ChangesetLocalId | undefined,\n): number {\n\tif (a === undefined) {\n\t\treturn b === undefined ? 0 : -1;\n\t} else if (b === undefined) {\n\t\treturn 1;\n\t}\n\treturn compareChangesetLocalIds(a, b);\n}\n\n// #endregion\n\n/**\n * A node in a graph of commits. A commit's parent is the commit on which it was based.\n */\nexport interface GraphCommit<TChange> {\n\t/**\n\t * The tag for this commit.\n\t * @remarks\n\t * If this commit is rebased, the corresponding rebased commit will retain this tag.\n\t * With the exception of transaction commits (which all share the same tag), this tag is unique within a given branch history.\n\t */\n\treadonly revision: RevisionTag;\n\t/** The change that will result from applying this commit */\n\treadonly change: TChange;\n\t/** The parent of this commit, on whose change this commit's change is based */\n\treadonly parent?: GraphCommit<TChange>;\n}\n\n/**\n * The type of a commit. This is used to describe the context in which the commit was created.\n *\n * @public\n */\nexport enum CommitKind {\n\t/** A commit corresponding to a change that is not the result of an undo/redo from this client. */\n\tDefault,\n\t/** A commit that is the result of an undo from this client. */\n\tUndo,\n\t/** A commit that is the result of a redo from this client. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @sealed @public\n */\nexport interface CommitMetadata {\n\t/**\n\t * A {@link CommitKind} enum value describing whether the commit represents an Edit, an Undo, or a Redo.\n\t */\n\treadonly kind: CommitKind;\n\t/**\n\t * Indicates whether the commit is a local edit\n\t */\n\treadonly isLocal: boolean;\n}\n\n/**\n * Information about a change that has been applied by the local client.\n * @sealed @alpha\n */\nexport interface LocalChangeMetadata extends CommitMetadata {\n\t/**\n\t * Whether the change was made on the local machine/client or received from a remote client.\n\t */\n\treadonly isLocal: true;\n\t/**\n\t * Returns a serializable object that encodes the change.\n\t * @remarks This is only available for local changes.\n\t * This change object can be {@link TreeBranchAlpha.applyChange | applied to another branch} in the same state as the one which generated it.\n\t * The change object must be applied to a SharedTree with the same IdCompressor session ID as it was created from.\n\t * @privateRemarks\n\t * This is a `SerializedChange` from treeCheckout.ts.\n\t */\n\tgetChange(): JsonCompatibleReadOnly;\n\t/**\n\t * Returns an object (a {@link RevertibleAlpha | \"revertible\"}) that can be used to revert the change that produced this event.\n\t * @remarks This is only available for local changes.\n\t * If the change is not revertible (for example, it was a change to the application schema), then this will return `undefined`.\n\t * Revertibles should be disposed when they are no longer needed.\n\t * @param onDisposed - A callback that will be invoked when the `Revertible` is disposed.\n\t * This happens when the `Revertible` is disposed manually or when the `TreeView` that the `Revertible` belongs to is disposed - whichever happens first.\n\t * This is typically used to clean up any resources associated with the `Revertible` in the host application.\n\t * @throws Throws an error if called outside the scope of the `changed` event that provided it.\n\t */\n\tgetRevertible(\n\t\tonDisposed?: (revertible: RevertibleAlpha) => void,\n\t): RevertibleAlpha | undefined;\n\n\t/**\n\t * Optional label provided by the user when commit was created.\n\t * This can be used by undo/redo to group or classify edits.\n\t */\n\treadonly label?: unknown;\n}\n\n/**\n * Information about a change that has been applied by a remote client.\n * @sealed @alpha\n */\nexport interface RemoteChangeMetadata extends CommitMetadata {\n\t/**\n\t * Whether the change was made on the local machine/client or received from a remote client.\n\t */\n\treadonly isLocal: false;\n\t/**\n\t * Returns a serializable object that encodes the change.\n\t * @remarks This is only available for {@link LocalChangeMetadata | local changes}.\n\t */\n\treadonly getChange?: undefined;\n\t/**\n\t * Returns an object (a {@link RevertibleAlpha | \"revertible\"}) that can be used to revert the change that produced this event.\n\t * @remarks This is only available for {@link LocalChangeMetadata | local changes}.\n\t */\n\treadonly getRevertible?: undefined;\n\t/**\n\t * Label provided by the user when commit was created.\n\t * @remarks This is only available for {@link LocalChangeMetadata | local changes}.\n\t */\n\treadonly label?: undefined;\n}\n\n/**\n * Information about a {@link LocalChangeMetadata | local} or {@link RemoteChangeMetadata | remote} change that has been applied.\n * @sealed @alpha\n */\nexport type ChangeMetadata = LocalChangeMetadata | RemoteChangeMetadata;\n\n/**\n * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.\n * @param parent - the parent of the new commit\n * @param commit - the contents of the new commit object\n * @returns the new commit object\n */\n// Note that this function is synchronous, and therefore it is not a Promise.\n// However, it is still a strong commit-mint.\nexport function mintCommit<TChange>(\n\tparent: GraphCommit<TChange>,\n\tcommit: Omit<GraphCommit<TChange>, \"parent\">,\n): GraphCommit<TChange> {\n\tconst { revision, change } = commit;\n\treturn {\n\t\trevision,\n\t\tchange,\n\t\tparent,\n\t};\n}\n\nexport type ChangeAtomIdRangeMap<V> = RangeMap<ChangeAtomId, V>;\n\nexport function newChangeAtomIdRangeMap<V>(\n\toffsetValue?: (value: V, offset: number) => V,\n): ChangeAtomIdRangeMap<V> {\n\treturn new RangeMap(offsetChangeAtomId, subtractChangeAtomIds, offsetValue);\n}\n\nexport function subtractChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): number {\n\tconst cmp = comparePartialRevisions(a.revision, b.revision);\n\tif (cmp !== 0) {\n\t\treturn cmp * Number.POSITIVE_INFINITY;\n\t}\n\n\treturn a.localId - b.localId;\n}\n\n/**\n * Compares two {@link RevisionTag}s to form a strict total ordering.\n * @remarks This function tolerates arbitrary strings, not just the string \"root\".\n * It sorts as follows: `undefined` \\< `string` \\< `number`\n */\nexport function comparePartialRevisions(\n\ta: RevisionTag | undefined,\n\tb: RevisionTag | undefined,\n): number {\n\tif (typeof a === \"number\") {\n\t\treturn typeof b === \"number\" ? a - b : 1;\n\t} else if (typeof b === \"number\") {\n\t\treturn -1;\n\t}\n\n\treturn comparePartialStrings(a, b);\n}\n"]}
@@ -33,6 +33,7 @@ export declare const FieldKindIdentifierSchema: import("@sinclair/typebox").TUns
33
33
  * TypeBox Schema for encoding {@link TreeNodeSchemaIdentifiers} in persisted data.
34
34
  */
35
35
  export declare const TreeNodeSchemaIdentifierSchema: import("@sinclair/typebox").TUnsafe<TreeNodeSchemaIdentifier<string>>;
36
+ export type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;
36
37
  export declare const FieldSchemaFormat: import("@sinclair/typebox").TObject<{
37
38
  kind: import("@sinclair/typebox").TUnsafe<FieldKindIdentifier>;
38
39
  types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<TreeNodeSchemaIdentifier<string>>>;
@@ -52,6 +53,7 @@ export declare enum PersistedValueSchema {
52
53
  *
53
54
  * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
54
55
  */
56
+ export type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;
55
57
  export declare const TreeNodeSchemaDataFormat: import("@sinclair/typebox").TObject<{
56
58
  /**
57
59
  * Object node union member.
@@ -72,6 +74,4 @@ export declare const TreeNodeSchemaDataFormat: import("@sinclair/typebox").TObje
72
74
  */
73
75
  leaf: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof PersistedValueSchema>>;
74
76
  }>;
75
- export type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;
76
- export type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;
77
77
  //# sourceMappingURL=formatV1.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatV1.d.ts","sourceRoot":"","sources":["../../../src/core/schema-stored/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAG1E,OAAO,EAAE,KAAK,KAAK,EAAqB,MAAM,qBAAqB,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,cAAc,+CAAgC,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI,KAAK,CAC1E,KAAK,EACL,+BAA+B,CAC/B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG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CAAC;AAS5F,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,eAAO,MAAM,iBAAiB;;;EAA6D,CAAC;AAE5F;;GAEG;AACH,oBAAY,oBAAoB;IAC/B,MAAM,IAAA;IACN,MAAM,IAAA;IACN,OAAO,IAAA;IACP,WAAW,IAAA;IACX,IAAI,IAAA;CACJ;AAED;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC/E,eAAO,MAAM,wBAAwB;IAEnC;;OAEG;;;;;IAEH;;OAEG;;;;;IAEH;;OAEG;;EAIJ,CAAC"}
@@ -34,11 +34,6 @@ var PersistedValueSchema;
34
34
  PersistedValueSchema[PersistedValueSchema["FluidHandle"] = 3] = "FluidHandle";
35
35
  PersistedValueSchema[PersistedValueSchema["Null"] = 4] = "Null";
36
36
  })(PersistedValueSchema || (exports.PersistedValueSchema = PersistedValueSchema = {}));
37
- /**
38
- * Discriminated union content of tree node schema.
39
- *
40
- * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
41
- */
42
37
  exports.TreeNodeSchemaDataFormat = typebox_1.Type.Object({
43
38
  /**
44
39
  * Object node union member.
@@ -1 +1 @@
1
- {"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/core/schema-stored/formatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,mDAAoD;AACpD,kDAAoE;AASpE;;GAEG;AACU,QAAA,cAAc,GAAG,IAAA,4BAAiB,GAAY,CAAC;AAoB/C,QAAA,yBAAyB,GAAG,IAAA,4BAAiB,GAAuB,CAAC;AAElF;;GAEG;AACU,QAAA,8BAA8B,GAAG,IAAA,4BAAiB,GAA4B,CAAC;AAE5F,MAAM,qBAAqB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,iCAAyB;IAC/B,KAAK,EAAE,cAAI,CAAC,KAAK,CAAC,sCAA8B,CAAC;CACjD,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAE5D,QAAA,iBAAiB,GAAG,cAAI,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAE5F;;GAEG;AACH,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC/B,mEAAM,CAAA;IACN,mEAAM,CAAA;IACN,qEAAO,CAAA;IACP,6EAAW,CAAA;IACX,+DAAI,CAAA;AACL,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AAED;;;;GAIG;AACU,QAAA,wBAAwB,GAAG,cAAI,CAAC,MAAM,CAClD;IACC;;OAEG;IACH,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,yBAAiB,CAAC,CAAC;IACpE;;OAEG;IACH,GAAG,EAAE,cAAI,CAAC,QAAQ,CAAC,yBAAiB,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;CACpD,EACD,uBAAY,CACZ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport { type Brand, brandedStringType } from \"../../util/index.js\";\n\n/**\n * Key (aka Name or Label) for a field which is scoped to a specific TreeNodeStoredSchema.\n *\n * Stable identifier, used when persisting data.\n */\nexport type FieldKey = Brand<string, \"tree.FieldKey\">;\n\n/**\n * TypeBox Schema for encoding {@link FieldKey} in persisted data.\n */\nexport const FieldKeySchema = brandedStringType<FieldKey>();\n\n/**\n * Identifier for a TreeNode schema.\n * Also known as \"Definition\"\n *\n * Stable identifier, used when persisting data.\n */\nexport type TreeNodeSchemaIdentifier<TName extends string = string> = Brand<\n\tTName,\n\t\"tree.TreeNodeSchemaIdentifier\"\n>;\n\n/**\n * Identifier for a FieldKind.\n * Refers to an exact stable policy (ex: specific version of a policy),\n * for how to handle (ex: edit and merge edits to) fields marked with this kind.\n * Persisted in documents as part of stored schema.\n */\nexport type FieldKindIdentifier = Brand<string, \"tree.FieldKindIdentifier\">;\nexport const FieldKindIdentifierSchema = brandedStringType<FieldKindIdentifier>();\n\n/**\n * TypeBox Schema for encoding {@link TreeNodeSchemaIdentifiers} in persisted data.\n */\nexport const TreeNodeSchemaIdentifierSchema = brandedStringType<TreeNodeSchemaIdentifier>();\n\nconst FieldSchemaFormatBase = Type.Object({\n\tkind: FieldKindIdentifierSchema,\n\ttypes: Type.Array(TreeNodeSchemaIdentifierSchema),\n});\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport const FieldSchemaFormat = Type.Composite([FieldSchemaFormatBase], noAdditionalProps);\n\n/**\n * Persisted version of {@link ValueSchema}.\n */\nexport enum PersistedValueSchema {\n\tNumber,\n\tString,\n\tBoolean,\n\tFluidHandle,\n\tNull,\n}\n\n/**\n * Discriminated union content of tree node schema.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const TreeNodeSchemaDataFormat = Type.Object(\n\t{\n\t\t/**\n\t\t * Object node union member.\n\t\t */\n\t\tobject: Type.Optional(Type.Record(Type.String(), FieldSchemaFormat)),\n\t\t/**\n\t\t * Map node union member.\n\t\t */\n\t\tmap: Type.Optional(FieldSchemaFormat),\n\t\t/**\n\t\t * Leaf node union member.\n\t\t */\n\t\tleaf: Type.Optional(Type.Enum(PersistedValueSchema)),\n\t},\n\tunionOptions,\n);\n\nexport type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;\n\nexport type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;\n"]}
1
+ {"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/core/schema-stored/formatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,mDAAoD;AACpD,kDAAoE;AASpE;;GAEG;AACU,QAAA,cAAc,GAAG,IAAA,4BAAiB,GAAY,CAAC;AAoB/C,QAAA,yBAAyB,GAAG,IAAA,4BAAiB,GAAuB,CAAC;AAElF;;GAEG;AACU,QAAA,8BAA8B,GAAG,IAAA,4BAAiB,GAA4B,CAAC;AAE5F,MAAM,qBAAqB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,iCAAyB;IAC/B,KAAK,EAAE,cAAI,CAAC,KAAK,CAAC,sCAA8B,CAAC;CACjD,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAG5D,QAAA,iBAAiB,GAAG,cAAI,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAE5F;;GAEG;AACH,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC/B,mEAAM,CAAA;IACN,mEAAM,CAAA;IACN,qEAAO,CAAA;IACP,6EAAW,CAAA;IACX,+DAAI,CAAA;AACL,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AAQY,QAAA,wBAAwB,GAAG,cAAI,CAAC,MAAM,CAClD;IACC;;OAEG;IACH,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,yBAAiB,CAAC,CAAC;IACpE;;OAEG;IACH,GAAG,EAAE,cAAI,CAAC,QAAQ,CAAC,yBAAiB,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;CACpD,EACD,uBAAY,CACZ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport { type Brand, brandedStringType } from \"../../util/index.js\";\n\n/**\n * Key (aka Name or Label) for a field which is scoped to a specific TreeNodeStoredSchema.\n *\n * Stable identifier, used when persisting data.\n */\nexport type FieldKey = Brand<string, \"tree.FieldKey\">;\n\n/**\n * TypeBox Schema for encoding {@link FieldKey} in persisted data.\n */\nexport const FieldKeySchema = brandedStringType<FieldKey>();\n\n/**\n * Identifier for a TreeNode schema.\n * Also known as \"Definition\"\n *\n * Stable identifier, used when persisting data.\n */\nexport type TreeNodeSchemaIdentifier<TName extends string = string> = Brand<\n\tTName,\n\t\"tree.TreeNodeSchemaIdentifier\"\n>;\n\n/**\n * Identifier for a FieldKind.\n * Refers to an exact stable policy (ex: specific version of a policy),\n * for how to handle (ex: edit and merge edits to) fields marked with this kind.\n * Persisted in documents as part of stored schema.\n */\nexport type FieldKindIdentifier = Brand<string, \"tree.FieldKindIdentifier\">;\nexport const FieldKindIdentifierSchema = brandedStringType<FieldKindIdentifier>();\n\n/**\n * TypeBox Schema for encoding {@link TreeNodeSchemaIdentifiers} in persisted data.\n */\nexport const TreeNodeSchemaIdentifierSchema = brandedStringType<TreeNodeSchemaIdentifier>();\n\nconst FieldSchemaFormatBase = Type.Object({\n\tkind: FieldKindIdentifierSchema,\n\ttypes: Type.Array(TreeNodeSchemaIdentifierSchema),\n});\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;\nexport const FieldSchemaFormat = Type.Composite([FieldSchemaFormatBase], noAdditionalProps);\n\n/**\n * Persisted version of {@link ValueSchema}.\n */\nexport enum PersistedValueSchema {\n\tNumber,\n\tString,\n\tBoolean,\n\tFluidHandle,\n\tNull,\n}\n\n/**\n * Discriminated union content of tree node schema.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;\nexport const TreeNodeSchemaDataFormat = Type.Object(\n\t{\n\t\t/**\n\t\t * Object node union member.\n\t\t */\n\t\tobject: Type.Optional(Type.Record(Type.String(), FieldSchemaFormat)),\n\t\t/**\n\t\t * Map node union member.\n\t\t */\n\t\tmap: Type.Optional(FieldSchemaFormat),\n\t\t/**\n\t\t * Leaf node union member.\n\t\t */\n\t\tleaf: Type.Optional(Type.Enum(PersistedValueSchema)),\n\t},\n\tunionOptions,\n);\n"]}
@@ -3,12 +3,15 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { type Static } from "@sinclair/typebox";
6
+ import type { JsonCompatibleReadOnlyObject } from "../../util/index.js";
6
7
  import { PersistedValueSchema } from "./formatV1.js";
7
- export declare const PersistedMetadataFormat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
8
+ export type PersistedMetadataFormat = Static<typeof PersistedMetadataFormat>;
9
+ export declare const PersistedMetadataFormat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<JsonCompatibleReadOnlyObject>>;
10
+ export type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;
8
11
  export declare const FieldSchemaFormat: import("@sinclair/typebox").TObject<{
9
12
  kind: import("@sinclair/typebox").TUnsafe<import("./formatV1.js").FieldKindIdentifier>;
10
13
  types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("./formatV1.js").TreeNodeSchemaIdentifier<string>>>;
11
- metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
14
+ metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<JsonCompatibleReadOnlyObject>>;
12
15
  }>;
13
16
  /**
14
17
  * Format for the content of a {@link TreeNodeStoredSchema}.
@@ -22,7 +25,7 @@ export declare const TreeNodeSchemaUnionFormat: import("@sinclair/typebox").TObj
22
25
  object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
23
26
  kind: import("@sinclair/typebox").TUnsafe<import("./formatV1.js").FieldKindIdentifier>;
24
27
  types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("./formatV1.js").TreeNodeSchemaIdentifier<string>>>;
25
- metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
28
+ metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<JsonCompatibleReadOnlyObject>>;
26
29
  }>>>;
27
30
  /**
28
31
  * Map node union member.
@@ -30,7 +33,7 @@ export declare const TreeNodeSchemaUnionFormat: import("@sinclair/typebox").TObj
30
33
  map: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
31
34
  kind: import("@sinclair/typebox").TUnsafe<import("./formatV1.js").FieldKindIdentifier>;
32
35
  types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("./formatV1.js").TreeNodeSchemaIdentifier<string>>>;
33
- metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
36
+ metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<JsonCompatibleReadOnlyObject>>;
34
37
  }>>;
35
38
  /**
36
39
  * Leaf node union member.
@@ -43,6 +46,7 @@ export type TreeNodeSchemaUnionFormat = Static<typeof TreeNodeSchemaUnionFormat>
43
46
  *
44
47
  * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
45
48
  */
49
+ export type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;
46
50
  export declare const TreeNodeSchemaDataFormat: import("@sinclair/typebox").TObject<{
47
51
  /**
48
52
  * Node kind specific data.
@@ -54,7 +58,7 @@ export declare const TreeNodeSchemaDataFormat: import("@sinclair/typebox").TObje
54
58
  object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
55
59
  kind: import("@sinclair/typebox").TUnsafe<import("./formatV1.js").FieldKindIdentifier>;
56
60
  types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("./formatV1.js").TreeNodeSchemaIdentifier<string>>>;
57
- metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
61
+ metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<JsonCompatibleReadOnlyObject>>;
58
62
  }>>>;
59
63
  /**
60
64
  * Map node union member.
@@ -62,7 +66,7 @@ export declare const TreeNodeSchemaDataFormat: import("@sinclair/typebox").TObje
62
66
  map: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
63
67
  kind: import("@sinclair/typebox").TUnsafe<import("./formatV1.js").FieldKindIdentifier>;
64
68
  types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("./formatV1.js").TreeNodeSchemaIdentifier<string>>>;
65
- metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
69
+ metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<JsonCompatibleReadOnlyObject>>;
66
70
  }>>;
67
71
  /**
68
72
  * Leaf node union member.
@@ -72,9 +76,6 @@ export declare const TreeNodeSchemaDataFormat: import("@sinclair/typebox").TObje
72
76
  /**
73
77
  * Leaf node union member.
74
78
  */
75
- metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
79
+ metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<JsonCompatibleReadOnlyObject>>;
76
80
  }>;
77
- export type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;
78
- export type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;
79
- export type PersistedMetadataFormat = Static<typeof PersistedMetadataFormat>;
80
81
  //# sourceMappingURL=formatV2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../src/core/schema-stored/formatV2.ts"],"names":[],"mappings":"AAAA;;;GA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D,CAAC;AAE5F;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;IAEpC;;OAEG;;;;;;IAEH;;OAEG;;;;;;IAEH;;OAEG;;EAIJ,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC/E,eAAO,MAAM,wBAAwB;IAEnC;;OAEG;;QA5BH;;WAEG;;;;;;QAEH;;WAEG;;;;;;QAEH;;WAEG;;;IAsBH;;OAEG;;EAIJ,CAAC"}
@@ -9,7 +9,7 @@ const typebox_1 = require("@sinclair/typebox");
9
9
  const index_js_1 = require("../../codec/index.js");
10
10
  const index_js_2 = require("../../util/index.js");
11
11
  const formatV1_js_1 = require("./formatV1.js");
12
- exports.PersistedMetadataFormat = typebox_1.Type.Optional(index_js_2.JsonCompatibleReadOnlySchema);
12
+ exports.PersistedMetadataFormat = typebox_1.Type.Optional(typebox_1.Type.Unsafe(typebox_1.Type.Record(typebox_1.Type.String(), index_js_2.JsonCompatibleReadOnlySchema)));
13
13
  const FieldSchemaFormatBase = typebox_1.Type.Object({
14
14
  kind: formatV1_js_1.FieldKindIdentifierSchema,
15
15
  types: typebox_1.Type.Array(formatV1_js_1.TreeNodeSchemaIdentifierSchema),
@@ -36,11 +36,6 @@ exports.TreeNodeSchemaUnionFormat = typebox_1.Type.Object({
36
36
  */
37
37
  leaf: typebox_1.Type.Optional(typebox_1.Type.Enum(formatV1_js_1.PersistedValueSchema)),
38
38
  }, index_js_1.unionOptions);
39
- /**
40
- * Format for {@link TreeNodeStoredSchema}.
41
- *
42
- * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
43
- */
44
39
  exports.TreeNodeSchemaDataFormat = typebox_1.Type.Object({
45
40
  /**
46
41
  * Node kind specific data.
@@ -1 +1 @@
1
- {"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../src/core/schema-stored/formatV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,mDAAoD;AACpD,kDAAmE;AAEnE,+CAIuB;AAEV,QAAA,uBAAuB,GAAG,cAAI,CAAC,QAAQ,CAAC,uCAA4B,CAAC,CAAC;AAEnF,MAAM,qBAAqB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,uCAAyB;IAC/B,KAAK,EAAE,cAAI,CAAC,KAAK,CAAC,4CAA8B,CAAC;IACjD,QAAQ,EAAE,+BAAuB;CACjC,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAE5D,QAAA,iBAAiB,GAAG,cAAI,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAE5F;;;;GAIG;AACU,QAAA,yBAAyB,GAAG,cAAI,CAAC,MAAM,CACnD;IACC;;OAEG;IACH,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,yBAAiB,CAAC,CAAC;IACpE;;OAEG;IACH,GAAG,EAAE,cAAI,CAAC,QAAQ,CAAC,yBAAiB,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,kCAAoB,CAAC,CAAC;CACpD,EACD,uBAAY,CACZ,CAAC;AAIF;;;;GAIG;AACU,QAAA,wBAAwB,GAAG,cAAI,CAAC,MAAM,CAClD;IACC;;OAEG;IACH,IAAI,EAAE,iCAAyB;IAE/B,2CAA2C;IAC3C;;OAEG;IACH,QAAQ,EAAE,+BAAuB;CACjC,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport { JsonCompatibleReadOnlySchema } from \"../../util/index.js\";\n\nimport {\n\tFieldKindIdentifierSchema,\n\tPersistedValueSchema,\n\tTreeNodeSchemaIdentifierSchema,\n} from \"./formatV1.js\";\n\nexport const PersistedMetadataFormat = Type.Optional(JsonCompatibleReadOnlySchema);\n\nconst FieldSchemaFormatBase = Type.Object({\n\tkind: FieldKindIdentifierSchema,\n\ttypes: Type.Array(TreeNodeSchemaIdentifierSchema),\n\tmetadata: PersistedMetadataFormat,\n});\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport const FieldSchemaFormat = Type.Composite([FieldSchemaFormatBase], noAdditionalProps);\n\n/**\n * Format for the content of a {@link TreeNodeStoredSchema}.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const TreeNodeSchemaUnionFormat = Type.Object(\n\t{\n\t\t/**\n\t\t * Object node union member.\n\t\t */\n\t\tobject: Type.Optional(Type.Record(Type.String(), FieldSchemaFormat)),\n\t\t/**\n\t\t * Map node union member.\n\t\t */\n\t\tmap: Type.Optional(FieldSchemaFormat),\n\t\t/**\n\t\t * Leaf node union member.\n\t\t */\n\t\tleaf: Type.Optional(Type.Enum(PersistedValueSchema)),\n\t},\n\tunionOptions,\n);\n\nexport type TreeNodeSchemaUnionFormat = Static<typeof TreeNodeSchemaUnionFormat>;\n\n/**\n * Format for {@link TreeNodeStoredSchema}.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const TreeNodeSchemaDataFormat = Type.Object(\n\t{\n\t\t/**\n\t\t * Node kind specific data.\n\t\t */\n\t\tkind: TreeNodeSchemaUnionFormat,\n\n\t\t// Data in common for all TreeNode schemas:\n\t\t/**\n\t\t * Leaf node union member.\n\t\t */\n\t\tmetadata: PersistedMetadataFormat,\n\t},\n\tnoAdditionalProps,\n);\n\nexport type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;\n\nexport type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;\n\nexport type PersistedMetadataFormat = Static<typeof PersistedMetadataFormat>;\n"]}
1
+ {"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../src/core/schema-stored/formatV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,mDAAoD;AAEpD,kDAAmE;AAEnE,+CAIuB;AAGV,QAAA,uBAAuB,GAAG,cAAI,CAAC,QAAQ,CACnD,cAAI,CAAC,MAAM,CACV,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,uCAA4B,CAAC,CACxD,CACD,CAAC;AAEF,MAAM,qBAAqB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,uCAAyB;IAC/B,KAAK,EAAE,cAAI,CAAC,KAAK,CAAC,4CAA8B,CAAC;IACjD,QAAQ,EAAE,+BAAuB;CACjC,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAG5D,QAAA,iBAAiB,GAAG,cAAI,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAE5F;;;;GAIG;AACU,QAAA,yBAAyB,GAAG,cAAI,CAAC,MAAM,CACnD;IACC;;OAEG;IACH,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,yBAAiB,CAAC,CAAC;IACpE;;OAEG;IACH,GAAG,EAAE,cAAI,CAAC,QAAQ,CAAC,yBAAiB,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,kCAAoB,CAAC,CAAC;CACpD,EACD,uBAAY,CACZ,CAAC;AAUW,QAAA,wBAAwB,GAAG,cAAI,CAAC,MAAM,CAClD;IACC;;OAEG;IACH,IAAI,EAAE,iCAAyB;IAE/B,2CAA2C;IAC3C;;OAEG;IACH,QAAQ,EAAE,+BAAuB;CACjC,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport type { JsonCompatibleReadOnlyObject } from \"../../util/index.js\";\nimport { JsonCompatibleReadOnlySchema } from \"../../util/index.js\";\n\nimport {\n\tFieldKindIdentifierSchema,\n\tPersistedValueSchema,\n\tTreeNodeSchemaIdentifierSchema,\n} from \"./formatV1.js\";\n\nexport type PersistedMetadataFormat = Static<typeof PersistedMetadataFormat>;\nexport const PersistedMetadataFormat = Type.Optional(\n\tType.Unsafe<JsonCompatibleReadOnlyObject>(\n\t\tType.Record(Type.String(), JsonCompatibleReadOnlySchema),\n\t),\n);\n\nconst FieldSchemaFormatBase = Type.Object({\n\tkind: FieldKindIdentifierSchema,\n\ttypes: Type.Array(TreeNodeSchemaIdentifierSchema),\n\tmetadata: PersistedMetadataFormat,\n});\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;\nexport const FieldSchemaFormat = Type.Composite([FieldSchemaFormatBase], noAdditionalProps);\n\n/**\n * Format for the content of a {@link TreeNodeStoredSchema}.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const TreeNodeSchemaUnionFormat = Type.Object(\n\t{\n\t\t/**\n\t\t * Object node union member.\n\t\t */\n\t\tobject: Type.Optional(Type.Record(Type.String(), FieldSchemaFormat)),\n\t\t/**\n\t\t * Map node union member.\n\t\t */\n\t\tmap: Type.Optional(FieldSchemaFormat),\n\t\t/**\n\t\t * Leaf node union member.\n\t\t */\n\t\tleaf: Type.Optional(Type.Enum(PersistedValueSchema)),\n\t},\n\tunionOptions,\n);\n\nexport type TreeNodeSchemaUnionFormat = Static<typeof TreeNodeSchemaUnionFormat>;\n\n/**\n * Format for {@link TreeNodeStoredSchema}.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;\nexport const TreeNodeSchemaDataFormat = Type.Object(\n\t{\n\t\t/**\n\t\t * Node kind specific data.\n\t\t */\n\t\tkind: TreeNodeSchemaUnionFormat,\n\n\t\t// Data in common for all TreeNode schemas:\n\t\t/**\n\t\t * Leaf node union member.\n\t\t */\n\t\tmetadata: PersistedMetadataFormat,\n\t},\n\tnoAdditionalProps,\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/schema-stored/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,qBAAqB,EAC1B,WAAW,EACX,oBAAoB,EACpB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,4BAA4B,EAC5B,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,YAAY,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,YAAY,EAAE,wBAAwB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE7F,OAAO,KAAK,cAAc,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,KAAK,cAAc,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/schema-stored/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,qBAAqB,EAC1B,WAAW,EACX,oBAAoB,EACpB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,4BAA4B,EAC5B,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,YAAY,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,YAAY,EAAE,wBAAwB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE7F,OAAO,KAAK,cAAc,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,KAAK,cAAc,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/schema-stored/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAqBqB;AAnBpB,wGAAA,WAAW,OAAA;AACX,iHAAA,oBAAoB,OAAA;AAIpB,yHAAA,4BAA4B,OAAA;AAC5B,0HAAA,6BAA6B,OAAA;AAC7B,mHAAA,sBAAsB,OAAA;AAEtB,iHAAA,oBAAoB,OAAA;AACpB,mHAAA,sBAAsB,OAAA;AACtB,gHAAA,mBAAmB,OAAA;AACnB,8GAAA,iBAAiB,OAAA;AACjB,gHAAA,mBAAmB,OAAA;AACnB,gHAAA,mBAAmB,OAAA;AACnB,yHAAA,4BAA4B,OAAA;AAG5B,gHAAA,mBAAmB,OAAA;AAEpB,yEAMqC;AAHpC,uIAAA,0BAA0B,OAAA;AAC1B,8HAAA,iBAAiB,OAAA;AAGlB,qDAAiD;AAAxC,+GAAA,YAAY,OAAA;AAIrB,8DAAgD;AACvC,wCAAc;AACvB,8DAAgD;AACvC,wCAAc","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeTypeSet,\n\ttype FieldKindData,\n\ttype TreeStoredSchema,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchemaV1,\n\tencodeFieldSchemaV2,\n\tstoredSchemaDecodeDispatcher,\n\ttype SchemaAndPolicy,\n\ttype SchemaPolicy,\n\tSchemaFormatVersion,\n} from \"./schema.js\";\nexport {\n\ttype TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n} from \"./storedSchemaRepository.js\";\nexport { Multiplicity } from \"./multiplicity.js\";\n\nexport type { TreeNodeSchemaIdentifier, FieldKey, FieldKindIdentifier } from \"./formatV1.js\";\n\nimport * as schemaFormatV1 from \"./formatV1.js\";\nexport { schemaFormatV1 };\nimport * as schemaFormatV2 from \"./formatV2.js\";\nexport { schemaFormatV2 };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/schema-stored/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAqBqB;AAnBpB,wGAAA,WAAW,OAAA;AACX,iHAAA,oBAAoB,OAAA;AAIpB,yHAAA,4BAA4B,OAAA;AAC5B,0HAAA,6BAA6B,OAAA;AAC7B,mHAAA,sBAAsB,OAAA;AAEtB,iHAAA,oBAAoB,OAAA;AACpB,mHAAA,sBAAsB,OAAA;AACtB,gHAAA,mBAAmB,OAAA;AACnB,8GAAA,iBAAiB,OAAA;AACjB,gHAAA,mBAAmB,OAAA;AACnB,gHAAA,mBAAmB,OAAA;AACnB,yHAAA,4BAA4B,OAAA;AAG5B,gHAAA,mBAAmB,OAAA;AAEpB,yEAMqC;AAHpC,uIAAA,0BAA0B,OAAA;AAC1B,8HAAA,iBAAiB,OAAA;AAGlB,qDAAiD;AAAxC,+GAAA,YAAY,OAAA;AAIrB,8DAAgD;AAEvC,wCAAc;AACvB,8DAAgD;AAEvC,wCAAc","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeTypeSet,\n\ttype FieldKindData,\n\ttype TreeStoredSchema,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchemaV1,\n\tencodeFieldSchemaV2,\n\tstoredSchemaDecodeDispatcher,\n\ttype SchemaAndPolicy,\n\ttype SchemaPolicy,\n\tSchemaFormatVersion,\n} from \"./schema.js\";\nexport {\n\ttype TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n} from \"./storedSchemaRepository.js\";\nexport { Multiplicity } from \"./multiplicity.js\";\n\nexport type { TreeNodeSchemaIdentifier, FieldKey, FieldKindIdentifier } from \"./formatV1.js\";\n\nimport * as schemaFormatV1 from \"./formatV1.js\";\n// eslint-disable-next-line unicorn/prefer-export-from -- fixing requires `export * as` (breaks API-Extractor) or named exports (changes public API)\nexport { schemaFormatV1 };\nimport * as schemaFormatV2 from \"./formatV2.js\";\n// eslint-disable-next-line unicorn/prefer-export-from -- fixing requires `export * as` (breaks API-Extractor) or named exports (changes public API)\nexport { schemaFormatV2 };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/core/schema-stored/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EACN,KAAK,4BAA4B,EACjC,KAAK,WAAW,EAChB,KAAK,MAAM,EAIX,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,IAAI,mBAAmB,EAE7C,KAAK,wBAAwB,IAAI,0BAA0B,EAC3D,KAAK,wBAAwB,EAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACX,iBAAiB,IAAI,mBAAmB,EACxC,uBAAuB,EACvB,yBAAyB,EACzB,wBAAwB,IAAI,0BAA0B,EACtD,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;CAM9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAIrE;;;;;;;;GAQG;AACH,oBAAY,WAAW;IACtB,MAAM,IAAA;IACN,MAAM,IAAA;IACN,OAAO,IAAA;IACP,WAAW,I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ED,SAAS,iBAAiB,CAAC,QAA8B;IACxD,OAAO,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAA,eAAI,EAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACjF,CAAC;AAED,SAAgB,mBAAmB,CAAC,MAA6B;IAChE,OAAO;QACN,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,iHAAiH;QACjH,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE;KAC/B,CAAC;AACH,CAAC;AAND,kDAMC;AAED,SAAgB,mBAAmB,CAAC,MAA6B;IAChE,MAAM,WAAW,GAAwB,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAErE,mDAAmD;IACnD,OAAO,MAAM,CAAC,iBAAiB,KAAK,SAAS;QAC5C,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE;QACpB,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC;AAC3D,CAAC;AAPD,kDAOC;AAED,SAAgB,iBAAiB,CAAC,MAA2B;IAC5D,MAAM,GAAG,GAA0B;QAClC,kFAAkF;QAClF,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;QAC5B,iBAAiB,EAAE,MAAM,CAAC,QAAQ;KAClC,CAAC;IACF,OAAO,GAAG,CAAC;AACZ,CAAC;AARD,8CAQC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\n\nimport { DiscriminatedUnionDispatcher } from \"../../codec/index.js\";\nimport {\n\ttype JsonCompatibleReadOnlyObject,\n\ttype MakeNominal,\n\ttype Values,\n\tbrandConst,\n\tinvertMap,\n\tstrictEnum,\n} from \"../../util/index.js\";\n\nimport {\n\ttype FieldKey,\n\ttype FieldKindIdentifier,\n\ttype FieldSchemaFormat as FieldSchemaFormatV1,\n\tPersistedValueSchema,\n\ttype TreeNodeSchemaDataFormat as TreeNodeSchemaDataFormatV1,\n\ttype TreeNodeSchemaIdentifier,\n} from \"./formatV1.js\";\nimport type {\n\tFieldSchemaFormat as FieldSchemaFormatV2,\n\tPersistedMetadataFormat,\n\tTreeNodeSchemaUnionFormat,\n\tTreeNodeSchemaDataFormat as TreeNodeSchemaDataFormatV2,\n} from \"./formatV2.js\";\nimport type { Multiplicity } from \"./multiplicity.js\";\n\n/**\n * The format version for the schema.\n */\nexport const SchemaFormatVersion = strictEnum(\"SchemaFormatVersion\", {\n\tv1: 1,\n\t/**\n\t * Adds persisted metadata to the node schema and field schema.\n\t */\n\tv2: 2,\n});\nexport type SchemaFormatVersion = Values<typeof SchemaFormatVersion>;\n\ntype FieldSchemaFormat = FieldSchemaFormatV1 | FieldSchemaFormatV2;\n\n/**\n * Schema for what {@link TreeLeafValue} is allowed on a Leaf node.\n * @privateRemarks\n * See also {@link TreeValue}.\n * If further stabilizing this,\n * consider the implications of how this might prevent adding of new leaf types in the future.\n * Maybe add a disclaimer that it might be extended like on {@link NodeKind}?\n * @alpha\n */\nexport enum ValueSchema {\n\tNumber,\n\tString,\n\tBoolean,\n\tFluidHandle,\n\tNull,\n}\n\n/**\n * Set of allowed tree types.\n * Providing multiple values here allows polymorphism, tagged union style.\n *\n * In the future, this could be extended to allow inlining a TreeNodeStoredSchema here\n * (or some similar structural schema system).\n * For structural types which could go here, there are a few interesting options:\n *\n * - Allow replacing the whole set with a structural type for terminal / non-tree data,\n * and use this as a replacement for values on the tree nodes.\n *\n * - Allow expression structural constraints for child trees, for example requiring specific traits\n * (ex: via TreeNodeStoredSchema), instead of by type.\n *\n * There are two ways this could work:\n *\n * - Constrain the child nodes based on their shape:\n * this makes schema safe editing difficult because nodes would incur extra editing constraints to prevent them\n * from going out of schema based on their location in such a field.\n *\n * - Constrain the types allowed based on which types guarantee their data will always meet the constraints.\n *\n * Care would need to be taken to make sure this is sound for the schema updating mechanisms.\n */\nexport type TreeTypeSet = ReadonlySet<TreeNodeSchemaIdentifier>;\n\n/**\n * Declarative portion of a {@link FlexFieldKind}.\n *\n * @remarks\n * Enough info about a field kind to know if a given tree is is schema.\n *\n * Note that compatibility between trees and schema is not sufficient to evaluate if a schema upgrade should be allowed.\n * Currently schema upgrades are restricted to field kind changes which can not be cyclic (like version upgrades but not down grades).\n * See {@link FlexFieldKind.allowsFieldSuperset} for more details.\n */\nexport interface FieldKindData {\n\t/**\n\t * Globally scoped identifier.\n\t */\n\treadonly identifier: FieldKindIdentifier;\n\t/**\n\t * Bound on the number of children that fields of this kind may have.\n\t * TODO: consider replacing this with numeric upper and lower bounds.\n\t */\n\treadonly multiplicity: Multiplicity;\n}\n\n/**\n * Everything needed to define what it means for a tree to be in schema.\n */\nexport interface SchemaAndPolicy {\n\treadonly schema: StoredSchemaCollection;\n\treadonly policy: SchemaPolicy;\n}\n\n/**\n * Extra data needed to interpret stored schema.\n * @remarks\n * This contains information that describes the semantics of things which can be referenced in stored schema.\n * For example, field kind identifiers refer to specific field kinds, which imply specific rules around what is valid in a given field (the multiplicity).\n * This structure provides such information, allowing it to be possible to determine if a given tree complies with a particular stored schema.\n */\nexport interface SchemaPolicy {\n\t/**\n\t * Policy information about FieldKinds:\n\t * This is typically stored as code, not in documents, and defines how to handle fields based on their kind.\n\t * It is assumed that all users of a document will have exactly the same FieldKind policies,\n\t * though older applications might be missing some,\n\t * and will be unable to process any changes that use those FieldKinds.\n\t */\n\treadonly fieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindData>;\n}\n\n/**\n * Schema for a field.\n * Object implementing this interface should never be modified.\n */\nexport interface TreeFieldStoredSchema {\n\treadonly kind: FieldKindIdentifier;\n\n\t/**\n\t * The set of allowed child types.\n\t * If not specified, types are unconstrained.\n\t */\n\treadonly types: TreeTypeSet;\n\n\t/**\n\t * Portion of the metadata which can be persisted.\n\t * @remarks\n\t * Discarded when encoding to {@link SchemaFormatVersion.V1}.\n\t * @privateRemarks\n\t * This field corresponds to the `metadata` field in the persisted schema format.\n\t */\n\treadonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined;\n}\n\n/**\n * Identifier used for the FieldKind for fields which must be empty.\n *\n * @remarks\n * This mainly show up in:\n *\n * 1. The root default field for documents.\n *\n * 2. The schema used for out of schema fields (which thus must be empty/not exist) on object and leaf nodes.\n */\nexport const forbiddenFieldKindIdentifier = brandConst(\"Forbidden\")<FieldKindIdentifier>();\n\n/**\n * A schema for empty fields (fields which must always be empty).\n * There are multiple ways this could be encoded, but this is the most explicit.\n */\nexport const storedEmptyFieldSchema: TreeFieldStoredSchema = {\n\t// This kind requires the field to be empty.\n\tkind: forbiddenFieldKindIdentifier,\n\t// This type set also forces the field to be empty not not allowing any types as all.\n\ttypes: new Set(),\n\tpersistedMetadata: undefined,\n};\n\n/**\n * Identifier used for the FieldKind for fields of type identifier.\n */\nexport const identifierFieldKindIdentifier = \"Identifier\";\n\nexport abstract class TreeNodeStoredSchema {\n\tprotected _typeCheck!: MakeNominal;\n\n\t/**\n\t * Constructor for a TreeNodeStoredSchema.\n\t * @param metadata - Persisted metadata for this node schema.\n\t */\n\tpublic constructor(public readonly metadata: PersistedMetadataFormat | undefined) {}\n\n\t/**\n\t * Encode in the v1 schema format.\n\t */\n\tpublic abstract encodeV1(): TreeNodeSchemaDataFormatV1;\n\n\t/**\n\t * Encode in the v2 schema format.\n\t * @remarks Post-condition: if metadata was specified on the input schema, it will be present in the output.\n\t */\n\tpublic abstract encodeV2(): TreeNodeSchemaDataFormatV2;\n\n\t/**\n\t * Returns the schema for the provided field.\n\t */\n\tpublic abstract getFieldSchema(field: FieldKey): TreeFieldStoredSchema;\n}\n\nexport class ObjectNodeStoredSchema extends TreeNodeStoredSchema {\n\t/**\n\t * @param objectNodeFields - Schema for fields with keys scoped to this TreeNodeStoredSchema.\n\t * This refers to the TreeFieldStoredSchema directly\n\t * (as opposed to just supporting FieldSchemaIdentifier and having a central FieldKey -\\> TreeFieldStoredSchema map).\n\t * This allows us short friendly field keys which can be ergonomically used as field names in code.\n\t * It also interoperates well with mapFields being used as a map with arbitrary data as keys.\n\t */\n\tpublic constructor(\n\t\tpublic readonly objectNodeFields: ReadonlyMap<FieldKey, TreeFieldStoredSchema>,\n\t\tmetadata?: PersistedMetadataFormat | undefined,\n\t) {\n\t\tsuper(metadata);\n\t}\n\n\tpublic override encodeV1(): TreeNodeSchemaDataFormatV1 {\n\t\tconst fieldsObject: Record<string, FieldSchemaFormat> =\n\t\t\tthis.encodeFieldsObject(encodeFieldSchemaV1);\n\n\t\treturn {\n\t\t\tobject: fieldsObject,\n\t\t};\n\t}\n\n\tpublic override encodeV2(): TreeNodeSchemaDataFormatV2 {\n\t\tconst fieldsObject: Record<string, FieldSchemaFormat> =\n\t\t\tthis.encodeFieldsObject(encodeFieldSchemaV2);\n\t\tconst kind = { object: fieldsObject };\n\n\t\treturn { kind, metadata: this.metadata };\n\t}\n\n\tpublic override getFieldSchema(field: FieldKey): TreeFieldStoredSchema {\n\t\treturn this.objectNodeFields.get(field) ?? storedEmptyFieldSchema;\n\t}\n\n\tprivate encodeFieldsObject(\n\t\tencodeFieldSchema: (storedFieldSchema: TreeFieldStoredSchema) => FieldSchemaFormat,\n\t): Record<string, FieldSchemaFormat> {\n\t\tconst fieldsObject: Record<string, FieldSchemaFormat> = Object.create(null);\n\t\t// Sort fields to ensure output is identical for for equivalent schema (since field order is not considered significant).\n\t\t// This makes comparing schema easier, and ensures chunk reuse for schema summaries isn't needlessly broken.\n\t\tfor (const key of [...this.objectNodeFields.keys()].sort()) {\n\t\t\tObject.defineProperty(fieldsObject, key, {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: encodeFieldSchema(\n\t\t\t\t\tthis.objectNodeFields.get(key) ?? fail(0xae7 /* missing field */),\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\t\treturn fieldsObject;\n\t}\n}\n\nexport class MapNodeStoredSchema extends TreeNodeStoredSchema {\n\t/**\n\t * @param mapFields - Allows using the fields as a map, with the keys being\n\t * FieldKeys and the values being constrained by this TreeFieldStoredSchema.\n\t * Usually `FieldKind.Value` should NOT be used here\n\t * since no nodes can ever be in schema if you use `FieldKind.Value` here\n\t * (that would require infinite children).\n\t */\n\tpublic constructor(\n\t\tpublic readonly mapFields: TreeFieldStoredSchema,\n\t\tmetadata?: PersistedMetadataFormat | undefined,\n\t) {\n\t\tsuper(metadata);\n\t}\n\n\tpublic override encodeV1(): TreeNodeSchemaDataFormatV1 {\n\t\treturn {\n\t\t\tmap: encodeFieldSchemaV1(this.mapFields),\n\t\t};\n\t}\n\n\tpublic override encodeV2(): TreeNodeSchemaDataFormatV2 {\n\t\tconst kind = { map: encodeFieldSchemaV2(this.mapFields) };\n\t\treturn { kind, metadata: this.metadata };\n\t}\n\n\tpublic override getFieldSchema(field: FieldKey): TreeFieldStoredSchema {\n\t\treturn this.mapFields;\n\t}\n}\n\nexport class LeafNodeStoredSchema extends TreeNodeStoredSchema {\n\t/**\n\t * @param leafValue - There are several approaches for how to store actual data in the tree\n\t * (special node types, special field contents, data on nodes etc.)\n\t * as well as several options about how the data should be modeled at this level\n\t * (byte sequence? javascript type? json?),\n\t * as well as options for how much of this would be exposed in the schema language\n\t * (ex: would all nodes with values be special built-ins, or could any schema add them?)\n\t * A simple easy to do in javascript approach is taken here:\n\t * this is not intended to be a suggestion of what approach to take, or what to expose in the schema language.\n\t * This is simply one approach that can work for modeling them in the internal schema representation.\n\t */\n\tpublic constructor(public readonly leafValue: ValueSchema) {\n\t\t// No metadata for leaf nodes.\n\t\tsuper(undefined);\n\t}\n\n\tpublic override encodeV1(): TreeNodeSchemaDataFormatV1 {\n\t\treturn {\n\t\t\tleaf: encodeValueSchema(this.leafValue),\n\t\t};\n\t}\n\n\tpublic override encodeV2(): TreeNodeSchemaDataFormatV2 {\n\t\treturn {\n\t\t\t// No metadata for leaf nodes, so don't emit a metadata field.\n\t\t\tkind: {\n\t\t\t\tleaf: encodeValueSchema(this.leafValue),\n\t\t\t},\n\t\t};\n\t}\n\n\tpublic override getFieldSchema(field: FieldKey): TreeFieldStoredSchema {\n\t\treturn storedEmptyFieldSchema;\n\t}\n}\n\n/**\n * Decoder wrapper function for {@link TreeNodeStoredSchema} implementations.\n * Curries the constructor so that the caller can inject metadata.\n */\ntype StoredSchemaDecoder = (\n\tmetadata: PersistedMetadataFormat | undefined,\n) => TreeNodeStoredSchema;\n\nexport const storedSchemaDecodeDispatcher: DiscriminatedUnionDispatcher<\n\tTreeNodeSchemaUnionFormat,\n\t[],\n\tStoredSchemaDecoder\n> = new DiscriminatedUnionDispatcher({\n\tleaf: (data: PersistedValueSchema) => (metadata) =>\n\t\tnew LeafNodeStoredSchema(decodeValueSchema(data)),\n\tobject: (data: Record<TreeNodeSchemaIdentifier, FieldSchemaFormat>) => (metadata) => {\n\t\tconst map = new Map();\n\t\tfor (const [key, value] of Object.entries(data)) {\n\t\t\tmap.set(key, decodeFieldSchema(value));\n\t\t}\n\t\treturn new ObjectNodeStoredSchema(map, metadata);\n\t},\n\tmap: (data: FieldSchemaFormat) => (metadata) =>\n\t\tnew MapNodeStoredSchema(decodeFieldSchema(data), metadata),\n});\n\nconst valueSchemaEncode = new Map([\n\t[ValueSchema.Number, PersistedValueSchema.Number],\n\t[ValueSchema.String, PersistedValueSchema.String],\n\t[ValueSchema.Boolean, PersistedValueSchema.Boolean],\n\t[ValueSchema.FluidHandle, PersistedValueSchema.FluidHandle],\n\t[ValueSchema.Null, PersistedValueSchema.Null],\n]);\n\nconst valueSchemaDecode = invertMap(valueSchemaEncode);\n\nfunction encodeValueSchema(inMemory: ValueSchema): PersistedValueSchema {\n\treturn valueSchemaEncode.get(inMemory) ?? fail(0xae8 /* missing PersistedValueSchema */);\n}\n\nfunction decodeValueSchema(inMemory: PersistedValueSchema): ValueSchema {\n\treturn valueSchemaDecode.get(inMemory) ?? fail(0xae9 /* missing ValueSchema */);\n}\n\nexport function encodeFieldSchemaV1(schema: TreeFieldStoredSchema): FieldSchemaFormatV1 {\n\treturn {\n\t\tkind: schema.kind,\n\t\t// Types are sorted by identifier to improve stability of persisted data to increase chance of schema blob reuse.\n\t\ttypes: [...schema.types].sort(),\n\t};\n}\n\nexport function encodeFieldSchemaV2(schema: TreeFieldStoredSchema): FieldSchemaFormatV2 {\n\tconst fieldSchema: FieldSchemaFormatV1 = encodeFieldSchemaV1(schema);\n\n\t// Omit metadata from the output if it is undefined\n\treturn schema.persistedMetadata === undefined\n\t\t? { ...fieldSchema }\n\t\t: { ...fieldSchema, metadata: schema.persistedMetadata };\n}\n\nexport function decodeFieldSchema(schema: FieldSchemaFormatV2): TreeFieldStoredSchema {\n\tconst out: TreeFieldStoredSchema = {\n\t\t// TODO: maybe provide actual FieldKind objects here, error on unrecognized kinds.\n\t\tkind: schema.kind,\n\t\ttypes: new Set(schema.types),\n\t\tpersistedMetadata: schema.metadata,\n\t};\n\treturn out;\n}\n\n/**\n * Document schema data that can be stored in a document.\n *\n * @remarks\n * Note: the owner of this may modify it over time:\n * thus if needing to hand onto a specific version, make a copy.\n */\nexport interface TreeStoredSchema extends StoredSchemaCollection {\n\t/**\n\t * Schema for the root field which contains the whole tree.\n\t */\n\treadonly rootFieldSchema: TreeFieldStoredSchema;\n}\n\n/**\n * Collection of TreeNodeSchema data that can be stored in a document.\n *\n * @remarks\n * Note: the owner of this may modify it over time:\n * thus if needing to hang onto a specific version, make a copy.\n */\nexport interface StoredSchemaCollection {\n\t/**\n\t * {@inheritdoc StoredSchemaCollection}\n\t */\n\treadonly nodeSchema: ReadonlyMap<TreeNodeSchemaIdentifier, TreeNodeStoredSchema>;\n}\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/core/schema-stored/schema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA2D;AAE3D,mDAAoE;AACpE,kDAO6B;AAE7B,+CAOuB;AASvB;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AO,MAAM,CAAC,iBAAiB,KAAK,SAAS;QAC5C,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE;QACpB,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC;AAC3D,CAAC;AAPD,kDAOC;AAED,SAAgB,iBAAiB,CAAC,MAA2B;IAC5D,MAAM,GAAG,GAA0B;QAClC,kFAAkF;QAClF,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;QAC5B,iBAAiB,EAAE,MAAM,CAAC,QAAQ;KAClC,CAAC;IACF,OAAO,GAAG,CAAC;AACZ,CAAC;AARD,8CAQC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\n\nimport { DiscriminatedUnionDispatcher } from \"../../codec/index.js\";\nimport {\n\ttype JsonCompatibleReadOnlyObject,\n\ttype MakeNominal,\n\ttype Values,\n\tbrandConst,\n\tinvertMap,\n\tstrictEnum,\n} from \"../../util/index.js\";\n\nimport {\n\ttype FieldKey,\n\ttype FieldKindIdentifier,\n\ttype FieldSchemaFormat as FieldSchemaFormatV1,\n\tPersistedValueSchema,\n\ttype TreeNodeSchemaDataFormat as TreeNodeSchemaDataFormatV1,\n\ttype TreeNodeSchemaIdentifier,\n} from \"./formatV1.js\";\nimport type {\n\tFieldSchemaFormat as FieldSchemaFormatV2,\n\tPersistedMetadataFormat,\n\tTreeNodeSchemaUnionFormat,\n\tTreeNodeSchemaDataFormat as TreeNodeSchemaDataFormatV2,\n} from \"./formatV2.js\";\nimport type { Multiplicity } from \"./multiplicity.js\";\n\n/**\n * The format version for the schema.\n */\nexport const SchemaFormatVersion = strictEnum(\"SchemaFormatVersion\", {\n\tv1: 1,\n\t/**\n\t * Adds persisted metadata to the node schema and field schema.\n\t */\n\tv2: 2,\n});\nexport type SchemaFormatVersion = Values<typeof SchemaFormatVersion>;\n\ntype FieldSchemaFormat = FieldSchemaFormatV1 | FieldSchemaFormatV2;\n\n/**\n * Schema for what {@link TreeLeafValue} is allowed on a Leaf node.\n * @privateRemarks\n * See also {@link TreeValue}.\n * If further stabilizing this,\n * consider the implications of how this might prevent adding of new leaf types in the future.\n * Maybe add a disclaimer that it might be extended like on {@link NodeKind}?\n * @alpha\n */\nexport enum ValueSchema {\n\tNumber,\n\tString,\n\tBoolean,\n\tFluidHandle,\n\tNull,\n}\n\n/**\n * Set of allowed tree types.\n * Providing multiple values here allows polymorphism, tagged union style.\n *\n * In the future, this could be extended to allow inlining a TreeNodeStoredSchema here\n * (or some similar structural schema system).\n * For structural types which could go here, there are a few interesting options:\n *\n * - Allow replacing the whole set with a structural type for terminal / non-tree data,\n * and use this as a replacement for values on the tree nodes.\n *\n * - Allow expression structural constraints for child trees, for example requiring specific traits\n * (ex: via TreeNodeStoredSchema), instead of by type.\n *\n * There are two ways this could work:\n *\n * - Constrain the child nodes based on their shape:\n * this makes schema safe editing difficult because nodes would incur extra editing constraints to prevent them\n * from going out of schema based on their location in such a field.\n *\n * - Constrain the types allowed based on which types guarantee their data will always meet the constraints.\n *\n * Care would need to be taken to make sure this is sound for the schema updating mechanisms.\n */\nexport type TreeTypeSet = ReadonlySet<TreeNodeSchemaIdentifier>;\n\n/**\n * Declarative portion of a {@link FlexFieldKind}.\n *\n * @remarks\n * Enough info about a field kind to know if a given tree is is schema.\n *\n * Note that compatibility between trees and schema is not sufficient to evaluate if a schema upgrade should be allowed.\n * Currently schema upgrades are restricted to field kind changes which can not be cyclic (like version upgrades but not down grades).\n * See {@link FlexFieldKind.allowsFieldSuperset} for more details.\n */\nexport interface FieldKindData {\n\t/**\n\t * Globally scoped identifier.\n\t */\n\treadonly identifier: FieldKindIdentifier;\n\t/**\n\t * Bound on the number of children that fields of this kind may have.\n\t * TODO: consider replacing this with numeric upper and lower bounds.\n\t */\n\treadonly multiplicity: Multiplicity;\n}\n\n/**\n * Everything needed to define what it means for a tree to be in schema.\n */\nexport interface SchemaAndPolicy {\n\treadonly schema: StoredSchemaCollection;\n\treadonly policy: SchemaPolicy;\n}\n\n/**\n * Extra data needed to interpret stored schema.\n * @remarks\n * This contains information that describes the semantics of things which can be referenced in stored schema.\n * For example, field kind identifiers refer to specific field kinds, which imply specific rules around what is valid in a given field (the multiplicity).\n * This structure provides such information, allowing it to be possible to determine if a given tree complies with a particular stored schema.\n */\nexport interface SchemaPolicy {\n\t/**\n\t * Policy information about FieldKinds:\n\t * This is typically stored as code, not in documents, and defines how to handle fields based on their kind.\n\t * It is assumed that all users of a document will have exactly the same FieldKind policies,\n\t * though older applications might be missing some,\n\t * and will be unable to process any changes that use those FieldKinds.\n\t */\n\treadonly fieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindData>;\n}\n\n/**\n * Schema for a field.\n * Object implementing this interface should never be modified.\n */\nexport interface TreeFieldStoredSchema {\n\treadonly kind: FieldKindIdentifier;\n\n\t/**\n\t * The set of allowed child types.\n\t * If not specified, types are unconstrained.\n\t */\n\treadonly types: TreeTypeSet;\n\n\t/**\n\t * Portion of the metadata which can be persisted.\n\t * @remarks\n\t * Discarded when encoding to {@link SchemaFormatVersion.V1}.\n\t * @privateRemarks\n\t * This field corresponds to the `metadata` field in the persisted schema format.\n\t */\n\treadonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined;\n}\n\n/**\n * Identifier used for the FieldKind for fields which must be empty.\n *\n * @remarks\n * This mainly show up in:\n *\n * 1. The root default field for documents.\n *\n * 2. The schema used for out of schema fields (which thus must be empty/not exist) on object and leaf nodes.\n */\nexport const forbiddenFieldKindIdentifier = brandConst(\"Forbidden\")<FieldKindIdentifier>();\n\n/**\n * A schema for empty fields (fields which must always be empty).\n * There are multiple ways this could be encoded, but this is the most explicit.\n */\nexport const storedEmptyFieldSchema: TreeFieldStoredSchema = {\n\t// This kind requires the field to be empty.\n\tkind: forbiddenFieldKindIdentifier,\n\t// This type set also forces the field to be empty not not allowing any types as all.\n\ttypes: new Set(),\n\tpersistedMetadata: undefined,\n};\n\n/**\n * Identifier used for the FieldKind for fields of type identifier.\n */\nexport const identifierFieldKindIdentifier = \"Identifier\";\n\nexport abstract class TreeNodeStoredSchema {\n\tprotected _typeCheck!: MakeNominal;\n\n\t/**\n\t * Constructor for a TreeNodeStoredSchema.\n\t * @param metadata - Persisted metadata for this node schema.\n\t */\n\tpublic constructor(public readonly metadata: PersistedMetadataFormat | undefined) {}\n\n\t/**\n\t * Encode in the v1 schema format.\n\t */\n\tpublic abstract encodeV1(): TreeNodeSchemaDataFormatV1;\n\n\t/**\n\t * Encode in the v2 schema format.\n\t * @remarks Post-condition: if metadata was specified on the input schema, it will be present in the output.\n\t */\n\tpublic abstract encodeV2(): TreeNodeSchemaDataFormatV2;\n\n\t/**\n\t * Returns the schema for the provided field.\n\t */\n\tpublic abstract getFieldSchema(field: FieldKey): TreeFieldStoredSchema;\n}\n\nexport class ObjectNodeStoredSchema extends TreeNodeStoredSchema {\n\t/**\n\t * @param objectNodeFields - Schema for fields with keys scoped to this TreeNodeStoredSchema.\n\t * This refers to the TreeFieldStoredSchema directly\n\t * (as opposed to just supporting FieldSchemaIdentifier and having a central FieldKey -\\> TreeFieldStoredSchema map).\n\t * This allows us short friendly field keys which can be ergonomically used as field names in code.\n\t * It also interoperates well with mapFields being used as a map with arbitrary data as keys.\n\t */\n\tpublic constructor(\n\t\tpublic readonly objectNodeFields: ReadonlyMap<FieldKey, TreeFieldStoredSchema>,\n\t\tmetadata?: PersistedMetadataFormat | undefined,\n\t) {\n\t\tsuper(metadata);\n\t}\n\n\tpublic override encodeV1(): TreeNodeSchemaDataFormatV1 {\n\t\tconst fieldsObject: Record<string, FieldSchemaFormat> =\n\t\t\tthis.encodeFieldsObject(encodeFieldSchemaV1);\n\n\t\treturn {\n\t\t\tobject: fieldsObject,\n\t\t};\n\t}\n\n\tpublic override encodeV2(): TreeNodeSchemaDataFormatV2 {\n\t\tconst fieldsObject: Record<string, FieldSchemaFormat> =\n\t\t\tthis.encodeFieldsObject(encodeFieldSchemaV2);\n\t\tconst kind = { object: fieldsObject };\n\n\t\treturn { kind, metadata: this.metadata };\n\t}\n\n\tpublic override getFieldSchema(field: FieldKey): TreeFieldStoredSchema {\n\t\treturn this.objectNodeFields.get(field) ?? storedEmptyFieldSchema;\n\t}\n\n\tprivate encodeFieldsObject(\n\t\tencodeFieldSchema: (storedFieldSchema: TreeFieldStoredSchema) => FieldSchemaFormat,\n\t): Record<string, FieldSchemaFormat> {\n\t\tconst fieldsObject: Record<string, FieldSchemaFormat> = Object.create(null) as Record<\n\t\t\tstring,\n\t\t\tFieldSchemaFormat\n\t\t>;\n\t\t// Sort fields to ensure output is identical for for equivalent schema (since field order is not considered significant).\n\t\t// This makes comparing schema easier, and ensures chunk reuse for schema summaries isn't needlessly broken.\n\t\tfor (const key of [...this.objectNodeFields.keys()].sort()) {\n\t\t\tObject.defineProperty(fieldsObject, key, {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: encodeFieldSchema(\n\t\t\t\t\tthis.objectNodeFields.get(key) ?? fail(0xae7 /* missing field */),\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\t\treturn fieldsObject;\n\t}\n}\n\nexport class MapNodeStoredSchema extends TreeNodeStoredSchema {\n\t/**\n\t * @param mapFields - Allows using the fields as a map, with the keys being\n\t * FieldKeys and the values being constrained by this TreeFieldStoredSchema.\n\t * Usually `FieldKind.Value` should NOT be used here\n\t * since no nodes can ever be in schema if you use `FieldKind.Value` here\n\t * (that would require infinite children).\n\t */\n\tpublic constructor(\n\t\tpublic readonly mapFields: TreeFieldStoredSchema,\n\t\tmetadata?: PersistedMetadataFormat | undefined,\n\t) {\n\t\tsuper(metadata);\n\t}\n\n\tpublic override encodeV1(): TreeNodeSchemaDataFormatV1 {\n\t\treturn {\n\t\t\tmap: encodeFieldSchemaV1(this.mapFields),\n\t\t};\n\t}\n\n\tpublic override encodeV2(): TreeNodeSchemaDataFormatV2 {\n\t\tconst kind = { map: encodeFieldSchemaV2(this.mapFields) };\n\t\treturn { kind, metadata: this.metadata };\n\t}\n\n\tpublic override getFieldSchema(field: FieldKey): TreeFieldStoredSchema {\n\t\treturn this.mapFields;\n\t}\n}\n\nexport class LeafNodeStoredSchema extends TreeNodeStoredSchema {\n\t/**\n\t * @param leafValue - There are several approaches for how to store actual data in the tree\n\t * (special node types, special field contents, data on nodes etc.)\n\t * as well as several options about how the data should be modeled at this level\n\t * (byte sequence? javascript type? json?),\n\t * as well as options for how much of this would be exposed in the schema language\n\t * (ex: would all nodes with values be special built-ins, or could any schema add them?)\n\t * A simple easy to do in javascript approach is taken here:\n\t * this is not intended to be a suggestion of what approach to take, or what to expose in the schema language.\n\t * This is simply one approach that can work for modeling them in the internal schema representation.\n\t */\n\tpublic constructor(public readonly leafValue: ValueSchema) {\n\t\t// No metadata for leaf nodes.\n\t\tsuper(undefined);\n\t}\n\n\tpublic override encodeV1(): TreeNodeSchemaDataFormatV1 {\n\t\treturn {\n\t\t\tleaf: encodeValueSchema(this.leafValue),\n\t\t};\n\t}\n\n\tpublic override encodeV2(): TreeNodeSchemaDataFormatV2 {\n\t\treturn {\n\t\t\t// No metadata for leaf nodes, so don't emit a metadata field.\n\t\t\tkind: {\n\t\t\t\tleaf: encodeValueSchema(this.leafValue),\n\t\t\t},\n\t\t};\n\t}\n\n\tpublic override getFieldSchema(field: FieldKey): TreeFieldStoredSchema {\n\t\treturn storedEmptyFieldSchema;\n\t}\n}\n\n/**\n * Decoder wrapper function for {@link TreeNodeStoredSchema} implementations.\n * Curries the constructor so that the caller can inject metadata.\n */\ntype StoredSchemaDecoder = (\n\tmetadata: PersistedMetadataFormat | undefined,\n) => TreeNodeStoredSchema;\n\nexport const storedSchemaDecodeDispatcher: DiscriminatedUnionDispatcher<\n\tTreeNodeSchemaUnionFormat,\n\t[],\n\tStoredSchemaDecoder\n> = new DiscriminatedUnionDispatcher({\n\tleaf: (data: PersistedValueSchema) => (metadata) =>\n\t\tnew LeafNodeStoredSchema(decodeValueSchema(data)),\n\tobject: (data: Record<TreeNodeSchemaIdentifier, FieldSchemaFormat>) => (metadata) => {\n\t\tconst map = new Map();\n\t\tfor (const [key, value] of Object.entries(data)) {\n\t\t\tmap.set(key, decodeFieldSchema(value));\n\t\t}\n\t\treturn new ObjectNodeStoredSchema(map, metadata);\n\t},\n\tmap: (data: FieldSchemaFormat) => (metadata) =>\n\t\tnew MapNodeStoredSchema(decodeFieldSchema(data), metadata),\n});\n\nconst valueSchemaEncode = new Map([\n\t[ValueSchema.Number, PersistedValueSchema.Number],\n\t[ValueSchema.String, PersistedValueSchema.String],\n\t[ValueSchema.Boolean, PersistedValueSchema.Boolean],\n\t[ValueSchema.FluidHandle, PersistedValueSchema.FluidHandle],\n\t[ValueSchema.Null, PersistedValueSchema.Null],\n]);\n\nconst valueSchemaDecode = invertMap(valueSchemaEncode);\n\nfunction encodeValueSchema(inMemory: ValueSchema): PersistedValueSchema {\n\treturn valueSchemaEncode.get(inMemory) ?? fail(0xae8 /* missing PersistedValueSchema */);\n}\n\nfunction decodeValueSchema(inMemory: PersistedValueSchema): ValueSchema {\n\treturn valueSchemaDecode.get(inMemory) ?? fail(0xae9 /* missing ValueSchema */);\n}\n\nexport function encodeFieldSchemaV1(schema: TreeFieldStoredSchema): FieldSchemaFormatV1 {\n\treturn {\n\t\tkind: schema.kind,\n\t\t// Types are sorted by identifier to improve stability of persisted data to increase chance of schema blob reuse.\n\t\ttypes: [...schema.types].sort(),\n\t};\n}\n\nexport function encodeFieldSchemaV2(schema: TreeFieldStoredSchema): FieldSchemaFormatV2 {\n\tconst fieldSchema: FieldSchemaFormatV1 = encodeFieldSchemaV1(schema);\n\n\t// Omit metadata from the output if it is undefined\n\treturn schema.persistedMetadata === undefined\n\t\t? { ...fieldSchema }\n\t\t: { ...fieldSchema, metadata: schema.persistedMetadata };\n}\n\nexport function decodeFieldSchema(schema: FieldSchemaFormatV2): TreeFieldStoredSchema {\n\tconst out: TreeFieldStoredSchema = {\n\t\t// TODO: maybe provide actual FieldKind objects here, error on unrecognized kinds.\n\t\tkind: schema.kind,\n\t\ttypes: new Set(schema.types),\n\t\tpersistedMetadata: schema.metadata,\n\t};\n\treturn out;\n}\n\n/**\n * Document schema data that can be stored in a document.\n *\n * @remarks\n * Note: the owner of this may modify it over time:\n * thus if needing to hand onto a specific version, make a copy.\n */\nexport interface TreeStoredSchema extends StoredSchemaCollection {\n\t/**\n\t * Schema for the root field which contains the whole tree.\n\t */\n\treadonly rootFieldSchema: TreeFieldStoredSchema;\n}\n\n/**\n * Collection of TreeNodeSchema data that can be stored in a document.\n *\n * @remarks\n * Note: the owner of this may modify it over time:\n * thus if needing to hang onto a specific version, make a copy.\n */\nexport interface StoredSchemaCollection {\n\t/**\n\t * {@inheritdoc StoredSchemaCollection}\n\t */\n\treadonly nodeSchema: ReadonlyMap<TreeNodeSchemaIdentifier, TreeNodeStoredSchema>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"anchorSet.d.ts","sourceRoot":"","sources":["../../../src/core/tree/anchorSet.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAGzF,OAAO,EACN,KAAK,KAAK,EACV,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,oBAAoB,EAKpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAC;AAEzC,OAAO,EAEN,KAAK,iBAAiB,EAItB,KAAK,MAAM,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,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