@fluidframework/tree 2.3.0-288113 → 2.3.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/.dependency-cruiser-known-violations.json +28 -40
- package/.vscode/Tree.code-workspace +0 -2
- package/CHANGELOG.md +92 -0
- package/README.md +6 -0
- package/alpha.d.ts +11 -0
- package/api-extractor/api-extractor-lint-alpha.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-alpha.esm.json +5 -0
- package/api-extractor/api-extractor-lint-legacy.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-legacy.esm.json +5 -0
- package/api-extractor/api-extractor.current.json +8 -0
- package/api-extractor/api-extractor.legacy.json +4 -0
- package/api-extractor.json +1 -1
- package/api-report/tree.alpha.api.md +21 -42
- package/api-report/tree.beta.api.md +21 -11
- package/api-report/tree.legacy.alpha.api.md +562 -0
- package/api-report/tree.legacy.public.api.md +559 -0
- package/api-report/tree.public.api.md +8 -13
- package/dist/alpha.d.ts +102 -0
- package/dist/beta.d.ts +6 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/{revertible/revertible.d.ts → revertible.d.ts} +12 -0
- package/dist/core/revertible.d.ts.map +1 -0
- package/dist/core/revertible.js.map +1 -0
- package/dist/core/schema-stored/format.d.ts +3 -3
- package/dist/core/schema-stored/format.js +1 -1
- package/dist/core/schema-stored/format.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +2 -7
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +4 -6
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +6 -2
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +0 -1
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +1 -0
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +7 -2
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/events/emitter.d.ts +127 -0
- package/dist/events/emitter.d.ts.map +1 -0
- package/dist/events/{events.js → emitter.js} +48 -30
- package/dist/events/emitter.js.map +1 -0
- package/dist/events/index.d.ts +2 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +4 -5
- package/dist/events/index.js.map +1 -1
- package/dist/events/interop.d.ts +36 -0
- package/dist/events/interop.d.ts.map +1 -0
- package/dist/{core/revertible/index.d.ts → events/interop.js} +3 -2
- package/dist/events/interop.js.map +1 -0
- package/dist/events/listeners.d.ts +65 -0
- package/dist/events/listeners.d.ts.map +1 -0
- package/{lib/core/revertible/index.d.ts → dist/events/listeners.js} +3 -2
- package/dist/events/listeners.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +25 -7
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +36 -15
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +4 -2
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +12 -5
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +15 -2
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +28 -2
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +5 -4
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/flex-map-tree/index.d.ts +1 -1
- package/dist/feature-libraries/flex-map-tree/index.d.ts.map +1 -1
- package/dist/feature-libraries/flex-map-tree/index.js +2 -1
- package/dist/feature-libraries/flex-map-tree/index.js.map +1 -1
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts +35 -33
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.js +82 -103
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts +30 -14
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +10 -7
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +57 -190
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js +15 -3
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts +2 -3
- 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/lazyEntity.d.ts +3 -3
- package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.js +2 -10
- package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +26 -28
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +11 -14
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts +5 -26
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +23 -74
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/unboxed.d.ts +4 -16
- package/dist/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/unboxed.js +7 -41
- package/dist/feature-libraries/flex-tree/unboxed.js.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.d.ts +2 -2
- package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.js +3 -6
- package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +4 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +3 -5
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +5 -11
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.js +3 -6
- package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/dist/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/discrepancies.js +3 -13
- package/dist/feature-libraries/modular-schema/discrepancies.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +4 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +12 -5
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +6 -6
- package/dist/feature-libraries/schema-index/format.d.ts +3 -3
- package/dist/feature-libraries/storedToViewSchema.d.ts.map +1 -1
- package/dist/feature-libraries/storedToViewSchema.js +2 -4
- package/dist/feature-libraries/storedToViewSchema.js.map +1 -1
- package/dist/feature-libraries/typed-schema/flexList.d.ts +3 -3
- package/dist/feature-libraries/typed-schema/flexList.js.map +1 -1
- package/dist/feature-libraries/typed-schema/index.d.ts +2 -2
- package/dist/feature-libraries/typed-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/index.js +2 -2
- package/dist/feature-libraries/typed-schema/index.js.map +1 -1
- package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/schemaCollection.js +8 -10
- package/dist/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +17 -48
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js +5 -37
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/dist/feature-libraries/typed-schema/view.d.ts +4 -6
- package/dist/feature-libraries/typed-schema/view.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/view.js +5 -4
- package/dist/feature-libraries/typed-schema/view.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -36
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +83 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +0 -1
- package/dist/shared-tree/checkoutFlexTreeView.d.ts +53 -0
- package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -0
- package/dist/shared-tree/{treeView.js → checkoutFlexTreeView.js} +28 -6
- package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -0
- package/dist/shared-tree/index.d.ts +3 -3
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +2 -2
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts +15 -4
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +7 -8
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +9 -4
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +25 -12
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +2 -2
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +3 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js +6 -2
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +3 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +3 -2
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts +2 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +2 -2
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/dist/shared-tree/treeApi.d.ts +1 -3
- package/dist/shared-tree/treeApi.d.ts.map +1 -1
- package/dist/shared-tree/treeApi.js +6 -4
- package/dist/shared-tree/treeApi.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +2 -13
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +17 -1
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.js +1 -1
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js +1 -1
- package/dist/simple-tree/api/create.js.map +1 -1
- package/{lib/simple-tree → dist/simple-tree/api}/getJsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -0
- package/dist/simple-tree/{getJsonSchema.js → api/getJsonSchema.js} +1 -1
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -0
- package/{lib/simple-tree → dist/simple-tree/api}/getSimpleSchema.d.ts +1 -1
- package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -0
- package/dist/simple-tree/{getSimpleSchema.js → api/getSimpleSchema.js} +1 -1
- package/dist/simple-tree/api/getSimpleSchema.js.map +1 -0
- package/dist/simple-tree/api/index.d.ts +5 -0
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +7 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/{lib/simple-tree → dist/simple-tree/api}/jsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/jsonSchema.d.ts.map +1 -0
- package/dist/simple-tree/api/jsonSchema.js.map +1 -0
- package/dist/simple-tree/api/schemaFactory.d.ts +45 -14
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +43 -12
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/{simpleSchema.d.ts → api/simpleSchema.d.ts} +4 -4
- package/dist/simple-tree/api/simpleSchema.d.ts.map +1 -0
- package/dist/simple-tree/api/simpleSchema.js.map +1 -0
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -0
- package/dist/simple-tree/{simpleSchemaToJsonSchema.js → api/simpleSchemaToJsonSchema.js} +4 -4
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -0
- package/dist/simple-tree/api/tree.d.ts +1 -21
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js +3 -38
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/treeApiBeta.d.ts +79 -0
- package/dist/simple-tree/api/treeApiBeta.d.ts.map +1 -0
- package/dist/simple-tree/api/treeApiBeta.js +26 -0
- package/dist/simple-tree/api/treeApiBeta.js.map +1 -0
- package/dist/simple-tree/api/treeNodeApi.d.ts +1 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js +21 -19
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/api/verboseTree.js +2 -2
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/dist/simple-tree/{viewSchemaToSimpleSchema.d.ts → api/viewSchemaToSimpleSchema.d.ts} +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -0
- package/dist/simple-tree/{viewSchemaToSimpleSchema.js → api/viewSchemaToSimpleSchema.js} +4 -4
- package/{lib/simple-tree → dist/simple-tree/api}/viewSchemaToSimpleSchema.js.map +1 -1
- package/dist/simple-tree/arrayNode.d.ts +2 -2
- package/dist/simple-tree/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/arrayNode.js +30 -21
- package/dist/simple-tree/arrayNode.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +3 -3
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +4 -1
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/schemaCaching.d.ts +5 -0
- package/dist/simple-tree/core/schemaCaching.d.ts.map +1 -1
- package/dist/simple-tree/core/schemaCaching.js +10 -1
- package/dist/simple-tree/core/schemaCaching.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +61 -3
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +166 -13
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/core/types.d.ts +17 -20
- package/dist/simple-tree/core/types.d.ts.map +1 -1
- package/dist/simple-tree/core/types.js.map +1 -1
- package/dist/simple-tree/core/withType.d.ts +3 -2
- package/dist/simple-tree/core/withType.d.ts.map +1 -1
- package/dist/simple-tree/core/withType.js.map +1 -1
- package/dist/simple-tree/index.d.ts +7 -9
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +15 -6
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +7 -9
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +13 -11
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/mapNode.d.ts +1 -1
- package/dist/simple-tree/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/mapNode.js +38 -29
- package/dist/simple-tree/mapNode.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts +9 -7
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +37 -31
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/proxies.d.ts +1 -14
- package/dist/simple-tree/proxies.d.ts.map +1 -1
- package/dist/simple-tree/proxies.js +12 -15
- package/dist/simple-tree/proxies.js.map +1 -1
- package/dist/simple-tree/proxyBinding.d.ts +2 -62
- package/dist/simple-tree/proxyBinding.d.ts.map +1 -1
- package/dist/simple-tree/proxyBinding.js +8 -181
- package/dist/simple-tree/proxyBinding.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +7 -7
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js +4 -4
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/toFlexSchema.d.ts +11 -1
- package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/dist/simple-tree/toFlexSchema.js +54 -31
- package/dist/simple-tree/toFlexSchema.js.map +1 -1
- package/dist/simple-tree/toMapTree.d.ts +25 -37
- package/dist/simple-tree/toMapTree.d.ts.map +1 -1
- package/dist/simple-tree/toMapTree.js +53 -16
- package/dist/simple-tree/toMapTree.js.map +1 -1
- package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
- package/dist/simple-tree/treeNodeValid.js +7 -10
- package/dist/simple-tree/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/typesUnsafe.d.ts +13 -13
- package/dist/simple-tree/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/walkSchema.d.ts +26 -0
- package/dist/simple-tree/walkSchema.d.ts.map +1 -0
- package/dist/simple-tree/walkSchema.js +49 -0
- package/dist/simple-tree/walkSchema.js.map +1 -0
- package/dist/treeFactory.d.ts +2 -1
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +2 -1
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/typeUtils.d.ts +2 -2
- package/dist/util/typeUtils.js.map +1 -1
- package/legacy.d.ts +11 -0
- package/lib/alpha.d.ts +102 -0
- package/lib/beta.d.ts +6 -2
- 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/{revertible/revertible.d.ts → revertible.d.ts} +12 -0
- package/lib/core/revertible.d.ts.map +1 -0
- package/lib/core/revertible.js.map +1 -0
- package/lib/core/schema-stored/format.d.ts +3 -3
- package/lib/core/schema-stored/format.js +1 -1
- package/lib/core/schema-stored/format.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +2 -7
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +4 -6
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +6 -2
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +0 -1
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +1 -0
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +7 -2
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/events/emitter.d.ts +127 -0
- package/lib/events/emitter.d.ts.map +1 -0
- package/lib/events/{events.js → emitter.js} +48 -29
- package/lib/events/emitter.js.map +1 -0
- package/lib/events/index.d.ts +2 -1
- package/lib/events/index.d.ts.map +1 -1
- package/lib/events/index.js +1 -1
- package/lib/events/index.js.map +1 -1
- package/lib/events/interop.d.ts +36 -0
- package/lib/events/interop.d.ts.map +1 -0
- package/{src/core/revertible/index.ts → lib/events/interop.js} +2 -2
- package/lib/events/interop.js.map +1 -0
- package/lib/events/listeners.d.ts +65 -0
- package/lib/events/listeners.d.ts.map +1 -0
- package/lib/{core/revertible/index.js → events/listeners.js} +2 -2
- package/lib/events/listeners.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +25 -7
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +37 -16
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +4 -2
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +12 -5
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +15 -2
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js +28 -2
- package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +5 -4
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/flex-map-tree/index.d.ts +1 -1
- package/lib/feature-libraries/flex-map-tree/index.d.ts.map +1 -1
- package/lib/feature-libraries/flex-map-tree/index.js +1 -1
- package/lib/feature-libraries/flex-map-tree/index.js.map +1 -1
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts +35 -33
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.js +83 -104
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts +30 -14
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +10 -7
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +57 -190
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js +15 -2
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts +2 -3
- package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/index.js +1 -1
- package/lib/feature-libraries/flex-tree/index.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +3 -3
- package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.js +2 -10
- package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +26 -28
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +11 -13
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts +5 -26
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +23 -72
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/flex-tree/unboxed.d.ts +4 -16
- package/lib/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/unboxed.js +5 -37
- package/lib/feature-libraries/flex-tree/unboxed.js.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.d.ts +2 -2
- package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.js +3 -6
- package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +4 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +3 -5
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +5 -5
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.js +3 -6
- package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/lib/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/discrepancies.js +3 -13
- package/lib/feature-libraries/modular-schema/discrepancies.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +4 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +12 -5
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +6 -6
- package/lib/feature-libraries/schema-index/format.d.ts +3 -3
- package/lib/feature-libraries/storedToViewSchema.d.ts.map +1 -1
- package/lib/feature-libraries/storedToViewSchema.js +3 -5
- package/lib/feature-libraries/storedToViewSchema.js.map +1 -1
- package/lib/feature-libraries/typed-schema/flexList.d.ts +3 -3
- package/lib/feature-libraries/typed-schema/flexList.js.map +1 -1
- package/lib/feature-libraries/typed-schema/index.d.ts +2 -2
- package/lib/feature-libraries/typed-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/index.js +2 -2
- package/lib/feature-libraries/typed-schema/index.js.map +1 -1
- package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/schemaCollection.js +9 -11
- package/lib/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +17 -48
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js +5 -36
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/lib/feature-libraries/typed-schema/view.d.ts +4 -6
- package/lib/feature-libraries/typed-schema/view.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/view.js +5 -4
- package/lib/feature-libraries/typed-schema/view.js.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -5
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +83 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +0 -1
- package/lib/shared-tree/checkoutFlexTreeView.d.ts +53 -0
- package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -0
- package/lib/shared-tree/{treeView.js → checkoutFlexTreeView.js} +26 -5
- package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -0
- package/lib/shared-tree/index.d.ts +3 -3
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts +15 -4
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +8 -9
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +9 -4
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +26 -13
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +2 -2
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +3 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +6 -2
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +3 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +3 -2
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts +2 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +2 -2
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/shared-tree/treeApi.d.ts +1 -3
- package/lib/shared-tree/treeApi.d.ts.map +1 -1
- package/lib/shared-tree/treeApi.js +7 -5
- package/lib/shared-tree/treeApi.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +2 -13
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +18 -2
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.js +1 -1
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js +2 -2
- package/lib/simple-tree/api/create.js.map +1 -1
- package/{dist/simple-tree → lib/simple-tree/api}/getJsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -0
- package/lib/simple-tree/{getJsonSchema.js → api/getJsonSchema.js} +1 -1
- package/lib/simple-tree/api/getJsonSchema.js.map +1 -0
- package/{dist/simple-tree → lib/simple-tree/api}/getSimpleSchema.d.ts +1 -1
- package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -0
- package/lib/simple-tree/{getSimpleSchema.js → api/getSimpleSchema.js} +1 -1
- package/lib/simple-tree/api/getSimpleSchema.js.map +1 -0
- package/lib/simple-tree/api/index.d.ts +5 -0
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +3 -0
- package/lib/simple-tree/api/index.js.map +1 -1
- package/{dist/simple-tree → lib/simple-tree/api}/jsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/jsonSchema.d.ts.map +1 -0
- package/lib/simple-tree/api/jsonSchema.js.map +1 -0
- package/lib/simple-tree/api/schemaFactory.d.ts +45 -14
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +43 -12
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/{simpleSchema.d.ts → api/simpleSchema.d.ts} +4 -4
- package/lib/simple-tree/api/simpleSchema.d.ts.map +1 -0
- package/lib/simple-tree/api/simpleSchema.js.map +1 -0
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -0
- package/lib/simple-tree/{simpleSchemaToJsonSchema.js → api/simpleSchemaToJsonSchema.js} +4 -4
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -0
- package/lib/simple-tree/api/tree.d.ts +1 -21
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js +2 -34
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/treeApiBeta.d.ts +79 -0
- package/lib/simple-tree/api/treeApiBeta.d.ts.map +1 -0
- package/lib/simple-tree/api/treeApiBeta.js +23 -0
- package/lib/simple-tree/api/treeApiBeta.js.map +1 -0
- package/lib/simple-tree/api/treeNodeApi.d.ts +1 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js +23 -21
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/api/verboseTree.js +1 -1
- package/lib/simple-tree/api/verboseTree.js.map +1 -1
- package/lib/simple-tree/{viewSchemaToSimpleSchema.d.ts → api/viewSchemaToSimpleSchema.d.ts} +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -0
- package/lib/simple-tree/{viewSchemaToSimpleSchema.js → api/viewSchemaToSimpleSchema.js} +4 -4
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -0
- package/lib/simple-tree/arrayNode.d.ts +2 -2
- package/lib/simple-tree/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/arrayNode.js +33 -24
- package/lib/simple-tree/arrayNode.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +3 -3
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +2 -2
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/schemaCaching.d.ts +5 -0
- package/lib/simple-tree/core/schemaCaching.d.ts.map +1 -1
- package/lib/simple-tree/core/schemaCaching.js +8 -0
- package/lib/simple-tree/core/schemaCaching.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +61 -3
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +156 -5
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +1 -1
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/core/types.d.ts +17 -20
- package/lib/simple-tree/core/types.d.ts.map +1 -1
- package/lib/simple-tree/core/types.js.map +1 -1
- package/lib/simple-tree/core/withType.d.ts +3 -2
- package/lib/simple-tree/core/withType.d.ts.map +1 -1
- package/lib/simple-tree/core/withType.js.map +1 -1
- package/lib/simple-tree/index.d.ts +7 -9
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +5 -5
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +7 -9
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +14 -12
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/mapNode.d.ts +1 -1
- package/lib/simple-tree/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/mapNode.js +38 -29
- package/lib/simple-tree/mapNode.js.map +1 -1
- package/lib/simple-tree/objectNode.d.ts +9 -7
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +40 -34
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/proxies.d.ts +1 -14
- package/lib/simple-tree/proxies.d.ts.map +1 -1
- package/lib/simple-tree/proxies.js +11 -14
- package/lib/simple-tree/proxies.js.map +1 -1
- package/lib/simple-tree/proxyBinding.d.ts +2 -62
- package/lib/simple-tree/proxyBinding.d.ts.map +1 -1
- package/lib/simple-tree/proxyBinding.js +6 -174
- package/lib/simple-tree/proxyBinding.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +7 -7
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js +4 -4
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/toFlexSchema.d.ts +11 -1
- package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/lib/simple-tree/toFlexSchema.js +29 -8
- package/lib/simple-tree/toFlexSchema.js.map +1 -1
- package/lib/simple-tree/toMapTree.d.ts +25 -37
- package/lib/simple-tree/toMapTree.d.ts.map +1 -1
- package/lib/simple-tree/toMapTree.js +54 -17
- package/lib/simple-tree/toMapTree.js.map +1 -1
- package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
- package/lib/simple-tree/treeNodeValid.js +8 -11
- package/lib/simple-tree/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/typesUnsafe.d.ts +13 -13
- package/lib/simple-tree/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/walkSchema.d.ts +26 -0
- package/lib/simple-tree/walkSchema.d.ts.map +1 -0
- package/lib/simple-tree/walkSchema.js +43 -0
- package/lib/simple-tree/walkSchema.js.map +1 -0
- package/lib/treeFactory.d.ts +2 -1
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +2 -1
- package/lib/treeFactory.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/lib/util/typeUtils.d.ts +2 -2
- package/lib/util/typeUtils.js.map +1 -1
- package/package.json +57 -25
- package/src/core/index.ts +1 -1
- package/src/core/{revertible/revertible.ts → revertible.ts} +15 -0
- package/src/core/schema-stored/format.ts +1 -1
- package/src/core/schema-stored/schema.ts +6 -13
- package/src/core/tree/anchorSet.ts +18 -3
- package/src/core/tree/detachedFieldIndex.ts +6 -5
- package/src/core/tree/visitDelta.ts +7 -2
- package/src/events/{events.ts → emitter.ts} +52 -139
- package/src/events/index.ts +7 -7
- package/src/events/interop.ts +49 -0
- package/src/events/listeners.ts +68 -0
- package/src/feature-libraries/chunked-forest/chunkTree.ts +63 -18
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +18 -4
- package/src/feature-libraries/chunked-forest/uniformChunk.ts +33 -0
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +5 -3
- package/src/feature-libraries/flex-map-tree/index.ts +1 -0
- package/src/feature-libraries/flex-map-tree/mapTreeNode.ts +135 -210
- package/src/feature-libraries/flex-tree/README.md +4 -75
- package/src/feature-libraries/flex-tree/context.ts +37 -16
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +69 -291
- package/src/feature-libraries/flex-tree/index.ts +7 -13
- package/src/feature-libraries/flex-tree/lazyEntity.ts +2 -11
- package/src/feature-libraries/flex-tree/lazyField.ts +49 -73
- package/src/feature-libraries/flex-tree/lazyNode.ts +25 -154
- package/src/feature-libraries/flex-tree/unboxed.ts +9 -68
- package/src/feature-libraries/flex-tree/utilities.ts +4 -8
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +4 -1
- package/src/feature-libraries/index.ts +2 -27
- package/src/feature-libraries/modular-schema/comparison.ts +4 -6
- package/src/feature-libraries/modular-schema/discrepancies.ts +7 -16
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +4 -1
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +14 -4
- package/src/feature-libraries/storedToViewSchema.ts +5 -6
- package/src/feature-libraries/typed-schema/flexList.ts +3 -3
- package/src/feature-libraries/typed-schema/index.ts +1 -3
- package/src/feature-libraries/typed-schema/schemaCollection.ts +15 -17
- package/src/feature-libraries/typed-schema/typedTreeSchema.ts +35 -127
- package/src/feature-libraries/typed-schema/view.ts +4 -13
- package/src/index.ts +4 -8
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/checkoutFlexTreeView.ts +89 -0
- package/src/shared-tree/index.ts +2 -7
- package/src/shared-tree/schematizeTree.ts +23 -12
- package/src/shared-tree/schematizingTreeView.ts +34 -24
- package/src/shared-tree/sharedTree.ts +6 -1
- package/src/shared-tree/sharedTreeChangeEnricher.ts +6 -1
- package/src/shared-tree/sharedTreeChangeFamily.ts +7 -1
- package/src/shared-tree/sharedTreeEditBuilder.ts +9 -4
- package/src/shared-tree/treeApi.ts +10 -10
- package/src/shared-tree/treeCheckout.ts +26 -15
- package/src/shared-tree-core/branch.ts +1 -1
- package/src/simple-tree/ProxyBinding.md +23 -23
- package/src/simple-tree/api/create.ts +8 -3
- package/src/simple-tree/{getJsonSchema.ts → api/getJsonSchema.ts} +3 -3
- package/src/simple-tree/{getSimpleSchema.ts → api/getSimpleSchema.ts} +3 -3
- package/src/simple-tree/api/index.ts +20 -0
- package/src/simple-tree/{jsonSchema.ts → api/jsonSchema.ts} +1 -1
- package/src/simple-tree/api/schemaFactory.ts +44 -13
- package/src/simple-tree/{simpleSchema.ts → api/simpleSchema.ts} +4 -4
- package/src/simple-tree/{simpleSchemaToJsonSchema.ts → api/simpleSchemaToJsonSchema.ts} +4 -4
- package/src/simple-tree/api/tree.ts +2 -71
- package/src/simple-tree/api/treeApiBeta.ts +101 -0
- package/src/simple-tree/api/treeNodeApi.ts +32 -23
- package/src/simple-tree/api/verboseTree.ts +1 -1
- package/src/simple-tree/{viewSchemaToSimpleSchema.ts → api/viewSchemaToSimpleSchema.ts} +5 -5
- package/src/simple-tree/arrayNode.ts +37 -31
- package/src/simple-tree/core/index.ts +4 -1
- package/src/simple-tree/core/schemaCaching.ts +10 -0
- package/src/simple-tree/core/treeNodeKernel.ts +198 -5
- package/src/simple-tree/core/treeNodeSchema.ts +1 -1
- package/src/simple-tree/core/types.ts +16 -27
- package/src/simple-tree/core/withType.ts +3 -1
- package/src/simple-tree/index.ts +29 -21
- package/src/simple-tree/leafNodeSchema.ts +24 -28
- package/src/simple-tree/mapNode.ts +47 -29
- package/src/simple-tree/objectNode.ts +51 -46
- package/src/simple-tree/proxies.ts +22 -51
- package/src/simple-tree/proxyBinding.ts +3 -254
- package/src/simple-tree/schemaTypes.ts +8 -8
- package/src/simple-tree/toFlexSchema.ts +40 -7
- package/src/simple-tree/toMapTree.ts +113 -79
- package/src/simple-tree/treeNodeValid.ts +10 -13
- package/src/simple-tree/typesUnsafe.ts +13 -13
- package/src/simple-tree/walkSchema.ts +81 -0
- package/src/treeFactory.ts +2 -1
- package/src/util/typeUtils.ts +2 -2
- package/dist/core/revertible/index.d.ts.map +0 -1
- package/dist/core/revertible/index.js +0 -10
- package/dist/core/revertible/index.js.map +0 -1
- package/dist/core/revertible/revertible.d.ts.map +0 -1
- package/dist/core/revertible/revertible.js.map +0 -1
- package/dist/domains/index.d.ts +0 -8
- package/dist/domains/index.d.ts.map +0 -1
- package/dist/domains/index.js +0 -20
- package/dist/domains/index.js.map +0 -1
- package/dist/domains/json/index.d.ts +0 -7
- package/dist/domains/json/index.d.ts.map +0 -1
- package/dist/domains/json/index.js +0 -17
- package/dist/domains/json/index.js.map +0 -1
- package/dist/domains/json/jsonCursor.d.ts +0 -52
- package/dist/domains/json/jsonCursor.d.ts.map +0 -1
- package/dist/domains/json/jsonCursor.js +0 -197
- package/dist/domains/json/jsonCursor.js.map +0 -1
- package/dist/domains/json/jsonDomainSchema.d.ts +0 -24
- package/dist/domains/json/jsonDomainSchema.d.ts.map +0 -1
- package/dist/domains/json/jsonDomainSchema.js +0 -32
- package/dist/domains/json/jsonDomainSchema.js.map +0 -1
- package/dist/domains/leafDomain.d.ts +0 -72
- package/dist/domains/leafDomain.d.ts.map +0 -1
- package/dist/domains/leafDomain.js +0 -88
- package/dist/domains/leafDomain.js.map +0 -1
- package/dist/domains/schemaBuilder.d.ts +0 -103
- package/dist/domains/schemaBuilder.d.ts.map +0 -1
- package/dist/domains/schemaBuilder.js +0 -121
- package/dist/domains/schemaBuilder.js.map +0 -1
- package/dist/domains/testRecursiveDomain.d.ts +0 -17
- package/dist/domains/testRecursiveDomain.d.ts.map +0 -1
- package/dist/domains/testRecursiveDomain.js +0 -35
- package/dist/domains/testRecursiveDomain.js.map +0 -1
- package/dist/events/events.d.ts +0 -207
- package/dist/events/events.d.ts.map +0 -1
- package/dist/events/events.js.map +0 -1
- package/dist/feature-libraries/schemaBuilder.d.ts +0 -31
- package/dist/feature-libraries/schemaBuilder.d.ts.map +0 -1
- package/dist/feature-libraries/schemaBuilder.js +0 -40
- package/dist/feature-libraries/schemaBuilder.js.map +0 -1
- package/dist/feature-libraries/schemaBuilderBase.d.ts +0 -191
- package/dist/feature-libraries/schemaBuilderBase.d.ts.map +0 -1
- package/dist/feature-libraries/schemaBuilderBase.js +0 -201
- package/dist/feature-libraries/schemaBuilderBase.js.map +0 -1
- package/dist/shared-tree/treeView.d.ts +0 -73
- package/dist/shared-tree/treeView.d.ts.map +0 -1
- package/dist/shared-tree/treeView.js.map +0 -1
- package/dist/simple-tree/getJsonSchema.d.ts.map +0 -1
- package/dist/simple-tree/getJsonSchema.js.map +0 -1
- package/dist/simple-tree/getSimpleSchema.d.ts.map +0 -1
- package/dist/simple-tree/getSimpleSchema.js.map +0 -1
- package/dist/simple-tree/jsonSchema.d.ts.map +0 -1
- package/dist/simple-tree/jsonSchema.js.map +0 -1
- package/dist/simple-tree/simpleSchema.d.ts.map +0 -1
- package/dist/simple-tree/simpleSchema.js.map +0 -1
- package/dist/simple-tree/simpleSchemaToJsonSchema.d.ts.map +0 -1
- package/dist/simple-tree/simpleSchemaToJsonSchema.js.map +0 -1
- package/dist/simple-tree/viewSchemaToSimpleSchema.d.ts.map +0 -1
- package/dist/simple-tree/viewSchemaToSimpleSchema.js.map +0 -1
- package/lib/core/revertible/index.d.ts.map +0 -1
- package/lib/core/revertible/index.js.map +0 -1
- package/lib/core/revertible/revertible.d.ts.map +0 -1
- package/lib/core/revertible/revertible.js.map +0 -1
- package/lib/domains/index.d.ts +0 -8
- package/lib/domains/index.d.ts.map +0 -1
- package/lib/domains/index.js +0 -8
- package/lib/domains/index.js.map +0 -1
- package/lib/domains/json/index.d.ts +0 -7
- package/lib/domains/json/index.d.ts.map +0 -1
- package/lib/domains/json/index.js +0 -7
- package/lib/domains/json/index.js.map +0 -1
- package/lib/domains/json/jsonCursor.d.ts +0 -52
- package/lib/domains/json/jsonCursor.d.ts.map +0 -1
- package/lib/domains/json/jsonCursor.js +0 -192
- package/lib/domains/json/jsonCursor.js.map +0 -1
- package/lib/domains/json/jsonDomainSchema.d.ts +0 -24
- package/lib/domains/json/jsonDomainSchema.d.ts.map +0 -1
- package/lib/domains/json/jsonDomainSchema.js +0 -29
- package/lib/domains/json/jsonDomainSchema.js.map +0 -1
- package/lib/domains/leafDomain.d.ts +0 -72
- package/lib/domains/leafDomain.d.ts.map +0 -1
- package/lib/domains/leafDomain.js +0 -85
- package/lib/domains/leafDomain.js.map +0 -1
- package/lib/domains/schemaBuilder.d.ts +0 -103
- package/lib/domains/schemaBuilder.d.ts.map +0 -1
- package/lib/domains/schemaBuilder.js +0 -117
- package/lib/domains/schemaBuilder.js.map +0 -1
- package/lib/domains/testRecursiveDomain.d.ts +0 -17
- package/lib/domains/testRecursiveDomain.d.ts.map +0 -1
- package/lib/domains/testRecursiveDomain.js +0 -32
- package/lib/domains/testRecursiveDomain.js.map +0 -1
- package/lib/events/events.d.ts +0 -207
- package/lib/events/events.d.ts.map +0 -1
- package/lib/events/events.js.map +0 -1
- package/lib/feature-libraries/schemaBuilder.d.ts +0 -31
- package/lib/feature-libraries/schemaBuilder.d.ts.map +0 -1
- package/lib/feature-libraries/schemaBuilder.js +0 -36
- package/lib/feature-libraries/schemaBuilder.js.map +0 -1
- package/lib/feature-libraries/schemaBuilderBase.d.ts +0 -191
- package/lib/feature-libraries/schemaBuilderBase.d.ts.map +0 -1
- package/lib/feature-libraries/schemaBuilderBase.js +0 -195
- package/lib/feature-libraries/schemaBuilderBase.js.map +0 -1
- package/lib/shared-tree/treeView.d.ts +0 -73
- package/lib/shared-tree/treeView.d.ts.map +0 -1
- package/lib/shared-tree/treeView.js.map +0 -1
- package/lib/simple-tree/getJsonSchema.d.ts.map +0 -1
- package/lib/simple-tree/getJsonSchema.js.map +0 -1
- package/lib/simple-tree/getSimpleSchema.d.ts.map +0 -1
- package/lib/simple-tree/getSimpleSchema.js.map +0 -1
- package/lib/simple-tree/jsonSchema.d.ts.map +0 -1
- package/lib/simple-tree/jsonSchema.js.map +0 -1
- package/lib/simple-tree/simpleSchema.d.ts.map +0 -1
- package/lib/simple-tree/simpleSchema.js.map +0 -1
- package/lib/simple-tree/simpleSchemaToJsonSchema.d.ts.map +0 -1
- package/lib/simple-tree/simpleSchemaToJsonSchema.js.map +0 -1
- package/lib/simple-tree/viewSchemaToSimpleSchema.d.ts.map +0 -1
- package/src/domains/README.md +0 -6
- package/src/domains/fence.json +0 -5
- package/src/domains/index.ts +0 -19
- package/src/domains/json/fence.json +0 -5
- package/src/domains/json/index.ts +0 -13
- package/src/domains/json/jsonCursor.ts +0 -247
- package/src/domains/json/jsonDomainSchema.ts +0 -47
- package/src/domains/leafDomain.ts +0 -97
- package/src/domains/schemaBuilder.ts +0 -153
- package/src/domains/testRecursiveDomain.ts +0 -38
- package/src/events/fence.json +0 -5
- package/src/feature-libraries/schemaBuilder.ts +0 -45
- package/src/feature-libraries/schemaBuilderBase.ts +0 -393
- package/src/shared-tree/treeView.ts +0 -113
- /package/dist/core/{revertible/revertible.js → revertible.js} +0 -0
- /package/dist/simple-tree/{jsonSchema.js → api/jsonSchema.js} +0 -0
- /package/dist/simple-tree/{simpleSchema.js → api/simpleSchema.js} +0 -0
- /package/dist/simple-tree/{simpleSchemaToJsonSchema.d.ts → api/simpleSchemaToJsonSchema.d.ts} +0 -0
- /package/lib/core/{revertible/revertible.js → revertible.js} +0 -0
- /package/lib/simple-tree/{jsonSchema.js → api/jsonSchema.js} +0 -0
- /package/lib/simple-tree/{simpleSchema.js → api/simpleSchema.js} +0 -0
- /package/lib/simple-tree/{simpleSchemaToJsonSchema.d.ts → api/simpleSchemaToJsonSchema.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultEditBuilder.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultEditBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAGtE,OAAO,EAaN,mBAAmB,EACnB,WAAW,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAIN,mBAAmB,EAEnB,kBAAkB,EAClB,SAAS,IAAI,gBAAgB,EAC7B,oBAAoB,IAAI,2BAA2B,GACnD,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACN,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,IAAI,cAAc,GAC1B,MAAM,wBAAwB,CAAC;AAIhC;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAK/B,YAAmB,MAA6D;QAC/E,IAAI,CAAC,aAAa,GAAG,IAAI,mBAAmB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAClE,CAAC;IAED,IAAW,OAAO;QACjB,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;IACnC,CAAC;IAED,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;IAClC,CAAC;IAEM,WAAW,CAAC,cAAkD;QACpE,OAAO,IAAI,kBAAkB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC;CACD;AAED;;GAEG;AACH,MAAM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poration and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { oob } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { ICodecFamily } from \"../../codec/index.js\";\nimport {\n\ttype ChangeEncodingContext,\n\ttype ChangeFamily,\n\ttype ChangeFamilyEditor,\n\ttype ChangeRebaser,\n\ttype ChangesetLocalId,\n\tCursorLocationType,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaRoot,\n\ttype FieldUpPath,\n\ttype ITreeCursorSynchronous,\n\ttype TaggedChange,\n\ttype UpPath,\n\tcompareFieldUpPaths,\n\ttopDownPath,\n} from \"../../core/index.js\";\nimport { brand } from \"../../util/index.js\";\nimport {\n\ttype EditDescription,\n\ttype FieldChangeset,\n\ttype FieldEditDescription,\n\tModularChangeFamily,\n\ttype ModularChangeset,\n\tModularEditBuilder,\n\tintoDelta as intoModularDelta,\n\trelevantRemovedRoots as relevantModularRemovedRoots,\n} from \"../modular-schema/index.js\";\nimport type { OptionalChangeset } from \"../optional-field/index.js\";\n\nimport {\n\tfieldKinds,\n\toptional,\n\tsequence,\n\trequired as valueFieldKind,\n} from \"./defaultFieldKinds.js\";\n\nexport type DefaultChangeset = ModularChangeset;\n\n/**\n * Implementation of {@link ChangeFamily} based on the default set of supported field kinds.\n *\n * @sealed\n */\nexport class DefaultChangeFamily\n\timplements ChangeFamily<DefaultEditBuilder, DefaultChangeset>\n{\n\tprivate readonly modularFamily: ModularChangeFamily;\n\n\tpublic constructor(codecs: ICodecFamily<ModularChangeset, ChangeEncodingContext>) {\n\t\tthis.modularFamily = new ModularChangeFamily(fieldKinds, codecs);\n\t}\n\n\tpublic get rebaser(): ChangeRebaser<DefaultChangeset> {\n\t\treturn this.modularFamily.rebaser;\n\t}\n\n\tpublic get codecs(): ICodecFamily<DefaultChangeset, ChangeEncodingContext> {\n\t\treturn this.modularFamily.codecs;\n\t}\n\n\tpublic buildEditor(changeReceiver: (change: DefaultChangeset) => void): DefaultEditBuilder {\n\t\treturn new DefaultEditBuilder(this, changeReceiver);\n\t}\n}\n\n/**\n * @param change - The change to convert into a delta.\n */\nexport function intoDelta(taggedChange: TaggedChange<ModularChangeset>): DeltaRoot {\n\treturn intoModularDelta(taggedChange, fieldKinds);\n}\n\n/**\n * Returns the set of removed roots that should be in memory for the given change to be applied.\n * A removed root is relevant if any of the following is true:\n * - It is being inserted\n * - It is being restored\n * - It is being edited\n * - The ID it is associated with is being changed\n *\n * May be conservative by returning more removed roots than strictly necessary.\n *\n * Will never return IDs for non-root trees, even if they are removed.\n *\n * @param change - The change to be applied.\n */\nexport function relevantRemovedRoots(change: ModularChangeset): Iterable<DeltaDetachedNodeId> {\n\treturn relevantModularRemovedRoots(change, fieldKinds);\n}\n\n/**\n * Default editor for transactional tree data changes.\n * @privateRemarks\n * When taking into account not just the content of the tree,\n * but also how the merge identities (and thus anchors, flex-tree and simple-tree nodes) of nodes before and after the edits correspond,\n * some edits are currently impossible to express.\n * Examples of these non-expressible edits include:\n *\n * - Changing the type of a node while keeping its merge identity.\n * - Changing the value of a leaf while keeping its merge identity.\n * - Swapping subtrees between two value fields.\n * - Replacing a node in the middle of a tree while reusing some of the old nodes decedents that were under value fields.\n *\n * At some point it will likely be worth supporting at least some of these, possibly using a mechanism that could support all of them if desired.\n * If/when such a mechanism becomes available, an evaluation should be done to determine if any existing editing operations should be changed to leverage it\n * (Possibly by adding opt ins at the view schema layer).\n */\nexport interface IDefaultEditBuilder {\n\t/**\n\t * @param field - the value field which is being edited under the parent node\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\tvalueField(field: FieldUpPath): ValueFieldEditBuilder<ITreeCursorSynchronous>;\n\n\t/**\n\t * @param field - the optional field which is being edited under the parent node\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\toptionalField(field: FieldUpPath): OptionalFieldEditBuilder<ITreeCursorSynchronous>;\n\n\t/**\n\t * @param field - the sequence field which is being edited under the parent node\n\t *\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\tsequenceField(field: FieldUpPath): SequenceFieldEditBuilder<ITreeCursorSynchronous>;\n\n\t/**\n\t * Moves a subsequence from one sequence field to another sequence field.\n\t *\n\t * Note that the `destinationIndex` is interpreted based on the state of the sequence *before* the move operation.\n\t * For example, `move(field, 0, 1, field, 2)` changes `[A, B, C]` to `[B, A, C]`.\n\t */\n\tmove(\n\t\tsourceField: FieldUpPath,\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestinationField: FieldUpPath,\n\t\tdestinationIndex: number,\n\t): void;\n\n\t// TODO: document\n\taddNodeExistsConstraint(path: UpPath): void;\n}\n\n/**\n * Implementation of {@link IDefaultEditBuilder} based on the default set of supported field kinds.\n * @sealed\n */\nexport class DefaultEditBuilder implements ChangeFamilyEditor, IDefaultEditBuilder {\n\tprivate readonly modularBuilder: ModularEditBuilder;\n\n\tpublic constructor(\n\t\tfamily: ChangeFamily<ChangeFamilyEditor, DefaultChangeset>,\n\t\tchangeReceiver: (change: DefaultChangeset) => void,\n\t) {\n\t\tthis.modularBuilder = new ModularEditBuilder(family, fieldKinds, changeReceiver);\n\t}\n\n\tpublic enterTransaction(): void {\n\t\tthis.modularBuilder.enterTransaction();\n\t}\n\tpublic exitTransaction(): void {\n\t\tthis.modularBuilder.exitTransaction();\n\t}\n\n\tpublic addNodeExistsConstraint(path: UpPath): void {\n\t\tthis.modularBuilder.addNodeExistsConstraint(path);\n\t}\n\n\tpublic valueField(field: FieldUpPath): ValueFieldEditBuilder<ITreeCursorSynchronous> {\n\t\treturn {\n\t\t\tset: (newContent: ITreeCursorSynchronous): void => {\n\t\t\t\tconst fillId = this.modularBuilder.generateId();\n\n\t\t\t\tconst build = this.modularBuilder.buildTrees(fillId, newContent);\n\t\t\t\tconst change: FieldChangeset = brand(\n\t\t\t\t\tvalueFieldKind.changeHandler.editor.set({\n\t\t\t\t\t\tfill: fillId,\n\t\t\t\t\t\tdetach: this.modularBuilder.generateId(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\n\t\t\t\tconst edit: FieldEditDescription = {\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield,\n\t\t\t\t\tfieldKind: valueFieldKind.identifier,\n\t\t\t\t\tchange,\n\t\t\t\t};\n\t\t\t\tthis.modularBuilder.submitChanges([build, edit]);\n\t\t\t},\n\t\t};\n\t}\n\n\tpublic optionalField(field: FieldUpPath): OptionalFieldEditBuilder<ITreeCursorSynchronous> {\n\t\treturn {\n\t\t\tset: (newContent: ITreeCursorSynchronous | undefined, wasEmpty: boolean): void => {\n\t\t\t\tconst detachId = this.modularBuilder.generateId();\n\t\t\t\tlet fillId: ChangesetLocalId | undefined;\n\t\t\t\tconst edits: EditDescription[] = [];\n\t\t\t\tlet optionalChange: OptionalChangeset;\n\t\t\t\tif (newContent !== undefined) {\n\t\t\t\t\tfillId = this.modularBuilder.generateId();\n\t\t\t\t\tconst build = this.modularBuilder.buildTrees(fillId, newContent);\n\t\t\t\t\tedits.push(build);\n\n\t\t\t\t\toptionalChange = optional.changeHandler.editor.set(wasEmpty, {\n\t\t\t\t\t\tfill: fillId,\n\t\t\t\t\t\tdetach: detachId,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\toptionalChange = optional.changeHandler.editor.clear(wasEmpty, detachId);\n\t\t\t\t}\n\n\t\t\t\tconst change: FieldChangeset = brand(optionalChange);\n\t\t\t\tconst edit: FieldEditDescription = {\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield,\n\t\t\t\t\tfieldKind: optional.identifier,\n\t\t\t\t\tchange,\n\t\t\t\t};\n\t\t\t\tedits.push(edit);\n\n\t\t\t\tthis.modularBuilder.submitChanges(edits);\n\t\t\t},\n\t\t};\n\t}\n\n\tpublic move(\n\t\tsourceField: FieldUpPath,\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestinationField: FieldUpPath,\n\t\tdestIndex: number,\n\t): void {\n\t\tif (count === 0) {\n\t\t\treturn;\n\t\t} else if (count < 0 || !Number.isSafeInteger(count)) {\n\t\t\tthrow new UsageError(`Expected non-negative integer count, got ${count}.`);\n\t\t}\n\t\tconst detachId = this.modularBuilder.generateId(count);\n\t\tconst attachId = this.modularBuilder.generateId(count);\n\t\tif (compareFieldUpPaths(sourceField, destinationField)) {\n\t\t\tconst change = sequence.changeHandler.editor.move(\n\t\t\t\tsourceIndex,\n\t\t\t\tcount,\n\t\t\t\tdestIndex,\n\t\t\t\tdetachId,\n\t\t\t\tattachId,\n\t\t\t);\n\t\t\tthis.modularBuilder.submitChange(sourceField, sequence.identifier, brand(change));\n\t\t} else {\n\t\t\tconst detachPath = topDownPath(sourceField.parent);\n\t\t\tconst attachPath = topDownPath(destinationField.parent);\n\t\t\tconst sharedDepth = getSharedPrefixLength(detachPath, attachPath);\n\t\t\tlet adjustedAttachField = destinationField;\n\t\t\t// After the above loop, `sharedDepth` is the number of elements, starting from the root,\n\t\t\t// that both paths have in common.\n\t\t\tif (sharedDepth === detachPath.length) {\n\t\t\t\tconst attachField = attachPath[sharedDepth]?.parentField ?? destinationField.field;\n\t\t\t\tif (attachField === sourceField.field) {\n\t\t\t\t\t// The detach occurs in an ancestor field of the field where the attach occurs.\n\t\t\t\t\tlet attachAncestorIndex = attachPath[sharedDepth]?.parentIndex ?? sourceIndex;\n\t\t\t\t\tif (attachAncestorIndex < sourceIndex) {\n\t\t\t\t\t\t// The attach path runs through a node located before the detached nodes.\n\t\t\t\t\t\t// No need to adjust the attach path.\n\t\t\t\t\t} else if (sourceIndex + count <= attachAncestorIndex) {\n\t\t\t\t\t\t// The attach path runs through a node located after the detached nodes.\n\t\t\t\t\t\t// adjust the index for the node at that depth of the path, so that it is interpreted correctly\n\t\t\t\t\t\t// in the composition performed by `submitChanges`.\n\t\t\t\t\t\tattachAncestorIndex -= count;\n\t\t\t\t\t\tlet parent: UpPath | undefined = attachPath[sharedDepth - 1];\n\t\t\t\t\t\tconst parentField = attachPath[sharedDepth] ?? oob();\n\t\t\t\t\t\tparent = {\n\t\t\t\t\t\t\tparent,\n\t\t\t\t\t\t\tparentIndex: attachAncestorIndex,\n\t\t\t\t\t\t\tparentField: parentField.parentField,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tfor (let i = sharedDepth + 1; i < attachPath.length; i += 1) {\n\t\t\t\t\t\t\tparent = {\n\t\t\t\t\t\t\t\t...(attachPath[i] ?? oob()),\n\t\t\t\t\t\t\t\tparent,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tadjustedAttachField = { parent, field: destinationField.field };\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\"Invalid move operation: the destination is located under one of the moved elements. Consider using the Tree.contains API to detect this.\",\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst moveOut = sequence.changeHandler.editor.moveOut(sourceIndex, count, detachId);\n\t\t\tconst moveIn = sequence.changeHandler.editor.moveIn(\n\t\t\t\tdestIndex,\n\t\t\t\tcount,\n\t\t\t\tdetachId,\n\t\t\t\tattachId,\n\t\t\t);\n\t\t\tthis.modularBuilder.submitChanges([\n\t\t\t\t{\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield: sourceField,\n\t\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\t\tchange: brand(moveOut),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield: adjustedAttachField,\n\t\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\t\tchange: brand(moveIn),\n\t\t\t\t},\n\t\t\t]);\n\t\t}\n\t}\n\n\tpublic sequenceField(field: FieldUpPath): SequenceFieldEditBuilder<ITreeCursorSynchronous> {\n\t\treturn {\n\t\t\tinsert: (index: number, content: ITreeCursorSynchronous): void => {\n\t\t\t\tconst length =\n\t\t\t\t\tcontent.mode === CursorLocationType.Fields ? content.getFieldLength() : 1;\n\t\t\t\tif (length === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst firstId = this.modularBuilder.generateId(length);\n\t\t\t\tconst build = this.modularBuilder.buildTrees(firstId, content);\n\t\t\t\tconst change: FieldChangeset = brand(\n\t\t\t\t\tsequence.changeHandler.editor.insert(index, length, firstId),\n\t\t\t\t);\n\t\t\t\tconst attach: FieldEditDescription = {\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield,\n\t\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\t\tchange,\n\t\t\t\t};\n\t\t\t\t// The changes have to be submitted together, otherwise they will be assigned different revisions,\n\t\t\t\t// which will prevent the build ID and the insert ID from matching.\n\t\t\t\tthis.modularBuilder.submitChanges([build, attach]);\n\t\t\t},\n\t\t\tremove: (index: number, count: number): void => {\n\t\t\t\tif (count === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst id = this.modularBuilder.generateId(count);\n\t\t\t\tconst change: FieldChangeset = brand(\n\t\t\t\t\tsequence.changeHandler.editor.remove(index, count, id),\n\t\t\t\t);\n\t\t\t\tthis.modularBuilder.submitChange(field, sequence.identifier, change);\n\t\t\t},\n\t\t};\n\t}\n}\n\n/**\n */\nexport interface ValueFieldEditBuilder<TContent> {\n\t/**\n\t * Issues a change which replaces the current newContent of the field with `newContent`.\n\t * @param newContent - the new content for the field.\n\t * The cursor can be in either Field or Node mode and must represent exactly one node.\n\t */\n\tset(newContent: TContent): void;\n}\n\n/**\n */\nexport interface OptionalFieldEditBuilder<TContent> {\n\t/**\n\t * Issues a change which replaces the current newContent of the field with `newContent`\n\t * @param newContent - the new content for the field.\n\t * If provided, the cursor can be in either Field or Node mode and must represent exactly one node.\n\t * @param wasEmpty - whether the field is empty when creating this change\n\t */\n\tset(newContent: TContent | undefined, wasEmpty: boolean): void;\n}\n\n/**\n */\nexport interface SequenceFieldEditBuilder<TContent> {\n\t/**\n\t * Issues a change which inserts the `newContent` at the given `index`.\n\t * @param index - the index at which to insert the `newContent`.\n\t * @param newContent - the new content to be inserted in the field. Cursor can be in either Field or Node mode.\n\t */\n\tinsert(index: number, newContent: TContent): void;\n\n\t/**\n\t * Issues a change which removes `count` elements starting at the given `index`.\n\t * @param index - The index of the first removed element.\n\t * @param count - The number of elements to remove.\n\t */\n\tremove(index: number, count: number): void;\n}\n\n/**\n * @returns The number of path elements that both paths share, starting at index 0.\n */\nfunction getSharedPrefixLength(pathA: readonly UpPath[], pathB: readonly UpPath[]): number {\n\tconst minDepth = Math.min(pathA.length, pathB.length);\n\tlet sharedDepth = 0;\n\twhile (sharedDepth < minDepth) {\n\t\tconst detachStep = pathA[sharedDepth] ?? oob();\n\t\tconst attachStep = pathB[sharedDepth] ?? oob();\n\t\tif (detachStep !== attachStep) {\n\t\t\tif (\n\t\t\t\tdetachStep.parentField !== attachStep.parentField ||\n\t\t\t\tdetachStep.parentIndex !== attachStep.parentIndex\n\t\t\t) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsharedDepth += 1;\n\t}\n\treturn sharedDepth;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"defaultEditBuilder.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultEditBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAGtE,OAAO,EAaN,mBAAmB,EACnB,WAAW,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAIN,mBAAmB,EAEnB,kBAAkB,E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AC,CAAC;YACtE,CAAC;SACD,CAAC;IACH,CAAC;CACD;AA2CD;;GAEG;AACH,SAAS,qBAAqB,CAAC,KAAwB,EAAE,KAAwB;IAChF,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtD,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,OAAO,WAAW,GAAG,QAAQ,EAAE,CAAC;QAC/B,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,GAAG,EAAE,CAAC;QAC/C,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,GAAG,EAAE,CAAC;QAC/C,IAAI,UAAU,KAAK,UAAU,EAAE,CAAC;YAC/B,IACC,UAAU,CAAC,WAAW,KAAK,UAAU,CAAC,WAAW;gBACjD,UAAU,CAAC,WAAW,KAAK,UAAU,CAAC,WAAW,EAChD,CAAC;gBACF,MAAM;YACP,CAAC;QACF,CAAC;QACD,WAAW,IAAI,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,WAAW,CAAC;AACpB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { oob } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { ICodecFamily } from \"../../codec/index.js\";\nimport {\n\ttype ChangeEncodingContext,\n\ttype ChangeFamily,\n\ttype ChangeFamilyEditor,\n\ttype ChangeRebaser,\n\ttype ChangesetLocalId,\n\tCursorLocationType,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaRoot,\n\ttype FieldUpPath,\n\ttype ITreeCursorSynchronous,\n\ttype TaggedChange,\n\ttype UpPath,\n\tcompareFieldUpPaths,\n\ttopDownPath,\n} from \"../../core/index.js\";\nimport { brand } from \"../../util/index.js\";\nimport {\n\ttype EditDescription,\n\ttype FieldChangeset,\n\ttype FieldEditDescription,\n\tModularChangeFamily,\n\ttype ModularChangeset,\n\tModularEditBuilder,\n\tintoDelta as intoModularDelta,\n\trelevantRemovedRoots as relevantModularRemovedRoots,\n} from \"../modular-schema/index.js\";\nimport type { OptionalChangeset } from \"../optional-field/index.js\";\n\nimport {\n\tfieldKinds,\n\toptional,\n\tsequence,\n\trequired as valueFieldKind,\n} from \"./defaultFieldKinds.js\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nexport type DefaultChangeset = ModularChangeset;\n\n/**\n * Implementation of {@link ChangeFamily} based on the default set of supported field kinds.\n *\n * @sealed\n */\nexport class DefaultChangeFamily\n\timplements ChangeFamily<DefaultEditBuilder, DefaultChangeset>\n{\n\tprivate readonly modularFamily: ModularChangeFamily;\n\n\tpublic constructor(codecs: ICodecFamily<ModularChangeset, ChangeEncodingContext>) {\n\t\tthis.modularFamily = new ModularChangeFamily(fieldKinds, codecs);\n\t}\n\n\tpublic get rebaser(): ChangeRebaser<DefaultChangeset> {\n\t\treturn this.modularFamily.rebaser;\n\t}\n\n\tpublic get codecs(): ICodecFamily<DefaultChangeset, ChangeEncodingContext> {\n\t\treturn this.modularFamily.codecs;\n\t}\n\n\tpublic buildEditor(changeReceiver: (change: DefaultChangeset) => void): DefaultEditBuilder {\n\t\treturn new DefaultEditBuilder(this, changeReceiver);\n\t}\n}\n\n/**\n * @param change - The change to convert into a delta.\n */\nexport function intoDelta(taggedChange: TaggedChange<ModularChangeset>): DeltaRoot {\n\treturn intoModularDelta(taggedChange, fieldKinds);\n}\n\n/**\n * Returns the set of removed roots that should be in memory for the given change to be applied.\n * A removed root is relevant if any of the following is true:\n * - It is being inserted\n * - It is being restored\n * - It is being edited\n * - The ID it is associated with is being changed\n *\n * May be conservative by returning more removed roots than strictly necessary.\n *\n * Will never return IDs for non-root trees, even if they are removed.\n *\n * @param change - The change to be applied.\n */\nexport function relevantRemovedRoots(change: ModularChangeset): Iterable<DeltaDetachedNodeId> {\n\treturn relevantModularRemovedRoots(change, fieldKinds);\n}\n\n/**\n * Default editor for transactional tree data changes.\n * @privateRemarks\n * When taking into account not just the content of the tree,\n * but also how the merge identities (and thus anchors, flex-tree and simple-tree nodes) of nodes before and after the edits correspond,\n * some edits are currently impossible to express.\n * Examples of these non-expressible edits include:\n *\n * - Changing the type of a node while keeping its merge identity.\n * - Changing the value of a leaf while keeping its merge identity.\n * - Swapping subtrees between two value fields.\n * - Replacing a node in the middle of a tree while reusing some of the old nodes decedents that were under value fields.\n *\n * At some point it will likely be worth supporting at least some of these, possibly using a mechanism that could support all of them if desired.\n * If/when such a mechanism becomes available, an evaluation should be done to determine if any existing editing operations should be changed to leverage it\n * (Possibly by adding opt ins at the view schema layer).\n */\nexport interface IDefaultEditBuilder {\n\t/**\n\t * @param field - the value field which is being edited under the parent node\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\tvalueField(field: FieldUpPath): ValueFieldEditBuilder<ITreeCursorSynchronous>;\n\n\t/**\n\t * @param field - the optional field which is being edited under the parent node\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\toptionalField(field: FieldUpPath): OptionalFieldEditBuilder<ITreeCursorSynchronous>;\n\n\t/**\n\t * @param field - the sequence field which is being edited under the parent node\n\t *\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\tsequenceField(field: FieldUpPath): SequenceFieldEditBuilder<ITreeCursorSynchronous>;\n\n\t/**\n\t * Moves a subsequence from one sequence field to another sequence field.\n\t *\n\t * Note that the `destinationIndex` is interpreted based on the state of the sequence *before* the move operation.\n\t * For example, `move(field, 0, 1, field, 2)` changes `[A, B, C]` to `[B, A, C]`.\n\t */\n\tmove(\n\t\tsourceField: FieldUpPath,\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestinationField: FieldUpPath,\n\t\tdestinationIndex: number,\n\t): void;\n\n\t// TODO: document\n\taddNodeExistsConstraint(path: UpPath): void;\n}\n\n/**\n * Implementation of {@link IDefaultEditBuilder} based on the default set of supported field kinds.\n * @sealed\n */\nexport class DefaultEditBuilder implements ChangeFamilyEditor, IDefaultEditBuilder {\n\tprivate readonly modularBuilder: ModularEditBuilder;\n\n\tpublic constructor(\n\t\tfamily: ChangeFamily<ChangeFamilyEditor, DefaultChangeset>,\n\t\tchangeReceiver: (change: DefaultChangeset) => void,\n\t\tprivate readonly idCompressor?: IIdCompressor,\n\t) {\n\t\tthis.modularBuilder = new ModularEditBuilder(family, fieldKinds, changeReceiver);\n\t}\n\n\tpublic enterTransaction(): void {\n\t\tthis.modularBuilder.enterTransaction();\n\t}\n\tpublic exitTransaction(): void {\n\t\tthis.modularBuilder.exitTransaction();\n\t}\n\n\tpublic addNodeExistsConstraint(path: UpPath): void {\n\t\tthis.modularBuilder.addNodeExistsConstraint(path);\n\t}\n\n\tpublic valueField(field: FieldUpPath): ValueFieldEditBuilder<ITreeCursorSynchronous> {\n\t\treturn {\n\t\t\tset: (newContent: ITreeCursorSynchronous): void => {\n\t\t\t\tconst fillId = this.modularBuilder.generateId();\n\n\t\t\t\tconst build = this.modularBuilder.buildTrees(fillId, newContent, this.idCompressor);\n\t\t\t\tconst change: FieldChangeset = brand(\n\t\t\t\t\tvalueFieldKind.changeHandler.editor.set({\n\t\t\t\t\t\tfill: fillId,\n\t\t\t\t\t\tdetach: this.modularBuilder.generateId(),\n\t\t\t\t\t}),\n\t\t\t\t);\n\n\t\t\t\tconst edit: FieldEditDescription = {\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield,\n\t\t\t\t\tfieldKind: valueFieldKind.identifier,\n\t\t\t\t\tchange,\n\t\t\t\t};\n\t\t\t\tthis.modularBuilder.submitChanges([build, edit]);\n\t\t\t},\n\t\t};\n\t}\n\n\tpublic optionalField(field: FieldUpPath): OptionalFieldEditBuilder<ITreeCursorSynchronous> {\n\t\treturn {\n\t\t\tset: (newContent: ITreeCursorSynchronous | undefined, wasEmpty: boolean): void => {\n\t\t\t\tconst detachId = this.modularBuilder.generateId();\n\t\t\t\tlet fillId: ChangesetLocalId | undefined;\n\t\t\t\tconst edits: EditDescription[] = [];\n\t\t\t\tlet optionalChange: OptionalChangeset;\n\t\t\t\tif (newContent !== undefined) {\n\t\t\t\t\tfillId = this.modularBuilder.generateId();\n\t\t\t\t\tconst build = this.modularBuilder.buildTrees(fillId, newContent, this.idCompressor);\n\t\t\t\t\tedits.push(build);\n\n\t\t\t\t\toptionalChange = optional.changeHandler.editor.set(wasEmpty, {\n\t\t\t\t\t\tfill: fillId,\n\t\t\t\t\t\tdetach: detachId,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\toptionalChange = optional.changeHandler.editor.clear(wasEmpty, detachId);\n\t\t\t\t}\n\n\t\t\t\tconst change: FieldChangeset = brand(optionalChange);\n\t\t\t\tconst edit: FieldEditDescription = {\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield,\n\t\t\t\t\tfieldKind: optional.identifier,\n\t\t\t\t\tchange,\n\t\t\t\t};\n\t\t\t\tedits.push(edit);\n\n\t\t\t\tthis.modularBuilder.submitChanges(edits);\n\t\t\t},\n\t\t};\n\t}\n\n\tpublic move(\n\t\tsourceField: FieldUpPath,\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestinationField: FieldUpPath,\n\t\tdestIndex: number,\n\t): void {\n\t\tif (count === 0) {\n\t\t\treturn;\n\t\t} else if (count < 0 || !Number.isSafeInteger(count)) {\n\t\t\tthrow new UsageError(`Expected non-negative integer count, got ${count}.`);\n\t\t}\n\t\tconst detachId = this.modularBuilder.generateId(count);\n\t\tconst attachId = this.modularBuilder.generateId(count);\n\t\tif (compareFieldUpPaths(sourceField, destinationField)) {\n\t\t\tconst change = sequence.changeHandler.editor.move(\n\t\t\t\tsourceIndex,\n\t\t\t\tcount,\n\t\t\t\tdestIndex,\n\t\t\t\tdetachId,\n\t\t\t\tattachId,\n\t\t\t);\n\t\t\tthis.modularBuilder.submitChange(sourceField, sequence.identifier, brand(change));\n\t\t} else {\n\t\t\tconst detachPath = topDownPath(sourceField.parent);\n\t\t\tconst attachPath = topDownPath(destinationField.parent);\n\t\t\tconst sharedDepth = getSharedPrefixLength(detachPath, attachPath);\n\t\t\tlet adjustedAttachField = destinationField;\n\t\t\t// After the above loop, `sharedDepth` is the number of elements, starting from the root,\n\t\t\t// that both paths have in common.\n\t\t\tif (sharedDepth === detachPath.length) {\n\t\t\t\tconst attachField = attachPath[sharedDepth]?.parentField ?? destinationField.field;\n\t\t\t\tif (attachField === sourceField.field) {\n\t\t\t\t\t// The detach occurs in an ancestor field of the field where the attach occurs.\n\t\t\t\t\tlet attachAncestorIndex = attachPath[sharedDepth]?.parentIndex ?? sourceIndex;\n\t\t\t\t\tif (attachAncestorIndex < sourceIndex) {\n\t\t\t\t\t\t// The attach path runs through a node located before the detached nodes.\n\t\t\t\t\t\t// No need to adjust the attach path.\n\t\t\t\t\t} else if (sourceIndex + count <= attachAncestorIndex) {\n\t\t\t\t\t\t// The attach path runs through a node located after the detached nodes.\n\t\t\t\t\t\t// adjust the index for the node at that depth of the path, so that it is interpreted correctly\n\t\t\t\t\t\t// in the composition performed by `submitChanges`.\n\t\t\t\t\t\tattachAncestorIndex -= count;\n\t\t\t\t\t\tlet parent: UpPath | undefined = attachPath[sharedDepth - 1];\n\t\t\t\t\t\tconst parentField = attachPath[sharedDepth] ?? oob();\n\t\t\t\t\t\tparent = {\n\t\t\t\t\t\t\tparent,\n\t\t\t\t\t\t\tparentIndex: attachAncestorIndex,\n\t\t\t\t\t\t\tparentField: parentField.parentField,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tfor (let i = sharedDepth + 1; i < attachPath.length; i += 1) {\n\t\t\t\t\t\t\tparent = {\n\t\t\t\t\t\t\t\t...(attachPath[i] ?? oob()),\n\t\t\t\t\t\t\t\tparent,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tadjustedAttachField = { parent, field: destinationField.field };\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\"Invalid move operation: the destination is located under one of the moved elements. Consider using the Tree.contains API to detect this.\",\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst moveOut = sequence.changeHandler.editor.moveOut(sourceIndex, count, detachId);\n\t\t\tconst moveIn = sequence.changeHandler.editor.moveIn(\n\t\t\t\tdestIndex,\n\t\t\t\tcount,\n\t\t\t\tdetachId,\n\t\t\t\tattachId,\n\t\t\t);\n\t\t\tthis.modularBuilder.submitChanges([\n\t\t\t\t{\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield: sourceField,\n\t\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\t\tchange: brand(moveOut),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield: adjustedAttachField,\n\t\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\t\tchange: brand(moveIn),\n\t\t\t\t},\n\t\t\t]);\n\t\t}\n\t}\n\n\tpublic sequenceField(field: FieldUpPath): SequenceFieldEditBuilder<ITreeCursorSynchronous> {\n\t\treturn {\n\t\t\tinsert: (index: number, content: ITreeCursorSynchronous): void => {\n\t\t\t\tconst length =\n\t\t\t\t\tcontent.mode === CursorLocationType.Fields ? content.getFieldLength() : 1;\n\t\t\t\tif (length === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst firstId = this.modularBuilder.generateId(length);\n\t\t\t\tconst build = this.modularBuilder.buildTrees(firstId, content, this.idCompressor);\n\t\t\t\tconst change: FieldChangeset = brand(\n\t\t\t\t\tsequence.changeHandler.editor.insert(index, length, firstId),\n\t\t\t\t);\n\t\t\t\tconst attach: FieldEditDescription = {\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield,\n\t\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\t\tchange,\n\t\t\t\t};\n\t\t\t\t// The changes have to be submitted together, otherwise they will be assigned different revisions,\n\t\t\t\t// which will prevent the build ID and the insert ID from matching.\n\t\t\t\tthis.modularBuilder.submitChanges([build, attach]);\n\t\t\t},\n\t\t\tremove: (index: number, count: number): void => {\n\t\t\t\tif (count === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst id = this.modularBuilder.generateId(count);\n\t\t\t\tconst change: FieldChangeset = brand(\n\t\t\t\t\tsequence.changeHandler.editor.remove(index, count, id),\n\t\t\t\t);\n\t\t\t\tthis.modularBuilder.submitChange(field, sequence.identifier, change);\n\t\t\t},\n\t\t};\n\t}\n}\n\n/**\n */\nexport interface ValueFieldEditBuilder<TContent> {\n\t/**\n\t * Issues a change which replaces the current newContent of the field with `newContent`.\n\t * @param newContent - the new content for the field.\n\t * The cursor can be in either Field or Node mode and must represent exactly one node.\n\t */\n\tset(newContent: TContent): void;\n}\n\n/**\n */\nexport interface OptionalFieldEditBuilder<TContent> {\n\t/**\n\t * Issues a change which replaces the current newContent of the field with `newContent`\n\t * @param newContent - the new content for the field.\n\t * If provided, the cursor can be in either Field or Node mode and must represent exactly one node.\n\t * @param wasEmpty - whether the field is empty when creating this change\n\t */\n\tset(newContent: TContent | undefined, wasEmpty: boolean): void;\n}\n\n/**\n */\nexport interface SequenceFieldEditBuilder<TContent> {\n\t/**\n\t * Issues a change which inserts the `newContent` at the given `index`.\n\t * @param index - the index at which to insert the `newContent`.\n\t * @param newContent - the new content to be inserted in the field. Cursor can be in either Field or Node mode.\n\t */\n\tinsert(index: number, newContent: TContent): void;\n\n\t/**\n\t * Issues a change which removes `count` elements starting at the given `index`.\n\t * @param index - The index of the first removed element.\n\t * @param count - The number of elements to remove.\n\t */\n\tremove(index: number, count: number): void;\n}\n\n/**\n * @returns The number of path elements that both paths share, starting at index 0.\n */\nfunction getSharedPrefixLength(pathA: readonly UpPath[], pathB: readonly UpPath[]): number {\n\tconst minDepth = Math.min(pathA.length, pathB.length);\n\tlet sharedDepth = 0;\n\twhile (sharedDepth < minDepth) {\n\t\tconst detachStep = pathA[sharedDepth] ?? oob();\n\t\tconst attachStep = pathB[sharedDepth] ?? oob();\n\t\tif (detachStep !== attachStep) {\n\t\t\tif (\n\t\t\t\tdetachStep.parentField !== attachStep.parentField ||\n\t\t\t\tdetachStep.parentIndex !== attachStep.parentIndex\n\t\t\t) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsharedDepth += 1;\n\t}\n\treturn sharedDepth;\n}\n"]}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { type MapTreeNode, type MapTreeSequenceField, isMapTreeNode, isMapTreeSequenceField, getOrCreateMapTreeNode, tryGetMapTreeNode, } from "./mapTreeNode.js";
|
|
5
|
+
export { type MapTreeNode, type MapTreeSequenceField, isMapTreeNode, isMapTreeSequenceField, getOrCreateMapTreeNode, tryGetMapTreeNode, UnhydratedContext, } from "./mapTreeNode.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/flex-map-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,GACjB,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/flex-map-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,kBAAkB,CAAC"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { isMapTreeNode, isMapTreeSequenceField, getOrCreateMapTreeNode, tryGetMapTreeNode, } from "./mapTreeNode.js";
|
|
5
|
+
export { isMapTreeNode, isMapTreeSequenceField, getOrCreateMapTreeNode, tryGetMapTreeNode, UnhydratedContext, } from "./mapTreeNode.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/flex-map-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGN,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,GACjB,MAAM,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype MapTreeNode,\n\ttype MapTreeSequenceField,\n\tisMapTreeNode,\n\tisMapTreeSequenceField,\n\tgetOrCreateMapTreeNode,\n\ttryGetMapTreeNode,\n} from \"./mapTreeNode.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/flex-map-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGN,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype MapTreeNode,\n\ttype MapTreeSequenceField,\n\tisMapTreeNode,\n\tisMapTreeSequenceField,\n\tgetOrCreateMapTreeNode,\n\ttryGetMapTreeNode,\n\tUnhydratedContext,\n} from \"./mapTreeNode.js\";\n"]}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { type AnchorNode, type ExclusiveMapTree, type FieldKey, type MapTree, type TreeNodeSchemaIdentifier, type Value } from "../../core/index.js";
|
|
6
|
-
import { FlexTreeEntityKind, type FlexTreeField, type
|
|
7
|
-
import {
|
|
5
|
+
import { type AnchorNode, type ExclusiveMapTree, type FieldKey, type FieldUpPath, type MapTree, type TreeFieldStoredSchema, type TreeNodeSchemaIdentifier, type TreeStoredSchema, type Value } from "../../core/index.js";
|
|
6
|
+
import { type FlexTreeContext, FlexTreeEntityKind, type FlexTreeField, type FlexTreeNode, type FlexTreeSequenceField, type FlexTreeTypedField, flexTreeMarker, type FlexTreeHydratedContext } from "../flex-tree/index.js";
|
|
7
|
+
import { FlexFieldSchema, type FlexTreeNodeSchema, type FlexTreeSchema } from "../typed-schema/index.js";
|
|
8
8
|
import type { FlexFieldKind } from "../modular-schema/index.js";
|
|
9
9
|
import { type SequenceFieldEditBuilder } from "../default-schema/index.js";
|
|
10
10
|
/**
|
|
@@ -22,12 +22,12 @@ export declare function isMapTreeNode(flexNode: FlexTreeNode): flexNode is MapTr
|
|
|
22
22
|
/**
|
|
23
23
|
* Checks if the given {@link FlexTreeField} is a {@link MapTreeSequenceField}.
|
|
24
24
|
*/
|
|
25
|
-
export declare function isMapTreeSequenceField
|
|
25
|
+
export declare function isMapTreeSequenceField(field: FlexTreeSequenceField | FlexTreeField): field is MapTreeSequenceField;
|
|
26
26
|
/**
|
|
27
27
|
* An unhydrated {@link FlexTreeSequenceField}, which has additional editing capabilities.
|
|
28
28
|
* @remarks When doing a removal edit, a {@link MapTreeSequenceField}'s `editor` returns ownership of the removed {@link ExclusiveMapTree}s to the caller.
|
|
29
29
|
*/
|
|
30
|
-
export interface MapTreeSequenceField
|
|
30
|
+
export interface MapTreeSequenceField extends FlexTreeSequenceField {
|
|
31
31
|
readonly editor: MapTreeSequenceFieldEditBuilder;
|
|
32
32
|
}
|
|
33
33
|
interface MapTreeSequenceFieldEditBuilder extends SequenceFieldEditBuilder<ExclusiveMapTree[]> {
|
|
@@ -51,11 +51,13 @@ interface LocationInField {
|
|
|
51
51
|
* MapTreeNodes are unconditionally cached -
|
|
52
52
|
* when retrieved via {@link getOrCreateNode}, the same {@link MapTree} object will always produce the same `MapTreeNode` object.
|
|
53
53
|
*/
|
|
54
|
-
export declare class EagerMapTreeNode
|
|
55
|
-
readonly
|
|
54
|
+
export declare class EagerMapTreeNode implements MapTreeNode {
|
|
55
|
+
readonly context: UnhydratedContext;
|
|
56
|
+
readonly flexSchema: FlexTreeNodeSchema;
|
|
56
57
|
/** The underlying {@link MapTree} that this `MapTreeNode` reads its data from */
|
|
57
58
|
readonly mapTree: ExclusiveMapTree;
|
|
58
59
|
private location;
|
|
60
|
+
get schema(): TreeNodeSchemaIdentifier;
|
|
59
61
|
readonly [flexTreeMarker]: FlexTreeEntityKind.Node;
|
|
60
62
|
/**
|
|
61
63
|
* Create a new MapTreeNode.
|
|
@@ -65,7 +67,7 @@ export declare class EagerMapTreeNode<TSchema extends FlexTreeNodeSchema> implem
|
|
|
65
67
|
* A `MapTreeNode` may never be constructed more than once for the same {@link MapTree} object.
|
|
66
68
|
* Instead, it should always be acquired via {@link getOrCreateNode}.
|
|
67
69
|
*/
|
|
68
|
-
constructor(
|
|
70
|
+
constructor(context: UnhydratedContext, flexSchema: FlexTreeNodeSchema,
|
|
69
71
|
/** The underlying {@link MapTree} that this `MapTreeNode` reads its data from */
|
|
70
72
|
mapTree: ExclusiveMapTree, location?: LocationInField);
|
|
71
73
|
get type(): TreeNodeSchemaIdentifier;
|
|
@@ -83,30 +85,28 @@ export declare class EagerMapTreeNode<TSchema extends FlexTreeNodeSchema> implem
|
|
|
83
85
|
* @remarks If this node is unparented, this method will return the special {@link unparentedLocation} as the parent.
|
|
84
86
|
*/
|
|
85
87
|
get parentField(): LocationInField;
|
|
86
|
-
is
|
|
87
|
-
tryGetField(key: FieldKey): EagerMapTreeField
|
|
88
|
+
is(schema: FlexTreeNodeSchema): boolean;
|
|
89
|
+
tryGetField(key: FieldKey): EagerMapTreeField | undefined;
|
|
88
90
|
getBoxed(key: string): FlexTreeField;
|
|
89
91
|
boxedIterator(): IterableIterator<FlexTreeField>;
|
|
92
|
+
keys(): IterableIterator<FieldKey>;
|
|
90
93
|
get value(): Value;
|
|
91
|
-
context: undefined;
|
|
92
94
|
get anchorNode(): AnchorNode;
|
|
93
95
|
private walkTree;
|
|
94
96
|
}
|
|
95
97
|
/**
|
|
96
|
-
*
|
|
98
|
+
* Implementation of `FlexTreeContext`.
|
|
99
|
+
*
|
|
100
|
+
* @remarks An editor is required to edit the FlexTree.
|
|
97
101
|
*/
|
|
98
|
-
export declare class
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
[Symbol.iterator](): IterableIterator<[
|
|
107
|
-
FieldKey,
|
|
108
|
-
FlexTreeUnboxField<TSchema["info"], "notEmpty">
|
|
109
|
-
]>;
|
|
102
|
+
export declare class UnhydratedContext implements FlexTreeContext {
|
|
103
|
+
readonly flexSchema: FlexTreeSchema;
|
|
104
|
+
readonly schema: TreeStoredSchema;
|
|
105
|
+
/**
|
|
106
|
+
* @param flexSchema - Schema to use when working with the tree.
|
|
107
|
+
*/
|
|
108
|
+
constructor(flexSchema: FlexTreeSchema);
|
|
109
|
+
isHydrated(): this is FlexTreeHydratedContext;
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* A readonly {@link FlexTreeField} which wraps an array of {@link MapTrees}.
|
|
@@ -116,18 +116,19 @@ export declare class EagerMapTreeMapNode<TSchema extends FlexMapNodeSchema> exte
|
|
|
116
116
|
interface MapTreeField extends FlexTreeField {
|
|
117
117
|
readonly mapTrees: readonly MapTree[];
|
|
118
118
|
}
|
|
119
|
-
declare class EagerMapTreeField
|
|
120
|
-
readonly
|
|
119
|
+
declare class EagerMapTreeField implements MapTreeField {
|
|
120
|
+
readonly context: UnhydratedContext;
|
|
121
|
+
readonly flexSchema: FlexFieldSchema;
|
|
121
122
|
readonly key: FieldKey;
|
|
122
|
-
readonly parent: EagerMapTreeNode
|
|
123
|
+
readonly parent: EagerMapTreeNode;
|
|
123
124
|
[flexTreeMarker]: FlexTreeEntityKind.Field;
|
|
124
|
-
|
|
125
|
+
get schema(): TreeFieldStoredSchema;
|
|
126
|
+
constructor(context: UnhydratedContext, flexSchema: FlexFieldSchema, key: FieldKey, parent: EagerMapTreeNode);
|
|
125
127
|
get mapTrees(): readonly ExclusiveMapTree[];
|
|
126
128
|
get length(): number;
|
|
127
|
-
is<
|
|
128
|
-
boxedIterator(): IterableIterator<
|
|
129
|
-
boxedAt(index: number):
|
|
130
|
-
context: undefined;
|
|
129
|
+
is<TKind2 extends FlexFieldKind>(kind: TKind2): this is FlexTreeTypedField<TKind2>;
|
|
130
|
+
boxedIterator(): IterableIterator<FlexTreeNode>;
|
|
131
|
+
boxedAt(index: number): FlexTreeNode | undefined;
|
|
131
132
|
/**
|
|
132
133
|
* Mutate this field.
|
|
133
134
|
* @param edit - A function which receives the current `MapTree`s that comprise the contents of the field so that it may be mutated.
|
|
@@ -137,6 +138,7 @@ declare class EagerMapTreeField<T extends FlexAllowedTypes> implements MapTreeFi
|
|
|
137
138
|
* This function ensures that the parent MapTree has no empty fields (which is an invariant of `MapTree`) after the mutation.
|
|
138
139
|
*/
|
|
139
140
|
protected edit(edit: (mapTrees: ExclusiveMapTree[]) => void | ExclusiveMapTree[]): void;
|
|
141
|
+
getFieldPath(): FieldUpPath;
|
|
140
142
|
}
|
|
141
143
|
/**
|
|
142
144
|
* If there exists a {@link EagerMapTreeNode} for the given {@link MapTree}, returns it, otherwise returns `undefined`.
|
|
@@ -149,7 +151,7 @@ export declare function tryGetMapTreeNode(mapTree: MapTree): MapTreeNode | undef
|
|
|
149
151
|
* @param mapTree - the {@link MapTree} containing the data for this node.
|
|
150
152
|
* @remarks It must conform to the `nodeSchema`.
|
|
151
153
|
*/
|
|
152
|
-
export declare function getOrCreateMapTreeNode(nodeSchema: FlexTreeNodeSchema, mapTree: ExclusiveMapTree): EagerMapTreeNode
|
|
154
|
+
export declare function getOrCreateMapTreeNode(context: UnhydratedContext, nodeSchema: FlexTreeNodeSchema, mapTree: ExclusiveMapTree): EagerMapTreeNode;
|
|
153
155
|
export declare function unsupportedUsageError(message?: string): Error;
|
|
154
156
|
export {};
|
|
155
157
|
//# sourceMappingURL=mapTreeNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapTreeNode.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/flex-map-tree/mapTreeNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"mapTreeNode.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/flex-map-tree/mapTreeNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,KAAK,UAAU,EAEf,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,KAAK,EACV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,KAAK,eAAe,EACpB,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,YAAY,EAGjB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EAEvB,cAAc,EAEd,KAAK,uBAAuB,EAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEN,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK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