@fluidframework/tree 2.20.0 → 2.22.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 +14 -0
- package/README.md +1 -0
- package/api-report/tree.alpha.api.md +29 -4
- package/api-report/tree.beta.api.md +29 -4
- package/api-report/tree.legacy.alpha.api.md +35 -4
- package/api-report/tree.legacy.public.api.md +29 -4
- package/api-report/tree.public.api.md +29 -4
- package/dist/alpha.d.ts +1 -0
- package/dist/beta.d.ts +1 -0
- package/dist/core/forest/editableForest.js +1 -1
- package/dist/core/forest/editableForest.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.map +1 -1
- package/dist/core/tree/anchorSet.d.ts +2 -5
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +1 -151
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/index.d.ts +1 -2
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts +0 -11
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -2
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js +0 -9
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/dist/feature-libraries/flex-tree/treeEvents.d.ts +2 -4
- package/dist/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/treeEvents.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -2
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +0 -9
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +6 -2
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -4
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +4 -19
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +11 -12
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/node-key/mockNodeKeyManager.js +1 -1
- package/dist/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +7 -3
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +3 -5
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -11
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +13 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.js +1 -1
- package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +4 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +1 -0
- package/dist/shared-tree/index.d.ts +1 -2
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +1 -4
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +4 -5
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +9 -10
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +39 -39
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +81 -55
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/treeApi.d.ts +2 -2
- package/dist/shared-tree/treeApi.d.ts.map +1 -1
- package/dist/shared-tree/treeApi.js +9 -3
- package/dist/shared-tree/treeApi.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +3 -3
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +3 -2
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/editManager.js +1 -1
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -2
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +0 -9
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/sequenceIdUtils.d.ts +12 -1
- package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
- package/dist/shared-tree-core/sequenceIdUtils.js +25 -7
- package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +25 -30
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +20 -49
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +3 -2
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +3 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +158 -63
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +181 -86
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/{shared-tree → simple-tree/api}/transactionTypes.d.ts +1 -1
- package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -0
- package/dist/{shared-tree → simple-tree/api}/transactionTypes.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +27 -2
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
- package/dist/simple-tree/core/getOrCreateNode.js +1 -1
- package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +1 -1
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +2 -2
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +2 -6
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +10 -13
- package/dist/simple-tree/core/treeNodeKernel.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 +3 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/proxies.js +1 -1
- package/dist/simple-tree/proxies.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +2 -2
- package/dist/simple-tree/schemaTypes.js +1 -1
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/treeNodeValid.js +1 -2
- package/dist/simple-tree/treeNodeValid.js.map +1 -1
- package/dist/treeFactory.d.ts +16 -5
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +21 -12
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/breakable.d.ts +1 -1
- package/dist/util/breakable.d.ts.map +1 -1
- package/dist/util/breakable.js.map +1 -1
- package/dist/util/rangeMap.d.ts +11 -2
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +36 -8
- package/dist/util/rangeMap.js.map +1 -1
- package/lib/alpha.d.ts +1 -0
- package/lib/beta.d.ts +1 -0
- package/lib/core/forest/editableForest.js +1 -1
- package/lib/core/forest/editableForest.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.map +1 -1
- package/lib/core/tree/anchorSet.d.ts +2 -5
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +1 -151
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/index.d.ts +1 -2
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts +0 -11
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -2
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js +0 -9
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/lib/feature-libraries/flex-tree/treeEvents.d.ts +2 -4
- package/lib/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/treeEvents.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -2
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +0 -9
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +6 -2
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -4
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +4 -19
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +11 -12
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/node-key/mockNodeKeyManager.js +1 -1
- package/lib/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +7 -3
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +3 -5
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +1 -11
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +13 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.js +2 -2
- package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
- package/lib/index.d.ts +3 -3
- 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 +4 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +1 -0
- package/lib/shared-tree/index.d.ts +1 -2
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +1 -2
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +4 -5
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +4 -5
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +39 -39
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +79 -53
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/treeApi.d.ts +2 -2
- package/lib/shared-tree/treeApi.d.ts.map +1 -1
- package/lib/shared-tree/treeApi.js +8 -2
- package/lib/shared-tree/treeApi.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +3 -3
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +4 -3
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/editManager.js +2 -2
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -2
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +0 -9
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/sequenceIdUtils.d.ts +12 -1
- package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
- package/lib/shared-tree-core/sequenceIdUtils.js +23 -5
- package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +25 -30
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +19 -48
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +3 -2
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +1 -0
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +158 -63
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +180 -85
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/{shared-tree → simple-tree/api}/transactionTypes.d.ts +1 -1
- package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -0
- package/lib/{shared-tree → simple-tree/api}/transactionTypes.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +27 -2
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
- package/lib/simple-tree/core/getOrCreateNode.js +2 -2
- package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +1 -1
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +1 -1
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +2 -6
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +9 -11
- package/lib/simple-tree/core/treeNodeKernel.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 +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/proxies.js +2 -2
- package/lib/simple-tree/proxies.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +2 -2
- package/lib/simple-tree/schemaTypes.js +1 -1
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/treeNodeValid.js +1 -2
- package/lib/simple-tree/treeNodeValid.js.map +1 -1
- package/lib/treeFactory.d.ts +16 -5
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +20 -11
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/breakable.d.ts +1 -1
- package/lib/util/breakable.d.ts.map +1 -1
- package/lib/util/breakable.js.map +1 -1
- package/lib/util/rangeMap.d.ts +11 -2
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +36 -8
- package/lib/util/rangeMap.js.map +1 -1
- package/package.json +23 -23
- package/src/core/forest/editableForest.ts +1 -1
- package/src/core/index.ts +0 -3
- package/src/core/tree/anchorSet.ts +4 -197
- package/src/core/tree/index.ts +0 -3
- package/src/core/tree/pathTree.ts +0 -13
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -1
- package/src/feature-libraries/detachedFieldIndexSummarizer.ts +0 -11
- package/src/feature-libraries/flex-tree/treeEvents.ts +2 -4
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +0 -11
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +6 -2
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +3 -35
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +9 -42
- package/src/feature-libraries/optional-field/optionalField.ts +10 -3
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -16
- package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +13 -2
- package/src/feature-libraries/treeCursorUtils.ts +4 -2
- package/src/index.ts +15 -10
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/index.ts +3 -14
- package/src/shared-tree/schematizingTreeView.ts +18 -16
- package/src/shared-tree/sharedTree.ts +203 -103
- package/src/shared-tree/treeApi.ts +10 -1
- package/src/shared-tree/treeCheckout.ts +11 -8
- package/src/shared-tree-core/editManager.ts +2 -2
- package/src/shared-tree-core/editManagerSummarizer.ts +0 -11
- package/src/shared-tree-core/sequenceIdUtils.ts +26 -5
- package/src/shared-tree-core/sharedTreeCore.ts +30 -87
- package/src/simple-tree/api/index.ts +15 -0
- package/src/simple-tree/api/schemaFactory.ts +205 -89
- package/src/{shared-tree → simple-tree/api}/transactionTypes.ts +1 -1
- package/src/simple-tree/api/tree.ts +35 -6
- package/src/simple-tree/core/getOrCreateNode.ts +6 -2
- package/src/simple-tree/core/index.ts +1 -1
- package/src/simple-tree/core/treeNodeKernel.ts +16 -14
- package/src/simple-tree/index.ts +12 -0
- package/src/simple-tree/proxies.ts +2 -2
- package/src/simple-tree/schemaTypes.ts +2 -2
- package/src/treeFactory.ts +29 -11
- package/src/util/breakable.ts +1 -1
- package/src/util/rangeMap.ts +36 -7
- package/dist/core/tree/visitPath.d.ts +0 -101
- package/dist/core/tree/visitPath.d.ts.map +0 -1
- package/dist/core/tree/visitPath.js +0 -7
- package/dist/core/tree/visitPath.js.map +0 -1
- package/dist/shared-tree/transactionTypes.d.ts.map +0 -1
- package/lib/core/tree/visitPath.d.ts +0 -101
- package/lib/core/tree/visitPath.d.ts.map +0 -1
- package/lib/core/tree/visitPath.js +0 -6
- package/lib/core/tree/visitPath.js.map +0 -1
- package/lib/shared-tree/transactionTypes.d.ts.map +0 -1
- package/src/core/tree/visitPath.ts +0 -124
- /package/dist/{shared-tree → simple-tree/api}/transactionTypes.js +0 -0
- /package/lib/{shared-tree → simple-tree/api}/transactionTypes.js +0 -0
|
@@ -60,7 +60,13 @@ import {
|
|
|
60
60
|
type SharedTreeBranchChange,
|
|
61
61
|
type Transactor,
|
|
62
62
|
} from "../shared-tree-core/index.js";
|
|
63
|
-
import {
|
|
63
|
+
import {
|
|
64
|
+
Breakable,
|
|
65
|
+
disposeSymbol,
|
|
66
|
+
fail,
|
|
67
|
+
getOrCreate,
|
|
68
|
+
type WithBreakable,
|
|
69
|
+
} from "../util/index.js";
|
|
64
70
|
|
|
65
71
|
import { SharedTreeChangeFamily, hasSchemaChange } from "./sharedTreeChangeFamily.js";
|
|
66
72
|
import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
@@ -182,7 +188,7 @@ export interface TreeBranchFork extends BranchableTree, IDisposable {
|
|
|
182
188
|
* API for interacting with a {@link SharedTreeBranch}.
|
|
183
189
|
* Implementations of this interface must implement the {@link branchKey} property.
|
|
184
190
|
*/
|
|
185
|
-
export interface ITreeCheckout extends AnchorLocator, ViewableTree {
|
|
191
|
+
export interface ITreeCheckout extends AnchorLocator, ViewableTree, WithBreakable {
|
|
186
192
|
/**
|
|
187
193
|
* Read and Write access for schema stored in the document.
|
|
188
194
|
*
|
|
@@ -391,7 +397,7 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
391
397
|
),
|
|
392
398
|
/** Optional logger for telemetry. */
|
|
393
399
|
private readonly logger?: ITelemetryLoggerExt,
|
|
394
|
-
|
|
400
|
+
public readonly breaker: Breakable = new Breakable("TreeCheckout"),
|
|
395
401
|
private readonly disposeForksAfterTransaction = true,
|
|
396
402
|
) {
|
|
397
403
|
this.#transaction = new SquashingTransactionStack(
|
|
@@ -549,15 +555,13 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
549
555
|
|
|
550
556
|
private withCombinedVisitor(fn: (visitor: DeltaVisitor) => void): void {
|
|
551
557
|
const anchorVisitor = this.forest.anchors.acquireVisitor();
|
|
552
|
-
const combinedVisitor = combineVisitors(
|
|
553
|
-
[this.forest.acquireVisitor(), anchorVisitor],
|
|
554
|
-
[anchorVisitor],
|
|
555
|
-
);
|
|
558
|
+
const combinedVisitor = combineVisitors([this.forest.acquireVisitor(), anchorVisitor]);
|
|
556
559
|
fn(combinedVisitor);
|
|
557
560
|
combinedVisitor.free();
|
|
558
561
|
}
|
|
559
562
|
|
|
560
563
|
private checkNotDisposed(usageError?: string): void {
|
|
564
|
+
this.breaker.use();
|
|
561
565
|
if (this.disposed) {
|
|
562
566
|
if (usageError !== undefined) {
|
|
563
567
|
throw new UsageError(usageError);
|
|
@@ -659,7 +663,6 @@ export class TreeCheckout implements ITreeCheckoutFork {
|
|
|
659
663
|
this,
|
|
660
664
|
config,
|
|
661
665
|
createNodeKeyManager(this.idCompressor),
|
|
662
|
-
this.breaker,
|
|
663
666
|
() => {
|
|
664
667
|
this.views.delete(view);
|
|
665
668
|
},
|
|
@@ -31,7 +31,7 @@ import type {
|
|
|
31
31
|
SummarySessionBranch,
|
|
32
32
|
} from "./editManagerFormat.js";
|
|
33
33
|
import {
|
|
34
|
-
|
|
34
|
+
getUpperBoundOfPreviousSequenceId,
|
|
35
35
|
equalSequenceIds,
|
|
36
36
|
maxSequenceId,
|
|
37
37
|
minSequenceId,
|
|
@@ -362,7 +362,7 @@ export class EditManager<
|
|
|
362
362
|
if (minimumBranchBaseSequenceId !== undefined) {
|
|
363
363
|
// If that branch is behind the minimum sequence id, we only want to evict commits older than it,
|
|
364
364
|
// even if those commits are behind the minimum sequence id
|
|
365
|
-
const sequenceIdBeforeMinimumBranchBase =
|
|
365
|
+
const sequenceIdBeforeMinimumBranchBase = getUpperBoundOfPreviousSequenceId(
|
|
366
366
|
minimumBranchBaseSequenceId,
|
|
367
367
|
);
|
|
368
368
|
trunkTailSequenceId = minSequenceId(
|
|
@@ -7,7 +7,6 @@ import { bufferToString } from "@fluid-internal/client-utils";
|
|
|
7
7
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
8
8
|
import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
9
9
|
import type {
|
|
10
|
-
IGarbageCollectionData,
|
|
11
10
|
ISummaryTreeWithStats,
|
|
12
11
|
ITelemetryContext,
|
|
13
12
|
} from "@fluidframework/runtime-definitions/internal";
|
|
@@ -78,16 +77,6 @@ export class EditManagerSummarizer<TChangeset> implements Summarizable {
|
|
|
78
77
|
return createSingleBlobSummary(stringKey, dataString);
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
public getGCData(fullGC?: boolean): IGarbageCollectionData {
|
|
82
|
-
// TODO: Properly implement garbage collection. Right now, garbage collection is performed automatically
|
|
83
|
-
// by the code in SharedObject (from which SharedTreeCore extends). The `runtime.uploadBlob` API delegates
|
|
84
|
-
// to the `BlobManager`, which automatically populates the summary with ISummaryAttachment entries for each
|
|
85
|
-
// blob.
|
|
86
|
-
return {
|
|
87
|
-
gcNodes: {},
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
80
|
public async load(
|
|
92
81
|
services: IChannelStorageService,
|
|
93
82
|
parse: SummaryElementParser,
|
|
@@ -3,25 +3,46 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
6
7
|
import { brand } from "../util/index.js";
|
|
7
8
|
|
|
8
9
|
import type { SequenceId } from "./editManagerFormat.js";
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Compares two sequenceIds. Returns a negative number if a \< b, a positive number if a \> b, and 0 if a === b.
|
|
13
|
+
* Note that this handles cases where indexInBatch is Number.POSITIVE_INFINITY.
|
|
14
|
+
*/
|
|
10
15
|
export const sequenceIdComparator = (a: SequenceId, b: SequenceId): number =>
|
|
11
16
|
a.sequenceNumber !== b.sequenceNumber
|
|
12
17
|
? a.sequenceNumber - b.sequenceNumber
|
|
13
|
-
:
|
|
18
|
+
: a.indexInBatch === b.indexInBatch
|
|
19
|
+
? 0
|
|
20
|
+
: (a.indexInBatch ?? 0) - (b.indexInBatch ?? 0);
|
|
14
21
|
export const equalSequenceIds = (a: SequenceId, b: SequenceId): boolean =>
|
|
15
22
|
sequenceIdComparator(a, b) === 0;
|
|
16
23
|
export const minSequenceId = (a: SequenceId, b: SequenceId): SequenceId =>
|
|
17
24
|
sequenceIdComparator(a, b) < 0 ? a : b;
|
|
18
25
|
export const maxSequenceId = (a: SequenceId, b: SequenceId): SequenceId =>
|
|
19
26
|
sequenceIdComparator(a, b) > 0 ? a : b;
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Returns the upper bound (maximum possible) sequenceId that can occur just before the given sequenceId.
|
|
29
|
+
* Some examples:
|
|
30
|
+
* 1. sequenceId = \{ sequenceNumber: 1, indexInBatch: 2 \}. The upper bound is \{ sequenceNumber: 1, indexInBatch: 1 \}.
|
|
31
|
+
* 2. sequenceId = \{ sequenceNumber: 2 \}. The upper bound is \{ sequenceNumber: 1, indexInBatch: Number.POSITIVE_INFINITY \}.
|
|
32
|
+
* The indexInBatch value of the previous commit will depend on how many ops were in the previous batch of messages received.
|
|
33
|
+
*/
|
|
34
|
+
export const getUpperBoundOfPreviousSequenceId = (sequenceId: SequenceId): SequenceId => {
|
|
35
|
+
assert(
|
|
36
|
+
sequenceId.indexInBatch === undefined || Number.isFinite(sequenceId.indexInBatch),
|
|
37
|
+
0xabc /* indexInBatch must not be infinity */,
|
|
38
|
+
);
|
|
39
|
+
return sequenceId.indexInBatch === undefined || sequenceId.indexInBatch === 0
|
|
22
40
|
? {
|
|
41
|
+
sequenceNumber: brand(sequenceId.sequenceNumber - 1),
|
|
42
|
+
indexInBatch: Number.POSITIVE_INFINITY,
|
|
43
|
+
}
|
|
44
|
+
: {
|
|
23
45
|
sequenceNumber: brand(sequenceId.sequenceNumber),
|
|
24
46
|
indexInBatch: sequenceId.indexInBatch - 1,
|
|
25
|
-
}
|
|
26
|
-
: { sequenceNumber: brand(sequenceId.sequenceNumber - 1) };
|
|
47
|
+
};
|
|
27
48
|
};
|
|
@@ -4,24 +4,16 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import type {
|
|
8
|
-
IChannelAttributes,
|
|
9
|
-
IFluidDataStoreRuntime,
|
|
10
|
-
IChannelStorageService,
|
|
11
|
-
} from "@fluidframework/datastore-definitions/internal";
|
|
7
|
+
import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
12
8
|
import type { IIdCompressor } from "@fluidframework/id-compressor";
|
|
13
9
|
import type { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
14
10
|
import type {
|
|
15
11
|
IExperimentalIncrementalSummaryContext,
|
|
16
|
-
IGarbageCollectionData,
|
|
17
12
|
ISummaryTreeWithStats,
|
|
18
13
|
ITelemetryContext,
|
|
19
14
|
} from "@fluidframework/runtime-definitions/internal";
|
|
20
15
|
import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
|
|
21
|
-
import {
|
|
22
|
-
type IFluidSerializer,
|
|
23
|
-
SharedObject,
|
|
24
|
-
} from "@fluidframework/shared-object-base/internal";
|
|
16
|
+
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal";
|
|
25
17
|
|
|
26
18
|
import type { ICodecOptions, IJsonCodec } from "../codec/index.js";
|
|
27
19
|
import {
|
|
@@ -39,7 +31,7 @@ import {
|
|
|
39
31
|
import {
|
|
40
32
|
type JsonCompatibleReadOnly,
|
|
41
33
|
brand,
|
|
42
|
-
Breakable,
|
|
34
|
+
type Breakable,
|
|
43
35
|
type WithBreakable,
|
|
44
36
|
throwIfBroken,
|
|
45
37
|
breakingClass,
|
|
@@ -57,6 +49,8 @@ import type { ResubmitMachine } from "./resubmitMachine.js";
|
|
|
57
49
|
import { DefaultResubmitMachine } from "./defaultResubmitMachine.js";
|
|
58
50
|
import { BranchCommitEnricher } from "./branchCommitEnricher.js";
|
|
59
51
|
import { createChildLogger } from "@fluidframework/telemetry-utils/internal";
|
|
52
|
+
import type { IFluidLoadable, ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
53
|
+
import type { IChannelView } from "../shared-tree/index.js";
|
|
60
54
|
|
|
61
55
|
// TODO: Organize this to be adjacent to persisted types.
|
|
62
56
|
const summarizablesTreeKey = "indexes";
|
|
@@ -75,11 +69,8 @@ export interface ClonableSchemaAndPolicy extends SchemaAndPolicy {
|
|
|
75
69
|
*/
|
|
76
70
|
@breakingClass
|
|
77
71
|
export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
78
|
-
extends SharedObject
|
|
79
72
|
implements WithBreakable
|
|
80
73
|
{
|
|
81
|
-
public readonly breaker: Breakable = new Breakable("Shared Tree");
|
|
82
|
-
|
|
83
74
|
private readonly editManager: EditManager<TEditor, TChange, ChangeFamily<TEditor, TChange>>;
|
|
84
75
|
private readonly summarizables: readonly [EditManagerSummarizer<TChange>, ...Summarizable[]];
|
|
85
76
|
/**
|
|
@@ -89,14 +80,6 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
89
80
|
*/
|
|
90
81
|
private detachedRevision: SeqNumber | undefined = minimumPossibleSequenceNumber;
|
|
91
82
|
|
|
92
|
-
/**
|
|
93
|
-
* Used to edit the state of the tree. Edits will be immediately applied locally to the tree.
|
|
94
|
-
* If there is no transaction currently ongoing, then the edits will be submitted to Fluid immediately as well.
|
|
95
|
-
*/
|
|
96
|
-
public get editor(): TEditor {
|
|
97
|
-
return this.getLocalBranch().editor;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
83
|
/**
|
|
101
84
|
* Used to encode/decode messages sent to/received from the Fluid runtime.
|
|
102
85
|
*
|
|
@@ -113,12 +96,10 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
113
96
|
MessageEncodingContext
|
|
114
97
|
>;
|
|
115
98
|
|
|
116
|
-
private readonly idCompressor: IIdCompressor;
|
|
117
|
-
|
|
118
99
|
private readonly resubmitMachine: ResubmitMachine<TChange>;
|
|
119
|
-
|
|
100
|
+
public readonly commitEnricher: BranchCommitEnricher<TChange>;
|
|
120
101
|
|
|
121
|
-
|
|
102
|
+
public readonly mintRevisionTag: () => RevisionTag;
|
|
122
103
|
|
|
123
104
|
private readonly schemaAndPolicy: ClonableSchemaAndPolicy;
|
|
124
105
|
|
|
@@ -126,50 +107,44 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
126
107
|
* @param summarizables - Summarizers for all indexes used by this tree
|
|
127
108
|
* @param changeFamily - The change family
|
|
128
109
|
* @param editManager - The edit manager
|
|
129
|
-
* @param id - The id of the shared object
|
|
130
110
|
* @param runtime - The IFluidDataStoreRuntime which contains the shared object
|
|
131
|
-
* @param
|
|
132
|
-
*
|
|
111
|
+
* @param editor - Used to edit the state of the tree. Edits will be immediately applied locally to the tree.
|
|
112
|
+
* If there is no transaction currently ongoing, then the edits will be submitted to Fluid immediately as well.
|
|
133
113
|
*/
|
|
134
114
|
public constructor(
|
|
115
|
+
public readonly breaker: Breakable,
|
|
116
|
+
public readonly sharedObject: IChannelView & IFluidLoadable,
|
|
117
|
+
public readonly serializer: IFluidSerializer,
|
|
118
|
+
public readonly submitLocalMessage: (content: unknown, localOpMetadata?: unknown) => void,
|
|
119
|
+
logger: ITelemetryBaseLogger | undefined,
|
|
135
120
|
summarizables: readonly Summarizable[],
|
|
136
121
|
changeFamily: ChangeFamily<TEditor, TChange>,
|
|
137
122
|
options: ICodecOptions,
|
|
138
123
|
formatOptions: ExplicitCoreCodecVersions,
|
|
139
|
-
|
|
140
|
-
id: string,
|
|
141
|
-
runtime: IFluidDataStoreRuntime,
|
|
142
|
-
attributes: IChannelAttributes,
|
|
143
|
-
telemetryContextPrefix: string,
|
|
124
|
+
private readonly idCompressor: IIdCompressor,
|
|
144
125
|
schema: TreeStoredSchemaRepository,
|
|
145
126
|
schemaPolicy: SchemaPolicy,
|
|
146
127
|
resubmitMachine?: ResubmitMachine<TChange>,
|
|
147
128
|
enricher?: ChangeEnricherReadonlyCheckout<TChange>,
|
|
129
|
+
public readonly getEditor: () => TEditor = () => this.getLocalBranch().editor,
|
|
148
130
|
) {
|
|
149
|
-
super(id, runtime, attributes, telemetryContextPrefix);
|
|
150
|
-
|
|
151
131
|
this.schemaAndPolicy = {
|
|
152
132
|
schema,
|
|
153
133
|
policy: schemaPolicy,
|
|
154
134
|
};
|
|
155
135
|
|
|
156
136
|
const rebaseLogger = createChildLogger({
|
|
157
|
-
logger
|
|
137
|
+
logger,
|
|
158
138
|
namespace: "Rebase",
|
|
159
139
|
});
|
|
160
140
|
|
|
161
|
-
assert(
|
|
162
|
-
runtime.idCompressor !== undefined,
|
|
163
|
-
0x886 /* IdCompressor must be enabled to use SharedTree */,
|
|
164
|
-
);
|
|
165
|
-
this.idCompressor = runtime.idCompressor;
|
|
166
141
|
this.mintRevisionTag = () => this.idCompressor.generateCompressedId();
|
|
167
142
|
/**
|
|
168
143
|
* A random ID that uniquely identifies this client in the collab session.
|
|
169
144
|
* This is sent alongside every op to identify which client the op originated from.
|
|
170
145
|
* This is used rather than the Fluid client ID because the Fluid client ID is not stable across reconnections.
|
|
171
146
|
*/
|
|
172
|
-
const localSessionId =
|
|
147
|
+
const localSessionId = idCompressor.localSessionId;
|
|
173
148
|
this.editManager = new EditManager(
|
|
174
149
|
changeFamily,
|
|
175
150
|
localSessionId,
|
|
@@ -189,7 +164,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
189
164
|
}
|
|
190
165
|
});
|
|
191
166
|
|
|
192
|
-
const revisionTagCodec = new RevisionTagCodec(
|
|
167
|
+
const revisionTagCodec = new RevisionTagCodec(idCompressor);
|
|
193
168
|
const editManagerCodec = makeEditManagerCodec(
|
|
194
169
|
this.editManager.changeFamily.codecs,
|
|
195
170
|
revisionTagCodec,
|
|
@@ -212,7 +187,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
212
187
|
|
|
213
188
|
this.messageCodec = makeMessageCodec(
|
|
214
189
|
changeFamily.codecs,
|
|
215
|
-
new RevisionTagCodec(
|
|
190
|
+
new RevisionTagCodec(idCompressor),
|
|
216
191
|
options,
|
|
217
192
|
formatOptions.message,
|
|
218
193
|
);
|
|
@@ -231,7 +206,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
231
206
|
// TODO: SharedObject's merging of the two summary methods into summarizeCore is not what we want here:
|
|
232
207
|
// We might want to not subclass it, or override/reimplement most of its functionality.
|
|
233
208
|
@throwIfBroken
|
|
234
|
-
|
|
209
|
+
public summarizeCore(
|
|
235
210
|
serializer: IFluidSerializer,
|
|
236
211
|
telemetryContext?: ITelemetryContext,
|
|
237
212
|
incrementalSummaryContext?: IExperimentalIncrementalSummaryContext,
|
|
@@ -243,7 +218,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
243
218
|
summarizableBuilder.addWithStats(
|
|
244
219
|
s.key,
|
|
245
220
|
s.getAttachSummary(
|
|
246
|
-
(contents) => serializer.stringify(contents, this.handle),
|
|
221
|
+
(contents) => serializer.stringify(contents, this.sharedObject.handle),
|
|
247
222
|
undefined,
|
|
248
223
|
undefined,
|
|
249
224
|
telemetryContext,
|
|
@@ -256,7 +231,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
256
231
|
return builder.getSummaryTree();
|
|
257
232
|
}
|
|
258
233
|
|
|
259
|
-
|
|
234
|
+
public async loadCore(services: IChannelStorageService): Promise<void> {
|
|
260
235
|
assert(
|
|
261
236
|
this.editManager.localBranch.getHead() === this.editManager.getTrunkHead(),
|
|
262
237
|
0xaaa /* All local changes should be applied to the trunk before loading from summary */,
|
|
@@ -311,7 +286,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
311
286
|
isResubmit: boolean,
|
|
312
287
|
): void {
|
|
313
288
|
assert(
|
|
314
|
-
this.isAttached() === (this.detachedRevision === undefined),
|
|
289
|
+
this.sharedObject.isAttached() === (this.detachedRevision === undefined),
|
|
315
290
|
0x95a /* Detached revision should only be set when not attached */,
|
|
316
291
|
);
|
|
317
292
|
|
|
@@ -352,7 +327,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
352
327
|
this.resubmitMachine.onCommitSubmitted(enrichedCommit);
|
|
353
328
|
}
|
|
354
329
|
|
|
355
|
-
|
|
330
|
+
public processCore(
|
|
356
331
|
message: ISequencedDocumentMessage,
|
|
357
332
|
local: boolean,
|
|
358
333
|
localOpMetadata: unknown,
|
|
@@ -372,22 +347,15 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
372
347
|
this.editManager.advanceMinimumSequenceNumber(brand(message.minimumSequenceNumber));
|
|
373
348
|
}
|
|
374
349
|
|
|
375
|
-
|
|
350
|
+
public getLocalBranch(): SharedTreeBranch<TEditor, TChange> {
|
|
376
351
|
return this.editManager.localBranch;
|
|
377
352
|
}
|
|
378
353
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
protected override didAttach(): void {
|
|
382
|
-
if (this.detachedRevision !== undefined) {
|
|
383
|
-
this.detachedRevision = undefined;
|
|
384
|
-
}
|
|
354
|
+
public didAttach(): void {
|
|
355
|
+
this.detachedRevision = undefined;
|
|
385
356
|
}
|
|
386
357
|
|
|
387
|
-
|
|
388
|
-
content: JsonCompatibleReadOnly,
|
|
389
|
-
localOpMetadata: unknown,
|
|
390
|
-
): void {
|
|
358
|
+
public reSubmitCore(content: JsonCompatibleReadOnly, localOpMetadata: unknown): void {
|
|
391
359
|
// Empty context object is passed in, as our decode function is schema-agnostic.
|
|
392
360
|
const {
|
|
393
361
|
commit: { revision },
|
|
@@ -416,31 +384,13 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
|
|
|
416
384
|
this.submitCommit(enrichedCommit, localOpMetadata, true);
|
|
417
385
|
}
|
|
418
386
|
|
|
419
|
-
|
|
387
|
+
public applyStashedOp(content: JsonCompatibleReadOnly): void {
|
|
420
388
|
// Empty context object is passed in, as our decode function is schema-agnostic.
|
|
421
389
|
const {
|
|
422
390
|
commit: { revision, change },
|
|
423
391
|
} = this.messageCodec.decode(content, { idCompressor: this.idCompressor });
|
|
424
392
|
this.editManager.localBranch.apply({ change, revision });
|
|
425
393
|
}
|
|
426
|
-
|
|
427
|
-
public override getGCData(fullGC?: boolean): IGarbageCollectionData {
|
|
428
|
-
const gcNodes: IGarbageCollectionData["gcNodes"] = super.getGCData(fullGC).gcNodes;
|
|
429
|
-
for (const s of this.summarizables) {
|
|
430
|
-
for (const [id, routes] of Object.entries(s.getGCData(fullGC).gcNodes)) {
|
|
431
|
-
gcNodes[id] ??= [];
|
|
432
|
-
for (const route of routes) {
|
|
433
|
-
// Non null asserting here because we are creating an array at gcNodes[id] if it is undefined
|
|
434
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
435
|
-
gcNodes[id]!.push(route);
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
return {
|
|
441
|
-
gcNodes,
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
394
|
}
|
|
445
395
|
|
|
446
396
|
function isClonableSchemaPolicy(
|
|
@@ -482,13 +432,6 @@ export interface Summarizable {
|
|
|
482
432
|
telemetryContext?: ITelemetryContext,
|
|
483
433
|
): Promise<ISummaryTreeWithStats>;
|
|
484
434
|
|
|
485
|
-
/**
|
|
486
|
-
* {@inheritDoc (ISharedObject:interface).getGCData}
|
|
487
|
-
*/
|
|
488
|
-
// TODO: Change this interface (and the one in ISharedObject, if necessary) to support "handles within handles".
|
|
489
|
-
// Consider the case of a document with history; the return value here currently grows unboundedly.
|
|
490
|
-
getGCData(fullGC?: boolean): IGarbageCollectionData;
|
|
491
|
-
|
|
492
435
|
/**
|
|
493
436
|
* Allows the component to perform custom loading. The storage service is scoped to this component and therefore
|
|
494
437
|
* paths in this component will not collide with those in other components, even if they are the same string.
|
|
@@ -15,12 +15,14 @@ export {
|
|
|
15
15
|
type TreeViewAlpha,
|
|
16
16
|
type TreeBranch,
|
|
17
17
|
type TreeBranchEvents,
|
|
18
|
+
type ITreeAlpha,
|
|
18
19
|
asTreeViewAlpha,
|
|
19
20
|
} from "./tree.js";
|
|
20
21
|
export {
|
|
21
22
|
SchemaFactory,
|
|
22
23
|
type ScopedSchemaName,
|
|
23
24
|
type SchemaFactoryObjectOptions,
|
|
25
|
+
type schemaStatics,
|
|
24
26
|
} from "./schemaFactory.js";
|
|
25
27
|
export { SchemaFactoryAlpha } from "./schemaFactoryAlpha.js";
|
|
26
28
|
export type {
|
|
@@ -118,6 +120,19 @@ export {
|
|
|
118
120
|
comparePersistedSchema,
|
|
119
121
|
} from "./storedSchema.js";
|
|
120
122
|
|
|
123
|
+
export {
|
|
124
|
+
type TransactionConstraint,
|
|
125
|
+
type NodeInDocumentConstraint,
|
|
126
|
+
type RunTransactionParams,
|
|
127
|
+
type VoidTransactionCallbackStatus,
|
|
128
|
+
type TransactionCallbackStatus,
|
|
129
|
+
type TransactionResult,
|
|
130
|
+
type TransactionResultExt,
|
|
131
|
+
type TransactionResultSuccess,
|
|
132
|
+
type TransactionResultFailed,
|
|
133
|
+
rollback,
|
|
134
|
+
} from "./transactionTypes.js";
|
|
135
|
+
|
|
121
136
|
// Exporting the schema (RecursiveObject) to test that recursive types are working correctly.
|
|
122
137
|
// These are `@internal` so they can't be included in the `InternalClassTreeTypes` due to https://github.com/microsoft/rushstack/issues/3639
|
|
123
138
|
export {
|