@fluidframework/tree 2.103.0 → 2.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +1 -0
- package/CHANGELOG.md +109 -0
- package/api-report/tree.alpha.api.md +60 -34
- package/api-report/tree.beta.api.md +49 -3
- package/api-report/tree.legacy.beta.api.md +49 -3
- package/dist/codec/versioned/format.js +2 -24
- package/dist/codec/versioned/format.js.map +1 -1
- package/dist/core/change-family/changeFamily.d.ts +3 -10
- package/dist/core/change-family/changeFamily.d.ts.map +1 -1
- package/dist/core/change-family/changeFamily.js.map +1 -1
- package/dist/core/rebase/types.d.ts +2 -2
- package/dist/core/rebase/types.js +2 -24
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/schema-stored/formatV1.js +2 -24
- package/dist/core/schema-stored/formatV1.js.map +1 -1
- package/dist/core/schema-stored/formatV2.js +2 -24
- package/dist/core/schema-stored/formatV2.js.map +1 -1
- package/dist/core/schema-stored/index.js +3 -25
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts +2 -2
- package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/dist/core/tree/anchorSet.js +4 -8
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.js +2 -24
- package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.js +2 -24
- package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.js +2 -24
- package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/dist/entrypoints/alpha.d.ts +1 -1
- package/dist/entrypoints/alpha.d.ts.map +1 -1
- package/dist/entrypoints/alpha.js.map +1 -1
- package/dist/entrypoints/beta.d.ts +1 -1
- package/dist/entrypoints/beta.d.ts.map +1 -1
- package/dist/entrypoints/beta.js.map +1 -1
- package/dist/entrypoints/internal.js +2 -15
- package/dist/entrypoints/internal.js.map +1 -1
- package/dist/entrypoints/legacy.d.ts +1 -1
- package/dist/entrypoints/legacy.d.ts.map +1 -1
- package/dist/entrypoints/legacy.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +7 -11
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +19 -14
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +13 -32
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +85 -28
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +83 -9
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +4 -2
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +11 -0
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js +2 -24
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js +2 -24
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js +2 -24
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js +2 -24
- package/dist/feature-libraries/chunked-forest/codec/format/formatVText.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/nodeEncoder.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js +3 -15
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.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/flex-tree/lazyEntity.js +9 -19
- package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +3 -13
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts +3 -3
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -2
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +4 -6
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.js +2 -24
- package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +1 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +4 -25
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js +2 -24
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +9 -9
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +10 -30
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js +2 -24
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +2 -24
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +0 -5
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +11 -55
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +2 -24
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +2 -24
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js +2 -24
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.js +2 -24
- package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js +2 -24
- package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV1.js +2 -24
- package/dist/feature-libraries/sequence-field/formatV1.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.js +2 -24
- package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV3.js +2 -24
- package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -25
- package/dist/index.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/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +4 -7
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +1 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +6 -5
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +7 -41
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +5 -1
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +13 -49
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.js +2 -24
- package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/dist/shared-tree/transactionPostProcessor.d.ts +28 -0
- package/dist/shared-tree/transactionPostProcessor.d.ts.map +1 -0
- package/dist/shared-tree/transactionPostProcessor.js +28 -0
- package/dist/shared-tree/transactionPostProcessor.js.map +1 -0
- package/dist/shared-tree/treeAlpha.js +3 -3
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +28 -15
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +124 -145
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree/unhydratedTreeContext.d.ts +5 -5
- package/dist/shared-tree/unhydratedTreeContext.d.ts.map +1 -1
- package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
- package/dist/shared-tree-core/branch.js +13 -17
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +3 -2
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +3 -9
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js +2 -4
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +3 -3
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +3 -3
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +2 -24
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js +2 -24
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +2 -24
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.d.ts +5 -9
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +5 -10
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +1 -1
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +3 -2
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +2 -24
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js +2 -24
- package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.js +2 -24
- package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +9 -44
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/transaction.d.ts +84 -9
- package/dist/shared-tree-core/transaction.d.ts.map +1 -1
- package/dist/shared-tree-core/transaction.js +94 -37
- package/dist/shared-tree-core/transaction.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.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts +3 -3
- package/dist/simple-tree/api/schemaCreationUtilities.js +3 -3
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +1 -1
- package/dist/simple-tree/api/schemaFactory.js +2 -2
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.js +2 -24
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +2 -2
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +4 -26
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/transactionTypes.d.ts +91 -28
- package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/transactionTypes.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +96 -22
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +83 -93
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +7 -7
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +6 -10
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/index.d.ts +1 -1
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +2 -12
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +2 -6
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.js +2 -24
- package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/dist/tableSchema.d.ts +50 -4
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +202 -106
- package/dist/tableSchema.js.map +1 -1
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.js +3 -1
- package/dist/text/index.js.map +1 -1
- package/dist/text/textDomainFormatted.d.ts +69 -758
- package/dist/text/textDomainFormatted.d.ts.map +1 -1
- package/dist/text/textDomainFormatted.js +275 -322
- package/dist/text/textDomainFormatted.js.map +1 -1
- package/dist/text/textDomainFormattedDefault.d.ts +273 -0
- package/dist/text/textDomainFormattedDefault.d.ts.map +1 -0
- package/dist/text/textDomainFormattedDefault.js +94 -0
- package/dist/text/textDomainFormattedDefault.js.map +1 -0
- package/dist/util/arrayUtilities.d.ts +20 -0
- package/dist/util/arrayUtilities.d.ts.map +1 -1
- package/dist/util/arrayUtilities.js +24 -1
- package/dist/util/arrayUtilities.js.map +1 -1
- package/dist/util/compressedIds.d.ts +118 -0
- package/dist/util/compressedIds.d.ts.map +1 -0
- package/dist/util/compressedIds.js +133 -0
- package/dist/util/compressedIds.js.map +1 -0
- package/dist/util/index.d.ts +2 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +11 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/rangeMap.d.ts +13 -0
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +69 -8
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/typeboxBrand.js +2 -24
- package/dist/util/typeboxBrand.js.map +1 -1
- package/dist/util/utils.js +2 -24
- package/dist/util/utils.js.map +1 -1
- package/eslint.config.mts +0 -30
- package/lib/core/change-family/changeFamily.d.ts +3 -10
- package/lib/core/change-family/changeFamily.d.ts.map +1 -1
- package/lib/core/change-family/changeFamily.js.map +1 -1
- package/lib/core/rebase/types.d.ts +2 -2
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts +2 -2
- package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/lib/core/tree/anchorSet.js +1 -5
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/entrypoints/alpha.d.ts +1 -1
- package/lib/entrypoints/alpha.d.ts.map +1 -1
- package/lib/entrypoints/alpha.js.map +1 -1
- package/lib/entrypoints/beta.d.ts +1 -1
- package/lib/entrypoints/beta.d.ts.map +1 -1
- package/lib/entrypoints/beta.js.map +1 -1
- package/lib/entrypoints/legacy.d.ts +1 -1
- package/lib/entrypoints/legacy.d.ts.map +1 -1
- package/lib/entrypoints/legacy.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +1 -5
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +19 -14
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +14 -33
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +85 -28
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +82 -9
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +4 -2
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +12 -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/nodeEncoder.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js +3 -15
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.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/flex-tree/lazyEntity.js +1 -11
- package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +1 -11
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts +3 -3
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -2
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +4 -6
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +1 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +10 -10
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +10 -30
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +0 -5
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +1 -45
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.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/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +5 -8
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +1 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +6 -5
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +4 -38
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +5 -1
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +9 -45
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/transactionPostProcessor.d.ts +28 -0
- package/lib/shared-tree/transactionPostProcessor.d.ts.map +1 -0
- package/lib/shared-tree/transactionPostProcessor.js +23 -0
- package/lib/shared-tree/transactionPostProcessor.js.map +1 -0
- package/lib/shared-tree/treeAlpha.js +3 -3
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +28 -15
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +80 -101
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree/unhydratedTreeContext.d.ts +5 -5
- package/lib/shared-tree/unhydratedTreeContext.d.ts.map +1 -1
- package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
- package/lib/shared-tree-core/branch.js +1 -5
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +3 -2
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +3 -9
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js +3 -5
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +3 -3
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +3 -3
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.d.ts +5 -9
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +5 -10
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +1 -1
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +1 -1
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +4 -39
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/transaction.d.ts +84 -9
- package/lib/shared-tree-core/transaction.d.ts.map +1 -1
- package/lib/shared-tree-core/transaction.js +74 -17
- package/lib/shared-tree-core/transaction.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.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts +3 -3
- package/lib/simple-tree/api/schemaCreationUtilities.js +3 -3
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +1 -1
- package/lib/simple-tree/api/schemaFactory.js +2 -2
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +2 -2
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +2 -2
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/transactionTypes.d.ts +91 -28
- package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/transactionTypes.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +96 -22
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +1 -11
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +7 -7
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +1 -5
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/index.d.ts +1 -1
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +1 -11
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +1 -5
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/tableSchema.d.ts +50 -4
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +171 -75
- package/lib/tableSchema.js.map +1 -1
- package/lib/text/index.d.ts +1 -0
- package/lib/text/index.d.ts.map +1 -1
- package/lib/text/index.js +1 -0
- package/lib/text/index.js.map +1 -1
- package/lib/text/textDomainFormatted.d.ts +69 -758
- package/lib/text/textDomainFormatted.d.ts.map +1 -1
- package/lib/text/textDomainFormatted.js +277 -324
- package/lib/text/textDomainFormatted.js.map +1 -1
- package/lib/text/textDomainFormattedDefault.d.ts +273 -0
- package/lib/text/textDomainFormattedDefault.d.ts.map +1 -0
- package/lib/text/textDomainFormattedDefault.js +91 -0
- package/lib/text/textDomainFormattedDefault.js.map +1 -0
- package/lib/util/arrayUtilities.d.ts +20 -0
- package/lib/util/arrayUtilities.d.ts.map +1 -1
- package/lib/util/arrayUtilities.js +22 -0
- package/lib/util/arrayUtilities.js.map +1 -1
- package/lib/util/compressedIds.d.ts +118 -0
- package/lib/util/compressedIds.d.ts.map +1 -0
- package/lib/util/compressedIds.js +124 -0
- package/lib/util/compressedIds.js.map +1 -0
- package/lib/util/index.d.ts +2 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/rangeMap.d.ts +13 -0
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +69 -8
- package/lib/util/rangeMap.js.map +1 -1
- package/package.json +25 -24
- package/src/core/change-family/changeFamily.ts +3 -12
- package/src/core/rebase/types.ts +2 -2
- package/src/core/schema-stored/storedSchemaRepository.ts +2 -2
- package/src/entrypoints/alpha.ts +12 -8
- package/src/entrypoints/beta.ts +8 -0
- package/src/entrypoints/legacy.ts +8 -0
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +35 -64
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +138 -42
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +32 -4
- package/src/feature-libraries/chunked-forest/codec/index.ts +1 -0
- package/src/feature-libraries/chunked-forest/codec/nodeEncoder.ts +7 -19
- package/src/feature-libraries/chunked-forest/index.ts +3 -0
- package/src/feature-libraries/forest-summary/codec.ts +5 -3
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +4 -5
- package/src/feature-libraries/index.ts +3 -0
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +13 -9
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +14 -47
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +0 -5
- package/src/index.ts +13 -8
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +5 -10
- package/src/shared-tree/index.ts +1 -0
- package/src/shared-tree/schematizingTreeView.ts +29 -25
- package/src/shared-tree/sharedTree.ts +18 -10
- package/src/shared-tree/transactionPostProcessor.ts +40 -0
- package/src/shared-tree/treeAlpha.ts +3 -3
- package/src/shared-tree/treeCheckout.ts +120 -95
- package/src/shared-tree/unhydratedTreeContext.ts +18 -15
- package/src/shared-tree-core/editManagerCodecs.ts +3 -2
- package/src/shared-tree-core/editManagerCodecsCommons.ts +10 -14
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +3 -2
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +3 -2
- package/src/shared-tree-core/editManagerSummarizer.ts +5 -9
- package/src/shared-tree-core/index.ts +8 -5
- package/src/shared-tree-core/sharedTreeCore.ts +3 -2
- package/src/shared-tree-core/transaction.ts +148 -18
- package/src/simple-tree/api/index.ts +13 -9
- package/src/simple-tree/api/schemaCreationUtilities.ts +3 -3
- package/src/simple-tree/api/schemaFactory.ts +2 -2
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +2 -2
- package/src/simple-tree/api/transactionTypes.ts +111 -39
- package/src/simple-tree/api/tree.ts +152 -47
- package/src/simple-tree/api/treeBeta.ts +2 -0
- package/src/simple-tree/core/treeNodeSchema.ts +7 -7
- package/src/simple-tree/index.ts +12 -8
- package/src/tableSchema.ts +306 -80
- package/src/text/index.ts +1 -0
- package/src/text/textDomainFormatted.ts +520 -415
- package/src/text/textDomainFormattedDefault.ts +150 -0
- package/src/util/arrayUtilities.ts +35 -0
- package/src/util/compressedIds.ts +216 -0
- package/src/util/index.ts +17 -0
- package/src/util/rangeMap.ts +108 -9
- package/tsconfig.json +5 -0
package/.vscode/settings.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,114 @@
|
|
|
1
1
|
# @fluidframework/tree
|
|
2
2
|
|
|
3
|
+
## 2.111.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add an opt-in postProcessor option when running a transaction ([#27610](https://github.com/microsoft/FluidFramework/pull/27610)) [ee981100f3f](https://github.com/microsoft/FluidFramework/commit/ee981100f3fa5fb9b5ea26b9ef62efa7e0691b69)
|
|
8
|
+
|
|
9
|
+
`RunTransactionParams` now accepts an optional `postProcessor` (used by `runTransaction` and `runTransactionAsync`). When supplied, the edits made during the transaction are post-processed when the transaction is committed, transforming the resulting squashed change. For example, post-processing could be used to "minimize" the change so that it contains no extraneous information. Such extraneous information includes data for nodes that were both created and removed within the transaction, or changes whose effects cancel out to nothing.
|
|
10
|
+
|
|
11
|
+
`postProcessor` is a type-erased handle (`TransactionPostProcessor`) whose concrete representation is an implementation detail of `@fluidframework/tree`. It is opt-in: when it is omitted the existing behavior is preserved.
|
|
12
|
+
|
|
13
|
+
Note: minimization is the first intended implementation and use of post-processing, but it is not yet available.
|
|
14
|
+
|
|
15
|
+
- TreeView transaction APIs have been promoted to beta ([#27592](https://github.com/microsoft/FluidFramework/pull/27592)) [1ed11dbeddd](https://github.com/microsoft/FluidFramework/commit/1ed11dbeddd98fd0b788aad6f74b6d480249ce28)
|
|
16
|
+
|
|
17
|
+
The [TreeViewBeta](https://fluidframework.com/docs/api/fluid-framework/treeviewbeta-interface) interface exposes `runTransaction` and `runTransactionAsync` methods.
|
|
18
|
+
|
|
19
|
+
The [asBeta](https://fluidframework.com/docs/api/fluid-framework/#asbeta-function) helper function can be used to down-cast a `TreeView` to a `TreeViewBeta`.
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { asBeta } from "fluid-framework/beta";
|
|
23
|
+
// ...
|
|
24
|
+
const view = asBeta(tree.viewWith(config));
|
|
25
|
+
const result = view.runTransaction(() => {
|
|
26
|
+
// ... make edits to the tree ...
|
|
27
|
+
});
|
|
28
|
+
if (result.success === false) {
|
|
29
|
+
// ... handle the failed transaction ...
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
> [!IMPORTANT]
|
|
34
|
+
> Transaction constraints are not yet available as a part of the beta transaction APIs.
|
|
35
|
+
> These capabilities can still be accessed via the updated alpha APIs.
|
|
36
|
+
|
|
37
|
+
**Type Name Changes**
|
|
38
|
+
|
|
39
|
+
With the introduction of new beta types, existing alpha types have been replaced with new alpha and beta variants.
|
|
40
|
+
|
|
41
|
+
| Old | New Alpha | New Beta |
|
|
42
|
+
| ------------------------------- | ------------------------------------ | ----------------------------------- |
|
|
43
|
+
| `RunTransactionParams` | `RunTransactionParamsAlpha` | `RunTransactionParamsBeta` |
|
|
44
|
+
| `TransactionCallbackStatus` | `TransactionCallbackStatusAlpha` | `TransactionCallbackStatusBeta` |
|
|
45
|
+
| `VoidTransactionCallbackStatus` | `VoidTransactionCallbackStatusAlpha` | `VoidTransactionCallbackStatusBeta` |
|
|
46
|
+
|
|
47
|
+
**Other Renames**
|
|
48
|
+
- `TransactionResult` (alpha) -> `TransactionVoidResult` (beta)
|
|
49
|
+
- `TransactionResultExt` (alpha) -> `TransactionValueResult` (beta)
|
|
50
|
+
|
|
51
|
+
## 2.110.0
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- TreeBranchAlpha.isMissingEditsFrom ([#27583](https://github.com/microsoft/FluidFramework/pull/27583)) [ef92f1f1cd8](https://github.com/microsoft/FluidFramework/commit/ef92f1f1cd880ed361e9f8efa49fb23c4ee64ca3)
|
|
56
|
+
|
|
57
|
+
Adds a new method (`isMissingEditsFrom(branch: TreeBranch): boolean`) to `TreeBranchAlpha`.
|
|
58
|
+
`isMissingEditsFrom` can be used to determine whether there are edits on the given `branch` that have not yet been merged into this branch.
|
|
59
|
+
|
|
60
|
+
- Forks created on "changed" event are no longer auto-disposed ([#27580](https://github.com/microsoft/FluidFramework/pull/27580)) [ae64be7688e](https://github.com/microsoft/FluidFramework/commit/ae64be7688e26da9bfc5c0286e50d3df0647ff3a)
|
|
61
|
+
|
|
62
|
+
The "changed" event is emitted from a `TreeBranch` when a change is made to the branch.
|
|
63
|
+
Previously, when this event was fired due to a transaction being committed, it was possible to fork the branch in response to the "changed" event, but such a fork would be automatically disposed immediately after the event callback.
|
|
64
|
+
This was a bug. Such forks are no longer disposed automatically.
|
|
65
|
+
|
|
66
|
+
- Editing a SharedTree during its change-event callbacks now consistently throws ([#27285](https://github.com/microsoft/FluidFramework/pull/27285)) [255d4505ed5](https://github.com/microsoft/FluidFramework/commit/255d4505ed574676735c6f2078199e5b29dede2a)
|
|
67
|
+
|
|
68
|
+
Editing a `SharedTree` from inside one of its change-event callbacks has always been forbidden, but some paths were not being caught: edits and the start of a transaction (along with branch operations, reverts, etc.) made while the tree was emitting its post-change notification ran to completion instead of throwing.
|
|
69
|
+
|
|
70
|
+
Such edits would apply to the tree, trigger further change notifications, and could re-enter the same listener for the resulting commits.
|
|
71
|
+
This can produce infinite edit loops, redundant work across clients, incorrect attribution, broken undo/redo grouping, and pollution of the outer commit's label data.
|
|
72
|
+
|
|
73
|
+
This release closes those gaps: both editing the tree and starting a transaction during a change-event callback now throw the same canonical `UsageError` as the other change-event callbacks:
|
|
74
|
+
|
|
75
|
+
> Editing the tree is forbidden during a change event callback
|
|
76
|
+
|
|
77
|
+
> Running a transaction is forbidden during a change event callback
|
|
78
|
+
|
|
79
|
+
More generally, edits should not be made in response to changes to the document.
|
|
80
|
+
See [Editing in response to change events](https://fluidframework.com/docs/data-structures/tree/events#editing-in-response-to-change-events) for why, and for the recommended alternatives.
|
|
81
|
+
|
|
82
|
+
- TableSchema (beta) methods now accept positional arguments ([#27545](https://github.com/microsoft/FluidFramework/pull/27545)) [e121ff71f3e](https://github.com/microsoft/FluidFramework/commit/e121ff71f3ebed80c656315486933fe2d6859b32)
|
|
83
|
+
|
|
84
|
+
The `insertColumns`, `insertRows`, `setCell`, and `removeCell` methods on `TableSchema.Table` now accept positional arguments in addition to the existing property-bag form.
|
|
85
|
+
The new overloads remove a layer of object construction at call sites and make the common cases more concise.
|
|
86
|
+
|
|
87
|
+
The existing property-bag overloads continue to work but are now deprecated.
|
|
88
|
+
They will be removed in a future release.
|
|
89
|
+
|
|
90
|
+
#### Migration
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
// ...
|
|
94
|
+
|
|
95
|
+
// Before
|
|
96
|
+
table.insertColumns({ columns: [columnA, columnB] });
|
|
97
|
+
table.insertColumns({ index: 0, columns: [columnA] });
|
|
98
|
+
table.insertRows({ rows: [rowA, rowB] });
|
|
99
|
+
table.insertRows({ index: 0, rows: [rowA] });
|
|
100
|
+
table.setCell({ key: { column, row }, cell });
|
|
101
|
+
table.removeCell({ column, row });
|
|
102
|
+
|
|
103
|
+
// After
|
|
104
|
+
table.insertColumns([columnA, columnB]);
|
|
105
|
+
table.insertColumns([columnA], 0);
|
|
106
|
+
table.insertRows([rowA, rowB]);
|
|
107
|
+
table.insertRows([rowA], 0);
|
|
108
|
+
table.setCell(row, column, cell);
|
|
109
|
+
table.removeCell(row, column);
|
|
110
|
+
```
|
|
111
|
+
|
|
3
112
|
## 2.103.0
|
|
4
113
|
|
|
5
114
|
Dependency updates only.
|
|
@@ -1074,11 +1074,16 @@ export interface RunTransaction {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
1076
|
// @alpha @input
|
|
1077
|
-
export interface
|
|
1078
|
-
readonly
|
|
1077
|
+
export interface RunTransactionParamsAlpha extends RunTransactionParamsBeta {
|
|
1078
|
+
readonly postProcessor?: TransactionPostProcessor;
|
|
1079
1079
|
readonly preconditions?: readonly TransactionConstraintAlpha[];
|
|
1080
1080
|
}
|
|
1081
1081
|
|
|
1082
|
+
// @beta @input
|
|
1083
|
+
export interface RunTransactionParamsBeta {
|
|
1084
|
+
readonly label?: unknown;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1082
1087
|
// @public @sealed
|
|
1083
1088
|
export interface SchemaCompatibilityStatus {
|
|
1084
1089
|
readonly canInitialize: boolean;
|
|
@@ -1522,12 +1527,12 @@ export namespace TableSchema {
|
|
|
1522
1527
|
export function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
1523
1528
|
readonly props: TProps;
|
|
1524
1529
|
}): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, TProps>;
|
|
1525
|
-
// @input
|
|
1530
|
+
// @deprecated @input
|
|
1526
1531
|
export interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {
|
|
1527
1532
|
readonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1528
1533
|
readonly index?: number | undefined;
|
|
1529
1534
|
}
|
|
1530
|
-
// @input
|
|
1535
|
+
// @deprecated @input
|
|
1531
1536
|
export interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {
|
|
1532
1537
|
readonly index?: number | undefined;
|
|
1533
1538
|
readonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
@@ -1542,7 +1547,7 @@ export namespace TableSchema {
|
|
|
1542
1547
|
export function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
1543
1548
|
readonly props: TProps;
|
|
1544
1549
|
}): System_TableSchema.RowSchemaBase<TUserScope, TCell, TProps>;
|
|
1545
|
-
// @input
|
|
1550
|
+
// @deprecated @input
|
|
1546
1551
|
export interface SetCellParameters<TCell extends ImplicitAllowedTypes, TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
|
|
1547
1552
|
readonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;
|
|
1548
1553
|
readonly key: CellKey<TColumn, TRow>;
|
|
@@ -1555,8 +1560,14 @@ export namespace TableSchema {
|
|
|
1555
1560
|
getColumn(index: number): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
|
|
1556
1561
|
getRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
1557
1562
|
getRow(index: number): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
1563
|
+
insertColumns(columns: readonly InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[], index?: number): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1564
|
+
// @deprecated
|
|
1558
1565
|
insertColumns(params: InsertColumnsParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1566
|
+
insertRows(rows: readonly InsertableTreeNodeFromImplicitAllowedTypes<TRow>[], index?: number): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1567
|
+
// @deprecated
|
|
1559
1568
|
insertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1569
|
+
removeCell(row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>, column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
1570
|
+
// @deprecated
|
|
1560
1571
|
removeCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
1561
1572
|
removeColumns(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1562
1573
|
removeColumns(columns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
@@ -1565,6 +1576,8 @@ export namespace TableSchema {
|
|
|
1565
1576
|
removeRows(rows: readonly TreeNodeFromImplicitAllowedTypes<TRow>[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1566
1577
|
removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1567
1578
|
readonly rows: System_TableSchema.RearrangeableList<TRow>;
|
|
1579
|
+
setCell(row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>, column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>, cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>): void;
|
|
1580
|
+
// @deprecated
|
|
1568
1581
|
setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
|
|
1569
1582
|
}
|
|
1570
1583
|
export function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell>): System_TableSchema.TableSchemaBase<TUserScope, TCell, System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>, System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>>;
|
|
@@ -1624,15 +1637,18 @@ export namespace TextAsTree {
|
|
|
1624
1637
|
// @alpha
|
|
1625
1638
|
export function trackDirtyNodes(view: TreeViewAlpha<ImplicitFieldSchema>, dirty: DirtyTreeMap): () => void;
|
|
1626
1639
|
|
|
1627
|
-
// @alpha
|
|
1628
|
-
export type
|
|
1629
|
-
|
|
1630
|
-
}) | (WithValue<TFailureValue> & {
|
|
1631
|
-
rollback: true;
|
|
1632
|
-
})) & {
|
|
1633
|
-
preconditionsOnRevert?: readonly TransactionConstraintAlpha[];
|
|
1640
|
+
// @alpha @input
|
|
1641
|
+
export type TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue> = TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> & {
|
|
1642
|
+
readonly preconditionsOnRevert?: readonly TransactionConstraintAlpha[];
|
|
1634
1643
|
};
|
|
1635
1644
|
|
|
1645
|
+
// @beta @input
|
|
1646
|
+
export type TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> = (WithValue<TSuccessValue> & {
|
|
1647
|
+
readonly rollback?: false;
|
|
1648
|
+
}) | (WithValue<TFailureValue> & {
|
|
1649
|
+
readonly rollback: true;
|
|
1650
|
+
});
|
|
1651
|
+
|
|
1636
1652
|
// @public
|
|
1637
1653
|
export type TransactionConstraint = NodeInDocumentConstraint;
|
|
1638
1654
|
|
|
@@ -1644,22 +1660,26 @@ export type TransactionLabels = Set<unknown> & {
|
|
|
1644
1660
|
tree?: LabelTree;
|
|
1645
1661
|
};
|
|
1646
1662
|
|
|
1647
|
-
// @alpha
|
|
1648
|
-
export
|
|
1649
|
-
|
|
1650
|
-
// @alpha
|
|
1651
|
-
export type TransactionResultExt<TSuccessValue, TFailureValue> = TransactionResultSuccess<TSuccessValue> | TransactionResultFailed<TFailureValue>;
|
|
1663
|
+
// @alpha @sealed @system
|
|
1664
|
+
export interface TransactionPostProcessor extends ErasedType<"@fluidframework/tree.TransactionPostProcessor"> {
|
|
1665
|
+
}
|
|
1652
1666
|
|
|
1653
|
-
// @
|
|
1667
|
+
// @beta @sealed
|
|
1654
1668
|
export interface TransactionResultFailed<TFailureValue> extends WithValue<TFailureValue> {
|
|
1655
|
-
success: false;
|
|
1669
|
+
readonly success: false;
|
|
1656
1670
|
}
|
|
1657
1671
|
|
|
1658
|
-
// @
|
|
1672
|
+
// @beta @sealed
|
|
1659
1673
|
export interface TransactionResultSuccess<TSuccessValue> extends WithValue<TSuccessValue> {
|
|
1660
|
-
success: true;
|
|
1674
|
+
readonly success: true;
|
|
1661
1675
|
}
|
|
1662
1676
|
|
|
1677
|
+
// @beta @sealed
|
|
1678
|
+
export type TransactionValueResult<TSuccessValue, TFailureValue> = TransactionResultSuccess<TSuccessValue> | TransactionResultFailed<TFailureValue>;
|
|
1679
|
+
|
|
1680
|
+
// @beta @sealed
|
|
1681
|
+
export type TransactionVoidResult = Omit<TransactionResultSuccess<unknown>, "value"> | Omit<TransactionResultFailed<unknown>, "value">;
|
|
1682
|
+
|
|
1663
1683
|
// @public @sealed
|
|
1664
1684
|
export interface Tree extends TreeNodeApi {
|
|
1665
1685
|
contains(node: TreeNode, other: TreeNode): boolean;
|
|
@@ -1760,10 +1780,11 @@ export interface TreeBranchAlpha extends TreeBranch, TreeContextAlpha {
|
|
|
1760
1780
|
// (undocumented)
|
|
1761
1781
|
fork(): TreeBranchAlpha;
|
|
1762
1782
|
hasRootSchema<TSchema extends ImplicitFieldSchema>(schema: TSchema): this is TreeViewAlpha<TSchema>;
|
|
1763
|
-
|
|
1764
|
-
runTransaction(transaction: () =>
|
|
1765
|
-
|
|
1766
|
-
runTransactionAsync(transaction: () => Promise<
|
|
1783
|
+
isMissingEditsFrom(branch: TreeBranch): boolean;
|
|
1784
|
+
runTransaction<TSuccessValue, TFailureValue>(transaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TSuccessValue, TFailureValue>;
|
|
1785
|
+
runTransaction(transaction: () => VoidTransactionCallbackStatusAlpha | void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
|
|
1786
|
+
runTransactionAsync<TSuccessValue, TFailureValue>(transaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;
|
|
1787
|
+
runTransactionAsync(transaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
|
|
1767
1788
|
}
|
|
1768
1789
|
|
|
1769
1790
|
// @alpha @sealed
|
|
@@ -1798,10 +1819,10 @@ export enum TreeCompressionStrategy {
|
|
|
1798
1819
|
// @alpha
|
|
1799
1820
|
export interface TreeContextAlpha {
|
|
1800
1821
|
isBranch(): this is TreeBranchAlpha;
|
|
1801
|
-
runTransaction<TValue>(transaction: () => WithValue<TValue>, params?:
|
|
1802
|
-
runTransaction(transaction: () => void, params?:
|
|
1803
|
-
runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?:
|
|
1804
|
-
runTransactionAsync(transaction: () => Promise<void>, params?:
|
|
1822
|
+
runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TValue, TValue>;
|
|
1823
|
+
runTransaction(transaction: () => void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
|
|
1824
|
+
runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TValue, TValue>>;
|
|
1825
|
+
runTransactionAsync(transaction: () => Promise<void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
|
|
1805
1826
|
}
|
|
1806
1827
|
|
|
1807
1828
|
// @beta @input
|
|
@@ -1955,7 +1976,7 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
|
|
|
1955
1976
|
}
|
|
1956
1977
|
|
|
1957
1978
|
// @alpha @sealed
|
|
1958
|
-
export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork">, TreeBranchAlpha {
|
|
1979
|
+
export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync">, TreeBranchAlpha {
|
|
1959
1980
|
// (undocumented)
|
|
1960
1981
|
readonly events: Listenable_2<TreeViewEvents & TreeBranchEvents>;
|
|
1961
1982
|
// (undocumented)
|
|
@@ -1971,6 +1992,8 @@ export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | Unsa
|
|
|
1971
1992
|
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, TreeBranch {
|
|
1972
1993
|
// (undocumented)
|
|
1973
1994
|
fork(): ReturnType<TreeBranch["fork"]> & TreeViewBeta<TSchema>;
|
|
1995
|
+
runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
|
|
1996
|
+
runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
|
|
1974
1997
|
}
|
|
1975
1998
|
|
|
1976
1999
|
// @public @sealed
|
|
@@ -2095,8 +2118,11 @@ export interface ViewContent {
|
|
|
2095
2118
|
readonly tree: JsonCompatible<IFluidHandle>;
|
|
2096
2119
|
}
|
|
2097
2120
|
|
|
2098
|
-
// @alpha
|
|
2099
|
-
export type
|
|
2121
|
+
// @alpha @input
|
|
2122
|
+
export type VoidTransactionCallbackStatusAlpha = Omit<TransactionCallbackStatusAlpha<unknown, unknown>, "value">;
|
|
2123
|
+
|
|
2124
|
+
// @beta @input
|
|
2125
|
+
export type VoidTransactionCallbackStatusBeta = Omit<TransactionCallbackStatusBeta<unknown, unknown>, "value">;
|
|
2100
2126
|
|
|
2101
2127
|
// @public @sealed
|
|
2102
2128
|
export interface WithType<out TName extends string = string, out TKind extends NodeKind = NodeKind, out TInfo = unknown> {
|
|
@@ -2105,9 +2131,9 @@ export interface WithType<out TName extends string = string, out TKind extends N
|
|
|
2105
2131
|
get [typeSchemaSymbol](): TreeNodeSchemaClass<TName, TKind, TreeNode, never, boolean, TInfo>;
|
|
2106
2132
|
}
|
|
2107
2133
|
|
|
2108
|
-
// @
|
|
2134
|
+
// @beta @input
|
|
2109
2135
|
export interface WithValue<TValue> {
|
|
2110
|
-
value: TValue;
|
|
2136
|
+
readonly value: TValue;
|
|
2111
2137
|
}
|
|
2112
2138
|
|
|
2113
2139
|
// (No @packageDocumentation comment for this package)
|
|
@@ -501,6 +501,11 @@ export interface RunTransaction {
|
|
|
501
501
|
readonly rollback: typeof rollback;
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
+
// @beta @input
|
|
505
|
+
export interface RunTransactionParamsBeta {
|
|
506
|
+
readonly label?: unknown;
|
|
507
|
+
}
|
|
508
|
+
|
|
504
509
|
// @public @sealed
|
|
505
510
|
export interface SchemaCompatibilityStatus {
|
|
506
511
|
readonly canInitialize: boolean;
|
|
@@ -805,12 +810,12 @@ export namespace TableSchema {
|
|
|
805
810
|
export function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
806
811
|
readonly props: TProps;
|
|
807
812
|
}): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, TProps>;
|
|
808
|
-
// @input
|
|
813
|
+
// @deprecated @input
|
|
809
814
|
export interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {
|
|
810
815
|
readonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
811
816
|
readonly index?: number | undefined;
|
|
812
817
|
}
|
|
813
|
-
// @input
|
|
818
|
+
// @deprecated @input
|
|
814
819
|
export interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {
|
|
815
820
|
readonly index?: number | undefined;
|
|
816
821
|
readonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
@@ -825,7 +830,7 @@ export namespace TableSchema {
|
|
|
825
830
|
export function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
826
831
|
readonly props: TProps;
|
|
827
832
|
}): System_TableSchema.RowSchemaBase<TUserScope, TCell, TProps>;
|
|
828
|
-
// @input
|
|
833
|
+
// @deprecated @input
|
|
829
834
|
export interface SetCellParameters<TCell extends ImplicitAllowedTypes, TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
|
|
830
835
|
readonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;
|
|
831
836
|
readonly key: CellKey<TColumn, TRow>;
|
|
@@ -838,8 +843,14 @@ export namespace TableSchema {
|
|
|
838
843
|
getColumn(index: number): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
|
|
839
844
|
getRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
840
845
|
getRow(index: number): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
846
|
+
insertColumns(columns: readonly InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[], index?: number): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
847
|
+
// @deprecated
|
|
841
848
|
insertColumns(params: InsertColumnsParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
849
|
+
insertRows(rows: readonly InsertableTreeNodeFromImplicitAllowedTypes<TRow>[], index?: number): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
850
|
+
// @deprecated
|
|
842
851
|
insertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
852
|
+
removeCell(row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>, column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
853
|
+
// @deprecated
|
|
843
854
|
removeCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
844
855
|
removeColumns(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
845
856
|
removeColumns(columns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
@@ -848,6 +859,8 @@ export namespace TableSchema {
|
|
|
848
859
|
removeRows(rows: readonly TreeNodeFromImplicitAllowedTypes<TRow>[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
849
860
|
removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
850
861
|
readonly rows: System_TableSchema.RearrangeableList<TRow>;
|
|
862
|
+
setCell(row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>, column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>, cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>): void;
|
|
863
|
+
// @deprecated
|
|
851
864
|
setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
|
|
852
865
|
}
|
|
853
866
|
export function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell>): System_TableSchema.TableSchemaBase<TUserScope, TCell, System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>, System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>>;
|
|
@@ -868,9 +881,32 @@ export namespace TableSchema {
|
|
|
868
881
|
}
|
|
869
882
|
}
|
|
870
883
|
|
|
884
|
+
// @beta @input
|
|
885
|
+
export type TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> = (WithValue<TSuccessValue> & {
|
|
886
|
+
readonly rollback?: false;
|
|
887
|
+
}) | (WithValue<TFailureValue> & {
|
|
888
|
+
readonly rollback: true;
|
|
889
|
+
});
|
|
890
|
+
|
|
871
891
|
// @public
|
|
872
892
|
export type TransactionConstraint = NodeInDocumentConstraint;
|
|
873
893
|
|
|
894
|
+
// @beta @sealed
|
|
895
|
+
export interface TransactionResultFailed<TFailureValue> extends WithValue<TFailureValue> {
|
|
896
|
+
readonly success: false;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
// @beta @sealed
|
|
900
|
+
export interface TransactionResultSuccess<TSuccessValue> extends WithValue<TSuccessValue> {
|
|
901
|
+
readonly success: true;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
// @beta @sealed
|
|
905
|
+
export type TransactionValueResult<TSuccessValue, TFailureValue> = TransactionResultSuccess<TSuccessValue> | TransactionResultFailed<TFailureValue>;
|
|
906
|
+
|
|
907
|
+
// @beta @sealed
|
|
908
|
+
export type TransactionVoidResult = Omit<TransactionResultSuccess<unknown>, "value"> | Omit<TransactionResultFailed<unknown>, "value">;
|
|
909
|
+
|
|
874
910
|
// @public @sealed
|
|
875
911
|
export interface Tree extends TreeNodeApi {
|
|
876
912
|
contains(node: TreeNode, other: TreeNode): boolean;
|
|
@@ -1067,6 +1103,8 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
|
|
|
1067
1103
|
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, TreeBranch {
|
|
1068
1104
|
// (undocumented)
|
|
1069
1105
|
fork(): ReturnType<TreeBranch["fork"]> & TreeViewBeta<TSchema>;
|
|
1106
|
+
runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
|
|
1107
|
+
runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
|
|
1070
1108
|
}
|
|
1071
1109
|
|
|
1072
1110
|
// @public @sealed
|
|
@@ -1144,6 +1182,9 @@ export interface ViewableTree {
|
|
|
1144
1182
|
viewWith<TRoot extends ImplicitFieldSchema>(config: TreeViewConfiguration<TRoot>): TreeView<TRoot>;
|
|
1145
1183
|
}
|
|
1146
1184
|
|
|
1185
|
+
// @beta @input
|
|
1186
|
+
export type VoidTransactionCallbackStatusBeta = Omit<TransactionCallbackStatusBeta<unknown, unknown>, "value">;
|
|
1187
|
+
|
|
1147
1188
|
// @public @sealed
|
|
1148
1189
|
export interface WithType<out TName extends string = string, out TKind extends NodeKind = NodeKind, out TInfo = unknown> {
|
|
1149
1190
|
// @deprecated
|
|
@@ -1151,6 +1192,11 @@ export interface WithType<out TName extends string = string, out TKind extends N
|
|
|
1151
1192
|
get [typeSchemaSymbol](): TreeNodeSchemaClass<TName, TKind, TreeNode, never, boolean, TInfo>;
|
|
1152
1193
|
}
|
|
1153
1194
|
|
|
1195
|
+
// @beta @input
|
|
1196
|
+
export interface WithValue<TValue> {
|
|
1197
|
+
readonly value: TValue;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1154
1200
|
// (No @packageDocumentation comment for this package)
|
|
1155
1201
|
|
|
1156
1202
|
```
|
|
@@ -504,6 +504,11 @@ export interface RunTransaction {
|
|
|
504
504
|
readonly rollback: typeof rollback;
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
+
// @beta @input
|
|
508
|
+
export interface RunTransactionParamsBeta {
|
|
509
|
+
readonly label?: unknown;
|
|
510
|
+
}
|
|
511
|
+
|
|
507
512
|
// @public @sealed
|
|
508
513
|
export interface SchemaCompatibilityStatus {
|
|
509
514
|
readonly canInitialize: boolean;
|
|
@@ -817,12 +822,12 @@ export namespace TableSchema {
|
|
|
817
822
|
export function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
818
823
|
readonly props: TProps;
|
|
819
824
|
}): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, TProps>;
|
|
820
|
-
// @input
|
|
825
|
+
// @deprecated @input
|
|
821
826
|
export interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {
|
|
822
827
|
readonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
823
828
|
readonly index?: number | undefined;
|
|
824
829
|
}
|
|
825
|
-
// @input
|
|
830
|
+
// @deprecated @input
|
|
826
831
|
export interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {
|
|
827
832
|
readonly index?: number | undefined;
|
|
828
833
|
readonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
@@ -837,7 +842,7 @@ export namespace TableSchema {
|
|
|
837
842
|
export function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
838
843
|
readonly props: TProps;
|
|
839
844
|
}): System_TableSchema.RowSchemaBase<TUserScope, TCell, TProps>;
|
|
840
|
-
// @input
|
|
845
|
+
// @deprecated @input
|
|
841
846
|
export interface SetCellParameters<TCell extends ImplicitAllowedTypes, TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
|
|
842
847
|
readonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;
|
|
843
848
|
readonly key: CellKey<TColumn, TRow>;
|
|
@@ -850,8 +855,14 @@ export namespace TableSchema {
|
|
|
850
855
|
getColumn(index: number): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;
|
|
851
856
|
getRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
852
857
|
getRow(index: number): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
858
|
+
insertColumns(columns: readonly InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[], index?: number): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
859
|
+
// @deprecated
|
|
853
860
|
insertColumns(params: InsertColumnsParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
861
|
+
insertRows(rows: readonly InsertableTreeNodeFromImplicitAllowedTypes<TRow>[], index?: number): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
862
|
+
// @deprecated
|
|
854
863
|
insertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
864
|
+
removeCell(row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>, column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
865
|
+
// @deprecated
|
|
855
866
|
removeCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
856
867
|
removeColumns(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
857
868
|
removeColumns(columns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
@@ -860,6 +871,8 @@ export namespace TableSchema {
|
|
|
860
871
|
removeRows(rows: readonly TreeNodeFromImplicitAllowedTypes<TRow>[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
861
872
|
removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
862
873
|
readonly rows: System_TableSchema.RearrangeableList<TRow>;
|
|
874
|
+
setCell(row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>, column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>, cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>): void;
|
|
875
|
+
// @deprecated
|
|
863
876
|
setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
|
|
864
877
|
}
|
|
865
878
|
export function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell>): System_TableSchema.TableSchemaBase<TUserScope, TCell, System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>, System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>>;
|
|
@@ -880,9 +893,32 @@ export namespace TableSchema {
|
|
|
880
893
|
}
|
|
881
894
|
}
|
|
882
895
|
|
|
896
|
+
// @beta @input
|
|
897
|
+
export type TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> = (WithValue<TSuccessValue> & {
|
|
898
|
+
readonly rollback?: false;
|
|
899
|
+
}) | (WithValue<TFailureValue> & {
|
|
900
|
+
readonly rollback: true;
|
|
901
|
+
});
|
|
902
|
+
|
|
883
903
|
// @public
|
|
884
904
|
export type TransactionConstraint = NodeInDocumentConstraint;
|
|
885
905
|
|
|
906
|
+
// @beta @sealed
|
|
907
|
+
export interface TransactionResultFailed<TFailureValue> extends WithValue<TFailureValue> {
|
|
908
|
+
readonly success: false;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
// @beta @sealed
|
|
912
|
+
export interface TransactionResultSuccess<TSuccessValue> extends WithValue<TSuccessValue> {
|
|
913
|
+
readonly success: true;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
// @beta @sealed
|
|
917
|
+
export type TransactionValueResult<TSuccessValue, TFailureValue> = TransactionResultSuccess<TSuccessValue> | TransactionResultFailed<TFailureValue>;
|
|
918
|
+
|
|
919
|
+
// @beta @sealed
|
|
920
|
+
export type TransactionVoidResult = Omit<TransactionResultSuccess<unknown>, "value"> | Omit<TransactionResultFailed<unknown>, "value">;
|
|
921
|
+
|
|
886
922
|
// @public @sealed
|
|
887
923
|
export interface Tree extends TreeNodeApi {
|
|
888
924
|
contains(node: TreeNode, other: TreeNode): boolean;
|
|
@@ -1079,6 +1115,8 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
|
|
|
1079
1115
|
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, TreeBranch {
|
|
1080
1116
|
// (undocumented)
|
|
1081
1117
|
fork(): ReturnType<TreeBranch["fork"]> & TreeViewBeta<TSchema>;
|
|
1118
|
+
runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
|
|
1119
|
+
runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
|
|
1082
1120
|
}
|
|
1083
1121
|
|
|
1084
1122
|
// @public @sealed
|
|
@@ -1156,6 +1194,9 @@ export interface ViewableTree {
|
|
|
1156
1194
|
viewWith<TRoot extends ImplicitFieldSchema>(config: TreeViewConfiguration<TRoot>): TreeView<TRoot>;
|
|
1157
1195
|
}
|
|
1158
1196
|
|
|
1197
|
+
// @beta @input
|
|
1198
|
+
export type VoidTransactionCallbackStatusBeta = Omit<TransactionCallbackStatusBeta<unknown, unknown>, "value">;
|
|
1199
|
+
|
|
1159
1200
|
// @public @sealed
|
|
1160
1201
|
export interface WithType<out TName extends string = string, out TKind extends NodeKind = NodeKind, out TInfo = unknown> {
|
|
1161
1202
|
// @deprecated
|
|
@@ -1163,6 +1204,11 @@ export interface WithType<out TName extends string = string, out TKind extends N
|
|
|
1163
1204
|
get [typeSchemaSymbol](): TreeNodeSchemaClass<TName, TKind, TreeNode, never, boolean, TInfo>;
|
|
1164
1205
|
}
|
|
1165
1206
|
|
|
1207
|
+
// @beta @input
|
|
1208
|
+
export interface WithValue<TValue> {
|
|
1209
|
+
readonly value: TValue;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1166
1212
|
// (No @packageDocumentation comment for this package)
|
|
1167
1213
|
|
|
1168
1214
|
```
|
|
@@ -3,32 +3,10 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
-
if (k2 === undefined) k2 = k;
|
|
8
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
7
|
exports.Versioned = exports.versionField = void 0;
|
|
31
|
-
const
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const Type = tslib_1.__importStar(require("@sinclair/typebox"));
|
|
32
10
|
/**
|
|
33
11
|
* A field to use in TypeBox schemas for the version field of a versioned format.
|
|
34
12
|
* @remarks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/codec/versioned/format.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/codec/versioned/format.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,gEAA0C;AAG1C;;;;;GAKG;AACU,QAAA,YAAY,GAAG;IAC3B;;;;;OAKG;IACH,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1C,CAAC;AAEX;;GAEG;AACU,QAAA,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAY,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport * as Type from \"@sinclair/typebox\";\nimport type { Static } from \"@sinclair/typebox\";\n\n/**\n * A field to use in TypeBox schemas for the version field of a versioned format.\n * @remarks\n * Spread this into the top level object schema for the format.\n * The version field is required for all versioned formats, and is used by the {@link VersionDispatchingCodecBuilder} to determine which codec version to use when decoding.\n */\nexport const versionField = {\n\t/**\n\t * String versions are used for formats that are not yet officially supported. See {@link FormatVersion} for details.\n\t * @remarks\n\t * Having this schema be particularly strict is not too important since\n\t * checking that the contents are the exact value expected is done by `makeVersionedCodec` in the {@link VersionDispatchingCodecBuilder}.\n\t */\n\tversion: Type.Union([Type.Number(), Type.String()]),\n} as const;\n\n/**\n * An object which has a {@link versionField}.\n */\nexport const Versioned = Type.Object(versionField);\n\nexport type Versioned = Static<typeof Versioned>;\n"]}
|