@fluidframework/tree 2.91.0 → 2.92.0
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 +118 -0
- package/api-report/tree.alpha.api.md +60 -22
- package/dist/api.d.ts +6 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js.map +1 -1
- package/dist/codec/codec.d.ts +28 -2
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +1 -0
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/index.d.ts +2 -2
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +2 -4
- package/dist/codec/index.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +18 -36
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js +46 -59
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/codec/versioned/index.d.ts +1 -1
- package/dist/codec/versioned/index.d.ts.map +1 -1
- package/dist/codec/versioned/index.js +2 -4
- package/dist/codec/versioned/index.js.map +1 -1
- package/dist/core/forest/forest.d.ts +5 -2
- package/dist/core/forest/forest.d.ts.map +1 -1
- package/dist/core/forest/forest.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +6 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.d.ts +8 -1
- package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
- package/dist/core/rebase/changeRebaser.js.map +1 -1
- package/dist/core/rebase/revisionTagCodec.d.ts +4 -3
- package/dist/core/rebase/revisionTagCodec.d.ts.map +1 -1
- package/dist/core/rebase/revisionTagCodec.js +2 -0
- package/dist/core/rebase/revisionTagCodec.js.map +1 -1
- package/dist/core/rebase/utils.d.ts +2 -2
- package/dist/core/rebase/utils.d.ts.map +1 -1
- package/dist/core/rebase/utils.js +4 -4
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/schema-stored/formatV2.d.ts +1 -1
- package/dist/core/schema-stored/formatV2.js +1 -1
- package/dist/core/schema-stored/formatV2.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts +8 -0
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +42 -7
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/cursor.d.ts +25 -1
- package/dist/core/tree/cursor.d.ts.map +1 -1
- package/dist/core/tree/cursor.js +45 -1
- package/dist/core/tree/cursor.js.map +1 -1
- package/dist/core/tree/deltaUtil.d.ts +13 -1
- package/dist/core/tree/deltaUtil.d.ts.map +1 -1
- package/dist/core/tree/deltaUtil.js +34 -1
- package/dist/core/tree/deltaUtil.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts +5 -5
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/dist/core/tree/index.d.ts +2 -2
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +6 -2
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +11 -0
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js +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 +5 -0
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/entrypoints/alpha.d.ts +1 -1
- package/dist/entrypoints/alpha.d.ts.map +1 -1
- package/dist/entrypoints/alpha.js +2 -3
- package/dist/entrypoints/alpha.js.map +1 -1
- package/dist/entrypoints/beta.js +1 -1
- package/dist/entrypoints/beta.js.map +1 -1
- package/dist/entrypoints/legacy.d.ts +1 -1
- package/dist/entrypoints/legacy.d.ts.map +1 -1
- package/dist/entrypoints/legacy.js +1 -1
- package/dist/entrypoints/legacy.js.map +1 -1
- package/dist/entrypoints/public.js +1 -1
- package/dist/entrypoints/public.js.map +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.d.ts +4 -3
- package/dist/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.js +2 -0
- package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +2 -2
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +4 -4
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +6 -6
- 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 -2
- 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 +4 -4
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +6 -6
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +12 -12
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +3 -3
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/{formatGeneric.d.ts → format/formatGeneric.d.ts} +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +187 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js +115 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +33 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js +16 -0
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/index.d.ts +10 -0
- package/dist/feature-libraries/chunked-forest/codec/format/index.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/index.js +18 -0
- package/dist/feature-libraries/chunked-forest/codec/format/index.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/versions.d.ts +93 -0
- package/dist/feature-libraries/chunked-forest/codec/format/versions.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/format/versions.js +29 -0
- package/dist/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +7 -7
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.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 +6 -4
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +3 -3
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/cursorComparator.d.ts +23 -0
- package/dist/feature-libraries/cursorComparator.d.ts.map +1 -0
- package/dist/feature-libraries/cursorComparator.js +65 -0
- package/dist/feature-libraries/cursorComparator.js.map +1 -0
- package/dist/feature-libraries/forest-summary/codec.d.ts +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +3 -3
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +3 -2
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +5 -5
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -0
- package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.js +12 -7
- package/dist/feature-libraries/indexing/anchorTreeIndex.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/fieldChangeHandler.d.ts +3 -3
- 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/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +0 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +10 -10
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +2 -4
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +3 -3
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +3 -3
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +4 -3
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts +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/optionalFieldCodecV2.d.ts +4 -4
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts +3 -3
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/index.js +2 -3
- package/dist/feature-libraries/schema-edits/index.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -15
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +8 -54
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts +3 -16
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +1 -21
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.d.ts +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/dist/feature-libraries/schema-index/index.d.ts +1 -1
- package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/index.js +1 -2
- package/dist/feature-libraries/schema-index/index.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -4
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +14 -21
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +2 -2
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +1 -2
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +2 -36
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +15 -117
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +3 -22
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +10 -27
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +3 -2
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +23 -16
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.js +13 -5
- package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/dist/shared-tree/tree.d.ts.map +1 -1
- package/dist/shared-tree/tree.js +2 -1
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +13 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +3 -0
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +34 -69
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +885 -678
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree/unhydratedTreeContext.js +3 -3
- package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +23 -12
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +40 -67
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js +0 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +10 -2
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js +18 -13
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +2 -2
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +6 -9
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +3 -3
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +5 -8
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -3
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js +8 -8
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts +2 -3
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +5 -4
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +15 -14
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +38 -74
- 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 +1 -2
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +1 -3
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +12 -2
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/sharedTreeAttributes.d.ts.map +1 -1
- package/dist/sharedTreeAttributes.js +3 -0
- package/dist/sharedTreeAttributes.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +1 -0
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +2 -2
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +6 -6
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +7 -19
- 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/treeAlpha.d.ts +69 -0
- package/dist/simple-tree/api/treeAlpha.d.ts.map +1 -0
- package/dist/simple-tree/api/treeAlpha.js +7 -0
- package/dist/simple-tree/api/treeAlpha.js.map +1 -0
- package/dist/simple-tree/api/treeBeta.d.ts +1 -1
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/api/treeChangeEvents.d.ts +3 -0
- package/dist/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
- package/dist/simple-tree/api/treeChangeEvents.js.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts +49 -0
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js +41 -2
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +45 -8
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +5 -1
- package/dist/simple-tree/core/unhydratedFlexTree.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.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +16 -0
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +23 -0
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +10 -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/array/index.d.ts +2 -2
- package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/index.d.ts +1 -1
- package/dist/simple-tree/node-kinds/index.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/index.js.map +1 -1
- package/dist/text/textDomainFormatted.d.ts +319 -9
- package/dist/text/textDomainFormatted.d.ts.map +1 -1
- package/dist/text/textDomainFormatted.js +100 -25
- package/dist/text/textDomainFormatted.js.map +1 -1
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +5 -2
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/referenceCounting.d.ts.map +1 -1
- package/dist/util/referenceCounting.js +0 -1
- package/dist/util/referenceCounting.js.map +1 -1
- package/legacy.d.ts +2 -3
- package/lib/api.d.ts +6 -1
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js.map +1 -1
- package/lib/codec/codec.d.ts +28 -2
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +1 -0
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/index.d.ts +2 -2
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts +18 -36
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js +45 -56
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/codec/versioned/index.d.ts +1 -1
- package/lib/codec/versioned/index.d.ts.map +1 -1
- package/lib/codec/versioned/index.js +1 -1
- package/lib/codec/versioned/index.js.map +1 -1
- package/lib/core/forest/forest.d.ts +5 -2
- package/lib/core/forest/forest.d.ts.map +1 -1
- package/lib/core/forest/forest.js.map +1 -1
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/changeRebaser.d.ts +8 -1
- package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
- package/lib/core/rebase/changeRebaser.js.map +1 -1
- package/lib/core/rebase/revisionTagCodec.d.ts +4 -3
- package/lib/core/rebase/revisionTagCodec.d.ts.map +1 -1
- package/lib/core/rebase/revisionTagCodec.js +2 -0
- package/lib/core/rebase/revisionTagCodec.js.map +1 -1
- package/lib/core/rebase/utils.d.ts +2 -2
- package/lib/core/rebase/utils.d.ts.map +1 -1
- package/lib/core/rebase/utils.js +4 -4
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/schema-stored/formatV2.d.ts +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 +8 -0
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +42 -7
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/cursor.d.ts +25 -1
- package/lib/core/tree/cursor.d.ts.map +1 -1
- package/lib/core/tree/cursor.js +43 -0
- package/lib/core/tree/cursor.js.map +1 -1
- package/lib/core/tree/deltaUtil.d.ts +13 -1
- package/lib/core/tree/deltaUtil.d.ts.map +1 -1
- package/lib/core/tree/deltaUtil.js +31 -0
- package/lib/core/tree/deltaUtil.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts +5 -5
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/lib/core/tree/index.d.ts +2 -2
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +2 -2
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +11 -0
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js +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 +5 -0
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/entrypoints/alpha.d.ts +1 -1
- package/lib/entrypoints/alpha.d.ts.map +1 -1
- package/lib/entrypoints/alpha.js +2 -2
- package/lib/entrypoints/alpha.js.map +1 -1
- package/lib/entrypoints/beta.js +1 -1
- package/lib/entrypoints/beta.js.map +1 -1
- package/lib/entrypoints/legacy.d.ts +1 -1
- package/lib/entrypoints/legacy.d.ts.map +1 -1
- package/lib/entrypoints/legacy.js +1 -1
- package/lib/entrypoints/legacy.js.map +1 -1
- package/lib/entrypoints/public.js +1 -1
- package/lib/entrypoints/public.js.map +1 -1
- package/lib/feature-libraries/changeAtomIdCodec.d.ts +4 -3
- package/lib/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
- package/lib/feature-libraries/changeAtomIdCodec.js +2 -0
- package/lib/feature-libraries/changeAtomIdCodec.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +2 -2
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +4 -4
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +4 -4
- 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 -2
- 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 +4 -4
- 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 +12 -12
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/{formatGeneric.d.ts → format/formatGeneric.d.ts} +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +187 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js +112 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +33 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js +13 -0
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/index.d.ts +10 -0
- package/lib/feature-libraries/chunked-forest/codec/format/index.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/index.js +8 -0
- package/lib/feature-libraries/chunked-forest/codec/format/index.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/versions.d.ts +93 -0
- package/lib/feature-libraries/chunked-forest/codec/format/versions.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/format/versions.js +26 -0
- package/lib/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +7 -7
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.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 +4 -2
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/cursorComparator.d.ts +23 -0
- package/lib/feature-libraries/cursorComparator.d.ts.map +1 -0
- package/lib/feature-libraries/cursorComparator.js +61 -0
- package/lib/feature-libraries/cursorComparator.js.map +1 -0
- package/lib/feature-libraries/forest-summary/codec.d.ts +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +3 -3
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +3 -2
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +3 -2
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -0
- package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.js +12 -7
- package/lib/feature-libraries/indexing/anchorTreeIndex.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/fieldChangeHandler.d.ts +3 -3
- 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/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +0 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +10 -10
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +2 -4
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +3 -3
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +3 -3
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +4 -3
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts +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/optionalFieldCodecV2.d.ts +4 -4
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts +3 -3
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/index.js +1 -1
- package/lib/feature-libraries/schema-edits/index.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -15
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +6 -50
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts +3 -16
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +0 -19
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.d.ts +1 -1
- package/lib/feature-libraries/schema-index/formatV2.js +1 -1
- package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/lib/feature-libraries/schema-index/index.d.ts +1 -1
- package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/index.js +1 -1
- package/lib/feature-libraries/schema-index/index.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -4
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +4 -11
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +2 -2
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +2 -36
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +17 -116
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +3 -22
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +11 -27
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +3 -2
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +19 -12
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +2 -2
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +2 -2
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.js +11 -5
- package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/lib/shared-tree/tree.d.ts.map +1 -1
- package/lib/shared-tree/tree.js +2 -1
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +13 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +3 -0
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +34 -69
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +889 -683
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree/unhydratedTreeContext.js +1 -1
- package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +23 -12
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +41 -65
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js +0 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +10 -2
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js +16 -11
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +2 -2
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +5 -8
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +3 -3
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +3 -3
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -3
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js +8 -8
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts +2 -3
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js +5 -4
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +15 -14
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +38 -71
- 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 -1
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +1 -3
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +14 -4
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/sharedTreeAttributes.d.ts.map +1 -1
- package/lib/sharedTreeAttributes.js +3 -0
- package/lib/sharedTreeAttributes.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +1 -0
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +2 -2
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +7 -7
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +7 -19
- 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/treeAlpha.d.ts +69 -0
- package/lib/simple-tree/api/treeAlpha.d.ts.map +1 -0
- package/lib/simple-tree/api/treeAlpha.js +6 -0
- package/lib/simple-tree/api/treeAlpha.js.map +1 -0
- package/lib/simple-tree/api/treeBeta.d.ts +1 -1
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/api/treeChangeEvents.d.ts +3 -0
- package/lib/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
- package/lib/simple-tree/api/treeChangeEvents.js.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts +49 -0
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js +41 -2
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +45 -8
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +5 -1
- package/lib/simple-tree/core/unhydratedFlexTree.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.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +16 -0
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +23 -0
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +10 -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/array/index.d.ts +2 -2
- package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/index.d.ts +1 -1
- package/lib/simple-tree/node-kinds/index.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/index.js.map +1 -1
- package/lib/text/textDomainFormatted.d.ts +319 -9
- package/lib/text/textDomainFormatted.d.ts.map +1 -1
- package/lib/text/textDomainFormatted.js +103 -28
- package/lib/text/textDomainFormatted.js.map +1 -1
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +6 -3
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/referenceCounting.d.ts.map +1 -1
- package/lib/util/referenceCounting.js +0 -1
- package/lib/util/referenceCounting.js.map +1 -1
- package/package.json +27 -27
- package/scripts/generate-entrypoint-sources.sh +4 -2
- package/src/api.ts +11 -0
- package/src/codec/codec.ts +32 -2
- package/src/codec/index.ts +2 -3
- package/src/codec/versioned/codec.ts +99 -109
- package/src/codec/versioned/index.ts +1 -3
- package/src/core/forest/forest.ts +5 -2
- package/src/core/index.ts +4 -0
- package/src/core/rebase/changeRebaser.ts +8 -0
- package/src/core/rebase/revisionTagCodec.ts +4 -4
- package/src/core/rebase/utils.ts +9 -2
- package/src/core/schema-stored/formatV2.ts +1 -1
- package/src/core/tree/anchorSet.ts +67 -10
- package/src/core/tree/cursor.ts +52 -1
- package/src/core/tree/deltaUtil.ts +37 -1
- package/src/core/tree/detachedFieldIndexCodecs.ts +4 -4
- package/src/core/tree/index.ts +4 -0
- package/src/core/tree/visitDelta.ts +13 -1
- package/src/core/tree/visitorUtils.ts +5 -0
- package/src/entrypoints/alpha.ts +13 -6
- package/src/entrypoints/beta.ts +2 -2
- package/src/entrypoints/legacy.ts +11 -3
- package/src/entrypoints/public.ts +1 -1
- package/src/feature-libraries/changeAtomIdCodec.ts +8 -7
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +3 -2
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +18 -13
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -2
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +16 -10
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +16 -14
- package/src/feature-libraries/chunked-forest/codec/{formatGeneric.ts → format/formatGeneric.ts} +1 -1
- package/src/feature-libraries/chunked-forest/codec/{format.ts → format/formatV1.ts} +41 -111
- package/src/feature-libraries/chunked-forest/codec/format/formatV2.ts +31 -0
- package/src/feature-libraries/chunked-forest/codec/format/index.ts +31 -0
- package/src/feature-libraries/chunked-forest/codec/format/versions.ts +81 -0
- package/src/feature-libraries/chunked-forest/codec/index.ts +6 -2
- package/src/feature-libraries/chunked-forest/codec/nodeEncoder.ts +19 -12
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +6 -4
- package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +10 -10
- package/src/feature-libraries/chunked-forest/index.ts +2 -1
- package/src/feature-libraries/cursorComparator.ts +77 -0
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +5 -5
- package/src/feature-libraries/index.ts +5 -3
- package/src/feature-libraries/indexing/anchorTreeIndex.ts +20 -10
- package/src/feature-libraries/mitigatedChangeFamily.ts +4 -1
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +4 -5
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +0 -1
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +19 -26
- package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +4 -4
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +4 -5
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +6 -2
- package/src/feature-libraries/object-forest/objectForest.ts +8 -2
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +11 -13
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +4 -5
- package/src/feature-libraries/schema-edits/index.ts +1 -4
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +10 -78
- package/src/feature-libraries/schema-index/codec.ts +0 -25
- package/src/feature-libraries/schema-index/formatV2.ts +1 -1
- package/src/feature-libraries/schema-index/index.ts +1 -4
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +6 -6
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +8 -5
- package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +4 -5
- package/src/index.ts +10 -3
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +5 -18
- package/src/shared-tree/index.ts +0 -4
- package/src/shared-tree/schematizingTreeView.ts +19 -165
- package/src/shared-tree/sharedTree.ts +16 -59
- package/src/shared-tree/sharedTreeChangeCodecs.ts +23 -29
- package/src/shared-tree/sharedTreeChangeEnricher.ts +1 -2
- package/src/shared-tree/sharedTreeChangeFamily.ts +2 -0
- package/src/shared-tree/sharedTreeChangeFormat.ts +23 -8
- package/src/shared-tree/tree.ts +2 -5
- package/src/shared-tree/treeAlpha.ts +26 -0
- package/src/shared-tree/treeCheckout.ts +275 -99
- package/src/shared-tree/unhydratedTreeContext.ts +1 -1
- package/src/shared-tree-core/editManagerCodecs.ts +99 -124
- package/src/shared-tree-core/editManagerCodecsCommons.ts +0 -1
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +54 -59
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +72 -95
- package/src/shared-tree-core/index.ts +4 -8
- package/src/shared-tree-core/messageCodecV1ToV4.ts +56 -71
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +76 -92
- package/src/shared-tree-core/messageCodecs.ts +88 -126
- package/src/shared-tree-core/messageFormat.ts +0 -3
- package/src/shared-tree-core/sharedTreeCore.ts +14 -21
- package/src/sharedTreeAttributes.ts +3 -0
- package/src/simple-tree/api/index.ts +10 -0
- package/src/simple-tree/api/schemaFactory.ts +0 -2
- package/src/simple-tree/api/schemaFactoryAlpha.ts +13 -2
- package/src/simple-tree/api/storedSchema.ts +8 -19
- package/src/simple-tree/api/tree.ts +7 -20
- package/src/simple-tree/api/treeAlpha.ts +90 -0
- package/src/simple-tree/api/treeBeta.ts +1 -1
- package/src/simple-tree/api/treeChangeEvents.ts +3 -0
- package/src/simple-tree/api/treeNodeApi.ts +95 -3
- package/src/simple-tree/core/treeNodeKernel.ts +53 -7
- package/src/simple-tree/core/unhydratedFlexTree.ts +5 -1
- package/src/simple-tree/index.ts +10 -0
- package/src/simple-tree/node-kinds/array/arrayNode.ts +64 -0
- package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +25 -1
- package/src/simple-tree/node-kinds/array/index.ts +2 -0
- package/src/simple-tree/node-kinds/index.ts +2 -0
- package/src/text/textDomainFormatted.ts +113 -11
- package/src/treeFactory.ts +10 -5
- package/src/util/referenceCounting.ts +0 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +0 -383
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +0 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +0 -191
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +0 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +0 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +0 -383
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +0 -188
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +0 -1
- /package/dist/feature-libraries/chunked-forest/codec/{formatGeneric.js → format/formatGeneric.js} +0 -0
- /package/lib/feature-libraries/chunked-forest/codec/{formatGeneric.js → format/formatGeneric.js} +0 -0
|
@@ -4,84 +4,57 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.getCodecTreeForEditManagerFormatWithChange = exports.
|
|
8
|
-
const internal_1 = require("@fluidframework/
|
|
9
|
-
const internal_2 = require("@fluidframework/runtime-utils/internal");
|
|
7
|
+
exports.getCodecTreeForEditManagerFormatWithChange = exports.makeEditManagerCodecBuilder = exports.editManagerCodecName = void 0;
|
|
8
|
+
const internal_1 = require("@fluidframework/runtime-utils/internal");
|
|
10
9
|
const index_js_1 = require("../codec/index.js");
|
|
11
|
-
const index_js_2 = require("../codec/index.js");
|
|
12
|
-
const index_js_3 = require("../util/index.js");
|
|
13
10
|
const editManagerCodecsV1toV4_js_1 = require("./editManagerCodecsV1toV4.js");
|
|
14
11
|
const editManagerCodecsVSharedBranches_js_1 = require("./editManagerCodecsVSharedBranches.js");
|
|
15
12
|
const editManagerFormatCommons_js_1 = require("./editManagerFormatCommons.js");
|
|
16
13
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @param clientVersion - The MinimumVersionForCollab to convert.
|
|
19
|
-
* @returns The EditManagerFormatVersion that corresponds to the provided MinimumVersionForCollab.
|
|
14
|
+
* Codec name used to identify the {@link EditManager} codec, see {@link makeEditManagerCodecBuilder}.
|
|
20
15
|
*/
|
|
21
|
-
|
|
22
|
-
const compatibleVersion = (0, index_js_3.brand)((0, internal_2.getConfigForMinVersionForCollab)(clientVersion, {
|
|
23
|
-
[internal_2.lowestMinVersionForCollab]: editManagerFormatCommons_js_1.EditManagerFormatVersion.v3,
|
|
24
|
-
[index_js_1.FluidClientVersion.v2_43]: editManagerFormatCommons_js_1.EditManagerFormatVersion.v4,
|
|
25
|
-
[index_js_1.FluidClientVersion.v2_80]: editManagerFormatCommons_js_1.EditManagerFormatVersion.v6,
|
|
26
|
-
}));
|
|
27
|
-
return writeVersionOverride ?? compatibleVersion;
|
|
28
|
-
}
|
|
29
|
-
exports.clientVersionToEditManagerFormatVersion = clientVersionToEditManagerFormatVersion;
|
|
16
|
+
exports.editManagerCodecName = "EditManager";
|
|
30
17
|
/**
|
|
31
|
-
*
|
|
18
|
+
* Creates a {@link ClientVersionDispatchingCodecBuilder} encoding for {@link SummaryData}.
|
|
32
19
|
*/
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
20
|
+
function makeEditManagerCodecBuilder() {
|
|
21
|
+
// See EditManagerFormatVersion and its members for documentation on what changed in each version.
|
|
22
|
+
const versions = [
|
|
23
|
+
(0, index_js_1.makeDiscontinuedCodecAndSchema)(editManagerFormatCommons_js_1.EditManagerFormatVersion.v1, "2.73.0"),
|
|
24
|
+
(0, index_js_1.makeDiscontinuedCodecAndSchema)(editManagerFormatCommons_js_1.EditManagerFormatVersion.v2, "2.73.0"),
|
|
25
|
+
{
|
|
26
|
+
minVersionForCollab: internal_1.lowestMinVersionForCollab,
|
|
27
|
+
formatVersion: editManagerFormatCommons_js_1.EditManagerFormatVersion.v3,
|
|
28
|
+
codec: (options) => (0, editManagerCodecsV1toV4_js_1.makeV1toV4andV6CodecWithVersion)(options.changeCodecs.resolve(options.dependentChangeFormatVersion.lookup(editManagerFormatCommons_js_1.EditManagerFormatVersion.v3)), options.revisionTagCodec, editManagerFormatCommons_js_1.EditManagerFormatVersion.v3),
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
minVersionForCollab: index_js_1.FluidClientVersion.v2_43,
|
|
32
|
+
formatVersion: editManagerFormatCommons_js_1.EditManagerFormatVersion.v4,
|
|
33
|
+
codec: (options) => (0, editManagerCodecsV1toV4_js_1.makeV1toV4andV6CodecWithVersion)(options.changeCodecs.resolve(options.dependentChangeFormatVersion.lookup(editManagerFormatCommons_js_1.EditManagerFormatVersion.v4)), options.revisionTagCodec, editManagerFormatCommons_js_1.EditManagerFormatVersion.v4),
|
|
34
|
+
},
|
|
35
|
+
(0, index_js_1.makeDiscontinuedCodecAndSchema)(editManagerFormatCommons_js_1.EditManagerFormatVersion.v5, "2.74.0"),
|
|
36
|
+
{
|
|
37
|
+
minVersionForCollab: index_js_1.FluidClientVersion.v2_80,
|
|
38
|
+
formatVersion: editManagerFormatCommons_js_1.EditManagerFormatVersion.v6,
|
|
39
|
+
codec: (options) => (0, editManagerCodecsV1toV4_js_1.makeV1toV4andV6CodecWithVersion)(options.changeCodecs.resolve(options.dependentChangeFormatVersion.lookup(editManagerFormatCommons_js_1.EditManagerFormatVersion.v6)), options.revisionTagCodec, editManagerFormatCommons_js_1.EditManagerFormatVersion.v6),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
minVersionForCollab: undefined,
|
|
43
|
+
formatVersion: editManagerFormatCommons_js_1.EditManagerFormatVersion.vSharedBranches,
|
|
44
|
+
codec: (options) => (0, editManagerCodecsVSharedBranches_js_1.makeSharedBranchesCodecWithVersion)(options.changeCodecs.resolve(options.dependentChangeFormatVersion.lookup(editManagerFormatCommons_js_1.EditManagerFormatVersion.vSharedBranches)), options.revisionTagCodec, editManagerFormatCommons_js_1.EditManagerFormatVersion.vSharedBranches),
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
return index_js_1.ClientVersionDispatchingCodecBuilder.build(exports.editManagerCodecName, versions);
|
|
45
48
|
}
|
|
46
|
-
exports.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
case (0, index_js_3.unbrand)(editManagerFormatCommons_js_1.EditManagerFormatVersion.v2): {
|
|
52
|
-
return [version, (0, index_js_1.makeDiscontinuedCodecVersion)(options, version, "2.73.0")];
|
|
53
|
-
}
|
|
54
|
-
case (0, index_js_3.unbrand)(editManagerFormatCommons_js_1.EditManagerFormatVersion.v3):
|
|
55
|
-
case (0, index_js_3.unbrand)(editManagerFormatCommons_js_1.EditManagerFormatVersion.v4):
|
|
56
|
-
case (0, index_js_3.unbrand)(editManagerFormatCommons_js_1.EditManagerFormatVersion.v6): {
|
|
57
|
-
const changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version));
|
|
58
|
-
return [
|
|
59
|
-
version,
|
|
60
|
-
(0, editManagerCodecsV1toV4_js_1.makeV1CodecWithVersion)(changeCodec, revisionTagCodec, options, version),
|
|
61
|
-
];
|
|
62
|
-
}
|
|
63
|
-
case (0, index_js_3.unbrand)(editManagerFormatCommons_js_1.EditManagerFormatVersion.v5): {
|
|
64
|
-
return [version, (0, index_js_1.makeDiscontinuedCodecVersion)(options, version, "2.74.0")];
|
|
65
|
-
}
|
|
66
|
-
case (0, index_js_3.unbrand)(editManagerFormatCommons_js_1.EditManagerFormatVersion.vSharedBranches): {
|
|
67
|
-
const changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version));
|
|
68
|
-
return [
|
|
69
|
-
version,
|
|
70
|
-
(0, editManagerCodecsVSharedBranches_js_1.makeSharedBranchesCodecWithVersion)(changeCodec, revisionTagCodec, options, version),
|
|
71
|
-
];
|
|
72
|
-
}
|
|
73
|
-
default: {
|
|
74
|
-
(0, internal_1.unreachableCase)(version);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
return (0, index_js_1.makeCodecFamily)(registry);
|
|
79
|
-
}
|
|
80
|
-
exports.makeEditManagerCodecs = makeEditManagerCodecs;
|
|
49
|
+
exports.makeEditManagerCodecBuilder = makeEditManagerCodecBuilder;
|
|
50
|
+
/**
|
|
51
|
+
* Returns a {@link CodecTree} for the EditManager format at the given client version,
|
|
52
|
+
* with the provided change codec tree as a child.
|
|
53
|
+
*/
|
|
81
54
|
function getCodecTreeForEditManagerFormatWithChange(clientVersion, changeFormat) {
|
|
55
|
+
const builder = makeEditManagerCodecBuilder();
|
|
82
56
|
return {
|
|
83
|
-
|
|
84
|
-
version: clientVersionToEditManagerFormatVersion(clientVersion),
|
|
57
|
+
...builder.getCodecTree(clientVersion),
|
|
85
58
|
children: [changeFormat],
|
|
86
59
|
};
|
|
87
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"editManagerCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,qEAAmF;AAEnF,gDAU2B;AAS3B,6EAA+E;AAC/E,+FAA2F;AAC3F,+EAAyE;AAUzE;;GAEG;AACU,QAAA,oBAAoB,GAAG,aAAa,CAAC;AAmBlD;;GAEG;AACH,SAAgB,2BAA2B;IAS1C,kGAAkG;IAClG,MAAM,QAAQ,GAKR;QACL,IAAA,yCAA8B,EAAC,sDAAwB,CAAC,EAAE,EAAE,QAAQ,CAAC;QACrE,IAAA,yCAA8B,EAAC,sDAAwB,CAAC,EAAE,EAAE,QAAQ,CAAC;QACrE;YACC,mBAAmB,EAAE,oCAAyB;YAC9C,aAAa,EAAE,sDAAwB,CAAC,EAAE;YAC1C,KAAK,EAAE,CAAC,OAA4C,EAAE,EAAE,CACvD,IAAA,4DAA+B,EAC9B,OAAO,CAAC,YAAY,CAAC,OAAO,CAC3B,OAAO,CAAC,4BAA4B,CAAC,MAAM,CAAC,sDAAwB,CAAC,EAAE,CAAC,CACxE,EACD,OAAO,CAAC,gBAAgB,EACxB,sDAAwB,CAAC,EAAE,CAC3B;SACF;QACD;YACC,mBAAmB,EAAE,6BAAkB,CAAC,KAAK;YAC7C,aAAa,EAAE,sDAAwB,CAAC,EAAE;YAC1C,KAAK,EAAE,CAAC,OAA4C,EAAE,EAAE,CACvD,IAAA,4DAA+B,EAC9B,OAAO,CAAC,YAAY,CAAC,OAAO,CAC3B,OAAO,CAAC,4BAA4B,CAAC,MAAM,CAAC,sDAAwB,CAAC,EAAE,CAAC,CACxE,EACD,OAAO,CAAC,gBAAgB,EACxB,sDAAwB,CAAC,EAAE,CAC3B;SACF;QACD,IAAA,yCAA8B,EAAC,sDAAwB,CAAC,EAAE,EAAE,QAAQ,CAAC;QACrE;YACC,mBAAmB,EAAE,6BAAkB,CAAC,KAAK;YAC7C,aAAa,EAAE,sDAAwB,CAAC,EAAE;YAC1C,KAAK,EAAE,CAAC,OAA4C,EAAE,EAAE,CACvD,IAAA,4DAA+B,EAC9B,OAAO,CAAC,YAAY,CAAC,OAAO,CAC3B,OAAO,CAAC,4BAA4B,CAAC,MAAM,CAAC,sDAAwB,CAAC,EAAE,CAAC,CACxE,EACD,OAAO,CAAC,gBAAgB,EACxB,sDAAwB,CAAC,EAAE,CAC3B;SACF;QACD;YACC,mBAAmB,EAAE,SAAS;YAC9B,aAAa,EAAE,sDAAwB,CAAC,eAAe;YACvD,KAAK,EAAE,CAAC,OAA4C,EAAE,EAAE,CACvD,IAAA,wEAAkC,EACjC,OAAO,CAAC,YAAY,CAAC,OAAO,CAC3B,OAAO,CAAC,4BAA4B,CAAC,MAAM,CAC1C,sDAAwB,CAAC,eAAe,CACxC,CACD,EACD,OAAO,CAAC,gBAAgB,EACxB,sDAAwB,CAAC,eAAe,CACxC;SACF;KACD,CAAC;IAEF,OAAO,+CAAoC,CAAC,KAAK,CAAC,4BAAoB,EAAE,QAAQ,CAAC,CAAC;AACnF,CAAC;AAxED,kEAwEC;AAED;;;GAGG;AACH,SAAgB,0CAA0C,CACzD,aAAsC,EACtC,YAAuB;IAEvB,MAAM,OAAO,GAAG,2BAA2B,EAAE,CAAC;IAC9C,OAAO;QACN,GAAG,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC;QACtC,QAAQ,EAAE,CAAC,YAAY,CAAC;KACxB,CAAC;AACH,CAAC;AATD,gGASC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport { lowestMinVersionForCollab } from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\tClientVersionDispatchingCodecBuilder,\n\ttype CodecTree,\n\ttype CodecVersion,\n\ttype DependentFormatVersion,\n\tFluidClientVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeDiscontinuedCodecAndSchema,\n} from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\n\nimport type { SummaryData } from \"./editManager.js\";\nimport { makeV1toV4andV6CodecWithVersion } from \"./editManagerCodecsV1toV4.js\";\nimport { makeSharedBranchesCodecWithVersion } from \"./editManagerCodecsVSharedBranches.js\";\nimport { EditManagerFormatVersion } from \"./editManagerFormatCommons.js\";\n\n/**\n * Context required for encoding/decoding the {@link EditManager}'s {@link SummaryData}.\n */\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n}\n\n/**\n * Codec name used to identify the {@link EditManager} codec, see {@link makeEditManagerCodecBuilder}.\n */\nexport const editManagerCodecName = \"EditManager\";\n\n/**\n * Options for constructing an {@link EditManager} codec, see {@link makeEditManagerCodecBuilder}.\n */\ninterface EditManagerCodecOptions<TChangeset> extends ICodecOptions {\n\t/** Codecs for encoding changesets. */\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>;\n\t/** Maps each EditManager format version to the corresponding changeset format version. */\n\tdependentChangeFormatVersion: DependentFormatVersion<EditManagerFormatVersion>;\n\t/** Codec for encoding revision tags within changesets. */\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>;\n}\n\n/**\n * Creates a {@link ClientVersionDispatchingCodecBuilder} encoding for {@link SummaryData}.\n */\nexport function makeEditManagerCodecBuilder<\n\tTChangeset,\n>(): ClientVersionDispatchingCodecBuilder<\n\tEditManagerCodecOptions<TChangeset>,\n\tSummaryData<TChangeset>,\n\tEditManagerEncodingContext,\n\tEditManagerFormatVersion,\n\ttypeof editManagerCodecName\n> {\n\t// See EditManagerFormatVersion and its members for documentation on what changed in each version.\n\tconst versions: CodecVersion<\n\t\tSummaryData<TChangeset>,\n\t\tEditManagerEncodingContext,\n\t\tEditManagerFormatVersion,\n\t\tEditManagerCodecOptions<TChangeset>\n\t>[] = [\n\t\tmakeDiscontinuedCodecAndSchema(EditManagerFormatVersion.v1, \"2.73.0\"),\n\t\tmakeDiscontinuedCodecAndSchema(EditManagerFormatVersion.v2, \"2.73.0\"),\n\t\t{\n\t\t\tminVersionForCollab: lowestMinVersionForCollab,\n\t\t\tformatVersion: EditManagerFormatVersion.v3,\n\t\t\tcodec: (options: EditManagerCodecOptions<TChangeset>) =>\n\t\t\t\tmakeV1toV4andV6CodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(EditManagerFormatVersion.v3),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tEditManagerFormatVersion.v3,\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\tminVersionForCollab: FluidClientVersion.v2_43,\n\t\t\tformatVersion: EditManagerFormatVersion.v4,\n\t\t\tcodec: (options: EditManagerCodecOptions<TChangeset>) =>\n\t\t\t\tmakeV1toV4andV6CodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(EditManagerFormatVersion.v4),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tEditManagerFormatVersion.v4,\n\t\t\t\t),\n\t\t},\n\t\tmakeDiscontinuedCodecAndSchema(EditManagerFormatVersion.v5, \"2.74.0\"),\n\t\t{\n\t\t\tminVersionForCollab: FluidClientVersion.v2_80,\n\t\t\tformatVersion: EditManagerFormatVersion.v6,\n\t\t\tcodec: (options: EditManagerCodecOptions<TChangeset>) =>\n\t\t\t\tmakeV1toV4andV6CodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(EditManagerFormatVersion.v6),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tEditManagerFormatVersion.v6,\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\tminVersionForCollab: undefined,\n\t\t\tformatVersion: EditManagerFormatVersion.vSharedBranches,\n\t\t\tcodec: (options: EditManagerCodecOptions<TChangeset>) =>\n\t\t\t\tmakeSharedBranchesCodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(\n\t\t\t\t\t\t\tEditManagerFormatVersion.vSharedBranches,\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tEditManagerFormatVersion.vSharedBranches,\n\t\t\t\t),\n\t\t},\n\t];\n\n\treturn ClientVersionDispatchingCodecBuilder.build(editManagerCodecName, versions);\n}\n\n/**\n * Returns a {@link CodecTree} for the EditManager format at the given client version,\n * with the provided change codec tree as a child.\n */\nexport function getCodecTreeForEditManagerFormatWithChange(\n\tclientVersion: MinimumVersionForCollab,\n\tchangeFormat: CodecTree,\n): CodecTree {\n\tconst builder = makeEditManagerCodecBuilder();\n\treturn {\n\t\t...builder.getCodecTree(clientVersion),\n\t\tchildren: [changeFormat],\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecsCommons.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsCommons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAe,KAAK,sBAAsB,EAAgB,MAAM,kBAAkB,CAAC;AAG1F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAGX,mBAAmB,EAGnB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,WAAW,0BAA0B;IAC1C,YAAY,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CAClC;AA4DD,wBAAgB,kBAAkB,CAAC,UAAU,EAC5C,WAAW,EAAE,UAAU,CACtB,UAAU,EACV,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,CACrB,EACD,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,IAAI,EAAE,uBAAuB,CAAC,UAAU,CAAC,EACzC,OAAO,EAAE,0BAA0B,EACnC,YAAY,EAAE,SAAS,GAAG,SAAS,GACjC,mBAAmB,CAAC,UAAU,CAAC,CAqDjC;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAC5C,WAAW,EAAE,UAAU,CACtB,UAAU,EACV,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,CACrB,EACD,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,IAAI,EAAE,mBAAmB,CAAC,UAAU,CAAC,EACrC,OAAO,EAAE,0BAA0B,EACnC,YAAY,EAAE,SAAS,GAAG,SAAS,GACjC,uBAAuB,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"editManagerCodecsCommons.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsCommons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE9E,OAAO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|
88
88
|
trunk: trunk.map((commit) =>
|
|
89
89
|
// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.
|
|
90
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
91
90
|
decodeCommit(changeCodec, revisionTagCodec, commit, {
|
|
92
91
|
originatorId: commit.sessionId,
|
|
93
92
|
idCompressor: context.idCompressor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecsCommons.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsCommons.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAU7D,+CAA0F;AAE1F,yDAAoE;AAepE,4EAA4E;AAC5E,SAAS,YAAY,CACpB,WAKC,EACD,gBAKC,EACD,MAAS,EACT,OAA8B;IAE9B,OAAO;QACN,GAAG,MAAM;QACT,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;YAClD,YAAY,EAAE,MAAM,CAAC,SAAS;YAC9B,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,QAAQ,EAAE,SAAS;SACnB,CAAC;QACF,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;KACpF,CAAC;AACH,CAAC;AAED,4EAA4E;AAC5E,SAAS,YAAY,CACpB,WAKC,EACD,gBAKC,EACD,MAAS,EACT,OAA8B;IAE9B,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;QACzD,YAAY,EAAE,MAAM,CAAC,SAAS;QAC9B,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,QAAQ,EAAE,SAAS;KACnB,CAAC,CAAC;IAEH,OAAO;QACN,GAAG,MAAM;QACT,QAAQ;QACR,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC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AY,EAAE,CAAC,CAAC;IAC3E,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAA,iBAAM,EACL,YAAY,KAAK,SAAS,EAC1B,KAAK,CAAC,oDAAoD,CAC1D,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE;YAC9C,YAAY;YACZ,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,QAAQ,EAAE,SAAS;SACnB,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AApFD,gDAoFC","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\";\nimport type { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\n\nimport type { IJsonCodec } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport { mapIterable, type JsonCompatibleReadOnly, type Mutable } from \"../util/index.js\";\n\nimport { decodeBranchId, encodeBranchId } from \"./branchIdCodec.js\";\nimport type { SharedBranchSummaryData } from \"./editManager.js\";\nimport type {\n\tCommit,\n\tEncodedCommit,\n\tEncodedSharedBranch,\n\tSequenceId,\n\tSequencedCommit,\n} from \"./editManagerFormatCommons.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction encodeCommit<TChangeset, T extends Commit<TChangeset>>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tcommit: T,\n\tcontext: ChangeEncodingContext,\n) {\n\treturn {\n\t\t...commit,\n\t\trevision: revisionTagCodec.encode(commit.revision, {\n\t\t\toriginatorId: commit.sessionId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t}),\n\t\tchange: changeCodec.encode(commit.change, { ...context, revision: commit.revision }),\n\t};\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction decodeCommit<TChangeset, T extends EncodedCommit<JsonCompatibleReadOnly>>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tcommit: T,\n\tcontext: ChangeEncodingContext,\n) {\n\tconst revision = revisionTagCodec.decode(commit.revision, {\n\t\toriginatorId: commit.sessionId,\n\t\tidCompressor: context.idCompressor,\n\t\trevision: undefined,\n\t});\n\n\treturn {\n\t\t...commit,\n\t\trevision,\n\t\tchange: changeCodec.decode(commit.change, { ...context, revision }),\n\t};\n}\n\nexport function encodeSharedBranch<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tdata: SharedBranchSummaryData<TChangeset>,\n\tcontext: EditManagerEncodingContext,\n\toriginatorId: SessionId | undefined,\n): EncodedSharedBranch<TChangeset> {\n\tconst json: Mutable<EncodedSharedBranch<TChangeset>> = {\n\t\ttrunk: data.trunk.map((commit) =>\n\t\t\tencodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\tschema: context.schema,\n\t\t\t\trevision: undefined,\n\t\t\t}),\n\t\t),\n\t\tpeers: Array.from(data.peerLocalBranches.entries(), ([sessionId, branch]) => [\n\t\t\tsessionId,\n\t\t\t{\n\t\t\t\tbase: revisionTagCodec.encode(branch.base, {\n\t\t\t\t\toriginatorId: sessionId,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t}),\n\t\t\t\tcommits: branch.commits.map((commit) =>\n\t\t\t\t\tencodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t},\n\t\t]),\n\t};\n\tif (data.session !== undefined) {\n\t\tjson.session = data.session;\n\t}\n\tif (data.id !== undefined) {\n\t\tjson.id = encodeBranchId(context.idCompressor, data.id);\n\t}\n\tif (data.name !== undefined) {\n\t\tjson.name = data.name;\n\t}\n\tif (data.author !== undefined) {\n\t\tjson.author = data.author;\n\t}\n\tif (data.base !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc62 /* Cannot encode branch base without originatorId */,\n\t\t);\n\t\tjson.base = revisionTagCodec.encode(data.base, {\n\t\t\toriginatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t});\n\t}\n\treturn json;\n}\n\nexport function decodeSharedBranch<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tjson: EncodedSharedBranch<TChangeset>,\n\tcontext: EditManagerEncodingContext,\n\toriginatorId: SessionId | undefined,\n): SharedBranchSummaryData<TChangeset> {\n\t// TODO: sort out EncodedCommit vs Commit, and make this type check without type assertion.\n\tconst trunk = json.trunk as readonly (EncodedCommit<JsonCompatibleReadOnly> & SequenceId)[];\n\tconst data: Mutable<SharedBranchSummaryData<TChangeset>> = {\n\t\ttrunk: trunk.map(\n\t\t\t(commit): SequencedCommit<TChangeset> =>\n\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\t\tdecodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t}),\n\t\t),\n\t\tpeerLocalBranches: new Map(\n\t\t\tmapIterable(json.peers, ([sessionId, branch]) => [\n\t\t\t\tsessionId,\n\t\t\t\t{\n\t\t\t\t\tbase: revisionTagCodec.decode(branch.base, {\n\t\t\t\t\t\toriginatorId: sessionId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t}),\n\t\t\t\t\tcommits: branch.commits.map((commit) =>\n\t\t\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.\n\t\t\t\t\t\tdecodeCommit(\n\t\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\tcommit as EncodedCommit<JsonCompatibleReadOnly>,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t]),\n\t\t),\n\t};\n\tif (json.session !== undefined) {\n\t\tdata.session = json.session;\n\t}\n\tif (json.name !== undefined) {\n\t\tdata.name = json.name;\n\t}\n\tif (json.author !== undefined) {\n\t\tdata.author = json.author;\n\t}\n\tif (json.id !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc63 /* Cannot decode branch id without originatorId */,\n\t\t);\n\t\tdata.id = decodeBranchId(context.idCompressor, json.id, { originatorId });\n\t}\n\tif (json.base !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc64 /* Cannot decode branch base without originatorId */,\n\t\t);\n\t\tdata.base = revisionTagCodec.decode(json.base, {\n\t\t\toriginatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t});\n\t}\n\treturn data;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"editManagerCodecsCommons.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsCommons.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAU7D,+CAA0F;AAE1F,yDAAoE;AAepE,4EAA4E;AAC5E,SAAS,YAAY,CACpB,WAKC,EACD,gBAKC,EACD,MAAS,EACT,OAA8B;IAE9B,OAAO;QACN,GAAG,MAAM;QACT,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;YAClD,YAAY,EAAE,MAAM,CAAC,SAAS;YAC9B,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,QAAQ,EAAE,SAAS;SACnB,CAAC;QACF,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;KACpF,CAAC;AACH,CAAC;AAED,4EAA4E;AAC5E,SAAS,YAAY,CACpB,WAKC,E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/B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B,CAAC;IACD,IAAI,IAAI,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QAC3B,IAAA,iBAAM,EACL,YAAY,KAAK,SAAS,EAC1B,KAAK,CAAC,kDAAkD,CACxD,CAAC;QACF,IAAI,CAAC,EAAE,GAAG,IAAA,iCAAc,EAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC;IAC3E,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAA,iBAAM,EACL,YAAY,KAAK,SAAS,EAC1B,KAAK,CAAC,oDAAoD,CAC1D,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE;YAC9C,YAAY;YACZ,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,QAAQ,EAAE,SAAS;SACnB,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAnFD,gDAmFC","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\";\nimport type { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\n\nimport type { IJsonCodec } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport { mapIterable, type JsonCompatibleReadOnly, type Mutable } from \"../util/index.js\";\n\nimport { decodeBranchId, encodeBranchId } from \"./branchIdCodec.js\";\nimport type { SharedBranchSummaryData } from \"./editManager.js\";\nimport type {\n\tCommit,\n\tEncodedCommit,\n\tEncodedSharedBranch,\n\tSequenceId,\n\tSequencedCommit,\n} from \"./editManagerFormatCommons.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction encodeCommit<TChangeset, T extends Commit<TChangeset>>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tcommit: T,\n\tcontext: ChangeEncodingContext,\n) {\n\treturn {\n\t\t...commit,\n\t\trevision: revisionTagCodec.encode(commit.revision, {\n\t\t\toriginatorId: commit.sessionId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t}),\n\t\tchange: changeCodec.encode(commit.change, { ...context, revision: commit.revision }),\n\t};\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction decodeCommit<TChangeset, T extends EncodedCommit<JsonCompatibleReadOnly>>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tcommit: T,\n\tcontext: ChangeEncodingContext,\n) {\n\tconst revision = revisionTagCodec.decode(commit.revision, {\n\t\toriginatorId: commit.sessionId,\n\t\tidCompressor: context.idCompressor,\n\t\trevision: undefined,\n\t});\n\n\treturn {\n\t\t...commit,\n\t\trevision,\n\t\tchange: changeCodec.decode(commit.change, { ...context, revision }),\n\t};\n}\n\nexport function encodeSharedBranch<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tdata: SharedBranchSummaryData<TChangeset>,\n\tcontext: EditManagerEncodingContext,\n\toriginatorId: SessionId | undefined,\n): EncodedSharedBranch<TChangeset> {\n\tconst json: Mutable<EncodedSharedBranch<TChangeset>> = {\n\t\ttrunk: data.trunk.map((commit) =>\n\t\t\tencodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\tschema: context.schema,\n\t\t\t\trevision: undefined,\n\t\t\t}),\n\t\t),\n\t\tpeers: Array.from(data.peerLocalBranches.entries(), ([sessionId, branch]) => [\n\t\t\tsessionId,\n\t\t\t{\n\t\t\t\tbase: revisionTagCodec.encode(branch.base, {\n\t\t\t\t\toriginatorId: sessionId,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t}),\n\t\t\t\tcommits: branch.commits.map((commit) =>\n\t\t\t\t\tencodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t},\n\t\t]),\n\t};\n\tif (data.session !== undefined) {\n\t\tjson.session = data.session;\n\t}\n\tif (data.id !== undefined) {\n\t\tjson.id = encodeBranchId(context.idCompressor, data.id);\n\t}\n\tif (data.name !== undefined) {\n\t\tjson.name = data.name;\n\t}\n\tif (data.author !== undefined) {\n\t\tjson.author = data.author;\n\t}\n\tif (data.base !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc62 /* Cannot encode branch base without originatorId */,\n\t\t);\n\t\tjson.base = revisionTagCodec.encode(data.base, {\n\t\t\toriginatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t});\n\t}\n\treturn json;\n}\n\nexport function decodeSharedBranch<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tjson: EncodedSharedBranch<TChangeset>,\n\tcontext: EditManagerEncodingContext,\n\toriginatorId: SessionId | undefined,\n): SharedBranchSummaryData<TChangeset> {\n\t// TODO: sort out EncodedCommit vs Commit, and make this type check without type assertion.\n\tconst trunk = json.trunk as readonly (EncodedCommit<JsonCompatibleReadOnly> & SequenceId)[];\n\tconst data: Mutable<SharedBranchSummaryData<TChangeset>> = {\n\t\ttrunk: trunk.map(\n\t\t\t(commit): SequencedCommit<TChangeset> =>\n\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.\n\t\t\t\tdecodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t}),\n\t\t),\n\t\tpeerLocalBranches: new Map(\n\t\t\tmapIterable(json.peers, ([sessionId, branch]) => [\n\t\t\t\tsessionId,\n\t\t\t\t{\n\t\t\t\t\tbase: revisionTagCodec.decode(branch.base, {\n\t\t\t\t\t\toriginatorId: sessionId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t}),\n\t\t\t\t\tcommits: branch.commits.map((commit) =>\n\t\t\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.\n\t\t\t\t\t\tdecodeCommit(\n\t\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\tcommit as EncodedCommit<JsonCompatibleReadOnly>,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t]),\n\t\t),\n\t};\n\tif (json.session !== undefined) {\n\t\tdata.session = json.session;\n\t}\n\tif (json.name !== undefined) {\n\t\tdata.name = json.name;\n\t}\n\tif (json.author !== undefined) {\n\t\tdata.author = json.author;\n\t}\n\tif (json.id !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc63 /* Cannot decode branch id without originatorId */,\n\t\t);\n\t\tdata.id = decodeBranchId(context.idCompressor, json.id, { originatorId });\n\t}\n\tif (json.base !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc64 /* Cannot decode branch base without originatorId */,\n\t\t);\n\t\tdata.base = revisionTagCodec.decode(json.base, {\n\t\t\toriginatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t});\n\t}\n\treturn data;\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
6
|
-
import {
|
|
6
|
+
import type { CodecAndSchema, IJsonCodec } from "../codec/index.js";
|
|
7
7
|
import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag, SchemaAndPolicy } from "../core/index.js";
|
|
8
8
|
import { type JsonCompatibleReadOnly } from "../util/index.js";
|
|
9
9
|
import type { SummaryData } from "./editManager.js";
|
|
@@ -12,5 +12,13 @@ export interface EditManagerEncodingContext {
|
|
|
12
12
|
idCompressor: IIdCompressor;
|
|
13
13
|
readonly schema?: SchemaAndPolicy;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Create the provided version of the {@link EditManager} codec (which encodes it's {@link SummaryData}).
|
|
17
|
+
* @remarks
|
|
18
|
+
* The changeCodec and revisionTagCodec are not explicitly versioned, so the exact right version of them must be provided here
|
|
19
|
+
* or data will be incompatible.
|
|
20
|
+
*
|
|
21
|
+
* TODO: this file should be renamed as this is used for v6 as well.
|
|
22
|
+
*/
|
|
23
|
+
export declare function makeV1toV4andV6CodecWithVersion<TChangeset>(changeCodec: IJsonCodec<TChangeset, JsonCompatibleReadOnly, JsonCompatibleReadOnly, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, version: EncodedEditManager<TChangeset>["version"]): CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext>;
|
|
16
24
|
//# sourceMappingURL=editManagerCodecsV1toV4.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecsV1toV4.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsV1toV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"editManagerCodecsV1toV4.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsV1toV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAa,MAAM,mBAAmB,CAAC;AAC/E,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,KAAK,sBAAsB,EAG3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,WAAW,0BAA0B;IAC1C,YAAY,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,UAAU,EACzD,WAAW,EAAE,UAAU,CACtB,UAAU,EACV,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,CACrB,EACD,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,GAChD,cAAc,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAC,CA4CrE"}
|
|
@@ -4,22 +4,30 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
const index_js_1 = require("../
|
|
9
|
-
const index_js_2 = require("../util/index.js");
|
|
7
|
+
exports.makeV1toV4andV6CodecWithVersion = void 0;
|
|
8
|
+
const index_js_1 = require("../util/index.js");
|
|
10
9
|
const editManagerCodecsCommons_js_1 = require("./editManagerCodecsCommons.js");
|
|
11
10
|
const editManagerFormatV1toV4_js_1 = require("./editManagerFormatV1toV4.js");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Create the provided version of the {@link EditManager} codec (which encodes it's {@link SummaryData}).
|
|
13
|
+
* @remarks
|
|
14
|
+
* The changeCodec and revisionTagCodec are not explicitly versioned, so the exact right version of them must be provided here
|
|
15
|
+
* or data will be incompatible.
|
|
16
|
+
*
|
|
17
|
+
* TODO: this file should be renamed as this is used for v6 as well.
|
|
18
|
+
*/
|
|
19
|
+
function makeV1toV4andV6CodecWithVersion(changeCodec, revisionTagCodec, version) {
|
|
20
|
+
const schema = (0, editManagerFormatV1toV4_js_1.EncodedEditManager)(changeCodec.encodedSchema ?? index_js_1.JsonCompatibleReadOnlySchema);
|
|
21
|
+
const codec = {
|
|
22
|
+
schema,
|
|
15
23
|
encode: (data, context) => {
|
|
16
24
|
const mainBranch = (0, editManagerCodecsCommons_js_1.encodeSharedBranch)(changeCodec, revisionTagCodec, data.main, context, data.originator);
|
|
17
|
-
const
|
|
25
|
+
const encoded = {
|
|
18
26
|
trunk: mainBranch.trunk,
|
|
19
27
|
branches: mainBranch.peers,
|
|
20
28
|
version,
|
|
21
29
|
};
|
|
22
|
-
return
|
|
30
|
+
return encoded;
|
|
23
31
|
},
|
|
24
32
|
decode: (json, context) => {
|
|
25
33
|
return {
|
|
@@ -29,11 +37,8 @@ function makeV1CodecWithVersion(changeCodec, revisionTagCodec, options, version)
|
|
|
29
37
|
}, context, undefined),
|
|
30
38
|
};
|
|
31
39
|
},
|
|
32
|
-
}
|
|
33
|
-
// TODO: makeVersionedValidatedCodec and withSchemaValidation should allow the codec to decode JsonCompatibleReadOnly, or Versioned or something like that,
|
|
34
|
-
// and not leak the internal encoded format in the API surface.
|
|
35
|
-
// Fixing that would remove the need for this cast.
|
|
40
|
+
};
|
|
36
41
|
return codec;
|
|
37
42
|
}
|
|
38
|
-
exports.
|
|
43
|
+
exports.makeV1toV4andV6CodecWithVersion = makeV1toV4andV6CodecWithVersion;
|
|
39
44
|
//# sourceMappingURL=editManagerCodecsV1toV4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecsV1toV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsV1toV4.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"editManagerCodecsV1toV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsV1toV4.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAWH,+CAI0B;AAG1B,+EAAuF;AACvF,6EAAkE;AAOlE;;;;;;;GAOG;AACH,SAAgB,+BAA+B,CAC9C,WAKC,EACD,gBAKC,EACD,OAAkD;IAElD,MAAM,MAAM,GAAG,IAAA,+CAAkB,EAAC,WAAW,CAAC,aAAa,IAAI,uCAA4B,CAAC,CAAC;IAE7F,MAAM,KAAK,GAAwE;QAClF,MAAM;QACN,MAAM,EAAE,CACP,IAA6B,EAC7B,OAAmC,EACyC,EAAE;YAC9E,MAAM,UAAU,GAAG,IAAA,gDAAkB,EACpC,WAAW,EACX,gBAAgB,EAChB,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CAAC;YACF,MAAM,OAAO,GAAmC;gBAC/C,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,QAAQ,EAAE,UAAU,CAAC,KAAK;gBAC1B,OAAO;aACP,CAAC;YACF,OAAO,OAEsB,CAAC;QAC/B,CAAC;QACD,MAAM,EAAE,CACP,IAA6D,EAC7D,OAAmC,EACT,EAAE;YAC5B,OAAO;gBACN,IAAI,EAAE,IAAA,gDAAkB,EACvB,WAAW,EACX,gBAAgB,EAChB;oBACC,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,KAAK,EAAE,IAAI,CAAC,QAAQ;iBACpB,EACD,OAAO,EACP,SAAS,CACT;aACD,CAAC;QACH,CAAC;KACD,CAAC;IACF,OAAO,KAAK,CAAC;AACd,CAAC;AA1DD,0EA0DC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecAndSchema, IJsonCodec, Versioned } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport {\n\ttype JsonCompatibleReadOnly,\n\ttype JsonCompatibleReadOnlyObject,\n\tJsonCompatibleReadOnlySchema,\n} from \"../util/index.js\";\n\nimport type { SummaryData } from \"./editManager.js\";\nimport { decodeSharedBranch, encodeSharedBranch } from \"./editManagerCodecsCommons.js\";\nimport { EncodedEditManager } from \"./editManagerFormatV1toV4.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n}\n\n/**\n * Create the provided version of the {@link EditManager} codec (which encodes it's {@link SummaryData}).\n * @remarks\n * The changeCodec and revisionTagCodec are not explicitly versioned, so the exact right version of them must be provided here\n * or data will be incompatible.\n *\n * TODO: this file should be renamed as this is used for v6 as well.\n */\nexport function makeV1toV4andV6CodecWithVersion<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tversion: EncodedEditManager<TChangeset>[\"version\"],\n): CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> {\n\tconst schema = EncodedEditManager(changeCodec.encodedSchema ?? JsonCompatibleReadOnlySchema);\n\n\tconst codec: CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> = {\n\t\tschema,\n\t\tencode: (\n\t\t\tdata: SummaryData<TChangeset>,\n\t\t\tcontext: EditManagerEncodingContext,\n\t\t): EncodedEditManager<TChangeset> & Versioned & JsonCompatibleReadOnlyObject => {\n\t\t\tconst mainBranch = encodeSharedBranch(\n\t\t\t\tchangeCodec,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tdata.main,\n\t\t\t\tcontext,\n\t\t\t\tdata.originator,\n\t\t\t);\n\t\t\tconst encoded: EncodedEditManager<TChangeset> = {\n\t\t\t\ttrunk: mainBranch.trunk,\n\t\t\t\tbranches: mainBranch.peers,\n\t\t\t\tversion,\n\t\t\t};\n\t\t\treturn encoded as EncodedEditManager<TChangeset> &\n\t\t\t\tVersioned &\n\t\t\t\tJsonCompatibleReadOnlyObject;\n\t\t},\n\t\tdecode: (\n\t\t\tjson: EncodedEditManager<TChangeset> & JsonCompatibleReadOnly,\n\t\t\tcontext: EditManagerEncodingContext,\n\t\t): SummaryData<TChangeset> => {\n\t\t\treturn {\n\t\t\t\tmain: decodeSharedBranch(\n\t\t\t\t\tchangeCodec,\n\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t{\n\t\t\t\t\t\ttrunk: json.trunk,\n\t\t\t\t\t\tpeers: json.branches,\n\t\t\t\t\t},\n\t\t\t\t\tcontext,\n\t\t\t\t\tundefined, // Non \"vSharedBranches\" versions do not encode the summary originatorId.\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t};\n\treturn codec;\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
6
|
-
import {
|
|
6
|
+
import type { CodecAndSchema, IJsonCodec } from "../codec/index.js";
|
|
7
7
|
import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag, SchemaAndPolicy } from "../core/index.js";
|
|
8
8
|
import { type JsonCompatibleReadOnly } from "../util/index.js";
|
|
9
9
|
import type { SummaryData } from "./editManager.js";
|
|
@@ -12,5 +12,5 @@ export interface EditManagerEncodingContext {
|
|
|
12
12
|
idCompressor: IIdCompressor;
|
|
13
13
|
readonly schema?: SchemaAndPolicy;
|
|
14
14
|
}
|
|
15
|
-
export declare function makeSharedBranchesCodecWithVersion<TChangeset>(changeCodec: IJsonCodec<TChangeset, JsonCompatibleReadOnly, JsonCompatibleReadOnly, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>,
|
|
15
|
+
export declare function makeSharedBranchesCodecWithVersion<TChangeset>(changeCodec: IJsonCodec<TChangeset, JsonCompatibleReadOnly, JsonCompatibleReadOnly, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, version: EncodedEditManager<TChangeset>["version"]): CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext>;
|
|
16
16
|
//# sourceMappingURL=editManagerCodecsVSharedBranches.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecsVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"editManagerCodecsVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,KAAK,sBAAsB,EAI3B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAA2B,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,WAAW,0BAA0B;IAC1C,YAAY,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CAClC;AAED,wBAAgB,kCAAkC,CAAC,UAAU,EAC5D,WAAW,EAAE,UAAU,CACtB,UAAU,EACV,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,CACrB,EACD,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,GAChD,cAAc,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAC,CA8ErE"}
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.makeSharedBranchesCodecWithVersion = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
|
-
const index_js_1 = require("../
|
|
10
|
-
const index_js_2 = require("../util/index.js");
|
|
9
|
+
const index_js_1 = require("../util/index.js");
|
|
11
10
|
const editManagerCodecsCommons_js_1 = require("./editManagerCodecsCommons.js");
|
|
12
11
|
const editManagerFormatVSharedBranches_js_1 = require("./editManagerFormatVSharedBranches.js");
|
|
13
|
-
function makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec,
|
|
14
|
-
const
|
|
15
|
-
const codec =
|
|
12
|
+
function makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, version) {
|
|
13
|
+
const schema = (0, editManagerFormatVSharedBranches_js_1.EncodedEditManager)(changeCodec.encodedSchema ?? index_js_1.JsonCompatibleReadOnlySchema);
|
|
14
|
+
const codec = {
|
|
15
|
+
schema,
|
|
16
16
|
encode: (data, context) => {
|
|
17
17
|
const mainBranch = (0, editManagerCodecsCommons_js_1.encodeSharedBranch)(changeCodec, revisionTagCodec, data.main, context, data.originator);
|
|
18
18
|
(0, internal_1.assert)(data.originator !== undefined, 0xca5 /* Cannot encode vSharedBranches summary without originator */);
|
|
@@ -48,10 +48,7 @@ function makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, optio
|
|
|
48
48
|
}
|
|
49
49
|
return decoded;
|
|
50
50
|
},
|
|
51
|
-
}
|
|
52
|
-
// TODO: makeVersionedValidatedCodec and withSchemaValidation should allow the codec to decode JsonCompatibleReadOnly, or Versioned or something like that,
|
|
53
|
-
// and not leak the internal encoded format in the API surface.
|
|
54
|
-
// Fixing that would remove the need for this cast.
|
|
51
|
+
};
|
|
55
52
|
return codec;
|
|
56
53
|
}
|
|
57
54
|
exports.makeSharedBranchesCodecWithVersion = makeSharedBranchesCodecWithVersion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManagerCodecsVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsVSharedBranches.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;
|
|
1
|
+
{"version":3,"file":"editManagerCodecsVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsVSharedBranches.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAU7D,+CAK0B;AAI1B,+EAAuF;AAEvF,+FAA2E;AAO3E,SAAgB,kCAAkC,CACjD,WAKC,EACD,gBAKC,EACD,OAAkD;IAElD,MAAM,MAAM,GAAG,IAAA,wDAAkB,EAAC,WAAW,CAAC,aAAa,IAAI,uCAA4B,CAAC,CAAC;IAE7F,MAAM,KAAK,GAAwE;QAClF,MAAM;QACN,MAAM,EAAE,CAAC,IAA6B,EAAE,OAAmC,EAAE,EAAE;YAC9E,MAAM,UAAU,GAAG,IAAA,gDAAkB,EACpC,WAAW,EACX,gBAAgB,EAChB,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CAAC;YACF,IAAA,iBAAM,EACL,IAAI,CAAC,UAAU,KAAK,SAAS,EAC7B,KAAK,CAAC,8DAA8D,CACpE,CAAC;YACF,MAAM,IAAI,GAA4C;gBACrD,IAAI,EAAE,UAAU;gBAChB,UAAU,EAAE,IAAI,CAAC,UAAU;g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,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;oBAChF,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;gBAC/C,CAAC;gBAED,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC7B,CAAC;YACD,OAAO,OAAO,CAAC;QAChB,CAAC;KACD,CAAC;IAEF,OAAO,KAAK,CAAC;AACd,CAAC;AA5FD,gFA4FC","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\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecAndSchema, IJsonCodec } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport {\n\ttype JsonCompatibleReadOnly,\n\ttype JsonCompatibleReadOnlyObject,\n\tJsonCompatibleReadOnlySchema,\n\ttype Mutable,\n} from \"../util/index.js\";\n\nimport type { BranchId } from \"./branch.js\";\nimport type { SharedBranchSummaryData, SummaryData } from \"./editManager.js\";\nimport { decodeSharedBranch, encodeSharedBranch } from \"./editManagerCodecsCommons.js\";\nimport type { EncodedSharedBranch } from \"./editManagerFormatCommons.js\";\nimport { EncodedEditManager } from \"./editManagerFormatVSharedBranches.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n}\n\nexport function makeSharedBranchesCodecWithVersion<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tversion: EncodedEditManager<TChangeset>[\"version\"],\n): CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> {\n\tconst schema = EncodedEditManager(changeCodec.encodedSchema ?? JsonCompatibleReadOnlySchema);\n\n\tconst codec: CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> = {\n\t\tschema,\n\t\tencode: (data: SummaryData<TChangeset>, context: EditManagerEncodingContext) => {\n\t\t\tconst mainBranch = encodeSharedBranch(\n\t\t\t\tchangeCodec,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tdata.main,\n\t\t\t\tcontext,\n\t\t\t\tdata.originator,\n\t\t\t);\n\t\t\tassert(\n\t\t\t\tdata.originator !== undefined,\n\t\t\t\t0xca5 /* Cannot encode vSharedBranches summary without originator */,\n\t\t\t);\n\t\t\tconst json: Mutable<EncodedEditManager<TChangeset>> = {\n\t\t\t\tmain: mainBranch,\n\t\t\t\toriginator: data.originator,\n\t\t\t\tversion,\n\t\t\t};\n\t\t\tif (data.branches !== undefined && data.branches.size > 0) {\n\t\t\t\tconst branches: EncodedSharedBranch<TChangeset>[] = [];\n\t\t\t\tfor (const [_, branch] of data.branches) {\n\t\t\t\t\tbranches.push(\n\t\t\t\t\t\tencodeSharedBranch(\n\t\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\tbranch,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tdata.originator,\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tjson.branches = branches;\n\t\t\t}\n\t\t\treturn json as EncodedEditManager<TChangeset> & JsonCompatibleReadOnlyObject;\n\t\t},\n\t\tdecode: (\n\t\t\tjson: EncodedEditManager<TChangeset> & JsonCompatibleReadOnlyObject,\n\t\t\tcontext: EditManagerEncodingContext,\n\t\t): SummaryData<TChangeset> => {\n\t\t\tconst mainBranch = decodeSharedBranch(\n\t\t\t\tchangeCodec,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tjson.main,\n\t\t\t\tcontext,\n\t\t\t\tjson.originator,\n\t\t\t);\n\n\t\t\tconst decoded: Mutable<SummaryData<TChangeset>> = {\n\t\t\t\tmain: mainBranch,\n\t\t\t\toriginator: json.originator,\n\t\t\t};\n\n\t\t\tif (json.branches !== undefined) {\n\t\t\t\tconst branches = new Map<BranchId, SharedBranchSummaryData<TChangeset>>();\n\t\t\t\tfor (const branch of json.branches) {\n\t\t\t\t\tconst decodedBranch = decodeSharedBranch(\n\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\tbranch,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tjson.originator,\n\t\t\t\t\t);\n\t\t\t\t\tassert(decodedBranch.id !== undefined, 0xc66 /* Shared branches must have an id */);\n\t\t\t\t\tassert(!branches.has(decodedBranch.id), 0xc67 /* Duplicate shared branch id */);\n\t\t\t\t\tbranches.set(decodedBranch.id, decodedBranch);\n\t\t\t\t}\n\n\t\t\t\tdecoded.branches = branches;\n\t\t\t}\n\t\t\treturn decoded;\n\t\t},\n\t};\n\n\treturn codec;\n}\n"]}
|
|
@@ -10,12 +10,12 @@ export { VersionedSummarizer } from "./versionedSummarizer.js";
|
|
|
10
10
|
export type { ResubmitMachine } from "./resubmitMachine.js";
|
|
11
11
|
export { DefaultResubmitMachine } from "./defaultResubmitMachine.js";
|
|
12
12
|
export { type ChangeEnricher } from "./changeEnricher.js";
|
|
13
|
-
export {
|
|
13
|
+
export { makeEditManagerCodecBuilder, getCodecTreeForEditManagerFormatWithChange, editManagerCodecName, } from "./editManagerCodecs.js";
|
|
14
14
|
export { EditManagerFormatVersion, supportedEditManagerFormatVersions, } from "./editManagerFormatCommons.js";
|
|
15
15
|
export { EditManagerSummarizer } from "./editManagerSummarizer.js";
|
|
16
16
|
export { EditManager, minimumPossibleSequenceNumber, type SummaryData, type SharedBranchSummaryData, } from "./editManager.js";
|
|
17
17
|
export type { Commit, SeqNumber, SequencedCommit, SummarySessionBranch, EncodedCommit, } from "./editManagerFormatCommons.js";
|
|
18
18
|
export type { DecodedMessage } from "./messageTypes.js";
|
|
19
|
-
export { getCodecTreeForMessageFormatWithChange,
|
|
20
|
-
export { MessageFormatVersion,
|
|
19
|
+
export { getCodecTreeForMessageFormatWithChange, makeMessageCodecBuilder, messageCodecName, type MessageEncodingContext, } from "./messageCodecs.js";
|
|
20
|
+
export { MessageFormatVersion, supportedMessageFormatVersions, } from "./messageFormat.js";
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,KAAK,MAAM,EACX,KAAK,KAAK,GACV,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,cAAc,EACd,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,8BAA8B,EAC9B,KAAK,8BAA8B,EACnC,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,wBAAwB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,O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B,aAAa,GACb,MAAM,+BAA+B,CAAC;AAEvC,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EACN,sCAAsC,EACtC,uBAAuB,EACvB,gBAAgB,EAChB,KAAK,sBAAsB,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,oBAAoB,EACpB,8BAA8B,GAC9B,MAAM,oBAAoB,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.supportedMessageFormatVersions = exports.
|
|
7
|
+
exports.supportedMessageFormatVersions = exports.MessageFormatVersion = exports.messageCodecName = exports.makeMessageCodecBuilder = exports.getCodecTreeForMessageFormatWithChange = exports.minimumPossibleSequenceNumber = exports.EditManager = exports.EditManagerSummarizer = exports.supportedEditManagerFormatVersions = exports.EditManagerFormatVersion = exports.editManagerCodecName = exports.getCodecTreeForEditManagerFormatWithChange = exports.makeEditManagerCodecBuilder = exports.DefaultResubmitMachine = exports.VersionedSummarizer = exports.summarizablesMetadataKey = exports.SharedTreeSummaryFormatVersion = exports.SharedTreeCore = exports.SquashingTransactionStack = exports.TransactionStack = exports.TransactionResult = exports.SharedTreeBranch = exports.onForkTransitive = void 0;
|
|
8
8
|
var branch_js_1 = require("./branch.js");
|
|
9
9
|
Object.defineProperty(exports, "onForkTransitive", { enumerable: true, get: function () { return branch_js_1.onForkTransitive; } });
|
|
10
10
|
Object.defineProperty(exports, "SharedTreeBranch", { enumerable: true, get: function () { return branch_js_1.SharedTreeBranch; } });
|
|
@@ -22,10 +22,9 @@ Object.defineProperty(exports, "VersionedSummarizer", { enumerable: true, get: f
|
|
|
22
22
|
var defaultResubmitMachine_js_1 = require("./defaultResubmitMachine.js");
|
|
23
23
|
Object.defineProperty(exports, "DefaultResubmitMachine", { enumerable: true, get: function () { return defaultResubmitMachine_js_1.DefaultResubmitMachine; } });
|
|
24
24
|
var editManagerCodecs_js_1 = require("./editManagerCodecs.js");
|
|
25
|
-
Object.defineProperty(exports, "
|
|
25
|
+
Object.defineProperty(exports, "makeEditManagerCodecBuilder", { enumerable: true, get: function () { return editManagerCodecs_js_1.makeEditManagerCodecBuilder; } });
|
|
26
26
|
Object.defineProperty(exports, "getCodecTreeForEditManagerFormatWithChange", { enumerable: true, get: function () { return editManagerCodecs_js_1.getCodecTreeForEditManagerFormatWithChange; } });
|
|
27
|
-
Object.defineProperty(exports, "
|
|
28
|
-
Object.defineProperty(exports, "editManagerFormatVersionSelectorForSharedBranches", { enumerable: true, get: function () { return editManagerCodecs_js_1.editManagerFormatVersionSelectorForSharedBranches; } });
|
|
27
|
+
Object.defineProperty(exports, "editManagerCodecName", { enumerable: true, get: function () { return editManagerCodecs_js_1.editManagerCodecName; } });
|
|
29
28
|
var editManagerFormatCommons_js_1 = require("./editManagerFormatCommons.js");
|
|
30
29
|
Object.defineProperty(exports, "EditManagerFormatVersion", { enumerable: true, get: function () { return editManagerFormatCommons_js_1.EditManagerFormatVersion; } });
|
|
31
30
|
Object.defineProperty(exports, "supportedEditManagerFormatVersions", { enumerable: true, get: function () { return editManagerFormatCommons_js_1.supportedEditManagerFormatVersions; } });
|
|
@@ -36,11 +35,9 @@ Object.defineProperty(exports, "EditManager", { enumerable: true, get: function
|
|
|
36
35
|
Object.defineProperty(exports, "minimumPossibleSequenceNumber", { enumerable: true, get: function () { return editManager_js_1.minimumPossibleSequenceNumber; } });
|
|
37
36
|
var messageCodecs_js_1 = require("./messageCodecs.js");
|
|
38
37
|
Object.defineProperty(exports, "getCodecTreeForMessageFormatWithChange", { enumerable: true, get: function () { return messageCodecs_js_1.getCodecTreeForMessageFormatWithChange; } });
|
|
39
|
-
Object.defineProperty(exports, "
|
|
40
|
-
Object.defineProperty(exports, "
|
|
41
|
-
Object.defineProperty(exports, "makeMessageCodec", { enumerable: true, get: function () { return messageCodecs_js_1.makeMessageCodec; } });
|
|
38
|
+
Object.defineProperty(exports, "makeMessageCodecBuilder", { enumerable: true, get: function () { return messageCodecs_js_1.makeMessageCodecBuilder; } });
|
|
39
|
+
Object.defineProperty(exports, "messageCodecName", { enumerable: true, get: function () { return messageCodecs_js_1.messageCodecName; } });
|
|
42
40
|
var messageFormat_js_1 = require("./messageFormat.js");
|
|
43
41
|
Object.defineProperty(exports, "MessageFormatVersion", { enumerable: true, get: function () { return messageFormat_js_1.MessageFormatVersion; } });
|
|
44
|
-
Object.defineProperty(exports, "messageFormatVersions", { enumerable: true, get: function () { return messageFormat_js_1.messageFormatVersions; } });
|
|
45
42
|
Object.defineProperty(exports, "supportedMessageFormatVersions", { enumerable: true, get: function () { return messageFormat_js_1.supportedMessageFormatVersions; } });
|
|
46
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree-core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAMqB;AALpB,6GAAA,gBAAgB,OAAA;AAChB,6GAAA,gBAAgB,OAAA;AAMjB,mDAQ0B;AAPzB,mHAAA,iBAAiB,OAAA;AAGjB,kHAAA,gBAAgB,OAAA;AAChB,2HAAA,yBAAyB,OAAA;AAK1B,yDAK6B;AAJ5B,mHAAA,cAAc,OAAA;AAKf,qDAO2B;AAN1B,iIAAA,8BAA8B,OAAA;AAK9B,2HAAA,wBAAwB,OAAA;AAEzB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA;AAG5B,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAI/B,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree-core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAMqB;AALpB,6GAAA,gBAAgB,OAAA;AAChB,6GAAA,gBAAgB,OAAA;AAMjB,mDAQ0B;AAPzB,mHAAA,iBAAiB,OAAA;AAGjB,kHAAA,gBAAgB,OAAA;AAChB,2HAAA,yBAAyB,OAAA;AAK1B,yDAK6B;AAJ5B,mHAAA,cAAc,OAAA;AAKf,qDAO2B;AAN1B,iIAAA,8BAA8B,OAAA;AAK9B,2HAAA,wBAAwB,OAAA;AAEzB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA;AAG5B,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAI/B,+DAIgC;AAH/B,mIAAA,2BAA2B,OAAA;AAC3B,kJAAA,0CAA0C,OAAA;AAC1C,4HAAA,oBAAoB,OAAA;AAErB,6EAGuC;AAFtC,uIAAA,wBAAwB,OAAA;AACxB,iJAAA,kCAAkC,OAAA;AAEnC,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA;AAC9B,mDAK0B;AAJzB,6GAAA,WAAW,OAAA;AACX,+HAAA,6BAA6B,OAAA;AAa9B,uDAK4B;AAJ3B,0IAAA,sCAAsC,OAAA;AACtC,2HAAA,uBAAuB,OAAA;AACvB,oHAAA,gBAAgB,OAAA;AAGjB,uDAG4B;AAF3B,wHAAA,oBAAoB,OAAA;AACpB,kIAAA,8BAA8B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tonForkTransitive,\n\tSharedTreeBranch,\n\ttype SharedTreeBranchChange,\n\ttype SharedTreeBranchEvents,\n\ttype BranchId,\n} from \"./branch.js\";\n\nexport {\n\tTransactionResult,\n\ttype Transactor,\n\ttype TransactionEvents,\n\tTransactionStack,\n\tSquashingTransactionStack,\n\ttype OnPush,\n\ttype OnPop,\n} from \"./transaction.js\";\n\nexport {\n\tSharedTreeCore,\n\ttype ClonableSchemaAndPolicy,\n\ttype SharedTreeCoreOptionsInternal,\n\ttype EnrichmentConfig,\n} from \"./sharedTreeCore.js\";\nexport {\n\tSharedTreeSummaryFormatVersion,\n\ttype SharedTreeSummarizableMetadata,\n\ttype Summarizable,\n\ttype SummaryElementParser,\n\ttype SummaryElementStringifier,\n\tsummarizablesMetadataKey,\n} from \"./summaryTypes.js\";\nexport { VersionedSummarizer } from \"./versionedSummarizer.js\";\n\nexport type { ResubmitMachine } from \"./resubmitMachine.js\";\nexport { DefaultResubmitMachine } from \"./defaultResubmitMachine.js\";\n\nexport { type ChangeEnricher } from \"./changeEnricher.js\";\n\nexport {\n\tmakeEditManagerCodecBuilder,\n\tgetCodecTreeForEditManagerFormatWithChange,\n\teditManagerCodecName,\n} from \"./editManagerCodecs.js\";\nexport {\n\tEditManagerFormatVersion,\n\tsupportedEditManagerFormatVersions,\n} from \"./editManagerFormatCommons.js\";\nexport { EditManagerSummarizer } from \"./editManagerSummarizer.js\";\nexport {\n\tEditManager,\n\tminimumPossibleSequenceNumber,\n\ttype SummaryData,\n\ttype SharedBranchSummaryData,\n} from \"./editManager.js\";\nexport type {\n\tCommit,\n\tSeqNumber,\n\tSequencedCommit,\n\tSummarySessionBranch,\n\tEncodedCommit,\n} from \"./editManagerFormatCommons.js\";\n\nexport type { DecodedMessage } from \"./messageTypes.js\";\nexport {\n\tgetCodecTreeForMessageFormatWithChange,\n\tmakeMessageCodecBuilder,\n\tmessageCodecName,\n\ttype MessageEncodingContext,\n} from \"./messageCodecs.js\";\nexport {\n\tMessageFormatVersion,\n\tsupportedMessageFormatVersions,\n} from \"./messageFormat.js\";\n"]}
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import type { CodecAndSchema, IJsonCodec } from "../codec/index.js";
|
|
6
6
|
import type { ChangeEncodingContext, ChangeFamilyCodec, EncodedRevisionTag, RevisionTag } from "../core/index.js";
|
|
7
|
-
import type { JsonCompatibleReadOnly } from "../util/index.js";
|
|
8
7
|
import type { MessageEncodingContext } from "./messageCodecs.js";
|
|
9
8
|
import type { MessageFormatVersion } from "./messageFormat.js";
|
|
10
9
|
import type { DecodedMessage } from "./messageTypes.js";
|
|
11
|
-
export declare function makeV1ToV4CodecWithVersion<TChangeset>(changeCodec: ChangeFamilyCodec<TChangeset>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>,
|
|
10
|
+
export declare function makeV1ToV4CodecWithVersion<TChangeset>(changeCodec: ChangeFamilyCodec<TChangeset>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, version: typeof MessageFormatVersion.v1 | typeof MessageFormatVersion.v2 | typeof MessageFormatVersion.v3 | typeof MessageFormatVersion.v4 | typeof MessageFormatVersion.v6): CodecAndSchema<DecodedMessage<TChangeset>, MessageEncodingContext>;
|
|
12
11
|
//# sourceMappingURL=messageCodecV1ToV4.d.ts.map
|