@fluidframework/tree 2.110.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 +48 -0
- package/api-report/tree.alpha.api.md +48 -31
- package/api-report/tree.beta.api.md +38 -0
- package/api-report/tree.legacy.beta.api.md +38 -0
- 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.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/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/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/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/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/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/index.d.ts +1 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +2 -1
- package/dist/feature-libraries/index.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/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- 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 +5 -5
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +5 -0
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +7 -4
- package/dist/shared-tree/sharedTree.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 +16 -12
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +18 -9
- 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/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/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/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +3 -1
- 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 +74 -7
- 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/snapshotCompatibilityChecker.d.ts +2 -2
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +2 -2
- 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 +86 -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/treeNodeSchema.d.ts +7 -7
- package/dist/simple-tree/core/treeNodeSchema.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/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/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 +1 -0
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +9 -1
- package/dist/util/index.js.map +1 -1
- 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/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/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/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/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 +5 -5
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +5 -0
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +8 -5
- 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 +16 -12
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +18 -9
- 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/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 +3 -1
- 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 +73 -6
- 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 +86 -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/treeNodeSchema.d.ts +7 -7
- package/lib/simple-tree/core/treeNodeSchema.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/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/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 +1 -0
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +1 -0
- package/lib/util/index.js.map +1 -1
- package/package.json +23 -23
- 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/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 +25 -25
- package/src/shared-tree/sharedTree.ts +16 -4
- package/src/shared-tree/transactionPostProcessor.ts +40 -0
- package/src/shared-tree/treeAlpha.ts +3 -3
- package/src/shared-tree/treeCheckout.ts +61 -44
- 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 +141 -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/text/index.ts +1 -0
- package/src/text/textDomainFormatted.ts +520 -415
- package/src/text/textDomainFormattedDefault.ts +150 -0
- package/src/util/compressedIds.ts +216 -0
- package/src/util/index.ts +15 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
enumFromStrings,
|
|
8
|
+
SchemaFactory,
|
|
9
|
+
SchemaFactoryAlpha,
|
|
10
|
+
SchemaFactoryBeta,
|
|
11
|
+
} from "../simple-tree/index.js";
|
|
12
|
+
import type {
|
|
13
|
+
TreeNodeFromImplicitAllowedTypes,
|
|
14
|
+
InsertableTreeNodeFromImplicitAllowedTypes,
|
|
15
|
+
} from "../simple-tree/index.js";
|
|
16
|
+
|
|
17
|
+
import { FormattedTextAsTree } from "./textDomainFormatted.js";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Schema factory for default formatted text types which are not generic.
|
|
21
|
+
*/
|
|
22
|
+
const sf = new SchemaFactoryAlpha("com.fluidframework.text.formatted.default");
|
|
23
|
+
|
|
24
|
+
const defaultFormat = {
|
|
25
|
+
bold: false,
|
|
26
|
+
italic: false,
|
|
27
|
+
underline: false,
|
|
28
|
+
size: 12,
|
|
29
|
+
font: "Arial",
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A collection of text related types, schema and utilities for working with text beyond the basic {@link SchemaStatics.string}.
|
|
34
|
+
* @remarks
|
|
35
|
+
* This is a default parameterization of the generic {@link FormattedTextAsTree} with hard-coded assumptions about what kind of embedded content and what kind of formatting is supported.
|
|
36
|
+
* It is unlikely this meets the needs of most users, but it can serve as an unstable example of how to use the generic {@link FormattedTextAsTree}.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export namespace FormattedTextAsTreeDefault {
|
|
40
|
+
/**
|
|
41
|
+
* Portion of a string with formatting.
|
|
42
|
+
* @sealed
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export type FormattedAtom = FormattedTextAsTree.FormattedAtom<
|
|
46
|
+
CharacterFormat,
|
|
47
|
+
StringAtomContent
|
|
48
|
+
>;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Formatting options for characters.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export class CharacterFormat extends sf.objectAlpha("CharacterFormat", {
|
|
55
|
+
bold: SchemaFactory.boolean,
|
|
56
|
+
italic: SchemaFactory.boolean,
|
|
57
|
+
underline: SchemaFactory.boolean,
|
|
58
|
+
size: SchemaFactory.number,
|
|
59
|
+
font: SchemaFactory.string,
|
|
60
|
+
}) {
|
|
61
|
+
public static readonly defaultFormat = new CharacterFormat(defaultFormat);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Tag with which a line in text can be formatted from HTML.
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
export const LineTag = enumFromStrings(sf.scopedFactory("lineTag"), [
|
|
69
|
+
"h1",
|
|
70
|
+
"h2",
|
|
71
|
+
"h3",
|
|
72
|
+
"h4",
|
|
73
|
+
"h5",
|
|
74
|
+
"li",
|
|
75
|
+
"ol",
|
|
76
|
+
"checked",
|
|
77
|
+
"unchecked",
|
|
78
|
+
"blockquote",
|
|
79
|
+
"codeBlock",
|
|
80
|
+
]);
|
|
81
|
+
/**
|
|
82
|
+
* {@inheritdoc FormattedTextAsTreeDefault.(LineTag:variable)}
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
export type LineTag = TreeNodeFromImplicitAllowedTypes<typeof LineTag.schema>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Unit in the string representing a new line character with line formatting.
|
|
89
|
+
* @remarks
|
|
90
|
+
* This aligns with how Quill represents line formatting.
|
|
91
|
+
* Quill formats line attributes (headers, list, blockquote, etc... ) on the newline character
|
|
92
|
+
* and only lines using this atom can have line-specific formatting.
|
|
93
|
+
* The optional indent level mirrors Quill's indent attribute,
|
|
94
|
+
* which is applies to the line before the line break.
|
|
95
|
+
* Any tagged line can be indented independently.
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
export class StringLineAtom extends sf.object("StringLineAtom", {
|
|
99
|
+
tag: LineTag.schema,
|
|
100
|
+
indent: SchemaFactory.number,
|
|
101
|
+
}) {
|
|
102
|
+
public readonly content = "\n";
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Types of "atoms" that make up the text.
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
export const StringAtomContent = [
|
|
110
|
+
FormattedTextAsTree.StringTextAtom,
|
|
111
|
+
StringLineAtom,
|
|
112
|
+
] as const;
|
|
113
|
+
/**
|
|
114
|
+
* {@inheritdoc FormattedTextAsTreeDefault.(StringAtomContent:variable)}
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
export type StringAtomContent = TreeNodeFromImplicitAllowedTypes<typeof StringAtomContent>;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Statics for text nodes.
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
export type Statics<TTree = Tree> = FormattedTextAsTree.Statics<TTree>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Insertable shape for a formatted text atom used by {@link FormattedTextAsTree.Members.insertWithFormattingAt}.
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
export type FormattedAtomInsertable = FormattedTextAsTree.FormattedAtom<
|
|
130
|
+
InsertableTreeNodeFromImplicitAllowedTypes<typeof CharacterFormat>,
|
|
131
|
+
InsertableTreeNodeFromImplicitAllowedTypes<FormattedTextAtoms>
|
|
132
|
+
>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Helper for expressing the full set of formatted text atoms for a given schema.
|
|
136
|
+
* @privateRemarks
|
|
137
|
+
* Eventually this should probably be given a better name and/or made a system type in a system namespace.
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
export type FormattedTextAtoms = FormattedTextAsTree.FormattedTextAtoms<
|
|
141
|
+
[typeof StringLineAtom]
|
|
142
|
+
>;
|
|
143
|
+
|
|
144
|
+
export class Tree extends FormattedTextAsTree.createSchema(
|
|
145
|
+
new SchemaFactoryBeta("default"),
|
|
146
|
+
CharacterFormat,
|
|
147
|
+
[StringLineAtom],
|
|
148
|
+
defaultFormat,
|
|
149
|
+
) {}
|
|
150
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import type {
|
|
8
|
+
IIdCompressor,
|
|
9
|
+
OpSpaceCompressedId,
|
|
10
|
+
SessionId,
|
|
11
|
+
SessionSpaceCompressedId,
|
|
12
|
+
} from "@fluidframework/id-compressor";
|
|
13
|
+
import { isFinalId, isStableId } from "@fluidframework/id-compressor/internal";
|
|
14
|
+
import { v5 as uuidV5 } from "uuid";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* An encoded identifier that can be decoded without an originator session id.
|
|
18
|
+
* A finalized compressed id — the same numeric value in op-space and session-space.
|
|
19
|
+
* @remarks
|
|
20
|
+
* These are safe to use in contexts where the encoding id compressor is available to decode them,
|
|
21
|
+
* even when the session id of the encoding id compressor is not known.
|
|
22
|
+
*/
|
|
23
|
+
export type OriginatorlessEncodedId = SessionSpaceCompressedId & OpSpaceCompressedId;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* An encoded identifier that may require an originator session id to decode.
|
|
27
|
+
* Any op-space compressed id, either finalized or session-local.
|
|
28
|
+
* @remarks
|
|
29
|
+
* These are only safe to use in contexts where the encoding id compressor is available
|
|
30
|
+
* and the session id of the encoding id compressor is known.
|
|
31
|
+
* Currently the only such case is in ops, excluding attach summary ops.
|
|
32
|
+
*/
|
|
33
|
+
export type OriginatorDependentEncodedId = OpSpaceCompressedId;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Selects how identifiers are encoded for transport/persistence.
|
|
37
|
+
*/
|
|
38
|
+
export enum EncodedIdType {
|
|
39
|
+
/**
|
|
40
|
+
* {@link OriginatorlessEncodedId}.
|
|
41
|
+
*/
|
|
42
|
+
Originatorless,
|
|
43
|
+
/**
|
|
44
|
+
* {@link OriginatorDependentEncodedId}.
|
|
45
|
+
*/
|
|
46
|
+
OriginatorDependent,
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type EncodedId<T extends EncodedIdType> = T extends EncodedIdType.Originatorless
|
|
50
|
+
? OriginatorlessEncodedId
|
|
51
|
+
: T extends EncodedIdType.OriginatorDependent
|
|
52
|
+
? OriginatorDependentEncodedId
|
|
53
|
+
: OriginatorlessEncodedId | OriginatorDependentEncodedId;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Context for encoding identifiers.
|
|
57
|
+
* @remarks
|
|
58
|
+
* See {@link FieldBatchDecodingContext} for the decoder.
|
|
59
|
+
*/
|
|
60
|
+
export interface IdEncodingContext {
|
|
61
|
+
encodePossiblyCompressedId(id: string): string | EncodedId<EncodedIdType>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Encode a string identifier into a possibly compressed form based on the requested mode.
|
|
66
|
+
*
|
|
67
|
+
* @param id - The string identifier to encode.
|
|
68
|
+
* @param idCompressor - The ID compressor to use for compression.
|
|
69
|
+
* @param encodedIdType - The type of encoding to use. If the context doing the decoding will have the originator {@link SessionId},
|
|
70
|
+
* then {@link EncodedIdType.OriginatorDependent} can be used.
|
|
71
|
+
* Otherwise, {@link EncodedIdType.Originatorless} must be used.
|
|
72
|
+
*
|
|
73
|
+
* @privateRemarks
|
|
74
|
+
* Performance:
|
|
75
|
+
* When trying to optimize to avoid unnecessary identifier decompression, and store identifiers compressed in memory,
|
|
76
|
+
* this will likely need to be updated to allow in SessionSpaceCompressedIds.
|
|
77
|
+
*/
|
|
78
|
+
export function encodePossiblyCompressedId<T extends EncodedIdType>(
|
|
79
|
+
id: string,
|
|
80
|
+
idCompressor: IIdCompressor,
|
|
81
|
+
encodedIdType: T,
|
|
82
|
+
): string | EncodedId<T> {
|
|
83
|
+
if (!isStableId(id)) {
|
|
84
|
+
return id;
|
|
85
|
+
}
|
|
86
|
+
const sessionSpaceCompressedId = idCompressor.tryRecompress(id);
|
|
87
|
+
if (sessionSpaceCompressedId === undefined) {
|
|
88
|
+
return id;
|
|
89
|
+
}
|
|
90
|
+
const opSpaceId = idCompressor.normalizeToOpSpace(sessionSpaceCompressedId);
|
|
91
|
+
if (encodedIdType === EncodedIdType.Originatorless) {
|
|
92
|
+
return isFinalId(opSpaceId) ? (opSpaceId as unknown as EncodedId<T>) : id;
|
|
93
|
+
}
|
|
94
|
+
return opSpaceId as unknown as EncodedId<T>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Namespace used for the deterministic UUIDv5 produced by the heal-on-decode workaround
|
|
99
|
+
* in {@link forceDecodeEncodedIdWithoutSession}.
|
|
100
|
+
*
|
|
101
|
+
* This scheme requires consensus across all clients to function — every client that
|
|
102
|
+
* encounters the same unresolvable id must produce the same v5 UUID.
|
|
103
|
+
*/
|
|
104
|
+
const healingNamespace = "f8a89df3-6882-400f-b913-4c1f6f0157bd";
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Decode an {@link OriginatorlessEncodedId} without needing an originator session id.
|
|
108
|
+
*
|
|
109
|
+
* The id is guaranteed to be final by the type contract; it is normalized via
|
|
110
|
+
* {@link IIdCompressor.tryNormalizeToSessionSpaceWithoutSession}, which handles the
|
|
111
|
+
* cluster-aligned-local case rather than relying on the bare numeric value.
|
|
112
|
+
*/
|
|
113
|
+
export function decodeOriginatorlessEncodedId(
|
|
114
|
+
id: OriginatorlessEncodedId,
|
|
115
|
+
idCompressor: IIdCompressor,
|
|
116
|
+
): SessionSpaceCompressedId {
|
|
117
|
+
const sessionSpaceId = idCompressor.tryNormalizeToSessionSpaceWithoutSession(id);
|
|
118
|
+
assert(
|
|
119
|
+
sessionSpaceId !== undefined,
|
|
120
|
+
0xd0a /* OriginatorlessEncodedId must be a finalized compressed id at runtime */,
|
|
121
|
+
);
|
|
122
|
+
return sessionSpaceId;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Decode an {@link OriginatorDependentEncodedId} using a known originator session id.
|
|
127
|
+
*/
|
|
128
|
+
export function decodeEncodedIdWithOriginator(
|
|
129
|
+
id: OriginatorDependentEncodedId,
|
|
130
|
+
originator: SessionId,
|
|
131
|
+
idCompressor: IIdCompressor,
|
|
132
|
+
): SessionSpaceCompressedId {
|
|
133
|
+
return idCompressor.normalizeToSessionSpace(id, originator);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Decode an {@link OriginatorDependentEncodedId} without a session.
|
|
138
|
+
*
|
|
139
|
+
* Returns the session-space id if `id` is finalized (and therefore resolvable
|
|
140
|
+
* without an originator session), or `undefined` if `id` is a non-final op-space
|
|
141
|
+
* id that cannot be resolved without the originator session.
|
|
142
|
+
*/
|
|
143
|
+
export function tryDecodeEncodedIdWithoutSession(
|
|
144
|
+
id: OriginatorDependentEncodedId,
|
|
145
|
+
idCompressor: IIdCompressor,
|
|
146
|
+
): SessionSpaceCompressedId | undefined {
|
|
147
|
+
return idCompressor.tryNormalizeToSessionSpaceWithoutSession(id);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Configuration for the heal-on-decode workaround. The internal counterpart of
|
|
152
|
+
* the user-facing {@link SharedTreeOptionsBeta.healUnresolvableIdentifiersOnDecode}
|
|
153
|
+
* option — see that option for the user-facing rationale and trade-offs.
|
|
154
|
+
*
|
|
155
|
+
* Carried by decode-side contexts (`ChangeEncodingContext.healing`,
|
|
156
|
+
* `EditManagerEncodingContext.healing`, etc.) when the workaround is enabled.
|
|
157
|
+
* Presence enables healing; `undefined` opts out. There is no separate boolean,
|
|
158
|
+
* which makes it impossible to enable healing without supplying the namespace
|
|
159
|
+
* input.
|
|
160
|
+
*/
|
|
161
|
+
export interface IdentifierHealingConfig {
|
|
162
|
+
/**
|
|
163
|
+
* The SharedTree's shared-object id, used as the v5 namespace input so
|
|
164
|
+
* healed UUIDs are unique across attaches of different documents with the
|
|
165
|
+
* same session offsets.
|
|
166
|
+
*/
|
|
167
|
+
readonly sharedObjectId: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Decode an op-space compressed id without a session.
|
|
172
|
+
*
|
|
173
|
+
* Finalized ids are returned as session-space ids (final ids are invariant
|
|
174
|
+
* across the two spaces). Non-final ids are healed via {@link IdentifierHealingConfig}
|
|
175
|
+
* if provided, or cause the resolver to throw otherwise. A healed result is a
|
|
176
|
+
* deterministic v5 UUID string — *not* a `StableId`, since that brand requires
|
|
177
|
+
* v4, but still a valid identifier value; the `string` arm of the return type
|
|
178
|
+
* covers this case.
|
|
179
|
+
*/
|
|
180
|
+
export function forceDecodeEncodedIdWithoutSession(
|
|
181
|
+
id: OpSpaceCompressedId,
|
|
182
|
+
idCompressor: IIdCompressor,
|
|
183
|
+
healing: IdentifierHealingConfig | undefined,
|
|
184
|
+
): SessionSpaceCompressedId | string {
|
|
185
|
+
const decoded = tryDecodeEncodedIdWithoutSession(id, idCompressor);
|
|
186
|
+
if (decoded !== undefined) {
|
|
187
|
+
return decoded;
|
|
188
|
+
}
|
|
189
|
+
// `id` is a non-final op-space compressed id.
|
|
190
|
+
if (healing !== undefined) {
|
|
191
|
+
return uuidV5(`${healing.sharedObjectId}|${id}`, healingNamespace);
|
|
192
|
+
}
|
|
193
|
+
throw new Error(
|
|
194
|
+
"Summary could not be loaded due to an incorrectly encoded identifier. See SharedTreeOptionsBeta.healUnresolvableIdentifiersOnDecode for mitigation.",
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Convert a decoded, but possibly compressed, identifier to the decompressed string format.
|
|
200
|
+
*
|
|
201
|
+
* Session-space compressed ids are decompressed to their UUID representation via the compressor.
|
|
202
|
+
* String inputs pass through unchanged — they are already in the stored form,
|
|
203
|
+
* whether a `StableId` UUID, a heal-synthesized v5 UUID or other arbitrary string identifier.
|
|
204
|
+
*/
|
|
205
|
+
export function decompressIdentifierIfNeeded(
|
|
206
|
+
id: SessionSpaceCompressedId | string,
|
|
207
|
+
idCompressor: Pick<IIdCompressor, "decompress">,
|
|
208
|
+
): string {
|
|
209
|
+
if (typeof id === "string") {
|
|
210
|
+
return id;
|
|
211
|
+
} else {
|
|
212
|
+
const decompressed = idCompressor.decompress(id);
|
|
213
|
+
assert(typeof decompressed === "string", 0xd0b /* Decompressed id must be a string */);
|
|
214
|
+
return decompressed;
|
|
215
|
+
}
|
|
216
|
+
}
|
package/src/util/index.ts
CHANGED
|
@@ -165,3 +165,18 @@ export {
|
|
|
165
165
|
export { cloneWithReplacements } from "./cloneWithReplacements.js";
|
|
166
166
|
|
|
167
167
|
export { readAndParseSnapshotBlob } from "./readSnapshotBlob.js";
|
|
168
|
+
|
|
169
|
+
export {
|
|
170
|
+
type OriginatorlessEncodedId,
|
|
171
|
+
type OriginatorDependentEncodedId,
|
|
172
|
+
type IdentifierHealingConfig,
|
|
173
|
+
EncodedIdType,
|
|
174
|
+
encodePossiblyCompressedId,
|
|
175
|
+
type IdEncodingContext,
|
|
176
|
+
type EncodedId,
|
|
177
|
+
decodeOriginatorlessEncodedId,
|
|
178
|
+
decodeEncodedIdWithOriginator,
|
|
179
|
+
tryDecodeEncodedIdWithoutSession,
|
|
180
|
+
forceDecodeEncodedIdWithoutSession,
|
|
181
|
+
decompressIdentifierIfNeeded,
|
|
182
|
+
} from "./compressedIds.js";
|