@fluidframework/tree 2.53.0 → 2.60.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/.eslintrc.cjs +0 -19
- package/.mocharc.customBenchmarks.cjs +1 -9
- package/CHANGELOG.md +56 -0
- package/api-report/tree.alpha.api.md +50 -36
- package/api-report/tree.beta.api.md +15 -1
- package/api-report/{tree.legacy.alpha.api.md → tree.legacy.beta.api.md} +5 -5
- package/api-report/tree.legacy.public.api.md +1 -1
- package/api-report/tree.public.api.md +1 -1
- package/dist/alpha.d.ts +8 -2
- package/dist/beta.d.ts +3 -0
- package/dist/codec/codec.d.ts +43 -6
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +22 -2
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/index.d.ts +1 -1
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +4 -1
- package/dist/codec/index.js.map +1 -1
- package/dist/external-utilities/index.d.ts +1 -1
- package/dist/external-utilities/index.d.ts.map +1 -1
- package/dist/external-utilities/index.js +2 -1
- package/dist/external-utilities/index.js.map +1 -1
- package/dist/external-utilities/typeboxValidator.d.ts +6 -1
- package/dist/external-utilities/typeboxValidator.d.ts.map +1 -1
- package/dist/external-utilities/typeboxValidator.js +7 -1
- package/dist/external-utilities/typeboxValidator.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +10 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +28 -5
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +19 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +10 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +59 -4
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +9 -2
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +46 -8
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +91 -16
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +14 -0
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +10 -1
- package/dist/feature-libraries/chunked-forest/codec/format.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.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +8 -3
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +17 -6
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.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.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +3 -0
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +13 -8
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +76 -38
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +178 -0
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +322 -0
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -0
- package/dist/feature-libraries/forest-summary/index.d.ts +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/index.js +2 -1
- package/dist/feature-libraries/forest-summary/index.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/modularChangeCodecs.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +6 -9
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/treeCompressionUtils.d.ts +15 -0
- package/dist/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
- package/dist/feature-libraries/treeCompressionUtils.js +16 -1
- package/dist/feature-libraries/treeCompressionUtils.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/jsonDomainSchema.d.ts +1 -1
- package/dist/jsonDomainSchema.d.ts.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/schematizingTreeView.d.ts +1 -1
- 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 +23 -6
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +4 -1
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/tree.d.ts.map +1 -1
- package/dist/shared-tree/tree.js +3 -0
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +9 -11
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +2 -2
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +13 -0
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/sharedTreeAttributes.d.ts +2 -2
- package/dist/sharedTreeAttributes.js +2 -2
- package/dist/sharedTreeAttributes.js.map +1 -1
- package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/conciseTree.js +1 -1
- package/dist/simple-tree/api/conciseTree.js.map +1 -1
- package/dist/simple-tree/api/customTree.d.ts +39 -11
- package/dist/simple-tree/api/customTree.d.ts.map +1 -1
- package/dist/simple-tree/api/customTree.js +79 -19
- package/dist/simple-tree/api/customTree.js.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts +7 -2
- package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.js +1 -0
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +2 -1
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +4 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +9 -6
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +8 -7
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +13 -17
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +21 -25
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts +20 -0
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -0
- package/dist/simple-tree/api/schemaFactoryBeta.js +26 -0
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -0
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +0 -2
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +6 -3
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/transactionTypes.d.ts +1 -0
- 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 +68 -74
- 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/verboseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/verboseTree.js +3 -3
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts +6 -0
- package/dist/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -1
- package/dist/simple-tree/core/simpleNodeSchemaBase.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +3 -4
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js +0 -3
- package/dist/simple-tree/fieldSchema.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 +4 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +2 -3
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +12 -0
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts +0 -3
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +0 -3
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/tableSchema.d.ts +11 -80
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +200 -117
- package/dist/tableSchema.js.map +1 -1
- package/dist/treeFactory.d.ts +1 -2
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +1 -2
- package/dist/treeFactory.js.map +1 -1
- package/lib/alpha.d.ts +8 -2
- package/lib/beta.d.ts +3 -0
- package/lib/codec/codec.d.ts +43 -6
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +19 -1
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/index.d.ts +1 -1
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.js.map +1 -1
- package/lib/external-utilities/index.d.ts +1 -1
- package/lib/external-utilities/index.d.ts.map +1 -1
- package/lib/external-utilities/index.js +1 -1
- package/lib/external-utilities/index.js.map +1 -1
- package/lib/external-utilities/typeboxValidator.d.ts +6 -1
- package/lib/external-utilities/typeboxValidator.d.ts.map +1 -1
- package/lib/external-utilities/typeboxValidator.js +6 -0
- package/lib/external-utilities/typeboxValidator.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +10 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +27 -5
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +19 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +10 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +59 -4
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +10 -3
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +46 -8
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +87 -14
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +14 -0
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +9 -0
- package/lib/feature-libraries/chunked-forest/codec/format.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.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +8 -3
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +18 -7
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.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.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +3 -0
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +13 -8
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +75 -37
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +178 -0
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +318 -0
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -0
- package/lib/feature-libraries/forest-summary/index.d.ts +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/index.js +1 -1
- package/lib/feature-libraries/forest-summary/index.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/modularChangeCodecs.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +3 -3
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +6 -9
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/treeCompressionUtils.d.ts +15 -0
- package/lib/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
- package/lib/feature-libraries/treeCompressionUtils.js +15 -0
- package/lib/feature-libraries/treeCompressionUtils.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/jsonDomainSchema.d.ts +1 -1
- package/lib/jsonDomainSchema.d.ts.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/schematizingTreeView.d.ts +1 -1
- 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 +23 -6
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +4 -1
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/tree.d.ts.map +1 -1
- package/lib/shared-tree/tree.js +3 -0
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +9 -11
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +2 -2
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +13 -0
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/sharedTreeAttributes.d.ts +2 -2
- package/lib/sharedTreeAttributes.js +2 -2
- package/lib/sharedTreeAttributes.js.map +1 -1
- package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/conciseTree.js +2 -2
- package/lib/simple-tree/api/conciseTree.js.map +1 -1
- package/lib/simple-tree/api/customTree.d.ts +39 -11
- package/lib/simple-tree/api/customTree.d.ts.map +1 -1
- package/lib/simple-tree/api/customTree.js +79 -19
- package/lib/simple-tree/api/customTree.js.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts +7 -2
- package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.js +1 -0
- package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +2 -1
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +2 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +9 -6
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +6 -6
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +13 -17
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +22 -26
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts +20 -0
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -0
- package/lib/simple-tree/api/schemaFactoryBeta.js +22 -0
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -0
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +0 -2
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +6 -3
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/transactionTypes.d.ts +1 -0
- 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 +68 -74
- 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/verboseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/verboseTree.js +4 -4
- package/lib/simple-tree/api/verboseTree.js.map +1 -1
- package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts +6 -0
- package/lib/simple-tree/core/simpleNodeSchemaBase.d.ts.map +1 -1
- package/lib/simple-tree/core/simpleNodeSchemaBase.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +3 -4
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js +0 -3
- package/lib/simple-tree/fieldSchema.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/record/recordNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +2 -3
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +12 -0
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts +0 -3
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +0 -3
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/tableSchema.d.ts +11 -80
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +201 -118
- package/lib/tableSchema.js.map +1 -1
- package/lib/treeFactory.d.ts +1 -2
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +1 -2
- package/lib/treeFactory.js.map +1 -1
- package/package.json +22 -22
- package/src/codec/codec.ts +52 -7
- package/src/codec/index.ts +4 -0
- package/src/external-utilities/index.ts +1 -1
- package/src/external-utilities/typeboxValidator.ts +7 -1
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +38 -4
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +10 -3
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +96 -8
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +123 -19
- package/src/feature-libraries/chunked-forest/codec/format.ts +11 -0
- package/src/feature-libraries/chunked-forest/codec/index.ts +4 -0
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +28 -3
- package/src/feature-libraries/chunked-forest/index.ts +2 -0
- package/src/feature-libraries/forest-summary/codec.ts +3 -0
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +118 -50
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +511 -0
- package/src/feature-libraries/forest-summary/index.ts +1 -1
- package/src/feature-libraries/index.ts +5 -1
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +8 -4
- package/src/feature-libraries/treeCompressionUtils.ts +19 -0
- package/src/index.ts +6 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/schematizingTreeView.ts +1 -1
- package/src/shared-tree/sharedTree.ts +37 -4
- package/src/shared-tree/sharedTreeChangeFamily.ts +2 -2
- package/src/shared-tree/tree.ts +3 -0
- package/src/shared-tree/treeAlpha.ts +10 -11
- package/src/shared-tree/treeCheckout.ts +2 -2
- package/src/shared-tree-core/sharedTreeCore.ts +17 -0
- package/src/sharedTreeAttributes.ts +2 -2
- package/src/simple-tree/api/conciseTree.ts +2 -1
- package/src/simple-tree/api/customTree.ts +102 -32
- package/src/simple-tree/api/getJsonSchema.ts +7 -2
- package/src/simple-tree/api/index.ts +3 -0
- package/src/simple-tree/api/schemaCreationUtilities.ts +1 -1
- package/src/simple-tree/api/schemaFactory.ts +21 -14
- package/src/simple-tree/api/schemaFactoryAlpha.ts +29 -30
- package/src/simple-tree/api/schemaFactoryBeta.ts +28 -0
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +7 -3
- package/src/simple-tree/api/transactionTypes.ts +1 -0
- package/src/simple-tree/api/tree.ts +75 -81
- package/src/simple-tree/api/verboseTree.ts +42 -39
- package/src/simple-tree/core/simpleNodeSchemaBase.ts +6 -0
- package/src/simple-tree/fieldSchema.ts +3 -4
- package/src/simple-tree/index.ts +3 -0
- package/src/simple-tree/node-kinds/record/recordNode.ts +2 -3
- package/src/simple-tree/simpleSchema.ts +12 -0
- package/src/simple-tree/toStoredSchema.ts +0 -3
- package/src/tableSchema.ts +261 -243
- package/src/treeFactory.ts +1 -2
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
ValueSchema,
|
|
17
17
|
Multiplicity,
|
|
18
18
|
identifierFieldKindIdentifier,
|
|
19
|
+
type FieldKey,
|
|
19
20
|
} from "../../../core/index.js";
|
|
20
21
|
import type { FullSchemaPolicy } from "../../modular-schema/index.js";
|
|
21
22
|
|
|
@@ -28,13 +29,19 @@ import {
|
|
|
28
29
|
anyNodeEncoder,
|
|
29
30
|
asFieldEncoder,
|
|
30
31
|
compressedEncode,
|
|
32
|
+
incrementalFieldEncoder,
|
|
31
33
|
} from "./compressedEncode.js";
|
|
32
34
|
import type { FieldBatch } from "./fieldBatch.js";
|
|
33
35
|
import { type EncodedFieldBatch, type EncodedValueShape, SpecialField } from "./format.js";
|
|
36
|
+
import type { IncrementalEncoder } from "./codecs.js";
|
|
34
37
|
import { NodeShapeBasedEncoder } from "./nodeEncoder.js";
|
|
35
38
|
|
|
36
39
|
/**
|
|
37
40
|
* Encode data from `fieldBatch` in into an `EncodedChunk`.
|
|
41
|
+
* @remarks
|
|
42
|
+
* If `incrementalEncoder` is provided,
|
|
43
|
+
* fields that support incremental encoding will encode their chunks separately via the `incrementalEncoder`.
|
|
44
|
+
* See {@link IncrementalEncoder} for more details.
|
|
38
45
|
*
|
|
39
46
|
* Optimized for encoded size and encoding performance.
|
|
40
47
|
* TODO: This function should eventually also take in the root FieldSchema to more efficiently compress the nodes.
|
|
@@ -44,22 +51,28 @@ export function schemaCompressedEncode(
|
|
|
44
51
|
policy: FullSchemaPolicy,
|
|
45
52
|
fieldBatch: FieldBatch,
|
|
46
53
|
idCompressor: IIdCompressor,
|
|
54
|
+
incrementalEncoder?: IncrementalEncoder,
|
|
47
55
|
): EncodedFieldBatch {
|
|
48
|
-
return compressedEncode(
|
|
56
|
+
return compressedEncode(
|
|
57
|
+
fieldBatch,
|
|
58
|
+
buildContext(schema, policy, idCompressor, incrementalEncoder),
|
|
59
|
+
);
|
|
49
60
|
}
|
|
50
61
|
|
|
51
62
|
export function buildContext(
|
|
52
63
|
storedSchema: StoredSchemaCollection,
|
|
53
64
|
policy: FullSchemaPolicy,
|
|
54
65
|
idCompressor: IIdCompressor,
|
|
66
|
+
incrementalEncoder?: IncrementalEncoder,
|
|
55
67
|
): EncoderContext {
|
|
56
68
|
const context: EncoderContext = new EncoderContext(
|
|
57
69
|
(fieldBuilder: FieldEncodeBuilder, schemaName: TreeNodeSchemaIdentifier) =>
|
|
58
|
-
getNodeEncoder(fieldBuilder, storedSchema, schemaName),
|
|
70
|
+
getNodeEncoder(fieldBuilder, storedSchema, schemaName, incrementalEncoder),
|
|
59
71
|
(nodeBuilder: NodeEncodeBuilder, fieldSchema: TreeFieldStoredSchema) =>
|
|
60
72
|
getFieldEncoder(nodeBuilder, fieldSchema, context, storedSchema),
|
|
61
73
|
policy.fieldKinds,
|
|
62
74
|
idCompressor,
|
|
75
|
+
incrementalEncoder,
|
|
63
76
|
);
|
|
64
77
|
return context;
|
|
65
78
|
}
|
|
@@ -111,6 +124,7 @@ export function getNodeEncoder(
|
|
|
111
124
|
fieldBuilder: FieldEncodeBuilder,
|
|
112
125
|
storedSchema: StoredSchemaCollection,
|
|
113
126
|
schemaName: TreeNodeSchemaIdentifier,
|
|
127
|
+
incrementalEncoder?: IncrementalEncoder,
|
|
114
128
|
): NodeShapeBasedEncoder {
|
|
115
129
|
const schema =
|
|
116
130
|
storedSchema.nodeSchema.get(schemaName) ?? fail(0xb53 /* missing node schema */);
|
|
@@ -120,9 +134,20 @@ export function getNodeEncoder(
|
|
|
120
134
|
// consider moving some optional and sequence fields to extra fields if they are commonly empty
|
|
121
135
|
// to reduce encoded size.
|
|
122
136
|
|
|
137
|
+
const shouldEncodeFieldIncrementallyLocal = (
|
|
138
|
+
nodeIdentifier: TreeNodeSchemaIdentifier,
|
|
139
|
+
fieldKey: FieldKey,
|
|
140
|
+
): boolean =>
|
|
141
|
+
incrementalEncoder?.shouldEncodeFieldIncrementally(nodeIdentifier, fieldKey) ?? false;
|
|
123
142
|
const objectNodeFields: KeyedFieldEncoder[] = [];
|
|
124
143
|
for (const [key, field] of schema.objectNodeFields ?? []) {
|
|
125
|
-
|
|
144
|
+
const fieldEncoder = shouldEncodeFieldIncrementallyLocal(schemaName, key)
|
|
145
|
+
? incrementalFieldEncoder
|
|
146
|
+
: fieldBuilder.fieldEncoderFromSchema(field);
|
|
147
|
+
objectNodeFields.push({
|
|
148
|
+
key,
|
|
149
|
+
encoder: fieldEncoder,
|
|
150
|
+
});
|
|
126
151
|
}
|
|
127
152
|
|
|
128
153
|
const shape = new NodeShapeBasedEncoder(schemaName, false, objectNodeFields, undefined);
|
|
@@ -26,6 +26,9 @@ export function makeForestSummarizerCodec(
|
|
|
26
26
|
fieldBatchCodec: FieldBatchCodec,
|
|
27
27
|
): ForestCodec {
|
|
28
28
|
const inner = fieldBatchCodec;
|
|
29
|
+
// TODO: AB#41865
|
|
30
|
+
// This needs to be updated to support multiple versions.
|
|
31
|
+
// The second version will be used to enable incremental summarization.
|
|
29
32
|
return makeVersionedValidatedCodec(options, new Set([1]), Format, {
|
|
30
33
|
encode: (data: FieldSet, context: FieldBatchEncodingContext): Format => {
|
|
31
34
|
const keys: FieldKey[] = [];
|
|
@@ -12,7 +12,6 @@ import type {
|
|
|
12
12
|
ISummaryTreeWithStats,
|
|
13
13
|
ITelemetryContext,
|
|
14
14
|
} from "@fluidframework/runtime-definitions/internal";
|
|
15
|
-
import { createSingleBlobSummary } from "@fluidframework/shared-object-base/internal";
|
|
16
15
|
|
|
17
16
|
import type { CodecWriteOptions } from "../../codec/index.js";
|
|
18
17
|
import {
|
|
@@ -24,6 +23,7 @@ import {
|
|
|
24
23
|
type ITreeSubscriptionCursor,
|
|
25
24
|
type RevisionTagCodec,
|
|
26
25
|
TreeNavigationResult,
|
|
26
|
+
type TreeNodeSchemaIdentifier,
|
|
27
27
|
applyDelta,
|
|
28
28
|
forEachField,
|
|
29
29
|
makeDetachedFieldIndex,
|
|
@@ -33,25 +33,37 @@ import type {
|
|
|
33
33
|
SummaryElementParser,
|
|
34
34
|
SummaryElementStringifier,
|
|
35
35
|
} from "../../shared-tree-core/index.js";
|
|
36
|
-
import { idAllocatorFromMaxId } from "../../util/index.js";
|
|
37
|
-
|
|
36
|
+
import { idAllocatorFromMaxId, type JsonCompatible } from "../../util/index.js";
|
|
37
|
+
// eslint-disable-next-line import/no-internal-modules
|
|
38
|
+
import { chunkFieldSingle, defaultChunkPolicy } from "../chunked-forest/chunkTree.js";
|
|
38
39
|
import type { FieldBatchCodec, FieldBatchEncodingContext } from "../chunked-forest/index.js";
|
|
39
40
|
|
|
40
41
|
import { type ForestCodec, makeForestSummarizerCodec } from "./codec.js";
|
|
41
|
-
import
|
|
42
|
+
import {
|
|
43
|
+
ForestIncrementalSummaryBehavior,
|
|
44
|
+
ForestIncrementalSummaryBuilder,
|
|
45
|
+
forestSummaryContentKey,
|
|
46
|
+
} from "./incrementalSummaryBuilder.js";
|
|
47
|
+
import { TreeCompressionStrategyExtended } from "../treeCompressionUtils.js";
|
|
48
|
+
import type { IFluidHandle } from "@fluidframework/core-interfaces";
|
|
49
|
+
|
|
42
50
|
/**
|
|
43
|
-
* The
|
|
51
|
+
* The key for the tree that contains the overall forest's summary tree.
|
|
52
|
+
* This tree is added by the parent of the forest summarizer.
|
|
53
|
+
* See {@link ForestIncrementalSummaryBuilder} for details on the summary structure.
|
|
44
54
|
*/
|
|
45
|
-
export const
|
|
55
|
+
export const forestSummaryKey = "Forest";
|
|
46
56
|
|
|
47
57
|
/**
|
|
48
58
|
* Provides methods for summarizing and loading a forest.
|
|
49
59
|
*/
|
|
50
60
|
export class ForestSummarizer implements Summarizable {
|
|
51
|
-
public readonly key =
|
|
61
|
+
public readonly key = forestSummaryKey;
|
|
52
62
|
|
|
53
63
|
private readonly codec: ForestCodec;
|
|
54
64
|
|
|
65
|
+
private readonly incrementalSummaryBuilder: ForestIncrementalSummaryBuilder;
|
|
66
|
+
|
|
55
67
|
/**
|
|
56
68
|
* @param encoderContext - The schema if provided here must be mutated by the caller to keep it up to date.
|
|
57
69
|
*/
|
|
@@ -62,19 +74,45 @@ export class ForestSummarizer implements Summarizable {
|
|
|
62
74
|
private readonly encoderContext: FieldBatchEncodingContext,
|
|
63
75
|
options: CodecWriteOptions,
|
|
64
76
|
private readonly idCompressor: IIdCompressor,
|
|
77
|
+
shouldEncodeFieldIncrementally?: (
|
|
78
|
+
nodeIdentifier: TreeNodeSchemaIdentifier,
|
|
79
|
+
fieldKey: FieldKey,
|
|
80
|
+
) => boolean,
|
|
65
81
|
) {
|
|
66
82
|
// TODO: this should take in CodecWriteOptions, and use it to pick the write version.
|
|
67
83
|
this.codec = makeForestSummarizerCodec(options, fieldBatchCodec);
|
|
84
|
+
|
|
85
|
+
const shouldEncodeFieldIncrementallyLocal = (
|
|
86
|
+
nodeIdentifier: TreeNodeSchemaIdentifier,
|
|
87
|
+
fieldKey: FieldKey,
|
|
88
|
+
): boolean => shouldEncodeFieldIncrementally?.(nodeIdentifier, fieldKey) ?? false;
|
|
89
|
+
this.incrementalSummaryBuilder = new ForestIncrementalSummaryBuilder(
|
|
90
|
+
encoderContext.encodeType ===
|
|
91
|
+
TreeCompressionStrategyExtended.CompressedIncremental /* enableIncrementalSummary */,
|
|
92
|
+
(cursor: ITreeCursorSynchronous) => this.forest.chunkField(cursor),
|
|
93
|
+
shouldEncodeFieldIncrementallyLocal,
|
|
94
|
+
);
|
|
68
95
|
}
|
|
69
96
|
|
|
70
97
|
/**
|
|
71
|
-
*
|
|
98
|
+
* Summarization of the forest's tree content.
|
|
99
|
+
* @returns a summary tree containing the forest's tree content.
|
|
100
|
+
* @remarks
|
|
101
|
+
* If incremental summary is disabled, all the content will be added to a single summary blob.
|
|
102
|
+
* If incremental summary is enabled, the summary will be a tree.
|
|
103
|
+
* See {@link ForestIncrementalSummaryBuilder} for details of what this tree looks like.
|
|
72
104
|
*
|
|
73
105
|
* TODO: when perf matters, this should be replaced with a chunked async version using a binary format.
|
|
74
|
-
*
|
|
75
|
-
* @returns a snapshot of the forest's tree as a string.
|
|
76
106
|
*/
|
|
77
|
-
|
|
107
|
+
public summarize(props: {
|
|
108
|
+
stringify: SummaryElementStringifier;
|
|
109
|
+
fullTree?: boolean;
|
|
110
|
+
trackState?: boolean;
|
|
111
|
+
telemetryContext?: ITelemetryContext;
|
|
112
|
+
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
113
|
+
}): ISummaryTreeWithStats {
|
|
114
|
+
const { stringify, fullTree = false, incrementalSummaryContext } = props;
|
|
115
|
+
|
|
78
116
|
const rootCursor = this.forest.getCursorAboveDetachedFields();
|
|
79
117
|
const fieldMap: Map<FieldKey, ITreeCursorSynchronous & ITreeSubscriptionCursor> =
|
|
80
118
|
new Map();
|
|
@@ -89,55 +127,85 @@ export class ForestSummarizer implements Summarizable {
|
|
|
89
127
|
);
|
|
90
128
|
fieldMap.set(key, innerCursor as ITreeCursorSynchronous & ITreeSubscriptionCursor);
|
|
91
129
|
});
|
|
92
|
-
const encoded = this.codec.encode(fieldMap, this.encoderContext);
|
|
93
130
|
|
|
131
|
+
// Let the incremental summary builder know that we are starting a new summary.
|
|
132
|
+
// It returns whether incremental encoding is enabled.
|
|
133
|
+
const incrementalSummaryBehavior = this.incrementalSummaryBuilder.startSummary({
|
|
134
|
+
fullTree,
|
|
135
|
+
incrementalSummaryContext,
|
|
136
|
+
stringify,
|
|
137
|
+
});
|
|
138
|
+
const encoderContext: FieldBatchEncodingContext = {
|
|
139
|
+
...this.encoderContext,
|
|
140
|
+
incrementalEncoderDecoder:
|
|
141
|
+
incrementalSummaryBehavior === ForestIncrementalSummaryBehavior.Incremental
|
|
142
|
+
? this.incrementalSummaryBuilder
|
|
143
|
+
: undefined,
|
|
144
|
+
};
|
|
145
|
+
const encoded = this.codec.encode(fieldMap, encoderContext);
|
|
94
146
|
fieldMap.forEach((value) => value.free());
|
|
95
|
-
return stringify(encoded);
|
|
96
|
-
}
|
|
97
147
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
telemetryContext?: ITelemetryContext;
|
|
103
|
-
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
104
|
-
}): ISummaryTreeWithStats {
|
|
105
|
-
return createSingleBlobSummary(treeBlobKey, this.getTreeString(props.stringify));
|
|
148
|
+
return this.incrementalSummaryBuilder.completeSummary({
|
|
149
|
+
incrementalSummaryContext,
|
|
150
|
+
forestSummaryContent: stringify(encoded),
|
|
151
|
+
});
|
|
106
152
|
}
|
|
107
153
|
|
|
108
154
|
public async load(
|
|
109
155
|
services: IChannelStorageService,
|
|
110
156
|
parse: SummaryElementParser,
|
|
111
157
|
): Promise<void> {
|
|
112
|
-
|
|
113
|
-
|
|
158
|
+
// The contents of the top-level forest must be present under a summary blob named `forestSummaryContentKey`.
|
|
159
|
+
// If the summary was generated as `ForestIncrementalSummaryBehavior.SingleBlob`, this blob will contain all
|
|
160
|
+
// of forest's contents.
|
|
161
|
+
// If the summary was generated as `ForestIncrementalSummaryBehavior.Incremental`, this blob will contain only
|
|
162
|
+
// the top-level forest node's contents.
|
|
163
|
+
// The contents of the incremental chunks will be in separate tree nodes and will be read later during decoding.
|
|
164
|
+
assert(
|
|
165
|
+
await services.contains(forestSummaryContentKey),
|
|
166
|
+
0xc21 /* Forest summary content missing in snapshot */,
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
const readAndParseBlob = async <T extends JsonCompatible<IFluidHandle>>(
|
|
170
|
+
id: string,
|
|
171
|
+
): Promise<T> => {
|
|
172
|
+
const treeBuffer = await services.readBlob(id);
|
|
114
173
|
const treeBufferString = bufferToString(treeBuffer, "utf8");
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
);
|
|
174
|
+
return parse(treeBufferString) as T;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
// Load the incremental summary builder so that it can download any incremental chunks in the
|
|
178
|
+
// snapshot.
|
|
179
|
+
await this.incrementalSummaryBuilder.load(services, readAndParseBlob);
|
|
180
|
+
|
|
181
|
+
// TODO: this code is parsing data without an optional validator, this should be defined in a typebox schema as part of the
|
|
182
|
+
// forest summary format.
|
|
183
|
+
const fields = this.codec.decode(await readAndParseBlob(forestSummaryContentKey), {
|
|
184
|
+
...this.encoderContext,
|
|
185
|
+
incrementalEncoderDecoder: this.incrementalSummaryBuilder,
|
|
186
|
+
});
|
|
187
|
+
const allocator = idAllocatorFromMaxId();
|
|
188
|
+
const fieldChanges: [FieldKey, DeltaFieldChanges][] = [];
|
|
189
|
+
const build: DeltaDetachedNodeBuild[] = [];
|
|
190
|
+
for (const [fieldKey, field] of fields) {
|
|
191
|
+
const chunked = chunkFieldSingle(field, {
|
|
192
|
+
policy: defaultChunkPolicy,
|
|
193
|
+
idCompressor: this.idCompressor,
|
|
194
|
+
});
|
|
195
|
+
const buildId = { minor: allocator.allocate(chunked.topLevelLength) };
|
|
196
|
+
build.push({
|
|
197
|
+
id: buildId,
|
|
198
|
+
trees: chunked,
|
|
199
|
+
});
|
|
200
|
+
fieldChanges.push([fieldKey, [{ count: chunked.topLevelLength, attach: buildId }]]);
|
|
141
201
|
}
|
|
202
|
+
|
|
203
|
+
assert(this.forest.isEmpty, 0x797 /* forest must be empty */);
|
|
204
|
+
applyDelta(
|
|
205
|
+
{ build, fields: new Map(fieldChanges) },
|
|
206
|
+
undefined,
|
|
207
|
+
this.forest,
|
|
208
|
+
makeDetachedFieldIndex("init", this.revisionTagCodec, this.idCompressor),
|
|
209
|
+
);
|
|
142
210
|
}
|
|
143
211
|
}
|