@fluidframework/tree 2.74.0-365691 → 2.74.0-370705
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 +119 -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 +3 -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/incrementalEncodingPolicy.d.ts +14 -6
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +91 -42
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +238 -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 +5 -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 +21 -26
- 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 +4 -4
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +8 -3
- 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 +6 -6
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +13 -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 +2 -2
- 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 +49 -15
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +1306 -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/optionalFieldChangeFormatV3.d.ts +23 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +31 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +1 -0
- 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/optional-field/optionalFieldCodecV3.d.ts +12 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js +57 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +5 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.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/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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/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 +11 -5
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +14 -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 +26 -12
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +10 -4
- 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 +14 -7
- 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 +12 -10
- 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 +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js +7 -0
- package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +3 -4
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +4 -5
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js +0 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts +6 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js +5 -0
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts +12 -12
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.js +18 -6
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +13 -8
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/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/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 +15 -12
- 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 +5 -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 +18 -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.map +1 -1
- package/dist/treeFactory.js +17 -3
- package/dist/treeFactory.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/lib/alpha.d.ts +3 -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/incrementalEncodingPolicy.d.ts +14 -6
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +91 -42
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +236 -70
- 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 +17 -22
- 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 +4 -4
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +3 -3
- 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 +6 -6
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +5 -4
- 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 +2 -2
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +9 -285
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +49 -15
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +1291 -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/optionalFieldChangeFormatV3.d.ts +23 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +27 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +1 -0
- 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/optional-field/optionalFieldCodecV3.d.ts +12 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js +53 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +5 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.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/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/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.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 +11 -5
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +14 -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 +27 -13
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +11 -5
- 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 +12 -6
- 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 +12 -10
- 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 +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js +8 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +3 -4
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +2 -3
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js +0 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts +6 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js +5 -0
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts +12 -12
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.js +15 -3
- package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +15 -10
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/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/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 +6 -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 +19 -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.map +1 -1
- package/lib/treeFactory.js +18 -4
- package/lib/treeFactory.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/package.json +21 -21
- 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/incrementalEncodingPolicy.ts +15 -7
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +9 -9
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +398 -127
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +35 -38
- package/src/feature-libraries/default-schema/index.ts +17 -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 +45 -37
- 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 -9
- 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 +22 -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 +29 -499
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2547 -739
- 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/optionalFieldChangeFormatV3.ts +45 -0
- package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +24 -38
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +89 -35
- package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +94 -0
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +5 -1
- 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/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/index.ts +3 -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 +39 -12
- package/src/shared-tree/sharedTreeChangeCodecs.ts +5 -1
- package/src/shared-tree/sharedTreeChangeEnricher.ts +33 -11
- package/src/shared-tree/sharedTreeChangeFamily.ts +15 -5
- package/src/shared-tree/sharedTreeEditBuilder.ts +47 -13
- package/src/shared-tree/treeAlpha.ts +2 -3
- package/src/shared-tree/treeCheckout.ts +104 -31
- 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 +15 -3
- package/src/simple-tree/api/index.ts +3 -4
- package/src/simple-tree/api/schemaCompatibilityTester.ts +1 -1
- package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -2
- package/src/simple-tree/api/schemaFactoryRecursive.ts +0 -2
- package/src/simple-tree/api/schemaFromSimple.ts +11 -5
- package/src/simple-tree/api/simpleSchemaCodec.ts +17 -3
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -1
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +18 -10
- package/src/simple-tree/api/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/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 +12 -11
- package/src/simple-tree/node-kinds/array/arrayNode.ts +12 -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 +26 -26
- 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 +19 -5
- package/src/util/index.ts +5 -0
- package/src/util/rangeMap.ts +72 -18
- package/src/util/readSnapshotBlob.ts +23 -0
- 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
|
@@ -4,24 +4,28 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { DiscriminatedUnionLibrary, IJsonCodec } from "../../codec/index.js";
|
|
6
6
|
import type { ChangeAtomId, ChangeEncodingContext, EncodedRevisionTag, RevisionTag } from "../../core/index.js";
|
|
7
|
-
import type { EncodedChangeAtomId } from "../modular-schema/index.js";
|
|
8
|
-
import type {
|
|
7
|
+
import type { EncodedChangeAtomId, FieldChangeEncodingContext } from "../modular-schema/index.js";
|
|
8
|
+
import type { Encoded } from "./formatV2.js";
|
|
9
|
+
import type { Attach, CellId, CellMark, Detach, HasMarkFields, Mark, MarkEffect } from "./types.js";
|
|
9
10
|
export type EmptyInputCellMark = Mark & DetachedCellMark;
|
|
10
11
|
export interface DetachedCellMark extends HasMarkFields {
|
|
11
12
|
cellId: CellId;
|
|
12
13
|
}
|
|
13
|
-
export type EmptyOutputCellMark = CellMark<Detach
|
|
14
|
-
export type MoveMarkEffect =
|
|
14
|
+
export type EmptyOutputCellMark = CellMark<Detach>;
|
|
15
|
+
export type MoveMarkEffect = Attach | Detach;
|
|
15
16
|
export type DetachOfRemovedNodes = Detach & {
|
|
16
17
|
cellId: CellId;
|
|
17
18
|
};
|
|
18
|
-
export type CellRename =
|
|
19
|
-
export interface SequenceCodecHelpers
|
|
19
|
+
export type CellRename = DetachOfRemovedNodes;
|
|
20
|
+
export interface SequenceCodecHelpers {
|
|
20
21
|
readonly changeAtomIdCodec: IJsonCodec<ChangeAtomId, EncodedChangeAtomId, EncodedChangeAtomId, ChangeEncodingContext>;
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
context: ChangeEncodingContext
|
|
24
|
-
], TDecodedMarkEffect>;
|
|
22
|
+
readonly encodeMarkEffect: (mark: Mark, context: FieldChangeEncodingContext) => Encoded.MarkEffect;
|
|
23
|
+
readonly decodeMarkEffect: (encoded: Encoded.MarkEffect, count: number, cellId: ChangeAtomId | undefined, context: FieldChangeEncodingContext) => MarkEffect;
|
|
25
24
|
readonly decodeRevision: (encodedRevision: EncodedRevisionTag | undefined, context: ChangeEncodingContext) => RevisionTag;
|
|
25
|
+
readonly decoderLibrary: DiscriminatedUnionLibrary<Encoded.MarkEffect, [
|
|
26
|
+
count: number,
|
|
27
|
+
cellId: ChangeAtomId | undefined,
|
|
28
|
+
context: FieldChangeEncodingContext
|
|
29
|
+
], MarkEffect>;
|
|
26
30
|
}
|
|
27
31
|
//# sourceMappingURL=helperTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helperTypes.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/helperTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EACX,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EAC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AAgB,EAAE,CAC1B,OAAO,EAAE,OAAO,CAAC,UAAU,EAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,OAAO,EAAE,0BAA0B,KAC/B,UAAU,CAAC;IAEhB,QAAQ,CAAC,cAAc,EAAE,CACxB,eAAe,EAAE,kBAAkB,GAAG,SAAS,EAC/C,OAAO,EAAE,qBAAqB,KAC1B,WAAW,CAAC;IAEjB,QAAQ,CAAC,cAAc,EAAE,yBAAyB,CACjD,OAAO,CAAC,UAAU,EACP;QACV,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,YAAY,GAAG,SAAS;QAChC,OAAO,EAAE,0BAA0B;KACnC,EACD,UAAU,CACV,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helperTypes.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/helperTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { DiscriminatedUnionLibrary, IJsonCodec } from \"../../codec/index.js\";\nimport type {\n\tChangeAtomId,\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport type {
|
|
1
|
+
{"version":3,"file":"helperTypes.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/helperTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { DiscriminatedUnionLibrary, IJsonCodec } from \"../../codec/index.js\";\nimport type {\n\tChangeAtomId,\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport type {\n\tEncodedChangeAtomId,\n\tFieldChangeEncodingContext,\n} from \"../modular-schema/index.js\";\nimport type { Encoded } from \"./formatV2.js\";\n\nimport type {\n\tAttach,\n\tCellId,\n\tCellMark,\n\tDetach,\n\tHasMarkFields,\n\tMark,\n\tMarkEffect,\n} from \"./types.js\";\n\nexport type EmptyInputCellMark = Mark & DetachedCellMark;\n\nexport interface DetachedCellMark extends HasMarkFields {\n\tcellId: CellId;\n}\n\nexport type EmptyOutputCellMark = CellMark<Detach>;\n\nexport type MoveMarkEffect = Attach | Detach;\nexport type DetachOfRemovedNodes = Detach & { cellId: CellId };\nexport type CellRename = DetachOfRemovedNodes;\n\nexport interface SequenceCodecHelpers {\n\treadonly changeAtomIdCodec: IJsonCodec<\n\t\tChangeAtomId,\n\t\tEncodedChangeAtomId,\n\t\tEncodedChangeAtomId,\n\t\tChangeEncodingContext\n\t>;\n\n\treadonly encodeMarkEffect: (\n\t\tmark: Mark,\n\t\tcontext: FieldChangeEncodingContext,\n\t) => Encoded.MarkEffect;\n\n\treadonly decodeMarkEffect: (\n\t\tencoded: Encoded.MarkEffect,\n\t\tcount: number,\n\t\tcellId: ChangeAtomId | undefined,\n\t\tcontext: FieldChangeEncodingContext,\n\t) => MarkEffect;\n\n\treadonly decodeRevision: (\n\t\tencodedRevision: EncodedRevisionTag | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t) => RevisionTag;\n\n\treadonly decoderLibrary: DiscriminatedUnionLibrary<\n\t\tEncoded.MarkEffect,\n\t\t/* args */ [\n\t\t\tcount: number,\n\t\t\tcellId: ChangeAtomId | undefined,\n\t\t\tcontext: FieldChangeEncodingContext,\n\t\t],\n\t\tMarkEffect\n\t>;\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export type { Changeset,
|
|
5
|
+
export type { Changeset, Detach, HasMoveId, HasRevisionTag, Mark, MarkList, CellCount as NodeCount, MoveId, Attach, NoopMark, CellId, HasMarkFields, CellMark, Rename, } from "./types.js";
|
|
6
6
|
export { DetachIdOverrideType } from "./formatV1.js";
|
|
7
7
|
export { type SequenceFieldChangeHandler, sequenceFieldChangeHandler, } from "./sequenceFieldChangeHandler.js";
|
|
8
8
|
export { type SequenceChangeRebaser, sequenceFieldChangeRebaser, } from "./sequenceFieldChangeRebaser.js";
|
|
@@ -14,6 +14,5 @@ export { rebase } from "./rebase.js";
|
|
|
14
14
|
export { invert } from "./invert.js";
|
|
15
15
|
export { compose } from "./compose.js";
|
|
16
16
|
export { getInputLength, isDetach, cloneMark, extractMarkEffect, } from "./utils.js";
|
|
17
|
-
export { isMoveMark, type MoveMark,
|
|
18
|
-
export { relevantRemovedRoots } from "./relevantRemovedRoots.js";
|
|
17
|
+
export { isMoveMark, type MoveMark, } from "./moveEffectTable.js";
|
|
19
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,SAAS,EACT,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,SAAS,EACT,MAAM,EACN,SAAS,EACT,cAAc,EACd,IAAI,EACJ,QAAQ,EACR,SAAS,IAAI,SAAS,EACtB,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,aAAa,EACb,QAAQ,EACR,MAAM,GACN,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACN,KAAK,0BAA0B,EAC/B,0BAA0B,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,KAAK,qBAAqB,EAC1B,0BAA0B,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,KAAK,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EACN,cAAc,EACd,QAAQ,EACR,SAAS,EACT,iBAAiB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,UAAU,EACV,KAAK,QAAQ,GACb,MAAM,sBAAsB,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.isMoveMark = exports.extractMarkEffect = exports.cloneMark = exports.isDetach = exports.getInputLength = exports.compose = exports.invert = exports.rebase = exports.MarkListFactory = exports.sequenceFieldEditor = exports.sequenceFieldToDelta = exports.sequenceFieldChangeCodecFactory = exports.sequenceFieldChangeRebaser = exports.sequenceFieldChangeHandler = exports.DetachIdOverrideType = void 0;
|
|
8
8
|
var formatV1_js_1 = require("./formatV1.js");
|
|
9
9
|
Object.defineProperty(exports, "DetachIdOverrideType", { enumerable: true, get: function () { return formatV1_js_1.DetachIdOverrideType; } });
|
|
10
10
|
var sequenceFieldChangeHandler_js_1 = require("./sequenceFieldChangeHandler.js");
|
|
@@ -32,6 +32,4 @@ Object.defineProperty(exports, "cloneMark", { enumerable: true, get: function ()
|
|
|
32
32
|
Object.defineProperty(exports, "extractMarkEffect", { enumerable: true, get: function () { return utils_js_1.extractMarkEffect; } });
|
|
33
33
|
var moveEffectTable_js_1 = require("./moveEffectTable.js");
|
|
34
34
|
Object.defineProperty(exports, "isMoveMark", { enumerable: true, get: function () { return moveEffectTable_js_1.isMoveMark; } });
|
|
35
|
-
var relevantRemovedRoots_js_1 = require("./relevantRemovedRoots.js");
|
|
36
|
-
Object.defineProperty(exports, "relevantRemovedRoots", { enumerable: true, get: function () { return relevantRemovedRoots_js_1.relevantRemovedRoots; } });
|
|
37
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAkBH,6CAAqD;AAA5C,mHAAA,oBAAoB,OAAA;AAC7B,iFAGyC;AADxC,2IAAA,0BAA0B,OAAA;AAE3B,iFAGyC;AADxC,2IAAA,0BAA0B,OAAA;AAE3B,mEAA2E;AAAlE,yIAAA,+BAA+B,OAAA;AACxC,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAC7B,mEAAyF;AAAtD,6HAAA,mBAAmB,OAAA;AACtD,2DAAuD;AAA9C,qHAAA,eAAe,OAAA;AACxB,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AACf,yCAAqC;AAA5B,mGAAA,MAAM,OAAA;AACf,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAChB,uCAKoB;AAJnB,0GAAA,cAAc,OAAA;AACd,oGAAA,QAAQ,OAAA;AACR,qGAAA,SAAS,OAAA;AACT,6GAAA,iBAAiB,OAAA;AAElB,2DAG8B;AAF7B,gHAAA,UAAU,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tChangeset,\n\tDetach,\n\tHasMoveId,\n\tHasRevisionTag,\n\tMark,\n\tMarkList,\n\tCellCount as NodeCount,\n\tMoveId,\n\tAttach,\n\tNoopMark,\n\tCellId,\n\tHasMarkFields,\n\tCellMark,\n\tRename,\n} from \"./types.js\";\nexport { DetachIdOverrideType } from \"./formatV1.js\";\nexport {\n\ttype SequenceFieldChangeHandler,\n\tsequenceFieldChangeHandler,\n} from \"./sequenceFieldChangeHandler.js\";\nexport {\n\ttype SequenceChangeRebaser,\n\tsequenceFieldChangeRebaser,\n} from \"./sequenceFieldChangeRebaser.js\";\nexport { sequenceFieldChangeCodecFactory } from \"./sequenceFieldCodecs.js\";\nexport { sequenceFieldToDelta } from \"./sequenceFieldToDelta.js\";\nexport { type SequenceFieldEditor, sequenceFieldEditor } from \"./sequenceFieldEditor.js\";\nexport { MarkListFactory } from \"./markListFactory.js\";\nexport { rebase } from \"./rebase.js\";\nexport { invert } from \"./invert.js\";\nexport { compose } from \"./compose.js\";\nexport {\n\tgetInputLength,\n\tisDetach,\n\tcloneMark,\n\textractMarkEffect,\n} from \"./utils.js\";\nexport {\n\tisMoveMark,\n\ttype MoveMark,\n} from \"./moveEffectTable.js\";\n"]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import type { RevisionTag } from "../../core/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import type { IdAllocator } from "../../util/index.js";
|
|
7
|
+
import type { InvertNodeManager } from "../modular-schema/index.js";
|
|
8
8
|
import { type Changeset } from "./types.js";
|
|
9
9
|
/**
|
|
10
10
|
* Inverts a given changeset.
|
|
@@ -18,5 +18,5 @@ import { type Changeset } from "./types.js";
|
|
|
18
18
|
* WARNING! This implementation is incomplete:
|
|
19
19
|
* - Support for slices is not implemented.
|
|
20
20
|
*/
|
|
21
|
-
export declare function invert(change: Changeset, isRollback: boolean, genId: IdAllocator, revision: RevisionTag | undefined, crossFieldManager:
|
|
21
|
+
export declare function invert(change: Changeset, isRollback: boolean, genId: IdAllocator, revision: RevisionTag | undefined, crossFieldManager: InvertNodeManager): Changeset;
|
|
22
22
|
//# sourceMappingURL=invert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invert.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/invert.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"invert.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/invert.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAW,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAqB,iBAAiB,EAAU,MAAM,4BAA4B,CAAC;AAG/F,OAAO,EAIN,KAAK,SAAS,EAOd,MAAM,YAAY,CAAC;AAWpB;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CACrB,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,OAAO,EACnB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,WAAW,GAAG,SAAS,EACjC,iBAAiB,EAAE,iBAAiB,GAClC,SAAS,CAEX"}
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.invert = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
|
-
const index_js_1 = require("../../util/index.js");
|
|
10
|
-
const index_js_2 = require("../modular-schema/index.js");
|
|
11
9
|
const markListFactory_js_1 = require("./markListFactory.js");
|
|
12
10
|
const types_js_1 = require("./types.js");
|
|
13
11
|
const utils_js_1 = require("./utils.js");
|
|
@@ -48,191 +46,91 @@ function invertMark(mark, isRollback, crossFieldManager, revision) {
|
|
|
48
46
|
case "Rename": {
|
|
49
47
|
const inputId = (0, utils_js_1.getInputCellId)(mark);
|
|
50
48
|
(0, internal_1.assert)(inputId !== undefined, 0x9f5 /* Rename mark must have cell ID */);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
//
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
// the only way for that cell to be assigned that ID again is if it is rolled back to that state.
|
|
59
|
-
idOverride: isRollback ? inputId : { localId: inputId.localId },
|
|
60
|
-
};
|
|
61
|
-
return [(0, utils_js_1.withNodeChange)(inverse, mark.changes)];
|
|
62
|
-
}
|
|
63
|
-
case "Remove": {
|
|
64
|
-
(0, internal_1.assert)(mark.revision !== undefined, 0x5a1 /* Unable to revert to undefined revision */);
|
|
65
|
-
const outputId = (0, utils_js_1.getOutputCellId)(mark);
|
|
66
|
-
const inputId = (0, utils_js_1.getInputCellId)(mark);
|
|
67
|
-
let inverse;
|
|
68
|
-
if (inputId === undefined) {
|
|
69
|
-
inverse = {
|
|
70
|
-
type: "Insert",
|
|
71
|
-
id: mark.id,
|
|
72
|
-
cellId: outputId,
|
|
49
|
+
// In older client versions, the ID of a detached root was the same as the ID of the cell it was last detached from.
|
|
50
|
+
// To preserve compatibility with those versions, we must make sure that we do not rename the cell if we are not also
|
|
51
|
+
// renaming the associated detached root, if there is one.
|
|
52
|
+
if (isRollback) {
|
|
53
|
+
// A rollback inverse inverts any associated root rename, so we should also invert the cell rename.
|
|
54
|
+
const inverse = {
|
|
55
|
+
type: "Rename",
|
|
73
56
|
count: mark.count,
|
|
74
|
-
|
|
57
|
+
cellId: mark.idOverride,
|
|
58
|
+
// Unlike a remove or move-out, which follow a node, there is no way for this mark to assign the original input cell ID to another cell.
|
|
59
|
+
// This means it should be safe to always restore the input cell ID (as opposed to only doing it on rollbacks).
|
|
60
|
+
// Despite that, we still only do it on rollback for the sake of consistency: once a cell has been assigned an ID,
|
|
61
|
+
// the only way for that cell to be assigned that ID again is if it is rolled back to that state.
|
|
62
|
+
idOverride: inputId,
|
|
75
63
|
};
|
|
64
|
+
return [(0, utils_js_1.withNodeChange)(inverse, mark.changes)];
|
|
76
65
|
}
|
|
77
66
|
else {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
id: mark.id,
|
|
81
|
-
cellId: outputId,
|
|
82
|
-
count: mark.count,
|
|
83
|
-
revision,
|
|
84
|
-
};
|
|
85
|
-
if (isRollback) {
|
|
86
|
-
inverse.idOverride = inputId;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return [(0, utils_js_1.withNodeChange)(inverse, mark.changes)];
|
|
90
|
-
}
|
|
91
|
-
case "Insert": {
|
|
92
|
-
const inputId = (0, utils_js_1.getInputCellId)(mark);
|
|
93
|
-
(0, internal_1.assert)(inputId !== undefined, 0x80c /* Active inserts should target empty cells */);
|
|
94
|
-
const removeMark = {
|
|
95
|
-
type: "Remove",
|
|
96
|
-
count: mark.count,
|
|
97
|
-
id: inputId.localId,
|
|
98
|
-
revision,
|
|
99
|
-
};
|
|
100
|
-
if (isRollback) {
|
|
101
|
-
removeMark.idOverride = inputId;
|
|
102
|
-
}
|
|
103
|
-
const inverse = (0, utils_js_1.withNodeChange)(removeMark, mark.changes);
|
|
104
|
-
return [inverse];
|
|
105
|
-
}
|
|
106
|
-
case "MoveOut": {
|
|
107
|
-
if (mark.changes !== undefined) {
|
|
108
|
-
(0, internal_1.assert)(mark.count === 1, 0x6ed /* Mark with changes can only target a single cell */);
|
|
109
|
-
const endpoint = (0, utils_js_1.getEndpoint)(mark);
|
|
110
|
-
crossFieldManager.set(index_js_2.CrossFieldTarget.Destination, endpoint.revision, endpoint.localId, mark.count, mark.changes, true);
|
|
111
|
-
}
|
|
112
|
-
const cellId = (0, utils_js_1.getDetachOutputCellId)(mark) ?? {
|
|
113
|
-
revision: mark.revision ?? (0, internal_1.fail)(0xb2a /* Revision must be defined */),
|
|
114
|
-
localId: mark.id,
|
|
115
|
-
};
|
|
116
|
-
const moveIn = {
|
|
117
|
-
type: "MoveIn",
|
|
118
|
-
id: mark.id,
|
|
119
|
-
revision,
|
|
120
|
-
};
|
|
121
|
-
if (mark.finalEndpoint !== undefined) {
|
|
122
|
-
moveIn.finalEndpoint = {
|
|
123
|
-
localId: mark.finalEndpoint.localId,
|
|
124
|
-
revision: mark.revision,
|
|
125
|
-
};
|
|
67
|
+
// An undo does not invert root renames, so we should not invert cell renames.
|
|
68
|
+
return [invertNodeChangeOrSkip(mark.count, mark.changes, mark.idOverride)];
|
|
126
69
|
}
|
|
127
|
-
let effect = moveIn;
|
|
128
|
-
const inputId = (0, utils_js_1.getInputCellId)(mark);
|
|
129
|
-
if (inputId !== undefined) {
|
|
130
|
-
const detach = {
|
|
131
|
-
type: "Remove",
|
|
132
|
-
id: mark.id,
|
|
133
|
-
revision,
|
|
134
|
-
};
|
|
135
|
-
if (isRollback) {
|
|
136
|
-
detach.idOverride = inputId;
|
|
137
|
-
}
|
|
138
|
-
effect = {
|
|
139
|
-
type: "AttachAndDetach",
|
|
140
|
-
attach: moveIn,
|
|
141
|
-
detach,
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
return [{ ...effect, count: mark.count, cellId }];
|
|
145
70
|
}
|
|
146
|
-
case "
|
|
71
|
+
case "Remove": {
|
|
72
|
+
(0, internal_1.assert)(mark.revision !== undefined, 0x5a1 /* Unable to revert to undefined revision */);
|
|
73
|
+
const outputId = (0, utils_js_1.getOutputCellId)(mark);
|
|
147
74
|
const inputId = (0, utils_js_1.getInputCellId)(mark);
|
|
148
|
-
(0, internal_1.assert)(inputId
|
|
149
|
-
const
|
|
150
|
-
|
|
75
|
+
(0, internal_1.assert)(inputId === undefined, "Unexpected remove of detached node");
|
|
76
|
+
const attachId = { revision: isRollback ? mark.revision : revision, localId: mark.id };
|
|
77
|
+
crossFieldManager.invertDetach({ revision: mark.revision, localId: mark.id }, mark.count, mark.changes, attachId);
|
|
78
|
+
const inverse = {
|
|
79
|
+
type: "Insert",
|
|
151
80
|
id: mark.id,
|
|
81
|
+
cellId: outputId,
|
|
152
82
|
count: mark.count,
|
|
153
|
-
revision,
|
|
83
|
+
revision: attachId.revision,
|
|
154
84
|
};
|
|
155
|
-
|
|
156
|
-
invertedMark.idOverride = inputId;
|
|
157
|
-
}
|
|
158
|
-
if (mark.finalEndpoint) {
|
|
159
|
-
invertedMark.finalEndpoint = {
|
|
160
|
-
localId: mark.finalEndpoint.localId,
|
|
161
|
-
revision: mark.revision,
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
return applyMovedChanges(invertedMark, mark.revision, crossFieldManager);
|
|
85
|
+
return [inverse];
|
|
165
86
|
}
|
|
166
|
-
case "
|
|
167
|
-
|
|
168
|
-
count: mark.count,
|
|
169
|
-
cellId: mark.cellId,
|
|
170
|
-
...mark.attach,
|
|
171
|
-
};
|
|
172
|
-
const idAfterAttach = (0, utils_js_1.getOutputCellId)(attach);
|
|
173
|
-
// We put `mark.changes` on the detach so that if it is a move source
|
|
174
|
-
// the changes can be sent to the endpoint.
|
|
175
|
-
const detach = {
|
|
176
|
-
count: mark.count,
|
|
177
|
-
cellId: idAfterAttach,
|
|
178
|
-
changes: mark.changes,
|
|
179
|
-
...mark.detach,
|
|
180
|
-
};
|
|
181
|
-
const attachInverses = invertMark(attach, isRollback, crossFieldManager, revision);
|
|
182
|
-
const detachInverses = invertMark(detach, isRollback, crossFieldManager, revision);
|
|
183
|
-
if (detachInverses.length === 0) {
|
|
184
|
-
return attachInverses;
|
|
185
|
-
}
|
|
186
|
-
(0, internal_1.assert)((0, index_js_1.hasSingle)(detachInverses), 0x80d /* Only expected MoveIn marks to be split when inverting */);
|
|
187
|
-
let detachInverse = detachInverses[0];
|
|
188
|
-
(0, internal_1.assert)((0, utils_js_1.isAttach)(detachInverse), 0x80e /* Inverse of a detach should be an attach */);
|
|
189
|
-
const inverses = [];
|
|
190
|
-
for (const attachInverse of attachInverses) {
|
|
191
|
-
let detachInverseCurr = detachInverse;
|
|
192
|
-
if (attachInverse.count !== detachInverse.count) {
|
|
193
|
-
[detachInverseCurr, detachInverse] = (0, utils_js_1.splitMark)(detachInverse, attachInverse.count);
|
|
194
|
-
}
|
|
195
|
-
if (attachInverse.type === types_js_1.NoopMarkType) {
|
|
196
|
-
if (attachInverse.changes !== undefined) {
|
|
197
|
-
(0, internal_1.assert)(detachInverseCurr.changes === undefined, 0x80f /* Unexpected node changes */);
|
|
198
|
-
detachInverseCurr.changes = attachInverse.changes;
|
|
199
|
-
}
|
|
200
|
-
inverses.push(detachInverseCurr);
|
|
201
|
-
continue;
|
|
202
|
-
}
|
|
203
|
-
(0, internal_1.assert)((0, utils_js_1.isDetach)(attachInverse), 0x810 /* Inverse of an attach should be a detach */);
|
|
204
|
-
(0, internal_1.assert)(detachInverseCurr.cellId !== undefined, 0x9f6 /* Expected empty cell */);
|
|
205
|
-
const inverted = (0, utils_js_1.normalizeCellRename)(detachInverseCurr.cellId, attachInverse.count, (0, utils_js_1.extractMarkEffect)(detachInverseCurr), (0, utils_js_1.extractMarkEffect)(attachInverse));
|
|
206
|
-
if (detachInverse.changes !== undefined) {
|
|
207
|
-
inverted.changes = detachInverse.changes;
|
|
208
|
-
}
|
|
209
|
-
if (attachInverse.changes !== undefined) {
|
|
210
|
-
(0, internal_1.assert)(inverted.changes === undefined, 0x811 /* Unexpected node changes */);
|
|
211
|
-
inverted.changes = attachInverse.changes;
|
|
212
|
-
}
|
|
213
|
-
inverses.push(inverted);
|
|
214
|
-
}
|
|
215
|
-
return inverses;
|
|
87
|
+
case "Insert": {
|
|
88
|
+
return invertInsert(mark, revision, crossFieldManager, isRollback);
|
|
216
89
|
}
|
|
217
90
|
default:
|
|
218
91
|
(0, internal_1.unreachableCase)(type);
|
|
219
92
|
}
|
|
220
93
|
}
|
|
221
|
-
function
|
|
222
|
-
|
|
223
|
-
const entry = manager.get(index_js_2.CrossFieldTarget.Destination, revision, mark.id, mark.count, true);
|
|
94
|
+
function invertInsert(mark, revision, manager, isRollback) {
|
|
95
|
+
const entry = manager.invertAttach((0, utils_js_1.getAttachedRootId)(mark), mark.count);
|
|
224
96
|
if (entry.length < mark.count) {
|
|
225
97
|
const [mark1, mark2] = (0, utils_js_1.splitMark)(mark, entry.length);
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
98
|
+
return [
|
|
99
|
+
invertInsertSegment(mark1, revision, isRollback, entry.value),
|
|
100
|
+
...invertInsert(mark2, revision, manager, isRollback),
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
return [invertInsertSegment(mark, revision, isRollback, entry.value)];
|
|
104
|
+
}
|
|
105
|
+
function invertInsertSegment(mark, revision, isRollback, detachEntry) {
|
|
106
|
+
const inputId = (0, utils_js_1.getInputCellId)(mark);
|
|
107
|
+
(0, internal_1.assert)(inputId !== undefined, 0x80c /* Active inserts should target empty cells */);
|
|
108
|
+
const detachId = invertAttachId((0, utils_js_1.getAttachedRootId)(mark), revision, isRollback, detachEntry);
|
|
109
|
+
const removeMark = {
|
|
110
|
+
type: "Remove",
|
|
111
|
+
count: mark.count,
|
|
112
|
+
id: detachId.localId,
|
|
113
|
+
revision: detachId.revision,
|
|
114
|
+
};
|
|
115
|
+
if (isRollback && !(0, utils_js_1.areEqualCellIds)(inputId, detachId)) {
|
|
116
|
+
removeMark.cellRename = inputId;
|
|
117
|
+
}
|
|
118
|
+
if (detachEntry?.nodeChange !== undefined) {
|
|
119
|
+
removeMark.changes = detachEntry.nodeChange;
|
|
120
|
+
}
|
|
121
|
+
return removeMark;
|
|
122
|
+
}
|
|
123
|
+
function invertAttachId(attachId, revision, isRollback, detachEntry) {
|
|
124
|
+
if (!isRollback) {
|
|
125
|
+
return {
|
|
126
|
+
revision,
|
|
127
|
+
localId: attachId.localId,
|
|
128
|
+
};
|
|
230
129
|
}
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
return [(0, utils_js_1.withNodeChange)(mark, entry.value)];
|
|
130
|
+
if (detachEntry?.detachId !== undefined) {
|
|
131
|
+
return detachEntry.detachId;
|
|
234
132
|
}
|
|
235
|
-
return
|
|
133
|
+
return attachId;
|
|
236
134
|
}
|
|
237
135
|
function invertNodeChangeOrSkip(count, changes, cellId) {
|
|
238
136
|
if (changes !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invert.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/invert.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAoF;AAGpF,kDAAgF;AAChF,yDAIoC;AAEpC,6DAAuD;AACvD,yCAcoB;AACpB,yCAYoB;AAEpB;;;;;;;;;;;GAWG;AACH,SAAgB,MAAM,CACrB,MAAiB,EACjB,UAAmB,EACnB,KAAkB,EAClB,QAAiC,EACjC,iBAAoC;IAEpC,OAAO,cAAc,CACpB,MAAM,EACN,UAAU,EACV,iBAA8C,EAC9C,QAAQ,CACR,CAAC;AACH,CAAC;AAbD,wBAaC;AAED,SAAS,cAAc,CACtB,QAAkB,EAClB,UAAmB,EACnB,iBAA4C,EAC5C,QAAiC;IAEjC,MAAM,eAAe,GAAG,IAAI,oCAAe,EAAE,CAAC;IAE9C,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC7B,MAAM,YAAY,GAAG,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAC/E,eAAe,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,eAAe,CAAC,IAAI,CAAC;AAC7B,CAAC;AAED,SAAS,UAAU,CAClB,IAAU,EACV,UAAmB,EACnB,iBAA4C,EAC5C,QAAiC;IAEjC,IAAI,CAAC,IAAA,sBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,IAAA,yBAAc,EAAC,IAAI,CAAC,CAAC;QACrC,OAAO,CAAC,sBAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IACpE,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACvB,QAAQ,IAAI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AAK,CAAC;QAEV,OAAO,CAAC,gBAAgB,EAAE,GAAG,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9B,OAAO,CAAC,IAAA,yBAAc,EAA6B,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,sBAAsB,CAC9B,KAAa,EACb,OAA2B,EAC3B,MAAe;IAEf,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC3B,IAAA,iBAAM,EAAC,KAAK,KAAK,CAAC,EAAE,KAAK,CAAC,iDAAiD,CAAC,CAAC;QAC7E,MAAM,IAAI,GAAuB;YAChC,KAAK;YACL,OAAO;SACP,CAAC;QACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,CAAC;AAClB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase, fail } from \"@fluidframework/core-utils/internal\";\n\nimport type { RevisionTag } from \"../../core/index.js\";\nimport { type IdAllocator, type Mutable, hasSingle } from \"../../util/index.js\";\nimport {\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\ttype NodeId,\n} from \"../modular-schema/index.js\";\n\nimport { MarkListFactory } from \"./markListFactory.js\";\nimport {\n\ttype CellId,\n\ttype CellMark,\n\ttype Changeset,\n\ttype Detach,\n\ttype Mark,\n\ttype MarkEffect,\n\ttype MarkList,\n\ttype MoveIn,\n\ttype MoveOut,\n\ttype NoopMark,\n\tNoopMarkType,\n\ttype Remove,\n\ttype Rename,\n} from \"./types.js\";\nimport {\n\textractMarkEffect,\n\tgetDetachOutputCellId,\n\tgetEndpoint,\n\tgetInputCellId,\n\tgetOutputCellId,\n\tisAttach,\n\tisDetach,\n\tisImpactful,\n\tnormalizeCellRename,\n\tsplitMark,\n\twithNodeChange,\n} from \"./utils.js\";\n\n/**\n * Inverts a given changeset.\n * @param change - The changeset to produce the inverse of.\n * @param isRollback - Whether the inverse is being produced for a rollback.\n * @param genId - The ID allocator to use for generating new IDs.\n * @param revision - The revision to use for the inverse changeset.\n * @param crossFieldManager - The cross-field manager to use for tracking cross-field changes.\n * @returns The inverse of the given `change` such that the inverse can be applied after `change`.\n *\n * WARNING! This implementation is incomplete:\n * - Support for slices is not implemented.\n */\nexport function invert(\n\tchange: Changeset,\n\tisRollback: boolean,\n\tgenId: IdAllocator,\n\trevision: RevisionTag | undefined,\n\tcrossFieldManager: CrossFieldManager,\n): Changeset {\n\treturn invertMarkList(\n\t\tchange,\n\t\tisRollback,\n\t\tcrossFieldManager as CrossFieldManager<NodeId>,\n\t\trevision,\n\t);\n}\n\nfunction invertMarkList(\n\tmarkList: MarkList,\n\tisRollback: boolean,\n\tcrossFieldManager: CrossFieldManager<NodeId>,\n\trevision: RevisionTag | undefined,\n): MarkList {\n\tconst inverseMarkList = new MarkListFactory();\n\n\tfor (const mark of markList) {\n\t\tconst inverseMarks = invertMark(mark, isRollback, crossFieldManager, revision);\n\t\tinverseMarkList.push(...inverseMarks);\n\t}\n\n\treturn inverseMarkList.list;\n}\n\nfunction invertMark(\n\tmark: Mark,\n\tisRollback: boolean,\n\tcrossFieldManager: CrossFieldManager<NodeId>,\n\trevision: RevisionTag | undefined,\n): Mark[] {\n\tif (!isImpactful(mark)) {\n\t\tconst inputId = getInputCellId(mark);\n\t\treturn [invertNodeChangeOrSkip(mark.count, mark.changes, inputId)];\n\t}\n\tconst type = mark.type;\n\tswitch (type) {\n\t\tcase NoopMarkType: {\n\t\t\treturn [mark];\n\t\t}\n\t\tcase \"Rename\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x9f5 /* Rename mark must have cell ID */);\n\t\t\tconst inverse: Mutable<CellMark<Rename>> = {\n\t\t\t\ttype: \"Rename\",\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: mark.idOverride,\n\t\t\t\t// Unlike a remove or move-out, which follow a node, there is no way for this mark to assign the original input cell ID to another cell.\n\t\t\t\t// This means it should be safe to always restore the input cell ID (as opposed to only doing it on rollbacks).\n\t\t\t\t// Despite that, we still only do it on rollback for the sake of consistency: once a cell has been assigned an ID,\n\t\t\t\t// the only way for that cell to be assigned that ID again is if it is rolled back to that state.\n\t\t\t\tidOverride: isRollback ? inputId : { localId: inputId.localId },\n\t\t\t};\n\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t}\n\t\tcase \"Remove\": {\n\t\t\tassert(mark.revision !== undefined, 0x5a1 /* Unable to revert to undefined revision */);\n\t\t\tconst outputId = getOutputCellId(mark);\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tlet inverse: Mutable<Mark>;\n\t\t\tif (inputId === undefined) {\n\t\t\t\tinverse = {\n\t\t\t\t\ttype: \"Insert\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\tcellId: outputId,\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tinverse = {\n\t\t\t\t\ttype: \"Remove\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\tcellId: outputId,\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tif (isRollback) {\n\t\t\t\t\tinverse.idOverride = inputId;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t}\n\t\tcase \"Insert\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x80c /* Active inserts should target empty cells */);\n\t\t\tconst removeMark: Mutable<CellMark<Remove>> = {\n\t\t\t\ttype: \"Remove\",\n\t\t\t\tcount: mark.count,\n\t\t\t\tid: inputId.localId,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (isRollback) {\n\t\t\t\tremoveMark.idOverride = inputId;\n\t\t\t}\n\n\t\t\tconst inverse = withNodeChange(removeMark, mark.changes);\n\t\t\treturn [inverse];\n\t\t}\n\t\tcase \"MoveOut\": {\n\t\t\tif (mark.changes !== undefined) {\n\t\t\t\tassert(mark.count === 1, 0x6ed /* Mark with changes can only target a single cell */);\n\n\t\t\t\tconst endpoint = getEndpoint(mark);\n\t\t\t\tcrossFieldManager.set(\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tendpoint.revision,\n\t\t\t\t\tendpoint.localId,\n\t\t\t\t\tmark.count,\n\t\t\t\t\tmark.changes,\n\t\t\t\t\ttrue,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst cellId = getDetachOutputCellId(mark) ?? {\n\t\t\t\trevision: mark.revision ?? fail(0xb2a /* Revision must be defined */),\n\t\t\t\tlocalId: mark.id,\n\t\t\t};\n\n\t\t\tconst moveIn: MoveIn = {\n\t\t\t\ttype: \"MoveIn\",\n\t\t\t\tid: mark.id,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (mark.finalEndpoint !== undefined) {\n\t\t\t\tmoveIn.finalEndpoint = {\n\t\t\t\t\tlocalId: mark.finalEndpoint.localId,\n\t\t\t\t\trevision: mark.revision,\n\t\t\t\t};\n\t\t\t}\n\t\t\tlet effect: MarkEffect = moveIn;\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tif (inputId !== undefined) {\n\t\t\t\tconst detach: Mutable<Detach> = {\n\t\t\t\t\ttype: \"Remove\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tif (isRollback) {\n\t\t\t\t\tdetach.idOverride = inputId;\n\t\t\t\t}\n\t\t\t\teffect = {\n\t\t\t\t\ttype: \"AttachAndDetach\",\n\t\t\t\t\tattach: moveIn,\n\t\t\t\t\tdetach,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn [{ ...effect, count: mark.count, cellId }];\n\t\t}\n\t\tcase \"MoveIn\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x89e /* Active move-ins should target empty cells */);\n\t\t\tconst invertedMark: Mutable<CellMark<MoveOut>> = {\n\t\t\t\ttype: \"MoveOut\",\n\t\t\t\tid: mark.id,\n\t\t\t\tcount: mark.count,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (isRollback) {\n\t\t\t\tinvertedMark.idOverride = inputId;\n\t\t\t}\n\n\t\t\tif (mark.finalEndpoint) {\n\t\t\t\tinvertedMark.finalEndpoint = {\n\t\t\t\t\tlocalId: mark.finalEndpoint.localId,\n\t\t\t\t\trevision: mark.revision,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn applyMovedChanges(invertedMark, mark.revision, crossFieldManager);\n\t\t}\n\t\tcase \"AttachAndDetach\": {\n\t\t\tconst attach: Mark = {\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: mark.cellId,\n\t\t\t\t...mark.attach,\n\t\t\t};\n\t\t\tconst idAfterAttach = getOutputCellId(attach);\n\n\t\t\t// We put `mark.changes` on the detach so that if it is a move source\n\t\t\t// the changes can be sent to the endpoint.\n\t\t\tconst detach: Mark = {\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: idAfterAttach,\n\t\t\t\tchanges: mark.changes,\n\t\t\t\t...mark.detach,\n\t\t\t};\n\t\t\tconst attachInverses = invertMark(attach, isRollback, crossFieldManager, revision);\n\t\t\tconst detachInverses = invertMark(detach, isRollback, crossFieldManager, revision);\n\n\t\t\tif (detachInverses.length === 0) {\n\t\t\t\treturn attachInverses;\n\t\t\t}\n\n\t\t\tassert(\n\t\t\t\thasSingle(detachInverses),\n\t\t\t\t0x80d /* Only expected MoveIn marks to be split when inverting */,\n\t\t\t);\n\n\t\t\tlet detachInverse = detachInverses[0];\n\t\t\tassert(isAttach(detachInverse), 0x80e /* Inverse of a detach should be an attach */);\n\n\t\t\tconst inverses: Mark[] = [];\n\t\t\tfor (const attachInverse of attachInverses) {\n\t\t\t\tlet detachInverseCurr: Mark = detachInverse;\n\t\t\t\tif (attachInverse.count !== detachInverse.count) {\n\t\t\t\t\t[detachInverseCurr, detachInverse] = splitMark(detachInverse, attachInverse.count);\n\t\t\t\t}\n\n\t\t\t\tif (attachInverse.type === NoopMarkType) {\n\t\t\t\t\tif (attachInverse.changes !== undefined) {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tdetachInverseCurr.changes === undefined,\n\t\t\t\t\t\t\t0x80f /* Unexpected node changes */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdetachInverseCurr.changes = attachInverse.changes;\n\t\t\t\t\t}\n\t\t\t\t\tinverses.push(detachInverseCurr);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tassert(isDetach(attachInverse), 0x810 /* Inverse of an attach should be a detach */);\n\t\t\t\tassert(detachInverseCurr.cellId !== undefined, 0x9f6 /* Expected empty cell */);\n\t\t\t\tconst inverted = normalizeCellRename(\n\t\t\t\t\tdetachInverseCurr.cellId,\n\t\t\t\t\tattachInverse.count,\n\t\t\t\t\textractMarkEffect(detachInverseCurr),\n\t\t\t\t\textractMarkEffect(attachInverse),\n\t\t\t\t);\n\t\t\t\tif (detachInverse.changes !== undefined) {\n\t\t\t\t\tinverted.changes = detachInverse.changes;\n\t\t\t\t}\n\n\t\t\t\tif (attachInverse.changes !== undefined) {\n\t\t\t\t\tassert(inverted.changes === undefined, 0x811 /* Unexpected node changes */);\n\t\t\t\t\tinverted.changes = attachInverse.changes;\n\t\t\t\t}\n\t\t\t\tinverses.push(inverted);\n\t\t\t}\n\n\t\t\treturn inverses;\n\t\t}\n\t\tdefault:\n\t\t\tunreachableCase(type);\n\t}\n}\n\nfunction applyMovedChanges(\n\tmark: CellMark<MoveOut>,\n\trevision: RevisionTag | undefined,\n\tmanager: CrossFieldManager<NodeId>,\n): Mark[] {\n\t// Although this is a source mark, we query the destination because this was a destination mark during the original invert pass.\n\tconst entry = manager.get(CrossFieldTarget.Destination, revision, mark.id, mark.count, true);\n\n\tif (entry.length < mark.count) {\n\t\tconst [mark1, mark2] = splitMark(mark, entry.length);\n\t\tconst mark1WithChanges =\n\t\t\tentry.value !== undefined\n\t\t\t\t? withNodeChange<CellMark<MoveOut>, MoveOut>(mark1, entry.value)\n\t\t\t\t: mark1;\n\n\t\treturn [mark1WithChanges, ...applyMovedChanges(mark2, revision, manager)];\n\t}\n\n\tif (entry.value !== undefined) {\n\t\tmanager.onMoveIn(entry.value);\n\t\treturn [withNodeChange<CellMark<MoveOut>, MoveOut>(mark, entry.value)];\n\t}\n\n\treturn [mark];\n}\n\nfunction invertNodeChangeOrSkip(\n\tcount: number,\n\tchanges: NodeId | undefined,\n\tcellId?: CellId,\n): Mark {\n\tif (changes !== undefined) {\n\t\tassert(count === 1, 0x66c /* A modify mark must have length equal to one */);\n\t\tconst noop: CellMark<NoopMark> = {\n\t\t\tcount,\n\t\t\tchanges,\n\t\t};\n\t\tif (cellId !== undefined) {\n\t\t\tnoop.cellId = cellId;\n\t\t}\n\t\treturn noop;\n\t}\n\n\tif (cellId !== undefined) {\n\t\treturn { count, cellId };\n\t}\n\treturn { count };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"invert.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/invert.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA8E;AAM9E,6DAAuD;AACvD,yCAWoB;AACpB,yCAQoB;AAEpB;;;;;;;;;;;GAWG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,CAAC;QAC7E,MAAM,IAAI,GAAuB;YAChC,KAAK;YACL,OAAO;SACP,CAAC;QACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,CAAC;AAClB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport type { ChangeAtomId, RevisionTag } from \"../../core/index.js\";\nimport type { IdAllocator, Mutable } from \"../../util/index.js\";\nimport type { DetachedNodeEntry, InvertNodeManager, NodeId } from \"../modular-schema/index.js\";\n\nimport { MarkListFactory } from \"./markListFactory.js\";\nimport {\n\ttype Attach,\n\ttype CellId,\n\ttype CellMark,\n\ttype Changeset,\n\ttype Detach,\n\ttype Mark,\n\ttype MarkList,\n\ttype NoopMark,\n\tNoopMarkType,\n\ttype Rename,\n} from \"./types.js\";\nimport {\n\tareEqualCellIds,\n\tgetAttachedRootId,\n\tgetInputCellId,\n\tgetOutputCellId,\n\tisImpactful,\n\tsplitMark,\n\twithNodeChange,\n} from \"./utils.js\";\n\n/**\n * Inverts a given changeset.\n * @param change - The changeset to produce the inverse of.\n * @param isRollback - Whether the inverse is being produced for a rollback.\n * @param genId - The ID allocator to use for generating new IDs.\n * @param revision - The revision to use for the inverse changeset.\n * @param crossFieldManager - The cross-field manager to use for tracking cross-field changes.\n * @returns The inverse of the given `change` such that the inverse can be applied after `change`.\n *\n * WARNING! This implementation is incomplete:\n * - Support for slices is not implemented.\n */\nexport function invert(\n\tchange: Changeset,\n\tisRollback: boolean,\n\tgenId: IdAllocator,\n\trevision: RevisionTag | undefined,\n\tcrossFieldManager: InvertNodeManager,\n): Changeset {\n\treturn invertMarkList(change, isRollback, crossFieldManager, revision);\n}\n\nfunction invertMarkList(\n\tmarkList: MarkList,\n\tisRollback: boolean,\n\tcrossFieldManager: InvertNodeManager,\n\trevision: RevisionTag | undefined,\n): MarkList {\n\tconst inverseMarkList = new MarkListFactory();\n\n\tfor (const mark of markList) {\n\t\tconst inverseMarks = invertMark(mark, isRollback, crossFieldManager, revision);\n\t\tinverseMarkList.push(...inverseMarks);\n\t}\n\n\treturn inverseMarkList.list;\n}\n\nfunction invertMark(\n\tmark: Mark,\n\tisRollback: boolean,\n\tcrossFieldManager: InvertNodeManager,\n\trevision: RevisionTag | undefined,\n): Mark[] {\n\tif (!isImpactful(mark)) {\n\t\tconst inputId = getInputCellId(mark);\n\t\treturn [invertNodeChangeOrSkip(mark.count, mark.changes, inputId)];\n\t}\n\tconst type = mark.type;\n\tswitch (type) {\n\t\tcase NoopMarkType: {\n\t\t\treturn [mark];\n\t\t}\n\t\tcase \"Rename\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x9f5 /* Rename mark must have cell ID */);\n\n\t\t\t// In older client versions, the ID of a detached root was the same as the ID of the cell it was last detached from.\n\t\t\t// To preserve compatibility with those versions, we must make sure that we do not rename the cell if we are not also\n\t\t\t// renaming the associated detached root, if there is one.\n\t\t\tif (isRollback) {\n\t\t\t\t// A rollback inverse inverts any associated root rename, so we should also invert the cell rename.\n\t\t\t\tconst inverse: Mutable<CellMark<Rename>> = {\n\t\t\t\t\ttype: \"Rename\",\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\tcellId: mark.idOverride,\n\t\t\t\t\t// Unlike a remove or move-out, which follow a node, there is no way for this mark to assign the original input cell ID to another cell.\n\t\t\t\t\t// This means it should be safe to always restore the input cell ID (as opposed to only doing it on rollbacks).\n\t\t\t\t\t// Despite that, we still only do it on rollback for the sake of consistency: once a cell has been assigned an ID,\n\t\t\t\t\t// the only way for that cell to be assigned that ID again is if it is rolled back to that state.\n\t\t\t\t\tidOverride: inputId,\n\t\t\t\t};\n\t\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t\t} else {\n\t\t\t\t// An undo does not invert root renames, so we should not invert cell renames.\n\t\t\t\treturn [invertNodeChangeOrSkip(mark.count, mark.changes, mark.idOverride)];\n\t\t\t}\n\t\t}\n\t\tcase \"Remove\": {\n\t\t\tassert(mark.revision !== undefined, 0x5a1 /* Unable to revert to undefined revision */);\n\t\t\tconst outputId = getOutputCellId(mark);\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId === undefined, \"Unexpected remove of detached node\");\n\n\t\t\tconst attachId = { revision: isRollback ? mark.revision : revision, localId: mark.id };\n\t\t\tcrossFieldManager.invertDetach(\n\t\t\t\t{ revision: mark.revision, localId: mark.id },\n\t\t\t\tmark.count,\n\t\t\t\tmark.changes,\n\t\t\t\tattachId,\n\t\t\t);\n\n\t\t\tconst inverse: Mark = {\n\t\t\t\ttype: \"Insert\",\n\t\t\t\tid: mark.id,\n\t\t\t\tcellId: outputId,\n\t\t\t\tcount: mark.count,\n\t\t\t\trevision: attachId.revision,\n\t\t\t};\n\t\t\treturn [inverse];\n\t\t}\n\t\tcase \"Insert\": {\n\t\t\treturn invertInsert(mark, revision, crossFieldManager, isRollback);\n\t\t}\n\t\tdefault:\n\t\t\tunreachableCase(type);\n\t}\n}\n\nfunction invertInsert(\n\tmark: CellMark<Attach>,\n\trevision: RevisionTag | undefined,\n\tmanager: InvertNodeManager,\n\tisRollback: boolean,\n): Mark[] {\n\tconst entry = manager.invertAttach(getAttachedRootId(mark), mark.count);\n\n\tif (entry.length < mark.count) {\n\t\tconst [mark1, mark2] = splitMark(mark, entry.length);\n\t\treturn [\n\t\t\tinvertInsertSegment(mark1, revision, isRollback, entry.value),\n\t\t\t...invertInsert(mark2, revision, manager, isRollback),\n\t\t];\n\t}\n\n\treturn [invertInsertSegment(mark, revision, isRollback, entry.value)];\n}\n\nfunction invertInsertSegment(\n\tmark: CellMark<Attach>,\n\trevision: RevisionTag | undefined,\n\tisRollback: boolean,\n\tdetachEntry: DetachedNodeEntry | undefined,\n): Mark {\n\tconst inputId = getInputCellId(mark);\n\tassert(inputId !== undefined, 0x80c /* Active inserts should target empty cells */);\n\n\tconst detachId = invertAttachId(getAttachedRootId(mark), revision, isRollback, detachEntry);\n\n\tconst removeMark: Mutable<CellMark<Detach>> = {\n\t\ttype: \"Remove\",\n\t\tcount: mark.count,\n\t\tid: detachId.localId,\n\t\trevision: detachId.revision,\n\t};\n\n\tif (isRollback && !areEqualCellIds(inputId, detachId)) {\n\t\tremoveMark.cellRename = inputId;\n\t}\n\n\tif (detachEntry?.nodeChange !== undefined) {\n\t\tremoveMark.changes = detachEntry.nodeChange;\n\t}\n\n\treturn removeMark;\n}\n\nfunction invertAttachId(\n\tattachId: ChangeAtomId,\n\trevision: RevisionTag | undefined,\n\tisRollback: boolean,\n\tdetachEntry: DetachedNodeEntry | undefined,\n): ChangeAtomId {\n\tif (!isRollback) {\n\t\treturn {\n\t\t\trevision,\n\t\t\tlocalId: attachId.localId,\n\t\t};\n\t}\n\n\tif (detachEntry?.detachId !== undefined) {\n\t\treturn detachEntry.detachId;\n\t}\n\n\treturn attachId;\n}\n\nfunction invertNodeChangeOrSkip(\n\tcount: number,\n\tchanges: NodeId | undefined,\n\tcellId?: CellId,\n): Mark {\n\tif (changes !== undefined) {\n\t\tassert(count === 1, 0x66c /* A modify mark must have length equal to one */);\n\t\tconst noop: CellMark<NoopMark> = {\n\t\t\tcount,\n\t\t\tchanges,\n\t\t};\n\t\tif (cellId !== undefined) {\n\t\t\tnoop.cellId = cellId;\n\t\t}\n\t\treturn noop;\n\t}\n\n\tif (cellId !== undefined) {\n\t\treturn { count, cellId };\n\t}\n\treturn { count };\n}\n"]}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { type
|
|
5
|
+
import { type NodeRangeQueryFunc } from "./moveEffectTable.js";
|
|
6
6
|
import type { Mark } from "./types.js";
|
|
7
7
|
export declare class MarkQueue {
|
|
8
8
|
private readonly list;
|
|
9
9
|
private readonly moveEffects;
|
|
10
10
|
private readonly stack;
|
|
11
11
|
private index;
|
|
12
|
-
constructor(list: readonly Mark[], moveEffects:
|
|
12
|
+
constructor(list: readonly Mark[], moveEffects: NodeRangeQueryFunc);
|
|
13
13
|
isEmpty(): boolean;
|
|
14
14
|
dequeue(): Mark;
|
|
15
15
|
tryDequeue(): Mark | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markQueue.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/markQueue.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"markQueue.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/markQueue.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,kBAAkB,EAA2B,MAAM,sBAAsB,CAAC;AACxF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,qBAAa,SAAS;IAKpB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAL7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;IACpC,OAAO,CAAC,KAAK,CAAK;gBAGA,IAAI,EAAE,SAAS,IAAI,EAAE,EACrB,WAAW,EAAE,kBAAkB;IAK1C,OAAO,IAAI,OAAO;IAIlB,OAAO,IAAI,IAAI;IAMf,UAAU,IAAI,IAAI,GAAG,SAAS;IAarC;;;;OAIG;IACI,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAWjC,IAAI,IAAI,IAAI,GAAG,SAAS;CAO/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markQueue.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/markQueue.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAkE;AAElE,
|
|
1
|
+
{"version":3,"file":"markQueue.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/markQueue.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAkE;AAElE,6DAAwF;AAExF,yCAAuC;AAEvC,MAAa,SAAS;IAIrB,YACkB,IAAqB,EACrB,WAA+B;QAD/B,SAAI,GAAJ,IAAI,CAAiB;QACrB,gBAAW,GAAX,WAAW,CAAoB;QALhC,UAAK,GAAW,EAAE,CAAC;QAC5B,UAAK,GAAG,CAAC,CAAC;QAMjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;IAEM,OAAO;QACb,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,SAAS,CAAC;IAClC,CAAC;IAEM,OAAO;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QACjC,IAAA,iBAAM,EAAC,MAAM,KAAK,SAAS,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACvE,OAAO,MAAM,CAAC;IACf,CAAC;IAEM,UAAU;QAChB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAChF,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,MAAM,UAAU,GAAG,IAAA,4CAAuB,EAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACnE,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAChD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,IAAA,cAAG,GAAE,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,MAAc;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAI,IAAI,CAAC,KAAK,IAAI,MAAM,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,IAAA,oBAAS,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,OAAO,KAAK,CAAC;IACd,CAAC;IAEM,IAAI;QACV,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AAzDD,8BAyDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, oob } from \"@fluidframework/core-utils/internal\";\n\nimport { type NodeRangeQueryFunc, splitMarkForMoveEffects } from \"./moveEffectTable.js\";\nimport type { Mark } from \"./types.js\";\nimport { splitMark } from \"./utils.js\";\n\nexport class MarkQueue {\n\tprivate readonly stack: Mark[] = [];\n\tprivate index = 0;\n\n\tpublic constructor(\n\t\tprivate readonly list: readonly Mark[],\n\t\tprivate readonly moveEffects: NodeRangeQueryFunc,\n\t) {\n\t\tthis.list = list;\n\t}\n\n\tpublic isEmpty(): boolean {\n\t\treturn this.peek() === undefined;\n\t}\n\n\tpublic dequeue(): Mark {\n\t\tconst output = this.tryDequeue();\n\t\tassert(output !== undefined, 0x4e2 /* Unexpected end of mark queue */);\n\t\treturn output;\n\t}\n\n\tpublic tryDequeue(): Mark | undefined {\n\t\tconst mark = this.stack.length > 0 ? this.stack.pop() : this.list[this.index++];\n\t\tif (mark === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst splitMarks = splitMarkForMoveEffects(mark, this.moveEffects);\n\t\tfor (let i = splitMarks.length - 1; i > 0; i--) {\n\t\t\tthis.stack.push(splitMarks[i] ?? oob());\n\t\t}\n\t\treturn splitMarks[0];\n\t}\n\n\t/**\n\t * Dequeues the first `length` sized portion of the next mark,\n\t * or the entire next mark if `length` is longer than the mark's length.\n\t * @param length - The length to dequeue, measured in the input context.\n\t */\n\tpublic dequeueUpTo(length: number): Mark {\n\t\tconst mark = this.dequeue();\n\t\tif (mark.count <= length) {\n\t\t\treturn mark;\n\t\t}\n\n\t\tconst [mark1, mark2] = splitMark(mark, length);\n\t\tthis.stack.push(mark2);\n\t\treturn mark1;\n\t}\n\n\tpublic peek(): Mark | undefined {\n\t\tconst mark = this.tryDequeue();\n\t\tif (mark !== undefined) {\n\t\t\tthis.stack.push(mark);\n\t\t}\n\t\treturn mark;\n\t}\n}\n"]}
|
|
@@ -2,63 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import type { ChangeAtomId, RevisionTag, TaggedChange } from "../../core/index.js";
|
|
6
|
-
import { type RangeQueryResult } from "../../util/index.js";
|
|
7
|
-
import { type CrossFieldManager, CrossFieldTarget, type NodeId } from "../modular-schema/index.js";
|
|
8
5
|
import type { MoveMarkEffect } from "./helperTypes.js";
|
|
9
|
-
import type {
|
|
10
|
-
export type MoveEffectTable = CrossFieldManager<MoveEffect>;
|
|
11
|
-
/**
|
|
12
|
-
* Changes to be applied to a move mark.
|
|
13
|
-
*/
|
|
14
|
-
export interface MoveEffect {
|
|
15
|
-
/**
|
|
16
|
-
* Node changes which should be applied to this mark.
|
|
17
|
-
* If this mark already has node changes, `modifyAfter` should be composed as later changes.
|
|
18
|
-
*/
|
|
19
|
-
modifyAfter?: NodeId;
|
|
20
|
-
/**
|
|
21
|
-
* Only used during rebasing.
|
|
22
|
-
* An effect from changeset being rebased which should be moved to the same position as this mark.
|
|
23
|
-
*/
|
|
24
|
-
movedEffect?: Detach;
|
|
25
|
-
/**
|
|
26
|
-
* Rebased changes for a node which has been moved to the position of this mark.
|
|
27
|
-
*/
|
|
28
|
-
rebasedChanges?: NodeId;
|
|
29
|
-
/**
|
|
30
|
-
* The ID of the other outer endpoint.
|
|
31
|
-
* Used when this is the outer endpoint in a move chain which is being composed with another move chain.
|
|
32
|
-
*/
|
|
33
|
-
endpoint?: ChangeAtomId;
|
|
34
|
-
/**
|
|
35
|
-
* The ID of the truncated endpoint.
|
|
36
|
-
* Used when this mark is the outer endpoint of a chain being composed with a redundant move chain.
|
|
37
|
-
*/
|
|
38
|
-
truncatedEndpoint?: ChangeAtomId;
|
|
39
|
-
/**
|
|
40
|
-
* The ID of the truncated endpoint.
|
|
41
|
-
* Used when this mark is the inner endpoint of a redundant move chain.
|
|
42
|
-
*/
|
|
43
|
-
truncatedEndpointForInner?: ChangeAtomId;
|
|
44
|
-
}
|
|
45
|
-
export declare enum MoveEnd {
|
|
46
|
-
Source = 0,
|
|
47
|
-
Dest = 1
|
|
48
|
-
}
|
|
49
|
-
export interface MovePartition {
|
|
50
|
-
id: MoveId;
|
|
51
|
-
count?: number;
|
|
52
|
-
replaceWith?: Mark[];
|
|
53
|
-
modifyAfter?: TaggedChange<NodeId>;
|
|
54
|
-
}
|
|
55
|
-
export declare function setMoveEffect(moveEffects: MoveEffectTable, target: CrossFieldTarget, revision: RevisionTag | undefined, id: MoveId, count: number, effect: MoveEffect, invalidate?: boolean): void;
|
|
56
|
-
export declare function getMoveEffect(moveEffects: MoveEffectTable, target: CrossFieldTarget, revision: RevisionTag | undefined, id: MoveId, count: number, addDependency?: boolean): RangeQueryResult<ChangeAtomId, MoveEffect>;
|
|
6
|
+
import type { Attach, CellMark, Mark, MarkEffect } from "./types.js";
|
|
57
7
|
export type MoveMark = CellMark<MoveMarkEffect>;
|
|
58
8
|
export declare function isMoveMark(effect: MarkEffect): effect is MoveMarkEffect;
|
|
59
|
-
export declare function
|
|
60
|
-
export
|
|
61
|
-
export declare function
|
|
62
|
-
export declare function splitMarkForMoveEffects(mark: Mark, effects: MoveEffectTable): Mark[];
|
|
63
|
-
export declare function getCrossFieldTargetFromMove(mark: MoveMarkEffect): CrossFieldTarget;
|
|
9
|
+
export declare function getAttach(effect: MarkEffect): Attach | undefined;
|
|
10
|
+
export type NodeRangeQueryFunc = (mark: Mark) => number;
|
|
11
|
+
export declare function splitMarkForMoveEffects(mark: Mark, getLength: NodeRangeQueryFunc): Mark[];
|
|
64
12
|
//# sourceMappingURL=moveEffectTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moveEffectTable.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/moveEffectTable.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"moveEffectTable.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/moveEffectTable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGrE,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;AAEhD,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,IAAI,cAAc,CAEvE;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAOhE;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;AAExD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI,EAAE,CAGzF"}
|