@fluidframework/tree 2.116.1 → 2.117.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 +116 -0
- package/api-report/tree.alpha.api.md +78 -30
- package/api-report/tree.beta.api.md +12 -9
- package/api-report/tree.legacy.beta.api.md +12 -9
- package/dist/codec/codec.d.ts +18 -0
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +18 -0
- package/dist/codec/codec.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +3 -2
- 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/types.d.ts +39 -2
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +37 -2
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/rebase/utils.d.ts.map +1 -1
- package/dist/core/rebase/utils.js +1 -0
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/revertible.d.ts +62 -6
- package/dist/core/revertible.d.ts.map +1 -1
- package/dist/core/revertible.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.map +1 -1
- package/dist/entrypoints/beta.d.ts +1 -1
- package/dist/entrypoints/beta.d.ts.map +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.map +1 -1
- package/dist/feature-libraries/indexing/types.d.ts +1 -1
- package/dist/feature-libraries/indexing/types.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- 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/history.d.ts +22 -0
- package/dist/shared-tree/history.d.ts.map +1 -0
- package/dist/shared-tree/history.js +66 -0
- package/dist/shared-tree/history.js.map +1 -0
- package/dist/shared-tree/schematizingTreeView.d.ts +12 -7
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +13 -0
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +3 -2
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +2 -0
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/tree.js +1 -1
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +8 -20
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +9 -12
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +16 -9
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +122 -25
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree/unhydratedTreeContext.d.ts +3 -2
- package/dist/shared-tree/unhydratedTreeContext.d.ts.map +1 -1
- package/dist/shared-tree/unhydratedTreeContext.js +3 -0
- package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +16 -2
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +20 -2
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/branchCommitCounter.d.ts +31 -0
- package/dist/shared-tree-core/branchCommitCounter.d.ts.map +1 -0
- package/dist/shared-tree-core/branchCommitCounter.js +79 -0
- package/dist/shared-tree-core/branchCommitCounter.js.map +1 -0
- package/dist/shared-tree-core/customMetadataCodec.d.ts +9 -0
- package/dist/shared-tree-core/customMetadataCodec.d.ts.map +1 -0
- package/dist/shared-tree-core/customMetadataCodec.js +37 -0
- package/dist/shared-tree-core/customMetadataCodec.js.map +1 -0
- package/dist/shared-tree-core/customMetadataFormat.d.ts +18 -0
- package/dist/shared-tree-core/customMetadataFormat.d.ts.map +1 -0
- package/dist/shared-tree-core/customMetadataFormat.js +15 -0
- package/dist/shared-tree-core/customMetadataFormat.js.map +1 -0
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +15 -3
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +5 -0
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js +17 -5
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js +4 -2
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +2 -2
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +17 -6
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +18 -8
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +7 -5
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js +4 -3
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +4 -0
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +2 -2
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +2 -1
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +3 -1
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js +12 -3
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +8 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +5 -0
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +1 -0
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +6 -0
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +10 -3
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js +10 -2
- package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -0
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.js +2 -0
- package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +4 -2
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/transaction.d.ts +9 -0
- package/dist/shared-tree-core/transaction.d.ts.map +1 -1
- package/dist/shared-tree-core/transaction.js +26 -4
- package/dist/shared-tree-core/transaction.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +1 -1
- 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/transactionTypes.d.ts +28 -2
- package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/transactionTypes.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +180 -61
- 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/index.d.ts +1 -1
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/tableSchema.js +10 -10
- package/dist/tableSchema.js.map +1 -1
- package/lib/codec/codec.d.ts +18 -0
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +18 -0
- package/lib/codec/codec.js.map +1 -1
- package/lib/core/index.d.ts +2 -2
- 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/types.d.ts +39 -2
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +35 -1
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/rebase/utils.d.ts.map +1 -1
- package/lib/core/rebase/utils.js +1 -0
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/revertible.d.ts +62 -6
- package/lib/core/revertible.d.ts.map +1 -1
- package/lib/core/revertible.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.map +1 -1
- package/lib/entrypoints/beta.d.ts +1 -1
- package/lib/entrypoints/beta.d.ts.map +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.map +1 -1
- package/lib/feature-libraries/indexing/types.d.ts +1 -1
- package/lib/feature-libraries/indexing/types.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +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/history.d.ts +22 -0
- package/lib/shared-tree/history.d.ts.map +1 -0
- package/lib/shared-tree/history.js +62 -0
- package/lib/shared-tree/history.js.map +1 -0
- package/lib/shared-tree/schematizingTreeView.d.ts +12 -7
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +13 -0
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +3 -2
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +2 -0
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/tree.js +1 -1
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +8 -20
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +9 -12
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +16 -9
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +123 -26
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree/unhydratedTreeContext.d.ts +3 -2
- package/lib/shared-tree/unhydratedTreeContext.d.ts.map +1 -1
- package/lib/shared-tree/unhydratedTreeContext.js +3 -0
- package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +16 -2
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +20 -2
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/branchCommitCounter.d.ts +31 -0
- package/lib/shared-tree-core/branchCommitCounter.d.ts.map +1 -0
- package/lib/shared-tree-core/branchCommitCounter.js +75 -0
- package/lib/shared-tree-core/branchCommitCounter.js.map +1 -0
- package/lib/shared-tree-core/customMetadataCodec.d.ts +9 -0
- package/lib/shared-tree-core/customMetadataCodec.d.ts.map +1 -0
- package/lib/shared-tree-core/customMetadataCodec.js +32 -0
- package/lib/shared-tree-core/customMetadataCodec.js.map +1 -0
- package/lib/shared-tree-core/customMetadataFormat.d.ts +18 -0
- package/lib/shared-tree-core/customMetadataFormat.d.ts.map +1 -0
- package/lib/shared-tree-core/customMetadataFormat.js +11 -0
- package/lib/shared-tree-core/customMetadataFormat.js.map +1 -0
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +16 -4
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +5 -0
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js +17 -5
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js +4 -2
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +2 -2
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +17 -6
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +18 -8
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +7 -5
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js +4 -3
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +4 -0
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +2 -2
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +2 -1
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +1 -0
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js +12 -3
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js +8 -2
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +5 -0
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +1 -0
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +6 -0
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +10 -3
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js +10 -2
- package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -0
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.js +2 -0
- package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +5 -3
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/transaction.d.ts +9 -0
- package/lib/shared-tree-core/transaction.d.ts.map +1 -1
- package/lib/shared-tree-core/transaction.js +27 -5
- package/lib/shared-tree-core/transaction.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +1 -1
- 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/transactionTypes.d.ts +28 -2
- package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/transactionTypes.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +180 -61
- 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/index.d.ts +1 -1
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/tableSchema.js +10 -10
- package/lib/tableSchema.js.map +1 -1
- package/package.json +22 -22
- package/src/codec/codec.ts +19 -0
- package/src/core/index.ts +4 -0
- package/src/core/rebase/index.ts +2 -0
- package/src/core/rebase/types.ts +72 -2
- package/src/core/rebase/utils.ts +1 -0
- package/src/core/revertible.ts +67 -6
- package/src/entrypoints/alpha.ts +8 -0
- package/src/entrypoints/beta.ts +1 -0
- package/src/entrypoints/legacy.ts +1 -0
- package/src/feature-libraries/indexing/types.ts +1 -1
- package/src/index.ts +8 -0
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/history.ts +99 -0
- package/src/shared-tree/schematizingTreeView.ts +25 -8
- package/src/shared-tree/sharedTree.ts +5 -2
- package/src/shared-tree/tree.ts +1 -1
- package/src/shared-tree/treeAlpha.ts +17 -35
- package/src/shared-tree/treeCheckout.ts +170 -31
- package/src/shared-tree/unhydratedTreeContext.ts +6 -2
- package/src/shared-tree-core/branch.ts +34 -2
- package/src/shared-tree-core/branchCommitCounter.ts +103 -0
- package/src/shared-tree-core/customMetadataCodec.ts +42 -0
- package/src/shared-tree-core/customMetadataFormat.ts +39 -0
- package/src/shared-tree-core/editManager.ts +22 -3
- package/src/shared-tree-core/editManagerCodecs.ts +12 -0
- package/src/shared-tree-core/editManagerCodecsCommons.ts +41 -15
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +7 -1
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +2 -0
- package/src/shared-tree-core/editManagerFormatCommons.ts +46 -12
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +13 -5
- package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +2 -2
- package/src/shared-tree-core/index.ts +3 -0
- package/src/shared-tree-core/messageCodecV1ToV4.ts +18 -5
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +9 -2
- package/src/shared-tree-core/messageCodecs.ts +12 -0
- package/src/shared-tree-core/messageFormat.ts +6 -0
- package/src/shared-tree-core/messageFormatV1ToV4.ts +21 -3
- package/src/shared-tree-core/messageFormatVSharedBranches.ts +8 -0
- package/src/shared-tree-core/sharedTreeCore.ts +5 -2
- package/src/shared-tree-core/transaction.ts +56 -4
- package/src/simple-tree/api/index.ts +5 -0
- package/src/simple-tree/api/transactionTypes.ts +29 -2
- package/src/simple-tree/api/tree.ts +199 -60
- package/src/simple-tree/index.ts +5 -0
- package/src/tableSchema.ts +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;AAoB5B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAsB,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EACN,aAAa,EACb,MAAM,GAON,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAA0B,MAAM,wBAAwB,CAAC;AACnF,OAAO,EACN,kBAAkB,GAGlB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,kBAAkB,EAClB,8BAA8B,GAC9B,MAAM,yBAAyB,CAAC;AAYjC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACN,SAAS,EACT,eAAe,EACf,eAAe,EACf,2CAA2C,GAC3C,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,WAAW,EAEX,YAAY,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAEN,eAAe,GAEf,MAAM,iBAAiB,CAAC;AAmBzB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAmB1E,OAAO,EAGN,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEN,sBAAsB,EAGtB,sBAAsB,EACtB,cAAc,EAEd,kBAAkB,GAElB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEN,iBAAiB,EACjB,yBAAyB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,+BAA+B,EAC/B,aAAa,EACb,aAAa,EAEb,QAAQ,GAER,MAAM,eAAe,CAAC;AAcvB,OAAO,EAAE,eAAe,EAAqB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EACN,qBAAqB,GAErB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,sBAAsB,EACtB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAGN,QAAQ,GAeR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EACN,wCAAwC,EACxC,sBAAsB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,iCAAiC,EACjC,iCAAiC,GACjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,EAClB,2BAA2B,GAG3B,MAAM,mCAAmC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tITreeViewConfiguration,\n\tITreeConfigurationOptions,\n\tITreeViewConfigurationAlpha,\n} from \"./configuration.js\";\nexport {\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n} from \"./configuration.js\";\nexport type {\n\tCommitRevision,\n\tITree,\n\tTreeView,\n\tViewableTree,\n\tTreeViewEvents,\n\tSchemaCompatibilityStatus,\n\tTreeViewAlpha,\n\tTreeViewBeta,\n\tUntypedTreeView,\n\tTreeBranch,\n\tTreeBranchAlpha,\n\tUntypedTreeViewAlpha,\n\tTreeBranchEvents,\n\tTreeBranchCommitMetadata,\n\tTreeBranchHistory,\n\tTreeContextAlpha,\n\tITreeAlpha,\n} from \"./tree.js\";\nexport { asTreeViewAlpha } from \"./tree.js\";\nexport { type SchemaStatics, schemaStatics } from \"./schemaStatics.js\";\nexport {\n\tSchemaFactory,\n\tscoped,\n\ttype ScopedSchemaName,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype SchemaFactory_base,\n} from \"./schemaFactory.js\";\nexport { SchemaFactoryBeta, type SchemaStaticsBeta } from \"./schemaFactoryBeta.js\";\nexport {\n\tSchemaFactoryAlpha,\n\ttype SchemaStaticsAlpha,\n\ttype NodeProvider,\n} from \"./schemaFactoryAlpha.js\";\nexport {\n\teraseSchemaDetails,\n\teraseSchemaDetailsSubclassable,\n} from \"./eraseSchemaDetails.js\";\nexport type {\n\tErasedSchema,\n\tErasedNode,\n\tErasedSchemaSubclassable,\n} from \"./eraseSchemaDetails.js\";\nexport type {\n\tValidateRecursiveSchema,\n\tFixRecursiveArraySchema,\n\tValidateRecursiveSchemaTemplate,\n\tFixRecursiveRecursionLimit,\n} from \"./schemaFactoryRecursive.js\";\nexport { allowUnused } from \"./schemaFactoryRecursive.js\";\nexport {\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\tcreateCustomizedFluidFrameworkScopedFactory,\n} from \"./schemaCreationUtilities.js\";\nexport {\n\tgetIdentifierFromNode,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttryGetSchema,\n} from \"./treeNodeApi.js\";\nexport { createFromCursor } from \"./create.js\";\nexport {\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n} from \"./dirtyIndex.js\";\nexport {\n\ttype JsonSchemaId,\n\ttype JsonSchemaType,\n\ttype JsonObjectNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonLeafNodeSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonTreeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n} from \"./jsonSchema.js\";\nexport type { TreeSchemaEncodingOptions } from \"./getJsonSchema.js\";\nexport { getJsonSchema } from \"./getJsonSchema.js\";\nexport { getSimpleSchema } from \"./getSimpleSchema.js\";\nexport { checkSchemaCompatibility } from \"./schemaCompatibilityTester.js\";\nexport type {\n\tUnenforced,\n\tFieldSchemaAlphaUnsafe,\n\tArrayNodeCustomizableSchemaUnsafe,\n\tMapNodeCustomizableSchemaUnsafe,\n\tSystem_Unsafe,\n\tTreeRecordNodeUnsafe,\n\tUnannotateAllowedTypeUnsafe,\n\tAnnotatedAllowedTypeUnsafe,\n\tAnnotatedAllowedTypesUnsafe,\n\tAllowedTypesFullUnsafe,\n\tAllowedTypesFullFromMixedUnsafe,\n\tUnannotateAllowedTypesListUnsafe,\n\tAnnotateAllowedTypesListUnsafe,\n\tFieldHasDefaultAlphaUnsafe,\n\tInsertableObjectFromSchemaRecordAlphaUnsafe,\n} from \"./typesUnsafe.js\";\n\nexport {\n\ttype VerboseTreeNode,\n\ttype VerboseTree,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\treplaceVerboseTreeHandles,\n} from \"./verboseTree.js\";\n\nexport {\n\ttype TreeEncodingOptions,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\treplaceHandles,\n\ttype HandleConverter,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n} from \"./customTree.js\";\n\nexport {\n\ttype ConciseTree,\n\tconciseFromCursor,\n\treplaceConciseTreeHandles,\n} from \"./conciseTree.js\";\n\nexport {\n\tborrowCursorFromTreeNodeOrValue,\n\texportConcise,\n\timportConcise,\n\ttype NodeChangedData,\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n} from \"./treeBeta.js\";\nexport {\n\ttype ArrayNodeDeltaOp,\n\ttype ArrayNodeInsertOp,\n\ttype ArrayNodeRemoveOp,\n\ttype ArrayNodeRetainOp,\n\ttype ArrayNodeTreeChangedDeltaOp,\n\ttype ArrayNodeTreeChangedRetainOp,\n\ttype NodeChangedDataAlpha,\n\ttype NodeChangedDataDelta,\n\ttype NodeChangedDataProperties,\n\ttype NodeChangedDataTreeDelta,\n\ttype TreeChangeEventsAlpha,\n} from \"./treeAlpha.js\";\nexport { createTreeIndex, type TreeIndexKey } from \"./simpleTreeIndex.js\";\nexport {\n\tcreateIdentifierIndex,\n\ttype IdentifierIndex,\n} from \"./identifierIndex.js\";\n\nexport {\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n} from \"./storedSchema.js\";\n\nexport {\n\ttype NoChangeConstraint,\n\ttype NodeInDocumentConstraint,\n\trollback,\n\ttype RunTransactionParamsAlpha,\n\ttype RunTransactionParamsBeta,\n\ttype TransactionCallbackStatusAlpha,\n\ttype TransactionCallbackStatusBeta,\n\ttype TransactionConstraint,\n\ttype TransactionConstraintAlpha,\n\ttype TransactionPostProcessor,\n\ttype TransactionResultFailed,\n\ttype TransactionResultSuccess,\n\ttype TransactionValueResult,\n\ttype TransactionVoidResult,\n\ttype VoidTransactionCallbackStatusAlpha,\n\ttype VoidTransactionCallbackStatusBeta,\n\ttype WithValue,\n} from \"./transactionTypes.js\";\n\nexport { generateSchemaFromSimpleSchema } from \"./schemaFromSimple.js\";\nexport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\nexport {\n\tincrementalEncodingPolicyForAllowedTypes,\n\tincrementalSummaryHint,\n} from \"./incrementalAllowedTypes.js\";\nexport {\n\tencodeSchemaCompatibilitySnapshot,\n\tdecodeSchemaCompatibilitySnapshot,\n} from \"./simpleSchemaCodec.js\";\nexport {\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n\tsnapshotSchemaCompatibility,\n\ttype SnapshotFileSystem,\n\ttype SnapshotSchemaCompatibilityOptions,\n} from \"./snapshotCompatibilityChecker.js\";\n"]}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ErasedType } from "@fluidframework/core-interfaces";
|
|
6
6
|
import type { TreeNode } from "../core/index.js";
|
|
7
|
+
import type { JsonCompatibleReadOnlyObject } from "../../util/index.js";
|
|
7
8
|
/**
|
|
8
9
|
* A special object that signifies when a SharedTree {@link RunTransaction | transaction} should "roll back".
|
|
9
10
|
* @public
|
|
@@ -85,7 +86,7 @@ export type TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue> = Trans
|
|
|
85
86
|
readonly preconditionsOnRevert?: readonly TransactionConstraintAlpha[];
|
|
86
87
|
};
|
|
87
88
|
/**
|
|
88
|
-
* The result of a {@link
|
|
89
|
+
* The result of a {@link UntypedTreeViewAlpha.(runTransaction:2) | transaction} that doesn't return a value.
|
|
89
90
|
* @input
|
|
90
91
|
* @alpha
|
|
91
92
|
*/
|
|
@@ -150,7 +151,7 @@ export interface RunTransactionParamsBeta {
|
|
|
150
151
|
/**
|
|
151
152
|
* A label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).
|
|
152
153
|
* @remarks
|
|
153
|
-
* If this transaction is applied to
|
|
154
|
+
* If this transaction is applied to an {@link UntypedTreeViewAlpha | untyped view}, the label will be available in the {@link LocalChangeMetadata.label | metadata} of the {@link TreeBranchEvents.changed | `changed`} event.
|
|
154
155
|
*
|
|
155
156
|
* If there is a nested transaction, only the outermost transaction label will be used.
|
|
156
157
|
*/
|
|
@@ -185,5 +186,30 @@ export interface RunTransactionParamsAlpha extends RunTransactionParamsBeta {
|
|
|
185
186
|
* reserving the behavior; a real post-processor will be provided in a future change.
|
|
186
187
|
*/
|
|
187
188
|
readonly postProcessor?: TransactionPostProcessor;
|
|
189
|
+
/**
|
|
190
|
+
* Arbitrary, application-defined metadata to persist alongside the commit that this transaction produces.
|
|
191
|
+
* @remarks
|
|
192
|
+
* The metadata is replicated to all collaborating clients and persisted in the document, and is readable
|
|
193
|
+
* via {@link TreeBranchCommitMetadata.custom} while walking the branch's
|
|
194
|
+
* {@link UntypedTreeViewAlpha.branchHistory | history}. It shares the lifetime of the commit it is attached
|
|
195
|
+
* to: once that commit is trimmed from the trunk, the metadata goes with it. If the transaction produces no
|
|
196
|
+
* commit — because its body made no changes, or because it was rolled back — the metadata is discarded.
|
|
197
|
+
*
|
|
198
|
+
* Nested transactions all contribute to the single commit they produce, and their metadata is available
|
|
199
|
+
* both flattened via {@link TreeBranchCommitMetadata.custom} and structurally via
|
|
200
|
+
* {@link TreeBranchCommitMetadata.customTree}.
|
|
201
|
+
*
|
|
202
|
+
* To attach metadata to the commit produced by
|
|
203
|
+
* {@link RevertibleAlpha.(revert:3) | reverting}, use {@link RevertOptionsAlpha.customMetadata} instead.
|
|
204
|
+
*
|
|
205
|
+
* The value is snapshotted when the transaction starts and normalized as `JSON.stringify` would. An error is
|
|
206
|
+
* thrown if it cannot be represented as a JSON object at all, such as when it contains a cycle or a
|
|
207
|
+
* `bigint`. Because it is persisted, it should be kept small; it is also bounded by the runtime's maximum
|
|
208
|
+
* op size.
|
|
209
|
+
*
|
|
210
|
+
* Metadata is only written to the document when `minVersionForCollab` is set to `"2.117.0"` or later.
|
|
211
|
+
* Otherwise it is retained in memory for the local session but not persisted or replicated.
|
|
212
|
+
*/
|
|
213
|
+
readonly customMetadata?: JsonCompatibleReadOnlyObject;
|
|
188
214
|
}
|
|
189
215
|
//# sourceMappingURL=transactionTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionTypes.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/transactionTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"transactionTypes.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/transactionTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,QAAQ,eAA4C,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,GAAG,kBAAkB,CAAC;AAEpF;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS,CAAC,MAAM;IAChC,+BAA+B;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,MAA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C,wBAAwB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,GAChD,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;AAEnD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,wBAChB,SAAQ,UAAU,CAAC,+CAA+C,CAAC;CAAG;AAEvE;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;IAC1E;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAE/D;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IAElD;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,4BAA4B,CAAC;CACvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionTypes.js","sourceRoot":"","sources":["../../../src/simple-tree/api/transactionTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType } from \"@fluidframework/core-interfaces\";\n\nimport type { TreeNode } from \"../core/index.js\";\n\n/**\n * A special object that signifies when a SharedTree {@link RunTransaction | transaction} should \"roll back\".\n * @public\n */\nexport const rollback = Symbol(\"SharedTree Transaction Rollback\");\n\n/**\n * A requirement for a SharedTree transaction to succeed.\n * @remarks Transaction constraints are useful for validating that the state of the tree meets some requirement when a transaction runs.\n * In general, when running a transaction a client can validate their tree state in whatever way they wish and decide to either proceed with the transaction or not.\n * However, they cannot know what the tree state will be when the transaction is _sequenced_.\n * There may have been any number of edits from other clients that get sequenced before the transaction is eventually sequenced.\n * Constraints provide a way to validate the tree state after the transaction has been sequenced and abort the transaction if the constraints are not met.\n * All clients will validate the constraints of a transaction when it is sequenced, so all clients will agree on whether the transaction succeeds or not.\n * @public\n */\nexport type TransactionConstraint = NodeInDocumentConstraint; // TODO: Add more constraint types here\n\n/**\n * Type for alpha version {@link TransactionConstraint | constraint}s\n * @sealed @alpha\n */\nexport type TransactionConstraintAlpha = TransactionConstraint | NoChangeConstraint; // TODO: Add more constraint types here\n\n/**\n * A transaction {@link TransactionConstraint | constraint} which requires that the given node exists in the tree.\n * @remarks The node must be in the document (its {@link TreeStatus | status} must be {@link TreeStatus.InDocument | InDocument}) to qualify as \"existing\".\n * @public\n */\nexport interface NodeInDocumentConstraint {\n\treadonly type: \"nodeInDocument\";\n\treadonly node: TreeNode;\n}\n\n/**\n * A {@link TransactionConstraintAlpha | constraint} which requires that, for this transaction to apply, the document must be in the same state immediately before the transaction is applied as it was before the transaction was authored.\n * When used as a revert precondition it requires that, for the revert to apply, the document must be in the same state immediately before the revert is applied as it was after the transaction was applied.\n * @alpha\n */\nexport interface NoChangeConstraint {\n\treadonly type: \"noChange\";\n}\n\n/**\n * Contains a value returned from a transaction.\n * @input\n * @beta\n */\nexport interface WithValue<TValue> {\n\t/** The user-supplied value. */\n\treadonly value: TValue;\n}\n\n/**\n * Contains a value and status returned from a user-supplied {@link TreeViewBeta.runTransaction | transaction callback}.\n * @input\n * @beta\n */\nexport type TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> =\n\t| (WithValue<TSuccessValue> & {\n\t\t\t/** Indicates that the transaction callback ran successfully. */\n\t\t\treadonly rollback?: false;\n\t })\n\t| (WithValue<TFailureValue> & {\n\t\t\t/** Indicates that the transaction callback failed and the transaction should be rolled back. */\n\t\t\treadonly rollback: true;\n\t });\n\n/**\n * The result of a {@link TreeViewBeta.runTransaction | transaction} that doesn't return a value.\n * @input\n * @beta\n */\nexport type VoidTransactionCallbackStatusBeta = Omit<\n\tTransactionCallbackStatusBeta<unknown, unknown>,\n\t\"value\"\n>;\n\n/**\n * {@link TransactionCallbackStatusBeta} extended with alpha-only {@link TransactionConstraintAlpha | constraint} options.\n * @input\n * @alpha\n */\nexport type TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue> =\n\tTransactionCallbackStatusBeta<TSuccessValue, TFailureValue> & {\n\t\t/**\n\t\t * An optional list of {@link TransactionConstraintAlpha | constraints} that will be checked when the commit corresponding\n\t\t * to this transaction is reverted. If any of these constraints are not met when the revert is being applied either\n\t\t * locally or on remote clients, the revert will be ignored.\n\t\t * These constraints must also be met at the time they are first introduced. If they are not met after the transaction\n\t\t * callback returns, then `runTransaction` (which invokes the transaction callback) will throw a `UsageError`.\n\t\t */\n\t\treadonly preconditionsOnRevert?: readonly TransactionConstraintAlpha[];\n\t};\n\n/**\n * The result of a {@link TreeBranchAlpha.(runTransaction:2) | transaction} that doesn't return a value.\n * @input\n * @alpha\n */\nexport type VoidTransactionCallbackStatusAlpha = Omit<\n\tTransactionCallbackStatusAlpha<unknown, unknown>,\n\t\"value\"\n>;\n\n/**\n * The result of a {@link TreeViewBeta.(runTransaction:1) | transaction} that completed successfully.\n * @sealed\n * @beta\n */\nexport interface TransactionResultSuccess<TSuccessValue> extends WithValue<TSuccessValue> {\n\t/** The success flag for a transaction that completed without being {@link TransactionCallbackStatusBeta | rolled back}. */\n\treadonly success: true;\n}\n\n/**\n * The result of a {@link TreeViewBeta.runTransaction | transaction} that was rolled back.\n * @sealed\n * @beta\n */\nexport interface TransactionResultFailed<TFailureValue> extends WithValue<TFailureValue> {\n\t/** The failure flag for a transaction that was {@link TransactionCallbackStatusBeta | rolled back}. */\n\treadonly success: false;\n}\n\n/**\n * The result of the {@link RunTransaction | RunTransaction} API.\n * @sealed\n * @beta\n */\nexport type TransactionValueResult<TSuccessValue, TFailureValue> =\n\t| TransactionResultSuccess<TSuccessValue>\n\t| TransactionResultFailed<TFailureValue>;\n\n/**\n * The result of the {@link RunTransaction | RunTransaction} API. This is the same as {@link TransactionValueResult}\n * but with the `value` field omitted. This is useful when the transaction callback doesn't need to return a value.\n * @sealed\n * @beta\n */\nexport type TransactionVoidResult =\n\t| Omit<TransactionResultSuccess<unknown>, \"value\">\n\t| Omit<TransactionResultFailed<unknown>, \"value\">;\n\n/**\n * A type-erased function that post-processes the change produced when a transaction is committed.\n *\n * @remarks\n * Supply one via {@link RunTransactionParamsAlpha.postProcessor} to process/alter\n * the change that a transaction produces. For example a post-processor could\n * remove extraneous information, so that the resulting squashed change contains\n * no extraneous information.\n *\n * This type intentionally hides its internal representation: its concrete shape\n * is an implementation detail of `@fluidframework/tree`. Obtain a value of this\n * type from a `@fluidframework/tree` helper or constant rather than constructing\n * one directly.\n *\n * @alpha\n * @sealed\n * @system\n */\nexport interface TransactionPostProcessor\n\textends ErasedType<\"@fluidframework/tree.TransactionPostProcessor\"> {}\n\n/**\n * The parameters for the {@link RunTransaction | RunTransaction} API.\n * @input\n * @beta\n */\nexport interface RunTransactionParamsBeta {\n\t/**\n\t * A label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).\n\t * @remarks\n\t * If this transaction is applied to a {@link TreeBranchAlpha | branch}, the label will be available in the {@link LocalChangeMetadata.label | metadata} of the {@link TreeBranchEvents.changed | `changed`} event.\n\t *\n\t * If there is a nested transaction, only the outermost transaction label will be used.\n\t */\n\treadonly label?: unknown;\n}\n\n/**\n * The parameters for the {@link RunTransaction | RunTransaction} API, extended with alpha-only {@link TransactionConstraintAlpha | constraint} options.\n * @input\n * @alpha\n */\nexport interface RunTransactionParamsAlpha extends RunTransactionParamsBeta {\n\t/**\n\t * An optional list of {@link TransactionConstraintAlpha | constraints} that are checked just before the transaction begins.\n\t * @remarks\n\t * If any of the constraints are not met when `runTransaction` is called, an error will be thrown.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t */\n\treadonly preconditions?: readonly TransactionConstraintAlpha[];\n\n\t/**\n\t * An optional {@link TransactionPostProcessor | post-processor} applied to\n\t * the change produced when this transaction is committed.\n\t * @remarks\n\t * When omitted, the transaction's edits are squashed without any such processing.\n\t *\n\t * Specific post-processors are applied according to their own rules for\n\t * optimization and other post-processing tasks in a transaction stack. For\n\t * example a \"minimization\" post-processor may be applied once for the\n\t * outermost transaction in a stack as it will process all nested edits and\n\t * there is no benefit from multiple applications.\n\t *\n\t * Note: minimization is not yet implemented. Supplying a post-processor currently has no observable effect beyond\n\t * reserving the behavior; a real post-processor will be provided in a future change.\n\t */\n\treadonly postProcessor?: TransactionPostProcessor;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"transactionTypes.js","sourceRoot":"","sources":["../../../src/simple-tree/api/transactionTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType } from \"@fluidframework/core-interfaces\";\n\nimport type { TreeNode } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnlyObject } from \"../../util/index.js\";\n\n/**\n * A special object that signifies when a SharedTree {@link RunTransaction | transaction} should \"roll back\".\n * @public\n */\nexport const rollback = Symbol(\"SharedTree Transaction Rollback\");\n\n/**\n * A requirement for a SharedTree transaction to succeed.\n * @remarks Transaction constraints are useful for validating that the state of the tree meets some requirement when a transaction runs.\n * In general, when running a transaction a client can validate their tree state in whatever way they wish and decide to either proceed with the transaction or not.\n * However, they cannot know what the tree state will be when the transaction is _sequenced_.\n * There may have been any number of edits from other clients that get sequenced before the transaction is eventually sequenced.\n * Constraints provide a way to validate the tree state after the transaction has been sequenced and abort the transaction if the constraints are not met.\n * All clients will validate the constraints of a transaction when it is sequenced, so all clients will agree on whether the transaction succeeds or not.\n * @public\n */\nexport type TransactionConstraint = NodeInDocumentConstraint; // TODO: Add more constraint types here\n\n/**\n * Type for alpha version {@link TransactionConstraint | constraint}s\n * @sealed @alpha\n */\nexport type TransactionConstraintAlpha = TransactionConstraint | NoChangeConstraint; // TODO: Add more constraint types here\n\n/**\n * A transaction {@link TransactionConstraint | constraint} which requires that the given node exists in the tree.\n * @remarks The node must be in the document (its {@link TreeStatus | status} must be {@link TreeStatus.InDocument | InDocument}) to qualify as \"existing\".\n * @public\n */\nexport interface NodeInDocumentConstraint {\n\treadonly type: \"nodeInDocument\";\n\treadonly node: TreeNode;\n}\n\n/**\n * A {@link TransactionConstraintAlpha | constraint} which requires that, for this transaction to apply, the document must be in the same state immediately before the transaction is applied as it was before the transaction was authored.\n * When used as a revert precondition it requires that, for the revert to apply, the document must be in the same state immediately before the revert is applied as it was after the transaction was applied.\n * @alpha\n */\nexport interface NoChangeConstraint {\n\treadonly type: \"noChange\";\n}\n\n/**\n * Contains a value returned from a transaction.\n * @input\n * @beta\n */\nexport interface WithValue<TValue> {\n\t/** The user-supplied value. */\n\treadonly value: TValue;\n}\n\n/**\n * Contains a value and status returned from a user-supplied {@link TreeViewBeta.runTransaction | transaction callback}.\n * @input\n * @beta\n */\nexport type TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> =\n\t| (WithValue<TSuccessValue> & {\n\t\t\t/** Indicates that the transaction callback ran successfully. */\n\t\t\treadonly rollback?: false;\n\t })\n\t| (WithValue<TFailureValue> & {\n\t\t\t/** Indicates that the transaction callback failed and the transaction should be rolled back. */\n\t\t\treadonly rollback: true;\n\t });\n\n/**\n * The result of a {@link TreeViewBeta.runTransaction | transaction} that doesn't return a value.\n * @input\n * @beta\n */\nexport type VoidTransactionCallbackStatusBeta = Omit<\n\tTransactionCallbackStatusBeta<unknown, unknown>,\n\t\"value\"\n>;\n\n/**\n * {@link TransactionCallbackStatusBeta} extended with alpha-only {@link TransactionConstraintAlpha | constraint} options.\n * @input\n * @alpha\n */\nexport type TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue> =\n\tTransactionCallbackStatusBeta<TSuccessValue, TFailureValue> & {\n\t\t/**\n\t\t * An optional list of {@link TransactionConstraintAlpha | constraints} that will be checked when the commit corresponding\n\t\t * to this transaction is reverted. If any of these constraints are not met when the revert is being applied either\n\t\t * locally or on remote clients, the revert will be ignored.\n\t\t * These constraints must also be met at the time they are first introduced. If they are not met after the transaction\n\t\t * callback returns, then `runTransaction` (which invokes the transaction callback) will throw a `UsageError`.\n\t\t */\n\t\treadonly preconditionsOnRevert?: readonly TransactionConstraintAlpha[];\n\t};\n\n/**\n * The result of a {@link UntypedTreeViewAlpha.(runTransaction:2) | transaction} that doesn't return a value.\n * @input\n * @alpha\n */\nexport type VoidTransactionCallbackStatusAlpha = Omit<\n\tTransactionCallbackStatusAlpha<unknown, unknown>,\n\t\"value\"\n>;\n\n/**\n * The result of a {@link TreeViewBeta.(runTransaction:1) | transaction} that completed successfully.\n * @sealed\n * @beta\n */\nexport interface TransactionResultSuccess<TSuccessValue> extends WithValue<TSuccessValue> {\n\t/** The success flag for a transaction that completed without being {@link TransactionCallbackStatusBeta | rolled back}. */\n\treadonly success: true;\n}\n\n/**\n * The result of a {@link TreeViewBeta.runTransaction | transaction} that was rolled back.\n * @sealed\n * @beta\n */\nexport interface TransactionResultFailed<TFailureValue> extends WithValue<TFailureValue> {\n\t/** The failure flag for a transaction that was {@link TransactionCallbackStatusBeta | rolled back}. */\n\treadonly success: false;\n}\n\n/**\n * The result of the {@link RunTransaction | RunTransaction} API.\n * @sealed\n * @beta\n */\nexport type TransactionValueResult<TSuccessValue, TFailureValue> =\n\t| TransactionResultSuccess<TSuccessValue>\n\t| TransactionResultFailed<TFailureValue>;\n\n/**\n * The result of the {@link RunTransaction | RunTransaction} API. This is the same as {@link TransactionValueResult}\n * but with the `value` field omitted. This is useful when the transaction callback doesn't need to return a value.\n * @sealed\n * @beta\n */\nexport type TransactionVoidResult =\n\t| Omit<TransactionResultSuccess<unknown>, \"value\">\n\t| Omit<TransactionResultFailed<unknown>, \"value\">;\n\n/**\n * A type-erased function that post-processes the change produced when a transaction is committed.\n *\n * @remarks\n * Supply one via {@link RunTransactionParamsAlpha.postProcessor} to process/alter\n * the change that a transaction produces. For example a post-processor could\n * remove extraneous information, so that the resulting squashed change contains\n * no extraneous information.\n *\n * This type intentionally hides its internal representation: its concrete shape\n * is an implementation detail of `@fluidframework/tree`. Obtain a value of this\n * type from a `@fluidframework/tree` helper or constant rather than constructing\n * one directly.\n *\n * @alpha\n * @sealed\n * @system\n */\nexport interface TransactionPostProcessor\n\textends ErasedType<\"@fluidframework/tree.TransactionPostProcessor\"> {}\n\n/**\n * The parameters for the {@link RunTransaction | RunTransaction} API.\n * @input\n * @beta\n */\nexport interface RunTransactionParamsBeta {\n\t/**\n\t * A label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).\n\t * @remarks\n\t * If this transaction is applied to an {@link UntypedTreeViewAlpha | untyped view}, the label will be available in the {@link LocalChangeMetadata.label | metadata} of the {@link TreeBranchEvents.changed | `changed`} event.\n\t *\n\t * If there is a nested transaction, only the outermost transaction label will be used.\n\t */\n\treadonly label?: unknown;\n}\n\n/**\n * The parameters for the {@link RunTransaction | RunTransaction} API, extended with alpha-only {@link TransactionConstraintAlpha | constraint} options.\n * @input\n * @alpha\n */\nexport interface RunTransactionParamsAlpha extends RunTransactionParamsBeta {\n\t/**\n\t * An optional list of {@link TransactionConstraintAlpha | constraints} that are checked just before the transaction begins.\n\t * @remarks\n\t * If any of the constraints are not met when `runTransaction` is called, an error will be thrown.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t */\n\treadonly preconditions?: readonly TransactionConstraintAlpha[];\n\n\t/**\n\t * An optional {@link TransactionPostProcessor | post-processor} applied to\n\t * the change produced when this transaction is committed.\n\t * @remarks\n\t * When omitted, the transaction's edits are squashed without any such processing.\n\t *\n\t * Specific post-processors are applied according to their own rules for\n\t * optimization and other post-processing tasks in a transaction stack. For\n\t * example a \"minimization\" post-processor may be applied once for the\n\t * outermost transaction in a stack as it will process all nested edits and\n\t * there is no benefit from multiple applications.\n\t *\n\t * Note: minimization is not yet implemented. Supplying a post-processor currently has no observable effect beyond\n\t * reserving the behavior; a real post-processor will be provided in a future change.\n\t */\n\treadonly postProcessor?: TransactionPostProcessor;\n\n\t/**\n\t * Arbitrary, application-defined metadata to persist alongside the commit that this transaction produces.\n\t * @remarks\n\t * The metadata is replicated to all collaborating clients and persisted in the document, and is readable\n\t * via {@link TreeBranchCommitMetadata.custom} while walking the branch's\n\t * {@link UntypedTreeViewAlpha.branchHistory | history}. It shares the lifetime of the commit it is attached\n\t * to: once that commit is trimmed from the trunk, the metadata goes with it. If the transaction produces no\n\t * commit — because its body made no changes, or because it was rolled back — the metadata is discarded.\n\t *\n\t * Nested transactions all contribute to the single commit they produce, and their metadata is available\n\t * both flattened via {@link TreeBranchCommitMetadata.custom} and structurally via\n\t * {@link TreeBranchCommitMetadata.customTree}.\n\t *\n\t * To attach metadata to the commit produced by\n\t * {@link RevertibleAlpha.(revert:3) | reverting}, use {@link RevertOptionsAlpha.customMetadata} instead.\n\t *\n\t * The value is snapshotted when the transaction starts and normalized as `JSON.stringify` would. An error is\n\t * thrown if it cannot be represented as a JSON object at all, such as when it contains a cycle or a\n\t * `bigint`. Because it is persisted, it should be kept small; it is also bounded by the runtime's maximum\n\t * op size.\n\t *\n\t * Metadata is only written to the document when `minVersionForCollab` is set to `\"2.117.0\"` or later.\n\t * Otherwise it is retained in memory for the local session but not persisted or replicated.\n\t */\n\treadonly customMetadata?: JsonCompatibleReadOnlyObject;\n}\n"]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import type { IFluidLoadable, IDisposable, Listenable } from "@fluidframework/core-interfaces";
|
|
6
|
-
import type { ChangeMetadata, CommitMetadata, RevertibleAlphaFactory, RevertibleFactory } from "../../core/index.js";
|
|
7
|
-
import type { JsonCompatibleReadOnly } from "../../util/index.js";
|
|
6
|
+
import type { ChangeMetadata, CommitMetadata, CustomMetadataTree, RevertibleAlphaFactory, RevertibleFactory, RevertToOptionsAlpha } from "../../core/index.js";
|
|
7
|
+
import type { JsonCompatibleReadOnly, JsonCompatibleReadOnlyObject } from "../../util/index.js";
|
|
8
8
|
import type { ImplicitFieldSchema, InsertableField, InsertableTreeFieldFromImplicitField, ReadableField, ReadSchema, TreeFieldFromImplicitField } from "../fieldSchema.js";
|
|
9
9
|
import type { SimpleTreeSchema } from "../simpleSchema.js";
|
|
10
10
|
import type { UnsafeUnknownSchema } from "../unsafeUnknownSchema.js";
|
|
@@ -98,54 +98,61 @@ export interface ITreeAlpha extends ITree {
|
|
|
98
98
|
viewSharedBranchWith<TRoot extends ImplicitFieldSchema>(branchId: string, config: TreeViewConfiguration<TRoot>): TreeView<TRoot>;
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
102
|
-
* @remarks
|
|
101
|
+
* An untyped view of a (version-control-style) branch of a SharedTree.
|
|
102
|
+
* @remarks An `UntypedTreeView` allows for the {@link UntypedTreeView.fork | creation of branches} and for those branches to later be {@link UntypedTreeView.merge | merged}.
|
|
103
103
|
*
|
|
104
104
|
* The branch associated directly with the {@link ITree | SharedTree} is the "main" branch, and all other branches fork (directly or transitively) from that main branch.
|
|
105
105
|
*
|
|
106
|
-
* See {@link
|
|
106
|
+
* See {@link UntypedTreeViewAlpha} for additional APIs that are in an earlier stage of development.
|
|
107
107
|
* @sealed @beta
|
|
108
108
|
*/
|
|
109
|
-
export interface
|
|
109
|
+
export interface UntypedTreeView extends IDisposable {
|
|
110
110
|
/**
|
|
111
111
|
* Fork a new branch off of this branch which is based off of this branch's current state.
|
|
112
|
-
* @remarks Any changes to the tree on the new
|
|
113
|
-
* The
|
|
112
|
+
* @remarks Any changes to the tree on the new view will not apply to this view until the new view is e.g. {@link UntypedTreeView.merge | merged} back into this view.
|
|
113
|
+
* The view should be disposed when no longer needed, either {@link UntypedTreeView.dispose | explicitly} or {@link UntypedTreeView.merge | implicitly when merging} into another view.
|
|
114
114
|
*/
|
|
115
|
-
fork():
|
|
115
|
+
fork(): UntypedTreeView;
|
|
116
116
|
/**
|
|
117
|
-
* Apply all the new changes on the given
|
|
118
|
-
* @param
|
|
119
|
-
* @param disposeMerged -
|
|
117
|
+
* Apply all the new changes on the given view to this view.
|
|
118
|
+
* @param view - A view created by {@link UntypedTreeView.fork}.
|
|
119
|
+
* @param disposeMerged - Whether or not to dispose `view` after the merge completes.
|
|
120
120
|
* Defaults to true.
|
|
121
|
-
* The {@link
|
|
122
|
-
* @remarks All ongoing transactions (if any) in `
|
|
121
|
+
* The {@link UntypedTreeView | main view} cannot be disposed - attempting to do so will have no effect.
|
|
122
|
+
* @remarks All ongoing transactions (if any) in `view` will be committed before the merge.
|
|
123
123
|
*/
|
|
124
|
-
merge(
|
|
124
|
+
merge(view: UntypedTreeView, disposeMerged?: boolean): void;
|
|
125
125
|
/**
|
|
126
|
-
* Advance this
|
|
127
|
-
* @param
|
|
128
|
-
* @remarks After rebasing, this
|
|
129
|
-
* This method may only be called on
|
|
126
|
+
* Advance this view forward such that all new changes on the target view become part of this view.
|
|
127
|
+
* @param view - The view to rebase onto.
|
|
128
|
+
* @remarks After rebasing, this view will be "ahead" of the target view, that is, its unique changes will have been recreated as if they happened after all changes on the target view.
|
|
129
|
+
* This method may only be called on views produced via {@link UntypedTreeView.fork | fork} - attempting to rebase the main view will throw.
|
|
130
130
|
*
|
|
131
131
|
* Rebasing long-lived branches is important to avoid consuming memory unnecessarily.
|
|
132
132
|
* In particular, the SharedTree retains all sequenced changes made to the tree since the "most-behind" branch was created or last rebased.
|
|
133
133
|
*
|
|
134
|
-
* The {@link
|
|
134
|
+
* The {@link UntypedTreeView | main view} cannot be rebased onto another view - attempting to do so will throw an error.
|
|
135
135
|
*/
|
|
136
|
-
rebaseOnto(
|
|
136
|
+
rebaseOnto(view: UntypedTreeView): void;
|
|
137
137
|
/**
|
|
138
|
-
* Dispose of this
|
|
138
|
+
* Dispose of this view, cleaning up any resources associated with it.
|
|
139
139
|
* @param error - Optional error indicating the reason for the disposal, if the object was disposed as the result of an error.
|
|
140
|
-
* @remarks
|
|
140
|
+
* @remarks Views can also be automatically disposed when {@link UntypedTreeView.merge | they are merged} into another view.
|
|
141
141
|
*
|
|
142
142
|
* Disposing branches is important to avoid consuming memory unnecessarily.
|
|
143
|
-
* In particular, the SharedTree retains all sequenced changes made to the tree since the "most-behind"
|
|
143
|
+
* In particular, the SharedTree retains all sequenced changes made to the tree since the "most-behind" view was created or last {@link UntypedTreeView.rebaseOnto | rebased}.
|
|
144
144
|
*
|
|
145
|
-
* The {@link
|
|
145
|
+
* The {@link UntypedTreeView | main view} cannot be disposed - attempting to do so will have no effect.
|
|
146
146
|
*/
|
|
147
147
|
dispose(error?: Error): void;
|
|
148
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Compatibility alias for {@link UntypedTreeView}.
|
|
151
|
+
*
|
|
152
|
+
* @deprecated Use {@link UntypedTreeView} instead.
|
|
153
|
+
* @beta
|
|
154
|
+
*/
|
|
155
|
+
export type TreeBranch = UntypedTreeView;
|
|
149
156
|
/**
|
|
150
157
|
* Provides additional APIs that may be used to interact with a tree node or a tree node's SharedTree.
|
|
151
158
|
* @alpha
|
|
@@ -173,7 +180,7 @@ export interface TreeContextAlpha {
|
|
|
173
180
|
* - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.
|
|
174
181
|
*
|
|
175
182
|
* `runTransaction` may be invoked on the context of a {@link TreeStatus.InDocument | hydrated } or {@link Unhydrated | unhydrated } node.
|
|
176
|
-
* Use {@link TreeContextAlpha.
|
|
183
|
+
* Use {@link TreeContextAlpha.isView | isView() } to check whether this context is associated with a view and gain {@link UntypedTreeViewAlpha.(runTransaction:1) | access to more transaction capabilities} if so.
|
|
177
184
|
*/
|
|
178
185
|
runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TValue, TValue>;
|
|
179
186
|
/**
|
|
@@ -205,57 +212,162 @@ export interface TreeContextAlpha {
|
|
|
205
212
|
*/
|
|
206
213
|
runTransactionAsync(transaction: () => Promise<void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
|
|
207
214
|
/**
|
|
208
|
-
* True if this context is associated with
|
|
209
|
-
* @remarks If this returns true, the context can be safely inferred or cast to {@link
|
|
215
|
+
* True if this context is associated with an {@link UntypedTreeViewAlpha | untyped view} and false if it is associated with an {@link Unhydrated | unhydrated } node.
|
|
216
|
+
* @remarks If this returns true, the context can be safely inferred or cast to {@link UntypedTreeViewAlpha} to access additional view-specific APIs.
|
|
210
217
|
* @example
|
|
211
218
|
* ```typescript
|
|
212
219
|
* const context = tree.context(someNode);
|
|
213
|
-
* if (context.
|
|
214
|
-
* assert(context.hasRootSchema(MySchema)) // `hasRootSchema` is a method on
|
|
220
|
+
* if (context.isView()) {
|
|
221
|
+
* assert(context.hasRootSchema(MySchema)) // `hasRootSchema` is a method on UntypedTreeViewAlpha, so this is only accessible if `context` is a view context.
|
|
215
222
|
* context.root.foo = "bar"; // Edit the root of the SharedTree that `someNode` belongs to.
|
|
216
223
|
* }
|
|
217
224
|
* ```
|
|
225
|
+
* @returns Whether this context is associated with an untyped view.
|
|
226
|
+
*/
|
|
227
|
+
isView(): this is UntypedTreeViewAlpha;
|
|
228
|
+
/**
|
|
229
|
+
* {@inheritDoc TreeContextAlpha.isView}
|
|
230
|
+
* @deprecated Use {@link TreeContextAlpha.isView | isView()} instead.
|
|
231
|
+
*/
|
|
232
|
+
isBranch(): this is UntypedTreeViewAlpha;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* An identifier for a commit in a {@link UntypedTreeViewAlpha}'s {@link UntypedTreeViewAlpha.branchHistory | history}.
|
|
236
|
+
* @alpha
|
|
237
|
+
*/
|
|
238
|
+
export type CommitRevision = string;
|
|
239
|
+
/**
|
|
240
|
+
* Metadata describing a single commit in a {@link UntypedTreeViewAlpha}'s history.
|
|
241
|
+
* @sealed @alpha
|
|
242
|
+
*/
|
|
243
|
+
export interface TreeBranchCommitMetadata {
|
|
244
|
+
/**
|
|
245
|
+
* The revision UUID that uniquely identifies this commit within the branch's history.
|
|
246
|
+
*/
|
|
247
|
+
readonly revision: CommitRevision;
|
|
248
|
+
/**
|
|
249
|
+
* Arbitrary, application-defined metadata that was {@link RunTransactionParamsAlpha.customMetadata | attached}
|
|
250
|
+
* to this commit when it was created, flattened into a single object.
|
|
251
|
+
*
|
|
252
|
+
* @remarks
|
|
253
|
+
* This is `undefined` for commits that were not annotated.
|
|
254
|
+
*
|
|
255
|
+
* A commit may be produced by nested transactions, each of which may supply metadata. This property combines
|
|
256
|
+
* them: where two of them used the same property, the outermost transaction wins, and between siblings the
|
|
257
|
+
* later one wins. Use {@link TreeBranchCommitMetadata.customTree} to recover which transaction supplied what.
|
|
258
|
+
*/
|
|
259
|
+
readonly custom: JsonCompatibleReadOnlyObject | undefined;
|
|
260
|
+
/**
|
|
261
|
+
* The {@link CustomMetadataTree | tree} of metadata attached to this commit, reflecting the nesting of
|
|
262
|
+
* the transactions that produced it.
|
|
263
|
+
*
|
|
264
|
+
* @remarks
|
|
265
|
+
* The structural counterpart to {@link TreeBranchCommitMetadata.custom}, and `undefined` whenever it is.
|
|
266
|
+
* Prefer `custom` unless you need to know which transaction supplied a particular property.
|
|
267
|
+
*/
|
|
268
|
+
readonly customTree: CustomMetadataTree | undefined;
|
|
269
|
+
/**
|
|
270
|
+
* The metadata for the commit that this commit was based on, or `undefined` if this commit has no parent
|
|
271
|
+
* (i.e. it is the oldest commit in the branch's history).
|
|
272
|
+
*
|
|
273
|
+
* @remarks
|
|
274
|
+
* This method may return a different value over time if the parent commit is trimmed from the branch's history.
|
|
218
275
|
*/
|
|
219
|
-
|
|
276
|
+
getParent(): TreeBranchCommitMetadata | undefined;
|
|
220
277
|
}
|
|
221
278
|
/**
|
|
222
|
-
* {@link
|
|
279
|
+
* Provides APIs for querying information about the history of a {@link UntypedTreeViewAlpha}.
|
|
223
280
|
* @remarks
|
|
224
|
-
* The
|
|
281
|
+
* The history of a branch is the sequence of commits leading up to its current state.
|
|
282
|
+
* @sealed @alpha
|
|
283
|
+
*/
|
|
284
|
+
export interface TreeBranchHistory {
|
|
285
|
+
/**
|
|
286
|
+
* The number of commits in this branch's history.
|
|
287
|
+
* @remarks
|
|
288
|
+
* This number grows when any of the following occurs:
|
|
289
|
+
* - A new edit is made on this branch (either through editing or by reverting an existing commit on this branch).
|
|
290
|
+
* - A branch that contains commits not already on this branch is merged into this branch.
|
|
291
|
+
* - The branch is rebased onto another branch that contains commits not already on this branch.
|
|
292
|
+
* This number shrinks when past commits are trimmed from the history.
|
|
293
|
+
*/
|
|
294
|
+
readonly length: number;
|
|
295
|
+
/**
|
|
296
|
+
* Returns metadata for the current head commit of this branch.
|
|
297
|
+
* @returns The metadata for the head commit, or `undefined` if the branch has no commits.
|
|
298
|
+
*/
|
|
299
|
+
getHead(): TreeBranchCommitMetadata | undefined;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* An untyped view of a {@link UntypedTreeView} with alpha-level APIs.
|
|
303
|
+
* @remarks
|
|
304
|
+
* The untyped view for a specific {@link TreeNode} may be acquired by calling `TreeAlpha.context` and checking {@link TreeContextAlpha.isView | isView()}.
|
|
225
305
|
*
|
|
226
|
-
*
|
|
306
|
+
* An untyped view does not necessarily know the schema of its SharedTree. To convert it to a {@link TreeViewAlpha | view with a schema}, use {@link UntypedTreeViewAlpha.hasRootSchema | hasRootSchema()}.
|
|
227
307
|
* @sealed @alpha
|
|
228
308
|
*/
|
|
229
|
-
export interface
|
|
309
|
+
export interface UntypedTreeViewAlpha extends UntypedTreeView, TreeContextAlpha {
|
|
230
310
|
/**
|
|
231
|
-
* Events for the branch
|
|
311
|
+
* Events for the view's underlying branch.
|
|
232
312
|
*/
|
|
233
313
|
readonly events: Listenable<TreeBranchEvents>;
|
|
234
314
|
/**
|
|
235
|
-
*
|
|
236
|
-
|
|
315
|
+
* APIs for querying the history of the branch being viewed.
|
|
316
|
+
*/
|
|
317
|
+
readonly branchHistory: TreeBranchHistory;
|
|
318
|
+
/**
|
|
319
|
+
* Returns true if this view has the given schema as its root schema.
|
|
320
|
+
* @remarks This is a type guard which allows this view to become strongly typed as a {@link TreeViewAlpha | view} of the given schema.
|
|
237
321
|
*
|
|
238
322
|
* To succeed, the given schema must be invariant to the schema of the view - it must include exactly the same allowed types.
|
|
239
323
|
* For example, a schema of `Foo | Bar` will not match a view schema of `Foo`, and likewise a schema of `Foo` will not match a view schema of `Foo | Bar`.
|
|
240
324
|
* @example
|
|
241
325
|
* ```typescript
|
|
242
|
-
* if (
|
|
243
|
-
* const { root } =
|
|
326
|
+
* if (view.hasRootSchema(MySchema)) {
|
|
327
|
+
* const { root } = view; // `view` is now a TreeViewAlpha<MySchema>
|
|
244
328
|
* // ...
|
|
245
329
|
* }
|
|
246
330
|
* ```
|
|
247
331
|
*/
|
|
248
332
|
hasRootSchema<TSchema extends ImplicitFieldSchema>(schema: TSchema): this is TreeViewAlpha<TSchema>;
|
|
249
|
-
fork():
|
|
333
|
+
fork(): UntypedTreeViewAlpha;
|
|
250
334
|
/**
|
|
251
|
-
*
|
|
335
|
+
* Switches this view to a new underlying branch with the given commit as the head, updating the view state accordingly.
|
|
336
|
+
*
|
|
337
|
+
* @param revision - The {@link TreeBranchCommitMetadata.revision | revision} to rewind to.
|
|
338
|
+
* Can be obtained by navigating the commits on the {@link UntypedTreeViewAlpha.branchHistory | branch history}.
|
|
339
|
+
*
|
|
340
|
+
* @remarks
|
|
341
|
+
* Unlike {@link UntypedTreeViewAlpha.revertTo | revertTo}, this does not apply a change to the underlying branch.
|
|
342
|
+
* The original underlying branch will be disposed.
|
|
343
|
+
* Consider {@link UntypedTreeViewAlpha.fork | forking} before rewinding.
|
|
344
|
+
* Not valid to invoke on the main branch or a {@link (ITreeAlpha:interface).createSharedBranch | shared branch}.
|
|
345
|
+
*/
|
|
346
|
+
rewindTo(revision: CommitRevision): void;
|
|
347
|
+
/**
|
|
348
|
+
* Applies a new change which reverts all changes made since the given `revision`.
|
|
349
|
+
* This is a no-op if the given revision is the head commit of the underlying branch being viewed.
|
|
350
|
+
*
|
|
351
|
+
* @param revision - The {@link TreeBranchCommitMetadata.revision | revision} to restore the state of.
|
|
352
|
+
* Can be obtained by navigating the commits on the {@link UntypedTreeViewAlpha.branchHistory | branch history}.
|
|
353
|
+
* @param options - Optional {@link RevertToOptionsAlpha | options} for the revert.
|
|
354
|
+
*
|
|
355
|
+
* @remarks
|
|
356
|
+
* The generated change is subject to the same merge semantics as the {@link Revertible.(revert:1) | reverts of individual commits}:
|
|
357
|
+
* Concurrent changes that are sequenced before the revert will not be overwritten by the revert if they affect different parts of the document.
|
|
358
|
+
*
|
|
359
|
+
* Unlike {@link UntypedTreeViewAlpha.rewindTo | rewindTo}, this does not switch to a new branch.
|
|
360
|
+
*/
|
|
361
|
+
revertTo(revision: CommitRevision, options?: RevertToOptionsAlpha): void;
|
|
362
|
+
/**
|
|
363
|
+
* {@link TreeContextAlpha.(runTransaction:1) | Run a transaction} on this view of the SharedTree.
|
|
252
364
|
* @param transaction - The function to run as the body of the transaction, which may optionally return a {@link TransactionCallbackStatusAlpha | value or rollback signal}.
|
|
253
365
|
* @remarks
|
|
254
366
|
* If the transaction is rolled back, a corresponding {@link TreeBranchEvents.changed | `changed`} event will also be emitted for the rollback.
|
|
255
367
|
*/
|
|
256
368
|
runTransaction<TSuccessValue, TFailureValue>(transaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TSuccessValue, TFailureValue>;
|
|
257
369
|
/**
|
|
258
|
-
* An overload of {@link
|
|
370
|
+
* An overload of {@link UntypedTreeViewAlpha.(runTransaction:1) | runTransaction } which does not return a value.
|
|
259
371
|
*
|
|
260
372
|
* @privateRemarks
|
|
261
373
|
* TODO: Consider updating these methods to avoid the need for overloads.
|
|
@@ -263,12 +375,12 @@ export interface TreeBranchAlpha extends TreeBranch, TreeContextAlpha {
|
|
|
263
375
|
*/
|
|
264
376
|
runTransaction(transaction: () => VoidTransactionCallbackStatusAlpha | void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
|
|
265
377
|
/**
|
|
266
|
-
* An asynchronous version of {@link
|
|
378
|
+
* An asynchronous version of {@link UntypedTreeViewAlpha.(runTransaction:1) | runTransaction}.
|
|
267
379
|
* @remarks See {@link TreeContextAlpha.(runTransactionAsync:1) | runTransactionAsync} for additional information about asynchronous transactions.
|
|
268
380
|
*/
|
|
269
381
|
runTransactionAsync<TSuccessValue, TFailureValue>(transaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;
|
|
270
382
|
/**
|
|
271
|
-
* An overload of {@link
|
|
383
|
+
* An overload of {@link UntypedTreeViewAlpha.(runTransactionAsync:1) | runTransactionAsync } which does not return a value.
|
|
272
384
|
*
|
|
273
385
|
* @privateRemarks
|
|
274
386
|
* TODO: Consider updating these methods to avoid the need for overloads.
|
|
@@ -288,25 +400,32 @@ export interface TreeBranchAlpha extends TreeBranch, TreeContextAlpha {
|
|
|
288
400
|
*/
|
|
289
401
|
applyChange(change: JsonCompatibleReadOnly): void;
|
|
290
402
|
/**
|
|
291
|
-
* Determines if there are changes on the given
|
|
292
|
-
* @param
|
|
403
|
+
* Determines if there are changes on the given view that are not present on this view.
|
|
404
|
+
* @param view - The view to compare to.
|
|
293
405
|
*
|
|
294
|
-
* The new edits, if any, can be applied to this
|
|
295
|
-
* or by {@link
|
|
406
|
+
* The new edits, if any, can be applied to this view by {@link UntypedTreeView.rebaseOnto | rebasing this view onto the given view}
|
|
407
|
+
* or by {@link UntypedTreeView.merge | merging the given view into this view}.
|
|
296
408
|
*
|
|
297
409
|
* @throws UsageError if the branches are unrelated.
|
|
298
410
|
*/
|
|
299
|
-
isMissingEditsFrom(
|
|
411
|
+
isMissingEditsFrom(view: UntypedTreeView): boolean;
|
|
300
412
|
/**
|
|
301
|
-
* Computes the net change that would result if this
|
|
302
|
-
* Note that this method does not actually perform the rebase and therefore has no effect on this
|
|
413
|
+
* Computes the net change that would result if this view were {@link UntypedTreeView.rebaseOnto | rebased onto} the given view.
|
|
414
|
+
* Note that this method does not actually perform the rebase and therefore has no effect on this view.
|
|
303
415
|
*
|
|
304
|
-
* @param
|
|
305
|
-
* @returns The net change that would result if this
|
|
416
|
+
* @param view - The view that would be rebased onto.
|
|
417
|
+
* @returns The net change that would result if this view were rebased onto the given view,
|
|
306
418
|
* or `undefined` if rebasing would have no impact.
|
|
307
419
|
*/
|
|
308
|
-
computeNetChangeIfRebasedOnto(
|
|
420
|
+
computeNetChangeIfRebasedOnto(view: UntypedTreeView): JsonCompatibleReadOnly | undefined;
|
|
309
421
|
}
|
|
422
|
+
/**
|
|
423
|
+
* Compatibility alias for {@link UntypedTreeViewAlpha}.
|
|
424
|
+
*
|
|
425
|
+
* @deprecated Use {@link UntypedTreeViewAlpha} instead.
|
|
426
|
+
* @alpha
|
|
427
|
+
*/
|
|
428
|
+
export type TreeBranchAlpha = UntypedTreeViewAlpha;
|
|
310
429
|
/**
|
|
311
430
|
* An editable view of a (version control style) branch of a shared tree based on some schema.
|
|
312
431
|
*
|
|
@@ -317,7 +436,7 @@ export interface TreeBranchAlpha extends TreeBranch, TreeContextAlpha {
|
|
|
317
436
|
* Application authors are encouraged to read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/dds/tree/docs/user-facing/schema-evolution.md | schema-evolution.md}
|
|
318
437
|
* and choose a schema compatibility policy that aligns with their application's needs.
|
|
319
438
|
*
|
|
320
|
-
* See also {@link TreeViewAlpha}, {@link TreeViewBeta} and {@link
|
|
439
|
+
* See also {@link TreeViewAlpha}, {@link TreeViewBeta} and {@link UntypedTreeView} for additional APIs that are in earlier stages of development.
|
|
321
440
|
*
|
|
322
441
|
* @privateRemarks
|
|
323
442
|
* From an API design perspective, `upgradeSchema` could be merged into `viewWith` and/or `viewWith` could return errors explicitly on incompatible documents.
|
|
@@ -440,8 +559,8 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
|
|
|
440
559
|
* {@link TreeView} with additional beta APIs.
|
|
441
560
|
* @sealed @beta
|
|
442
561
|
*/
|
|
443
|
-
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>,
|
|
444
|
-
fork(): ReturnType<
|
|
562
|
+
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, UntypedTreeView {
|
|
563
|
+
fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
|
|
445
564
|
/**
|
|
446
565
|
* Run a synchronous transaction which groups sequential edits to the tree into a single atomic edit if possible.
|
|
447
566
|
*
|
|
@@ -488,7 +607,7 @@ export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extend
|
|
|
488
607
|
* {@link TreeView} with proposed changes to the schema aware typing to allow use with `UnsafeUnknownSchema`.
|
|
489
608
|
* @sealed @alpha
|
|
490
609
|
*/
|
|
491
|
-
export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync">,
|
|
610
|
+
export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync">, UntypedTreeViewAlpha {
|
|
492
611
|
get root(): ReadableField<TSchema>;
|
|
493
612
|
set root(newRoot: InsertableField<TSchema>);
|
|
494
613
|
/**
|
|
@@ -508,7 +627,7 @@ export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | Unsa
|
|
|
508
627
|
*/
|
|
509
628
|
initialize(content: InsertableField<TSchema>): void;
|
|
510
629
|
readonly events: Listenable<TreeViewEvents & TreeBranchEvents>;
|
|
511
|
-
fork(): ReturnType<
|
|
630
|
+
fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewAlpha<TSchema>;
|
|
512
631
|
}
|
|
513
632
|
/**
|
|
514
633
|
* Information about a view schema's compatibility with the document's stored schema.
|
|
@@ -596,7 +715,7 @@ export interface SchemaCompatibilityStatus {
|
|
|
596
715
|
readonly canInitialize: boolean;
|
|
597
716
|
}
|
|
598
717
|
/**
|
|
599
|
-
* Events for {@link
|
|
718
|
+
* Events for {@link UntypedTreeView}.
|
|
600
719
|
* @sealed @alpha
|
|
601
720
|
*/
|
|
602
721
|
export interface TreeBranchEvents {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/tree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE/F,OAAO,KAAK,EACX,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/tree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE/F,OAAO,KAAK,EACX,cAAc,EACd,cAAc,EACd,kBAAkB,EAGlB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EACX,sBAAsB,EACtB,4BAA4B,EAC5B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EACX,mBAAmB,EACnB,eAAe,EACf,oCAAoC,EACpC,a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