@fluidframework/tree 2.41.0-338186 → 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 +164 -4
- 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/index.d.ts +2 -2
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +3 -1
- 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/treeAlpha.d.ts +8 -0
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +14 -7
- 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.map +1 -1
- package/dist/simple-tree/api/create.js +1 -1
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +1 -1
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +3 -1
- package/dist/simple-tree/api/index.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.js +1 -1
- 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/{proxies.d.ts → getTreeNodeForField.d.ts} +1 -1
- package/dist/simple-tree/getTreeNodeForField.d.ts.map +1 -0
- package/dist/simple-tree/{proxies.js → getTreeNodeForField.js} +1 -1
- package/dist/simple-tree/getTreeNodeForField.js.map +1 -0
- 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 +6 -4
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/mapNode.js +4 -4
- package/dist/simple-tree/mapNode.js.map +1 -1
- package/dist/simple-tree/objectNode.js +3 -3
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/prepareForInsertion.d.ts +18 -6
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +51 -22
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/toMapTree.d.ts +3 -8
- package/dist/simple-tree/toMapTree.d.ts.map +1 -1
- package/dist/simple-tree/toMapTree.js +3 -22
- package/dist/simple-tree/toMapTree.js.map +1 -1
- package/dist/tableSchema.d.ts +109 -62
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +83 -36
- 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/index.d.ts +2 -2
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +2 -2
- 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/treeAlpha.d.ts +8 -0
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +16 -9
- 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.map +1 -1
- package/lib/simple-tree/api/create.js +2 -2
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +1 -1
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +1 -1
- package/lib/simple-tree/api/index.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.js +2 -2
- 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/{proxies.d.ts → getTreeNodeForField.d.ts} +1 -1
- package/lib/simple-tree/getTreeNodeForField.d.ts.map +1 -0
- package/lib/simple-tree/{proxies.js → getTreeNodeForField.js} +1 -1
- package/lib/simple-tree/getTreeNodeForField.js.map +1 -0
- 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 +2 -2
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/mapNode.js +1 -1
- package/lib/simple-tree/mapNode.js.map +1 -1
- package/lib/simple-tree/objectNode.js +1 -1
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/prepareForInsertion.d.ts +18 -6
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/lib/simple-tree/prepareForInsertion.js +51 -22
- package/lib/simple-tree/prepareForInsertion.js.map +1 -1
- package/lib/simple-tree/toMapTree.d.ts +3 -8
- package/lib/simple-tree/toMapTree.d.ts.map +1 -1
- package/lib/simple-tree/toMapTree.js +3 -21
- package/lib/simple-tree/toMapTree.js.map +1 -1
- package/lib/tableSchema.d.ts +109 -62
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +83 -36
- 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/package.json +20 -20
- 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/index.ts +2 -0
- 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/treeAlpha.ts +29 -8
- package/src/sharedTreeAttributes.ts +1 -0
- package/src/simple-tree/api/create.ts +2 -1
- package/src/simple-tree/api/index.ts +7 -1
- package/src/simple-tree/api/treeNodeApi.ts +2 -2
- package/src/simple-tree/arrayNode.ts +2 -2
- package/src/simple-tree/core/getOrCreateNode.ts +2 -2
- package/src/simple-tree/core/treeNodeKernel.ts +22 -53
- package/src/simple-tree/index.ts +3 -1
- package/src/simple-tree/mapNode.ts +1 -1
- package/src/simple-tree/objectNode.ts +1 -1
- package/src/simple-tree/prepareForInsertion.ts +67 -27
- package/src/simple-tree/toMapTree.ts +2 -26
- package/src/tableSchema.ts +109 -62
- package/src/treeFactory.ts +2 -4
- package/dist/simple-tree/proxies.d.ts.map +0 -1
- package/dist/simple-tree/proxies.js.map +0 -1
- package/lib/simple-tree/proxies.d.ts.map +0 -1
- package/lib/simple-tree/proxies.js.map +0 -1
- /package/src/simple-tree/{proxies.ts → getTreeNodeForField.ts} +0 -0
package/src/tableSchema.ts
CHANGED
|
@@ -99,7 +99,7 @@ function isTableNode(
|
|
|
99
99
|
* This namespace should be strictly type-exported by the package.
|
|
100
100
|
* All members should be tagged with `@system`.
|
|
101
101
|
*
|
|
102
|
-
* @system @
|
|
102
|
+
* @system @alpha
|
|
103
103
|
*/
|
|
104
104
|
export namespace System_TableSchema {
|
|
105
105
|
/**
|
|
@@ -108,7 +108,7 @@ export namespace System_TableSchema {
|
|
|
108
108
|
* Longer term, it would be better to simply omit "props" altogether by default.
|
|
109
109
|
* For now, this ensures that the user doesn't have to specify a "props" entry when initializing column/row nodes
|
|
110
110
|
* and ensures that they cannot set anything that might conflict with future evolutions of the schema.
|
|
111
|
-
* @system @
|
|
111
|
+
* @system @alpha
|
|
112
112
|
*/
|
|
113
113
|
export type DefaultPropsType = ReturnType<typeof SchemaFactory.optional<[]>>;
|
|
114
114
|
|
|
@@ -116,7 +116,7 @@ export namespace System_TableSchema {
|
|
|
116
116
|
* A base interface for factory input options which include an schema factory.
|
|
117
117
|
* @remarks This interface should not be referenced directly.
|
|
118
118
|
* @privateRemarks This interface primarily exists to provide a single home for property documentation.
|
|
119
|
-
* @system @
|
|
119
|
+
* @system @alpha
|
|
120
120
|
*/
|
|
121
121
|
export interface OptionsWithSchemaFactory<TSchemaFactory extends SchemaFactoryAlpha> {
|
|
122
122
|
/**
|
|
@@ -130,7 +130,7 @@ export namespace System_TableSchema {
|
|
|
130
130
|
* A base interface for factory input options which include the table cell schema.
|
|
131
131
|
* @remarks This interface should not be referenced directly.
|
|
132
132
|
* @privateRemarks This interface primarily exists to provide a single home for property documentation.
|
|
133
|
-
* @system @
|
|
133
|
+
* @system @alpha
|
|
134
134
|
*/
|
|
135
135
|
export interface OptionsWithCellSchema<TCellSchema extends ImplicitAllowedTypes> {
|
|
136
136
|
/**
|
|
@@ -144,7 +144,7 @@ export namespace System_TableSchema {
|
|
|
144
144
|
/**
|
|
145
145
|
* Base options for creating table cow schema.
|
|
146
146
|
* @remarks Includes parameters common to all column factory overloads.
|
|
147
|
-
* @system @
|
|
147
|
+
* @system @alpha
|
|
148
148
|
*/
|
|
149
149
|
export type CreateColumnOptionsBase<
|
|
150
150
|
TSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,
|
|
@@ -153,7 +153,7 @@ export namespace System_TableSchema {
|
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
155
|
* Factory for creating column schema.
|
|
156
|
-
* @system @
|
|
156
|
+
* @system @alpha
|
|
157
157
|
*/
|
|
158
158
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify
|
|
159
159
|
export function createColumnSchema<
|
|
@@ -305,7 +305,7 @@ export namespace System_TableSchema {
|
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
307
|
* Base column schema type.
|
|
308
|
-
* @sealed @system @
|
|
308
|
+
* @sealed @system @alpha
|
|
309
309
|
*/
|
|
310
310
|
export type ColumnSchemaBase<
|
|
311
311
|
TScope extends string | undefined = string | undefined,
|
|
@@ -320,7 +320,7 @@ export namespace System_TableSchema {
|
|
|
320
320
|
/**
|
|
321
321
|
* Base options for creating table row schema.
|
|
322
322
|
* @remarks Includes parameters common to all row factory overloads.
|
|
323
|
-
* @system @
|
|
323
|
+
* @system @alpha
|
|
324
324
|
*/
|
|
325
325
|
export type CreateRowOptionsBase<
|
|
326
326
|
TSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,
|
|
@@ -329,7 +329,7 @@ export namespace System_TableSchema {
|
|
|
329
329
|
|
|
330
330
|
/**
|
|
331
331
|
* Factory for creating row schema.
|
|
332
|
-
* @sealed @
|
|
332
|
+
* @sealed @alpha
|
|
333
333
|
*/
|
|
334
334
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify
|
|
335
335
|
export function createRowSchema<
|
|
@@ -509,7 +509,7 @@ export namespace System_TableSchema {
|
|
|
509
509
|
|
|
510
510
|
/**
|
|
511
511
|
* Base row schema type.
|
|
512
|
-
* @sealed @system @
|
|
512
|
+
* @sealed @system @alpha
|
|
513
513
|
*/
|
|
514
514
|
export type RowSchemaBase<
|
|
515
515
|
TScope extends string | undefined = string | undefined,
|
|
@@ -524,7 +524,7 @@ export namespace System_TableSchema {
|
|
|
524
524
|
/**
|
|
525
525
|
* Base options for creating table schema.
|
|
526
526
|
* @remarks Includes parameters common to all table factory overloads.
|
|
527
|
-
* @system @
|
|
527
|
+
* @system @alpha
|
|
528
528
|
*/
|
|
529
529
|
export type TableFactoryOptionsBase<
|
|
530
530
|
TSchemaFactory extends SchemaFactoryAlpha = SchemaFactoryAlpha,
|
|
@@ -533,7 +533,7 @@ export namespace System_TableSchema {
|
|
|
533
533
|
|
|
534
534
|
/**
|
|
535
535
|
* Factory for creating table schema.
|
|
536
|
-
* @system @
|
|
536
|
+
* @system @alpha
|
|
537
537
|
*/
|
|
538
538
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- Return type is too complex to be reasonable to specify
|
|
539
539
|
export function createTableSchema<
|
|
@@ -942,7 +942,7 @@ export namespace System_TableSchema {
|
|
|
942
942
|
|
|
943
943
|
/**
|
|
944
944
|
* Base row schema type.
|
|
945
|
-
* @sealed @system @
|
|
945
|
+
* @sealed @system @alpha
|
|
946
946
|
*/
|
|
947
947
|
export type TableSchemaBase<
|
|
948
948
|
TScope extends string | undefined,
|
|
@@ -959,6 +959,19 @@ export namespace System_TableSchema {
|
|
|
959
959
|
*
|
|
960
960
|
* @remarks
|
|
961
961
|
*
|
|
962
|
+
* WARNING: These APIs are in preview and are subject to change.
|
|
963
|
+
* Until these APIs have stabilized, it is not recommended to use them in production code.
|
|
964
|
+
* There may be breaking changes to these APIs and their underlying data format.
|
|
965
|
+
* Using these APIs in production code may result in data loss or corruption.
|
|
966
|
+
*
|
|
967
|
+
* The primary APIs for create tabular data schema are:
|
|
968
|
+
*
|
|
969
|
+
* - {@link TableSchema.(table:1)}
|
|
970
|
+
*
|
|
971
|
+
* - {@link TableSchema.(column:1)}
|
|
972
|
+
*
|
|
973
|
+
* - {@link TableSchema.(row:1)}
|
|
974
|
+
*
|
|
962
975
|
* Tables created using these APIs are...
|
|
963
976
|
*
|
|
964
977
|
* - sparse, meaning that cells may be omitted, and new rows are empty by default.
|
|
@@ -972,77 +985,111 @@ export namespace System_TableSchema {
|
|
|
972
985
|
* Column and Row schema created using these APIs are extensible via the `props` field.
|
|
973
986
|
* This allows association of additional properties with column and row nodes.
|
|
974
987
|
*
|
|
975
|
-
*
|
|
988
|
+
* Cells in the table may become "orphaned."
|
|
976
989
|
* That is, it is possible to enter a state where one or more rows contain cells with no corresponding column.
|
|
977
|
-
* To
|
|
990
|
+
* To reduce the likelihood of this, you can manually remove corresponding cells when removing columns.
|
|
978
991
|
* Either way, it is possible to enter such a state via the merging of edits.
|
|
979
992
|
* For example: one client might add a row while another concurrently removes a column, orphaning the cell where the column and row intersected.
|
|
980
993
|
*
|
|
981
|
-
* @example
|
|
994
|
+
* @example Defining a Table schema
|
|
982
995
|
*
|
|
983
996
|
* ```typescript
|
|
984
|
-
* class
|
|
985
|
-
* value: schemaFactory.string,
|
|
986
|
-
* }) {}
|
|
987
|
-
*
|
|
988
|
-
* class Table extends TableSchema.table({
|
|
997
|
+
* class MyTable extends TableSchema.table({
|
|
989
998
|
* schemaFactory,
|
|
990
|
-
* cell:
|
|
999
|
+
* cell: schemaFactory.string,
|
|
991
1000
|
* }) {}
|
|
992
1001
|
*
|
|
993
|
-
* const table = new
|
|
1002
|
+
* const table = new MyTable({
|
|
994
1003
|
* columns: [{ id: "column-0" }],
|
|
995
|
-
* rows: [{ id: "row-0", cells: {} }],
|
|
1004
|
+
* rows: [{ id: "row-0", cells: { "column-0": "Hello world!" } }],
|
|
996
1005
|
* });
|
|
997
1006
|
* ```
|
|
998
1007
|
*
|
|
999
1008
|
* @example Customizing Column and Row schema
|
|
1000
1009
|
*
|
|
1001
1010
|
* ```typescript
|
|
1002
|
-
*
|
|
1003
|
-
* value: schemaFactory.string,
|
|
1004
|
-
* }) {}
|
|
1005
|
-
*
|
|
1006
|
-
* class ColumnProps extends schemaFactory.object("TableColumnProps", {
|
|
1007
|
-
* // Column label to display.
|
|
1008
|
-
* label: schemaFactory.string,
|
|
1009
|
-
* // The type of data represented by the cells. Default: string.
|
|
1010
|
-
* dataType: schemaFactory.optional(schemaFactory.string),
|
|
1011
|
-
* }) {}
|
|
1011
|
+
* const Cell = schemaFactory.string;
|
|
1012
1012
|
*
|
|
1013
|
-
* class
|
|
1013
|
+
* class MyColumn extends TableSchema.column({
|
|
1014
1014
|
* schemaFactory,
|
|
1015
1015
|
* cell: Cell,
|
|
1016
|
-
* props:
|
|
1016
|
+
* props: schemaFactory.object("TableColumnProps", {
|
|
1017
|
+
* label: schemaFactory.string,
|
|
1018
|
+
* }),
|
|
1017
1019
|
* }) {}
|
|
1018
1020
|
*
|
|
1019
|
-
* class
|
|
1021
|
+
* class MyRow extends TableSchema.row({
|
|
1020
1022
|
* schemaFactory,
|
|
1021
1023
|
* cell: Cell,
|
|
1022
1024
|
* }) {}
|
|
1023
1025
|
*
|
|
1024
|
-
* class
|
|
1026
|
+
* class MyTable extends TableSchema.table({
|
|
1025
1027
|
* schemaFactory,
|
|
1026
1028
|
* cell: Cell,
|
|
1027
|
-
* column:
|
|
1028
|
-
* row:
|
|
1029
|
+
* column: MyColumn,
|
|
1030
|
+
* row: MyRow,
|
|
1029
1031
|
* }) {}
|
|
1030
1032
|
*
|
|
1031
|
-
* const table = new
|
|
1033
|
+
* const table = new MyTable({
|
|
1032
1034
|
* columns: [
|
|
1033
|
-
* new
|
|
1034
|
-
* new
|
|
1035
|
-
* new
|
|
1035
|
+
* new MyColumn({ props: { label: "Entry" } }),
|
|
1036
|
+
* new MyColumn({ props: { label: "Date" } }),
|
|
1037
|
+
* new MyColumn({ props: { label: "Amount" } }),
|
|
1036
1038
|
* ],
|
|
1037
1039
|
* rows: [],
|
|
1038
1040
|
* });
|
|
1039
1041
|
* ```
|
|
1040
1042
|
*
|
|
1043
|
+
* @example Listening for changes in the table
|
|
1044
|
+
*
|
|
1045
|
+
* ```typescript
|
|
1046
|
+
* // Listen for any changes to the table and its children.
|
|
1047
|
+
* // The "treeChanged" event will fire when the associated node or any of its descendants change.
|
|
1048
|
+
* Tree.on(table, "treeChanged", () => {
|
|
1049
|
+
* // Respond to the change.
|
|
1050
|
+
* });
|
|
1051
|
+
* ```
|
|
1052
|
+
*
|
|
1053
|
+
* @example Listening for changes to the rows list only
|
|
1054
|
+
*
|
|
1055
|
+
* ```typescript
|
|
1056
|
+
* // Listen for any changes to the list of rows.
|
|
1057
|
+
* // The "nodeChanged" event will fire only when the specified node itself changes (i.e., its own properties change).
|
|
1058
|
+
* // In this case, the event will fire when a row is added or removed, or the order of the list is changed.
|
|
1059
|
+
* // But it won't fire when a row's properties change, or when the row's cells change, etc.
|
|
1060
|
+
* Tree.on(table.rows, "nodeChanged", () => {
|
|
1061
|
+
* // Respond to the change.
|
|
1062
|
+
* });
|
|
1063
|
+
* ```
|
|
1064
|
+
*
|
|
1065
|
+
* @example Removing column and cells in a transaction
|
|
1066
|
+
*
|
|
1067
|
+
* When removing a column, if you wish to ensure that all of its corresponding cells are also removed (and not
|
|
1068
|
+
* orphaned), you can remove the column and all of the relevant cells in a transaction.
|
|
1069
|
+
* Note that there are performance implications to this.
|
|
1070
|
+
*
|
|
1071
|
+
* ```typescript
|
|
1072
|
+
* // Remove column1 and all of its cells.
|
|
1073
|
+
* // The "transaction" method will ensure that all changes are applied atomically.
|
|
1074
|
+
* Tree.runTransaction(table, () => {
|
|
1075
|
+
* // Remove column1.
|
|
1076
|
+
* table.removeColumn(column1);
|
|
1077
|
+
*
|
|
1078
|
+
* // Remove the cell at column1 for each row.
|
|
1079
|
+
* for (const row of table.rows) {
|
|
1080
|
+
* table.removeCell({
|
|
1081
|
+
* column: column1,
|
|
1082
|
+
* row,
|
|
1083
|
+
* });
|
|
1084
|
+
* }
|
|
1085
|
+
* });
|
|
1086
|
+
* ```
|
|
1087
|
+
*
|
|
1041
1088
|
* @privateRemarks
|
|
1042
1089
|
* The above examples are backed by tests in `tableSchema.spec.ts`.
|
|
1043
1090
|
* Those tests and these examples should be kept in-sync to ensure that the examples are correct.
|
|
1044
1091
|
*
|
|
1045
|
-
* @
|
|
1092
|
+
* @alpha
|
|
1046
1093
|
*/
|
|
1047
1094
|
export namespace TableSchema {
|
|
1048
1095
|
// #region Column
|
|
@@ -1052,7 +1099,7 @@ export namespace TableSchema {
|
|
|
1052
1099
|
* @remarks Implemented by the schema class returned from {@link TableSchema.(column:2)}.
|
|
1053
1100
|
* @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
|
|
1054
1101
|
* @typeParam TProps - Additional properties to associate with the column.
|
|
1055
|
-
* @sealed @
|
|
1102
|
+
* @sealed @alpha
|
|
1056
1103
|
*/
|
|
1057
1104
|
export interface Column<
|
|
1058
1105
|
TCell extends ImplicitAllowedTypes,
|
|
@@ -1090,7 +1137,7 @@ export namespace TableSchema {
|
|
|
1090
1137
|
* Factory for creating new table column schema.
|
|
1091
1138
|
* @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.
|
|
1092
1139
|
* @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
|
|
1093
|
-
* @
|
|
1140
|
+
* @alpha
|
|
1094
1141
|
*/
|
|
1095
1142
|
export function column<
|
|
1096
1143
|
const TScope extends string | undefined,
|
|
@@ -1103,7 +1150,7 @@ export namespace TableSchema {
|
|
|
1103
1150
|
* @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.
|
|
1104
1151
|
* @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
|
|
1105
1152
|
* @typeParam TProps - Additional properties to associate with the column.
|
|
1106
|
-
* @
|
|
1153
|
+
* @alpha
|
|
1107
1154
|
*/
|
|
1108
1155
|
export function column<
|
|
1109
1156
|
const TScope extends string | undefined,
|
|
@@ -1139,7 +1186,7 @@ export namespace TableSchema {
|
|
|
1139
1186
|
* @remarks Implemented by the schema class returned from {@link TableSchema.(row:2)}.
|
|
1140
1187
|
* @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
|
|
1141
1188
|
* @typeParam TProps - Additional properties to associate with the row.
|
|
1142
|
-
* @sealed @
|
|
1189
|
+
* @sealed @alpha
|
|
1143
1190
|
*/
|
|
1144
1191
|
export interface Row<
|
|
1145
1192
|
TCell extends ImplicitAllowedTypes,
|
|
@@ -1215,7 +1262,7 @@ export namespace TableSchema {
|
|
|
1215
1262
|
* Factory for creating new table column schema.
|
|
1216
1263
|
* @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.
|
|
1217
1264
|
* @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
|
|
1218
|
-
* @
|
|
1265
|
+
* @alpha
|
|
1219
1266
|
*/
|
|
1220
1267
|
export function row<
|
|
1221
1268
|
const TScope extends string | undefined,
|
|
@@ -1228,7 +1275,7 @@ export namespace TableSchema {
|
|
|
1228
1275
|
* @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.
|
|
1229
1276
|
* @typeParam TCell - The type of the cells in the {@link TableSchema.Table}.
|
|
1230
1277
|
* @typeParam TProps - Additional properties to associate with the row.
|
|
1231
|
-
* @
|
|
1278
|
+
* @alpha
|
|
1232
1279
|
*/
|
|
1233
1280
|
export function row<
|
|
1234
1281
|
const TScope extends string | undefined,
|
|
@@ -1261,7 +1308,7 @@ export namespace TableSchema {
|
|
|
1261
1308
|
|
|
1262
1309
|
/**
|
|
1263
1310
|
* A key to uniquely identify a cell within a table.
|
|
1264
|
-
* @
|
|
1311
|
+
* @alpha
|
|
1265
1312
|
*/
|
|
1266
1313
|
export interface CellKey<
|
|
1267
1314
|
TColumn extends ImplicitAllowedTypes,
|
|
@@ -1280,7 +1327,7 @@ export namespace TableSchema {
|
|
|
1280
1327
|
|
|
1281
1328
|
/**
|
|
1282
1329
|
* {@link TableSchema.Table.insertColumn} parameters.
|
|
1283
|
-
* @
|
|
1330
|
+
* @alpha
|
|
1284
1331
|
*/
|
|
1285
1332
|
export interface InsertColumnParameters<TColumn extends ImplicitAllowedTypes> {
|
|
1286
1333
|
/**
|
|
@@ -1297,7 +1344,7 @@ export namespace TableSchema {
|
|
|
1297
1344
|
|
|
1298
1345
|
/**
|
|
1299
1346
|
* {@link TableSchema.Table.insertColumns} parameters.
|
|
1300
|
-
* @
|
|
1347
|
+
* @alpha
|
|
1301
1348
|
*/
|
|
1302
1349
|
export interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {
|
|
1303
1350
|
/**
|
|
@@ -1314,7 +1361,7 @@ export namespace TableSchema {
|
|
|
1314
1361
|
|
|
1315
1362
|
/**
|
|
1316
1363
|
* {@link TableSchema.Table.insertRow} parameters.
|
|
1317
|
-
* @
|
|
1364
|
+
* @alpha
|
|
1318
1365
|
*/
|
|
1319
1366
|
export interface InsertRowParameters<TRow extends ImplicitAllowedTypes> {
|
|
1320
1367
|
/**
|
|
@@ -1331,7 +1378,7 @@ export namespace TableSchema {
|
|
|
1331
1378
|
|
|
1332
1379
|
/**
|
|
1333
1380
|
* {@link TableSchema.Table.insertRows} parameters.
|
|
1334
|
-
* @
|
|
1381
|
+
* @alpha
|
|
1335
1382
|
*/
|
|
1336
1383
|
export interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {
|
|
1337
1384
|
/**
|
|
@@ -1348,7 +1395,7 @@ export namespace TableSchema {
|
|
|
1348
1395
|
|
|
1349
1396
|
/**
|
|
1350
1397
|
* {@link TableSchema.Table.setCell} parameters.
|
|
1351
|
-
* @
|
|
1398
|
+
* @alpha
|
|
1352
1399
|
*/
|
|
1353
1400
|
export interface SetCellParameters<
|
|
1354
1401
|
TCell extends ImplicitAllowedTypes,
|
|
@@ -1372,7 +1419,7 @@ export namespace TableSchema {
|
|
|
1372
1419
|
* @typeParam TCell - The type of the cells in the table.
|
|
1373
1420
|
* @typeParam TColumn - The type of the columns in the table.
|
|
1374
1421
|
* @typeParam TRow - The type of the rows in the table.
|
|
1375
|
-
* @sealed @
|
|
1422
|
+
* @sealed @alpha
|
|
1376
1423
|
*/
|
|
1377
1424
|
export interface Table<
|
|
1378
1425
|
TScope extends string | undefined,
|
|
@@ -1556,7 +1603,7 @@ export namespace TableSchema {
|
|
|
1556
1603
|
* Factory for creating new table schema.
|
|
1557
1604
|
* @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.
|
|
1558
1605
|
* @typeParam TCell - The type of the cells in the table.
|
|
1559
|
-
* @
|
|
1606
|
+
* @alpha
|
|
1560
1607
|
*/
|
|
1561
1608
|
export function table<
|
|
1562
1609
|
const TScope extends string | undefined,
|
|
@@ -1574,7 +1621,7 @@ export namespace TableSchema {
|
|
|
1574
1621
|
* @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.
|
|
1575
1622
|
* @typeParam TCell - The type of the cells in the table.
|
|
1576
1623
|
* @typeParam TColumn - The type of the columns in the table.
|
|
1577
|
-
* @
|
|
1624
|
+
* @alpha
|
|
1578
1625
|
*/
|
|
1579
1626
|
export function table<
|
|
1580
1627
|
const TScope extends string | undefined,
|
|
@@ -1595,7 +1642,7 @@ export namespace TableSchema {
|
|
|
1595
1642
|
* @typeParam TScope - The {@link SchemaFactory.scope | schema factory scope}.
|
|
1596
1643
|
* @typeParam TCell - The type of the cells in the table.
|
|
1597
1644
|
* @typeParam TRow - The type of the rows in the table.
|
|
1598
|
-
* @
|
|
1645
|
+
* @alpha
|
|
1599
1646
|
*/
|
|
1600
1647
|
export function table<
|
|
1601
1648
|
const TScope extends string | undefined,
|
|
@@ -1617,7 +1664,7 @@ export namespace TableSchema {
|
|
|
1617
1664
|
* @typeParam TCell - The type of the cells in the table.
|
|
1618
1665
|
* @typeParam TColumn - The type of the columns in the table.
|
|
1619
1666
|
* @typeParam TRow - The type of the rows in the table.
|
|
1620
|
-
* @
|
|
1667
|
+
* @alpha
|
|
1621
1668
|
*/
|
|
1622
1669
|
export function table<
|
|
1623
1670
|
const TScope extends string | undefined,
|
package/src/treeFactory.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
7
|
-
|
|
8
7
|
import type { SharedObjectKind } from "@fluidframework/shared-object-base";
|
|
9
8
|
import {
|
|
10
9
|
type ISharedObject,
|
|
@@ -15,6 +14,7 @@ import {
|
|
|
15
14
|
type SharedObjectOptions,
|
|
16
15
|
type FactoryOut,
|
|
17
16
|
} from "@fluidframework/shared-object-base/internal";
|
|
17
|
+
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
18
18
|
|
|
19
19
|
import {
|
|
20
20
|
SharedTreeKernel,
|
|
@@ -23,11 +23,9 @@ import {
|
|
|
23
23
|
type SharedTreeOptionsInternal,
|
|
24
24
|
type SharedTreeKernelView,
|
|
25
25
|
} from "./shared-tree/index.js";
|
|
26
|
+
import { SharedTreeFactoryType, SharedTreeAttributes } from "./sharedTreeAttributes.js";
|
|
26
27
|
import type { ITree } from "./simple-tree/index.js";
|
|
27
|
-
|
|
28
28
|
import { Breakable } from "./util/index.js";
|
|
29
|
-
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
30
|
-
import { SharedTreeFactoryType, SharedTreeAttributes } from "./sharedTreeAttributes.js";
|
|
31
29
|
|
|
32
30
|
/**
|
|
33
31
|
* {@link ITreePrivate} extended with ISharedObject.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxies.d.ts","sourceRoot":"","sources":["../../src/simple-tree/proxies.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAEN,KAAK,aAAa,EAIlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,QAAQ,EAAgC,MAAM,iBAAiB,CAAC;AAE9E;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CA0B1F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxies.js","sourceRoot":"","sources":["../../src/simple-tree/proxies.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA2D;AAE3D,4DAMuC;AACvC,8CAA8E;AAE9E;;GAEG;AACH,SAAgB,mBAAmB,CAAC,KAAoB;IACvD,SAAS,gBAAgB,CACxB,SAAwD;QAExD,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC;QACvC,OAAO,IAAA,yBAAc,EAAC,YAAY,CAAC;YAClC,CAAC,CAAC,IAAA,uCAA4B,EAAC,YAAY,CAAC;YAC5C,CAAC,CAAC,YAAY,CAAC;IACjB,CAAC;IACD,QAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;QACtB,KAAK,qBAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;YACrC,MAAM,UAAU,GAAG,KAA8B,CAAC;YAClD,OAAO,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,KAAK,qBAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;YACrC,MAAM,UAAU,GAAG,KAA8B,CAAC;YAClD,OAAO,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,KAAK,qBAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACvC,4DAA4D;YAC5D,OAAQ,KAA+B,CAAC,OAAiB,CAAC;QAC3D,CAAC;QAED;YACC,IAAA,eAAI,EAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACvC,CAAC;AACF,CAAC;AA1BD,kDA0BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\nimport type { TreeValue } from \"../core/index.js\";\nimport {\n\tFieldKinds,\n\ttype FlexTreeField,\n\tisFlexTreeNode,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeOptionalField,\n} from \"../feature-libraries/index.js\";\nimport { type TreeNode, getOrCreateNodeFromInnerNode } from \"./core/index.js\";\n\n/**\n * Retrieve the associated {@link TreeNode} for the given field's content.\n */\nexport function getTreeNodeForField(field: FlexTreeField): TreeNode | TreeValue | undefined {\n\tfunction tryToUnboxLeaves(\n\t\tflexField: FlexTreeOptionalField | FlexTreeRequiredField,\n\t): TreeNode | TreeValue | undefined {\n\t\tconst maybeContent = flexField.content;\n\t\treturn isFlexTreeNode(maybeContent)\n\t\t\t? getOrCreateNodeFromInnerNode(maybeContent)\n\t\t\t: maybeContent;\n\t}\n\tswitch (field.schema) {\n\t\tcase FieldKinds.required.identifier: {\n\t\t\tconst typedField = field as FlexTreeRequiredField;\n\t\t\treturn tryToUnboxLeaves(typedField);\n\t\t}\n\t\tcase FieldKinds.optional.identifier: {\n\t\t\tconst typedField = field as FlexTreeOptionalField;\n\t\t\treturn tryToUnboxLeaves(typedField);\n\t\t}\n\t\tcase FieldKinds.identifier.identifier: {\n\t\t\t// Identifier fields are just value fields that hold strings\n\t\t\treturn (field as FlexTreeRequiredField).content as string;\n\t\t}\n\n\t\tdefault:\n\t\t\tfail(0xadf /* invalid field kind */);\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxies.d.ts","sourceRoot":"","sources":["../../src/simple-tree/proxies.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAEN,KAAK,aAAa,EAIlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,QAAQ,EAAgC,MAAM,iBAAiB,CAAC;AAE9E;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CA0B1F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxies.js","sourceRoot":"","sources":["../../src/simple-tree/proxies.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAE3D,OAAO,EACN,UAAU,EAEV,cAAc,GAGd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAiB,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE9E;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAoB;IACvD,SAAS,gBAAgB,CACxB,SAAwD;QAExD,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC;QACvC,OAAO,cAAc,CAAC,YAAY,CAAC;YAClC,CAAC,CAAC,4BAA4B,CAAC,YAAY,CAAC;YAC5C,CAAC,CAAC,YAAY,CAAC;IACjB,CAAC;IACD,QAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;QACtB,KAAK,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;YACrC,MAAM,UAAU,GAAG,KAA8B,CAAC;YAClD,OAAO,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,KAAK,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;YACrC,MAAM,UAAU,GAAG,KAA8B,CAAC;YAClD,OAAO,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,KAAK,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACvC,4DAA4D;YAC5D,OAAQ,KAA+B,CAAC,OAAiB,CAAC;QAC3D,CAAC;QAED;YACC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACvC,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\nimport type { TreeValue } from \"../core/index.js\";\nimport {\n\tFieldKinds,\n\ttype FlexTreeField,\n\tisFlexTreeNode,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeOptionalField,\n} from \"../feature-libraries/index.js\";\nimport { type TreeNode, getOrCreateNodeFromInnerNode } from \"./core/index.js\";\n\n/**\n * Retrieve the associated {@link TreeNode} for the given field's content.\n */\nexport function getTreeNodeForField(field: FlexTreeField): TreeNode | TreeValue | undefined {\n\tfunction tryToUnboxLeaves(\n\t\tflexField: FlexTreeOptionalField | FlexTreeRequiredField,\n\t): TreeNode | TreeValue | undefined {\n\t\tconst maybeContent = flexField.content;\n\t\treturn isFlexTreeNode(maybeContent)\n\t\t\t? getOrCreateNodeFromInnerNode(maybeContent)\n\t\t\t: maybeContent;\n\t}\n\tswitch (field.schema) {\n\t\tcase FieldKinds.required.identifier: {\n\t\t\tconst typedField = field as FlexTreeRequiredField;\n\t\t\treturn tryToUnboxLeaves(typedField);\n\t\t}\n\t\tcase FieldKinds.optional.identifier: {\n\t\t\tconst typedField = field as FlexTreeOptionalField;\n\t\t\treturn tryToUnboxLeaves(typedField);\n\t\t}\n\t\tcase FieldKinds.identifier.identifier: {\n\t\t\t// Identifier fields are just value fields that hold strings\n\t\t\treturn (field as FlexTreeRequiredField).content as string;\n\t\t}\n\n\t\tdefault:\n\t\t\tfail(0xadf /* invalid field kind */);\n\t}\n}\n"]}
|
|
File without changes
|