@fluidframework/tree 2.81.0-374083 → 2.81.1
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/CHANGELOG.md +57 -0
- package/api-report/tree.alpha.api.md +0 -1
- package/dist/codec/codec.d.ts +2 -2
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +8 -8
- 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 +12 -12
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/core/change-family/changeFamily.d.ts +1 -4
- 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 +4 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.d.ts +1 -6
- 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 +1 -2
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +1 -2
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +1 -5
- 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 +7 -25
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
- package/dist/core/schema-stored/formatV2.js +4 -4
- package/dist/core/schema-stored/formatV2.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +1 -1
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +0 -6
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +0 -9
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -3
- package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.js +2 -2
- package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.js +3 -3
- package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.js +4 -4
- package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/dist/core/tree/index.d.ts +1 -1
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +3 -4
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts +3 -11
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js +2 -14
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +1 -1
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js +1 -1
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/feature-libraries/changeAtomIdBTree.d.ts +3 -4
- package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
- package/dist/feature-libraries/changeAtomIdBTree.js +2 -16
- package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +0 -7
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -4
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +78 -245
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +25 -75
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +2 -3
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -5
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/dist/feature-libraries/deltaUtils.d.ts +0 -1
- package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
- package/dist/feature-libraries/deltaUtils.js +1 -6
- package/dist/feature-libraries/deltaUtils.js.map +1 -1
- package/dist/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
- package/dist/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
- package/dist/feature-libraries/fieldKindIdentifiers.js +16 -0
- package/dist/feature-libraries/fieldKindIdentifiers.js.map +1 -0
- package/dist/feature-libraries/flex-tree/context.d.ts +0 -9
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +0 -6
- 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 +7 -8
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +17 -48
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/observer.d.ts +1 -1
- package/dist/feature-libraries/flex-tree/observer.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/observer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +1 -1
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +3 -3
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV1.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV2.js.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +3 -3
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +3 -8
- 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 +0 -1
- 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/crossFieldQueries.d.ts +21 -97
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js +7 -4
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
- 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/fieldKindConfiguration.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +11 -5
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +4 -4
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +2 -2
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +162 -254
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +460 -1325
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js +3 -3
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +2 -2
- package/dist/feature-libraries/object-forest/objectForest.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 +4 -7
- package/dist/feature-libraries/optional-field/index.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts +34 -5
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +455 -221
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
- 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 +28 -57
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/optional-field/requiredField.d.ts +36 -0
- package/dist/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/requiredField.js +27 -0
- package/dist/feature-libraries/optional-field/requiredField.js.map +1 -0
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +7 -7
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
- package/dist/feature-libraries/schemaChecker.js +1 -1
- package/dist/feature-libraries/schemaChecker.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts +7 -6
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +259 -83
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
- 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 -13
- package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/index.js +3 -28
- 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 +167 -65
- 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 +56 -4
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.js +90 -7
- 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 +114 -107
- package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +50 -0
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
- package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.js +31 -18
- 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 +2 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +187 -365
- 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 +62 -20
- 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 +2 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
- package/dist/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
- package/dist/feature-libraries/sequence-field/sequenceKind.js +24 -0
- package/dist/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
- package/dist/feature-libraries/sequence-field/types.d.ts +59 -30
- 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 +24 -15
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +305 -116
- 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 +2 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +7 -7
- 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 +1 -2
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +5 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +39 -40
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +5 -11
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +5 -43
- 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 +0 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js +75 -58
- 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 +4 -10
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +7 -14
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/dist/shared-tree/tree.d.ts.map +1 -1
- package/dist/shared-tree/tree.js +14 -14
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +77 -77
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +29 -13
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +80 -79
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +3 -4
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +3 -4
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.d.ts +18 -31
- package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.js +24 -76
- package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/dist/shared-tree-core/branchIdCodec.d.ts.map +1 -1
- package/dist/shared-tree-core/branchIdCodec.js.map +1 -1
- package/dist/shared-tree-core/changeEnricher.d.ts +8 -43
- package/dist/shared-tree-core/changeEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/changeEnricher.js +0 -13
- package/dist/shared-tree-core/changeEnricher.js.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.js +26 -36
- package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts +3 -3
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +11 -11
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +1 -5
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +2 -10
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js +1 -2
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +0 -6
- 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 +0 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +4 -4
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +1 -5
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +2 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +2 -6
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +2 -10
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +0 -1
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +0 -6
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js +0 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
- package/dist/shared-tree-core/messageTypes.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +8 -5
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +14 -14
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/versionedSummarizer.js +1 -1
- package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +2 -2
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js +14 -14
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts +1 -1
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js +7 -7
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.d.ts +1 -1
- package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/dist/simple-tree/api/discrepancies.js +23 -23
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.js +1 -1
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/identifierIndex.d.ts +2 -2
- package/dist/simple-tree/api/identifierIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/identifierIndex.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 +6 -6
- package/dist/simple-tree/api/incrementalAllowedTypes.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 +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js +7 -7
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +2 -2
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +7 -7
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.js +1 -0
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaStatics.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.js +17 -17
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.d.ts +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.js +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +14 -14
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +2 -2
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/treeBeta.d.ts +1 -1
- package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/treeBeta.js +2 -2
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js +4 -4
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
- 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/api/verboseTree.d.ts +1 -1
- package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/verboseTree.js +22 -22
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/core/allowedTypes.js +7 -7
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/context.d.ts.map +1 -1
- package/dist/simple-tree/core/context.js.map +1 -1
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNode.js +1 -1
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +1 -3
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +5 -5
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.d.ts +3 -3
- package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.js +2 -2
- package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +8 -59
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/core/withType.d.ts.map +1 -1
- package/dist/simple-tree/core/withType.js.map +1 -1
- package/dist/simple-tree/createContext.d.ts.map +1 -1
- package/dist/simple-tree/createContext.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +5 -5
- 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 +2 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +1 -1
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +15 -15
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +47 -49
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
- 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 +2 -2
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +26 -26
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
- 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 +2 -2
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +28 -28
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
- 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 +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +36 -38
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
- 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 +47 -54
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +128 -186
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/treeSchema.d.ts.map +1 -1
- package/dist/simple-tree/treeSchema.js.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +22 -40
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +22 -21
- package/dist/tableSchema.js.map +1 -1
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.js +3 -1
- package/dist/text/index.js.map +1 -1
- package/dist/text/textDomain.d.ts +8 -0
- package/dist/text/textDomain.d.ts.map +1 -1
- package/dist/text/textDomain.js +2 -1
- package/dist/text/textDomain.js.map +1 -1
- package/dist/text/textDomainFormatted.d.ts +572 -0
- package/dist/text/textDomainFormatted.d.ts.map +1 -0
- package/dist/text/textDomainFormatted.js +183 -0
- package/dist/text/textDomainFormatted.js.map +1 -0
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +11 -21
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/bTreeUtils.d.ts.map +1 -1
- package/dist/util/bTreeUtils.js +1 -1
- package/dist/util/bTreeUtils.js.map +1 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +1 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/rangeMap.d.ts +12 -24
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +6 -46
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/readSnapshotBlob.d.ts +1 -1
- package/dist/util/readSnapshotBlob.d.ts.map +1 -1
- package/dist/util/readSnapshotBlob.js.map +1 -1
- package/docs/main/sequence-field/move-composition.md +46 -0
- package/eslint.config.mts +4 -4
- package/lib/codec/codec.d.ts +2 -2
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +1 -1
- 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 +2 -2
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/core/change-family/changeFamily.d.ts +1 -4
- 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 +1 -6
- 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 +1 -2
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +0 -3
- 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 +7 -25
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
- package/lib/core/schema-stored/formatV2.js +1 -1
- package/lib/core/schema-stored/formatV2.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +1 -1
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +0 -6
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +1 -10
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.js +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.js +2 -2
- package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV1.js +2 -2
- package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.js +2 -2
- package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/lib/core/tree/index.d.ts +1 -1
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +1 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts +3 -11
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js +1 -12
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +1 -1
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts.map +1 -1
- package/lib/core/tree/visitorUtils.js +1 -1
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/feature-libraries/changeAtomIdBTree.d.ts +3 -4
- package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
- package/lib/feature-libraries/changeAtomIdBTree.js +1 -14
- package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -8
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -4
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +73 -237
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +6 -56
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +2 -3
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -2
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/lib/feature-libraries/deltaUtils.d.ts +0 -1
- package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
- package/lib/feature-libraries/deltaUtils.js +1 -5
- package/lib/feature-libraries/deltaUtils.js.map +1 -1
- package/lib/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
- package/lib/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
- package/lib/feature-libraries/fieldKindIdentifiers.js +13 -0
- package/lib/feature-libraries/fieldKindIdentifiers.js.map +1 -0
- package/lib/feature-libraries/flex-tree/context.d.ts +0 -9
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +0 -6
- 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 +7 -8
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +11 -42
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/observer.d.ts +1 -1
- package/lib/feature-libraries/flex-tree/observer.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/observer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +1 -1
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +3 -3
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV1.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV2.js.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +3 -3
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +2 -2
- 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 +1 -2
- 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/crossFieldQueries.d.ts +21 -97
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js +5 -3
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
- 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/fieldKindConfiguration.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +11 -5
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +4 -4
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +2 -2
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +144 -246
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +463 -1319
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +2 -2
- package/lib/feature-libraries/object-forest/objectForest.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 +2 -2
- package/lib/feature-libraries/optional-field/index.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts +34 -5
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +453 -221
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
- 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 +26 -55
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/optional-field/requiredField.d.ts +36 -0
- package/lib/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/requiredField.js +24 -0
- package/lib/feature-libraries/optional-field/requiredField.js.map +1 -0
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
- package/lib/feature-libraries/schemaChecker.js +1 -1
- package/lib/feature-libraries/schemaChecker.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts +7 -6
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +261 -85
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
- 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 -13
- package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/index.js +1 -12
- 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 +169 -67
- 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 +56 -4
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.js +84 -6
- 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 +116 -109
- package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +46 -0
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
- package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/replaceRevisions.js +31 -18
- 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 +2 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +182 -356
- 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 +63 -21
- 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 +2 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
- package/lib/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
- package/lib/feature-libraries/sequence-field/sequenceKind.js +21 -0
- package/lib/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
- package/lib/feature-libraries/sequence-field/types.d.ts +59 -30
- 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 +24 -15
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +298 -112
- 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.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +3 -3
- 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 +2 -3
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +5 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +42 -43
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +5 -11
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +5 -43
- 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 +0 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +74 -56
- 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 +5 -11
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +6 -12
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/shared-tree/tree.d.ts.map +1 -1
- package/lib/shared-tree/tree.js +7 -7
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +3 -3
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +29 -13
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +55 -54
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +3 -4
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +3 -4
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.d.ts +18 -31
- package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.js +24 -76
- package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/lib/shared-tree-core/branchIdCodec.d.ts.map +1 -1
- package/lib/shared-tree-core/branchIdCodec.js.map +1 -1
- package/lib/shared-tree-core/changeEnricher.d.ts +8 -43
- package/lib/shared-tree-core/changeEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/changeEnricher.js +1 -11
- package/lib/shared-tree-core/changeEnricher.js.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.js +28 -38
- package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts +3 -3
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +11 -11
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +1 -5
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +1 -8
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js +1 -2
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +0 -6
- 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 +0 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +4 -4
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +2 -3
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js +2 -2
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +2 -6
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +1 -8
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +0 -1
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +0 -6
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js +0 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
- package/lib/shared-tree-core/messageTypes.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +8 -5
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +15 -15
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/versionedSummarizer.js +1 -1
- package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +2 -2
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js +4 -4
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts +1 -1
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js +1 -1
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.d.ts +1 -1
- package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/lib/simple-tree/api/discrepancies.js +3 -3
- package/lib/simple-tree/api/discrepancies.js.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.js +1 -1
- package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/identifierIndex.d.ts +2 -2
- package/lib/simple-tree/api/identifierIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/identifierIndex.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 +3 -3
- package/lib/simple-tree/api/incrementalAllowedTypes.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 +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +2 -2
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +2 -2
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js +1 -0
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaStatics.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.js +3 -3
- package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.d.ts +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.js +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +5 -5
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +2 -2
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/treeBeta.d.ts +1 -1
- package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/treeBeta.js +2 -2
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js +4 -4
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
- 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/api/verboseTree.d.ts +1 -1
- package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/verboseTree.js +3 -3
- package/lib/simple-tree/api/verboseTree.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/core/allowedTypes.js +2 -2
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/context.d.ts.map +1 -1
- package/lib/simple-tree/core/context.js.map +1 -1
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNode.js +1 -1
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +1 -3
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +5 -5
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.d.ts +3 -3
- package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.js +2 -2
- package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +8 -58
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/core/withType.d.ts.map +1 -1
- package/lib/simple-tree/core/withType.js.map +1 -1
- package/lib/simple-tree/createContext.d.ts.map +1 -1
- package/lib/simple-tree/createContext.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +5 -5
- 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 +2 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +2 -2
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +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 -8
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
- 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 +2 -2
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +8 -8
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
- 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 +2 -2
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +22 -22
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
- 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 +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +6 -8
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
- 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 +47 -54
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/lib/simple-tree/prepareForInsertion.js +125 -184
- package/lib/simple-tree/prepareForInsertion.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/treeSchema.d.ts.map +1 -1
- package/lib/simple-tree/treeSchema.js.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +13 -30
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +2 -1
- package/lib/tableSchema.js.map +1 -1
- package/lib/text/index.d.ts +1 -0
- package/lib/text/index.d.ts.map +1 -1
- package/lib/text/index.js +1 -0
- package/lib/text/index.js.map +1 -1
- package/lib/text/textDomain.d.ts +8 -0
- package/lib/text/textDomain.d.ts.map +1 -1
- package/lib/text/textDomain.js +1 -1
- package/lib/text/textDomain.js.map +1 -1
- package/lib/text/textDomainFormatted.d.ts +572 -0
- package/lib/text/textDomainFormatted.d.ts.map +1 -0
- package/lib/text/textDomainFormatted.js +180 -0
- package/lib/text/textDomainFormatted.js.map +1 -0
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +4 -14
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/bTreeUtils.d.ts.map +1 -1
- package/lib/util/bTreeUtils.js +1 -1
- package/lib/util/bTreeUtils.js.map +1 -1
- package/lib/util/index.d.ts +1 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +1 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/rangeMap.d.ts +12 -24
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +5 -44
- package/lib/util/rangeMap.js.map +1 -1
- package/lib/util/readSnapshotBlob.d.ts +1 -1
- package/lib/util/readSnapshotBlob.d.ts.map +1 -1
- package/lib/util/readSnapshotBlob.js.map +1 -1
- package/package.json +22 -22
- package/src/codec/codec.ts +10 -7
- package/src/codec/versioned/codec.ts +3 -3
- package/src/core/change-family/changeFamily.ts +0 -5
- package/src/core/change-family/index.ts +0 -1
- package/src/core/index.ts +1 -4
- package/src/core/rebase/changeRebaser.ts +1 -6
- package/src/core/rebase/index.ts +0 -1
- package/src/core/rebase/types.ts +1 -8
- package/src/core/rebase/utils.ts +7 -31
- package/src/core/schema-stored/formatV2.ts +2 -1
- package/src/core/tree/anchorSet.ts +1 -1
- package/src/core/tree/detachedFieldIndex.ts +2 -18
- package/src/core/tree/detachedFieldIndexCodecCommon.ts +2 -1
- package/src/core/tree/detachedFieldIndexCodecV1.ts +2 -2
- package/src/core/tree/detachedFieldIndexCodecV2.ts +3 -3
- package/src/core/tree/detachedFieldIndexFormatV1.ts +3 -2
- package/src/core/tree/detachedFieldIndexFormatV2.ts +3 -2
- package/src/core/tree/index.ts +1 -2
- package/src/core/tree/pathTree.ts +4 -16
- package/src/core/tree/visitDelta.ts +2 -3
- package/src/core/tree/visitorUtils.ts +2 -1
- package/src/feature-libraries/changeAtomIdBTree.ts +4 -28
- package/src/feature-libraries/chunked-forest/basicChunk.ts +1 -7
- package/src/feature-libraries/chunked-forest/chunkTree.ts +2 -7
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +2 -2
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/format.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/formatGeneric.ts +1 -0
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +3 -3
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +128 -405
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +27 -123
- package/src/feature-libraries/default-schema/index.ts +5 -22
- package/src/feature-libraries/default-schema/mappedEditBuilder.ts +9 -35
- package/src/feature-libraries/deltaUtils.ts +1 -6
- package/src/feature-libraries/fieldKindIdentifiers.ts +16 -0
- package/src/feature-libraries/flex-tree/context.ts +0 -17
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +8 -7
- package/src/feature-libraries/flex-tree/lazyField.ts +26 -69
- package/src/feature-libraries/flex-tree/observer.ts +3 -1
- package/src/feature-libraries/forest-summary/codec.ts +1 -1
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +6 -6
- package/src/feature-libraries/forest-summary/formatV1.ts +1 -0
- package/src/feature-libraries/forest-summary/formatV2.ts +1 -0
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +9 -7
- package/src/feature-libraries/forest-summary/summaryTypes.ts +1 -0
- package/src/feature-libraries/index.ts +8 -27
- package/src/feature-libraries/mapTreeCursor.ts +2 -3
- package/src/feature-libraries/mitigatedChangeFamily.ts +1 -3
- package/src/feature-libraries/modular-schema/crossFieldQueries.ts +44 -142
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +58 -32
- package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +1 -0
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +20 -8
- package/src/feature-libraries/modular-schema/index.ts +15 -16
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +336 -543
- package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +2 -2
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +3 -15
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +753 -2582
- package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +0 -1
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +8 -55
- package/src/feature-libraries/object-forest/objectForest.ts +2 -2
- package/src/feature-libraries/optional-field/index.ts +5 -5
- package/src/feature-libraries/optional-field/optionalField.ts +592 -317
- package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +38 -24
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +35 -89
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +1 -5
- package/src/feature-libraries/optional-field/requiredField.ts +62 -0
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +1 -1
- package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +1 -0
- package/src/feature-libraries/schemaChecker.ts +3 -2
- package/src/feature-libraries/sequence-field/compose.ts +522 -139
- package/src/feature-libraries/sequence-field/helperTypes.ts +19 -34
- package/src/feature-libraries/sequence-field/index.ts +2 -42
- package/src/feature-libraries/sequence-field/invert.ts +228 -103
- package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
- package/src/feature-libraries/sequence-field/moveEffectTable.ts +195 -8
- package/src/feature-libraries/sequence-field/rebase.ts +205 -169
- package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +57 -0
- package/src/feature-libraries/sequence-field/replaceRevisions.ts +47 -25
- package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +2 -0
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +228 -648
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +70 -56
- package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +27 -25
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +129 -19
- package/src/feature-libraries/sequence-field/sequenceKind.ts +40 -0
- package/src/feature-libraries/sequence-field/types.ts +64 -34
- package/src/feature-libraries/sequence-field/utils.ts +353 -139
- package/src/index.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +4 -3
- package/src/shared-tree/index.ts +2 -3
- package/src/shared-tree/schematizeTree.ts +8 -21
- package/src/shared-tree/schematizingTreeView.ts +79 -61
- package/src/shared-tree/sharedTree.ts +10 -64
- package/src/shared-tree/sharedTreeChangeCodecs.ts +2 -5
- package/src/shared-tree/sharedTreeChangeEnricher.ts +87 -68
- package/src/shared-tree/sharedTreeChangeFamily.ts +5 -15
- package/src/shared-tree/sharedTreeEditBuilder.ts +8 -39
- package/src/shared-tree/tree.ts +10 -10
- package/src/shared-tree/treeAlpha.ts +26 -25
- package/src/shared-tree/treeCheckout.ts +119 -94
- package/src/shared-tree-core/branch.ts +6 -12
- package/src/shared-tree-core/branchCommitEnricher.ts +25 -77
- package/src/shared-tree-core/branchIdCodec.ts +1 -0
- package/src/shared-tree-core/changeEnricher.ts +8 -52
- package/src/shared-tree-core/defaultResubmitMachine.ts +39 -51
- package/src/shared-tree-core/editManager.ts +8 -22
- package/src/shared-tree-core/editManagerCodecs.ts +3 -13
- package/src/shared-tree-core/editManagerCodecsCommons.ts +7 -6
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +1 -1
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +2 -2
- package/src/shared-tree-core/editManagerFormatCommons.ts +1 -6
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -3
- package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +3 -2
- package/src/shared-tree-core/index.ts +2 -7
- package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -5
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +4 -4
- package/src/shared-tree-core/messageCodecs.ts +3 -13
- package/src/shared-tree-core/messageFormat.ts +0 -6
- package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -3
- package/src/shared-tree-core/messageFormatVSharedBranches.ts +1 -0
- package/src/shared-tree-core/messageTypes.ts +1 -0
- package/src/shared-tree-core/sharedTreeCore.ts +27 -31
- package/src/shared-tree-core/versionedSummarizer.ts +3 -1
- package/src/simple-tree/api/configuration.ts +9 -9
- package/src/simple-tree/api/create.ts +7 -6
- package/src/simple-tree/api/dirtyIndex.ts +4 -2
- package/src/simple-tree/api/discrepancies.ts +9 -8
- package/src/simple-tree/api/getJsonSchema.ts +4 -3
- package/src/simple-tree/api/identifierIndex.ts +4 -2
- package/src/simple-tree/api/incrementalAllowedTypes.ts +6 -5
- package/src/simple-tree/api/schemaCompatibilityTester.ts +3 -3
- package/src/simple-tree/api/schemaCreationUtilities.ts +4 -3
- package/src/simple-tree/api/schemaFactory.ts +16 -17
- package/src/simple-tree/api/schemaFactoryAlpha.ts +21 -21
- package/src/simple-tree/api/schemaFactoryBeta.ts +17 -15
- package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -1
- package/src/simple-tree/api/schemaFromSimple.ts +1 -1
- package/src/simple-tree/api/schemaStatics.ts +2 -0
- package/src/simple-tree/api/simpleSchemaCodec.ts +12 -11
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +20 -18
- package/src/simple-tree/api/simpleTreeIndex.ts +6 -4
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +7 -5
- package/src/simple-tree/api/storedSchema.ts +2 -1
- package/src/simple-tree/api/tree.ts +2 -2
- package/src/simple-tree/api/treeBeta.ts +3 -3
- package/src/simple-tree/api/treeNodeApi.ts +14 -13
- package/src/simple-tree/api/typesUnsafe.ts +7 -8
- package/src/simple-tree/api/verboseTree.ts +6 -5
- package/src/simple-tree/core/allowedTypes.ts +4 -4
- package/src/simple-tree/core/context.ts +1 -1
- package/src/simple-tree/core/treeNode.ts +1 -1
- package/src/simple-tree/core/treeNodeKernel.ts +1 -3
- package/src/simple-tree/core/treeNodeSchema.ts +7 -6
- package/src/simple-tree/core/treeNodeValid.ts +9 -9
- package/src/simple-tree/core/unhydratedFlexTree.ts +37 -88
- package/src/simple-tree/core/withType.ts +3 -2
- package/src/simple-tree/createContext.ts +1 -0
- package/src/simple-tree/fieldSchema.ts +5 -8
- package/src/simple-tree/index.ts +1 -2
- package/src/simple-tree/leafNodeSchema.ts +3 -3
- package/src/simple-tree/node-kinds/array/arrayNode.ts +20 -21
- package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +2 -2
- package/src/simple-tree/node-kinds/common.ts +6 -3
- package/src/simple-tree/node-kinds/map/mapNode.ts +20 -19
- package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +2 -2
- package/src/simple-tree/node-kinds/object/objectNode.ts +37 -37
- package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +8 -7
- package/src/simple-tree/node-kinds/record/recordNode.ts +21 -22
- package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +1 -2
- package/src/simple-tree/prepareForInsertion.ts +205 -345
- package/src/simple-tree/simpleSchema.ts +1 -0
- package/src/simple-tree/treeSchema.ts +1 -0
- package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +16 -44
- package/src/tableSchema.ts +3 -1
- package/src/text/index.ts +1 -0
- package/src/text/textDomain.ts +1 -1
- package/src/text/textDomainFormatted.ts +309 -0
- package/src/treeFactory.ts +8 -18
- package/src/util/bTreeUtils.ts +1 -1
- package/src/util/index.ts +0 -3
- package/src/util/rangeMap.ts +18 -72
- package/src/util/readSnapshotBlob.ts +4 -2
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -132
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -393
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -32
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -31
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -57
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
- package/dist/shared-tree-core/transactionEnricher.d.ts +0 -23
- package/dist/shared-tree-core/transactionEnricher.d.ts.map +0 -1
- package/dist/shared-tree-core/transactionEnricher.js +0 -74
- package/dist/shared-tree-core/transactionEnricher.js.map +0 -1
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -128
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -389
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -29
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -27
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -53
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
- package/lib/shared-tree-core/transactionEnricher.d.ts +0 -23
- package/lib/shared-tree-core/transactionEnricher.d.ts.map +0 -1
- package/lib/shared-tree-core/transactionEnricher.js +0 -70
- package/lib/shared-tree-core/transactionEnricher.js.map +0 -1
- package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +0 -188
- package/src/feature-libraries/modular-schema/modularChangeCodecV3.ts +0 -760
- package/src/feature-libraries/modular-schema/modularChangeFormatV3.ts +0 -62
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV3.ts +0 -45
- package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +0 -94
- package/src/shared-tree-core/transactionEnricher.ts +0 -74
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
6
|
-
import { rootFieldKey, makeDetachedNodeId, } from "../../core/index.js";
|
|
7
|
-
/**
|
|
8
|
-
* Implementation of {@link DataEditor} based on the default set of supported field kinds.
|
|
9
|
-
* @sealed
|
|
10
|
-
*/
|
|
11
|
-
export class LocationBasedDataEditor {
|
|
12
|
-
constructor(idBasedEditor, locator) {
|
|
13
|
-
this.idBasedEditor = idBasedEditor;
|
|
14
|
-
this.locator = locator;
|
|
15
|
-
}
|
|
16
|
-
addNodeExistsConstraint(path) {
|
|
17
|
-
const normal = normalizeUpPath(path, this.locator);
|
|
18
|
-
this.idBasedEditor.addNodeExistsConstraint(normal);
|
|
19
|
-
}
|
|
20
|
-
addNodeExistsConstraintOnRevert(path) {
|
|
21
|
-
const normal = normalizeUpPath(path, this.locator);
|
|
22
|
-
this.idBasedEditor.addNodeExistsConstraintOnRevert(normal);
|
|
23
|
-
}
|
|
24
|
-
addNoChangeConstraint() {
|
|
25
|
-
this.idBasedEditor.addNoChangeConstraint();
|
|
26
|
-
}
|
|
27
|
-
addNoChangeConstraintOnRevert() {
|
|
28
|
-
this.idBasedEditor.addNoChangeConstraintOnRevert();
|
|
29
|
-
}
|
|
30
|
-
buildRoots(content) {
|
|
31
|
-
const roots = this.idBasedEditor.buildRoots(content);
|
|
32
|
-
const locations = this.locator.locationsFromIdRanges(roots);
|
|
33
|
-
return locations;
|
|
34
|
-
}
|
|
35
|
-
valueField(field) {
|
|
36
|
-
const normal = normalizeFieldUpPath(field, this.locator);
|
|
37
|
-
const lowLevelEditor = this.idBasedEditor.valueField(normal);
|
|
38
|
-
const locator = this.locator;
|
|
39
|
-
const editBuilder = {
|
|
40
|
-
set: (newContent) => {
|
|
41
|
-
lowLevelEditor.set(newContent);
|
|
42
|
-
},
|
|
43
|
-
attach: (newContent) => {
|
|
44
|
-
const changeAtom = locator.idFromLocation(newContent);
|
|
45
|
-
lowLevelEditor.attach(changeAtom);
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
return editBuilder;
|
|
49
|
-
}
|
|
50
|
-
optionalField(field) {
|
|
51
|
-
const normal = normalizeFieldUpPath(field, this.locator);
|
|
52
|
-
const lowLevelEditor = this.idBasedEditor.optionalField(normal);
|
|
53
|
-
const locator = this.locator;
|
|
54
|
-
const editBuilder = {
|
|
55
|
-
set: (newContent, wasEmpty) => {
|
|
56
|
-
lowLevelEditor.set(newContent, wasEmpty);
|
|
57
|
-
},
|
|
58
|
-
attach: (newContent, wasEmpty) => {
|
|
59
|
-
if (newContent === undefined) {
|
|
60
|
-
editBuilder.clear(wasEmpty);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
const changeAtom = locator.idFromLocation(newContent);
|
|
64
|
-
lowLevelEditor.attach(changeAtom, wasEmpty);
|
|
65
|
-
},
|
|
66
|
-
clear: (wasEmpty) => {
|
|
67
|
-
lowLevelEditor.clear(wasEmpty);
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
return editBuilder;
|
|
71
|
-
}
|
|
72
|
-
move(sourceField, sourceIndex, count, destinationField, destIndex) {
|
|
73
|
-
const normalSource = normalizeFieldUpPath(sourceField, this.locator);
|
|
74
|
-
const normalDestination = normalizeFieldUpPath(destinationField, this.locator);
|
|
75
|
-
this.idBasedEditor.move(normalSource, sourceIndex, count, normalDestination, destIndex);
|
|
76
|
-
}
|
|
77
|
-
sequenceField(field) {
|
|
78
|
-
const normal = normalizeFieldUpPath(field, this.locator);
|
|
79
|
-
const lowLevelEditor = this.idBasedEditor.sequenceField(normal);
|
|
80
|
-
const locator = this.locator;
|
|
81
|
-
const editBuilder = {
|
|
82
|
-
insert: (index, content) => {
|
|
83
|
-
lowLevelEditor.insert(index, content);
|
|
84
|
-
},
|
|
85
|
-
attach: (index, newContent) => {
|
|
86
|
-
const range = locator.idRangesFromLocations(newContent);
|
|
87
|
-
lowLevelEditor.attach(index, range);
|
|
88
|
-
},
|
|
89
|
-
remove: (index, count) => {
|
|
90
|
-
lowLevelEditor.remove(index, count);
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
return editBuilder;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
function normalizeUpPath(path, locator) {
|
|
97
|
-
if (path.parent === undefined) {
|
|
98
|
-
if (path.parentField === rootFieldKey) {
|
|
99
|
-
return { ...path, parent: undefined, detachedNodeId: undefined };
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
const nodeId = locator.idFromLocation(path.parentField);
|
|
103
|
-
const detachedNodeId = makeDetachedNodeId(nodeId.revision, nodeId.localId);
|
|
104
|
-
return { ...path, parent: undefined, detachedNodeId };
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
return {
|
|
109
|
-
parent: normalizeUpPath(path.parent, locator),
|
|
110
|
-
parentField: path.parentField,
|
|
111
|
-
parentIndex: path.parentIndex,
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
function normalizeFieldUpPath(path, locator) {
|
|
116
|
-
if (path.parent === undefined) {
|
|
117
|
-
if (path.field === rootFieldKey) {
|
|
118
|
-
return { parent: undefined, field: rootFieldKey };
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
throw new UsageError("Editing only allowed on the root field or on fields under nodes with TreeStatus.InDocument or TreeStatus.Removed status");
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
return { parent: normalizeUpPath(path.parent, locator), field: path.field };
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
//# sourceMappingURL=locationBasedEditBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locationBasedEditBuilder.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/locationBasedEditBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAQN,YAAY,EACZ,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AA8B7B;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAGnC,YACkB,aAAmE,EACnE,OAAgB;QADhB,kBAAa,GAAb,aAAa,CAAsD;QACnE,YAAO,GAAP,OAAO,CAAS;IAC/B,CAAC;IAEG,uBAAuB,CAAC,IAAY;QAC1C,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;IAEM,+BAA+B,CAAC,IAAY;QAClD,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,aAAa,CAAC,+BAA+B,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;IAEM,qBAAqB;QAC3B,IAAI,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;IAC5C,CAAC;IAEM,6BAA6B;QACnC,IAAI,CAAC,aAAa,CAAC,6BAA6B,EAAE,CAAC;IACpD,CAAC;IAEM,UAAU,CAAC,OAAkB;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAA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ACP,OAAO,EAAE,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IAC7E,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport {\n\ttype ChangeAtomId,\n\ttype FieldKey,\n\ttype FieldUpPath,\n\ttype UpPath,\n\ttype TreeChunk,\n\ttype NormalizedUpPath,\n\ttype NormalizedFieldUpPath,\n\trootFieldKey,\n\tmakeDetachedNodeId,\n} from \"../../core/index.js\";\n\nimport type {\n\tDetachedRootIds,\n\tDataEditor,\n\tOptionalFieldEditor,\n\tRequiredFieldEditor,\n\tSequenceFieldEditor,\n} from \"./defaultEditBuilder.js\";\n\nexport type DetachedRootLocation = FieldKey;\nexport type DetachedRootsLocation = readonly DetachedRootRangeLocation[];\nexport interface DetachedRootRangeLocation {\n\treadonly field: FieldKey;\n\treadonly count: number;\n}\n\nexport interface Locator {\n\tlocationFromId(id: ChangeAtomId): DetachedRootLocation;\n\tidFromLocation(id: DetachedRootLocation): ChangeAtomId;\n\tlocationsFromIdRanges(id: DetachedRootIds): DetachedRootsLocation;\n\tidRangesFromLocations(id: DetachedRootsLocation): DetachedRootIds;\n}\n\nexport type ILocationBasedDataEditor = DataEditor<\n\tTreeChunk,\n\tDetachedRootLocation,\n\tDetachedRootsLocation\n>;\n\n/**\n * Implementation of {@link DataEditor} based on the default set of supported field kinds.\n * @sealed\n */\nexport class LocationBasedDataEditor\n\timplements DataEditor<TreeChunk, DetachedRootLocation, DetachedRootsLocation>\n{\n\tpublic constructor(\n\t\tprivate readonly idBasedEditor: DataEditor<TreeChunk, ChangeAtomId, DetachedRootIds>,\n\t\tprivate readonly locator: Locator,\n\t) {}\n\n\tpublic addNodeExistsConstraint(path: UpPath): void {\n\t\tconst normal = normalizeUpPath(path, this.locator);\n\t\tthis.idBasedEditor.addNodeExistsConstraint(normal);\n\t}\n\n\tpublic addNodeExistsConstraintOnRevert(path: UpPath): void {\n\t\tconst normal = normalizeUpPath(path, this.locator);\n\t\tthis.idBasedEditor.addNodeExistsConstraintOnRevert(normal);\n\t}\n\n\tpublic addNoChangeConstraint(): void {\n\t\tthis.idBasedEditor.addNoChangeConstraint();\n\t}\n\n\tpublic addNoChangeConstraintOnRevert(): void {\n\t\tthis.idBasedEditor.addNoChangeConstraintOnRevert();\n\t}\n\n\tpublic buildRoots(content: TreeChunk): DetachedRootsLocation {\n\t\tconst roots = this.idBasedEditor.buildRoots(content);\n\t\tconst locations = this.locator.locationsFromIdRanges(roots);\n\t\treturn locations;\n\t}\n\n\tpublic valueField(field: FieldUpPath): RequiredFieldEditor<TreeChunk, DetachedRootLocation> {\n\t\tconst normal = normalizeFieldUpPath(field, this.locator);\n\t\tconst lowLevelEditor = this.idBasedEditor.valueField(normal);\n\t\tconst locator = this.locator;\n\t\tconst editBuilder = {\n\t\t\tset: (newContent: TreeChunk): void => {\n\t\t\t\tlowLevelEditor.set(newContent);\n\t\t\t},\n\t\t\tattach: (newContent: DetachedRootLocation): void => {\n\t\t\t\tconst changeAtom = locator.idFromLocation(newContent);\n\t\t\t\tlowLevelEditor.attach(changeAtom);\n\t\t\t},\n\t\t};\n\t\treturn editBuilder;\n\t}\n\n\tpublic optionalField(\n\t\tfield: FieldUpPath,\n\t): OptionalFieldEditor<TreeChunk, DetachedRootLocation> {\n\t\tconst normal = normalizeFieldUpPath(field, this.locator);\n\t\tconst lowLevelEditor = this.idBasedEditor.optionalField(normal);\n\t\tconst locator = this.locator;\n\t\tconst editBuilder = {\n\t\t\tset: (newContent: TreeChunk | undefined, wasEmpty: boolean): void => {\n\t\t\t\tlowLevelEditor.set(newContent, wasEmpty);\n\t\t\t},\n\t\t\tattach: (newContent: DetachedRootLocation | undefined, wasEmpty: boolean): void => {\n\t\t\t\tif (newContent === undefined) {\n\t\t\t\t\teditBuilder.clear(wasEmpty);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst changeAtom = locator.idFromLocation(newContent);\n\t\t\t\tlowLevelEditor.attach(changeAtom, wasEmpty);\n\t\t\t},\n\t\t\tclear: (wasEmpty: boolean): void => {\n\t\t\t\tlowLevelEditor.clear(wasEmpty);\n\t\t\t},\n\t\t};\n\t\treturn editBuilder;\n\t}\n\n\tpublic move(\n\t\tsourceField: FieldUpPath,\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestinationField: FieldUpPath,\n\t\tdestIndex: number,\n\t): void {\n\t\tconst normalSource = normalizeFieldUpPath(sourceField, this.locator);\n\t\tconst normalDestination = normalizeFieldUpPath(destinationField, this.locator);\n\t\tthis.idBasedEditor.move(normalSource, sourceIndex, count, normalDestination, destIndex);\n\t}\n\n\tpublic sequenceField(\n\t\tfield: FieldUpPath,\n\t): SequenceFieldEditor<TreeChunk, DetachedRootsLocation> {\n\t\tconst normal = normalizeFieldUpPath(field, this.locator);\n\t\tconst lowLevelEditor = this.idBasedEditor.sequenceField(normal);\n\t\tconst locator = this.locator;\n\t\tconst editBuilder = {\n\t\t\tinsert: (index: number, content: TreeChunk): void => {\n\t\t\t\tlowLevelEditor.insert(index, content);\n\t\t\t},\n\t\t\tattach: (index: number, newContent: DetachedRootsLocation): void => {\n\t\t\t\tconst range = locator.idRangesFromLocations(newContent);\n\t\t\t\tlowLevelEditor.attach(index, range);\n\t\t\t},\n\t\t\tremove: (index: number, count: number): void => {\n\t\t\t\tlowLevelEditor.remove(index, count);\n\t\t\t},\n\t\t};\n\t\treturn editBuilder;\n\t}\n}\n\nfunction normalizeUpPath(path: UpPath, locator: Locator): NormalizedUpPath {\n\tif (path.parent === undefined) {\n\t\tif (path.parentField === rootFieldKey) {\n\t\t\treturn { ...path, parent: undefined, detachedNodeId: undefined };\n\t\t} else {\n\t\t\tconst nodeId = locator.idFromLocation(path.parentField);\n\t\t\tconst detachedNodeId = makeDetachedNodeId(nodeId.revision, nodeId.localId);\n\t\t\treturn { ...path, parent: undefined, detachedNodeId };\n\t\t}\n\t} else {\n\t\treturn {\n\t\t\tparent: normalizeUpPath(path.parent, locator),\n\t\t\tparentField: path.parentField,\n\t\t\tparentIndex: path.parentIndex,\n\t\t};\n\t}\n}\n\nfunction normalizeFieldUpPath(path: FieldUpPath, locator: Locator): NormalizedFieldUpPath {\n\tif (path.parent === undefined) {\n\t\tif (path.field === rootFieldKey) {\n\t\t\treturn { parent: undefined, field: rootFieldKey };\n\t\t} else {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Editing only allowed on the root field or on fields under nodes with TreeStatus.InDocument or TreeStatus.Removed status\",\n\t\t\t);\n\t\t}\n\t} else {\n\t\treturn { parent: normalizeUpPath(path.parent, locator), field: path.field };\n\t}\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { type ICodecOptions, type IJsonCodec } from "../../codec/index.js";
|
|
6
|
-
import { type ChangeEncodingContext, type EncodedRevisionTag, type RevisionTag } from "../../core/index.js";
|
|
7
|
-
import { type FieldBatchCodec } from "../chunked-forest/index.js";
|
|
8
|
-
import { TreeCompressionStrategy } from "../treeCompressionUtils.js";
|
|
9
|
-
import type { FieldKindConfiguration } from "./fieldKindConfiguration.js";
|
|
10
|
-
import { type ModularChangeset } from "./modularChangeTypes.js";
|
|
11
|
-
import { EncodedModularChangeset } from "./modularChangeFormatV3.js";
|
|
12
|
-
type ModularChangeCodec = IJsonCodec<ModularChangeset, EncodedModularChangeset, EncodedModularChangeset, ChangeEncodingContext>;
|
|
13
|
-
export declare function makeModularChangeCodecV3(fieldKinds: FieldKindConfiguration, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, fieldsCodec: FieldBatchCodec, codecOptions: ICodecOptions, chunkCompressionStrategy?: TreeCompressionStrategy): ModularChangeCodec;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=modularChangeCodecV3.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeCodecV3.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecV3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,UAAU,EAGf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAIN,KAAK,qBAAqB,EAE1B,KAAK,kBAAkB,EAKvB,KAAK,WAAW,EAChB,MAAM,qBAAqB,CAAC;AAY7B,OAAO,EAGN,KAAK,eAAe,EAEpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAQ1E,OAAO,EAMN,KAAK,gBAAgB,EAKrB,MAAM,yBAAyB,CAAC;AAYjC,OAAO,EACN,uBAAuB,EAGvB,MAAM,4BAA4B,CAAC;AAKpC,KAAK,kBAAkB,GAAG,UAAU,CACnC,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,CACrB,CAAC;AASF,wBAAgB,wBAAwB,CACvC,UAAU,EAAE,sBAAsB,EAClC,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,WAAW,EAAE,eAAe,EAC5B,YAAY,EAAE,aAAa,EAC3B,wBAAwB,GAAE,uBAA4D,GACpF,kBAAkB,CA0jBpB"}
|
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { assert, fail, oob } from "@fluidframework/core-utils/internal";
|
|
6
|
-
import { withSchemaValidation, } from "../../codec/index.js";
|
|
7
|
-
import { newChangeAtomIdTransform, } from "../../core/index.js";
|
|
8
|
-
import { brand, idAllocatorFromMaxId, newTupleBTree, } from "../../util/index.js";
|
|
9
|
-
import { chunkFieldSingle, defaultChunkPolicy, } from "../chunked-forest/index.js";
|
|
10
|
-
import { TreeCompressionStrategy } from "../treeCompressionUtils.js";
|
|
11
|
-
import { addNodeRename, getFirstAttachField, getFirstDetachField, newRootTable, } from "./modularChangeFamily.js";
|
|
12
|
-
import { newCrossFieldRangeTable, } from "./modularChangeTypes.js";
|
|
13
|
-
import { genericFieldKind } from "./genericFieldKind.js";
|
|
14
|
-
import { EncodedModularChangeset, } from "./modularChangeFormatV3.js";
|
|
15
|
-
import { makeChangeAtomIdCodec } from "../changeAtomIdCodec.js";
|
|
16
|
-
import { setInChangeAtomIdMap } from "../changeAtomIdBTree.js";
|
|
17
|
-
import { getFieldChangesetCodecs } from "./modularChangeCodecV1.js";
|
|
18
|
-
export function makeModularChangeCodecV3(fieldKinds, revisionTagCodec, fieldsCodec, codecOptions, chunkCompressionStrategy = TreeCompressionStrategy.Compressed) {
|
|
19
|
-
const fieldChangesetCodecs = getFieldChangesetCodecs(fieldKinds, revisionTagCodec, codecOptions);
|
|
20
|
-
const getFieldChangesetCodec = (fieldKind) => {
|
|
21
|
-
const entry = fieldChangesetCodecs.get(fieldKind);
|
|
22
|
-
assert(entry !== undefined, "Tried to encode unsupported fieldKind");
|
|
23
|
-
return entry;
|
|
24
|
-
};
|
|
25
|
-
const changeAtomIdCodec = makeChangeAtomIdCodec(revisionTagCodec);
|
|
26
|
-
function encodeFieldChangesForJson(change, parentId, fieldToRoots, context, encodeNode, getInputDetachId, isAttachId, isDetachId) {
|
|
27
|
-
const encodedFields = [];
|
|
28
|
-
for (const [field, fieldChange] of change) {
|
|
29
|
-
const { codec, compiledSchema } = getFieldChangesetCodec(fieldChange.fieldKind);
|
|
30
|
-
const rootChanges = fieldToRoots.get([parentId?.revision, parentId?.localId, field]);
|
|
31
|
-
const fieldContext = {
|
|
32
|
-
baseContext: context,
|
|
33
|
-
rootNodeChanges: rootChanges?.nodeChanges ?? newTupleBTree(),
|
|
34
|
-
rootRenames: rootChanges?.renames ?? newChangeAtomIdTransform(),
|
|
35
|
-
encodeNode,
|
|
36
|
-
getInputRootId: getInputDetachId,
|
|
37
|
-
isAttachId,
|
|
38
|
-
isDetachId,
|
|
39
|
-
decodeNode: () => fail(0xb1e /* Should not decode nodes during field encoding */),
|
|
40
|
-
decodeRootNodeChange: () => fail("Should not be called during encoding"),
|
|
41
|
-
decodeRootRename: () => fail("Should not be called during encoding"),
|
|
42
|
-
decodeMoveAndDetach: () => fail("Should not be called during encoding"),
|
|
43
|
-
generateId: () => fail("Should not be called during encoding"),
|
|
44
|
-
};
|
|
45
|
-
const encodedChange = codec.json.encode(fieldChange.change, fieldContext);
|
|
46
|
-
if (compiledSchema !== undefined && !compiledSchema.check(encodedChange)) {
|
|
47
|
-
fail(0xb1f /* Encoded change didn't pass schema validation. */);
|
|
48
|
-
}
|
|
49
|
-
const fieldKey = field;
|
|
50
|
-
const encodedField = {
|
|
51
|
-
fieldKey,
|
|
52
|
-
fieldKind: fieldChange.fieldKind,
|
|
53
|
-
change: encodedChange,
|
|
54
|
-
};
|
|
55
|
-
encodedFields.push(encodedField);
|
|
56
|
-
}
|
|
57
|
-
return encodedFields;
|
|
58
|
-
}
|
|
59
|
-
function encodeNodeChangesForJson(change, id, fieldToRoots, context, encodeNode, getInputDetachId, isAttachId, isDetachId) {
|
|
60
|
-
const encodedChange = {};
|
|
61
|
-
// Note: revert constraints are ignored for now because they would only be needed if we supported reverting changes made by peers.
|
|
62
|
-
const { fieldChanges, nodeExistsConstraint } = change;
|
|
63
|
-
if (fieldChanges !== undefined) {
|
|
64
|
-
encodedChange.fieldChanges = encodeFieldChangesForJson(fieldChanges, id, fieldToRoots, context, encodeNode, getInputDetachId, isAttachId, isDetachId);
|
|
65
|
-
}
|
|
66
|
-
if (nodeExistsConstraint !== undefined) {
|
|
67
|
-
encodedChange.nodeExistsConstraint = nodeExistsConstraint;
|
|
68
|
-
}
|
|
69
|
-
return encodedChange;
|
|
70
|
-
}
|
|
71
|
-
function encodeRootNodesForJson(roots, context, encodeNode) {
|
|
72
|
-
const encoded = [];
|
|
73
|
-
for (const [[revision, localId], nodeId] of roots.entries()) {
|
|
74
|
-
encoded.push({
|
|
75
|
-
detachId: changeAtomIdCodec.encode({ revision, localId }, context),
|
|
76
|
-
nodeChangeset: encodeNode(nodeId),
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
return encoded;
|
|
80
|
-
}
|
|
81
|
-
function encodeRenamesForJson(renames, context) {
|
|
82
|
-
const encoded = [];
|
|
83
|
-
for (const entry of renames.entries()) {
|
|
84
|
-
encoded.push({
|
|
85
|
-
oldId: changeAtomIdCodec.encode(entry.start, context),
|
|
86
|
-
newId: changeAtomIdCodec.encode(entry.value, context),
|
|
87
|
-
count: entry.length,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
return encoded;
|
|
91
|
-
}
|
|
92
|
-
function decodeFieldChangesFromJson(encodedChange, parentId, decodedCrossFieldKeys, context, decodeNode, idAllocator) {
|
|
93
|
-
const decodedFields = new Map();
|
|
94
|
-
for (const field of encodedChange) {
|
|
95
|
-
const { codec, compiledSchema } = getFieldChangesetCodec(field.fieldKind);
|
|
96
|
-
if (compiledSchema !== undefined && !compiledSchema.check(field.change)) {
|
|
97
|
-
fail(0xb20 /* Encoded change didn't pass schema validation. */);
|
|
98
|
-
}
|
|
99
|
-
const fieldId = {
|
|
100
|
-
nodeId: parentId,
|
|
101
|
-
field: field.fieldKey,
|
|
102
|
-
};
|
|
103
|
-
const fieldContext = {
|
|
104
|
-
baseContext: context,
|
|
105
|
-
rootNodeChanges: newTupleBTree(),
|
|
106
|
-
rootRenames: newChangeAtomIdTransform(),
|
|
107
|
-
encodeNode: () => fail(0xb21 /* Should not encode nodes during field decoding */),
|
|
108
|
-
getInputRootId: () => fail("Should not query during decoding"),
|
|
109
|
-
isAttachId: () => fail("Should not query during decoding"),
|
|
110
|
-
isDetachId: () => fail("Should not query during decoding"),
|
|
111
|
-
decodeNode: (encodedNode) => decodeNode(encodedNode, { field: fieldId }),
|
|
112
|
-
decodeRootNodeChange: (detachId, encodedNode) => { },
|
|
113
|
-
decodeRootRename: (oldId, newId, count) => { },
|
|
114
|
-
decodeMoveAndDetach: (detachId, count) => { },
|
|
115
|
-
generateId: () => ({
|
|
116
|
-
revision: context.revision,
|
|
117
|
-
localId: brand(idAllocator.allocate()),
|
|
118
|
-
}),
|
|
119
|
-
};
|
|
120
|
-
const fieldChangeset = codec.json.decode(field.change, fieldContext);
|
|
121
|
-
const crossFieldKeys = getChangeHandler(fieldKinds, field.fieldKind).getCrossFieldKeys(fieldChangeset);
|
|
122
|
-
for (const { key, count } of crossFieldKeys) {
|
|
123
|
-
decodedCrossFieldKeys.set(key, count, fieldId);
|
|
124
|
-
}
|
|
125
|
-
const fieldKey = brand(field.fieldKey);
|
|
126
|
-
decodedFields.set(fieldKey, {
|
|
127
|
-
fieldKind: field.fieldKind,
|
|
128
|
-
change: brand(fieldChangeset),
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
return decodedFields;
|
|
132
|
-
}
|
|
133
|
-
function decodeNodeChangesetFromJson(encodedChange, id, decodedCrossFieldKeys, decodedRootTable, context, decodeNode, idAllocator) {
|
|
134
|
-
const decodedChange = {};
|
|
135
|
-
const { fieldChanges, nodeExistsConstraint } = encodedChange;
|
|
136
|
-
if (fieldChanges !== undefined) {
|
|
137
|
-
decodedChange.fieldChanges = decodeFieldChangesFromJson(fieldChanges, id, decodedCrossFieldKeys, context, decodeNode, idAllocator);
|
|
138
|
-
}
|
|
139
|
-
if (nodeExistsConstraint !== undefined) {
|
|
140
|
-
decodedChange.nodeExistsConstraint = nodeExistsConstraint;
|
|
141
|
-
}
|
|
142
|
-
return decodedChange;
|
|
143
|
-
}
|
|
144
|
-
function encodeDetachedNodes(detachedNodes, context) {
|
|
145
|
-
if (detachedNodes === undefined) {
|
|
146
|
-
return undefined;
|
|
147
|
-
}
|
|
148
|
-
const treesToEncode = [];
|
|
149
|
-
const buildsArray = [];
|
|
150
|
-
let buildsForRevision;
|
|
151
|
-
for (const [[revision, id], chunk] of detachedNodes.entries()) {
|
|
152
|
-
const encodedRevision = encodeRevisionOpt(revisionTagCodec, revision, context);
|
|
153
|
-
if (buildsForRevision === undefined || buildsForRevision[1] !== encodedRevision) {
|
|
154
|
-
if (buildsForRevision !== undefined) {
|
|
155
|
-
buildsArray.push(buildsForRevision);
|
|
156
|
-
}
|
|
157
|
-
buildsForRevision = encodedRevision === undefined ? [[]] : [[], encodedRevision];
|
|
158
|
-
}
|
|
159
|
-
treesToEncode.push(chunk.cursor());
|
|
160
|
-
const treeIndexInBatch = treesToEncode.length - 1;
|
|
161
|
-
buildsForRevision?.[0].push([id, treeIndexInBatch]);
|
|
162
|
-
}
|
|
163
|
-
if (buildsForRevision !== undefined) {
|
|
164
|
-
buildsArray.push(buildsForRevision);
|
|
165
|
-
}
|
|
166
|
-
return buildsArray.length === 0
|
|
167
|
-
? undefined
|
|
168
|
-
: {
|
|
169
|
-
builds: buildsArray,
|
|
170
|
-
trees: fieldsCodec.encode(treesToEncode, {
|
|
171
|
-
encodeType: chunkCompressionStrategy,
|
|
172
|
-
schema: context.schema,
|
|
173
|
-
originatorId: context.originatorId,
|
|
174
|
-
idCompressor: context.idCompressor,
|
|
175
|
-
}),
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
function decodeDetachedNodes(encoded, context) {
|
|
179
|
-
if (encoded === undefined || encoded.builds.length === 0) {
|
|
180
|
-
return undefined;
|
|
181
|
-
}
|
|
182
|
-
const chunks = fieldsCodec.decode(encoded.trees, {
|
|
183
|
-
encodeType: chunkCompressionStrategy,
|
|
184
|
-
originatorId: context.originatorId,
|
|
185
|
-
idCompressor: context.idCompressor,
|
|
186
|
-
});
|
|
187
|
-
const getChunk = (index) => {
|
|
188
|
-
assert(index < chunks.length, 0x898 /* out of bounds index for build chunk */);
|
|
189
|
-
return chunkFieldSingle(chunks[index] ?? oob(), {
|
|
190
|
-
policy: defaultChunkPolicy,
|
|
191
|
-
idCompressor: context.idCompressor,
|
|
192
|
-
});
|
|
193
|
-
};
|
|
194
|
-
const map = newTupleBTree();
|
|
195
|
-
for (const build of encoded.builds) {
|
|
196
|
-
// EncodedRevisionTag cannot be an array so this ensures that we can isolate the tuple
|
|
197
|
-
const revision = build[1] === undefined ? context.revision : revisionTagCodec.decode(build[1], context);
|
|
198
|
-
const decodedChunks = build[0].map(([i, n]) => [
|
|
199
|
-
i,
|
|
200
|
-
getChunk(n),
|
|
201
|
-
]);
|
|
202
|
-
for (const [id, chunk] of decodedChunks) {
|
|
203
|
-
map.set([revision, id], chunk);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return map;
|
|
207
|
-
}
|
|
208
|
-
function encodeRevisionInfos(revisions, context) {
|
|
209
|
-
if (context.revision !== undefined) {
|
|
210
|
-
assert(revisions.length === 1 &&
|
|
211
|
-
revisions[0] !== undefined &&
|
|
212
|
-
revisions[0].revision === context.revision &&
|
|
213
|
-
revisions[0].rollbackOf === undefined, 0x964 /* A tagged change should only contain the tagged revision */);
|
|
214
|
-
return undefined;
|
|
215
|
-
}
|
|
216
|
-
const encodedRevisions = [];
|
|
217
|
-
for (const revision of revisions) {
|
|
218
|
-
const encodedRevision = {
|
|
219
|
-
revision: revisionTagCodec.encode(revision.revision, context),
|
|
220
|
-
};
|
|
221
|
-
if (revision.rollbackOf !== undefined) {
|
|
222
|
-
encodedRevision.rollbackOf = revisionTagCodec.encode(revision.rollbackOf, context);
|
|
223
|
-
}
|
|
224
|
-
encodedRevisions.push(encodedRevision);
|
|
225
|
-
}
|
|
226
|
-
return encodedRevisions;
|
|
227
|
-
}
|
|
228
|
-
function decodeRevisionInfos(revisions, context) {
|
|
229
|
-
if (revisions === undefined) {
|
|
230
|
-
return context.revision === undefined ? undefined : [{ revision: context.revision }];
|
|
231
|
-
}
|
|
232
|
-
const decodedRevisions = [];
|
|
233
|
-
for (const revision of revisions) {
|
|
234
|
-
const decodedRevision = {
|
|
235
|
-
revision: revisionTagCodec.decode(revision.revision, context),
|
|
236
|
-
};
|
|
237
|
-
if (revision.rollbackOf !== undefined) {
|
|
238
|
-
decodedRevision.rollbackOf = revisionTagCodec.decode(revision.rollbackOf, context);
|
|
239
|
-
}
|
|
240
|
-
decodedRevisions.push(decodedRevision);
|
|
241
|
-
}
|
|
242
|
-
return decodedRevisions;
|
|
243
|
-
}
|
|
244
|
-
function decodeRootTable(encodedRoots, encodedRenames, context, decodeNode) {
|
|
245
|
-
const roots = newRootTable();
|
|
246
|
-
if (encodedRoots !== undefined) {
|
|
247
|
-
for (const { detachId, nodeChangeset } of encodedRoots) {
|
|
248
|
-
const decodedId = changeAtomIdCodec.decode(detachId, context);
|
|
249
|
-
setInChangeAtomIdMap(roots.nodeChanges, decodedId, decodeNode(nodeChangeset, { root: decodedId }));
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
if (encodedRenames !== undefined) {
|
|
253
|
-
for (const { oldId, newId, count } of encodedRenames) {
|
|
254
|
-
addNodeRename(roots, changeAtomIdCodec.decode(oldId, context), changeAtomIdCodec.decode(newId, context), count, undefined);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
return roots;
|
|
258
|
-
}
|
|
259
|
-
const modularChangeCodec = {
|
|
260
|
-
encode: (change, context) => {
|
|
261
|
-
const fieldToRoots = getFieldToRoots(change.rootNodes);
|
|
262
|
-
const isAttachId = (id, count) => {
|
|
263
|
-
const attachEntry = getFirstAttachField(change.crossFieldKeys, id, count);
|
|
264
|
-
return { ...attachEntry, value: attachEntry.value !== undefined };
|
|
265
|
-
};
|
|
266
|
-
const isDetachId = (id, count) => {
|
|
267
|
-
const detachEntry = getFirstDetachField(change.crossFieldKeys, id, count);
|
|
268
|
-
const renameEntry = change.rootNodes.oldToNewId.getFirst(id, detachEntry.length);
|
|
269
|
-
const isDetach = (detachEntry.value ?? renameEntry.value) !== undefined;
|
|
270
|
-
return { start: id, value: isDetach, length: renameEntry.length };
|
|
271
|
-
};
|
|
272
|
-
const getInputDetachId = (id, count) => {
|
|
273
|
-
return change.rootNodes.newToOldId.getFirst(id, count);
|
|
274
|
-
};
|
|
275
|
-
const encodeNode = (nodeId) => {
|
|
276
|
-
// TODO: Handle node aliasing.
|
|
277
|
-
const node = change.nodeChanges.get([nodeId.revision, nodeId.localId]);
|
|
278
|
-
assert(node !== undefined, 0x92e /* Unknown node ID */);
|
|
279
|
-
return encodeNodeChangesForJson(node, nodeId, fieldToRoots, context, encodeNode, getInputDetachId, isAttachId, isDetachId);
|
|
280
|
-
};
|
|
281
|
-
// Destroys only exist in rollback changesets, which are never sent.
|
|
282
|
-
assert(change.destroys === undefined, 0x899 /* Unexpected changeset with destroys */);
|
|
283
|
-
const encoded = {
|
|
284
|
-
maxId: change.maxId,
|
|
285
|
-
revisions: change.revisions === undefined
|
|
286
|
-
? undefined
|
|
287
|
-
: encodeRevisionInfos(change.revisions, context),
|
|
288
|
-
fieldChanges: encodeFieldChangesForJson(change.fieldChanges, undefined, fieldToRoots, context, encodeNode, getInputDetachId, isAttachId, isDetachId),
|
|
289
|
-
rootNodes: encodeRootNodesForJson(change.rootNodes.nodeChanges, context, encodeNode),
|
|
290
|
-
nodeRenames: encodeRenamesForJson(change.rootNodes.oldToNewId, context),
|
|
291
|
-
builds: encodeDetachedNodes(change.builds, context),
|
|
292
|
-
refreshers: encodeDetachedNodes(change.refreshers, context),
|
|
293
|
-
violations: change.constraintViolationCount,
|
|
294
|
-
};
|
|
295
|
-
return encoded;
|
|
296
|
-
},
|
|
297
|
-
decode: (encodedChange, context) => {
|
|
298
|
-
const idAllocator = idAllocatorFromMaxId(encodedChange.maxId);
|
|
299
|
-
const nodeChanges = newTupleBTree();
|
|
300
|
-
const nodeToParent = newTupleBTree();
|
|
301
|
-
const crossFieldKeys = newCrossFieldRangeTable();
|
|
302
|
-
const rootNodes = newRootTable();
|
|
303
|
-
const decodeNode = (encodedNode, fieldId) => {
|
|
304
|
-
const nodeId = {
|
|
305
|
-
revision: context.revision,
|
|
306
|
-
localId: brand(idAllocator.allocate()),
|
|
307
|
-
};
|
|
308
|
-
const node = decodeNodeChangesetFromJson(encodedNode, nodeId, crossFieldKeys, rootNodes, context, decodeNode, idAllocator);
|
|
309
|
-
nodeChanges.set([nodeId.revision, nodeId.localId], node);
|
|
310
|
-
if (fieldId !== undefined) {
|
|
311
|
-
nodeToParent.set([nodeId.revision, nodeId.localId], fieldId);
|
|
312
|
-
}
|
|
313
|
-
return nodeId;
|
|
314
|
-
};
|
|
315
|
-
const decoded = {
|
|
316
|
-
rebaseVersion: 2,
|
|
317
|
-
fieldChanges: decodeFieldChangesFromJson(encodedChange.fieldChanges, undefined, crossFieldKeys, context, decodeNode, idAllocator),
|
|
318
|
-
nodeChanges,
|
|
319
|
-
rootNodes: decodeRootTable(encodedChange.rootNodes, encodedChange.nodeRenames, context, decodeNode),
|
|
320
|
-
nodeToParent,
|
|
321
|
-
nodeAliases: newTupleBTree(),
|
|
322
|
-
crossFieldKeys,
|
|
323
|
-
};
|
|
324
|
-
if (encodedChange.builds !== undefined) {
|
|
325
|
-
decoded.builds = decodeDetachedNodes(encodedChange.builds, context);
|
|
326
|
-
}
|
|
327
|
-
if (encodedChange.refreshers !== undefined) {
|
|
328
|
-
decoded.refreshers = decodeDetachedNodes(encodedChange.refreshers, context);
|
|
329
|
-
}
|
|
330
|
-
if (encodedChange.violations !== undefined) {
|
|
331
|
-
decoded.constraintViolationCount = encodedChange.violations;
|
|
332
|
-
}
|
|
333
|
-
const decodedRevInfos = decodeRevisionInfos(encodedChange.revisions, context);
|
|
334
|
-
if (decodedRevInfos !== undefined) {
|
|
335
|
-
decoded.revisions = decodedRevInfos;
|
|
336
|
-
}
|
|
337
|
-
if (encodedChange.maxId !== undefined) {
|
|
338
|
-
decoded.maxId = encodedChange.maxId;
|
|
339
|
-
}
|
|
340
|
-
return decoded;
|
|
341
|
-
},
|
|
342
|
-
};
|
|
343
|
-
return withSchemaValidation(EncodedModularChangeset, modularChangeCodec, codecOptions.jsonValidator);
|
|
344
|
-
}
|
|
345
|
-
function getChangeHandler(fieldKinds, fieldKind) {
|
|
346
|
-
if (fieldKind === genericFieldKind.identifier) {
|
|
347
|
-
return genericFieldKind.changeHandler;
|
|
348
|
-
}
|
|
349
|
-
const handler = fieldKinds.get(fieldKind)?.kind.changeHandler;
|
|
350
|
-
assert(handler !== undefined, 0x9c1 /* Unknown field kind */);
|
|
351
|
-
return handler;
|
|
352
|
-
}
|
|
353
|
-
function encodeRevisionOpt(revisionCodec, revision, context) {
|
|
354
|
-
if (revision === undefined) {
|
|
355
|
-
return undefined;
|
|
356
|
-
}
|
|
357
|
-
return revision === context.revision ? undefined : revisionCodec.encode(revision, context);
|
|
358
|
-
}
|
|
359
|
-
function getFieldToRoots(rootTable) {
|
|
360
|
-
const fieldToRoots = newTupleBTree();
|
|
361
|
-
for (const [[revision, localId], nodeId] of rootTable.nodeChanges.entries()) {
|
|
362
|
-
const detachId = { revision, localId };
|
|
363
|
-
const fieldId = rootTable.detachLocations.getFirst(detachId, 1).value;
|
|
364
|
-
if (fieldId !== undefined) {
|
|
365
|
-
setInChangeAtomIdMap(getOrAddInFieldRootMap(fieldToRoots, fieldId).nodeChanges, detachId, nodeId);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
for (const entry of rootTable.oldToNewId.entries()) {
|
|
369
|
-
const fieldId = rootTable.detachLocations.getFirst(entry.start, 1).value;
|
|
370
|
-
if (fieldId !== undefined) {
|
|
371
|
-
getOrAddInFieldRootMap(fieldToRoots, fieldId).renames.set(entry.start, entry.length, entry.value);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
return fieldToRoots;
|
|
375
|
-
}
|
|
376
|
-
function getOrAddInFieldRootMap(map, fieldId) {
|
|
377
|
-
const key = [fieldId.nodeId?.revision, fieldId.nodeId?.localId, fieldId.field];
|
|
378
|
-
const rootChanges = map.get(key);
|
|
379
|
-
if (rootChanges !== undefined) {
|
|
380
|
-
return rootChanges;
|
|
381
|
-
}
|
|
382
|
-
const newRootChanges = {
|
|
383
|
-
nodeChanges: newTupleBTree(),
|
|
384
|
-
renames: newChangeAtomIdTransform(),
|
|
385
|
-
};
|
|
386
|
-
map.set(key, newRootChanges);
|
|
387
|
-
return newRootChanges;
|
|
388
|
-
}
|
|
389
|
-
//# sourceMappingURL=modularChangeCodecV3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeCodecV3.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecV3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EACN,oBAAoB,GAKpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,wBAAwB,GAWxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,KAAK,EACL,oBAAoB,EACpB,aAAa,GAOb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,gBAAgB,EAChB,kBAAkB,GAGlB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,GAEZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,uBAAuB,GAUvB,MAAM,yBAAyB,CAAC;AAUjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EACN,uBAAuB,GAGvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAA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AAK,MAAM,KAAK,IAAI,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;QACpD,MAAM,OAAO,GAAG,SAAS,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QACzE,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC3B,sBAAsB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CACxD,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,KAAK,CACX,CAAC;QACH,CAAC;IACF,CAAC;IAED,OAAO,YAAY,CAAC;AACrB,CAAC;AAED,SAAS,sBAAsB,CAAC,GAAiB,EAAE,OAAgB;IAClE,MAAM,GAAG,GAAe,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3F,MAAM,WAAW,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,WAAW,CAAC;IACpB,CAAC;IAED,MAAM,cAAc,GAAqB;QACxC,WAAW,EAAE,aAAa,EAAE;QAC5B,OAAO,EAAE,wBAAwB,EAAE;KACnC,CAAC;IACF,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAC7B,OAAO,cAAc,CAAC;AACvB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail, oob } from \"@fluidframework/core-utils/internal\";\nimport {\n\twithSchemaValidation,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\ttype IMultiFormatCodec,\n\ttype SchemaValidationFunction,\n} from \"../../codec/index.js\";\nimport {\n\tnewChangeAtomIdTransform,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdRangeMap,\n\ttype ChangeEncodingContext,\n\ttype ChangesetLocalId,\n\ttype EncodedRevisionTag,\n\ttype FieldKey,\n\ttype FieldKindIdentifier,\n\ttype ITreeCursorSynchronous,\n\ttype RevisionInfo,\n\ttype RevisionTag,\n} from \"../../core/index.js\";\nimport {\n\tbrand,\n\tidAllocatorFromMaxId,\n\tnewTupleBTree,\n\ttype IdAllocator,\n\ttype JsonCompatibleReadOnly,\n\ttype Mutable,\n\ttype RangeQueryEntry,\n\ttype RangeQueryResult,\n\ttype TupleBTree,\n} from \"../../util/index.js\";\nimport {\n\tchunkFieldSingle,\n\tdefaultChunkPolicy,\n\ttype FieldBatchCodec,\n\ttype TreeChunk,\n} from \"../chunked-forest/index.js\";\nimport { TreeCompressionStrategy } from \"../treeCompressionUtils.js\";\nimport type { FieldKindConfiguration } from \"./fieldKindConfiguration.js\";\nimport {\n\taddNodeRename,\n\tgetFirstAttachField,\n\tgetFirstDetachField,\n\tnewRootTable,\n\ttype FieldIdKey,\n} from \"./modularChangeFamily.js\";\nimport {\n\tnewCrossFieldRangeTable,\n\ttype CrossFieldKeyTable,\n\ttype FieldChangeMap,\n\ttype FieldChangeset,\n\ttype FieldId,\n\ttype ModularChangeset,\n\ttype NodeChangeset,\n\ttype NodeId,\n\ttype NodeLocation,\n\ttype RootNodeTable,\n} from \"./modularChangeTypes.js\";\nimport type {\n\tEncodedBuilds,\n\tEncodedBuildsArray,\n\tEncodedFieldChange,\n\tEncodedFieldChangeMap,\n\tEncodedNodeChangeset,\n\tEncodedRevisionInfo,\n} from \"./modularChangeFormatV1.js\";\nimport type { FieldChangeEncodingContext, FieldChangeHandler } from \"./fieldChangeHandler.js\";\nimport { genericFieldKind } from \"./genericFieldKind.js\";\nimport type { TAnySchema } from \"@sinclair/typebox\";\nimport {\n\tEncodedModularChangeset,\n\ttype EncodedRenames,\n\ttype EncodedRootNodes,\n} from \"./modularChangeFormatV3.js\";\nimport { makeChangeAtomIdCodec } from \"../changeAtomIdCodec.js\";\nimport { setInChangeAtomIdMap, type ChangeAtomIdBTree } from \"../changeAtomIdBTree.js\";\nimport { getFieldChangesetCodecs } from \"./modularChangeCodecV1.js\";\n\ntype ModularChangeCodec = IJsonCodec<\n\tModularChangeset,\n\tEncodedModularChangeset,\n\tEncodedModularChangeset,\n\tChangeEncodingContext\n>;\n\ntype FieldCodec = IMultiFormatCodec<\n\tFieldChangeset,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tFieldChangeEncodingContext\n>;\n\nexport function makeModularChangeCodecV3(\n\tfieldKinds: FieldKindConfiguration,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tfieldsCodec: FieldBatchCodec,\n\tcodecOptions: ICodecOptions,\n\tchunkCompressionStrategy: TreeCompressionStrategy = TreeCompressionStrategy.Compressed,\n): ModularChangeCodec {\n\tconst fieldChangesetCodecs = getFieldChangesetCodecs(\n\t\tfieldKinds,\n\t\trevisionTagCodec,\n\t\tcodecOptions,\n\t);\n\n\tconst getFieldChangesetCodec = (\n\t\tfieldKind: FieldKindIdentifier,\n\t): {\n\t\tcompiledSchema?: SchemaValidationFunction<TAnySchema>;\n\t\tcodec: FieldCodec;\n\t} => {\n\t\tconst entry = fieldChangesetCodecs.get(fieldKind);\n\t\tassert(entry !== undefined, \"Tried to encode unsupported fieldKind\");\n\t\treturn entry;\n\t};\n\n\tconst changeAtomIdCodec = makeChangeAtomIdCodec(revisionTagCodec);\n\n\tfunction encodeFieldChangesForJson(\n\t\tchange: FieldChangeMap,\n\t\tparentId: NodeId | undefined,\n\t\tfieldToRoots: FieldRootMap,\n\t\tcontext: ChangeEncodingContext,\n\t\tencodeNode: NodeEncoder,\n\t\tgetInputDetachId: ChangeAtomMappingQuery,\n\t\tisAttachId: ChangeAtomIdRangeQuery,\n\t\tisDetachId: ChangeAtomIdRangeQuery,\n\t): EncodedFieldChangeMap {\n\t\tconst encodedFields: EncodedFieldChangeMap = [];\n\n\t\tfor (const [field, fieldChange] of change) {\n\t\t\tconst { codec, compiledSchema } = getFieldChangesetCodec(fieldChange.fieldKind);\n\t\t\tconst rootChanges = fieldToRoots.get([parentId?.revision, parentId?.localId, field]);\n\n\t\t\tconst fieldContext: FieldChangeEncodingContext = {\n\t\t\t\tbaseContext: context,\n\t\t\t\trootNodeChanges: rootChanges?.nodeChanges ?? newTupleBTree(),\n\t\t\t\trootRenames: rootChanges?.renames ?? newChangeAtomIdTransform(),\n\n\t\t\t\tencodeNode,\n\t\t\t\tgetInputRootId: getInputDetachId,\n\t\t\t\tisAttachId,\n\t\t\t\tisDetachId,\n\t\t\t\tdecodeNode: () => fail(0xb1e /* Should not decode nodes during field encoding */),\n\t\t\t\tdecodeRootNodeChange: () => fail(\"Should not be called during encoding\"),\n\t\t\t\tdecodeRootRename: () => fail(\"Should not be called during encoding\"),\n\t\t\t\tdecodeMoveAndDetach: () => fail(\"Should not be called during encoding\"),\n\t\t\t\tgenerateId: () => fail(\"Should not be called during encoding\"),\n\t\t\t};\n\n\t\t\tconst encodedChange = codec.json.encode(fieldChange.change, fieldContext);\n\t\t\tif (compiledSchema !== undefined && !compiledSchema.check(encodedChange)) {\n\t\t\t\tfail(0xb1f /* Encoded change didn't pass schema validation. */);\n\t\t\t}\n\n\t\t\tconst fieldKey: FieldKey = field;\n\t\t\tconst encodedField: EncodedFieldChange = {\n\t\t\t\tfieldKey,\n\t\t\t\tfieldKind: fieldChange.fieldKind,\n\t\t\t\tchange: encodedChange,\n\t\t\t};\n\n\t\t\tencodedFields.push(encodedField);\n\t\t}\n\n\t\treturn encodedFields;\n\t}\n\n\tfunction encodeNodeChangesForJson(\n\t\tchange: NodeChangeset,\n\t\tid: NodeId,\n\t\tfieldToRoots: FieldRootMap,\n\t\tcontext: ChangeEncodingContext,\n\t\tencodeNode: NodeEncoder,\n\t\tgetInputDetachId: ChangeAtomMappingQuery,\n\t\tisAttachId: ChangeAtomIdRangeQuery,\n\t\tisDetachId: ChangeAtomIdRangeQuery,\n\t): EncodedNodeChangeset {\n\t\tconst encodedChange: EncodedNodeChangeset = {};\n\t\t// Note: revert constraints are ignored for now because they would only be needed if we supported reverting changes made by peers.\n\t\tconst { fieldChanges, nodeExistsConstraint } = change;\n\n\t\tif (fieldChanges !== undefined) {\n\t\t\tencodedChange.fieldChanges = encodeFieldChangesForJson(\n\t\t\t\tfieldChanges,\n\t\t\t\tid,\n\t\t\t\tfieldToRoots,\n\t\t\t\tcontext,\n\t\t\t\tencodeNode,\n\t\t\t\tgetInputDetachId,\n\t\t\t\tisAttachId,\n\t\t\t\tisDetachId,\n\t\t\t);\n\t\t}\n\n\t\tif (nodeExistsConstraint !== undefined) {\n\t\t\tencodedChange.nodeExistsConstraint = nodeExistsConstraint;\n\t\t}\n\n\t\treturn encodedChange;\n\t}\n\n\tfunction encodeRootNodesForJson(\n\t\troots: ChangeAtomIdBTree<NodeId>,\n\t\tcontext: ChangeEncodingContext,\n\t\tencodeNode: NodeEncoder,\n\t): EncodedRootNodes {\n\t\tconst encoded: EncodedRootNodes = [];\n\t\tfor (const [[revision, localId], nodeId] of roots.entries()) {\n\t\t\tencoded.push({\n\t\t\t\tdetachId: changeAtomIdCodec.encode({ revision, localId }, context),\n\t\t\t\tnodeChangeset: encodeNode(nodeId),\n\t\t\t});\n\t\t}\n\n\t\treturn encoded;\n\t}\n\n\tfunction encodeRenamesForJson(\n\t\trenames: ChangeAtomIdRangeMap<ChangeAtomId>,\n\t\tcontext: ChangeEncodingContext,\n\t): EncodedRenames {\n\t\tconst encoded: EncodedRenames = [];\n\t\tfor (const entry of renames.entries()) {\n\t\t\tencoded.push({\n\t\t\t\toldId: changeAtomIdCodec.encode(entry.start, context),\n\t\t\t\tnewId: changeAtomIdCodec.encode(entry.value, context),\n\t\t\t\tcount: entry.length,\n\t\t\t});\n\t\t}\n\n\t\treturn encoded;\n\t}\n\n\tfunction decodeFieldChangesFromJson(\n\t\tencodedChange: EncodedFieldChangeMap,\n\t\tparentId: NodeId | undefined,\n\t\tdecodedCrossFieldKeys: CrossFieldKeyTable,\n\t\tcontext: ChangeEncodingContext,\n\t\tdecodeNode: NodeDecoder,\n\t\tidAllocator: IdAllocator,\n\t): FieldChangeMap {\n\t\tconst decodedFields: FieldChangeMap = new Map();\n\t\tfor (const field of encodedChange) {\n\t\t\tconst { codec, compiledSchema } = getFieldChangesetCodec(field.fieldKind);\n\t\t\tif (compiledSchema !== undefined && !compiledSchema.check(field.change)) {\n\t\t\t\tfail(0xb20 /* Encoded change didn't pass schema validation. */);\n\t\t\t}\n\n\t\t\tconst fieldId: FieldId = {\n\t\t\t\tnodeId: parentId,\n\t\t\t\tfield: field.fieldKey,\n\t\t\t};\n\n\t\t\tconst fieldContext: FieldChangeEncodingContext = {\n\t\t\t\tbaseContext: context,\n\t\t\t\trootNodeChanges: newTupleBTree(),\n\t\t\t\trootRenames: newChangeAtomIdTransform(),\n\n\t\t\t\tencodeNode: () => fail(0xb21 /* Should not encode nodes during field decoding */),\n\t\t\t\tgetInputRootId: () => fail(\"Should not query during decoding\"),\n\t\t\t\tisAttachId: () => fail(\"Should not query during decoding\"),\n\t\t\t\tisDetachId: () => fail(\"Should not query during decoding\"),\n\n\t\t\t\tdecodeNode: (encodedNode: EncodedNodeChangeset): NodeId =>\n\t\t\t\t\tdecodeNode(encodedNode, { field: fieldId }),\n\n\t\t\t\tdecodeRootNodeChange: (detachId, encodedNode): void => {},\n\t\t\t\tdecodeRootRename: (oldId, newId, count): void => {},\n\t\t\t\tdecodeMoveAndDetach: (detachId, count): void => {},\n\n\t\t\t\tgenerateId: (): ChangeAtomId => ({\n\t\t\t\t\trevision: context.revision,\n\t\t\t\t\tlocalId: brand(idAllocator.allocate()),\n\t\t\t\t}),\n\t\t\t};\n\n\t\t\tconst fieldChangeset = codec.json.decode(field.change, fieldContext);\n\n\t\t\tconst crossFieldKeys = getChangeHandler(fieldKinds, field.fieldKind).getCrossFieldKeys(\n\t\t\t\tfieldChangeset,\n\t\t\t);\n\n\t\t\tfor (const { key, count } of crossFieldKeys) {\n\t\t\t\tdecodedCrossFieldKeys.set(key, count, fieldId);\n\t\t\t}\n\n\t\t\tconst fieldKey: FieldKey = brand<FieldKey>(field.fieldKey);\n\n\t\t\tdecodedFields.set(fieldKey, {\n\t\t\t\tfieldKind: field.fieldKind,\n\t\t\t\tchange: brand(fieldChangeset),\n\t\t\t});\n\t\t}\n\n\t\treturn decodedFields;\n\t}\n\n\tfunction decodeNodeChangesetFromJson(\n\t\tencodedChange: EncodedNodeChangeset,\n\t\tid: NodeId,\n\t\tdecodedCrossFieldKeys: CrossFieldKeyTable,\n\t\tdecodedRootTable: RootNodeTable,\n\t\tcontext: ChangeEncodingContext,\n\t\tdecodeNode: NodeDecoder,\n\t\tidAllocator: IdAllocator,\n\t): NodeChangeset {\n\t\tconst decodedChange: Mutable<NodeChangeset> = {};\n\t\tconst { fieldChanges, nodeExistsConstraint } = encodedChange;\n\n\t\tif (fieldChanges !== undefined) {\n\t\t\tdecodedChange.fieldChanges = decodeFieldChangesFromJson(\n\t\t\t\tfieldChanges,\n\t\t\t\tid,\n\t\t\t\tdecodedCrossFieldKeys,\n\t\t\t\tcontext,\n\t\t\t\tdecodeNode,\n\t\t\t\tidAllocator,\n\t\t\t);\n\t\t}\n\n\t\tif (nodeExistsConstraint !== undefined) {\n\t\t\tdecodedChange.nodeExistsConstraint = nodeExistsConstraint;\n\t\t}\n\n\t\treturn decodedChange;\n\t}\n\n\tfunction encodeDetachedNodes(\n\t\tdetachedNodes: ChangeAtomIdBTree<TreeChunk> | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t): EncodedBuilds | undefined {\n\t\tif (detachedNodes === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst treesToEncode: ITreeCursorSynchronous[] = [];\n\t\tconst buildsArray: EncodedBuildsArray = [];\n\n\t\tlet buildsForRevision:\n\t\t\t| [[ChangesetLocalId, number][], EncodedRevisionTag]\n\t\t\t| [[ChangesetLocalId, number][]]\n\t\t\t| undefined;\n\n\t\tfor (const [[revision, id], chunk] of detachedNodes.entries()) {\n\t\t\tconst encodedRevision = encodeRevisionOpt(revisionTagCodec, revision, context);\n\n\t\t\tif (buildsForRevision === undefined || buildsForRevision[1] !== encodedRevision) {\n\t\t\t\tif (buildsForRevision !== undefined) {\n\t\t\t\t\tbuildsArray.push(buildsForRevision);\n\t\t\t\t}\n\n\t\t\t\tbuildsForRevision = encodedRevision === undefined ? [[]] : [[], encodedRevision];\n\t\t\t}\n\n\t\t\ttreesToEncode.push(chunk.cursor());\n\t\t\tconst treeIndexInBatch = treesToEncode.length - 1;\n\t\t\tbuildsForRevision?.[0].push([id, treeIndexInBatch]);\n\t\t}\n\n\t\tif (buildsForRevision !== undefined) {\n\t\t\tbuildsArray.push(buildsForRevision);\n\t\t}\n\n\t\treturn buildsArray.length === 0\n\t\t\t? undefined\n\t\t\t: {\n\t\t\t\t\tbuilds: buildsArray,\n\t\t\t\t\ttrees: fieldsCodec.encode(treesToEncode, {\n\t\t\t\t\t\tencodeType: chunkCompressionStrategy,\n\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\toriginatorId: context.originatorId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t}),\n\t\t\t\t};\n\t}\n\n\tfunction decodeDetachedNodes(\n\t\tencoded: EncodedBuilds | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t): ChangeAtomIdBTree<TreeChunk> | undefined {\n\t\tif (encoded === undefined || encoded.builds.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst chunks = fieldsCodec.decode(encoded.trees, {\n\t\t\tencodeType: chunkCompressionStrategy,\n\t\t\toriginatorId: context.originatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t});\n\t\tconst getChunk = (index: number): TreeChunk => {\n\t\t\tassert(index < chunks.length, 0x898 /* out of bounds index for build chunk */);\n\t\t\treturn chunkFieldSingle(chunks[index] ?? oob(), {\n\t\t\t\tpolicy: defaultChunkPolicy,\n\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t});\n\t\t};\n\n\t\tconst map: ModularChangeset[\"builds\"] = newTupleBTree();\n\t\tfor (const build of encoded.builds) {\n\t\t\t// EncodedRevisionTag cannot be an array so this ensures that we can isolate the tuple\n\t\t\tconst revision =\n\t\t\t\tbuild[1] === undefined ? context.revision : revisionTagCodec.decode(build[1], context);\n\n\t\t\tconst decodedChunks: [ChangesetLocalId, TreeChunk][] = build[0].map(([i, n]) => [\n\t\t\t\ti,\n\t\t\t\tgetChunk(n),\n\t\t\t]);\n\n\t\t\tfor (const [id, chunk] of decodedChunks) {\n\t\t\t\tmap.set([revision, id], chunk);\n\t\t\t}\n\t\t}\n\n\t\treturn map;\n\t}\n\n\ttype ChangeAtomMappingQuery = (\n\t\tid: ChangeAtomId,\n\t\tcount: number,\n\t) => RangeQueryResult<ChangeAtomId | undefined>;\n\n\ttype ChangeAtomIdRangeQuery = (id: ChangeAtomId, count: number) => RangeQueryResult<boolean>;\n\ttype NodeEncoder = (nodeId: NodeId) => EncodedNodeChangeset;\n\ttype NodeDecoder = (encoded: EncodedNodeChangeset, fieldId: NodeLocation) => NodeId;\n\n\tfunction encodeRevisionInfos(\n\t\trevisions: readonly RevisionInfo[],\n\t\tcontext: ChangeEncodingContext,\n\t): EncodedRevisionInfo[] | undefined {\n\t\tif (context.revision !== undefined) {\n\t\t\tassert(\n\t\t\t\trevisions.length === 1 &&\n\t\t\t\t\trevisions[0] !== undefined &&\n\t\t\t\t\trevisions[0].revision === context.revision &&\n\t\t\t\t\trevisions[0].rollbackOf === undefined,\n\t\t\t\t0x964 /* A tagged change should only contain the tagged revision */,\n\t\t\t);\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst encodedRevisions = [];\n\t\tfor (const revision of revisions) {\n\t\t\tconst encodedRevision: Mutable<EncodedRevisionInfo> = {\n\t\t\t\trevision: revisionTagCodec.encode(revision.revision, context),\n\t\t\t};\n\n\t\t\tif (revision.rollbackOf !== undefined) {\n\t\t\t\tencodedRevision.rollbackOf = revisionTagCodec.encode(revision.rollbackOf, context);\n\t\t\t}\n\n\t\t\tencodedRevisions.push(encodedRevision);\n\t\t}\n\n\t\treturn encodedRevisions;\n\t}\n\n\tfunction decodeRevisionInfos(\n\t\trevisions: readonly EncodedRevisionInfo[] | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t): RevisionInfo[] | undefined {\n\t\tif (revisions === undefined) {\n\t\t\treturn context.revision === undefined ? undefined : [{ revision: context.revision }];\n\t\t}\n\n\t\tconst decodedRevisions = [];\n\t\tfor (const revision of revisions) {\n\t\t\tconst decodedRevision: Mutable<RevisionInfo> = {\n\t\t\t\trevision: revisionTagCodec.decode(revision.revision, context),\n\t\t\t};\n\n\t\t\tif (revision.rollbackOf !== undefined) {\n\t\t\t\tdecodedRevision.rollbackOf = revisionTagCodec.decode(revision.rollbackOf, context);\n\t\t\t}\n\n\t\t\tdecodedRevisions.push(decodedRevision);\n\t\t}\n\n\t\treturn decodedRevisions;\n\t}\n\n\tfunction decodeRootTable(\n\t\tencodedRoots: EncodedRootNodes | undefined,\n\t\tencodedRenames: EncodedRenames | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t\tdecodeNode: NodeDecoder,\n\t): RootNodeTable {\n\t\tconst roots = newRootTable();\n\t\tif (encodedRoots !== undefined) {\n\t\t\tfor (const { detachId, nodeChangeset } of encodedRoots) {\n\t\t\t\tconst decodedId = changeAtomIdCodec.decode(detachId, context);\n\t\t\t\tsetInChangeAtomIdMap(\n\t\t\t\t\troots.nodeChanges,\n\t\t\t\t\tdecodedId,\n\t\t\t\t\tdecodeNode(nodeChangeset, { root: decodedId }),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (encodedRenames !== undefined) {\n\t\t\tfor (const { oldId, newId, count } of encodedRenames) {\n\t\t\t\taddNodeRename(\n\t\t\t\t\troots,\n\t\t\t\t\tchangeAtomIdCodec.decode(oldId, context),\n\t\t\t\t\tchangeAtomIdCodec.decode(newId, context),\n\t\t\t\t\tcount,\n\t\t\t\t\tundefined,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn roots;\n\t}\n\n\tconst modularChangeCodec: ModularChangeCodec = {\n\t\tencode: (change, context) => {\n\t\t\tconst fieldToRoots = getFieldToRoots(change.rootNodes);\n\t\t\tconst isAttachId = (id: ChangeAtomId, count: number): RangeQueryResult<boolean> => {\n\t\t\t\tconst attachEntry = getFirstAttachField(change.crossFieldKeys, id, count);\n\t\t\t\treturn { ...attachEntry, value: attachEntry.value !== undefined };\n\t\t\t};\n\n\t\t\tconst isDetachId = (\n\t\t\t\tid: ChangeAtomId,\n\t\t\t\tcount: number,\n\t\t\t): RangeQueryEntry<ChangeAtomId, boolean> => {\n\t\t\t\tconst detachEntry = getFirstDetachField(change.crossFieldKeys, id, count);\n\t\t\t\tconst renameEntry = change.rootNodes.oldToNewId.getFirst(id, detachEntry.length);\n\t\t\t\tconst isDetach = (detachEntry.value ?? renameEntry.value) !== undefined;\n\t\t\t\treturn { start: id, value: isDetach, length: renameEntry.length };\n\t\t\t};\n\n\t\t\tconst getInputDetachId = (\n\t\t\t\tid: ChangeAtomId,\n\t\t\t\tcount: number,\n\t\t\t): RangeQueryResult<ChangeAtomId | undefined> => {\n\t\t\t\treturn change.rootNodes.newToOldId.getFirst(id, count);\n\t\t\t};\n\n\t\t\tconst encodeNode = (nodeId: NodeId): EncodedNodeChangeset => {\n\t\t\t\t// TODO: Handle node aliasing.\n\t\t\t\tconst node = change.nodeChanges.get([nodeId.revision, nodeId.localId]);\n\t\t\t\tassert(node !== undefined, 0x92e /* Unknown node ID */);\n\t\t\t\treturn encodeNodeChangesForJson(\n\t\t\t\t\tnode,\n\t\t\t\t\tnodeId,\n\t\t\t\t\tfieldToRoots,\n\t\t\t\t\tcontext,\n\t\t\t\t\tencodeNode,\n\t\t\t\t\tgetInputDetachId,\n\t\t\t\t\tisAttachId,\n\t\t\t\t\tisDetachId,\n\t\t\t\t);\n\t\t\t};\n\n\t\t\t// Destroys only exist in rollback changesets, which are never sent.\n\t\t\tassert(change.destroys === undefined, 0x899 /* Unexpected changeset with destroys */);\n\t\t\tconst encoded: EncodedModularChangeset = {\n\t\t\t\tmaxId: change.maxId,\n\t\t\t\trevisions:\n\t\t\t\t\tchange.revisions === undefined\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: encodeRevisionInfos(change.revisions, context),\n\t\t\t\tfieldChanges: encodeFieldChangesForJson(\n\t\t\t\t\tchange.fieldChanges,\n\t\t\t\t\tundefined,\n\t\t\t\t\tfieldToRoots,\n\t\t\t\t\tcontext,\n\t\t\t\t\tencodeNode,\n\t\t\t\t\tgetInputDetachId,\n\t\t\t\t\tisAttachId,\n\t\t\t\t\tisDetachId,\n\t\t\t\t),\n\t\t\t\trootNodes: encodeRootNodesForJson(change.rootNodes.nodeChanges, context, encodeNode),\n\t\t\t\tnodeRenames: encodeRenamesForJson(change.rootNodes.oldToNewId, context),\n\t\t\t\tbuilds: encodeDetachedNodes(change.builds, context),\n\t\t\t\trefreshers: encodeDetachedNodes(change.refreshers, context),\n\t\t\t\tviolations: change.constraintViolationCount,\n\t\t\t};\n\n\t\t\treturn encoded;\n\t\t},\n\n\t\tdecode: (encodedChange: EncodedModularChangeset, context) => {\n\t\t\tconst idAllocator = idAllocatorFromMaxId(encodedChange.maxId);\n\t\t\tconst nodeChanges: ChangeAtomIdBTree<NodeChangeset> = newTupleBTree();\n\t\t\tconst nodeToParent: ChangeAtomIdBTree<NodeLocation> = newTupleBTree();\n\t\t\tconst crossFieldKeys: CrossFieldKeyTable = newCrossFieldRangeTable();\n\t\t\tconst rootNodes = newRootTable();\n\n\t\t\tconst decodeNode: NodeDecoder = (\n\t\t\t\tencodedNode: EncodedNodeChangeset,\n\t\t\t\tfieldId: NodeLocation,\n\t\t\t): NodeId => {\n\t\t\t\tconst nodeId: NodeId = {\n\t\t\t\t\trevision: context.revision,\n\t\t\t\t\tlocalId: brand(idAllocator.allocate()),\n\t\t\t\t};\n\n\t\t\t\tconst node = decodeNodeChangesetFromJson(\n\t\t\t\t\tencodedNode,\n\t\t\t\t\tnodeId,\n\t\t\t\t\tcrossFieldKeys,\n\t\t\t\t\trootNodes,\n\t\t\t\t\tcontext,\n\t\t\t\t\tdecodeNode,\n\t\t\t\t\tidAllocator,\n\t\t\t\t);\n\n\t\t\t\tnodeChanges.set([nodeId.revision, nodeId.localId], node);\n\n\t\t\t\tif (fieldId !== undefined) {\n\t\t\t\t\tnodeToParent.set([nodeId.revision, nodeId.localId], fieldId);\n\t\t\t\t}\n\n\t\t\t\treturn nodeId;\n\t\t\t};\n\n\t\t\tconst decoded: Mutable<ModularChangeset> = {\n\t\t\t\trebaseVersion: 2,\n\t\t\t\tfieldChanges: decodeFieldChangesFromJson(\n\t\t\t\t\tencodedChange.fieldChanges,\n\t\t\t\t\tundefined,\n\t\t\t\t\tcrossFieldKeys,\n\t\t\t\t\tcontext,\n\t\t\t\t\tdecodeNode,\n\t\t\t\t\tidAllocator,\n\t\t\t\t),\n\t\t\t\tnodeChanges,\n\t\t\t\trootNodes: decodeRootTable(\n\t\t\t\t\tencodedChange.rootNodes,\n\t\t\t\t\tencodedChange.nodeRenames,\n\t\t\t\t\tcontext,\n\t\t\t\t\tdecodeNode,\n\t\t\t\t),\n\t\t\t\tnodeToParent,\n\t\t\t\tnodeAliases: newTupleBTree(),\n\t\t\t\tcrossFieldKeys,\n\t\t\t};\n\n\t\t\tif (encodedChange.builds !== undefined) {\n\t\t\t\tdecoded.builds = decodeDetachedNodes(encodedChange.builds, context);\n\t\t\t}\n\t\t\tif (encodedChange.refreshers !== undefined) {\n\t\t\t\tdecoded.refreshers = decodeDetachedNodes(encodedChange.refreshers, context);\n\t\t\t}\n\n\t\t\tif (encodedChange.violations !== undefined) {\n\t\t\t\tdecoded.constraintViolationCount = encodedChange.violations;\n\t\t\t}\n\n\t\t\tconst decodedRevInfos = decodeRevisionInfos(encodedChange.revisions, context);\n\t\t\tif (decodedRevInfos !== undefined) {\n\t\t\t\tdecoded.revisions = decodedRevInfos;\n\t\t\t}\n\t\t\tif (encodedChange.maxId !== undefined) {\n\t\t\t\tdecoded.maxId = encodedChange.maxId;\n\t\t\t}\n\t\t\treturn decoded;\n\t\t},\n\t};\n\n\treturn withSchemaValidation(\n\t\tEncodedModularChangeset,\n\t\tmodularChangeCodec,\n\t\tcodecOptions.jsonValidator,\n\t);\n}\n\nfunction getChangeHandler(\n\tfieldKinds: FieldKindConfiguration,\n\tfieldKind: FieldKindIdentifier,\n): FieldChangeHandler<unknown> {\n\tif (fieldKind === genericFieldKind.identifier) {\n\t\treturn genericFieldKind.changeHandler;\n\t}\n\n\tconst handler = fieldKinds.get(fieldKind)?.kind.changeHandler;\n\tassert(handler !== undefined, 0x9c1 /* Unknown field kind */);\n\treturn handler;\n}\n\nfunction encodeRevisionOpt(\n\trevisionCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\trevision: RevisionTag | undefined,\n\tcontext: ChangeEncodingContext,\n): EncodedRevisionTag | undefined {\n\tif (revision === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn revision === context.revision ? undefined : revisionCodec.encode(revision, context);\n}\n\nfunction getFieldToRoots(rootTable: RootNodeTable): FieldRootMap {\n\tconst fieldToRoots: FieldRootMap = newTupleBTree();\n\tfor (const [[revision, localId], nodeId] of rootTable.nodeChanges.entries()) {\n\t\tconst detachId: ChangeAtomId = { revision, localId };\n\t\tconst fieldId = rootTable.detachLocations.getFirst(detachId, 1).value;\n\t\tif (fieldId !== undefined) {\n\t\t\tsetInChangeAtomIdMap(\n\t\t\t\tgetOrAddInFieldRootMap(fieldToRoots, fieldId).nodeChanges,\n\t\t\t\tdetachId,\n\t\t\t\tnodeId,\n\t\t\t);\n\t\t}\n\t}\n\n\tfor (const entry of rootTable.oldToNewId.entries()) {\n\t\tconst fieldId = rootTable.detachLocations.getFirst(entry.start, 1).value;\n\t\tif (fieldId !== undefined) {\n\t\t\tgetOrAddInFieldRootMap(fieldToRoots, fieldId).renames.set(\n\t\t\t\tentry.start,\n\t\t\t\tentry.length,\n\t\t\t\tentry.value,\n\t\t\t);\n\t\t}\n\t}\n\n\treturn fieldToRoots;\n}\n\nfunction getOrAddInFieldRootMap(map: FieldRootMap, fieldId: FieldId): FieldRootChanges {\n\tconst key: FieldIdKey = [fieldId.nodeId?.revision, fieldId.nodeId?.localId, fieldId.field];\n\tconst rootChanges = map.get(key);\n\tif (rootChanges !== undefined) {\n\t\treturn rootChanges;\n\t}\n\n\tconst newRootChanges: FieldRootChanges = {\n\t\tnodeChanges: newTupleBTree(),\n\t\trenames: newChangeAtomIdTransform(),\n\t};\n\tmap.set(key, newRootChanges);\n\treturn newRootChanges;\n}\n\ntype FieldRootMap = TupleBTree<FieldIdKey, FieldRootChanges>;\n\ninterface FieldRootChanges {\n\treadonly nodeChanges: ChangeAtomIdBTree<NodeId>;\n\treadonly renames: ChangeAtomIdRangeMap<ChangeAtomId>;\n}\n"]}
|