@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
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type
|
|
6
|
+
import { strictEnum, type Values } from "../util/index.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The format version for the message.
|
|
10
10
|
*/
|
|
11
|
-
export const MessageFormatVersion = {
|
|
11
|
+
export const MessageFormatVersion = strictEnum("MessageFormatVersion", {
|
|
12
12
|
/**
|
|
13
13
|
* NOTE: this is written as `undefined` rather than `0` in the wire format.
|
|
14
14
|
* Introduced and retired prior to 2.0.
|
|
@@ -27,32 +27,39 @@ export const MessageFormatVersion = {
|
|
|
27
27
|
v2: 2,
|
|
28
28
|
/**
|
|
29
29
|
* Introduced prior to 2.0 and used beyond.
|
|
30
|
-
* Reading capability
|
|
31
|
-
* Writing capability needs to be maintained.
|
|
30
|
+
* Reading capability must be maintained for backwards compatibility.
|
|
31
|
+
* Writing capability needs to be maintained so long as {@link lowestMinVersionForCollab} is less than 2.2.0.
|
|
32
32
|
*/
|
|
33
33
|
v3: 3,
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Introduced in 2.2.0.
|
|
36
|
+
* Was inadvertently made usable for writing in 2.43.0 (through configuredSharedTree) and remains available.
|
|
36
37
|
* Reading capability must be maintained for backwards compatibility.
|
|
37
|
-
* Writing capability
|
|
38
|
-
*
|
|
38
|
+
* Writing capability could be dropped in favor of {@link MessageFormatVersion.v3},
|
|
39
|
+
* but doing so would make the pattern of writable versions more complex and gain little
|
|
40
|
+
* because most of the logic for this format is shared with {@link MessageFormatVersion.v3}.
|
|
39
41
|
*/
|
|
40
42
|
v4: 4,
|
|
43
|
+
/**
|
|
44
|
+
* This version number was used internally for testing shared branches.
|
|
45
|
+
* This format was never made stable.
|
|
46
|
+
* This version number is kept here solely to avoid reusing the number: it is not supported for either reading or writing.
|
|
47
|
+
* @deprecated Use {@link MessageFormatVersion.vSharedBranches} for testing shared branches.
|
|
48
|
+
*/
|
|
49
|
+
v5: 5,
|
|
41
50
|
/**
|
|
42
51
|
* Not yet released.
|
|
43
52
|
* Only used for testing shared branches.
|
|
44
53
|
*/
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
export type MessageFormatVersion =
|
|
48
|
-
|
|
49
|
-
"MessageFormatVersion"
|
|
50
|
-
>;
|
|
54
|
+
vSharedBranches: "shared-branches|v0.1",
|
|
55
|
+
});
|
|
56
|
+
export type MessageFormatVersion = Values<typeof MessageFormatVersion>;
|
|
57
|
+
|
|
51
58
|
export const supportedMessageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set([
|
|
52
59
|
MessageFormatVersion.v3,
|
|
53
60
|
MessageFormatVersion.v4,
|
|
54
|
-
MessageFormatVersion.
|
|
55
|
-
]
|
|
61
|
+
MessageFormatVersion.vSharedBranches,
|
|
62
|
+
]);
|
|
56
63
|
export const messageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set(
|
|
57
|
-
Object.values(MessageFormatVersion)
|
|
64
|
+
Object.values(MessageFormatVersion),
|
|
58
65
|
);
|
|
@@ -9,6 +9,7 @@ import { type TSchema, Type } from "@sinclair/typebox";
|
|
|
9
9
|
import { type EncodedRevisionTag, RevisionTagSchema, SessionIdSchema } from "../core/index.js";
|
|
10
10
|
import type { JsonCompatibleReadOnly } from "../util/index.js";
|
|
11
11
|
import type { EncodedBranchId } from "./branch.js";
|
|
12
|
+
import { MessageFormatVersion } from "./messageFormat.js";
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* The format of messages that SharedTree sends and receives.
|
|
@@ -30,12 +31,9 @@ export interface Message {
|
|
|
30
31
|
readonly branchId?: EncodedBranchId;
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
|
-
* The version of the message
|
|
34
|
-
*
|
|
35
|
-
* This was not set historically and was added before making any breaking changes to the format.
|
|
36
|
-
* For that reason, absence of a 'version' field is synonymous with version 1.
|
|
34
|
+
* The version of the message format.
|
|
37
35
|
*/
|
|
38
|
-
readonly version
|
|
36
|
+
readonly version: typeof MessageFormatVersion.vSharedBranches;
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
// Return type is intentionally derived.
|
|
@@ -46,5 +44,5 @@ export const Message = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>
|
|
|
46
44
|
originatorId: SessionIdSchema,
|
|
47
45
|
changeset: Type.Optional(tChange),
|
|
48
46
|
branchId: Type.Optional(Type.Number()),
|
|
49
|
-
version: Type.
|
|
47
|
+
version: Type.Literal(MessageFormatVersion.vSharedBranches),
|
|
50
48
|
});
|
|
@@ -62,9 +62,16 @@ import {
|
|
|
62
62
|
import type { DecodedMessage } from "./messageTypes.js";
|
|
63
63
|
import type { ResubmitMachine } from "./resubmitMachine.js";
|
|
64
64
|
import type { MessageFormatVersion } from "./messageFormat.js";
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
import {
|
|
66
|
+
minVersionToSharedTreeSummaryFormatVersion,
|
|
67
|
+
summarizablesTreeKey,
|
|
68
|
+
supportedSharedTreeSummaryFormatVersions,
|
|
69
|
+
type SharedTreeSummaryFormatVersion,
|
|
70
|
+
type Summarizable,
|
|
71
|
+
type SummaryElementParser,
|
|
72
|
+
type SummaryElementStringifier,
|
|
73
|
+
} from "./summaryTypes.js";
|
|
74
|
+
import { VersionedSummarizer } from "./versionedSummarizer.js";
|
|
68
75
|
|
|
69
76
|
export interface ClonableSchemaAndPolicy extends SchemaAndPolicy {
|
|
70
77
|
schema: TreeStoredSchemaRepository;
|
|
@@ -80,7 +87,8 @@ export interface SharedTreeCoreOptionsInternal
|
|
|
80
87
|
*/
|
|
81
88
|
@breakingClass
|
|
82
89
|
export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
83
|
-
|
|
90
|
+
extends VersionedSummarizer<SharedTreeSummaryFormatVersion>
|
|
91
|
+
implements WithBreakable, Summarizable
|
|
84
92
|
{
|
|
85
93
|
private readonly editManager: EditManager<TEditor, TChange, ChangeFamily<TEditor, TChange>>;
|
|
86
94
|
private readonly summarizables: readonly [EditManagerSummarizer<TChange>, ...Summarizable[]];
|
|
@@ -139,6 +147,13 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
139
147
|
enricher?: ChangeEnricherReadonlyCheckout<TChange>,
|
|
140
148
|
public readonly getEditor: () => TEditor = () => this.getLocalBranch().editor,
|
|
141
149
|
) {
|
|
150
|
+
super(
|
|
151
|
+
summarizablesTreeKey,
|
|
152
|
+
minVersionToSharedTreeSummaryFormatVersion(options.minVersionForCollab),
|
|
153
|
+
supportedSharedTreeSummaryFormatVersions,
|
|
154
|
+
true /* supportPreVersioningFormat */,
|
|
155
|
+
);
|
|
156
|
+
|
|
142
157
|
this.schemaAndPolicy = {
|
|
143
158
|
schema,
|
|
144
159
|
policy: schemaPolicy,
|
|
@@ -178,6 +193,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
178
193
|
this.editManager,
|
|
179
194
|
editManagerCodec,
|
|
180
195
|
this.idCompressor,
|
|
196
|
+
options.minVersionForCollab,
|
|
181
197
|
this.schemaAndPolicy,
|
|
182
198
|
),
|
|
183
199
|
...summarizables,
|
|
@@ -203,14 +219,16 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
203
219
|
|
|
204
220
|
// TODO: SharedObject's merging of the two summary methods into summarizeCore is not what we want here:
|
|
205
221
|
// We might want to not subclass it, or override/reimplement most of its functionality.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
222
|
+
protected summarizeInternal(props: {
|
|
223
|
+
stringify: SummaryElementStringifier;
|
|
224
|
+
fullTree?: boolean;
|
|
225
|
+
trackState?: boolean;
|
|
226
|
+
telemetryContext?: ITelemetryContext;
|
|
227
|
+
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
228
|
+
builder: SummaryTreeBuilder;
|
|
229
|
+
}): void {
|
|
230
|
+
const { stringify, fullTree, telemetryContext, incrementalSummaryContext, builder } =
|
|
231
|
+
props;
|
|
214
232
|
const summarizableBuilder = new SummaryTreeBuilder();
|
|
215
233
|
// Merge the summaries of all summarizables together under a single ISummaryTree
|
|
216
234
|
for (const s of this.summarizables) {
|
|
@@ -226,28 +244,24 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
226
244
|
summarizableBuilder.addWithStats(
|
|
227
245
|
s.key,
|
|
228
246
|
s.summarize({
|
|
229
|
-
stringify
|
|
230
|
-
serializer.stringify(contents, this.sharedObject.handle),
|
|
247
|
+
stringify,
|
|
231
248
|
fullTree,
|
|
232
249
|
telemetryContext,
|
|
233
250
|
incrementalSummaryContext: childIncrementalSummaryContext,
|
|
234
251
|
}),
|
|
235
252
|
);
|
|
236
253
|
}
|
|
237
|
-
|
|
238
254
|
builder.addWithStats(summarizablesTreeKey, summarizableBuilder.getSummaryTree());
|
|
239
|
-
return builder.getSummaryTree();
|
|
240
255
|
}
|
|
241
256
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
);
|
|
257
|
+
protected async loadInternal(
|
|
258
|
+
services: IChannelStorageService,
|
|
259
|
+
parse: SummaryElementParser,
|
|
260
|
+
): Promise<void> {
|
|
247
261
|
const [editManagerSummarizer, ...summarizables] = this.summarizables;
|
|
248
|
-
const loadEditManager = this.loadSummarizable(editManagerSummarizer, services);
|
|
262
|
+
const loadEditManager = this.loadSummarizable(editManagerSummarizer, services, parse);
|
|
249
263
|
const loadSummarizables = summarizables.map(async (s) =>
|
|
250
|
-
this.loadSummarizable(s, services),
|
|
264
|
+
this.loadSummarizable(s, services, parse),
|
|
251
265
|
);
|
|
252
266
|
|
|
253
267
|
if (this.detachedRevision !== undefined) {
|
|
@@ -268,6 +282,30 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
268
282
|
}
|
|
269
283
|
}
|
|
270
284
|
|
|
285
|
+
@throwIfBroken
|
|
286
|
+
public summarizeCore(
|
|
287
|
+
serializer: IFluidSerializer,
|
|
288
|
+
telemetryContext?: ITelemetryContext,
|
|
289
|
+
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext,
|
|
290
|
+
fullTree?: boolean,
|
|
291
|
+
): ISummaryTreeWithStats {
|
|
292
|
+
return this.summarize({
|
|
293
|
+
stringify: (contents: unknown) =>
|
|
294
|
+
serializer.stringify(contents, this.sharedObject.handle),
|
|
295
|
+
fullTree,
|
|
296
|
+
telemetryContext,
|
|
297
|
+
incrementalSummaryContext,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
public async loadCore(services: IChannelStorageService): Promise<void> {
|
|
302
|
+
assert(
|
|
303
|
+
this.getLocalBranch().getHead() === this.editManager.getTrunkHead("main"),
|
|
304
|
+
0xaaa /* All local changes should be applied to the trunk before loading from summary */,
|
|
305
|
+
);
|
|
306
|
+
await super.load(services, (contents) => this.serializer.parse(contents));
|
|
307
|
+
}
|
|
308
|
+
|
|
271
309
|
private registerSharedBranch(branchId: BranchId): void {
|
|
272
310
|
this.editManager.getLocalBranch(branchId).events.on("beforeChange", (change) => {
|
|
273
311
|
if (change.type === "append") {
|
|
@@ -286,10 +324,11 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
286
324
|
private async loadSummarizable(
|
|
287
325
|
summarizable: Summarizable,
|
|
288
326
|
services: IChannelStorageService,
|
|
327
|
+
parse: SummaryElementParser,
|
|
289
328
|
): Promise<void> {
|
|
290
329
|
return summarizable.load(
|
|
291
330
|
scopeStorageService(services, summarizablesTreeKey, summarizable.key),
|
|
292
|
-
|
|
331
|
+
parse,
|
|
293
332
|
);
|
|
294
333
|
}
|
|
295
334
|
|
|
@@ -646,57 +685,6 @@ function isClonableSchemaPolicy(
|
|
|
646
685
|
return schemaAndPolicy.schema !== undefined && schemaAndPolicy.policy !== undefined;
|
|
647
686
|
}
|
|
648
687
|
|
|
649
|
-
/**
|
|
650
|
-
* Specifies the behavior of a component that puts data in a summary.
|
|
651
|
-
*/
|
|
652
|
-
export interface Summarizable {
|
|
653
|
-
/**
|
|
654
|
-
* Field name in summary json under which this element stores its data.
|
|
655
|
-
*/
|
|
656
|
-
readonly key: string;
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* {@inheritDoc @fluidframework/datastore-definitions#(IChannel:interface).summarize}
|
|
660
|
-
* @param stringify - Serializes the contents of the component (including {@link (IFluidHandle:interface)}s) for storage.
|
|
661
|
-
* @param fullTree - A flag indicating whether the attempt should generate a full
|
|
662
|
-
* summary tree without any handles for unchanged subtrees. It should only be set to true when generating
|
|
663
|
-
* a summary from the entire container. The default value is false.
|
|
664
|
-
* @param trackState - An optimization for tracking state of objects across summaries. If the state
|
|
665
|
-
* of an object did not change since last successful summary, an
|
|
666
|
-
* {@link @fluidframework/protocol-definitions#ISummaryHandle} can be used
|
|
667
|
-
* instead of re-summarizing it. If this is `false`, the expectation is that you should never
|
|
668
|
-
* send an `ISummaryHandle`, since you are not expected to track state. The default value is true.
|
|
669
|
-
* @param telemetryContext - See {@link @fluidframework/runtime-definitions#ITelemetryContext}.
|
|
670
|
-
* @param incrementalSummaryContext - See {@link @fluidframework/runtime-definitions#IExperimentalIncrementalSummaryContext}.
|
|
671
|
-
*/
|
|
672
|
-
summarize(props: {
|
|
673
|
-
stringify: SummaryElementStringifier;
|
|
674
|
-
fullTree?: boolean;
|
|
675
|
-
trackState?: boolean;
|
|
676
|
-
telemetryContext?: ITelemetryContext;
|
|
677
|
-
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
678
|
-
}): ISummaryTreeWithStats;
|
|
679
|
-
|
|
680
|
-
/**
|
|
681
|
-
* Allows the component to perform custom loading. The storage service is scoped to this component and therefore
|
|
682
|
-
* paths in this component will not collide with those in other components, even if they are the same string.
|
|
683
|
-
* @param service - Storage used by the component
|
|
684
|
-
* @param parse - Parses serialized data from storage into runtime objects for the component
|
|
685
|
-
*/
|
|
686
|
-
load(service: IChannelStorageService, parse: SummaryElementParser): Promise<void>;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* Serializes the given contents into a string acceptable for storing in summaries, i.e. all
|
|
691
|
-
* Fluid handles have been replaced appropriately by an IFluidSerializer
|
|
692
|
-
*/
|
|
693
|
-
export type SummaryElementStringifier = (contents: unknown) => string;
|
|
694
|
-
|
|
695
|
-
/**
|
|
696
|
-
* Parses a serialized/summarized string into an object, rehydrating any Fluid handles as necessary
|
|
697
|
-
*/
|
|
698
|
-
export type SummaryElementParser = (contents: string) => unknown;
|
|
699
|
-
|
|
700
688
|
/**
|
|
701
689
|
* Compose an {@link IChannelStorageService} which prefixes all paths before forwarding them to the original service
|
|
702
690
|
*/
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
7
|
+
import type {
|
|
8
|
+
IExperimentalIncrementalSummaryContext,
|
|
9
|
+
ISummaryTreeWithStats,
|
|
10
|
+
ITelemetryContext,
|
|
11
|
+
MinimumVersionForCollab,
|
|
12
|
+
} from "@fluidframework/runtime-definitions/internal";
|
|
13
|
+
|
|
14
|
+
// TODO: Organize this to be adjacent to persisted types.
|
|
15
|
+
/**
|
|
16
|
+
* The storage key for the subtree containing all summarizable indexes in the SharedTree summary.
|
|
17
|
+
*/
|
|
18
|
+
export const summarizablesTreeKey = "indexes";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The storage key for the blob containing metadata for the summarizable's summary.
|
|
22
|
+
*/
|
|
23
|
+
export const summarizablesMetadataKey = ".metadata";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Specifies the behavior of a component that puts data in a summary.
|
|
27
|
+
*/
|
|
28
|
+
export interface Summarizable {
|
|
29
|
+
/**
|
|
30
|
+
* Field name in summary json under which this element stores its data.
|
|
31
|
+
*/
|
|
32
|
+
readonly key: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* {@inheritDoc @fluidframework/datastore-definitions#(IChannel:interface).summarize}
|
|
36
|
+
* @param stringify - Serializes the contents of the component (including {@link (IFluidHandle:interface)}s) for storage.
|
|
37
|
+
* @param fullTree - A flag indicating whether the attempt should generate a full
|
|
38
|
+
* summary tree without any handles for unchanged subtrees. It should only be set to true when generating
|
|
39
|
+
* a summary from the entire container. The default value is false.
|
|
40
|
+
* @param trackState - An optimization for tracking state of objects across summaries. If the state
|
|
41
|
+
* of an object did not change since last successful summary, an
|
|
42
|
+
* {@link @fluidframework/protocol-definitions#ISummaryHandle} can be used
|
|
43
|
+
* instead of re-summarizing it. If this is `false`, the expectation is that you should never
|
|
44
|
+
* send an `ISummaryHandle`, since you are not expected to track state. The default value is true.
|
|
45
|
+
* @param telemetryContext - See {@link @fluidframework/runtime-definitions#ITelemetryContext}.
|
|
46
|
+
* @param incrementalSummaryContext - See {@link @fluidframework/runtime-definitions#IExperimentalIncrementalSummaryContext}.
|
|
47
|
+
*/
|
|
48
|
+
summarize(props: {
|
|
49
|
+
stringify: SummaryElementStringifier;
|
|
50
|
+
fullTree?: boolean;
|
|
51
|
+
trackState?: boolean;
|
|
52
|
+
telemetryContext?: ITelemetryContext;
|
|
53
|
+
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
54
|
+
}): ISummaryTreeWithStats;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Allows the component to perform custom loading. The storage service is scoped to this component and therefore
|
|
58
|
+
* paths in this component will not collide with those in other components, even if they are the same string.
|
|
59
|
+
* @param service - Storage used by the component
|
|
60
|
+
* @param parse - Parses serialized data from storage into runtime objects for the component
|
|
61
|
+
*/
|
|
62
|
+
load(service: IChannelStorageService, parse: SummaryElementParser): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Serializes the given contents into a string acceptable for storing in summaries, i.e. all
|
|
67
|
+
* Fluid handles have been replaced appropriately by an IFluidSerializer
|
|
68
|
+
*/
|
|
69
|
+
export type SummaryElementStringifier = (contents: unknown) => string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Parses a serialized/summarized string into an object, rehydrating any Fluid handles as necessary
|
|
73
|
+
*/
|
|
74
|
+
export type SummaryElementParser = (contents: string) => unknown;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The type for the metadata in the summarizable's summary.
|
|
78
|
+
* The metadata is stored under the {@link summarizablesMetadataKey} key in the summary.
|
|
79
|
+
* @remarks
|
|
80
|
+
* This is common metadata used by all summarizables. If a summarizable needs to add more metadata,
|
|
81
|
+
* it should define its own metadata type that extends this type.
|
|
82
|
+
*/
|
|
83
|
+
// Using type definition instead of interface to make this compatible with JsonCompatible.
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
85
|
+
export type SharedTreeSummarizableMetadata = {
|
|
86
|
+
/** The version of the SharedTree summary. */
|
|
87
|
+
readonly version: number;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The versions for the SharedTree summary format.
|
|
92
|
+
*/
|
|
93
|
+
export const enum SharedTreeSummaryFormatVersion {
|
|
94
|
+
/**
|
|
95
|
+
* This version represents summary format before summary versioning was introduced.
|
|
96
|
+
*/
|
|
97
|
+
v1 = 1,
|
|
98
|
+
/**
|
|
99
|
+
* This version adds metadata to the summary. This is backward compatible with version 1.
|
|
100
|
+
*/
|
|
101
|
+
v2 = 2,
|
|
102
|
+
/**
|
|
103
|
+
* The latest version of the SharedTree summary. Must be updated when a new version is added.
|
|
104
|
+
*/
|
|
105
|
+
vLatest = v2,
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const supportedSharedTreeSummaryFormatVersions =
|
|
109
|
+
new Set<SharedTreeSummaryFormatVersion>([
|
|
110
|
+
SharedTreeSummaryFormatVersion.v1,
|
|
111
|
+
SharedTreeSummaryFormatVersion.v2,
|
|
112
|
+
]);
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Returns the summary version to use as per the given minimum version for collab.
|
|
116
|
+
*/
|
|
117
|
+
export function minVersionToSharedTreeSummaryFormatVersion(
|
|
118
|
+
version: MinimumVersionForCollab,
|
|
119
|
+
): SharedTreeSummaryFormatVersion {
|
|
120
|
+
// Currently, version 2 is written which adds metadata blob to the summary.
|
|
121
|
+
return SharedTreeSummaryFormatVersion.v2;
|
|
122
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
8
|
+
import type {
|
|
9
|
+
IExperimentalIncrementalSummaryContext,
|
|
10
|
+
ISummaryTreeWithStats,
|
|
11
|
+
ITelemetryContext,
|
|
12
|
+
} from "@fluidframework/runtime-definitions/internal";
|
|
13
|
+
import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
|
|
14
|
+
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
15
|
+
import {
|
|
16
|
+
summarizablesMetadataKey,
|
|
17
|
+
type SharedTreeSummarizableMetadata,
|
|
18
|
+
type Summarizable,
|
|
19
|
+
type SummaryElementParser,
|
|
20
|
+
type SummaryElementStringifier,
|
|
21
|
+
} from "./summaryTypes.js";
|
|
22
|
+
import { readAndParseSnapshotBlob } from "../util/index.js";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Utility for implementing {@link Summarizable}s classes with versioning.
|
|
26
|
+
* It handles versioning of summaries - writing version metadata to summaries
|
|
27
|
+
* and checking version compatibility when loading.
|
|
28
|
+
*/
|
|
29
|
+
export abstract class VersionedSummarizer<TVersion extends number> implements Summarizable {
|
|
30
|
+
public constructor(
|
|
31
|
+
/** {@link Summarizable.key} */
|
|
32
|
+
public readonly key: string,
|
|
33
|
+
/** The format version of the summary to write in the summary metadata. */
|
|
34
|
+
private readonly writeVersion: TVersion,
|
|
35
|
+
/** The set of supported versions that a summary can have for this summarizer to load it. */
|
|
36
|
+
private readonly supportedVersions: ReadonlySet<TVersion>,
|
|
37
|
+
/**
|
|
38
|
+
* Whether to support loading summaries before versioning was added, i.e., summaries without metadata blob.
|
|
39
|
+
* @remarks
|
|
40
|
+
* This version may not be supported if the support for the version before metadata blob was dropped.
|
|
41
|
+
* In that case, this will not be present in `supportedVersions` and an error will be thrown during load.
|
|
42
|
+
*/
|
|
43
|
+
private readonly supportPreVersioningFormat: boolean,
|
|
44
|
+
) {
|
|
45
|
+
assert(
|
|
46
|
+
this.supportedVersions.has(this.writeVersion),
|
|
47
|
+
0xca6 /* Unsupported write version requested. */,
|
|
48
|
+
() => `Write version ${this.writeVersion} requested but not supported with key ${key}.`,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The summarize function that derived classes must implement. They should use the passed summary tree builder to
|
|
54
|
+
* add their summary data.
|
|
55
|
+
*/
|
|
56
|
+
protected abstract summarizeInternal(props: {
|
|
57
|
+
stringify: SummaryElementStringifier;
|
|
58
|
+
fullTree?: boolean;
|
|
59
|
+
trackState?: boolean;
|
|
60
|
+
telemetryContext?: ITelemetryContext;
|
|
61
|
+
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
62
|
+
builder: SummaryTreeBuilder;
|
|
63
|
+
}): void;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The load function that derived classes must implement to load their summary data.
|
|
67
|
+
*/
|
|
68
|
+
protected abstract loadInternal(
|
|
69
|
+
services: IChannelStorageService,
|
|
70
|
+
parse: SummaryElementParser,
|
|
71
|
+
/**
|
|
72
|
+
* The format version of the summary being loaded, or undefined if this is pre-versioning format,
|
|
73
|
+
* i.e., the summary has no version metadata.
|
|
74
|
+
*/
|
|
75
|
+
version: TVersion | undefined,
|
|
76
|
+
): Promise<void>;
|
|
77
|
+
|
|
78
|
+
public summarize(props: {
|
|
79
|
+
stringify: SummaryElementStringifier;
|
|
80
|
+
fullTree?: boolean;
|
|
81
|
+
trackState?: boolean;
|
|
82
|
+
telemetryContext?: ITelemetryContext;
|
|
83
|
+
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
|
|
84
|
+
}): ISummaryTreeWithStats {
|
|
85
|
+
const builder = new SummaryTreeBuilder();
|
|
86
|
+
const metadata: SharedTreeSummarizableMetadata = {
|
|
87
|
+
version: this.writeVersion,
|
|
88
|
+
};
|
|
89
|
+
builder.addBlob(summarizablesMetadataKey, props.stringify(metadata));
|
|
90
|
+
this.summarizeInternal({ ...props, builder });
|
|
91
|
+
return builder.getSummaryTree();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
public async load(
|
|
95
|
+
services: IChannelStorageService,
|
|
96
|
+
parse: SummaryElementParser,
|
|
97
|
+
): Promise<void> {
|
|
98
|
+
let version: TVersion | undefined;
|
|
99
|
+
if (await services.contains(summarizablesMetadataKey)) {
|
|
100
|
+
const metadata = await readAndParseSnapshotBlob<SharedTreeSummarizableMetadata>(
|
|
101
|
+
summarizablesMetadataKey,
|
|
102
|
+
services,
|
|
103
|
+
(contents) => parse(contents),
|
|
104
|
+
);
|
|
105
|
+
version = metadata.version as TVersion;
|
|
106
|
+
if (!this.supportedVersions.has(version)) {
|
|
107
|
+
throw new UsageError(`Cannot read version ${version} of shared tree summary.`);
|
|
108
|
+
}
|
|
109
|
+
} else if (!this.supportPreVersioningFormat) {
|
|
110
|
+
throw new UsageError(`Cannot read summary without versioning for shared tree summary.`);
|
|
111
|
+
}
|
|
112
|
+
await this.loadInternal(services, parse, version);
|
|
113
|
+
}
|
|
114
|
+
}
|