@fluidframework/tree 2.33.2 → 2.40.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 (621) hide show
  1. package/.vscode/settings.json +2 -0
  2. package/CHANGELOG.md +64 -0
  3. package/api-report/tree.alpha.api.md +124 -51
  4. package/api-report/tree.beta.api.md +31 -27
  5. package/api-report/tree.legacy.alpha.api.md +24 -23
  6. package/api-report/tree.legacy.public.api.md +24 -23
  7. package/api-report/tree.public.api.md +24 -23
  8. package/dist/alpha.d.ts +17 -1
  9. package/dist/beta.d.ts +2 -0
  10. package/dist/codec/codec.d.ts +5 -1
  11. package/dist/codec/codec.d.ts.map +1 -1
  12. package/dist/codec/codec.js +6 -2
  13. package/dist/codec/codec.js.map +1 -1
  14. package/dist/codec/index.d.ts +1 -1
  15. package/dist/codec/index.d.ts.map +1 -1
  16. package/dist/codec/index.js +2 -1
  17. package/dist/codec/index.js.map +1 -1
  18. package/dist/core/index.d.ts +2 -2
  19. package/dist/core/index.d.ts.map +1 -1
  20. package/dist/core/index.js +2 -3
  21. package/dist/core/index.js.map +1 -1
  22. package/dist/core/schema-stored/{format.d.ts → formatV1.d.ts} +1 -1
  23. package/dist/core/schema-stored/formatV1.d.ts.map +1 -0
  24. package/dist/core/schema-stored/{format.js → formatV1.js} +1 -1
  25. package/dist/core/schema-stored/formatV1.js.map +1 -0
  26. package/dist/core/schema-stored/index.d.ts +3 -3
  27. package/dist/core/schema-stored/index.d.ts.map +1 -1
  28. package/dist/core/schema-stored/index.js +3 -3
  29. package/dist/core/schema-stored/index.js.map +1 -1
  30. package/dist/core/schema-stored/schema.d.ts +3 -1
  31. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  32. package/dist/core/schema-stored/schema.js +8 -6
  33. package/dist/core/schema-stored/schema.js.map +1 -1
  34. package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  35. package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  36. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  37. package/dist/core/schema-view/index.d.ts +1 -1
  38. package/dist/core/schema-view/index.d.ts.map +1 -1
  39. package/dist/core/schema-view/index.js +1 -2
  40. package/dist/core/schema-view/index.js.map +1 -1
  41. package/dist/core/schema-view/view.d.ts +0 -27
  42. package/dist/core/schema-view/view.d.ts.map +1 -1
  43. package/dist/core/schema-view/view.js +1 -35
  44. package/dist/core/schema-view/view.js.map +1 -1
  45. package/dist/core/tree/persistedTreeTextFormat.d.ts +4 -4
  46. package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  47. package/dist/core/tree/persistedTreeTextFormat.js +1 -1
  48. package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
  49. package/dist/feature-libraries/forest-summary/format.d.ts +2 -2
  50. package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
  51. package/dist/feature-libraries/forest-summary/format.js +1 -1
  52. package/dist/feature-libraries/forest-summary/format.js.map +1 -1
  53. package/dist/feature-libraries/index.d.ts +1 -1
  54. package/dist/feature-libraries/index.d.ts.map +1 -1
  55. package/dist/feature-libraries/index.js +4 -2
  56. package/dist/feature-libraries/index.js.map +1 -1
  57. package/dist/feature-libraries/mapTreeCursor.d.ts +3 -3
  58. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  59. package/dist/feature-libraries/mapTreeCursor.js +2 -2
  60. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  61. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +9 -9
  62. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  63. package/dist/feature-libraries/modular-schema/modularChangeFormat.js +2 -2
  64. package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
  65. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +14 -1
  66. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  67. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +26 -5
  68. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  69. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  70. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  71. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  72. package/dist/feature-libraries/schema-index/codec.d.ts +34 -5
  73. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  74. package/dist/feature-libraries/schema-index/codec.js +63 -9
  75. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  76. package/{lib/feature-libraries/schema-index/format.d.ts → dist/feature-libraries/schema-index/formatV1.d.ts} +9 -9
  77. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -0
  78. package/dist/feature-libraries/schema-index/{format.js → formatV1.js} +4 -4
  79. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -0
  80. package/dist/feature-libraries/schema-index/index.d.ts +2 -2
  81. package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
  82. package/dist/feature-libraries/schema-index/index.js +6 -3
  83. package/dist/feature-libraries/schema-index/index.js.map +1 -1
  84. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +5 -5
  85. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  86. package/dist/feature-libraries/schema-index/schemaSummarizer.js +4 -4
  87. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  88. package/dist/index.d.ts +3 -2
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +10 -8
  91. package/dist/index.js.map +1 -1
  92. package/dist/internalTypes.d.ts +0 -1
  93. package/dist/internalTypes.d.ts.map +1 -1
  94. package/dist/internalTypes.js.map +1 -1
  95. package/dist/jsonDomainSchema.d.ts +2 -2
  96. package/dist/jsonDomainSchema.js +2 -2
  97. package/dist/jsonDomainSchema.js.map +1 -1
  98. package/dist/legacy.d.ts +2 -0
  99. package/dist/packageVersion.d.ts +1 -1
  100. package/dist/packageVersion.js +1 -1
  101. package/dist/packageVersion.js.map +1 -1
  102. package/dist/public.d.ts +2 -0
  103. package/dist/serializableDomainSchema.d.ts +3 -3
  104. package/dist/serializableDomainSchema.js +2 -2
  105. package/dist/serializableDomainSchema.js.map +1 -1
  106. package/dist/shared-tree/independentView.d.ts +1 -1
  107. package/dist/shared-tree/independentView.d.ts.map +1 -1
  108. package/dist/shared-tree/independentView.js +1 -1
  109. package/dist/shared-tree/independentView.js.map +1 -1
  110. package/dist/shared-tree/index.d.ts +4 -3
  111. package/dist/shared-tree/index.d.ts.map +1 -1
  112. package/dist/shared-tree/index.js +6 -5
  113. package/dist/shared-tree/index.js.map +1 -1
  114. package/dist/shared-tree/schematizeTree.d.ts +10 -11
  115. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  116. package/dist/shared-tree/schematizeTree.js +11 -36
  117. package/dist/shared-tree/schematizeTree.js.map +1 -1
  118. package/dist/shared-tree/schematizingTreeView.d.ts +3 -3
  119. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  120. package/dist/shared-tree/schematizingTreeView.js +4 -7
  121. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  122. package/dist/shared-tree/sharedTree.d.ts +28 -3
  123. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  124. package/dist/shared-tree/sharedTree.js +29 -3
  125. package/dist/shared-tree/sharedTree.js.map +1 -1
  126. package/dist/shared-tree/{treeApi.d.ts → tree.d.ts} +58 -34
  127. package/dist/shared-tree/tree.d.ts.map +1 -0
  128. package/dist/shared-tree/{treeApi.js → tree.js} +6 -6
  129. package/dist/shared-tree/tree.js.map +1 -0
  130. package/{lib/shared-tree/treeApiAlpha.d.ts → dist/shared-tree/treeAlpha.d.ts} +24 -14
  131. package/dist/shared-tree/treeAlpha.d.ts.map +1 -0
  132. package/dist/shared-tree/{treeApiAlpha.js → treeAlpha.js} +7 -5
  133. package/dist/shared-tree/treeAlpha.js.map +1 -0
  134. package/dist/shared-tree-core/branchCommitEnricher.d.ts +0 -1
  135. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  136. package/dist/shared-tree-core/branchCommitEnricher.js +0 -1
  137. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  138. package/dist/shared-tree-core/transactionEnricher.d.ts +1 -1
  139. package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  140. package/dist/shared-tree-core/transactionEnricher.js +4 -1
  141. package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
  142. package/dist/simple-tree/api/conciseTree.d.ts +1 -1
  143. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  144. package/dist/simple-tree/api/configuration.d.ts +177 -0
  145. package/dist/simple-tree/api/configuration.d.ts.map +1 -0
  146. package/dist/simple-tree/api/configuration.js +163 -0
  147. package/dist/simple-tree/api/configuration.js.map +1 -0
  148. package/dist/simple-tree/api/getJsonSchema.js +2 -2
  149. package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
  150. package/dist/simple-tree/api/index.d.ts +9 -5
  151. package/dist/simple-tree/api/index.d.ts.map +1 -1
  152. package/dist/simple-tree/api/index.js +9 -7
  153. package/dist/simple-tree/api/index.js.map +1 -1
  154. package/dist/simple-tree/api/{view.d.ts → schemaCompatibilityTester.d.ts} +8 -10
  155. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -0
  156. package/dist/simple-tree/api/{view.js → schemaCompatibilityTester.js} +9 -9
  157. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -0
  158. package/dist/simple-tree/api/schemaFactory.d.ts +25 -10
  159. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  160. package/dist/simple-tree/api/schemaFactory.js +27 -12
  161. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  162. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +12 -6
  163. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  164. package/dist/simple-tree/api/schemaFactoryAlpha.js +2 -2
  165. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  166. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +67 -4
  167. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  168. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  169. package/dist/simple-tree/api/schemaFromSimple.d.ts +1 -1
  170. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  171. package/dist/simple-tree/api/schemaFromSimple.js +1 -1
  172. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  173. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  174. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  175. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  176. package/dist/simple-tree/api/storedSchema.d.ts +11 -10
  177. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  178. package/dist/simple-tree/api/storedSchema.js +16 -11
  179. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  180. package/dist/simple-tree/api/tree.d.ts +30 -174
  181. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  182. package/dist/simple-tree/api/tree.js +1 -156
  183. package/dist/simple-tree/api/tree.js.map +1 -1
  184. package/{lib/simple-tree/api/treeApiBeta.d.ts → dist/simple-tree/api/treeBeta.d.ts} +17 -6
  185. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -0
  186. package/dist/simple-tree/api/{treeApiBeta.js → treeBeta.js} +5 -4
  187. package/dist/simple-tree/api/treeBeta.js.map +1 -0
  188. package/dist/simple-tree/api/treeChangeEvents.d.ts +83 -0
  189. package/dist/simple-tree/api/treeChangeEvents.d.ts.map +1 -0
  190. package/dist/simple-tree/api/treeChangeEvents.js +7 -0
  191. package/dist/simple-tree/api/treeChangeEvents.js.map +1 -0
  192. package/dist/simple-tree/api/treeNodeApi.d.ts +2 -1
  193. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  194. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  195. package/dist/simple-tree/api/typesUnsafe.d.ts +4 -9
  196. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  197. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  198. package/dist/simple-tree/arrayNode.d.ts +30 -2
  199. package/dist/simple-tree/arrayNode.d.ts.map +1 -1
  200. package/dist/simple-tree/arrayNode.js +3 -2
  201. package/dist/simple-tree/arrayNode.js.map +1 -1
  202. package/dist/simple-tree/arrayNodeTypes.d.ts +3 -3
  203. package/dist/simple-tree/arrayNodeTypes.d.ts.map +1 -1
  204. package/dist/simple-tree/arrayNodeTypes.js.map +1 -1
  205. package/dist/simple-tree/core/getOrCreateNode.d.ts +1 -1
  206. package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  207. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
  208. package/dist/simple-tree/core/index.d.ts +2 -1
  209. package/dist/simple-tree/core/index.d.ts.map +1 -1
  210. package/dist/simple-tree/core/index.js +5 -5
  211. package/dist/simple-tree/core/index.js.map +1 -1
  212. package/dist/simple-tree/core/treeNode.d.ts +94 -0
  213. package/dist/simple-tree/core/treeNode.d.ts.map +1 -0
  214. package/dist/simple-tree/core/treeNode.js +123 -0
  215. package/dist/simple-tree/core/treeNode.js.map +1 -0
  216. package/dist/simple-tree/core/treeNodeKernel.d.ts +2 -1
  217. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  218. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  219. package/dist/simple-tree/core/treeNodeSchema.d.ts +3 -1
  220. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  221. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  222. package/dist/simple-tree/core/types.d.ts +0 -165
  223. package/dist/simple-tree/core/types.d.ts.map +1 -1
  224. package/dist/simple-tree/core/types.js +1 -113
  225. package/dist/simple-tree/core/types.js.map +1 -1
  226. package/dist/simple-tree/core/withType.d.ts +1 -1
  227. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  228. package/dist/simple-tree/core/withType.js.map +1 -1
  229. package/dist/simple-tree/index.d.ts +4 -4
  230. package/dist/simple-tree/index.d.ts.map +1 -1
  231. package/dist/simple-tree/index.js +4 -3
  232. package/dist/simple-tree/index.js.map +1 -1
  233. package/dist/simple-tree/mapNode.d.ts +2 -2
  234. package/dist/simple-tree/mapNode.d.ts.map +1 -1
  235. package/dist/simple-tree/mapNode.js +1 -1
  236. package/dist/simple-tree/mapNode.js.map +1 -1
  237. package/dist/simple-tree/mapNodeTypes.d.ts +3 -3
  238. package/dist/simple-tree/mapNodeTypes.d.ts.map +1 -1
  239. package/dist/simple-tree/mapNodeTypes.js.map +1 -1
  240. package/dist/simple-tree/objectNode.d.ts +18 -5
  241. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  242. package/dist/simple-tree/objectNode.js +4 -3
  243. package/dist/simple-tree/objectNode.js.map +1 -1
  244. package/dist/simple-tree/objectNodeTypes.d.ts +4 -4
  245. package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -1
  246. package/dist/simple-tree/objectNodeTypes.js.map +1 -1
  247. package/dist/simple-tree/schemaTypes.d.ts +164 -13
  248. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  249. package/dist/simple-tree/schemaTypes.js +107 -8
  250. package/dist/simple-tree/schemaTypes.js.map +1 -1
  251. package/dist/simple-tree/toStoredSchema.d.ts +8 -8
  252. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  253. package/dist/simple-tree/toStoredSchema.js +27 -32
  254. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  255. package/dist/simple-tree/treeNodeValid.js +2 -2
  256. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  257. package/dist/tableSchema.d.ts +455 -125
  258. package/dist/tableSchema.d.ts.map +1 -1
  259. package/dist/tableSchema.js +398 -101
  260. package/dist/tableSchema.js.map +1 -1
  261. package/dist/treeFactory.d.ts +1 -1
  262. package/dist/treeFactory.d.ts.map +1 -1
  263. package/dist/treeFactory.js +30 -75
  264. package/dist/treeFactory.js.map +1 -1
  265. package/dist/util/typeUtils.d.ts +1 -1
  266. package/dist/util/typeUtils.js.map +1 -1
  267. package/lib/alpha.d.ts +17 -1
  268. package/lib/beta.d.ts +2 -0
  269. package/lib/codec/codec.d.ts +5 -1
  270. package/lib/codec/codec.d.ts.map +1 -1
  271. package/lib/codec/codec.js +5 -1
  272. package/lib/codec/codec.js.map +1 -1
  273. package/lib/codec/index.d.ts +1 -1
  274. package/lib/codec/index.d.ts.map +1 -1
  275. package/lib/codec/index.js +1 -1
  276. package/lib/codec/index.js.map +1 -1
  277. package/lib/core/index.d.ts +2 -2
  278. package/lib/core/index.d.ts.map +1 -1
  279. package/lib/core/index.js +2 -2
  280. package/lib/core/index.js.map +1 -1
  281. package/lib/core/schema-stored/{format.d.ts → formatV1.d.ts} +1 -1
  282. package/lib/core/schema-stored/formatV1.d.ts.map +1 -0
  283. package/lib/core/schema-stored/{format.js → formatV1.js} +1 -1
  284. package/lib/core/schema-stored/formatV1.js.map +1 -0
  285. package/lib/core/schema-stored/index.d.ts +3 -3
  286. package/lib/core/schema-stored/index.d.ts.map +1 -1
  287. package/lib/core/schema-stored/index.js +2 -2
  288. package/lib/core/schema-stored/index.js.map +1 -1
  289. package/lib/core/schema-stored/schema.d.ts +3 -1
  290. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  291. package/lib/core/schema-stored/schema.js +3 -1
  292. package/lib/core/schema-stored/schema.js.map +1 -1
  293. package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  294. package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  295. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  296. package/lib/core/schema-view/index.d.ts +1 -1
  297. package/lib/core/schema-view/index.d.ts.map +1 -1
  298. package/lib/core/schema-view/index.js +1 -1
  299. package/lib/core/schema-view/index.js.map +1 -1
  300. package/lib/core/schema-view/view.d.ts +0 -27
  301. package/lib/core/schema-view/view.d.ts.map +1 -1
  302. package/lib/core/schema-view/view.js +0 -34
  303. package/lib/core/schema-view/view.js.map +1 -1
  304. package/lib/core/tree/persistedTreeTextFormat.d.ts +4 -4
  305. package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  306. package/lib/core/tree/persistedTreeTextFormat.js +2 -2
  307. package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
  308. package/lib/feature-libraries/forest-summary/format.d.ts +2 -2
  309. package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
  310. package/lib/feature-libraries/forest-summary/format.js +2 -2
  311. package/lib/feature-libraries/forest-summary/format.js.map +1 -1
  312. package/lib/feature-libraries/index.d.ts +1 -1
  313. package/lib/feature-libraries/index.d.ts.map +1 -1
  314. package/lib/feature-libraries/index.js +1 -1
  315. package/lib/feature-libraries/index.js.map +1 -1
  316. package/lib/feature-libraries/mapTreeCursor.d.ts +3 -3
  317. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  318. package/lib/feature-libraries/mapTreeCursor.js +2 -2
  319. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  320. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +9 -9
  321. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  322. package/lib/feature-libraries/modular-schema/modularChangeFormat.js +3 -3
  323. package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
  324. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +14 -1
  325. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  326. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +26 -6
  327. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  328. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  329. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  330. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js +3 -3
  331. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  332. package/lib/feature-libraries/schema-index/codec.d.ts +34 -5
  333. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  334. package/lib/feature-libraries/schema-index/codec.js +61 -9
  335. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  336. package/{dist/feature-libraries/schema-index/format.d.ts → lib/feature-libraries/schema-index/formatV1.d.ts} +9 -9
  337. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -0
  338. package/lib/feature-libraries/schema-index/{format.js → formatV1.js} +5 -5
  339. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -0
  340. package/lib/feature-libraries/schema-index/index.d.ts +2 -2
  341. package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
  342. package/lib/feature-libraries/schema-index/index.js +2 -2
  343. package/lib/feature-libraries/schema-index/index.js.map +1 -1
  344. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +5 -5
  345. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  346. package/lib/feature-libraries/schema-index/schemaSummarizer.js +5 -5
  347. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  348. package/lib/index.d.ts +3 -2
  349. package/lib/index.d.ts.map +1 -1
  350. package/lib/index.js +1 -0
  351. package/lib/index.js.map +1 -1
  352. package/lib/internalTypes.d.ts +0 -1
  353. package/lib/internalTypes.d.ts.map +1 -1
  354. package/lib/internalTypes.js.map +1 -1
  355. package/lib/jsonDomainSchema.d.ts +2 -2
  356. package/lib/jsonDomainSchema.js +2 -2
  357. package/lib/jsonDomainSchema.js.map +1 -1
  358. package/lib/legacy.d.ts +2 -0
  359. package/lib/packageVersion.d.ts +1 -1
  360. package/lib/packageVersion.js +1 -1
  361. package/lib/packageVersion.js.map +1 -1
  362. package/lib/public.d.ts +2 -0
  363. package/lib/serializableDomainSchema.d.ts +3 -3
  364. package/lib/serializableDomainSchema.js +2 -2
  365. package/lib/serializableDomainSchema.js.map +1 -1
  366. package/lib/shared-tree/independentView.d.ts +1 -1
  367. package/lib/shared-tree/independentView.d.ts.map +1 -1
  368. package/lib/shared-tree/independentView.js +2 -2
  369. package/lib/shared-tree/independentView.js.map +1 -1
  370. package/lib/shared-tree/index.d.ts +4 -3
  371. package/lib/shared-tree/index.d.ts.map +1 -1
  372. package/lib/shared-tree/index.js +3 -3
  373. package/lib/shared-tree/index.js.map +1 -1
  374. package/lib/shared-tree/schematizeTree.d.ts +10 -11
  375. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  376. package/lib/shared-tree/schematizeTree.js +12 -37
  377. package/lib/shared-tree/schematizeTree.js.map +1 -1
  378. package/lib/shared-tree/schematizingTreeView.d.ts +3 -3
  379. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  380. package/lib/shared-tree/schematizingTreeView.js +6 -9
  381. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  382. package/lib/shared-tree/sharedTree.d.ts +28 -3
  383. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  384. package/lib/shared-tree/sharedTree.js +29 -4
  385. package/lib/shared-tree/sharedTree.js.map +1 -1
  386. package/lib/shared-tree/{treeApi.d.ts → tree.d.ts} +58 -34
  387. package/lib/shared-tree/tree.d.ts.map +1 -0
  388. package/lib/shared-tree/{treeApi.js → tree.js} +5 -5
  389. package/lib/shared-tree/tree.js.map +1 -0
  390. package/{dist/shared-tree/treeApiAlpha.d.ts → lib/shared-tree/treeAlpha.d.ts} +24 -14
  391. package/lib/shared-tree/treeAlpha.d.ts.map +1 -0
  392. package/lib/shared-tree/{treeApiAlpha.js → treeAlpha.js} +8 -6
  393. package/lib/shared-tree/treeAlpha.js.map +1 -0
  394. package/lib/shared-tree-core/branchCommitEnricher.d.ts +0 -1
  395. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  396. package/lib/shared-tree-core/branchCommitEnricher.js +0 -1
  397. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  398. package/lib/shared-tree-core/transactionEnricher.d.ts +1 -1
  399. package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  400. package/lib/shared-tree-core/transactionEnricher.js +4 -1
  401. package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
  402. package/lib/simple-tree/api/conciseTree.d.ts +1 -1
  403. package/lib/simple-tree/api/conciseTree.js.map +1 -1
  404. package/lib/simple-tree/api/configuration.d.ts +177 -0
  405. package/lib/simple-tree/api/configuration.d.ts.map +1 -0
  406. package/lib/simple-tree/api/configuration.js +157 -0
  407. package/lib/simple-tree/api/configuration.js.map +1 -0
  408. package/lib/simple-tree/api/getJsonSchema.js +1 -1
  409. package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
  410. package/lib/simple-tree/api/index.d.ts +9 -5
  411. package/lib/simple-tree/api/index.d.ts.map +1 -1
  412. package/lib/simple-tree/api/index.js +5 -4
  413. package/lib/simple-tree/api/index.js.map +1 -1
  414. package/lib/simple-tree/api/{view.d.ts → schemaCompatibilityTester.d.ts} +8 -10
  415. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -0
  416. package/lib/simple-tree/api/{view.js → schemaCompatibilityTester.js} +7 -7
  417. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -0
  418. package/lib/simple-tree/api/schemaFactory.d.ts +25 -10
  419. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  420. package/lib/simple-tree/api/schemaFactory.js +27 -12
  421. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  422. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +12 -6
  423. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  424. package/lib/simple-tree/api/schemaFactoryAlpha.js +2 -2
  425. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  426. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +67 -4
  427. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  428. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  429. package/lib/simple-tree/api/schemaFromSimple.d.ts +1 -1
  430. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  431. package/lib/simple-tree/api/schemaFromSimple.js +1 -1
  432. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  433. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  434. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  435. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  436. package/lib/simple-tree/api/storedSchema.d.ts +11 -10
  437. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  438. package/lib/simple-tree/api/storedSchema.js +20 -13
  439. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  440. package/lib/simple-tree/api/tree.d.ts +30 -174
  441. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  442. package/lib/simple-tree/api/tree.js +0 -152
  443. package/lib/simple-tree/api/tree.js.map +1 -1
  444. package/{dist/simple-tree/api/treeApiBeta.d.ts → lib/simple-tree/api/treeBeta.d.ts} +17 -6
  445. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -0
  446. package/lib/simple-tree/api/{treeApiBeta.js → treeBeta.js} +5 -4
  447. package/lib/simple-tree/api/treeBeta.js.map +1 -0
  448. package/lib/simple-tree/api/treeChangeEvents.d.ts +83 -0
  449. package/lib/simple-tree/api/treeChangeEvents.d.ts.map +1 -0
  450. package/lib/simple-tree/api/treeChangeEvents.js +6 -0
  451. package/lib/simple-tree/api/treeChangeEvents.js.map +1 -0
  452. package/lib/simple-tree/api/treeNodeApi.d.ts +2 -1
  453. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  454. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  455. package/lib/simple-tree/api/typesUnsafe.d.ts +4 -9
  456. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  457. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  458. package/lib/simple-tree/arrayNode.d.ts +30 -2
  459. package/lib/simple-tree/arrayNode.d.ts.map +1 -1
  460. package/lib/simple-tree/arrayNode.js +4 -3
  461. package/lib/simple-tree/arrayNode.js.map +1 -1
  462. package/lib/simple-tree/arrayNodeTypes.d.ts +3 -3
  463. package/lib/simple-tree/arrayNodeTypes.d.ts.map +1 -1
  464. package/lib/simple-tree/arrayNodeTypes.js.map +1 -1
  465. package/lib/simple-tree/core/getOrCreateNode.d.ts +1 -1
  466. package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  467. package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
  468. package/lib/simple-tree/core/index.d.ts +2 -1
  469. package/lib/simple-tree/core/index.d.ts.map +1 -1
  470. package/lib/simple-tree/core/index.js +1 -1
  471. package/lib/simple-tree/core/index.js.map +1 -1
  472. package/lib/simple-tree/core/treeNode.d.ts +94 -0
  473. package/lib/simple-tree/core/treeNode.d.ts.map +1 -0
  474. package/lib/simple-tree/core/treeNode.js +118 -0
  475. package/lib/simple-tree/core/treeNode.js.map +1 -0
  476. package/lib/simple-tree/core/treeNodeKernel.d.ts +2 -1
  477. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  478. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  479. package/lib/simple-tree/core/treeNodeSchema.d.ts +3 -1
  480. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  481. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  482. package/lib/simple-tree/core/types.d.ts +0 -165
  483. package/lib/simple-tree/core/types.d.ts.map +1 -1
  484. package/lib/simple-tree/core/types.js +0 -110
  485. package/lib/simple-tree/core/types.js.map +1 -1
  486. package/lib/simple-tree/core/withType.d.ts +1 -1
  487. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  488. package/lib/simple-tree/core/withType.js.map +1 -1
  489. package/lib/simple-tree/index.d.ts +4 -4
  490. package/lib/simple-tree/index.d.ts.map +1 -1
  491. package/lib/simple-tree/index.js +1 -1
  492. package/lib/simple-tree/index.js.map +1 -1
  493. package/lib/simple-tree/mapNode.d.ts +2 -2
  494. package/lib/simple-tree/mapNode.d.ts.map +1 -1
  495. package/lib/simple-tree/mapNode.js +2 -2
  496. package/lib/simple-tree/mapNode.js.map +1 -1
  497. package/lib/simple-tree/mapNodeTypes.d.ts +3 -3
  498. package/lib/simple-tree/mapNodeTypes.d.ts.map +1 -1
  499. package/lib/simple-tree/mapNodeTypes.js.map +1 -1
  500. package/lib/simple-tree/objectNode.d.ts +18 -5
  501. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  502. package/lib/simple-tree/objectNode.js +5 -4
  503. package/lib/simple-tree/objectNode.js.map +1 -1
  504. package/lib/simple-tree/objectNodeTypes.d.ts +4 -4
  505. package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -1
  506. package/lib/simple-tree/objectNodeTypes.js.map +1 -1
  507. package/lib/simple-tree/schemaTypes.d.ts +164 -13
  508. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  509. package/lib/simple-tree/schemaTypes.js +96 -8
  510. package/lib/simple-tree/schemaTypes.js.map +1 -1
  511. package/lib/simple-tree/toStoredSchema.d.ts +8 -8
  512. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  513. package/lib/simple-tree/toStoredSchema.js +26 -31
  514. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  515. package/lib/simple-tree/treeNodeValid.js +2 -2
  516. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  517. package/lib/tableSchema.d.ts +455 -125
  518. package/lib/tableSchema.d.ts.map +1 -1
  519. package/lib/tableSchema.js +398 -101
  520. package/lib/tableSchema.js.map +1 -1
  521. package/lib/treeFactory.d.ts +1 -1
  522. package/lib/treeFactory.d.ts.map +1 -1
  523. package/lib/treeFactory.js +30 -75
  524. package/lib/treeFactory.js.map +1 -1
  525. package/lib/util/typeUtils.d.ts +1 -1
  526. package/lib/util/typeUtils.js.map +1 -1
  527. package/package.json +21 -21
  528. package/src/codec/codec.ts +6 -1
  529. package/src/codec/index.ts +1 -0
  530. package/src/core/index.ts +1 -2
  531. package/src/core/schema-stored/index.ts +3 -3
  532. package/src/core/schema-stored/schema.ts +3 -1
  533. package/src/core/schema-stored/storedSchemaRepository.ts +1 -1
  534. package/src/core/schema-view/index.ts +0 -1
  535. package/src/core/schema-view/view.ts +0 -31
  536. package/src/core/tree/persistedTreeTextFormat.ts +2 -2
  537. package/src/feature-libraries/forest-summary/format.ts +2 -2
  538. package/src/feature-libraries/index.ts +7 -1
  539. package/src/feature-libraries/mapTreeCursor.ts +3 -3
  540. package/src/feature-libraries/modular-schema/modularChangeFormat.ts +3 -3
  541. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +38 -9
  542. package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +3 -4
  543. package/src/feature-libraries/schema-index/codec.ts +80 -12
  544. package/src/feature-libraries/schema-index/{format.ts → formatV1.ts} +4 -4
  545. package/src/feature-libraries/schema-index/index.ts +7 -2
  546. package/src/feature-libraries/schema-index/schemaSummarizer.ts +9 -9
  547. package/src/index.ts +18 -1
  548. package/src/internalTypes.ts +0 -2
  549. package/src/jsonDomainSchema.ts +2 -2
  550. package/src/packageVersion.ts +1 -1
  551. package/src/serializableDomainSchema.ts +3 -3
  552. package/src/shared-tree/independentView.ts +4 -3
  553. package/src/shared-tree/index.ts +5 -6
  554. package/src/shared-tree/schematizeTree.ts +10 -40
  555. package/src/shared-tree/schematizingTreeView.ts +12 -17
  556. package/src/shared-tree/sharedTree.ts +67 -6
  557. package/src/shared-tree/{treeApi.ts → tree.ts} +75 -51
  558. package/src/shared-tree/{treeApiAlpha.ts → treeAlpha.ts} +28 -16
  559. package/src/shared-tree-core/branchCommitEnricher.ts +0 -1
  560. package/src/shared-tree-core/transactionEnricher.ts +4 -1
  561. package/src/simple-tree/api/conciseTree.ts +1 -1
  562. package/src/simple-tree/api/configuration.ts +353 -0
  563. package/src/simple-tree/api/getJsonSchema.ts +1 -1
  564. package/src/simple-tree/api/index.ts +23 -15
  565. package/src/simple-tree/api/{view.ts → schemaCompatibilityTester.ts} +8 -15
  566. package/src/simple-tree/api/schemaFactory.ts +139 -19
  567. package/src/simple-tree/api/schemaFactoryAlpha.ts +7 -5
  568. package/src/simple-tree/api/schemaFactoryRecursive.ts +102 -38
  569. package/src/simple-tree/api/schemaFromSimple.ts +2 -2
  570. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -1
  571. package/src/simple-tree/api/storedSchema.ts +32 -17
  572. package/src/simple-tree/api/tree.ts +38 -354
  573. package/src/simple-tree/api/{treeApiBeta.ts → treeBeta.ts} +20 -6
  574. package/src/simple-tree/api/treeChangeEvents.ts +84 -0
  575. package/src/simple-tree/api/treeNodeApi.ts +1 -1
  576. package/src/simple-tree/api/typesUnsafe.ts +15 -11
  577. package/src/simple-tree/arrayNode.ts +38 -5
  578. package/src/simple-tree/arrayNodeTypes.ts +8 -7
  579. package/src/simple-tree/core/getOrCreateNode.ts +1 -1
  580. package/src/simple-tree/core/index.ts +5 -4
  581. package/src/simple-tree/core/treeNode.ts +163 -0
  582. package/src/simple-tree/core/treeNodeKernel.ts +2 -1
  583. package/src/simple-tree/core/treeNodeSchema.ts +3 -1
  584. package/src/simple-tree/core/types.ts +0 -234
  585. package/src/simple-tree/core/withType.ts +1 -1
  586. package/src/simple-tree/index.ts +19 -2
  587. package/src/simple-tree/mapNode.ts +11 -3
  588. package/src/simple-tree/mapNodeTypes.ts +10 -7
  589. package/src/simple-tree/objectNode.ts +39 -15
  590. package/src/simple-tree/objectNodeTypes.ts +9 -5
  591. package/src/simple-tree/schemaTypes.ts +354 -25
  592. package/src/simple-tree/toStoredSchema.ts +42 -41
  593. package/src/simple-tree/treeNodeValid.ts +2 -2
  594. package/src/tableSchema.ts +1206 -434
  595. package/src/treeFactory.ts +56 -173
  596. package/src/util/typeUtils.ts +1 -1
  597. package/dist/core/schema-stored/format.d.ts.map +0 -1
  598. package/dist/core/schema-stored/format.js.map +0 -1
  599. package/dist/feature-libraries/schema-index/format.d.ts.map +0 -1
  600. package/dist/feature-libraries/schema-index/format.js.map +0 -1
  601. package/dist/shared-tree/treeApi.d.ts.map +0 -1
  602. package/dist/shared-tree/treeApi.js.map +0 -1
  603. package/dist/shared-tree/treeApiAlpha.d.ts.map +0 -1
  604. package/dist/shared-tree/treeApiAlpha.js.map +0 -1
  605. package/dist/simple-tree/api/treeApiBeta.d.ts.map +0 -1
  606. package/dist/simple-tree/api/treeApiBeta.js.map +0 -1
  607. package/dist/simple-tree/api/view.d.ts.map +0 -1
  608. package/dist/simple-tree/api/view.js.map +0 -1
  609. package/lib/core/schema-stored/format.d.ts.map +0 -1
  610. package/lib/core/schema-stored/format.js.map +0 -1
  611. package/lib/feature-libraries/schema-index/format.d.ts.map +0 -1
  612. package/lib/feature-libraries/schema-index/format.js.map +0 -1
  613. package/lib/shared-tree/treeApi.d.ts.map +0 -1
  614. package/lib/shared-tree/treeApi.js.map +0 -1
  615. package/lib/shared-tree/treeApiAlpha.d.ts.map +0 -1
  616. package/lib/shared-tree/treeApiAlpha.js.map +0 -1
  617. package/lib/simple-tree/api/treeApiBeta.d.ts.map +0 -1
  618. package/lib/simple-tree/api/treeApiBeta.js.map +0 -1
  619. package/lib/simple-tree/api/view.d.ts.map +0 -1
  620. package/lib/simple-tree/api/view.js.map +0 -1
  621. /package/src/core/schema-stored/{format.ts → formatV1.ts} +0 -0
@@ -2,40 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- /**
6
- * APIs for applying `view schema` to documents.
7
- */
8
- /**
9
- * What kinds of updates to stored schema to permit.
10
- *
11
- * Bit flags enum.
12
- */
13
- export var AllowedUpdateType;
14
- (function (AllowedUpdateType) {
15
- /**
16
- * Do not update the stored schema to match view schema.
17
- */
18
- AllowedUpdateType[AllowedUpdateType["None"] = 0] = "None";
19
- /**
20
- * Update the stored schema as part of initializing an empty document.
21
- *
22
- * Includes "Initialize".
23
- */
24
- // eslint-disable-next-line no-bitwise
25
- AllowedUpdateType[AllowedUpdateType["Initialize"] = 1] = "Initialize";
26
- /**
27
- * Update the stored schema to match the view schema if the current document contents are compatible with the view schema.
28
- * TODO: support this option.
29
- */
30
- // DataCompatible,
31
- /**
32
- * Update the stored schema to match view schema if all possible documents based on the current stored schema would be compatible with the view schema.
33
- *
34
- * Includes "Initialize".
35
- */
36
- // eslint-disable-next-line no-bitwise
37
- AllowedUpdateType[AllowedUpdateType["SchemaCompatible"] = 2] = "SchemaCompatible";
38
- })(AllowedUpdateType || (AllowedUpdateType = {}));
39
5
  /**
40
6
  * A collection of View information for schema, including policy.
41
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../src/core/schema-view/view.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AAEH;;;;GAIG;AACH,MAAM,CAAN,IAAY,iBAwBX;AAxBD,WAAY,iBAAiB;IAC5B;;OAEG;IACH,yDAAQ,CAAA;IACR;;;;OAIG;IACH,sCAAsC;IACtC,qEAAmB,CAAA;IACnB;;;OAGG;IACH,kBAAkB;IAClB;;;;OAIG;IACH,sCAAsC;IACtC,iFAAyB,CAAA;AAC1B,CAAC,EAxBW,iBAAiB,KAAjB,iBAAiB,QAwB5B;AAsBD;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAC7B,YACiB,QAAkB,EAClB,oBAAsC;QADtC,aAAQ,GAAR,QAAQ,CAAU;QAClB,yBAAoB,GAApB,oBAAoB,CAAkB;IACpD,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TreeNodeSchemaIdentifier, TreeStoredSchema } from \"../schema-stored/index.js\";\n\n/**\n * APIs for applying `view schema` to documents.\n */\n\n/**\n * What kinds of updates to stored schema to permit.\n *\n * Bit flags enum.\n */\nexport enum AllowedUpdateType {\n\t/**\n\t * Do not update the stored schema to match view schema.\n\t */\n\tNone = 0,\n\t/**\n\t * Update the stored schema as part of initializing an empty document.\n\t *\n\t * Includes \"Initialize\".\n\t */\n\t// eslint-disable-next-line no-bitwise\n\tInitialize = 1 << 0,\n\t/**\n\t * Update the stored schema to match the view schema if the current document contents are compatible with the view schema.\n\t * TODO: support this option.\n\t */\n\t// DataCompatible,\n\t/**\n\t * Update the stored schema to match view schema if all possible documents based on the current stored schema would be compatible with the view schema.\n\t *\n\t * Includes \"Initialize\".\n\t */\n\t// eslint-disable-next-line no-bitwise\n\tSchemaCompatible = 1 << 1,\n}\n\n/**\n */\nexport interface TreeAdapter {\n\treadonly output: TreeNodeSchemaIdentifier;\n\treadonly input: TreeNodeSchemaIdentifier;\n\n\t// TODO: include actual adapter functionality, not just what types it converts\n}\n\n/**\n * Minimal selection of adapters (nothing for general out of schema, field level adjustments etc.).\n * Would be used with schematize and have actual conversion/update functionality.\n *\n * TODO: Support more kinds of adapters\n * TODO: support efficient lookup of adapters\n */\nexport interface Adapters {\n\treadonly tree?: readonly TreeAdapter[];\n}\n\n/**\n * A collection of View information for schema, including policy.\n */\nexport class AdaptedViewSchema {\n\tpublic constructor(\n\t\tpublic readonly adapters: Adapters,\n\t\tpublic readonly adaptedForViewSchema: TreeStoredSchema,\n\t) {}\n}\n"]}
1
+ {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../src/core/schema-view/view.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4BH;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAC7B,YACiB,QAAkB,EAClB,oBAAsC;QADtC,aAAQ,GAAR,QAAQ,CAAU;QAClB,yBAAoB,GAApB,oBAAoB,CAAkB;IACpD,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TreeNodeSchemaIdentifier, TreeStoredSchema } from \"../schema-stored/index.js\";\n\n/**\n * APIs for applying `view schema` to documents.\n */\n\n/**\n */\nexport interface TreeAdapter {\n\treadonly output: TreeNodeSchemaIdentifier;\n\treadonly input: TreeNodeSchemaIdentifier;\n\n\t// TODO: include actual adapter functionality, not just what types it converts\n}\n\n/**\n * Minimal selection of adapters (nothing for general out of schema, field level adjustments etc.).\n * Would be used with schematize and have actual conversion/update functionality.\n *\n * TODO: Support more kinds of adapters\n * TODO: support efficient lookup of adapters\n */\nexport interface Adapters {\n\treadonly tree?: readonly TreeAdapter[];\n}\n\n/**\n * A collection of View information for schema, including policy.\n */\nexport class AdaptedViewSchema {\n\tpublic constructor(\n\t\tpublic readonly adapters: Adapters,\n\t\tpublic readonly adaptedForViewSchema: TreeStoredSchema,\n\t) {}\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { type Static, type TSchema } from "@sinclair/typebox";
6
- import { schemaFormat } from "../schema-stored/index.js";
6
+ import { schemaFormatV1 } from "../schema-stored/index.js";
7
7
  /**
8
8
  * This module contains persisted types for a simple, human-readable tree format.
9
9
  *
@@ -49,7 +49,7 @@ declare const EncodedFieldMapObject: <Schema extends TSchema>(tChild: Schema) =>
49
49
  type EncodedNodeData = Static<typeof EncodedNodeData>;
50
50
  declare const EncodedNodeData: import("@sinclair/typebox").TObject<{
51
51
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
52
- type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<schemaFormat.TreeNodeSchemaIdentifier<string>>>;
52
+ type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<schemaFormatV1.TreeNodeSchemaIdentifier<string>>>;
53
53
  }>;
54
54
  /**
55
55
  * Json comparable field collection, generic over child type.
@@ -72,7 +72,7 @@ interface EncodedGenericTreeNode<TChild> extends EncodedGenericFieldsNode<TChild
72
72
  declare const EncodedGenericTreeNode: <Schema extends TSchema>(tChild: Schema) => import("@sinclair/typebox").TObject<{
73
73
  fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<Schema>>>;
74
74
  globalFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<Schema>>>;
75
- type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<schemaFormat.TreeNodeSchemaIdentifier<string>>>;
75
+ type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<schemaFormatV1.TreeNodeSchemaIdentifier<string>>>;
76
76
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
77
77
  }>;
78
78
  /**
@@ -86,7 +86,7 @@ export interface EncodedJsonableTree extends EncodedGenericTreeNode<EncodedJsona
86
86
  export declare const EncodedJsonableTree: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
87
87
  fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
88
88
  globalFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>>>;
89
- type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<schemaFormat.TreeNodeSchemaIdentifier<string>>>;
89
+ type: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnsafe<schemaFormatV1.TreeNodeSchemaIdentifier<string>>>;
90
90
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
91
91
  }>>;
92
92
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"persistedTreeTextFormat.d.ts","sourceRoot":"","sources":["../../../src/core/tree/persistedTreeTextFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAE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AAKH;;;;;;;;;;;;;;;;GAgBG;AACH,UAAU,qBAAqB,CAAC,MAAM;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACxB;AACD,QAAA,MAAM,qBAAqB,mCAAoC,MAAM,yHACL,CAAC;AAEjE,KAAK,eAAe,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AACtD,QAAA,MAAM,eAAe;;;EAGnB,CAAC;AAEH;;;GAGG;AACH,UAAU,wBAAwB,CAAC,MAAM;IACxC,MAAM,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;CAC7C;AACD,QAAA,MAAM,wBAAwB,mCAAoC,MAAM;;;EAIrE,CAAC;AAEJ;;;GAGG;AACH,UAAU,sBAAsB,CAAC,MAAM,CACtC,SAAQ,wBAAwB,CAAC,MAAM,CAAC,EACvC,eAAe;CAAG;AACpB,QAAA,MAAM,sBAAsB,mCAAoC,MAAM;;;;;EAGnE,CAAC;AAEJ;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB,CAAC,mBAAmB,CAAC;CAAG;AAC3F,eAAO,MAAM,mBAAmB;;;;;GAAyD,CAAC"}
@@ -3,11 +3,11 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { Type } from "@sinclair/typebox";
6
- import { schemaFormat } from "../schema-stored/index.js";
6
+ import { schemaFormatV1 } from "../schema-stored/index.js";
7
7
  const EncodedFieldMapObject = (tChild) => Type.Record(Type.String(), Type.Array(tChild, { minItems: 1 }));
8
8
  const EncodedNodeData = Type.Object({
9
9
  value: Type.Optional(Type.Any()),
10
- type: Type.Readonly(schemaFormat.TreeNodeSchemaIdentifierSchema),
10
+ type: Type.Readonly(schemaFormatV1.TreeNodeSchemaIdentifierSchema),
11
11
  });
12
12
  const EncodedGenericFieldsNode = (tChild) => Type.Object({
13
13
  fields: Type.Optional(EncodedF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E","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type Static, type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { schemaFormat } from \"../schema-stored/index.js\";\n\n/**\n * This module contains persisted types for a simple, human-readable tree format.\n *\n * It was forked from `treeTextFormat.ts` to more cleanly separate compatibility concerns: in the long-term,\n * treeTextFormat.ts is intended to be useful for debugging/test purposes but not for persisted document storage\n * due to its unoptimized nature.\n *\n * However, at the time of forking it was also used as a persisted format for several of SharedTree's indexes.\n * Using the same types for both scenarios is problematic since `treeTextFormat.ts` types are exposed to the\n * public API.\n * These types should be used instead for all persisted format concerns.\n *\n * Before SharedTree has committed to persisted format backwards-compatibility, changes to `treeTextFormat.ts`\n * should be accompanied by the same changes to this module.\n *\n * After that point, changes to `treeTextFormat.ts` will necessitate changes to codecs that deal with these types\n * (and types in this module should not be changed except in compliance with persisted type compatibility guidelines).\n *\n * Longer-term, usages of these types should likely be replaced with a more optimized format.\n * If that switch happens before SharedTree commits to back-compat, this persisted format file can be deleted.\n */\n\n// Many of the return types in this module are intentionally derived, rather than explicitly specified.\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/**\n * Json compatible map as object.\n * Keys are FieldKey strings.\n * Values are the content of the field specified by the key.\n *\n * WARNING:\n * Be very careful when using objects as maps:\n * Use `Object.prototype.hasOwnProperty.call(fieldMap, key)` to safely check for keys.\n * Do NOT simply read the field and check for undefined as this will return values for `__proto__`\n * and various methods on Object.prototype, like `hasOwnProperty` and `toString`.\n * This exposes numerous bug possibilities, including prototype pollution.\n *\n * Due to the above issue, try to avoid this type (and the whole object as map pattern).\n * Only use this type when needed for json compatible maps,\n * but even in those cases consider lists of key value pairs for serialization and using `Map`\n * for runtime.\n */\ninterface EncodedFieldMapObject<TChild> {\n\t[key: string]: TChild[];\n}\nconst EncodedFieldMapObject = <Schema extends TSchema>(tChild: Schema) =>\n\tType.Record(Type.String(), Type.Array(tChild, { minItems: 1 }));\n\ntype EncodedNodeData = Static<typeof EncodedNodeData>;\nconst EncodedNodeData = Type.Object({\n\tvalue: Type.Optional(Type.Any()),\n\ttype: Type.Readonly(schemaFormat.TreeNodeSchemaIdentifierSchema),\n});\n\n/**\n * Json comparable field collection, generic over child type.\n * Json compatibility assumes `TChild` is also json compatible.\n */\ninterface EncodedGenericFieldsNode<TChild> {\n\tfields?: EncodedFieldMapObject<TChild>;\n\tglobalFields?: EncodedFieldMapObject<TChild>;\n}\nconst EncodedGenericFieldsNode = <Schema extends TSchema>(tChild: Schema) =>\n\tType.Object({\n\t\tfields: Type.Optional(EncodedFieldMapObject(tChild)),\n\t\tglobalFields: Type.Optional(EncodedFieldMapObject(tChild)),\n\t});\n\n/**\n * Json comparable tree node, generic over child type.\n * Json compatibility assumes `TChild` is also json compatible.\n */\ninterface EncodedGenericTreeNode<TChild>\n\textends EncodedGenericFieldsNode<TChild>,\n\t\tEncodedNodeData {}\nconst EncodedGenericTreeNode = <Schema extends TSchema>(tChild: Schema) =>\n\tType.Composite([EncodedGenericFieldsNode(tChild), EncodedNodeData], {\n\t\tadditionalProperties: false,\n\t});\n\n/**\n * A tree represented using plain JavaScript objects.\n * Can be passed to `JSON.stringify()` to produce a human-readable/editable JSON tree.\n *\n * JsonableTrees must not store empty fields.\n */\nexport interface EncodedJsonableTree extends EncodedGenericTreeNode<EncodedJsonableTree> {}\nexport const EncodedJsonableTree = Type.Recursive((Self) => EncodedGenericTreeNode(Self));\n\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
1
+ {"version":3,"file":"persistedTreeTextFormat.js","sourceRoot":"","sources":["../../../src/core/tree/persistedTreeTextFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA6B,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AA+C3D,MAAM,qBAAqB,GAAG,CAAyB,MAAc,EAAE,EAAE,CACxE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAGjE,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IAChC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,8BAA8B,CAAC;CAClE,CAAC,CAAC;AAUH,MAAM,wBAAwB,GAAG,CAAyB,MAAc,EAAE,EAAE,CAC3E,IAAI,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACpD,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;CAC1D,CAAC,CAAC;AASJ,MAAM,sBAAsB,GAAG,CAAyB,MAAc,EAAE,EAAE,CACzE,IAAI,CAAC,SAAS,CAAC,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC,EAAE;IACnE,oBAAoB,EAAE,KAAK;CAC3B,CAAC,CAAC;AASJ,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC;AAE1F,oEAAoE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type Static, type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { schemaFormatV1 } from \"../schema-stored/index.js\";\n\n/**\n * This module contains persisted types for a simple, human-readable tree format.\n *\n * It was forked from `treeTextFormat.ts` to more cleanly separate compatibility concerns: in the long-term,\n * treeTextFormat.ts is intended to be useful for debugging/test purposes but not for persisted document storage\n * due to its unoptimized nature.\n *\n * However, at the time of forking it was also used as a persisted format for several of SharedTree's indexes.\n * Using the same types for both scenarios is problematic since `treeTextFormat.ts` types are exposed to the\n * public API.\n * These types should be used instead for all persisted format concerns.\n *\n * Before SharedTree has committed to persisted format backwards-compatibility, changes to `treeTextFormat.ts`\n * should be accompanied by the same changes to this module.\n *\n * After that point, changes to `treeTextFormat.ts` will necessitate changes to codecs that deal with these types\n * (and types in this module should not be changed except in compliance with persisted type compatibility guidelines).\n *\n * Longer-term, usages of these types should likely be replaced with a more optimized format.\n * If that switch happens before SharedTree commits to back-compat, this persisted format file can be deleted.\n */\n\n// Many of the return types in this module are intentionally derived, rather than explicitly specified.\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/**\n * Json compatible map as object.\n * Keys are FieldKey strings.\n * Values are the content of the field specified by the key.\n *\n * WARNING:\n * Be very careful when using objects as maps:\n * Use `Object.prototype.hasOwnProperty.call(fieldMap, key)` to safely check for keys.\n * Do NOT simply read the field and check for undefined as this will return values for `__proto__`\n * and various methods on Object.prototype, like `hasOwnProperty` and `toString`.\n * This exposes numerous bug possibilities, including prototype pollution.\n *\n * Due to the above issue, try to avoid this type (and the whole object as map pattern).\n * Only use this type when needed for json compatible maps,\n * but even in those cases consider lists of key value pairs for serialization and using `Map`\n * for runtime.\n */\ninterface EncodedFieldMapObject<TChild> {\n\t[key: string]: TChild[];\n}\nconst EncodedFieldMapObject = <Schema extends TSchema>(tChild: Schema) =>\n\tType.Record(Type.String(), Type.Array(tChild, { minItems: 1 }));\n\ntype EncodedNodeData = Static<typeof EncodedNodeData>;\nconst EncodedNodeData = Type.Object({\n\tvalue: Type.Optional(Type.Any()),\n\ttype: Type.Readonly(schemaFormatV1.TreeNodeSchemaIdentifierSchema),\n});\n\n/**\n * Json comparable field collection, generic over child type.\n * Json compatibility assumes `TChild` is also json compatible.\n */\ninterface EncodedGenericFieldsNode<TChild> {\n\tfields?: EncodedFieldMapObject<TChild>;\n\tglobalFields?: EncodedFieldMapObject<TChild>;\n}\nconst EncodedGenericFieldsNode = <Schema extends TSchema>(tChild: Schema) =>\n\tType.Object({\n\t\tfields: Type.Optional(EncodedFieldMapObject(tChild)),\n\t\tglobalFields: Type.Optional(EncodedFieldMapObject(tChild)),\n\t});\n\n/**\n * Json comparable tree node, generic over child type.\n * Json compatibility assumes `TChild` is also json compatible.\n */\ninterface EncodedGenericTreeNode<TChild>\n\textends EncodedGenericFieldsNode<TChild>,\n\t\tEncodedNodeData {}\nconst EncodedGenericTreeNode = <Schema extends TSchema>(tChild: Schema) =>\n\tType.Composite([EncodedGenericFieldsNode(tChild), EncodedNodeData], {\n\t\tadditionalProperties: false,\n\t});\n\n/**\n * A tree represented using plain JavaScript objects.\n * Can be passed to `JSON.stringify()` to produce a human-readable/editable JSON tree.\n *\n * JsonableTrees must not store empty fields.\n */\nexport interface EncodedJsonableTree extends EncodedGenericTreeNode<EncodedJsonableTree> {}\nexport const EncodedJsonableTree = Type.Recursive((Self) => EncodedGenericTreeNode(Self));\n\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
@@ -3,11 +3,11 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { type Static } from "@sinclair/typebox";
6
- import { schemaFormat } from "../../core/index.js";
6
+ import { schemaFormatV1 } from "../../core/index.js";
7
7
  export declare const version = 1;
8
8
  export declare const Format: import("@sinclair/typebox").TObject<{
9
9
  version: import("@sinclair/typebox").TLiteral<1>;
10
- keys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKey>>;
10
+ keys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKey>>;
11
11
  fields: import("@sinclair/typebox").TObject<{
12
12
  version: import("@sinclair/typebox").TNumber;
13
13
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,eAAO,MAAM,OAAO,IAAM,CAAC;AAE3B,eAAO,MAAM,MAAM;;;;;;EAOlB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,eAAO,MAAM,OAAO,IAAM,CAAC;AAE3B,eAAO,MAAM,MAAM;;;;;;EAOlB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -4,11 +4,11 @@
4
4
  */
5
5
  import { Type } from "@sinclair/typebox";
6
6
  import { Versioned } from "../../codec/index.js";
7
- import { schemaFormat } from "../../core/index.js";
7
+ import { schemaFormatV1 } from "../../core/index.js";
8
8
  export const version = 1.0;
9
9
  export const Format = Type.Object({
10
10
  version: Type.Literal(version),
11
- keys: Type.Array(schemaFormat.FieldKeySchema),
11
+ keys: Type.Array(schemaFormatV1.FieldKeySchema),
12
12
  fields: Versioned,
13
13
  }, { additionalProperties: false });
14
14
  //# sourceMappingURL=format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC;AAE3B,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAChC;IACC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC9B,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC;IAC7C,MAAM,EAAE,SAAS;CACjB,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAC/B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type Static, Type } from \"@sinclair/typebox\";\n\nimport { Versioned } from \"../../codec/index.js\";\nimport { schemaFormat } from \"../../core/index.js\";\n\nexport const version = 1.0;\n\nexport const Format = Type.Object(\n\t{\n\t\tversion: Type.Literal(version),\n\t\tkeys: Type.Array(schemaFormat.FieldKeySchema),\n\t\tfields: Versioned,\n\t},\n\t{ additionalProperties: false },\n);\n\nexport type Format = Static<typeof Format>;\n"]}
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC;AAE3B,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAChC;IACC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC9B,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/C,MAAM,EAAE,SAAS;CACjB,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAC/B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type Static, Type } from \"@sinclair/typebox\";\n\nimport { Versioned } from \"../../codec/index.js\";\nimport { schemaFormatV1 } from \"../../core/index.js\";\n\nexport const version = 1.0;\n\nexport const Format = Type.Object(\n\t{\n\t\tversion: Type.Literal(version),\n\t\tkeys: Type.Array(schemaFormatV1.FieldKeySchema),\n\t\tfields: Versioned,\n\t},\n\t{ additionalProperties: false },\n);\n\nexport type Format = Static<typeof Format>;\n"]}
@@ -7,7 +7,7 @@ export { allowsValue, assertAllowedValue, isTreeValue } from "./valueUtilities.j
7
7
  export { ForestSummarizer } from "./forest-summary/index.js";
8
8
  export { cursorForMapTreeField, cursorForMapTreeNode, mapTreeFromCursor, mapTreeFieldFromCursor, } from "./mapTreeCursor.js";
9
9
  export { buildForest } from "./object-forest/index.js";
10
- export { SchemaSummarizer, encodeTreeSchema, makeSchemaCodec } from "./schema-index/index.js";
10
+ export { SchemaSummarizer, encodeTreeSchema, makeSchemaCodec, makeSchemaCodecs, SchemaCodecVersion, } from "./schema-index/index.js";
11
11
  export { stackTreeNodeCursor, type CursorAdapter, prefixPath, prefixFieldPath, type CursorWithNode, stackTreeFieldCursor, } from "./treeCursorUtils.js";
12
12
  export { cursorForJsonableTreeNode, cursorForJsonableTreeField, jsonableTreeFromCursor, jsonableTreeFromFieldCursor, jsonableTreeFromForest, } from "./treeTextCursor.js";
13
13
  import * as SequenceField from "./sequence-field/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,QAAQ,EACb,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACN,qBAAqB,EACrB,oBA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AAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EACN,KAAK,YAAY,EACjB,sBAAsB,EACtB,mBAAmB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EACN,KAAK,SAAS,EACd,eAAe,EACf,UAAU,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -7,7 +7,7 @@ export { allowsValue, assertAllowedValue, isTreeValue } from "./valueUtilities.j
7
7
  export { ForestSummarizer } from "./forest-summary/index.js";
8
8
  export { cursorForMapTreeField, cursorForMapTreeNode, mapTreeFromCursor, mapTreeFieldFromCursor, } from "./mapTreeCursor.js";
9
9
  export { buildForest } from "./object-forest/index.js";
10
- export { SchemaSummarizer, encodeTreeSchema, makeSchemaCodec } from "./schema-index/index.js";
10
+ export { SchemaSummarizer, encodeTreeSchema, makeSchemaCodec, makeSchemaCodecs, SchemaCodecVersion, } from "./schema-index/index.js";
11
11
  export { stackTreeNodeCursor, prefixPath, prefixFieldPath, stackTreeFieldCursor, } from "./treeCursorUtils.js";
12
12
  export { cursorForJsonableTreeNode, cursorForJsonableTreeField, jsonableTreeFromCursor, jsonableTreeFromFieldCursor, jsonableTreeFromForest, } from "./treeTextCursor.js";
13
13
  // Split this up into separate import and export for compatibility with API-Extractor.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EA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OAAO,EACN,UAAU,EAOV,mBAAmB,EACnB,kBAAkB,EAKlB,mBAAmB,EACnB,UAAU,EACV,uBAAuB,EACvB,SAAS,EACT,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,eAAe,GACf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAIN,IAAI,EAOJ,cAAc,EACd,UAAU,EACV,OAAO,EAGP,cAAc,EACd,WAAW;AACX,WAAW;AACX,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,UAAU,EACV,kBAAkB,GAClB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EAEN,sBAAsB,EACtB,mBAAmB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAEN,eAAe,EACf,UAAU,GAIV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport { ForestSummarizer } from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport { SchemaSummarizer, encodeTreeSchema, makeSchemaCodec } from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\n// Split this up into separate import and export for compatibility with API-Extractor.\nimport * as SequenceField from \"./sequence-field/index.js\";\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tFieldKindWithEditor,\n\tModularChangeFamily,\n\ttype RelevantRemovedRootsFromChild,\n\tEncodedModularChangeset,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tgetAllowedContentDiscrepancies,\n\tisRepoSuperset,\n\ttype AllowedTypeDiscrepancy,\n\ttype FieldKindDiscrepancy,\n\ttype ValueSchemaDiscrepancy,\n\ttype FieldDiscrepancy,\n\ttype NodeDiscrepancy,\n\ttype NodeKindDiscrepancy,\n\ttype NodeFieldsDiscrepancy,\n\tisNeverTree,\n\ttype LinearExtension,\n\ttype Realizer,\n\tfieldRealizer,\n\tPosetComparisonResult,\n\tcomparePosetElements,\n\tposetLte,\n} from \"./modular-schema/index.js\";\n\nexport { mapRootChanges } from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\ttype DefaultChangeset,\n\tDefaultChangeFamily,\n\tDefaultEditBuilder,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tSchemaValidationErrors,\n\tisNodeInSchema,\n\tisFieldInSchema,\n} from \"./default-schema/index.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\tSkip,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tgetTreeContext,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n} from \"./flex-tree/index.js\";\n\nexport { TreeCompressionStrategy } from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n\nexport { initializeForest } from \"./initializeForest.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,mBAAmB,EAEnB,UAAU,EACV,eAAe,EAEf,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2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;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EAEN,sBAAsB,EACtB,mBAAmB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAEN,eAAe,EACf,UAAU,GAIV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport { ForestSummarizer } from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport {\n\tSchemaSummarizer,\n\tencodeTreeSchema,\n\tmakeSchemaCodec,\n\tmakeSchemaCodecs,\n\tSchemaCodecVersion,\n} from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\n// Split this up into separate import and export for compatibility with API-Extractor.\nimport * as SequenceField from \"./sequence-field/index.js\";\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tFieldKindWithEditor,\n\tModularChangeFamily,\n\ttype RelevantRemovedRootsFromChild,\n\tEncodedModularChangeset,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tgetAllowedContentDiscrepancies,\n\tisRepoSuperset,\n\ttype AllowedTypeDiscrepancy,\n\ttype FieldKindDiscrepancy,\n\ttype ValueSchemaDiscrepancy,\n\ttype FieldDiscrepancy,\n\ttype NodeDiscrepancy,\n\ttype NodeKindDiscrepancy,\n\ttype NodeFieldsDiscrepancy,\n\tisNeverTree,\n\ttype LinearExtension,\n\ttype Realizer,\n\tfieldRealizer,\n\tPosetComparisonResult,\n\tcomparePosetElements,\n\tposetLte,\n} from \"./modular-schema/index.js\";\n\nexport { mapRootChanges } from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\ttype DefaultChangeset,\n\tDefaultChangeFamily,\n\tDefaultEditBuilder,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tSchemaValidationErrors,\n\tisNodeInSchema,\n\tisFieldInSchema,\n} from \"./default-schema/index.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\tSkip,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tgetTreeContext,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n} from \"./flex-tree/index.js\";\n\nexport { TreeCompressionStrategy } from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n\nexport { initializeForest } from \"./initializeForest.js\";\n"]}
@@ -5,13 +5,13 @@
5
5
  import { type DetachedField, type ExclusiveMapTree, type ITreeCursor, type MapTree } from "../core/index.js";
6
6
  import { type CursorWithNode } from "./treeCursorUtils.js";
7
7
  /**
8
- * @returns An {@link ITreeCursorSynchronous} in nodes mode for a single {@link MapTree}.
8
+ * Returns an {@link ITreeCursorSynchronous} in nodes mode for a single {@link MapTree}.
9
9
  */
10
10
  export declare function cursorForMapTreeNode(root: MapTree): CursorWithNode<MapTree>;
11
11
  /**
12
- * @returns an {@link ITreeCursorSynchronous} in fields mode for a MapTree field.
12
+ * Returns an {@link ITreeCursorSynchronous} in fields mode for a MapTree field.
13
13
  */
14
- export declare function cursorForMapTreeField(root: MapTree[], detachedField?: DetachedField): CursorWithNode<MapTree>;
14
+ export declare function cursorForMapTreeField(root: readonly MapTree[], detachedField?: DetachedField): CursorWithNode<MapTree>;
15
15
  /**
16
16
  * Extract a MapTree from the contents of the given ITreeCursor's current node.
17
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"mapTreeCursor.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/mapTreeCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,KAAK,WAAW,EAChB,KAAK,OAAO,EAKZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEN,KAAK,cAAc,EAGnB,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAE3E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,OAAO,EAAE,EACf,aAAa,GAAE,aAAyB,GACtC,cAAc,CAAC,OAAO,CAAC,CAUzB;AASD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,CAevE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,EAAE,CAG9E"}
1
+ {"version":3,"file":"mapTreeCursor.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/mapTreeCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,KAAK,WAAW,EAChB,KAAK,OAAO,EAKZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEN,KAAK,cAAc,EAGnB,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAE3E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,SAAS,OAAO,EAAE,EACxB,aAAa,GAAE,aAAyB,GACtC,cAAc,CAAC,OAAO,CAAC,CAUzB;AASD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,CAevE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,EAAE,CAG9E"}
@@ -6,13 +6,13 @@ import { assert } from "@fluidframework/core-utils/internal";
6
6
  import { aboveRootPlaceholder, detachedFieldAsKey, mapCursorField, rootField, } from "../core/index.js";
7
7
  import { stackTreeFieldCursor, stackTreeNodeCursor, } from "./treeCursorUtils.js";
8
8
  /**
9
- * @returns An {@link ITreeCursorSynchronous} in nodes mode for a single {@link MapTree}.
9
+ * Returns an {@link ITreeCursorSynchronous} in nodes mode for a single {@link MapTree}.
10
10
  */
11
11
  export function cursorForMapTreeNode(root) {
12
12
  return stackTreeNodeCursor(adapter, root);
13
13
  }
14
14
  /**
15
- * @returns an {@link ITreeCursorSynchronous} in fields mode for a MapTree field.
15
+ * Returns an {@link ITreeCursorSynchronous} in fields mode for a MapTree field.
16
16
  */
17
17
  export function cursorForMapTreeField(root, detachedField = rootField) {
18
18
  const key = detachedFieldAsKey(detachedField);
@@ -1 +1 @@
1
- {"version":3,"file":"mapTreeCursor.js","sourceRoot":"","sources":["../../src/feature-libraries/mapTreeCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAON,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,SAAS,GACT,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAGN,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IACjD,OAAO,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACpC,IAAe,EACf,gBAA+B,SAAS;IAExC,MAAM,GAAG,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAC9C,OAAO,oBAAoB,CAC1B,OAAO,EACP;QACC,IAAI,EAAE,oBAAoB;QAC1B,MAAM,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;KAC9B,EACD,aAAa,CACb,CAAC;AACH,CAAC;AAED,MAAM,OAAO,GAA2B;IACvC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK;IAC3B,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI;IACzB,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,0CAA0C;IAC3F,gBAAgB,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE;CAC3D,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAmB;IACpD,MAAM,CAAC,MAAM,CAAC,IAAI,qCAA6B,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACjF,MAAM,MAAM,GAAsC,IAAI,GAAG,EAAE,CAAC;IAC5D,KAAK,IAAI,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC;QAC/E,MAAM,KAAK,GAAuB,cAAc,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;QAC5E,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,IAAI,GAAqB;QAC9B,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM;KACN,CAAC;IAEF,OAAO,IAAI,CAAC;AACb,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAmB;IACzD,MAAM,CAAC,MAAM,CAAC,IAAI,sCAA8B,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnF,OAAO,cAAc,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAClD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tCursorLocationType,\n\ttype DetachedField,\n\ttype ExclusiveMapTree,\n\ttype FieldKey,\n\ttype ITreeCursor,\n\ttype MapTree,\n\taboveRootPlaceholder,\n\tdetachedFieldAsKey,\n\tmapCursorField,\n\trootField,\n} from \"../core/index.js\";\n\nimport {\n\ttype CursorAdapter,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n\tstackTreeNodeCursor,\n} from \"./treeCursorUtils.js\";\n\n/**\n * @returns An {@link ITreeCursorSynchronous} in nodes mode for a single {@link MapTree}.\n */\nexport function cursorForMapTreeNode(root: MapTree): CursorWithNode<MapTree> {\n\treturn stackTreeNodeCursor(adapter, root);\n}\n\n/**\n * @returns an {@link ITreeCursorSynchronous} in fields mode for a MapTree field.\n */\nexport function cursorForMapTreeField(\n\troot: MapTree[],\n\tdetachedField: DetachedField = rootField,\n): CursorWithNode<MapTree> {\n\tconst key = detachedFieldAsKey(detachedField);\n\treturn stackTreeFieldCursor(\n\t\tadapter,\n\t\t{\n\t\t\ttype: aboveRootPlaceholder,\n\t\t\tfields: new Map([[key, root]]),\n\t\t},\n\t\tdetachedField,\n\t);\n}\n\nconst adapter: CursorAdapter<MapTree> = {\n\tvalue: (node) => node.value,\n\ttype: (node) => node.type,\n\tkeysFromNode: (node) => [...node.fields.keys()], // TODO: don't convert this to array here.\n\tgetFieldFromNode: (node, key) => node.fields.get(key) ?? [],\n};\n\n/**\n * Extract a MapTree from the contents of the given ITreeCursor's current node.\n */\nexport function mapTreeFromCursor(cursor: ITreeCursor): ExclusiveMapTree {\n\tassert(cursor.mode === CursorLocationType.Nodes, 0x3b7 /* must start at node */);\n\tconst fields: Map<FieldKey, ExclusiveMapTree[]> = new Map();\n\tfor (let inField = cursor.firstField(); inField; inField = cursor.nextField()) {\n\t\tconst field: ExclusiveMapTree[] = mapCursorField(cursor, mapTreeFromCursor);\n\t\tfields.set(cursor.getFieldKey(), field);\n\t}\n\n\tconst node: ExclusiveMapTree = {\n\t\ttype: cursor.type,\n\t\tvalue: cursor.value,\n\t\tfields,\n\t};\n\n\treturn node;\n}\n\n/**\n * Extract an array of MapTrees (a field) from the contents of the given ITreeCursor's current field.\n */\nexport function mapTreeFieldFromCursor(cursor: ITreeCursor): ExclusiveMapTree[] {\n\tassert(cursor.mode === CursorLocationType.Fields, 0xa03 /* must start at field */);\n\treturn mapCursorField(cursor, mapTree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ACpD,MAAM,CAAC,MAAM,CAAC,IAAI,qCAA6B,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACjF,MAAM,MAAM,GAAsC,IAAI,GAAG,EAAE,CAAC;IAC5D,KAAK,IAAI,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC;QAC/E,MAAM,KAAK,GAAuB,cAAc,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;QAC5E,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,IAAI,GAAqB;QAC9B,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM;KACN,CAAC;IAEF,OAAO,IAAI,CAAC;AACb,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAmB;IACzD,MAAM,CAAC,MAAM,CAAC,IAAI,sCAA8B,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnF,OAAO,cAAc,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAClD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tCursorLocationType,\n\ttype DetachedField,\n\ttype ExclusiveMapTree,\n\ttype FieldKey,\n\ttype ITreeCursor,\n\ttype MapTree,\n\taboveRootPlaceholder,\n\tdetachedFieldAsKey,\n\tmapCursorField,\n\trootField,\n} from \"../core/index.js\";\n\nimport {\n\ttype CursorAdapter,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n\tstackTreeNodeCursor,\n} from \"./treeCursorUtils.js\";\n\n/**\n * Returns an {@link ITreeCursorSynchronous} in nodes mode for a single {@link MapTree}.\n */\nexport function cursorForMapTreeNode(root: MapTree): CursorWithNode<MapTree> {\n\treturn stackTreeNodeCursor(adapter, root);\n}\n\n/**\n * Returns an {@link ITreeCursorSynchronous} in fields mode for a MapTree field.\n */\nexport function cursorForMapTreeField(\n\troot: readonly MapTree[],\n\tdetachedField: DetachedField = rootField,\n): CursorWithNode<MapTree> {\n\tconst key = detachedFieldAsKey(detachedField);\n\treturn stackTreeFieldCursor(\n\t\tadapter,\n\t\t{\n\t\t\ttype: aboveRootPlaceholder,\n\t\t\tfields: new Map([[key, root]]),\n\t\t},\n\t\tdetachedField,\n\t);\n}\n\nconst adapter: CursorAdapter<MapTree> = {\n\tvalue: (node) => node.value,\n\ttype: (node) => node.type,\n\tkeysFromNode: (node) => [...node.fields.keys()], // TODO: don't convert this to array here.\n\tgetFieldFromNode: (node, key) => node.fields.get(key) ?? [],\n};\n\n/**\n * Extract a MapTree from the contents of the given ITreeCursor's current node.\n */\nexport function mapTreeFromCursor(cursor: ITreeCursor): ExclusiveMapTree {\n\tassert(cursor.mode === CursorLocationType.Nodes, 0x3b7 /* must start at node */);\n\tconst fields: Map<FieldKey, ExclusiveMapTree[]> = new Map();\n\tfor (let inField = cursor.firstField(); inField; inField = cursor.nextField()) {\n\t\tconst field: ExclusiveMapTree[] = mapCursorField(cursor, mapTreeFromCursor);\n\t\tfields.set(cursor.getFieldKey(), field);\n\t}\n\n\tconst node: ExclusiveMapTree = {\n\t\ttype: cursor.type,\n\t\tvalue: cursor.value,\n\t\tfields,\n\t};\n\n\treturn node;\n}\n\n/**\n * Extract an array of MapTrees (a field) from the contents of the given ITreeCursor's current field.\n */\nexport function mapTreeFieldFromCursor(cursor: ITreeCursor): ExclusiveMapTree[] {\n\tassert(cursor.mode === CursorLocationType.Fields, 0xa03 /* must start at field */);\n\treturn mapCursorField(cursor, mapTreeFromCursor);\n}\n"]}
@@ -3,14 +3,14 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { type Static } from "@sinclair/typebox";
6
- import { type ChangesetLocalId, schemaFormat } from "../../core/index.js";
6
+ import { type ChangesetLocalId, schemaFormatV1 } from "../../core/index.js";
7
7
  import { type JsonCompatibleReadOnly } from "../../util/index.js";
8
8
  export declare const ChangesetLocalIdSchema: import("@sinclair/typebox").TUnsafe<ChangesetLocalId>;
9
9
  export declare const EncodedChangeAtomId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<ChangesetLocalId>]>;
10
10
  export type EncodedChangeAtomId = Static<typeof EncodedChangeAtomId>;
11
11
  declare const EncodedFieldChange: import("@sinclair/typebox").TObject<{
12
- fieldKey: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKey>;
13
- fieldKind: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKindIdentifier>;
12
+ fieldKey: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKey>;
13
+ fieldKind: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKindIdentifier>;
14
14
  change: import("@sinclair/typebox").TAny;
15
15
  }>;
16
16
  export interface EncodedFieldChange extends Static<typeof EncodedFieldChange> {
@@ -20,8 +20,8 @@ export interface EncodedFieldChange extends Static<typeof EncodedFieldChange> {
20
20
  change: JsonCompatibleReadOnly;
21
21
  }
22
22
  declare const EncodedFieldChangeMap: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
23
- fieldKey: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKey>;
24
- fieldKind: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKindIdentifier>;
23
+ fieldKey: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKey>;
24
+ fieldKind: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKindIdentifier>;
25
25
  change: import("@sinclair/typebox").TAny;
26
26
  }>>;
27
27
  /**
@@ -34,8 +34,8 @@ declare const EncodedFieldChangeMap: import("@sinclair/typebox").TArray<import("
34
34
  export type EncodedFieldChangeMap = Static<typeof EncodedFieldChangeMap>;
35
35
  export declare const EncodedNodeChangeset: import("@sinclair/typebox").TObject<{
36
36
  fieldChanges: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
37
- fieldKey: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKey>;
38
- fieldKind: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKindIdentifier>;
37
+ fieldKey: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKey>;
38
+ fieldKind: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKindIdentifier>;
39
39
  change: import("@sinclair/typebox").TAny;
40
40
  }>>>;
41
41
  nodeExistsConstraint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
@@ -89,8 +89,8 @@ export type EncodedBuilds = Static<typeof EncodedBuilds>;
89
89
  export declare const EncodedModularChangeset: import("@sinclair/typebox").TObject<{
90
90
  maxId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<ChangesetLocalId>>;
91
91
  changes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
92
- fieldKey: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKey>;
93
- fieldKind: import("@sinclair/typebox").TUnsafe<schemaFormat.FieldKindIdentifier>;
92
+ fieldKey: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKey>;
93
+ fieldKind: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKindIdentifier>;
94
94
  change: import("@sinclair/typebox").TAny;
95
95
  }>>;
96
96
  revisions: import("@sinclair/typebox").TReadonlyOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"modularChangeForm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,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEvE,eAAO,MAAM,mBAAmB;;;EAM/B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,gBAAgB,qCAA6C,CAAC;AAE3E,eAAO,MAAM,YAAY,sKAOxB,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,YAAY,CAAC,CAAC;AAEvD,eAAO,MAAM,kBAAkB,mtBAM9B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnE,eAAO,MAAM,aAAa;;IAGxB;;;OAGG;;;;;;;;;;;;;;;;;;;;EAIJ,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AAEzD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;QAXlC;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;QAHH;;;WAGG;;;;;;;;;;;;;;;;;;;;;IAiBH;;OAEG;;EAIJ,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { Type } from "@sinclair/typebox";
6
- import { RevisionTagSchema, schemaFormat } from "../../core/index.js";
6
+ import { RevisionTagSchema, schemaFormatV1 } from "../../core/index.js";
7
7
  import { JsonCompatibleReadOnlySchema, brandedNumberType, } from "../../util/index.js";
8
8
  import { EncodedFieldBatch } from "../chunked-forest/index.js";
9
9
  const noAdditionalProps = { additionalProperties: false };
@@ -15,8 +15,8 @@ export const EncodedChangeAtomId = Type.Union([
15
15
  ChangesetLocalIdSchema,
16
16
  ]);
17
17
  const EncodedFieldChange = Type.Object({
18
- fieldKey: schemaFormat.FieldKeySchema,
19
- fieldKind: schemaFormat.FieldKindIdentifierSchema,
18
+ fieldKey: schemaFormatV1.FieldKeySchema,
19
+ fieldKind: schemaFormatV1.FieldKindIdentifierSchema,
20
20
  // Implementation note: node and field change encoding is mutually recursive.
21
21
  // This field marks a boundary in that recursion to avoid constructing excessively complex
22
22
  // recursive types. Encoded changes are validated at this boundary at runtime--see modularChangeCodecs.ts.
@@ -1 +1 @@
1
- {"version":3,"file":"modularChangeFormat.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmC,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAyB,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAEN,4BAA4B,EAC5B,iBAAiB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAmB;IACzE,UAAU,EAAE,CAAC;CACb,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC;IAC7C,IAAI,CAAC,KAAK,CAAC,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,CAAC;IACvD,sBAAsB;CACtB,CAAC,CAAC;AAGH,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CACrC;IACC,QAAQ,EAAE,YAAY,CAAC,cAAc;IACrC,SAAS,EAAE,YAAY,CAAC,yBAAyB;IACjD,6EAA6E;IAC7E,0FAA0F;IAC1F,0GAA0G;IAC1G,MAAM,EAAE,4BAA4B;CACpC,EACD,iBAAiB,CACjB,CAAC;AASF,MAAM,qBAAqB,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAW7D,M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D,iBAAiB,CACjB,CAAC;AAIF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,MAAM,CACjD;IACC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IAC5C,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACjE,oHAAoH;IACpH,wGAAwG;IACxG,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;IACpC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;IACxC;;OAEG;IACH,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;CACrE,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 { type ChangesetLocalId, RevisionTagSchema, schemaFormat } from \"../../core/index.js\";\nimport {\n\ttype JsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlySchema,\n\tbrandedNumberType,\n} from \"../../util/index.js\";\nimport { EncodedFieldBatch } from \"../chunked-forest/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport const ChangesetLocalIdSchema = brandedNumberType<ChangesetLocalId>({\n\tmultipleOf: 1,\n});\n\nexport const EncodedChangeAtomId = Type.Union([\n\tType.Tuple([ChangesetLocalIdSchema, RevisionTagSchema]),\n\tChangesetLocalIdSchema,\n]);\nexport type EncodedChangeAtomId = Static<typeof EncodedChangeAtomId>;\n\nconst EncodedFieldChange = Type.Object(\n\t{\n\t\tfieldKey: schemaFormat.FieldKeySchema,\n\t\tfieldKind: schemaFormat.FieldKindIdentifierSchema,\n\t\t// Implementation note: node and field change encoding is mutually recursive.\n\t\t// This field marks a boundary in that recursion to avoid constructing excessively complex\n\t\t// recursive types. Encoded changes are validated at this boundary at runtime--see modularChangeCodecs.ts.\n\t\tchange: JsonCompatibleReadOnlySchema,\n\t},\n\tnoAdditionalProps,\n);\n\nexport interface EncodedFieldChange extends Static<typeof EncodedFieldChange> {\n\t/**\n\t * Encoded in format selected by `fieldKind`\n\t */\n\tchange: JsonCompatibleReadOnly;\n}\n\nconst EncodedFieldChangeMap = Type.Array(EncodedFieldChange);\n\n/**\n * Format for encoding as json.\n *\n * This chooses to use lists of named objects instead of maps:\n * this choice is somewhat arbitrary, but avoids user data being used as object keys,\n * which can sometimes be an issue (for example handling that for \"__proto__\" can require care).\n */\nexport type EncodedFieldChangeMap = Static<typeof EncodedFieldChangeMap>;\n\nconst EncodedNodeExistsConstraint = Type.Object(\n\t{\n\t\tviolated: Type.Boolean(),\n\t},\n\tnoAdditionalProps,\n);\ntype EncodedNodeExistsConstraint = Static<typeof EncodedNodeExistsConstraint>;\n\nexport const EncodedNodeChangeset = Type.Object(\n\t{\n\t\tfieldChanges: Type.Optional(EncodedFieldChangeMap),\n\t\tnodeExistsConstraint: Type.Optional(EncodedNodeExistsConstraint),\n\t},\n\tnoAdditionalProps,\n);\n\n/**\n * Format for encoding as json.\n */\nexport type EncodedNodeChangeset = Static<typeof EncodedNodeChangeset>;\n\nexport const EncodedRevisionInfo = Type.Object(\n\t{\n\t\trevision: Type.Readonly(RevisionTagSchema),\n\t\trollbackOf: Type.ReadonlyOptional(RevisionTagSchema),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedRevisionInfo = Static<typeof EncodedRevisionInfo>;\n\n/**\n * Index of field in an EncodedFieldBatch.\n */\nexport const EncodedTreeIndex = Type.Number({ multipleOf: 1, minimum: 0 });\n\nexport const CommitBuilds = Type.Array(\n\tType.Tuple([\n\t\t// ID for first node\n\t\tChangesetLocalIdSchema,\n\t\t// Index for a TreeChunk that represents all the nodes\n\t\tEncodedTreeIndex,\n\t]),\n);\nexport type CommitBuilds = Static<typeof CommitBuilds>;\n\nexport const EncodedBuildsArray = Type.Array(\n\tType.Union([\n\t\tType.Tuple([CommitBuilds, RevisionTagSchema]),\n\t\t// Revision is omitted when undefined\n\t\tType.Tuple([CommitBuilds]),\n\t]),\n);\n\nexport type EncodedBuildsArray = Static<typeof EncodedBuildsArray>;\n\nexport const EncodedBuilds = Type.Object(\n\t{\n\t\tbuilds: EncodedBuildsArray,\n\t\t/**\n\t\t * Fields indexed by the EncodedTreeIndexes above.\n\t\t * TODO: Strongly typing this here may result in redundant schema validation of this data.\n\t\t */\n\t\ttrees: EncodedFieldBatch,\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedBuilds = Static<typeof EncodedBuilds>;\n\nexport const EncodedModularChangeset = Type.Object(\n\t{\n\t\tmaxId: Type.Optional(ChangesetLocalIdSchema),\n\t\tchanges: EncodedFieldChangeMap,\n\t\trevisions: Type.ReadonlyOptional(Type.Array(EncodedRevisionInfo)),\n\t\t// TODO#8574: separating `builds` and `refreshers` here means that we encode their `EncodedBuilds.trees` separately.\n\t\t// This can lead to a less efficient wire representation because of duplicated schema/shape information.\n\t\tbuilds: Type.Optional(EncodedBuilds),\n\t\trefreshers: Type.Optional(EncodedBuilds),\n\t\t/**\n\t\t * The number of constraints within this changeset that are violated.\n\t\t */\n\t\tviolations: Type.Optional(Type.Number({ minimum: 0, multipleOf: 1 })),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedModularChangeset = Static<typeof EncodedModularChangeset>;\n"]}
1
+ {"version":3,"file":"modularChangeFormat.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmC,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAyB,iBAAiB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAEN,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O,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;CACrE,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 { type ChangesetLocalId, RevisionTagSchema, schemaFormatV1 } from \"../../core/index.js\";\nimport {\n\ttype JsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlySchema,\n\tbrandedNumberType,\n} from \"../../util/index.js\";\nimport { EncodedFieldBatch } from \"../chunked-forest/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport const ChangesetLocalIdSchema = brandedNumberType<ChangesetLocalId>({\n\tmultipleOf: 1,\n});\n\nexport const EncodedChangeAtomId = Type.Union([\n\tType.Tuple([ChangesetLocalIdSchema, RevisionTagSchema]),\n\tChangesetLocalIdSchema,\n]);\nexport type EncodedChangeAtomId = Static<typeof EncodedChangeAtomId>;\n\nconst EncodedFieldChange = Type.Object(\n\t{\n\t\tfieldKey: schemaFormatV1.FieldKeySchema,\n\t\tfieldKind: schemaFormatV1.FieldKindIdentifierSchema,\n\t\t// Implementation note: node and field change encoding is mutually recursive.\n\t\t// This field marks a boundary in that recursion to avoid constructing excessively complex\n\t\t// recursive types. Encoded changes are validated at this boundary at runtime--see modularChangeCodecs.ts.\n\t\tchange: JsonCompatibleReadOnlySchema,\n\t},\n\tnoAdditionalProps,\n);\n\nexport interface EncodedFieldChange extends Static<typeof EncodedFieldChange> {\n\t/**\n\t * Encoded in format selected by `fieldKind`\n\t */\n\tchange: JsonCompatibleReadOnly;\n}\n\nconst EncodedFieldChangeMap = Type.Array(EncodedFieldChange);\n\n/**\n * Format for encoding as json.\n *\n * This chooses to use lists of named objects instead of maps:\n * this choice is somewhat arbitrary, but avoids user data being used as object keys,\n * which can sometimes be an issue (for example handling that for \"__proto__\" can require care).\n */\nexport type EncodedFieldChangeMap = Static<typeof EncodedFieldChangeMap>;\n\nconst EncodedNodeExistsConstraint = Type.Object(\n\t{\n\t\tviolated: Type.Boolean(),\n\t},\n\tnoAdditionalProps,\n);\ntype EncodedNodeExistsConstraint = Static<typeof EncodedNodeExistsConstraint>;\n\nexport const EncodedNodeChangeset = Type.Object(\n\t{\n\t\tfieldChanges: Type.Optional(EncodedFieldChangeMap),\n\t\tnodeExistsConstraint: Type.Optional(EncodedNodeExistsConstraint),\n\t},\n\tnoAdditionalProps,\n);\n\n/**\n * Format for encoding as json.\n */\nexport type EncodedNodeChangeset = Static<typeof EncodedNodeChangeset>;\n\nexport const EncodedRevisionInfo = Type.Object(\n\t{\n\t\trevision: Type.Readonly(RevisionTagSchema),\n\t\trollbackOf: Type.ReadonlyOptional(RevisionTagSchema),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedRevisionInfo = Static<typeof EncodedRevisionInfo>;\n\n/**\n * Index of field in an EncodedFieldBatch.\n */\nexport const EncodedTreeIndex = Type.Number({ multipleOf: 1, minimum: 0 });\n\nexport const CommitBuilds = Type.Array(\n\tType.Tuple([\n\t\t// ID for first node\n\t\tChangesetLocalIdSchema,\n\t\t// Index for a TreeChunk that represents all the nodes\n\t\tEncodedTreeIndex,\n\t]),\n);\nexport type CommitBuilds = Static<typeof CommitBuilds>;\n\nexport const EncodedBuildsArray = Type.Array(\n\tType.Union([\n\t\tType.Tuple([CommitBuilds, RevisionTagSchema]),\n\t\t// Revision is omitted when undefined\n\t\tType.Tuple([CommitBuilds]),\n\t]),\n);\n\nexport type EncodedBuildsArray = Static<typeof EncodedBuildsArray>;\n\nexport const EncodedBuilds = Type.Object(\n\t{\n\t\tbuilds: EncodedBuildsArray,\n\t\t/**\n\t\t * Fields indexed by the EncodedTreeIndexes above.\n\t\t * TODO: Strongly typing this here may result in redundant schema validation of this data.\n\t\t */\n\t\ttrees: EncodedFieldBatch,\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedBuilds = Static<typeof EncodedBuilds>;\n\nexport const EncodedModularChangeset = Type.Object(\n\t{\n\t\tmaxId: Type.Optional(ChangesetLocalIdSchema),\n\t\tchanges: EncodedFieldChangeMap,\n\t\trevisions: Type.ReadonlyOptional(Type.Array(EncodedRevisionInfo)),\n\t\t// TODO#8574: separating `builds` and `refreshers` here means that we encode their `EncodedBuilds.trees` separately.\n\t\t// This can lead to a less efficient wire representation because of duplicated schema/shape information.\n\t\tbuilds: Type.Optional(EncodedBuilds),\n\t\trefreshers: Type.Optional(EncodedBuilds),\n\t\t/**\n\t\t * The number of constraints within this changeset that are violated.\n\t\t */\n\t\tviolations: Type.Optional(Type.Number({ minimum: 0, multipleOf: 1 })),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedModularChangeset = Static<typeof EncodedModularChangeset>;\n"]}
@@ -2,7 +2,20 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type ICodecFamily, type ICodecOptions } from "../../codec/index.js";
5
+ import { type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../../codec/index.js";
6
+ import { SchemaCodecVersion } from "../schema-index/index.js";
6
7
  import type { SchemaChange } from "./schemaChangeTypes.js";
8
+ /**
9
+ * Create a family of schema change codecs.
10
+ * @param options - Specifies common codec options, including which `validator` to use.
11
+ * @returns The composed codec family.
12
+ */
7
13
  export declare function makeSchemaChangeCodecs(options: ICodecOptions): ICodecFamily<SchemaChange>;
14
+ /**
15
+ * Create a schema change codec.
16
+ * @param options - Specifies common codec options, including which `validator` to use.
17
+ * @param writeVersion - The schema change write version.
18
+ * @returns The composed codec.
19
+ */
20
+ export declare function makeSchemaChangeCodec(options: ICodecOptions, writeVersion: SchemaCodecVersion): IJsonCodec<SchemaChange>;
8
21
  //# sourceMappingURL=schemaChangeCodecs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemaChangeCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAIlB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CAAC,YAAY,CAAC,CAEzF"}
1
+ {"version":3,"file":"schemaChangeCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAIf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEN,kBAAkB,EAElB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CAAC,YAAY,CAAC,CAEzF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,kBAAkB,GAC9B,UAAU,CAAC,YAAY,CAAC,CAG1B"}
@@ -3,14 +3,34 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { assert } from "@fluidframework/core-utils/internal";
6
- import { makeCodecFamily, withSchemaValidation, } from "../../codec/index.js";
7
- import { makeSchemaCodec } from "../schema-index/index.js";
6
+ import { makeCodecFamily, makeVersionDispatchingCodec, withSchemaValidation, } from "../../codec/index.js";
7
+ import { makeSchemaCodec, SchemaCodecVersion, } from "../schema-index/index.js";
8
8
  import { EncodedSchemaChange } from "./schemaChangeFormat.js";
9
+ /**
10
+ * Create a family of schema change codecs.
11
+ * @param options - Specifies common codec options, including which `validator` to use.
12
+ * @returns The composed codec family.
13
+ */
9
14
  export function makeSchemaChangeCodecs(options) {
10
- return makeCodecFamily([[1, makeSchemaChangeCodec(options)]]);
15
+ return makeCodecFamily([[SchemaCodecVersion.v1, makeSchemaChangeCodecV1(options)]]);
16
+ }
17
+ /**
18
+ * Create a schema change codec.
19
+ * @param options - Specifies common codec options, including which `validator` to use.
20
+ * @param writeVersion - The schema change write version.
21
+ * @returns The composed codec.
22
+ */
23
+ export function makeSchemaChangeCodec(options, writeVersion) {
24
+ const family = makeSchemaChangeCodecs(options);
25
+ return makeVersionDispatchingCodec(family, { ...options, writeVersion });
11
26
  }
12
- function makeSchemaChangeCodec({ jsonValidator: validator, }) {
13
- const schemaCodec = makeSchemaCodec({ jsonValidator: validator });
27
+ /**
28
+ * Compose the v1 schema change codec.
29
+ * @param options - The codec options.
30
+ * @returns The composed schema change codec.
31
+ */
32
+ function makeSchemaChangeCodecV1(options) {
33
+ const schemaCodec = makeSchemaCodec(options, SchemaCodecVersion.v1);
14
34
  const schemaChangeCodec = {
15
35
  encode: (schemaChange) => {
16
36
  assert(!schemaChange.isInverse, 0x933 /* Inverse schema changes should never be transmitted */);
@@ -30,6 +50,6 @@ function makeSchemaChangeCodec({ jsonValidator: validator, }) {
30
50
  },
31
51
  encodedSchema: EncodedSchemaChange,
32
52
  };
33
- return withSchemaValidation(EncodedSchemaChange, schemaChangeCodec, validator);
53
+ return withSchemaValidation(EncodedSchemaChange, schemaChangeCodec, options.jsonValidator);
34
54
  }
35
55
  //# sourceMappingURL=schemaChangeCodecs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemaChangeCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAIN,eAAe,EACf,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,MAAM,UAAU,sBAAsB,CAAC,OAAsB;IAC5D,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,qBAAqB,CAAC,EAC9B,aAAa,EAAE,SAAS,GACT;IACf,MAAM,WAAW,GAAG,eAAe,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC;IAClE,MAAM,iBAAiB,GAAkD;QACxE,MAAM,EAAE,CAAC,YAAY,EAAE,EAAE;YACxB,MAAM,CACL,CAAC,YAAY,CAAC,SAAS,EACvB,KAAK,CAAC,wDAAwD,CAC9D,CAAC;YACF,OAAO;gBACN,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;gBAChD,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;aAChD,CAAC;QACH,CAAC;QACD,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;YACnB,OAAO;gBACN,MAAM,EAAE;oBACP,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;oBACpC,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;iBACpC;gBACD,SAAS,EAAE,KAAK;aAChB,CAAC;QACH,CAAC;QACD,aAAa,EAAE,mBAAmB;KAClC,CAAC;IAEF,OAAO,oBAAoB,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,SAAS,CAAC,CAAC;AAChF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\twithSchemaValidation,\n} from \"../../codec/index.js\";\nimport { makeSchemaCodec } from \"../schema-index/index.js\";\n\nimport { EncodedSchemaChange } from \"./schemaChangeFormat.js\";\nimport type { SchemaChange } from \"./schemaChangeTypes.js\";\n\nexport function makeSchemaChangeCodecs(options: ICodecOptions): ICodecFamily<SchemaChange> {\n\treturn makeCodecFamily([[1, makeSchemaChangeCodec(options)]]);\n}\n\nfunction makeSchemaChangeCodec({\n\tjsonValidator: validator,\n}: ICodecOptions): IJsonCodec<SchemaChange, EncodedSchemaChange> {\n\tconst schemaCodec = makeSchemaCodec({ jsonValidator: validator });\n\tconst schemaChangeCodec: IJsonCodec<SchemaChange, EncodedSchemaChange> = {\n\t\tencode: (schemaChange) => {\n\t\t\tassert(\n\t\t\t\t!schemaChange.isInverse,\n\t\t\t\t0x933 /* Inverse schema changes should never be transmitted */,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tnew: schemaCodec.encode(schemaChange.schema.new),\n\t\t\t\told: schemaCodec.encode(schemaChange.schema.old),\n\t\t\t};\n\t\t},\n\t\tdecode: (encoded) => {\n\t\t\treturn {\n\t\t\t\tschema: {\n\t\t\t\t\tnew: schemaCodec.decode(encoded.new),\n\t\t\t\t\told: schemaCodec.decode(encoded.old),\n\t\t\t\t},\n\t\t\t\tisInverse: false,\n\t\t\t};\n\t\t},\n\t\tencodedSchema: EncodedSchemaChange,\n\t};\n\n\treturn withSchemaValidation(EncodedSchemaChange, schemaChangeCodec, validator);\n}\n"]}
1
+ {"version":3,"file":"schemaChangeCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAIN,eAAe,EACf,2BAA2B,EAC3B,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,eAAe,EACf,kBAAkB,GAElB,MAAM,0BAA0B,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AAC;IAEF,OAAO,oBAAoB,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n\twithSchemaValidation,\n} from \"../../codec/index.js\";\nimport {\n\tmakeSchemaCodec,\n\tSchemaCodecVersion,\n\ttype Format as FormatV1,\n} from \"../schema-index/index.js\";\n\nimport { EncodedSchemaChange } from \"./schemaChangeFormat.js\";\nimport type { SchemaChange } from \"./schemaChangeTypes.js\";\n\n/**\n * Create a family of schema change codecs.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The composed codec family.\n */\nexport function makeSchemaChangeCodecs(options: ICodecOptions): ICodecFamily<SchemaChange> {\n\treturn makeCodecFamily([[SchemaCodecVersion.v1, makeSchemaChangeCodecV1(options)]]);\n}\n\n/**\n * Create a schema change codec.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @param writeVersion - The schema change write version.\n * @returns The composed codec.\n */\nexport function makeSchemaChangeCodec(\n\toptions: ICodecOptions,\n\twriteVersion: SchemaCodecVersion,\n): IJsonCodec<SchemaChange> {\n\tconst family = makeSchemaChangeCodecs(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * Compose the v1 schema change codec.\n * @param options - The codec options.\n * @returns The composed schema change codec.\n */\nfunction makeSchemaChangeCodecV1(\n\toptions: ICodecOptions,\n): IJsonCodec<SchemaChange, EncodedSchemaChange> {\n\tconst schemaCodec = makeSchemaCodec(options, SchemaCodecVersion.v1);\n\tconst schemaChangeCodec: IJsonCodec<SchemaChange, EncodedSchemaChange> = {\n\t\tencode: (schemaChange) => {\n\t\t\tassert(\n\t\t\t\t!schemaChange.isInverse,\n\t\t\t\t0x933 /* Inverse schema changes should never be transmitted */,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tnew: schemaCodec.encode(schemaChange.schema.new) as FormatV1,\n\t\t\t\told: schemaCodec.encode(schemaChange.schema.old) as FormatV1,\n\t\t\t};\n\t\t},\n\t\tdecode: (encoded) => {\n\t\t\treturn {\n\t\t\t\tschema: {\n\t\t\t\t\tnew: schemaCodec.decode(encoded.new),\n\t\t\t\t\told: schemaCodec.decode(encoded.old),\n\t\t\t\t},\n\t\t\t\tisInverse: false,\n\t\t\t};\n\t\t},\n\t\tencodedSchema: EncodedSchemaChange,\n\t};\n\n\treturn withSchemaValidation(EncodedSchemaChange, schemaChangeCodec, options.jsonValidator);\n}\n"]}
@@ -15,7 +15,7 @@ export declare const EncodedSchemaChange: import("@sinclair/typebox").TObject<{
15
15
  kind: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKindIdentifier>;
16
16
  types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("../../core/index.js").TreeNodeSchemaIdentifier<string>>>;
17
17
  }>>;
18
- leaf: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof import("../../core/schema-stored/format.js").PersistedValueSchema>>;
18
+ leaf: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof import("../../core/schema-stored/formatV1.js").PersistedValueSchema>>;
19
19
  }>>;
20
20
  root: import("@sinclair/typebox").TObject<{
21
21
  kind: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKindIdentifier>;
@@ -33,7 +33,7 @@ export declare const EncodedSchemaChange: import("@sinclair/typebox").TObject<{
33
33
  kind: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKindIdentifier>;
34
34
  types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("../../core/index.js").TreeNodeSchemaIdentifier<string>>>;
35
35
  }>>;
36
- leaf: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof import("../../core/schema-stored/format.js").PersistedValueSchema>>;
36
+ leaf: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof import("../../core/schema-stored/formatV1.js").PersistedValueSchema>>;
37
37
  }>>;
38
38
  root: import("@sinclair/typebox").TObject<{
39
39
  kind: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKindIdentifier>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemaChangeFormat.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"schemaChangeFormat.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAGtD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC"}