@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
|
@@ -64,11 +64,6 @@ export interface ModularChangeset extends Readonly<HasFieldChanges> {
|
|
|
64
64
|
readonly noChangeConstraint?: NoChangeConstraint;
|
|
65
65
|
/** Constraint that the document must be in the same state before the revert of this change is applied as it was after this change was applied */
|
|
66
66
|
readonly noChangeConstraintOnRevert?: NoChangeConstraint;
|
|
67
|
-
/**
|
|
68
|
-
* The number of constraint violations that apply to the revert of the changeset. If this count is greater than 0, it will
|
|
69
|
-
* prevent the changeset from being reverted or undone.
|
|
70
|
-
*/
|
|
71
|
-
readonly constraintViolationCountOnRevert?: number;
|
|
72
67
|
readonly builds?: ChangeAtomIdBTree<TreeChunk>;
|
|
73
68
|
readonly destroys?: ChangeAtomIdBTree<number>;
|
|
74
69
|
readonly refreshers?: ChangeAtomIdBTree<TreeChunk>;
|
package/src/index.ts
CHANGED
|
@@ -273,17 +273,21 @@ export {
|
|
|
273
273
|
type NodeSchemaMetadata,
|
|
274
274
|
type SchemaStatics,
|
|
275
275
|
type ITreeAlpha,
|
|
276
|
+
type NoChangeConstraint,
|
|
277
|
+
type NodeInDocumentConstraint,
|
|
278
|
+
type RunTransactionParamsAlpha,
|
|
279
|
+
type RunTransactionParamsBeta,
|
|
280
|
+
type TransactionCallbackStatusAlpha,
|
|
281
|
+
type TransactionCallbackStatusBeta,
|
|
276
282
|
type TransactionConstraint,
|
|
277
283
|
type TransactionConstraintAlpha,
|
|
278
|
-
type
|
|
279
|
-
type NoChangeConstraint,
|
|
280
|
-
type RunTransactionParams,
|
|
281
|
-
type VoidTransactionCallbackStatus,
|
|
282
|
-
type TransactionCallbackStatus,
|
|
283
|
-
type TransactionResult,
|
|
284
|
-
type TransactionResultExt,
|
|
285
|
-
type TransactionResultSuccess,
|
|
284
|
+
type TransactionPostProcessor,
|
|
286
285
|
type TransactionResultFailed,
|
|
286
|
+
type TransactionResultSuccess,
|
|
287
|
+
type TransactionValueResult,
|
|
288
|
+
type TransactionVoidResult,
|
|
289
|
+
type VoidTransactionCallbackStatusAlpha,
|
|
290
|
+
type VoidTransactionCallbackStatusBeta,
|
|
287
291
|
rollback,
|
|
288
292
|
generateSchemaFromSimpleSchema,
|
|
289
293
|
evaluateLazySchema,
|
|
@@ -406,6 +410,7 @@ export { asAlpha, asBeta } from "./api.js";
|
|
|
406
410
|
export {
|
|
407
411
|
TextAsTree,
|
|
408
412
|
FormattedTextAsTree,
|
|
413
|
+
FormattedTextAsTreeDefault,
|
|
409
414
|
codePointCount,
|
|
410
415
|
utf16LengthForCodePoints,
|
|
411
416
|
} from "./text/index.js";
|
package/src/packageVersion.ts
CHANGED
|
@@ -19,9 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
createNodeIdentifierManager,
|
|
21
21
|
fieldBatchCodecBuilder,
|
|
22
|
-
|
|
23
|
-
defaultSchemaPolicy,
|
|
24
|
-
TreeCompressionStrategy,
|
|
22
|
+
FieldBatchDecodingContext,
|
|
25
23
|
defaultIncrementalEncodingPolicy,
|
|
26
24
|
schemaCodecBuilder,
|
|
27
25
|
} from "../feature-libraries/index.js";
|
|
@@ -233,14 +231,11 @@ export function createIndependentTreeAlpha<const TSchema extends ImplicitFieldSc
|
|
|
233
231
|
const fieldBatchCodec = fieldBatchCodecBuilder.buildDecoder(options);
|
|
234
232
|
const newSchema = schemaCodec.decode(options.content.schema);
|
|
235
233
|
|
|
236
|
-
|
|
237
|
-
|
|
234
|
+
// TreeAlpha.exportCompressed encodes this payload in originatorless-safe form
|
|
235
|
+
// (finalized compressed ids or strings), so summary-style decode is correct.
|
|
236
|
+
const context = FieldBatchDecodingContext.forSummary({
|
|
238
237
|
idCompressor,
|
|
239
|
-
|
|
240
|
-
schema: { schema: newSchema, policy: defaultSchemaPolicy },
|
|
241
|
-
// Not a summary blob — this is a synthetic decode of inline content.
|
|
242
|
-
isSummary: false,
|
|
243
|
-
};
|
|
238
|
+
});
|
|
244
239
|
const fieldCursors = fieldBatchCodec.decode(
|
|
245
240
|
options.content.tree as JsonCompatibleReadOnly,
|
|
246
241
|
context,
|
package/src/shared-tree/index.ts
CHANGED
|
@@ -41,11 +41,11 @@ import {
|
|
|
41
41
|
type ReadSchema,
|
|
42
42
|
type UnsafeUnknownSchema,
|
|
43
43
|
type TreeBranchEvents,
|
|
44
|
-
type
|
|
45
|
-
type
|
|
46
|
-
type
|
|
47
|
-
type
|
|
48
|
-
type
|
|
44
|
+
type VoidTransactionCallbackStatusAlpha,
|
|
45
|
+
type TransactionCallbackStatusAlpha,
|
|
46
|
+
type TransactionVoidResult,
|
|
47
|
+
type TransactionValueResult,
|
|
48
|
+
type RunTransactionParamsAlpha,
|
|
49
49
|
HydratedContext,
|
|
50
50
|
SimpleContextSlot,
|
|
51
51
|
areImplicitFieldSchemaEqual,
|
|
@@ -272,40 +272,40 @@ export class SchematizingSimpleTreeView<
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
public runTransaction<TSuccessValue, TFailureValue>(
|
|
275
|
-
transaction: () =>
|
|
276
|
-
params?:
|
|
277
|
-
):
|
|
275
|
+
transaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>,
|
|
276
|
+
params?: RunTransactionParamsAlpha,
|
|
277
|
+
): TransactionValueResult<TSuccessValue, TFailureValue>;
|
|
278
278
|
public runTransaction(
|
|
279
|
-
transaction: () =>
|
|
280
|
-
params?:
|
|
281
|
-
):
|
|
279
|
+
transaction: () => VoidTransactionCallbackStatusAlpha | void,
|
|
280
|
+
params?: RunTransactionParamsAlpha,
|
|
281
|
+
): TransactionVoidResult;
|
|
282
282
|
public runTransaction<TSuccessValue, TFailureValue>(
|
|
283
283
|
transaction: () =>
|
|
284
|
-
|
|
|
285
|
-
|
|
|
284
|
+
| TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>
|
|
285
|
+
| VoidTransactionCallbackStatusAlpha
|
|
286
286
|
| void,
|
|
287
|
-
params?:
|
|
288
|
-
):
|
|
287
|
+
params?: RunTransactionParamsAlpha,
|
|
288
|
+
): TransactionValueResult<TSuccessValue, TFailureValue> | TransactionVoidResult {
|
|
289
289
|
this.ensureUndisposed();
|
|
290
290
|
return this.checkout.runTransaction(transaction, params);
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
public runTransactionAsync<TSuccessValue, TFailureValue>(
|
|
294
|
-
transaction: () => Promise<
|
|
295
|
-
params?:
|
|
296
|
-
): Promise<
|
|
294
|
+
transaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>,
|
|
295
|
+
params?: RunTransactionParamsAlpha,
|
|
296
|
+
): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;
|
|
297
297
|
public runTransactionAsync(
|
|
298
|
-
transaction: () => Promise<
|
|
299
|
-
params?:
|
|
300
|
-
): Promise<
|
|
298
|
+
transaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>,
|
|
299
|
+
params?: RunTransactionParamsAlpha,
|
|
300
|
+
): Promise<TransactionVoidResult>;
|
|
301
301
|
public async runTransactionAsync<TSuccessValue, TFailureValue>(
|
|
302
302
|
transaction: () => Promise<
|
|
303
|
-
|
|
|
304
|
-
|
|
|
303
|
+
| TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>
|
|
304
|
+
| VoidTransactionCallbackStatusAlpha
|
|
305
305
|
| void
|
|
306
306
|
>,
|
|
307
|
-
params:
|
|
308
|
-
): Promise<
|
|
307
|
+
params: RunTransactionParamsAlpha | undefined,
|
|
308
|
+
): Promise<TransactionValueResult<TSuccessValue, TFailureValue> | TransactionVoidResult> {
|
|
309
309
|
this.ensureUndisposed();
|
|
310
310
|
if (this.checkout.transaction.size > 0) {
|
|
311
311
|
// breaker.break() sets brokenBy synchronously before throwing.
|
|
@@ -529,5 +529,9 @@ export class SchematizingSimpleTreeView<
|
|
|
529
529
|
this.checkout.rebaseOnto(context);
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
+
public isMissingEditsFrom(context: TreeBranchAlpha): boolean {
|
|
533
|
+
return this.checkout.isMissingEditsFrom(context);
|
|
534
|
+
}
|
|
535
|
+
|
|
532
536
|
// #endregion Branching
|
|
533
537
|
}
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
IFluidSerializer,
|
|
14
14
|
SharedKernel,
|
|
15
15
|
} from "@fluidframework/shared-object-base/internal";
|
|
16
|
-
import {
|
|
16
|
+
import { type TelemetryLoggerExt, UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
17
17
|
|
|
18
18
|
import {
|
|
19
19
|
type CodecTree,
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
} from "../core/index.js";
|
|
46
46
|
import {
|
|
47
47
|
DetachedFieldIndexSummarizer,
|
|
48
|
+
FieldBatchDecodingContext,
|
|
48
49
|
FieldKinds,
|
|
49
50
|
ForestSummarizer,
|
|
50
51
|
SchemaSummarizer,
|
|
@@ -58,6 +59,7 @@ import {
|
|
|
58
59
|
jsonableTreeFromFieldCursor,
|
|
59
60
|
makeMitigatedChangeFamily,
|
|
60
61
|
makeTreeChunker,
|
|
62
|
+
type FieldBatchEncodingContext,
|
|
61
63
|
type IncrementalEncodingPolicy,
|
|
62
64
|
} from "../feature-libraries/index.js";
|
|
63
65
|
import { schemaCodecBuilder } from "../feature-libraries/index.js";
|
|
@@ -235,24 +237,29 @@ export class SharedTreeKernel
|
|
|
235
237
|
);
|
|
236
238
|
const fieldBatchCodec = fieldBatchCodecBuilder.build(options);
|
|
237
239
|
|
|
238
|
-
const encoderContext = {
|
|
240
|
+
const encoderContext: FieldBatchEncodingContext = {
|
|
239
241
|
schema: {
|
|
240
242
|
schema,
|
|
241
243
|
policy: defaultSchemaPolicy,
|
|
242
244
|
},
|
|
243
245
|
encodeType: options.treeEncodeType,
|
|
244
|
-
originatorId: idCompressor.localSessionId,
|
|
245
246
|
idCompressor,
|
|
246
247
|
// ForestSummarizer is the only consumer of this context, and it
|
|
247
248
|
// only invokes the codec in summary encode / load paths.
|
|
248
249
|
isSummary: true,
|
|
249
|
-
healUnresolvableIdentifiersOnDecode: options.healUnresolvableIdentifiersOnDecode,
|
|
250
|
-
sharedObjectId: sharedObject.id,
|
|
251
250
|
};
|
|
251
|
+
const decoderContext = FieldBatchDecodingContext.forSummary({
|
|
252
|
+
idCompressor,
|
|
253
|
+
healing:
|
|
254
|
+
options.healUnresolvableIdentifiersOnDecode === true
|
|
255
|
+
? { sharedObjectId: sharedObject.id }
|
|
256
|
+
: undefined,
|
|
257
|
+
});
|
|
252
258
|
const forestSummarizer = new ForestSummarizer(
|
|
253
259
|
forest,
|
|
254
260
|
revisionTagCodec,
|
|
255
261
|
encoderContext,
|
|
262
|
+
decoderContext,
|
|
256
263
|
options,
|
|
257
264
|
idCompressor,
|
|
258
265
|
initialSequenceNumber,
|
|
@@ -317,7 +324,6 @@ export class SharedTreeKernel
|
|
|
317
324
|
chunkCompressionStrategy: options.treeEncodeType,
|
|
318
325
|
logger,
|
|
319
326
|
breaker: this.breaker,
|
|
320
|
-
disposeForksAfterTransaction: options.disposeForksAfterTransaction,
|
|
321
327
|
});
|
|
322
328
|
|
|
323
329
|
this.registerSharedBranchForEditing("main", this.checkout);
|
|
@@ -604,6 +610,11 @@ export interface SharedTreeOptionsBeta extends ForestOptions, Partial<CodecWrite
|
|
|
604
610
|
* "Unresolvable" in the public-facing remarks corresponds to non-finalized short IDs persisted without
|
|
605
611
|
* any corresponding context for their originating session. See id-compressor internal documentation
|
|
606
612
|
* for more details.
|
|
613
|
+
*
|
|
614
|
+
* Internally this boolean is translated into {@link IdentifierHealingConfig} once the shared-object
|
|
615
|
+
* id is known (in `SharedTreeCore`'s constructor) and threaded through the codec contexts as a
|
|
616
|
+
* single `healing?` field from there on. The presence/absence of that config is the heal-on/heal-off
|
|
617
|
+
* discriminator inside the codec layer.
|
|
607
618
|
*/
|
|
608
619
|
readonly healUnresolvableIdentifiersOnDecode?: boolean;
|
|
609
620
|
}
|
|
@@ -632,9 +643,7 @@ export interface SharedTreeOptions
|
|
|
632
643
|
|
|
633
644
|
export interface SharedTreeOptionsInternal
|
|
634
645
|
extends SharedTreeOptions,
|
|
635
|
-
Partial<SharedTreeCoreOptionsInternal> {
|
|
636
|
-
disposeForksAfterTransaction?: boolean;
|
|
637
|
-
}
|
|
646
|
+
Partial<SharedTreeCoreOptionsInternal> {}
|
|
638
647
|
|
|
639
648
|
/**
|
|
640
649
|
* Configuration options for SharedTree's internal tree storage.
|
|
@@ -757,7 +766,6 @@ export const defaultSharedTreeOptions: Required<SharedTreeOptionsInternal> = {
|
|
|
757
766
|
minVersionForCollab: FluidClientVersion.v2_0,
|
|
758
767
|
forest: ForestTypeReference,
|
|
759
768
|
treeEncodeType: TreeCompressionStrategy.Compressed,
|
|
760
|
-
disposeForksAfterTransaction: true,
|
|
761
769
|
shouldEncodeIncrementally: defaultIncrementalEncodingPolicy,
|
|
762
770
|
enableSharedBranches: false,
|
|
763
771
|
healUnresolvableIdentifiersOnDecode: false,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ChangeProcessor } from "../shared-tree-core/index.js";
|
|
7
|
+
import type { TransactionPostProcessor } from "../simple-tree/index.js";
|
|
8
|
+
|
|
9
|
+
import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The internal representation of a {@link TransactionPostProcessor}: a {@link ChangeProcessor} over
|
|
13
|
+
* {@link SharedTreeChange}.
|
|
14
|
+
* @remarks This is the (non-type-erased) form used internally to apply a transaction's post-processor.
|
|
15
|
+
*/
|
|
16
|
+
export type TransactionPostProcessorInternal = ChangeProcessor<SharedTreeChange>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Type-erases an internal {@link TransactionPostProcessorInternal | change processor} as a public
|
|
20
|
+
* {@link TransactionPostProcessor}.
|
|
21
|
+
* @remarks This is the only sanctioned way to produce a {@link TransactionPostProcessor}. The inverse conversion is
|
|
22
|
+
* {@link extractTransactionChangeProcessor}.
|
|
23
|
+
*/
|
|
24
|
+
export function createTransactionPostProcessor(
|
|
25
|
+
processor: TransactionPostProcessorInternal,
|
|
26
|
+
): TransactionPostProcessor {
|
|
27
|
+
return processor as unknown as TransactionPostProcessor;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Recovers the internal {@link TransactionPostProcessorInternal | change processor} from a type-erased
|
|
32
|
+
* {@link TransactionPostProcessor}.
|
|
33
|
+
* @remarks This reverses {@link createTransactionPostProcessor}. It is assumed that only code which produces these
|
|
34
|
+
* type-erased handles performs this conversion, allowing them to be treated as opaque elsewhere.
|
|
35
|
+
*/
|
|
36
|
+
export function extractTransactionChangeProcessor(
|
|
37
|
+
postProcessor: TransactionPostProcessor | undefined,
|
|
38
|
+
): TransactionPostProcessorInternal | undefined {
|
|
39
|
+
return postProcessor as unknown as TransactionPostProcessorInternal;
|
|
40
|
+
}
|
|
@@ -952,10 +952,10 @@ export const TreeAlpha: TreeAlpha = {
|
|
|
952
952
|
const context: FieldBatchEncodingContext = {
|
|
953
953
|
encodeType: TreeCompressionStrategy.Compressed,
|
|
954
954
|
idCompressor,
|
|
955
|
-
originatorId: idCompressor.localSessionId, // TODO: Why is this needed?
|
|
956
955
|
schema: { schema: storedSchema, policy: defaultSchemaPolicy },
|
|
957
|
-
//
|
|
958
|
-
|
|
956
|
+
// Encode using summary-style identifier rules so the payload can be decoded
|
|
957
|
+
// without any originator session context.
|
|
958
|
+
isSummary: true,
|
|
959
959
|
};
|
|
960
960
|
const result = codec.encode(batch, context);
|
|
961
961
|
// TODO: codecs should better track which ones can contain handles, and which cannot. When done properly, casts like this can be removed.
|