@fluidframework/tree 2.73.0 → 2.74.0-368706
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 +2 -2
- package/api-report/tree.alpha.api.md +133 -85
- 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/dist/alpha.d.ts +7 -2
- package/dist/codec/codec.d.ts +14 -1
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +11 -0
- 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/change-family/changeFamily.d.ts +4 -1
- package/dist/core/change-family/changeFamily.d.ts.map +1 -1
- package/dist/core/change-family/changeFamily.js.map +1 -1
- package/dist/core/change-family/index.d.ts +1 -1
- package/dist/core/change-family/index.d.ts.map +1 -1
- package/dist/core/change-family/index.js.map +1 -1
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +7 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.d.ts +6 -1
- package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
- package/dist/core/rebase/changeRebaser.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 +2 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +2 -1
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +5 -1
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/rebase/utils.d.ts.map +1 -1
- package/dist/core/rebase/utils.js +25 -7
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +40 -13
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +21 -12
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/index.d.ts +4 -3
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +6 -2
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts +11 -3
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js +14 -2
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +7 -0
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +4 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +15 -7
- 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/defaultEditBuilder.d.ts +90 -42
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +234 -69
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +4 -4
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +33 -28
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +2 -1
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +4 -2
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +36 -0
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +1 -0
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +126 -0
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +1 -0
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +7 -6
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js +15 -0
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/dist/feature-libraries/deltaUtils.d.ts +1 -0
- package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
- package/dist/feature-libraries/deltaUtils.js +6 -1
- package/dist/feature-libraries/deltaUtils.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/flex-tree/context.d.ts +9 -0
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +6 -0
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +8 -7
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +37 -8
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts +2 -2
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +4 -4
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +9 -13
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +22 -27
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/format.d.ts +41 -5
- package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/format.js +7 -7
- package/dist/feature-libraries/forest-summary/format.js.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +11 -9
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +16 -29
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts +2 -1
- package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/index.js +3 -2
- package/dist/feature-libraries/forest-summary/index.js.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts +47 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.js +57 -0
- package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
- package/dist/feature-libraries/index.d.ts +5 -5
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +7 -4
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.js +1 -0
- package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
- package/dist/feature-libraries/mitigatedChangeFamily.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/crossFieldQueries.d.ts +97 -21
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js +4 -7
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +20 -52
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.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 +7 -10
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +2 -2
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +5 -5
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +12 -8
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +17 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +388 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +17 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +413 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +4 -4
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +8 -284
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +48 -15
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +1298 -465
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/{modularChangeFormat.d.ts → modularChangeFormatV1.d.ts} +2 -2
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/{modularChangeFormat.js → modularChangeFormatV1.js} +5 -5
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +146 -0
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +32 -0
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +50 -10
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js +24 -3
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/optional-field/index.d.ts +2 -2
- package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/index.js +1 -2
- package/dist/feature-libraries/optional-field/index.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts +5 -26
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +217 -451
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +24 -33
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +57 -28
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +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/feature-libraries/sequence-field/compose.d.ts +6 -7
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +80 -256
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.js +1 -0
- package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts +14 -10
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
- package/dist/feature-libraries/sequence-field/index.d.ts +2 -3
- package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/index.js +1 -3
- package/dist/feature-libraries/sequence-field/index.js.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +65 -167
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +4 -56
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.js +7 -86
- package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.js +106 -112
- package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.js +16 -33
- package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +0 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +22 -4
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +358 -179
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +20 -60
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +14 -109
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts +30 -59
- package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/types.js.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.d.ts +15 -24
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +111 -299
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/feature-libraries/treeCompressionUtils.d.ts +2 -12
- package/dist/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
- package/dist/feature-libraries/treeCompressionUtils.js +4 -14
- package/dist/feature-libraries/treeCompressionUtils.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -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.map +1 -1
- package/dist/shared-tree/index.d.ts +1 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts +4 -4
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +2 -1
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +1 -5
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +32 -33
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +18 -15
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +15 -4
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +1 -0
- 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/sharedTreeChangeFamily.d.ts +6 -6
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts +16 -6
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +13 -6
- package/dist/shared-tree/sharedTreeEditBuilder.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 +14 -12
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +66 -17
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +3 -2
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +4 -3
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts +2 -2
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +9 -9
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +4 -0
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +16 -6
- 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 +20 -6
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +22 -7
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js +1 -0
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +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 -3
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +8 -1
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.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 +4 -0
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +16 -6
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +20 -6
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +22 -7
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js +8 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/{messageFormatV5.d.ts → 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 +14 -47
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +30 -18
- 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 +67 -0
- package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
- package/dist/shared-tree-core/versionedSummarizer.js +63 -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/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 +16 -13
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js +24 -14
- package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +4 -5
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +5 -6
- 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/tree.d.ts +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/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +1 -0
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +15 -15
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +59 -8
- package/dist/simple-tree/core/unhydratedFlexTree.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 +7 -7
- 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 +8 -7
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +16 -13
- 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 +6 -3
- 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/common.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/common.js +1 -1
- package/dist/simple-tree/node-kinds/common.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 +2 -2
- 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/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +19 -18
- package/dist/simple-tree/node-kinds/object/objectNode.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 +4 -2
- 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/prepareForInsertion.d.ts +54 -47
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +183 -125
- package/dist/simple-tree/prepareForInsertion.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/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +13 -4
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +29 -11
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/dist/tableSchema.d.ts +117 -63
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +159 -58
- package/dist/tableSchema.js.map +1 -1
- package/dist/treeFactory.d.ts +5 -0
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +29 -8
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/breakable.js +3 -3
- package/dist/util/breakable.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 +4 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/rangeMap.d.ts +24 -12
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +46 -6
- package/dist/util/rangeMap.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/dist/util/typeCheckTests.d.ts.map +1 -1
- package/dist/util/typeCheckTests.js.map +1 -1
- package/lib/alpha.d.ts +7 -2
- package/lib/codec/codec.d.ts +14 -1
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +11 -0
- 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/change-family/changeFamily.d.ts +4 -1
- package/lib/core/change-family/changeFamily.d.ts.map +1 -1
- package/lib/core/change-family/changeFamily.js.map +1 -1
- package/lib/core/change-family/index.d.ts +1 -1
- package/lib/core/change-family/index.d.ts.map +1 -1
- package/lib/core/change-family/index.js.map +1 -1
- package/lib/core/index.d.ts +3 -3
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +2 -2
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/changeRebaser.d.ts +6 -1
- package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
- package/lib/core/rebase/changeRebaser.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 +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/types.d.ts +2 -1
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +3 -0
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/rebase/utils.d.ts.map +1 -1
- package/lib/core/rebase/utils.js +25 -7
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +40 -13
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +22 -13
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/index.d.ts +4 -3
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +3 -2
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts +11 -3
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js +12 -1
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +8 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +4 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +15 -7
- 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/defaultEditBuilder.d.ts +90 -42
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +232 -69
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +4 -4
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +34 -29
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +2 -1
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +2 -1
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +36 -0
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +1 -0
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +122 -0
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +1 -0
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +7 -6
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js +15 -0
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/lib/feature-libraries/deltaUtils.d.ts +1 -0
- package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
- package/lib/feature-libraries/deltaUtils.js +5 -1
- package/lib/feature-libraries/deltaUtils.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/flex-tree/context.d.ts +9 -0
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +6 -0
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +8 -7
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +38 -9
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts +2 -2
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +5 -5
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +9 -13
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +19 -24
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/format.d.ts +41 -5
- package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/format.js +3 -3
- package/lib/feature-libraries/forest-summary/format.js.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +11 -9
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +13 -26
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts +2 -1
- package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/index.js +2 -1
- package/lib/feature-libraries/forest-summary/index.js.map +1 -1
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts +47 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.js +53 -0
- package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
- package/lib/feature-libraries/index.d.ts +5 -5
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +4 -4
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.js +2 -1
- package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
- package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
- package/lib/feature-libraries/mitigatedChangeFamily.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/crossFieldQueries.d.ts +97 -21
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js +3 -5
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +20 -52
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.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 +7 -10
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +5 -5
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +4 -3
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +17 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +384 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +17 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +409 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +4 -4
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +10 -286
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +48 -15
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +1284 -458
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/{modularChangeFormat.d.ts → modularChangeFormatV1.d.ts} +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/{modularChangeFormat.js → modularChangeFormatV1.js} +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +146 -0
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +29 -0
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +50 -10
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js +20 -2
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/optional-field/index.d.ts +2 -2
- package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/index.js +1 -1
- package/lib/feature-libraries/optional-field/index.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts +5 -26
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +217 -449
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +24 -33
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +55 -26
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +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/feature-libraries/sequence-field/compose.d.ts +6 -7
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +82 -258
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.js +1 -0
- package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts +14 -10
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
- package/lib/feature-libraries/sequence-field/index.d.ts +2 -3
- package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/index.js +0 -1
- package/lib/feature-libraries/sequence-field/index.js.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.js +67 -169
- package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +4 -56
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.js +6 -80
- package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.js +108 -114
- package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/replaceRevisions.js +16 -33
- package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +0 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +22 -4
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +350 -175
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +21 -61
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +14 -109
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts +30 -59
- package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/types.js.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.d.ts +15 -24
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +107 -292
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/feature-libraries/treeCompressionUtils.d.ts +2 -12
- package/lib/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
- package/lib/feature-libraries/treeCompressionUtils.js +3 -13
- package/lib/feature-libraries/treeCompressionUtils.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- 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.map +1 -1
- package/lib/shared-tree/index.d.ts +1 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts +4 -4
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +3 -2
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +1 -5
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +35 -36
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +18 -15
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +15 -4
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +1 -0
- 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/sharedTreeChangeFamily.d.ts +6 -6
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +3 -3
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts +16 -6
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +11 -5
- package/lib/shared-tree/sharedTreeEditBuilder.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 +14 -12
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +69 -20
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +3 -2
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +4 -3
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts +2 -2
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +9 -9
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +4 -0
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +14 -5
- 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 +20 -6
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +22 -7
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js +1 -0
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +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 -3
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +4 -2
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.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 +4 -0
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +14 -5
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +20 -6
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +22 -7
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js +8 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/{messageFormatV5.d.ts → 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 +14 -47
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +28 -16
- 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 +67 -0
- package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
- package/lib/shared-tree-core/versionedSummarizer.js +59 -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/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 +16 -13
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js +23 -13
- package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +4 -5
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +3 -4
- 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/tree.d.ts +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/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +1 -0
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +15 -15
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +58 -8
- package/lib/simple-tree/core/unhydratedFlexTree.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 +7 -7
- 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 +8 -7
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +6 -5
- 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 +7 -4
- 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/common.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/common.js +2 -2
- package/lib/simple-tree/node-kinds/common.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 +2 -2
- 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/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +20 -19
- package/lib/simple-tree/node-kinds/object/objectNode.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 +4 -2
- 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/prepareForInsertion.d.ts +54 -47
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/lib/simple-tree/prepareForInsertion.js +183 -124
- package/lib/simple-tree/prepareForInsertion.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/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +13 -4
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +26 -9
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/lib/tableSchema.d.ts +117 -63
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +160 -59
- package/lib/tableSchema.js.map +1 -1
- package/lib/treeFactory.d.ts +5 -0
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +28 -8
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/breakable.js +3 -3
- package/lib/util/breakable.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/rangeMap.d.ts +24 -12
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +44 -5
- package/lib/util/rangeMap.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/lib/util/typeCheckTests.d.ts.map +1 -1
- package/lib/util/typeCheckTests.js.map +1 -1
- package/package.json +22 -22
- package/src/codec/codec.ts +15 -1
- package/src/codec/versioned/codec.ts +1 -1
- package/src/codec/versioned/format.ts +4 -1
- package/src/core/change-family/changeFamily.ts +5 -0
- package/src/core/change-family/index.ts +1 -0
- package/src/core/index.ts +7 -2
- package/src/core/rebase/changeRebaser.ts +6 -1
- package/src/core/rebase/index.ts +1 -0
- package/src/core/rebase/types.ts +8 -1
- package/src/core/rebase/utils.ts +31 -7
- package/src/core/tree/detachedFieldIndex.ts +71 -14
- package/src/core/tree/index.ts +9 -3
- package/src/core/tree/pathTree.ts +16 -4
- package/src/feature-libraries/chunked-forest/basicChunk.ts +7 -1
- package/src/feature-libraries/chunked-forest/chunkTree.ts +6 -1
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +3 -7
- package/src/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.ts +18 -11
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +9 -9
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +393 -127
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +35 -38
- package/src/feature-libraries/default-schema/index.ts +16 -5
- package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +180 -0
- package/src/feature-libraries/default-schema/mappedEditBuilder.ts +35 -9
- package/src/feature-libraries/deltaUtils.ts +6 -1
- package/src/feature-libraries/detachedFieldIndexSummarizer.ts +62 -15
- package/src/feature-libraries/flex-tree/context.ts +17 -0
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +7 -8
- package/src/feature-libraries/flex-tree/lazyField.ts +66 -24
- package/src/feature-libraries/forest-summary/codec.ts +8 -8
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +47 -39
- package/src/feature-libraries/forest-summary/format.ts +4 -4
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +23 -39
- package/src/feature-libraries/forest-summary/index.ts +2 -1
- package/src/feature-libraries/forest-summary/summaryTypes.ts +61 -0
- package/src/feature-libraries/index.ts +23 -14
- package/src/feature-libraries/mapTreeCursor.ts +2 -1
- package/src/feature-libraries/mitigatedChangeFamily.ts +3 -1
- package/src/feature-libraries/modular-schema/comparison.ts +63 -5
- package/src/feature-libraries/modular-schema/crossFieldQueries.ts +142 -44
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +36 -57
- package/src/feature-libraries/modular-schema/fieldKind.ts +24 -40
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +10 -19
- package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -1
- package/src/feature-libraries/modular-schema/index.ts +21 -15
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +732 -0
- package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +790 -0
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +32 -505
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2542 -742
- package/src/feature-libraries/modular-schema/{modularChangeFormat.ts → modularChangeFormatV1.ts} +2 -1
- package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +62 -0
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +98 -10
- package/src/feature-libraries/optional-field/index.ts +1 -3
- package/src/feature-libraries/optional-field/optionalField.ts +317 -574
- package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +24 -38
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +89 -35
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +59 -18
- package/src/feature-libraries/sequence-field/compose.ts +134 -519
- package/src/feature-libraries/sequence-field/formatV2.ts +1 -0
- package/src/feature-libraries/sequence-field/helperTypes.ts +34 -19
- package/src/feature-libraries/sequence-field/index.ts +0 -9
- package/src/feature-libraries/sequence-field/invert.ts +103 -228
- package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
- package/src/feature-libraries/sequence-field/moveEffectTable.ts +8 -191
- package/src/feature-libraries/sequence-field/rebase.ts +168 -203
- package/src/feature-libraries/sequence-field/replaceRevisions.ts +31 -52
- package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +0 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +643 -220
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +56 -68
- package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +25 -27
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +19 -129
- package/src/feature-libraries/sequence-field/types.ts +34 -64
- package/src/feature-libraries/sequence-field/utils.ts +133 -346
- package/src/feature-libraries/treeCompressionUtils.ts +1 -15
- package/src/index.ts +7 -2
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +1 -1
- package/src/shared-tree/index.ts +3 -2
- package/src/shared-tree/schematizeTree.ts +21 -8
- package/src/shared-tree/schematizingTreeView.ts +50 -68
- package/src/shared-tree/sharedTree.ts +51 -30
- package/src/shared-tree/sharedTreeChangeCodecs.ts +5 -1
- package/src/shared-tree/sharedTreeChangeEnricher.ts +31 -11
- package/src/shared-tree/sharedTreeChangeFamily.ts +9 -6
- package/src/shared-tree/sharedTreeEditBuilder.ts +46 -12
- package/src/shared-tree/treeAlpha.ts +2 -3
- package/src/shared-tree/treeCheckout.ts +106 -33
- package/src/shared-tree-core/branch.ts +8 -2
- package/src/shared-tree-core/editManager.ts +16 -2
- package/src/shared-tree-core/editManagerCodecs.ts +17 -5
- package/src/shared-tree-core/{editManagerCodecsV5.ts → editManagerCodecsVSharedBranches.ts} +3 -3
- package/src/shared-tree-core/editManagerFormatCommons.ts +22 -7
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +3 -1
- 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 +11 -3
- package/src/shared-tree-core/messageCodecV1ToV4.ts +2 -1
- package/src/shared-tree-core/{messageCodecV5.ts → messageCodecVSharedBranches.ts} +3 -3
- package/src/shared-tree-core/messageCodecs.ts +17 -5
- package/src/shared-tree-core/messageFormat.ts +22 -7
- package/src/shared-tree-core/messageFormatV1ToV4.ts +16 -2
- package/src/shared-tree-core/{messageFormatV5.ts → messageFormatVSharedBranches.ts} +4 -6
- package/src/shared-tree-core/sharedTreeCore.ts +67 -76
- package/src/shared-tree-core/summaryTypes.ts +122 -0
- package/src/shared-tree-core/versionedSummarizer.ts +107 -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/getSimpleSchema.ts +13 -6
- package/src/simple-tree/api/incrementalAllowedTypes.ts +34 -20
- package/src/simple-tree/api/index.ts +4 -5
- 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/tree.ts +1 -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/treeNodeKernel.ts +1 -0
- package/src/simple-tree/core/unhydratedFlexTree.ts +87 -36
- package/src/simple-tree/core/walkSchema.ts +6 -0
- package/src/simple-tree/createContext.ts +26 -11
- package/src/simple-tree/fieldSchema.ts +16 -7
- package/src/simple-tree/index.ts +13 -12
- package/src/simple-tree/node-kinds/array/arrayNode.ts +14 -7
- package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +3 -3
- package/src/simple-tree/node-kinds/common.ts +2 -5
- package/src/simple-tree/node-kinds/map/mapNode.ts +9 -6
- package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +3 -3
- package/src/simple-tree/node-kinds/object/objectNode.ts +28 -27
- package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +6 -2
- package/src/simple-tree/node-kinds/record/recordNode.ts +15 -11
- package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +3 -3
- package/src/simple-tree/prepareForInsertion.ts +343 -200
- 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/simple-tree/unhydratedFlexTreeFromInsertable.ts +42 -14
- package/src/tableSchema.ts +485 -166
- package/src/treeFactory.ts +32 -9
- package/src/util/breakable.ts +4 -4
- package/src/util/index.ts +5 -0
- package/src/util/rangeMap.ts +72 -18
- package/src/util/readSnapshotBlob.ts +23 -0
- package/src/util/typeCheckTests.ts +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +0 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +0 -9
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +0 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +0 -50
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.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/docs/main/sequence-field/move-composition.md +0 -46
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +0 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +0 -9
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +0 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +0 -46
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.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/feature-libraries/sequence-field/relevantRemovedRoots.ts +0 -57
- package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +0 -209
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTree.js","sourceRoot":"","sources":["../../src/shared-tree/sharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AASnE,OAAO,EACN,UAAU,GAEV,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAGN,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,GAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAKN,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAIhB,0BAA0B,EAG1B,uCAAuC,EACvC,sBAAsB,EACtB,mBAAmB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,4BAA4B,EAC5B,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,EACX,gCAAgC,EAChC,mBAAmB,EACnB,+BAA+B,EAC/B,2BAA2B,EAC3B,2BAA2B,EAC3B,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,eAAe,GAGf,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAEN,uCAAuC,EACvC,mCAAmC,EAEnC,0CAA0C,EAC1C,sCAAsC,EAEtC,oBAAoB,EACpB,cAAc,EACd,wBAAwB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGN,QAAQ,EASR,sBAAsB,EAEtB,SAAS,GAIT,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAG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D,IAAI,MAAM,YAAY,sBAAsB,EAAE,CAAC;QAC9C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAqC,CAAC;QAC5D,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;YAC1D,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,GAAG,6BAA6B,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO;YACN,IAAI,EAAE,QAAQ,CAAC,MAAM;YACrB,MAAM;YACN,0BAA0B,EAAE,SAAS;YACrC,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,MAAM,CAAC,QAAQ;SAClC,CAAC;IACH,CAAC;IACD,IAAI,MAAM,YAAY,mBAAmB,EAAE,CAAC;QAC3C,MAAM,CACL,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,UAAU,CAAC,QAAQ,CAAC,UAAU,EACxD,KAAK,CAAC,wBAAwB,CAC9B,CAAC;QACF,OAAO;YACN,IAAI,EAAE,QAAQ,CAAC,GAAG;YAClB,kBAAkB,EAAE,+CAA+C,CAClE,MAAM,CAAC,SAAS,CAAC,KAAK,CACtB;YACD,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,MAAM,CAAC,QAAQ;SAClC,CAAC;IACH,CAAC;IACD,IAAI,MAAM,YAAY,oBAAoB,EAAE,CAAC;QAC5C,OAAO;YACN,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,QAAQ,EAAE,MAAM,CAAC,SAAS;YAC1B,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,MAAM,CAAC,QAAQ;SAClC,CAAC;IACH,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACvC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType, IFluidLoadable } from \"@fluidframework/core-interfaces/internal\";\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport type { IIdCompressor, StableId } from \"@fluidframework/id-compressor\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport type {\n\tIChannelView,\n\tIFluidSerializer,\n\tSharedKernel,\n} from \"@fluidframework/shared-object-base/internal\";\nimport {\n\tUsageError,\n\ttype ITelemetryLoggerExt,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\ttype CodecTree,\n\ttype CodecWriteOptions,\n\tDependentFormatVersion,\n\tFluidClientVersion,\n\tFormatValidatorNoOp,\n\ttype ICodecOptions,\n} from \"../codec/index.js\";\nimport {\n\ttype FieldKey,\n\ttype GraphCommit,\n\ttype IEditableForest,\n\ttype JsonableTree,\n\tLeafNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tRevisionTagCodec,\n\ttype TreeFieldStoredSchema,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\ttype TreeStoredSchemaSubscription,\n\ttype TreeTypeSet,\n\tgetCodecTreeForDetachedFieldIndexFormat,\n\tmakeDetachedFieldIndex,\n\tmoveToDetachedField,\n} from \"../core/index.js\";\nimport {\n\tDetachedFieldIndexSummarizer,\n\tFieldKinds,\n\tForestSummarizer,\n\tSchemaSummarizer,\n\tTreeCompressionStrategy,\n\tbuildChunkedForest,\n\tbuildForest,\n\tdefaultIncrementalEncodingPolicy,\n\tdefaultSchemaPolicy,\n\tgetCodecTreeForFieldBatchFormat,\n\tgetCodecTreeForForestFormat,\n\tgetCodecTreeForSchemaFormat,\n\tjsonableTreeFromFieldCursor,\n\tmakeFieldBatchCodec,\n\tmakeMitigatedChangeFamily,\n\tmakeSchemaCodec,\n\tmakeTreeChunker,\n\ttype IncrementalEncodingPolicy,\n\ttype TreeCompressionStrategyPrivate,\n} from \"../feature-libraries/index.js\";\n// eslint-disable-next-line import-x/no-internal-modules\nimport type { FormatV1 } from \"../feature-libraries/schema-index/index.js\";\nimport {\n\ttype BranchId,\n\tclientVersionToEditManagerFormatVersion,\n\tclientVersionToMessageFormatVersion,\n\ttype ClonableSchemaAndPolicy,\n\tgetCodecTreeForEditManagerFormatWithChange,\n\tgetCodecTreeForMessageFormatWithChange,\n\ttype SharedTreCoreOptionsInternal,\n\tMessageFormatVersion,\n\tSharedTreeCore,\n\tEditManagerFormatVersion,\n} from \"../shared-tree-core/index.js\";\nimport {\n\ttype ITree,\n\ttype ImplicitFieldSchema,\n\tNodeKind,\n\ttype ReadSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleTreeSchema,\n\ttype TreeView,\n\ttype TreeViewAlpha,\n\ttype TreeViewConfiguration,\n\ttype UnsafeUnknownSchema,\n\ttype VerboseTree,\n\ttryStoredSchemaAsArray,\n\ttype SimpleNodeSchema,\n\tFieldKind,\n\ttype ITreeAlpha,\n\ttype SimpleObjectFieldSchema,\n\ttype SimpleAllowedTypeAttributes,\n} from \"../simple-tree/index.js\";\n\nimport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\nimport { SharedTreeReadonlyChangeEnricher } from \"./sharedTreeChangeEnricher.js\";\nimport { SharedTreeChangeFamily } from \"./sharedTreeChangeFamily.js\";\nimport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\nimport type { SharedTreeEditBuilder } from \"./sharedTreeEditBuilder.js\";\nimport { type TreeCheckout, type BranchableTree, createTreeCheckout } from \"./treeCheckout.js\";\nimport {\n\tbrand,\n\ttype Breakable,\n\tbreakingClass,\n\ttype JsonCompatible,\n\tthrowIfBroken,\n} from \"../util/index.js\";\nimport {\n\tgetCodecTreeForChangeFormat,\n\ttype SharedTreeChangeFormatVersion,\n} from \"./sharedTreeChangeCodecs.js\";\n\n/**\n * Copy of data from an {@link ITreePrivate} at some point in time.\n * @remarks\n * This is unrelated to Fluids concept of \"snapshots\".\n */\nexport interface SharedTreeContentSnapshot {\n\t/**\n\t * The schema stored in the document.\n\t *\n\t * @remarks\n\t * Edits to the schema can mutate the schema stored of the tree which took this snapshot (but this snapshot will remain the same)\n\t * This is mainly useful for debugging cases where schematize reports an incompatible view schema.\n\t */\n\treadonly schema: TreeStoredSchema;\n\t/**\n\t * All {@link TreeStatus.InDocument} content.\n\t */\n\treadonly tree: JsonableTree[];\n\t/**\n\t * All {@link TreeStatus.Removed} content.\n\t */\n\treadonly removed: [string | number | undefined, number, JsonableTree][];\n}\n\n/**\n * {@link ITree} extended with some non-public APIs.\n * @internal\n */\nexport interface ITreeInternal extends IChannelView, ITreeAlpha {}\n\n/**\n * {@link ITreeInternal} extended with some non-exported APIs.\n * @remarks\n * This allows access to the tree content using the internal data model used at the storage and \"flex\" layers,\n * and should only be needed for testing and debugging this package's internals.\n */\nexport interface ITreePrivate extends ITreeInternal {\n\t/**\n\t * Provides a copy of the current content of the tree.\n\t * This can be useful for inspecting the tree when no suitable view schema is available.\n\t * This is only intended for use in testing and exceptional code paths: it is not performant.\n\t *\n\t * This does not include everything that is included in a tree summary, since information about how to merge future edits is omitted.\n\t */\n\tcontentSnapshot(): SharedTreeContentSnapshot;\n\n\t/**\n\t * Access to internals for testing.\n\t */\n\treadonly kernel: SharedTreeKernel;\n}\n\n/**\n * The type SharedTree's kernel's view must implement so what when its merged with the underling SharedObject's API it fully implements the required tree API surface ({@link ITreePrivate }).\n */\nexport type SharedTreeKernelView = Omit<ITreePrivate, keyof (IChannelView & IFluidLoadable)>;\n\n/**\n * SharedTreeCore, configured with a good set of indexes and field kinds which will maintain compatibility over time.\n *\n * TODO: detail compatibility requirements.\n */\n@breakingClass\nexport class SharedTreeKernel\n\textends SharedTreeCore<SharedTreeEditBuilder, SharedTreeChange>\n\timplements SharedKernel\n{\n\tpublic readonly checkout: TreeCheckout;\n\tpublic get storedSchema(): TreeStoredSchemaRepository {\n\t\treturn this.checkout.storedSchema;\n\t}\n\n\tprivate readonly checkouts: Map<BranchId, TreeCheckout> = new Map();\n\n\t/**\n\t * The app-facing API for SharedTree implemented by this Kernel.\n\t * @remarks\n\t * This is the API grafted onto the ISharedObject which apps can access.\n\t * It includes both the APIs used for internal testing, and public facing APIs (both stable and unstable).\n\t * Different users will have access to different subsets of this API, see {@link ITree}, {@link ITreeAlpha} and {@link ITreeInternal} which this {@link ITreePrivate} extends.\n\t */\n\tpublic readonly view: SharedTreeKernelView;\n\n\tpublic constructor(\n\t\tbreaker: Breakable,\n\t\tsharedObject: IChannelView & IFluidLoadable,\n\t\tserializer: IFluidSerializer,\n\t\tsubmitLocalMessage: (content: unknown, localOpMetadata?: unknown) => void,\n\t\tlastSequenceNumber: () => number | undefined,\n\t\tinitialSequenceNumber: number,\n\t\tprivate readonly logger: ITelemetryLoggerExt | undefined,\n\t\tidCompressor: IIdCompressor,\n\t\toptionsParam: SharedTreeOptionsInternal,\n\t) {\n\t\tconst options: Required<SharedTreeOptionsInternal> = {\n\t\t\t...defaultSharedTreeOptions,\n\t\t\t...optionsParam,\n\t\t};\n\t\tif (options.minVersionForCollab < FluidClientVersion.v2_0) {\n\t\t\tthrow new UsageError(\"SharedTree requires minVersionForCollab of at least 2.0.0\");\n\t\t}\n\t\tconst schema = new TreeStoredSchemaRepository();\n\t\tconst forest = buildConfiguredForest(\n\t\t\tbreaker,\n\t\t\toptions.forest,\n\t\t\tschema,\n\t\t\tidCompressor,\n\t\t\toptions.shouldEncodeIncrementally,\n\t\t);\n\t\tconst revisionTagCodec = new RevisionTagCodec(idCompressor);\n\t\tconst removedRoots = makeDetachedFieldIndex(\n\t\t\t\"repair\",\n\t\t\trevisionTagCodec,\n\t\t\tidCompressor,\n\t\t\toptions,\n\t\t);\n\t\tconst schemaCodec = makeSchemaCodec(options);\n\t\tconst schemaSummarizer = new SchemaSummarizer(\n\t\t\tschema,\n\t\t\t{\n\t\t\t\tgetCurrentSeq: lastSequenceNumber,\n\t\t\t},\n\t\t\tschemaCodec,\n\t\t);\n\t\tconst fieldBatchCodec = makeFieldBatchCodec(options);\n\n\t\tconst encoderContext = {\n\t\t\tschema: {\n\t\t\t\tschema,\n\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t},\n\t\t\tencodeType: options.treeEncodeType,\n\t\t\toriginatorId: idCompressor.localSessionId,\n\t\t\tidCompressor,\n\t\t};\n\t\tconst forestSummarizer = new ForestSummarizer(\n\t\t\tforest,\n\t\t\trevisionTagCodec,\n\t\t\tfieldBatchCodec,\n\t\t\tencoderContext,\n\t\t\toptions,\n\t\t\tidCompressor,\n\t\t\tinitialSequenceNumber,\n\t\t\toptions.shouldEncodeIncrementally,\n\t\t);\n\t\tconst removedRootsSummarizer = new DetachedFieldIndexSummarizer(removedRoots);\n\t\tconst innerChangeFamily = new SharedTreeChangeFamily(\n\t\t\trevisionTagCodec,\n\t\t\tfieldBatchCodec,\n\t\t\toptions,\n\t\t\toptions.treeEncodeType,\n\t\t\tidCompressor,\n\t\t);\n\t\tconst changeFamily = makeMitigatedChangeFamily(\n\t\t\tinnerChangeFamily,\n\t\t\tSharedTreeChangeFamily.emptyChange,\n\t\t\t(error: unknown) => {\n\t\t\t\t// TODO:6344 Add telemetry for these errors.\n\t\t\t\t// Rethrowing the error has a different effect depending on the context in which the\n\t\t\t\t// ChangeFamily was invoked:\n\t\t\t\t// - If the ChangeFamily was invoked as part of incoming op processing, rethrowing the error\n\t\t\t\t// will cause the runtime to disconnect the client, log a severe error, and not reconnect.\n\t\t\t\t// This will not cause the host application to crash because it is not on the stack at that time.\n\t\t\t\t// TODO: let the host application know that the client is now disconnected.\n\t\t\t\t// - If the ChangeFamily was invoked as part of dealing with a local change, rethrowing the\n\t\t\t\t// error will cause the host application to crash. This is not ideal, but is better than\n\t\t\t\t// letting the application either send an invalid change to the server or allowing the\n\t\t\t\t// application to continue working when its local branches contain edits that cannot be\n\t\t\t\t// reflected in its views.\n\t\t\t\t// The best course of action for a host application in such a state is to restart.\n\t\t\t\t// TODO: let the host application know about this situation and provide a way to\n\t\t\t\t// programmatically reload the SharedTree container.\n\t\t\t\tthrow error;\n\t\t\t},\n\t\t);\n\t\tconst changeEnricher = new SharedTreeReadonlyChangeEnricher(forest, schema, removedRoots);\n\t\tsuper(\n\t\t\tbreaker,\n\t\t\tsharedObject,\n\t\t\tserializer,\n\t\t\tsubmitLocalMessage,\n\t\t\tlogger,\n\t\t\t[schemaSummarizer, forestSummarizer, removedRootsSummarizer],\n\t\t\tchangeFamily,\n\t\t\toptions,\n\t\t\tchangeFormatVersionForEditManager,\n\t\t\tchangeFormatVersionForMessage,\n\t\t\tidCompressor,\n\t\t\tschema,\n\t\t\tdefaultSchemaPolicy,\n\t\t\tundefined,\n\t\t\tchangeEnricher,\n\t\t);\n\n\t\tthis.checkout = createTreeCheckout(idCompressor, this.mintRevisionTag, revisionTagCodec, {\n\t\t\tbranch: this.getLocalBranch(),\n\t\t\tchangeFamily,\n\t\t\tschema,\n\t\t\tforest,\n\t\t\tfieldBatchCodec,\n\t\t\tremovedRoots,\n\t\t\tchunkCompressionStrategy: options.treeEncodeType,\n\t\t\tlogger,\n\t\t\tbreaker: this.breaker,\n\t\t\tdisposeForksAfterTransaction: options.disposeForksAfterTransaction,\n\t\t});\n\n\t\tthis.registerCheckout(\"main\", this.checkout);\n\n\t\tthis.view = {\n\t\t\tcontentSnapshot: () => this.contentSnapshot(),\n\t\t\texportSimpleSchema: () => this.exportSimpleSchema(),\n\t\t\texportVerbose: () => this.exportVerbose(),\n\t\t\tviewWith: this.viewWith.bind(this),\n\t\t\tviewSharedBranchWith: this.viewBranchWith.bind(this),\n\t\t\tcreateSharedBranch: this.createSharedBranch.bind(this),\n\t\t\tgetSharedBranchIds: this.getSharedBranchIds.bind(this),\n\t\t\tkernel: this,\n\t\t};\n\t}\n\n\tprivate registerCheckout(branchId: BranchId, checkout: TreeCheckout): void {\n\t\tthis.checkouts.set(branchId, checkout);\n\t\tconst enricher = this.getCommitEnricher(branchId);\n\t\tcheckout.transaction.events.on(\"started\", () => {\n\t\t\tif (this.sharedObject.isAttached()) {\n\t\t\t\t// It is currently forbidden to attach during a transaction, so transaction state changes can be ignored until after attaching.\n\t\t\t\tenricher.startTransaction();\n\t\t\t}\n\t\t});\n\n\t\tcheckout.transaction.events.on(\"aborting\", () => {\n\t\t\tif (this.sharedObject.isAttached()) {\n\t\t\t\t// It is currently forbidden to attach during a transaction, so transaction state changes can be ignored until after attaching.\n\t\t\t\tenricher.abortTransaction();\n\t\t\t}\n\t\t});\n\t\tcheckout.transaction.events.on(\"committing\", () => {\n\t\t\tif (this.sharedObject.isAttached()) {\n\t\t\t\t// It is currently forbidden to attach during a transaction, so transaction state changes can be ignored until after attaching.\n\t\t\t\tenricher.commitTransaction();\n\t\t\t}\n\t\t});\n\t\tcheckout.events.on(\"beforeBatch\", (event) => {\n\t\t\tif (event.type === \"append\" && this.sharedObject.isAttached()) {\n\t\t\t\tif (checkout.transaction.isInProgress()) {\n\t\t\t\t\tenricher.addTransactionCommits(event.newCommits);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic exportVerbose(): VerboseTree | undefined {\n\t\treturn this.checkout.exportVerbose();\n\t}\n\n\tpublic exportSimpleSchema(): SimpleTreeSchema {\n\t\treturn exportSimpleSchema(this.storedSchema);\n\t}\n\n\t@throwIfBroken\n\tpublic contentSnapshot(): SharedTreeContentSnapshot {\n\t\tconst cursor = this.checkout.forest.allocateCursor(\"contentSnapshot\");\n\t\ttry {\n\t\t\tmoveToDetachedField(this.checkout.forest, cursor);\n\t\t\treturn {\n\t\t\t\tschema: this.storedSchema.clone(),\n\t\t\t\ttree: jsonableTreeFromFieldCursor(cursor),\n\t\t\t\tremoved: this.checkout.getRemovedRoots(),\n\t\t\t};\n\t\t} finally {\n\t\t\tcursor.free();\n\t\t}\n\t}\n\n\t// For the new TreeViewAlpha API\n\tpublic viewWith<TRoot extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\t\tconfig: TreeViewConfiguration<ReadSchema<TRoot>>,\n\t): SchematizingSimpleTreeView<TRoot> & TreeView<ReadSchema<TRoot>>;\n\n\t// For the old TreeView API\n\tpublic viewWith<TRoot extends ImplicitFieldSchema>(\n\t\tconfig: TreeViewConfiguration<TRoot>,\n\t): SchematizingSimpleTreeView<TRoot> & TreeView<TRoot>;\n\n\tpublic viewWith<TRoot extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\t\tconfig: TreeViewConfiguration<ReadSchema<TRoot>>,\n\t): SchematizingSimpleTreeView<TRoot> & TreeView<ReadSchema<TRoot>> {\n\t\treturn this.checkout.viewWith(config) as SchematizingSimpleTreeView<TRoot> &\n\t\t\tTreeView<ReadSchema<TRoot>>;\n\t}\n\n\tpublic viewBranchWith<TRoot extends ImplicitFieldSchema>(\n\t\tbranchId: string,\n\t\tconfig: TreeViewConfiguration<TRoot>,\n\t): TreeView<TRoot>;\n\n\tpublic viewBranchWith<TRoot extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\t\tbranchId: string,\n\t\tconfig: TreeViewConfiguration<ReadSchema<TRoot>>,\n\t): SchematizingSimpleTreeView<TRoot> & TreeView<ReadSchema<TRoot>> {\n\t\tconst compressedId = this.idCompressor.tryRecompress(branchId as StableId);\n\t\tif (compressedId === undefined) {\n\t\t\tthrow new UsageError(`No branch found with id: ${branchId}`);\n\t\t}\n\t\treturn this.getCheckout(compressedId).viewWith(\n\t\t\tconfig,\n\t\t) as SchematizingSimpleTreeView<TRoot> & TreeView<ReadSchema<TRoot>>;\n\t}\n\n\tprivate getCheckout(branchId: BranchId): TreeCheckout {\n\t\treturn this.checkouts.get(branchId) ?? this.checkoutBranch(branchId);\n\t}\n\n\tprivate checkoutBranch(branchId: BranchId): TreeCheckout {\n\t\tconst checkout = this.checkout.branch();\n\t\tcheckout.switchBranch(this.getSharedBranch(branchId));\n\t\tconst enricher = new SharedTreeReadonlyChangeEnricher(\n\t\t\tcheckout.forest,\n\t\t\tcheckout.storedSchema,\n\t\t\tcheckout.removedRoots,\n\t\t);\n\n\t\tthis.registerSharedBranchForEditing(branchId, enricher);\n\t\tthis.registerCheckout(branchId, checkout);\n\t\treturn checkout;\n\t}\n\n\tpublic override async loadCore(services: IChannelStorageService): Promise<void> {\n\t\tawait super.loadCore(services);\n\t\tthis.checkout.load();\n\t}\n\n\tpublic override didAttach(): void {\n\t\tfor (const checkout of this.checkouts.values()) {\n\t\t\tif (checkout.transaction.isInProgress()) {\n\t\t\t\t// Attaching during a transaction is not currently supported.\n\t\t\t\t// At least part of of the system is known to not handle this case correctly - commit enrichment - and there may be others.\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot attach while a transaction is in progress. Commit or abort the transaction before attaching.\",\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tsuper.didAttach();\n\t}\n\n\tpublic override applyStashedOp(\n\t\t...args: Parameters<\n\t\t\tSharedTreeCore<SharedTreeEditBuilder, SharedTreeChange>[\"applyStashedOp\"]\n\t\t>\n\t): void {\n\t\tfor (const checkout of this.checkouts.values()) {\n\t\t\tassert(\n\t\t\t\t!checkout.transaction.isInProgress(),\n\t\t\t\t0x674 /* Unexpected transaction is open while applying stashed ops */,\n\t\t\t);\n\t\t}\n\t\tsuper.applyStashedOp(...args);\n\t}\n\n\tprotected override submitCommit(\n\t\tbranchId: BranchId,\n\t\tcommit: GraphCommit<SharedTreeChange>,\n\t\tschemaAndPolicy: ClonableSchemaAndPolicy,\n\t\tisResubmit: boolean,\n\t): void {\n\t\tconst checkout = this.getCheckout(branchId);\n\t\tassert(\n\t\t\t!checkout.transaction.isInProgress(),\n\t\t\t0xaa6 /* Cannot submit a commit while a transaction is in progress */,\n\t\t);\n\t\tif (isResubmit) {\n\t\t\treturn super.submitCommit(branchId, commit, schemaAndPolicy, isResubmit);\n\t\t}\n\n\t\t// Refrain from submitting new commits until they are validated by the checkout.\n\t\t// This is not a strict requirement for correctness in our system, but in the event that there is a bug when applying commits to the checkout\n\t\t// that causes a crash (e.g. in the forest), this will at least prevent this client from sending the problematic commit to any other clients.\n\t\tcheckout.onCommitValid(commit, () =>\n\t\t\tsuper.submitCommit(branchId, commit, schemaAndPolicy, isResubmit),\n\t\t);\n\t}\n\n\tpublic onDisconnect(): void {}\n}\n\nexport function exportSimpleSchema(storedSchema: TreeStoredSchema): SimpleTreeSchema {\n\treturn {\n\t\troot: exportSimpleFieldSchemaStored(storedSchema.rootFieldSchema),\n\t\tdefinitions: new Map(\n\t\t\t[...storedSchema.nodeSchema].map(([key, schema]) => {\n\t\t\t\treturn [key, exportSimpleNodeSchemaStored(schema)];\n\t\t\t}),\n\t\t),\n\t};\n}\n\n/**\n * A way to parse schema in the persisted format from {@link extractPersistedSchema}.\n * @remarks\n * This behaves identically to {@link ITreeAlpha.exportSimpleSchema},\n * except that it gets the schema from the caller instead of from an existing tree.\n *\n * This can be useful for inspecting the contents of persisted schema,\n * such as those generated by {@link extractPersistedSchema} for use in testing.\n * Since that data format is otherwise unspecified,\n * this provides a way to inspect its contents with documented semantics.\n * @alpha\n */\nexport function persistedToSimpleSchema(\n\tpersisted: JsonCompatible,\n\toptions: ICodecOptions,\n): SimpleTreeSchema {\n\t// Any version can be passed down to makeSchemaCodec here.\n\t// We only use the decode part, which always dispatches to the correct codec based on the version in the data, not the version passed to `makeSchemaCodec`.\n\tconst schemaCodec = makeSchemaCodec({\n\t\t...options,\n\t\tminVersionForCollab: FluidClientVersion.v2_0,\n\t});\n\tconst stored = schemaCodec.decode(persisted as FormatV1);\n\treturn exportSimpleSchema(stored);\n}\n\n/**\n * Get a {@link BranchableTree} from a {@link ITree}.\n * @remarks The branch can be used for \"version control\"-style coordination of edits on the tree.\n * @privateRemarks This function will be removed if/when the branching API becomes public,\n * but it (or something like it) is necessary in the meantime to prevent the alpha types from being exposed as public.\n * @alpha\n * @deprecated This API is superseded by {@link TreeBranch}, which should be used instead.\n */\nexport function getBranch(tree: ITree): BranchableTree;\n/**\n * Get a {@link BranchableTree} from a {@link TreeView}.\n * @remarks The branch can be used for \"version control\"-style coordination of edits on the tree.\n * Branches are currently an unstable \"alpha\" API and are subject to change in the future.\n * @privateRemarks This function will be removed if/when the branching API becomes public,\n * but it (or something like it) is necessary in the meantime to prevent the alpha types from being exposed as public.\n * @alpha\n * @deprecated This API is superseded by {@link TreeBranch}, which should be used instead.\n */\nexport function getBranch<T extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\tview: TreeViewAlpha<T>,\n): BranchableTree;\nexport function getBranch<T extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\ttreeOrView: ITree | TreeViewAlpha<T>,\n): BranchableTree {\n\tif (treeOrView instanceof SchematizingSimpleTreeView) {\n\t\treturn treeOrView.checkout as unknown as BranchableTree;\n\t}\n\tconst kernel = (treeOrView as ITree as ITreePrivate).kernel;\n\tassert(kernel instanceof SharedTreeKernel, 0xb56 /* Invalid ITree */);\n\t// This cast is safe so long as TreeCheckout supports all the operations on the branch interface.\n\treturn kernel.checkout as unknown as BranchableTree;\n}\n\n/**\n * Defines for each EditManagerFormatVersion the SharedTreeChangeFormatVersion to use.\n * This is an arbitrary mapping that is injected in the EditManger codec.\n * Once an entry is defined and used in production, it cannot be changed.\n * This is because the format for SharedTree changes are not explicitly versioned.\n */\nexport const changeFormatVersionForEditManager = DependentFormatVersion.fromPairs([\n\t[\n\t\tbrand<EditManagerFormatVersion>(EditManagerFormatVersion.v3),\n\t\tbrand<SharedTreeChangeFormatVersion>(3),\n\t],\n\t[\n\t\tbrand<EditManagerFormatVersion>(EditManagerFormatVersion.v4),\n\t\tbrand<SharedTreeChangeFormatVersion>(4),\n\t],\n\t[\n\t\tbrand<EditManagerFormatVersion>(EditManagerFormatVersion.v5),\n\t\tbrand<SharedTreeChangeFormatVersion>(4),\n\t],\n]);\n\n/**\n * Defines for each MessageFormatVersion the SharedTreeChangeFormatVersion to use.\n * This is an arbitrary mapping that is injected in the message codec.\n * Once an entry is defined and used in production, it cannot be changed.\n * This is because the format for SharedTree changes are not explicitly versioned.\n */\nexport const changeFormatVersionForMessage = DependentFormatVersion.fromPairs([\n\t[\n\t\tbrand<MessageFormatVersion>(MessageFormatVersion.v3),\n\t\tbrand<SharedTreeChangeFormatVersion>(3),\n\t],\n\t[\n\t\tbrand<MessageFormatVersion>(MessageFormatVersion.v4),\n\t\tbrand<SharedTreeChangeFormatVersion>(4),\n\t],\n\t[\n\t\tbrand<MessageFormatVersion>(MessageFormatVersion.v5),\n\t\tbrand<SharedTreeChangeFormatVersion>(4),\n\t],\n]);\n\nfunction getCodecTreeForEditManagerFormat(clientVersion: MinimumVersionForCollab): CodecTree {\n\tconst change = changeFormatVersionForEditManager.lookup(\n\t\tclientVersionToEditManagerFormatVersion(clientVersion),\n\t);\n\tconst changeCodecTree = getCodecTreeForChangeFormat(change, clientVersion);\n\treturn getCodecTreeForEditManagerFormatWithChange(clientVersion, changeCodecTree);\n}\n\nfunction getCodecTreeForMessageFormat(clientVersion: MinimumVersionForCollab): CodecTree {\n\tconst change = changeFormatVersionForMessage.lookup(\n\t\tclientVersionToMessageFormatVersion(clientVersion),\n\t);\n\tconst changeCodecTree = getCodecTreeForChangeFormat(change, clientVersion);\n\treturn getCodecTreeForMessageFormatWithChange(clientVersion, changeCodecTree);\n}\n\nexport function getCodecTreeForSharedTreeFormat(\n\tclientVersion: MinimumVersionForCollab,\n): CodecTree {\n\tconst children: CodecTree[] = [];\n\tchildren.push(getCodecTreeForForestFormat(clientVersion));\n\tchildren.push(getCodecTreeForSchemaFormat(clientVersion));\n\tchildren.push(getCodecTreeForDetachedFieldIndexFormat(clientVersion));\n\tchildren.push(getCodecTreeForEditManagerFormat(clientVersion));\n\tchildren.push(getCodecTreeForMessageFormat(clientVersion));\n\tchildren.push(getCodecTreeForFieldBatchFormat(clientVersion));\n\treturn {\n\t\tname: \"SharedTree\",\n\t\tversion: undefined, // SharedTree does not have a version of its own.\n\t\tchildren,\n\t};\n}\n\n/**\n * Configuration options for SharedTree.\n * @beta @input\n */\nexport type SharedTreeOptionsBeta = ForestOptions;\n\n/**\n * Configuration options for SharedTree.\n * @alpha @input\n */\nexport interface SharedTreeOptions\n\textends Partial<CodecWriteOptions>,\n\t\tPartial<SharedTreeFormatOptions>,\n\t\tSharedTreeOptionsBeta {\n\t/**\n\t * Experimental feature flag to enable shared branches.\n\t * This feature is not yet complete and should not be used in production.\n\t * Defaults to false.\n\t */\n\treadonly enableSharedBranches?: boolean;\n}\n\nexport interface SharedTreeOptionsInternal\n\textends Partial<SharedTreCoreOptionsInternal>,\n\t\tPartial<ForestOptions>,\n\t\tPartial<SharedTreeFormatOptionsInternal> {\n\tdisposeForksAfterTransaction?: boolean;\n\t/**\n\t * Returns whether a node / field should be incrementally encoded.\n\t * @remarks\n\t * See {@link IncrementalEncodingPolicy}.\n\t */\n\tshouldEncodeIncrementally?: IncrementalEncodingPolicy;\n}\n\n/**\n * Configuration options for SharedTree's internal tree storage.\n * @beta @input\n */\nexport interface ForestOptions {\n\t/**\n\t * The {@link ForestType} indicating which forest type should be created for the SharedTree.\n\t */\n\treadonly forest?: ForestType;\n}\n\n/**\n * Options for configuring the persisted format SharedTree uses.\n * @alpha @input\n */\nexport interface SharedTreeFormatOptions {\n\t/**\n\t * See {@link TreeCompressionStrategy}.\n\t * default: TreeCompressionStrategy.Compressed\n\t */\n\ttreeEncodeType: TreeCompressionStrategy;\n}\n\nexport interface SharedTreeFormatOptionsInternal\n\textends Omit<SharedTreeFormatOptions, \"treeEncodeType\"> {\n\ttreeEncodeType: TreeCompressionStrategyPrivate;\n}\n\n/**\n * Used to distinguish between different forest types.\n * @remarks\n * The \"Forest\" is the internal data structure used to store all the trees (the main tree and any removed ones) for a given view or branch.\n * ForestTypes should all have the same behavior, but may differ in performance and debuggability.\n *\n * Current options are {@link ForestTypeReference}, {@link ForestTypeOptimized} and {@link ForestTypeExpensiveDebug}.\n * @privateRemarks\n * Implement using {@link toForestType}.\n * Consume using {@link buildConfiguredForest}.\n * @sealed @beta\n */\nexport interface ForestType extends ErasedType<\"ForestType\"> {}\n\n/**\n * Reference implementation of forest.\n * @remarks\n * A simple implementation with minimal complexity and moderate debuggability, validation and performance.\n * @privateRemarks\n * The \"ObjectForest\" forest type.\n * @beta\n */\nexport const ForestTypeReference = toForestType(\n\t(breaker: Breakable, schema: TreeStoredSchemaSubscription, idCompressor: IIdCompressor) =>\n\t\tbuildForest(breaker, schema),\n);\n\n/**\n * Optimized implementation of forest.\n * @remarks\n * A complex optimized forest implementation, which has minimal validation and debuggability to optimize for performance.\n * Uses an internal representation optimized for size designed to scale to larger datasets with reduced overhead.\n * @privateRemarks\n * The \"ChunkedForest\" forest type.\n * @beta\n */\nexport const ForestTypeOptimized = toForestType(\n\t(\n\t\tbreaker: Breakable,\n\t\tschema: TreeStoredSchemaSubscription,\n\t\tidCompressor: IIdCompressor,\n\t\tshouldEncodeIncrementally: IncrementalEncodingPolicy,\n\t) =>\n\t\tbuildChunkedForest(\n\t\t\tmakeTreeChunker(schema, defaultSchemaPolicy, shouldEncodeIncrementally),\n\t\t\tundefined,\n\t\t\tidCompressor,\n\t\t),\n);\n\n/**\n * Slow implementation of forest intended only for debugging.\n * @remarks\n * Includes validation with scales poorly.\n * May be asymptotically slower than {@link ForestTypeReference}, and may perform very badly with larger data sizes.\n * @privateRemarks\n * The \"ObjectForest\" forest type with expensive asserts for debugging.\n * @beta\n */\nexport const ForestTypeExpensiveDebug = toForestType(\n\t(breaker: Breakable, schema: TreeStoredSchemaSubscription) =>\n\t\tbuildForest(breaker, schema, undefined, true),\n);\n\ntype ForestFactory = (\n\tbreaker: Breakable,\n\tschema: TreeStoredSchemaSubscription,\n\tidCompressor: IIdCompressor,\n\tshouldEncodeIncrementally: IncrementalEncodingPolicy,\n) => IEditableForest;\n\nfunction toForestType(factory: ForestFactory): ForestType {\n\treturn factory as unknown as ForestType;\n}\n\n/**\n * Build and return a forest of the requested type.\n */\nexport function buildConfiguredForest(\n\tbreaker: Breakable,\n\tfactory: ForestType,\n\tschema: TreeStoredSchemaSubscription,\n\tidCompressor: IIdCompressor,\n\tshouldEncodeIncrementally: IncrementalEncodingPolicy,\n): IEditableForest {\n\treturn (factory as unknown as ForestFactory)(\n\t\tbreaker,\n\t\tschema,\n\t\tidCompressor,\n\t\tshouldEncodeIncrementally,\n\t);\n}\n\nexport const defaultSharedTreeOptions: Required<SharedTreeOptionsInternal> = {\n\tjsonValidator: FormatValidatorNoOp,\n\tminVersionForCollab: FluidClientVersion.v2_0,\n\tforest: ForestTypeReference,\n\ttreeEncodeType: TreeCompressionStrategy.Compressed,\n\tdisposeForksAfterTransaction: true,\n\tshouldEncodeIncrementally: defaultIncrementalEncodingPolicy,\n\teditManagerFormatSelector: clientVersionToEditManagerFormatVersion,\n\tmessageFormatSelector: clientVersionToMessageFormatVersion,\n};\n\n/**\n * Build the allowed types for a Stored Schema.\n *\n * @remarks Staged upgrades do not apply to stored schemas, so we omit the {@link SimpleAllowedTypeAttributes.isStaged | staging flag } when building {@link SimpleAllowedTypeAttributes}.\n * @param types - The types to create allowed types for.\n * @returns The allowed types.\n */\nfunction buildSimpleAllowedTypeAttributesForStoredSchema(\n\ttypes: TreeTypeSet,\n): ReadonlyMap<string, SimpleAllowedTypeAttributes> {\n\tconst allowedTypesInfo = new Map<string, SimpleAllowedTypeAttributes>();\n\tfor (const type of types) {\n\t\t// Stored schemas do not have staged upgrades\n\t\tallowedTypesInfo.set(type, { isStaged: undefined });\n\t}\n\treturn allowedTypesInfo;\n}\n\nfunction exportSimpleFieldSchemaStored(schema: TreeFieldStoredSchema): SimpleFieldSchema {\n\tlet kind: FieldKind;\n\tswitch (schema.kind) {\n\t\tcase FieldKinds.identifier.identifier:\n\t\t\tkind = FieldKind.Identifier;\n\t\t\tbreak;\n\t\tcase FieldKinds.optional.identifier:\n\t\t\tkind = FieldKind.Optional;\n\t\t\tbreak;\n\t\tcase FieldKinds.required.identifier:\n\t\t\tkind = FieldKind.Required;\n\t\t\tbreak;\n\t\tcase FieldKinds.forbidden.identifier:\n\t\t\tkind = FieldKind.Optional;\n\t\t\tassert(schema.types.size === 0, 0xa94 /* invalid forbidden field */);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tfail(0xaca /* invalid field kind */);\n\t}\n\treturn {\n\t\tkind,\n\t\tsimpleAllowedTypes: buildSimpleAllowedTypeAttributesForStoredSchema(schema.types),\n\t\tmetadata: {},\n\t\tpersistedMetadata: schema.persistedMetadata,\n\t};\n}\n\n/**\n * Export a {@link SimpleNodeSchema} from a {@link TreeNodeStoredSchema}.\n * @privateRemarks\n * TODO: Persist node metadata once schema FormatV2 is supported.\n * Note on SimpleNodeSchema construction: In the persisted format `persistedMetadata` is just called `metadata` whereas the `metadata`\n * field on SimpleNodeSchema is not persisted.\n */\nfunction exportSimpleNodeSchemaStored(schema: TreeNodeStoredSchema): SimpleNodeSchema {\n\tconst arrayTypes = tryStoredSchemaAsArray(schema);\n\tif (arrayTypes !== undefined) {\n\t\treturn {\n\t\t\tkind: NodeKind.Array,\n\t\t\tsimpleAllowedTypes: buildSimpleAllowedTypeAttributesForStoredSchema(arrayTypes),\n\t\t\tmetadata: {},\n\t\t\tpersistedMetadata: schema.metadata,\n\t\t};\n\t}\n\tif (schema instanceof ObjectNodeStoredSchema) {\n\t\tconst fields = new Map<FieldKey, SimpleObjectFieldSchema>();\n\t\tfor (const [storedKey, field] of schema.objectNodeFields) {\n\t\t\tfields.set(storedKey, { ...exportSimpleFieldSchemaStored(field), storedKey });\n\t\t}\n\t\treturn {\n\t\t\tkind: NodeKind.Object,\n\t\t\tfields,\n\t\t\tallowUnknownOptionalFields: undefined,\n\t\t\tmetadata: {},\n\t\t\tpersistedMetadata: schema.metadata,\n\t\t};\n\t}\n\tif (schema instanceof MapNodeStoredSchema) {\n\t\tassert(\n\t\t\tschema.mapFields.kind === FieldKinds.optional.identifier,\n\t\t\t0xa95 /* Invalid map schema */,\n\t\t);\n\t\treturn {\n\t\t\tkind: NodeKind.Map,\n\t\t\tsimpleAllowedTypes: buildSimpleAllowedTypeAttributesForStoredSchema(\n\t\t\t\tschema.mapFields.types,\n\t\t\t),\n\t\t\tmetadata: {},\n\t\t\tpersistedMetadata: schema.metadata,\n\t\t};\n\t}\n\tif (schema instanceof LeafNodeStoredSchema) {\n\t\treturn {\n\t\t\tkind: NodeKind.Leaf,\n\t\t\tleafKind: schema.leafValue,\n\t\t\tmetadata: {},\n\t\t\tpersistedMetadata: schema.metadata,\n\t\t};\n\t}\n\tfail(0xacb /* invalid schema kind */);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sharedTree.js","sourceRoot":"","sources":["../../src/shared-tree/sharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AASnE,OAAO,EACN,UAAU,GAEV,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAGN,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,GAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAKN,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAIhB,0BAA0B,EAG1B,uCAAuC,EACvC,sBAAsB,EACtB,mBAAmB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,4BAA4B,EAC5B,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,EACX,gCAAgC,EAChC,mBAAmB,EACnB,+BAA+B,EAC/B,2BAA2B,EAC3B,2BAA2B,EAC3B,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,eAAe,GAEf,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAEN,uCAAuC,EACvC,mCAAmC,EAEnC,0CAA0C,EAC1C,sCAAsC,EAEtC,oBAAoB,EACpB,cAAc,EACd,wBAAwB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGN,QAAQ,EASR,sBAAsB,EAEtB,SAAS,GAKT,M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,SAAS,CAAC,KAAK,CACtB;YACD,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,MAAM,CAAC,QAAQ;SAClC,CAAC;IACH,CAAC;IACD,IAAI,MAAM,YAAY,oBAAoB,EAAE,CAAC;QAC5C,OAAO;YACN,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,QAAQ,EAAE,MAAM,CAAC,SAAS;YAC1B,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,MAAM,CAAC,QAAQ;SAClC,CAAC;IACH,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACvC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType, IFluidLoadable } from \"@fluidframework/core-interfaces/internal\";\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport type { IIdCompressor, StableId } from \"@fluidframework/id-compressor\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport type {\n\tIChannelView,\n\tIFluidSerializer,\n\tSharedKernel,\n} from \"@fluidframework/shared-object-base/internal\";\nimport {\n\tUsageError,\n\ttype ITelemetryLoggerExt,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\ttype CodecTree,\n\ttype CodecWriteOptions,\n\tDependentFormatVersion,\n\tFluidClientVersion,\n\tFormatValidatorNoOp,\n\ttype ICodecOptions,\n} from \"../codec/index.js\";\nimport {\n\ttype FieldKey,\n\ttype GraphCommit,\n\ttype IEditableForest,\n\ttype JsonableTree,\n\tLeafNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tRevisionTagCodec,\n\ttype TreeFieldStoredSchema,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\ttype TreeStoredSchemaSubscription,\n\ttype TreeTypeSet,\n\tgetCodecTreeForDetachedFieldIndexFormat,\n\tmakeDetachedFieldIndex,\n\tmoveToDetachedField,\n} from \"../core/index.js\";\nimport {\n\tDetachedFieldIndexSummarizer,\n\tFieldKinds,\n\tForestSummarizer,\n\tSchemaSummarizer,\n\tTreeCompressionStrategy,\n\tbuildChunkedForest,\n\tbuildForest,\n\tdefaultIncrementalEncodingPolicy,\n\tdefaultSchemaPolicy,\n\tgetCodecTreeForFieldBatchFormat,\n\tgetCodecTreeForForestFormat,\n\tgetCodecTreeForSchemaFormat,\n\tjsonableTreeFromFieldCursor,\n\tmakeFieldBatchCodec,\n\tmakeMitigatedChangeFamily,\n\tmakeSchemaCodec,\n\tmakeTreeChunker,\n\ttype IncrementalEncodingPolicy,\n} from \"../feature-libraries/index.js\";\n// eslint-disable-next-line import-x/no-internal-modules\nimport type { FormatV1 } from \"../feature-libraries/schema-index/index.js\";\nimport {\n\ttype BranchId,\n\tclientVersionToEditManagerFormatVersion,\n\tclientVersionToMessageFormatVersion,\n\ttype ClonableSchemaAndPolicy,\n\tgetCodecTreeForEditManagerFormatWithChange,\n\tgetCodecTreeForMessageFormatWithChange,\n\ttype SharedTreeCoreOptionsInternal,\n\tMessageFormatVersion,\n\tSharedTreeCore,\n\tEditManagerFormatVersion,\n} from \"../shared-tree-core/index.js\";\nimport {\n\ttype ITree,\n\ttype ImplicitFieldSchema,\n\tNodeKind,\n\ttype ReadSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleTreeSchema,\n\ttype TreeView,\n\ttype TreeViewAlpha,\n\ttype TreeViewConfiguration,\n\ttype UnsafeUnknownSchema,\n\ttype VerboseTree,\n\ttryStoredSchemaAsArray,\n\ttype SimpleNodeSchema,\n\tFieldKind,\n\ttype ITreeAlpha,\n\ttype SimpleObjectFieldSchema,\n\ttype SimpleAllowedTypeAttributes,\n\ttype SchemaType,\n} from \"../simple-tree/index.js\";\n\nimport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\nimport { SharedTreeReadonlyChangeEnricher } from \"./sharedTreeChangeEnricher.js\";\nimport { SharedTreeChangeFamily } from \"./sharedTreeChangeFamily.js\";\nimport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\nimport type { IdBasedSharedTreeEditBuilder } from \"./sharedTreeEditBuilder.js\";\nimport { type TreeCheckout, type BranchableTree, createTreeCheckout } from \"./treeCheckout.js\";\nimport {\n\tbrand,\n\ttype Breakable,\n\tbreakingClass,\n\ttype JsonCompatible,\n\tthrowIfBroken,\n} from \"../util/index.js\";\nimport {\n\tgetCodecTreeForChangeFormat,\n\ttype SharedTreeChangeFormatVersion,\n} from \"./sharedTreeChangeCodecs.js\";\n\n/**\n * Copy of data from an {@link ITreePrivate} at some point in time.\n * @remarks\n * This is unrelated to Fluids concept of \"snapshots\".\n */\nexport interface SharedTreeContentSnapshot {\n\t/**\n\t * The schema stored in the document.\n\t *\n\t * @remarks\n\t * Edits to the schema can mutate the schema stored of the tree which took this snapshot (but this snapshot will remain the same)\n\t * This is mainly useful for debugging cases where schematize reports an incompatible view schema.\n\t */\n\treadonly schema: TreeStoredSchema;\n\t/**\n\t * All {@link TreeStatus.InDocument} content.\n\t */\n\treadonly tree: JsonableTree[];\n\t/**\n\t * All {@link TreeStatus.Removed} content.\n\t */\n\treadonly removed: [string | number | undefined, number, JsonableTree][];\n}\n\n/**\n * {@link ITree} extended with some non-public APIs.\n * @internal\n */\nexport interface ITreeInternal extends IChannelView, ITreeAlpha {}\n\n/**\n * {@link ITreeInternal} extended with some non-exported APIs.\n * @remarks\n * This allows access to the tree content using the internal data model used at the storage and \"flex\" layers,\n * and should only be needed for testing and debugging this package's internals.\n */\nexport interface ITreePrivate extends ITreeInternal {\n\t/**\n\t * Provides a copy of the current content of the tree.\n\t * This can be useful for inspecting the tree when no suitable view schema is available.\n\t * This is only intended for use in testing and exceptional code paths: it is not performant.\n\t *\n\t * This does not include everything that is included in a tree summary, since information about how to merge future edits is omitted.\n\t */\n\tcontentSnapshot(): SharedTreeContentSnapshot;\n\n\t/**\n\t * Access to internals for testing.\n\t */\n\treadonly kernel: SharedTreeKernel;\n}\n\n/**\n * The type SharedTree's kernel's view must implement so what when its merged with the underling SharedObject's API it fully implements the required tree API surface ({@link ITreePrivate }).\n */\nexport type SharedTreeKernelView = Omit<ITreePrivate, keyof (IChannelView & IFluidLoadable)>;\n\n/**\n * SharedTreeCore, configured with a good set of indexes and field kinds which will maintain compatibility over time.\n *\n * TODO: detail compatibility requirements.\n */\n@breakingClass\nexport class SharedTreeKernel\n\textends SharedTreeCore<IdBasedSharedTreeEditBuilder, SharedTreeChange>\n\timplements SharedKernel\n{\n\tpublic readonly checkout: TreeCheckout;\n\tpublic get storedSchema(): TreeStoredSchemaRepository {\n\t\treturn this.checkout.storedSchema;\n\t}\n\n\tprivate readonly checkouts: Map<BranchId, TreeCheckout> = new Map();\n\n\t/**\n\t * The app-facing API for SharedTree implemented by this Kernel.\n\t * @remarks\n\t * This is the API grafted onto the ISharedObject which apps can access.\n\t * It includes both the APIs used for internal testing, and public facing APIs (both stable and unstable).\n\t * Different users will have access to different subsets of this API, see {@link ITree}, {@link ITreeAlpha} and {@link ITreeInternal} which this {@link ITreePrivate} extends.\n\t */\n\tpublic readonly view: SharedTreeKernelView;\n\n\tpublic constructor(\n\t\tbreaker: Breakable,\n\t\tsharedObject: IChannelView & IFluidLoadable,\n\t\tserializer: IFluidSerializer,\n\t\tsubmitLocalMessage: (content: unknown, localOpMetadata?: unknown) => void,\n\t\tlastSequenceNumber: () => number | undefined,\n\t\tinitialSequenceNumber: number,\n\t\tprivate readonly logger: ITelemetryLoggerExt | undefined,\n\t\tidCompressor: IIdCompressor,\n\t\toptionsParam: SharedTreeOptionsInternal,\n\t) {\n\t\tconst options: Required<SharedTreeOptionsInternal> = {\n\t\t\t...defaultSharedTreeOptions,\n\t\t\t...optionsParam,\n\t\t};\n\t\tif (options.minVersionForCollab < FluidClientVersion.v2_0) {\n\t\t\tthrow new UsageError(\"SharedTree requires minVersionForCollab of at least 2.0.0\");\n\t\t}\n\t\tconst schema = new TreeStoredSchemaRepository();\n\t\tconst forest = buildConfiguredForest(\n\t\t\tbreaker,\n\t\t\toptions.forest,\n\t\t\tschema,\n\t\t\tidCompressor,\n\t\t\toptions.shouldEncodeIncrementally,\n\t\t);\n\t\tconst revisionTagCodec = new RevisionTagCodec(idCompressor);\n\t\tconst removedRoots = makeDetachedFieldIndex(\n\t\t\t\"repair\",\n\t\t\trevisionTagCodec,\n\t\t\tidCompressor,\n\t\t\toptions,\n\t\t);\n\t\tconst schemaCodec = makeSchemaCodec(options);\n\t\tconst schemaSummarizer = new SchemaSummarizer(\n\t\t\tschema,\n\t\t\t{\n\t\t\t\tgetCurrentSeq: lastSequenceNumber,\n\t\t\t},\n\t\t\tschemaCodec,\n\t\t\toptions.minVersionForCollab,\n\t\t);\n\t\tconst fieldBatchCodec = makeFieldBatchCodec(options);\n\n\t\tconst encoderContext = {\n\t\t\tschema: {\n\t\t\t\tschema,\n\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t},\n\t\t\tencodeType: options.treeEncodeType,\n\t\t\toriginatorId: idCompressor.localSessionId,\n\t\t\tidCompressor,\n\t\t};\n\t\tconst forestSummarizer = new ForestSummarizer(\n\t\t\tforest,\n\t\t\trevisionTagCodec,\n\t\t\tfieldBatchCodec,\n\t\t\tencoderContext,\n\t\t\toptions,\n\t\t\tidCompressor,\n\t\t\tinitialSequenceNumber,\n\t\t\toptions.shouldEncodeIncrementally,\n\t\t);\n\t\tconst removedRootsSummarizer = new DetachedFieldIndexSummarizer(\n\t\t\tremovedRoots,\n\t\t\toptions.minVersionForCollab,\n\t\t);\n\t\tconst innerChangeFamily = new SharedTreeChangeFamily(\n\t\t\trevisionTagCodec,\n\t\t\tfieldBatchCodec,\n\t\t\toptions,\n\t\t\toptions.treeEncodeType,\n\t\t\tidCompressor,\n\t\t);\n\t\tconst changeFamily = makeMitigatedChangeFamily(\n\t\t\tinnerChangeFamily,\n\t\t\tSharedTreeChangeFamily.emptyChange,\n\t\t\t(error: unknown) => {\n\t\t\t\t// TODO:6344 Add telemetry for these errors.\n\t\t\t\t// Rethrowing the error has a different effect depending on the context in which the\n\t\t\t\t// ChangeFamily was invoked:\n\t\t\t\t// - If the ChangeFamily was invoked as part of incoming op processing, rethrowing the error\n\t\t\t\t// will cause the runtime to disconnect the client, log a severe error, and not reconnect.\n\t\t\t\t// This will not cause the host application to crash because it is not on the stack at that time.\n\t\t\t\t// TODO: let the host application know that the client is now disconnected.\n\t\t\t\t// - If the ChangeFamily was invoked as part of dealing with a local change, rethrowing the\n\t\t\t\t// error will cause the host application to crash. This is not ideal, but is better than\n\t\t\t\t// letting the application either send an invalid change to the server or allowing the\n\t\t\t\t// application to continue working when its local branches contain edits that cannot be\n\t\t\t\t// reflected in its views.\n\t\t\t\t// The best course of action for a host application in such a state is to restart.\n\t\t\t\t// TODO: let the host application know about this situation and provide a way to\n\t\t\t\t// programmatically reload the SharedTree container.\n\t\t\t\tthrow error;\n\t\t\t},\n\t\t);\n\t\tconst changeEnricher = new SharedTreeReadonlyChangeEnricher(forest, schema, removedRoots);\n\t\tsuper(\n\t\t\tbreaker,\n\t\t\tsharedObject,\n\t\t\tserializer,\n\t\t\tsubmitLocalMessage,\n\t\t\tlogger,\n\t\t\t[schemaSummarizer, forestSummarizer, removedRootsSummarizer],\n\t\t\tchangeFamily,\n\t\t\toptions,\n\t\t\tchangeFormatVersionForEditManager,\n\t\t\tchangeFormatVersionForMessage,\n\t\t\tidCompressor,\n\t\t\tschema,\n\t\t\tdefaultSchemaPolicy,\n\t\t\tundefined,\n\t\t\tchangeEnricher,\n\t\t);\n\n\t\tthis.checkout = createTreeCheckout(idCompressor, this.mintRevisionTag, revisionTagCodec, {\n\t\t\tbranch: this.getLocalBranch(),\n\t\t\tchangeFamily,\n\t\t\tschema,\n\t\t\tforest,\n\t\t\tfieldBatchCodec,\n\t\t\tremovedRoots,\n\t\t\tchunkCompressionStrategy: options.treeEncodeType,\n\t\t\tlogger,\n\t\t\tbreaker: this.breaker,\n\t\t\tdisposeForksAfterTransaction: options.disposeForksAfterTransaction,\n\t\t});\n\n\t\tthis.registerCheckout(\"main\", this.checkout);\n\n\t\tthis.view = {\n\t\t\tcontentSnapshot: () => this.contentSnapshot(),\n\t\t\texportSimpleSchema: () => this.exportSimpleSchema(),\n\t\t\texportVerbose: () => this.exportVerbose(),\n\t\t\tviewWith: this.viewWith.bind(this),\n\t\t\tviewSharedBranchWith: this.viewBranchWith.bind(this),\n\t\t\tcreateSharedBranch: this.createSharedBranch.bind(this),\n\t\t\tgetSharedBranchIds: this.getSharedBranchIds.bind(this),\n\t\t\tkernel: this,\n\t\t};\n\t}\n\n\tprivate registerCheckout(branchId: BranchId, checkout: TreeCheckout): void {\n\t\tthis.checkouts.set(branchId, checkout);\n\t\tconst enricher = this.getCommitEnricher(branchId);\n\t\tcheckout.transaction.events.on(\"started\", () => {\n\t\t\tif (this.sharedObject.isAttached()) {\n\t\t\t\t// It is currently forbidden to attach during a transaction, so transaction state changes can be ignored until after attaching.\n\t\t\t\tenricher.startTransaction();\n\t\t\t}\n\t\t});\n\n\t\tcheckout.transaction.events.on(\"aborting\", () => {\n\t\t\tif (this.sharedObject.isAttached()) {\n\t\t\t\t// It is currently forbidden to attach during a transaction, so transaction state changes can be ignored until after attaching.\n\t\t\t\tenricher.abortTransaction();\n\t\t\t}\n\t\t});\n\t\tcheckout.transaction.events.on(\"committing\", () => {\n\t\t\tif (this.sharedObject.isAttached()) {\n\t\t\t\t// It is currently forbidden to attach during a transaction, so transaction state changes can be ignored until after attaching.\n\t\t\t\tenricher.commitTransaction();\n\t\t\t}\n\t\t});\n\t\tcheckout.events.on(\"beforeBatch\", (event) => {\n\t\t\tif (event.type === \"append\" && this.sharedObject.isAttached()) {\n\t\t\t\tif (checkout.transaction.isInProgress()) {\n\t\t\t\t\tenricher.addTransactionCommits(event.newCommits);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic exportVerbose(): VerboseTree | undefined {\n\t\treturn this.checkout.exportVerbose();\n\t}\n\n\tpublic exportSimpleSchema(): SimpleTreeSchema {\n\t\treturn exportSimpleSchema(this.storedSchema);\n\t}\n\n\t@throwIfBroken\n\tpublic contentSnapshot(): SharedTreeContentSnapshot {\n\t\tconst cursor = this.checkout.forest.allocateCursor(\"contentSnapshot\");\n\t\ttry {\n\t\t\tmoveToDetachedField(this.checkout.forest, cursor);\n\t\t\treturn {\n\t\t\t\tschema: this.storedSchema.clone(),\n\t\t\t\ttree: jsonableTreeFromFieldCursor(cursor),\n\t\t\t\tremoved: this.checkout.getRemovedRoots(),\n\t\t\t};\n\t\t} finally {\n\t\t\tcursor.free();\n\t\t}\n\t}\n\n\t// For the new TreeViewAlpha API\n\tpublic viewWith<TRoot extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\t\tconfig: TreeViewConfiguration<ReadSchema<TRoot>>,\n\t): SchematizingSimpleTreeView<TRoot> & TreeView<ReadSchema<TRoot>>;\n\n\t// For the old TreeView API\n\tpublic viewWith<TRoot extends ImplicitFieldSchema>(\n\t\tconfig: TreeViewConfiguration<TRoot>,\n\t): SchematizingSimpleTreeView<TRoot> & TreeView<TRoot>;\n\n\tpublic viewWith<TRoot extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\t\tconfig: TreeViewConfiguration<ReadSchema<TRoot>>,\n\t): SchematizingSimpleTreeView<TRoot> & TreeView<ReadSchema<TRoot>> {\n\t\treturn this.checkout.viewWith(config) as SchematizingSimpleTreeView<TRoot> &\n\t\t\tTreeView<ReadSchema<TRoot>>;\n\t}\n\n\tpublic viewBranchWith<TRoot extends ImplicitFieldSchema>(\n\t\tbranchId: string,\n\t\tconfig: TreeViewConfiguration<TRoot>,\n\t): TreeView<TRoot>;\n\n\tpublic viewBranchWith<TRoot extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\t\tbranchId: string,\n\t\tconfig: TreeViewConfiguration<ReadSchema<TRoot>>,\n\t): SchematizingSimpleTreeView<TRoot> & TreeView<ReadSchema<TRoot>> {\n\t\tconst compressedId = this.idCompressor.tryRecompress(branchId as StableId);\n\t\tif (compressedId === undefined) {\n\t\t\tthrow new UsageError(`No branch found with id: ${branchId}`);\n\t\t}\n\t\treturn this.getCheckout(compressedId).viewWith(\n\t\t\tconfig,\n\t\t) as SchematizingSimpleTreeView<TRoot> & TreeView<ReadSchema<TRoot>>;\n\t}\n\n\tprivate getCheckout(branchId: BranchId): TreeCheckout {\n\t\treturn this.checkouts.get(branchId) ?? this.checkoutBranch(branchId);\n\t}\n\n\tprivate checkoutBranch(branchId: BranchId): TreeCheckout {\n\t\tconst checkout = this.checkout.branch();\n\t\tcheckout.switchBranch(this.getSharedBranch(branchId));\n\t\tconst enricher = new SharedTreeReadonlyChangeEnricher(\n\t\t\tcheckout.forest,\n\t\t\tcheckout.storedSchema,\n\t\t\tcheckout.removedRoots,\n\t\t);\n\n\t\tthis.registerSharedBranchForEditing(branchId, enricher);\n\t\tthis.registerCheckout(branchId, checkout);\n\t\treturn checkout;\n\t}\n\n\tpublic override async loadCore(services: IChannelStorageService): Promise<void> {\n\t\tawait super.loadCore(services);\n\t\tthis.checkout.load();\n\t}\n\n\tpublic override didAttach(): void {\n\t\tfor (const checkout of this.checkouts.values()) {\n\t\t\tif (checkout.transaction.isInProgress()) {\n\t\t\t\t// Attaching during a transaction is not currently supported.\n\t\t\t\t// At least part of of the system is known to not handle this case correctly - commit enrichment - and there may be others.\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot attach while a transaction is in progress. Commit or abort the transaction before attaching.\",\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tsuper.didAttach();\n\t}\n\n\tpublic override applyStashedOp(\n\t\t...args: Parameters<\n\t\t\tSharedTreeCore<IdBasedSharedTreeEditBuilder, SharedTreeChange>[\"applyStashedOp\"]\n\t\t>\n\t): void {\n\t\tfor (const checkout of this.checkouts.values()) {\n\t\t\tassert(\n\t\t\t\t!checkout.transaction.isInProgress(),\n\t\t\t\t0x674 /* Unexpected transaction is open while applying stashed ops */,\n\t\t\t);\n\t\t}\n\t\tsuper.applyStashedOp(...args);\n\t}\n\n\tprotected override submitCommit(\n\t\tbranchId: BranchId,\n\t\tcommit: GraphCommit<SharedTreeChange>,\n\t\tschemaAndPolicy: ClonableSchemaAndPolicy,\n\t\tisResubmit: boolean,\n\t): void {\n\t\tconst checkout = this.getCheckout(branchId);\n\t\tassert(\n\t\t\t!checkout.transaction.isInProgress(),\n\t\t\t0xaa6 /* Cannot submit a commit while a transaction is in progress */,\n\t\t);\n\t\tif (isResubmit) {\n\t\t\treturn super.submitCommit(branchId, commit, schemaAndPolicy, isResubmit);\n\t\t}\n\n\t\t// Refrain from submitting new commits until they are validated by the checkout.\n\t\t// This is not a strict requirement for correctness in our system, but in the event that there is a bug when applying commits to the checkout\n\t\t// that causes a crash (e.g. in the forest), this will at least prevent this client from sending the problematic commit to any other clients.\n\t\tcheckout.onCommitValid(commit, () =>\n\t\t\tsuper.submitCommit(branchId, commit, schemaAndPolicy, isResubmit),\n\t\t);\n\t}\n\n\tpublic onDisconnect(): void {}\n}\n\nexport function exportSimpleSchema(\n\tstoredSchema: TreeStoredSchema,\n): SimpleTreeSchema<SchemaType.Stored> {\n\treturn {\n\t\troot: exportSimpleFieldSchemaStored(storedSchema.rootFieldSchema),\n\t\tdefinitions: new Map(\n\t\t\t[...storedSchema.nodeSchema].map(([key, schema]) => {\n\t\t\t\treturn [key, exportSimpleNodeSchemaStored(schema)];\n\t\t\t}),\n\t\t),\n\t};\n}\n\n/**\n * A way to parse schema in the persisted format from {@link extractPersistedSchema}.\n * @remarks\n * This behaves identically to {@link ITreeAlpha.exportSimpleSchema},\n * except that it gets the schema from the caller instead of from an existing tree.\n *\n * This can be useful for inspecting the contents of persisted schema,\n * such as those generated by {@link extractPersistedSchema} for use in testing.\n * Since that data format is otherwise unspecified,\n * this provides a way to inspect its contents with documented semantics.\n * @alpha\n */\nexport function persistedToSimpleSchema(\n\tpersisted: JsonCompatible,\n\toptions: ICodecOptions,\n): SimpleTreeSchema {\n\t// Any version can be passed down to makeSchemaCodec here.\n\t// We only use the decode part, which always dispatches to the correct codec based on the version in the data, not the version passed to `makeSchemaCodec`.\n\tconst schemaCodec = makeSchemaCodec({\n\t\t...options,\n\t\tminVersionForCollab: FluidClientVersion.v2_0,\n\t});\n\tconst stored = schemaCodec.decode(persisted as FormatV1);\n\treturn exportSimpleSchema(stored);\n}\n\n/**\n * Get a {@link BranchableTree} from a {@link ITree}.\n * @remarks The branch can be used for \"version control\"-style coordination of edits on the tree.\n * @privateRemarks This function will be removed if/when the branching API becomes public,\n * but it (or something like it) is necessary in the meantime to prevent the alpha types from being exposed as public.\n * @alpha\n * @deprecated This API is superseded by {@link TreeBranch}, which should be used instead.\n */\nexport function getBranch(tree: ITree): BranchableTree;\n/**\n * Get a {@link BranchableTree} from a {@link TreeView}.\n * @remarks The branch can be used for \"version control\"-style coordination of edits on the tree.\n * Branches are currently an unstable \"alpha\" API and are subject to change in the future.\n * @privateRemarks This function will be removed if/when the branching API becomes public,\n * but it (or something like it) is necessary in the meantime to prevent the alpha types from being exposed as public.\n * @alpha\n * @deprecated This API is superseded by {@link TreeBranch}, which should be used instead.\n */\nexport function getBranch<T extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\tview: TreeViewAlpha<T>,\n): BranchableTree;\nexport function getBranch<T extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\ttreeOrView: ITree | TreeViewAlpha<T>,\n): BranchableTree {\n\tif (treeOrView instanceof SchematizingSimpleTreeView) {\n\t\treturn treeOrView.checkout as unknown as BranchableTree;\n\t}\n\tconst kernel = (treeOrView as ITree as ITreePrivate).kernel;\n\tassert(kernel instanceof SharedTreeKernel, 0xb56 /* Invalid ITree */);\n\t// This cast is safe so long as TreeCheckout supports all the operations on the branch interface.\n\treturn kernel.checkout as unknown as BranchableTree;\n}\n\n/**\n * Defines for each EditManagerFormatVersion the SharedTreeChangeFormatVersion to use.\n * This is an arbitrary mapping that is injected in the EditManger codec.\n * Once an entry is defined and used in production, it cannot be changed.\n * This is because the format for SharedTree changes are not explicitly versioned.\n */\nexport const changeFormatVersionForEditManager = DependentFormatVersion.fromPairs([\n\t[\n\t\tbrand<EditManagerFormatVersion>(EditManagerFormatVersion.v3),\n\t\tbrand<SharedTreeChangeFormatVersion>(3),\n\t],\n\t[\n\t\tbrand<EditManagerFormatVersion>(EditManagerFormatVersion.v4),\n\t\tbrand<SharedTreeChangeFormatVersion>(4),\n\t],\n\t[\n\t\tbrand<EditManagerFormatVersion>(EditManagerFormatVersion.vSharedBranches),\n\t\tbrand<SharedTreeChangeFormatVersion>(4),\n\t],\n\t[\n\t\tbrand<EditManagerFormatVersion>(EditManagerFormatVersion.vDetachedRoots),\n\t\tbrand<SharedTreeChangeFormatVersion>(101),\n\t],\n]);\n\n/**\n * Defines for each MessageFormatVersion the SharedTreeChangeFormatVersion to use.\n * This is an arbitrary mapping that is injected in the message codec.\n * Once an entry is defined and used in production, it cannot be changed.\n * This is because the format for SharedTree changes are not explicitly versioned.\n */\nexport const changeFormatVersionForMessage = DependentFormatVersion.fromPairs([\n\t[\n\t\tbrand<MessageFormatVersion>(MessageFormatVersion.v3),\n\t\tbrand<SharedTreeChangeFormatVersion>(3),\n\t],\n\t[\n\t\tbrand<MessageFormatVersion>(MessageFormatVersion.v4),\n\t\tbrand<SharedTreeChangeFormatVersion>(4),\n\t],\n\t[\n\t\tbrand<MessageFormatVersion>(MessageFormatVersion.vSharedBranches),\n\t\tbrand<SharedTreeChangeFormatVersion>(4),\n\t],\n\t[\n\t\tbrand<MessageFormatVersion>(MessageFormatVersion.vDetachedRoots),\n\t\tbrand<SharedTreeChangeFormatVersion>(101),\n\t],\n]);\n\nfunction getCodecTreeForEditManagerFormat(clientVersion: MinimumVersionForCollab): CodecTree {\n\tconst change = changeFormatVersionForEditManager.lookup(\n\t\tclientVersionToEditManagerFormatVersion(clientVersion),\n\t);\n\tconst changeCodecTree = getCodecTreeForChangeFormat(change, clientVersion);\n\treturn getCodecTreeForEditManagerFormatWithChange(clientVersion, changeCodecTree);\n}\n\nfunction getCodecTreeForMessageFormat(clientVersion: MinimumVersionForCollab): CodecTree {\n\tconst change = changeFormatVersionForMessage.lookup(\n\t\tclientVersionToMessageFormatVersion(clientVersion),\n\t);\n\tconst changeCodecTree = getCodecTreeForChangeFormat(change, clientVersion);\n\treturn getCodecTreeForMessageFormatWithChange(clientVersion, changeCodecTree);\n}\n\nexport function getCodecTreeForSharedTreeFormat(\n\tclientVersion: MinimumVersionForCollab,\n): CodecTree {\n\tconst children: CodecTree[] = [];\n\tchildren.push(getCodecTreeForForestFormat(clientVersion));\n\tchildren.push(getCodecTreeForSchemaFormat(clientVersion));\n\tchildren.push(getCodecTreeForDetachedFieldIndexFormat(clientVersion));\n\tchildren.push(getCodecTreeForEditManagerFormat(clientVersion));\n\tchildren.push(getCodecTreeForMessageFormat(clientVersion));\n\tchildren.push(getCodecTreeForFieldBatchFormat(clientVersion));\n\treturn {\n\t\tname: \"SharedTree\",\n\t\tversion: undefined, // SharedTree does not have a version of its own.\n\t\tchildren,\n\t};\n}\n\n/**\n * Configuration options for SharedTree.\n * @beta @input\n */\nexport type SharedTreeOptionsBeta = ForestOptions;\n\n/**\n * Configuration options for SharedTree with alpha features.\n * @alpha @input\n */\nexport interface SharedTreeOptions\n\textends SharedTreeOptionsBeta,\n\t\tPartial<CodecWriteOptions>,\n\t\tPartial<SharedTreeFormatOptions> {\n\t/**\n\t * Experimental feature flag to enable shared branches.\n\t * This feature is not yet complete and should not be used in production.\n\t * Defaults to false.\n\t */\n\treadonly enableSharedBranches?: boolean;\n\t/**\n\t * Experimental feature flag to enable the ability to edit detached roots.\n\t * This feature is not yet complete and should not be used in production.\n\t * Defaults to false.\n\t */\n\treadonly enableDetachedRootEditing?: boolean;\n\t/**\n\t * Returns whether a node / field should be incrementally encoded.\n\t * @remarks\n\t * See {@link IncrementalEncodingPolicy}.\n\t */\n\tshouldEncodeIncrementally?: IncrementalEncodingPolicy;\n}\n\nexport interface SharedTreeOptionsInternal\n\textends SharedTreeOptions,\n\t\tPartial<SharedTreeCoreOptionsInternal> {\n\tdisposeForksAfterTransaction?: boolean;\n}\n\n/**\n * Configuration options for SharedTree's internal tree storage.\n * @beta @input\n */\nexport interface ForestOptions {\n\t/**\n\t * The {@link ForestType} indicating which forest type should be created for the SharedTree.\n\t */\n\treadonly forest?: ForestType;\n}\n\n/**\n * Options for configuring the persisted format SharedTree uses.\n * @alpha @input\n */\nexport interface SharedTreeFormatOptions {\n\t/**\n\t * See {@link TreeCompressionStrategy}.\n\t * default: TreeCompressionStrategy.Compressed\n\t */\n\ttreeEncodeType: TreeCompressionStrategy;\n}\n\n/**\n * Used to distinguish between different forest types.\n * @remarks\n * The \"Forest\" is the internal data structure used to store all the trees (the main tree and any removed ones) for a given view or branch.\n * ForestTypes should all have the same behavior, but may differ in performance and debuggability.\n *\n * Current options are {@link ForestTypeReference}, {@link ForestTypeOptimized} and {@link ForestTypeExpensiveDebug}.\n * @privateRemarks\n * Implement using {@link toForestType}.\n * Consume using {@link buildConfiguredForest}.\n * @sealed @beta\n */\nexport interface ForestType extends ErasedType<\"ForestType\"> {}\n\n/**\n * Reference implementation of forest.\n * @remarks\n * A simple implementation with minimal complexity and moderate debuggability, validation and performance.\n * @privateRemarks\n * The \"ObjectForest\" forest type.\n * @beta\n */\nexport const ForestTypeReference = toForestType(\n\t(breaker: Breakable, schema: TreeStoredSchemaSubscription, idCompressor: IIdCompressor) =>\n\t\tbuildForest(breaker, schema),\n);\n\n/**\n * Optimized implementation of forest.\n * @remarks\n * A complex optimized forest implementation, which has minimal validation and debuggability to optimize for performance.\n * Uses an internal representation optimized for size designed to scale to larger datasets with reduced overhead.\n * @privateRemarks\n * The \"ChunkedForest\" forest type.\n * @beta\n */\nexport const ForestTypeOptimized = toForestType(\n\t(\n\t\tbreaker: Breakable,\n\t\tschema: TreeStoredSchemaSubscription,\n\t\tidCompressor: IIdCompressor,\n\t\tshouldEncodeIncrementally: IncrementalEncodingPolicy,\n\t) =>\n\t\tbuildChunkedForest(\n\t\t\tmakeTreeChunker(schema, defaultSchemaPolicy, shouldEncodeIncrementally),\n\t\t\tundefined,\n\t\t\tidCompressor,\n\t\t),\n);\n\n/**\n * Slow implementation of forest intended only for debugging.\n * @remarks\n * Includes validation with scales poorly.\n * May be asymptotically slower than {@link ForestTypeReference}, and may perform very badly with larger data sizes.\n * @privateRemarks\n * The \"ObjectForest\" forest type with expensive asserts for debugging.\n * @beta\n */\nexport const ForestTypeExpensiveDebug = toForestType(\n\t(breaker: Breakable, schema: TreeStoredSchemaSubscription) =>\n\t\tbuildForest(breaker, schema, undefined, true),\n);\n\ntype ForestFactory = (\n\tbreaker: Breakable,\n\tschema: TreeStoredSchemaSubscription,\n\tidCompressor: IIdCompressor,\n\tshouldEncodeIncrementally: IncrementalEncodingPolicy,\n) => IEditableForest;\n\nfunction toForestType(factory: ForestFactory): ForestType {\n\treturn factory as unknown as ForestType;\n}\n\n/**\n * Build and return a forest of the requested type.\n */\nexport function buildConfiguredForest(\n\tbreaker: Breakable,\n\tfactory: ForestType,\n\tschema: TreeStoredSchemaSubscription,\n\tidCompressor: IIdCompressor,\n\tshouldEncodeIncrementally: IncrementalEncodingPolicy,\n): IEditableForest {\n\treturn (factory as unknown as ForestFactory)(\n\t\tbreaker,\n\t\tschema,\n\t\tidCompressor,\n\t\tshouldEncodeIncrementally,\n\t);\n}\n\nexport const defaultSharedTreeOptions: Required<SharedTreeOptionsInternal> = {\n\tjsonValidator: FormatValidatorNoOp,\n\tminVersionForCollab: FluidClientVersion.v2_0,\n\tforest: ForestTypeReference,\n\ttreeEncodeType: TreeCompressionStrategy.Compressed,\n\tdisposeForksAfterTransaction: true,\n\tshouldEncodeIncrementally: defaultIncrementalEncodingPolicy,\n\teditManagerFormatSelector: clientVersionToEditManagerFormatVersion,\n\tmessageFormatSelector: clientVersionToMessageFormatVersion,\n\tenableSharedBranches: false,\n\tenableDetachedRootEditing: false,\n\tcanMakeDetachedRootEdits: false,\n};\n\n/**\n * Build the allowed types for a Stored Schema.\n *\n * @remarks Staged upgrades do not apply to stored schemas, so we omit the {@link SimpleAllowedTypeAttributes.isStaged | staging flag } when building {@link SimpleAllowedTypeAttributes}.\n * @param types - The types to create allowed types for.\n * @returns The allowed types.\n */\nfunction buildSimpleAllowedTypeAttributesForStoredSchema(\n\ttypes: TreeTypeSet,\n): ReadonlyMap<string, SimpleAllowedTypeAttributes<SchemaType.Stored>> {\n\tconst allowedTypesInfo = new Map<string, SimpleAllowedTypeAttributes<SchemaType.Stored>>();\n\tfor (const type of types) {\n\t\t// Stored schemas do not have staged upgrades\n\t\tallowedTypesInfo.set(type, { isStaged: undefined });\n\t}\n\treturn allowedTypesInfo;\n}\n\nfunction exportSimpleFieldSchemaStored(\n\tschema: TreeFieldStoredSchema,\n): SimpleFieldSchema<SchemaType.Stored> {\n\tlet kind: FieldKind;\n\tswitch (schema.kind) {\n\t\tcase FieldKinds.identifier.identifier:\n\t\t\tkind = FieldKind.Identifier;\n\t\t\tbreak;\n\t\tcase FieldKinds.optional.identifier:\n\t\t\tkind = FieldKind.Optional;\n\t\t\tbreak;\n\t\tcase FieldKinds.required.identifier:\n\t\t\tkind = FieldKind.Required;\n\t\t\tbreak;\n\t\tcase FieldKinds.forbidden.identifier:\n\t\t\tkind = FieldKind.Optional;\n\t\t\tassert(schema.types.size === 0, 0xa94 /* invalid forbidden field */);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tfail(0xaca /* invalid field kind */);\n\t}\n\treturn {\n\t\tkind,\n\t\tsimpleAllowedTypes: buildSimpleAllowedTypeAttributesForStoredSchema(schema.types),\n\t\tmetadata: {},\n\t\tpersistedMetadata: schema.persistedMetadata,\n\t};\n}\n\n/**\n * Export a {@link SimpleNodeSchema} from a {@link TreeNodeStoredSchema}.\n * @privateRemarks\n * TODO: Persist node metadata once schema FormatV2 is supported.\n * Note on SimpleNodeSchema construction: In the persisted format `persistedMetadata` is just called `metadata` whereas the `metadata`\n * field on SimpleNodeSchema is not persisted.\n */\nfunction exportSimpleNodeSchemaStored(\n\tschema: TreeNodeStoredSchema,\n): SimpleNodeSchema<SchemaType.Stored> {\n\tconst arrayTypes = tryStoredSchemaAsArray(schema);\n\tif (arrayTypes !== undefined) {\n\t\treturn {\n\t\t\tkind: NodeKind.Array,\n\t\t\tsimpleAllowedTypes: buildSimpleAllowedTypeAttributesForStoredSchema(arrayTypes),\n\t\t\tmetadata: {},\n\t\t\tpersistedMetadata: schema.metadata,\n\t\t};\n\t}\n\tif (schema instanceof ObjectNodeStoredSchema) {\n\t\tconst fields = new Map<FieldKey, SimpleObjectFieldSchema<SchemaType.Stored>>();\n\t\tfor (const [storedKey, field] of schema.objectNodeFields) {\n\t\t\tfields.set(storedKey, { ...exportSimpleFieldSchemaStored(field), storedKey });\n\t\t}\n\t\treturn {\n\t\t\tkind: NodeKind.Object,\n\t\t\tfields,\n\t\t\tallowUnknownOptionalFields: undefined,\n\t\t\tmetadata: {},\n\t\t\tpersistedMetadata: schema.metadata,\n\t\t};\n\t}\n\tif (schema instanceof MapNodeStoredSchema) {\n\t\tassert(\n\t\t\tschema.mapFields.kind === FieldKinds.optional.identifier,\n\t\t\t0xa95 /* Invalid map schema */,\n\t\t);\n\t\treturn {\n\t\t\tkind: NodeKind.Map,\n\t\t\tsimpleAllowedTypes: buildSimpleAllowedTypeAttributesForStoredSchema(\n\t\t\t\tschema.mapFields.types,\n\t\t\t),\n\t\t\tmetadata: {},\n\t\t\tpersistedMetadata: schema.metadata,\n\t\t};\n\t}\n\tif (schema instanceof LeafNodeStoredSchema) {\n\t\treturn {\n\t\t\tkind: NodeKind.Leaf,\n\t\t\tleafKind: schema.leafValue,\n\t\t\tmetadata: {},\n\t\t\tpersistedMetadata: schema.metadata,\n\t\t};\n\t}\n\tfail(0xacb /* invalid schema kind */);\n}\n"]}
|
|
@@ -13,7 +13,7 @@ interface ChangeFormatDependencies {
|
|
|
13
13
|
readonly modularChange: ModularChangeFormatVersion;
|
|
14
14
|
readonly schemaChange: SchemaFormatVersion;
|
|
15
15
|
}
|
|
16
|
-
export type SharedTreeChangeFormatVersion = Brand<3 | 4, "SharedTreeChangeFormatVersion">;
|
|
16
|
+
export type SharedTreeChangeFormatVersion = Brand<3 | 4 | 101, "SharedTreeChangeFormatVersion">;
|
|
17
17
|
/**
|
|
18
18
|
* Defines for each SharedTree change format the corresponding dependent formats to use.
|
|
19
19
|
* This is an arbitrary mapping that is injected in the SharedTree change codec.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeChangeCodecs.d.ts","sourceRoot":"","sources":["../../src/shared-tree/sharedTreeChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EACN,KAAK,SAAS,EACd,KAAK,iBAAiB,EAGtB,KAAK,YAAY,EAKjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,KAAK,qBAAqB,EAC1B,mBAAmB,EAEnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EAMrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEN,KAAK,KAAK,EAGV,MAAM,kBAAkB,CAAC;AAM1B,OAAO,KAAK,EAAE,gBAAgB,EAAyB,MAAM,4BAA4B,CAAC;AAE1F,wBAAgB,+BAA+B,CAC9C,wBAAwB,EAAE,YAAY,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,EAC/E,OAAO,EAAE,iBAAiB,GACxB,YAAY,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAqBvD;AAED,UAAU,wBAAwB;IACjC,QAAQ,CAAC,aAAa,EAAE,0BAA0B,CAAC;IACnD,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;CAC3C;AAED,MAAM,MAAM,6BAA6B,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"sharedTreeChangeCodecs.d.ts","sourceRoot":"","sources":["../../src/shared-tree/sharedTreeChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EACN,KAAK,SAAS,EACd,KAAK,iBAAiB,EAGtB,KAAK,YAAY,EAKjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,KAAK,qBAAqB,EAC1B,mBAAmB,EAEnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EAMrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEN,KAAK,KAAK,EAGV,MAAM,kBAAkB,CAAC;AAM1B,OAAO,KAAK,EAAE,gBAAgB,EAAyB,MAAM,4BAA4B,CAAC;AAE1F,wBAAgB,+BAA+B,CAC9C,wBAAwB,EAAE,YAAY,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,EAC/E,OAAO,EAAE,iBAAiB,GACxB,YAAY,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAqBvD;AAED,UAAU,wBAAwB;IACjC,QAAQ,CAAC,aAAa,EAAE,0BAA0B,CAAC;IACnD,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;CAC3C;AAED,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAChD,CAAC,GAAG,CAAC,GAAG,GAAG,EACX,+BAA+B,CAC/B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,GAAG,CAC5C,6BAA6B,EAC7B,wBAAwB,CAKvB,CAAC;AAEH,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,6BAA6B,EACtC,aAAa,EAAE,uBAAuB,GACpC,SAAS,CAWX"}
|
|
@@ -25,6 +25,7 @@ export function makeSharedTreeChangeCodecFamily(modularChangeCodecFamily, option
|
|
|
25
25
|
export const dependenciesForChangeFormat = new Map([
|
|
26
26
|
[brand(3), { modularChange: brand(3), schemaChange: brand(SchemaFormatVersion.v1) }],
|
|
27
27
|
[brand(4), { modularChange: brand(4), schemaChange: brand(SchemaFormatVersion.v1) }],
|
|
28
|
+
[brand(101), { modularChange: brand(101), schemaChange: brand(SchemaFormatVersion.v1) }],
|
|
28
29
|
]);
|
|
29
30
|
export function getCodecTreeForChangeFormat(version, clientVersion) {
|
|
30
31
|
const { modularChange, schemaChange } = dependenciesForChangeFormat.get(version) ?? fail(0xc78 /* Unknown change format */);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeChangeCodecs.js","sourceRoot":"","sources":["../../src/shared-tree/sharedTreeChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAE3D,OAAO,EAGN,4BAA4B,EAK5B,eAAe,EACf,oBAAoB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEN,mBAAmB,GAEnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAIN,mBAAmB,EACnB,kCAAkC,EAClC,iCAAiC,EACjC,sBAAsB,GACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,KAAK,GAIL,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,uBAAuB,GAEvB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,UAAU,+BAA+B,CAC9C,wBAA+E,EAC/E,OAA0B;IAE1B,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC3D,MAAM,QAAQ,GAQR,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAC1D,CAAC,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM;QACN,yBAAyB,CACxB,wBAAwB,CAAC,OAAO,CAAC,aAAa,C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EAAE,OAAO,EAAE,EAAE;YAClC,MAAM,OAAO,GAAyC,EAAE,CAAC;YACzD,KAAK,MAAM,SAAS,IAAI,aAAa,EAAE,CAAC;gBACvC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;YAC3D,CAAC;YACD,OAAO,EAAE,OAAO,EAAE,CAAC;QACpB,CAAC;KACD,EACD,YAAY,CAAC,aAAa,CAC1B,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\ttype CodecTree,\n\ttype CodecWriteOptions,\n\tDiscriminatedUnionDispatcher,\n\ttype FormatVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\twithSchemaValidation,\n} from \"../codec/index.js\";\nimport {\n\ttype ChangeEncodingContext,\n\tSchemaFormatVersion,\n\ttype TreeStoredSchema,\n} from \"../core/index.js\";\nimport {\n\ttype ModularChangeFormatVersion,\n\ttype ModularChangeset,\n\ttype SchemaChange,\n\tdefaultSchemaPolicy,\n\tgetCodecTreeForModularChangeFormat,\n\tgetCodecTreeForSchemaChangeFormat,\n\tmakeSchemaChangeCodecs,\n} from \"../feature-libraries/index.js\";\nimport {\n\tbrand,\n\ttype Brand,\n\ttype JsonCompatibleReadOnly,\n\ttype Mutable,\n} from \"../util/index.js\";\n\nimport {\n\tEncodedSharedTreeChange,\n\ttype EncodedSharedTreeInnerChange,\n} from \"./sharedTreeChangeFormat.js\";\nimport type { SharedTreeChange, SharedTreeInnerChange } from \"./sharedTreeChangeTypes.js\";\n\nexport function makeSharedTreeChangeCodecFamily(\n\tmodularChangeCodecFamily: ICodecFamily<ModularChangeset, ChangeEncodingContext>,\n\toptions: CodecWriteOptions,\n): ICodecFamily<SharedTreeChange, ChangeEncodingContext> {\n\tconst schemaChangeCodecs = makeSchemaChangeCodecs(options);\n\tconst versions: [\n\t\tFormatVersion,\n\t\tIJsonCodec<\n\t\t\tSharedTreeChange,\n\t\t\tEncodedSharedTreeChange,\n\t\t\tEncodedSharedTreeChange,\n\t\t\tChangeEncodingContext\n\t\t>,\n\t][] = Array.from(dependenciesForChangeFormat.entries()).map(\n\t\t([format, { modularChange, schemaChange }]) => [\n\t\t\tformat,\n\t\t\tmakeSharedTreeChangeCodec(\n\t\t\t\tmodularChangeCodecFamily.resolve(modularChange).json,\n\t\t\t\tschemaChangeCodecs.resolve(schemaChange).json,\n\t\t\t\toptions,\n\t\t\t),\n\t\t],\n\t);\n\treturn makeCodecFamily(versions);\n}\n\ninterface ChangeFormatDependencies {\n\treadonly modularChange: ModularChangeFormatVersion;\n\treadonly schemaChange: SchemaFormatVersion;\n}\n\nexport type SharedTreeChangeFormatVersion = Brand<\n\t3 | 4 | 101,\n\t\"SharedTreeChangeFormatVersion\"\n>;\n\n/**\n * Defines for each SharedTree change format the corresponding dependent formats to use.\n * This is an arbitrary mapping that is injected in the SharedTree change codec.\n * Once an entry is defined and used in production, it cannot be changed.\n * This is because the format for the dependent formats are not explicitly versioned.\n */\nexport const dependenciesForChangeFormat: Map<\n\tSharedTreeChangeFormatVersion,\n\tChangeFormatDependencies\n> = new Map([\n\t[brand(3), { modularChange: brand(3), schemaChange: brand(SchemaFormatVersion.v1) }],\n\t[brand(4), { modularChange: brand(4), schemaChange: brand(SchemaFormatVersion.v1) }],\n\t[brand(101), { modularChange: brand(101), schemaChange: brand(SchemaFormatVersion.v1) }],\n]);\n\nexport function getCodecTreeForChangeFormat(\n\tversion: SharedTreeChangeFormatVersion,\n\tclientVersion: MinimumVersionForCollab,\n): CodecTree {\n\tconst { modularChange, schemaChange } =\n\t\tdependenciesForChangeFormat.get(version) ?? fail(0xc78 /* Unknown change format */);\n\treturn {\n\t\tname: \"SharedTreeChange\",\n\t\tversion,\n\t\tchildren: [\n\t\t\tgetCodecTreeForModularChangeFormat(modularChange),\n\t\t\tgetCodecTreeForSchemaChangeFormat(schemaChange, clientVersion),\n\t\t],\n\t};\n}\n\nfunction makeSharedTreeChangeCodec(\n\tmodularChangeCodec: IJsonCodec<\n\t\tModularChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\tschemaChangeCodec: IJsonCodec<SchemaChange>,\n\tcodecOptions: ICodecOptions,\n): IJsonCodec<\n\tSharedTreeChange,\n\tEncodedSharedTreeChange,\n\tEncodedSharedTreeChange,\n\tChangeEncodingContext\n> {\n\tconst decoderLibrary = new DiscriminatedUnionDispatcher<\n\t\tEncodedSharedTreeInnerChange,\n\t\t[context: ChangeEncodingContext],\n\t\tSharedTreeInnerChange\n\t>({\n\t\tdata(encoded, context): SharedTreeInnerChange {\n\t\t\treturn {\n\t\t\t\ttype: \"data\",\n\t\t\t\tinnerChange: modularChangeCodec.decode(encoded, context),\n\t\t\t};\n\t\t},\n\t\tschema(encoded): SharedTreeInnerChange {\n\t\t\treturn {\n\t\t\t\ttype: \"schema\",\n\t\t\t\tinnerChange: schemaChangeCodec.decode(encoded),\n\t\t\t};\n\t\t},\n\t});\n\n\treturn withSchemaValidation(\n\t\tEncodedSharedTreeChange,\n\t\t{\n\t\t\tencode: (change, context) => {\n\t\t\t\tconst changes: EncodedSharedTreeInnerChange[] = [];\n\t\t\t\tlet updatedSchema: TreeStoredSchema | undefined;\n\t\t\t\tfor (const decodedChange of change.changes) {\n\t\t\t\t\tif (decodedChange.type === \"data\") {\n\t\t\t\t\t\tconst schemaAndPolicy =\n\t\t\t\t\t\t\tupdatedSchema !== undefined\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\tpolicy:\n\t\t\t\t\t\t\t\t\t\t\tcontext.schema !== undefined\n\t\t\t\t\t\t\t\t\t\t\t\t? context.schema.policy\n\t\t\t\t\t\t\t\t\t\t\t\t: defaultSchemaPolicy,\n\t\t\t\t\t\t\t\t\t\tschema: updatedSchema,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: context.schema;\n\t\t\t\t\t\tchanges.push({\n\t\t\t\t\t\t\tdata: modularChangeCodec.encode(decodedChange.innerChange, {\n\t\t\t\t\t\t\t\toriginatorId: context.originatorId,\n\t\t\t\t\t\t\t\tschema: schemaAndPolicy,\n\t\t\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\t\t\trevision: context.revision,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (decodedChange.type === \"schema\") {\n\t\t\t\t\t\tchanges.push({\n\t\t\t\t\t\t\tschema: schemaChangeCodec.encode(decodedChange.innerChange),\n\t\t\t\t\t\t});\n\t\t\t\t\t\tupdatedSchema = decodedChange.innerChange.schema.new;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn changes;\n\t\t\t},\n\t\t\tdecode: (encodedChange, context) => {\n\t\t\t\tconst changes: Mutable<SharedTreeChange[\"changes\"]> = [];\n\t\t\t\tfor (const subChange of encodedChange) {\n\t\t\t\t\tchanges.push(decoderLibrary.dispatch(subChange, context));\n\t\t\t\t}\n\t\t\t\treturn { changes };\n\t\t\t},\n\t\t},\n\t\tcodecOptions.jsonValidator,\n\t);\n}\n"]}
|
|
@@ -2,29 +2,41 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { type DetachedFieldIndex, type IEditableForest, type RevisionTag, type TreeStoredSchemaRepository } from "../core/index.js";
|
|
5
|
+
import { type DetachedFieldIndex, type IEditableForest, type IForestSubscription, type ReadOnlyDetachedFieldIndex, type RevisionTag, type TreeStoredSchemaRepository } from "../core/index.js";
|
|
6
6
|
import { disposeSymbol } from "../util/index.js";
|
|
7
7
|
import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
8
8
|
import type { ChangeEnricherMutableCheckout, ChangeEnricherReadonlyCheckout } from "../shared-tree-core/index.js";
|
|
9
9
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
10
10
|
export declare class SharedTreeReadonlyChangeEnricher implements ChangeEnricherReadonlyCheckout<SharedTreeChange> {
|
|
11
|
-
protected readonly
|
|
11
|
+
protected readonly borrowedForest: IForestSubscription;
|
|
12
12
|
private readonly schema;
|
|
13
|
-
protected readonly
|
|
13
|
+
protected readonly borrowedRemovedRoots: ReadOnlyDetachedFieldIndex;
|
|
14
14
|
private readonly idCompressor?;
|
|
15
15
|
/**
|
|
16
|
-
* @param
|
|
17
|
-
*
|
|
16
|
+
* @param borrowedForest - The state based on which to enrich changes.
|
|
17
|
+
* Not owned by the constructed instance.
|
|
18
18
|
* @param schema - The schema that corresponds to the forest.
|
|
19
|
-
* @param
|
|
20
|
-
*
|
|
19
|
+
* @param borrowedRemovedRoots - The set of removed roots based on which to enrich changes.
|
|
20
|
+
* Not owned by the constructed instance.
|
|
21
|
+
* @param idCompressor - The id compressor to use when chunking trees.
|
|
21
22
|
*/
|
|
22
|
-
constructor(
|
|
23
|
+
constructor(borrowedForest: IForestSubscription, schema: TreeStoredSchemaRepository, borrowedRemovedRoots: ReadOnlyDetachedFieldIndex, idCompressor?: IIdCompressor | undefined);
|
|
23
24
|
fork(): ChangeEnricherMutableCheckout<SharedTreeChange>;
|
|
24
25
|
updateChangeEnrichments(change: SharedTreeChange): SharedTreeChange;
|
|
25
26
|
private readonly getDetachedRoot;
|
|
26
27
|
}
|
|
27
28
|
export declare class SharedTreeMutableChangeEnricher extends SharedTreeReadonlyChangeEnricher implements ChangeEnricherMutableCheckout<SharedTreeChange> {
|
|
29
|
+
private readonly forest;
|
|
30
|
+
private readonly removedRoots;
|
|
31
|
+
/**
|
|
32
|
+
* @param forest - The state based on which to enrich changes.
|
|
33
|
+
* Owned by the constructed instance.
|
|
34
|
+
* @param schema - The schema that corresponds to the forest.
|
|
35
|
+
* @param removedRoots - The set of removed roots based on which to enrich changes.
|
|
36
|
+
* Owned by the constructed instance.
|
|
37
|
+
* @param idCompressor - The id compressor to use when chunking trees.
|
|
38
|
+
*/
|
|
39
|
+
constructor(forest: IEditableForest, schema: TreeStoredSchemaRepository, removedRoots: DetachedFieldIndex, idCompressor?: IIdCompressor);
|
|
28
40
|
applyTipChange(change: SharedTreeChange, revision?: RevisionTag): void;
|
|
29
41
|
[disposeSymbol](): void;
|
|
30
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeChangeEnricher.d.ts","sourceRoot":"","sources":["../../src/shared-tree/sharedTreeChangeEnricher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAGN,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,0BAA0B,EAG/B,MAAM,kBAAkB,CAAC;AAS1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EACX,6BAA6B,EAC7B,8BAA8B,EAC9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,qBAAa,gCACZ,YAAW,8BAA8B,CAAC,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"sharedTreeChangeEnricher.d.ts","sourceRoot":"","sources":["../../src/shared-tree/sharedTreeChangeEnricher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAGN,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,WAAW,EAChB,KAAK,0BAA0B,EAG/B,MAAM,kBAAkB,CAAC;AAS1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAA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
10
|
export class SharedTreeReadonlyChangeEnricher {
|
|
11
11
|
/**
|
|
12
|
-
* @param
|
|
13
|
-
*
|
|
12
|
+
* @param borrowedForest - The state based on which to enrich changes.
|
|
13
|
+
* Not owned by the constructed instance.
|
|
14
14
|
* @param schema - The schema that corresponds to the forest.
|
|
15
|
-
* @param
|
|
16
|
-
*
|
|
15
|
+
* @param borrowedRemovedRoots - The set of removed roots based on which to enrich changes.
|
|
16
|
+
* Not owned by the constructed instance.
|
|
17
|
+
* @param idCompressor - The id compressor to use when chunking trees.
|
|
17
18
|
*/
|
|
18
|
-
constructor(
|
|
19
|
-
this.
|
|
19
|
+
constructor(borrowedForest, schema, borrowedRemovedRoots, idCompressor) {
|
|
20
|
+
this.borrowedForest = borrowedForest;
|
|
20
21
|
this.schema = schema;
|
|
21
|
-
this.
|
|
22
|
+
this.borrowedRemovedRoots = borrowedRemovedRoots;
|
|
22
23
|
this.idCompressor = idCompressor;
|
|
23
24
|
this.getDetachedRoot = (id) => {
|
|
24
|
-
const root = this.
|
|
25
|
+
const root = this.borrowedRemovedRoots.tryGetEntry(id);
|
|
25
26
|
if (root !== undefined) {
|
|
26
|
-
const cursor = this.
|
|
27
|
-
const parentField = this.
|
|
27
|
+
const cursor = this.borrowedForest.getCursorAboveDetachedFields();
|
|
28
|
+
const parentField = this.borrowedRemovedRoots.toFieldKey(root);
|
|
28
29
|
cursor.enterField(parentField);
|
|
29
30
|
cursor.enterNode(0);
|
|
30
31
|
return chunkTree(cursor, {
|
|
@@ -36,13 +37,26 @@ export class SharedTreeReadonlyChangeEnricher {
|
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
fork() {
|
|
39
|
-
return new SharedTreeMutableChangeEnricher(this.
|
|
40
|
+
return new SharedTreeMutableChangeEnricher(this.borrowedForest.clone(this.schema, new AnchorSet()), this.schema, this.borrowedRemovedRoots.clone());
|
|
40
41
|
}
|
|
41
42
|
updateChangeEnrichments(change) {
|
|
42
43
|
return updateRefreshers(change, this.getDetachedRoot, relevantRemovedRoots, updateDataChangeRefreshers);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
export class SharedTreeMutableChangeEnricher extends SharedTreeReadonlyChangeEnricher {
|
|
47
|
+
/**
|
|
48
|
+
* @param forest - The state based on which to enrich changes.
|
|
49
|
+
* Owned by the constructed instance.
|
|
50
|
+
* @param schema - The schema that corresponds to the forest.
|
|
51
|
+
* @param removedRoots - The set of removed roots based on which to enrich changes.
|
|
52
|
+
* Owned by the constructed instance.
|
|
53
|
+
* @param idCompressor - The id compressor to use when chunking trees.
|
|
54
|
+
*/
|
|
55
|
+
constructor(forest, schema, removedRoots, idCompressor) {
|
|
56
|
+
super(forest, schema, removedRoots, idCompressor);
|
|
57
|
+
this.forest = forest;
|
|
58
|
+
this.removedRoots = removedRoots;
|
|
59
|
+
}
|
|
46
60
|
applyTipChange(change, revision) {
|
|
47
61
|
for (const dataOrSchemaChange of change.changes) {
|
|
48
62
|
const type = dataOrSchemaChange.type;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeChangeEnricher.js","sourceRoot":"","sources":["../../src/shared-tree/sharedTreeChangeEnricher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EACN,SAAS,
|
|
1
|
+
{"version":3,"file":"sharedTreeChangeEnricher.js","sourceRoot":"","sources":["../../src/shared-tree/sharedTreeChangeEnricher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EACN,SAAS,EAQT,SAAS,EACT,UAAU,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEN,SAAS,EACT,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACpB,gBAAgB,IAAI,0BAA0B,GAC9C,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,k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AAoB,EACpB,0BAA0B,CAC1B,CAAC;IACH,CAAC;CAgBD;AAED,MAAM,OAAO,+BACZ,SAAQ,gCAAgC;IAGxC;;;;;;;OAOG;IACH,YACkB,MAAuB,EACxC,MAAkC,EACjB,YAAgC,EACjD,YAA4B;QAE5B,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;QALjC,WAAM,GAAN,MAAM,CAAiB;QAEvB,iBAAY,GAAZ,YAAY,CAAoB;IAIlD,CAAC;IAEM,cAAc,CAAC,MAAwB,EAAE,QAAsB;QACrE,KAAK,MAAM,kBAAkB,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACjD,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC;YACrC,QAAQ,IAAI,EAAE,CAAC;gBACd,KAAK,MAAM,CAAC,CAAC,CAAC;oBACb,MAAM,KAAK,GAAG,SAAS,CAAC,SAAS,CAAC,kBAAkB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;oBAC7E,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;oBAC7C,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;oBACxD,OAAO,CAAC,IAAI,EAAE,CAAC;oBACf,MAAM;gBACP,CAAC;gBACD,KAAK,QAAQ;oBACZ,6DAA6D;oBAC7D,mGAAmG;oBACnG,+FAA+F;oBAC/F,wDAAwD;oBACxD,MAAM;gBACP;oBACC,eAAe,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;QACF,CAAC;IACF,CAAC;IAEM,CAAC,aAAa,CAAC;QACrB,yEAAyE;IAC1E,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport {\n\tAnchorSet,\n\ttype DeltaDetachedNodeId,\n\ttype DetachedFieldIndex,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype ReadOnlyDetachedFieldIndex,\n\ttype RevisionTag,\n\ttype TreeStoredSchemaRepository,\n\ttagChange,\n\tvisitDelta,\n} from \"../core/index.js\";\nimport {\n\ttype TreeChunk,\n\tchunkTree,\n\tdefaultChunkPolicy,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tupdateRefreshers as updateDataChangeRefreshers,\n} from \"../feature-libraries/index.js\";\nimport { disposeSymbol } from \"../util/index.js\";\nimport { updateRefreshers } from \"./sharedTreeChangeFamily.js\";\nimport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\nimport type {\n\tChangeEnricherMutableCheckout,\n\tChangeEnricherReadonlyCheckout,\n} from \"../shared-tree-core/index.js\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nexport class SharedTreeReadonlyChangeEnricher\n\timplements ChangeEnricherReadonlyCheckout<SharedTreeChange>\n{\n\t/**\n\t * @param borrowedForest - The state based on which to enrich changes.\n\t * Not owned by the constructed instance.\n\t * @param schema - The schema that corresponds to the forest.\n\t * @param borrowedRemovedRoots - The set of removed roots based on which to enrich changes.\n\t * Not owned by the constructed instance.\n\t * @param idCompressor - The id compressor to use when chunking trees.\n\t */\n\tpublic constructor(\n\t\tprotected readonly borrowedForest: IForestSubscription,\n\t\tprivate readonly schema: TreeStoredSchemaRepository,\n\t\tprotected readonly borrowedRemovedRoots: ReadOnlyDetachedFieldIndex,\n\t\tprivate readonly idCompressor?: IIdCompressor,\n\t) {}\n\n\tpublic fork(): ChangeEnricherMutableCheckout<SharedTreeChange> {\n\t\treturn new SharedTreeMutableChangeEnricher(\n\t\t\tthis.borrowedForest.clone(this.schema, new AnchorSet()),\n\t\t\tthis.schema,\n\t\t\tthis.borrowedRemovedRoots.clone(),\n\t\t);\n\t}\n\n\tpublic updateChangeEnrichments(change: SharedTreeChange): SharedTreeChange {\n\t\treturn updateRefreshers(\n\t\t\tchange,\n\t\t\tthis.getDetachedRoot,\n\t\t\trelevantRemovedRoots,\n\t\t\tupdateDataChangeRefreshers,\n\t\t);\n\t}\n\n\tprivate readonly getDetachedRoot = (id: DeltaDetachedNodeId): TreeChunk | undefined => {\n\t\tconst root = this.borrowedRemovedRoots.tryGetEntry(id);\n\t\tif (root !== undefined) {\n\t\t\tconst cursor = this.borrowedForest.getCursorAboveDetachedFields();\n\t\t\tconst parentField = this.borrowedRemovedRoots.toFieldKey(root);\n\t\t\tcursor.enterField(parentField);\n\t\t\tcursor.enterNode(0);\n\t\t\treturn chunkTree(cursor, {\n\t\t\t\tpolicy: defaultChunkPolicy,\n\t\t\t\tidCompressor: this.idCompressor,\n\t\t\t});\n\t\t}\n\t\treturn undefined;\n\t};\n}\n\nexport class SharedTreeMutableChangeEnricher\n\textends SharedTreeReadonlyChangeEnricher\n\timplements ChangeEnricherMutableCheckout<SharedTreeChange>\n{\n\t/**\n\t * @param forest - The state based on which to enrich changes.\n\t * Owned by the constructed instance.\n\t * @param schema - The schema that corresponds to the forest.\n\t * @param removedRoots - The set of removed roots based on which to enrich changes.\n\t * Owned by the constructed instance.\n\t * @param idCompressor - The id compressor to use when chunking trees.\n\t */\n\tpublic constructor(\n\t\tprivate readonly forest: IEditableForest,\n\t\tschema: TreeStoredSchemaRepository,\n\t\tprivate readonly removedRoots: DetachedFieldIndex,\n\t\tidCompressor?: IIdCompressor,\n\t) {\n\t\tsuper(forest, schema, removedRoots, idCompressor);\n\t}\n\n\tpublic applyTipChange(change: SharedTreeChange, revision?: RevisionTag): void {\n\t\tfor (const dataOrSchemaChange of change.changes) {\n\t\t\tconst type = dataOrSchemaChange.type;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"data\": {\n\t\t\t\t\tconst delta = intoDelta(tagChange(dataOrSchemaChange.innerChange, revision));\n\t\t\t\t\tconst visitor = this.forest.acquireVisitor();\n\t\t\t\t\tvisitDelta(delta, visitor, this.removedRoots, revision);\n\t\t\t\t\tvisitor.free();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"schema\":\n\t\t\t\t\t// This enricher doesn't need to maintain schema information.\n\t\t\t\t\t// Note that the refreshers being generated through `updateChangeEnrichments` will be encoded using\n\t\t\t\t\t// the schema that was used in the input context of the data changeset these refreshers are on.\n\t\t\t\t\t// See the encoding logic in SharedTreeCore for details.\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tunreachableCase(type);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic [disposeSymbol](): void {\n\t\t// TODO: in the future, forest and/or its AnchorSet may require disposal.\n\t}\n}\n"]}
|
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
6
6
|
import type { CodecWriteOptions, ICodecFamily } from "../codec/index.js";
|
|
7
|
-
import { type ChangeEncodingContext, type ChangeFamily, type ChangeRebaser, type DeltaDetachedNodeId, type RevisionMetadataSource, type RevisionTag, type RevisionTagCodec, type TaggedChange } from "../core/index.js";
|
|
8
|
-
import { type FieldBatchCodec, type ModularChangeset, type TreeChunk, type
|
|
7
|
+
import { type ChangeEncodingContext, type ChangeFamily, type ChangeRebaser, type DeltaDetachedNodeId, type EditorOptions, type RevisionMetadataSource, type RevisionTag, type RevisionTagCodec, type TaggedChange } from "../core/index.js";
|
|
8
|
+
import { type FieldBatchCodec, type ModularChangeset, type TreeChunk, type TreeCompressionStrategy } from "../feature-libraries/index.js";
|
|
9
9
|
import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
10
|
-
import {
|
|
10
|
+
import { IdBasedSharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
|
|
11
11
|
/**
|
|
12
12
|
* Implementation of {@link ChangeFamily} that combines edits to fields and schema changes.
|
|
13
13
|
*
|
|
14
14
|
* @sealed
|
|
15
15
|
*/
|
|
16
|
-
export declare class SharedTreeChangeFamily implements ChangeFamily<
|
|
16
|
+
export declare class SharedTreeChangeFamily implements ChangeFamily<IdBasedSharedTreeEditBuilder, SharedTreeChange>, ChangeRebaser<SharedTreeChange> {
|
|
17
17
|
private readonly idCompressor?;
|
|
18
18
|
static readonly emptyChange: SharedTreeChange;
|
|
19
19
|
readonly codecs: ICodecFamily<SharedTreeChange, ChangeEncodingContext>;
|
|
20
20
|
private readonly modularChangeFamily;
|
|
21
|
-
constructor(revisionTagCodec: RevisionTagCodec, fieldBatchCodec: FieldBatchCodec, codecOptions: CodecWriteOptions, chunkCompressionStrategy?:
|
|
22
|
-
buildEditor(mintRevisionTag: () => RevisionTag, changeReceiver: (change: TaggedChange<SharedTreeChange>) => void):
|
|
21
|
+
constructor(revisionTagCodec: RevisionTagCodec, fieldBatchCodec: FieldBatchCodec, codecOptions: CodecWriteOptions, chunkCompressionStrategy?: TreeCompressionStrategy, idCompressor?: IIdCompressor | undefined);
|
|
22
|
+
buildEditor(mintRevisionTag: () => RevisionTag, changeReceiver: (change: TaggedChange<SharedTreeChange>) => void, options?: EditorOptions): IdBasedSharedTreeEditBuilder;
|
|
23
23
|
compose(changes: TaggedChange<SharedTreeChange>[]): SharedTreeChange;
|
|
24
24
|
invert(change: TaggedChange<SharedTreeChange>, isRollback: boolean, revision: RevisionTag): SharedTreeChange;
|
|
25
25
|
rebase(change: TaggedChange<SharedTreeChange>, over: TaggedChange<SharedTreeChange>, revisionMetadata: RevisionMetadataSource): SharedTreeChange;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTreeChangeFamily.d.ts","sourceRoot":"","sources":["../../src/shared-tree/sharedTreeChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK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Y,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EAC3C,iBAAiB,EAAE,OAAO,KACtB,gBAAgB,GACnB,gBAAgB,CAsDlB"}
|
|
@@ -7,7 +7,7 @@ import { mapTaggedChange, } from "../core/index.js";
|
|
|
7
7
|
import { ModularChangeFamily, fieldKindConfigurations, fieldKinds, makeModularChangeCodecFamily, } from "../feature-libraries/index.js";
|
|
8
8
|
import { addToNestedSet, hasSingle, nestedSetContains, } from "../util/index.js";
|
|
9
9
|
import { makeSharedTreeChangeCodecFamily } from "./sharedTreeChangeCodecs.js";
|
|
10
|
-
import {
|
|
10
|
+
import { IdBasedSharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
|
|
11
11
|
/**
|
|
12
12
|
* Implementation of {@link ChangeFamily} that combines edits to fields and schema changes.
|
|
13
13
|
*
|
|
@@ -20,8 +20,8 @@ export class SharedTreeChangeFamily {
|
|
|
20
20
|
this.modularChangeFamily = new ModularChangeFamily(fieldKinds, modularChangeCodec);
|
|
21
21
|
this.codecs = makeSharedTreeChangeCodecFamily(this.modularChangeFamily.codecs, codecOptions);
|
|
22
22
|
}
|
|
23
|
-
buildEditor(mintRevisionTag, changeReceiver) {
|
|
24
|
-
return new
|
|
23
|
+
buildEditor(mintRevisionTag, changeReceiver, options) {
|
|
24
|
+
return new IdBasedSharedTreeEditBuilder(this.modularChangeFamily, mintRevisionTag, changeReceiver, options);
|
|
25
25
|
}
|
|
26
26
|
compose(changes) {
|
|
27
27
|
const newChanges = [];
|