@fluidframework/tree 2.51.0 → 2.52.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/.vscode/settings.json +0 -1
- package/CHANGELOG.md +43 -0
- package/api-report/tree.alpha.api.md +3 -2
- package/dist/codec/codec.d.ts +2 -1
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +4 -3
- package/dist/codec/codec.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +3 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js +2 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +3 -1
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +2 -1
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +1 -23
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +2 -2
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +2 -3
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +17 -0
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -0
- package/dist/core/tree/detachedFieldIndexCodecCommon.js +68 -0
- package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -0
- package/dist/core/tree/detachedFieldIndexCodecV1.d.ts +11 -0
- package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -0
- package/dist/core/tree/detachedFieldIndexCodecV1.js +55 -0
- package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -0
- package/dist/core/tree/detachedFieldIndexCodecV2.d.ts +11 -0
- package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -0
- package/dist/core/tree/detachedFieldIndexCodecV2.js +49 -0
- package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -0
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts +11 -0
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -0
- package/dist/core/tree/detachedFieldIndexCodecs.js +26 -0
- package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -0
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +37 -0
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -0
- package/dist/core/tree/{detachedFieldIndexFormat.js → detachedFieldIndexFormatCommon.js} +18 -13
- package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -0
- package/dist/core/tree/detachedFieldIndexFormatV1.d.ts +13 -0
- package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -0
- package/dist/core/tree/detachedFieldIndexFormatV1.js +12 -0
- package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -0
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +14 -0
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -0
- package/dist/core/tree/detachedFieldIndexFormatV2.js +14 -0
- package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +9 -9
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +21 -21
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +4 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +4 -4
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +50 -31
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +74 -61
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +20 -14
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +18 -12
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/{lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts → dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts} +20 -14
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/{nodeShape.js → nodeEncoder.js} +23 -17
- package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -0
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +7 -7
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +22 -22
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +5 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +14 -2
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultSchema.js +0 -2
- package/dist/feature-libraries/default-schema/defaultSchema.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -2
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/schemaChecker.d.ts +14 -4
- package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/schemaChecker.js +31 -26
- package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +1 -2
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +2 -4
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.d.ts +5 -6
- package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.js +15 -16
- package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +9 -3
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +2 -3
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts +8 -0
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +23 -11
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/schematizeTree.js +1 -1
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +0 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +7 -10
- 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 +1 -29
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +20 -6
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +9 -4
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +2 -1
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +32 -0
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +1 -1
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/simple-tree/api/conciseTree.d.ts +2 -2
- package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/conciseTree.js +6 -6
- package/dist/simple-tree/api/conciseTree.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +8 -2
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts +8 -7
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js +35 -22
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/customTree.d.ts +25 -4
- package/dist/simple-tree/api/customTree.d.ts.map +1 -1
- package/dist/simple-tree/api/customTree.js +42 -16
- package/dist/simple-tree/api/customTree.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts +98 -0
- package/dist/simple-tree/api/discrepancies.d.ts.map +1 -0
- package/dist/simple-tree/api/discrepancies.js +255 -0
- package/dist/simple-tree/api/discrepancies.js.map +1 -0
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +9 -7
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js +18 -117
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +7 -4
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +5 -1
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/treeBeta.d.ts +2 -2
- package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/treeBeta.js +10 -4
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/api/verboseTree.d.ts +2 -2
- package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/verboseTree.js +15 -15
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +20 -4
- package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/core/allowedTypes.js +45 -13
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/context.d.ts +13 -2
- package/dist/simple-tree/core/context.d.ts.map +1 -1
- package/dist/simple-tree/core/context.js +22 -9
- package/dist/simple-tree/core/context.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +2 -2
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +3 -1
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.d.ts +1 -1
- package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.js +8 -1
- package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/core/walkSchema.d.ts +3 -0
- package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/walkSchema.js +2 -0
- package/dist/simple-tree/core/walkSchema.js.map +1 -1
- package/dist/simple-tree/createContext.d.ts +2 -0
- package/dist/simple-tree/createContext.d.ts.map +1 -1
- package/dist/simple-tree/createContext.js +3 -1
- package/dist/simple-tree/createContext.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +1 -0
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js +1 -0
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +4 -4
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +7 -8
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/index.d.ts +1 -1
- package/dist/simple-tree/node-kinds/index.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/index.js +1 -2
- package/dist/simple-tree/node-kinds/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/index.d.ts +1 -1
- package/dist/simple-tree/node-kinds/object/index.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/index.js +1 -2
- package/dist/simple-tree/node-kinds/object/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts +2 -7
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +4 -18
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/prepareForInsertion.d.ts +5 -5
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +9 -3
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts +3 -0
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +3 -0
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +2 -2
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/dist/simple-tree/walkFieldSchema.d.ts +1 -0
- package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/walkFieldSchema.js +1 -0
- package/dist/simple-tree/walkFieldSchema.js.map +1 -1
- package/lib/codec/codec.d.ts +2 -1
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +4 -3
- package/lib/codec/codec.js.map +1 -1
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/types.d.ts +3 -1
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +1 -0
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +1 -23
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +2 -2
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +2 -3
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +17 -0
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -0
- package/lib/core/tree/detachedFieldIndexCodecCommon.js +64 -0
- package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -0
- package/lib/core/tree/detachedFieldIndexCodecV1.d.ts +11 -0
- package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -0
- package/lib/core/tree/detachedFieldIndexCodecV1.js +51 -0
- package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -0
- package/lib/core/tree/detachedFieldIndexCodecV2.d.ts +11 -0
- package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -0
- package/lib/core/tree/detachedFieldIndexCodecV2.js +45 -0
- package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -0
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts +11 -0
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -0
- package/lib/core/tree/detachedFieldIndexCodecs.js +21 -0
- package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -0
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +37 -0
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -0
- package/lib/core/tree/{detachedFieldIndexFormat.js → detachedFieldIndexFormatCommon.js} +13 -10
- package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -0
- package/lib/core/tree/detachedFieldIndexFormatV1.d.ts +13 -0
- package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -0
- package/lib/core/tree/detachedFieldIndexFormatV1.js +9 -0
- package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -0
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +14 -0
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -0
- package/lib/core/tree/detachedFieldIndexFormatV2.js +11 -0
- package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +9 -9
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +19 -19
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +4 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +4 -4
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +50 -31
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +70 -57
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +20 -14
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +17 -11
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/{dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts → lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts} +20 -14
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/{nodeShape.js → nodeEncoder.js} +21 -15
- package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -0
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +7 -7
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +19 -19
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +5 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +14 -2
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultSchema.js +0 -2
- package/lib/feature-libraries/default-schema/defaultSchema.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -1
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/schemaChecker.d.ts +14 -4
- package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/schemaChecker.js +29 -24
- package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +1 -2
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -2
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.d.ts +5 -6
- package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.js +14 -14
- package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +9 -3
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +3 -4
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts +8 -0
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +21 -10
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/schematizeTree.js +1 -1
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +0 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +8 -11
- 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 -30
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +20 -6
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +10 -5
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +2 -1
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +33 -1
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +1 -1
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/simple-tree/api/conciseTree.d.ts +2 -2
- package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/conciseTree.js +6 -6
- package/lib/simple-tree/api/conciseTree.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +8 -2
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts +8 -7
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js +38 -25
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/customTree.d.ts +25 -4
- package/lib/simple-tree/api/customTree.d.ts.map +1 -1
- package/lib/simple-tree/api/customTree.js +43 -17
- package/lib/simple-tree/api/customTree.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts +98 -0
- package/lib/simple-tree/api/discrepancies.d.ts.map +1 -0
- package/lib/simple-tree/{discrepancies.js → api/discrepancies.js} +80 -206
- package/lib/simple-tree/api/discrepancies.js.map +1 -0
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +9 -7
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js +19 -118
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +7 -4
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +6 -2
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/treeBeta.d.ts +2 -2
- package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/treeBeta.js +8 -2
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/api/verboseTree.d.ts +2 -2
- package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/verboseTree.js +9 -9
- package/lib/simple-tree/api/verboseTree.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +20 -4
- package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/core/allowedTypes.js +42 -12
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/context.d.ts +13 -2
- package/lib/simple-tree/core/context.d.ts.map +1 -1
- package/lib/simple-tree/core/context.js +22 -9
- package/lib/simple-tree/core/context.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +2 -2
- 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/treeNodeKernel.d.ts +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.d.ts +1 -1
- package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.js +8 -1
- package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/core/walkSchema.d.ts +3 -0
- package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/walkSchema.js +2 -0
- package/lib/simple-tree/core/walkSchema.js.map +1 -1
- package/lib/simple-tree/createContext.d.ts +2 -0
- package/lib/simple-tree/createContext.d.ts.map +1 -1
- package/lib/simple-tree/createContext.js +3 -1
- package/lib/simple-tree/createContext.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +1 -0
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js +1 -0
- package/lib/simple-tree/fieldSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +4 -4
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +4 -4
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/index.d.ts +1 -1
- package/lib/simple-tree/node-kinds/index.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/index.js +1 -1
- package/lib/simple-tree/node-kinds/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/index.d.ts +1 -1
- package/lib/simple-tree/node-kinds/object/index.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/index.js +1 -1
- package/lib/simple-tree/node-kinds/object/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts +2 -7
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +3 -16
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/prepareForInsertion.d.ts +5 -5
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/lib/simple-tree/prepareForInsertion.js +11 -5
- package/lib/simple-tree/prepareForInsertion.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts +3 -0
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +3 -0
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +2 -2
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/lib/simple-tree/walkFieldSchema.d.ts +1 -0
- package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/walkFieldSchema.js +1 -0
- package/lib/simple-tree/walkFieldSchema.js.map +1 -1
- package/package.json +23 -23
- package/src/codec/codec.ts +4 -3
- package/src/core/index.ts +2 -0
- package/src/core/rebase/index.ts +2 -0
- package/src/core/rebase/types.ts +4 -0
- package/src/core/schema-stored/schema.ts +2 -26
- package/src/core/tree/detachedFieldIndex.ts +4 -6
- package/src/core/tree/detachedFieldIndexCodecCommon.ts +87 -0
- package/src/core/tree/{detachedFieldIndexCodec.ts → detachedFieldIndexCodecV1.ts} +22 -68
- package/src/core/tree/detachedFieldIndexCodecV2.ts +72 -0
- package/src/core/tree/detachedFieldIndexCodecs.ts +44 -0
- package/src/core/tree/{detachedFieldIndexFormat.ts → detachedFieldIndexFormatCommon.ts} +32 -23
- package/src/core/tree/detachedFieldIndexFormatV1.ts +15 -0
- package/src/core/tree/detachedFieldIndexFormatV2.ts +17 -0
- package/src/feature-libraries/chunked-forest/codec/README.md +1 -1
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +25 -25
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +10 -6
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +96 -73
- package/src/feature-libraries/chunked-forest/codec/format.ts +20 -14
- package/src/feature-libraries/chunked-forest/codec/{nodeShape.ts → nodeEncoder.ts} +23 -17
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +34 -34
- package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +5 -5
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +10 -0
- package/src/feature-libraries/default-schema/defaultSchema.ts +0 -2
- package/src/feature-libraries/default-schema/index.ts +1 -1
- package/src/feature-libraries/default-schema/schemaChecker.ts +47 -30
- package/src/feature-libraries/index.ts +1 -3
- package/src/feature-libraries/modular-schema/comparison.ts +14 -29
- package/src/feature-libraries/object-forest/objectForest.ts +10 -6
- package/src/index.ts +5 -0
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +45 -19
- package/src/shared-tree/schematizeTree.ts +1 -1
- package/src/shared-tree/schematizingTreeView.ts +16 -13
- package/src/shared-tree/sharedTree.ts +2 -42
- package/src/shared-tree/treeAlpha.ts +30 -18
- package/src/shared-tree/treeCheckout.ts +54 -10
- package/src/shared-tree-core/branch.ts +1 -6
- package/src/simple-tree/api/conciseTree.ts +9 -7
- package/src/simple-tree/api/configuration.ts +8 -2
- package/src/simple-tree/api/create.ts +49 -36
- package/src/simple-tree/api/customTree.ts +59 -20
- package/src/simple-tree/{discrepancies.ts → api/discrepancies.ts} +128 -303
- package/src/simple-tree/api/schemaCompatibilityTester.ts +27 -151
- package/src/simple-tree/api/schemaFactory.ts +7 -4
- package/src/simple-tree/api/storedSchema.ts +6 -9
- package/src/simple-tree/api/treeBeta.ts +17 -4
- package/src/simple-tree/api/verboseTree.ts +17 -8
- package/src/simple-tree/core/allowedTypes.ts +54 -21
- package/src/simple-tree/core/context.ts +24 -22
- package/src/simple-tree/core/index.ts +2 -1
- package/src/simple-tree/core/treeNodeKernel.ts +1 -1
- package/src/simple-tree/core/treeNodeValid.ts +9 -2
- package/src/simple-tree/core/walkSchema.ts +3 -0
- package/src/simple-tree/createContext.ts +6 -1
- package/src/simple-tree/fieldSchema.ts +1 -0
- package/src/simple-tree/index.ts +5 -10
- package/src/simple-tree/node-kinds/array/arrayNode.ts +32 -19
- package/src/simple-tree/node-kinds/index.ts +0 -1
- package/src/simple-tree/node-kinds/object/index.ts +0 -1
- package/src/simple-tree/node-kinds/object/objectNode.ts +9 -27
- package/src/simple-tree/prepareForInsertion.ts +17 -9
- package/src/simple-tree/toStoredSchema.ts +3 -0
- package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +6 -2
- package/src/simple-tree/walkFieldSchema.ts +1 -0
- package/dist/core/tree/detachedFieldIndexCodec.d.ts +0 -11
- package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +0 -1
- package/dist/core/tree/detachedFieldIndexCodec.js +0 -100
- package/dist/core/tree/detachedFieldIndexCodec.js.map +0 -1
- package/dist/core/tree/detachedFieldIndexFormat.d.ts +0 -33
- package/dist/core/tree/detachedFieldIndexFormat.d.ts.map +0 -1
- package/dist/core/tree/detachedFieldIndexFormat.js.map +0 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +0 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +0 -1
- package/dist/feature-libraries/initializeForest.d.ts +0 -18
- package/dist/feature-libraries/initializeForest.d.ts.map +0 -1
- package/dist/feature-libraries/initializeForest.js +0 -35
- package/dist/feature-libraries/initializeForest.js.map +0 -1
- package/dist/simple-tree/discrepancies.d.ts +0 -167
- package/dist/simple-tree/discrepancies.d.ts.map +0 -1
- package/dist/simple-tree/discrepancies.js +0 -382
- package/dist/simple-tree/discrepancies.js.map +0 -1
- package/lib/core/tree/detachedFieldIndexCodec.d.ts +0 -11
- package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +0 -1
- package/lib/core/tree/detachedFieldIndexCodec.js +0 -96
- package/lib/core/tree/detachedFieldIndexCodec.js.map +0 -1
- package/lib/core/tree/detachedFieldIndexFormat.d.ts +0 -33
- package/lib/core/tree/detachedFieldIndexFormat.d.ts.map +0 -1
- package/lib/core/tree/detachedFieldIndexFormat.js.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +0 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +0 -1
- package/lib/feature-libraries/initializeForest.d.ts +0 -18
- package/lib/feature-libraries/initializeForest.d.ts.map +0 -1
- package/lib/feature-libraries/initializeForest.js +0 -31
- package/lib/feature-libraries/initializeForest.js.map +0 -1
- package/lib/simple-tree/discrepancies.d.ts +0 -167
- package/lib/simple-tree/discrepancies.d.ts.map +0 -1
- package/lib/simple-tree/discrepancies.js.map +0 -1
- package/src/feature-libraries/initializeForest.ts +0 -55
|
@@ -28,7 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
exports.MockNodeIdentifierManager = exports.isStableNodeIdentifier = exports.createNodeIdentifierManager = exports.compareLocalNodeIdentifiers = exports.fluidVersionToFieldBatchCodecWriteVersion = exports.makeFieldBatchCodec = exports.makeTreeChunker = exports.defaultChunkPolicy = exports.buildChunkedForest = exports.chunkFieldSingle = exports.chunkTree = exports.mapRootChanges = exports.isNeverTree = exports.updateRefreshers = exports.EncodedModularChangeset = exports.ModularChangeFamily = exports.FieldKindWithEditor = exports.genericFieldKind = exports.allowsRepoSuperset = exports.FlexFieldKind = exports.CrossFieldTarget = exports.makeModularChangeCodecFamily = exports.ModularEditBuilder = exports.isNeverField = exports.SequenceField = exports.jsonableTreeFromForest = exports.jsonableTreeFromFieldCursor = exports.jsonableTreeFromCursor = exports.cursorForJsonableTreeField = exports.cursorForJsonableTreeNode = exports.stackTreeFieldCursor = exports.prefixFieldPath = exports.prefixPath = exports.stackTreeNodeCursor = exports.makeSchemaCodecs = exports.makeSchemaCodec = exports.encodeTreeSchema = exports.SchemaSummarizer = exports.buildForest = exports.mapTreeWithField = exports.mapTreeFieldsWithField = exports.mapTreeFieldFromCursor = exports.mapTreeFromCursor = exports.cursorForMapTreeNode = exports.cursorForMapTreeField = exports.ForestSummarizer = exports.isTreeValue = exports.assertAllowedValue = exports.allowsValue = exports.toDownPath = void 0;
|
|
31
|
-
exports.
|
|
31
|
+
exports.hasElement = exports.AnchorTreeIndex = exports.makeMitigatedChangeFamily = exports.EncodedSchemaChange = exports.makeSchemaChangeCodecs = exports.DetachedFieldIndexSummarizer = exports.valueSchemaAllows = exports.TreeCompressionStrategy = exports.getOrCreateHydratedFlexTreeNode = exports.FlexTreeEntityKind = exports.indexForAt = exports.treeStatusFromAnchorCache = exports.LazyEntity = exports.getSchemaAndPolicy = exports.flexTreeSlot = exports.assertFlexTreeEntityNotFreed = exports.flexTreeMarker = exports.ContextSlot = exports.isFlexTreeNode = exports.Context = exports.TreeStatus = exports.throwOutOfSchema = exports.isFieldInSchema = exports.isNodeInSchema = exports.SchemaValidationError = exports.relevantRemovedRoots = exports.intoDelta = exports.fieldKindConfigurations = exports.fieldKinds = exports.defaultSchemaPolicy = exports.DefaultEditBuilder = exports.DefaultChangeFamily = exports.FieldKinds = exports.nodeKeyTreeIdentifier = void 0;
|
|
32
32
|
var editableTreeBinder_js_1 = require("./editableTreeBinder.js");
|
|
33
33
|
Object.defineProperty(exports, "toDownPath", { enumerable: true, get: function () { return editableTreeBinder_js_1.toDownPath; } });
|
|
34
34
|
var valueUtilities_js_1 = require("./valueUtilities.js");
|
|
@@ -106,7 +106,7 @@ Object.defineProperty(exports, "relevantRemovedRoots", { enumerable: true, get:
|
|
|
106
106
|
Object.defineProperty(exports, "SchemaValidationError", { enumerable: true, get: function () { return index_js_7.SchemaValidationError; } });
|
|
107
107
|
Object.defineProperty(exports, "isNodeInSchema", { enumerable: true, get: function () { return index_js_7.isNodeInSchema; } });
|
|
108
108
|
Object.defineProperty(exports, "isFieldInSchema", { enumerable: true, get: function () { return index_js_7.isFieldInSchema; } });
|
|
109
|
-
Object.defineProperty(exports, "
|
|
109
|
+
Object.defineProperty(exports, "throwOutOfSchema", { enumerable: true, get: function () { return index_js_7.throwOutOfSchema; } });
|
|
110
110
|
var index_js_8 = require("./flex-tree/index.js");
|
|
111
111
|
Object.defineProperty(exports, "TreeStatus", { enumerable: true, get: function () { return index_js_8.TreeStatus; } });
|
|
112
112
|
Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return index_js_8.Context; } });
|
|
@@ -136,6 +136,4 @@ Object.defineProperty(exports, "makeMitigatedChangeFamily", { enumerable: true,
|
|
|
136
136
|
var index_js_10 = require("./indexing/index.js");
|
|
137
137
|
Object.defineProperty(exports, "AnchorTreeIndex", { enumerable: true, get: function () { return index_js_10.AnchorTreeIndex; } });
|
|
138
138
|
Object.defineProperty(exports, "hasElement", { enumerable: true, get: function () { return index_js_10.hasElement; } });
|
|
139
|
-
var initializeForest_js_1 = require("./initializeForest.js");
|
|
140
|
-
Object.defineProperty(exports, "initializeForest", { enumerable: true, get: function () { return initializeForest_js_1.initializeForest; } });
|
|
141
139
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iEAGiC;AADhC,mHAAA,UAAU,OAAA;AAEX,yDAAmF;AAA1E,gHAAA,WAAW,OAAA;AAAE,uHAAA,kBAAkB,OAAA;AAAE,gHAAA,WAAW,OAAA;AAErD,sDAA6D;AAApD,4GAAA,gBAAgB,OAAA;AACzB,uDAW4B;AAV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AAA;AACrB,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,4GAAA,gBAAgB,OAAA;AAGjB,iDA8B8B;AApB7B,sGAAA,UAAU,OAAA;AACV,mGAAA,OAAO,OAAA;AAGP,0GAAA,cAAc,OAAA;AACd,uGAAA,WAAW,OAAA;AACX,WAAW;AACX,0GAAA,cAAc,OAAA;AACd,wHAAA,4BAA4B,OAAA;AAC5B,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAClB,sGAAA,UAAU,OAAA;AACV,qHAAA,yBAAyB,OAAA;AACzB,sGAAA,UAAU,OAAA;AACV,8GAAA,kBAAkB,OAAA;AAKlB,2HAAA,+BAA+B,OAAA;AAGhC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAEhC,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAE1B,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AAErC,oDAIiC;AAFhC,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AAGpB,uEAAuE;AAA9D,qIAAA,yBAAyB,OAAA;AAElC,iDAO6B;AAL5B,4GAAA,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport { ForestSummarizer } from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n\ttype MinimalMapTreeNodeView,\n\tmapTreeFieldsWithField,\n\tmapTreeWithField,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype MinimalFieldMap,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport {\n\tSchemaSummarizer,\n\tencodeTreeSchema,\n\tmakeSchemaCodec,\n\tmakeSchemaCodecs,\n} from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\n// Split this up into separate import and export for compatibility with API-Extractor.\nimport * as SequenceField from \"./sequence-field/index.js\";\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tFieldKindWithEditor,\n\tModularChangeFamily,\n\ttype RelevantRemovedRootsFromChild,\n\tEncodedModularChangeset,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tisNeverTree,\n} from \"./modular-schema/index.js\";\n\nexport { mapRootChanges } from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\tfluidVersionToFieldBatchCodecWriteVersion,\n\ttype FieldBatchEncodingContext,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\ttype DefaultChangeset,\n\tDefaultChangeFamily,\n\tDefaultEditBuilder,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tSchemaValidationError,\n\tisNodeInSchema,\n\tisFieldInSchema,\n\tthrowOutOfSchema,\n} from \"./default-schema/index.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n\ttype FlexibleNodeContent,\n\ttype FlexibleFieldContent,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype HydratedFlexTreeNode,\n\tgetOrCreateHydratedFlexTreeNode,\n} from \"./flex-tree/index.js\";\n\nexport { TreeCompressionStrategy } from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type TreeFieldStoredSchema, type TreeNodeStoredSchema, type TreeStoredSchema, type TreeTypeSet, type ValueSchema } from "../../core/index.js";
|
|
6
6
|
import type { FullSchemaPolicy } from "./fieldKind.js";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
9
9
|
*
|
|
10
10
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
11
11
|
*
|
|
@@ -13,25 +13,25 @@ import type { FullSchemaPolicy } from "./fieldKind.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function allowsTreeSuperset(policy: FullSchemaPolicy, originalData: TreeStoredSchema, original: TreeNodeStoredSchema | undefined, superset: TreeNodeStoredSchema | undefined): boolean;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
17
17
|
*
|
|
18
18
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
19
19
|
*/
|
|
20
20
|
export declare function allowsValueSuperset(original: ValueSchema | undefined, superset: ValueSchema | undefined): boolean;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
23
23
|
*
|
|
24
24
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
25
25
|
*/
|
|
26
26
|
export declare function allowsFieldSuperset(policy: FullSchemaPolicy, originalData: TreeStoredSchema, original: TreeFieldStoredSchema, superset: TreeFieldStoredSchema): boolean;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
29
29
|
*
|
|
30
30
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
31
31
|
*/
|
|
32
32
|
export declare function allowsTreeSchemaIdentifierSuperset(original: TreeTypeSet, superset: TreeTypeSet): boolean;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
35
35
|
*
|
|
36
36
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
37
37
|
*
|
|
@@ -40,5 +40,4 @@ export declare function allowsTreeSchemaIdentifierSuperset(original: TreeTypeSet
|
|
|
40
40
|
* it would have to compare everything anyway.
|
|
41
41
|
*/
|
|
42
42
|
export declare function allowsRepoSuperset(policy: FullSchemaPolicy, original: TreeStoredSchema, superset: TreeStoredSchema): boolean;
|
|
43
|
-
export declare function normalizeField(schema: TreeFieldStoredSchema | undefined): TreeFieldStoredSchema;
|
|
44
43
|
//# sourceMappingURL=comparison.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparison.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/comparison.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAIN,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,WAAW,EAEhB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD;;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
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.allowsRepoSuperset = exports.allowsTreeSchemaIdentifierSuperset = exports.allowsFieldSuperset = exports.allowsValueSuperset = exports.allowsTreeSuperset = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
9
|
const index_js_1 = require("../../core/index.js");
|
|
10
10
|
const index_js_2 = require("../../util/index.js");
|
|
11
11
|
const fieldKindWithEditor_js_1 = require("./fieldKindWithEditor.js");
|
|
12
12
|
const isNeverTree_js_1 = require("./isNeverTree.js");
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
15
15
|
*
|
|
16
16
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
17
17
|
*
|
|
@@ -39,14 +39,14 @@ function allowsTreeSuperset(policy, originalData, original, superset) {
|
|
|
39
39
|
(0, internal_1.assert)(superset instanceof index_js_1.MapNodeStoredSchema || superset instanceof index_js_1.ObjectNodeStoredSchema, 0x894 /* unsupported node kind */);
|
|
40
40
|
if (original instanceof index_js_1.MapNodeStoredSchema) {
|
|
41
41
|
if (superset instanceof index_js_1.MapNodeStoredSchema) {
|
|
42
|
-
return allowsFieldSuperset(policy, originalData,
|
|
42
|
+
return allowsFieldSuperset(policy, originalData, original.mapFields, superset.mapFields);
|
|
43
43
|
}
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
46
|
(0, internal_1.assert)(original instanceof index_js_1.ObjectNodeStoredSchema, 0x895 /* unsupported node kind */);
|
|
47
47
|
if (superset instanceof index_js_1.MapNodeStoredSchema) {
|
|
48
48
|
for (const [_key, field] of original.objectNodeFields) {
|
|
49
|
-
if (!allowsFieldSuperset(policy, originalData,
|
|
49
|
+
if (!allowsFieldSuperset(policy, originalData, field, superset.mapFields)) {
|
|
50
50
|
return false;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -57,15 +57,15 @@ function allowsTreeSuperset(policy, originalData, original, superset) {
|
|
|
57
57
|
a: original.objectNodeFields,
|
|
58
58
|
b: superset.objectNodeFields,
|
|
59
59
|
aExtra: (originalField) => allowsFieldSuperset(policy, originalData, original.objectNodeFields.get(originalField) ??
|
|
60
|
-
(0, internal_1.fail)(0xb17 /* missing expected field */),
|
|
61
|
-
bExtra: (supersetField) => allowsFieldSuperset(policy, originalData,
|
|
60
|
+
(0, internal_1.fail)(0xb17 /* missing expected field */), index_js_1.storedEmptyFieldSchema),
|
|
61
|
+
bExtra: (supersetField) => allowsFieldSuperset(policy, originalData, index_js_1.storedEmptyFieldSchema, superset.objectNodeFields.get(supersetField) ??
|
|
62
62
|
(0, internal_1.fail)(0xb18 /* missing expected field */)),
|
|
63
63
|
same: (sameField) => allowsFieldSuperset(policy, originalData, original.objectNodeFields.get(sameField) ?? (0, internal_1.fail)(0xb19 /* missing expected field */), superset.objectNodeFields.get(sameField) ?? (0, internal_1.fail)(0xb1a /* missing expected field */)),
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
exports.allowsTreeSuperset = allowsTreeSuperset;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
69
69
|
*
|
|
70
70
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
71
71
|
*/
|
|
@@ -74,7 +74,7 @@ function allowsValueSuperset(original, superset) {
|
|
|
74
74
|
}
|
|
75
75
|
exports.allowsValueSuperset = allowsValueSuperset;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
78
78
|
*
|
|
79
79
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
80
80
|
*/
|
|
@@ -83,7 +83,7 @@ function allowsFieldSuperset(policy, originalData, original, superset) {
|
|
|
83
83
|
}
|
|
84
84
|
exports.allowsFieldSuperset = allowsFieldSuperset;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
87
87
|
*
|
|
88
88
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
89
89
|
*/
|
|
@@ -97,7 +97,7 @@ function allowsTreeSchemaIdentifierSuperset(original, superset) {
|
|
|
97
97
|
}
|
|
98
98
|
exports.allowsTreeSchemaIdentifierSuperset = allowsTreeSchemaIdentifierSuperset;
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
100
|
+
* Returns true iff `superset` is a superset of `original`.
|
|
101
101
|
*
|
|
102
102
|
* This does not require a strict (aka proper) superset: equivalent schema will return true.
|
|
103
103
|
*
|
|
@@ -107,22 +107,21 @@ exports.allowsTreeSchemaIdentifierSuperset = allowsTreeSchemaIdentifierSuperset;
|
|
|
107
107
|
*/
|
|
108
108
|
function allowsRepoSuperset(policy, original, superset) {
|
|
109
109
|
{
|
|
110
|
-
// TODO: I think its ok to use the field from superset here, but I should confirm it is, and document why.
|
|
111
110
|
if (!allowsFieldSuperset(policy, original, original.rootFieldSchema, superset.rootFieldSchema)) {
|
|
112
111
|
return false;
|
|
113
112
|
}
|
|
114
113
|
}
|
|
114
|
+
// Check if all schema in original are included in superset, and permit a superset of the node content.
|
|
115
|
+
// Note that any schema from `original.nodeSchema` can be used as the schema for a node at the root of a detached field,
|
|
116
|
+
// so we must check all of them, even if they are not reachable from the root field schema.
|
|
115
117
|
for (const [key, schema] of original.nodeSchema) {
|
|
116
|
-
// TODO: I think its ok to use the tree from superset here, but I should confirm it is, and document why.
|
|
117
118
|
if (!allowsTreeSuperset(policy, original, schema, superset.nodeSchema.get(key))) {
|
|
118
119
|
return false;
|
|
119
120
|
}
|
|
120
121
|
}
|
|
122
|
+
// Any schema in superset not in original are already known to be superset of original since they are "never" due to being missing.
|
|
123
|
+
// Therefore, we do not need to check them.
|
|
121
124
|
return true;
|
|
122
125
|
}
|
|
123
126
|
exports.allowsRepoSuperset = allowsRepoSuperset;
|
|
124
|
-
function normalizeField(schema) {
|
|
125
|
-
return schema ?? index_js_1.storedEmptyFieldSchema;
|
|
126
|
-
}
|
|
127
|
-
exports.normalizeField = normalizeField;
|
|
128
127
|
//# sourceMappingURL=comparison.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparison.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/comparison.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAmE;AAEnE,kDAU6B;AAC7B,kDAAkD;AAGlD,qEAAsD;AACtD,qDAA+C;AAE/C;;;;;;GAMG;AACH,SAAgB,kBAAkB,CACjC,MAAwB,EACxB,YAA8B,EAC9B,QAA0C,EAC1C,QAA0C;IAE1C,IAAI,IAAA,4BAAW,EAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAI,IAAA,4BAAW,EAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,CAAC;QACjD,OAAO,KAAK,CAAC;IACd,CAAC;IACD,IAAA,iBAAM,EAAC,QAAQ,KAAK,SAAS,EAAE,KAAK,CAAC,4CAA4C,CAAC,CAAC;IACnF,IAAA,iBAAM,EAAC,QAAQ,KAAK,SAAS,EAAE,KAAK,CAAC,4CAA4C,CAAC,CAAC;IACnF,IAAI,QAAQ,YAAY,+BAAoB,EAAE,CAAC;QAC9C,IAAI,QAAQ,YAAY,+BAAoB,EAAE,CAAC;YAC9C,OAAO,mBAAmB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,IAAI,QAAQ,YAAY,+BAAoB,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACd,CAAC;IAED,IAAA,iBAAM,EACL,QAAQ,YAAY,8BAAmB,IAAI,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CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACjC,OAAO,KAAK,CAAC;QACd,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAVD,gFAUC;AAED;;;;;;;;GAQG;AACH,SAAgB,kBAAkB,CACjC,MAAwB,EACxB,QAA0B,EAC1B,QAA0B;IAE1B,CAAC;QACA,0GAA0G;QAC1G,IACC,CAAC,mBAAmB,CACnB,MAAM,EACN,QAAQ,EACR,QAAQ,CAAC,eAAe,EACxB,QAAQ,CAAC,eAAe,CACxB,EACA,CAAC;YACF,OAAO,KAAK,CAAC;QACd,CAAC;IACF,CAAC;IACD,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;QACjD,yGAAyG;QACzG,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YACjF,OAAO,KAAK,CAAC;QACd,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAzBD,gDAyBC;AAED,SAAgB,cAAc,CAC7B,MAAyC;IAEzC,OAAO,MAAM,IAAI,iCAAsB,CAAC;AACzC,CAAC;AAJD,wCAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tLeafNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\ttype TreeFieldStoredSchema,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\ttype TreeTypeSet,\n\ttype ValueSchema,\n\tstoredEmptyFieldSchema,\n} from \"../../core/index.js\";\nimport { compareSets } from \"../../util/index.js\";\n\nimport type { FullSchemaPolicy } from \"./fieldKind.js\";\nimport { withEditor } from \"./fieldKindWithEditor.js\";\nimport { isNeverTree } from \"./isNeverTree.js\";\n\n/**\n * @returns true iff `superset` is a superset of `original`.\n *\n * This does not require a strict (aka proper) superset: equivalent schema will return true.\n *\n * `undefined` TreeNodeStoredSchema means the schema is not present (and thus treated as a NeverTree).\n */\nexport function allowsTreeSuperset(\n\tpolicy: FullSchemaPolicy,\n\toriginalData: TreeStoredSchema,\n\toriginal: TreeNodeStoredSchema | undefined,\n\tsuperset: TreeNodeStoredSchema | undefined,\n): boolean {\n\tif (isNeverTree(policy, originalData, original)) {\n\t\treturn true;\n\t}\n\tif (isNeverTree(policy, originalData, superset)) {\n\t\treturn false;\n\t}\n\tassert(original !== undefined, 0x716 /* only never trees have undefined schema */);\n\tassert(superset !== undefined, 0x717 /* only never trees have undefined schema */);\n\tif (original instanceof LeafNodeStoredSchema) {\n\t\tif (superset instanceof LeafNodeStoredSchema) {\n\t\t\treturn allowsValueSuperset(original.leafValue, superset.leafValue);\n\t\t}\n\t\treturn false;\n\t}\n\n\tif (superset instanceof LeafNodeStoredSchema) {\n\t\treturn false;\n\t}\n\n\tassert(\n\t\toriginal instanceof MapNodeStoredSchema || original instanceof ObjectNodeStoredSchema,\n\t\t0x893 /* unsupported node kind */,\n\t);\n\tassert(\n\t\tsuperset instanceof MapNodeStoredSchema || superset instanceof ObjectNodeStoredSchema,\n\t\t0x894 /* unsupported node kind */,\n\t);\n\n\tif (original instanceof MapNodeStoredSchema) {\n\t\tif (superset instanceof MapNodeStoredSchema) {\n\t\t\treturn allowsFieldSuperset(\n\t\t\t\tpolicy,\n\t\t\t\toriginalData,\n\t\t\t\tnormalizeField(original.mapFields),\n\t\t\t\tnormalizeField(superset.mapFields),\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t}\n\n\tassert(original instanceof ObjectNodeStoredSchema, 0x895 /* unsupported node kind */);\n\tif (superset instanceof MapNodeStoredSchema) {\n\t\tfor (const [_key, field] of original.objectNodeFields) {\n\t\t\tif (\n\t\t\t\t!allowsFieldSuperset(\n\t\t\t\t\tpolicy,\n\t\t\t\t\toriginalData,\n\t\t\t\t\tnormalizeField(field),\n\t\t\t\t\tnormalizeField(superset.mapFields),\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tassert(superset instanceof ObjectNodeStoredSchema, 0x896 /* unsupported node kind */);\n\n\treturn compareSets({\n\t\ta: original.objectNodeFields,\n\t\tb: superset.objectNodeFields,\n\t\taExtra: (originalField) =>\n\t\t\tallowsFieldSuperset(\n\t\t\t\tpolicy,\n\t\t\t\toriginalData,\n\t\t\t\toriginal.objectNodeFields.get(originalField) ??\n\t\t\t\t\tfail(0xb17 /* missing expected field */),\n\t\t\t\tnormalizeField(undefined),\n\t\t\t),\n\t\tbExtra: (supersetField) =>\n\t\t\tallowsFieldSuperset(\n\t\t\t\tpolicy,\n\t\t\t\toriginalData,\n\t\t\t\tnormalizeField(undefined),\n\t\t\t\tsuperset.objectNodeFields.get(supersetField) ??\n\t\t\t\t\tfail(0xb18 /* missing expected field */),\n\t\t\t),\n\t\tsame: (sameField) =>\n\t\t\tallowsFieldSuperset(\n\t\t\t\tpolicy,\n\t\t\t\toriginalData,\n\t\t\t\toriginal.objectNodeFields.get(sameField) ?? fail(0xb19 /* missing expected field */),\n\t\t\t\tsuperset.objectNodeFields.get(sameField) ?? fail(0xb1a /* missing expected field */),\n\t\t\t),\n\t});\n}\n\n/**\n * @returns true iff `superset` is a superset of `original`.\n *\n * This does not require a strict (aka proper) superset: equivalent schema will return true.\n */\nexport function allowsValueSuperset(\n\toriginal: ValueSchema | undefined,\n\tsuperset: ValueSchema | undefined,\n): boolean {\n\treturn original === superset;\n}\n\n/**\n * @returns true iff `superset` is a superset of `original`.\n *\n * This does not require a strict (aka proper) superset: equivalent schema will return true.\n */\nexport function allowsFieldSuperset(\n\tpolicy: FullSchemaPolicy,\n\toriginalData: TreeStoredSchema,\n\toriginal: TreeFieldStoredSchema,\n\tsuperset: TreeFieldStoredSchema,\n): boolean {\n\treturn withEditor(\n\t\tpolicy.fieldKinds.get(original.kind) ?? fail(0xb1b /* missing kind */),\n\t).allowsFieldSuperset(policy, originalData, original.types, superset);\n}\n\n/**\n * @returns true iff `superset` is a superset of `original`.\n *\n * This does not require a strict (aka proper) superset: equivalent schema will return true.\n */\nexport function allowsTreeSchemaIdentifierSuperset(\n\toriginal: TreeTypeSet,\n\tsuperset: TreeTypeSet,\n): boolean {\n\tfor (const originalType of original) {\n\t\tif (!superset.has(originalType)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n/**\n * @returns true iff `superset` is a superset of `original`.\n *\n * This does not require a strict (aka proper) superset: equivalent schema will return true.\n *\n * A version of this that assumes a specific root field could be slightly more permissive in some simple cases,\n * however if any extra fields and fields with unconstrained types are reachable,\n * it would have to compare everything anyway.\n */\nexport function allowsRepoSuperset(\n\tpolicy: FullSchemaPolicy,\n\toriginal: TreeStoredSchema,\n\tsuperset: TreeStoredSchema,\n): boolean {\n\t{\n\t\t// TODO: I think its ok to use the field from superset here, but I should confirm it is, and document why.\n\t\tif (\n\t\t\t!allowsFieldSuperset(\n\t\t\t\tpolicy,\n\t\t\t\toriginal,\n\t\t\t\toriginal.rootFieldSchema,\n\t\t\t\tsuperset.rootFieldSchema,\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t}\n\tfor (const [key, schema] of original.nodeSchema) {\n\t\t// TODO: I think its ok to use the tree from superset here, but I should confirm it is, and document why.\n\t\tif (!allowsTreeSuperset(policy, original, schema, superset.nodeSchema.get(key))) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\nexport function normalizeField(\n\tschema: TreeFieldStoredSchema | undefined,\n): TreeFieldStoredSchema {\n\treturn schema ?? storedEmptyFieldSchema;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"comparison.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-sch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EACA,CAAC;YACF,OAAO,KAAK,CAAC;QACd,CAAC;IACF,CAAC;IACD,uGAAuG;IACvG,wHAAwH;IACxH,2FAA2F;IAC3F,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;QACjD,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YACjF,OAAO,KAAK,CAAC;QACd,CAAC;IACF,CAAC;IACD,mIAAmI;IACnI,2CAA2C;IAC3C,OAAO,IAAI,CAAC;AACb,CAAC;AA5BD,gDA4BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tLeafNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\ttype TreeFieldStoredSchema,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\ttype TreeTypeSet,\n\ttype ValueSchema,\n\tstoredEmptyFieldSchema,\n} from \"../../core/index.js\";\nimport { compareSets } from \"../../util/index.js\";\n\nimport type { FullSchemaPolicy } from \"./fieldKind.js\";\nimport { withEditor } from \"./fieldKindWithEditor.js\";\nimport { isNeverTree } from \"./isNeverTree.js\";\n\n/**\n * Returns true iff `superset` is a superset of `original`.\n *\n * This does not require a strict (aka proper) superset: equivalent schema will return true.\n *\n * `undefined` TreeNodeStoredSchema means the schema is not present (and thus treated as a NeverTree).\n */\nexport function allowsTreeSuperset(\n\tpolicy: FullSchemaPolicy,\n\toriginalData: TreeStoredSchema,\n\toriginal: TreeNodeStoredSchema | undefined,\n\tsuperset: TreeNodeStoredSchema | undefined,\n): boolean {\n\tif (isNeverTree(policy, originalData, original)) {\n\t\treturn true;\n\t}\n\tif (isNeverTree(policy, originalData, superset)) {\n\t\treturn false;\n\t}\n\tassert(original !== undefined, 0x716 /* only never trees have undefined schema */);\n\tassert(superset !== undefined, 0x717 /* only never trees have undefined schema */);\n\tif (original instanceof LeafNodeStoredSchema) {\n\t\tif (superset instanceof LeafNodeStoredSchema) {\n\t\t\treturn allowsValueSuperset(original.leafValue, superset.leafValue);\n\t\t}\n\t\treturn false;\n\t}\n\n\tif (superset instanceof LeafNodeStoredSchema) {\n\t\treturn false;\n\t}\n\n\tassert(\n\t\toriginal instanceof MapNodeStoredSchema || original instanceof ObjectNodeStoredSchema,\n\t\t0x893 /* unsupported node kind */,\n\t);\n\tassert(\n\t\tsuperset instanceof MapNodeStoredSchema || superset instanceof ObjectNodeStoredSchema,\n\t\t0x894 /* unsupported node kind */,\n\t);\n\n\tif (original instanceof MapNodeStoredSchema) {\n\t\tif (superset instanceof MapNodeStoredSchema) {\n\t\t\treturn allowsFieldSuperset(policy, originalData, original.mapFields, superset.mapFields);\n\t\t}\n\t\treturn false;\n\t}\n\n\tassert(original instanceof ObjectNodeStoredSchema, 0x895 /* unsupported node kind */);\n\tif (superset instanceof MapNodeStoredSchema) {\n\t\tfor (const [_key, field] of original.objectNodeFields) {\n\t\t\tif (!allowsFieldSuperset(policy, originalData, field, superset.mapFields)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tassert(superset instanceof ObjectNodeStoredSchema, 0x896 /* unsupported node kind */);\n\n\treturn compareSets({\n\t\ta: original.objectNodeFields,\n\t\tb: superset.objectNodeFields,\n\t\taExtra: (originalField) =>\n\t\t\tallowsFieldSuperset(\n\t\t\t\tpolicy,\n\t\t\t\toriginalData,\n\t\t\t\toriginal.objectNodeFields.get(originalField) ??\n\t\t\t\t\tfail(0xb17 /* missing expected field */),\n\t\t\t\tstoredEmptyFieldSchema,\n\t\t\t),\n\t\tbExtra: (supersetField) =>\n\t\t\tallowsFieldSuperset(\n\t\t\t\tpolicy,\n\t\t\t\toriginalData,\n\t\t\t\tstoredEmptyFieldSchema,\n\t\t\t\tsuperset.objectNodeFields.get(supersetField) ??\n\t\t\t\t\tfail(0xb18 /* missing expected field */),\n\t\t\t),\n\t\tsame: (sameField) =>\n\t\t\tallowsFieldSuperset(\n\t\t\t\tpolicy,\n\t\t\t\toriginalData,\n\t\t\t\toriginal.objectNodeFields.get(sameField) ?? fail(0xb19 /* missing expected field */),\n\t\t\t\tsuperset.objectNodeFields.get(sameField) ?? fail(0xb1a /* missing expected field */),\n\t\t\t),\n\t});\n}\n\n/**\n * Returns true iff `superset` is a superset of `original`.\n *\n * This does not require a strict (aka proper) superset: equivalent schema will return true.\n */\nexport function allowsValueSuperset(\n\toriginal: ValueSchema | undefined,\n\tsuperset: ValueSchema | undefined,\n): boolean {\n\treturn original === superset;\n}\n\n/**\n * Returns true iff `superset` is a superset of `original`.\n *\n * This does not require a strict (aka proper) superset: equivalent schema will return true.\n */\nexport function allowsFieldSuperset(\n\tpolicy: FullSchemaPolicy,\n\toriginalData: TreeStoredSchema,\n\toriginal: TreeFieldStoredSchema,\n\tsuperset: TreeFieldStoredSchema,\n): boolean {\n\treturn withEditor(\n\t\tpolicy.fieldKinds.get(original.kind) ?? fail(0xb1b /* missing kind */),\n\t).allowsFieldSuperset(policy, originalData, original.types, superset);\n}\n\n/**\n * Returns true iff `superset` is a superset of `original`.\n *\n * This does not require a strict (aka proper) superset: equivalent schema will return true.\n */\nexport function allowsTreeSchemaIdentifierSuperset(\n\toriginal: TreeTypeSet,\n\tsuperset: TreeTypeSet,\n): boolean {\n\tfor (const originalType of original) {\n\t\tif (!superset.has(originalType)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n/**\n * Returns true iff `superset` is a superset of `original`.\n *\n * This does not require a strict (aka proper) superset: equivalent schema will return true.\n *\n * A version of this that assumes a specific root field could be slightly more permissive in some simple cases,\n * however if any extra fields and fields with unconstrained types are reachable,\n * it would have to compare everything anyway.\n */\nexport function allowsRepoSuperset(\n\tpolicy: FullSchemaPolicy,\n\toriginal: TreeStoredSchema,\n\tsuperset: TreeStoredSchema,\n): boolean {\n\t{\n\t\tif (\n\t\t\t!allowsFieldSuperset(\n\t\t\t\tpolicy,\n\t\t\t\toriginal,\n\t\t\t\toriginal.rootFieldSchema,\n\t\t\t\tsuperset.rootFieldSchema,\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// Check if all schema in original are included in superset, and permit a superset of the node content.\n\t// Note that any schema from `original.nodeSchema` can be used as the schema for a node at the root of a detached field,\n\t// so we must check all of them, even if they are not reachable from the root field schema.\n\tfor (const [key, schema] of original.nodeSchema) {\n\t\tif (!allowsTreeSuperset(policy, original, schema, superset.nodeSchema.get(key))) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// Any schema in superset not in original are already known to be superset of original since they are \"never\" due to being missing.\n\t// Therefore, we do not need to check them.\n\treturn true;\n}\n"]}
|
|
@@ -77,7 +77,9 @@ export declare const EncodedBuilds: import("@sinclair/typebox").TObject<{
|
|
|
77
77
|
}>>;
|
|
78
78
|
c: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
79
79
|
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>>;
|
|
80
|
-
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>, import("@sinclair/typebox").TEnum<typeof import("../chunked-forest/codec/format.js").SpecialField>]>>;
|
|
80
|
+
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>, import("@sinclair/typebox").TEnum<typeof import("../chunked-forest/codec/format.js").SpecialField>]>>; /**
|
|
81
|
+
* The number of constraints within this changeset that are violated.
|
|
82
|
+
*/
|
|
81
83
|
fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>, import("@sinclair/typebox").TNumber]>>>;
|
|
82
84
|
extraFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
83
85
|
}>>;
|
|
@@ -115,7 +117,9 @@ export declare const EncodedModularChangeset: import("@sinclair/typebox").TObjec
|
|
|
115
117
|
}>>;
|
|
116
118
|
c: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
117
119
|
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>>;
|
|
118
|
-
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>, import("@sinclair/typebox").TEnum<typeof import("../chunked-forest/codec/format.js").SpecialField>]>>;
|
|
120
|
+
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>, import("@sinclair/typebox").TEnum<typeof import("../chunked-forest/codec/format.js").SpecialField>]>>; /**
|
|
121
|
+
* The number of constraints within this changeset that are violated.
|
|
122
|
+
*/
|
|
119
123
|
fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>, import("@sinclair/typebox").TNumber]>>>;
|
|
120
124
|
extraFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
121
125
|
}>>;
|
|
@@ -141,7 +145,9 @@ export declare const EncodedModularChangeset: import("@sinclair/typebox").TObjec
|
|
|
141
145
|
}>>;
|
|
142
146
|
c: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
143
147
|
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>>;
|
|
144
|
-
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>, import("@sinclair/typebox").TEnum<typeof import("../chunked-forest/codec/format.js").SpecialField>]>>;
|
|
148
|
+
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny>, import("@sinclair/typebox").TEnum<typeof import("../chunked-forest/codec/format.js").SpecialField>]>>; /**
|
|
149
|
+
* The number of constraints within this changeset that are violated.
|
|
150
|
+
*/
|
|
145
151
|
fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>, import("@sinclair/typebox").TNumber]>>>;
|
|
146
152
|
extraFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
147
153
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeFormat.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,KAAK,gBAAgB,EAAqB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EACN,KAAK,sBAAsB,EAG3B,MAAM,qBAAqB,CAAC;AAK7B,eAAO,MAAM,sBAAsB,uDAEjC,CAAC;AAEH,eAAO,MAAM,mBAAmB,2aAG9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBA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AAM,CAG9B;IACD,IAAW,WAAW,IAAI,MAAM,CAG/B;IACM,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAIlC,QAAQ,IAAI,OAAO;IAInB,QAAQ,IAAI,IAAI;IAIhB,UAAU,IAAI,OAAO;IAIrB,UAAU,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI;IAItC,IAAW,IAAI,IAAI,wBAAwB,CAG1C;IACD,IAAW,KAAK,IAAI,KAAK,CAGxB;IAGM,KAAK,IAAI,IAAI;IAUpB;;;OAGG;IACI,2BAA2B,IAAI,IAAI;IAcnC,OAAO,IAAI,cAAc;IAKzB,SAAS,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC;IAUvC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,uBAAuB;IAK9C,IAAI,IAAI,IAAI;IASZ,WAAW,IAAI,MAAM;CAO5B;AAKD;;;;;GAKG;AACH,wBAAgB,WAAW,CAC1B,OAAO,EAAE,SAAS,EAClB,MAAM,CAAC,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,SAAS,EACnB,iBAAiB,GAAE,OAAe,GAChC,YAAY,CAEd"}
|
|
@@ -139,11 +139,10 @@ let ObjectForest = (() => {
|
|
|
139
139
|
// Metadata is not used for schema checks
|
|
140
140
|
persistedMetadata: undefined,
|
|
141
141
|
};
|
|
142
|
-
|
|
142
|
+
(0, index_js_4.isFieldInSchema)(documentRoot, fieldSchema, {
|
|
143
143
|
schema,
|
|
144
144
|
policy: index_js_4.defaultSchemaPolicy,
|
|
145
|
-
});
|
|
146
|
-
(0, index_js_4.inSchemaOrThrow)(maybeError);
|
|
145
|
+
}, index_js_4.throwOutOfSchema);
|
|
147
146
|
}
|
|
148
147
|
}
|
|
149
148
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectForest.js","sourceRoot":"","sources":["../../../src/feature-libraries/object-forest/objectForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;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B,oBAA6B,KAAK;IAElC,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;AACtE,CAAC;AAPD,kCAOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type { Listenable } from \"@fluidframework/core-interfaces\";\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype Anchor,\n\tAnchorSet,\n\ttype AnnouncedVisitor,\n\ttype CursorLocationType,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaVisitor,\n\ttype DetachedField,\n\ttype FieldAnchor,\n\ttype FieldKey,\n\ttype FieldUpPath,\n\ttype ForestEvents,\n\ttype IEditableForest,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype MapTree,\n\ttype PathRootPrefix,\n\ttype PlaceIndex,\n\ttype Range,\n\ttype TreeChunk,\n\ttype TreeFieldStoredSchema,\n\tTreeNavigationResult,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeStoredSchemaSubscription,\n\ttype UpPath,\n\ttype Value,\n\taboveRootPlaceholder,\n\tcombineVisitors,\n\tdeepCopyMapTree,\n\trootFieldKey,\n} from \"../../core/index.js\";\nimport {\n\tassertNonNegativeSafeInteger,\n\tassertValidIndex,\n\tassertValidRange,\n\tbrand,\n\tbreakingMethod,\n\ttype Breakable,\n\ttype WithBreakable,\n} from \"../../util/index.js\";\nimport { chunkFieldSingle, defaultChunkPolicy } from \"../chunked-forest/index.js\";\nimport { cursorForMapTreeNode, mapTreeFromCursor } from \"../mapTreeCursor.js\";\nimport { type CursorWithNode, SynchronousCursor } from \"../treeCursorUtils.js\";\nimport {\n\tdefaultSchemaPolicy,\n\tFieldKinds,\n\tinSchemaOrThrow,\n\tisFieldInSchema,\n} from \"../default-schema/index.js\";\n\n/** A `MapTree` with mutable fields */\ninterface MutableMapTree extends MapTree {\n\treadonly fields: Map<FieldKey, MutableMapTree[]>;\n}\n\n/** Get a field from a `MutableMapTree`, optionally modifying the tree to create it if missing. */\nfunction getOrCreateField(mapTree: MutableMapTree, key: FieldKey): MutableMapTree[] {\n\tconst field = mapTree.fields.get(key);\n\tif (field !== undefined) {\n\t\treturn field;\n\t}\n\n\tconst newField: MutableMapTree[] = [];\n\tmapTree.fields.set(key, newField);\n\treturn newField;\n}\n\n/**\n * Reference implementation of IEditableForest.\n *\n * This implementation focuses on correctness and simplicity, not performance.\n * It does not use compressed chunks: instead nodes are implemented using objects.\n */\nexport class ObjectForest implements IEditableForest, WithBreakable {\n\tprivate activeVisitor?: DeltaVisitor;\n\n\t// All cursors that are in the \"Current\" state. Must be empty when editing.\n\tpublic readonly currentCursors: Set<Cursor> = new Set();\n\tprivate readonly deltaVisitors: Set<() => AnnouncedVisitor> = new Set();\n\n\treadonly #events = createEmitter<ForestEvents>();\n\tpublic readonly events: Listenable<ForestEvents> = this.#events;\n\n\treadonly #roots: MutableMapTree;\n\tpublic get roots(): MapTree {\n\t\treturn this.#roots;\n\t}\n\n\tpublic constructor(\n\t\tpublic readonly breaker: Breakable,\n\t\t/**\n\t\t * If provided, may be used for validation, but otherwise unused.\n\t\t */\n\t\tpublic readonly schema: TreeStoredSchemaSubscription | undefined,\n\t\tpublic readonly anchors: AnchorSet = new AnchorSet(),\n\t\tpublic readonly additionalAsserts: boolean = false,\n\t\troots?: MapTree,\n\t) {\n\t\tthis.#roots =\n\t\t\troots !== undefined\n\t\t\t\t? deepCopyMapTree(roots)\n\t\t\t\t: {\n\t\t\t\t\t\ttype: aboveRootPlaceholder,\n\t\t\t\t\t\tfields: new Map(),\n\t\t\t\t\t};\n\n\t\tif (additionalAsserts) {\n\t\t\tthis.checkSchema();\n\t\t}\n\t}\n\n\tpublic get isEmpty(): boolean {\n\t\treturn this.roots.fields.size === 0;\n\t}\n\n\tpublic clone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): ObjectForest {\n\t\treturn new ObjectForest(this.breaker, schema, anchors, this.additionalAsserts, this.roots);\n\t}\n\n\tpublic chunkField(cursor: ITreeCursorSynchronous): TreeChunk {\n\t\treturn chunkFieldSingle(cursor, { idCompressor: undefined, policy: defaultChunkPolicy });\n\t}\n\n\tpublic forgetAnchor(anchor: Anchor): void {\n\t\tthis.anchors.forget(anchor);\n\t}\n\n\t/**\n\t * Throw (and break) if content does not match schema.\n\t */\n\t@breakingMethod\n\tpublic checkSchema(): void {\n\t\tconst schema = this.schema;\n\t\tif (schema !== undefined) {\n\t\t\tconst roots = new Set([...this.roots.fields.keys(), rootFieldKey]);\n\t\t\tfor (const key of roots) {\n\t\t\t\tconst documentRoot = this.roots.fields.get(key) ?? [];\n\t\t\t\tconst fieldSchema: TreeFieldStoredSchema =\n\t\t\t\t\tkey === rootFieldKey\n\t\t\t\t\t\t? schema.rootFieldSchema\n\t\t\t\t\t\t: // TODO: someday we should have schema for detached fields, and use that instead of generating one here.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Some detached fields may have multiple nodes, so we must treat them as sequences:\n\t\t\t\t\t\t\t\tkind: FieldKinds.sequence.identifier,\n\t\t\t\t\t\t\t\ttypes: new Set(documentRoot.map((node) => node.type)),\n\n\t\t\t\t\t\t\t\t// Metadata is not used for schema checks\n\t\t\t\t\t\t\t\tpersistedMetadata: undefined,\n\t\t\t\t\t\t\t};\n\t\t\t\tconst maybeError = isFieldInSchema(documentRoot, fieldSchema, {\n\t\t\t\t\tschema,\n\t\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t\t});\n\t\t\t\tinSchemaOrThrow(maybeError);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic acquireVisitor(): DeltaVisitor {\n\t\tassert(\n\t\t\tthis.activeVisitor === undefined,\n\t\t\t0x76c /* Must release existing visitor before acquiring another */,\n\t\t);\n\n\t\t// Note: This code uses cursors, however it also modifies the tree.\n\t\t// In general this is not safe, but this code happens to only modify the tree below the current cursor location,\n\t\t// which happens to work.\n\t\t// This pattern could be generalized/formalized with a concept of an exclusive cursor,\n\t\t// which can edit, but is the only cursor allowed at the time.\n\n\t\tconst cursor: Cursor = this.allocateCursor(\"acquireVisitor\");\n\t\tcursor.setToAboveDetachedSequences();\n\n\t\t/**\n\t\t * Called before each edit to allow cursor cleanup to happen and ensure that there are no unexpected cursors.\n\t\t * This is required for each change since there may be app facing change event handlers which create cursors.\n\t\t */\n\t\tconst preEdit = (): void => {\n\t\t\tthis.#events.emit(\"beforeChange\");\n\t\t\tassert(\n\t\t\t\tthis.currentCursors.has(cursor),\n\t\t\t\t0x995 /* missing visitor cursor while editing */,\n\t\t\t);\n\t\t\tif (this.currentCursors.size > 1) {\n\t\t\t\tconst unexpectedSources = [...this.currentCursors].flatMap((c) =>\n\t\t\t\t\tc === cursor ? [] : (c.source ?? null),\n\t\t\t\t);\n\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Found unexpected cursors when editing with the following annotations: ${JSON.stringify(\n\t\t\t\t\t\tunexpectedSources,\n\t\t\t\t\t)}`,\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tclass Visitor implements DeltaVisitor {\n\t\t\tpublic constructor(private readonly forest: ObjectForest) {}\n\t\t\tpublic free(): void {\n\t\t\t\tcursor.free();\n\t\t\t\tassert(\n\t\t\t\t\tthis.forest.activeVisitor !== undefined,\n\t\t\t\t\t0x76d /* Multiple free calls for same visitor */,\n\t\t\t\t);\n\t\t\t\tthis.forest.activeVisitor = undefined;\n\t\t\t\tif (this.forest.additionalAsserts) {\n\t\t\t\t\t// Schema validation:\n\t\t\t\t\t// When doing \"additionalAsserts\", validate the content against the schema after every batch of edits.\n\t\t\t\t\tthis.forest.checkSchema();\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic destroy(detachedField: FieldKey, count: number): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.forest.delete(detachedField);\n\t\t\t}\n\t\t\tpublic create(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.forest.add(content, destination);\n\t\t\t\tthis.forest.#events.emit(\"afterRootFieldCreated\", destination);\n\t\t\t}\n\t\t\tpublic attach(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.attachEdit(source, count, destination);\n\t\t\t}\n\t\t\tpublic detach(source: Range, destination: FieldKey, id: DeltaDetachedNodeId): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.detachEdit(source, destination);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Attaches the nodes from the given source field into the current field.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The the range to be attached.\n\t\t\t * @param count - The number of nodes being attached.\n\t\t\t * Expected to match the number of nodes in the source detached field.\n\t\t\t * @param destination - The index in the current field at which to attach the content.\n\t\t\t */\n\t\t\tprivate attachEdit(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tassertNonNegativeSafeInteger(count);\n\t\t\t\tif (count === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst [parent, key] = cursor.getParent();\n\t\t\t\tassert(\n\t\t\t\t\tparent !== this.forest.roots || key !== source,\n\t\t\t\t\t0x7b6 /* Attach source field must be different from current field */,\n\t\t\t\t);\n\t\t\t\tconst currentField = getOrCreateField(parent, key);\n\t\t\t\tassertValidIndex(destination, currentField, true);\n\t\t\t\tconst sourceField = this.forest.#roots.fields.get(source) ?? [];\n\t\t\t\tassert(sourceField !== undefined, 0x7b7 /* Attach source field must exist */);\n\t\t\t\tassert(\n\t\t\t\t\tsourceField.length === count,\n\t\t\t\t\t0x7b8 /* Attach must consume all nodes in source field */,\n\t\t\t\t);\n\t\t\t\t// TODO: this will fail for very large insertions due to argument limits.\n\t\t\t\tcurrentField.splice(destination, 0, ...sourceField);\n\t\t\t\tthis.forest.delete(source);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Detaches the range from the current field and transfers it to the given destination if any.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The bounds of the range to be detached from the current field.\n\t\t\t * @param destination - If specified, the destination to transfer the detached range to.\n\t\t\t * If not specified, the detached range is destroyed.\n\t\t\t */\n\t\t\tprivate detachEdit(source: Range, destination: FieldKey | undefined): void {\n\t\t\t\tconst [parent, key] = cursor.getParent();\n\t\t\t\tassert(\n\t\t\t\t\tdestination === undefined || parent !== this.forest.roots || key !== destination,\n\t\t\t\t\t0x7b9 /* Detach destination field must be different from current field */,\n\t\t\t\t);\n\t\t\t\tconst currentField = getOrCreateField(parent, key);\n\t\t\t\tassertValidRange(source, currentField);\n\t\t\t\tconst content = currentField.splice(source.start, source.end - source.start);\n\t\t\t\tif (destination !== undefined) {\n\t\t\t\t\tthis.forest.addFieldAsDetached(content, destination);\n\t\t\t\t}\n\t\t\t\t// This check is performed after the transfer to ensure that the field is not removed in scenarios\n\t\t\t\t// where the source and destination are the same.\n\t\t\t\tif (currentField.length === 0) {\n\t\t\t\t\tparent.fields.delete(key);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic enterNode(index: number): void {\n\t\t\t\tcursor.enterNode(index);\n\t\t\t}\n\t\t\tpublic exitNode(index: number): void {\n\t\t\t\tcursor.exitNode();\n\t\t\t}\n\t\t\tpublic enterField(key: FieldKey): void {\n\t\t\t\tcursor.enterField(key);\n\t\t\t}\n\t\t\tpublic exitField(key: FieldKey): void {\n\t\t\t\tcursor.exitField();\n\t\t\t}\n\t\t}\n\n\t\tconst forestVisitor = new Visitor(this);\n\t\tconst announcedVisitors: AnnouncedVisitor[] = [];\n\t\tthis.deltaVisitors.forEach((getVisitor) => announcedVisitors.push(getVisitor()));\n\t\tconst combinedVisitor = combineVisitors([forestVisitor, ...announcedVisitors]);\n\t\tthis.activeVisitor = combinedVisitor;\n\t\treturn combinedVisitor;\n\t}\n\n\tpublic registerAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.add(visitor);\n\t}\n\n\tpublic deregisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.delete(visitor);\n\t}\n\n\tprivate nextRange = 0;\n\tpublic newDetachedField(): DetachedField {\n\t\tconst range: DetachedField = brand(String(this.nextRange));\n\t\tthis.nextRange += 1;\n\t\treturn range;\n\t}\n\n\tprivate add(nodes: Iterable<ITreeCursor>, key: FieldKey): void {\n\t\tconst field = Array.from(nodes, mapTreeFromCursor) as MutableMapTree[];\n\t\tthis.addFieldAsDetached(field, key);\n\t}\n\n\tprivate addFieldAsDetached(field: MutableMapTree[], key: FieldKey): void {\n\t\tassert(!this.roots.fields.has(key), 0x370 /* new range must not already exist */);\n\t\tif (field.length > 0) {\n\t\t\tthis.#roots.fields.set(key, field);\n\t\t}\n\t}\n\n\tprivate delete(field: FieldKey): void {\n\t\tthis.#roots.fields.delete(field);\n\t}\n\n\tpublic allocateCursor(source?: string): Cursor {\n\t\treturn new Cursor(this, source);\n\t}\n\n\tpublic tryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tconst path = this.anchors.locate(destination);\n\t\tif (path === undefined) {\n\t\t\treturn TreeNavigationResult.NotFound;\n\t\t}\n\t\tthis.moveCursorToPath(path, cursorToMove);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic tryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tif (destination.parent === undefined) {\n\t\t\tthis.moveCursorToPath(undefined, cursorToMove);\n\t\t} else {\n\t\t\tconst result = this.tryMoveCursorToNode(destination.parent, cursorToMove);\n\t\t\tif (result !== TreeNavigationResult.Ok) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tcursorToMove.enterField(destination.fieldKey);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic moveCursorToPath(\n\t\tdestination: UpPath | undefined,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): void {\n\t\tassert(\n\t\t\tcursorToMove instanceof Cursor,\n\t\t\t0x337 /* ObjectForest must only be given its own Cursor type */,\n\t\t);\n\t\tassert(\n\t\t\tcursorToMove.forest === this,\n\t\t\t0x338 /* ObjectForest must only be given its own Cursor */,\n\t\t);\n\n\t\tconst indexStack: number[] = [];\n\t\tconst keyStack: FieldKey[] = [];\n\n\t\tlet path: UpPath | undefined = destination;\n\t\twhile (path !== undefined) {\n\t\t\tindexStack.push(path.parentIndex);\n\t\t\tkeyStack.push(path.parentField);\n\t\t\tpath = path.parent;\n\t\t}\n\t\tcursorToMove.setToAboveDetachedSequences();\n\t\twhile (keyStack.length > 0) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tcursorToMove.enterField(keyStack.pop()!);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tcursorToMove.enterNode(indexStack.pop()!);\n\t\t}\n\n\t\treturn;\n\t}\n\n\tpublic getCursorAboveDetachedFields(): ITreeCursorSynchronous {\n\t\treturn cursorForMapTreeNode(this.roots);\n\t}\n}\n\n/**\n * Cursor implementation for ObjectForest.\n */\nclass Cursor extends SynchronousCursor implements ITreeSubscriptionCursor {\n\tpublic state: ITreeSubscriptionCursorState;\n\n\t/**\n\t * @param forest - forest this cursor navigates\n\t * @param innerCursor - underlying cursor implementation this wraps. `undefined` when state is not `Current`\n\t */\n\tpublic constructor(\n\t\tpublic readonly forest: ObjectForest,\n\t\tpublic readonly source: string | undefined,\n\t\tprivate innerCursor?: CursorWithNode<MutableMapTree>,\n\t) {\n\t\tsuper();\n\t\tif (innerCursor === undefined) {\n\t\t\tthis.state = ITreeSubscriptionCursorState.Cleared;\n\t\t} else {\n\t\t\tthis.state = ITreeSubscriptionCursorState.Current;\n\t\t\tthis.forest.currentCursors.add(this);\n\t\t}\n\t}\n\n\tpublic buildFieldAnchor(): FieldAnchor {\n\t\tconst path = this.getFieldPath();\n\t\tconst anchor =\n\t\t\tpath.parent === undefined ? undefined : this.forest.anchors.track(path.parent);\n\t\treturn { parent: anchor, fieldKey: path.field };\n\t}\n\tpublic getFieldPath(prefix?: PathRootPrefix): FieldUpPath {\n\t\tassert(this.innerCursor !== undefined, 0x45f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldPath(prefix);\n\t}\n\tpublic get mode(): CursorLocationType {\n\t\tassert(this.innerCursor !== undefined, 0x42e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.mode;\n\t}\n\n\tpublic nextField(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x42f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.nextField();\n\t}\n\tpublic exitField(): void {\n\t\tassert(this.innerCursor !== undefined, 0x430 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.exitField();\n\t}\n\tpublic override skipPendingFields(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x431 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.skipPendingFields();\n\t}\n\tpublic getFieldKey(): FieldKey {\n\t\tassert(this.innerCursor !== undefined, 0x432 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldKey();\n\t}\n\tpublic getFieldLength(): number {\n\t\tassert(this.innerCursor !== undefined, 0x433 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldLength();\n\t}\n\tpublic firstNode(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x434 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.firstNode();\n\t}\n\tpublic enterNode(childIndex: number): void {\n\t\tassert(this.innerCursor !== undefined, 0x435 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.enterNode(childIndex);\n\t}\n\tpublic getPath(prefix?: PathRootPrefix): UpPath {\n\t\tassert(this.innerCursor !== undefined, 0x436 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getPath(prefix) ?? fail(0xb27 /* no path when at root */);\n\t}\n\tpublic get fieldIndex(): number {\n\t\tassert(this.innerCursor !== undefined, 0x437 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.fieldIndex;\n\t}\n\tpublic get chunkStart(): number {\n\t\tassert(this.innerCursor !== undefined, 0x438 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.chunkStart;\n\t}\n\tpublic get chunkLength(): number {\n\t\tassert(this.innerCursor !== undefined, 0x439 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.chunkLength;\n\t}\n\tpublic seekNodes(offset: number): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43a /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.seekNodes(offset);\n\t}\n\tpublic nextNode(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43b /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.nextNode();\n\t}\n\tpublic exitNode(): void {\n\t\tassert(this.innerCursor !== undefined, 0x43c /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.exitNode();\n\t}\n\tpublic firstField(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43d /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.firstField();\n\t}\n\tpublic enterField(key: FieldKey): void {\n\t\tassert(this.innerCursor !== undefined, 0x43e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.enterField(key);\n\t}\n\tpublic get type(): TreeNodeSchemaIdentifier {\n\t\tassert(this.innerCursor !== undefined, 0x43f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.type;\n\t}\n\tpublic get value(): Value {\n\t\tassert(this.innerCursor !== undefined, 0x440 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.value;\n\t}\n\n\t// TODO: tests for clear when not at root.\n\tpublic clear(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33b /* Cursor must not be freed */,\n\t\t);\n\t\tthis.state = ITreeSubscriptionCursorState.Cleared;\n\t\tthis.innerCursor = undefined;\n\t\tthis.forest.currentCursors.delete(this);\n\t}\n\n\t/**\n\t * Move this cursor to the special dummy node above the detached sequences.\n\t * Can be used when cleared (but not freed).\n\t */\n\tpublic setToAboveDetachedSequences(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33c /* Cursor must not be freed */,\n\t\t);\n\t\tthis.clear();\n\t\tthis.state = ITreeSubscriptionCursorState.Current;\n\t\t// Cast to a cursor of _mutable_ trees to allow direct manipulation of the tree data which is more efficient than doing immutable copies.\n\t\tthis.innerCursor = cursorForMapTreeNode(\n\t\t\tthis.forest.roots,\n\t\t) as CursorWithNode<MutableMapTree>;\n\t\tthis.forest.currentCursors.add(this);\n\t}\n\n\tpublic getNode(): MutableMapTree {\n\t\tassert(this.innerCursor !== undefined, 0x33e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getNode();\n\t}\n\n\tpublic getParent(): [MutableMapTree, FieldKey] {\n\t\tassert(this.innerCursor !== undefined, 0x441 /* Cursor must be current to be used */);\n\t\t// This could be optimized to skip moving it accessing internals of cursor.\n\t\tconst key = this.innerCursor.getFieldKey();\n\t\tthis.innerCursor.exitField();\n\t\tconst node = this.innerCursor.getNode();\n\t\tthis.innerCursor.enterField(key);\n\t\treturn [node, key];\n\t}\n\n\tpublic fork(source?: string): ITreeSubscriptionCursor {\n\t\tassert(this.innerCursor !== undefined, 0x460 /* Cursor must be current to be used */);\n\t\treturn new Cursor(this.forest, source ?? `fork: ${this.source}`, this.innerCursor.fork());\n\t}\n\n\tpublic free(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33f /* Cursor must not be double freed */,\n\t\t);\n\t\tthis.forest.currentCursors.delete(this);\n\t\tthis.state = ITreeSubscriptionCursorState.Freed;\n\t}\n\n\tpublic buildAnchor(): Anchor {\n\t\tassert(\n\t\t\tthis.state === ITreeSubscriptionCursorState.Current,\n\t\t\t0x37a /* Cursor must be current to be used */,\n\t\t);\n\t\treturn this.forest.anchors.track(this.getPath());\n\t}\n}\n\n// This function is the folder level export for objectForest, and hides all the implementation types.\n// When other forest implementations are created (ex: optimized ones),\n// this function should likely be moved and updated to (at least conditionally) use them.\n/**\n * Returns an implementation of {@link IEditableForest} with no content.\n * @privateRemarks\n * TODO:\n * refactor to remove this function, and instead place `ForestTypeReference` and `ForestTypeExpensiveDebug` here as a better way to encapsulate ObjectForest.\n */\nexport function buildForest(\n\tbreaker: Breakable,\n\tschema?: TreeStoredSchemaSubscription,\n\tanchors?: AnchorSet,\n\tadditionalAsserts: boolean = false,\n): ObjectForest {\n\treturn new ObjectForest(breaker, schema, anchors, additionalAsserts);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"objectForest.js","sourceRoot":"","sources":["../../../src/feature-libraries/object-forest/objectForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+DAA6D;AAE7D,kEAAmE;AAEnE,kDAgC6B;AAC7B,kDAQ6B;AAC7B,yDAAkF;AAClF,0DAA8E;AAC9E,8DAA+E;AAC/E,yDAKoC;AAOpC,kGAAkG;AAClG,SAAS,gBAAgB,CAAC,OAAuB,EAAE,GAAa;IAC/D,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,QAAQ,GAAqB,EAAE,CAAC;IACtC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAClC,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED;;;;;GAKG;IACU,YAAY;;;;sBAAZ,YAAY;YAWxB,IAAW,KAAK;gBACf,OAAO,uBAAA,IAAI,2BAAO,CAAC;YACpB,CAAC;YAED,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C,qCAAqC,CAC3C,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,uCAA4B,CAAC,KAAK,CAAC;IACjD,CAAC;IAEM,WAAW;QACjB,IAAA,iBAAM,EACL,IAAI,CAAC,KAAK,KAAK,uCAA4B,CAAC,OAAO,EACnD,KAAK,CAAC,uCAAuC,CAC7C,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;CACD;AAED,qGAAqG;AACrG,sEAAsE;AACtE,yFAAyF;AACzF;;;;;GAKG;AACH,SAAgB,WAAW,CAC1B,OAAkB,EAClB,MAAqC,EACrC,OAAmB,EACnB,oBAA6B,KAAK;IAElC,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;AACtE,CAAC;AAPD,kCAOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type { Listenable } from \"@fluidframework/core-interfaces\";\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype Anchor,\n\tAnchorSet,\n\ttype AnnouncedVisitor,\n\ttype CursorLocationType,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaVisitor,\n\ttype DetachedField,\n\ttype FieldAnchor,\n\ttype FieldKey,\n\ttype FieldUpPath,\n\ttype ForestEvents,\n\ttype IEditableForest,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype MapTree,\n\ttype PathRootPrefix,\n\ttype PlaceIndex,\n\ttype Range,\n\ttype TreeChunk,\n\ttype TreeFieldStoredSchema,\n\tTreeNavigationResult,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeStoredSchemaSubscription,\n\ttype UpPath,\n\ttype Value,\n\taboveRootPlaceholder,\n\tcombineVisitors,\n\tdeepCopyMapTree,\n\trootFieldKey,\n} from \"../../core/index.js\";\nimport {\n\tassertNonNegativeSafeInteger,\n\tassertValidIndex,\n\tassertValidRange,\n\tbrand,\n\tbreakingMethod,\n\ttype Breakable,\n\ttype WithBreakable,\n} from \"../../util/index.js\";\nimport { chunkFieldSingle, defaultChunkPolicy } from \"../chunked-forest/index.js\";\nimport { cursorForMapTreeNode, mapTreeFromCursor } from \"../mapTreeCursor.js\";\nimport { type CursorWithNode, SynchronousCursor } from \"../treeCursorUtils.js\";\nimport {\n\tdefaultSchemaPolicy,\n\tFieldKinds,\n\tisFieldInSchema,\n\tthrowOutOfSchema,\n} from \"../default-schema/index.js\";\n\n/** A `MapTree` with mutable fields */\ninterface MutableMapTree extends MapTree {\n\treadonly fields: Map<FieldKey, MutableMapTree[]>;\n}\n\n/** Get a field from a `MutableMapTree`, optionally modifying the tree to create it if missing. */\nfunction getOrCreateField(mapTree: MutableMapTree, key: FieldKey): MutableMapTree[] {\n\tconst field = mapTree.fields.get(key);\n\tif (field !== undefined) {\n\t\treturn field;\n\t}\n\n\tconst newField: MutableMapTree[] = [];\n\tmapTree.fields.set(key, newField);\n\treturn newField;\n}\n\n/**\n * Reference implementation of IEditableForest.\n *\n * This implementation focuses on correctness and simplicity, not performance.\n * It does not use compressed chunks: instead nodes are implemented using objects.\n */\nexport class ObjectForest implements IEditableForest, WithBreakable {\n\tprivate activeVisitor?: DeltaVisitor;\n\n\t// All cursors that are in the \"Current\" state. Must be empty when editing.\n\tpublic readonly currentCursors: Set<Cursor> = new Set();\n\tprivate readonly deltaVisitors: Set<() => AnnouncedVisitor> = new Set();\n\n\treadonly #events = createEmitter<ForestEvents>();\n\tpublic readonly events: Listenable<ForestEvents> = this.#events;\n\n\treadonly #roots: MutableMapTree;\n\tpublic get roots(): MapTree {\n\t\treturn this.#roots;\n\t}\n\n\tpublic constructor(\n\t\tpublic readonly breaker: Breakable,\n\t\t/**\n\t\t * If provided, may be used for validation, but otherwise unused.\n\t\t */\n\t\tpublic readonly schema: TreeStoredSchemaSubscription | undefined,\n\t\tpublic readonly anchors: AnchorSet = new AnchorSet(),\n\t\tpublic readonly additionalAsserts: boolean = false,\n\t\troots?: MapTree,\n\t) {\n\t\tthis.#roots =\n\t\t\troots !== undefined\n\t\t\t\t? deepCopyMapTree(roots)\n\t\t\t\t: {\n\t\t\t\t\t\ttype: aboveRootPlaceholder,\n\t\t\t\t\t\tfields: new Map(),\n\t\t\t\t\t};\n\n\t\tif (additionalAsserts) {\n\t\t\tthis.checkSchema();\n\t\t}\n\t}\n\n\tpublic get isEmpty(): boolean {\n\t\treturn this.roots.fields.size === 0;\n\t}\n\n\tpublic clone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): ObjectForest {\n\t\treturn new ObjectForest(this.breaker, schema, anchors, this.additionalAsserts, this.roots);\n\t}\n\n\tpublic chunkField(cursor: ITreeCursorSynchronous): TreeChunk {\n\t\treturn chunkFieldSingle(cursor, { idCompressor: undefined, policy: defaultChunkPolicy });\n\t}\n\n\tpublic forgetAnchor(anchor: Anchor): void {\n\t\tthis.anchors.forget(anchor);\n\t}\n\n\t/**\n\t * Throw (and break) if content does not match schema.\n\t */\n\t@breakingMethod\n\tpublic checkSchema(): void {\n\t\tconst schema = this.schema;\n\t\tif (schema !== undefined) {\n\t\t\tconst roots = new Set([...this.roots.fields.keys(), rootFieldKey]);\n\t\t\tfor (const key of roots) {\n\t\t\t\tconst documentRoot = this.roots.fields.get(key) ?? [];\n\t\t\t\tconst fieldSchema: TreeFieldStoredSchema =\n\t\t\t\t\tkey === rootFieldKey\n\t\t\t\t\t\t? schema.rootFieldSchema\n\t\t\t\t\t\t: // TODO: someday we should have schema for detached fields, and use that instead of generating one here.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Some detached fields may have multiple nodes, so we must treat them as sequences:\n\t\t\t\t\t\t\t\tkind: FieldKinds.sequence.identifier,\n\t\t\t\t\t\t\t\ttypes: new Set(documentRoot.map((node) => node.type)),\n\n\t\t\t\t\t\t\t\t// Metadata is not used for schema checks\n\t\t\t\t\t\t\t\tpersistedMetadata: undefined,\n\t\t\t\t\t\t\t};\n\t\t\t\tisFieldInSchema(\n\t\t\t\t\tdocumentRoot,\n\t\t\t\t\tfieldSchema,\n\t\t\t\t\t{\n\t\t\t\t\t\tschema,\n\t\t\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t\t\t},\n\t\t\t\t\tthrowOutOfSchema,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic acquireVisitor(): DeltaVisitor {\n\t\tassert(\n\t\t\tthis.activeVisitor === undefined,\n\t\t\t0x76c /* Must release existing visitor before acquiring another */,\n\t\t);\n\n\t\t// Note: This code uses cursors, however it also modifies the tree.\n\t\t// In general this is not safe, but this code happens to only modify the tree below the current cursor location,\n\t\t// which happens to work.\n\t\t// This pattern could be generalized/formalized with a concept of an exclusive cursor,\n\t\t// which can edit, but is the only cursor allowed at the time.\n\n\t\tconst cursor: Cursor = this.allocateCursor(\"acquireVisitor\");\n\t\tcursor.setToAboveDetachedSequences();\n\n\t\t/**\n\t\t * Called before each edit to allow cursor cleanup to happen and ensure that there are no unexpected cursors.\n\t\t * This is required for each change since there may be app facing change event handlers which create cursors.\n\t\t */\n\t\tconst preEdit = (): void => {\n\t\t\tthis.#events.emit(\"beforeChange\");\n\t\t\tassert(\n\t\t\t\tthis.currentCursors.has(cursor),\n\t\t\t\t0x995 /* missing visitor cursor while editing */,\n\t\t\t);\n\t\t\tif (this.currentCursors.size > 1) {\n\t\t\t\tconst unexpectedSources = [...this.currentCursors].flatMap((c) =>\n\t\t\t\t\tc === cursor ? [] : (c.source ?? null),\n\t\t\t\t);\n\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Found unexpected cursors when editing with the following annotations: ${JSON.stringify(\n\t\t\t\t\t\tunexpectedSources,\n\t\t\t\t\t)}`,\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tclass Visitor implements DeltaVisitor {\n\t\t\tpublic constructor(private readonly forest: ObjectForest) {}\n\t\t\tpublic free(): void {\n\t\t\t\tcursor.free();\n\t\t\t\tassert(\n\t\t\t\t\tthis.forest.activeVisitor !== undefined,\n\t\t\t\t\t0x76d /* Multiple free calls for same visitor */,\n\t\t\t\t);\n\t\t\t\tthis.forest.activeVisitor = undefined;\n\t\t\t\tif (this.forest.additionalAsserts) {\n\t\t\t\t\t// Schema validation:\n\t\t\t\t\t// When doing \"additionalAsserts\", validate the content against the schema after every batch of edits.\n\t\t\t\t\tthis.forest.checkSchema();\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic destroy(detachedField: FieldKey, count: number): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.forest.delete(detachedField);\n\t\t\t}\n\t\t\tpublic create(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.forest.add(content, destination);\n\t\t\t\tthis.forest.#events.emit(\"afterRootFieldCreated\", destination);\n\t\t\t}\n\t\t\tpublic attach(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.attachEdit(source, count, destination);\n\t\t\t}\n\t\t\tpublic detach(source: Range, destination: FieldKey, id: DeltaDetachedNodeId): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.detachEdit(source, destination);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Attaches the nodes from the given source field into the current field.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The the range to be attached.\n\t\t\t * @param count - The number of nodes being attached.\n\t\t\t * Expected to match the number of nodes in the source detached field.\n\t\t\t * @param destination - The index in the current field at which to attach the content.\n\t\t\t */\n\t\t\tprivate attachEdit(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tassertNonNegativeSafeInteger(count);\n\t\t\t\tif (count === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst [parent, key] = cursor.getParent();\n\t\t\t\tassert(\n\t\t\t\t\tparent !== this.forest.roots || key !== source,\n\t\t\t\t\t0x7b6 /* Attach source field must be different from current field */,\n\t\t\t\t);\n\t\t\t\tconst currentField = getOrCreateField(parent, key);\n\t\t\t\tassertValidIndex(destination, currentField, true);\n\t\t\t\tconst sourceField = this.forest.#roots.fields.get(source) ?? [];\n\t\t\t\tassert(sourceField !== undefined, 0x7b7 /* Attach source field must exist */);\n\t\t\t\tassert(\n\t\t\t\t\tsourceField.length === count,\n\t\t\t\t\t0x7b8 /* Attach must consume all nodes in source field */,\n\t\t\t\t);\n\t\t\t\t// TODO: this will fail for very large insertions due to argument limits.\n\t\t\t\tcurrentField.splice(destination, 0, ...sourceField);\n\t\t\t\tthis.forest.delete(source);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Detaches the range from the current field and transfers it to the given destination if any.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The bounds of the range to be detached from the current field.\n\t\t\t * @param destination - If specified, the destination to transfer the detached range to.\n\t\t\t * If not specified, the detached range is destroyed.\n\t\t\t */\n\t\t\tprivate detachEdit(source: Range, destination: FieldKey | undefined): void {\n\t\t\t\tconst [parent, key] = cursor.getParent();\n\t\t\t\tassert(\n\t\t\t\t\tdestination === undefined || parent !== this.forest.roots || key !== destination,\n\t\t\t\t\t0x7b9 /* Detach destination field must be different from current field */,\n\t\t\t\t);\n\t\t\t\tconst currentField = getOrCreateField(parent, key);\n\t\t\t\tassertValidRange(source, currentField);\n\t\t\t\tconst content = currentField.splice(source.start, source.end - source.start);\n\t\t\t\tif (destination !== undefined) {\n\t\t\t\t\tthis.forest.addFieldAsDetached(content, destination);\n\t\t\t\t}\n\t\t\t\t// This check is performed after the transfer to ensure that the field is not removed in scenarios\n\t\t\t\t// where the source and destination are the same.\n\t\t\t\tif (currentField.length === 0) {\n\t\t\t\t\tparent.fields.delete(key);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic enterNode(index: number): void {\n\t\t\t\tcursor.enterNode(index);\n\t\t\t}\n\t\t\tpublic exitNode(index: number): void {\n\t\t\t\tcursor.exitNode();\n\t\t\t}\n\t\t\tpublic enterField(key: FieldKey): void {\n\t\t\t\tcursor.enterField(key);\n\t\t\t}\n\t\t\tpublic exitField(key: FieldKey): void {\n\t\t\t\tcursor.exitField();\n\t\t\t}\n\t\t}\n\n\t\tconst forestVisitor = new Visitor(this);\n\t\tconst announcedVisitors: AnnouncedVisitor[] = [];\n\t\tthis.deltaVisitors.forEach((getVisitor) => announcedVisitors.push(getVisitor()));\n\t\tconst combinedVisitor = combineVisitors([forestVisitor, ...announcedVisitors]);\n\t\tthis.activeVisitor = combinedVisitor;\n\t\treturn combinedVisitor;\n\t}\n\n\tpublic registerAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.add(visitor);\n\t}\n\n\tpublic deregisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.delete(visitor);\n\t}\n\n\tprivate nextRange = 0;\n\tpublic newDetachedField(): DetachedField {\n\t\tconst range: DetachedField = brand(String(this.nextRange));\n\t\tthis.nextRange += 1;\n\t\treturn range;\n\t}\n\n\tprivate add(nodes: Iterable<ITreeCursor>, key: FieldKey): void {\n\t\tconst field = Array.from(nodes, mapTreeFromCursor) as MutableMapTree[];\n\t\tthis.addFieldAsDetached(field, key);\n\t}\n\n\tprivate addFieldAsDetached(field: MutableMapTree[], key: FieldKey): void {\n\t\tassert(!this.roots.fields.has(key), 0x370 /* new range must not already exist */);\n\t\tif (field.length > 0) {\n\t\t\tthis.#roots.fields.set(key, field);\n\t\t}\n\t}\n\n\tprivate delete(field: FieldKey): void {\n\t\tthis.#roots.fields.delete(field);\n\t}\n\n\tpublic allocateCursor(source?: string): Cursor {\n\t\treturn new Cursor(this, source);\n\t}\n\n\tpublic tryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tconst path = this.anchors.locate(destination);\n\t\tif (path === undefined) {\n\t\t\treturn TreeNavigationResult.NotFound;\n\t\t}\n\t\tthis.moveCursorToPath(path, cursorToMove);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic tryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tif (destination.parent === undefined) {\n\t\t\tthis.moveCursorToPath(undefined, cursorToMove);\n\t\t} else {\n\t\t\tconst result = this.tryMoveCursorToNode(destination.parent, cursorToMove);\n\t\t\tif (result !== TreeNavigationResult.Ok) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tcursorToMove.enterField(destination.fieldKey);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic moveCursorToPath(\n\t\tdestination: UpPath | undefined,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): void {\n\t\tassert(\n\t\t\tcursorToMove instanceof Cursor,\n\t\t\t0x337 /* ObjectForest must only be given its own Cursor type */,\n\t\t);\n\t\tassert(\n\t\t\tcursorToMove.forest === this,\n\t\t\t0x338 /* ObjectForest must only be given its own Cursor */,\n\t\t);\n\n\t\tconst indexStack: number[] = [];\n\t\tconst keyStack: FieldKey[] = [];\n\n\t\tlet path: UpPath | undefined = destination;\n\t\twhile (path !== undefined) {\n\t\t\tindexStack.push(path.parentIndex);\n\t\t\tkeyStack.push(path.parentField);\n\t\t\tpath = path.parent;\n\t\t}\n\t\tcursorToMove.setToAboveDetachedSequences();\n\t\twhile (keyStack.length > 0) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tcursorToMove.enterField(keyStack.pop()!);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tcursorToMove.enterNode(indexStack.pop()!);\n\t\t}\n\n\t\treturn;\n\t}\n\n\tpublic getCursorAboveDetachedFields(): ITreeCursorSynchronous {\n\t\treturn cursorForMapTreeNode(this.roots);\n\t}\n}\n\n/**\n * Cursor implementation for ObjectForest.\n */\nclass Cursor extends SynchronousCursor implements ITreeSubscriptionCursor {\n\tpublic state: ITreeSubscriptionCursorState;\n\n\t/**\n\t * @param forest - forest this cursor navigates\n\t * @param innerCursor - underlying cursor implementation this wraps. `undefined` when state is not `Current`\n\t */\n\tpublic constructor(\n\t\tpublic readonly forest: ObjectForest,\n\t\tpublic readonly source: string | undefined,\n\t\tprivate innerCursor?: CursorWithNode<MutableMapTree>,\n\t) {\n\t\tsuper();\n\t\tif (innerCursor === undefined) {\n\t\t\tthis.state = ITreeSubscriptionCursorState.Cleared;\n\t\t} else {\n\t\t\tthis.state = ITreeSubscriptionCursorState.Current;\n\t\t\tthis.forest.currentCursors.add(this);\n\t\t}\n\t}\n\n\tpublic buildFieldAnchor(): FieldAnchor {\n\t\tconst path = this.getFieldPath();\n\t\tconst anchor =\n\t\t\tpath.parent === undefined ? undefined : this.forest.anchors.track(path.parent);\n\t\treturn { parent: anchor, fieldKey: path.field };\n\t}\n\tpublic getFieldPath(prefix?: PathRootPrefix): FieldUpPath {\n\t\tassert(this.innerCursor !== undefined, 0x45f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldPath(prefix);\n\t}\n\tpublic get mode(): CursorLocationType {\n\t\tassert(this.innerCursor !== undefined, 0x42e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.mode;\n\t}\n\n\tpublic nextField(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x42f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.nextField();\n\t}\n\tpublic exitField(): void {\n\t\tassert(this.innerCursor !== undefined, 0x430 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.exitField();\n\t}\n\tpublic override skipPendingFields(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x431 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.skipPendingFields();\n\t}\n\tpublic getFieldKey(): FieldKey {\n\t\tassert(this.innerCursor !== undefined, 0x432 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldKey();\n\t}\n\tpublic getFieldLength(): number {\n\t\tassert(this.innerCursor !== undefined, 0x433 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldLength();\n\t}\n\tpublic firstNode(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x434 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.firstNode();\n\t}\n\tpublic enterNode(childIndex: number): void {\n\t\tassert(this.innerCursor !== undefined, 0x435 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.enterNode(childIndex);\n\t}\n\tpublic getPath(prefix?: PathRootPrefix): UpPath {\n\t\tassert(this.innerCursor !== undefined, 0x436 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getPath(prefix) ?? fail(0xb27 /* no path when at root */);\n\t}\n\tpublic get fieldIndex(): number {\n\t\tassert(this.innerCursor !== undefined, 0x437 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.fieldIndex;\n\t}\n\tpublic get chunkStart(): number {\n\t\tassert(this.innerCursor !== undefined, 0x438 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.chunkStart;\n\t}\n\tpublic get chunkLength(): number {\n\t\tassert(this.innerCursor !== undefined, 0x439 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.chunkLength;\n\t}\n\tpublic seekNodes(offset: number): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43a /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.seekNodes(offset);\n\t}\n\tpublic nextNode(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43b /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.nextNode();\n\t}\n\tpublic exitNode(): void {\n\t\tassert(this.innerCursor !== undefined, 0x43c /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.exitNode();\n\t}\n\tpublic firstField(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43d /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.firstField();\n\t}\n\tpublic enterField(key: FieldKey): void {\n\t\tassert(this.innerCursor !== undefined, 0x43e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.enterField(key);\n\t}\n\tpublic get type(): TreeNodeSchemaIdentifier {\n\t\tassert(this.innerCursor !== undefined, 0x43f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.type;\n\t}\n\tpublic get value(): Value {\n\t\tassert(this.innerCursor !== undefined, 0x440 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.value;\n\t}\n\n\t// TODO: tests for clear when not at root.\n\tpublic clear(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33b /* Cursor must not be freed */,\n\t\t);\n\t\tthis.state = ITreeSubscriptionCursorState.Cleared;\n\t\tthis.innerCursor = undefined;\n\t\tthis.forest.currentCursors.delete(this);\n\t}\n\n\t/**\n\t * Move this cursor to the special dummy node above the detached sequences.\n\t * Can be used when cleared (but not freed).\n\t */\n\tpublic setToAboveDetachedSequences(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33c /* Cursor must not be freed */,\n\t\t);\n\t\tthis.clear();\n\t\tthis.state = ITreeSubscriptionCursorState.Current;\n\t\t// Cast to a cursor of _mutable_ trees to allow direct manipulation of the tree data which is more efficient than doing immutable copies.\n\t\tthis.innerCursor = cursorForMapTreeNode(\n\t\t\tthis.forest.roots,\n\t\t) as CursorWithNode<MutableMapTree>;\n\t\tthis.forest.currentCursors.add(this);\n\t}\n\n\tpublic getNode(): MutableMapTree {\n\t\tassert(this.innerCursor !== undefined, 0x33e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getNode();\n\t}\n\n\tpublic getParent(): [MutableMapTree, FieldKey] {\n\t\tassert(this.innerCursor !== undefined, 0x441 /* Cursor must be current to be used */);\n\t\t// This could be optimized to skip moving it accessing internals of cursor.\n\t\tconst key = this.innerCursor.getFieldKey();\n\t\tthis.innerCursor.exitField();\n\t\tconst node = this.innerCursor.getNode();\n\t\tthis.innerCursor.enterField(key);\n\t\treturn [node, key];\n\t}\n\n\tpublic fork(source?: string): ITreeSubscriptionCursor {\n\t\tassert(this.innerCursor !== undefined, 0x460 /* Cursor must be current to be used */);\n\t\treturn new Cursor(this.forest, source ?? `fork: ${this.source}`, this.innerCursor.fork());\n\t}\n\n\tpublic free(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33f /* Cursor must not be double freed */,\n\t\t);\n\t\tthis.forest.currentCursors.delete(this);\n\t\tthis.state = ITreeSubscriptionCursorState.Freed;\n\t}\n\n\tpublic buildAnchor(): Anchor {\n\t\tassert(\n\t\t\tthis.state === ITreeSubscriptionCursorState.Current,\n\t\t\t0x37a /* Cursor must be current to be used */,\n\t\t);\n\t\treturn this.forest.anchors.track(this.getPath());\n\t}\n}\n\n// This function is the folder level export for objectForest, and hides all the implementation types.\n// When other forest implementations are created (ex: optimized ones),\n// this function should likely be moved and updated to (at least conditionally) use them.\n/**\n * Returns an implementation of {@link IEditableForest} with no content.\n * @privateRemarks\n * TODO:\n * refactor to remove this function, and instead place `ForestTypeReference` and `ForestTypeExpensiveDebug` here as a better way to encapsulate ObjectForest.\n */\nexport function buildForest(\n\tbreaker: Breakable,\n\tschema?: TreeStoredSchemaSubscription,\n\tanchors?: AnchorSet,\n\tadditionalAsserts: boolean = false,\n): ObjectForest {\n\treturn new ObjectForest(breaker, schema, anchors, additionalAsserts);\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export type Listenable<T extends object> = EventListenable<T>;
|
|
|
30
30
|
export type Off = EventOff;
|
|
31
31
|
export { TreeStatus, TreeCompressionStrategy, type TreeIndex, type TreeIndexKey, type TreeIndexNodes, } from "./feature-libraries/index.js";
|
|
32
32
|
export { type ITreeInternal, type SharedTreeOptions, type ForestType, type SharedTreeFormatOptions, SharedTreeFormatVersion, Tree, type RunTransaction, type ForestOptions, getBranch, type BranchableTree, type TreeBranchFork, independentInitializedView, type ViewContent, TreeAlpha, type TreeIdentifierUtils, independentView, ForestTypeOptimized, ForestTypeExpensiveDebug, ForestTypeReference, } from "./shared-tree/index.js";
|
|
33
|
-
export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, SchemaFactoryAlpha, type SchemaFactoryObjectOptions, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaAlpha, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, ObjectNodeSchema, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type FieldPropsAlpha, type InternalTreeNode, type WithType, type NodeChangedData, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type System_Unsafe, type FieldSchemaAlphaUnsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, type SimpleTreeIndex, type IdentifierIndex, createSimpleTreeIndex, createIdentifierIndex, adaptEnum, enumFromStrings, singletonSchema, type UnsafeUnknownSchema, type TreeViewAlpha, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, type ReadableField, type ReadSchema, type ImplicitAnnotatedAllowedTypes, type ImplicitAnnotatedFieldSchema, type AnnotatedAllowedType, type AnnotatedAllowedTypes, type NormalizedAnnotatedAllowedTypes, type AllowedTypeMetadata, type AllowedTypesMetadata, type InsertableObjectFromAnnotatedSchemaRecord, type UnannotateImplicitAllowedTypes, type UnannotateAllowedTypes, type UnannotateAllowedType, type UnannotateAllowedTypesList, type UnannotateAllowedTypeOrLazyItem, type UnannotateImplicitFieldSchema, type UnannotateSchemaRecord, TreeBeta, type TreeChangeEventsBeta, type VerboseTreeNode, type TreeEncodingOptions, type TreeSchemaEncodingOptions, type TreeSchema, TreeViewConfigurationAlpha, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, type JsonTreeSchema, type JsonSchemaId, type JsonNodeSchema, type JsonNodeSchemaBase, type JsonLeafNodeSchema, type JsonMapNodeSchema, type JsonArrayNodeSchema, type JsonObjectNodeSchema, type JsonFieldSchema, type JsonSchemaRef, type JsonRefPath, type JsonSchemaType, type JsonLeafSchemaType, type JsonRecordNodeSchema, type JsonStringKeyPatternProperties, getJsonSchema, type LazyItem, type Unenforced, type SimpleNodeSchemaBase, type SimpleNodeSchemaBaseAlpha, type SimpleTreeSchema, type SimpleNodeSchema, type SimpleFieldSchema, type SimpleLeafNodeSchema, type SimpleMapNodeSchema, type SimpleArrayNodeSchema, type SimpleObjectNodeSchema, type SimpleObjectFieldSchema, type SimpleRecordNodeSchema, normalizeAllowedTypes, getSimpleSchema, type ReadonlyArrayNode, type InsertableTreeNodeFromAllowedTypes, type Input, type TreeBranch, type TreeBranchEvents, asTreeViewAlpha, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, type NodeSchemaMetadata, type SchemaStatics, type ITreeAlpha, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type LeafSchema, type ArrayNodeCustomizableSchema, type ArrayNodePojoEmulationSchema, ArrayNodeSchema, type MapNodeCustomizableSchema, type MapNodePojoEmulationSchema, MapNodeSchema, type ObjectFromSchemaRecord, type ValidateRecursiveSchemaTemplate, type FixRecursiveRecursionLimit, RecordNodeSchema, type RecordNodeCustomizableSchema, type RecordNodeInsertableData, type RecordNodePojoEmulationSchema, type TreeRecordNode, } from "./simple-tree/index.js";
|
|
33
|
+
export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, SchemaFactoryAlpha, type SchemaFactoryObjectOptions, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaAlpha, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, ObjectNodeSchema, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type FieldPropsAlpha, normalizeFieldSchema, type InternalTreeNode, type WithType, type NodeChangedData, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type System_Unsafe, type FieldSchemaAlphaUnsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, type SimpleTreeIndex, type IdentifierIndex, createSimpleTreeIndex, createIdentifierIndex, adaptEnum, enumFromStrings, singletonSchema, type UnsafeUnknownSchema, type TreeViewAlpha, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, type ReadableField, type ReadSchema, type ImplicitAnnotatedAllowedTypes, type ImplicitAnnotatedFieldSchema, type AnnotatedAllowedType, type AnnotatedAllowedTypes, type NormalizedAnnotatedAllowedTypes, type AllowedTypeMetadata, type AllowedTypesMetadata, type InsertableObjectFromAnnotatedSchemaRecord, type UnannotateImplicitAllowedTypes, type UnannotateAllowedTypes, type UnannotateAllowedType, type UnannotateAllowedTypesList, type UnannotateAllowedTypeOrLazyItem, type UnannotateImplicitFieldSchema, type UnannotateSchemaRecord, TreeBeta, type TreeChangeEventsBeta, type VerboseTreeNode, type TreeEncodingOptions, type TreeSchemaEncodingOptions, type TreeSchema, TreeViewConfigurationAlpha, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, type JsonTreeSchema, type JsonSchemaId, type JsonNodeSchema, type JsonNodeSchemaBase, type JsonLeafNodeSchema, type JsonMapNodeSchema, type JsonArrayNodeSchema, type JsonObjectNodeSchema, type JsonFieldSchema, type JsonSchemaRef, type JsonRefPath, type JsonSchemaType, type JsonLeafSchemaType, type JsonRecordNodeSchema, type JsonStringKeyPatternProperties, getJsonSchema, type LazyItem, type Unenforced, type SimpleNodeSchemaBase, type SimpleNodeSchemaBaseAlpha, type SimpleTreeSchema, type SimpleNodeSchema, type SimpleFieldSchema, type SimpleLeafNodeSchema, type SimpleMapNodeSchema, type SimpleArrayNodeSchema, type SimpleObjectNodeSchema, type SimpleObjectFieldSchema, type SimpleRecordNodeSchema, normalizeAllowedTypes, walkFieldSchema, walkNodeSchema, walkAllowedTypes, type SchemaVisitor, getSimpleSchema, type ReadonlyArrayNode, type InsertableTreeNodeFromAllowedTypes, type Input, type TreeBranch, type TreeBranchEvents, asTreeViewAlpha, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, type NodeSchemaMetadata, type SchemaStatics, type ITreeAlpha, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type LeafSchema, type ArrayNodeCustomizableSchema, type ArrayNodePojoEmulationSchema, ArrayNodeSchema, type MapNodeCustomizableSchema, type MapNodePojoEmulationSchema, MapNodeSchema, type ObjectFromSchemaRecord, type ValidateRecursiveSchemaTemplate, type FixRecursiveRecursionLimit, RecordNodeSchema, type RecordNodeCustomizableSchema, type RecordNodeInsertableData, type RecordNodePojoEmulationSchema, type TreeRecordNode, } from "./simple-tree/index.js";
|
|
34
34
|
export { SharedTree, configuredSharedTree, } from "./treeFactory.js";
|
|
35
35
|
export { SharedTreeAttributes, SharedTreeFactoryType } from "./sharedTreeAttributes.js";
|
|
36
36
|
export { persistedToSimpleSchema } from "./shared-tree/index.js";
|