@fluidframework/tree 2.1.0-276326 → 2.1.0-281041
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/.eslintrc.cjs +7 -0
- package/.vscode/Tree.code-workspace +7 -1
- package/README.md +134 -29
- package/api-report/tree.alpha.api.md +1 -0
- package/api-report/tree.beta.api.md +1 -0
- package/api-report/tree.public.api.md +1 -0
- package/beta.d.ts +1 -1
- package/dist/beta.d.ts +1 -1
- package/dist/core/forest/editableForest.d.ts +6 -3
- package/dist/core/forest/editableForest.d.ts.map +1 -1
- package/dist/core/forest/editableForest.js +14 -4
- 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 +3 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js +3 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +2 -0
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +9 -1
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/events/events.d.ts +4 -1
- package/dist/events/events.d.ts.map +1 -1
- package/dist/events/events.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +1 -0
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts +0 -2
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.js +0 -20
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +0 -38
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/index.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +0 -4
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +1 -14
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts +0 -1
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +0 -3
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +3 -3
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +2 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +11 -0
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/discrepancies.d.ts +96 -0
- package/dist/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/discrepancies.js +264 -0
- package/dist/feature-libraries/modular-schema/discrepancies.js.map +1 -0
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +9 -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.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +3 -0
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +2 -1
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +3 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +42 -26
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +51 -2
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +830 -245
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js +2 -0
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +44 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/node-key/index.d.ts +0 -1
- package/dist/feature-libraries/node-key/index.d.ts.map +1 -1
- package/dist/feature-libraries/node-key/index.js +1 -3
- package/dist/feature-libraries/node-key/index.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +1 -0
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/sequence-field/index.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/index.js +1 -2
- package/dist/feature-libraries/sequence-field/index.js.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +1 -1
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.js +6 -1
- package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +1 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.d.ts +2 -17
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +31 -39
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +1 -0
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js +2 -0
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/dist/index.d.ts +1 -1
- 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/public.d.ts +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +4 -2
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +240 -184
- 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 +150 -90
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +2 -1
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +1 -0
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +4 -6
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +265 -209
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/arrayNode.d.ts +4 -0
- package/dist/simple-tree/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/arrayNode.js +36 -19
- package/dist/simple-tree/arrayNode.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +22 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +2 -1
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/mapNode.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +2 -1
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/proxies.d.ts.map +1 -1
- package/dist/simple-tree/proxies.js +2 -4
- package/dist/simple-tree/proxies.js.map +1 -1
- package/dist/simple-tree/schemaFactory.d.ts +24 -1
- package/dist/simple-tree/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/schemaFactory.js +40 -4
- package/dist/simple-tree/schemaFactory.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +36 -1
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/toFlexSchema.d.ts +2 -2
- package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/dist/simple-tree/toFlexSchema.js +3 -2
- package/dist/simple-tree/toFlexSchema.js.map +1 -1
- package/dist/simple-tree/tree.d.ts +4 -1
- package/dist/simple-tree/tree.d.ts.map +1 -1
- package/dist/simple-tree/tree.js +48 -1
- package/dist/simple-tree/tree.js.map +1 -1
- package/dist/simple-tree/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/treeNodeApi.js +10 -10
- package/dist/simple-tree/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/types.d.ts +22 -3
- package/dist/simple-tree/types.d.ts.map +1 -1
- package/dist/simple-tree/types.js +32 -21
- package/dist/simple-tree/types.js.map +1 -1
- package/dist/util/breakable.d.ts +83 -0
- package/dist/util/breakable.d.ts.map +1 -0
- package/dist/util/breakable.js +178 -0
- package/dist/util/breakable.js.map +1 -0
- package/dist/util/index.d.ts +3 -2
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +9 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/nestedMap.d.ts +23 -3
- package/dist/util/nestedMap.d.ts.map +1 -1
- package/dist/util/nestedMap.js +38 -7
- package/dist/util/nestedMap.js.map +1 -1
- package/dist/util/utils.d.ts +7 -0
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +15 -1
- package/dist/util/utils.js.map +1 -1
- package/docs/README.md +1 -1
- package/docs/main/compatibility.md +1 -1
- package/docs/main/stored-and-view-schema.md +1 -1
- package/internal.d.ts +1 -1
- package/lib/beta.d.ts +1 -1
- package/lib/core/forest/editableForest.d.ts +6 -3
- package/lib/core/forest/editableForest.d.ts.map +1 -1
- package/lib/core/forest/editableForest.js +15 -5
- 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 +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 +2 -0
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +7 -1
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/events/events.d.ts +4 -1
- package/lib/events/events.d.ts.map +1 -1
- package/lib/events/events.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -0
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts +0 -2
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.js +0 -20
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +0 -38
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/index.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +0 -4
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +1 -14
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts +0 -1
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +0 -3
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +3 -3
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +2 -2
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +11 -0
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/lib/feature-libraries/modular-schema/discrepancies.d.ts +96 -0
- package/lib/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -0
- package/lib/feature-libraries/modular-schema/discrepancies.js +260 -0
- package/lib/feature-libraries/modular-schema/discrepancies.js.map +1 -0
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +9 -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.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +3 -0
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +2 -1
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +1 -0
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +42 -26
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +51 -2
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +829 -247
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js +2 -0
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +44 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/node-key/index.d.ts +0 -1
- package/lib/feature-libraries/node-key/index.d.ts.map +1 -1
- package/lib/feature-libraries/node-key/index.js +0 -1
- package/lib/feature-libraries/node-key/index.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +1 -0
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/sequence-field/index.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/index.js +1 -1
- package/lib/feature-libraries/sequence-field/index.js.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.js +1 -1
- package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.js +6 -1
- package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.d.ts +2 -17
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +31 -39
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +1 -0
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js +4 -2
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/lib/index.d.ts +1 -1
- 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/public.d.ts +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +4 -2
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +242 -185
- 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 +151 -90
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +2 -1
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +1 -0
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +4 -6
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +267 -210
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/arrayNode.d.ts +4 -0
- package/lib/simple-tree/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/arrayNode.js +38 -21
- package/lib/simple-tree/arrayNode.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +22 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +1 -1
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/mapNode.js.map +1 -1
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +3 -2
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/proxies.d.ts.map +1 -1
- package/lib/simple-tree/proxies.js +2 -4
- package/lib/simple-tree/proxies.js.map +1 -1
- package/lib/simple-tree/schemaFactory.d.ts +24 -1
- package/lib/simple-tree/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/schemaFactory.js +38 -3
- package/lib/simple-tree/schemaFactory.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +36 -1
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/toFlexSchema.d.ts +2 -2
- package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/lib/simple-tree/toFlexSchema.js +3 -2
- package/lib/simple-tree/toFlexSchema.js.map +1 -1
- package/lib/simple-tree/tree.d.ts +4 -1
- package/lib/simple-tree/tree.d.ts.map +1 -1
- package/lib/simple-tree/tree.js +44 -0
- package/lib/simple-tree/tree.js.map +1 -1
- package/lib/simple-tree/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/treeNodeApi.js +11 -11
- package/lib/simple-tree/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/types.d.ts +22 -3
- package/lib/simple-tree/types.d.ts.map +1 -1
- package/lib/simple-tree/types.js +32 -21
- package/lib/simple-tree/types.js.map +1 -1
- package/lib/util/breakable.d.ts +83 -0
- package/lib/util/breakable.d.ts.map +1 -0
- package/lib/util/breakable.js +171 -0
- package/lib/util/breakable.js.map +1 -0
- package/lib/util/index.d.ts +3 -2
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +3 -2
- package/lib/util/index.js.map +1 -1
- package/lib/util/nestedMap.d.ts +23 -3
- package/lib/util/nestedMap.d.ts.map +1 -1
- package/lib/util/nestedMap.js +36 -6
- package/lib/util/nestedMap.js.map +1 -1
- package/lib/util/utils.d.ts +7 -0
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +13 -0
- package/lib/util/utils.js.map +1 -1
- package/package.json +29 -27
- package/src/core/forest/editableForest.ts +17 -4
- package/src/core/index.ts +2 -0
- package/src/core/rebase/index.ts +2 -0
- package/src/core/rebase/types.ts +17 -0
- package/src/core/tree/visitDelta.ts +1 -0
- package/src/events/events.ts +4 -2
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +1 -1
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -0
- package/src/feature-libraries/flex-map-tree/mapTreeNode.ts +0 -30
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +0 -43
- package/src/feature-libraries/flex-tree/index.ts +0 -1
- package/src/feature-libraries/flex-tree/lazyField.ts +1 -21
- package/src/feature-libraries/flex-tree/lazyNode.ts +0 -6
- package/src/feature-libraries/index.ts +1 -2
- package/src/feature-libraries/modular-schema/crossFieldQueries.ts +18 -0
- package/src/feature-libraries/modular-schema/discrepancies.ts +395 -0
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +10 -2
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +3 -0
- package/src/feature-libraries/modular-schema/index.ts +2 -0
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +81 -35
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +1529 -454
- package/src/feature-libraries/modular-schema/modularChangeFormat.ts +2 -0
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +51 -0
- package/src/feature-libraries/node-key/index.ts +0 -1
- package/src/feature-libraries/optional-field/optionalField.ts +1 -0
- package/src/feature-libraries/sequence-field/index.ts +0 -2
- package/src/feature-libraries/sequence-field/invert.ts +1 -1
- package/src/feature-libraries/sequence-field/rebase.ts +7 -1
- package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +2 -1
- package/src/feature-libraries/sequence-field/utils.ts +37 -85
- package/src/feature-libraries/typed-schema/typedTreeSchema.ts +10 -0
- package/src/index.ts +0 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/schematizingTreeView.ts +6 -2
- package/src/shared-tree/sharedTree.ts +5 -2
- package/src/shared-tree/treeCheckout.ts +6 -2
- package/src/shared-tree-core/branch.ts +1 -0
- package/src/shared-tree-core/sharedTreeCore.ts +18 -6
- package/src/simple-tree/arrayNode.ts +49 -22
- package/src/simple-tree/leafNodeSchema.ts +1 -1
- package/src/simple-tree/mapNode.ts +2 -2
- package/src/simple-tree/objectNode.ts +9 -3
- package/src/simple-tree/proxies.ts +2 -4
- package/src/simple-tree/schemaFactory.ts +45 -2
- package/src/simple-tree/schemaTypes.ts +36 -1
- package/src/simple-tree/toFlexSchema.ts +5 -4
- package/src/simple-tree/tree.ts +65 -4
- package/src/simple-tree/treeNodeApi.ts +15 -15
- package/src/simple-tree/types.ts +60 -30
- package/src/util/breakable.ts +214 -0
- package/src/util/index.ts +10 -0
- package/src/util/nestedMap.ts +49 -11
- package/src/util/utils.ts +17 -0
- package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts +0 -41
- package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts.map +0 -1
- package/dist/feature-libraries/node-key/nodeKeyIndex.js +0 -101
- package/dist/feature-libraries/node-key/nodeKeyIndex.js.map +0 -1
- package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts +0 -41
- package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts.map +0 -1
- package/lib/feature-libraries/node-key/nodeKeyIndex.js +0 -97
- package/lib/feature-libraries/node-key/nodeKeyIndex.js.map +0 -1
- package/src/feature-libraries/node-key/nodeKeyIndex.ts +0 -132
package/.eslintrc.cjs
CHANGED
|
@@ -70,6 +70,13 @@ module.exports = {
|
|
|
70
70
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
71
71
|
},
|
|
72
72
|
},
|
|
73
|
+
// TODO: Remove this override once this config has been updated to extend at least the "recommended" base config.
|
|
74
|
+
{
|
|
75
|
+
files: ["src/test/**/*.generated.ts*"],
|
|
76
|
+
rules: {
|
|
77
|
+
"@typescript-eslint/no-explicit-any": ["off"],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
73
80
|
],
|
|
74
81
|
settings: {
|
|
75
82
|
"import/extensions": [".ts", ".tsx", ".d.ts", ".js", ".jsx"],
|
|
@@ -11,7 +11,13 @@
|
|
|
11
11
|
],
|
|
12
12
|
"settings": {
|
|
13
13
|
"search.followSymlinks": false,
|
|
14
|
-
"typescript.preferences.autoImportFileExcludePatterns": [
|
|
14
|
+
"typescript.preferences.autoImportFileExcludePatterns": [
|
|
15
|
+
"**/dist/**",
|
|
16
|
+
"**/lib/**",
|
|
17
|
+
// Avoid suggesting autoimports for the 'previous' version packages which are used for typetesting.
|
|
18
|
+
"**/node_modules/**/@fluid*/*-previous",
|
|
19
|
+
"**/node_modules/**/@fluid*/*-previous/*"
|
|
20
|
+
],
|
|
15
21
|
"typescript.preferences.importModuleSpecifier": "project-relative"
|
|
16
22
|
}
|
|
17
23
|
}
|
package/README.md
CHANGED
|
@@ -7,6 +7,40 @@ The contents of this package are also reported as part of the [`fluid-framework`
|
|
|
7
7
|
[SharedTree Philosophy](./docs/SharedTree%20Philosophy.md) covers the goals of the SharedTree project,
|
|
8
8
|
and some of the implications of those goals for developers working on this package.
|
|
9
9
|
|
|
10
|
+
<!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README_HEADER) -->
|
|
11
|
+
|
|
12
|
+
<!-- prettier-ignore-start -->
|
|
13
|
+
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
|
|
14
|
+
|
|
15
|
+
## Using Fluid Framework libraries
|
|
16
|
+
|
|
17
|
+
When taking a dependency on a Fluid Framework library's public APIs, we recommend using a `^` (caret) version range, such as `^1.3.4`.
|
|
18
|
+
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
19
|
+
library consumers should always prefer `^`.
|
|
20
|
+
|
|
21
|
+
If using any of Fluid Framework's unstable APIs (for example, its `beta` APIs), we recommend using a more constrained version range, such as `~`.
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
To get started, install the package by running the following command:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm i @fluidframework/tree
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Importing from this package
|
|
32
|
+
|
|
33
|
+
This package leverages [package.json exports](https://nodejs.org/api/packages.html#exports) to separate its APIs by support level.
|
|
34
|
+
For more information on the related support guarantees, see [API Support Levels](https://fluidframework.com/docs/build/releases-and-apitags/#api-support-levels).
|
|
35
|
+
|
|
36
|
+
To access the `public` ([SemVer](https://semver.org/)) APIs, import via `@fluidframework/tree` like normal.
|
|
37
|
+
|
|
38
|
+
To access the `beta` APIs, import via `@fluidframework/tree/beta`.
|
|
39
|
+
|
|
40
|
+
<!-- prettier-ignore-end -->
|
|
41
|
+
|
|
42
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
43
|
+
|
|
10
44
|
## Status
|
|
11
45
|
|
|
12
46
|
Notable consideration that early adopters should be wary of:
|
|
@@ -22,21 +56,6 @@ Notable consideration that early adopters should be wary of:
|
|
|
22
56
|
|
|
23
57
|
More details on the development status of various features can be found in the [roadmap](docs/roadmap.md).
|
|
24
58
|
|
|
25
|
-
<!-- AUTO-GENERATED-CONTENT:START (README_DEPENDENCY_GUIDELINES_SECTION:includeHeading=TRUE) -->
|
|
26
|
-
|
|
27
|
-
<!-- prettier-ignore-start -->
|
|
28
|
-
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
|
|
29
|
-
|
|
30
|
-
## Using Fluid Framework libraries
|
|
31
|
-
|
|
32
|
-
When taking a dependency on a Fluid Framework library, we recommend using a `^` (caret) version range, such as `^1.3.4`.
|
|
33
|
-
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
34
|
-
library consumers should always prefer `^`.
|
|
35
|
-
|
|
36
|
-
<!-- prettier-ignore-end -->
|
|
37
|
-
|
|
38
|
-
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
39
|
-
|
|
40
59
|
## Motivation
|
|
41
60
|
|
|
42
61
|
There are a lot of different factors motivating the creation of this Tree DDS.
|
|
@@ -142,21 +161,20 @@ When nothing in that container references the DDS anymore, it may get garbage co
|
|
|
142
161
|
The tree DDS itself, or more specifically [`shared-tree-core`](./src/shared-tree-core/README.md) is composed of a collection of indexes (just like a database) which contribute data which get persisted as part of the summary in the container.
|
|
143
162
|
`shared-tree-core` owns these databases, and is responsible for populating them from summaries and updating them when summarizing.
|
|
144
163
|
|
|
145
|
-
See [indexes and branches](./docs/indexes
|
|
164
|
+
See [indexes and branches](./docs/main/indexes-and-branches.md) for details on how this works with branches.
|
|
146
165
|
|
|
147
|
-
When applications want access to the `tree`'s data, they do so through an [`
|
|
166
|
+
When applications want access to the `tree`'s data, they do so through an [`TreeView`](./src/simple-tree/tree.ts) which abstracts the indexes into nice application facing APIs based on the [`view-schema`](./src/core/schema-view/README.md).
|
|
148
167
|
Views may also have state from the application, including:
|
|
149
168
|
|
|
150
169
|
- [`view-schema`](./src/core/schema-view/README.md)
|
|
151
|
-
- adapters for out-of-schema data
|
|
152
|
-
- request or hints for what subsets of the tree to keep in memory
|
|
170
|
+
- adapters for out-of-schema data (TODO)
|
|
171
|
+
- request or hints for what subsets of the tree to keep in memory (TODO)
|
|
153
172
|
- pending transactions
|
|
154
|
-
- registrations for application callbacks / events
|
|
173
|
+
- registrations for application callbacks / events
|
|
155
174
|
|
|
156
|
-
|
|
157
|
-
Since views subscribe to events from `shared-tree`, explicitly disposing any additionally created ones is required to avoid leaks.
|
|
175
|
+
Since views subscribe to events from `shared-tree`, explicitly disposing any created ones is required to avoid leaks.
|
|
158
176
|
|
|
159
|
-
|
|
177
|
+
Transactions are created by `Tree.runTransaction` and are currently synchronous.
|
|
160
178
|
Support for asynchronous transactions, with the application managing the lifetime and ensuring it does not exceed the lifetime of the view,
|
|
161
179
|
could be added in the future.
|
|
162
180
|
|
|
@@ -329,7 +347,7 @@ Some of the principles used to guide this are:
|
|
|
329
347
|
Another aspect of reducing transitive dependencies is reducing the required dependencies for particular scenarios.
|
|
330
348
|
This means factoring out code that is not always required (such as support for extra features and optimizations) such that they can be omitted when not needed.
|
|
331
349
|
`shared-tree-core` is an excellent example of this: it can be run with no indexes, and trivial a change family allowing it to have very few required dependencies.
|
|
332
|
-
This often takes the form of either depending on interfaces (which can have their implementation swapped out or mocked), like [`ChangeFamily`](./src/change-family/README.md), or collection functionality in a registry, like we do for `FieldKinds` and `shared-tree-core`'s indexes.
|
|
350
|
+
This often takes the form of either depending on interfaces (which can have their implementation swapped out or mocked), like [`ChangeFamily`](./src/core/change-family/README.md), or collection functionality in a registry, like we do for `FieldKinds` and `shared-tree-core`'s indexes.
|
|
333
351
|
Dependency injection is one example of a useful pattern for reducing transitive dependencies.
|
|
334
352
|
In addition to simplifying reasoning about the system (less total to think about for a given scenario) and simplifying testing,
|
|
335
353
|
this approach also makes the lifecycle for new features easier to manage, since they can be fully implemented and tested without having to modify code outside of themselves.
|
|
@@ -395,10 +413,97 @@ Smaller scoped issues which will not impact the overall architecture should be d
|
|
|
395
413
|
|
|
396
414
|
## How should specialized sub-tree handling compose?
|
|
397
415
|
|
|
398
|
-
Applications should have a domain model that can mix
|
|
399
|
-
Custom implementations should probably be able to be projections of
|
|
416
|
+
Applications should have a domain model that can mix tree nodes with custom implementations as needed.
|
|
417
|
+
Custom implementations should probably be able to be projections of flex trees, the forest content (via cursors), and updated via either regeneration from the input, or updated by a delta.
|
|
400
418
|
This is important for performance/scalability and might be how we do virtualization (maybe subtrees that aren't downloaded are just one custom representation?).
|
|
401
|
-
This might also be the layer at which we hook up schematize.
|
|
402
|
-
Alternatively, it might be an explicitly two-phase setup (schematize then normalize), but we might share logic between the two and have non-copying bypasses.
|
|
403
419
|
|
|
404
|
-
|
|
420
|
+
<!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README_FOOTER) -->
|
|
421
|
+
|
|
422
|
+
<!-- prettier-ignore-start -->
|
|
423
|
+
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
|
|
424
|
+
|
|
425
|
+
## API Documentation
|
|
426
|
+
|
|
427
|
+
API documentation for **@fluidframework/tree** is available at <https://fluidframework.com/docs/apis/tree>.
|
|
428
|
+
|
|
429
|
+
## Minimum Client Requirements
|
|
430
|
+
|
|
431
|
+
These are the platform requirements for the current version of Fluid Framework Client Packages.
|
|
432
|
+
These requirements err on the side of being too strict since within a major version they can be relaxed over time, but not made stricter.
|
|
433
|
+
For Long Term Support (LTS) versions this can require supporting these platforms for several years.
|
|
434
|
+
|
|
435
|
+
It is likely that other configurations will work, but they are not supported: if they stop working, we do not consider that a bug.
|
|
436
|
+
If you would benefit from support for something not listed here, file an issue and the product team will evaluate your request.
|
|
437
|
+
When making such a request please include if the configuration already works (and thus the request is just that it becomes officially supported), or if changes are required to get it working.
|
|
438
|
+
|
|
439
|
+
### Supported Runtimes
|
|
440
|
+
|
|
441
|
+
- NodeJs ^20.10.0 except that we will drop support for it [when NodeJs 20 loses its upstream support on 2026-04-30](https://github.com/nodejs/release#release-schedule), and will support a newer LTS version of NodeJS (22) at least 1 year before 20 is end-of-life. This same policy applies to NodeJS 22 when it is end of life (2027-04-30).
|
|
442
|
+
- Modern browsers supporting the es2022 standard library: in response to asks we can add explicit support for using babel to polyfill to target specific standards or runtimes (meaning we can avoid/remove use of things that don't polyfill robustly, but otherwise target modern standards).
|
|
443
|
+
|
|
444
|
+
### Supported Tools
|
|
445
|
+
|
|
446
|
+
- TypeScript 5.4:
|
|
447
|
+
- All [`strict`](https://www.typescriptlang.org/tsconfig) options are supported.
|
|
448
|
+
- [`strictNullChecks`](https://www.typescriptlang.org/tsconfig) is required.
|
|
449
|
+
- [Configuration options deprecated in 5.0](https://github.com/microsoft/TypeScript/issues/51909) are not supported.
|
|
450
|
+
- `exactOptionalPropertyTypes` is currently not fully supported.
|
|
451
|
+
If used, narrowing members of Fluid Framework types types using `in`, `Reflect.has`, `Object.hasOwn` or `Object.prototype.hasOwnProperty` should be avoided as they may incorrectly exclude `undefined` from the possible values in some cases.
|
|
452
|
+
- [webpack](https://webpack.js.org/) 5
|
|
453
|
+
- We are not intending to be prescriptive about what bundler to use.
|
|
454
|
+
Other bundlers which can handle ES Modules should work, but webpack is the only one we actively test.
|
|
455
|
+
|
|
456
|
+
### Module Resolution
|
|
457
|
+
|
|
458
|
+
[`Node16`, `NodeNext`, or `Bundler`](https://www.typescriptlang.org/tsconfig#moduleResolution) resolution should be used with TypeScript compilerOptions to follow the [Node.js v12+ ESM Resolution and Loading algorithm](https://nodejs.github.io/nodejs.dev/en/api/v20/esm/#resolution-and-loading-algorithm).
|
|
459
|
+
Node10 resolution is not supported as it does not support Fluid Framework's API structuring pattern that is used to distinguish stable APIs from those that are in development.
|
|
460
|
+
|
|
461
|
+
### Module Formats
|
|
462
|
+
|
|
463
|
+
- ES Modules:
|
|
464
|
+
ES Modules are the preferred way to consume our client packages (including in NodeJs) and consuming our client packages from ES Modules is fully supported.
|
|
465
|
+
- CommonJs:
|
|
466
|
+
Consuming our client packages as CommonJs is supported only in NodeJS and only for the cases listed below.
|
|
467
|
+
This is done to accommodate some workflows without good ES Module support.
|
|
468
|
+
If you have a workflow you would like included in this list, file an issue.
|
|
469
|
+
Once this list of workflows motivating CommonJS support is empty, we may drop support for CommonJS one year after notice of the change is posted here.
|
|
470
|
+
|
|
471
|
+
- Testing with Jest (which lacks [stable ESM support](https://jestjs.io/docs/ecmascript-modules) due to [unstable APIs in NodeJs](https://github.com/nodejs/node/issues/37648))
|
|
472
|
+
|
|
473
|
+
## Contribution Guidelines
|
|
474
|
+
|
|
475
|
+
There are many ways to [contribute](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md) to Fluid.
|
|
476
|
+
|
|
477
|
+
- Participate in Q&A in our [GitHub Discussions](https://github.com/microsoft/FluidFramework/discussions).
|
|
478
|
+
- [Submit bugs](https://github.com/microsoft/FluidFramework/issues) and help us verify fixes as they are checked in.
|
|
479
|
+
- Review the [source code changes](https://github.com/microsoft/FluidFramework/pulls).
|
|
480
|
+
- [Contribute bug fixes](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md).
|
|
481
|
+
|
|
482
|
+
Detailed instructions for working in the repo can be found in the [Wiki](https://github.com/microsoft/FluidFramework/wiki).
|
|
483
|
+
|
|
484
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
|
485
|
+
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
486
|
+
|
|
487
|
+
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
|
|
488
|
+
Use of these trademarks or logos must follow Microsoft’s [Trademark & Brand Guidelines](https://www.microsoft.com/trademarks).
|
|
489
|
+
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
|
|
490
|
+
|
|
491
|
+
## Help
|
|
492
|
+
|
|
493
|
+
Not finding what you're looking for in this README? Check out [fluidframework.com](https://fluidframework.com/docs/).
|
|
494
|
+
|
|
495
|
+
Still not finding what you're looking for? Please [file an issue](https://github.com/microsoft/FluidFramework/wiki/Submitting-Bugs-and-Feature-Requests).
|
|
496
|
+
|
|
497
|
+
Thank you!
|
|
498
|
+
|
|
499
|
+
## Trademark
|
|
500
|
+
|
|
501
|
+
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
|
|
502
|
+
|
|
503
|
+
Use of these trademarks or logos must follow Microsoft's [Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
|
|
504
|
+
|
|
505
|
+
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
|
|
506
|
+
|
|
507
|
+
<!-- prettier-ignore-end -->
|
|
508
|
+
|
|
509
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
@@ -377,6 +377,7 @@ interface TreeArrayNodeBase<out T, in TNew, in TMoveFrom> extends ReadonlyArray<
|
|
|
377
377
|
moveToStart(sourceIndex: number, source: TMoveFrom): void;
|
|
378
378
|
removeAt(index: number): void;
|
|
379
379
|
removeRange(start?: number, end?: number): void;
|
|
380
|
+
values(): IterableIterator<T>;
|
|
380
381
|
}
|
|
381
382
|
|
|
382
383
|
// @public @sealed
|
|
@@ -377,6 +377,7 @@ interface TreeArrayNodeBase<out T, in TNew, in TMoveFrom> extends ReadonlyArray<
|
|
|
377
377
|
moveToStart(sourceIndex: number, source: TMoveFrom): void;
|
|
378
378
|
removeAt(index: number): void;
|
|
379
379
|
removeRange(start?: number, end?: number): void;
|
|
380
|
+
values(): IterableIterator<T>;
|
|
380
381
|
}
|
|
381
382
|
|
|
382
383
|
// @public @sealed
|
|
@@ -377,6 +377,7 @@ interface TreeArrayNodeBase<out T, in TNew, in TMoveFrom> extends ReadonlyArray<
|
|
|
377
377
|
moveToStart(sourceIndex: number, source: TMoveFrom): void;
|
|
378
378
|
removeAt(index: number): void;
|
|
379
379
|
removeRange(start?: number, end?: number): void;
|
|
380
|
+
values(): IterableIterator<T>;
|
|
380
381
|
}
|
|
381
382
|
|
|
382
383
|
// @public @sealed
|
package/beta.d.ts
CHANGED
package/dist/beta.d.ts
CHANGED
|
@@ -25,13 +25,16 @@ export interface IEditableForest extends IForestSubscription {
|
|
|
25
25
|
acquireVisitor(): DeltaVisitor;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
28
|
+
* Initializes the given forest with the given content.
|
|
29
|
+
* @remarks The forest must be empty when this function is called.
|
|
30
|
+
* This does not perform an edit in the typical sense.
|
|
31
|
+
* Instead, it creates a delta expressing a creation and insertion of the `content` under the {@link rootFieldKey}, and then applies the delta to the forest.
|
|
32
|
+
* If `visitAnchors` is enabled, then the delta will also be applied to the forest's {@link AnchorSet} (in which case there must be no existing anchors when this function is called).
|
|
30
33
|
*
|
|
31
34
|
* @remarks
|
|
32
35
|
* This does not perform an edit: it updates the forest content as if there was an edit that did that.
|
|
33
36
|
*/
|
|
34
|
-
export declare function initializeForest(forest: IEditableForest, content: readonly ITreeCursorSynchronous[], revisionTagCodec: RevisionTagCodec, idCompressor: IIdCompressor): void;
|
|
37
|
+
export declare function initializeForest(forest: IEditableForest, content: readonly ITreeCursorSynchronous[], revisionTagCodec: RevisionTagCodec, idCompressor: IIdCompressor, visitAnchors?: boolean): void;
|
|
35
38
|
/**
|
|
36
39
|
* Ways to refer to a node in an IEditableForest.
|
|
37
40
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editableForest.d.ts","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EACN,KAAK,MAAM,EAEX,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"editableForest.d.ts","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EACN,KAAK,MAAM,EAEX,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAK3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC3D;;;;;;;;;OASG;IACH,cAAc,IAAI,YAAY,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,SAAS,sBAAsB,EAAE,EAC1C,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,aAAa,EAC3B,YAAY,UAAQ,GAClB,IAAI,CAYN;AAID;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,uBAAuB,GAAG,MAAM,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,GAAG,KAAK,IAAI,aAAa,CAE5F;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CAChC"}
|
|
@@ -8,16 +8,26 @@ exports.isFieldLocation = exports.initializeForest = void 0;
|
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
9
|
const index_js_1 = require("../tree/index.js");
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Initializes the given forest with the given content.
|
|
12
|
+
* @remarks The forest must be empty when this function is called.
|
|
13
|
+
* This does not perform an edit in the typical sense.
|
|
14
|
+
* Instead, it creates a delta expressing a creation and insertion of the `content` under the {@link rootFieldKey}, and then applies the delta to the forest.
|
|
15
|
+
* If `visitAnchors` is enabled, then the delta will also be applied to the forest's {@link AnchorSet} (in which case there must be no existing anchors when this function is called).
|
|
13
16
|
*
|
|
14
17
|
* @remarks
|
|
15
18
|
* This does not perform an edit: it updates the forest content as if there was an edit that did that.
|
|
16
19
|
*/
|
|
17
|
-
function initializeForest(forest, content, revisionTagCodec, idCompressor) {
|
|
20
|
+
function initializeForest(forest, content, revisionTagCodec, idCompressor, visitAnchors = false) {
|
|
18
21
|
(0, internal_1.assert)(forest.isEmpty, 0x747 /* forest must be empty */);
|
|
19
22
|
const delta = (0, index_js_1.deltaForRootInitialization)(content);
|
|
20
|
-
|
|
23
|
+
let visitor = forest.acquireVisitor();
|
|
24
|
+
if (visitAnchors) {
|
|
25
|
+
(0, internal_1.assert)(forest.anchors.isEmpty(), "anchor set must be empty");
|
|
26
|
+
const anchorVisitor = forest.anchors.acquireVisitor();
|
|
27
|
+
visitor = (0, index_js_1.combineVisitors)([visitor, anchorVisitor], [anchorVisitor]);
|
|
28
|
+
}
|
|
29
|
+
(0, index_js_1.visitDelta)(delta, visitor, (0, index_js_1.makeDetachedFieldIndex)("init", revisionTagCodec, idCompressor));
|
|
30
|
+
visitor.free();
|
|
21
31
|
}
|
|
22
32
|
exports.initializeForest = initializeForest;
|
|
23
33
|
function isFieldLocation(range) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editableForest.js","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D,+
|
|
1
|
+
{"version":3,"file":"editableForest.js","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D,+CAU0B;AAuB1B;;;;;;;;;GASG;AACH,SAAgB,gBAAgB,CAC/B,MAAuB,EACvB,OAA0C,EAC1C,gBAAkC,EAClC,YAA2B,EAC3B,YAAY,GAAG,KAAK;IAEpB,IAAA,iBAAM,EAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACzD,MAAM,KAAK,GAAc,IAAA,qCAA0B,EAAC,OAAO,CAAC,CAAC;IAC7D,IAAI,OAAO,GAAG,MAAM,CAAC,cAAc,EAAE,CAAC;IACtC,IAAI,YAAY,EAAE,CAAC;QAClB,IAAA,iBAAM,EAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,0BAA0B,CAAC,CAAC;QAC7D,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QACtD,OAAO,GAAG,IAAA,0BAAe,EAAC,CAAC,OAAO,EAAE,aAAa,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,IAAA,qBAAU,EAAC,KAAK,EAAE,OAAO,EAAE,IAAA,iCAAsB,EAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC;IAC3F,OAAO,CAAC,IAAI,EAAE,CAAC;AAChB,CAAC;AAlBD,4CAkBC;AAkBD,SAAgB,eAAe,CAAC,KAAoC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AAClC,CAAC;AAFD,0CAEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { RevisionTagCodec } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\nimport {\n\ttype Anchor,\n\ttype DeltaRoot,\n\ttype DeltaVisitor,\n\ttype DetachedField,\n\ttype ITreeCursorSynchronous,\n\tcombineVisitors,\n\tdeltaForRootInitialization,\n\tmakeDetachedFieldIndex,\n\tvisitDelta,\n} from \"../tree/index.js\";\n\nimport type { IForestSubscription, ITreeSubscriptionCursor } from \"./forest.js\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\n/**\n * Editing APIs.\n * @internal\n */\nexport interface IEditableForest extends IForestSubscription {\n\t/**\n\t * Provides a visitor that can be used to mutate the forest.\n\t *\n\t * @returns a visitor that can be used to mutate the forest.\n\t *\n\t * @remarks\n\t * Mutating the forest does NOT update anchors.\n\t * The visitor must be released after use by calling {@link DeltaVisitor.free} on it.\n\t * It is invalid to acquire a visitor without releasing the previous one.\n\t */\n\tacquireVisitor(): DeltaVisitor;\n}\n\n/**\n * Initializes the given forest with the given content.\n * @remarks The forest must be empty when this function is called.\n * This does not perform an edit in the typical sense.\n * Instead, it creates a delta expressing a creation and insertion of the `content` under the {@link rootFieldKey}, and then applies the delta to the forest.\n * If `visitAnchors` is enabled, then the delta will also be applied to the forest's {@link AnchorSet} (in which case there must be no existing anchors when this function is called).\n *\n * @remarks\n * This does not perform an edit: it updates the forest content as if there was an edit that did that.\n */\nexport function initializeForest(\n\tforest: IEditableForest,\n\tcontent: readonly ITreeCursorSynchronous[],\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n\tvisitAnchors = false,\n): void {\n\tassert(forest.isEmpty, 0x747 /* forest must be empty */);\n\tconst delta: DeltaRoot = deltaForRootInitialization(content);\n\tlet visitor = forest.acquireVisitor();\n\tif (visitAnchors) {\n\t\tassert(forest.anchors.isEmpty(), \"anchor set must be empty\");\n\t\tconst anchorVisitor = forest.anchors.acquireVisitor();\n\t\tvisitor = combineVisitors([visitor, anchorVisitor], [anchorVisitor]);\n\t}\n\n\tvisitDelta(delta, visitor, makeDetachedFieldIndex(\"init\", revisionTagCodec, idCompressor));\n\tvisitor.free();\n}\n\n// TODO: Types below here may be useful for input into edit building APIs, but are no longer used here directly.\n\n/**\n * Ways to refer to a node in an IEditableForest.\n * @internal\n */\nexport type ForestLocation = ITreeSubscriptionCursor | Anchor;\n\n/**\n * @internal\n */\nexport interface TreeLocation {\n\treadonly range: FieldLocation | DetachedField;\n\treadonly index: number;\n}\n\nexport function isFieldLocation(range: FieldLocation | DetachedField): range is FieldLocation {\n\treturn typeof range === \"object\";\n}\n\n/**\n * Location of a field within a tree that is not a detached/root field.\n * @internal\n */\nexport interface FieldLocation {\n\treadonly key: FieldKey;\n\treadonly parent: ForestLocation;\n}\n"]}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { EmptyKey, type TreeType, type Value, type TreeValue, AnchorSet, type De
|
|
|
6
6
|
export { TreeNavigationResult, type IEditableForest, type IForestSubscription, type TreeLocation, type FieldLocation, type ForestLocation, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, initializeForest, type FieldAnchor, moveToDetachedField, type ForestEvents, } from "./forest/index.js";
|
|
7
7
|
export { type FieldKey, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type TreeStoredSchemaSubscription as TreeStoredSchemaSubscription, type MutableTreeStoredSchema, type FieldKindIdentifier, type FieldKindData, type TreeTypeSet, type TreeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, type SchemaEvents, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, type StoredSchemaCollection, schemaFormat, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, toTreeNodeSchemaDataFormat, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, type ErasedTreeNodeSchemaDataFormat, type SchemaAndPolicy, Multiplicity, type SchemaPolicy, } from "./schema-stored/index.js";
|
|
8
8
|
export { type ChangeFamily, type ChangeFamilyCodec, type ChangeEncodingContext, type ChangeFamilyEditor, EditBuilder, } from "./change-family/index.js";
|
|
9
|
-
export { areEqualChangeAtomIds, makeChangeAtomId, asChangeAtomId, type ChangeRebaser, findAncestor, findCommonAncestor, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, RevisionTagCodec, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, type TaggedChange, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, type RevisionMetadataSource, revisionMetadataSourceFromInfo, type RevisionInfo, type EncodedRevisionTag, type EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, } from "./rebase/index.js";
|
|
9
|
+
export { areEqualChangeAtomIds, makeChangeAtomId, asChangeAtomId, type ChangeRebaser, findAncestor, findCommonAncestor, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, RevisionTagCodec, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, type TaggedChange, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, type RevisionMetadataSource, revisionMetadataSourceFromInfo, type RevisionInfo, type EncodedRevisionTag, type EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, getFromChangeAtomIdMap, setInChangeAtomIdMap, replaceChange, type RebaseStats, type RebaseStatsWithDuration, } from "./rebase/index.js";
|
|
10
10
|
export { type Adapters, AdaptedViewSchema, Compatibility, type TreeAdapter, AllowedUpdateType, } from "./schema-view/index.js";
|
|
11
11
|
export { type Revertible, RevertibleStatus } from "./revertible/index.js";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAw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ACb,iBAAiB,EACjB,aAAa,EACb,KAAK,WAAW,EAChB,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,KAAK,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,KAAK,OAAO,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,KAAK,cAAc,EACnB,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,E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e,EACpB,YAAY,EACZ,KAAK,YAAY,GACjB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,WAAW,GACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,KAAK,aAAa,EAClB,YAAY,EACZ,kBAAkB,EAClB,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,uBAAuB,GAC5B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,iBAAiB,EACjB,aAAa,EACb,KAAK,WAAW,EAChB,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,KAAK,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.ValueSchema = exports.moveToDetachedField = exports.initializeForest = exports.ITreeSubscriptionCursorState = exports.TreeNavigationResult = exports.aboveRootPlaceholder = exports.getDetachedFieldContainingPath = exports.DetachedFieldIndex = exports.isCursor = exports.CursorMarker = exports.inCursorNode = exports.inCursorField = exports.anchorSlot = exports.emptyDelta = exports.offsetDetachId = exports.makeDetachedNodeId = exports.isEmptyFieldChanges = exports.emptyFieldChanges = exports.deltaForRootInitialization = exports.forEachField = exports.forEachNodeInSubtree = exports.forEachNode = exports.compareFieldUpPaths = exports.topDownPath = exports.clonePath = exports.compareUpPaths = exports.getDescendant = exports.SparseNode = exports.setGenericTreeField = exports.makeDetachedFieldIndex = exports.applyDelta = exports.announceDelta = exports.combineVisitors = exports.visitDelta = exports.keyAsDetachedField = exports.detachedFieldAsKey = exports.iterateCursorField = exports.mapCursorFields = exports.mapCursorField = exports.getDepth = exports.genericTreeDeleteIfEmpty = exports.getGenericTreeField = exports.genericTreeKeys = exports.castCursorToSynchronous = exports.CursorLocationType = exports.rootField = exports.rootFieldKey = exports.EncodedJsonableTree = exports.AnchorSet = exports.EmptyKey = void 0;
|
|
8
|
-
exports.RevertibleStatus = exports.AllowedUpdateType = exports.Compatibility = exports.AdaptedViewSchema = exports.replaceChange = exports.replaceAtomRevisions = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.mintCommit = exports.SessionIdSchema = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.RevisionTagCodec = exports.RevisionTagSchema = exports.CommitKind = exports.findCommonAncestor = exports.findAncestor = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIds = exports.EditBuilder = exports.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchema = exports.decodeFieldSchema = exports.toTreeNodeSchemaDataFormat = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormat = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = void 0;
|
|
8
|
+
exports.RevertibleStatus = exports.AllowedUpdateType = exports.Compatibility = exports.AdaptedViewSchema = exports.replaceChange = exports.setInChangeAtomIdMap = exports.getFromChangeAtomIdMap = exports.replaceAtomRevisions = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.mintCommit = exports.SessionIdSchema = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.RevisionTagCodec = exports.RevisionTagSchema = exports.CommitKind = exports.findCommonAncestor = exports.findAncestor = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIds = exports.EditBuilder = exports.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchema = exports.decodeFieldSchema = exports.toTreeNodeSchemaDataFormat = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormat = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = void 0;
|
|
9
9
|
var index_js_1 = require("./tree/index.js");
|
|
10
10
|
Object.defineProperty(exports, "EmptyKey", { enumerable: true, get: function () { return index_js_1.EmptyKey; } });
|
|
11
11
|
Object.defineProperty(exports, "AnchorSet", { enumerable: true, get: function () { return index_js_1.AnchorSet; } });
|
|
@@ -99,6 +99,8 @@ Object.defineProperty(exports, "taggedAtomId", { enumerable: true, get: function
|
|
|
99
99
|
Object.defineProperty(exports, "taggedOptAtomId", { enumerable: true, get: function () { return index_js_5.taggedOptAtomId; } });
|
|
100
100
|
Object.defineProperty(exports, "offsetChangeAtomId", { enumerable: true, get: function () { return index_js_5.offsetChangeAtomId; } });
|
|
101
101
|
Object.defineProperty(exports, "replaceAtomRevisions", { enumerable: true, get: function () { return index_js_5.replaceAtomRevisions; } });
|
|
102
|
+
Object.defineProperty(exports, "getFromChangeAtomIdMap", { enumerable: true, get: function () { return index_js_5.getFromChangeAtomIdMap; } });
|
|
103
|
+
Object.defineProperty(exports, "setInChangeAtomIdMap", { enumerable: true, get: function () { return index_js_5.setInChangeAtomIdMap; } });
|
|
102
104
|
Object.defineProperty(exports, "replaceChange", { enumerable: true, get: function () { return index_js_5.replaceChange; } });
|
|
103
105
|
var index_js_6 = require("./schema-view/index.js");
|
|
104
106
|
Object.defineProperty(exports, "AdaptedViewSchema", { enumerable: true, get: function () { return index_js_6.AdaptedViewSchema; } });
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,4CA6FyB;AA5FxB,oGAAA,QAAQ,OAAA;AAIR,qGAAA,SAAS,OAAA;AAmBT,+GAAA,mBAAmB,OAAA;AACnB,wGAAA,YAAY,OAAA;AACZ,qGAAA,SAAS,OAAA;AAET,8GAAA,kBAAkB,OAAA;AAElB,mHAAA,uBAAuB,OAAA;AAGvB,2GAAA,eAAe,OAAA;AACf,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,oGAAA,QAAQ,OAAA;AACR,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAElB,8GAAA,kBAAkB,OAAA;AAClB,8GAAA,kBAAkB,OAAA;AAClB,sGAAA,UAAU,OAAA;AACV,2GAAA,eAAe,OAAA;AACf,yGAAA,aAAa,OAAA;AACb,sGAAA,UAAU,OAAA;AACV,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AAInB,sGAAA,UAAU,OAAA;AACV,yGAAA,aAAa,OAAA;AACb,0GAAA,cAA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AA,sBAAsB,OAAA;AACtB,gHAAA,oBAAoB,OAAA;AACpB,yGAAA,aAAa,OAAA;AAKd,mDAMgC;AAJ/B,6GAAA,iBAAiB,OAAA;AACjB,yGAAA,aAAa,OAAA;AAEb,6GAAA,iBAAiB,OAAA;AAGlB,kDAA0E;AAAhD,4GAAA,gBAAgB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype DetachedPlaceUpPath,\n\ttype DetachedRangeUpPath,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\tEncodedJsonableTree,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\tcastCursorToSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tgenericTreeDeleteIfEmpty,\n\tgetDepth,\n\tmapCursorField,\n\tmapCursorFields,\n\titerateCursorField,\n\ttype MapTree,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\tvisitDelta,\n\tcombineVisitors,\n\tannounceDelta,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tsetGenericTreeField,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\ttype PathVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\temptyFieldChanges,\n\tisEmptyFieldChanges,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaProtoNode,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n} from \"./tree/index.js\";\n\nexport {\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\tinitializeForest,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest/index.js\";\n\nexport {\n\ttype FieldKey,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription as TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype FieldKindData,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tschemaFormat,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\ttoTreeNodeSchemaDataFormat,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tstoredSchemaDecodeDispatcher,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\n} from \"./schema-stored/index.js\";\n\nexport {\n\ttype ChangeFamily,\n\ttype ChangeFamilyCodec,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamilyEditor,\n\tEditBuilder,\n} from \"./change-family/index.js\";\n\nexport {\n\tareEqualChangeAtomIds,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\ttype ChangeRebaser,\n\tfindAncestor,\n\tfindCommonAncestor,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tRevisionTagCodec,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\tSessionIdSchema,\n\tmintCommit,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\ttype RevisionMetadataSource,\n\trevisionMetadataSourceFromInfo,\n\ttype RevisionInfo,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\treplaceAtomRevisions,\n\tgetFromChangeAtomIdMap,\n\tsetInChangeAtomIdMap,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\tCompatibility,\n\ttype TreeAdapter,\n\tAllowedUpdateType,\n} from \"./schema-view/index.js\";\n\nexport { type Revertible, RevertibleStatus } from \"./revertible/index.js\";\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { areEqualChangeAtomIds, makeChangeAtomId, asChangeAtomId, mintCommit, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, type EncodedRevisionTag, type EncodedChangeAtomId, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, SessionIdSchema, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, } from "./types.js";
|
|
5
|
+
export { areEqualChangeAtomIds, makeChangeAtomId, asChangeAtomId, mintCommit, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, type EncodedRevisionTag, type EncodedChangeAtomId, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, SessionIdSchema, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, getFromChangeAtomIdMap, setInChangeAtomIdMap, replaceChange, } from "./types.js";
|
|
6
6
|
export { RevisionTagCodec } from "./revisionTagCodec.js";
|
|
7
7
|
export { type ChangeRebaser, type FinalChange, FinalChangeStatus, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, type TaggedChange, type RevisionMetadataSource, type RevisionInfo, } from "./changeRebaser.js";
|
|
8
8
|
export { findAncestor, findCommonAncestor, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, revisionMetadataSourceFromInfo, type RebaseStats, type RebaseStatsWithDuration, } from "./utils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,8BAA8B,EAC9B,KAAK,WAAW,EAChB,KAAK,uBAAuB,GAC5B,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,8BAA8B,EAC9B,KAAK,WAAW,EAChB,KAAK,uBAAuB,GAC5B,MAAM,YAAY,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.findCommonAncestor = exports.findAncestor = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.FinalChangeStatus = exports.RevisionTagCodec = exports.replaceChange = exports.replaceAtomRevisions = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.SessionIdSchema = exports.RevisionTagSchema = exports.CommitKind = exports.mintCommit = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIds = void 0;
|
|
7
|
+
exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.findCommonAncestor = exports.findAncestor = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.FinalChangeStatus = exports.RevisionTagCodec = exports.replaceChange = exports.setInChangeAtomIdMap = exports.getFromChangeAtomIdMap = exports.replaceAtomRevisions = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.SessionIdSchema = exports.RevisionTagSchema = exports.CommitKind = exports.mintCommit = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIds = void 0;
|
|
8
8
|
var types_js_1 = require("./types.js");
|
|
9
9
|
Object.defineProperty(exports, "areEqualChangeAtomIds", { enumerable: true, get: function () { return types_js_1.areEqualChangeAtomIds; } });
|
|
10
10
|
Object.defineProperty(exports, "makeChangeAtomId", { enumerable: true, get: function () { return types_js_1.makeChangeAtomId; } });
|
|
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "taggedAtomId", { enumerable: true, get: function
|
|
|
17
17
|
Object.defineProperty(exports, "taggedOptAtomId", { enumerable: true, get: function () { return types_js_1.taggedOptAtomId; } });
|
|
18
18
|
Object.defineProperty(exports, "offsetChangeAtomId", { enumerable: true, get: function () { return types_js_1.offsetChangeAtomId; } });
|
|
19
19
|
Object.defineProperty(exports, "replaceAtomRevisions", { enumerable: true, get: function () { return types_js_1.replaceAtomRevisions; } });
|
|
20
|
+
Object.defineProperty(exports, "getFromChangeAtomIdMap", { enumerable: true, get: function () { return types_js_1.getFromChangeAtomIdMap; } });
|
|
21
|
+
Object.defineProperty(exports, "setInChangeAtomIdMap", { enumerable: true, get: function () { return types_js_1.setInChangeAtomIdMap; } });
|
|
20
22
|
Object.defineProperty(exports, "replaceChange", { enumerable: true, get: function () { return types_js_1.replaceChange; } });
|
|
21
23
|
var revisionTagCodec_js_1 = require("./revisionTagCodec.js");
|
|
22
24
|
Object.defineProperty(exports, "RevisionTagCodec", { enumerable: true, get: function () { return revisionTagCodec_js_1.RevisionTagCodec; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAuBoB;AAtBnB,iHAAA,qBAAqB,OAAA;AACrB,4GAAA,gBAAgB,OAAA;AAChB,0GAAA,cAAc,OAAA;AACd,sGAAA,UAAU,OAAA;AAEV,sGAAA,UAAU,OAAA;AAGV,6GAAA,iBAAiB,OAAA;AAMjB,2GAAA,eAAe,OAAA;AACf,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,gHAAA,oBAAoB,OAAA;AACpB,kHAAA,sBAAsB,OAAA;AACtB,gHAAA,oBAAoB,OAAA;AACpB,yGAAA,aAAa,OAAA;AAEd,6DAAyD;AAAhD,uHAAA,gBAAgB,OAAA;AACzB,uDAW4B;AAR3B,qHAAA,iBAAiB,OAAA;AACjB,kHAAA,cAAc,OAAA;AACd,6GAAA,SAAS,OAAA;AACT,mHAAA,eAAe,OAAA;AACf,sHAAA,kBAAkB,OAAA;AAKnB,uCAUoB;AATnB,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAClB,wGAAA,YAAY,OAAA;AAEZ,wGAAA,YAAY,OAAA;AACZ,mHAAA,uBAAuB,OAAA;AACvB,0HAAA,8BAA8B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tareEqualChangeAtomIds,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\tmintCommit,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\tSessionIdSchema,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\treplaceAtomRevisions,\n\tgetFromChangeAtomIdMap,\n\tsetInChangeAtomIdMap,\n\treplaceChange,\n} from \"./types.js\";\nexport { RevisionTagCodec } from \"./revisionTagCodec.js\";\nexport {\n\ttype ChangeRebaser,\n\ttype FinalChange,\n\tFinalChangeStatus,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\ttype TaggedChange,\n\ttype RevisionMetadataSource,\n\ttype RevisionInfo,\n} from \"./changeRebaser.js\";\nexport {\n\tfindAncestor,\n\tfindCommonAncestor,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\trevisionMetadataSourceFromInfo,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n} from \"./utils.js\";\n"]}
|
|
@@ -50,6 +50,8 @@ export type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | Chang
|
|
|
50
50
|
* @internal
|
|
51
51
|
*/
|
|
52
52
|
export type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;
|
|
53
|
+
export declare function getFromChangeAtomIdMap<T>(map: ChangeAtomIdMap<T>, id: ChangeAtomId): T | undefined;
|
|
54
|
+
export declare function setInChangeAtomIdMap<T>(map: ChangeAtomIdMap<T>, id: ChangeAtomId, value: T): void;
|
|
53
55
|
/**
|
|
54
56
|
* @internal
|
|
55
57
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,mBAAmB,EACnB,SAAS,EACT,wBAAwB,EACxB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACN,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,mBAAmB,EACnB,SAAS,EACT,wBAAwB,EACxB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACN,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,QAAQ,EAMb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;GAEG;AACH,e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;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AAGH,wBAAgB,UAAU,CAAC,OAAO,EACjC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAC5B,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,GAC1C,WAAW,CAAC,OAAO,CAAC,CAOtB;AAED,wBAAgB,aAAa,CAAC,OAAO,EACpC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAC5B,MAAM,EAAE,OAAO,GACb,WAAW,CAAC,OAAO,CAAC,CAItB"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.replaceChange = exports.mintCommit = exports.CommitKind = exports.replaceAtomRevisions = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIds = exports.RevisionTagSchema = exports.SessionIdSchema = void 0;
|
|
7
|
+
exports.replaceChange = exports.mintCommit = exports.CommitKind = exports.replaceAtomRevisions = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIds = exports.setInChangeAtomIdMap = exports.getFromChangeAtomIdMap = exports.RevisionTagSchema = exports.SessionIdSchema = void 0;
|
|
8
8
|
const typebox_1 = require("@sinclair/typebox");
|
|
9
9
|
const index_js_1 = require("../../util/index.js");
|
|
10
10
|
/**
|
|
@@ -15,6 +15,14 @@ exports.RevisionTagSchema = typebox_1.Type.Union([
|
|
|
15
15
|
typebox_1.Type.Literal("root"),
|
|
16
16
|
(0, index_js_1.brandedNumberType)(),
|
|
17
17
|
]);
|
|
18
|
+
function getFromChangeAtomIdMap(map, id) {
|
|
19
|
+
return (0, index_js_1.tryGetFromNestedMap)(map, id.revision, id.localId);
|
|
20
|
+
}
|
|
21
|
+
exports.getFromChangeAtomIdMap = getFromChangeAtomIdMap;
|
|
22
|
+
function setInChangeAtomIdMap(map, id, value) {
|
|
23
|
+
(0, index_js_1.setInNestedMap)(map, id.revision, id.localId, value);
|
|
24
|
+
}
|
|
25
|
+
exports.setInChangeAtomIdMap = setInChangeAtomIdMap;
|
|
18
26
|
/**
|
|
19
27
|
* @returns true iff `a` and `b` are the same.
|
|
20
28
|
*/
|