@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":"index.js","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAKN,gBAAgB,EAChB,SAAS,EAIT,qBAAqB,EACrB,wBAAwB,EAGxB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAElB,uBAAuB,EACvB,+BAA+B,GAC/B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,kBAAkB,EAClB,YAAY,GAMZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAKN,gBAAgB,EAChB,SAAS,EAIT,qBAAqB,EACrB,wBAAwB,EAGxB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAElB,uBAAuB,EACvB,+BAA+B,GAC/B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,kBAAkB,EAClB,YAAY,GAMZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AASvE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EACN,SAAS,GAGT,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACN,0BAA0B,EAE1B,eAAe,EACf,yBAAyB,EACzB,0BAA0B,GAC1B,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EACN,2BAA2B,GAE3B,MAAM,6BAA6B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype ITreePrivate,\n\ttype SharedTreeOptionsInternal,\n\ttype SharedTreeOptions,\n\ttype SharedTreeOptionsBeta,\n\tSharedTreeKernel,\n\tgetBranch,\n\ttype ForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype SharedTreeFormatOptions,\n\tbuildConfiguredForest,\n\tdefaultSharedTreeOptions,\n\ttype ForestOptions,\n\ttype ITreeInternal,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n\texportSimpleSchema,\n\ttype SharedTreeKernelView,\n\tpersistedToSimpleSchema,\n\tgetCodecTreeForSharedTreeFormat,\n} from \"./sharedTree.js\";\n\nexport {\n\tcreateTreeCheckout,\n\tTreeCheckout,\n\ttype ITreeCheckout,\n\ttype CheckoutEvents,\n\ttype ITreeCheckoutFork,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n} from \"./treeCheckout.js\";\n\nexport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\n\nexport { initialize, initializerFromChunk } from \"./schematizeTree.js\";\n\nexport type {\n\tIIdBasedSharedTreeEditor,\n\tILocationBasedSharedTreeEditor,\n\tISchemaEditor,\n\tIdBasedSharedTreeEditBuilder,\n} from \"./sharedTreeEditBuilder.js\";\n\nexport { Tree } from \"./tree.js\";\nexport type { RunTransaction } from \"./tree.js\";\n\nexport {\n\tTreeAlpha,\n\ttype TreeIdentifierUtils,\n\ttype ObservationResults,\n} from \"./treeAlpha.js\";\n\nexport {\n\tindependentInitializedView,\n\ttype ViewContent,\n\tindependentView,\n\tcreateIndependentTreeBeta,\n\tcreateIndependentTreeAlpha,\n} from \"./independentView.js\";\n\nexport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\n\nexport {\n\tgetCodecTreeForChangeFormat,\n\ttype SharedTreeChangeFormatVersion,\n} from \"./sharedTreeChangeCodecs.js\";\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { type TreeStoredSchema } from "../core/index.js";
|
|
6
|
-
import { type
|
|
5
|
+
import { type ChangeAtomId, type TreeStoredSchema } from "../core/index.js";
|
|
6
|
+
import { type DetachedRootIds, type ILocationBasedDataEditor, type DataEditor, type TreeChunk } from "../feature-libraries/index.js";
|
|
7
7
|
import type { ITreeCheckout } from "./treeCheckout.js";
|
|
8
8
|
export declare function canInitialize(checkout: ITreeCheckout): boolean;
|
|
9
9
|
/**
|
|
@@ -22,7 +22,7 @@ export declare function canInitialize(checkout: ITreeCheckout): boolean;
|
|
|
22
22
|
* @privateRemarks
|
|
23
23
|
* This takes in a checkout using a subset of the checkout interface to enable easier unit testing.
|
|
24
24
|
*/
|
|
25
|
-
export declare function initialize(checkout: Pick<ITreeCheckout, "storedSchema" | "updateSchema">, newSchema: TreeStoredSchema, setInitialTree: () =>
|
|
25
|
+
export declare function initialize<T>(checkout: Pick<ITreeCheckout, "storedSchema" | "updateSchema">, newSchema: TreeStoredSchema, setInitialTree: () => T): T;
|
|
26
26
|
/**
|
|
27
27
|
* Construct a general purpose `setInitialTree` for use with {@link initialize} from a function that returns a chunk.
|
|
28
28
|
* @param contentFactory - A function that returns the initial tree content as a chunk.
|
|
@@ -34,6 +34,6 @@ export declare function initialize(checkout: Pick<ITreeCheckout, "storedSchema"
|
|
|
34
34
|
* A test utility for them can be found as `initializeSequenceRoot` for testing internal logic which uses a sequence root.
|
|
35
35
|
*/
|
|
36
36
|
export declare function initializerFromChunk(checkout: Pick<ITreeCheckout, "storedSchema"> & {
|
|
37
|
-
readonly editor:
|
|
37
|
+
readonly editor: ILocationBasedDataEditor | DataEditor<TreeChunk, ChangeAtomId, DetachedRootIds>;
|
|
38
38
|
}, contentFactory: () => TreeChunk): () => void;
|
|
39
39
|
//# sourceMappingURL=schematizeTree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematizeTree.d.ts","sourceRoot":"","sources":["../../src/shared-tree/schematizeTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"schematizeTree.d.ts","sourceRoot":"","sources":["../../src/shared-tree/schematizeTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAGrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAIN,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,SAAS,EACd,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAG9D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC3B,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,cAAc,GAAG,cAAc,CAAC,EAC9D,SAAS,EAAE,gBAAgB,EAC3B,cAAc,EAAE,MAAM,CAAC,GACrB,CAAC,CA8CH;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CACnC,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG;IAC/C,QAAQ,CAAC,MAAM,EACZ,wBAAwB,GACxB,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC;CACxD,EACD,cAAc,EAAE,MAAM,SAAS,GAC7B,MAAM,IAAI,CAEZ"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
6
|
-
import { rootFieldKey, schemaDataIsEmpty } from "../core/index.js";
|
|
6
|
+
import { rootFieldKey, schemaDataIsEmpty, } from "../core/index.js";
|
|
7
7
|
import { FieldKinds, allowsRepoSuperset, defaultSchemaPolicy, } from "../feature-libraries/index.js";
|
|
8
8
|
export function canInitialize(checkout) {
|
|
9
9
|
// Check for empty.
|
|
@@ -52,12 +52,13 @@ export function initialize(checkout, newSchema, setInitialTree) {
|
|
|
52
52
|
}
|
|
53
53
|
assert(allowsRepoSuperset(defaultSchemaPolicy, newSchema, intermediateSchema), 0x5c9 /* Incremental Schema during update should allow a superset of the final schema */);
|
|
54
54
|
checkout.updateSchema(intermediateSchema);
|
|
55
|
-
setInitialTree();
|
|
55
|
+
const result = setInitialTree();
|
|
56
56
|
// If intermediate schema is not final desired schema, update to the final schema:
|
|
57
57
|
if (intermediateSchema !== newSchema) {
|
|
58
58
|
// This makes the root more strict, so set allowNonSupersetSchema to true.
|
|
59
59
|
checkout.updateSchema(newSchema, true);
|
|
60
60
|
}
|
|
61
|
+
return result;
|
|
61
62
|
}
|
|
62
63
|
/**
|
|
63
64
|
* Construct a general purpose `setInitialTree` for use with {@link initialize} from a function that returns a chunk.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematizeTree.js","sourceRoot":"","sources":["../../src/shared-tree/schematizeTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,
|
|
1
|
+
{"version":3,"file":"schematizeTree.js","sourceRoot":"","sources":["../../src/shared-tree/schematizeTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAGN,YAAY,EACZ,iBAAiB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,UAAU,EACV,kBAAkB,EAClB,mBAAmB,GAKnB,MAAM,+BAA+B,CAAC;AAIvC,MAAM,UAAU,aAAa,CAAC,QAAuB;IACpD,mBAAmB;IACnB,O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AkB,KAAK,SAAS,EAAE,CAAC;QACtC,0EAA0E;QAC1E,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CACnC,QAIC,EACD,cAA+B;IAE/B,OAAO,GAAG,EAAE,CAAC,mBAAmB,CAAC,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,mBAAmB,CAC3B,QAIC,EACD,YAAuB;IAEvB,MAAM,KAAK,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IACzD,MAAM,CACL,QAAQ,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,KAAK,UAAU,CAAC,QAAQ,CAAC,UAAU,EAC7E,KAAK,CAAC,uDAAuD,CAC7D,CAAC;IACF,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACzD,MAAM,CACL,YAAY,CAAC,cAAc,IAAI,CAAC,EAChC,KAAK,CAAC,8DAA8D,CACpE,CAAC;IACF,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AACrF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ChangeAtomId,\n\ttype TreeStoredSchema,\n\trootFieldKey,\n\tschemaDataIsEmpty,\n} from \"../core/index.js\";\nimport {\n\tFieldKinds,\n\tallowsRepoSuperset,\n\tdefaultSchemaPolicy,\n\ttype DetachedRootIds,\n\ttype ILocationBasedDataEditor,\n\ttype DataEditor,\n\ttype TreeChunk,\n} from \"../feature-libraries/index.js\";\n\nimport type { ITreeCheckout } from \"./treeCheckout.js\";\n\nexport function canInitialize(checkout: ITreeCheckout): boolean {\n\t// Check for empty.\n\treturn checkout.forest.isEmpty && schemaDataIsEmpty(checkout.storedSchema);\n}\n\n/**\n * Initialize a checkout with a schema and tree content.\n * This function should only be called when the tree is uninitialized (no schema or content).\n *\n * @param checkout - The tree checkout to initialize.\n * @param newSchema - The new schema to apply.\n * @param contentFactory - A function that sets the initial tree content.\n * Invoked after a schema containing all nodes from newSchema is applied.\n * Note that the final root field schema may not have been applied yet: if the root is required, it will be optional at this time\n * (so the root being empty before the insertion is not out of schema).\n * @remarks\n * If `newSchema` is not compatible with the empty tree, this function handles it using an intermediate schema\n * which supports the empty tree as well as the final tree content.\n * @privateRemarks\n * This takes in a checkout using a subset of the checkout interface to enable easier unit testing.\n */\nexport function initialize<T>(\n\tcheckout: Pick<ITreeCheckout, \"storedSchema\" | \"updateSchema\">,\n\tnewSchema: TreeStoredSchema,\n\tsetInitialTree: () => T,\n): T {\n\tassert(\n\t\tschemaDataIsEmpty(checkout.storedSchema),\n\t\t0x743 /* cannot initialize after a schema is set */,\n\t);\n\n\t// To keep the data in schema during the update, first define a schema that tolerates the current (empty) tree as well as the final (initial) tree.\n\tlet intermediateSchema: TreeStoredSchema;\n\t{\n\t\tconst rootSchema = newSchema.rootFieldSchema;\n\t\tconst rootKind = rootSchema.kind;\n\t\tif (\n\t\t\trootKind === FieldKinds.sequence.identifier ||\n\t\t\trootKind === FieldKinds.optional.identifier\n\t\t) {\n\t\t\t// These kinds are known to tolerate empty, so use the schema as is:\n\t\t\tintermediateSchema = newSchema;\n\t\t} else {\n\t\t\tassert(rootKind === FieldKinds.required.identifier, 0x5c8 /* Unexpected kind */);\n\t\t\t// Replace value kind with optional kind in root field schema:\n\t\t\tintermediateSchema = {\n\t\t\t\tnodeSchema: newSchema.nodeSchema,\n\t\t\t\trootFieldSchema: {\n\t\t\t\t\tkind: FieldKinds.optional.identifier,\n\t\t\t\t\ttypes: rootSchema.types,\n\t\t\t\t\tpersistedMetadata: rootSchema.persistedMetadata,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n\n\tassert(\n\t\tallowsRepoSuperset(defaultSchemaPolicy, newSchema, intermediateSchema),\n\t\t0x5c9 /* Incremental Schema during update should allow a superset of the final schema */,\n\t);\n\n\tcheckout.updateSchema(intermediateSchema);\n\tconst result = setInitialTree();\n\n\t// If intermediate schema is not final desired schema, update to the final schema:\n\tif (intermediateSchema !== newSchema) {\n\t\t// This makes the root more strict, so set allowNonSupersetSchema to true.\n\t\tcheckout.updateSchema(newSchema, true);\n\t}\n\n\treturn result;\n}\n\n/**\n * Construct a general purpose `setInitialTree` for use with {@link initialize} from a function that returns a chunk.\n * @param contentFactory - A function that returns the initial tree content as a chunk.\n * Invoked after a schema containing all nodes from newSchema is applied.\n * Note that the final root field schema may not have been applied yet: if the root is required, it will be optional at this time\n * (so the root being empty before the insertion is not out of schema).\n * @remarks\n * This does not support sequence roots as they are not allowed in the public API surface.\n * A test utility for them can be found as `initializeSequenceRoot` for testing internal logic which uses a sequence root.\n */\nexport function initializerFromChunk(\n\tcheckout: Pick<ITreeCheckout, \"storedSchema\"> & {\n\t\treadonly editor:\n\t\t\t| ILocationBasedDataEditor\n\t\t\t| DataEditor<TreeChunk, ChangeAtomId, DetachedRootIds>;\n\t},\n\tcontentFactory: () => TreeChunk,\n): () => void {\n\treturn () => initializeFromChunk(checkout, contentFactory());\n}\n\nfunction initializeFromChunk(\n\tcheckout: Pick<ITreeCheckout, \"storedSchema\"> & {\n\t\treadonly editor:\n\t\t\t| ILocationBasedDataEditor\n\t\t\t| DataEditor<TreeChunk, ChangeAtomId, DetachedRootIds>;\n\t},\n\tcontentChunk: TreeChunk,\n): void {\n\tconst field = { field: rootFieldKey, parent: undefined };\n\tassert(\n\t\tcheckout.storedSchema.rootFieldSchema.kind === FieldKinds.optional.identifier,\n\t\t0xc11 /* initializerFromChunk only supports optional roots */,\n\t);\n\tconst fieldEditor = checkout.editor.optionalField(field);\n\tassert(\n\t\tcontentChunk.topLevelLength <= 1,\n\t\t0x7f4 /* optional field content should normalize at most one item */,\n\t);\n\tfieldEditor.set(contentChunk.topLevelLength === 0 ? undefined : contentChunk, true);\n}\n"]}
|
|
@@ -49,10 +49,6 @@ export declare class SchematizingSimpleTreeView<in out TRootSchema extends Impli
|
|
|
49
49
|
* which are implementation details and should not be exposed to the user.
|
|
50
50
|
*/
|
|
51
51
|
private midUpgrade;
|
|
52
|
-
/**
|
|
53
|
-
* Hydration work deferred until Context has been created.
|
|
54
|
-
*/
|
|
55
|
-
private pendingHydration?;
|
|
56
52
|
private readonly rootFieldSchema;
|
|
57
53
|
readonly breaker: Breakable;
|
|
58
54
|
constructor(checkout: TreeCheckout, config: TreeViewConfiguration<ReadSchema<TRootSchema>>, nodeKeyManager: NodeIdentifierManager, onDispose?: (() => void) | undefined);
|
|
@@ -107,7 +103,7 @@ export declare function getCheckout(context: TreeBranch): TreeCheckout;
|
|
|
107
103
|
* Adds constraints to a `checkout`'s pending transaction.
|
|
108
104
|
*
|
|
109
105
|
* @param checkout - The checkout's who's transaction will have the constraints added to it.
|
|
110
|
-
* @param constraintsOnRevert - If true, use {@link
|
|
106
|
+
* @param constraintsOnRevert - If true, use {@link IIdBasedSharedTreeEditor.addNodeExistsConstraintOnRevert}.
|
|
111
107
|
* @param constraints - The constraints to add to the transaction.
|
|
112
108
|
*
|
|
113
109
|
* @see {@link RunTransactionParams.preconditions}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematizingTreeView.d.ts","sourceRoot":"","sources":["../../src/shared-tree/schematizingTreeView.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACX,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,MAAM,0CAA0C,CAAC;AAKlD,OAAO,EACN,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"schematizingTreeView.d.ts","sourceRoot":"","sources":["../../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BAAoB,GAC3B,iBAAiB;IA4CpB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,YAAY;IAIpB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,MAAM;IAyEd,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,eAAe;IAgBvB,IAAW,aAAa,IAAI,yBAAyB,CAKpD;IAEM,OAAO,IAAI,IAAI;IAatB,OAAO,KAAK,QAAQ,GAenB;IAED,IAAW,IAAI,IAAI,aAAa,CAAC,WAAW,CAAC,CAE5C;IAED,IAAW,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,WAAW,CAAC,EAcpD;IAIM,IAAI,IAAI,UAAU,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,GACjD,0BAA0B,CAAC,WAAW,CAAC;IAIjC,KAAK,CAAC,OAAO,EAAE,eAAe,EAAE,aAAa,UAAO,GAAG,IAAI;IAI3D,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAKjD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,YAAY,CAK7D;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAC1C,QAAQ,EAAE,aAAa,EACvB,mBAAmB,EAAE,OAAO,EAC5B,WAAW,GAAE,SAAS,qBAAqB,EAAO,GAChD,IAAI,CAwBN"}
|
|
@@ -44,10 +44,10 @@ import { createEmitter } from "@fluid-internal/client-utils";
|
|
|
44
44
|
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
45
45
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
46
46
|
import { anchorSlot, rootFieldKey } from "../core/index.js";
|
|
47
|
-
import { defaultSchemaPolicy,
|
|
47
|
+
import { defaultSchemaPolicy, TreeStatus, Context, FieldKinds, } from "../feature-libraries/index.js";
|
|
48
48
|
import { tryGetTreeNodeForField, setField, normalizeFieldSchema, SchemaCompatibilityTester, getInnerNode, getKernel, HydratedContext, SimpleContextSlot, areImplicitFieldSchemaEqual, prepareForInsertionContextless, tryDisposeTreeNode, FieldSchemaAlpha, TreeViewConfigurationAlpha, toInitialSchema, toUpgradeSchema, } from "../simple-tree/index.js";
|
|
49
|
-
import { breakingClass, disposeSymbol, } from "../util/index.js";
|
|
50
|
-
import { canInitialize, initialize
|
|
49
|
+
import { breakingClass, disposeSymbol, hasSingle, } from "../util/index.js";
|
|
50
|
+
import { canInitialize, initialize } from "./schematizeTree.js";
|
|
51
51
|
/**
|
|
52
52
|
* Creating multiple tree views from the same checkout is not supported. This slot is used to detect if one already
|
|
53
53
|
* exists and error if creating a second.
|
|
@@ -119,34 +119,37 @@ let SchematizingSimpleTreeView = (() => {
|
|
|
119
119
|
}
|
|
120
120
|
this.runSchemaEdit(() => {
|
|
121
121
|
const schema = toInitialSchema(this.config.schema);
|
|
122
|
-
// This has to be the contextless version, since when "initialize" is called (right after this),
|
|
123
|
-
// it will do a schema change which would dispose of the current context (see inside `update`).
|
|
124
|
-
// Thus using the current context (if any) would hydrate nodes then
|
|
125
|
-
// immediately dispose them instead of having them actually be useable after initialize.
|
|
126
|
-
// For this to work,
|
|
127
|
-
// the hydration must be deferred until after the content is inserted into the tree and the final schema change is done (for required roots),
|
|
128
|
-
// but before any user event could could run.
|
|
129
|
-
const mapTree = prepareForInsertionContextless(content, this.rootFieldSchema, {
|
|
130
|
-
schema,
|
|
131
|
-
policy: defaultSchemaPolicy,
|
|
132
|
-
}, this, schema.rootFieldSchema, (batches, doHydration) => {
|
|
133
|
-
assert(this.pendingHydration === undefined, 0xc74 /* pendingHydration already set */);
|
|
134
|
-
this.pendingHydration = () => {
|
|
135
|
-
assert(batches.length <= 1, 0xc75 /* initialize should at most one hydration batch */);
|
|
136
|
-
for (const batch of batches) {
|
|
137
|
-
doHydration(batch, {
|
|
138
|
-
parent: undefined,
|
|
139
|
-
parentField: rootFieldKey,
|
|
140
|
-
parentIndex: 0,
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
});
|
|
145
122
|
this.checkout.transaction.start();
|
|
146
|
-
initialize(this.checkout, schema,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
123
|
+
initialize(this.checkout, schema, () => {
|
|
124
|
+
const preparedContent = prepareForInsertionContextless(content, this.rootFieldSchema, {
|
|
125
|
+
schema,
|
|
126
|
+
policy: defaultSchemaPolicy,
|
|
127
|
+
}, this, schema.rootFieldSchema);
|
|
128
|
+
if (preparedContent.rootsLocations.length === 0) {
|
|
129
|
+
// If there's no content to attach, no work is needed
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
const field = { field: rootFieldKey, parent: undefined };
|
|
133
|
+
assert(this.checkout.storedSchema.rootFieldSchema.kind === FieldKinds.optional.identifier, "initializerFromChunk only supports optional roots");
|
|
134
|
+
assert(hasSingle(preparedContent.rootsLocations) &&
|
|
135
|
+
preparedContent.rootsLocations[0].count === 1, "Expected one root");
|
|
136
|
+
const fieldEditor = this.checkout.editor.optionalField(field);
|
|
137
|
+
fieldEditor.attach(preparedContent.rootsLocations[0].field, true);
|
|
138
|
+
return preparedContent;
|
|
139
|
+
})?.finalize([...this.getFlexTreeContext().root]);
|
|
140
|
+
// TODO:CM
|
|
141
|
+
// initialize(
|
|
142
|
+
// this.checkout,
|
|
143
|
+
// schema,
|
|
144
|
+
// initializerFromChunk(this.checkout, () => {
|
|
145
|
+
// // This must be done after initial schema is set!
|
|
146
|
+
// return combineChunks(
|
|
147
|
+
// this.checkout.forest.chunkField(
|
|
148
|
+
// cursorForMapTreeField(mapTree === undefined ? [] : [mapTree]),
|
|
149
|
+
// ),
|
|
150
|
+
// );
|
|
151
|
+
// }),
|
|
152
|
+
// );
|
|
150
153
|
this.checkout.transaction.commit();
|
|
151
154
|
});
|
|
152
155
|
}
|
|
@@ -236,7 +239,7 @@ let SchematizingSimpleTreeView = (() => {
|
|
|
236
239
|
// TODO: provide a better event: this.view.flexTree.on(????) and/or integrate with with the normal event code paths.
|
|
237
240
|
// Track what the root was before to be able to detect changes.
|
|
238
241
|
// This uses the flex tree root to avoid demanding the simple-tree TreeNode when it might not be hydrated yet.
|
|
239
|
-
let lastRoot = this.
|
|
242
|
+
let lastRoot = this.flexRoot.content;
|
|
240
243
|
this.flexTreeViewUnregisterCallbacks.add(this.checkout.events.on("afterBatch", () => {
|
|
241
244
|
// In the initialization flow, this event is raised before the correct compatibility w.r.t the new schema is calculated.
|
|
242
245
|
// Accessing `this.root` in that case can throw. It's OK to ignore this because:
|
|
@@ -254,7 +257,6 @@ let SchematizingSimpleTreeView = (() => {
|
|
|
254
257
|
// Will dispose the old view (if there is one) when its no longer valid, and create a new one if appropriate.
|
|
255
258
|
this.checkout.storedSchema.events.on("afterSchemaChange", () => this.update()));
|
|
256
259
|
if (!this.midUpgrade) {
|
|
257
|
-
assert(this.pendingHydration === undefined, 0xc76 /* no nodes should be pending hydration when triggering events that could access nodes */);
|
|
258
260
|
this.events.emit("schemaChanged");
|
|
259
261
|
this.events.emit("rootChanged");
|
|
260
262
|
}
|
|
@@ -267,9 +269,6 @@ let SchematizingSimpleTreeView = (() => {
|
|
|
267
269
|
finally {
|
|
268
270
|
this.midUpgrade = false;
|
|
269
271
|
}
|
|
270
|
-
// Ensure hydration is flushed before events run which could access nodes.
|
|
271
|
-
this.pendingHydration?.();
|
|
272
|
-
this.pendingHydration = undefined;
|
|
273
272
|
this.events.emit("schemaChanged");
|
|
274
273
|
this.events.emit("rootChanged");
|
|
275
274
|
}
|
|
@@ -364,7 +363,7 @@ export function getCheckout(context) {
|
|
|
364
363
|
* Adds constraints to a `checkout`'s pending transaction.
|
|
365
364
|
*
|
|
366
365
|
* @param checkout - The checkout's who's transaction will have the constraints added to it.
|
|
367
|
-
* @param constraintsOnRevert - If true, use {@link
|
|
366
|
+
* @param constraintsOnRevert - If true, use {@link IIdBasedSharedTreeEditor.addNodeExistsConstraintOnRevert}.
|
|
368
367
|
* @param constraints - The constraints to add to the transaction.
|
|
369
368
|
*
|
|
370
369
|
* @see {@link RunTransactionParams.preconditions}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematizingTreeView.js","sourceRoot":"","sources":["../../src/shared-tree/schematizingTreeView.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAM7D,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAEN,mBAAmB,EACnB,qBAAqB,EACrB,UAAU,EACV,OAAO,EACP,aAAa,EAGb,UAAU,GAEV,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAKN,sBAAsB,EACtB,QAAQ,EACR,oBAAoB,EACpB,yBAAyB,EAUzB,YAAY,EACZ,SAAS,EAOT,eAAe,EACf,iBAAiB,EACjB,2BAA2B,EAC3B,8BAA8B,EAE9B,kBAAkB,EAClB,gBAAgB,EAChB,0BAA0B,EAC1B,eAAe,EACf,eAAe,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEN,aAAa,EACb,aAAa,GAEb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAItF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,EAAiC,CAAC;AAEpE;;GAEG;IAEU,0BAA0B;4BADtC,aAAa;;;;;QAiDb,YACiB,QAAsB,EACtB,MAAsD,EACtD,cAAqC,EACpC,SAAsB;YAHvB,aAAQ,GAAR,QAAQ,CAAc;YACtB,WAAM,GAAN,MAAM,CAAgD;YACtD,mBAAc,GAAd,cAAc,CAAuB;YACpC,cAAS,GAAT,SAAS,CAAa;Y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AAI,CAAC,CAAC,SAAS,EAAE,CAAC;gBAC1D,IAAI,UAAU,KAAK,UAAU,CAAC,UAAU,EAAE,CAAC;oBAC1C,MAAM,UAAU,GAAG,mBAAmB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC3D,MAAM,IAAI,UAAU,CACnB,iDAAiD,UAAU,iEAAiE,UAAU,EAAE,CACxI,CAAC;gBACH,CAAC;gBACD,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,CAAC,wCAAwC,CAAC,CAAC;gBAC1E,IAAI,mBAAmB,EAAE,CAAC;oBACzB,QAAQ,CAAC,MAAM,CAAC,+BAA+B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAClE,CAAC;qBAAM,CAAC;oBACP,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC1D,CAAC;gBACD,MAAM;YACP,CAAC;YACD;gBACC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;IACF,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type {\n\tHasListeners,\n\tIEmitter,\n\tListenable,\n} from \"@fluidframework/core-interfaces/internal\";\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { anchorSlot, rootFieldKey } from \"../core/index.js\";\nimport {\n\ttype NodeIdentifierManager,\n\tdefaultSchemaPolicy,\n\tcursorForMapTreeField,\n\tTreeStatus,\n\tContext,\n\tcombineChunks,\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeUnknownUnboxed,\n\tFieldKinds,\n\ttype FlexTreeRequiredField,\n} from \"../feature-libraries/index.js\";\nimport {\n\ttype ImplicitFieldSchema,\n\ttype SchemaCompatibilityStatus,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\ttryGetTreeNodeForField,\n\tsetField,\n\tnormalizeFieldSchema,\n\tSchemaCompatibilityTester,\n\ttype InsertableContent,\n\ttype TreeViewConfiguration,\n\ttype TreeViewAlpha,\n\ttype InsertableField,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeBranch,\n\ttype TreeBranchEvents,\n\tgetInnerNode,\n\tgetKernel,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype RunTransactionParams,\n\ttype TransactionConstraint,\n\tHydratedContext,\n\tSimpleContextSlot,\n\tareImplicitFieldSchemaEqual,\n\tprepareForInsertionContextless,\n\ttype FieldSchema,\n\ttryDisposeTreeNode,\n\tFieldSchemaAlpha,\n\tTreeViewConfigurationAlpha,\n\ttoInitialSchema,\n\ttoUpgradeSchema,\n} from \"../simple-tree/index.js\";\nimport {\n\ttype Breakable,\n\tbreakingClass,\n\tdisposeSymbol,\n\ttype WithBreakable,\n} from \"../util/index.js\";\n\nimport { canInitialize, initialize, initializerFromChunk } from \"./schematizeTree.js\";\nimport type { ITreeCheckout, TreeCheckout } from \"./treeCheckout.js\";\nimport type { TreeBranchAlpha } from \"../simple-tree/index.js\";\n\n/**\n * Creating multiple tree views from the same checkout is not supported. This slot is used to detect if one already\n * exists and error if creating a second.\n */\nexport const ViewSlot = anchorSlot<TreeView<ImplicitFieldSchema>>();\n\n/**\n * Implementation of TreeView wrapping a FlexTreeView.\n */\n@breakingClass\nexport class SchematizingSimpleTreeView<\n\tin out TRootSchema extends ImplicitFieldSchema | UnsafeUnknownSchema,\n> implements TreeViewAlpha<TRootSchema>, WithBreakable\n{\n\t/**\n\t * This is set to undefined when this object is disposed or the view schema does not support viewing the document's stored schema.\n\t *\n\t * The view schema may be incompatible with the stored schema. Use `compatibility` to check.\n\t */\n\tprivate flexTreeContext: Context | undefined;\n\n\t/**\n\t * Undefined iff uninitialized or disposed.\n\t */\n\tprivate currentCompatibility: SchemaCompatibilityStatus | undefined;\n\tpublic readonly events: Listenable<TreeViewEvents & TreeBranchEvents> &\n\t\tIEmitter<TreeViewEvents & TreeBranchEvents> &\n\t\tHasListeners<TreeViewEvents & TreeBranchEvents> = createEmitter();\n\n\tprivate readonly viewSchema: SchemaCompatibilityTester;\n\n\t/**\n\t * Events to unregister upon flex-tree view disposal.\n\t */\n\tprivate readonly flexTreeViewUnregisterCallbacks = new Set<() => void>();\n\n\t/**\n\t * Events to unregister upon disposal.\n\t */\n\tprivate readonly unregisterCallbacks = new Set<() => void>();\n\n\tpublic disposed = false;\n\t/**\n\t * This is set to true while an edit impacting the document schema is in progress.\n\t * This allows suppressing extra rootChanged / schemaChanged events until the edit concludes.\n\t * This is useful especially for some initialization edits, since document initialization can involve transient schemas\n\t * which are implementation details and should not be exposed to the user.\n\t */\n\tprivate midUpgrade = false;\n\n\t/**\n\t * Hydration work deferred until Context has been created.\n\t */\n\tprivate pendingHydration?: () => void;\n\n\tprivate readonly rootFieldSchema: FieldSchema;\n\tpublic readonly breaker: Breakable;\n\n\tpublic constructor(\n\t\tpublic readonly checkout: TreeCheckout,\n\t\tpublic readonly config: TreeViewConfiguration<ReadSchema<TRootSchema>>,\n\t\tpublic readonly nodeKeyManager: NodeIdentifierManager,\n\t\tprivate readonly onDispose?: () => void,\n\t) {\n\t\tthis.breaker = checkout.breaker;\n\t\tif (checkout.forest.anchors.slots.has(ViewSlot)) {\n\t\t\tthrow new UsageError(\"Cannot create a second tree view from the same checkout\");\n\t\t}\n\t\tcheckout.forest.anchors.slots.set(ViewSlot, this);\n\n\t\tthis.rootFieldSchema = normalizeFieldSchema(config.schema);\n\n\t\tconst configAlpha = new TreeViewConfigurationAlpha({ schema: config.schema });\n\n\t\tthis.viewSchema = new SchemaCompatibilityTester(configAlpha);\n\t\t// This must be initialized before `update` can be called.\n\t\tthis.currentCompatibility = {\n\t\t\tcanView: false,\n\t\t\tcanUpgrade: true,\n\t\t\tisEquivalent: false,\n\t\t\tcanInitialize: true,\n\t\t};\n\t\tthis.update();\n\n\t\tthis.unregisterCallbacks.add(\n\t\t\tthis.checkout.events.on(\"changed\", (data, getRevertible) => {\n\t\t\t\tthis.events.emit(\"changed\", data, getRevertible);\n\t\t\t\tthis.events.emit(\"commitApplied\", data, getRevertible);\n\t\t\t}),\n\t\t);\n\t}\n\n\tpublic hasRootSchema<TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t): this is TreeViewAlpha<TSchema> {\n\t\treturn areImplicitFieldSchemaEqual(this.rootFieldSchema, schema);\n\t}\n\n\tpublic get schema(): ReadSchema<TRootSchema> {\n\t\treturn this.config.schema;\n\t}\n\n\tpublic initialize(content: InsertableField<TRootSchema>): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (!compatibility.canInitialize) {\n\t\t\tthrow new UsageError(\"Tree cannot be initialized more than once.\");\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst schema = toInitialSchema(this.config.schema);\n\t\t\t// This has to be the contextless version, since when \"initialize\" is called (right after this),\n\t\t\t// it will do a schema change which would dispose of the current context (see inside `update`).\n\t\t\t// Thus using the current context (if any) would hydrate nodes then\n\t\t\t// immediately dispose them instead of having them actually be useable after initialize.\n\t\t\t// For this to work,\n\t\t\t// the hydration must be deferred until after the content is inserted into the tree and the final schema change is done (for required roots),\n\t\t\t// but before any user event could could run.\n\t\t\tconst mapTree = prepareForInsertionContextless(\n\t\t\t\tcontent as InsertableContent | undefined,\n\t\t\t\tthis.rootFieldSchema,\n\t\t\t\t{\n\t\t\t\t\tschema,\n\t\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t\t},\n\t\t\t\tthis,\n\t\t\t\tschema.rootFieldSchema,\n\t\t\t\t(batches, doHydration) => {\n\t\t\t\t\tassert(\n\t\t\t\t\t\tthis.pendingHydration === undefined,\n\t\t\t\t\t\t0xc74 /* pendingHydration already set */,\n\t\t\t\t\t);\n\t\t\t\t\tthis.pendingHydration = () => {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tbatches.length <= 1,\n\t\t\t\t\t\t\t0xc75 /* initialize should at most one hydration batch */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tfor (const batch of batches) {\n\t\t\t\t\t\t\tdoHydration(batch, {\n\t\t\t\t\t\t\t\tparent: undefined,\n\t\t\t\t\t\t\t\tparentField: rootFieldKey,\n\t\t\t\t\t\t\t\tparentIndex: 0,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tthis.checkout.transaction.start();\n\n\t\t\tinitialize(\n\t\t\t\tthis.checkout,\n\t\t\t\tschema,\n\t\t\t\tinitializerFromChunk(this.checkout, () => {\n\t\t\t\t\t// This must be done after initial schema is set!\n\t\t\t\t\treturn combineChunks(\n\t\t\t\t\t\tthis.checkout.forest.chunkField(\n\t\t\t\t\t\t\tcursorForMapTreeField(mapTree === undefined ? [] : [mapTree]),\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t}),\n\t\t\t);\n\t\t\tthis.checkout.transaction.commit();\n\t\t});\n\t}\n\n\tpublic upgradeSchema(): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (compatibility.isEquivalent) {\n\t\t\t// No-op\n\t\t\treturn;\n\t\t}\n\n\t\tif (!compatibility.canUpgrade) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Existing stored schema cannot be upgraded (see TreeView.compatibility.canUpgrade).\",\n\t\t\t);\n\t\t}\n\n\t\tconst newSchema = toUpgradeSchema(this.viewSchema.viewSchema.root);\n\t\tthis.runSchemaEdit(() => this.checkout.updateSchema(newSchema));\n\t}\n\n\t/**\n\t * Gets the flex-tree context. Throws when disposed or out of schema.\n\t */\n\tpublic getFlexTreeContext(): Context {\n\t\tthis.ensureUndisposed();\n\t\tassert(this.flexTreeContext !== undefined, 0x8c0 /* unexpected getViewOrError */);\n\t\treturn this.flexTreeContext;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-tree#TreeViewAlpha.runTransaction}\n\t */\n\tpublic runTransaction<TSuccessValue, TFailureValue>(\n\t\ttransaction: () => TransactionCallbackStatus<TSuccessValue, TFailureValue>,\n\t\tparams?: RunTransactionParams,\n\t): TransactionResultExt<TSuccessValue, TFailureValue>;\n\t/**\n\t * {@inheritDoc @fluidframework/shared-tree#TreeViewAlpha.runTransaction}\n\t */\n\tpublic runTransaction(\n\t\ttransaction: () => VoidTransactionCallbackStatus | void,\n\t\tparams?: RunTransactionParams,\n\t): TransactionResult;\n\tpublic runTransaction<TSuccessValue, TFailureValue>(\n\t\ttransaction: () =>\n\t\t\t| TransactionCallbackStatus<TSuccessValue, TFailureValue>\n\t\t\t| VoidTransactionCallbackStatus\n\t\t\t| void,\n\t\tparams?: RunTransactionParams,\n\t): TransactionResultExt<TSuccessValue, TFailureValue> | TransactionResult {\n\t\tconst addConstraints = (\n\t\t\tconstraintsOnRevert: boolean,\n\t\t\tconstraints: readonly TransactionConstraint[] = [],\n\t\t): void => {\n\t\t\taddConstraintsToTransaction(this.checkout, constraintsOnRevert, constraints);\n\t\t};\n\n\t\tthis.checkout.transaction.start();\n\n\t\t// Validate preconditions before running the transaction callback.\n\t\taddConstraints(false /* constraintsOnRevert */, params?.preconditions);\n\t\tconst transactionCallbackStatus = transaction();\n\t\tconst rollback = transactionCallbackStatus?.rollback;\n\t\tconst value = (\n\t\t\ttransactionCallbackStatus as TransactionCallbackStatus<TSuccessValue, TFailureValue>\n\t\t)?.value;\n\n\t\tif (rollback === true) {\n\t\t\tthis.checkout.transaction.abort();\n\t\t\treturn value !== undefined\n\t\t\t\t? { success: false, value: value as TFailureValue }\n\t\t\t\t: { success: false };\n\t\t}\n\n\t\t// Validate preconditions on revert after running the transaction callback and was successful.\n\t\taddConstraints(\n\t\t\ttrue /* constraintsOnRevert */,\n\t\t\ttransactionCallbackStatus?.preconditionsOnRevert,\n\t\t);\n\n\t\tthis.checkout.transaction.commit();\n\t\treturn value !== undefined\n\t\t\t? { success: true, value: value as TSuccessValue }\n\t\t\t: { success: true };\n\t}\n\n\tprivate ensureUndisposed(): void {\n\t\tif (this.disposed) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t}\n\n\tprivate failDisposed(): never {\n\t\tthrow new UsageError(\"Accessed a disposed TreeView.\");\n\t}\n\n\t/**\n\t * Updates `this.view` and the current compatibility status.\n\t * Invoked during initialization and when `this.view` needs to be replaced due to stored schema changes.\n\t * Handles re-registering for events to call update in the future.\n\t * @remarks\n\t * This does not check if the view needs to be replaced, it replaces it unconditionally:\n\t * callers should do any checking to detect if it's really needed before calling `update`.\n\t * @privateRemarks\n\t * This implementation avoids making any edits, which prevents it from being invoked reentrantly.\n\t * If implicit initialization (or some other edit) is desired, it should be done outside of this method.\n\t */\n\tprivate update(): void {\n\t\tthis.disposeFlexView();\n\n\t\tconst compatibility = this.viewSchema.checkCompatibility(this.checkout.storedSchema);\n\n\t\tthis.currentCompatibility = {\n\t\t\t...compatibility,\n\t\t\tcanInitialize: canInitialize(this.checkout),\n\t\t};\n\n\t\tconst anchors = this.checkout.forest.anchors;\n\t\tconst slots = anchors.slots;\n\n\t\tif (compatibility.canView) {\n\t\t\tthis.flexTreeContext = new Context(\n\t\t\t\tdefaultSchemaPolicy,\n\t\t\t\tthis.checkout,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t);\n\t\t\tassert(!slots.has(SimpleContextSlot), 0xa47 /* extra simple tree context */);\n\t\t\tassert(\n\t\t\t\tthis.rootFieldSchema instanceof FieldSchemaAlpha,\n\t\t\t\t0xbfa /* all field schema should be FieldSchemaAlpha */,\n\t\t\t);\n\t\t\tslots.set(\n\t\t\t\tSimpleContextSlot,\n\t\t\t\tnew HydratedContext(\n\t\t\t\t\tthis.flexTreeContext,\n\t\t\t\t\tHydratedContext.schemaMapFromRootSchema(\n\t\t\t\t\t\tthis.rootFieldSchema.allowedTypesFull.evaluate(),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t// Trigger \"rootChanged\" events if the root changes in the future.\n\t\t\t{\n\t\t\t\t// Currently there is no good way to do this as FlexTreeField has no events for changes.\n\t\t\t\t// this.root.on(????)\n\t\t\t\t// As a workaround for the above, trigger \"rootChanged\" in \"afterBatch\".\n\t\t\t\t// Ideally these events would be just events for changes within the root.\n\t\t\t\t// TODO: provide a better event: this.view.flexTree.on(????) and/or integrate with with the normal event code paths.\n\n\t\t\t\t// Track what the root was before to be able to detect changes.\n\t\t\t\t// This uses the flex tree root to avoid demanding the simple-tree TreeNode when it might not be hydrated yet.\n\t\t\t\tlet lastRoot: FlexTreeUnknownUnboxed | undefined = (\n\t\t\t\t\tthis.flexTreeContext.root as FlexTreeOptionalField\n\t\t\t\t).content;\n\n\t\t\t\tthis.flexTreeViewUnregisterCallbacks.add(\n\t\t\t\t\tthis.checkout.events.on(\"afterBatch\", () => {\n\t\t\t\t\t\t// In the initialization flow, this event is raised before the correct compatibility w.r.t the new schema is calculated.\n\t\t\t\t\t\t// Accessing `this.root` in that case can throw. It's OK to ignore this because:\n\t\t\t\t\t\t// - The rootChanged event will already be raised at the end of the current upgrade\n\t\t\t\t\t\t// - It doesn't matter that `lastRoot` isn't updated in this case, because `update` will be called again before the upgrade\n\t\t\t\t\t\t// completes (at which point this callback and the `lastRoot` captured here will be out of scope anyway)\n\t\t\t\t\t\tif (!this.midUpgrade && lastRoot !== this.flexRoot.content) {\n\t\t\t\t\t\t\tlastRoot = this.flexRoot.content;\n\t\t\t\t\t\t\tthis.events.emit(\"rootChanged\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.flexTreeViewUnregisterCallbacks.add(\n\t\t\t// Will dispose the old view (if there is one) when its no longer valid, and create a new one if appropriate.\n\t\t\tthis.checkout.storedSchema.events.on(\"afterSchemaChange\", () => this.update()),\n\t\t);\n\n\t\tif (!this.midUpgrade) {\n\t\t\tassert(\n\t\t\t\tthis.pendingHydration === undefined,\n\t\t\t\t0xc76 /* no nodes should be pending hydration when triggering events that could access nodes */,\n\t\t\t);\n\t\t\tthis.events.emit(\"schemaChanged\");\n\t\t\tthis.events.emit(\"rootChanged\");\n\t\t}\n\t}\n\n\tprivate runSchemaEdit(edit: () => void): void {\n\t\tthis.midUpgrade = true;\n\t\ttry {\n\t\t\tedit();\n\t\t} finally {\n\t\t\tthis.midUpgrade = false;\n\t\t}\n\t\t// Ensure hydration is flushed before events run which could access nodes.\n\t\tthis.pendingHydration?.();\n\t\tthis.pendingHydration = undefined;\n\t\tthis.events.emit(\"schemaChanged\");\n\t\tthis.events.emit(\"rootChanged\");\n\t}\n\n\tprivate disposeFlexView(): void {\n\t\tconst anchors = this.checkout.forest.anchors;\n\t\tif (this.flexTreeContext !== undefined) {\n\t\t\t// Cleanup any TreeNodes cached in the AnchorSet when disposing the flex-tree which they wrap.\n\t\t\tfor (const anchorNode of anchors) {\n\t\t\t\ttryDisposeTreeNode(anchorNode);\n\t\t\t}\n\n\t\t\tthis.flexTreeContext[disposeSymbol]();\n\t\t\tthis.flexTreeContext = undefined;\n\t\t}\n\t\tthis.flexTreeViewUnregisterCallbacks.forEach((unregister) => unregister());\n\t\tthis.flexTreeViewUnregisterCallbacks.clear();\n\t\tanchors.slots.delete(SimpleContextSlot);\n\t}\n\n\tpublic get compatibility(): SchemaCompatibilityStatus {\n\t\tif (!this.currentCompatibility) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t\treturn this.currentCompatibility;\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.disposed = true;\n\t\tthis.disposeFlexView();\n\t\tthis.unregisterCallbacks.forEach((unregister) => unregister());\n\t\tthis.checkout.forest.anchors.slots.delete(ViewSlot);\n\t\tthis.currentCompatibility = undefined;\n\t\tthis.onDispose?.();\n\t\tif (!this.checkout.isSharedBranch && !this.checkout.disposed) {\n\t\t\t// All non-shared branches are 1:1 with views, so if a user manually disposes a view, we should also dispose the checkout/branch.\n\t\t\tthis.checkout.dispose();\n\t\t}\n\t}\n\n\tprivate get flexRoot(): FlexTreeOptionalField | FlexTreeRequiredField {\n\t\tthis.breaker.use();\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getFlexTreeContext();\n\t\tassert(\n\t\t\tview.root.is(FieldKinds.optional) ||\n\t\t\t\tview.root.is(FieldKinds.required) ||\n\t\t\t\tview.root.is(FieldKinds.identifier),\n\t\t\t0xc77 /* unexpected root field kind */,\n\t\t);\n\t\treturn view.root;\n\t}\n\n\tpublic get root(): ReadableField<TRootSchema> {\n\t\treturn tryGetTreeNodeForField(this.flexRoot) as ReadableField<TRootSchema>;\n\t}\n\n\tpublic set root(newRoot: InsertableField<TRootSchema>) {\n\t\tthis.breaker.use();\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getFlexTreeContext();\n\t\tsetField(\n\t\t\tview.root,\n\t\t\tthis.rootFieldSchema,\n\t\t\tnewRoot as InsertableContent | undefined,\n\t\t\tthis.checkout.storedSchema.rootFieldSchema,\n\t\t);\n\t}\n\n\t// #region Branching\n\n\tpublic fork(): ReturnType<TreeBranchAlpha[\"fork\"]> &\n\t\tSchematizingSimpleTreeView<TRootSchema> {\n\t\treturn this.checkout.branch().viewWith(this.config);\n\t}\n\n\tpublic merge(context: TreeBranchAlpha, disposeMerged = true): void {\n\t\tthis.checkout.merge(getCheckout(context), disposeMerged);\n\t}\n\n\tpublic rebaseOnto(context: TreeBranchAlpha): void {\n\t\tgetCheckout(context).rebase(this.checkout);\n\t}\n\n\t// #endregion Branching\n}\n\n/**\n * Get the {@link TreeCheckout} associated with a given {@link TreeBranch}.\n * @remarks Currently, all contexts are also {@link SchematizingSimpleTreeView}s.\n * Other checkout implementations (e.g. not associated with a view) may be supported in the future.\n */\nexport function getCheckout(context: TreeBranch): TreeCheckout {\n\tif (context instanceof SchematizingSimpleTreeView) {\n\t\treturn context.checkout;\n\t}\n\tthrow new UsageError(\"Unsupported context implementation\");\n}\n\n/**\n * Adds constraints to a `checkout`'s pending transaction.\n *\n * @param checkout - The checkout's who's transaction will have the constraints added to it.\n * @param constraintsOnRevert - If true, use {@link ISharedTreeEditor.addNodeExistsConstraintOnRevert}.\n * @param constraints - The constraints to add to the transaction.\n *\n * @see {@link RunTransactionParams.preconditions}.\n */\nexport function addConstraintsToTransaction(\n\tcheckout: ITreeCheckout,\n\tconstraintsOnRevert: boolean,\n\tconstraints: readonly TransactionConstraint[] = [],\n): void {\n\tfor (const constraint of constraints) {\n\t\tswitch (constraint.type) {\n\t\t\tcase \"nodeInDocument\": {\n\t\t\t\tconst node = getInnerNode(constraint.node);\n\t\t\t\tconst nodeStatus = getKernel(constraint.node).getStatus();\n\t\t\t\tif (nodeStatus !== TreeStatus.InDocument) {\n\t\t\t\t\tconst revertText = constraintsOnRevert ? \" on revert\" : \"\";\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Attempted to add a \"nodeInDocument\" constraint${revertText}, but the node is not currently in the document. Node status: ${nodeStatus}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tassert(node.isHydrated(), 0xbc2 /* In document node must be hydrated. */);\n\t\t\t\tif (constraintsOnRevert) {\n\t\t\t\t\tcheckout.editor.addNodeExistsConstraintOnRevert(node.anchorNode);\n\t\t\t\t} else {\n\t\t\t\t\tcheckout.editor.addNodeExistsConstraint(node.anchorNode);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tunreachableCase(constraint.type);\n\t\t}\n\t}\n}\n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,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC3D,MAAM,IAAI,UAAU,CACnB,iDAAiD,UAAU,iEAAiE,UAAU,EAAE,CACxI,CAAC;gBACH,CAAC;gBACD,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,CAAC,wCAAwC,CAAC,CAAC;gBAC1E,IAAI,mBAAmB,EAAE,CAAC;oBACzB,QAAQ,CAAC,MAAM,CAAC,+BAA+B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAClE,CAAC;qBAAM,CAAC;oBACP,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC1D,CAAC;gBACD,MAAM;YACP,CAAC;YACD;gBACC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;IACF,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type {\n\tHasListeners,\n\tIEmitter,\n\tListenable,\n} from \"@fluidframework/core-interfaces/internal\";\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { anchorSlot, rootFieldKey } from \"../core/index.js\";\nimport {\n\ttype NodeIdentifierManager,\n\tdefaultSchemaPolicy,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeUnknownUnboxed,\n\tFieldKinds,\n\ttype FlexTreeRequiredField,\n} from \"../feature-libraries/index.js\";\nimport {\n\ttype ImplicitFieldSchema,\n\ttype SchemaCompatibilityStatus,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\ttryGetTreeNodeForField,\n\tsetField,\n\tnormalizeFieldSchema,\n\tSchemaCompatibilityTester,\n\ttype InsertableContent,\n\ttype TreeViewConfiguration,\n\ttype TreeViewAlpha,\n\ttype InsertableField,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeBranch,\n\ttype TreeBranchEvents,\n\tgetInnerNode,\n\tgetKernel,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype RunTransactionParams,\n\ttype TransactionConstraint,\n\tHydratedContext,\n\tSimpleContextSlot,\n\tareImplicitFieldSchemaEqual,\n\tprepareForInsertionContextless,\n\ttype FieldSchema,\n\ttryDisposeTreeNode,\n\tFieldSchemaAlpha,\n\tTreeViewConfigurationAlpha,\n\ttoInitialSchema,\n\ttoUpgradeSchema,\n} from \"../simple-tree/index.js\";\nimport {\n\ttype Breakable,\n\tbreakingClass,\n\tdisposeSymbol,\n\thasSingle,\n\ttype WithBreakable,\n} from \"../util/index.js\";\n\nimport { canInitialize, initialize } from \"./schematizeTree.js\";\nimport type { ITreeCheckout, TreeCheckout } from \"./treeCheckout.js\";\nimport type { TreeBranchAlpha } from \"../simple-tree/index.js\";\n\n/**\n * Creating multiple tree views from the same checkout is not supported. This slot is used to detect if one already\n * exists and error if creating a second.\n */\nexport const ViewSlot = anchorSlot<TreeView<ImplicitFieldSchema>>();\n\n/**\n * Implementation of TreeView wrapping a FlexTreeView.\n */\n@breakingClass\nexport class SchematizingSimpleTreeView<\n\tin out TRootSchema extends ImplicitFieldSchema | UnsafeUnknownSchema,\n> implements TreeViewAlpha<TRootSchema>, WithBreakable\n{\n\t/**\n\t * This is set to undefined when this object is disposed or the view schema does not support viewing the document's stored schema.\n\t *\n\t * The view schema may be incompatible with the stored schema. Use `compatibility` to check.\n\t */\n\tprivate flexTreeContext: Context | undefined;\n\n\t/**\n\t * Undefined iff uninitialized or disposed.\n\t */\n\tprivate currentCompatibility: SchemaCompatibilityStatus | undefined;\n\tpublic readonly events: Listenable<TreeViewEvents & TreeBranchEvents> &\n\t\tIEmitter<TreeViewEvents & TreeBranchEvents> &\n\t\tHasListeners<TreeViewEvents & TreeBranchEvents> = createEmitter();\n\n\tprivate readonly viewSchema: SchemaCompatibilityTester;\n\n\t/**\n\t * Events to unregister upon flex-tree view disposal.\n\t */\n\tprivate readonly flexTreeViewUnregisterCallbacks = new Set<() => void>();\n\n\t/**\n\t * Events to unregister upon disposal.\n\t */\n\tprivate readonly unregisterCallbacks = new Set<() => void>();\n\n\tpublic disposed = false;\n\t/**\n\t * This is set to true while an edit impacting the document schema is in progress.\n\t * This allows suppressing extra rootChanged / schemaChanged events until the edit concludes.\n\t * This is useful especially for some initialization edits, since document initialization can involve transient schemas\n\t * which are implementation details and should not be exposed to the user.\n\t */\n\tprivate midUpgrade = false;\n\n\tprivate readonly rootFieldSchema: FieldSchema;\n\tpublic readonly breaker: Breakable;\n\n\tpublic constructor(\n\t\tpublic readonly checkout: TreeCheckout,\n\t\tpublic readonly config: TreeViewConfiguration<ReadSchema<TRootSchema>>,\n\t\tpublic readonly nodeKeyManager: NodeIdentifierManager,\n\t\tprivate readonly onDispose?: () => void,\n\t) {\n\t\tthis.breaker = checkout.breaker;\n\t\tif (checkout.forest.anchors.slots.has(ViewSlot)) {\n\t\t\tthrow new UsageError(\"Cannot create a second tree view from the same checkout\");\n\t\t}\n\t\tcheckout.forest.anchors.slots.set(ViewSlot, this);\n\n\t\tthis.rootFieldSchema = normalizeFieldSchema(config.schema);\n\n\t\tconst configAlpha = new TreeViewConfigurationAlpha({ schema: config.schema });\n\n\t\tthis.viewSchema = new SchemaCompatibilityTester(configAlpha);\n\t\t// This must be initialized before `update` can be called.\n\t\tthis.currentCompatibility = {\n\t\t\tcanView: false,\n\t\t\tcanUpgrade: true,\n\t\t\tisEquivalent: false,\n\t\t\tcanInitialize: true,\n\t\t};\n\t\tthis.update();\n\n\t\tthis.unregisterCallbacks.add(\n\t\t\tthis.checkout.events.on(\"changed\", (data, getRevertible) => {\n\t\t\t\tthis.events.emit(\"changed\", data, getRevertible);\n\t\t\t\tthis.events.emit(\"commitApplied\", data, getRevertible);\n\t\t\t}),\n\t\t);\n\t}\n\n\tpublic hasRootSchema<TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t): this is TreeViewAlpha<TSchema> {\n\t\treturn areImplicitFieldSchemaEqual(this.rootFieldSchema, schema);\n\t}\n\n\tpublic get schema(): ReadSchema<TRootSchema> {\n\t\treturn this.config.schema;\n\t}\n\n\tpublic initialize(content: InsertableField<TRootSchema>): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (!compatibility.canInitialize) {\n\t\t\tthrow new UsageError(\"Tree cannot be initialized more than once.\");\n\t\t}\n\n\t\tthis.runSchemaEdit(() => {\n\t\t\tconst schema = toInitialSchema(this.config.schema);\n\t\t\tthis.checkout.transaction.start();\n\t\t\tinitialize(this.checkout, schema, () => {\n\t\t\t\tconst preparedContent = prepareForInsertionContextless(\n\t\t\t\t\tcontent as InsertableContent | undefined,\n\t\t\t\t\tthis.rootFieldSchema,\n\t\t\t\t\t{\n\t\t\t\t\t\tschema,\n\t\t\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t\t\t},\n\t\t\t\t\tthis,\n\t\t\t\t\tschema.rootFieldSchema,\n\t\t\t\t);\n\n\t\t\t\tif (preparedContent.rootsLocations.length === 0) {\n\t\t\t\t\t// If there's no content to attach, no work is needed\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst field = { field: rootFieldKey, parent: undefined };\n\t\t\t\tassert(\n\t\t\t\t\tthis.checkout.storedSchema.rootFieldSchema.kind === FieldKinds.optional.identifier,\n\t\t\t\t\t\"initializerFromChunk only supports optional roots\",\n\t\t\t\t);\n\n\t\t\t\tassert(\n\t\t\t\t\thasSingle(preparedContent.rootsLocations) &&\n\t\t\t\t\t\tpreparedContent.rootsLocations[0].count === 1,\n\t\t\t\t\t\"Expected one root\",\n\t\t\t\t);\n\t\t\t\tconst fieldEditor = this.checkout.editor.optionalField(field);\n\t\t\t\tfieldEditor.attach(preparedContent.rootsLocations[0].field, true);\n\n\t\t\t\treturn preparedContent;\n\t\t\t})?.finalize([...this.getFlexTreeContext().root]);\n\n\t\t\t// TODO:CM\n\t\t\t// initialize(\n\t\t\t// \tthis.checkout,\n\t\t\t// \tschema,\n\t\t\t// \tinitializerFromChunk(this.checkout, () => {\n\t\t\t// \t\t// This must be done after initial schema is set!\n\t\t\t// \t\treturn combineChunks(\n\t\t\t// \t\t\tthis.checkout.forest.chunkField(\n\t\t\t// \t\t\t\tcursorForMapTreeField(mapTree === undefined ? [] : [mapTree]),\n\t\t\t// \t\t\t),\n\t\t\t// \t\t);\n\t\t\t// \t}),\n\t\t\t// );\n\t\t\tthis.checkout.transaction.commit();\n\t\t});\n\t}\n\n\tpublic upgradeSchema(): void {\n\t\tthis.ensureUndisposed();\n\n\t\tconst compatibility = this.compatibility;\n\t\tif (compatibility.isEquivalent) {\n\t\t\t// No-op\n\t\t\treturn;\n\t\t}\n\n\t\tif (!compatibility.canUpgrade) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Existing stored schema cannot be upgraded (see TreeView.compatibility.canUpgrade).\",\n\t\t\t);\n\t\t}\n\n\t\tconst newSchema = toUpgradeSchema(this.viewSchema.viewSchema.root);\n\t\tthis.runSchemaEdit(() => this.checkout.updateSchema(newSchema));\n\t}\n\n\t/**\n\t * Gets the flex-tree context. Throws when disposed or out of schema.\n\t */\n\tpublic getFlexTreeContext(): Context {\n\t\tthis.ensureUndisposed();\n\t\tassert(this.flexTreeContext !== undefined, 0x8c0 /* unexpected getViewOrError */);\n\t\treturn this.flexTreeContext;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-tree#TreeViewAlpha.runTransaction}\n\t */\n\tpublic runTransaction<TSuccessValue, TFailureValue>(\n\t\ttransaction: () => TransactionCallbackStatus<TSuccessValue, TFailureValue>,\n\t\tparams?: RunTransactionParams,\n\t): TransactionResultExt<TSuccessValue, TFailureValue>;\n\t/**\n\t * {@inheritDoc @fluidframework/shared-tree#TreeViewAlpha.runTransaction}\n\t */\n\tpublic runTransaction(\n\t\ttransaction: () => VoidTransactionCallbackStatus | void,\n\t\tparams?: RunTransactionParams,\n\t): TransactionResult;\n\tpublic runTransaction<TSuccessValue, TFailureValue>(\n\t\ttransaction: () =>\n\t\t\t| TransactionCallbackStatus<TSuccessValue, TFailureValue>\n\t\t\t| VoidTransactionCallbackStatus\n\t\t\t| void,\n\t\tparams?: RunTransactionParams,\n\t): TransactionResultExt<TSuccessValue, TFailureValue> | TransactionResult {\n\t\tconst addConstraints = (\n\t\t\tconstraintsOnRevert: boolean,\n\t\t\tconstraints: readonly TransactionConstraint[] = [],\n\t\t): void => {\n\t\t\taddConstraintsToTransaction(this.checkout, constraintsOnRevert, constraints);\n\t\t};\n\n\t\tthis.checkout.transaction.start();\n\n\t\t// Validate preconditions before running the transaction callback.\n\t\taddConstraints(false /* constraintsOnRevert */, params?.preconditions);\n\t\tconst transactionCallbackStatus = transaction();\n\t\tconst rollback = transactionCallbackStatus?.rollback;\n\t\tconst value = (\n\t\t\ttransactionCallbackStatus as TransactionCallbackStatus<TSuccessValue, TFailureValue>\n\t\t)?.value;\n\n\t\tif (rollback === true) {\n\t\t\tthis.checkout.transaction.abort();\n\t\t\treturn value !== undefined\n\t\t\t\t? { success: false, value: value as TFailureValue }\n\t\t\t\t: { success: false };\n\t\t}\n\n\t\t// Validate preconditions on revert after running the transaction callback and was successful.\n\t\taddConstraints(\n\t\t\ttrue /* constraintsOnRevert */,\n\t\t\ttransactionCallbackStatus?.preconditionsOnRevert,\n\t\t);\n\n\t\tthis.checkout.transaction.commit();\n\t\treturn value !== undefined\n\t\t\t? { success: true, value: value as TSuccessValue }\n\t\t\t: { success: true };\n\t}\n\n\tprivate ensureUndisposed(): void {\n\t\tif (this.disposed) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t}\n\n\tprivate failDisposed(): never {\n\t\tthrow new UsageError(\"Accessed a disposed TreeView.\");\n\t}\n\n\t/**\n\t * Updates `this.view` and the current compatibility status.\n\t * Invoked during initialization and when `this.view` needs to be replaced due to stored schema changes.\n\t * Handles re-registering for events to call update in the future.\n\t * @remarks\n\t * This does not check if the view needs to be replaced, it replaces it unconditionally:\n\t * callers should do any checking to detect if it's really needed before calling `update`.\n\t * @privateRemarks\n\t * This implementation avoids making any edits, which prevents it from being invoked reentrantly.\n\t * If implicit initialization (or some other edit) is desired, it should be done outside of this method.\n\t */\n\tprivate update(): void {\n\t\tthis.disposeFlexView();\n\n\t\tconst compatibility = this.viewSchema.checkCompatibility(this.checkout.storedSchema);\n\n\t\tthis.currentCompatibility = {\n\t\t\t...compatibility,\n\t\t\tcanInitialize: canInitialize(this.checkout),\n\t\t};\n\n\t\tconst anchors = this.checkout.forest.anchors;\n\t\tconst slots = anchors.slots;\n\n\t\tif (compatibility.canView) {\n\t\t\tthis.flexTreeContext = new Context(\n\t\t\t\tdefaultSchemaPolicy,\n\t\t\t\tthis.checkout,\n\t\t\t\tthis.nodeKeyManager,\n\t\t\t);\n\t\t\tassert(!slots.has(SimpleContextSlot), 0xa47 /* extra simple tree context */);\n\t\t\tassert(\n\t\t\t\tthis.rootFieldSchema instanceof FieldSchemaAlpha,\n\t\t\t\t0xbfa /* all field schema should be FieldSchemaAlpha */,\n\t\t\t);\n\t\t\tslots.set(\n\t\t\t\tSimpleContextSlot,\n\t\t\t\tnew HydratedContext(\n\t\t\t\t\tthis.flexTreeContext,\n\t\t\t\t\tHydratedContext.schemaMapFromRootSchema(\n\t\t\t\t\t\tthis.rootFieldSchema.allowedTypesFull.evaluate(),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t// Trigger \"rootChanged\" events if the root changes in the future.\n\t\t\t{\n\t\t\t\t// Currently there is no good way to do this as FlexTreeField has no events for changes.\n\t\t\t\t// this.root.on(????)\n\t\t\t\t// As a workaround for the above, trigger \"rootChanged\" in \"afterBatch\".\n\t\t\t\t// Ideally these events would be just events for changes within the root.\n\t\t\t\t// TODO: provide a better event: this.view.flexTree.on(????) and/or integrate with with the normal event code paths.\n\n\t\t\t\t// Track what the root was before to be able to detect changes.\n\t\t\t\t// This uses the flex tree root to avoid demanding the simple-tree TreeNode when it might not be hydrated yet.\n\t\t\t\tlet lastRoot: FlexTreeUnknownUnboxed | undefined = this.flexRoot.content;\n\n\t\t\t\tthis.flexTreeViewUnregisterCallbacks.add(\n\t\t\t\t\tthis.checkout.events.on(\"afterBatch\", () => {\n\t\t\t\t\t\t// In the initialization flow, this event is raised before the correct compatibility w.r.t the new schema is calculated.\n\t\t\t\t\t\t// Accessing `this.root` in that case can throw. It's OK to ignore this because:\n\t\t\t\t\t\t// - The rootChanged event will already be raised at the end of the current upgrade\n\t\t\t\t\t\t// - It doesn't matter that `lastRoot` isn't updated in this case, because `update` will be called again before the upgrade\n\t\t\t\t\t\t// completes (at which point this callback and the `lastRoot` captured here will be out of scope anyway)\n\t\t\t\t\t\tif (!this.midUpgrade && lastRoot !== this.flexRoot.content) {\n\t\t\t\t\t\t\tlastRoot = this.flexRoot.content;\n\t\t\t\t\t\t\tthis.events.emit(\"rootChanged\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.flexTreeViewUnregisterCallbacks.add(\n\t\t\t// Will dispose the old view (if there is one) when its no longer valid, and create a new one if appropriate.\n\t\t\tthis.checkout.storedSchema.events.on(\"afterSchemaChange\", () => this.update()),\n\t\t);\n\n\t\tif (!this.midUpgrade) {\n\t\t\tthis.events.emit(\"schemaChanged\");\n\t\t\tthis.events.emit(\"rootChanged\");\n\t\t}\n\t}\n\n\tprivate runSchemaEdit(edit: () => void): void {\n\t\tthis.midUpgrade = true;\n\t\ttry {\n\t\t\tedit();\n\t\t} finally {\n\t\t\tthis.midUpgrade = false;\n\t\t}\n\t\tthis.events.emit(\"schemaChanged\");\n\t\tthis.events.emit(\"rootChanged\");\n\t}\n\n\tprivate disposeFlexView(): void {\n\t\tconst anchors = this.checkout.forest.anchors;\n\t\tif (this.flexTreeContext !== undefined) {\n\t\t\t// Cleanup any TreeNodes cached in the AnchorSet when disposing the flex-tree which they wrap.\n\t\t\tfor (const anchorNode of anchors) {\n\t\t\t\ttryDisposeTreeNode(anchorNode);\n\t\t\t}\n\n\t\t\tthis.flexTreeContext[disposeSymbol]();\n\t\t\tthis.flexTreeContext = undefined;\n\t\t}\n\t\tthis.flexTreeViewUnregisterCallbacks.forEach((unregister) => unregister());\n\t\tthis.flexTreeViewUnregisterCallbacks.clear();\n\t\tanchors.slots.delete(SimpleContextSlot);\n\t}\n\n\tpublic get compatibility(): SchemaCompatibilityStatus {\n\t\tif (!this.currentCompatibility) {\n\t\t\tthis.failDisposed();\n\t\t}\n\t\treturn this.currentCompatibility;\n\t}\n\n\tpublic dispose(): void {\n\t\tthis.disposed = true;\n\t\tthis.disposeFlexView();\n\t\tthis.unregisterCallbacks.forEach((unregister) => unregister());\n\t\tthis.checkout.forest.anchors.slots.delete(ViewSlot);\n\t\tthis.currentCompatibility = undefined;\n\t\tthis.onDispose?.();\n\t\tif (!this.checkout.isSharedBranch && !this.checkout.disposed) {\n\t\t\t// All non-shared branches are 1:1 with views, so if a user manually disposes a view, we should also dispose the checkout/branch.\n\t\t\tthis.checkout.dispose();\n\t\t}\n\t}\n\n\tprivate get flexRoot(): FlexTreeOptionalField | FlexTreeRequiredField {\n\t\tthis.breaker.use();\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getFlexTreeContext();\n\t\tassert(\n\t\t\tview.root.is(FieldKinds.optional) ||\n\t\t\t\tview.root.is(FieldKinds.required) ||\n\t\t\t\tview.root.is(FieldKinds.identifier),\n\t\t\t0xc77 /* unexpected root field kind */,\n\t\t);\n\t\treturn view.root;\n\t}\n\n\tpublic get root(): ReadableField<TRootSchema> {\n\t\treturn tryGetTreeNodeForField(this.flexRoot) as ReadableField<TRootSchema>;\n\t}\n\n\tpublic set root(newRoot: InsertableField<TRootSchema>) {\n\t\tthis.breaker.use();\n\t\tif (!this.compatibility.canView) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Document is out of schema. Check TreeView.compatibility before accessing TreeView.root.\",\n\t\t\t);\n\t\t}\n\t\tconst view = this.getFlexTreeContext();\n\t\tsetField(\n\t\t\tview.root,\n\t\t\tthis.rootFieldSchema,\n\t\t\tnewRoot as InsertableContent | undefined,\n\t\t\tthis.checkout.storedSchema.rootFieldSchema,\n\t\t);\n\t}\n\n\t// #region Branching\n\n\tpublic fork(): ReturnType<TreeBranchAlpha[\"fork\"]> &\n\t\tSchematizingSimpleTreeView<TRootSchema> {\n\t\treturn this.checkout.branch().viewWith(this.config);\n\t}\n\n\tpublic merge(context: TreeBranchAlpha, disposeMerged = true): void {\n\t\tthis.checkout.merge(getCheckout(context), disposeMerged);\n\t}\n\n\tpublic rebaseOnto(context: TreeBranchAlpha): void {\n\t\tgetCheckout(context).rebase(this.checkout);\n\t}\n\n\t// #endregion Branching\n}\n\n/**\n * Get the {@link TreeCheckout} associated with a given {@link TreeBranch}.\n * @remarks Currently, all contexts are also {@link SchematizingSimpleTreeView}s.\n * Other checkout implementations (e.g. not associated with a view) may be supported in the future.\n */\nexport function getCheckout(context: TreeBranch): TreeCheckout {\n\tif (context instanceof SchematizingSimpleTreeView) {\n\t\treturn context.checkout;\n\t}\n\tthrow new UsageError(\"Unsupported context implementation\");\n}\n\n/**\n * Adds constraints to a `checkout`'s pending transaction.\n *\n * @param checkout - The checkout's who's transaction will have the constraints added to it.\n * @param constraintsOnRevert - If true, use {@link IIdBasedSharedTreeEditor.addNodeExistsConstraintOnRevert}.\n * @param constraints - The constraints to add to the transaction.\n *\n * @see {@link RunTransactionParams.preconditions}.\n */\nexport function addConstraintsToTransaction(\n\tcheckout: ITreeCheckout,\n\tconstraintsOnRevert: boolean,\n\tconstraints: readonly TransactionConstraint[] = [],\n): void {\n\tfor (const constraint of constraints) {\n\t\tswitch (constraint.type) {\n\t\t\tcase \"nodeInDocument\": {\n\t\t\t\tconst node = getInnerNode(constraint.node);\n\t\t\t\tconst nodeStatus = getKernel(constraint.node).getStatus();\n\t\t\t\tif (nodeStatus !== TreeStatus.InDocument) {\n\t\t\t\t\tconst revertText = constraintsOnRevert ? \" on revert\" : \"\";\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Attempted to add a \"nodeInDocument\" constraint${revertText}, but the node is not currently in the document. Node status: ${nodeStatus}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tassert(node.isHydrated(), 0xbc2 /* In document node must be hydrated. */);\n\t\t\t\tif (constraintsOnRevert) {\n\t\t\t\t\tcheckout.editor.addNodeExistsConstraintOnRevert(node.anchorNode);\n\t\t\t\t} else {\n\t\t\t\t\tcheckout.editor.addNodeExistsConstraint(node.anchorNode);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tunreachableCase(constraint.type);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -10,12 +10,12 @@ import type { IChannelView, IFluidSerializer, SharedKernel } from "@fluidframewo
|
|
|
10
10
|
import { type ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
11
11
|
import { type CodecTree, type CodecWriteOptions, type ICodecOptions } from "../codec/index.js";
|
|
12
12
|
import { type GraphCommit, type IEditableForest, type JsonableTree, type TreeStoredSchema, TreeStoredSchemaRepository, type TreeStoredSchemaSubscription } from "../core/index.js";
|
|
13
|
-
import { TreeCompressionStrategy, type IncrementalEncodingPolicy
|
|
14
|
-
import { type BranchId, type ClonableSchemaAndPolicy, type
|
|
15
|
-
import { type ITree, type ImplicitFieldSchema, type ReadSchema, type SimpleTreeSchema, type TreeView, type TreeViewAlpha, type TreeViewConfiguration, type UnsafeUnknownSchema, type VerboseTree, type ITreeAlpha } from "../simple-tree/index.js";
|
|
13
|
+
import { TreeCompressionStrategy, type IncrementalEncodingPolicy } from "../feature-libraries/index.js";
|
|
14
|
+
import { type BranchId, type ClonableSchemaAndPolicy, type SharedTreeCoreOptionsInternal, MessageFormatVersion, SharedTreeCore, EditManagerFormatVersion } from "../shared-tree-core/index.js";
|
|
15
|
+
import { type ITree, type ImplicitFieldSchema, type ReadSchema, type SimpleTreeSchema, type TreeView, type TreeViewAlpha, type TreeViewConfiguration, type UnsafeUnknownSchema, type VerboseTree, type ITreeAlpha, type SchemaType } from "../simple-tree/index.js";
|
|
16
16
|
import { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
|
|
17
17
|
import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
18
|
-
import type {
|
|
18
|
+
import type { IdBasedSharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
|
|
19
19
|
import { type TreeCheckout, type BranchableTree } from "./treeCheckout.js";
|
|
20
20
|
import { type Breakable, type JsonCompatible } from "../util/index.js";
|
|
21
21
|
import { type SharedTreeChangeFormatVersion } from "./sharedTreeChangeCodecs.js";
|
|
@@ -77,7 +77,7 @@ export type SharedTreeKernelView = Omit<ITreePrivate, keyof (IChannelView & IFlu
|
|
|
77
77
|
*
|
|
78
78
|
* TODO: detail compatibility requirements.
|
|
79
79
|
*/
|
|
80
|
-
export declare class SharedTreeKernel extends SharedTreeCore<
|
|
80
|
+
export declare class SharedTreeKernel extends SharedTreeCore<IdBasedSharedTreeEditBuilder, SharedTreeChange> implements SharedKernel {
|
|
81
81
|
private readonly logger;
|
|
82
82
|
readonly checkout: TreeCheckout;
|
|
83
83
|
get storedSchema(): TreeStoredSchemaRepository;
|
|
@@ -102,11 +102,11 @@ export declare class SharedTreeKernel extends SharedTreeCore<SharedTreeEditBuild
|
|
|
102
102
|
private checkoutBranch;
|
|
103
103
|
loadCore(services: IChannelStorageService): Promise<void>;
|
|
104
104
|
didAttach(): void;
|
|
105
|
-
applyStashedOp(...args: Parameters<SharedTreeCore<
|
|
105
|
+
applyStashedOp(...args: Parameters<SharedTreeCore<IdBasedSharedTreeEditBuilder, SharedTreeChange>["applyStashedOp"]>): void;
|
|
106
106
|
protected submitCommit(branchId: BranchId, commit: GraphCommit<SharedTreeChange>, schemaAndPolicy: ClonableSchemaAndPolicy, isResubmit: boolean): void;
|
|
107
107
|
onDisconnect(): void;
|
|
108
108
|
}
|
|
109
|
-
export declare function exportSimpleSchema(storedSchema: TreeStoredSchema): SimpleTreeSchema
|
|
109
|
+
export declare function exportSimpleSchema(storedSchema: TreeStoredSchema): SimpleTreeSchema<SchemaType.Stored>;
|
|
110
110
|
/**
|
|
111
111
|
* A way to parse schema in the persisted format from {@link extractPersistedSchema}.
|
|
112
112
|
* @remarks
|
|
@@ -160,19 +160,22 @@ export declare function getCodecTreeForSharedTreeFormat(clientVersion: MinimumVe
|
|
|
160
160
|
*/
|
|
161
161
|
export type SharedTreeOptionsBeta = ForestOptions;
|
|
162
162
|
/**
|
|
163
|
-
* Configuration options for SharedTree.
|
|
163
|
+
* Configuration options for SharedTree with alpha features.
|
|
164
164
|
* @alpha @input
|
|
165
165
|
*/
|
|
166
|
-
export interface SharedTreeOptions extends Partial<CodecWriteOptions>, Partial<SharedTreeFormatOptions
|
|
166
|
+
export interface SharedTreeOptions extends SharedTreeOptionsBeta, Partial<CodecWriteOptions>, Partial<SharedTreeFormatOptions> {
|
|
167
167
|
/**
|
|
168
168
|
* Experimental feature flag to enable shared branches.
|
|
169
169
|
* This feature is not yet complete and should not be used in production.
|
|
170
170
|
* Defaults to false.
|
|
171
171
|
*/
|
|
172
172
|
readonly enableSharedBranches?: boolean;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
/**
|
|
174
|
+
* Experimental feature flag to enable the ability to edit detached roots.
|
|
175
|
+
* This feature is not yet complete and should not be used in production.
|
|
176
|
+
* Defaults to false.
|
|
177
|
+
*/
|
|
178
|
+
readonly enableDetachedRootEditing?: boolean;
|
|
176
179
|
/**
|
|
177
180
|
* Returns whether a node / field should be incrementally encoded.
|
|
178
181
|
* @remarks
|
|
@@ -180,6 +183,9 @@ export interface SharedTreeOptionsInternal extends Partial<SharedTreCoreOptionsI
|
|
|
180
183
|
*/
|
|
181
184
|
shouldEncodeIncrementally?: IncrementalEncodingPolicy;
|
|
182
185
|
}
|
|
186
|
+
export interface SharedTreeOptionsInternal extends SharedTreeOptions, Partial<SharedTreeCoreOptionsInternal> {
|
|
187
|
+
disposeForksAfterTransaction?: boolean;
|
|
188
|
+
}
|
|
183
189
|
/**
|
|
184
190
|
* Configuration options for SharedTree's internal tree storage.
|
|
185
191
|
* @beta @input
|
|
@@ -201,9 +207,6 @@ export interface SharedTreeFormatOptions {
|
|
|
201
207
|
*/
|
|
202
208
|
treeEncodeType: TreeCompressionStrategy;
|
|
203
209
|
}
|
|
204
|
-
export interface SharedTreeFormatOptionsInternal extends Omit<SharedTreeFormatOptions, "treeEncodeType"> {
|
|
205
|
-
treeEncodeType: TreeCompressionStrategyPrivate;
|
|
206
|
-
}
|
|
207
210
|
/**
|
|
208
211
|
* Used to distinguish between different forest types.
|
|
209
212
|
* @remarks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedTree.d.ts","sourceRoot":"","sources":["../../src/shared-tree/sharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE3F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,+BAA+B,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,KAAK,EACX,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACN,KAAK,SAAS,EACd,KAA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{
|
|
87
87
|
getCurrentSeq: lastSequenceNumber,
|
|
88
|
-
}, schemaCodec);
|
|
88
|
+
}, schemaCodec, options.minVersionForCollab);
|
|
89
89
|
const fieldBatchCodec = makeFieldBatchCodec(options);
|
|
90
90
|
const encoderContext = {
|
|
91
91
|
schema: {
|
|
@@ -97,7 +97,7 @@ let SharedTreeKernel = (() => {
|
|
|
97
97
|
idCompressor,
|
|
98
98
|
};
|
|
99
99
|
const forestSummarizer = new ForestSummarizer(forest, revisionTagCodec, fieldBatchCodec, encoderContext, options, idCompressor, initialSequenceNumber, options.shouldEncodeIncrementally);
|
|
100
|
-
const removedRootsSummarizer = new DetachedFieldIndexSummarizer(removedRoots);
|
|
100
|
+
const removedRootsSummarizer = new DetachedFieldIndexSummarizer(removedRoots, options.minVersionForCollab);
|
|
101
101
|
const innerChangeFamily = new SharedTreeChangeFamily(revisionTagCodec, fieldBatchCodec, options, options.treeEncodeType, idCompressor);
|
|
102
102
|
const changeFamily = makeMitigatedChangeFamily(innerChangeFamily, SharedTreeChangeFamily.emptyChange, (error) => {
|
|
103
103
|
// TODO:6344 Add telemetry for these errors.
|
|
@@ -316,9 +316,13 @@ export const changeFormatVersionForEditManager = DependentFormatVersion.fromPair
|
|
|
316
316
|
brand(4),
|
|
317
317
|
],
|
|
318
318
|
[
|
|
319
|
-
brand(EditManagerFormatVersion.
|
|
319
|
+
brand(EditManagerFormatVersion.vSharedBranches),
|
|
320
320
|
brand(4),
|
|
321
321
|
],
|
|
322
|
+
[
|
|
323
|
+
brand(EditManagerFormatVersion.vDetachedRoots),
|
|
324
|
+
brand(101),
|
|
325
|
+
],
|
|
322
326
|
]);
|
|
323
327
|
/**
|
|
324
328
|
* Defines for each MessageFormatVersion the SharedTreeChangeFormatVersion to use.
|
|
@@ -336,9 +340,13 @@ export const changeFormatVersionForMessage = DependentFormatVersion.fromPairs([
|
|
|
336
340
|
brand(4),
|
|
337
341
|
],
|
|
338
342
|
[
|
|
339
|
-
brand(MessageFormatVersion.
|
|
343
|
+
brand(MessageFormatVersion.vSharedBranches),
|
|
340
344
|
brand(4),
|
|
341
345
|
],
|
|
346
|
+
[
|
|
347
|
+
brand(MessageFormatVersion.vDetachedRoots),
|
|
348
|
+
brand(101),
|
|
349
|
+
],
|
|
342
350
|
]);
|
|
343
351
|
function getCodecTreeForEditManagerFormat(clientVersion) {
|
|
344
352
|
const change = changeFormatVersionForEditManager.lookup(clientVersionToEditManagerFormatVersion(clientVersion));
|
|
@@ -411,6 +419,9 @@ export const defaultSharedTreeOptions = {
|
|
|
411
419
|
shouldEncodeIncrementally: defaultIncrementalEncodingPolicy,
|
|
412
420
|
editManagerFormatSelector: clientVersionToEditManagerFormatVersion,
|
|
413
421
|
messageFormatSelector: clientVersionToMessageFormatVersion,
|
|
422
|
+
enableSharedBranches: false,
|
|
423
|
+
enableDetachedRootEditing: false,
|
|
424
|
+
canMakeDetachedRootEdits: false,
|
|
414
425
|
};
|
|
415
426
|
/**
|
|
416
427
|
* Build the allowed types for a Stored Schema.
|