@fluidframework/tree 2.110.0 → 2.112.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 +193 -0
- package/api-report/tree.alpha.api.md +96 -36
- package/api-report/tree.beta.api.md +39 -1
- package/api-report/tree.legacy.beta.api.md +39 -1
- package/api-report/tree.legacy.public.api.md +1 -1
- package/api-report/tree.public.api.md +1 -1
- package/dist/componentApi.d.ts +198 -0
- package/dist/componentApi.d.ts.map +1 -0
- package/dist/componentApi.js +138 -0
- package/dist/componentApi.js.map +1 -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 +4 -2
- 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 +1 -20
- 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/chunkDecodingGeneric.d.ts +1 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +73 -28
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +76 -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 +3 -3
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +4 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +1 -0
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +3 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts +25 -0
- package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/minimizeModularChange.js +29 -0
- package/dist/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -0
- 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/schemaChecker.d.ts +22 -3
- package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
- package/dist/feature-libraries/schemaChecker.js +48 -5
- package/dist/feature-libraries/schemaChecker.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- 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 +17 -4
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +15 -12
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +3 -2
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +3 -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 +6 -3
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/serializedChange.d.ts +41 -0
- package/dist/shared-tree/serializedChange.d.ts.map +1 -0
- package/dist/shared-tree/serializedChange.js +87 -0
- package/dist/shared-tree/serializedChange.js.map +1 -0
- package/dist/shared-tree/sharedTree.d.ts +18 -0
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +9 -4
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +7 -0
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +8 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/transactionMinimize.d.ts +35 -0
- package/dist/shared-tree/transactionMinimize.d.ts.map +1 -0
- package/dist/shared-tree/transactionMinimize.js +65 -0
- package/dist/shared-tree/transactionMinimize.js.map +1 -0
- 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 +19 -13
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +54 -71
- 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/editManager.d.ts +6 -3
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +35 -14
- package/dist/shared-tree-core/editManager.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.d.ts +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +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.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +8 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +1 -1
- package/dist/shared-tree-core/messageFormat.js +1 -1
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +10 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.js +1 -0
- package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageTypes.d.ts +1 -0
- package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
- package/dist/shared-tree-core/messageTypes.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +9 -3
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +27 -12
- 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 +88 -7
- package/dist/shared-tree-core/transaction.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +2 -2
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +2 -2
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +9 -24
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js +31 -44
- package/dist/simple-tree/api/schemaCompatibilityTester.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/schemaFactoryAlpha.d.ts +56 -15
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts +0 -3
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +2 -2
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +3 -4
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +1 -2
- package/dist/simple-tree/api/storedSchema.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 +108 -24
- 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/api/typesUnsafe.d.ts +2 -2
- package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.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 +2 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +83 -4
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +39 -0
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.js +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.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/treeFactory.js +1 -1
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/breakable.d.ts +16 -1
- package/dist/util/breakable.d.ts.map +1 -1
- package/dist/util/breakable.js +9 -1
- package/dist/util/breakable.js.map +1 -1
- package/dist/util/compressedIds.d.ts +185 -0
- package/dist/util/compressedIds.d.ts.map +1 -0
- package/dist/util/compressedIds.js +164 -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 +10 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/nestedMap.d.ts.map +1 -1
- package/dist/util/nestedMap.js +16 -3
- package/dist/util/nestedMap.js.map +1 -1
- package/dist/util/nestedSet.d.ts +1 -1
- package/dist/util/nestedSet.d.ts.map +1 -1
- package/dist/util/nestedSet.js.map +1 -1
- package/dist/util/utils.d.ts +0 -6
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +1 -15
- package/dist/util/utils.js.map +1 -1
- package/lib/componentApi.d.ts +198 -0
- package/lib/componentApi.d.ts.map +1 -0
- package/lib/componentApi.js +135 -0
- package/lib/componentApi.js.map +1 -0
- 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 +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 +1 -20
- 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/chunkDecodingGeneric.d.ts +1 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +73 -28
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +75 -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 +3 -3
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +2 -2
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +1 -0
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +1 -0
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts +25 -0
- package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/minimizeModularChange.js +25 -0
- package/lib/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -0
- 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/schemaChecker.d.ts +22 -3
- package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
- package/lib/feature-libraries/schemaChecker.js +48 -5
- package/lib/feature-libraries/schemaChecker.js.map +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -2
- 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 +17 -4
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +13 -10
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +3 -2
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +1 -0
- 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 +7 -4
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/serializedChange.d.ts +41 -0
- package/lib/shared-tree/serializedChange.d.ts.map +1 -0
- package/lib/shared-tree/serializedChange.js +84 -0
- package/lib/shared-tree/serializedChange.js.map +1 -0
- package/lib/shared-tree/sharedTree.d.ts +18 -0
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +10 -5
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +7 -0
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +7 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/transactionMinimize.d.ts +35 -0
- package/lib/shared-tree/transactionMinimize.d.ts.map +1 -0
- package/lib/shared-tree/transactionMinimize.js +62 -0
- package/lib/shared-tree/transactionMinimize.js.map +1 -0
- 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 +19 -13
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +36 -53
- 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/editManager.d.ts +6 -3
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +36 -15
- package/lib/shared-tree-core/editManager.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/editManagerFormatCommons.d.ts +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +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/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js +8 -2
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +1 -1
- package/lib/shared-tree-core/messageFormat.js +1 -1
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +10 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.js +1 -0
- package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageTypes.d.ts +1 -0
- package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
- package/lib/shared-tree-core/messageTypes.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +9 -3
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +28 -13
- 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 +87 -6
- package/lib/shared-tree-core/transaction.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +2 -2
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +1 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +9 -24
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js +29 -42
- package/lib/simple-tree/api/schemaCompatibilityTester.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/schemaFactoryAlpha.d.ts +56 -15
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts +0 -3
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +2 -2
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +4 -5
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +2 -3
- package/lib/simple-tree/api/storedSchema.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 +108 -24
- 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/api/typesUnsafe.d.ts +2 -2
- package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.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 +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +83 -4
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +39 -0
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.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/treeFactory.js +1 -1
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/breakable.d.ts +16 -1
- package/lib/util/breakable.d.ts.map +1 -1
- package/lib/util/breakable.js +9 -1
- package/lib/util/breakable.js.map +1 -1
- package/lib/util/compressedIds.d.ts +185 -0
- package/lib/util/compressedIds.d.ts.map +1 -0
- package/lib/util/compressedIds.js +154 -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/nestedMap.d.ts.map +1 -1
- package/lib/util/nestedMap.js +17 -4
- package/lib/util/nestedMap.js.map +1 -1
- package/lib/util/nestedSet.d.ts +1 -1
- package/lib/util/nestedSet.d.ts.map +1 -1
- package/lib/util/nestedSet.js.map +1 -1
- package/lib/util/utils.d.ts +0 -6
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +0 -13
- package/lib/util/utils.js.map +1 -1
- package/package.json +23 -23
- package/src/componentApi.ts +354 -0
- 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 +15 -8
- package/src/entrypoints/beta.ts +8 -0
- package/src/entrypoints/legacy.ts +8 -0
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +22 -72
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -2
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +110 -41
- 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 +5 -0
- package/src/feature-libraries/modular-schema/index.ts +1 -0
- package/src/feature-libraries/modular-schema/minimizeModularChange.ts +33 -0
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +13 -9
- package/src/feature-libraries/schemaChecker.ts +86 -9
- package/src/index.ts +16 -8
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +40 -15
- package/src/shared-tree/index.ts +4 -0
- package/src/shared-tree/schematizingTreeView.ts +40 -30
- package/src/shared-tree/serializedChange.ts +127 -0
- package/src/shared-tree/sharedTree.ts +32 -4
- package/src/shared-tree/sharedTreeChangeFamily.ts +7 -1
- package/src/shared-tree/transactionMinimize.ts +74 -0
- package/src/shared-tree/transactionPostProcessor.ts +40 -0
- package/src/shared-tree/treeAlpha.ts +3 -3
- package/src/shared-tree/treeCheckout.ts +103 -101
- package/src/shared-tree/unhydratedTreeContext.ts +18 -15
- package/src/shared-tree-core/editManager.ts +42 -6
- 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/editManagerFormatCommons.ts +1 -1
- package/src/shared-tree-core/editManagerSummarizer.ts +5 -9
- package/src/shared-tree-core/index.ts +8 -5
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +8 -1
- package/src/shared-tree-core/messageFormat.ts +1 -1
- package/src/shared-tree-core/messageFormatVSharedBranches.ts +10 -0
- package/src/shared-tree-core/messageTypes.ts +1 -0
- package/src/shared-tree-core/sharedTreeCore.ts +36 -12
- package/src/shared-tree-core/transaction.ts +165 -18
- package/src/simple-tree/api/index.ts +14 -10
- package/src/simple-tree/api/schemaCompatibilityTester.ts +36 -48
- package/src/simple-tree/api/schemaCreationUtilities.ts +3 -3
- package/src/simple-tree/api/schemaFactory.ts +2 -2
- package/src/simple-tree/api/schemaFactoryAlpha.ts +56 -15
- package/src/simple-tree/api/schemaFactoryBeta.ts +0 -3
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +4 -5
- package/src/simple-tree/api/storedSchema.ts +2 -3
- package/src/simple-tree/api/transactionTypes.ts +111 -39
- package/src/simple-tree/api/tree.ts +165 -49
- package/src/simple-tree/api/treeBeta.ts +2 -0
- package/src/simple-tree/api/typesUnsafe.ts +2 -1
- package/src/simple-tree/core/treeNodeSchema.ts +7 -7
- package/src/simple-tree/index.ts +13 -9
- package/src/simple-tree/node-kinds/array/arrayNode.ts +168 -4
- package/src/simple-tree/simpleSchemaFormatV1.ts +1 -1
- package/src/text/index.ts +1 -0
- package/src/text/textDomainFormatted.ts +520 -415
- package/src/text/textDomainFormattedDefault.ts +150 -0
- package/src/treeFactory.ts +1 -1
- package/src/util/breakable.ts +8 -1
- package/src/util/compressedIds.ts +304 -0
- package/src/util/index.ts +18 -1
- package/src/util/nestedMap.ts +21 -4
- package/src/util/nestedSet.ts +1 -1
- package/src/util/utils.ts +0 -18
|
@@ -7,7 +7,7 @@ import { assert } from "@fluidframework/core-utils/internal";
|
|
|
7
7
|
|
|
8
8
|
import type { DiscriminatedUnionDispatcher } from "../../../codec/index.js";
|
|
9
9
|
import type { TreeChunk } from "../../../core/index.js";
|
|
10
|
-
import type { BrandedType } from "../../../util/index.js";
|
|
10
|
+
import type { BrandedType, IdDecodingContext } from "../../../util/index.js";
|
|
11
11
|
|
|
12
12
|
import {
|
|
13
13
|
type ChunkDecoder,
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
getChecked,
|
|
16
16
|
readStream,
|
|
17
17
|
} from "./chunkCodecUtilities.js";
|
|
18
|
-
import type { IdDecodingContext } from "./chunkDecoding.js";
|
|
19
18
|
import type { IncrementalDecoder } from "./codecs.js";
|
|
20
19
|
import type { EncodedFieldBatchGeneric, IdentifierOrIndex } from "./format/index.js";
|
|
21
20
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import type { IIdCompressor
|
|
7
|
+
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
8
8
|
import { lowestMinVersionForCollab } from "@fluidframework/runtime-utils/internal";
|
|
9
9
|
import type { TSchema } from "@sinclair/typebox";
|
|
10
10
|
|
|
@@ -22,7 +22,13 @@ import {
|
|
|
22
22
|
type StoredSchemaCollection,
|
|
23
23
|
type TreeChunk,
|
|
24
24
|
} from "../../../core/index.js";
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
brandedNumberType,
|
|
27
|
+
IdDecodingContext,
|
|
28
|
+
type Brand,
|
|
29
|
+
type IdDecoderOptionsOriginatorless,
|
|
30
|
+
type IdDecoderOptionsWithOriginator,
|
|
31
|
+
} from "../../../util/index.js";
|
|
26
32
|
import { TreeCompressionStrategy } from "../../treeCompressionUtils.js";
|
|
27
33
|
|
|
28
34
|
import { decode } from "./chunkDecoding.js";
|
|
@@ -97,44 +103,116 @@ export interface IncrementalDecoder {
|
|
|
97
103
|
*/
|
|
98
104
|
export interface IncrementalEncoderDecoder extends IncrementalEncoder, IncrementalDecoder {}
|
|
99
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Encode-side context for {@link FieldBatchCodec}.
|
|
108
|
+
*
|
|
109
|
+
* Carries only the data the encoder actually consumes. Originator-session
|
|
110
|
+
* lookup, heal flags, and the incremental *decoder* live on
|
|
111
|
+
* {@link FieldBatchDecodingContext}.
|
|
112
|
+
*/
|
|
100
113
|
export interface FieldBatchEncodingContext {
|
|
101
114
|
readonly encodeType: TreeCompressionStrategy;
|
|
102
115
|
readonly idCompressor: IIdCompressor;
|
|
103
|
-
readonly originatorId: SessionId;
|
|
104
116
|
readonly schema?: SchemaAndPolicy;
|
|
105
117
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
118
|
+
* Encoder for incremental fields. Defined when incremental encoding is
|
|
119
|
+
* supported and enabled.
|
|
108
120
|
*/
|
|
109
|
-
readonly
|
|
121
|
+
readonly incrementalEncoder?: IncrementalEncoder;
|
|
110
122
|
/**
|
|
111
|
-
* `true` when encoding to
|
|
112
|
-
*
|
|
113
|
-
*
|
|
123
|
+
* `true` when encoding to a summary blob. `false` for op-stream encode
|
|
124
|
+
* paths and for utility encoders that aren't tied to a persisted document.
|
|
125
|
+
*
|
|
126
|
+
* @remarks
|
|
127
|
+
* Used by the node encoder to decide whether non-finalized op-space ids
|
|
128
|
+
* can be written into the batch (they can't, for summaries).
|
|
114
129
|
*/
|
|
115
130
|
readonly isSummary: boolean;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Decode-side context for {@link FieldBatchCodec}.
|
|
135
|
+
*
|
|
136
|
+
* Carries the per-call `resolveEncodedId` function that encapsulates the
|
|
137
|
+
* originator-session lookup and (for the forest-summarizer's legacy heal path)
|
|
138
|
+
* the deterministic UUIDv5 synthesis. Heal and originator-session flags live
|
|
139
|
+
* inside that function, not on this context.
|
|
140
|
+
*
|
|
141
|
+
* Constructed via one of the two named static factories — {@link forOp} or
|
|
142
|
+
* {@link forSummary} — depending on the call site's semantics. The constructor
|
|
143
|
+
* is private; there is no general-purpose builder, because the choice between
|
|
144
|
+
* op-style and summary-style decoding is load-bearing (different invariants
|
|
145
|
+
* apply, and bugs in this area are typically the result of conflating them).
|
|
146
|
+
*/
|
|
147
|
+
export class FieldBatchDecodingContext extends IdDecodingContext {
|
|
148
|
+
private constructor(
|
|
149
|
+
private readonly options: IdDecoderOptionsOriginatorless | IdDecoderOptionsWithOriginator,
|
|
150
|
+
/**
|
|
151
|
+
* Decoder for incremental fields. Defined when the encoded batch contains
|
|
152
|
+
* incremental chunks. Only populated on summary-style contexts; op-style
|
|
153
|
+
* contexts always have this undefined.
|
|
154
|
+
*/
|
|
155
|
+
public readonly incrementalDecoder?: IncrementalDecoder,
|
|
156
|
+
) {
|
|
157
|
+
super(options);
|
|
158
|
+
}
|
|
159
|
+
|
|
116
160
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* shipped. Only takes effect when `isSummary` is also `true`.
|
|
125
|
-
* See {@link SharedTreeOptionsBeta.healUnresolvableIdentifiersOnDecode}.
|
|
161
|
+
* Construct a decode context for an op.
|
|
162
|
+
*
|
|
163
|
+
* The originator is the session that produced the encoded form (carried
|
|
164
|
+
* alongside the op envelope by the caller). Heal-on-decode is *not*
|
|
165
|
+
* available — an unresolvable id during op decode indicates a real bug,
|
|
166
|
+
* not a recoverable state, so the resolver throws rather than synthesizing
|
|
167
|
+
* a UUID. Incremental decoding is not used for ops.
|
|
126
168
|
*/
|
|
127
|
-
|
|
169
|
+
public static forOp(options: IdDecoderOptionsWithOriginator): FieldBatchDecodingContext {
|
|
170
|
+
return new FieldBatchDecodingContext(options);
|
|
171
|
+
}
|
|
172
|
+
|
|
128
173
|
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* @
|
|
133
|
-
*
|
|
134
|
-
*
|
|
174
|
+
* Construct a decode context for a summary blob.
|
|
175
|
+
*
|
|
176
|
+
* Summaries must contain only ids resolvable without an originator — either
|
|
177
|
+
* finalized op-space ids, or (when {@link IdentifierHealingConfig} is supplied
|
|
178
|
+
* via `healing`) non-final ids that get healed into deterministic UUIDv5
|
|
179
|
+
* strings. Incremental decoding is attached via {@link withIncrementalDecoder}.
|
|
180
|
+
*
|
|
181
|
+
* @privateRemarks
|
|
182
|
+
* In the future (if adding a summary format which includes the session id),
|
|
183
|
+
* this could allow providing an originator ID to allow for op-space compressed identifiers in attach summaries.
|
|
184
|
+
* Non-attach summaries should only have finalized compressed identifiers (due to only being made by summary clients which never allocate identifiers since they never edit).
|
|
185
|
+
* Since only non-attach summaries can be incremental, incremental summaries should never have non finalized identifiers.
|
|
186
|
+
* `withIncrementalDecoder` has logic to guard against cases which expect session-relative identifiers in incremental chunks,
|
|
187
|
+
* as does the encoding-side assert in the {@link EncoderContext}.
|
|
188
|
+
*/
|
|
189
|
+
public static forSummary(
|
|
190
|
+
options: IdDecoderOptionsOriginatorless | IdDecoderOptionsWithOriginator,
|
|
191
|
+
): FieldBatchDecodingContext {
|
|
192
|
+
return new FieldBatchDecodingContext(options);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Returns a copy of this context with `incrementalDecoder` swapped in. Used by
|
|
197
|
+
* the forest summarizer to attach the per-call incremental builder to a base
|
|
198
|
+
* decode context.
|
|
135
199
|
*/
|
|
136
|
-
|
|
200
|
+
public withIncrementalDecoder(
|
|
201
|
+
incrementalDecoder: IncrementalDecoder,
|
|
202
|
+
): FieldBatchDecodingContext {
|
|
203
|
+
// As different incremental chunks may come from different sessions,
|
|
204
|
+
// for now we simply enforce that we do not provide an originator session ID
|
|
205
|
+
// when we might be dealing with incremental chunks.
|
|
206
|
+
// This mitigates the risk of using incorrect originator session ID identifiers in incremental chunks.
|
|
207
|
+
// See also private remarks on forSummary.
|
|
208
|
+
assert(
|
|
209
|
+
!this.hasOriginatorSessionId,
|
|
210
|
+
0xd0c /* withIncrementalDecoder can only be called on contexts without an originator session ID */,
|
|
211
|
+
);
|
|
212
|
+
return new FieldBatchDecodingContext(this.options, incrementalDecoder);
|
|
213
|
+
}
|
|
137
214
|
}
|
|
215
|
+
|
|
138
216
|
/**
|
|
139
217
|
* @remarks
|
|
140
218
|
* Fields in this batch currently don't have field schema for the root, which limits optimizations.
|
|
@@ -142,7 +220,8 @@ export interface FieldBatchEncodingContext {
|
|
|
142
220
|
export type FieldBatchCodec = VersionDispatchingCodec<
|
|
143
221
|
FieldBatch,
|
|
144
222
|
FieldBatchEncodingContext,
|
|
145
|
-
FieldBatchFormatVersion
|
|
223
|
+
FieldBatchFormatVersion,
|
|
224
|
+
FieldBatchDecodingContext
|
|
146
225
|
>;
|
|
147
226
|
|
|
148
227
|
/**
|
|
@@ -160,7 +239,7 @@ function makeFieldBatchCodecForVersion(
|
|
|
160
239
|
isSummary: boolean,
|
|
161
240
|
) => EncodedFieldBatchV1OrV2,
|
|
162
241
|
encodedFieldBatchType: TSchema,
|
|
163
|
-
): CodecAndSchema<FieldBatch, FieldBatchEncodingContext> {
|
|
242
|
+
): CodecAndSchema<FieldBatch, FieldBatchEncodingContext, FieldBatchDecodingContext> {
|
|
164
243
|
return {
|
|
165
244
|
encode: (
|
|
166
245
|
data: FieldBatch,
|
|
@@ -185,7 +264,7 @@ function makeFieldBatchCodecForVersion(
|
|
|
185
264
|
0xca0 /* Unsupported FieldBatchFormatVersion for incremental encoding; must be v2 or higher */,
|
|
186
265
|
);
|
|
187
266
|
// Incremental encoding is only supported for CompressedIncremental.
|
|
188
|
-
incrementalEncoder = context.
|
|
267
|
+
incrementalEncoder = context.incrementalEncoder;
|
|
189
268
|
}
|
|
190
269
|
// fallthrough
|
|
191
270
|
case TreeCompressionStrategy.Compressed: {
|
|
@@ -216,20 +295,10 @@ function makeFieldBatchCodecForVersion(
|
|
|
216
295
|
},
|
|
217
296
|
decode: (
|
|
218
297
|
data: EncodedFieldBatchV1OrV2,
|
|
219
|
-
context:
|
|
298
|
+
context: FieldBatchDecodingContext,
|
|
220
299
|
): FieldBatch => {
|
|
221
300
|
// TODO: consider checking data is in schema.
|
|
222
|
-
return decode(
|
|
223
|
-
data,
|
|
224
|
-
{
|
|
225
|
-
idCompressor: context.idCompressor,
|
|
226
|
-
originatorId: context.originatorId,
|
|
227
|
-
isSummary: context.isSummary,
|
|
228
|
-
healUnresolvableIdentifiersOnDecode: context.healUnresolvableIdentifiersOnDecode,
|
|
229
|
-
sharedObjectId: context.sharedObjectId,
|
|
230
|
-
},
|
|
231
|
-
context.incrementalEncoderDecoder,
|
|
232
|
-
).map((chunk) => chunk.cursor());
|
|
301
|
+
return decode(data, context, context.incrementalDecoder).map((chunk) => chunk.cursor());
|
|
233
302
|
},
|
|
234
303
|
schema: encodedFieldBatchType,
|
|
235
304
|
};
|
|
@@ -18,7 +18,13 @@ import {
|
|
|
18
18
|
type Value,
|
|
19
19
|
forEachNode,
|
|
20
20
|
} from "../../../core/index.js";
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
EncodedIdType,
|
|
23
|
+
encodePossiblyCompressedId,
|
|
24
|
+
getOrCreate,
|
|
25
|
+
type EncodedId,
|
|
26
|
+
type IdEncodingContext,
|
|
27
|
+
} from "../../../util/index.js";
|
|
22
28
|
|
|
23
29
|
import type { Counter, DeduplicationTable } from "./chunkCodecUtilities.js";
|
|
24
30
|
import {
|
|
@@ -520,7 +526,9 @@ export function encodeValue(
|
|
|
520
526
|
* - Singletons defined in a static scope.
|
|
521
527
|
* - Cached in this object for future reuse such that all equivalent Shapes are deduplicated.
|
|
522
528
|
*/
|
|
523
|
-
export class EncoderContext
|
|
529
|
+
export class EncoderContext
|
|
530
|
+
implements NodeEncodeBuilder, FieldEncodeBuilder, IdEncodingContext
|
|
531
|
+
{
|
|
524
532
|
private readonly nodeEncodersFromSchema: Map<TreeNodeSchemaIdentifier, NodeEncoder> =
|
|
525
533
|
new Map();
|
|
526
534
|
private readonly nestedArrayEncoders: Map<NodeEncoder, NestedArrayEncoder> = new Map();
|
|
@@ -528,7 +536,7 @@ export class EncoderContext implements NodeEncodeBuilder, FieldEncodeBuilder {
|
|
|
528
536
|
private readonly nodeEncoderFromPolicy: NodeEncoderPolicy,
|
|
529
537
|
private readonly fieldEncoderFromPolicy: FieldEncoderPolicy,
|
|
530
538
|
public readonly fieldShapes: ReadonlyMap<FieldKindIdentifier, FieldKindData>,
|
|
531
|
-
|
|
539
|
+
private readonly idCompressor: IIdCompressor,
|
|
532
540
|
/**
|
|
533
541
|
* To be used to encode incremental chunks, if any.
|
|
534
542
|
* @remarks
|
|
@@ -540,7 +548,27 @@ export class EncoderContext implements NodeEncodeBuilder, FieldEncodeBuilder {
|
|
|
540
548
|
* See {@link FieldBatchEncodingContext.isSummary}.
|
|
541
549
|
*/
|
|
542
550
|
public readonly isSummary: boolean,
|
|
543
|
-
) {
|
|
551
|
+
) {
|
|
552
|
+
// Currently we never include originator-dependent identifiers in summaries
|
|
553
|
+
// (there was a bug which violated this for attach-summaries: it has been fixed, see `IdentifierHealingConfig`).
|
|
554
|
+
// If that ever changes (to allow better compressed attach summaries), we need to take special care with incremental summaries.
|
|
555
|
+
// This assert guards against data corruption leaking in via missing session information in incremental summaries,
|
|
556
|
+
// protecting from bugs of potential future optimizations to attach summaries applied to non-attach summaries.
|
|
557
|
+
// Incremental summaries should have no need for originator-dependent identifiers,
|
|
558
|
+
// as they can't be attach summaries which are the only ones which should ever have non-final ids.
|
|
559
|
+
assert(
|
|
560
|
+
isSummary || incrementalEncoder === undefined,
|
|
561
|
+
0xd0d /* incrementalEncoder cannot be used when encoding originator-dependent identifiers */,
|
|
562
|
+
);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
public encodePossiblyCompressedId(id: string): string | EncodedId<EncodedIdType> {
|
|
566
|
+
return encodePossiblyCompressedId(
|
|
567
|
+
id,
|
|
568
|
+
this.idCompressor,
|
|
569
|
+
this.isSummary ? EncodedIdType.Originatorless : EncodedIdType.OriginatorDependent,
|
|
570
|
+
);
|
|
571
|
+
}
|
|
544
572
|
|
|
545
573
|
public nodeEncoderFromSchema(schemaName: TreeNodeSchemaIdentifier): NodeEncoder {
|
|
546
574
|
return getOrCreate(this.nodeEncodersFromSchema, schemaName, () =>
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert, fail } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import { isFinalId, isStableId } from "@fluidframework/id-compressor/internal";
|
|
8
7
|
|
|
9
8
|
import {
|
|
10
9
|
type FieldKey,
|
|
@@ -24,10 +23,11 @@ import {
|
|
|
24
23
|
type NodeEncoder,
|
|
25
24
|
encodeValue,
|
|
26
25
|
} from "./compressedEncode.js";
|
|
27
|
-
import
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
import {
|
|
27
|
+
SpecialField,
|
|
28
|
+
type EncodedChunkShape,
|
|
29
|
+
type EncodedFieldShape,
|
|
30
|
+
type EncodedValueShape,
|
|
31
31
|
} from "./format/index.js";
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -69,21 +69,9 @@ export class NodeShapeBasedEncoder extends Shape<EncodedChunkShape> implements N
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
private getValueToEncode(cursor: ITreeCursorSynchronous, context: EncoderContext): Value {
|
|
72
|
-
if (this.value ===
|
|
72
|
+
if (this.value === SpecialField.Identifier) {
|
|
73
73
|
assert(typeof cursor.value === "string", 0x9aa /* identifier must be type string */);
|
|
74
|
-
|
|
75
|
-
const sessionSpaceCompressedId = context.idCompressor.tryRecompress(cursor.value);
|
|
76
|
-
if (sessionSpaceCompressedId !== undefined) {
|
|
77
|
-
const opSpaceId = context.idCompressor.normalizeToOpSpace(sessionSpaceCompressedId);
|
|
78
|
-
// Summaries can only contain finalized op-space ids unless they also include the originator's session id somewhere.
|
|
79
|
-
// This is not the case for forest summaries at the time of writing, so non-finalized ids are instead written using
|
|
80
|
-
// their long form (by falling through to the original cursor value).
|
|
81
|
-
// A scenario where such ids can appear in the summary is in the attach summary of a tree being attached to an already-attached container.
|
|
82
|
-
if (!context.isSummary || isFinalId(opSpaceId)) {
|
|
83
|
-
return opSpaceId;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
74
|
+
return context.encodePossiblyCompressedId(cursor.value);
|
|
87
75
|
}
|
|
88
76
|
return cursor.value;
|
|
89
77
|
}
|
|
@@ -20,7 +20,10 @@ export {
|
|
|
20
20
|
type FieldBatch,
|
|
21
21
|
type FieldBatchCodec,
|
|
22
22
|
fieldBatchCodecBuilder,
|
|
23
|
+
FieldBatchDecodingContext,
|
|
23
24
|
type FieldBatchEncodingContext,
|
|
25
|
+
type IncrementalDecoder,
|
|
26
|
+
type IncrementalEncoder,
|
|
24
27
|
type IncrementalEncoderDecoder,
|
|
25
28
|
type ChunkReferenceId,
|
|
26
29
|
type IncrementalEncodingPolicy,
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
import type { FieldKey, ITreeCursorSynchronous } from "../../core/index.js";
|
|
17
17
|
import {
|
|
18
18
|
fieldBatchCodecBuilder,
|
|
19
|
+
type FieldBatchDecodingContext,
|
|
19
20
|
type FieldBatchEncodingContext,
|
|
20
21
|
} from "../chunked-forest/index.js";
|
|
21
22
|
|
|
@@ -28,13 +29,14 @@ export type FieldSet = ReadonlyMap<FieldKey, ITreeCursorSynchronous>;
|
|
|
28
29
|
export type ForestCodec = VersionDispatchingCodec<
|
|
29
30
|
FieldSet,
|
|
30
31
|
FieldBatchEncodingContext,
|
|
31
|
-
ForestFormatVersion
|
|
32
|
+
ForestFormatVersion,
|
|
33
|
+
FieldBatchDecodingContext
|
|
32
34
|
>;
|
|
33
35
|
|
|
34
36
|
function makeForestSummarizerCodec(
|
|
35
37
|
options: CodecWriteOptions,
|
|
36
38
|
version: ForestFormatVersion,
|
|
37
|
-
): CodecAndSchema<FieldSet, FieldBatchEncodingContext> {
|
|
39
|
+
): CodecAndSchema<FieldSet, FieldBatchEncodingContext, FieldBatchDecodingContext> {
|
|
38
40
|
// Performance: Since multiple places (including multiple versions of this codec) use the field batch codec,
|
|
39
41
|
// we may end up with multiple copies of it, including compiling its format validation multiple times.
|
|
40
42
|
// This is not ideal, but is not too bad as it is a small fixed number of copies and thus should not be too expensive.
|
|
@@ -55,7 +57,7 @@ function makeForestSummarizerCodec(
|
|
|
55
57
|
version,
|
|
56
58
|
};
|
|
57
59
|
},
|
|
58
|
-
decode: (data: FormatCommon, context:
|
|
60
|
+
decode: (data: FormatCommon, context: FieldBatchDecodingContext): FieldSet => {
|
|
59
61
|
const out: Map<FieldKey, ITreeCursorSynchronous> = new Map();
|
|
60
62
|
const fields = fieldBatchCodec.decode(data.fields, context);
|
|
61
63
|
assert(data.keys.length === fields.length, 0x891 /* mismatched lengths */);
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
import { chunkFieldSingle, defaultChunkPolicy } from "../chunked-forest/chunkTree.js";
|
|
42
42
|
import {
|
|
43
43
|
defaultIncrementalEncodingPolicy,
|
|
44
|
+
type FieldBatchDecodingContext,
|
|
44
45
|
type FieldBatchEncodingContext,
|
|
45
46
|
type IncrementalEncodingPolicy,
|
|
46
47
|
} from "../chunked-forest/index.js";
|
|
@@ -80,6 +81,7 @@ export class ForestSummarizer
|
|
|
80
81
|
private readonly forest: IEditableForest,
|
|
81
82
|
private readonly revisionTagCodec: RevisionTagCodec,
|
|
82
83
|
private readonly encoderContext: FieldBatchEncodingContext,
|
|
84
|
+
private readonly decoderContext: FieldBatchDecodingContext,
|
|
83
85
|
options: CodecWriteOptions,
|
|
84
86
|
private readonly idCompressor: IIdCompressor,
|
|
85
87
|
initialSequenceNumber: number,
|
|
@@ -160,7 +162,7 @@ export class ForestSummarizer
|
|
|
160
162
|
});
|
|
161
163
|
const encoderContext: FieldBatchEncodingContext = {
|
|
162
164
|
...this.encoderContext,
|
|
163
|
-
|
|
165
|
+
incrementalEncoder:
|
|
164
166
|
incrementalSummaryBehavior === ForestIncrementalSummaryBehavior.Incremental
|
|
165
167
|
? this.incrementalSummaryBuilder
|
|
166
168
|
: undefined,
|
|
@@ -212,10 +214,7 @@ export class ForestSummarizer
|
|
|
212
214
|
parse,
|
|
213
215
|
// TODO: this type cast assumes there are no handles, which should probably be enforced at runtime or the need for this cast should be removed altogether.
|
|
214
216
|
)) as JsonCompatibleReadOnly,
|
|
215
|
-
|
|
216
|
-
...this.encoderContext,
|
|
217
|
-
incrementalEncoderDecoder: this.incrementalSummaryBuilder,
|
|
218
|
-
},
|
|
217
|
+
this.decoderContext.withIncrementalDecoder(this.incrementalSummaryBuilder),
|
|
219
218
|
);
|
|
220
219
|
const allocator = idAllocatorFromMaxId();
|
|
221
220
|
const fieldChanges: [FieldKey, DeltaFieldChanges][] = [];
|
|
@@ -93,6 +93,7 @@ export {
|
|
|
93
93
|
isNeverTree,
|
|
94
94
|
DefaultRevisionReplacer,
|
|
95
95
|
ModularChangeFormatVersion,
|
|
96
|
+
minimizeModularChangeset,
|
|
96
97
|
} from "./modular-schema/index.js";
|
|
97
98
|
|
|
98
99
|
export { mapRootChanges } from "./deltaUtils.js";
|
|
@@ -109,11 +110,14 @@ export {
|
|
|
109
110
|
FieldBatchFormatVersion,
|
|
110
111
|
makeTreeChunker,
|
|
111
112
|
fieldBatchCodecBuilder,
|
|
113
|
+
FieldBatchDecodingContext,
|
|
112
114
|
type FieldBatchEncodingContext,
|
|
113
115
|
emptyChunk,
|
|
114
116
|
combineChunks,
|
|
115
117
|
type IncrementalEncodingPolicy,
|
|
116
118
|
defaultIncrementalEncodingPolicy,
|
|
119
|
+
type IncrementalDecoder,
|
|
120
|
+
type IncrementalEncoder,
|
|
117
121
|
} from "./chunked-forest/index.js";
|
|
118
122
|
|
|
119
123
|
export {
|
|
@@ -146,6 +150,7 @@ export {
|
|
|
146
150
|
|
|
147
151
|
export {
|
|
148
152
|
SchemaValidationError,
|
|
153
|
+
type SchemaValidationErrorContext,
|
|
149
154
|
isNodeInSchema,
|
|
150
155
|
isFieldInSchema,
|
|
151
156
|
throwOutOfSchema,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { FieldKindIdentifier } from "../../core/index.js";
|
|
7
|
+
|
|
8
|
+
import type { FlexFieldKind } from "./fieldKind.js";
|
|
9
|
+
import type { ModularChangeset } from "./modularChangeTypes.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* "Minimizes" a {@link ModularChangeset} so that it contains no extraneous
|
|
13
|
+
* information, i.e. no new content that isn't observable from document tree
|
|
14
|
+
* and no edits without net observed effect on the document tree.
|
|
15
|
+
* @remarks
|
|
16
|
+
* "Extraneous information" includes, for example, data for nodes that were both created and removed within the same
|
|
17
|
+
* transaction, or changes whose effects cancel out to nothing. Minimizing reduces the size of an edit without altering
|
|
18
|
+
* its observable effect.
|
|
19
|
+
*
|
|
20
|
+
* This is the eventual home of the minimization algorithm, colocated with {@link ModularChangeFamily} so it can use its
|
|
21
|
+
* internals. It is currently a no-op that returns the change unchanged; a real implementation will be provided in a
|
|
22
|
+
* future change.
|
|
23
|
+
*
|
|
24
|
+
* @param change - The change to minimize.
|
|
25
|
+
* @param fieldKinds - The field kinds to delegate to when computing the change's delta.
|
|
26
|
+
*/
|
|
27
|
+
export function minimizeModularChangeset(
|
|
28
|
+
change: ModularChangeset,
|
|
29
|
+
fieldKinds: ReadonlyMap<FieldKindIdentifier, FlexFieldKind>,
|
|
30
|
+
): ModularChangeset {
|
|
31
|
+
// TODO: Actually minimize the change. For now this is a no-op that returns the change unchanged.
|
|
32
|
+
return change;
|
|
33
|
+
}
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
import { newChangeAtomIdBTree, type ChangeAtomIdBTree } from "../changeAtomIdBTree.js";
|
|
36
36
|
import {
|
|
37
37
|
type FieldBatchCodec,
|
|
38
|
+
FieldBatchDecodingContext,
|
|
38
39
|
type TreeChunk,
|
|
39
40
|
chunkFieldSingle,
|
|
40
41
|
defaultChunkPolicy,
|
|
@@ -328,7 +329,6 @@ export function encodeDetachedNodes(
|
|
|
328
329
|
trees: fieldsCodec.encode(treesToEncode, {
|
|
329
330
|
encodeType: chunkCompressionStrategy,
|
|
330
331
|
schema: context.schema,
|
|
331
|
-
originatorId: context.originatorId,
|
|
332
332
|
idCompressor: context.idCompressor,
|
|
333
333
|
isSummary: context.isSummary,
|
|
334
334
|
}),
|
|
@@ -350,14 +350,18 @@ export function decodeDetachedNodes(
|
|
|
350
350
|
return undefined;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
const chunks = fieldsCodec.decode(
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
353
|
+
const chunks = fieldsCodec.decode(
|
|
354
|
+
encoded.trees,
|
|
355
|
+
context.isSummary
|
|
356
|
+
? FieldBatchDecodingContext.forSummary({
|
|
357
|
+
idCompressor: context.idCompressor,
|
|
358
|
+
healing: context.healing,
|
|
359
|
+
})
|
|
360
|
+
: FieldBatchDecodingContext.forOp({
|
|
361
|
+
idCompressor: context.idCompressor,
|
|
362
|
+
originatorId: context.originatorId,
|
|
363
|
+
}),
|
|
364
|
+
);
|
|
361
365
|
const getChunk = (index: number): TreeChunk => {
|
|
362
366
|
assert(index < chunks.length, 0x898 /* out of bounds index for build chunk */);
|
|
363
367
|
return chunkFieldSingle(chunks[index] ?? oob(), {
|