@fluidframework/tree 2.61.0 → 2.62.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 +162 -0
- package/api-report/tree.alpha.api.md +26 -21
- package/api-report/tree.beta.api.md +15 -0
- package/api-report/tree.legacy.beta.api.md +18 -0
- package/dist/alpha.d.ts +8 -8
- package/dist/api.d.ts +17 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +24 -0
- package/dist/api.js.map +1 -0
- package/dist/beta.d.ts +5 -0
- package/dist/codec/codec.d.ts +3 -5
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +9 -2
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/index.d.ts +0 -1
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +1 -3
- package/dist/codec/index.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 +2 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js +2 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/utils.d.ts +10 -0
- package/dist/core/rebase/utils.d.ts.map +1 -1
- package/dist/core/rebase/utils.js +20 -1
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +1 -1
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/external-utilities/index.d.ts +1 -1
- package/dist/external-utilities/index.d.ts.map +1 -1
- package/dist/external-utilities/index.js +1 -2
- package/dist/external-utilities/index.js.map +1 -1
- package/dist/external-utilities/typeboxValidator.d.ts +0 -13
- package/dist/external-utilities/typeboxValidator.d.ts.map +1 -1
- package/dist/external-utilities/typeboxValidator.js +3 -5
- package/dist/external-utilities/typeboxValidator.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -0
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts +1 -0
- package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/index.js +4 -1
- package/dist/feature-libraries/flex-tree/index.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +15 -8
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/observer.d.ts +32 -0
- package/dist/feature-libraries/flex-tree/observer.d.ts.map +1 -0
- package/dist/feature-libraries/flex-tree/observer.js +33 -0
- package/dist/feature-libraries/flex-tree/observer.js.map +1 -0
- package/dist/feature-libraries/index.d.ts +1 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +3 -1
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +7 -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/index.d.ts +2 -2
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +2 -2
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +21 -6
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +76 -37
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +114 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +140 -1
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +13 -7
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +115 -85
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +3 -0
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/branchIdCodec.d.ts +11 -0
- package/dist/shared-tree-core/branchIdCodec.d.ts.map +1 -0
- package/dist/shared-tree-core/branchIdCodec.js +18 -0
- package/dist/shared-tree-core/branchIdCodec.js.map +1 -0
- package/dist/shared-tree-core/editManager.d.ts +39 -64
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +455 -295
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +7 -96
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +17 -0
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -0
- package/dist/shared-tree-core/editManagerCodecsCommons.js +139 -0
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -0
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +16 -0
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -0
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js +39 -0
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -0
- package/dist/shared-tree-core/editManagerCodecsV5.d.ts +16 -0
- package/dist/shared-tree-core/editManagerCodecsV5.d.ts.map +1 -0
- package/dist/shared-tree-core/editManagerCodecsV5.js +58 -0
- package/dist/shared-tree-core/editManagerCodecsV5.js.map +1 -0
- package/dist/shared-tree-core/{editManagerFormat.d.ts → editManagerFormatCommons.d.ts} +31 -7
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -0
- package/dist/shared-tree-core/{editManagerFormat.js → editManagerFormatCommons.js} +13 -12
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -0
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +31 -0
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -0
- package/dist/shared-tree-core/editManagerFormatV1toV4.js +24 -0
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -0
- package/dist/shared-tree-core/editManagerFormatV5.d.ts +62 -0
- package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +1 -0
- package/dist/shared-tree-core/editManagerFormatV5.js +20 -0
- package/dist/shared-tree-core/editManagerFormatV5.js.map +1 -0
- 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.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +11 -0
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -0
- package/dist/shared-tree-core/messageCodecV1ToV4.js +59 -0
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -0
- package/dist/shared-tree-core/messageCodecV5.d.ts +11 -0
- package/dist/shared-tree-core/messageCodecV5.d.ts.map +1 -0
- package/dist/shared-tree-core/messageCodecV5.js +78 -0
- package/dist/shared-tree-core/messageCodecV5.js.map +1 -0
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +16 -47
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/{messageFormat.d.ts → messageFormatV1ToV4.d.ts} +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -0
- package/dist/shared-tree-core/{messageFormat.js → messageFormatV1ToV4.js} +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -0
- package/dist/shared-tree-core/messageFormatV5.d.ts +42 -0
- package/dist/shared-tree-core/messageFormatV5.d.ts.map +1 -0
- package/dist/shared-tree-core/messageFormatV5.js +20 -0
- package/dist/shared-tree-core/messageFormatV5.js.map +1 -0
- package/dist/shared-tree-core/messageTypes.d.ts +12 -2
- package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
- package/dist/shared-tree-core/messageTypes.js.map +1 -1
- package/dist/shared-tree-core/sequenceIdUtils.d.ts +1 -1
- package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
- package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +19 -5
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +182 -58
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +17 -0
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js +2 -0
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +7 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/treeFactory.d.ts +38 -9
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +44 -9
- package/dist/treeFactory.js.map +1 -1
- package/lib/alpha.d.ts +8 -8
- package/lib/api.d.ts +17 -0
- package/lib/api.d.ts.map +1 -0
- package/lib/api.js +22 -0
- package/lib/api.js.map +1 -0
- package/lib/beta.d.ts +5 -0
- package/lib/codec/codec.d.ts +3 -5
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +8 -1
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/index.d.ts +0 -1
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +0 -1
- package/lib/codec/index.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/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/utils.d.ts +10 -0
- package/lib/core/rebase/utils.d.ts.map +1 -1
- package/lib/core/rebase/utils.js +18 -0
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +2 -2
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/external-utilities/index.d.ts +1 -1
- package/lib/external-utilities/index.d.ts.map +1 -1
- package/lib/external-utilities/index.js +1 -1
- package/lib/external-utilities/index.js.map +1 -1
- package/lib/external-utilities/typeboxValidator.d.ts +0 -13
- package/lib/external-utilities/typeboxValidator.d.ts.map +1 -1
- package/lib/external-utilities/typeboxValidator.js +1 -3
- package/lib/external-utilities/typeboxValidator.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -0
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts +1 -0
- package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/index.js +1 -0
- package/lib/feature-libraries/flex-tree/index.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +15 -8
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/flex-tree/observer.d.ts +32 -0
- package/lib/feature-libraries/flex-tree/observer.d.ts.map +1 -0
- package/lib/feature-libraries/flex-tree/observer.js +40 -0
- package/lib/feature-libraries/flex-tree/observer.js.map +1 -0
- package/lib/feature-libraries/index.d.ts +1 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/index.d.ts +5 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +7 -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/index.d.ts +2 -2
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +2 -2
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +21 -6
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +78 -39
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +114 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +143 -4
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +13 -7
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +117 -87
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +3 -0
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/branchIdCodec.d.ts +11 -0
- package/lib/shared-tree-core/branchIdCodec.d.ts.map +1 -0
- package/lib/shared-tree-core/branchIdCodec.js +13 -0
- package/lib/shared-tree-core/branchIdCodec.js.map +1 -0
- package/lib/shared-tree-core/editManager.d.ts +39 -64
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +455 -295
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +4 -93
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +17 -0
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -0
- package/lib/shared-tree-core/editManagerCodecsCommons.js +134 -0
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -0
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +16 -0
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -0
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js +35 -0
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -0
- package/lib/shared-tree-core/editManagerCodecsV5.d.ts +16 -0
- package/lib/shared-tree-core/editManagerCodecsV5.d.ts.map +1 -0
- package/lib/shared-tree-core/editManagerCodecsV5.js +54 -0
- package/lib/shared-tree-core/editManagerCodecsV5.js.map +1 -0
- package/lib/shared-tree-core/{editManagerFormat.d.ts → editManagerFormatCommons.d.ts} +31 -7
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -0
- package/lib/shared-tree-core/{editManagerFormat.js → editManagerFormatCommons.js} +10 -11
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -0
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +31 -0
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -0
- package/lib/shared-tree-core/editManagerFormatV1toV4.js +20 -0
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -0
- package/lib/shared-tree-core/editManagerFormatV5.d.ts +62 -0
- package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +1 -0
- package/lib/shared-tree-core/editManagerFormatV5.js +16 -0
- package/lib/shared-tree-core/editManagerFormatV5.js.map +1 -0
- 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.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +11 -0
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -0
- package/lib/shared-tree-core/messageCodecV1ToV4.js +55 -0
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -0
- package/lib/shared-tree-core/messageCodecV5.d.ts +11 -0
- package/lib/shared-tree-core/messageCodecV5.d.ts.map +1 -0
- package/lib/shared-tree-core/messageCodecV5.js +74 -0
- package/lib/shared-tree-core/messageCodecV5.js.map +1 -0
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +17 -48
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/{messageFormat.d.ts → messageFormatV1ToV4.d.ts} +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -0
- package/lib/shared-tree-core/{messageFormat.js → messageFormatV1ToV4.js} +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -0
- package/lib/shared-tree-core/messageFormatV5.d.ts +42 -0
- package/lib/shared-tree-core/messageFormatV5.d.ts.map +1 -0
- package/lib/shared-tree-core/messageFormatV5.js +16 -0
- package/lib/shared-tree-core/messageFormatV5.js.map +1 -0
- package/lib/shared-tree-core/messageTypes.d.ts +12 -2
- package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
- package/lib/shared-tree-core/messageTypes.js.map +1 -1
- package/lib/shared-tree-core/sequenceIdUtils.d.ts +1 -1
- package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
- package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +19 -5
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +183 -59
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +17 -0
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js +2 -0
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +8 -2
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/treeFactory.d.ts +38 -9
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +41 -8
- package/lib/treeFactory.js.map +1 -1
- package/package.json +25 -25
- package/src/api.ts +30 -0
- package/src/codec/codec.ts +12 -6
- package/src/codec/index.ts +0 -1
- package/src/core/index.ts +1 -0
- package/src/core/rebase/index.ts +1 -0
- package/src/core/rebase/utils.ts +27 -0
- package/src/core/tree/detachedFieldIndex.ts +2 -2
- package/src/external-utilities/index.ts +1 -1
- package/src/external-utilities/typeboxValidator.ts +1 -3
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +2 -0
- package/src/feature-libraries/flex-tree/index.ts +2 -0
- package/src/feature-libraries/flex-tree/lazyNode.ts +13 -3
- package/src/feature-libraries/flex-tree/observer.ts +64 -0
- package/src/feature-libraries/index.ts +3 -0
- package/src/index.ts +6 -4
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/index.ts +2 -0
- package/src/shared-tree/schematizingTreeView.ts +2 -2
- package/src/shared-tree/sharedTree.ts +116 -52
- package/src/shared-tree/treeAlpha.ts +309 -4
- package/src/shared-tree/treeCheckout.ts +152 -100
- package/src/shared-tree-core/branch.ts +7 -0
- package/src/shared-tree-core/branchIdCodec.ts +28 -0
- package/src/shared-tree-core/editManager.ts +729 -430
- package/src/shared-tree-core/editManagerCodecs.ts +4 -164
- package/src/shared-tree-core/editManagerCodecsCommons.ts +245 -0
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +108 -0
- package/src/shared-tree-core/editManagerCodecsV5.ts +156 -0
- package/src/shared-tree-core/{editManagerFormat.ts → editManagerFormatCommons.ts} +17 -13
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +42 -0
- package/src/shared-tree-core/editManagerFormatV5.ts +35 -0
- package/src/shared-tree-core/index.ts +3 -1
- package/src/shared-tree-core/messageCodecV1ToV4.ts +104 -0
- package/src/shared-tree-core/messageCodecV5.ts +131 -0
- package/src/shared-tree-core/messageCodecs.ts +16 -85
- package/src/shared-tree-core/messageFormatV5.ts +50 -0
- package/src/shared-tree-core/messageTypes.ts +15 -2
- package/src/shared-tree-core/sequenceIdUtils.ts +1 -1
- package/src/shared-tree-core/sharedTreeCore.ts +281 -85
- package/src/simple-tree/api/tree.ts +23 -0
- package/src/simple-tree/core/unhydratedFlexTree.ts +11 -2
- package/src/treeFactory.ts +48 -8
- package/dist/codec/noopValidator.d.ts +0 -13
- package/dist/codec/noopValidator.d.ts.map +0 -1
- package/dist/codec/noopValidator.js +0 -17
- package/dist/codec/noopValidator.js.map +0 -1
- package/dist/shared-tree-core/editManagerFormat.d.ts.map +0 -1
- package/dist/shared-tree-core/editManagerFormat.js.map +0 -1
- package/dist/shared-tree-core/messageFormat.d.ts.map +0 -1
- package/dist/shared-tree-core/messageFormat.js.map +0 -1
- package/docs/user-facing/schema-evolution.md +0 -309
- package/lib/codec/noopValidator.d.ts +0 -13
- package/lib/codec/noopValidator.d.ts.map +0 -1
- package/lib/codec/noopValidator.js +0 -14
- package/lib/codec/noopValidator.js.map +0 -1
- package/lib/shared-tree-core/editManagerFormat.d.ts.map +0 -1
- package/lib/shared-tree-core/editManagerFormat.js.map +0 -1
- package/lib/shared-tree-core/messageFormat.d.ts.map +0 -1
- package/lib/shared-tree-core/messageFormat.js.map +0 -1
- package/src/codec/noopValidator.ts +0 -18
- /package/src/shared-tree-core/{messageFormat.ts → messageFormatV1ToV4.ts} +0 -0
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SessionId } from "@fluidframework/id-compressor";
|
|
6
6
|
import { type ChangeFamily, type ChangeFamilyEditor, type GraphCommit, type RevisionTag } from "../core/index.js";
|
|
7
|
-
import { SharedTreeBranch } from "./branch.js";
|
|
8
|
-
import type { SeqNumber, SequencedCommit, SummarySessionBranch } from "./
|
|
7
|
+
import { SharedTreeBranch, type BranchId } from "./branch.js";
|
|
8
|
+
import type { SeqNumber, SequencedCommit, SummarySessionBranch } from "./editManagerFormatCommons.js";
|
|
9
9
|
import { type ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
10
10
|
export declare const minimumPossibleSequenceNumber: SeqNumber;
|
|
11
11
|
/**
|
|
@@ -16,32 +16,13 @@ export declare class EditManager<TEditor extends ChangeFamilyEditor, TChangeset,
|
|
|
16
16
|
readonly changeFamily: TChangeFamily;
|
|
17
17
|
readonly localSessionId: SessionId;
|
|
18
18
|
private readonly mintRevisionTag;
|
|
19
|
+
private readonly onSharedBranchCreated?;
|
|
19
20
|
private readonly _events;
|
|
20
|
-
|
|
21
|
-
private readonly trunk;
|
|
21
|
+
private readonly sharedBranches;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
private readonly trunkMetadata;
|
|
27
|
-
/**
|
|
28
|
-
* A map from a sequence id to the commit in the {@link trunk} which has that sequence id.
|
|
29
|
-
* This also includes an entry for the {@link trunkBase} which always has the lowest key in the map.
|
|
30
|
-
*/
|
|
31
|
-
private readonly sequenceMap;
|
|
32
|
-
/**
|
|
33
|
-
* Branches are maintained to represent the local change list that the issuing client had
|
|
34
|
-
* at the time of submitting the latest known edit on the branch.
|
|
35
|
-
* This means the head commit of each branch is always in its original (non-rebased) form.
|
|
36
|
-
*/
|
|
37
|
-
private readonly peerLocalBranches;
|
|
38
|
-
/**
|
|
39
|
-
* This branch holds the changes made by this client which have not yet been confirmed as sequenced changes.
|
|
40
|
-
*/
|
|
41
|
-
readonly localBranch: SharedTreeBranch<TEditor, TChangeset>;
|
|
42
|
-
/**
|
|
43
|
-
* Tracks where on the trunk all registered branches are based. Each key is the sequence id of a commit on
|
|
44
|
-
* the trunk, and the value is the set of all branches who have that commit as their common ancestor with the trunk.
|
|
23
|
+
* Tracks where on the trunk of the main branch all registered branches are based.
|
|
24
|
+
* Each key is the sequence id of a commit on the trunk,
|
|
25
|
+
* and the value is the set of all branches who have that commit as their common ancestor with the trunk.
|
|
45
26
|
*
|
|
46
27
|
* @remarks
|
|
47
28
|
* This does not include the local branch.
|
|
@@ -61,17 +42,16 @@ export declare class EditManager<TEditor extends ChangeFamilyEditor, TChangeset,
|
|
|
61
42
|
* Each time trunk eviction occurs, the most recent evicted commit becomes the new `trunkBase`.
|
|
62
43
|
*/
|
|
63
44
|
private trunkBase;
|
|
64
|
-
/**
|
|
65
|
-
* The list of commits (from oldest to most recent) that are on the local branch but not on the trunk.
|
|
66
|
-
* When a local commit is sequenced, the first commit in this list shifted onto the tip of the trunk.
|
|
67
|
-
*/
|
|
68
|
-
private readonly localCommits;
|
|
69
45
|
private readonly telemetryEventBatcher;
|
|
70
46
|
/**
|
|
71
47
|
* @param changeFamily - the change family of changes on the trunk and local branch
|
|
72
48
|
* @param localSessionId - the id of the local session that will be used for local commits
|
|
49
|
+
* @param mintRevisionTag - a function which generates globally unique revision tags
|
|
50
|
+
* @param onSharedBranchCreated - called when a new shared branch is created. This is not called for the main branch.
|
|
73
51
|
*/
|
|
74
|
-
constructor(changeFamily: TChangeFamily, localSessionId: SessionId, mintRevisionTag: () => RevisionTag, logger?: ITelemetryLoggerExt);
|
|
52
|
+
constructor(changeFamily: TChangeFamily, localSessionId: SessionId, mintRevisionTag: () => RevisionTag, onSharedBranchCreated?: ((branchId: BranchId) => void) | undefined, logger?: ITelemetryLoggerExt);
|
|
53
|
+
getLocalBranch(branchId: BranchId): SharedTreeBranch<TEditor, TChangeset>;
|
|
54
|
+
private getSharedBranch;
|
|
75
55
|
/**
|
|
76
56
|
* Make the given branch known to the `EditManager`. The `EditManager` will ensure that all registered
|
|
77
57
|
* branches remain usable even as the minimum sequence number advances.
|
|
@@ -85,19 +65,9 @@ export declare class EditManager<TEditor extends ChangeFamilyEditor, TChangeset,
|
|
|
85
65
|
private trackBranch;
|
|
86
66
|
private untrackBranch;
|
|
87
67
|
/**
|
|
88
|
-
*
|
|
89
|
-
* @param sequenceId - The sequence id of the new trunk commit
|
|
90
|
-
* @remarks This method is a performance optimization for the scenario where this client receives its own change back after sequencing.
|
|
91
|
-
* The normal (not optimized) process in this case would be to apply the new sequenced commit to the trunk and then rebase the local branch over the trunk.
|
|
92
|
-
* The first commit will be "the same" (as in, it will have the same revision) as the commit that was just sequenced, so the rebase will be a no-op.
|
|
93
|
-
* Because the rebase is a no-op, we can skip it entirely and simply remove the commit from the local branch and append it to the trunk.
|
|
94
|
-
* Avoiding the overhead of the rebase process, even when it's a no-op, has real measured performance benefits and is worth the added complexity here.
|
|
95
|
-
*/
|
|
96
|
-
private fastForwardNextLocalCommit;
|
|
97
|
-
/**
|
|
98
|
-
* Return the sequence number at which the given commit was sequenced on the trunk, or undefined if the commit is not part of the trunk.
|
|
68
|
+
* Return the sequenced number of the latest sequenced change.
|
|
99
69
|
*/
|
|
100
|
-
|
|
70
|
+
getLatestSequenceNumber(): SeqNumber | undefined;
|
|
101
71
|
/**
|
|
102
72
|
* Advances the minimum sequence number, and removes all commits from the trunk which lie outside the collaboration window,
|
|
103
73
|
* if they are not retained by revertibles or local branches.
|
|
@@ -105,21 +75,19 @@ export declare class EditManager<TEditor extends ChangeFamilyEditor, TChangeset,
|
|
|
105
75
|
*
|
|
106
76
|
* @remarks If there are more than one commit with the same sequence number we assume this refers to the last commit in the batch.
|
|
107
77
|
*/
|
|
108
|
-
advanceMinimumSequenceNumber(minimumSequenceNumber: SeqNumber,
|
|
78
|
+
advanceMinimumSequenceNumber(minimumSequenceNumber: SeqNumber, trimHistory?: boolean): void;
|
|
109
79
|
/**
|
|
110
80
|
* Examines the latest known minimum sequence number and the trunk bases of any registered branches to determine
|
|
111
81
|
* if any commits on the trunk are unreferenced and unneeded for future computation; those found are evicted from the trunk.
|
|
112
82
|
*/
|
|
113
|
-
private
|
|
83
|
+
private trimHistory;
|
|
114
84
|
isEmpty(): boolean;
|
|
115
85
|
getSummaryData(): SummaryData<TChangeset>;
|
|
116
86
|
loadSummaryData(data: SummaryData<TChangeset>): void;
|
|
117
|
-
|
|
118
|
-
getTrunkChanges():
|
|
119
|
-
getTrunkCommits():
|
|
120
|
-
|
|
121
|
-
getLocalChanges(): readonly TChangeset[];
|
|
122
|
-
getLocalCommits(): readonly GraphCommit<TChangeset>[];
|
|
87
|
+
getTrunkHead(branchId: BranchId): GraphCommit<TChangeset>;
|
|
88
|
+
getTrunkChanges(branchId: BranchId): TChangeset[];
|
|
89
|
+
getTrunkCommits(branchId: BranchId): GraphCommit<TChangeset>[];
|
|
90
|
+
getLocalCommits(branchId: BranchId): readonly GraphCommit<TChangeset>[];
|
|
123
91
|
/**
|
|
124
92
|
* Gets the length of the longest branch maintained by this `EditManager`.
|
|
125
93
|
* This may be the length of a peer branch or the local branch.
|
|
@@ -129,6 +97,13 @@ export declare class EditManager<TEditor extends ChangeFamilyEditor, TChangeset,
|
|
|
129
97
|
* have length zero.
|
|
130
98
|
*/
|
|
131
99
|
getLongestBranchLength(): number;
|
|
100
|
+
sequenceBranchCreation(sessionId: SessionId, referenceSequenceNumber: SeqNumber, branchId: BranchId): void;
|
|
101
|
+
addNewBranch(branchId: BranchId): void;
|
|
102
|
+
getSharedBranchIds(): BranchId[];
|
|
103
|
+
removeBranch(branchId: BranchId): void;
|
|
104
|
+
private createAndAddSharedBranch;
|
|
105
|
+
private addSharedBranch;
|
|
106
|
+
private createSharedBranch;
|
|
132
107
|
/**
|
|
133
108
|
* Add a bunch of sequenced changes. A bunch is a group of sequenced commits that have the following properties:
|
|
134
109
|
* - They are not interleaved with messages from other DDSes in the container.
|
|
@@ -138,23 +113,23 @@ export declare class EditManager<TEditor extends ChangeFamilyEditor, TChangeset,
|
|
|
138
113
|
* - They are all based on the same reference sequence number.
|
|
139
114
|
* - They are not interleaved with messages from other clients.
|
|
140
115
|
*/
|
|
141
|
-
addSequencedChanges(newCommits: readonly GraphCommit<TChangeset>[], sessionId: SessionId, sequenceNumber: SeqNumber, referenceSequenceNumber: SeqNumber): void;
|
|
142
|
-
findLocalCommit(revision: RevisionTag): [commit: GraphCommit<TChangeset>, commitsAfter: GraphCommit<TChangeset>[]];
|
|
143
|
-
private pushCommitToTrunk;
|
|
144
|
-
private pushGraphCommitToTrunk;
|
|
145
|
-
/**
|
|
146
|
-
* Finds the most recent trunk commit that was sequenced at or before the given point.
|
|
147
|
-
* @param searchBy - the sequence number or the sequence id to search for
|
|
148
|
-
* @remarks Fails if there is no eligible commit.
|
|
149
|
-
* @returns the closest commit and its sequence id
|
|
150
|
-
*/
|
|
151
|
-
private getClosestTrunkCommit;
|
|
152
|
-
private getBatch;
|
|
116
|
+
addSequencedChanges(newCommits: readonly GraphCommit<TChangeset>[], sessionId: SessionId, sequenceNumber: SeqNumber, referenceSequenceNumber: SeqNumber, branchId: BranchId): void;
|
|
117
|
+
findLocalCommit(branchId: BranchId, revision: RevisionTag): [commit: GraphCommit<TChangeset>, commitsAfter: GraphCommit<TChangeset>[]];
|
|
153
118
|
}
|
|
154
119
|
/**
|
|
155
120
|
* The in-memory data that summaries contain
|
|
156
121
|
*/
|
|
157
122
|
export interface SummaryData<TChangeset> {
|
|
123
|
+
readonly originator?: SessionId;
|
|
124
|
+
readonly main: SharedBranchSummaryData<TChangeset>;
|
|
125
|
+
readonly branches?: ReadonlyMap<BranchId, SharedBranchSummaryData<TChangeset>>;
|
|
126
|
+
}
|
|
127
|
+
export interface SharedBranchSummaryData<TChangeset> {
|
|
128
|
+
readonly id?: BranchId;
|
|
129
|
+
readonly name?: string;
|
|
130
|
+
readonly session?: SessionId;
|
|
131
|
+
readonly author?: string;
|
|
132
|
+
readonly base?: RevisionTag;
|
|
158
133
|
readonly trunk: readonly SequencedCommit<TChangeset>[];
|
|
159
134
|
readonly peerLocalBranches: ReadonlyMap<SessionId, SummarySessionBranch<TChangeset>>;
|
|
160
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editManager.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,WAAW,EAMhB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,
|
|
1
|
+
{"version":3,"file":"editManager.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,WAAW,EAMhB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACN,gBAAgB,EAGhB,KAAK,QAAQ,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAEX,SAAS,EAET,eAAe,EACf,oBAAoB,EACpB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,0CAA0C,CAAC;AAGlD,eAAO,MAAM,6BAA6B,EAAE,SAA0C,CAAC;AAkBvF;;;GAGG;AAEH,qBAAa,WAAW,CACvB,OAAO,SAAS,kBAAkB,EAClC,UAAU,EACV,aAAa,SAAS,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC;aA8CtC,YAAY,EAAE,aAAa;aAC3B,cAAc,EAAE,SAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IA/CxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyC;IAEjE,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