@fluidframework/tree 2.42.0 → 2.43.0-343119
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.
- package/api-report/tree.alpha.api.md +59 -21
- package/api-report/tree.beta.api.md +33 -0
- package/dist/alpha.d.ts +11 -6
- package/dist/beta.d.ts +6 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +5 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/schema-stored/formatV2.d.ts +80 -0
- package/dist/core/schema-stored/formatV2.d.ts.map +1 -0
- package/dist/core/schema-stored/formatV2.js +55 -0
- package/dist/core/schema-stored/formatV2.js.map +1 -0
- package/dist/core/schema-stored/index.d.ts +3 -1
- package/dist/core/schema-stored/index.d.ts.map +1 -1
- package/dist/core/schema-stored/index.js +5 -2
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +49 -17
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +65 -22
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +9 -7
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +13 -9
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +3 -3
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +6 -6
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js +3 -3
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +8 -3
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js +2 -5
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +23 -24
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts +0 -1
- package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/index.js +1 -7
- package/dist/feature-libraries/flex-tree/index.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.d.ts +2 -2
- package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.js +3 -0
- package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +1 -2
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +2 -5
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts +5 -5
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +15 -7
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +8 -3
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +2 -5
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +2 -2
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +1 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts +16 -2
- package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +2 -0
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +2 -0
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +8 -4
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -36
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js +3 -3
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +59 -9
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.d.ts +1 -1
- package/dist/feature-libraries/schema-index/formatV2.d.ts +42 -0
- package/dist/feature-libraries/schema-index/formatV2.d.ts.map +1 -0
- package/dist/feature-libraries/schema-index/formatV2.js +26 -0
- package/dist/feature-libraries/schema-index/formatV2.js.map +1 -0
- package/dist/feature-libraries/schema-index/index.d.ts +2 -1
- package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/index.js +4 -2
- package/dist/feature-libraries/schema-index/index.js.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +7 -2
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +6 -6
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +1 -0
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +5 -1
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +34 -5
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +12 -11
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.d.ts +8 -3
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +2 -5
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +18 -7
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +15 -2
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts +3 -3
- package/dist/simple-tree/api/schemaCreationUtilities.js +3 -3
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +15 -11
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +4 -0
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +41 -11
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +31 -4
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +2 -2
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/treeChangeEvents.d.ts +8 -3
- package/dist/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
- package/dist/simple-tree/api/treeChangeEvents.js.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +5 -0
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +5 -9
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +12 -31
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/index.d.ts +2 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +2 -0
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +3 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +3 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts +3 -2
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +4 -2
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts +3 -2
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +3 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +5 -1
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +50 -3
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js +28 -1
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +22 -4
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts +2 -0
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +13 -4
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/tableSchema.d.ts +1 -1
- package/dist/util/typeUtils.d.ts +2 -2
- package/dist/util/typeUtils.js.map +1 -1
- package/dist/util/utils.d.ts +2 -0
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js.map +1 -1
- package/lib/alpha.d.ts +11 -6
- package/lib/beta.d.ts +6 -1
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/schema-stored/formatV2.d.ts +80 -0
- package/lib/core/schema-stored/formatV2.d.ts.map +1 -0
- package/lib/core/schema-stored/formatV2.js +52 -0
- package/lib/core/schema-stored/formatV2.js.map +1 -0
- package/lib/core/schema-stored/index.d.ts +3 -1
- package/lib/core/schema-stored/index.d.ts.map +1 -1
- package/lib/core/schema-stored/index.js +3 -1
- package/lib/core/schema-stored/index.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +49 -17
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +63 -21
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +9 -7
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +11 -7
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +3 -3
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +7 -7
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js +3 -3
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +8 -3
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js +2 -5
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +23 -24
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts +0 -1
- package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/index.js +0 -1
- package/lib/feature-libraries/flex-tree/index.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +2 -2
- package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.js +3 -0
- package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +1 -2
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +3 -6
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts +5 -5
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +15 -7
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +8 -3
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -5
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +2 -2
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts +16 -2
- package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +2 -0
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +2 -0
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +8 -4
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -36
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js +3 -3
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +60 -10
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.d.ts +1 -1
- package/lib/feature-libraries/schema-index/formatV2.d.ts +42 -0
- package/lib/feature-libraries/schema-index/formatV2.d.ts.map +1 -0
- package/lib/feature-libraries/schema-index/formatV2.js +23 -0
- package/lib/feature-libraries/schema-index/formatV2.js.map +1 -0
- package/lib/feature-libraries/schema-index/index.d.ts +2 -1
- package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/index.js +2 -1
- package/lib/feature-libraries/schema-index/index.js.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +7 -2
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +6 -6
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +1 -0
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +5 -1
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +34 -5
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +3 -2
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.d.ts +8 -3
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +2 -5
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +18 -7
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +15 -2
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts +3 -3
- package/lib/simple-tree/api/schemaCreationUtilities.js +3 -3
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +15 -11
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +4 -0
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +41 -11
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +31 -4
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +2 -2
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/treeChangeEvents.d.ts +8 -3
- package/lib/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
- package/lib/simple-tree/api/treeChangeEvents.js.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +5 -0
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +5 -9
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +15 -34
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/index.d.ts +2 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +2 -0
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +3 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +3 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts +3 -2
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +5 -3
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts +3 -2
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +3 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/lib/simple-tree/prepareForInsertion.js +5 -1
- package/lib/simple-tree/prepareForInsertion.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +50 -3
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js +28 -1
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +22 -4
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts +2 -0
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +13 -4
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/tableSchema.d.ts +1 -1
- package/lib/util/typeUtils.d.ts +2 -2
- package/lib/util/typeUtils.js.map +1 -1
- package/lib/util/utils.d.ts +2 -0
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js.map +1 -1
- package/package.json +21 -21
- package/src/core/index.ts +3 -1
- package/src/core/schema-stored/formatV2.ts +78 -0
- package/src/core/schema-stored/index.ts +4 -1
- package/src/core/schema-stored/schema.ts +123 -33
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +16 -11
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +16 -7
- package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +4 -4
- package/src/feature-libraries/detachedFieldIndexSummarizer.ts +9 -16
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +32 -29
- package/src/feature-libraries/flex-tree/index.ts +0 -8
- package/src/feature-libraries/flex-tree/lazyEntity.ts +5 -1
- package/src/feature-libraries/flex-tree/lazyField.ts +5 -8
- package/src/feature-libraries/flex-tree/lazyNode.ts +17 -8
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +9 -16
- package/src/feature-libraries/index.ts +1 -1
- package/src/feature-libraries/mapTreeCursor.ts +17 -8
- package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +2 -0
- package/src/feature-libraries/object-forest/objectForest.ts +3 -0
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +11 -6
- package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +3 -3
- package/src/feature-libraries/schema-index/codec.ts +73 -14
- package/src/feature-libraries/schema-index/formatV2.ts +30 -0
- package/src/feature-libraries/schema-index/index.ts +2 -1
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +11 -18
- package/src/index.ts +5 -0
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/schematizeTree.ts +1 -0
- package/src/shared-tree/sharedTree.ts +42 -12
- package/src/shared-tree/treeAlpha.ts +8 -3
- package/src/shared-tree-core/editManagerSummarizer.ts +9 -16
- package/src/shared-tree-core/sharedTreeCore.ts +33 -24
- package/src/simple-tree/api/schemaCompatibilityTester.ts +1 -1
- package/src/simple-tree/api/schemaCreationUtilities.ts +3 -3
- package/src/simple-tree/api/schemaFactory.ts +16 -11
- package/src/simple-tree/api/schemaFactoryAlpha.ts +53 -8
- package/src/simple-tree/api/storedSchema.ts +4 -4
- package/src/simple-tree/api/treeChangeEvents.ts +8 -3
- package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +5 -0
- package/src/simple-tree/core/treeNodeKernel.ts +1 -1
- package/src/simple-tree/core/unhydratedFlexTree.ts +22 -44
- package/src/simple-tree/index.ts +3 -0
- package/src/simple-tree/leafNodeSchema.ts +2 -0
- package/src/simple-tree/node-kinds/array/arrayNode.ts +5 -0
- package/src/simple-tree/node-kinds/map/mapNode.ts +11 -2
- package/src/simple-tree/node-kinds/object/objectNode.ts +9 -1
- package/src/simple-tree/prepareForInsertion.ts +5 -1
- package/src/simple-tree/schemaTypes.ts +96 -7
- package/src/simple-tree/simpleSchema.ts +27 -5
- package/src/simple-tree/toStoredSchema.ts +15 -4
- package/src/util/typeUtils.ts +2 -2
- package/src/util/utils.ts +2 -0
- package/dist/feature-libraries/flex-tree/navigation.d.ts +0 -46
- package/dist/feature-libraries/flex-tree/navigation.d.ts.map +0 -1
- package/dist/feature-libraries/flex-tree/navigation.js +0 -104
- package/dist/feature-libraries/flex-tree/navigation.js.map +0 -1
- package/lib/feature-libraries/flex-tree/navigation.d.ts +0 -46
- package/lib/feature-libraries/flex-tree/navigation.d.ts.map +0 -1
- package/lib/feature-libraries/flex-tree/navigation.js +0 -97
- package/lib/feature-libraries/flex-tree/navigation.js.map +0 -1
- package/src/feature-libraries/flex-tree/navigation.ts +0 -121
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
-
// @
|
|
7
|
+
// @beta
|
|
8
8
|
export function adaptEnum<TScope extends string, const TEnum extends Record<string, string | number>>(factory: SchemaFactory<TScope>, members: TEnum): (<TValue extends TEnum[keyof TEnum]>(value: TValue) => TValue extends unknown ? TreeNode & {
|
|
9
9
|
readonly value: TValue;
|
|
10
10
|
} : never) & { readonly [Property in keyof TEnum]: TreeNodeSchemaClass<ScopedSchemaName<TScope, TEnum[Property]>, NodeKind.Object, TreeNode & {
|
|
@@ -139,7 +139,7 @@ export function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema,
|
|
|
139
139
|
interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider"> {
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
// @
|
|
142
|
+
// @beta
|
|
143
143
|
export function enumFromStrings<TScope extends string, const Members extends readonly string[]>(factory: SchemaFactory<TScope>, members: Members): (<TValue extends Members[number]>(value: TValue) => TValue extends unknown ? TreeNode & {
|
|
144
144
|
readonly value: TValue;
|
|
145
145
|
} : never) & { [Index in Extract<keyof Members, `${number}`> extends `${infer N extends number}` ? N : never as Members[Index]]: TreeNodeSchemaClass<ScopedSchemaName<TScope, Members[Index]>, NodeKind.Object, TreeNode & {
|
|
@@ -186,6 +186,11 @@ export interface FieldProps<TCustomMetadata = unknown> {
|
|
|
186
186
|
readonly metadata?: FieldSchemaMetadata<TCustomMetadata>;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
// @alpha @input
|
|
190
|
+
export interface FieldPropsAlpha<TCustomMetadata = unknown> extends FieldProps<TCustomMetadata> {
|
|
191
|
+
readonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;
|
|
192
|
+
}
|
|
193
|
+
|
|
189
194
|
// @public @sealed
|
|
190
195
|
export class FieldSchema<out Kind extends FieldKind = FieldKind, out Types extends ImplicitAllowedTypes = ImplicitAllowedTypes, out TCustomMetadata = unknown> {
|
|
191
196
|
protected constructor(
|
|
@@ -203,13 +208,14 @@ export class FieldSchema<out Kind extends FieldKind = FieldKind, out Types exten
|
|
|
203
208
|
|
|
204
209
|
// @alpha @sealed
|
|
205
210
|
export class FieldSchemaAlpha<Kind extends FieldKind = FieldKind, Types extends ImplicitAllowedTypes = ImplicitAllowedTypes, TCustomMetadata = unknown> extends FieldSchema<Kind, Types, TCustomMetadata> implements SimpleFieldSchema {
|
|
206
|
-
protected constructor(kind: Kind, types: Types, annotatedAllowedTypes: ImplicitAnnotatedAllowedTypes, props?:
|
|
211
|
+
protected constructor(kind: Kind, types: Types, annotatedAllowedTypes: ImplicitAnnotatedAllowedTypes, props?: FieldPropsAlpha<TCustomMetadata>);
|
|
207
212
|
// (undocumented)
|
|
208
213
|
get allowedTypesIdentifiers(): ReadonlySet<string>;
|
|
209
214
|
readonly allowedTypesMetadata: AllowedTypesMetadata;
|
|
210
215
|
// (undocumented)
|
|
211
216
|
readonly annotatedAllowedTypes: ImplicitAnnotatedAllowedTypes;
|
|
212
217
|
get annotatedAllowedTypeSet(): ReadonlyMap<TreeNodeSchema, AllowedTypeMetadata>;
|
|
218
|
+
get persistedMetadata(): JsonCompatibleReadOnlyObject | undefined;
|
|
213
219
|
}
|
|
214
220
|
|
|
215
221
|
// @alpha @sealed @system
|
|
@@ -448,6 +454,14 @@ export type JsonCompatibleObject<TExtra = never> = {
|
|
|
448
454
|
[P in string]?: JsonCompatible<TExtra>;
|
|
449
455
|
};
|
|
450
456
|
|
|
457
|
+
// @alpha
|
|
458
|
+
export type JsonCompatibleReadOnly = string | number | boolean | null | readonly JsonCompatibleReadOnly[] | JsonCompatibleReadOnlyObject;
|
|
459
|
+
|
|
460
|
+
// @alpha
|
|
461
|
+
export type JsonCompatibleReadOnlyObject = {
|
|
462
|
+
readonly [P in string]?: JsonCompatibleReadOnly;
|
|
463
|
+
};
|
|
464
|
+
|
|
451
465
|
// @alpha @sealed
|
|
452
466
|
export type JsonFieldSchema = {
|
|
453
467
|
readonly description?: string | undefined;
|
|
@@ -596,6 +610,11 @@ export interface NodeSchemaOptions<out TCustomMetadata = unknown> {
|
|
|
596
610
|
readonly metadata?: NodeSchemaMetadata<TCustomMetadata> | undefined;
|
|
597
611
|
}
|
|
598
612
|
|
|
613
|
+
// @alpha
|
|
614
|
+
export interface NodeSchemaOptionsAlpha<out TCustomMetadata = unknown> extends NodeSchemaOptions<TCustomMetadata> {
|
|
615
|
+
readonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;
|
|
616
|
+
}
|
|
617
|
+
|
|
599
618
|
// @alpha
|
|
600
619
|
export const noopValidator: JsonValidator;
|
|
601
620
|
|
|
@@ -620,7 +639,7 @@ export type Off = Off_2;
|
|
|
620
639
|
// @alpha
|
|
621
640
|
export function persistedToSimpleSchema(persisted: JsonCompatible, options: ICodecOptions): SimpleTreeSchema;
|
|
622
641
|
|
|
623
|
-
// @
|
|
642
|
+
// @beta @system
|
|
624
643
|
export type PopUnion<Union, AsOverloadedFunction = UnionToIntersection<Union extends unknown ? (f: Union) => void : never>> = AsOverloadedFunction extends (a: infer First) => void ? First : never;
|
|
625
644
|
|
|
626
645
|
// @alpha @system
|
|
@@ -761,30 +780,42 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
761
780
|
|
|
762
781
|
// @alpha
|
|
763
782
|
export class SchemaFactoryAlpha<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory<TScope, TName> {
|
|
764
|
-
arrayAlpha<const Name extends TName, const T extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?:
|
|
765
|
-
arrayRecursive<const Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?:
|
|
783
|
+
arrayAlpha<const Name extends TName, const T extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
784
|
+
arrayRecursive<const Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchemaUnsafe<ScopedSchemaName<TScope, Name>, T, TCustomMetadata>;
|
|
766
785
|
static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps_2<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha_2<FieldKind_2.Identifier, LeafSchema_2<"string", string> & SimpleLeafNodeSchema_2, TCustomMetadata>;
|
|
767
786
|
static readonly leaves: readonly [LeafSchema_2<"string", string> & SimpleLeafNodeSchema_2, LeafSchema_2<"number", number> & SimpleLeafNodeSchema_2, LeafSchema_2<"boolean", boolean> & SimpleLeafNodeSchema_2, LeafSchema_2<"null", null> & SimpleLeafNodeSchema_2, LeafSchema_2<"handle", IFluidHandle<unknown>> & SimpleLeafNodeSchema_2];
|
|
768
|
-
|
|
769
|
-
|
|
787
|
+
readonly leaves: readonly [LeafSchema_2<"string", string> & SimpleLeafNodeSchema_2, LeafSchema_2<"number", number> & SimpleLeafNodeSchema_2, LeafSchema_2<"boolean", boolean> & SimpleLeafNodeSchema_2, LeafSchema_2<"null", null> & SimpleLeafNodeSchema_2, LeafSchema_2<"handle", IFluidHandle<unknown>> & SimpleLeafNodeSchema_2];
|
|
788
|
+
mapAlpha<Name extends TName, const T extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
789
|
+
mapRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchemaUnsafe<ScopedSchemaName<TScope, Name>, T, TCustomMetadata>;
|
|
770
790
|
objectAlpha<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitAnnotatedFieldSchema>, const TCustomMetadata = unknown>(name: Name, fields: T, options?: SchemaFactoryObjectOptions<TCustomMetadata>): ObjectNodeSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> & {
|
|
771
791
|
readonly createFromInsertable: unknown;
|
|
772
792
|
};
|
|
773
793
|
objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>, const TCustomMetadata = unknown>(name: Name, t: T, options?: SchemaFactoryObjectOptions<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, System_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>, false, T, never, TCustomMetadata> & SimpleObjectNodeSchema<TCustomMetadata> & Pick<ObjectNodeSchema, "fields">;
|
|
774
794
|
static readonly optional: {
|
|
775
|
-
<const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<
|
|
776
|
-
<const T_1 extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata_1 = unknown>(t: T_1, props?: Omit<
|
|
795
|
+
<const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha_2<TCustomMetadata>, "defaultProvider"> | undefined): FieldSchemaAlpha_2<FieldKind_2.Optional, T, TCustomMetadata>;
|
|
796
|
+
<const T_1 extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata_1 = unknown>(t: T_1, props?: Omit<FieldPropsAlpha_2<TCustomMetadata_1>, "defaultProvider"> | undefined): FieldSchemaAlpha_2<FieldKind_2.Optional, UnannotateImplicitAllowedTypes_2<T_1>, TCustomMetadata_1>;
|
|
797
|
+
};
|
|
798
|
+
readonly optional: {
|
|
799
|
+
<const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha_2<TCustomMetadata>, "defaultProvider"> | undefined): FieldSchemaAlpha_2<FieldKind_2.Optional, T, TCustomMetadata>;
|
|
800
|
+
<const T_1 extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata_1 = unknown>(t: T_1, props?: Omit<FieldPropsAlpha_2<TCustomMetadata_1>, "defaultProvider"> | undefined): FieldSchemaAlpha_2<FieldKind_2.Optional, UnannotateImplicitAllowedTypes_2<T_1>, TCustomMetadata_1>;
|
|
777
801
|
};
|
|
778
|
-
static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<
|
|
802
|
+
static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha_2<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlphaUnsafe_2<FieldKind_2.Optional, T, TCustomMetadata>;
|
|
803
|
+
readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha_2<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlphaUnsafe_2<FieldKind_2.Optional, T, TCustomMetadata>;
|
|
779
804
|
static readonly required: {
|
|
780
|
-
<const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<
|
|
781
|
-
<const T_1 extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata_1 = unknown>(t: T_1, props?: Omit<
|
|
805
|
+
<const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha_2<TCustomMetadata>, "defaultProvider"> | undefined): FieldSchemaAlpha_2<FieldKind_2.Required, T, TCustomMetadata>;
|
|
806
|
+
<const T_1 extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata_1 = unknown>(t: T_1, props?: Omit<FieldPropsAlpha_2<TCustomMetadata_1>, "defaultProvider"> | undefined): FieldSchemaAlpha_2<FieldKind_2.Required, UnannotateImplicitAllowedTypes_2<T_1>, TCustomMetadata_1>;
|
|
807
|
+
};
|
|
808
|
+
readonly required: {
|
|
809
|
+
<const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha_2<TCustomMetadata>, "defaultProvider"> | undefined): FieldSchemaAlpha_2<FieldKind_2.Required, T, TCustomMetadata>;
|
|
810
|
+
<const T_1 extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata_1 = unknown>(t: T_1, props?: Omit<FieldPropsAlpha_2<TCustomMetadata_1>, "defaultProvider"> | undefined): FieldSchemaAlpha_2<FieldKind_2.Required, UnannotateImplicitAllowedTypes_2<T_1>, TCustomMetadata_1>;
|
|
782
811
|
};
|
|
812
|
+
static readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha_2<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlphaUnsafe_2<FieldKind_2.Required, T, TCustomMetadata>;
|
|
813
|
+
readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha_2<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlphaUnsafe_2<FieldKind_2.Required, T, TCustomMetadata>;
|
|
783
814
|
scopedFactory<const T extends TName, TNameInner extends number | string = string>(name: T): SchemaFactoryAlpha<ScopedSchemaName<TScope, T>, TNameInner>;
|
|
784
815
|
}
|
|
785
816
|
|
|
786
817
|
// @alpha
|
|
787
|
-
export interface SchemaFactoryObjectOptions<TCustomMetadata = unknown> extends
|
|
818
|
+
export interface SchemaFactoryObjectOptions<TCustomMetadata = unknown> extends NodeSchemaOptionsAlpha<TCustomMetadata> {
|
|
788
819
|
allowUnknownOptionalFields?: boolean;
|
|
789
820
|
}
|
|
790
821
|
|
|
@@ -827,6 +858,7 @@ export const SharedTreeFormatVersion: {
|
|
|
827
858
|
readonly v1: 1;
|
|
828
859
|
readonly v2: 2;
|
|
829
860
|
readonly v3: 3;
|
|
861
|
+
readonly v5: 5;
|
|
830
862
|
};
|
|
831
863
|
|
|
832
864
|
// @alpha
|
|
@@ -836,7 +868,7 @@ export type SharedTreeFormatVersion = typeof SharedTreeFormatVersion;
|
|
|
836
868
|
export type SharedTreeOptions = Partial<CodecWriteOptions> & Partial<SharedTreeFormatOptions> & ForestOptions;
|
|
837
869
|
|
|
838
870
|
// @alpha @sealed
|
|
839
|
-
export interface SimpleArrayNodeSchema<out TCustomMetadata = unknown> extends
|
|
871
|
+
export interface SimpleArrayNodeSchema<out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<NodeKind.Array, TCustomMetadata> {
|
|
840
872
|
readonly allowedTypesIdentifiers: ReadonlySet<string>;
|
|
841
873
|
}
|
|
842
874
|
|
|
@@ -845,15 +877,16 @@ export interface SimpleFieldSchema {
|
|
|
845
877
|
readonly allowedTypesIdentifiers: ReadonlySet<string>;
|
|
846
878
|
readonly kind: FieldKind;
|
|
847
879
|
readonly metadata: FieldSchemaMetadata;
|
|
880
|
+
readonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;
|
|
848
881
|
}
|
|
849
882
|
|
|
850
883
|
// @alpha @sealed
|
|
851
|
-
export interface SimpleLeafNodeSchema extends
|
|
884
|
+
export interface SimpleLeafNodeSchema extends SimpleNodeSchemaBaseAlpha<NodeKind.Leaf> {
|
|
852
885
|
readonly leafKind: ValueSchema;
|
|
853
886
|
}
|
|
854
887
|
|
|
855
888
|
// @alpha @sealed
|
|
856
|
-
export interface SimpleMapNodeSchema<out TCustomMetadata = unknown> extends
|
|
889
|
+
export interface SimpleMapNodeSchema<out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<NodeKind.Map, TCustomMetadata> {
|
|
857
890
|
readonly allowedTypesIdentifiers: ReadonlySet<string>;
|
|
858
891
|
}
|
|
859
892
|
|
|
@@ -866,13 +899,18 @@ export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCusto
|
|
|
866
899
|
readonly metadata: NodeSchemaMetadata<TCustomMetadata>;
|
|
867
900
|
}
|
|
868
901
|
|
|
902
|
+
// @alpha @sealed @system
|
|
903
|
+
export interface SimpleNodeSchemaBaseAlpha<out TNodeKind extends NodeKind, out TCustomMetadata = unknown> extends SimpleNodeSchemaBase<TNodeKind, TCustomMetadata> {
|
|
904
|
+
readonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined;
|
|
905
|
+
}
|
|
906
|
+
|
|
869
907
|
// @alpha @sealed
|
|
870
908
|
export interface SimpleObjectFieldSchema extends SimpleFieldSchema {
|
|
871
909
|
readonly storedKey: string;
|
|
872
910
|
}
|
|
873
911
|
|
|
874
912
|
// @alpha @sealed
|
|
875
|
-
export interface SimpleObjectNodeSchema<out TCustomMetadata = unknown> extends
|
|
913
|
+
export interface SimpleObjectNodeSchema<out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<NodeKind.Object, TCustomMetadata> {
|
|
876
914
|
readonly fields: ReadonlyMap<string, SimpleObjectFieldSchema>;
|
|
877
915
|
}
|
|
878
916
|
|
|
@@ -885,7 +923,7 @@ export interface SimpleTreeSchema {
|
|
|
885
923
|
readonly root: SimpleFieldSchema;
|
|
886
924
|
}
|
|
887
925
|
|
|
888
|
-
// @
|
|
926
|
+
// @beta
|
|
889
927
|
export function singletonSchema<TScope extends string, TName extends string | number>(factory: SchemaFactory<TScope, TName>, name: TName): TreeNodeSchemaClass<ScopedSchemaName<TScope, TName>, NodeKind.Object, TreeNode & {
|
|
890
928
|
readonly value: TName;
|
|
891
929
|
}, Record<string, never>, true, Record<string, never>, undefined>;
|
|
@@ -920,7 +958,7 @@ export namespace System_TableSchema {
|
|
|
920
958
|
}), true, {
|
|
921
959
|
readonly props: TPropsSchema;
|
|
922
960
|
readonly id: FieldSchema_2<FieldKind_3.Identifier, LeafSchema_3<"string", string>, unknown>;
|
|
923
|
-
readonly cells:
|
|
961
|
+
readonly cells: FieldSchemaAlpha_3<FieldKind_3.Required, TreeNodeSchemaClass<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Row.cells">, NodeKind.Map, TreeMapNode_2<TCellSchema> & WithType<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Row.cells">, NodeKind.Map, unknown>, MapNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined>, unknown>;
|
|
924
962
|
}>;
|
|
925
963
|
// @system
|
|
926
964
|
export function createTableSchema<const TInputScope extends string | undefined, const TCellSchema extends ImplicitAllowedTypes, const TColumnSchema extends ColumnSchemaBase<TInputScope, TCellSchema>, const TRowSchema extends RowSchemaBase<TInputScope, TCellSchema>>(inputSchemaFactory: SchemaFactoryAlpha<TInputScope>, _cellSchema: TCellSchema, columnSchema: TColumnSchema, rowSchema: TRowSchema): TreeNodeSchemaCore_2<ScopedSchemaName<ScopedSchemaName<TInputScope, "table">, "Table">, NodeKind.Object, true, {
|
|
@@ -1479,7 +1517,7 @@ export type Unhydrated<T> = T;
|
|
|
1479
1517
|
// @public @system
|
|
1480
1518
|
export type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) extends (k: infer U) => unknown ? U : never;
|
|
1481
1519
|
|
|
1482
|
-
// @
|
|
1520
|
+
// @beta @system
|
|
1483
1521
|
export type UnionToTuple<Union, A extends unknown[] = [], First = PopUnion<Union>> = IsUnion<Union> extends true ? UnionToTuple<Exclude<Union, First>, [First, ...A]> : [Union, ...A];
|
|
1484
1522
|
|
|
1485
1523
|
// @alpha
|
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
+
// @beta
|
|
8
|
+
export function adaptEnum<TScope extends string, const TEnum extends Record<string, string | number>>(factory: SchemaFactory<TScope>, members: TEnum): (<TValue extends TEnum[keyof TEnum]>(value: TValue) => TValue extends unknown ? TreeNode & {
|
|
9
|
+
readonly value: TValue;
|
|
10
|
+
} : never) & { readonly [Property in keyof TEnum]: TreeNodeSchemaClass<ScopedSchemaName<TScope, TEnum[Property]>, NodeKind.Object, TreeNode & {
|
|
11
|
+
readonly value: TEnum[Property];
|
|
12
|
+
}, Record<string, never>, true, Record<string, never>, undefined>; } & {
|
|
13
|
+
readonly schema: UnionToTuple<{ readonly [Property in keyof TEnum]: TreeNodeSchemaClass<ScopedSchemaName<TScope, TEnum[Property]>, NodeKind.Object, TreeNode & {
|
|
14
|
+
readonly value: TEnum[Property];
|
|
15
|
+
}, Record<string, never>, true, Record<string, never>, undefined>; }[keyof TEnum]>;
|
|
16
|
+
};
|
|
17
|
+
|
|
7
18
|
// @public @system
|
|
8
19
|
export type AllowedTypes = readonly LazyItem<TreeNodeSchema>[];
|
|
9
20
|
|
|
@@ -36,6 +47,17 @@ export interface CommitMetadata {
|
|
|
36
47
|
interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider"> {
|
|
37
48
|
}
|
|
38
49
|
|
|
50
|
+
// @beta
|
|
51
|
+
export function enumFromStrings<TScope extends string, const Members extends readonly string[]>(factory: SchemaFactory<TScope>, members: Members): (<TValue extends Members[number]>(value: TValue) => TValue extends unknown ? TreeNode & {
|
|
52
|
+
readonly value: TValue;
|
|
53
|
+
} : never) & { [Index in Extract<keyof Members, `${number}`> extends `${infer N extends number}` ? N : never as Members[Index]]: TreeNodeSchemaClass<ScopedSchemaName<TScope, Members[Index]>, NodeKind.Object, TreeNode & {
|
|
54
|
+
readonly value: Members[Index];
|
|
55
|
+
}, Record<string, never>, true, Record<string, never>, undefined>; } & {
|
|
56
|
+
readonly schema: UnionToTuple<Members[number] extends unknown ? { [Index in Extract<keyof Members, `${number}`> extends `${infer N extends number}` ? N : never as Members[Index]]: TreeNodeSchemaClass<ScopedSchemaName<TScope, Members[Index]>, NodeKind.Object, TreeNode & {
|
|
57
|
+
readonly value: Members[Index];
|
|
58
|
+
}, Record<string, never>, true, Record<string, never>, undefined>; }[Members[number]] : never>;
|
|
59
|
+
};
|
|
60
|
+
|
|
39
61
|
// @public @system
|
|
40
62
|
type ExtractItemType<Item extends LazyItem> = Item extends () => infer Result ? Result : Item;
|
|
41
63
|
|
|
@@ -242,6 +264,9 @@ export type ObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFie
|
|
|
242
264
|
// @public @deprecated
|
|
243
265
|
export type Off = Off_2;
|
|
244
266
|
|
|
267
|
+
// @beta @system
|
|
268
|
+
export type PopUnion<Union, AsOverloadedFunction = UnionToIntersection<Union extends unknown ? (f: Union) => void : never>> = AsOverloadedFunction extends (a: infer First) => void ? First : never;
|
|
269
|
+
|
|
245
270
|
// @public @sealed @system
|
|
246
271
|
export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends ReadonlyArray<T>, Awaited<TreeNode & WithType<string, NodeKind.Array>> {
|
|
247
272
|
}
|
|
@@ -377,6 +402,11 @@ export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCusto
|
|
|
377
402
|
readonly metadata: NodeSchemaMetadata<TCustomMetadata>;
|
|
378
403
|
}
|
|
379
404
|
|
|
405
|
+
// @beta
|
|
406
|
+
export function singletonSchema<TScope extends string, TName extends string | number>(factory: SchemaFactory<TScope, TName>, name: TName): TreeNodeSchemaClass<ScopedSchemaName<TScope, TName>, NodeKind.Object, TreeNode & {
|
|
407
|
+
readonly value: TName;
|
|
408
|
+
}, Record<string, never>, true, Record<string, never>, undefined>;
|
|
409
|
+
|
|
380
410
|
// @public @system
|
|
381
411
|
export namespace System_Unsafe {
|
|
382
412
|
// @system
|
|
@@ -641,6 +671,9 @@ export type Unhydrated<T> = T;
|
|
|
641
671
|
// @public @system
|
|
642
672
|
export type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) extends (k: infer U) => unknown ? U : never;
|
|
643
673
|
|
|
674
|
+
// @beta @system
|
|
675
|
+
export type UnionToTuple<Union, A extends unknown[] = [], First = PopUnion<Union>> = IsUnion<Union> extends true ? UnionToTuple<Exclude<Union, First>, [First, ...A]> : [Union, ...A];
|
|
676
|
+
|
|
644
677
|
// @public
|
|
645
678
|
export type ValidateRecursiveSchema<T extends ValidateRecursiveSchemaTemplate<T>> = true;
|
|
646
679
|
|
package/dist/alpha.d.ts
CHANGED
|
@@ -90,8 +90,13 @@ export {
|
|
|
90
90
|
|
|
91
91
|
// @beta APIs
|
|
92
92
|
NodeChangedData,
|
|
93
|
+
PopUnion,
|
|
93
94
|
TreeBeta,
|
|
94
|
-
TreeChangeEventsBeta,
|
|
95
|
+
TreeChangeEventsBeta,
|
|
96
|
+
UnionToTuple,
|
|
97
|
+
adaptEnum,
|
|
98
|
+
enumFromStrings,
|
|
99
|
+
singletonSchema,
|
|
95
100
|
|
|
96
101
|
// @alpha APIs
|
|
97
102
|
AllowedTypeMetadata,
|
|
@@ -107,6 +112,7 @@ export {
|
|
|
107
112
|
ConciseTree,
|
|
108
113
|
FactoryContent,
|
|
109
114
|
FactoryContentObject,
|
|
115
|
+
FieldPropsAlpha,
|
|
110
116
|
FieldSchemaAlpha,
|
|
111
117
|
FieldSchemaAlphaUnsafe,
|
|
112
118
|
FixRecursiveArraySchema,
|
|
@@ -130,6 +136,8 @@ export {
|
|
|
130
136
|
JsonAsTree,
|
|
131
137
|
JsonCompatible,
|
|
132
138
|
JsonCompatibleObject,
|
|
139
|
+
JsonCompatibleReadOnly,
|
|
140
|
+
JsonCompatibleReadOnlyObject,
|
|
133
141
|
JsonFieldSchema,
|
|
134
142
|
JsonLeafNodeSchema,
|
|
135
143
|
JsonLeafSchemaType,
|
|
@@ -147,8 +155,8 @@ export {
|
|
|
147
155
|
MapNodeCustomizableSchemaUnsafe,
|
|
148
156
|
MapNodePojoEmulationSchema,
|
|
149
157
|
MapNodeSchema,
|
|
158
|
+
NodeSchemaOptionsAlpha,
|
|
150
159
|
ObjectNodeSchema,
|
|
151
|
-
PopUnion,
|
|
152
160
|
ReadSchema,
|
|
153
161
|
ReadableField,
|
|
154
162
|
RevertibleAlpha,
|
|
@@ -165,6 +173,7 @@ export {
|
|
|
165
173
|
SimpleLeafNodeSchema,
|
|
166
174
|
SimpleMapNodeSchema,
|
|
167
175
|
SimpleNodeSchema,
|
|
176
|
+
SimpleNodeSchemaBaseAlpha,
|
|
168
177
|
SimpleObjectFieldSchema,
|
|
169
178
|
SimpleObjectNodeSchema,
|
|
170
179
|
SimpleTreeIndex,
|
|
@@ -197,21 +206,18 @@ export {
|
|
|
197
206
|
UnannotateImplicitAllowedTypes,
|
|
198
207
|
UnannotateImplicitFieldSchema,
|
|
199
208
|
UnannotateSchemaRecord,
|
|
200
|
-
UnionToTuple,
|
|
201
209
|
UnsafeUnknownSchema,
|
|
202
210
|
ValueSchema,
|
|
203
211
|
VerboseTree,
|
|
204
212
|
VerboseTreeNode,
|
|
205
213
|
ViewContent,
|
|
206
214
|
VoidTransactionCallbackStatus,
|
|
207
|
-
adaptEnum,
|
|
208
215
|
allowUnused,
|
|
209
216
|
asTreeViewAlpha,
|
|
210
217
|
cloneWithReplacements,
|
|
211
218
|
comparePersistedSchema,
|
|
212
219
|
createIdentifierIndex,
|
|
213
220
|
createSimpleTreeIndex,
|
|
214
|
-
enumFromStrings,
|
|
215
221
|
evaluateLazySchema,
|
|
216
222
|
extractPersistedSchema,
|
|
217
223
|
generateSchemaFromSimpleSchema,
|
|
@@ -225,6 +231,5 @@ export {
|
|
|
225
231
|
replaceConciseTreeHandles,
|
|
226
232
|
replaceHandles,
|
|
227
233
|
replaceVerboseTreeHandles,
|
|
228
|
-
singletonSchema,
|
|
229
234
|
typeboxValidator
|
|
230
235
|
} from "./index.js";
|
package/dist/beta.d.ts
CHANGED
package/dist/core/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { EmptyKey, type TreeType, type Value, type TreeValue, AnchorSet, type DetachedField, type UpPath, type NormalizedUpPath, type INormalizedUpPath, type NormalizedFieldUpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, type FieldUpPath, type Anchor, type RootField, type ChildCollection, type ChildLocation, type FieldMapObject, type NodeData, type GenericTreeNode, type JsonableTree, EncodedJsonableTree, rootFieldKey, rootField, type ITreeCursor, CursorLocationType, type ITreeCursorSynchronous, castCursorToSynchronous, type GenericFieldsNode, type AnchorLocator, genericTreeKeys, getGenericTreeField, genericTreeDeleteIfEmpty, getDepth, mapCursorField, mapCursorFields, iterateCursorField, type MapTree, detachedFieldAsKey, keyAsDetachedField, visitDelta, createAnnouncedVisitor, combineVisitors, announceDelta, applyDelta, makeDetachedFieldIndex, setGenericTreeField, type DeltaVisitor, type AnnouncedVisitor, SparseNode, getDescendant, compareUpPaths, clonePath, topDownPath, compareFieldUpPaths, forEachNode, forEachNodeInSubtree, forEachField, type PathRootPrefix, deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, type AnchorSlot, type AnchorNode, anchorSlot, type UpPathDefault, isDetachedUpPath, inCursorField, inCursorNode, type AnchorEvents, type AnchorSetRootEvents, type ProtoNodes, CursorMarker, isCursor, DetachedFieldIndex, type ForestRootId, getDetachedFieldContainingPath, aboveRootPlaceholder, type DeltaRoot, type DeltaMark, type DeltaDetachedNodeId, type DeltaFieldMap, type DeltaDetachedNodeChanges, type DeltaDetachedNodeBuild, type DeltaDetachedNodeDestruction, type DeltaDetachedNodeRename, type DeltaFieldChanges, type ExclusiveMapTree, deepCopyMapTree, type TreeChunk, dummyRoot, cursorChunk, tryGetChunk, type ChunkedCursor, } from "./tree/index.js";
|
|
6
6
|
export { TreeNavigationResult, type IEditableForest, type IForestSubscription, type TreeLocation, type FieldLocation, type ForestLocation, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, type FieldAnchor, moveToDetachedField, type ForestEvents, } from "./forest/index.js";
|
|
7
|
-
export { type FieldKey, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type TreeStoredSchemaSubscription, type MutableTreeStoredSchema, type FieldKindIdentifier, type FieldKindData, type TreeTypeSet, type TreeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, type SchemaEvents, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, type StoredSchemaCollection, schemaFormatV1, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, decodeFieldSchema,
|
|
7
|
+
export { type FieldKey, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type TreeStoredSchemaSubscription, type MutableTreeStoredSchema, type FieldKindIdentifier, type FieldKindData, type TreeTypeSet, type TreeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, type SchemaEvents, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, type StoredSchemaCollection, schemaFormatV1, schemaFormatV2, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, decodeFieldSchema, encodeFieldSchemaV1, encodeFieldSchemaV2, storedSchemaDecodeDispatcher, type SchemaAndPolicy, Multiplicity, type SchemaPolicy, SchemaVersion, } from "./schema-stored/index.js";
|
|
8
8
|
export { type ChangeFamily, type ChangeFamilyCodec, type ChangeEncodingContext, type ChangeFamilyEditor, EditBuilder, } from "./change-family/index.js";
|
|
9
9
|
export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, type ChangeRebaser, findAncestor, findCommonAncestor, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, RevisionTagCodec, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, type TaggedChange, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, type RevisionMetadataSource, revisionMetadataSourceFromInfo, type RevisionInfo, type EncodedRevisionTag, type EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, subtractChangeAtomIds, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, isAncestor, type ChangeAtomIdRangeMap, newChangeAtomIdRangeMap, compareRevisions, } from "./rebase/index.js";
|
|
10
10
|
export { type Adapters, AdaptedViewSchema, type TreeAdapter, } from "./schema-view/index.js";
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,K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AmB,EACnB,KAAK,YAAY,GACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,WAAW,EACX,oBAAoB,EACpB,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,YAAY,EACjB,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,KAAK,OAAO,EACZ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M,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,iBAAiB,EACjB,KAAK,WAAW,GAChB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.TreeNavigationResult = exports.tryGetChunk = exports.cursorChunk = exports.dummyRoot = exports.deepCopyMapTree = exports.aboveRootPlaceholder = exports.getDetachedFieldContainingPath = exports.DetachedFieldIndex = exports.isCursor = exports.CursorMarker = exports.inCursorNode = exports.inCursorField = exports.isDetachedUpPath = exports.anchorSlot = exports.emptyDelta = exports.offsetDetachId = exports.makeDetachedNodeId = exports.deltaForRootInitialization = exports.forEachField = exports.forEachNodeInSubtree = exports.forEachNode = exports.compareFieldUpPaths = exports.topDownPath = exports.clonePath = exports.compareUpPaths = exports.getDescendant = exports.SparseNode = exports.setGenericTreeField = exports.makeDetachedFieldIndex = exports.applyDelta = exports.announceDelta = exports.combineVisitors = exports.createAnnouncedVisitor = exports.visitDelta = exports.keyAsDetachedField = exports.detachedFieldAsKey = exports.iterateCursorField = exports.mapCursorFields = exports.mapCursorField = exports.getDepth = exports.genericTreeDeleteIfEmpty = exports.getGenericTreeField = exports.genericTreeKeys = exports.castCursorToSynchronous = exports.CursorLocationType = exports.rootField = exports.rootFieldKey = exports.EncodedJsonableTree = exports.AnchorSet = exports.EmptyKey = void 0;
|
|
8
|
-
exports.
|
|
8
|
+
exports.AdaptedViewSchema = exports.compareRevisions = exports.newChangeAtomIdRangeMap = exports.isAncestor = exports.replaceChange = exports.replaceAtomRevisions = exports.subtractChangeAtomIds = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.mintCommit = exports.SessionIdSchema = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.RevisionTagCodec = exports.RevisionTagSchema = exports.CommitKind = exports.findCommonAncestor = exports.findAncestor = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = exports.EditBuilder = exports.SchemaVersion = exports.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchemaV2 = exports.encodeFieldSchemaV1 = exports.decodeFieldSchema = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormatV2 = exports.schemaFormatV1 = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.moveToDetachedField = exports.ITreeSubscriptionCursorState = void 0;
|
|
9
|
+
exports.RevertibleStatus = void 0;
|
|
9
10
|
var index_js_1 = require("./tree/index.js");
|
|
10
11
|
Object.defineProperty(exports, "EmptyKey", { enumerable: true, get: function () { return index_js_1.EmptyKey; } });
|
|
11
12
|
Object.defineProperty(exports, "AnchorSet", { enumerable: true, get: function () { return index_js_1.AnchorSet; } });
|
|
@@ -69,11 +70,13 @@ Object.defineProperty(exports, "forbiddenFieldKindIdentifier", { enumerable: tru
|
|
|
69
70
|
Object.defineProperty(exports, "identifierFieldKindIdentifier", { enumerable: true, get: function () { return index_js_3.identifierFieldKindIdentifier; } });
|
|
70
71
|
Object.defineProperty(exports, "storedEmptyFieldSchema", { enumerable: true, get: function () { return index_js_3.storedEmptyFieldSchema; } });
|
|
71
72
|
Object.defineProperty(exports, "schemaFormatV1", { enumerable: true, get: function () { return index_js_3.schemaFormatV1; } });
|
|
73
|
+
Object.defineProperty(exports, "schemaFormatV2", { enumerable: true, get: function () { return index_js_3.schemaFormatV2; } });
|
|
72
74
|
Object.defineProperty(exports, "LeafNodeStoredSchema", { enumerable: true, get: function () { return index_js_3.LeafNodeStoredSchema; } });
|
|
73
75
|
Object.defineProperty(exports, "ObjectNodeStoredSchema", { enumerable: true, get: function () { return index_js_3.ObjectNodeStoredSchema; } });
|
|
74
76
|
Object.defineProperty(exports, "MapNodeStoredSchema", { enumerable: true, get: function () { return index_js_3.MapNodeStoredSchema; } });
|
|
75
77
|
Object.defineProperty(exports, "decodeFieldSchema", { enumerable: true, get: function () { return index_js_3.decodeFieldSchema; } });
|
|
76
|
-
Object.defineProperty(exports, "
|
|
78
|
+
Object.defineProperty(exports, "encodeFieldSchemaV1", { enumerable: true, get: function () { return index_js_3.encodeFieldSchemaV1; } });
|
|
79
|
+
Object.defineProperty(exports, "encodeFieldSchemaV2", { enumerable: true, get: function () { return index_js_3.encodeFieldSchemaV2; } });
|
|
77
80
|
Object.defineProperty(exports, "storedSchemaDecodeDispatcher", { enumerable: true, get: function () { return index_js_3.storedSchemaDecodeDispatcher; } });
|
|
78
81
|
Object.defineProperty(exports, "Multiplicity", { enumerable: true, get: function () { return index_js_3.Multiplicity; } });
|
|
79
82
|
Object.defineProperty(exports, "SchemaVersion", { enumerable: true, get: function () { return index_js_3.SchemaVersion; } });
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;AAEH,4CAmGyB;AAlGxB,oGAAA,QAAQ,OAAA;AAIR,qGAAA,SAAS,OAAA;AAoBT,+GAAA,mBAAmB,OAAA;AACnB,wGAAA,YAAY,OAAA;AACZ,qGAAA,SAAS,OAAA;AAET,8GAAA,kBAAkB,OAAA;AAElB,mH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AEV,mHAAA,uBAAuB,OAAA;AACvB,4GAAA,gBAAgB,OAAA;AAGjB,mDAIgC;AAF/B,6GAAA,iBAAiB,OAAA;AAIlB,iDAMyB;AAJxB,iHAAA,gBAAgB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype NormalizedUpPath,\n\ttype INormalizedUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\tEncodedJsonableTree,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\tcastCursorToSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tgenericTreeDeleteIfEmpty,\n\tgetDepth,\n\tmapCursorField,\n\tmapCursorFields,\n\titerateCursorField,\n\ttype MapTree,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\tvisitDelta,\n\tcreateAnnouncedVisitor,\n\tcombineVisitors,\n\tannounceDelta,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tsetGenericTreeField,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tisDetachedUpPath,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype ExclusiveMapTree,\n\tdeepCopyMapTree,\n\ttype TreeChunk,\n\tdummyRoot,\n\tcursorChunk,\n\ttryGetChunk,\n\ttype ChunkedCursor,\n} from \"./tree/index.js\";\n\nexport {\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest/index.js\";\n\nexport {\n\ttype FieldKey,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype FieldKindData,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tschemaFormatV1,\n\tschemaFormatV2,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchemaV1,\n\tencodeFieldSchemaV2,\n\tstoredSchemaDecodeDispatcher,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\n\tSchemaVersion,\n} from \"./schema-stored/index.js\";\n\nexport {\n\ttype ChangeFamily,\n\ttype ChangeFamilyCodec,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamilyEditor,\n\tEditBuilder,\n} from \"./change-family/index.js\";\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\ttype ChangeRebaser,\n\tfindAncestor,\n\tfindCommonAncestor,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tRevisionTagCodec,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\tSessionIdSchema,\n\tmintCommit,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\ttype RevisionMetadataSource,\n\trevisionMetadataSourceFromInfo,\n\ttype RevisionInfo,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\tsubtractChangeAtomIds,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n\tisAncestor,\n\ttype ChangeAtomIdRangeMap,\n\tnewChangeAtomIdRangeMap,\n\tcompareRevisions,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\ttype TreeAdapter,\n} from \"./schema-view/index.js\";\n\nexport {\n\ttype Revertible,\n\tRevertibleStatus,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./revertible.js\";\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { type Static } from "@sinclair/typebox";
|
|
6
|
+
import { PersistedValueSchema } from "./formatV1.js";
|
|
7
|
+
export declare const PersistedMetadataFormat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
|
|
8
|
+
export declare const FieldSchemaFormat: import("@sinclair/typebox").TObject<{
|
|
9
|
+
kind: import("@sinclair/typebox").TUnsafe<import("./formatV1.js").FieldKindIdentifier>;
|
|
10
|
+
types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("./formatV1.js").TreeNodeSchemaIdentifier<string>>>;
|
|
11
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* Format for the content of a {@link TreeNodeStoredSchema}.
|
|
15
|
+
*
|
|
16
|
+
* See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
|
|
17
|
+
*/
|
|
18
|
+
export declare const TreeNodeSchemaUnionFormat: import("@sinclair/typebox").TObject<{
|
|
19
|
+
/**
|
|
20
|
+
* Object node union member.
|
|
21
|
+
*/
|
|
22
|
+
object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
23
|
+
kind: import("@sinclair/typebox").TUnsafe<import("./formatV1.js").FieldKindIdentifier>;
|
|
24
|
+
types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("./formatV1.js").TreeNodeSchemaIdentifier<string>>>;
|
|
25
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
|
|
26
|
+
}>>>;
|
|
27
|
+
/**
|
|
28
|
+
* Map node union member.
|
|
29
|
+
*/
|
|
30
|
+
map: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
31
|
+
kind: import("@sinclair/typebox").TUnsafe<import("./formatV1.js").FieldKindIdentifier>;
|
|
32
|
+
types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("./formatV1.js").TreeNodeSchemaIdentifier<string>>>;
|
|
33
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
|
|
34
|
+
}>>;
|
|
35
|
+
/**
|
|
36
|
+
* Leaf node union member.
|
|
37
|
+
*/
|
|
38
|
+
leaf: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof PersistedValueSchema>>;
|
|
39
|
+
}>;
|
|
40
|
+
export type TreeNodeSchemaUnionFormat = Static<typeof TreeNodeSchemaUnionFormat>;
|
|
41
|
+
/**
|
|
42
|
+
* Format for {@link TreeNodeStoredSchema}.
|
|
43
|
+
*
|
|
44
|
+
* See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
|
|
45
|
+
*/
|
|
46
|
+
export declare const TreeNodeSchemaDataFormat: import("@sinclair/typebox").TObject<{
|
|
47
|
+
/**
|
|
48
|
+
* Node kind specific data.
|
|
49
|
+
*/
|
|
50
|
+
kind: import("@sinclair/typebox").TObject<{
|
|
51
|
+
/**
|
|
52
|
+
* Object node union member.
|
|
53
|
+
*/
|
|
54
|
+
object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
55
|
+
kind: import("@sinclair/typebox").TUnsafe<import("./formatV1.js").FieldKindIdentifier>;
|
|
56
|
+
types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("./formatV1.js").TreeNodeSchemaIdentifier<string>>>;
|
|
57
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
|
|
58
|
+
}>>>;
|
|
59
|
+
/**
|
|
60
|
+
* Map node union member.
|
|
61
|
+
*/
|
|
62
|
+
map: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
63
|
+
kind: import("@sinclair/typebox").TUnsafe<import("./formatV1.js").FieldKindIdentifier>;
|
|
64
|
+
types: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("./formatV1.js").TreeNodeSchemaIdentifier<string>>>;
|
|
65
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
|
|
66
|
+
}>>;
|
|
67
|
+
/**
|
|
68
|
+
* Leaf node union member.
|
|
69
|
+
*/
|
|
70
|
+
leaf: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof PersistedValueSchema>>;
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Leaf node union member.
|
|
74
|
+
*/
|
|
75
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TAny>;
|
|
76
|
+
}>;
|
|
77
|
+
export type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;
|
|
78
|
+
export type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;
|
|
79
|
+
export type PersistedMetadataFormat = Static<typeof PersistedMetadataFormat>;
|
|
80
|
+
//# sourceMappingURL=formatV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../src/core/schema-stored/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAG1E,OAAO,EAEN,oBAAoB,EAEpB,MAAM,eAAe,CAAC;AAGvB,eAAO,MAAM,uBAAuB,yEAA8C,CAAC;AAUnF,eAAO,MAAM,iBAAiB;;;;EAA6D,CAAC;AAE5F;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;IAEpC;;OAEG;;;;;;IAEH;;OAEG;;;;;;IAEH;;OAEG;;EAIJ,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;IAEnC;;OAEG;;QA3BH;;WAEG;;;;;;QAEH;;WAEG;;;;;;QAEH;;WAEG;;;IAqBH;;OAEG;;EAIJ,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.TreeNodeSchemaDataFormat = exports.TreeNodeSchemaUnionFormat = exports.FieldSchemaFormat = exports.PersistedMetadataFormat = void 0;
|
|
8
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
9
|
+
const index_js_1 = require("../../util/index.js");
|
|
10
|
+
const formatV1_js_1 = require("./formatV1.js");
|
|
11
|
+
const index_js_2 = require("../../codec/index.js");
|
|
12
|
+
exports.PersistedMetadataFormat = typebox_1.Type.Optional(index_js_1.JsonCompatibleReadOnlySchema);
|
|
13
|
+
const FieldSchemaFormatBase = typebox_1.Type.Object({
|
|
14
|
+
kind: formatV1_js_1.FieldKindIdentifierSchema,
|
|
15
|
+
types: typebox_1.Type.Array(formatV1_js_1.TreeNodeSchemaIdentifierSchema),
|
|
16
|
+
metadata: exports.PersistedMetadataFormat,
|
|
17
|
+
});
|
|
18
|
+
const noAdditionalProps = { additionalProperties: false };
|
|
19
|
+
exports.FieldSchemaFormat = typebox_1.Type.Composite([FieldSchemaFormatBase], noAdditionalProps);
|
|
20
|
+
/**
|
|
21
|
+
* Format for the content of a {@link TreeNodeStoredSchema}.
|
|
22
|
+
*
|
|
23
|
+
* See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
|
|
24
|
+
*/
|
|
25
|
+
exports.TreeNodeSchemaUnionFormat = typebox_1.Type.Object({
|
|
26
|
+
/**
|
|
27
|
+
* Object node union member.
|
|
28
|
+
*/
|
|
29
|
+
object: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), exports.FieldSchemaFormat)),
|
|
30
|
+
/**
|
|
31
|
+
* Map node union member.
|
|
32
|
+
*/
|
|
33
|
+
map: typebox_1.Type.Optional(exports.FieldSchemaFormat),
|
|
34
|
+
/**
|
|
35
|
+
* Leaf node union member.
|
|
36
|
+
*/
|
|
37
|
+
leaf: typebox_1.Type.Optional(typebox_1.Type.Enum(formatV1_js_1.PersistedValueSchema)),
|
|
38
|
+
}, index_js_2.unionOptions);
|
|
39
|
+
/**
|
|
40
|
+
* Format for {@link TreeNodeStoredSchema}.
|
|
41
|
+
*
|
|
42
|
+
* See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
|
|
43
|
+
*/
|
|
44
|
+
exports.TreeNodeSchemaDataFormat = typebox_1.Type.Object({
|
|
45
|
+
/**
|
|
46
|
+
* Node kind specific data.
|
|
47
|
+
*/
|
|
48
|
+
kind: exports.TreeNodeSchemaUnionFormat,
|
|
49
|
+
// Data in common for all TreeNode schemas:
|
|
50
|
+
/**
|
|
51
|
+
* Leaf node union member.
|
|
52
|
+
*/
|
|
53
|
+
metadata: exports.PersistedMetadataFormat,
|
|
54
|
+
}, noAdditionalProps);
|
|
55
|
+
//# sourceMappingURL=formatV2.js.map
|