@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionalField.js","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalField.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D,kDAS6B;AAE7B,oDAAwD;AACxD,yDAiBoC;AAGpC,qEAAwE;AAE3D,QAAA,qBAAqB,GAA0C;IAC3E,OAAO;IACP,MAAM,EAAE,CACP,MAAyB,EACzB,UAAmB,EACnB,KAAoC,EACpC,QAAiC,EACjC,WAA8B,EACV,EAAE;QACtB,MAAM,QAAQ,GAA+B,EAAE,CAAC;QAChD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;QAE9C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,kBAAkB,GAAG,UAAU;gBACpC,CAAC,CAAC,QAAQ;gBACV,CAAC,CAAC,IAAA,2BAAgB,EAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAEhD,WAAW,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;YAE9E,QAAQ,CAAC,YAAY,GAAG;gBACvB,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,GAAG,KAAK,SAAS;gBAC/C,GAAG,EAAE,IAAA,2BAAgB,EAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,QAAQ,CAAC;gBACjD,GAAG,EAAE,kBAAkB;aACvB,CAAC;QACH,CAAC;QAED,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,KAAK,SAAS,EAAE,CAAC;YAC5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*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ChangeAtomId,\n\ttype ChangesetLocalId,\n\ttype DeltaFieldChanges,\n\ttype DeltaMark,\n\ttype RevisionReplacer,\n\ttype RevisionTag,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n} from \"../../core/index.js\";\nimport type { IdAllocator, Mutable } from \"../../util/index.js\";\nimport { nodeIdFromChangeAtom } from \"../deltaUtils.js\";\nimport {\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype NodeChangeComposer,\n\ttype NodeChangePruner,\n\ttype NodeChangeRebaser,\n\ttype NodeId,\n\ttype ToDelta,\n\ttype NestedChangesIndices,\n\ttype RebaseNodeManager,\n\ttype ComposeNodeManager,\n\ttype InvertNodeManager,\n\ttype CrossFieldKeyRange,\n\tCrossFieldTarget,\n\ttype RebaseVersion,\n\ttype RebaseRevisionMetadata,\n} from \"../modular-schema/index.js\";\n\nimport type { OptionalChangeset, Replace } from \"./optionalFieldChangeTypes.js\";\nimport { makeOptionalFieldCodecFamily } from \"./optionalFieldCodecs.js\";\n\nexport const optionalChangeRebaser: FieldChangeRebaser<OptionalChangeset> = {\n\tcompose,\n\tinvert: (\n\t\tchange: OptionalChangeset,\n\t\tisRollback: boolean,\n\t\tgenId: IdAllocator<ChangesetLocalId>,\n\t\trevision: RevisionTag | undefined,\n\t\tnodeManager: InvertNodeManager,\n\t): OptionalChangeset => {\n\t\tconst inverted: Mutable<OptionalChangeset> = {};\n\t\tconst detachId = getEffectiveDetachId(change);\n\n\t\tif (detachId !== undefined) {\n\t\t\tconst attachIdForInverse = isRollback\n\t\t\t\t? detachId\n\t\t\t\t: makeChangeAtomId(detachId.localId, revision);\n\n\t\t\tnodeManager.invertDetach(detachId, 1, change.childChange, attachIdForInverse);\n\n\t\t\tinverted.valueReplace = {\n\t\t\t\tisEmpty: change.valueReplace?.src === undefined,\n\t\t\t\tdst: makeChangeAtomId(genId.allocate(), revision),\n\t\t\t\tsrc: attachIdForInverse,\n\t\t\t};\n\t\t}\n\n\t\tif (change.valueReplace?.src !== undefined) {\n\t\t\tconst attachEntry = nodeManager.invertAttach(change.valueReplace.src, 1);\n\t\t\tconst detachIdForInverse = invertAttachId(\n\t\t\t\tchange.valueReplace.src,\n\t\t\t\trevision,\n\t\t\t\tisRollback,\n\t\t\t\tattachEntry.value?.detachId,\n\t\t\t);\n\n\t\t\tif (attachEntry.value?.nodeChange !== undefined) {\n\t\t\t\tinverted.childChange = attachEntry.value.nodeChange;\n\t\t\t}\n\n\t\t\t// TODO: Use nodeDetach instead of valueReplace if not supporting older client versions.\n\t\t\t// inverted.nodeDetach = detachIdForInverse;\n\t\t\tif (inverted.valueReplace === undefined) {\n\t\t\t\tinverted.valueReplace = { isEmpty: false, dst: detachIdForInverse };\n\t\t\t} else {\n\t\t\t\t(inverted.valueReplace as Mutable<Replace>).dst = detachIdForInverse;\n\t\t\t}\n\t\t} else if (detachId === undefined && change.childChange !== undefined) {\n\t\t\t// This change does not affect which node is in the field, so its child change should remain here.\n\t\t\tinverted.childChange = change.childChange;\n\t\t}\n\n\t\treturn inverted;\n\t},\n\n\trebase: (\n\t\tnewChange: OptionalChangeset,\n\t\toverChange: OptionalChangeset,\n\t\trebaseChild: NodeChangeRebaser,\n\t\t_genId: IdAllocator,\n\t\tnodeManager: RebaseNodeManager,\n\t\t_metadata: RebaseRevisionMetadata,\n\t\trebaseVersion: RebaseVersion,\n\t): OptionalChangeset => {\n\t\tconst rebased: Mutable<OptionalChangeset> = {};\n\n\t\tconst rebasedChild = rebaseChild(newChange.childChange, overChange.childChange);\n\t\tconst overDetach = getEffectiveDetachId(overChange);\n\t\tif (overDetach !== undefined) {\n\t\t\tconst isPin = areEqualChangeAtomIdOpts(\n\t\t\t\tnewChange.nodeDetach,\n\t\t\t\tnewChange.valueReplace?.src,\n\t\t\t);\n\n\t\t\tconst nodeDetach = rebaseVersion < 2 && !isPin ? undefined : newChange.nodeDetach;\n\t\t\tnodeManager.rebaseOverDetach(overDetach, 1, nodeDetach, rebasedChild);\n\t\t}\n\n\t\tconst overAttach = overChange.valueReplace?.src;\n\t\tif (overAttach !== undefined) {\n\t\t\tconst movedChangeEntry = nodeManager.getNewChangesForBaseAttach(overAttach, 1).value;\n\n\t\t\tif (movedChangeEntry?.nodeChange !== undefined) {\n\t\t\t\trebased.childChange = movedChangeEntry.nodeChange;\n\t\t\t}\n\n\t\t\tif (movedChangeEntry?.detachId !== undefined) {\n\t\t\t\trebased.nodeDetach = movedChangeEntry.detachId;\n\t\t\t\tif (rebased.valueReplace !== undefined) {\n\t\t\t\t\t// Now that the rebased change has a node detach,\n\t\t\t\t\t// the detach from the value replace no longer takes effect.\n\t\t\t\t\tnodeManager.removeDetach(rebased.valueReplace.dst, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (overDetach === undefined) {\n\t\t\t// `overChange` did not change which node is in the field.\n\t\t\tif (rebasedChild !== undefined) {\n\t\t\t\trebased.childChange = rebasedChild;\n\t\t\t}\n\n\t\t\tif (newChange.nodeDetach !== undefined) {\n\t\t\t\trebased.nodeDetach = newChange.nodeDetach;\n\t\t\t}\n\t\t}\n\n\t\tif (newChange.valueReplace !== undefined) {\n\t\t\tconst isEmpty =\n\t\t\t\toverDetach !== undefined || overChange.valueReplace !== undefined\n\t\t\t\t\t? overChange.valueReplace?.src === undefined\n\t\t\t\t\t: newChange.valueReplace.isEmpty;\n\n\t\t\trebased.valueReplace = { ...newChange.valueReplace, isEmpty };\n\t\t}\n\n\t\tconst detachId = getEffectiveDetachId(newChange);\n\t\tconst rebasedDetachId = getEffectiveDetachId(rebased);\n\n\t\tif (detachId !== undefined && !areEqualChangeAtomIdOpts(detachId, rebasedDetachId)) {\n\t\t\tnodeManager.removeDetach(detachId, 1);\n\t\t}\n\n\t\tif (\n\t\t\trebasedDetachId !== undefined &&\n\t\t\t!areEqualChangeAtomIdOpts(rebasedDetachId, detachId)\n\t\t) {\n\t\t\tnodeManager.addDetach(rebasedDetachId, 1);\n\t\t}\n\n\t\treturn rebased;\n\t},\n\n\tprune: (change: OptionalChangeset, pruneChild: NodeChangePruner): OptionalChangeset => {\n\t\tconst prunedChange: Mutable<OptionalChangeset> = { ...change };\n\n\t\tdelete prunedChange.childChange;\n\t\tif (change.childChange !== undefined) {\n\t\t\tconst childChange = pruneChild(change.childChange);\n\t\t\tif (childChange !== undefined) {\n\t\t\t\tprunedChange.childChange = childChange;\n\t\t\t}\n\t\t}\n\n\t\treturn prunedChange;\n\t},\n\n\treplaceRevisions: (\n\t\tchange: OptionalChangeset,\n\t\treplacer: RevisionReplacer,\n\t): OptionalChangeset => {\n\t\tconst updated: Mutable<OptionalChangeset> = {};\n\n\t\tconst valueReplace = replaceReplaceRevisions(change.valueReplace, replacer);\n\n\t\tif (change.childChange !== undefined) {\n\t\t\tupdated.childChange = replacer.getUpdatedAtomId(change.childChange);\n\t\t}\n\n\t\tif (valueReplace !== undefined) {\n\t\t\tupdated.valueReplace = valueReplace;\n\t\t}\n\n\t\treturn updated;\n\t},\n\n\tmute: (change: OptionalChangeset): OptionalChangeset => {\n\t\treturn { childChange: change.childChange };\n\t},\n};\n\nfunction compose(\n\tchange1: OptionalChangeset,\n\tchange2: OptionalChangeset,\n\tcomposeChild: NodeChangeComposer,\n\t_genId: IdAllocator,\n\tnodeManager: ComposeNodeManager,\n): OptionalChangeset {\n\tconst detachId2 = getEffectiveDetachId(change2);\n\tif (change1.valueReplace?.src !== undefined && detachId2 !== undefined) {\n\t\tnodeManager.composeAttachDetach(change1.valueReplace.src, detachId2, 1);\n\t}\n\n\tconst composedDetach = composeNodeDetaches(change1, change2, nodeManager);\n\tconst composedReplace = composeReplaces(change1, change2);\n\tconst composedChildChange = getComposedChildChanges(\n\t\tchange1,\n\t\tchange2,\n\t\tnodeManager,\n\t\tcomposeChild,\n\t);\n\n\tsendNewChildChanges(change1, change2, nodeManager);\n\n\tif (\n\t\tchange1.nodeDetach !== undefined &&\n\t\tareEqualChangeAtomIdOpts(change1.nodeDetach, change2.valueReplace?.src)\n\t) {\n\t\tnodeManager.composeDetachAttach(change1.nodeDetach, change1.nodeDetach, 1, true);\n\t}\n\n\treturn makeChangeset(composedReplace, composedDetach, composedChildChange);\n}\n\nfunction composeNodeDetaches(\n\tchange1: OptionalChangeset,\n\tchange2: OptionalChangeset,\n\tnodeManager: ComposeNodeManager,\n): ChangeAtomId | undefined {\n\tconst detach1 = getEffectiveDetachId(change1);\n\tif (detach1 !== undefined) {\n\t\tconst newDetachId = nodeManager.getNewChangesForBaseDetach(detach1, 1).value?.detachId;\n\t\tif (newDetachId !== undefined) {\n\t\t\treturn newDetachId;\n\t\t}\n\t}\n\n\tif (change1.nodeDetach !== undefined) {\n\t\treturn change1.nodeDetach;\n\t}\n\n\treturn detach1 !== undefined || change1.valueReplace?.isEmpty === true\n\t\t? undefined\n\t\t: change2.nodeDetach;\n}\n\nfunction composeReplaces(\n\tchange1: OptionalChangeset,\n\tchange2: OptionalChangeset,\n): Replace | undefined {\n\tconst firstReplace = change1.valueReplace ?? change2.valueReplace;\n\tif (firstReplace === undefined) {\n\t\treturn undefined;\n\t}\n\n\tconst isEmpty = change1.nodeDetach === undefined ? firstReplace.isEmpty : false;\n\tconst replace: Mutable<Replace> = { isEmpty, dst: firstReplace.dst };\n\tif (change2.valueReplace?.src !== undefined) {\n\t\treplace.src = change2.valueReplace.src;\n\t} else if (\n\t\tgetEffectiveDetachId(change2) === undefined &&\n\t\tchange1.valueReplace?.src !== undefined\n\t) {\n\t\treplace.src = change1.valueReplace.src;\n\t}\n\n\treturn replace;\n}\n\n/**\n * Informs the node manager of any child changes in `change2` that may need to be represented somewhere else in the input context of the composed changeset.\n * See {@link ComposeNodeManager.sendNewChangesToBaseSourceLocation} for motivation.\n * @param change1 - The first change to compose. Conceptually applies before `change2`.\n * @param change2 - The second change to compose. Conceptually applies after `change1`.\n * @param nodeManager - The node manager that needs to be informed of the child changes.\n */\nfunction sendNewChildChanges(\n\tchange1: OptionalChangeset,\n\tchange2: OptionalChangeset,\n\tnodeManager: ComposeNodeManager,\n): void {\n\tif (change2.childChange !== undefined && change1.valueReplace?.src !== undefined) {\n\t\t// The presence of new child implies that there is some node present in the field in the input context of change2.\n\t\t// The fact that the change1 has a shallow effect implies that this node was attached by change1.\n\t\tnodeManager.sendNewChangesToBaseSourceLocation(\n\t\t\tchange1.valueReplace.src,\n\t\t\tchange2.childChange,\n\t\t);\n\t}\n}\n\n/**\n * Computes the child changes that should be included in the composed changeset.\n * @param change1 - The first change to compose. Conceptually applies before `change2`.\n * @param change2 - The second change to compose. Conceptually applies after `change1`.\n * @param nodeManager - The node manager. Provides information about potential child changes from `change2`.\n * @param composeChild - The delegate to compose child changes.\n * @returns The composed child changes (if any) for the node (if any) present in the field in the input context of `change1`.\n */\nfunction getComposedChildChanges(\n\tchange1: OptionalChangeset,\n\tchange2: OptionalChangeset,\n\tnodeManager: ComposeNodeManager,\n\tcomposeChild: NodeChangeComposer,\n): NodeId | undefined {\n\tconst detachId1 = getEffectiveDetachId(change1);\n\n\t// We need to determine what the child changes are in change2 for the node (if any) that resides in the field in the input context of change1.\n\tconst childChangesFromChange2: NodeId | undefined =\n\t\t// If such a node did exist, the changes for it in change2 would come from wherever change1 sends that node.\n\t\t// Note: in both branches of this ternary, we are leveraging the fact querying for changes of a non-existent node safely yields undefined\n\t\tdetachId1 === undefined\n\t\t\t? change1.valueReplace?.src === undefined\n\t\t\t\t? change2.childChange\n\t\t\t\t: undefined\n\t\t\t: nodeManager.getNewChangesForBaseDetach(detachId1, 1).value?.nodeChange;\n\n\tlet composedChildChange: NodeId | undefined;\n\tif (change1.childChange !== undefined || childChangesFromChange2 !== undefined) {\n\t\tcomposedChildChange = composeChild(change1.childChange, childChangesFromChange2);\n\t}\n\treturn composedChildChange;\n}\n\nfunction makeChangeset(\n\treplace: Replace | undefined,\n\tdetachId: ChangeAtomId | undefined,\n\tchildChange: NodeId | undefined,\n): OptionalChangeset {\n\tconst changeset: Mutable<OptionalChangeset> = {};\n\tif (replace !== undefined) {\n\t\tchangeset.valueReplace = replace;\n\t}\n\n\tif (detachId !== undefined) {\n\t\tchangeset.nodeDetach = detachId;\n\t}\n\n\tif (childChange !== undefined) {\n\t\tchangeset.childChange = childChange;\n\t}\n\treturn changeset;\n}\n\nfunction replaceReplaceRevisions(\n\treplace: Replace | undefined,\n\treplacer: RevisionReplacer,\n): Replace | undefined {\n\tif (replace === undefined) {\n\t\treturn undefined;\n\t}\n\n\tconst updated: Mutable<Replace> = {\n\t\t...replace,\n\t\tdst: replacer.getUpdatedAtomId(replace.dst),\n\t};\n\n\tif (replace.src !== undefined) {\n\t\tupdated.src = replacer.getUpdatedAtomId(replace.src);\n\t}\n\n\treturn updated;\n}\n\nfunction getEffectiveDetachId(change: OptionalChangeset): ChangeAtomId | undefined {\n\tif (change.nodeDetach !== undefined) {\n\t\treturn change.nodeDetach;\n\t}\n\n\treturn change.valueReplace?.isEmpty === false ? change.valueReplace.dst : undefined;\n}\n\nexport interface OptionalFieldEditor extends FieldEditor<OptionalChangeset> {\n\t/**\n\t * Creates a change which will replace the content already in the field (if any at the time the change applies)\n\t * with new content.\n\t * The content in the field will be moved to the `ids.detach` register.\n\t * The content in the `ids.detach` register will be moved to into the field.\n\t * @param wasEmpty - whether the field is empty when creating this change\n\t * @param ids - the \"fill\" and \"detach\" ids associated with the change.\n\t */\n\tset(\n\t\twasEmpty: boolean,\n\t\tids: {\n\t\t\tfill: ChangeAtomId;\n\t\t\tdetach: ChangeAtomId;\n\t\t\tdetachNode?: ChangeAtomId;\n\t\t},\n\t): OptionalChangeset;\n\n\t/**\n\t * Creates a change which clears the field's contents (if any).\n\t * @param wasEmpty - whether the field is empty when creating this change\n\t * @param detachId - the ID of the register that existing field content (if any) will be moved to.\n\t */\n\tclear(wasEmpty: boolean, detachId: ChangeAtomId): OptionalChangeset;\n}\n\nexport const optionalFieldEditor: OptionalFieldEditor = {\n\tset: (\n\t\twasEmpty: boolean,\n\t\tids: {\n\t\t\tfill: ChangeAtomId;\n\t\t\t// Should be interpreted as a set of an empty field if undefined.\n\t\t\tdetach: ChangeAtomId;\n\t\t\tdetachNode?: ChangeAtomId;\n\t\t},\n\t): OptionalChangeset => ({\n\t\tvalueReplace: {\n\t\t\tisEmpty: wasEmpty,\n\t\t\tsrc: ids.fill,\n\t\t\tdst: ids.detach,\n\t\t},\n\t\tnodeDetach: ids.detachNode,\n\t}),\n\n\tclear: (wasEmpty: boolean, detachId: ChangeAtomId): OptionalChangeset => ({\n\t\tvalueReplace: {\n\t\t\tisEmpty: wasEmpty,\n\t\t\tdst: detachId,\n\t\t},\n\t}),\n\n\tbuildChildChanges: (changes: Iterable<[number, NodeId]>): OptionalChangeset => {\n\t\tconst childChanges: NodeId[] = Array.from(changes, ([index, child]) => {\n\t\t\tassert(index === 0, 0x404 /* Optional fields only support a single child node */);\n\t\t\treturn child;\n\t\t});\n\t\tassert(\n\t\t\tchildChanges.length <= 1,\n\t\t\t0xabd /* Optional fields only support a single child node */,\n\t\t);\n\n\t\tconst childChange = childChanges[0];\n\t\treturn childChange === undefined ? {} : { childChange };\n\t},\n};\n\nexport function optionalFieldIntoDelta(\n\tchange: OptionalChangeset,\n\tdeltaFromChild: ToDelta,\n): DeltaFieldChanges {\n\tlet markIsANoop = true;\n\tconst mark: Mutable<DeltaMark> = { count: 1 };\n\tconst detachId = getEffectiveDetachId(change);\n\tconst attachId = change.valueReplace?.src;\n\tif (detachId !== undefined && !areEqualChangeAtomIdOpts(detachId, attachId)) {\n\t\tmark.detach = nodeIdFromChangeAtom(detachId);\n\t\tmarkIsANoop = false;\n\t}\n\n\tif (attachId !== undefined && !areEqualChangeAtomIdOpts(attachId, detachId)) {\n\t\tmark.attach = nodeIdFromChangeAtom(attachId);\n\t\tmarkIsANoop = false;\n\t}\n\n\tif (change.childChange !== undefined) {\n\t\tmark.fields = deltaFromChild(change.childChange);\n\t\tmarkIsANoop = false;\n\t}\n\n\treturn markIsANoop ? [] : [mark];\n}\n\nexport const optionalChangeHandler: FieldChangeHandler<\n\tOptionalChangeset,\n\tOptionalFieldEditor\n> = {\n\trebaser: optionalChangeRebaser,\n\tcodecsFactory: makeOptionalFieldCodecFamily,\n\teditor: optionalFieldEditor,\n\n\tintoDelta: optionalFieldIntoDelta,\n\n\tisEmpty: (change: OptionalChangeset) =>\n\t\tchange.childChange === undefined &&\n\t\tchange.valueReplace === undefined &&\n\t\tchange.nodeDetach === undefined,\n\n\tgetNestedChanges,\n\n\tcreateEmpty: () => ({}),\n\tgetCrossFieldKeys,\n};\n\nfunction getCrossFieldKeys(change: OptionalChangeset): CrossFieldKeyRange[] {\n\tconst keys: CrossFieldKeyRange[] = [];\n\tif (change.valueReplace?.src !== undefined) {\n\t\tkeys.push({\n\t\t\tkey: { ...change.valueReplace.src, target: CrossFieldTarget.Destination },\n\t\t\tcount: 1,\n\t\t});\n\t}\n\n\tconst detachId = getEffectiveDetachId(change);\n\n\tif (detachId !== undefined) {\n\t\tkeys.push({ key: { ...detachId, target: CrossFieldTarget.Source }, count: 1 });\n\t}\n\n\treturn keys;\n}\n\nfunction getNestedChanges(change: OptionalChangeset): NestedChangesIndices {\n\tif (change.childChange === undefined) {\n\t\treturn [];\n\t}\n\n\treturn [[change.childChange, 0]];\n}\n\nfunction invertAttachId(\n\tattachId: ChangeAtomId,\n\trevision: RevisionTag | undefined,\n\tisRollback: boolean,\n\tdetachId: ChangeAtomId | undefined,\n): ChangeAtomId {\n\tif (!isRollback) {\n\t\treturn makeChangeAtomId(attachId.localId, revision);\n\t}\n\n\treturn detachId ?? attachId;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"optionalField.js","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalField.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D,kDAc6B;AAC7B,kDAO6B;AAC7B,oDAAwD;AACxD,wEAI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cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;YAC9C,cAAc,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YAC7B,MAAM,IAAA,oCAAoB,EAAC,EAAE,CAAC,CAAC;QAChC,CAAC;QACD,KAAK,CAAC,CAAC,6BAA6B,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC;IACzC,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;QACjF,MAAM,IAAA,oCAAoB,EAAC,OAAO,CAAC,CAAC;IACrC,CAAC;AACF,CAAC;AASD;;GAEG;AACU,QAAA,QAAQ,GAAa,IAAI,wBAAa,CAClD,4CAAkB,EAClB,uBAAY,CAAC,QAAQ,EACrB;IACC,aAAa,EAAE,6BAAqB;IACpC,yBAAyB,EAAE,IAAI,GAAG,CAAC;QAClC,mDAAyB;QACzB,4CAAkB;QAClB,uCAA4B;KAC5B,CAAC;CACF,CACD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype ChangesetLocalId,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaMark,\n\tMultiplicity,\n\ttype RevisionReplacer,\n\ttype RevisionTag,\n\tareEqualChangeAtomIds,\n\tforbiddenFieldKindIdentifier,\n\tmakeChangeAtomId,\n\ttaggedAtomId,\n} from \"../../core/index.js\";\nimport {\n\ttype IdAllocator,\n\ttype Mutable,\n\tSizedNestedMap,\n\tdeleteFromNestedMap,\n\tsetInNestedMap,\n\ttryGetFromNestedMap,\n} from \"../../util/index.js\";\nimport { nodeIdFromChangeAtom } from \"../deltaUtils.js\";\nimport {\n\toptionalIdentifier,\n\tidentifierFieldIdentifier,\n\trequiredIdentifier,\n} from \"../fieldKindIdentifiers.js\";\nimport {\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype NodeChangeComposer,\n\ttype NodeChangePruner,\n\ttype NodeChangeRebaser,\n\tNodeAttachState,\n\ttype NodeId,\n\ttype RelevantRemovedRootsFromChild,\n\ttype ToDelta,\n\ttype NestedChangesIndices,\n\ttype FieldChangeDelta,\n\tFlexFieldKind,\n} from \"../modular-schema/index.js\";\n\nimport type {\n\tChildChange,\n\tMove,\n\tOptionalChangeset,\n\tRegisterId,\n\tReplace,\n} from \"./optionalFieldChangeTypes.js\";\nimport { makeOptionalFieldCodecFamily } from \"./optionalFieldCodecs.js\";\n\nexport interface IRegisterMap<T> {\n\tset(id: RegisterId, childChange: T): void;\n\tget(id: RegisterId): T | undefined;\n\tdelete(id: RegisterId): boolean;\n\tkeys(): Iterable<RegisterId>;\n\tvalues(): Iterable<T>;\n\tentries(): Iterable<[RegisterId, T]>;\n\treadonly size: number;\n}\n\nexport class RegisterMap<T> implements IRegisterMap<T> {\n\tprivate readonly nestedMapData = new SizedNestedMap<\n\t\tChangesetLocalId | \"self\",\n\t\tRevisionTag | undefined,\n\t\tT\n\t>();\n\n\tpublic clone(): RegisterMap<T> {\n\t\tconst clone = new RegisterMap<T>();\n\t\tfor (const [id, t] of this.entries()) {\n\t\t\tclone.set(id, t);\n\t\t}\n\t\treturn clone;\n\t}\n\n\tpublic set(id: RegisterId, childChange: T): void {\n\t\tif (id === \"self\") {\n\t\t\tthis.nestedMapData.set(\"self\", undefined, childChange);\n\t\t} else {\n\t\t\tthis.nestedMapData.set(id.localId, id.revision, childChange);\n\t\t}\n\t}\n\n\tpublic get(id: RegisterId): T | undefined {\n\t\treturn id === \"self\"\n\t\t\t? this.nestedMapData.tryGet(id, undefined)\n\t\t\t: this.nestedMapData.tryGet(id.localId, id.revision);\n\t}\n\n\tpublic has(id: RegisterId): boolean {\n\t\treturn this.get(id) !== undefined;\n\t}\n\n\tpublic delete(id: RegisterId): boolean {\n\t\treturn id === \"self\"\n\t\t\t? this.nestedMapData.delete(\"self\", undefined)\n\t\t\t: this.nestedMapData.delete(id.localId, id.revision);\n\t}\n\n\tpublic keys(): Iterable<RegisterId> {\n\t\tconst changeIds: RegisterId[] = [];\n\t\tfor (const [localId, nestedMap] of this.nestedMapData) {\n\t\t\tif (localId === \"self\") {\n\t\t\t\tchangeIds.push(\"self\");\n\t\t\t} else {\n\t\t\t\tfor (const [revisionTag, _] of nestedMap) {\n\t\t\t\t\tchangeIds.push(\n\t\t\t\t\t\trevisionTag === undefined ? { localId } : { localId, revision: revisionTag },\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn changeIds;\n\t}\n\tpublic values(): Iterable<T> {\n\t\treturn this.nestedMapData.values();\n\t}\n\tpublic entries(): Iterable<[RegisterId, T]> {\n\t\tconst entries: [RegisterId, T][] = [];\n\t\tfor (const changeId of this.keys()) {\n\t\t\tif (changeId === \"self\") {\n\t\t\t\tconst entry = this.nestedMapData.tryGet(\"self\", undefined);\n\t\t\t\tassert(\n\t\t\t\t\tentry !== undefined,\n\t\t\t\t\t0x770 /* Entry should not be undefined when iterating keys. */,\n\t\t\t\t);\n\t\t\t\tentries.push([\"self\", entry]);\n\t\t\t} else {\n\t\t\t\tconst entry = this.nestedMapData.tryGet(changeId.localId, changeId.revision);\n\t\t\t\tassert(\n\t\t\t\t\tentry !== undefined,\n\t\t\t\t\t0x771 /* Entry should not be undefined when iterating keys. */,\n\t\t\t\t);\n\t\t\t\tentries.push([changeId, entry]);\n\t\t\t}\n\t\t}\n\n\t\treturn entries;\n\t}\n\tpublic get size(): number {\n\t\treturn this.nestedMapData.size;\n\t}\n}\n\nexport const optionalChangeRebaser: FieldChangeRebaser<OptionalChangeset> = {\n\tcompose: (\n\t\tchange1: OptionalChangeset,\n\t\tchange2: OptionalChangeset,\n\t\tcomposeChild: NodeChangeComposer,\n\t): OptionalChangeset => {\n\t\tconst { srcToDst, dstToSrc } = getBidirectionalMaps(change1.moves);\n\t\tconst change1FieldSrc = change1.valueReplace?.src;\n\t\tconst change1FieldDst = getEffectfulDst(change1.valueReplace);\n\n\t\tconst change2FieldSrc = change2.valueReplace?.src;\n\t\tlet composedFieldSrc: RegisterId | undefined;\n\t\tif (change2FieldSrc !== undefined) {\n\t\t\tif (change2FieldSrc === \"self\") {\n\t\t\t\tcomposedFieldSrc = change1FieldSrc ?? change2FieldSrc;\n\t\t\t} else if (\n\t\t\t\tchange1FieldDst !== undefined &&\n\t\t\t\tareEqualRegisterIds(change1FieldDst, change2FieldSrc)\n\t\t\t) {\n\t\t\t\tcomposedFieldSrc = \"self\";\n\t\t\t} else {\n\t\t\t\tcomposedFieldSrc =\n\t\t\t\t\ttryGetFromNestedMap(dstToSrc, change2FieldSrc.revision, change2FieldSrc.localId) ??\n\t\t\t\t\tchange2FieldSrc;\n\t\t\t}\n\t\t} else if (change1FieldSrc !== undefined && change2.valueReplace === undefined) {\n\t\t\tcomposedFieldSrc = change1FieldSrc;\n\t\t}\n\n\t\tconst childChanges2ByOriginalId = new RegisterMap<NodeId>();\n\t\tfor (const [id, change] of change2.childChanges) {\n\t\t\tif (id === \"self\") {\n\t\t\t\tif (change1FieldSrc === undefined) {\n\t\t\t\t\tchildChanges2ByOriginalId.set(\"self\", change);\n\t\t\t\t} else {\n\t\t\t\t\tchildChanges2ByOriginalId.set(change1FieldSrc, change);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (change1FieldDst !== undefined && areEqualChangeAtomIds(change1FieldDst, id)) {\n\t\t\t\t\tchildChanges2ByOriginalId.set(\"self\", change);\n\t\t\t\t} else {\n\t\t\t\t\tconst originalId = tryGetFromNestedMap(dstToSrc, id.revision, id.localId);\n\t\t\t\t\tchildChanges2ByOriginalId.set(originalId ?? id, change);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst composedMoves: Move[] = [];\n\t\tconst composedChildChanges: ChildChange[] = [];\n\t\tconst composed: Mutable<OptionalChangeset> = {\n\t\t\tmoves: composedMoves,\n\t\t\tchildChanges: composedChildChanges,\n\t\t};\n\n\t\tfor (const [id, childChange1] of change1.childChanges) {\n\t\t\tconst childChange2 = childChanges2ByOriginalId.get(id);\n\t\t\tcomposedChildChanges.push([id, composeChild(childChange1, childChange2)]);\n\t\t\tchildChanges2ByOriginalId.delete(id);\n\t\t}\n\n\t\tfor (const [id, childChange2] of childChanges2ByOriginalId.entries()) {\n\t\t\tcomposedChildChanges.push([id, composeChild(undefined, childChange2)]);\n\t\t}\n\n\t\tfor (const [leg2Src, leg2Dst] of change2.moves) {\n\t\t\tconst leg1Src = tryGetFromNestedMap(dstToSrc, leg2Src.revision, leg2Src.localId);\n\t\t\tif (leg1Src !== undefined) {\n\t\t\t\tcomposedMoves.push([leg1Src, leg2Dst]);\n\t\t\t\tdeleteFromNestedMap(srcToDst, leg1Src.revision, leg1Src.localId);\n\t\t\t\tdeleteFromNestedMap(dstToSrc, leg2Src.revision, leg2Src.localId);\n\t\t\t} else if (\n\t\t\t\tchange1FieldDst === undefined ||\n\t\t\t\t!areEqualChangeAtomIds(change1FieldDst, leg2Src)\n\t\t\t) {\n\t\t\t\tcomposedMoves.push([leg2Src, leg2Dst]);\n\t\t\t}\n\t\t}\n\n\t\tfor (const [revision, innerMap] of srcToDst.entries()) {\n\t\t\tfor (const [localId, dst] of innerMap.entries()) {\n\t\t\t\tconst src = makeChangeAtomId(localId, revision);\n\t\t\t\tif (composedFieldSrc === undefined || !areEqualRegisterIds(src, composedFieldSrc)) {\n\t\t\t\t\tcomposedMoves.push([src, dst]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\tchange1FieldSrc !== undefined &&\n\t\t\tchange1FieldSrc !== \"self\" &&\n\t\t\tchange2.valueReplace !== undefined\n\t\t) {\n\t\t\tconst change2FieldDst = change2.valueReplace.dst;\n\t\t\tif (\n\t\t\t\tisReplaceEffectful(change2.valueReplace) &&\n\t\t\t\t!areEqualChangeAtomIds(change1FieldSrc, change2FieldDst)\n\t\t\t) {\n\t\t\t\tcomposedMoves.push([change1FieldSrc, change2FieldDst]);\n\t\t\t}\n\t\t}\n\n\t\tconst firstChange = change1.valueReplace ?? change2.valueReplace;\n\t\tif (firstChange === undefined) {\n\t\t\treturn composed;\n\t\t}\n\n\t\tconst replace: Mutable<Replace> = {\n\t\t\tisEmpty: firstChange.isEmpty,\n\t\t\tdst: getComposedReplaceDst(change1.valueReplace, change2),\n\t\t};\n\t\tif (composedFieldSrc !== undefined) {\n\t\t\treplace.src = composedFieldSrc;\n\t\t}\n\t\tcomposed.valueReplace = replace;\n\t\treturn composed;\n\t},\n\n\tinvert: (\n\t\tchange: OptionalChangeset,\n\t\tisRollback: boolean,\n\t\tgenId: IdAllocator<ChangesetLocalId>,\n\t\trevision: RevisionTag | undefined,\n\t): OptionalChangeset => {\n\t\tconst { moves, childChanges, valueReplace } = change;\n\n\t\tconst invertIdMap = new RegisterMap<RegisterId>();\n\t\tconst invertedMoves: Move[] = [];\n\t\tfor (const [src, dst] of moves) {\n\t\t\tinvertIdMap.set(src, dst);\n\t\t\tinvertedMoves.push([dst, src]);\n\t\t}\n\t\tif (valueReplace !== undefined) {\n\t\t\tconst effectfulDst = getEffectfulDst(valueReplace);\n\t\t\tif (effectfulDst !== undefined) {\n\t\t\t\tinvertIdMap.set(\"self\", valueReplace.dst);\n\t\t\t}\n\t\t\tif (valueReplace.src !== undefined) {\n\t\t\t\tinvertIdMap.set(valueReplace.src, \"self\");\n\t\t\t}\n\t\t}\n\n\t\tconst inverted: Mutable<OptionalChangeset> = {\n\t\t\tmoves: invertedMoves,\n\t\t\tchildChanges: childChanges.map(([id, childChange]) => {\n\t\t\t\treturn [invertIdMap.get(id) ?? id, childChange];\n\t\t\t}),\n\t\t};\n\n\t\tif (valueReplace !== undefined) {\n\t\t\tif (isReplaceEffectful(valueReplace)) {\n\t\t\t\tconst replace: Mutable<Replace> =\n\t\t\t\t\tvalueReplace.src === undefined\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tisEmpty: true,\n\t\t\t\t\t\t\t\tdst: makeChangeAtomId(genId.allocate(), revision),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tisEmpty: false,\n\t\t\t\t\t\t\t\tdst: isRollback\n\t\t\t\t\t\t\t\t\t? valueReplace.src\n\t\t\t\t\t\t\t\t\t: makeChangeAtomId(genId.allocate(), revision),\n\t\t\t\t\t\t\t};\n\t\t\t\tif (valueReplace.isEmpty === false) {\n\t\t\t\t\treplace.src = valueReplace.dst;\n\t\t\t\t}\n\t\t\t\tinverted.valueReplace = replace;\n\t\t\t} else if (!isRollback && valueReplace.src === \"self\") {\n\t\t\t\tinverted.valueReplace = {\n\t\t\t\t\tisEmpty: false,\n\t\t\t\t\tsrc: \"self\",\n\t\t\t\t\tdst: makeChangeAtomId(genId.allocate(), revision),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn inverted;\n\t},\n\n\trebase: (\n\t\tchange: OptionalChangeset,\n\t\toverChange: OptionalChangeset,\n\t\trebaseChild: NodeChangeRebaser,\n\t): OptionalChangeset => {\n\t\tconst { moves, childChanges, valueReplace: field } = change;\n\n\t\t// TODO: avoid computing the dstToSrc map if it's not needed.\n\t\t// TODO: de-dupe overSrcToDst and forwardMap\n\t\tconst { srcToDst: overSrcToDst } = getBidirectionalMaps(overChange.moves);\n\n\t\tconst forwardMap = new RegisterMap<RegisterId>();\n\t\tfor (const [src, dst] of overChange.moves) {\n\t\t\tforwardMap.set(src, dst);\n\t\t}\n\t\tif (overChange.valueReplace !== undefined) {\n\t\t\tconst effectfulDst = getEffectfulDst(overChange.valueReplace);\n\t\t\tif (effectfulDst !== undefined) {\n\t\t\t\tforwardMap.set(\"self\", overChange.valueReplace.dst);\n\t\t\t}\n\t\t\tif (overChange.valueReplace.src !== undefined) {\n\t\t\t\tforwardMap.set(overChange.valueReplace.src, \"self\");\n\t\t\t}\n\t\t}\n\n\t\tconst rebasedMoves: Move[] = [];\n\t\tfor (const [src, dst] of moves) {\n\t\t\tconst newDst = tryGetFromNestedMap(overSrcToDst, src.revision, src.localId);\n\t\t\trebasedMoves.push([src, newDst ?? dst]);\n\t\t}\n\n\t\tconst overChildChangesBySrc = new RegisterMap<NodeId>();\n\t\tfor (const [id, childChange] of overChange.childChanges) {\n\t\t\toverChildChangesBySrc.set(id, childChange);\n\t\t}\n\n\t\tconst rebasedChildChanges: ChildChange[] = [];\n\t\tfor (const [id, childChange] of childChanges) {\n\t\t\tconst overChildChange = overChildChangesBySrc.get(id);\n\t\t\tif (overChildChange !== undefined) {\n\t\t\t\toverChildChangesBySrc.delete(id);\n\t\t\t}\n\n\t\t\tconst rebasedId = forwardMap.get(id) ?? id;\n\t\t\tconst rebasedChildChange = rebaseChild(\n\t\t\t\tchildChange,\n\t\t\t\toverChildChange,\n\t\t\t\trebasedId === \"self\" ? NodeAttachState.Attached : NodeAttachState.Detached,\n\t\t\t);\n\t\t\tif (rebasedChildChange !== undefined) {\n\t\t\t\trebasedChildChanges.push([rebasedId, rebasedChildChange]);\n\t\t\t}\n\t\t}\n\n\t\tfor (const [id, overChildChange] of overChildChangesBySrc.entries()) {\n\t\t\tconst rebasedId = forwardMap.get(id) ?? id;\n\t\t\tconst rebasedChildChange = rebaseChild(\n\t\t\t\tundefined,\n\t\t\t\toverChildChange,\n\t\t\t\trebasedId === \"self\" ? NodeAttachState.Attached : NodeAttachState.Detached,\n\t\t\t);\n\t\t\tif (rebasedChildChange !== undefined) {\n\t\t\t\trebasedChildChanges.push([rebasedId, rebasedChildChange]);\n\t\t\t}\n\t\t}\n\n\t\tconst rebased: Mutable<OptionalChangeset> = {\n\t\t\tmoves: rebasedMoves,\n\t\t\tchildChanges: rebasedChildChanges,\n\t\t};\n\n\t\tif (field !== undefined) {\n\t\t\tconst replace: Mutable<Replace> = {\n\t\t\t\tisEmpty:\n\t\t\t\t\toverChange.valueReplace === undefined\n\t\t\t\t\t\t? field.isEmpty\n\t\t\t\t\t\t: overChange.valueReplace.src === undefined,\n\t\t\t\tdst: field.dst,\n\t\t\t};\n\t\t\tif (field.src !== undefined) {\n\t\t\t\treplace.src = forwardMap.get(field.src) ?? field.src;\n\t\t\t}\n\t\t\trebased.valueReplace = replace;\n\t\t}\n\n\t\treturn rebased;\n\t},\n\n\tprune: (change: OptionalChangeset, pruneChild: NodeChangePruner): OptionalChangeset => {\n\t\tconst childChanges: ChildChange[] = [];\n\t\tconst prunedChange: Mutable<OptionalChangeset> = {\n\t\t\tmoves: change.moves,\n\t\t\tchildChanges,\n\t\t};\n\t\tif (change.valueReplace !== undefined) {\n\t\t\tprunedChange.valueReplace = change.valueReplace;\n\t\t}\n\n\t\tfor (const [id, childChange] of change.childChanges) {\n\t\t\tconst prunedChildChange = pruneChild(childChange);\n\t\t\tif (prunedChildChange !== undefined) {\n\t\t\t\tchildChanges.push([id, prunedChildChange]);\n\t\t\t}\n\t\t}\n\n\t\treturn prunedChange;\n\t},\n\n\treplaceRevisions: (\n\t\tchange: OptionalChangeset,\n\t\treplacer: RevisionReplacer,\n\t): OptionalChangeset => {\n\t\tconst valueReplace = replaceReplaceRevisions(change.valueReplace, replacer);\n\n\t\tconst childChanges: ChildChange[] = [];\n\t\tfor (const [id, childChange] of change.childChanges) {\n\t\t\tchildChanges.push([\n\t\t\t\treplaceRegisterRevisions(id, replacer),\n\t\t\t\treplacer.getUpdatedAtomId(childChange),\n\t\t\t]);\n\t\t}\n\n\t\tconst moves: Move[] = [];\n\t\tfor (const [src, dst] of change.moves) {\n\t\t\tmoves.push([replacer.getUpdatedAtomId(src), replacer.getUpdatedAtomId(dst)]);\n\t\t}\n\n\t\tconst updated: Mutable<OptionalChangeset> = { childChanges, moves };\n\t\tif (valueReplace !== undefined) {\n\t\t\tupdated.valueReplace = valueReplace;\n\t\t}\n\n\t\treturn updated;\n\t},\n\n\tmute: (change: OptionalChangeset): OptionalChangeset => {\n\t\treturn { childChanges: change.childChanges, moves: [] };\n\t},\n};\n\nfunction replaceReplaceRevisions(\n\treplace: Replace | undefined,\n\treplacer: RevisionReplacer,\n): Replace | undefined {\n\tif (replace === undefined) {\n\t\treturn undefined;\n\t}\n\n\tconst updated: Mutable<Replace> = {\n\t\t...replace,\n\t\tdst: replacer.getUpdatedAtomId(replace.dst),\n\t};\n\n\tif (replace.src !== undefined) {\n\t\tupdated.src = replaceRegisterRevisions(replace.src, replacer);\n\t}\n\n\treturn updated;\n}\n\nfunction replaceRegisterRevisions(\n\tregister: RegisterId,\n\treplacer: RevisionReplacer,\n): RegisterId {\n\treturn register === \"self\" ? register : replacer.getUpdatedAtomId(register);\n}\n\nfunction getComposedReplaceDst(\n\tchange1: Replace | undefined,\n\tchange2: OptionalChangeset,\n): ChangeAtomId {\n\tconst dst1 = change1?.dst;\n\tif (change2.valueReplace === undefined) {\n\t\tassert(dst1 !== undefined, 0x8ce /* Both replace replaces should not be undefined */);\n\t\treturn getIdAfterMoves(dst1, change2.moves);\n\t}\n\n\tif (\n\t\tdst1 === undefined ||\n\t\tchange1?.src === \"self\" ||\n\t\t(change2.valueReplace.src !== undefined &&\n\t\t\tareEqualRegisterIds(change2.valueReplace.src, dst1))\n\t) {\n\t\tassert(\n\t\t\tchange2.valueReplace !== undefined,\n\t\t\t0x8cf /* Both replace replaces should not be undefined */,\n\t\t);\n\t\treturn change2.valueReplace.dst;\n\t} else {\n\t\treturn getIdAfterMoves(dst1, change2.moves);\n\t}\n}\n\nfunction getIdAfterMoves(id: ChangeAtomId, moves: readonly Move[]): ChangeAtomId {\n\tfor (const [src, dst] of moves) {\n\t\tif (areEqualChangeAtomIds(id, src)) {\n\t\t\treturn dst;\n\t\t}\n\t}\n\treturn id;\n}\n\nfunction areEqualRegisterIds(id1: RegisterId, id2: RegisterId): boolean {\n\treturn id1 === \"self\" || id2 === \"self\" ? id1 === id2 : areEqualChangeAtomIds(id1, id2);\n}\n\nfunction areEqualRegisterIdsOpt(\n\tid1: RegisterId | undefined,\n\tid2: RegisterId | undefined,\n): boolean {\n\tif (id1 === undefined || id2 === undefined) {\n\t\treturn id1 === id2;\n\t}\n\treturn areEqualRegisterIds(id1, id2);\n}\n\nfunction getBidirectionalMaps(moves: OptionalChangeset[\"moves\"]): {\n\tsrcToDst: ChangeAtomIdMap<ChangeAtomId>;\n\tdstToSrc: ChangeAtomIdMap<ChangeAtomId>;\n} {\n\tconst srcToDst: ChangeAtomIdMap<ChangeAtomId> = new Map();\n\tconst dstToSrc: ChangeAtomIdMap<ChangeAtomId> = new Map();\n\tfor (const [src, dst] of moves) {\n\t\tsetInNestedMap(srcToDst, src.revision, src.localId, dst);\n\t\tsetInNestedMap(dstToSrc, dst.revision, dst.localId, src);\n\t}\n\treturn { srcToDst, dstToSrc };\n}\n\ntype EffectfulReplace =\n\t| {\n\t\t\tisEmpty: true;\n\t\t\tsrc?: ChangeAtomId;\n\t\t\tdst: ChangeAtomId;\n\t }\n\t| {\n\t\t\tisEmpty: boolean;\n\t\t\tsrc: ChangeAtomId;\n\t\t\tdst: ChangeAtomId;\n\t };\n\nfunction isReplaceEffectful(replace: Replace): replace is EffectfulReplace {\n\tif (replace.src === \"self\") {\n\t\treturn false;\n\t}\n\treturn !replace.isEmpty || replace.src !== undefined;\n}\n\nfunction getEffectfulDst(replace: Replace | undefined): ChangeAtomId | undefined {\n\treturn replace === undefined || replace.isEmpty || replace.src === \"self\"\n\t\t? undefined\n\t\t: replace.dst;\n}\n\nexport function taggedRegister(id: RegisterId, revision: RevisionTag | undefined): RegisterId {\n\tif (id === \"self\") {\n\t\treturn id;\n\t}\n\n\treturn taggedAtomId(id, revision);\n}\n\nexport interface OptionalFieldEditor extends FieldEditor<OptionalChangeset> {\n\t/**\n\t * Creates a change which will replace the content already in the field (if any at the time the change applies)\n\t * with new content.\n\t * The content in the field will be moved to the `ids.detach` register.\n\t * The content in the `ids.detach` register will be moved to into the field.\n\t * @param wasEmpty - whether the field is empty when creating this change\n\t * @param ids - the \"fill\" and \"detach\" ids associated with the change.\n\t */\n\tset(\n\t\twasEmpty: boolean,\n\t\tids: {\n\t\t\tfill: ChangeAtomId;\n\t\t\tdetach: ChangeAtomId;\n\t\t},\n\t): OptionalChangeset;\n\n\t/**\n\t * Creates a change which clears the field's contents (if any).\n\t * @param wasEmpty - whether the field is empty when creating this change\n\t * @param detachId - the ID of the register that existing field content (if any) will be moved to.\n\t */\n\tclear(wasEmpty: boolean, detachId: ChangeAtomId): OptionalChangeset;\n}\n\nexport const optionalFieldEditor: OptionalFieldEditor = {\n\tset: (\n\t\twasEmpty: boolean,\n\t\tids: {\n\t\t\tfill: ChangeAtomId;\n\t\t\t// Should be interpreted as a set of an empty field if undefined.\n\t\t\tdetach: ChangeAtomId;\n\t\t},\n\t): OptionalChangeset => ({\n\t\tmoves: [],\n\t\tchildChanges: [],\n\t\tvalueReplace: {\n\t\t\tisEmpty: wasEmpty,\n\t\t\tsrc: ids.fill,\n\t\t\tdst: ids.detach,\n\t\t},\n\t}),\n\n\tclear: (wasEmpty: boolean, detachId: ChangeAtomId): OptionalChangeset => ({\n\t\tmoves: [],\n\t\tchildChanges: [],\n\t\tvalueReplace: {\n\t\t\tisEmpty: wasEmpty,\n\t\t\tdst: detachId,\n\t\t},\n\t}),\n\n\tbuildChildChanges: (changes: Iterable<[number, NodeId]>): OptionalChangeset => {\n\t\tconst childChanges: ChildChange[] = Array.from(changes, ([index, childChange]) => {\n\t\t\tassert(index === 0, 0x404 /* Optional fields only support a single child node */);\n\t\t\treturn [\"self\", childChange];\n\t\t});\n\t\tassert(\n\t\t\tchildChanges.length <= 1,\n\t\t\t0xabd /* Optional fields only support a single child node */,\n\t\t);\n\t\treturn {\n\t\t\tmoves: [],\n\t\t\tchildChanges,\n\t\t};\n\t},\n};\n\nexport function optionalFieldIntoDelta(\n\tchange: OptionalChangeset,\n\tdeltaFromChild: ToDelta,\n): FieldChangeDelta {\n\tconst delta: Mutable<FieldChangeDelta> = {};\n\n\tlet markIsANoop = true;\n\tconst mark: Mutable<DeltaMark> = { count: 1 };\n\n\tif (change.valueReplace !== undefined && isReplaceEffectful(change.valueReplace)) {\n\t\tif (!change.valueReplace.isEmpty) {\n\t\t\tmark.detach = nodeIdFromChangeAtom(change.valueReplace.dst);\n\t\t}\n\t\tif (change.valueReplace.src !== undefined) {\n\t\t\tmark.attach = nodeIdFromChangeAtom(change.valueReplace.src);\n\t\t}\n\t\tmarkIsANoop = false;\n\t}\n\n\tif (change.moves.length > 0) {\n\t\tdelta.rename = change.moves.map(([src, dst]) => ({\n\t\t\tcount: 1,\n\t\t\toldId: nodeIdFromChangeAtom(src),\n\t\t\tnewId: nodeIdFromChangeAtom(dst),\n\t\t}));\n\t}\n\n\tif (change.childChanges.length > 0) {\n\t\tconst globals: DeltaDetachedNodeChanges[] = [];\n\t\tfor (const [id, childChange] of change.childChanges) {\n\t\t\tconst childDelta = deltaFromChild(childChange);\n\t\t\tif (id === \"self\") {\n\t\t\t\tmark.fields = childDelta;\n\t\t\t\tmarkIsANoop = false;\n\t\t\t} else {\n\t\t\t\tconst fields = childDelta;\n\t\t\t\tglobals.push({\n\t\t\t\t\tid: { major: id.revision, minor: id.localId },\n\t\t\t\t\tfields,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (globals.length > 0) {\n\t\t\tdelta.global = globals;\n\t\t}\n\t}\n\n\tif (!markIsANoop) {\n\t\tdelta.local = [mark];\n\t}\n\n\treturn delta;\n}\n\nexport const optionalChangeHandler: FieldChangeHandler<\n\tOptionalChangeset,\n\tOptionalFieldEditor\n> = {\n\trebaser: optionalChangeRebaser,\n\tcodecsFactory: makeOptionalFieldCodecFamily,\n\teditor: optionalFieldEditor,\n\n\tintoDelta: optionalFieldIntoDelta,\n\trelevantRemovedRoots,\n\n\tisEmpty: (change: OptionalChangeset) =>\n\t\tchange.childChanges.length === 0 &&\n\t\tchange.moves.length === 0 &&\n\t\tchange.valueReplace === undefined,\n\n\tgetNestedChanges,\n\n\tcreateEmpty: () => ({ moves: [], childChanges: [] }),\n\tgetCrossFieldKeys: (_change) => [],\n};\n\nfunction getNestedChanges(change: OptionalChangeset): NestedChangesIndices {\n\t// True iff the content of the field changes in some way\n\tconst isFieldContentChanged =\n\t\tchange.valueReplace !== undefined && change.valueReplace.src !== \"self\";\n\n\t// The node that is moved into the field (if any).\n\tconst nodeMovedIntoField = change.valueReplace?.src;\n\n\treturn change.childChanges.map(([register, nodeId]) => {\n\t\t// The node is removed in the input context iif register is not self.\n\t\tconst inputIndex = register === \"self\" ? 0 : undefined;\n\t\tconst outputIndex =\n\t\t\tregister === \"self\"\n\t\t\t\t? // If the node starts out as not-removed, it is removed in the output context iff the field content is changed\n\t\t\t\t\tisFieldContentChanged\n\t\t\t\t\t? undefined\n\t\t\t\t\t: 0\n\t\t\t\t: // If the node starts out as removed, then it remains removed in the output context iff it is not the node that is moved into the field\n\t\t\t\t\tareEqualRegisterIdsOpt(register, nodeMovedIntoField)\n\t\t\t\t\t? 0\n\t\t\t\t\t: undefined;\n\t\treturn [nodeId, inputIndex, outputIndex];\n\t});\n}\n\nfunction* relevantRemovedRoots(\n\tchange: OptionalChangeset,\n\trelevantRemovedRootsFromChild: RelevantRemovedRootsFromChild,\n): Iterable<DeltaDetachedNodeId> {\n\tconst alreadyYielded = new RegisterMap<boolean>();\n\n\tfor (const [src] of change.moves) {\n\t\tif (!alreadyYielded.has(src)) {\n\t\t\talreadyYielded.set(src, true);\n\t\t\tyield nodeIdFromChangeAtom(src);\n\t\t}\n\t}\n\n\tfor (const [id, childChange] of change.childChanges) {\n\t\t// Child changes make the tree they apply to relevant unless that tree existed in the starting context of\n\t\t// of this change.\n\t\tif (id !== \"self\" && !alreadyYielded.has(id)) {\n\t\t\talreadyYielded.set(id, true);\n\t\t\tyield nodeIdFromChangeAtom(id);\n\t\t}\n\t\tyield* relevantRemovedRootsFromChild(childChange);\n\t}\n\n\tconst selfSrc = change.valueReplace?.src;\n\tif (selfSrc !== undefined && selfSrc !== \"self\" && !alreadyYielded.has(selfSrc)) {\n\t\tyield nodeIdFromChangeAtom(selfSrc);\n\t}\n}\n\ninterface Optional\n\textends FlexFieldKind<\n\t\tOptionalFieldEditor,\n\t\ttypeof optionalIdentifier,\n\t\tMultiplicity.Optional\n\t> {}\n\n/**\n * 0 or 1 items.\n */\nexport const optional: Optional = new FlexFieldKind(\n\toptionalIdentifier,\n\tMultiplicity.Optional,\n\t{\n\t\tchangeHandler: optionalChangeHandler,\n\t\tallowMonotonicUpgradeFrom: new Set([\n\t\t\tidentifierFieldIdentifier,\n\t\t\trequiredIdentifier,\n\t\t\tforbiddenFieldKindIdentifier,\n\t\t]),\n\t},\n);\n"]}
|
|
@@ -4,19 +4,43 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ChangeAtomId } from "../../core/index.js";
|
|
6
6
|
import type { NodeId } from "../modular-schema/index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Uniquely identifies a register within the scope of this changeset.
|
|
9
|
+
* The sentinel value "self" is used for the active register, which is a universally shared register
|
|
10
|
+
* (as in, any changeset referring to "self" refers to the register containing the active value of the field).
|
|
11
|
+
*
|
|
12
|
+
* See the model description in {@link OptionalChangeset} for more details.
|
|
13
|
+
*/
|
|
14
|
+
export type RegisterId = ChangeAtomId | "self";
|
|
15
|
+
export type Move = readonly [src: ChangeAtomId, dst: ChangeAtomId];
|
|
16
|
+
export type ChildChange = readonly [register: RegisterId, childChange: NodeId];
|
|
7
17
|
/**
|
|
8
18
|
* Changes to an optional field.
|
|
9
19
|
*
|
|
10
|
-
* The model used is that optional field consists of a
|
|
11
|
-
* In a given change input or output context,
|
|
20
|
+
* The model used is that optional field consists of a collection of "registers" with one designated as the "active" register.
|
|
21
|
+
* In a given change input or output context, registers may hold 0 or 1 nodes.
|
|
22
|
+
* Each register is identified using a {@link RegisterId}.
|
|
23
|
+
* The active register holds the current value of the field, and other registers hold detached roots.
|
|
12
24
|
*/
|
|
13
25
|
export interface OptionalChangeset {
|
|
26
|
+
/**
|
|
27
|
+
* Each entry signifies the intent to move a node from `src` to `dst`.
|
|
28
|
+
* Moves to or from the "self" register are represented in {@link valueReplace}.
|
|
29
|
+
*
|
|
30
|
+
* These entries should not be interpreted as "applied one after the other", but rather as "applied simultaneously".
|
|
31
|
+
* As such, changesets should not contain duplicated src or dst entries.
|
|
32
|
+
*/
|
|
33
|
+
readonly moves: readonly Move[];
|
|
34
|
+
/**
|
|
35
|
+
* Nested changes to nodes that occupy registers.
|
|
36
|
+
*
|
|
37
|
+
* Nodes are identified by the register they occupy in the *input* context of the changeset.
|
|
38
|
+
*/
|
|
39
|
+
readonly childChanges: readonly ChildChange[];
|
|
14
40
|
/**
|
|
15
41
|
* An optional description of how to replace the current value of the field.
|
|
16
42
|
*/
|
|
17
43
|
readonly valueReplace?: Replace;
|
|
18
|
-
readonly nodeDetach?: ChangeAtomId;
|
|
19
|
-
readonly childChange?: NodeId;
|
|
20
44
|
}
|
|
21
45
|
export interface Replace {
|
|
22
46
|
/**
|
|
@@ -24,28 +48,13 @@ export interface Replace {
|
|
|
24
48
|
*/
|
|
25
49
|
readonly isEmpty: boolean;
|
|
26
50
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* When the field is empty in the input context, this ID is dormant in the sense that it would not be used if the changeset were applied as is.
|
|
30
|
-
* However, it can become active if the changeset is rebased over a change that attaches a node in the field.
|
|
51
|
+
* The ID for the node to put in this field, or undefined if the field should be emptied.
|
|
52
|
+
* Will be "self" when the intention is to keep the current node in this field.
|
|
31
53
|
*/
|
|
32
|
-
readonly
|
|
54
|
+
readonly src?: RegisterId;
|
|
33
55
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* Note that this ID may refer to the node detached by this changeset:
|
|
37
|
-
* The node in the field is detached and associated with ID `dst`,
|
|
38
|
-
* then that node is renamed from `dst` to `src` (at the ModularChangeset level),
|
|
39
|
-
* then that node is attached back into the field.
|
|
40
|
-
* When this is the case, we say that the node is being pinned in the field.
|
|
41
|
-
* While a pin has no effect on the document state if applied as-is, its merge semantics are different from an empty changeset.
|
|
42
|
-
* This is because rebasing a pin over a change that detaches the node from the field will result in a changeset that re-attaches the node to the field.
|
|
43
|
-
* In other words, a pin guarantees that the node will be in the field after the changeset is rebased and applied, whereas an empty changeset does not.
|
|
44
|
-
*
|
|
45
|
-
* `src` must be structurally different from `dst` even when the changeset is a pin.
|
|
46
|
-
* An optional field changeset that aims to attach a node must be able to affect two nodes,
|
|
47
|
-
* so unless we want to mint new IDs during rebasing, such a changeset must have two different IDs.
|
|
56
|
+
* An ID to associate with the node (if any) which is detached by this edit.
|
|
48
57
|
*/
|
|
49
|
-
readonly
|
|
58
|
+
readonly dst: ChangeAtomId;
|
|
50
59
|
}
|
|
51
60
|
//# sourceMappingURL=optionalFieldChangeTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionalFieldChangeTypes.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldChangeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD
|
|
1
|
+
{"version":3,"file":"optionalFieldChangeTypes.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldChangeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;AAE/C,MAAM,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;AAEnE,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AAE/E;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IAE9C;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionalFieldChangeTypes.js","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldChangeTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ChangeAtomId } from \"../../core/index.js\";\nimport type { NodeId } from \"../modular-schema/index.js\";\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"optionalFieldChangeTypes.js","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldChangeTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ChangeAtomId } from \"../../core/index.js\";\nimport type { NodeId } from \"../modular-schema/index.js\";\n\n/**\n * Uniquely identifies a register within the scope of this changeset.\n * The sentinel value \"self\" is used for the active register, which is a universally shared register\n * (as in, any changeset referring to \"self\" refers to the register containing the active value of the field).\n *\n * See the model description in {@link OptionalChangeset} for more details.\n */\nexport type RegisterId = ChangeAtomId | \"self\";\n\nexport type Move = readonly [src: ChangeAtomId, dst: ChangeAtomId];\n\nexport type ChildChange = readonly [register: RegisterId, childChange: NodeId];\n\n/**\n * Changes to an optional field.\n *\n * The model used is that optional field consists of a collection of \"registers\" with one designated as the \"active\" register.\n * In a given change input or output context, registers may hold 0 or 1 nodes.\n * Each register is identified using a {@link RegisterId}.\n * The active register holds the current value of the field, and other registers hold detached roots.\n */\nexport interface OptionalChangeset {\n\t/**\n\t * Each entry signifies the intent to move a node from `src` to `dst`.\n\t * Moves to or from the \"self\" register are represented in {@link valueReplace}.\n\t *\n\t * These entries should not be interpreted as \"applied one after the other\", but rather as \"applied simultaneously\".\n\t * As such, changesets should not contain duplicated src or dst entries.\n\t */\n\treadonly moves: readonly Move[];\n\n\t/**\n\t * Nested changes to nodes that occupy registers.\n\t *\n\t * Nodes are identified by the register they occupy in the *input* context of the changeset.\n\t */\n\treadonly childChanges: readonly ChildChange[];\n\n\t/**\n\t * An optional description of how to replace the current value of the field.\n\t */\n\treadonly valueReplace?: Replace;\n}\n\nexport interface Replace {\n\t/**\n\t * Whether the field is empty in the input context of this change.\n\t */\n\treadonly isEmpty: boolean;\n\n\t/**\n\t * The ID for the node to put in this field, or undefined if the field should be emptied.\n\t * Will be \"self\" when the intention is to keep the current node in this field.\n\t */\n\treadonly src?: RegisterId;\n\n\t/**\n\t * An ID to associate with the node (if any) which is detached by this edit.\n\t */\n\treadonly dst: ChangeAtomId;\n}\n"]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { TAnySchema } from "@sinclair/typebox";
|
|
6
6
|
import type { IJsonCodec } from "../../codec/index.js";
|
|
7
|
-
import {
|
|
7
|
+
import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag } from "../../core/index.js";
|
|
8
8
|
import { type FieldChangeEncodingContext } from "../modular-schema/index.js";
|
|
9
9
|
import { EncodedOptionalChangeset } from "./optionalFieldChangeFormatV2.js";
|
|
10
10
|
import type { OptionalChangeset } from "./optionalFieldChangeTypes.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionalFieldCodecV2.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldCodecV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"optionalFieldCodecV2.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldCodecV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAEX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAGN,KAAK,0BAA0B,EAC/B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,wBAAwB,EAAqB,MAAM,kCAAkC,CAAC;AAC/F,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,+BAA+B,CAAC;AA2B5F,wBAAgB,sBAAsB,CACrC,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,GACC,UAAU,CACZ,iBAAiB,EACjB,wBAAwB,CAAC,UAAU,CAAC,EACpC,wBAAwB,CAAC,UAAU,CAAC,EACpC,0BAA0B,CAC1B,CAqEA"}
|
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.makeOptionalFieldCodec = void 0;
|
|
8
|
-
const index_js_1 = require("../../core/index.js");
|
|
9
8
|
const changeAtomIdCodec_js_1 = require("../changeAtomIdCodec.js");
|
|
10
|
-
const
|
|
9
|
+
const index_js_1 = require("../modular-schema/index.js");
|
|
11
10
|
const optionalFieldChangeFormatV2_js_1 = require("./optionalFieldChangeFormatV2.js");
|
|
12
|
-
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
13
11
|
function makeRegisterIdCodec(changeAtomIdCodec) {
|
|
14
12
|
return {
|
|
15
13
|
encode: (registerId, context) => {
|
|
@@ -32,84 +30,57 @@ function makeOptionalFieldCodec(revisionTagCodec) {
|
|
|
32
30
|
const registerIdCodec = makeRegisterIdCodec(changeAtomIdCodec);
|
|
33
31
|
return {
|
|
34
32
|
encode: (change, context) => {
|
|
35
|
-
(0, internal_1.assert)(change.nodeDetach === undefined ||
|
|
36
|
-
(0, index_js_1.areEqualChangeAtomIdOpts)(change.valueReplace?.src, change.nodeDetach), "This format only supports node detach when it represents a pin");
|
|
37
33
|
const encoded = {};
|
|
34
|
+
if (change.moves.length > 0) {
|
|
35
|
+
encoded.m = change.moves.map(([src, dst]) => [
|
|
36
|
+
changeAtomIdCodec.encode(src, context.baseContext),
|
|
37
|
+
changeAtomIdCodec.encode(dst, context.baseContext),
|
|
38
|
+
]);
|
|
39
|
+
}
|
|
38
40
|
if (change.valueReplace !== undefined) {
|
|
39
41
|
encoded.r = {
|
|
40
42
|
e: change.valueReplace.isEmpty,
|
|
41
43
|
d: changeAtomIdCodec.encode(change.valueReplace.dst, context.baseContext),
|
|
42
44
|
};
|
|
43
45
|
if (change.valueReplace.src !== undefined) {
|
|
44
|
-
|
|
45
|
-
encoded.r.s = registerIdCodec.encode(srcRegister, context.baseContext);
|
|
46
|
+
encoded.r.s = registerIdCodec.encode(change.valueReplace.src, context.baseContext);
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
]);
|
|
57
|
-
}
|
|
58
|
-
if (encodedChildChanges.length > 0) {
|
|
59
|
-
encoded.c = encodedChildChanges;
|
|
60
|
-
}
|
|
61
|
-
const encodedMoves = [];
|
|
62
|
-
for (const { start: oldId, value: newId, length: count, } of context.rootRenames.entries()) {
|
|
63
|
-
(0, internal_1.assert)(count === 1, "Unexpected range rename in optional field");
|
|
64
|
-
encodedMoves.push([
|
|
65
|
-
changeAtomIdCodec.encode(oldId, context.baseContext),
|
|
66
|
-
changeAtomIdCodec.encode(newId, context.baseContext),
|
|
67
|
-
]);
|
|
68
|
-
}
|
|
69
|
-
if (encodedMoves.length > 0) {
|
|
70
|
-
encoded.m = encodedMoves;
|
|
49
|
+
if (change.childChanges.length > 0) {
|
|
50
|
+
encoded.c = [];
|
|
51
|
+
for (const [id, childChange] of change.childChanges) {
|
|
52
|
+
encoded.c.push([
|
|
53
|
+
registerIdCodec.encode(id, context.baseContext),
|
|
54
|
+
context.encodeNode(childChange),
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
71
57
|
}
|
|
72
58
|
return encoded;
|
|
73
59
|
},
|
|
74
60
|
decode: (encoded, context) => {
|
|
75
|
-
const decoded = {
|
|
61
|
+
const decoded = {
|
|
62
|
+
moves: encoded.m?.map(([encodedSrc, encodedDst]) => [
|
|
63
|
+
changeAtomIdCodec.decode(encodedSrc, context.baseContext),
|
|
64
|
+
changeAtomIdCodec.decode(encodedDst, context.baseContext),
|
|
65
|
+
]) ?? [],
|
|
66
|
+
childChanges: encoded.c?.map(([id, encodedChange]) => [
|
|
67
|
+
registerIdCodec.decode(id, context.baseContext),
|
|
68
|
+
context.decodeNode(encodedChange),
|
|
69
|
+
]) ?? [],
|
|
70
|
+
};
|
|
76
71
|
if (encoded.r !== undefined) {
|
|
77
72
|
const replace = {
|
|
78
73
|
isEmpty: encoded.r.e,
|
|
79
74
|
dst: changeAtomIdCodec.decode(encoded.r.d, context.baseContext),
|
|
80
75
|
};
|
|
81
76
|
if (encoded.r.s !== undefined) {
|
|
82
|
-
|
|
83
|
-
if (register === "self") {
|
|
84
|
-
// Note that this is safe as long as we assume that this change will not be rebased
|
|
85
|
-
// over a move to a sequence field.
|
|
86
|
-
// The ID of an attach and accompanying detach/rename is arbitrary, except in sequence field where
|
|
87
|
-
// the ID of the detach becomes a cell ID which may be referenced by other changes.
|
|
88
|
-
replace.src = context.generateId();
|
|
89
|
-
decoded.nodeDetach = replace.src;
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
replace.src = register;
|
|
93
|
-
}
|
|
77
|
+
replace.src = registerIdCodec.decode(encoded.r.s, context.baseContext);
|
|
94
78
|
}
|
|
95
79
|
decoded.valueReplace = replace;
|
|
96
80
|
}
|
|
97
|
-
if (encoded.c !== undefined) {
|
|
98
|
-
for (const [encodedDetachId, nodeChange] of encoded.c) {
|
|
99
|
-
if (encodedDetachId === null) {
|
|
100
|
-
decoded.childChange = context.decodeNode(nodeChange);
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
context.decodeRootNodeChange(changeAtomIdCodec.decode(encodedDetachId, context.baseContext), nodeChange);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
for (const [encodedOldId, encodedNewId] of encoded.m ?? []) {
|
|
108
|
-
context.decodeRootRename(changeAtomIdCodec.decode(encodedOldId, context.baseContext), changeAtomIdCodec.decode(encodedNewId, context.baseContext), 1);
|
|
109
|
-
}
|
|
110
81
|
return decoded;
|
|
111
82
|
},
|
|
112
|
-
encodedSchema: (0, optionalFieldChangeFormatV2_js_1.EncodedOptionalChangeset)(
|
|
83
|
+
encodedSchema: (0, optionalFieldChangeFormatV2_js_1.EncodedOptionalChangeset)(index_js_1.EncodedNodeChangeset),
|
|
113
84
|
};
|
|
114
85
|
}
|
|
115
86
|
exports.makeOptionalFieldCodec = makeOptionalFieldCodec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionalFieldCodecV2.js","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldCodecV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,kDAM6B;AAE7B,kEAAgE;AAChE,yDAIoC;AAEpC,qFAA+F;AAE/F,kEAA6D;AAI7D,SAAS,mBAAmB,CAC3B,iBAKC;IAED,OAAO;QACN,MAAM,EAAE,CAAC,UAAsB,EAAE,OAA8B,EAAE,EAAE;YAClE,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;gBAC3B,OAAO,IAAI,CAAC;YACb,CAAC;YACD,OAAO,iBAAiB,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACtD,CAAC;QACD,MAAM,EAAE,CAAC,UAA6B,EAAE,OAA8B,EAAE,EAAE;YACzE,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;gBACzB,OAAO,MAAM,CAAC;YACf,CAAC;YACD,OAAO,iBAAiB,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACtD,CAAC;QACD,aAAa,EAAE,kDAAiB;KAChC,CAAC;AACH,CAAC;AAED,SAAgB,sBAAsB,CACrC,gBAKC;IAOD,MAAM,iBAAiB,GAAG,IAAA,4CAAqB,EAAC,gBAAgB,CAAC,CAAC;IAClE,MAAM,eAAe,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAE/D,OAAO;QACN,MAAM,EAAE,CAAC,MAAyB,EAAE,OAAmC,EAAE,EAAE;YAC1E,IAAA,iBAAM,EACL,MAAM,CAAC,UAAU,KAAK,SAAS;gBAC9B,IAAA,mCAAwB,EAAC,MAAM,CAAC,YAAY,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC,EACtE,gEAAgE,CAChE,CAAC;YAEF,MAAM,OAAO,GAAyC,EAAE,CAAC;YAEzD,IAAI,MAAM,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;gBACvC,OAAO,CAAC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wBACnF,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;wBACnC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;oBAClC,CAAC;yBAAM,CAAC;wBACP,OAAO,CAAC,GAAG,GAAG,QAAQ,CAAC;oBACxB,CAAC;gBACF,CAAC;gBACD,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC;YAChC,CAAC;YAED,IAAI,OAAO,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;gBAC7B,KAAK,MAAM,CAAC,eAAe,EAAE,UAAU,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC;oBACvD,IAAI,eAAe,KAAK,IAAI,EAAE,CAAC;wBAC9B,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;oBACtD,CAAC;yBAAM,CAAC;wBACP,OAAO,CAAC,oBAAoB,CAC3B,iBAAiB,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,WAAW,CAAC,EAC9D,UAAU,CACV,CAAC;oBACH,CAAC;gBACF,CAAC;YACF,CAAC;YAED,KAAK,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;gBAC5D,OAAO,CAAC,gBAAgB,CACvB,iBAAiB,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,WAAW,CAAC,EAC3D,iBAAiB,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,WAAW,CAAC,EAC3D,CAAC,CACD,CAAC;YACH,CAAC;YAED,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,aAAa,EAAE,IAAA,yDAAwB,EAAC,+BAAoB,CAAC;KAC7D,CAAC;AACH,CAAC;AAnID,wDAmIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport type { IJsonCodec } from \"../../codec/index.js\";\nimport {\n\tareEqualChangeAtomIdOpts,\n\ttype ChangeAtomId,\n\ttype ChangeEncodingContext,\n\ttype EncodedRevisionTag,\n\ttype RevisionTag,\n} from \"../../core/index.js\";\nimport type { Mutable } from \"../../util/index.js\";\nimport { makeChangeAtomIdCodec } from \"../changeAtomIdCodec.js\";\nimport {\n\tEncodedNodeChangeset,\n\ttype EncodedChangeAtomId,\n\ttype FieldChangeEncodingContext,\n} from \"../modular-schema/index.js\";\n\nimport { EncodedOptionalChangeset, EncodedRegisterId } from \"./optionalFieldChangeFormatV2.js\";\nimport type { OptionalChangeset, Replace } from \"./optionalFieldChangeTypes.js\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\ntype RegisterId = ChangeAtomId | \"self\";\n\nfunction makeRegisterIdCodec(\n\tchangeAtomIdCodec: IJsonCodec<\n\t\tChangeAtomId,\n\t\tEncodedChangeAtomId,\n\t\tEncodedChangeAtomId,\n\t\tChangeEncodingContext\n\t>,\n): IJsonCodec<RegisterId, EncodedRegisterId, EncodedRegisterId, ChangeEncodingContext> {\n\treturn {\n\t\tencode: (registerId: RegisterId, context: ChangeEncodingContext) => {\n\t\t\tif (registerId === \"self\") {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn changeAtomIdCodec.encode(registerId, context);\n\t\t},\n\t\tdecode: (registerId: EncodedRegisterId, context: ChangeEncodingContext) => {\n\t\t\tif (registerId === null) {\n\t\t\t\treturn \"self\";\n\t\t\t}\n\t\t\treturn changeAtomIdCodec.decode(registerId, context);\n\t\t},\n\t\tencodedSchema: EncodedRegisterId,\n\t};\n}\n\nexport function makeOptionalFieldCodec(\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n): IJsonCodec<\n\tOptionalChangeset,\n\tEncodedOptionalChangeset<TAnySchema>,\n\tEncodedOptionalChangeset<TAnySchema>,\n\tFieldChangeEncodingContext\n> {\n\tconst changeAtomIdCodec = makeChangeAtomIdCodec(revisionTagCodec);\n\tconst registerIdCodec = makeRegisterIdCodec(changeAtomIdCodec);\n\n\treturn {\n\t\tencode: (change: OptionalChangeset, context: FieldChangeEncodingContext) => {\n\t\t\tassert(\n\t\t\t\tchange.nodeDetach === undefined ||\n\t\t\t\t\tareEqualChangeAtomIdOpts(change.valueReplace?.src, change.nodeDetach),\n\t\t\t\t\"This format only supports node detach when it represents a pin\",\n\t\t\t);\n\n\t\t\tconst encoded: EncodedOptionalChangeset<TAnySchema> = {};\n\n\t\t\tif (change.valueReplace !== undefined) {\n\t\t\t\tencoded.r = {\n\t\t\t\t\te: change.valueReplace.isEmpty,\n\t\t\t\t\td: changeAtomIdCodec.encode(change.valueReplace.dst, context.baseContext),\n\t\t\t\t};\n\t\t\t\tif (change.valueReplace.src !== undefined) {\n\t\t\t\t\tconst srcRegister =\n\t\t\t\t\t\tchange.nodeDetach === undefined ? change.valueReplace.src : \"self\";\n\n\t\t\t\t\tencoded.r.s = registerIdCodec.encode(srcRegister, context.baseContext);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst encodedChildChanges: [EncodedRegisterId, EncodedNodeChangeset][] = [];\n\n\t\t\tif (change.childChange !== undefined) {\n\t\t\t\tencodedChildChanges.push([null, context.encodeNode(change.childChange)]);\n\t\t\t}\n\n\t\t\tfor (const [detachId, nodeId] of context.rootNodeChanges.entries()) {\n\t\t\t\tencodedChildChanges.push([\n\t\t\t\t\tchangeAtomIdCodec.encode(\n\t\t\t\t\t\t{ revision: detachId[0], localId: detachId[1] },\n\t\t\t\t\t\tcontext.baseContext,\n\t\t\t\t\t),\n\t\t\t\t\tcontext.encodeNode(nodeId),\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\tif (encodedChildChanges.length > 0) {\n\t\t\t\tencoded.c = encodedChildChanges;\n\t\t\t}\n\n\t\t\tconst encodedMoves: [EncodedChangeAtomId, EncodedChangeAtomId][] = [];\n\t\t\tfor (const {\n\t\t\t\tstart: oldId,\n\t\t\t\tvalue: newId,\n\t\t\t\tlength: count,\n\t\t\t} of context.rootRenames.entries()) {\n\t\t\t\tassert(count === 1, \"Unexpected range rename in optional field\");\n\t\t\t\tencodedMoves.push([\n\t\t\t\t\tchangeAtomIdCodec.encode(oldId, context.baseContext),\n\t\t\t\t\tchangeAtomIdCodec.encode(newId, context.baseContext),\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\tif (encodedMoves.length > 0) {\n\t\t\t\tencoded.m = encodedMoves;\n\t\t\t}\n\n\t\t\treturn encoded;\n\t\t},\n\n\t\tdecode: (\n\t\t\tencoded: EncodedOptionalChangeset<TAnySchema>,\n\t\t\tcontext: FieldChangeEncodingContext,\n\t\t) => {\n\t\t\tconst decoded: Mutable<OptionalChangeset> = {};\n\n\t\t\tif (encoded.r !== undefined) {\n\t\t\t\tconst replace: Mutable<Replace> = {\n\t\t\t\t\tisEmpty: encoded.r.e,\n\t\t\t\t\tdst: changeAtomIdCodec.decode(encoded.r.d, context.baseContext),\n\t\t\t\t};\n\t\t\t\tif (encoded.r.s !== undefined) {\n\t\t\t\t\tconst register = registerIdCodec.decode(encoded.r.s, context.baseContext);\n\t\t\t\t\tif (register === \"self\") {\n\t\t\t\t\t\t// Note that this is safe as long as we assume that this change will not be rebased\n\t\t\t\t\t\t// over a move to a sequence field.\n\t\t\t\t\t\t// The ID of an attach and accompanying detach/rename is arbitrary, except in sequence field where\n\t\t\t\t\t\t// the ID of the detach becomes a cell ID which may be referenced by other changes.\n\t\t\t\t\t\treplace.src = context.generateId();\n\t\t\t\t\t\tdecoded.nodeDetach = replace.src;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treplace.src = register;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdecoded.valueReplace = replace;\n\t\t\t}\n\n\t\t\tif (encoded.c !== undefined) {\n\t\t\t\tfor (const [encodedDetachId, nodeChange] of encoded.c) {\n\t\t\t\t\tif (encodedDetachId === null) {\n\t\t\t\t\t\tdecoded.childChange = context.decodeNode(nodeChange);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.decodeRootNodeChange(\n\t\t\t\t\t\t\tchangeAtomIdCodec.decode(encodedDetachId, context.baseContext),\n\t\t\t\t\t\t\tnodeChange,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const [encodedOldId, encodedNewId] of encoded.m ?? []) {\n\t\t\t\tcontext.decodeRootRename(\n\t\t\t\t\tchangeAtomIdCodec.decode(encodedOldId, context.baseContext),\n\t\t\t\t\tchangeAtomIdCodec.decode(encodedNewId, context.baseContext),\n\t\t\t\t\t1,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn decoded;\n\t\t},\n\t\tencodedSchema: EncodedOptionalChangeset(EncodedNodeChangeset),\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"optionalFieldCodecV2.js","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldCodecV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,kEAAgE;AAChE,yDAIoC;AAEpC,qFAA+F;AAG/F,SAAS,mBAAmB,CAC3B,iBAKC;IAED,OAAO;QACN,MAAM,EAAE,CAAC,UAAsB,EAAE,OAA8B,EAAE,EAAE;YAClE,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;gBAC3B,OAAO,IAAI,CAAC;YACb,CAAC;YACD,OAAO,iBAAiB,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACtD,CAAC;QACD,MAAM,EAAE,CAAC,UAA6B,EAAE,OAA8B,EAAE,EAAE;YACzE,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;gBACzB,OAAO,MAAM,CAAC;YACf,CAAC;YACD,OAAO,iBAAiB,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACtD,CAAC;QACD,aAAa,EAAE,kDAAiB;K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,SAAS,EAAE,CAAC;oBAC/B,OAAO,CAAC,GAAG,GAAG,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;gBACxE,CAAC;gBACD,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC;YAChC,CAAC;YACD,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,aAAa,EAAE,IAAA,yDAAwB,EAAC,+BAAoB,CAAC;KAC7D,CAAC;AACH,CAAC;AAjFD,wDAiFC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport type { IJsonCodec } from \"../../codec/index.js\";\nimport type {\n\tChangeAtomId,\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport type { Mutable } from \"../../util/index.js\";\nimport { makeChangeAtomIdCodec } from \"../changeAtomIdCodec.js\";\nimport {\n\tEncodedNodeChangeset,\n\ttype EncodedChangeAtomId,\n\ttype FieldChangeEncodingContext,\n} from \"../modular-schema/index.js\";\n\nimport { EncodedOptionalChangeset, EncodedRegisterId } from \"./optionalFieldChangeFormatV2.js\";\nimport type { OptionalChangeset, RegisterId, Replace } from \"./optionalFieldChangeTypes.js\";\n\nfunction makeRegisterIdCodec(\n\tchangeAtomIdCodec: IJsonCodec<\n\t\tChangeAtomId,\n\t\tEncodedChangeAtomId,\n\t\tEncodedChangeAtomId,\n\t\tChangeEncodingContext\n\t>,\n): IJsonCodec<RegisterId, EncodedRegisterId, EncodedRegisterId, ChangeEncodingContext> {\n\treturn {\n\t\tencode: (registerId: RegisterId, context: ChangeEncodingContext) => {\n\t\t\tif (registerId === \"self\") {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn changeAtomIdCodec.encode(registerId, context);\n\t\t},\n\t\tdecode: (registerId: EncodedRegisterId, context: ChangeEncodingContext) => {\n\t\t\tif (registerId === null) {\n\t\t\t\treturn \"self\";\n\t\t\t}\n\t\t\treturn changeAtomIdCodec.decode(registerId, context);\n\t\t},\n\t\tencodedSchema: EncodedRegisterId,\n\t};\n}\n\nexport function makeOptionalFieldCodec(\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n): IJsonCodec<\n\tOptionalChangeset,\n\tEncodedOptionalChangeset<TAnySchema>,\n\tEncodedOptionalChangeset<TAnySchema>,\n\tFieldChangeEncodingContext\n> {\n\tconst changeAtomIdCodec = makeChangeAtomIdCodec(revisionTagCodec);\n\tconst registerIdCodec = makeRegisterIdCodec(changeAtomIdCodec);\n\n\treturn {\n\t\tencode: (change: OptionalChangeset, context: FieldChangeEncodingContext) => {\n\t\t\tconst encoded: EncodedOptionalChangeset<TAnySchema> = {};\n\n\t\t\tif (change.moves.length > 0) {\n\t\t\t\tencoded.m = change.moves.map(([src, dst]) => [\n\t\t\t\t\tchangeAtomIdCodec.encode(src, context.baseContext),\n\t\t\t\t\tchangeAtomIdCodec.encode(dst, context.baseContext),\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\tif (change.valueReplace !== undefined) {\n\t\t\t\tencoded.r = {\n\t\t\t\t\te: change.valueReplace.isEmpty,\n\t\t\t\t\td: changeAtomIdCodec.encode(change.valueReplace.dst, context.baseContext),\n\t\t\t\t};\n\t\t\t\tif (change.valueReplace.src !== undefined) {\n\t\t\t\t\tencoded.r.s = registerIdCodec.encode(change.valueReplace.src, context.baseContext);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (change.childChanges.length > 0) {\n\t\t\t\tencoded.c = [];\n\t\t\t\tfor (const [id, childChange] of change.childChanges) {\n\t\t\t\t\tencoded.c.push([\n\t\t\t\t\t\tregisterIdCodec.encode(id, context.baseContext),\n\t\t\t\t\t\tcontext.encodeNode(childChange),\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn encoded;\n\t\t},\n\n\t\tdecode: (\n\t\t\tencoded: EncodedOptionalChangeset<TAnySchema>,\n\t\t\tcontext: FieldChangeEncodingContext,\n\t\t) => {\n\t\t\tconst decoded: Mutable<OptionalChangeset> = {\n\t\t\t\tmoves:\n\t\t\t\t\tencoded.m?.map(([encodedSrc, encodedDst]) => [\n\t\t\t\t\t\tchangeAtomIdCodec.decode(encodedSrc, context.baseContext),\n\t\t\t\t\t\tchangeAtomIdCodec.decode(encodedDst, context.baseContext),\n\t\t\t\t\t]) ?? [],\n\t\t\t\tchildChanges:\n\t\t\t\t\tencoded.c?.map(([id, encodedChange]) => [\n\t\t\t\t\t\tregisterIdCodec.decode(id, context.baseContext),\n\t\t\t\t\t\tcontext.decodeNode(encodedChange),\n\t\t\t\t\t]) ?? [],\n\t\t\t};\n\n\t\t\tif (encoded.r !== undefined) {\n\t\t\t\tconst replace: Mutable<Replace> = {\n\t\t\t\t\tisEmpty: encoded.r.e,\n\t\t\t\t\tdst: changeAtomIdCodec.decode(encoded.r.d, context.baseContext),\n\t\t\t\t};\n\t\t\t\tif (encoded.r.s !== undefined) {\n\t\t\t\t\treplace.src = registerIdCodec.decode(encoded.r.s, context.baseContext);\n\t\t\t\t}\n\t\t\t\tdecoded.valueReplace = replace;\n\t\t\t}\n\t\t\treturn decoded;\n\t\t},\n\t\tencodedSchema: EncodedOptionalChangeset(EncodedNodeChangeset),\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionalFieldCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAmB,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"optionalFieldCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAmB,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGvE,eAAO,MAAM,4BAA4B,qBACtB,WACjB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,KACC,aAAa,iBAAiB,EAAE,0BAA0B,CACP,CAAC"}
|
|
@@ -7,10 +7,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.makeOptionalFieldCodecFamily = void 0;
|
|
8
8
|
const index_js_1 = require("../../codec/index.js");
|
|
9
9
|
const optionalFieldCodecV2_js_1 = require("./optionalFieldCodecV2.js");
|
|
10
|
-
const
|
|
11
|
-
const makeOptionalFieldCodecFamily = (revisionTagCodec) => (0, index_js_1.makeCodecFamily)([
|
|
12
|
-
[2, (0, optionalFieldCodecV2_js_1.makeOptionalFieldCodec)(revisionTagCodec)],
|
|
13
|
-
[3, (0, optionalFieldCodecV3_js_1.makeOptionalFieldCodec)(revisionTagCodec)],
|
|
14
|
-
]);
|
|
10
|
+
const makeOptionalFieldCodecFamily = (revisionTagCodec) => (0, index_js_1.makeCodecFamily)([[2, (0, optionalFieldCodecV2_js_1.makeOptionalFieldCodec)(revisionTagCodec)]]);
|
|
15
11
|
exports.makeOptionalFieldCodecFamily = makeOptionalFieldCodecFamily;
|
|
16
12
|
//# sourceMappingURL=optionalFieldCodecs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionalFieldCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mDAA2F;AAS3F,uEAAkF;
|
|
1
|
+
{"version":3,"file":"optionalFieldCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/optionalFieldCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mDAA2F;AAS3F,uEAAkF;AAE3E,MAAM,4BAA4B,GAAG,CAC3C,gBAKC,EAC6D,EAAE,CAChE,IAAA,0BAAe,EAAC,CAAC,CAAC,CAAC,EAAE,IAAA,gDAAW,EAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAR1C,QAAA,4BAA4B,gCAQc","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ICodecFamily, type IJsonCodec, makeCodecFamily } from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport type { FieldChangeEncodingContext } from \"../modular-schema/index.js\";\n\nimport type { OptionalChangeset } from \"./optionalFieldChangeTypes.js\";\nimport { makeOptionalFieldCodec as makeV2Codec } from \"./optionalFieldCodecV2.js\";\n\nexport const makeOptionalFieldCodecFamily = (\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n): ICodecFamily<OptionalChangeset, FieldChangeEncodingContext> =>\n\tmakeCodecFamily([[2, makeV2Codec(revisionTagCodec)]]);\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { type ChangeAtomId, Multiplicity } from "../../core/index.js";
|
|
6
|
+
import { requiredIdentifier } from "../fieldKindIdentifiers.js";
|
|
7
|
+
import { type FieldEditor, type FieldChangeHandler, FlexFieldKind } from "../modular-schema/index.js";
|
|
8
|
+
import type { OptionalChangeset } from "./optionalFieldChangeTypes.js";
|
|
9
|
+
/**
|
|
10
|
+
* {@link FieldEditor} for required fields (always contain exactly 1 child).
|
|
11
|
+
* @remarks
|
|
12
|
+
* This shares code with optional fields, since they are the same edit wise except setting to empty is not allowed,
|
|
13
|
+
* and the content is always assumed to not be empty.
|
|
14
|
+
* This means the actual edits implemented for optional fields are sufficient to support required fields
|
|
15
|
+
* which is why this is defined and implemented in terms of optional fields.
|
|
16
|
+
*/
|
|
17
|
+
export interface RequiredFieldEditor extends FieldEditor<OptionalChangeset> {
|
|
18
|
+
/**
|
|
19
|
+
* Creates a change which replaces the current value of the field with `newValue`.
|
|
20
|
+
* @param ids - The ids for the fill and detach fields.
|
|
21
|
+
*/
|
|
22
|
+
set(ids: {
|
|
23
|
+
fill: ChangeAtomId;
|
|
24
|
+
detach: ChangeAtomId;
|
|
25
|
+
}): OptionalChangeset;
|
|
26
|
+
}
|
|
27
|
+
export declare const requiredFieldEditor: RequiredFieldEditor;
|
|
28
|
+
export declare const requiredFieldChangeHandler: FieldChangeHandler<OptionalChangeset, RequiredFieldEditor>;
|
|
29
|
+
interface Required extends FlexFieldKind<RequiredFieldEditor, typeof requiredIdentifier, Multiplicity.Single> {
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Exactly one item.
|
|
33
|
+
*/
|
|
34
|
+
export declare const required: Required;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=requiredField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requiredField.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/requiredField.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAA6B,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EACN,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,aAAa,EACb,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAMvE;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAoB,SAAQ,WAAW,CAAC,iBAAiB,CAAC;IAC1E;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,YAAY,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,GAAG,iBAAiB,CAAC;CAC1E;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAMjC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBAAkB,CAC1D,iBAAiB,EACjB,mBAAmB,CAInB,CAAC;AAEF,UAAU,QACT,SAAQ,aAAa,CAAC,mBAAmB,EAAE,OAAO,kBAAkB,EAAE,YAAY,CAAC,MAAM,CAAC;CAAG;AAE9F;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,QAGrB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.required = exports.requiredFieldChangeHandler = exports.requiredFieldEditor = void 0;
|
|
8
|
+
const index_js_1 = require("../../core/index.js");
|
|
9
|
+
const fieldKindIdentifiers_js_1 = require("../fieldKindIdentifiers.js");
|
|
10
|
+
const index_js_2 = require("../modular-schema/index.js");
|
|
11
|
+
const optionalField_js_1 = require("./optionalField.js");
|
|
12
|
+
exports.requiredFieldEditor = {
|
|
13
|
+
...optionalField_js_1.optionalFieldEditor,
|
|
14
|
+
set: (ids) => optionalField_js_1.optionalFieldEditor.set(false, ids),
|
|
15
|
+
};
|
|
16
|
+
exports.requiredFieldChangeHandler = {
|
|
17
|
+
...optionalField_js_1.optionalChangeHandler,
|
|
18
|
+
editor: exports.requiredFieldEditor,
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Exactly one item.
|
|
22
|
+
*/
|
|
23
|
+
exports.required = new index_js_2.FlexFieldKind(fieldKindIdentifiers_js_1.requiredIdentifier, index_js_1.Multiplicity.Single, {
|
|
24
|
+
changeHandler: exports.requiredFieldChangeHandler,
|
|
25
|
+
allowMonotonicUpgradeFrom: new Set([fieldKindIdentifiers_js_1.identifierFieldIdentifier]),
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=requiredField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requiredField.js","sourceRoot":"","sources":["../../../src/feature-libraries/optional-field/requiredField.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kDAAsE;AACtE,wEAA2F;AAC3F,yDAIoC;AAEpC,yDAAgF;AAuBnE,QAAA,mBAAmB,GAAwB;IACvD,GAAG,sCAAmB;IACtB,GAAG,EAAE,CAAC,GAGL,EAAqB,EAAE,CAAC,sCAAmB,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC;CAC5D,CAAC;AAEW,QAAA,0BAA0B,GAGnC;IACH,GAAG,wCAAqB;IACxB,MAAM,EAAE,2BAAmB;CAC3B,CAAC;AAKF;;GAEG;AACU,QAAA,QAAQ,GAAa,IAAI,wBAAa,CAAC,4CAAkB,EAAE,uBAAY,CAAC,MAAM,EAAE;IAC5F,aAAa,EAAE,kCAA0B;IACzC,yBAAyB,EAAE,IAAI,GAAG,CAAC,CAAC,mDAAyB,CAAC,CAAC;CAC/D,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ChangeAtomId, Multiplicity } from \"../../core/index.js\";\nimport { requiredIdentifier, identifierFieldIdentifier } from \"../fieldKindIdentifiers.js\";\nimport {\n\ttype FieldEditor,\n\ttype FieldChangeHandler,\n\tFlexFieldKind,\n} from \"../modular-schema/index.js\";\n\nimport { optionalChangeHandler, optionalFieldEditor } from \"./optionalField.js\";\nimport type { OptionalChangeset } from \"./optionalFieldChangeTypes.js\";\n\n// Required fields are a restricted version of optional fields that must always contain a value.\n// Because of this, the implementation of required fields lives here, inside optional.\n// This avoids having to export optional field implementation details which are only used by required.\n\n/**\n * {@link FieldEditor} for required fields (always contain exactly 1 child).\n * @remarks\n * This shares code with optional fields, since they are the same edit wise except setting to empty is not allowed,\n * and the content is always assumed to not be empty.\n * This means the actual edits implemented for optional fields are sufficient to support required fields\n * which is why this is defined and implemented in terms of optional fields.\n */\nexport interface RequiredFieldEditor extends FieldEditor<OptionalChangeset> {\n\t/**\n\t * Creates a change which replaces the current value of the field with `newValue`.\n\t * @param ids - The ids for the fill and detach fields.\n\t */\n\tset(ids: { fill: ChangeAtomId; detach: ChangeAtomId }): OptionalChangeset;\n}\n\nexport const requiredFieldEditor: RequiredFieldEditor = {\n\t...optionalFieldEditor,\n\tset: (ids: {\n\t\tfill: ChangeAtomId;\n\t\tdetach: ChangeAtomId;\n\t}): OptionalChangeset => optionalFieldEditor.set(false, ids),\n};\n\nexport const requiredFieldChangeHandler: FieldChangeHandler<\n\tOptionalChangeset,\n\tRequiredFieldEditor\n> = {\n\t...optionalChangeHandler,\n\teditor: requiredFieldEditor,\n};\n\ninterface Required\n\textends FlexFieldKind<RequiredFieldEditor, typeof requiredIdentifier, Multiplicity.Single> {}\n\n/**\n * Exactly one item.\n */\nexport const required: Required = new FlexFieldKind(requiredIdentifier, Multiplicity.Single, {\n\tchangeHandler: requiredFieldChangeHandler,\n\tallowMonotonicUpgradeFrom: new Set([identifierFieldIdentifier]),\n});\n"]}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
|
|
6
6
|
import { type CodecTree, type CodecWriteOptions, type ICodecFamily, type IJsonCodec } from "../../codec/index.js";
|
|
7
|
-
import type { SchemaChange } from "./schemaChangeTypes.js";
|
|
8
7
|
import { SchemaFormatVersion } from "../../core/index.js";
|
|
8
|
+
import type { SchemaChange } from "./schemaChangeTypes.js";
|
|
9
9
|
/**
|
|
10
10
|
* Create a family of schema change codecs.
|
|
11
11
|
* @param options - Specifies common codec options, including which `validator` to use.
|