@fluidframework/tree 2.41.0-337492 → 2.41.0-338401
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 +165 -5
- package/dist/alpha.d.ts +2 -0
- package/dist/codec/codec.d.ts +42 -7
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +50 -8
- package/dist/codec/codec.js.map +1 -1
- package/dist/core/change-family/editBuilder.d.ts.map +1 -1
- package/dist/core/change-family/editBuilder.js.map +1 -1
- package/dist/core/forest/forest.d.ts.map +1 -1
- package/dist/core/forest/forest.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.js +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +2 -2
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/chunk.d.ts.map +1 -1
- package/dist/core/tree/chunk.js.map +1 -1
- package/dist/core/tree/delta.d.ts.map +1 -1
- package/dist/core/tree/delta.js.map +1 -1
- package/dist/core/tree/deltaUtil.d.ts.map +1 -1
- package/dist/core/tree/deltaUtil.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.d.ts +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.js +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/core/tree/treeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/treeTextFormat.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +1 -1
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts +2 -2
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +8 -2
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +12 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js +2 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js +2 -1
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.js +4 -4
- package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -1
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/schemaChecker.d.ts +4 -0
- package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/schemaChecker.js +35 -26
- package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts +16 -14
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +12 -18
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/index.js +1 -2
- package/dist/feature-libraries/flex-tree/index.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +1 -5
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +2 -16
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.d.ts +6 -6
- package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.js +6 -7
- package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +3 -3
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +3 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/initializeForest.d.ts.map +1 -1
- package/dist/feature-libraries/initializeForest.js.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.js +1 -1
- package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
- package/dist/feature-libraries/valueUtilities.d.ts.map +1 -1
- package/dist/feature-libraries/valueUtilities.js +6 -6
- package/dist/feature-libraries/valueUtilities.js.map +1 -1
- package/dist/jsonDomainSchema.d.ts.map +1 -1
- package/dist/jsonDomainSchema.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/serializableDomainSchema.d.ts.map +1 -1
- package/dist/serializableDomainSchema.js.map +1 -1
- package/dist/shared-tree/checkoutFlexTreeView.d.ts +7 -3
- package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
- package/dist/shared-tree/checkoutFlexTreeView.js +11 -2
- package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +3 -0
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +10 -5
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +9 -4
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +20 -8
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/sharedTreeAttributes.d.ts.map +1 -1
- package/dist/sharedTreeAttributes.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts +5 -1
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js +11 -12
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +3 -3
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +4 -2
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts +1 -8
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +3 -14
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts +8 -0
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js +3 -1
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/arrayNode.js +3 -9
- package/dist/simple-tree/arrayNode.js.map +1 -1
- package/dist/simple-tree/core/getOrCreateNode.js +1 -1
- package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +5 -17
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +17 -48
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +4 -4
- package/dist/simple-tree/core/unhydratedFlexTree.js +4 -4
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/getTreeNodeForField.d.ts +12 -0
- package/dist/simple-tree/getTreeNodeForField.d.ts.map +1 -0
- package/dist/simple-tree/getTreeNodeForField.js +39 -0
- package/dist/simple-tree/getTreeNodeForField.js.map +1 -0
- package/dist/simple-tree/index.d.ts +3 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +10 -6
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/mapNode.js +21 -24
- package/dist/simple-tree/mapNode.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +5 -7
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/prepareForInsertion.d.ts +42 -0
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -0
- package/dist/simple-tree/prepareForInsertion.js +166 -0
- package/dist/simple-tree/prepareForInsertion.js.map +1 -0
- package/dist/simple-tree/toMapTree.d.ts +4 -9
- package/dist/simple-tree/toMapTree.d.ts.map +1 -1
- package/dist/simple-tree/toMapTree.js +4 -23
- package/dist/simple-tree/toMapTree.js.map +1 -1
- package/dist/tableSchema.d.ts +201 -104
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +155 -58
- package/dist/tableSchema.js.map +1 -1
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +2 -2
- package/dist/treeFactory.js.map +1 -1
- package/lib/alpha.d.ts +2 -0
- package/lib/codec/codec.d.ts +42 -7
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +50 -8
- package/lib/codec/codec.js.map +1 -1
- package/lib/core/change-family/editBuilder.d.ts.map +1 -1
- package/lib/core/change-family/editBuilder.js.map +1 -1
- package/lib/core/forest/forest.d.ts.map +1 -1
- package/lib/core/forest/forest.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.js +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +2 -2
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/chunk.d.ts.map +1 -1
- package/lib/core/tree/chunk.js.map +1 -1
- package/lib/core/tree/delta.d.ts.map +1 -1
- package/lib/core/tree/delta.js.map +1 -1
- package/lib/core/tree/deltaUtil.d.ts.map +1 -1
- package/lib/core/tree/deltaUtil.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.d.ts +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.js +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/core/tree/treeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/treeTextFormat.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +1 -1
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts +2 -2
- package/lib/core/tree/visitorUtils.d.ts.map +1 -1
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +8 -2
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +10 -0
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js +1 -1
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.js +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -1
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/schemaChecker.d.ts +4 -0
- package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/schemaChecker.js +33 -25
- package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts +16 -14
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +11 -16
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/index.js +1 -1
- package/lib/feature-libraries/flex-tree/index.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +1 -5
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +1 -14
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.d.ts +6 -6
- package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.js +6 -7
- package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +3 -3
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +3 -3
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/initializeForest.d.ts.map +1 -1
- package/lib/feature-libraries/initializeForest.js.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.js +1 -1
- package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
- package/lib/feature-libraries/valueUtilities.d.ts.map +1 -1
- package/lib/feature-libraries/valueUtilities.js +1 -1
- package/lib/feature-libraries/valueUtilities.js.map +1 -1
- package/lib/jsonDomainSchema.d.ts.map +1 -1
- package/lib/jsonDomainSchema.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/serializableDomainSchema.d.ts.map +1 -1
- package/lib/serializableDomainSchema.js.map +1 -1
- package/lib/shared-tree/checkoutFlexTreeView.d.ts +7 -3
- package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
- package/lib/shared-tree/checkoutFlexTreeView.js +12 -3
- package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +3 -0
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +11 -6
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +9 -4
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +22 -10
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/sharedTreeAttributes.d.ts.map +1 -1
- package/lib/sharedTreeAttributes.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts +5 -1
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js +9 -11
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +3 -3
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +3 -3
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts +1 -8
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +2 -12
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts +8 -0
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js +2 -2
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/arrayNode.js +4 -10
- package/lib/simple-tree/arrayNode.js.map +1 -1
- package/lib/simple-tree/core/getOrCreateNode.js +2 -2
- package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +5 -17
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +16 -47
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +4 -4
- package/lib/simple-tree/core/unhydratedFlexTree.js +4 -4
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/getTreeNodeForField.d.ts +12 -0
- package/lib/simple-tree/getTreeNodeForField.d.ts.map +1 -0
- package/lib/simple-tree/getTreeNodeForField.js +35 -0
- package/lib/simple-tree/getTreeNodeForField.js.map +1 -0
- package/lib/simple-tree/index.d.ts +3 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +3 -2
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/mapNode.js +3 -6
- package/lib/simple-tree/mapNode.js.map +1 -1
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +4 -6
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/prepareForInsertion.d.ts +42 -0
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -0
- package/lib/simple-tree/prepareForInsertion.js +160 -0
- package/lib/simple-tree/prepareForInsertion.js.map +1 -0
- package/lib/simple-tree/toMapTree.d.ts +4 -9
- package/lib/simple-tree/toMapTree.d.ts.map +1 -1
- package/lib/simple-tree/toMapTree.js +4 -22
- package/lib/simple-tree/toMapTree.js.map +1 -1
- package/lib/tableSchema.d.ts +201 -104
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +156 -59
- package/lib/tableSchema.js.map +1 -1
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +2 -2
- package/lib/treeFactory.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +25 -25
- package/src/codec/codec.ts +54 -8
- package/src/core/change-family/editBuilder.ts +1 -0
- package/src/core/forest/forest.ts +1 -1
- package/src/core/schema-stored/schema.ts +2 -0
- package/src/core/schema-stored/storedSchemaRepository.ts +2 -2
- package/src/core/tree/anchorSet.ts +4 -4
- package/src/core/tree/chunk.ts +2 -1
- package/src/core/tree/delta.ts +1 -0
- package/src/core/tree/deltaUtil.ts +1 -1
- package/src/core/tree/detachedFieldIndex.ts +1 -1
- package/src/core/tree/detachedFieldIndexCodec.ts +2 -2
- package/src/core/tree/pathTree.ts +1 -1
- package/src/core/tree/treeTextFormat.ts +1 -0
- package/src/core/tree/visitDelta.ts +1 -1
- package/src/core/tree/visitorUtils.ts +3 -2
- package/src/feature-libraries/chunked-forest/chunkTree.ts +2 -2
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +3 -3
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +5 -5
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +2 -2
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -0
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +15 -1
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/index.ts +1 -0
- package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +1 -1
- package/src/feature-libraries/chunked-forest/emptyChunk.ts +1 -0
- package/src/feature-libraries/chunked-forest/index.ts +1 -0
- package/src/feature-libraries/chunked-forest/sequenceChunk.ts +1 -1
- package/src/feature-libraries/chunked-forest/uniformChunk.ts +2 -3
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +1 -1
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -0
- package/src/feature-libraries/default-schema/index.ts +6 -1
- package/src/feature-libraries/default-schema/mappedEditBuilder.ts +1 -0
- package/src/feature-libraries/default-schema/schemaChecker.ts +37 -26
- package/src/feature-libraries/flex-tree/context.ts +18 -20
- package/src/feature-libraries/flex-tree/index.ts +0 -1
- package/src/feature-libraries/flex-tree/lazyField.ts +2 -14
- package/src/feature-libraries/flex-tree/utilities.ts +8 -8
- package/src/feature-libraries/index.ts +2 -1
- package/src/feature-libraries/initializeForest.ts +1 -1
- package/src/feature-libraries/treeCursorUtils.ts +1 -1
- package/src/feature-libraries/valueUtilities.ts +1 -1
- package/src/jsonDomainSchema.ts +0 -1
- package/src/packageVersion.ts +1 -1
- package/src/serializableDomainSchema.ts +1 -0
- package/src/shared-tree/checkoutFlexTreeView.ts +10 -6
- package/src/shared-tree/schematizingTreeView.ts +11 -12
- package/src/shared-tree/treeAlpha.ts +50 -13
- package/src/sharedTreeAttributes.ts +1 -0
- package/src/simple-tree/api/create.ts +17 -16
- package/src/simple-tree/api/index.ts +13 -3
- package/src/simple-tree/api/storedSchema.ts +2 -19
- package/src/simple-tree/api/treeNodeApi.ts +2 -2
- package/src/simple-tree/arrayNode.ts +9 -20
- package/src/simple-tree/core/getOrCreateNode.ts +2 -2
- package/src/simple-tree/core/treeNodeKernel.ts +22 -53
- package/src/simple-tree/core/unhydratedFlexTree.ts +4 -4
- package/src/simple-tree/getTreeNodeForField.ts +46 -0
- package/src/simple-tree/index.ts +8 -5
- package/src/simple-tree/mapNode.ts +8 -12
- package/src/simple-tree/objectNode.ts +3 -12
- package/src/simple-tree/prepareForInsertion.ts +276 -0
- package/src/simple-tree/toMapTree.ts +3 -27
- package/src/tableSchema.ts +351 -138
- package/src/treeFactory.ts +2 -4
- package/dist/simple-tree/proxies.d.ts +0 -23
- package/dist/simple-tree/proxies.d.ts.map +0 -1
- package/dist/simple-tree/proxies.js +0 -135
- package/dist/simple-tree/proxies.js.map +0 -1
- package/lib/simple-tree/proxies.d.ts +0 -23
- package/lib/simple-tree/proxies.d.ts.map +0 -1
- package/lib/simple-tree/proxies.js +0 -130
- package/lib/simple-tree/proxies.js.map +0 -1
- package/src/simple-tree/proxies.ts +0 -191
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import type { Listenable } from "@fluidframework/core-interfaces/internal";
|
|
6
7
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
8
|
|
|
8
|
-
import type { Listenable } from "@fluidframework/core-interfaces/internal";
|
|
9
9
|
import type { FieldKey, TreeStoredSchemaSubscription } from "../schema-stored/index.js";
|
|
10
10
|
import {
|
|
11
11
|
type Anchor,
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { fail } from "@fluidframework/core-utils/internal";
|
|
7
|
+
|
|
7
8
|
import { DiscriminatedUnionDispatcher } from "../../codec/index.js";
|
|
8
9
|
import { type MakeNominal, brand, invertMap } from "../../util/index.js";
|
|
10
|
+
|
|
9
11
|
import {
|
|
10
12
|
type FieldKey,
|
|
11
13
|
type FieldKindIdentifier,
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { createEmitter } from "@fluid-internal/client-utils";
|
|
7
|
+
import type { Listenable } from "@fluidframework/core-interfaces/internal";
|
|
6
8
|
import { BTree } from "@tylerbu/sorted-btree-es6";
|
|
7
9
|
|
|
8
|
-
import type { Listenable } from "@fluidframework/core-interfaces/internal";
|
|
9
|
-
import { createEmitter } from "@fluid-internal/client-utils";
|
|
10
10
|
import { compareStrings } from "../../util/index.js";
|
|
11
11
|
|
|
12
12
|
import type { TreeNodeSchemaIdentifier } from "./formatV1.js";
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
7
7
|
|
|
8
|
+
import { createEmitter } from "@fluid-internal/client-utils";
|
|
9
|
+
import type { Listenable } from "@fluidframework/core-interfaces/internal";
|
|
8
10
|
import { assert, fail } from "@fluidframework/core-utils/internal";
|
|
9
11
|
|
|
10
|
-
import type { Listenable } from "@fluidframework/core-interfaces/internal";
|
|
11
|
-
import { createEmitter } from "@fluid-internal/client-utils";
|
|
12
12
|
import {
|
|
13
13
|
type Brand,
|
|
14
14
|
type BrandedKey,
|
|
@@ -22,7 +22,9 @@ import {
|
|
|
22
22
|
} from "../../util/index.js";
|
|
23
23
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
24
24
|
|
|
25
|
+
import type { ITreeCursorSynchronous } from "./cursor.js";
|
|
25
26
|
import type * as Delta from "./delta.js";
|
|
27
|
+
import { offsetDetachId } from "./deltaUtil.js";
|
|
26
28
|
import {
|
|
27
29
|
isDetachedUpPathRoot,
|
|
28
30
|
type INormalizedUpPath,
|
|
@@ -33,8 +35,6 @@ import {
|
|
|
33
35
|
} from "./pathTree.js";
|
|
34
36
|
import { EmptyKey } from "./types.js";
|
|
35
37
|
import type { DeltaVisitor } from "./visitDelta.js";
|
|
36
|
-
import { offsetDetachId } from "./deltaUtil.js";
|
|
37
|
-
import type { ITreeCursorSynchronous } from "./cursor.js";
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* A way to refer to a particular tree location within an {@link AnchorSet}.
|
package/src/core/tree/chunk.ts
CHANGED
|
@@ -7,12 +7,13 @@ import { assert } from "@fluidframework/core-utils/internal";
|
|
|
7
7
|
|
|
8
8
|
import type { ReferenceCounted } from "../../util/index.js";
|
|
9
9
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
import {
|
|
12
12
|
CursorLocationType,
|
|
13
13
|
type ITreeCursor,
|
|
14
14
|
type ITreeCursorSynchronous,
|
|
15
15
|
} from "./cursor.js";
|
|
16
|
+
import { rootFieldKey } from "./types.js";
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Contiguous part of the tree which get stored together in some data format.
|
package/src/core/tree/delta.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import type { Mutable } from "../../util/index.js";
|
|
7
7
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
8
|
-
import type { TreeChunk } from "./chunk.js";
|
|
9
8
|
|
|
9
|
+
import type { TreeChunk } from "./chunk.js";
|
|
10
10
|
import type { DetachedNodeId, FieldChanges, Root } from "./delta.js";
|
|
11
11
|
import { rootFieldKey } from "./types.js";
|
|
12
12
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
7
8
|
|
|
8
9
|
import { type ICodecOptions, type IJsonCodec, noopValidator } from "../../codec/index.js";
|
|
9
10
|
import {
|
|
@@ -31,7 +32,6 @@ import type {
|
|
|
31
32
|
Major,
|
|
32
33
|
Minor,
|
|
33
34
|
} from "./detachedFieldIndexTypes.js";
|
|
34
|
-
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* The tree index records detached field IDs and associates them with a change atom ID.
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
7
8
|
|
|
8
9
|
import {
|
|
9
10
|
type ICodecOptions,
|
|
10
11
|
type IJsonCodec,
|
|
11
12
|
makeVersionedValidatedCodec,
|
|
12
13
|
} from "../../codec/index.js";
|
|
14
|
+
import { hasSingle } from "../../util/index.js";
|
|
13
15
|
import type { EncodedRevisionTag, RevisionTagCodec, RevisionTag } from "../rebase/index.js";
|
|
14
16
|
|
|
15
17
|
import {
|
|
@@ -23,8 +25,6 @@ import type {
|
|
|
23
25
|
DetachedFieldSummaryData,
|
|
24
26
|
Major,
|
|
25
27
|
} from "./detachedFieldIndexTypes.js";
|
|
26
|
-
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
27
|
-
import { hasSingle } from "../../util/index.js";
|
|
28
28
|
|
|
29
29
|
class MajorCodec implements IJsonCodec<Major> {
|
|
30
30
|
public constructor(
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
7
|
|
|
8
8
|
import { type NestedMap, setInNestedMap, tryGetFromNestedMap } from "../../util/index.js";
|
|
9
|
+
import type { RevisionTag, TreeChunk } from "../index.js";
|
|
9
10
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
10
11
|
|
|
11
12
|
import { mapCursorField, type ITreeCursorSynchronous } from "./cursor.js";
|
|
@@ -14,7 +15,6 @@ import { areDetachedNodeIdsEqual, offsetDetachId } from "./deltaUtil.js";
|
|
|
14
15
|
import type { DetachedFieldIndex } from "./detachedFieldIndex.js";
|
|
15
16
|
import type { ForestRootId, Major, Minor } from "./detachedFieldIndexTypes.js";
|
|
16
17
|
import type { NodeIndex, PlaceIndex, Range } from "./pathTree.js";
|
|
17
|
-
import type { RevisionTag, TreeChunk } from "../index.js";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Implementation notes:
|
|
@@ -3,18 +3,19 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
7
|
+
|
|
6
8
|
import type { ICodecOptions } from "../../codec/index.js";
|
|
7
9
|
import { type IdAllocator, idAllocatorFromMaxId } from "../../util/index.js";
|
|
8
10
|
import type { RevisionTag, RevisionTagCodec } from "../rebase/index.js";
|
|
9
11
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
10
12
|
|
|
13
|
+
import type { ITreeCursorSynchronous } from "./cursor.js";
|
|
11
14
|
import type { DetachedNodeId, Root } from "./delta.js";
|
|
12
15
|
import { DetachedFieldIndex } from "./detachedFieldIndex.js";
|
|
13
16
|
import type { ForestRootId } from "./detachedFieldIndexTypes.js";
|
|
14
17
|
import type { PlaceIndex, Range } from "./pathTree.js";
|
|
15
18
|
import { type DeltaVisitor, visitDelta } from "./visitDelta.js";
|
|
16
|
-
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
17
|
-
import type { ITreeCursorSynchronous } from "./cursor.js";
|
|
18
19
|
|
|
19
20
|
export function makeDetachedFieldIndex(
|
|
20
21
|
prefix: string = "Temp",
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert, debugAssert, oob, fail } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
7
8
|
|
|
8
9
|
import {
|
|
9
10
|
CursorLocationType,
|
|
@@ -26,12 +27,11 @@ import {
|
|
|
26
27
|
} from "../../core/index.js";
|
|
27
28
|
import { getOrCreate } from "../../util/index.js";
|
|
28
29
|
import type { FullSchemaPolicy } from "../modular-schema/index.js";
|
|
30
|
+
import { isStableNodeIdentifier } from "../node-identifier/index.js";
|
|
29
31
|
|
|
30
32
|
import { BasicChunk } from "./basicChunk.js";
|
|
31
33
|
import { SequenceChunk } from "./sequenceChunk.js";
|
|
32
34
|
import { type FieldShape, TreeShape, UniformChunk } from "./uniformChunk.js";
|
|
33
|
-
import { isStableNodeIdentifier } from "../node-identifier/index.js";
|
|
34
|
-
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
35
35
|
|
|
36
36
|
export interface Disposable {
|
|
37
37
|
/**
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert, oob, fail } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import type { Listenable } from "@fluidframework/core-interfaces";
|
|
8
6
|
import { createEmitter } from "@fluid-internal/client-utils";
|
|
7
|
+
import type { Listenable } from "@fluidframework/core-interfaces";
|
|
8
|
+
import { assert, oob, fail } from "@fluidframework/core-utils/internal";
|
|
9
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
9
10
|
|
|
10
11
|
import {
|
|
11
12
|
type Anchor,
|
|
@@ -44,7 +45,6 @@ import {
|
|
|
44
45
|
|
|
45
46
|
import { BasicChunk, BasicChunkCursor, type SiblingsOrKey } from "./basicChunk.js";
|
|
46
47
|
import { type IChunker, basicChunkTree, chunkFieldSingle, chunkTree } from "./chunkTree.js";
|
|
47
|
-
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
48
48
|
|
|
49
49
|
function makeRoot(): BasicChunk {
|
|
50
50
|
return new BasicChunk(aboveRootPlaceholder, new Map());
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert, unreachableCase, oob } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import type {
|
|
8
|
+
IIdCompressor,
|
|
9
|
+
OpSpaceCompressedId,
|
|
10
|
+
SessionId,
|
|
11
|
+
} from "@fluidframework/id-compressor";
|
|
7
12
|
|
|
8
13
|
import { DiscriminatedUnionDispatcher } from "../../../codec/index.js";
|
|
9
14
|
import type {
|
|
@@ -42,11 +47,6 @@ import {
|
|
|
42
47
|
type EncodedValueShape,
|
|
43
48
|
SpecialField,
|
|
44
49
|
} from "./format.js";
|
|
45
|
-
import type {
|
|
46
|
-
IIdCompressor,
|
|
47
|
-
OpSpaceCompressedId,
|
|
48
|
-
SessionId,
|
|
49
|
-
} from "@fluidframework/id-compressor";
|
|
50
50
|
|
|
51
51
|
export interface IdDecodingContext {
|
|
52
52
|
idCompressor: IIdCompressor;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
7
|
|
|
8
8
|
import type { DiscriminatedUnionDispatcher } from "../../../codec/index.js";
|
|
9
|
-
import type { BrandedType } from "../../../util/index.js";
|
|
10
9
|
import type { TreeChunk } from "../../../core/index.js";
|
|
10
|
+
import type { BrandedType } from "../../../util/index.js";
|
|
11
11
|
|
|
12
12
|
import {
|
|
13
13
|
type ChunkDecoder,
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
getChecked,
|
|
16
16
|
readStream,
|
|
17
17
|
} from "./chunkCodecUtilities.js";
|
|
18
|
-
import type { EncodedFieldBatchGeneric, IdentifierOrIndex } from "./formatGeneric.js";
|
|
19
18
|
import type { IdDecodingContext } from "./chunkDecoding.js";
|
|
19
|
+
import type { EncodedFieldBatchGeneric, IdentifierOrIndex } from "./formatGeneric.js";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* General purpose shape based tree decoder which gets its support for specific shapes from the caller.
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import type { IIdCompressor, SessionId } from "@fluidframework/id-compressor";
|
|
7
8
|
|
|
8
9
|
import {
|
|
10
|
+
type FluidClientVersion,
|
|
9
11
|
type ICodecOptions,
|
|
10
12
|
type IJsonCodec,
|
|
11
13
|
makeVersionedValidatedCodec,
|
|
@@ -19,7 +21,6 @@ import type { FieldBatch } from "./fieldBatch.js";
|
|
|
19
21
|
import { EncodedFieldBatch, validVersions } from "./format.js";
|
|
20
22
|
import { schemaCompressedEncode } from "./schemaBasedEncode.js";
|
|
21
23
|
import { uncompressedEncode } from "./uncompressedEncode.js";
|
|
22
|
-
import type { IIdCompressor, SessionId } from "@fluidframework/id-compressor";
|
|
23
24
|
|
|
24
25
|
export interface FieldBatchEncodingContext {
|
|
25
26
|
readonly encodeType: TreeCompressionStrategy;
|
|
@@ -38,6 +39,18 @@ export type FieldBatchCodec = IJsonCodec<
|
|
|
38
39
|
FieldBatchEncodingContext
|
|
39
40
|
>;
|
|
40
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Get the write version for {@link makeFieldBatchCodec} based on the `oldestCompatibleClient` version.
|
|
44
|
+
* @privateRemarks
|
|
45
|
+
* TODO: makeFieldBatchCodec (and makeVersionDispatchingCodec transitively) should bake in this versionToFormat logic and the resulting codec can then support use with FluidClientVersion directly.
|
|
46
|
+
*/
|
|
47
|
+
export function fluidVersionToFieldBatchCodecWriteVersion(
|
|
48
|
+
oldestCompatibleClient: FluidClientVersion,
|
|
49
|
+
): number {
|
|
50
|
+
// There is currently on only 1 version.
|
|
51
|
+
return 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
41
54
|
export function makeFieldBatchCodec(
|
|
42
55
|
options: ICodecOptions,
|
|
43
56
|
writeVersion: number,
|
|
@@ -51,6 +64,7 @@ export function makeFieldBatchCodec(
|
|
|
51
64
|
0x935 /* Invalid write version for FieldBatch codec */,
|
|
52
65
|
);
|
|
53
66
|
|
|
67
|
+
// TODO: use makeVersionDispatchingCodec to support adding more versions in the future.
|
|
54
68
|
return makeVersionedValidatedCodec(options, validVersions, EncodedFieldBatch, {
|
|
55
69
|
encode: (data: FieldBatch, context: FieldBatchEncodingContext): EncodedFieldBatch => {
|
|
56
70
|
for (const cursor of data) {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert, unreachableCase, fail } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
7
8
|
|
|
8
9
|
import {
|
|
9
10
|
CursorLocationType,
|
|
@@ -34,7 +35,6 @@ import {
|
|
|
34
35
|
SpecialField,
|
|
35
36
|
version,
|
|
36
37
|
} from "./format.js";
|
|
37
|
-
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Encode data from `FieldBatch` into an `EncodedChunk`.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert, fail } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import { isStableId } from "@fluidframework/id-compressor/internal";
|
|
7
8
|
|
|
8
9
|
import {
|
|
9
10
|
type FieldKey,
|
|
@@ -24,7 +25,6 @@ import {
|
|
|
24
25
|
encodeValue,
|
|
25
26
|
} from "./compressedEncode.js";
|
|
26
27
|
import type { EncodedChunkShape, EncodedFieldShape, EncodedValueShape } from "./format.js";
|
|
27
|
-
import { isStableId } from "@fluidframework/id-compressor/internal";
|
|
28
28
|
|
|
29
29
|
export class NodeShape extends Shape<EncodedChunkShape> implements NodeEncoder {
|
|
30
30
|
/**
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert, unreachableCase, fail } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
7
8
|
|
|
8
9
|
import {
|
|
9
10
|
LeafNodeStoredSchema,
|
|
@@ -31,7 +32,6 @@ import {
|
|
|
31
32
|
import type { FieldBatch } from "./fieldBatch.js";
|
|
32
33
|
import { type EncodedFieldBatch, type EncodedValueShape, SpecialField } from "./format.js";
|
|
33
34
|
import { NodeShape } from "./nodeShape.js";
|
|
34
|
-
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Encode data from `fieldBatch` in into an `EncodedChunk`.
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { type ChunkedCursor, type TreeChunk, dummyRoot } from "../../core/index.js";
|
|
6
7
|
import { ReferenceCountedBase } from "../../util/index.js";
|
|
7
8
|
|
|
8
9
|
import { BasicChunkCursor } from "./basicChunk.js";
|
|
9
|
-
import { type ChunkedCursor, type TreeChunk, dummyRoot } from "../../core/index.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* General purpose multi-node sequence chunk.
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert, compareArrays, oob, fail } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import type { SessionSpaceCompressedId, IIdCompressor } from "@fluidframework/id-compressor";
|
|
8
|
+
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
7
9
|
|
|
8
10
|
import {
|
|
9
11
|
CursorLocationType,
|
|
@@ -22,9 +24,6 @@ import {
|
|
|
22
24
|
import { ReferenceCountedBase, hasSome } from "../../util/index.js";
|
|
23
25
|
import { SynchronousCursor, prefixFieldPath, prefixPath } from "../treeCursorUtils.js";
|
|
24
26
|
|
|
25
|
-
import type { SessionSpaceCompressedId, IIdCompressor } from "@fluidframework/id-compressor";
|
|
26
|
-
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
27
|
-
|
|
28
27
|
/**
|
|
29
28
|
* Create a tree chunk with ref count 1.
|
|
30
29
|
*
|
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
relevantRemovedRoots as relevantModularRemovedRoots,
|
|
38
38
|
} from "../modular-schema/index.js";
|
|
39
39
|
import type { OptionalChangeset } from "../optional-field/index.js";
|
|
40
|
+
import type { CellId } from "../sequence-field/index.js";
|
|
40
41
|
|
|
41
42
|
import {
|
|
42
43
|
fieldKinds,
|
|
@@ -44,7 +45,6 @@ import {
|
|
|
44
45
|
sequence,
|
|
45
46
|
required as valueFieldKind,
|
|
46
47
|
} from "./defaultFieldKinds.js";
|
|
47
|
-
import type { CellId } from "../sequence-field/index.js";
|
|
48
48
|
|
|
49
49
|
export type DefaultChangeset = ModularChangeset;
|
|
50
50
|
|
|
@@ -26,7 +26,12 @@ export {
|
|
|
26
26
|
relevantRemovedRoots,
|
|
27
27
|
} from "./defaultEditBuilder.js";
|
|
28
28
|
|
|
29
|
-
export {
|
|
29
|
+
export {
|
|
30
|
+
SchemaValidationErrors,
|
|
31
|
+
isNodeInSchema,
|
|
32
|
+
isFieldInSchema,
|
|
33
|
+
inSchemaOrThrow,
|
|
34
|
+
} from "./schemaChecker.js";
|
|
30
35
|
|
|
31
36
|
export { defaultSchemaPolicy } from "./defaultSchema.js";
|
|
32
37
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { unreachableCase, fail } from "@fluidframework/core-utils/internal";
|
|
7
|
+
|
|
7
8
|
import {
|
|
8
9
|
type MapTree,
|
|
9
10
|
type TreeFieldStoredSchema,
|
|
@@ -14,6 +15,7 @@ import {
|
|
|
14
15
|
type SchemaAndPolicy,
|
|
15
16
|
} from "../../core/index.js";
|
|
16
17
|
import { allowsValue } from "../valueUtilities.js";
|
|
18
|
+
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
17
19
|
|
|
18
20
|
export const enum SchemaValidationErrors {
|
|
19
21
|
NoError,
|
|
@@ -28,6 +30,15 @@ export const enum SchemaValidationErrors {
|
|
|
28
30
|
UnknownError,
|
|
29
31
|
}
|
|
30
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Throws a UsageError if maybeError indicates a tree is out of schema.
|
|
35
|
+
*/
|
|
36
|
+
export function inSchemaOrThrow(maybeError: SchemaValidationErrors): void {
|
|
37
|
+
if (maybeError !== SchemaValidationErrors.NoError) {
|
|
38
|
+
throw new UsageError("Tree does not conform to schema.");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
31
42
|
/**
|
|
32
43
|
* Deeply checks that the provided node complies with the schema based on its identifier.
|
|
33
44
|
*/
|
|
@@ -50,38 +61,38 @@ export function isNodeInSchema(
|
|
|
50
61
|
if (!allowsValue(schema.leafValue, node.value)) {
|
|
51
62
|
return SchemaValidationErrors.LeafNode_InvalidValue;
|
|
52
63
|
}
|
|
53
|
-
} else
|
|
64
|
+
} else {
|
|
54
65
|
if (node.value !== undefined) {
|
|
55
66
|
return SchemaValidationErrors.NonLeafNode_ValueNotAllowed;
|
|
56
67
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
|
|
69
|
+
if (schema instanceof ObjectNodeStoredSchema) {
|
|
70
|
+
const uncheckedFieldsFromNode = new Set(node.fields.keys());
|
|
71
|
+
for (const [fieldKey, fieldSchema] of schema.objectNodeFields) {
|
|
72
|
+
const nodeField = node.fields.get(fieldKey) ?? [];
|
|
73
|
+
const fieldInSchemaResult = isFieldInSchema(nodeField, fieldSchema, schemaAndPolicy);
|
|
74
|
+
if (fieldInSchemaResult !== SchemaValidationErrors.NoError) {
|
|
75
|
+
return fieldInSchemaResult;
|
|
76
|
+
}
|
|
77
|
+
uncheckedFieldsFromNode.delete(fieldKey);
|
|
63
78
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
for (const field of node.fields.values()) {
|
|
78
|
-
const fieldInSchemaResult = isFieldInSchema(field, schema.mapFields, schemaAndPolicy);
|
|
79
|
-
if (fieldInSchemaResult !== SchemaValidationErrors.NoError) {
|
|
80
|
-
return fieldInSchemaResult;
|
|
79
|
+
// The node has fields that we did not check as part of looking at every field defined in the node's schema
|
|
80
|
+
if (
|
|
81
|
+
uncheckedFieldsFromNode.size !== 0 &&
|
|
82
|
+
!schemaAndPolicy.policy.allowUnknownOptionalFields(node.type)
|
|
83
|
+
) {
|
|
84
|
+
return SchemaValidationErrors.ObjectNode_FieldNotInSchema;
|
|
85
|
+
}
|
|
86
|
+
} else if (schema instanceof MapNodeStoredSchema) {
|
|
87
|
+
for (const field of node.fields.values()) {
|
|
88
|
+
const fieldInSchemaResult = isFieldInSchema(field, schema.mapFields, schemaAndPolicy);
|
|
89
|
+
if (fieldInSchemaResult !== SchemaValidationErrors.NoError) {
|
|
90
|
+
return fieldInSchemaResult;
|
|
91
|
+
}
|
|
81
92
|
}
|
|
93
|
+
} else {
|
|
94
|
+
fail(0xb0e /* Unknown TreeNodeStoredSchema type */);
|
|
82
95
|
}
|
|
83
|
-
} else {
|
|
84
|
-
fail(0xb0e /* Unknown TreeNodeStoredSchema type */);
|
|
85
96
|
}
|
|
86
97
|
|
|
87
98
|
return SchemaValidationErrors.NoError;
|