@fluidframework/tree 2.74.0-365691 → 2.74.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 +4 -2
- package/CHANGELOG.md +11 -0
- package/api-report/tree.alpha.api.md +125 -87
- package/api-report/tree.beta.api.md +0 -1
- package/api-report/tree.legacy.beta.api.md +0 -1
- package/api-report/tree.legacy.public.api.md +0 -1
- package/api-report/tree.public.api.md +0 -1
- package/assertTagging.config.mjs +1 -1
- package/dist/alpha.d.ts +6 -2
- package/dist/codec/codec.d.ts +41 -13
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +46 -19
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +1 -1
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/codec/versioned/format.d.ts +4 -1
- package/dist/codec/versioned/format.d.ts.map +1 -1
- package/dist/codec/versioned/format.js +4 -1
- package/dist/codec/versioned/format.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +4 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +20 -1
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +4 -7
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +2 -2
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +34 -13
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +12 -12
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +4 -4
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.js +2 -2
- package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/dist/core/tree/index.d.ts +3 -2
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +3 -0
- package/dist/core/tree/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +5 -5
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +4 -4
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +14 -6
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +3 -3
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +22 -26
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +30 -8
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js +41 -11
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts +7 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +13 -11
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +10 -13
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +35 -31
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts +61 -0
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/formatCommon.js +27 -0
- package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -0
- package/dist/feature-libraries/forest-summary/formatV1.d.ts +51 -0
- package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/formatV1.js +11 -0
- package/dist/feature-libraries/forest-summary/formatV1.js.map +1 -0
- package/dist/feature-libraries/forest-summary/formatV2.d.ts +51 -0
- package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/formatV2.js +11 -0
- package/dist/feature-libraries/forest-summary/formatV2.js.map +1 -0
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +18 -24
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +21 -43
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts +2 -2
- package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/index.js +3 -4
- package/dist/feature-libraries/forest-summary/index.js.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryFormatCommon.d.ts +35 -0
- package/dist/feature-libraries/forest-summary/summaryFormatCommon.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryFormatCommon.js +43 -0
- package/dist/feature-libraries/forest-summary/summaryFormatCommon.js.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts +11 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.js +14 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.js.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV3.d.ts +18 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV3.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV3.js +21 -0
- package/dist/feature-libraries/forest-summary/summaryFormatV3.js.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts +17 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.js +35 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
- 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 +3 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.d.ts +18 -2
- package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.js +54 -3
- package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts +25 -13
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.js +0 -21
- package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +4 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +2 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +2 -3
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +4 -4
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.d.ts +1 -1
- package/dist/feature-libraries/schema-index/formatV2.d.ts +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +27 -8
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +42 -16
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +1 -1
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +2 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +3 -0
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +2 -2
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +4 -4
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +2 -2
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +20 -8
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js +25 -11
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +1 -1
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +10 -5
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +72 -17
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +10 -8
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/{lib/shared-tree-core/editManagerCodecsV5.d.ts → dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts} +3 -3
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{editManagerCodecsV5.js → editManagerCodecsVSharedBranches.js} +7 -7
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +8 -30
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +18 -9
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +1 -1
- package/dist/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts} +3 -3
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{editManagerFormatV5.js → editManagerFormatVSharedBranches.js} +2 -2
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/editManagerSummarizer.d.ts +29 -9
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +41 -13
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +5 -2
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +7 -1
- package/dist/shared-tree-core/index.js.map +1 -1
- package/{lib/shared-tree-core/messageCodecV5.d.ts → dist/shared-tree-core/messageCodecVSharedBranches.d.ts} +2 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{messageCodecV5.js → messageCodecVSharedBranches.js} +6 -6
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +12 -10
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +9 -36
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +19 -9
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/{lib/shared-tree-core/messageFormatV5.d.ts → dist/shared-tree-core/messageFormatVSharedBranches.d.ts} +5 -7
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -0
- package/dist/shared-tree-core/{messageFormatV5.js → messageFormatVSharedBranches.js} +3 -2
- package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -0
- package/dist/shared-tree-core/sharedTreeCore.d.ts +13 -47
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +29 -17
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/summaryTypes.d.ts +94 -0
- package/dist/shared-tree-core/summaryTypes.d.ts.map +1 -0
- package/dist/shared-tree-core/summaryTypes.js +47 -0
- package/dist/shared-tree-core/summaryTypes.js.map +1 -0
- package/dist/shared-tree-core/versionedSummarizer.d.ts +72 -0
- package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
- package/dist/shared-tree-core/versionedSummarizer.js +64 -0
- package/dist/shared-tree-core/versionedSummarizer.js.map +1 -0
- package/dist/simple-tree/api/configuration.d.ts +3 -26
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js +10 -21
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.d.ts +11 -0
- package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.js +7 -0
- package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/eraseSchemaDetails.d.ts +89 -0
- package/dist/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -0
- package/dist/simple-tree/api/eraseSchemaDetails.js +97 -0
- package/dist/simple-tree/api/eraseSchemaDetails.js.map +1 -0
- package/dist/simple-tree/api/getSimpleSchema.d.ts +3 -3
- package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getSimpleSchema.js +9 -3
- package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js +7 -0
- package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +4 -4
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +8 -5
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
- 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/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js +0 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts +6 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js +5 -0
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts +12 -12
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.js +18 -6
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +13 -8
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts +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/tree.d.ts +15 -2
- 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/typesUnsafe.d.ts +3 -3
- 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/allowedTypes.d.ts +2 -2
- package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +1 -1
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +2 -3
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/toStored.d.ts +17 -15
- package/dist/simple-tree/core/toStored.d.ts.map +1 -1
- package/dist/simple-tree/core/toStored.js +5 -40
- package/dist/simple-tree/core/toStored.js.map +1 -1
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNode.js +1 -0
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/walkSchema.js +4 -0
- package/dist/simple-tree/core/walkSchema.js.map +1 -1
- package/dist/simple-tree/createContext.d.ts.map +1 -1
- package/dist/simple-tree/createContext.js +20 -5
- package/dist/simple-tree/createContext.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +3 -3
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +6 -5
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +16 -11
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +5 -5
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +3 -3
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +3 -3
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +2 -2
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.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.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -3
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +55 -23
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js +17 -0
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.js +8 -1
- package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts +58 -11
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +205 -30
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/simple-tree/treeSchema.d.ts +23 -0
- package/dist/simple-tree/treeSchema.d.ts.map +1 -0
- package/dist/simple-tree/treeSchema.js +25 -0
- package/dist/simple-tree/treeSchema.js.map +1 -0
- package/dist/tableSchema.d.ts +107 -64
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +161 -60
- package/dist/tableSchema.js.map +1 -1
- package/dist/util/brand.d.ts +49 -0
- package/dist/util/brand.d.ts.map +1 -1
- package/dist/util/brand.js +47 -1
- package/dist/util/brand.js.map +1 -1
- package/dist/util/index.d.ts +2 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +6 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/readSnapshotBlob.d.ts +13 -0
- package/dist/util/readSnapshotBlob.d.ts.map +1 -0
- package/dist/util/readSnapshotBlob.js +18 -0
- package/dist/util/readSnapshotBlob.js.map +1 -0
- package/eslint.config.mts +98 -0
- package/lib/alpha.d.ts +6 -2
- package/lib/codec/codec.d.ts +41 -13
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +40 -13
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts +1 -1
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/codec/versioned/format.d.ts +4 -1
- package/lib/codec/versioned/format.d.ts.map +1 -1
- package/lib/codec/versioned/format.js +4 -1
- package/lib/codec/versioned/format.js.map +1 -1
- package/lib/core/index.d.ts +2 -2
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/types.d.ts +20 -1
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +4 -7
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +3 -3
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +34 -13
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +12 -12
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +4 -4
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.js +3 -3
- package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/lib/core/tree/index.d.ts +3 -2
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +2 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +3 -3
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +5 -5
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +5 -5
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +14 -6
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +3 -3
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +23 -27
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +30 -8
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js +38 -8
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts +7 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +12 -11
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +10 -13
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +33 -29
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts +61 -0
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/formatCommon.js +23 -0
- package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -0
- package/lib/feature-libraries/forest-summary/formatV1.d.ts +51 -0
- package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/formatV1.js +8 -0
- package/lib/feature-libraries/forest-summary/formatV1.js.map +1 -0
- package/lib/feature-libraries/forest-summary/formatV2.d.ts +51 -0
- package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/formatV2.js +8 -0
- package/lib/feature-libraries/forest-summary/formatV2.js.map +1 -0
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +18 -24
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +20 -42
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts +2 -2
- package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/index.js +2 -2
- package/lib/feature-libraries/forest-summary/index.js.map +1 -1
- package/lib/feature-libraries/forest-summary/summaryFormatCommon.d.ts +35 -0
- package/lib/feature-libraries/forest-summary/summaryFormatCommon.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryFormatCommon.js +40 -0
- package/lib/feature-libraries/forest-summary/summaryFormatCommon.js.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts +11 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.js +11 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.js.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV3.d.ts +18 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV3.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV3.js +18 -0
- package/lib/feature-libraries/forest-summary/summaryFormatV3.js.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts +17 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.js +30 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
- 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/comparison.d.ts +18 -2
- package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.js +55 -5
- package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts +25 -13
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.js +0 -21
- package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +4 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +1 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +2 -3
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +5 -5
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.d.ts +1 -1
- package/lib/feature-libraries/schema-index/formatV2.d.ts +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +27 -8
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +38 -12
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +2 -2
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +2 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +3 -0
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +2 -2
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +4 -4
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +2 -2
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +20 -8
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +25 -11
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +2 -2
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +10 -5
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +73 -18
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +11 -9
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/{dist/shared-tree-core/editManagerCodecsV5.d.ts → lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts} +3 -3
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{editManagerCodecsV5.js → editManagerCodecsVSharedBranches.js} +4 -4
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +8 -30
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +19 -10
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +1 -1
- package/lib/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts} +3 -3
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{editManagerFormatV5.js → editManagerFormatVSharedBranches.js} +2 -2
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/editManagerSummarizer.d.ts +29 -9
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +39 -11
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +5 -2
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +3 -1
- package/lib/shared-tree-core/index.js.map +1 -1
- package/{dist/shared-tree-core/messageCodecV5.d.ts → lib/shared-tree-core/messageCodecVSharedBranches.d.ts} +2 -2
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{messageCodecV5.js → messageCodecVSharedBranches.js} +3 -3
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +13 -11
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +9 -36
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +19 -9
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/{dist/shared-tree-core/messageFormatV5.d.ts → lib/shared-tree-core/messageFormatVSharedBranches.d.ts} +5 -7
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -0
- package/lib/shared-tree-core/{messageFormatV5.js → messageFormatVSharedBranches.js} +3 -2
- package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -0
- package/lib/shared-tree-core/sharedTreeCore.d.ts +13 -47
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +27 -15
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/summaryTypes.d.ts +94 -0
- package/lib/shared-tree-core/summaryTypes.d.ts.map +1 -0
- package/lib/shared-tree-core/summaryTypes.js +43 -0
- package/lib/shared-tree-core/summaryTypes.js.map +1 -0
- package/lib/shared-tree-core/versionedSummarizer.d.ts +72 -0
- package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
- package/lib/shared-tree-core/versionedSummarizer.js +60 -0
- package/lib/shared-tree-core/versionedSummarizer.js.map +1 -0
- package/lib/simple-tree/api/configuration.d.ts +3 -26
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js +14 -25
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.d.ts +11 -0
- package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.js +7 -0
- package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/lib/simple-tree/api/discrepancies.js.map +1 -1
- package/lib/simple-tree/api/eraseSchemaDetails.d.ts +89 -0
- package/lib/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -0
- package/lib/simple-tree/api/eraseSchemaDetails.js +92 -0
- package/lib/simple-tree/api/eraseSchemaDetails.js.map +1 -0
- package/lib/simple-tree/api/getSimpleSchema.d.ts +3 -3
- package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getSimpleSchema.js +9 -3
- package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js +8 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +4 -4
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +3 -3
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
- 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/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js +0 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts +6 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js +5 -0
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts +12 -12
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.js +15 -3
- package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +15 -10
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +1 -2
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +15 -2
- 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/typesUnsafe.d.ts +3 -3
- 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/allowedTypes.d.ts +2 -2
- package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +1 -1
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +1 -1
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/toStored.d.ts +17 -15
- package/lib/simple-tree/core/toStored.d.ts.map +1 -1
- package/lib/simple-tree/core/toStored.js +4 -37
- package/lib/simple-tree/core/toStored.js.map +1 -1
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNode.js +1 -0
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/walkSchema.js +5 -1
- package/lib/simple-tree/core/walkSchema.js.map +1 -1
- package/lib/simple-tree/createContext.d.ts.map +1 -1
- package/lib/simple-tree/createContext.js +20 -5
- package/lib/simple-tree/createContext.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +3 -3
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +6 -5
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +5 -4
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +5 -5
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +3 -3
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +3 -3
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +2 -2
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.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.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -3
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +55 -23
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js +16 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js +8 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts +58 -11
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +204 -31
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/simple-tree/treeSchema.d.ts +23 -0
- package/lib/simple-tree/treeSchema.d.ts.map +1 -0
- package/lib/simple-tree/treeSchema.js +21 -0
- package/lib/simple-tree/treeSchema.js.map +1 -0
- package/lib/tableSchema.d.ts +107 -64
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +162 -61
- package/lib/tableSchema.js.map +1 -1
- package/lib/util/brand.d.ts +49 -0
- package/lib/util/brand.d.ts.map +1 -1
- package/lib/util/brand.js +44 -0
- package/lib/util/brand.js.map +1 -1
- 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/readSnapshotBlob.d.ts +13 -0
- package/lib/util/readSnapshotBlob.d.ts.map +1 -0
- package/lib/util/readSnapshotBlob.js +14 -0
- package/lib/util/readSnapshotBlob.js.map +1 -0
- package/package.json +24 -23
- package/src/codec/codec.ts +44 -14
- package/src/codec/versioned/codec.ts +1 -1
- package/src/codec/versioned/format.ts +4 -1
- package/src/core/index.ts +4 -1
- package/src/core/rebase/index.ts +1 -0
- package/src/core/rebase/types.ts +25 -0
- package/src/core/schema-stored/schema.ts +5 -7
- package/src/core/tree/detachedFieldIndex.ts +54 -13
- package/src/core/tree/detachedFieldIndexFormatCommon.ts +4 -7
- package/src/core/tree/index.ts +7 -2
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +3 -2
- package/src/feature-libraries/chunked-forest/codec/format.ts +6 -9
- package/src/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.ts +15 -7
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +9 -9
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +22 -33
- package/src/feature-libraries/detachedFieldIndexSummarizer.ts +62 -15
- package/src/feature-libraries/forest-summary/codec.ts +22 -10
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +77 -44
- package/src/feature-libraries/forest-summary/{format.ts → formatCommon.ts} +12 -13
- package/src/feature-libraries/forest-summary/formatV1.ts +12 -0
- package/src/feature-libraries/forest-summary/formatV2.ts +12 -0
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +37 -56
- package/src/feature-libraries/forest-summary/index.ts +2 -2
- package/src/feature-libraries/forest-summary/summaryFormatCommon.ts +41 -0
- package/src/feature-libraries/forest-summary/summaryFormatV1ToV2.ts +11 -0
- package/src/feature-libraries/forest-summary/summaryFormatV3.ts +18 -0
- package/src/feature-libraries/forest-summary/summaryTypes.ts +41 -0
- package/src/feature-libraries/index.ts +1 -1
- package/src/feature-libraries/modular-schema/comparison.ts +64 -5
- package/src/feature-libraries/modular-schema/fieldKind.ts +24 -40
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +4 -1
- package/src/feature-libraries/modular-schema/index.ts +1 -0
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +2 -3
- package/src/feature-libraries/schema-index/codec.ts +7 -9
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +59 -18
- package/src/index.ts +6 -2
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +2 -3
- package/src/shared-tree/schematizingTreeView.ts +5 -0
- package/src/shared-tree/sharedTree.ts +20 -9
- package/src/shared-tree/sharedTreeChangeCodecs.ts +2 -2
- package/src/shared-tree/sharedTreeChangeEnricher.ts +31 -11
- package/src/shared-tree/treeAlpha.ts +2 -3
- package/src/shared-tree/treeCheckout.ts +103 -20
- package/src/shared-tree-core/editManagerCodecs.ts +11 -9
- package/src/shared-tree-core/{editManagerCodecsV5.ts → editManagerCodecsVSharedBranches.ts} +3 -3
- package/src/shared-tree-core/editManagerFormatCommons.ts +22 -16
- package/src/shared-tree-core/{editManagerFormatV5.ts → editManagerFormatVSharedBranches.ts} +2 -2
- package/src/shared-tree-core/editManagerSummarizer.ts +58 -16
- package/src/shared-tree-core/index.ts +12 -3
- package/src/shared-tree-core/{messageCodecV5.ts → messageCodecVSharedBranches.ts} +3 -3
- package/src/shared-tree-core/messageCodecs.ts +13 -11
- package/src/shared-tree-core/messageFormat.ts +23 -16
- package/src/shared-tree-core/{messageFormatV5.ts → messageFormatVSharedBranches.ts} +4 -6
- package/src/shared-tree-core/sharedTreeCore.ts +63 -75
- package/src/shared-tree-core/summaryTypes.ts +122 -0
- package/src/shared-tree-core/versionedSummarizer.ts +114 -0
- package/src/simple-tree/api/configuration.ts +21 -68
- package/src/simple-tree/api/dirtyIndex.ts +11 -0
- package/src/simple-tree/api/discrepancies.ts +1 -1
- package/src/simple-tree/api/eraseSchemaDetails.ts +123 -0
- package/src/simple-tree/api/getSimpleSchema.ts +13 -6
- package/src/simple-tree/api/incrementalAllowedTypes.ts +15 -3
- package/src/simple-tree/api/index.ts +7 -4
- package/src/simple-tree/api/schemaCompatibilityTester.ts +1 -1
- package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -2
- package/src/simple-tree/api/schemaFactoryRecursive.ts +0 -2
- package/src/simple-tree/api/schemaFromSimple.ts +11 -5
- package/src/simple-tree/api/simpleSchemaCodec.ts +17 -3
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -1
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +18 -10
- package/src/simple-tree/api/storedSchema.ts +2 -2
- package/src/simple-tree/api/tree.ts +16 -1
- package/src/simple-tree/api/typesUnsafe.ts +7 -3
- package/src/simple-tree/core/allowedTypes.ts +3 -3
- package/src/simple-tree/core/index.ts +2 -2
- package/src/simple-tree/core/toStored.ts +22 -55
- package/src/simple-tree/core/treeNode.ts +1 -0
- package/src/simple-tree/core/walkSchema.ts +6 -0
- package/src/simple-tree/createContext.ts +29 -11
- package/src/simple-tree/fieldSchema.ts +10 -3
- package/src/simple-tree/index.ts +12 -10
- package/src/simple-tree/node-kinds/array/arrayNode.ts +5 -2
- package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +3 -3
- package/src/simple-tree/node-kinds/map/mapNode.ts +5 -2
- package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +3 -3
- package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +6 -2
- package/src/simple-tree/node-kinds/record/recordNode.ts +5 -2
- package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +3 -3
- package/src/simple-tree/simpleSchema.ts +79 -32
- package/src/simple-tree/simpleSchemaFormatV1.ts +9 -1
- package/src/simple-tree/toStoredSchema.ts +319 -61
- package/src/simple-tree/treeSchema.ts +54 -0
- package/src/tableSchema.ts +487 -173
- package/src/util/brand.ts +61 -0
- package/src/util/index.ts +5 -0
- package/src/util/readSnapshotBlob.ts +23 -0
- package/dist/feature-libraries/forest-summary/format.d.ts +0 -23
- package/dist/feature-libraries/forest-summary/format.d.ts.map +0 -1
- package/dist/feature-libraries/forest-summary/format.js +0 -24
- package/dist/feature-libraries/forest-summary/format.js.map +0 -1
- package/dist/shared-tree-core/editManagerCodecsV5.d.ts.map +0 -1
- package/dist/shared-tree-core/editManagerCodecsV5.js.map +0 -1
- package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +0 -1
- package/dist/shared-tree-core/editManagerFormatV5.js.map +0 -1
- package/dist/shared-tree-core/messageCodecV5.d.ts.map +0 -1
- package/dist/shared-tree-core/messageCodecV5.js.map +0 -1
- package/dist/shared-tree-core/messageFormatV5.d.ts.map +0 -1
- package/dist/shared-tree-core/messageFormatV5.js.map +0 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +0 -40
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +0 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +0 -177
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +0 -1
- package/lib/feature-libraries/forest-summary/format.d.ts +0 -23
- package/lib/feature-libraries/forest-summary/format.d.ts.map +0 -1
- package/lib/feature-libraries/forest-summary/format.js +0 -21
- package/lib/feature-libraries/forest-summary/format.js.map +0 -1
- package/lib/shared-tree-core/editManagerCodecsV5.d.ts.map +0 -1
- package/lib/shared-tree-core/editManagerCodecsV5.js.map +0 -1
- package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +0 -1
- package/lib/shared-tree-core/editManagerFormatV5.js.map +0 -1
- package/lib/shared-tree-core/messageCodecV5.d.ts.map +0 -1
- package/lib/shared-tree-core/messageCodecV5.js.map +0 -1
- package/lib/shared-tree-core/messageFormatV5.d.ts.map +0 -1
- package/lib/shared-tree-core/messageFormatV5.js.map +0 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +0 -40
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +0 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +0 -171
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +0 -1
- package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +0 -209
|
@@ -4,12 +4,20 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Policy to determine whether a node
|
|
8
|
-
* @param nodeIdentifier - The identifier of the node
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @
|
|
7
|
+
* Policy type to determine whether one of more fields of a {@link NodeKind | node} in a schema should be incrementally encoded.
|
|
8
|
+
* @param nodeIdentifier - The identifier of the node. The node is one of the kinds defined in {@link NodeKind}.
|
|
9
|
+
* @param fieldKey - An optional key for fields in the node. It must be one of the following based on the kind of node.
|
|
10
|
+
* Policy implementations may throw an error if the provided key is invalid for the node kind:
|
|
11
|
+
* - {@link NodeKind.Object | object} - Must be defined and should be the key of one of its fields. If the object node does not
|
|
12
|
+
* have a field with the specified key, returns false.
|
|
13
|
+
* - {@link NodeKind.Array | array} - Must be defined and be the "" (empty string) which is special value for arrays.
|
|
14
|
+
* - {@link NodeKind.Map | map} and {@link NodeKind.Record | record} - Must be undefined.
|
|
15
|
+
* - {@link NodeKind.Leaf | leaf} - Must be undefined. Leaf nodes do not support incremental encoding. If called for leaf nodes,
|
|
16
|
+
* returns false.
|
|
17
|
+
*
|
|
12
18
|
* @remarks
|
|
19
|
+
* See {@link incrementalEncodingPolicyForAllowedTypes} for a reference policy implementation.
|
|
20
|
+
*
|
|
13
21
|
* Incremental encoding has a significant size overhead,
|
|
14
22
|
* but allows reuse of previously encoded unchanged subtrees.
|
|
15
23
|
* Thus it should only be enabled for large subtrees which are modified infrequently.
|
|
@@ -18,7 +26,7 @@
|
|
|
18
26
|
*/
|
|
19
27
|
export type IncrementalEncodingPolicy = (
|
|
20
28
|
nodeIdentifier: string | undefined,
|
|
21
|
-
fieldKey
|
|
29
|
+
fieldKey?: string,
|
|
22
30
|
) => boolean;
|
|
23
31
|
|
|
24
32
|
/**
|
|
@@ -26,7 +34,7 @@ export type IncrementalEncodingPolicy = (
|
|
|
26
34
|
*/
|
|
27
35
|
export const defaultIncrementalEncodingPolicy: IncrementalEncodingPolicy = (
|
|
28
36
|
nodeIdentifier: string | undefined,
|
|
29
|
-
fieldKey
|
|
37
|
+
fieldKey?: string,
|
|
30
38
|
): boolean => {
|
|
31
39
|
return false;
|
|
32
40
|
};
|
|
@@ -180,16 +180,16 @@ export function getNodeEncoder(
|
|
|
180
180
|
schemaName: TreeNodeSchemaIdentifier,
|
|
181
181
|
incrementalEncoder?: IncrementalEncoder,
|
|
182
182
|
): NodeShapeBasedEncoder {
|
|
183
|
+
const shouldEncodeIncrementally =
|
|
184
|
+
incrementalEncoder?.shouldEncodeIncrementally ?? defaultIncrementalEncodingPolicy;
|
|
183
185
|
const schema =
|
|
184
186
|
storedSchema.nodeSchema.get(schemaName) ?? fail(0xb53 /* missing node schema */);
|
|
185
187
|
|
|
188
|
+
// This handles both object and array nodes.
|
|
186
189
|
if (schema instanceof ObjectNodeStoredSchema) {
|
|
187
190
|
// TODO:Performance:
|
|
188
191
|
// consider moving some optional and sequence fields to extra fields if they are commonly empty
|
|
189
192
|
// to reduce encoded size.
|
|
190
|
-
|
|
191
|
-
const shouldEncodeIncrementally =
|
|
192
|
-
incrementalEncoder?.shouldEncodeIncrementally ?? defaultIncrementalEncodingPolicy;
|
|
193
193
|
const objectNodeFields: KeyedFieldEncoder[] = [];
|
|
194
194
|
for (const [key, field] of schema.objectNodeFields ?? []) {
|
|
195
195
|
const fieldEncoder = shouldEncodeIncrementally(schemaName, key)
|
|
@@ -213,13 +213,13 @@ export function getNodeEncoder(
|
|
|
213
213
|
);
|
|
214
214
|
return shape;
|
|
215
215
|
}
|
|
216
|
+
|
|
217
|
+
// This handles both maps and record nodes.
|
|
216
218
|
if (schema instanceof MapNodeStoredSchema) {
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
fieldBuilder.fieldEncoderFromSchema(schema.mapFields),
|
|
222
|
-
);
|
|
219
|
+
const fieldEncoder = shouldEncodeIncrementally(schemaName)
|
|
220
|
+
? incrementalFieldEncoder
|
|
221
|
+
: fieldBuilder.fieldEncoderFromSchema(schema.mapFields);
|
|
222
|
+
const shape = new NodeShapeBasedEncoder(schemaName, false, [], fieldEncoder);
|
|
223
223
|
return shape;
|
|
224
224
|
}
|
|
225
225
|
fail(0xb54 /* unsupported node kind */);
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
FlexFieldKind,
|
|
22
22
|
type FullSchemaPolicy,
|
|
23
23
|
type ToDelta,
|
|
24
|
-
allowsTreeSchemaIdentifierSuperset,
|
|
25
24
|
referenceFreeFieldChangeRebaser,
|
|
26
25
|
} from "../modular-schema/index.js";
|
|
27
26
|
import {
|
|
@@ -76,15 +75,20 @@ export interface RequiredFieldEditor extends FieldEditor<OptionalChangeset> {
|
|
|
76
75
|
}
|
|
77
76
|
|
|
78
77
|
const optionalIdentifier = brandConst("Optional")<FieldKindIdentifier>();
|
|
78
|
+
const requiredIdentifier = brandConst("Value")<FieldKindIdentifier>();
|
|
79
|
+
const sequenceIdentifier = brandConst("Sequence")<FieldKindIdentifier>();
|
|
80
|
+
const identifierFieldIdentifier = brandConst("Identifier")<FieldKindIdentifier>();
|
|
79
81
|
|
|
80
82
|
/**
|
|
81
83
|
* 0 or 1 items.
|
|
82
84
|
*/
|
|
83
85
|
export const optional = new FlexFieldKind(optionalIdentifier, Multiplicity.Optional, {
|
|
84
86
|
changeHandler: optionalChangeHandler,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
allowMonotonicUpgradeFrom: new Set([
|
|
88
|
+
identifierFieldIdentifier,
|
|
89
|
+
requiredIdentifier,
|
|
90
|
+
forbiddenFieldKindIdentifier,
|
|
91
|
+
]),
|
|
88
92
|
});
|
|
89
93
|
|
|
90
94
|
export const requiredFieldEditor: RequiredFieldEditor = {
|
|
@@ -103,51 +107,38 @@ export const requiredFieldChangeHandler: FieldChangeHandler<
|
|
|
103
107
|
editor: requiredFieldEditor,
|
|
104
108
|
};
|
|
105
109
|
|
|
106
|
-
const requiredIdentifier = brandConst("Value")<FieldKindIdentifier>();
|
|
107
|
-
|
|
108
110
|
/**
|
|
109
111
|
* Exactly one item.
|
|
110
112
|
*/
|
|
111
113
|
export const required = new FlexFieldKind(requiredIdentifier, Multiplicity.Single, {
|
|
112
114
|
changeHandler: requiredFieldChangeHandler,
|
|
113
|
-
|
|
114
|
-
// By omitting Identifier here,
|
|
115
|
-
// this is making a policy choice that a schema upgrade cannot be done from required to identifier.
|
|
116
|
-
// Since an identifier can be upgraded into a required field,
|
|
117
|
-
// preventing the inverse helps ensure that schema upgrades are monotonic.
|
|
118
|
-
// Which direction is allowed is a subjective policy choice.
|
|
119
|
-
(other.kind === sequence.identifier ||
|
|
120
|
-
other.kind === requiredIdentifier ||
|
|
121
|
-
other.kind === optional.identifier) &&
|
|
122
|
-
allowsTreeSchemaIdentifierSuperset(types, other.types),
|
|
115
|
+
allowMonotonicUpgradeFrom: new Set([identifierFieldIdentifier]),
|
|
123
116
|
});
|
|
124
117
|
|
|
125
|
-
const sequenceIdentifier = brandConst("Sequence")<FieldKindIdentifier>();
|
|
126
|
-
|
|
127
118
|
/**
|
|
128
119
|
* 0 or more items.
|
|
129
120
|
*/
|
|
130
121
|
export const sequence = new FlexFieldKind(sequenceIdentifier, Multiplicity.Sequence, {
|
|
131
122
|
changeHandler: sequenceFieldChangeHandler,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
123
|
+
allowMonotonicUpgradeFrom: new Set([
|
|
124
|
+
required.identifier,
|
|
125
|
+
optional.identifier,
|
|
126
|
+
identifierFieldIdentifier,
|
|
127
|
+
forbiddenFieldKindIdentifier,
|
|
128
|
+
]),
|
|
135
129
|
});
|
|
136
130
|
|
|
137
|
-
const identifierFieldIdentifier = brandConst("Identifier")<FieldKindIdentifier>();
|
|
138
|
-
|
|
139
131
|
/**
|
|
140
132
|
* Exactly one identifier.
|
|
141
133
|
*/
|
|
142
134
|
export const identifier = new FlexFieldKind(identifierFieldIdentifier, Multiplicity.Single, {
|
|
143
135
|
changeHandler: noChangeHandler,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
allowsTreeSchemaIdentifierSuperset(types, other.types),
|
|
136
|
+
// By omitting required here,
|
|
137
|
+
// this is making a policy choice that a schema upgrade cannot be done from required to identifier.
|
|
138
|
+
// Since an identifier can be upgraded into a required field,
|
|
139
|
+
// preventing the inverse helps ensure that schema upgrades are monotonic.
|
|
140
|
+
// Which direction is allowed is a subjective policy choice.
|
|
141
|
+
allowMonotonicUpgradeFrom: new Set([]),
|
|
151
142
|
});
|
|
152
143
|
|
|
153
144
|
/**
|
|
@@ -183,9 +174,7 @@ export const forbidden = new FlexFieldKind(
|
|
|
183
174
|
Multiplicity.Forbidden,
|
|
184
175
|
{
|
|
185
176
|
changeHandler: noChangeHandler,
|
|
186
|
-
|
|
187
|
-
allowsTreeSupersetOf: (types, other) =>
|
|
188
|
-
fieldKinds.get(other.kind)?.multiplicity !== Multiplicity.Single,
|
|
177
|
+
allowMonotonicUpgradeFrom: new Set(),
|
|
189
178
|
},
|
|
190
179
|
);
|
|
191
180
|
|
|
@@ -7,44 +7,91 @@ import { bufferToString } from "@fluid-internal/client-utils";
|
|
|
7
7
|
import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
8
8
|
import type {
|
|
9
9
|
IExperimentalIncrementalSummaryContext,
|
|
10
|
-
ISummaryTreeWithStats,
|
|
11
10
|
ITelemetryContext,
|
|
11
|
+
MinimumVersionForCollab,
|
|
12
12
|
} from "@fluidframework/runtime-definitions/internal";
|
|
13
|
-
import {
|
|
13
|
+
import type { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
|
|
14
14
|
|
|
15
15
|
import type { DetachedFieldIndex } from "../core/index.js";
|
|
16
|
-
import
|
|
17
|
-
Summarizable,
|
|
18
|
-
SummaryElementParser,
|
|
19
|
-
SummaryElementStringifier,
|
|
16
|
+
import {
|
|
17
|
+
type Summarizable,
|
|
18
|
+
type SummaryElementParser,
|
|
19
|
+
type SummaryElementStringifier,
|
|
20
|
+
VersionedSummarizer,
|
|
20
21
|
} from "../shared-tree-core/index.js";
|
|
21
22
|
import type { JsonCompatibleReadOnly } from "../util/index.js";
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* The storage key for the blob in the summary containing schema data
|
|
25
26
|
*/
|
|
26
|
-
const detachedFieldIndexBlobKey = "DetachedFieldIndexBlob";
|
|
27
|
+
export const detachedFieldIndexBlobKey = "DetachedFieldIndexBlob";
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
+
* The versions for the detached field index summary format.
|
|
31
|
+
*/
|
|
32
|
+
export const enum DetachedFieldIndexSummaryFormatVersion {
|
|
33
|
+
/**
|
|
34
|
+
* This version represents summary format before summary versioning was introduced.
|
|
35
|
+
*/
|
|
36
|
+
v1 = 1,
|
|
37
|
+
/**
|
|
38
|
+
* This version adds metadata to the summary. This is backward compatible with version 1.
|
|
39
|
+
*/
|
|
40
|
+
v2 = 2,
|
|
41
|
+
/**
|
|
42
|
+
* The latest version of the summary. Must be updated when a new version is added.
|
|
43
|
+
*/
|
|
44
|
+
vLatest = v2,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const supportedVersions = new Set<DetachedFieldIndexSummaryFormatVersion>([
|
|
48
|
+
DetachedFieldIndexSummaryFormatVersion.v1,
|
|
49
|
+
DetachedFieldIndexSummaryFormatVersion.v2,
|
|
50
|
+
]);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Returns the summary version to use as per the given minimum version for collab.
|
|
30
54
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
55
|
+
function minVersionToDetachedFieldIndexSummaryFormatVersion(
|
|
56
|
+
version: MinimumVersionForCollab,
|
|
57
|
+
): DetachedFieldIndexSummaryFormatVersion {
|
|
58
|
+
// Currently, version 2 is written which adds metadata blob to the summary.
|
|
59
|
+
return DetachedFieldIndexSummaryFormatVersion.v2;
|
|
60
|
+
}
|
|
33
61
|
|
|
34
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Provides methods for summarizing and loading a tree index.
|
|
64
|
+
*/
|
|
65
|
+
export class DetachedFieldIndexSummarizer
|
|
66
|
+
extends VersionedSummarizer<DetachedFieldIndexSummaryFormatVersion>
|
|
67
|
+
implements Summarizable
|
|
68
|
+
{
|
|
69
|
+
public constructor(
|
|
70
|
+
private readonly detachedFieldIndex: DetachedFieldIndex,
|
|
71
|
+
minVersionForCollab: MinimumVersionForCollab,
|
|
72
|
+
) {
|
|
73
|
+
super(
|
|
74
|
+
"DetachedFieldIndex",
|
|
75
|
+
minVersionToDetachedFieldIndexSummaryFormatVersion(minVersionForCollab),
|
|
76
|
+
supportedVersions,
|
|
77
|
+
true,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
35
80
|
|
|
36
|
-
|
|
81
|
+
protected summarizeInternal(props: {
|
|
37
82
|
stringify: SummaryElementStringifier;
|
|
38
83
|
fullTree?: boolean;
|
|
39
84
|
trackState?: boolean;
|
|
40
85
|
telemetryContext?: ITelemetryContext;
|
|
41
86
|
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
42
|
-
|
|
87
|
+
builder: SummaryTreeBuilder;
|
|
88
|
+
}): void {
|
|
89
|
+
const { stringify, builder } = props;
|
|
43
90
|
const data = this.detachedFieldIndex.encode();
|
|
44
|
-
|
|
91
|
+
builder.addBlob(detachedFieldIndexBlobKey, stringify(data));
|
|
45
92
|
}
|
|
46
93
|
|
|
47
|
-
|
|
94
|
+
protected async loadInternal(
|
|
48
95
|
services: IChannelStorageService,
|
|
49
96
|
parse: SummaryElementParser,
|
|
50
97
|
): Promise<void> {
|
|
@@ -5,17 +5,27 @@
|
|
|
5
5
|
|
|
6
6
|
import { assert, oob } from "@fluidframework/core-utils/internal";
|
|
7
7
|
import type { MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
|
|
8
|
+
import {
|
|
9
|
+
getConfigForMinVersionForCollab,
|
|
10
|
+
lowestMinVersionForCollab,
|
|
11
|
+
} from "@fluidframework/runtime-utils/internal";
|
|
8
12
|
|
|
9
13
|
import {
|
|
10
14
|
type CodecTree,
|
|
11
15
|
type CodecWriteOptions,
|
|
16
|
+
FluidClientVersion,
|
|
12
17
|
type IJsonCodec,
|
|
13
18
|
makeVersionedValidatedCodec,
|
|
14
19
|
} from "../../codec/index.js";
|
|
15
20
|
import type { FieldKey, ITreeCursorSynchronous } from "../../core/index.js";
|
|
16
21
|
import type { FieldBatchCodec, FieldBatchEncodingContext } from "../chunked-forest/index.js";
|
|
17
22
|
|
|
18
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
ForestFormatVersion,
|
|
25
|
+
validVersions,
|
|
26
|
+
type Format,
|
|
27
|
+
FormatCommon,
|
|
28
|
+
} from "./formatCommon.js";
|
|
19
29
|
import { brand } from "../../util/index.js";
|
|
20
30
|
|
|
21
31
|
/**
|
|
@@ -29,11 +39,15 @@ export type ForestCodec = IJsonCodec<FieldSet, Format, Format, FieldBatchEncodin
|
|
|
29
39
|
* @param clientVersion - The MinimumVersionForCollab to convert.
|
|
30
40
|
* @returns The ForestFormatVersion that corresponds to the provided MinimumVersionForCollab.
|
|
31
41
|
*/
|
|
32
|
-
function
|
|
42
|
+
export function clientVersionToForestFormatVersion(
|
|
33
43
|
clientVersion: MinimumVersionForCollab,
|
|
34
44
|
): ForestFormatVersion {
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
return brand(
|
|
46
|
+
getConfigForMinVersionForCollab(clientVersion, {
|
|
47
|
+
[lowestMinVersionForCollab]: ForestFormatVersion.v1,
|
|
48
|
+
[FluidClientVersion.v2_74]: ForestFormatVersion.v2,
|
|
49
|
+
}),
|
|
50
|
+
);
|
|
37
51
|
}
|
|
38
52
|
|
|
39
53
|
export function makeForestSummarizerCodec(
|
|
@@ -41,11 +55,9 @@ export function makeForestSummarizerCodec(
|
|
|
41
55
|
fieldBatchCodec: FieldBatchCodec,
|
|
42
56
|
): ForestCodec {
|
|
43
57
|
const inner = fieldBatchCodec;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const writeVersion = clientVersionToForestSummaryVersion(options.minVersionForCollab);
|
|
48
|
-
return makeVersionedValidatedCodec(options, new Set([ForestFormatVersion.v1]), Format, {
|
|
58
|
+
const writeVersion = clientVersionToForestFormatVersion(options.minVersionForCollab);
|
|
59
|
+
const formatSchema = FormatCommon(writeVersion);
|
|
60
|
+
return makeVersionedValidatedCodec(options, validVersions, formatSchema, {
|
|
49
61
|
encode: (data: FieldSet, context: FieldBatchEncodingContext): Format => {
|
|
50
62
|
const keys: FieldKey[] = [];
|
|
51
63
|
const fields: ITreeCursorSynchronous[] = [];
|
|
@@ -70,5 +82,5 @@ export function makeForestSummarizerCodec(
|
|
|
70
82
|
export function getCodecTreeForForestFormat(
|
|
71
83
|
clientVersion: MinimumVersionForCollab,
|
|
72
84
|
): CodecTree {
|
|
73
|
-
return { name: "Forest", version:
|
|
85
|
+
return { name: "Forest", version: clientVersionToForestFormatVersion(clientVersion) };
|
|
74
86
|
}
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { bufferToString } from "@fluid-internal/client-utils";
|
|
7
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
8
7
|
import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
9
8
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
10
9
|
import type {
|
|
11
10
|
IExperimentalIncrementalSummaryContext,
|
|
12
|
-
ISummaryTreeWithStats,
|
|
13
11
|
ITelemetryContext,
|
|
14
12
|
} from "@fluidframework/runtime-definitions/internal";
|
|
13
|
+
import type { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
|
|
15
14
|
|
|
16
15
|
import type { CodecWriteOptions } from "../../codec/index.js";
|
|
17
16
|
import {
|
|
@@ -27,12 +26,13 @@ import {
|
|
|
27
26
|
forEachField,
|
|
28
27
|
makeDetachedFieldIndex,
|
|
29
28
|
} from "../../core/index.js";
|
|
30
|
-
import
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
import {
|
|
30
|
+
VersionedSummarizer,
|
|
31
|
+
type Summarizable,
|
|
32
|
+
type SummaryElementParser,
|
|
33
|
+
type SummaryElementStringifier,
|
|
34
34
|
} from "../../shared-tree-core/index.js";
|
|
35
|
-
import { idAllocatorFromMaxId,
|
|
35
|
+
import { idAllocatorFromMaxId, readAndParseSnapshotBlob } from "../../util/index.js";
|
|
36
36
|
// eslint-disable-next-line import-x/no-internal-modules
|
|
37
37
|
import { chunkFieldSingle, defaultChunkPolicy } from "../chunked-forest/chunkTree.js";
|
|
38
38
|
import {
|
|
@@ -42,31 +42,38 @@ import {
|
|
|
42
42
|
type IncrementalEncodingPolicy,
|
|
43
43
|
} from "../chunked-forest/index.js";
|
|
44
44
|
|
|
45
|
-
import {
|
|
45
|
+
import {
|
|
46
|
+
clientVersionToForestFormatVersion,
|
|
47
|
+
type ForestCodec,
|
|
48
|
+
makeForestSummarizerCodec,
|
|
49
|
+
} from "./codec.js";
|
|
46
50
|
import {
|
|
47
51
|
ForestIncrementalSummaryBehavior,
|
|
48
52
|
ForestIncrementalSummaryBuilder,
|
|
49
|
-
forestSummaryContentKey,
|
|
50
53
|
} from "./incrementalSummaryBuilder.js";
|
|
54
|
+
import {
|
|
55
|
+
minVersionToForestSummaryFormatVersion,
|
|
56
|
+
getForestRootSummaryContentKey,
|
|
57
|
+
} from "./summaryTypes.js";
|
|
51
58
|
import { TreeCompressionStrategy } from "../treeCompressionUtils.js";
|
|
52
|
-
import
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
*/
|
|
59
|
-
export const forestSummaryKey = "Forest";
|
|
59
|
+
import { ForestFormatVersion } from "./formatCommon.js";
|
|
60
|
+
import {
|
|
61
|
+
ForestSummaryFormatVersion,
|
|
62
|
+
forestSummaryKey,
|
|
63
|
+
supportedForestSummaryFormatVersions,
|
|
64
|
+
} from "./summaryFormatCommon.js";
|
|
60
65
|
|
|
61
66
|
/**
|
|
62
67
|
* Provides methods for summarizing and loading a forest.
|
|
63
68
|
*/
|
|
64
|
-
export class ForestSummarizer
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
export class ForestSummarizer
|
|
70
|
+
extends VersionedSummarizer<ForestSummaryFormatVersion>
|
|
71
|
+
implements Summarizable
|
|
72
|
+
{
|
|
67
73
|
private readonly codec: ForestCodec;
|
|
68
74
|
|
|
69
75
|
private readonly incrementalSummaryBuilder: ForestIncrementalSummaryBuilder;
|
|
76
|
+
private readonly forestRootSummaryContentKey: string;
|
|
70
77
|
|
|
71
78
|
/**
|
|
72
79
|
* @param encoderContext - The schema if provided here must be mutated by the caller to keep it up to date.
|
|
@@ -81,11 +88,32 @@ export class ForestSummarizer implements Summarizable {
|
|
|
81
88
|
initialSequenceNumber: number,
|
|
82
89
|
shouldEncodeIncrementally: IncrementalEncodingPolicy = defaultIncrementalEncodingPolicy,
|
|
83
90
|
) {
|
|
84
|
-
|
|
91
|
+
super(
|
|
92
|
+
forestSummaryKey,
|
|
93
|
+
minVersionToForestSummaryFormatVersion(options.minVersionForCollab),
|
|
94
|
+
supportedForestSummaryFormatVersions,
|
|
95
|
+
true /* supportPreVersioningFormat */,
|
|
96
|
+
);
|
|
97
|
+
|
|
85
98
|
this.codec = makeForestSummarizerCodec(options, fieldBatchCodec);
|
|
99
|
+
|
|
100
|
+
const forestFormatWriteVersion = clientVersionToForestFormatVersion(
|
|
101
|
+
options.minVersionForCollab,
|
|
102
|
+
);
|
|
103
|
+
const summaryFormatWriteVersion = minVersionToForestSummaryFormatVersion(
|
|
104
|
+
options.minVersionForCollab,
|
|
105
|
+
);
|
|
106
|
+
this.forestRootSummaryContentKey = getForestRootSummaryContentKey(
|
|
107
|
+
summaryFormatWriteVersion,
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
// Incremental summary is supported from ForestFormatVersion.v2 and ForestSummaryFormatVersion.v3 onwards.
|
|
111
|
+
const enableIncrementalSummary =
|
|
112
|
+
forestFormatWriteVersion >= ForestFormatVersion.v2 &&
|
|
113
|
+
summaryFormatWriteVersion >= ForestSummaryFormatVersion.v3 &&
|
|
114
|
+
encoderContext.encodeType === TreeCompressionStrategy.CompressedIncremental;
|
|
86
115
|
this.incrementalSummaryBuilder = new ForestIncrementalSummaryBuilder(
|
|
87
|
-
|
|
88
|
-
TreeCompressionStrategy.CompressedIncremental /* enableIncrementalSummary */,
|
|
116
|
+
enableIncrementalSummary,
|
|
89
117
|
(cursor: ITreeCursorSynchronous) => this.forest.chunkField(cursor),
|
|
90
118
|
shouldEncodeIncrementally,
|
|
91
119
|
initialSequenceNumber,
|
|
@@ -102,14 +130,15 @@ export class ForestSummarizer implements Summarizable {
|
|
|
102
130
|
*
|
|
103
131
|
* TODO: when perf matters, this should be replaced with a chunked async version using a binary format.
|
|
104
132
|
*/
|
|
105
|
-
|
|
133
|
+
protected summarizeInternal(props: {
|
|
106
134
|
stringify: SummaryElementStringifier;
|
|
107
135
|
fullTree?: boolean;
|
|
108
136
|
trackState?: boolean;
|
|
109
137
|
telemetryContext?: ITelemetryContext;
|
|
110
138
|
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
111
|
-
|
|
112
|
-
|
|
139
|
+
builder: SummaryTreeBuilder;
|
|
140
|
+
}): void {
|
|
141
|
+
const { stringify, fullTree = false, incrementalSummaryContext, builder } = props;
|
|
113
142
|
|
|
114
143
|
const rootCursor = this.forest.getCursorAboveDetachedFields();
|
|
115
144
|
const fieldMap: Map<FieldKey, ITreeCursorSynchronous & ITreeSubscriptionCursor> =
|
|
@@ -132,6 +161,7 @@ export class ForestSummarizer implements Summarizable {
|
|
|
132
161
|
fullTree,
|
|
133
162
|
incrementalSummaryContext,
|
|
134
163
|
stringify,
|
|
164
|
+
builder,
|
|
135
165
|
});
|
|
136
166
|
const encoderContext: FieldBatchEncodingContext = {
|
|
137
167
|
...this.encoderContext,
|
|
@@ -143,45 +173,48 @@ export class ForestSummarizer implements Summarizable {
|
|
|
143
173
|
const encoded = this.codec.encode(fieldMap, encoderContext);
|
|
144
174
|
fieldMap.forEach((value) => value.free());
|
|
145
175
|
|
|
146
|
-
|
|
176
|
+
this.incrementalSummaryBuilder.completeSummary({
|
|
147
177
|
incrementalSummaryContext,
|
|
148
|
-
|
|
178
|
+
forestSummaryRootContent: stringify(encoded),
|
|
179
|
+
forestSummaryRootContentKey: this.forestRootSummaryContentKey,
|
|
180
|
+
builder,
|
|
149
181
|
});
|
|
150
182
|
}
|
|
151
183
|
|
|
152
|
-
|
|
184
|
+
protected async loadInternal(
|
|
153
185
|
services: IChannelStorageService,
|
|
154
186
|
parse: SummaryElementParser,
|
|
187
|
+
version: ForestSummaryFormatVersion | undefined,
|
|
155
188
|
): Promise<void> {
|
|
156
|
-
//
|
|
189
|
+
// Get the key of the summary blob where the top-level forest content is stored based on the summary format version.
|
|
157
190
|
// If the summary was generated as `ForestIncrementalSummaryBehavior.SingleBlob`, this blob will contain all
|
|
158
191
|
// of forest's contents.
|
|
159
192
|
// If the summary was generated as `ForestIncrementalSummaryBehavior.Incremental`, this blob will contain only
|
|
160
193
|
// the top-level forest node's contents.
|
|
161
194
|
// The contents of the incremental chunks will be in separate tree nodes and will be read later during decoding.
|
|
195
|
+
const forestSummaryRootContentKey = getForestRootSummaryContentKey(version);
|
|
162
196
|
assert(
|
|
163
|
-
await services.contains(
|
|
197
|
+
await services.contains(forestSummaryRootContentKey),
|
|
164
198
|
0xc21 /* Forest summary content missing in snapshot */,
|
|
165
199
|
);
|
|
166
200
|
|
|
167
|
-
const readAndParseBlob = async <T extends JsonCompatible<IFluidHandle>>(
|
|
168
|
-
id: string,
|
|
169
|
-
): Promise<T> => {
|
|
170
|
-
const treeBuffer = await services.readBlob(id);
|
|
171
|
-
const treeBufferString = bufferToString(treeBuffer, "utf8");
|
|
172
|
-
return parse(treeBufferString) as T;
|
|
173
|
-
};
|
|
174
|
-
|
|
175
201
|
// Load the incremental summary builder so that it can download any incremental chunks in the
|
|
176
202
|
// snapshot.
|
|
177
|
-
await this.incrementalSummaryBuilder.load(
|
|
203
|
+
await this.incrementalSummaryBuilder.load({
|
|
204
|
+
services,
|
|
205
|
+
readAndParseChunk: async (chunkBlobPath: string) =>
|
|
206
|
+
readAndParseSnapshotBlob(chunkBlobPath, services, parse),
|
|
207
|
+
});
|
|
178
208
|
|
|
179
209
|
// TODO: this code is parsing data without an optional validator, this should be defined in a typebox schema as part of the
|
|
180
210
|
// forest summary format.
|
|
181
|
-
const fields = this.codec.decode(
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
211
|
+
const fields = this.codec.decode(
|
|
212
|
+
await readAndParseSnapshotBlob(forestSummaryRootContentKey, services, parse),
|
|
213
|
+
{
|
|
214
|
+
...this.encoderContext,
|
|
215
|
+
incrementalEncoderDecoder: this.incrementalSummaryBuilder,
|
|
216
|
+
},
|
|
217
|
+
);
|
|
185
218
|
const allocator = idAllocatorFromMaxId();
|
|
186
219
|
const fieldChanges: [FieldKey, DeltaFieldChanges][] = [];
|
|
187
220
|
const build: DeltaDetachedNodeBuild[] = [];
|
|
@@ -5,22 +5,23 @@
|
|
|
5
5
|
|
|
6
6
|
import { type Static, Type } from "@sinclair/typebox";
|
|
7
7
|
|
|
8
|
-
import { Versioned } from "../../codec/index.js";
|
|
9
8
|
import { schemaFormatV1 } from "../../core/index.js";
|
|
10
|
-
import {
|
|
9
|
+
import { strictEnum, type Values } from "../../util/index.js";
|
|
10
|
+
import { EncodedFieldBatch } from "../chunked-forest/index.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* The format version for the forest.
|
|
14
14
|
*/
|
|
15
|
-
export const ForestFormatVersion = {
|
|
15
|
+
export const ForestFormatVersion = strictEnum("ForestFormatVersion", {
|
|
16
16
|
v1: 1,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
>;
|
|
17
|
+
/** This format supports incremental encoding */
|
|
18
|
+
v2: 2,
|
|
19
|
+
});
|
|
20
|
+
export type ForestFormatVersion = Values<typeof ForestFormatVersion>;
|
|
22
21
|
|
|
23
|
-
const
|
|
22
|
+
export const validVersions = new Set([...Object.values(ForestFormatVersion)]);
|
|
23
|
+
|
|
24
|
+
export const FormatCommon = (
|
|
24
25
|
version: ForestFormatVersion,
|
|
25
26
|
// Return type is intentionally derived.
|
|
26
27
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
@@ -29,10 +30,8 @@ const FormatGeneric = (
|
|
|
29
30
|
{
|
|
30
31
|
version: Type.Literal(version),
|
|
31
32
|
keys: Type.Array(schemaFormatV1.FieldKeySchema),
|
|
32
|
-
fields:
|
|
33
|
+
fields: EncodedFieldBatch,
|
|
33
34
|
},
|
|
34
35
|
{ additionalProperties: false },
|
|
35
36
|
);
|
|
36
|
-
|
|
37
|
-
export const Format = FormatGeneric(brand<ForestFormatVersion>(ForestFormatVersion.v1));
|
|
38
|
-
export type Format = Static<typeof Format>;
|
|
37
|
+
export type Format = Static<ReturnType<typeof FormatCommon>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Static } from "@sinclair/typebox";
|
|
7
|
+
|
|
8
|
+
import { brand } from "../../util/index.js";
|
|
9
|
+
import { FormatCommon, ForestFormatVersion } from "./formatCommon.js";
|
|
10
|
+
|
|
11
|
+
export const FormatV1 = FormatCommon(brand<ForestFormatVersion>(ForestFormatVersion.v1));
|
|
12
|
+
export type FormatV1 = Static<typeof FormatV1>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Static } from "@sinclair/typebox";
|
|
7
|
+
|
|
8
|
+
import { brand } from "../../util/index.js";
|
|
9
|
+
import { FormatCommon, ForestFormatVersion } from "./formatCommon.js";
|
|
10
|
+
|
|
11
|
+
export const FormatV2 = FormatCommon(brand<ForestFormatVersion>(ForestFormatVersion.v2));
|
|
12
|
+
export type FormatV2 = Static<typeof FormatV2>;
|