@fluidframework/tree 2.71.0 → 2.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +125 -40
- package/api-report/tree.alpha.api.md +44 -48
- package/api-report/tree.beta.api.md +42 -0
- package/api-report/tree.legacy.beta.api.md +42 -0
- package/dist/alpha.d.ts +12 -8
- package/dist/api.d.ts +6 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +2 -11
- package/dist/api.js.map +1 -1
- package/dist/beta.d.ts +7 -0
- package/dist/codec/codec.d.ts +23 -1
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +23 -3
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/index.d.ts +1 -1
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +2 -1
- package/dist/codec/index.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +7 -2
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js +24 -1
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/codec/versioned/index.d.ts +1 -1
- package/dist/codec/versioned/index.d.ts.map +1 -1
- package/dist/codec/versioned/index.js +2 -1
- package/dist/codec/versioned/index.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 +2 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/schema-stored/index.d.ts +1 -1
- package/dist/core/schema-stored/index.d.ts.map +1 -1
- package/dist/core/schema-stored/index.js +2 -2
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +18 -7
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +6 -7
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +2 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.d.ts +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -2
- package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.js +3 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts +2 -3
- package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecs.js +31 -8
- package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +10 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.js +8 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.d.ts +2 -2
- package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.js +3 -3
- package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.js +3 -3
- package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/dist/core/tree/index.d.ts +2 -1
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js.map +1 -1
- package/dist/external-utilities/typeboxValidator.js +1 -1
- package/dist/external-utilities/typeboxValidator.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +4 -5
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +1 -0
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +2 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -10
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +39 -21
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +6 -6
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +4 -2
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +163 -6
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +13 -4
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +8 -3
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js +4 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +13 -13
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +23 -6
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +9 -8
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +20 -4
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js +2 -2
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +35 -25
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +54 -74
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +1 -3
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -8
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts +4 -5
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +15 -4
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/format.d.ts +9 -2
- package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/format.js +11 -4
- package/dist/feature-libraries/forest-summary/format.js.map +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts +2 -1
- package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/index.js +3 -1
- package/dist/feature-libraries/forest-summary/index.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +6 -5
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +9 -8
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.js +1 -2
- package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts +38 -12
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.js +29 -11
- package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +3 -2
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +0 -1
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +1 -3
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +5 -6
- package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -8
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +1 -2
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +66 -9
- 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 +3 -2
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/optional-field/index.d.ts +1 -1
- package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/index.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/index.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -7
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +5 -4
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts +10 -10
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +24 -18
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.d.ts +2 -2
- package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.js +1 -1
- package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.d.ts +1 -2
- package/dist/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/feature-libraries/{default-schema/schemaChecker.d.ts → schemaChecker.d.ts} +2 -2
- package/dist/feature-libraries/schemaChecker.d.ts.map +1 -0
- package/dist/feature-libraries/{default-schema/schemaChecker.js → schemaChecker.js} +3 -3
- package/dist/feature-libraries/schemaChecker.js.map +1 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js +0 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +7 -0
- 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 +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +22 -15
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +1 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +1 -2
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +12 -60
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +68 -159
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +8 -7
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +10 -11
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +4 -2
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +1 -3
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +19 -6
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +42 -18
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +36 -0
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +40 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js +4 -4
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV5.d.ts +2 -2
- package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV5.js +1 -1
- package/dist/shared-tree-core/editManagerFormatV5.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +5 -3
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +12 -3
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV5.d.ts +2 -1
- package/dist/shared-tree-core/messageCodecV5.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV5.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +19 -6
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +49 -21
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +48 -0
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -0
- package/dist/shared-tree-core/messageFormat.js +53 -0
- package/dist/shared-tree-core/messageFormat.js.map +1 -0
- package/dist/shared-tree-core/sharedTreeCore.d.ts +8 -8
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +3 -3
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +2 -0
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js +10 -0
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts +2 -2
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +4 -2
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +8 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +2 -98
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +1 -52
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts +98 -2
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.js +61 -7
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js +13 -4
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts +28 -0
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -0
- package/dist/simple-tree/api/simpleSchemaCodec.js +290 -0
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -0
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +103 -0
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -0
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +128 -0
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -0
- package/dist/simple-tree/api/storedSchema.d.ts +2 -2
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +8 -6
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +3 -3
- package/dist/simple-tree/api/tree.js +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +6 -6
- package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +18 -3
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +78 -35
- package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +3 -3
- package/dist/simple-tree/core/allowedTypes.js +2 -2
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +3 -3
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +3 -1
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/toStored.d.ts +12 -5
- package/dist/simple-tree/core/toStored.d.ts.map +1 -1
- package/dist/simple-tree/core/toStored.js +26 -10
- package/dist/simple-tree/core/toStored.js.map +1 -1
- package/dist/simple-tree/core/treeNode.js +1 -1
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +1 -6
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.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 +1 -2
- package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js +1 -8
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +3 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +12 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +0 -1
- package/dist/simple-tree/leafNodeSchema.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 +14 -50
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +2 -6
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +4 -12
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +3 -7
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +25 -5
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts +249 -0
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -0
- package/dist/simple-tree/simpleSchemaFormatV1.js +115 -0
- package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -0
- package/dist/simple-tree/toStoredSchema.d.ts +20 -8
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +27 -22
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +18 -15
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/dist/tableSchema.d.ts +22 -52
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +141 -277
- package/dist/tableSchema.js.map +1 -1
- package/dist/treeFactory.d.ts +3 -1
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +26 -2
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/arrayUtilities.d.ts +45 -0
- package/dist/util/arrayUtilities.d.ts.map +1 -0
- package/dist/util/arrayUtilities.js +76 -0
- package/dist/util/arrayUtilities.js.map +1 -0
- package/dist/util/brand.d.ts +31 -2
- package/dist/util/brand.d.ts.map +1 -1
- package/dist/util/brand.js +28 -2
- package/dist/util/brand.js.map +1 -1
- package/dist/util/brandedMap.d.ts +3 -1
- package/dist/util/brandedMap.d.ts.map +1 -1
- package/dist/util/brandedMap.js.map +1 -1
- package/dist/util/index.d.ts +2 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +8 -2
- package/dist/util/index.js.map +1 -1
- package/lib/alpha.d.ts +12 -8
- package/lib/api.d.ts +6 -2
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js +2 -13
- package/lib/api.js.map +1 -1
- package/lib/beta.d.ts +7 -0
- package/lib/codec/codec.d.ts +23 -1
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +23 -3
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/index.d.ts +1 -1
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts +7 -2
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js +22 -0
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/codec/versioned/index.d.ts +1 -1
- package/lib/codec/versioned/index.d.ts.map +1 -1
- package/lib/codec/versioned/index.js +1 -1
- package/lib/codec/versioned/index.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/schema-stored/index.d.ts +1 -1
- package/lib/core/schema-stored/index.d.ts.map +1 -1
- package/lib/core/schema-stored/index.js +1 -1
- package/lib/core/schema-stored/index.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +18 -7
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +6 -7
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +2 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.d.ts +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.js +3 -2
- package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.js +4 -2
- package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts +2 -3
- package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecs.js +31 -8
- package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +10 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.js +7 -0
- package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV1.d.ts +2 -2
- package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV1.js +3 -3
- package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.js +3 -3
- package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/lib/core/tree/index.d.ts +2 -1
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +1 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/external-utilities/typeboxValidator.js +1 -1
- package/lib/external-utilities/typeboxValidator.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +4 -5
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +2 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +2 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -10
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +42 -23
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +6 -6
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +5 -3
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +163 -6
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +12 -3
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +8 -3
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js +4 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +13 -13
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +22 -6
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +9 -8
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +17 -2
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js +1 -1
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +35 -25
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +56 -76
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +1 -3
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -3
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts +4 -5
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +16 -5
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/format.d.ts +9 -2
- package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/format.js +9 -2
- package/lib/feature-libraries/forest-summary/format.js.map +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts +2 -1
- package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/index.js +1 -0
- package/lib/feature-libraries/forest-summary/index.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +6 -5
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +5 -4
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.js +1 -2
- package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts +38 -12
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.js +29 -11
- package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +3 -2
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +0 -1
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +0 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +5 -6
- package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -8
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +1 -2
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +66 -9
- 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 +2 -1
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/optional-field/index.d.ts +1 -1
- package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/index.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/index.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -7
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +6 -5
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts +10 -10
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +26 -20
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.d.ts +2 -2
- package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.js +2 -2
- package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.d.ts +1 -2
- package/lib/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.js +2 -2
- package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/feature-libraries/{default-schema/schemaChecker.d.ts → schemaChecker.d.ts} +2 -2
- package/lib/feature-libraries/schemaChecker.d.ts.map +1 -0
- package/lib/feature-libraries/{default-schema/schemaChecker.js → schemaChecker.js} +3 -3
- package/lib/feature-libraries/schemaChecker.js.map +1 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js +0 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +7 -0
- 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 +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +11 -4
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +1 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +12 -60
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +70 -161
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +8 -7
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +5 -6
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +5 -3
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +1 -3
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +19 -6
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +39 -17
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +36 -0
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +39 -0
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js +5 -5
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV5.d.ts +2 -2
- package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV5.js +2 -2
- package/lib/shared-tree-core/editManagerFormatV5.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +5 -3
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +4 -2
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV5.d.ts +2 -1
- package/lib/shared-tree-core/messageCodecV5.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV5.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +19 -6
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +46 -20
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +48 -0
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -0
- package/lib/shared-tree-core/messageFormat.js +50 -0
- package/lib/shared-tree-core/messageFormat.js.map +1 -0
- package/lib/shared-tree-core/sharedTreeCore.d.ts +8 -8
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +3 -3
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +2 -0
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js +10 -0
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts +2 -2
- package/lib/simple-tree/api/discrepancies.js.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +4 -2
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +2 -0
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +2 -98
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -52
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts +98 -2
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js +58 -4
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js +14 -5
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts +28 -0
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -0
- package/lib/simple-tree/api/simpleSchemaCodec.js +262 -0
- package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -0
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +103 -0
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -0
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +122 -0
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -0
- package/lib/simple-tree/api/storedSchema.d.ts +2 -2
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +5 -3
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +3 -3
- package/lib/simple-tree/api/tree.js +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +6 -6
- package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +18 -3
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +75 -34
- package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +3 -3
- package/lib/simple-tree/core/allowedTypes.js +2 -2
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +3 -3
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +2 -2
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/toStored.d.ts +12 -5
- package/lib/simple-tree/core/toStored.d.ts.map +1 -1
- package/lib/simple-tree/core/toStored.js +25 -9
- package/lib/simple-tree/core/toStored.js.map +1 -1
- package/lib/simple-tree/core/treeNode.js +1 -1
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +1 -6
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.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 +1 -2
- package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js +2 -9
- package/lib/simple-tree/fieldSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +3 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +2 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +1 -2
- package/lib/simple-tree/leafNodeSchema.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 +17 -53
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +5 -9
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +6 -14
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +6 -10
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +25 -5
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts +249 -0
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -0
- package/lib/simple-tree/simpleSchemaFormatV1.js +112 -0
- package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -0
- package/lib/simple-tree/toStoredSchema.d.ts +20 -8
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +28 -24
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +20 -17
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/lib/tableSchema.d.ts +22 -52
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +143 -279
- package/lib/tableSchema.js.map +1 -1
- package/lib/treeFactory.d.ts +3 -1
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +23 -1
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/arrayUtilities.d.ts +45 -0
- package/lib/util/arrayUtilities.d.ts.map +1 -0
- package/lib/util/arrayUtilities.js +69 -0
- package/lib/util/arrayUtilities.js.map +1 -0
- package/lib/util/brand.d.ts +31 -2
- package/lib/util/brand.d.ts.map +1 -1
- package/lib/util/brand.js +26 -1
- package/lib/util/brand.js.map +1 -1
- package/lib/util/brandedMap.d.ts +3 -1
- package/lib/util/brandedMap.d.ts.map +1 -1
- package/lib/util/brandedMap.js.map +1 -1
- package/lib/util/index.d.ts +2 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -1
- package/lib/util/index.js.map +1 -1
- package/package.json +24 -24
- package/src/api.ts +22 -11
- package/src/codec/codec.ts +25 -3
- package/src/codec/index.ts +1 -0
- package/src/codec/versioned/codec.ts +40 -2
- package/src/codec/versioned/index.ts +1 -0
- package/src/core/index.ts +1 -2
- package/src/core/schema-stored/index.ts +1 -2
- package/src/core/schema-stored/schema.ts +22 -8
- package/src/core/tree/detachedFieldIndexCodecCommon.ts +2 -1
- package/src/core/tree/detachedFieldIndexCodecV1.ts +4 -2
- package/src/core/tree/detachedFieldIndexCodecV2.ts +4 -6
- package/src/core/tree/detachedFieldIndexCodecs.ts +40 -11
- package/src/core/tree/detachedFieldIndexFormatCommon.ts +17 -2
- package/src/core/tree/detachedFieldIndexFormatV1.ts +6 -4
- package/src/core/tree/detachedFieldIndexFormatV2.ts +6 -4
- package/src/core/tree/index.ts +2 -4
- package/src/external-utilities/typeboxValidator.ts +1 -1
- package/src/feature-libraries/README.md +1 -1
- package/src/feature-libraries/chunked-forest/chunkTree.ts +3 -3
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +5 -0
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +2 -1
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +65 -27
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +9 -4
- package/src/feature-libraries/chunked-forest/codec/format.ts +26 -5
- package/src/feature-libraries/chunked-forest/codec/formatGeneric.ts +7 -2
- package/src/feature-libraries/chunked-forest/codec/index.ts +1 -2
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +62 -9
- package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +24 -2
- package/src/feature-libraries/chunked-forest/index.ts +1 -2
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +88 -103
- package/src/feature-libraries/default-schema/index.ts +1 -9
- package/src/feature-libraries/forest-summary/codec.ts +24 -9
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
- package/src/feature-libraries/forest-summary/format.ts +25 -9
- package/src/feature-libraries/forest-summary/index.ts +2 -1
- package/src/feature-libraries/index.ts +8 -7
- package/src/feature-libraries/modular-schema/comparison.ts +2 -3
- package/src/feature-libraries/modular-schema/fieldKind.ts +90 -13
- package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +2 -3
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +6 -6
- package/src/feature-libraries/modular-schema/index.ts +0 -1
- package/src/feature-libraries/modular-schema/isNeverTree.ts +7 -8
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +13 -13
- package/src/feature-libraries/object-forest/objectForest.ts +2 -6
- package/src/feature-libraries/optional-field/index.ts +1 -0
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +1 -5
- package/src/feature-libraries/schema-edits/index.ts +0 -1
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +16 -16
- package/src/feature-libraries/schema-index/codec.ts +41 -22
- package/src/feature-libraries/schema-index/formatV1.ts +2 -2
- package/src/feature-libraries/schema-index/formatV2.ts +2 -2
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +2 -1
- package/src/feature-libraries/{default-schema/schemaChecker.ts → schemaChecker.ts} +4 -4
- package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +0 -2
- package/src/index.ts +6 -2
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +16 -5
- package/src/shared-tree/index.ts +0 -1
- package/src/shared-tree/sharedTree.ts +92 -222
- package/src/shared-tree/sharedTreeChangeCodecs.ts +14 -13
- package/src/shared-tree/sharedTreeChangeFamily.ts +2 -2
- package/src/shared-tree/treeAlpha.ts +6 -5
- package/src/shared-tree/treeCheckout.ts +1 -3
- package/src/shared-tree-core/editManagerCodecs.ts +69 -20
- package/src/shared-tree-core/editManagerFormatCommons.ts +46 -0
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +10 -5
- package/src/shared-tree-core/editManagerFormatV5.ts +3 -3
- package/src/shared-tree-core/index.ts +15 -5
- package/src/shared-tree-core/messageCodecV1ToV4.ts +6 -1
- package/src/shared-tree-core/messageCodecV5.ts +2 -1
- package/src/shared-tree-core/messageCodecs.ts +77 -28
- package/src/shared-tree-core/messageFormat.ts +58 -0
- package/src/shared-tree-core/sharedTreeCore.ts +11 -13
- package/src/simple-tree/api/configuration.ts +17 -4
- package/src/simple-tree/api/discrepancies.ts +2 -2
- package/src/simple-tree/api/incrementalAllowedTypes.ts +1 -1
- package/src/simple-tree/api/index.ts +11 -2
- package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -168
- package/src/simple-tree/api/schemaFactoryBeta.ts +180 -14
- package/src/simple-tree/api/schemaFromSimple.ts +20 -9
- package/src/simple-tree/api/simpleSchemaCodec.ts +361 -0
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +135 -0
- package/src/simple-tree/api/storedSchema.ts +8 -5
- package/src/simple-tree/api/tree.ts +3 -3
- package/src/simple-tree/api/typesUnsafe.ts +6 -6
- package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +80 -47
- package/src/simple-tree/core/allowedTypes.ts +4 -4
- package/src/simple-tree/core/index.ts +3 -1
- package/src/simple-tree/core/toStored.ts +42 -18
- package/src/simple-tree/core/treeNode.ts +2 -2
- package/src/simple-tree/core/treeNodeSchema.ts +1 -7
- package/src/simple-tree/core/treeNodeValid.ts +0 -2
- package/src/simple-tree/fieldSchema.ts +2 -11
- package/src/simple-tree/index.ts +11 -2
- package/src/simple-tree/leafNodeSchema.ts +1 -2
- package/src/simple-tree/node-kinds/array/arrayNode.ts +28 -77
- package/src/simple-tree/node-kinds/map/mapNode.ts +3 -17
- package/src/simple-tree/node-kinds/object/objectNode.ts +5 -20
- package/src/simple-tree/node-kinds/record/recordNode.ts +4 -18
- package/src/simple-tree/simpleSchema.ts +27 -5
- package/src/simple-tree/simpleSchemaFormatV1.ts +179 -0
- package/src/simple-tree/toStoredSchema.ts +54 -38
- package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +22 -17
- package/src/tableSchema.ts +110 -331
- package/src/treeFactory.ts +33 -1
- package/src/util/arrayUtilities.ts +88 -0
- package/src/util/brand.ts +40 -2
- package/src/util/brandedMap.ts +3 -1
- package/src/util/index.ts +7 -0
- package/dist/feature-libraries/default-schema/defaultSchema.d.ts +0 -10
- package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +0 -1
- package/dist/feature-libraries/default-schema/defaultSchema.js +0 -15
- package/dist/feature-libraries/default-schema/defaultSchema.js.map +0 -1
- package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +0 -1
- package/dist/feature-libraries/default-schema/schemaChecker.js.map +0 -1
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +0 -50
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +0 -1
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +0 -76
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts +0 -12
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.js +0 -158
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.js.map +0 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +0 -11
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +0 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +0 -245
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +0 -1
- package/lib/feature-libraries/default-schema/defaultSchema.d.ts +0 -10
- package/lib/feature-libraries/default-schema/defaultSchema.d.ts.map +0 -1
- package/lib/feature-libraries/default-schema/defaultSchema.js +0 -12
- package/lib/feature-libraries/default-schema/defaultSchema.js.map +0 -1
- package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +0 -1
- package/lib/feature-libraries/default-schema/schemaChecker.js.map +0 -1
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +0 -50
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +0 -1
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +0 -71
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts +0 -12
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.js +0 -154
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.js.map +0 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +0 -11
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +0 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +0 -241
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +0 -1
- package/src/feature-libraries/default-schema/defaultSchema.ts +0 -15
- package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +0 -108
- package/src/feature-libraries/optional-field/optionalFieldCodecV1.ts +0 -208
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +0 -344
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EACN,KAAK,SAAS,EACd,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAIf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,mBAAmB,EAGnB,KAAK,gBAAgB,EAKrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAS,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAE5F;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC3C,aAAa,EAAE,uBAAuB,GACpC,mBAAmB,CAOrB;AAED,wBAAgB,2BAA2B,CAC1C,aAAa,EAAE,uBAAuB,GACpC,SAAS,CAEX;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,oBAAoB,CAAC,EAAE,mBAAmB,GACxC,UAAU,CAAC,gBAAgB,CAAC,CAO9B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAKvF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACzB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,mBAAmB,GAC1B,cAAc,CAShB"}
|
|
@@ -6,36 +6,42 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.encodeRepo = exports.makeSchemaCodecs = exports.makeSchemaCodec = exports.getCodecTreeForSchemaFormat = exports.clientVersionToSchemaVersion = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
|
+
const internal_2 = require("@fluidframework/runtime-utils/internal");
|
|
9
10
|
const index_js_1 = require("../../codec/index.js");
|
|
10
11
|
const index_js_2 = require("../../core/index.js");
|
|
11
12
|
const index_js_3 = require("../../util/index.js");
|
|
12
13
|
const formatV1_js_1 = require("./formatV1.js");
|
|
13
14
|
const formatV2_js_1 = require("./formatV2.js");
|
|
14
15
|
/**
|
|
15
|
-
* Convert a MinimumVersionForCollab to a
|
|
16
|
+
* Convert a MinimumVersionForCollab to a SchemaFormatVersion.
|
|
16
17
|
* @param clientVersion - The MinimumVersionForCollab to convert.
|
|
17
|
-
* @returns The
|
|
18
|
+
* @returns The SchemaFormatVersion that corresponds to the provided MinimumVersionForCollab.
|
|
18
19
|
*/
|
|
19
20
|
function clientVersionToSchemaVersion(clientVersion) {
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
return (0, index_js_3.brand)((0, internal_2.getConfigForMinVersionForCollab)(clientVersion, {
|
|
22
|
+
[internal_2.lowestMinVersionForCollab]: index_js_2.SchemaFormatVersion.v1,
|
|
23
|
+
[index_js_1.FluidClientVersion.v2_43]: index_js_2.SchemaFormatVersion.v2,
|
|
24
|
+
}));
|
|
22
25
|
}
|
|
23
26
|
exports.clientVersionToSchemaVersion = clientVersionToSchemaVersion;
|
|
24
|
-
function getCodecTreeForSchemaFormat(
|
|
25
|
-
return { name: "Schema", version };
|
|
27
|
+
function getCodecTreeForSchemaFormat(clientVersion) {
|
|
28
|
+
return { name: "Schema", version: clientVersionToSchemaVersion(clientVersion) };
|
|
26
29
|
}
|
|
27
30
|
exports.getCodecTreeForSchemaFormat = getCodecTreeForSchemaFormat;
|
|
28
31
|
/**
|
|
29
32
|
* Create a schema codec.
|
|
30
|
-
* @param options - Specifies common codec options, including which `validator` to use.
|
|
31
|
-
* @param
|
|
33
|
+
* @param options - Specifies common codec options, including `minVersionForCollab` and which `validator` to use.
|
|
34
|
+
* @param writeVersionOverride - The schema version to write. If not provided, the version will be derived from `minVersionForCollab`.
|
|
32
35
|
* @returns The composed codec.
|
|
33
36
|
*
|
|
34
37
|
* @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.
|
|
35
38
|
*/
|
|
36
|
-
function makeSchemaCodec(options,
|
|
39
|
+
function makeSchemaCodec(options, writeVersionOverride) {
|
|
37
40
|
const family = makeSchemaCodecs(options);
|
|
38
|
-
return (0, index_js_1.makeVersionDispatchingCodec)(family, {
|
|
41
|
+
return (0, index_js_1.makeVersionDispatchingCodec)(family, {
|
|
42
|
+
...options,
|
|
43
|
+
writeVersion: writeVersionOverride ?? clientVersionToSchemaVersion(options.minVersionForCollab),
|
|
44
|
+
});
|
|
39
45
|
}
|
|
40
46
|
exports.makeSchemaCodec = makeSchemaCodec;
|
|
41
47
|
/**
|
|
@@ -45,8 +51,8 @@ exports.makeSchemaCodec = makeSchemaCodec;
|
|
|
45
51
|
*/
|
|
46
52
|
function makeSchemaCodecs(options) {
|
|
47
53
|
return (0, index_js_1.makeCodecFamily)([
|
|
48
|
-
[index_js_2.
|
|
49
|
-
[index_js_2.
|
|
54
|
+
[index_js_2.SchemaFormatVersion.v1, makeSchemaCodecV1(options)],
|
|
55
|
+
[index_js_2.SchemaFormatVersion.v2, makeSchemaCodecV2(options)],
|
|
50
56
|
]);
|
|
51
57
|
}
|
|
52
58
|
exports.makeSchemaCodecs = makeSchemaCodecs;
|
|
@@ -58,9 +64,9 @@ exports.makeSchemaCodecs = makeSchemaCodecs;
|
|
|
58
64
|
*/
|
|
59
65
|
function encodeRepo(repo, version) {
|
|
60
66
|
switch (version) {
|
|
61
|
-
case index_js_2.
|
|
67
|
+
case index_js_2.SchemaFormatVersion.v1:
|
|
62
68
|
return encodeRepoV1(repo);
|
|
63
|
-
case index_js_2.
|
|
69
|
+
case index_js_2.SchemaFormatVersion.v2:
|
|
64
70
|
return encodeRepoV2(repo);
|
|
65
71
|
default:
|
|
66
72
|
(0, internal_1.unreachableCase)(version);
|
|
@@ -71,7 +77,7 @@ function encodeRepoV1(repo) {
|
|
|
71
77
|
const nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV1());
|
|
72
78
|
const rootFieldSchema = (0, index_js_2.encodeFieldSchemaV1)(repo.rootFieldSchema);
|
|
73
79
|
return {
|
|
74
|
-
version: index_js_2.
|
|
80
|
+
version: index_js_2.SchemaFormatVersion.v1,
|
|
75
81
|
nodes: nodeSchema,
|
|
76
82
|
root: rootFieldSchema,
|
|
77
83
|
};
|
|
@@ -80,7 +86,7 @@ function encodeRepoV2(repo) {
|
|
|
80
86
|
const nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV2());
|
|
81
87
|
const rootFieldSchema = (0, index_js_2.encodeFieldSchemaV2)(repo.rootFieldSchema);
|
|
82
88
|
return {
|
|
83
|
-
version: index_js_2.
|
|
89
|
+
version: index_js_2.SchemaFormatVersion.v2,
|
|
84
90
|
nodes: nodeSchema,
|
|
85
91
|
root: rootFieldSchema,
|
|
86
92
|
};
|
|
@@ -134,7 +140,7 @@ function decodeV2(f) {
|
|
|
134
140
|
* @returns The codec.
|
|
135
141
|
*/
|
|
136
142
|
function makeSchemaCodecV1(options) {
|
|
137
|
-
return (0, index_js_1.makeVersionedValidatedCodec)(options, new Set([index_js_2.
|
|
143
|
+
return (0, index_js_1.makeVersionedValidatedCodec)(options, new Set([index_js_2.SchemaFormatVersion.v1]), formatV1_js_1.Format, {
|
|
138
144
|
encode: (data) => encodeRepoV1(data),
|
|
139
145
|
decode: (data) => decodeV1(data),
|
|
140
146
|
});
|
|
@@ -145,7 +151,7 @@ function makeSchemaCodecV1(options) {
|
|
|
145
151
|
* @returns The codec.
|
|
146
152
|
*/
|
|
147
153
|
function makeSchemaCodecV2(options) {
|
|
148
|
-
return (0, index_js_1.makeVersionedValidatedCodec)(options, new Set([index_js_2.
|
|
154
|
+
return (0, index_js_1.makeVersionedValidatedCodec)(options, new Set([index_js_2.SchemaFormatVersion.v2]), formatV2_js_1.Format, {
|
|
149
155
|
encode: (data) => encodeRepoV2(data),
|
|
150
156
|
decode: (data) => decodeV2(data),
|
|
151
157
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA4E;AAE5E,mDAQ8B;AAC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,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;KAC1C,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,OAAsB;IAChD,OAAO,IAAA,sCAA2B,EAAC,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,wBAAa,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAQ,EAAE;QAClF,MAAM,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;KAC1C,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype CodecTree,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n\tmakeVersionedValidatedCodec,\n} from \"../../codec/index.js\";\nimport {\n\tSchemaVersion,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchemaV1,\n\tencodeFieldSchemaV2,\n\tstoredSchemaDecodeDispatcher,\n} from \"../../core/index.js\";\nimport { brand, type JsonCompatible } from \"../../util/index.js\";\n\nimport { Format as FormatV1 } from \"./formatV1.js\";\nimport { Format as FormatV2 } from \"./formatV2.js\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\n\n/**\n * Convert a MinimumVersionForCollab to a SchemaVersion.\n * @param clientVersion - The MinimumVersionForCollab to convert.\n * @returns The SchemaVersion that corresponds to the provided MinimumVersionForCollab.\n */\nexport function clientVersionToSchemaVersion(\n\tclientVersion: MinimumVersionForCollab,\n): SchemaVersion {\n\t// Only one version of the schema codec is currently supported.\n\treturn SchemaVersion.v1;\n}\n\nexport function getCodecTreeForSchemaFormat(version: SchemaVersion): CodecTree {\n\treturn { name: \"Schema\", version };\n}\n\n/**\n * Create a schema codec.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @param writeVersion - The schema write version.\n * @returns The composed codec.\n *\n * @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.\n */\nexport function makeSchemaCodec(\n\toptions: ICodecOptions,\n\twriteVersion: SchemaVersion,\n): IJsonCodec<TreeStoredSchema> {\n\tconst family = makeSchemaCodecs(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * Create a family of schema codecs.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The composed codec family.\n */\nexport function makeSchemaCodecs(options: ICodecOptions): ICodecFamily<TreeStoredSchema> {\n\treturn makeCodecFamily([\n\t\t[SchemaVersion.v1, makeSchemaCodecV1(options)],\n\t\t[SchemaVersion.v2, makeSchemaCodecV2(options)],\n\t]);\n}\n\n/**\n * Encode an in-memory TreeStoredSchema into the specified format version.\n * @param repo - The in-memory schema.\n * @param version - The schema write version.\n * @returns The encoded schema.\n */\nexport function encodeRepo(repo: TreeStoredSchema, version: SchemaVersion): JsonCompatible {\n\tswitch (version) {\n\t\tcase SchemaVersion.v1:\n\t\t\treturn encodeRepoV1(repo) as JsonCompatible;\n\t\tcase SchemaVersion.v2:\n\t\t\treturn encodeRepoV2(repo) as JsonCompatible;\n\t\tdefault:\n\t\t\tunreachableCase(version);\n\t}\n}\n\nfunction encodeRepoV1(repo: TreeStoredSchema): FormatV1 {\n\tconst nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV1());\n\tconst rootFieldSchema = encodeFieldSchemaV1(repo.rootFieldSchema);\n\treturn {\n\t\tversion: SchemaVersion.v1,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\nfunction encodeRepoV2(repo: TreeStoredSchema): FormatV2 {\n\tconst nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV2());\n\tconst rootFieldSchema = encodeFieldSchemaV2(repo.rootFieldSchema);\n\treturn {\n\t\tversion: SchemaVersion.v2,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\n/**\n * Shared logic for encoding node schemas.\n * @param repo - The stored schema to encode.\n * @param encodeValue - A function which encodes a single node schema.\n * @returns The encoded node schema.\n */\nfunction encodeNodeSchema<TFormat>(\n\trepo: TreeStoredSchema,\n\tencodeValue: (schema: TreeNodeStoredSchema) => TFormat,\n): Record<string, TFormat> {\n\tconst nodeSchema: Record<string, TFormat> = Object.create(null);\n\tfor (const name of [...repo.nodeSchema.keys()].sort()) {\n\t\tconst schema = repo.nodeSchema.get(name) ?? fail(0xb28 /* missing schema */);\n\t\tObject.defineProperty(nodeSchema, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tvalue: encodeValue(schema),\n\t\t});\n\t}\n\n\treturn nodeSchema;\n}\n\nfunction decodeV1(f: FormatV1): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tconst storedSchemaDecoder = storedSchemaDecodeDispatcher.dispatch(schema);\n\n\t\t// No metadata in v1, so pass undefined\n\t\tnodeSchema.set(brand(key), storedSchemaDecoder(undefined));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\nfunction decodeV2(f: FormatV2): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tconst storedSchemaDecoder = storedSchemaDecodeDispatcher.dispatch(schema.kind);\n\n\t\t// Pass in the node metadata\n\t\tnodeSchema.set(brand(key), storedSchemaDecoder(schema.metadata));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The codec.\n */\nfunction makeSchemaCodecV1(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV1> {\n\treturn makeVersionedValidatedCodec(options, new Set([SchemaVersion.v1]), FormatV1, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepoV1(data),\n\t\tdecode: (data: FormatV1) => decodeV1(data),\n\t});\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The codec.\n */\nfunction makeSchemaCodecV2(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV2> {\n\treturn makeVersionedValidatedCodec(options, new Set([SchemaVersion.v2]), FormatV2, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepoV2(data),\n\t\tdecode: (data: FormatV2) => decodeV2(data),\n\t});\n}\n"]}
|
|
1
|
+
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA4E;AAC5E,qEAGgD;AAEhD,mDAU8B;AAC9B,kDAS6B;AAC7B,kDAAiE;AAEjE,+CAAmD;AACnD,+CAAmD;AAGnD;;;;GAIG;AACH,SAAgB,4BAA4B,CAC3C,aAAsC;IAEtC,OAAO,IAAA,gBAAK,EACX,IAAA,0CAA+B,EAAC,aAAa,EAAE;QAC9C,CAAC,oCAAyB,CAAC,EAAE,8BAAmB,CAAC,EAAE;QACnD,CAAC,6BAAkB,CAAC,KAAK,CAAC,EAAE,8BAAmB,CAAC,EAAE;KAClD,CAAC,CACF,CAAC;AACH,CAAC;AATD,oEASC;AAED,SAAgB,2BAA2B,CAC1C,aAAsC;IAEtC,OA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AC;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,OAAsB;IAChD,OAAO,IAAA,sCAA2B,EAAC,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,8BAAmB,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAQ,EAAE;QACxF,MAAM,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;KAC1C,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport {\n\tgetConfigForMinVersionForCollab,\n\tlowestMinVersionForCollab,\n} from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\ttype CodecTree,\n\ttype CodecWriteOptions,\n\tFluidClientVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n\tmakeVersionedValidatedCodec,\n} from \"../../codec/index.js\";\nimport {\n\tSchemaFormatVersion,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchemaV1,\n\tencodeFieldSchemaV2,\n\tstoredSchemaDecodeDispatcher,\n} from \"../../core/index.js\";\nimport { brand, type JsonCompatible } from \"../../util/index.js\";\n\nimport { Format as FormatV1 } from \"./formatV1.js\";\nimport { Format as FormatV2 } from \"./formatV2.js\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\n\n/**\n * Convert a MinimumVersionForCollab to a SchemaFormatVersion.\n * @param clientVersion - The MinimumVersionForCollab to convert.\n * @returns The SchemaFormatVersion that corresponds to the provided MinimumVersionForCollab.\n */\nexport function clientVersionToSchemaVersion(\n\tclientVersion: MinimumVersionForCollab,\n): SchemaFormatVersion {\n\treturn brand(\n\t\tgetConfigForMinVersionForCollab(clientVersion, {\n\t\t\t[lowestMinVersionForCollab]: SchemaFormatVersion.v1,\n\t\t\t[FluidClientVersion.v2_43]: SchemaFormatVersion.v2,\n\t\t}),\n\t);\n}\n\nexport function getCodecTreeForSchemaFormat(\n\tclientVersion: MinimumVersionForCollab,\n): CodecTree {\n\treturn { name: \"Schema\", version: clientVersionToSchemaVersion(clientVersion) };\n}\n\n/**\n * Create a schema codec.\n * @param options - Specifies common codec options, including `minVersionForCollab` and which `validator` to use.\n * @param writeVersionOverride - The schema version to write. If not provided, the version will be derived from `minVersionForCollab`.\n * @returns The composed codec.\n *\n * @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.\n */\nexport function makeSchemaCodec(\n\toptions: CodecWriteOptions,\n\twriteVersionOverride?: SchemaFormatVersion,\n): IJsonCodec<TreeStoredSchema> {\n\tconst family = makeSchemaCodecs(options);\n\treturn makeVersionDispatchingCodec(family, {\n\t\t...options,\n\t\twriteVersion:\n\t\t\twriteVersionOverride ?? clientVersionToSchemaVersion(options.minVersionForCollab),\n\t});\n}\n\n/**\n * Create a family of schema codecs.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The composed codec family.\n */\nexport function makeSchemaCodecs(options: ICodecOptions): ICodecFamily<TreeStoredSchema> {\n\treturn makeCodecFamily([\n\t\t[SchemaFormatVersion.v1, makeSchemaCodecV1(options)],\n\t\t[SchemaFormatVersion.v2, makeSchemaCodecV2(options)],\n\t]);\n}\n\n/**\n * Encode an in-memory TreeStoredSchema into the specified format version.\n * @param repo - The in-memory schema.\n * @param version - The schema write version.\n * @returns The encoded schema.\n */\nexport function encodeRepo(\n\trepo: TreeStoredSchema,\n\tversion: SchemaFormatVersion,\n): JsonCompatible {\n\tswitch (version) {\n\t\tcase SchemaFormatVersion.v1:\n\t\t\treturn encodeRepoV1(repo) as JsonCompatible;\n\t\tcase SchemaFormatVersion.v2:\n\t\t\treturn encodeRepoV2(repo) as JsonCompatible;\n\t\tdefault:\n\t\t\tunreachableCase(version);\n\t}\n}\n\nfunction encodeRepoV1(repo: TreeStoredSchema): FormatV1 {\n\tconst nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV1());\n\tconst rootFieldSchema = encodeFieldSchemaV1(repo.rootFieldSchema);\n\treturn {\n\t\tversion: SchemaFormatVersion.v1,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\nfunction encodeRepoV2(repo: TreeStoredSchema): FormatV2 {\n\tconst nodeSchema = encodeNodeSchema(repo, (schema) => schema.encodeV2());\n\tconst rootFieldSchema = encodeFieldSchemaV2(repo.rootFieldSchema);\n\treturn {\n\t\tversion: SchemaFormatVersion.v2,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\n/**\n * Shared logic for encoding node schemas.\n * @param repo - The stored schema to encode.\n * @param encodeValue - A function which encodes a single node schema.\n * @returns The encoded node schema.\n */\nfunction encodeNodeSchema<TFormat>(\n\trepo: TreeStoredSchema,\n\tencodeValue: (schema: TreeNodeStoredSchema) => TFormat,\n): Record<string, TFormat> {\n\tconst nodeSchema: Record<string, TFormat> = Object.create(null);\n\tfor (const name of [...repo.nodeSchema.keys()].sort()) {\n\t\tconst schema = repo.nodeSchema.get(name) ?? fail(0xb28 /* missing schema */);\n\t\tObject.defineProperty(nodeSchema, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tvalue: encodeValue(schema),\n\t\t});\n\t}\n\n\treturn nodeSchema;\n}\n\nfunction decodeV1(f: FormatV1): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tconst storedSchemaDecoder = storedSchemaDecodeDispatcher.dispatch(schema);\n\n\t\t// No metadata in v1, so pass undefined\n\t\tnodeSchema.set(brand(key), storedSchemaDecoder(undefined));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\nfunction decodeV2(f: FormatV2): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tconst storedSchemaDecoder = storedSchemaDecodeDispatcher.dispatch(schema.kind);\n\n\t\t// Pass in the node metadata\n\t\tnodeSchema.set(brand(key), storedSchemaDecoder(schema.metadata));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The codec.\n */\nfunction makeSchemaCodecV1(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV1> {\n\treturn makeVersionedValidatedCodec(options, new Set([SchemaFormatVersion.v1]), FormatV1, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepoV1(data),\n\t\tdecode: (data: FormatV1) => decodeV1(data),\n\t});\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The codec.\n */\nfunction makeSchemaCodecV2(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV2> {\n\treturn makeVersionedValidatedCodec(options, new Set([SchemaFormatVersion.v2]), FormatV2, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepoV2(data),\n\t\tdecode: (data: FormatV2) => decodeV2(data),\n\t});\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { type Static } from "@sinclair/typebox";
|
|
6
|
-
import {
|
|
6
|
+
import { schemaFormatV1 } from "../../core/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* Format for encoding as json.
|
|
9
9
|
*
|
|
@@ -15,7 +15,7 @@ import { SchemaVersion, schemaFormatV1 } from "../../core/index.js";
|
|
|
15
15
|
* It also makes it simpler to determinately sort by keys.
|
|
16
16
|
*/
|
|
17
17
|
export declare const Format: import("@sinclair/typebox").TObject<{
|
|
18
|
-
version: import("@sinclair/typebox").TLiteral<
|
|
18
|
+
version: import("@sinclair/typebox").TLiteral<1>;
|
|
19
19
|
nodes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
20
20
|
object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
21
21
|
kind: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKindIdentifier>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAE1E,OAAO,
|
|
1
|
+
{"version":3,"file":"formatV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAuB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1E;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;EAOlB,CAAC;AACF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -19,7 +19,7 @@ const noAdditionalProps = { additionalProperties: false };
|
|
|
19
19
|
* It also makes it simpler to determinately sort by keys.
|
|
20
20
|
*/
|
|
21
21
|
exports.Format = typebox_1.Type.Object({
|
|
22
|
-
version: typebox_1.Type.Literal(index_js_1.
|
|
22
|
+
version: typebox_1.Type.Literal(index_js_1.SchemaFormatVersion.v1),
|
|
23
23
|
nodes: typebox_1.Type.Record(typebox_1.Type.String(), index_js_1.schemaFormatV1.TreeNodeSchemaDataFormat),
|
|
24
24
|
root: index_js_1.schemaFormatV1.FieldSchemaFormat,
|
|
25
25
|
}, noAdditionalProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,
|
|
1
|
+
{"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,kDAA0E;AAE1E,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE;;;;;;;;;GASG;AACU,QAAA,MAAM,GAAG,cAAI,CAAC,MAAM,CAChC;IACC,OAAO,EAAE,cAAI,CAAC,OAAO,CAAC,8BAAmB,CAAC,EAAE,CAAC;IAC7C,KAAK,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,yBAAc,CAAC,wBAAwB,CAAC;IAC1E,IAAI,EAAE,yBAAc,CAAC,iBAAiB;CACtC,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { SchemaFormatVersion, schemaFormatV1 } from \"../../core/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n/**\n * Format for encoding as json.\n *\n * For consistency all lists are sorted and undefined values are omitted.\n *\n * This chooses to use lists of named objects instead of maps:\n * this choice is somewhat arbitrary, but avoids user data being used as object keys,\n * which can sometimes be an issue (for example handling that for \"__proto__\" can require care).\n * It also makes it simpler to determinately sort by keys.\n */\nexport const Format = Type.Object(\n\t{\n\t\tversion: Type.Literal(SchemaFormatVersion.v1),\n\t\tnodes: Type.Record(Type.String(), schemaFormatV1.TreeNodeSchemaDataFormat),\n\t\troot: schemaFormatV1.FieldSchemaFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type Format = Static<typeof Format>;\n"]}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { type Static } from "@sinclair/typebox";
|
|
6
|
-
import { SchemaVersion } from "../../core/index.js";
|
|
7
6
|
/**
|
|
8
7
|
* Format for encoding as json.
|
|
9
8
|
*
|
|
@@ -15,7 +14,7 @@ import { SchemaVersion } from "../../core/index.js";
|
|
|
15
14
|
* It also makes it simpler to determinately sort by keys.
|
|
16
15
|
*/
|
|
17
16
|
export declare const Format: import("@sinclair/typebox").TObject<{
|
|
18
|
-
version: import("@sinclair/typebox").TLiteral<
|
|
17
|
+
version: import("@sinclair/typebox").TLiteral<2>;
|
|
19
18
|
nodes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
20
19
|
kind: import("@sinclair/typebox").TObject<{
|
|
21
20
|
object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAM1E;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;EAOlB,CAAC;AACF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -19,7 +19,7 @@ const noAdditionalProps = { additionalProperties: false };
|
|
|
19
19
|
* It also makes it simpler to determinately sort by keys.
|
|
20
20
|
*/
|
|
21
21
|
exports.Format = typebox_1.Type.Object({
|
|
22
|
-
version: typebox_1.Type.Literal(index_js_1.
|
|
22
|
+
version: typebox_1.Type.Literal(index_js_1.SchemaFormatVersion.v2),
|
|
23
23
|
nodes: typebox_1.Type.Record(typebox_1.Type.String(), index_js_1.schemaFormatV2.TreeNodeSchemaDataFormat),
|
|
24
24
|
root: index_js_1.schemaFormatV2.FieldSchemaFormat,
|
|
25
25
|
}, noAdditionalProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,
|
|
1
|
+
{"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,kDAA0E;AAE1E,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE;;;;;;;;;GASG;AACU,QAAA,MAAM,GAAG,cAAI,CAAC,MAAM,CAChC;IACC,OAAO,EAAE,cAAI,CAAC,OAAO,CAAC,8BAAmB,CAAC,EAAE,CAAC;IAC7C,KAAK,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,yBAAc,CAAC,wBAAwB,CAAC;IAC1E,IAAI,EAAE,yBAAc,CAAC,iBAAiB;CACtC,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { SchemaFormatVersion, schemaFormatV2 } from \"../../core/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n/**\n * Format for encoding as json.\n *\n * For consistency all lists are sorted and undefined values are omitted.\n *\n * This chooses to use lists of named objects instead of maps:\n * this choice is somewhat arbitrary, but avoids user data being used as object keys,\n * which can sometimes be an issue (for example handling that for \"__proto__\" can require care).\n * It also makes it simpler to determinately sort by keys.\n */\nexport const Format = Type.Object(\n\t{\n\t\tversion: Type.Literal(SchemaFormatVersion.v2),\n\t\tnodes: Type.Record(Type.String(), schemaFormatV2.TreeNodeSchemaDataFormat),\n\t\troot: schemaFormatV2.FieldSchemaFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type Format = Static<typeof Format>;\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
|
|
6
6
|
import type { IExperimentalIncrementalSummaryContext, ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions/internal";
|
|
7
7
|
import type { IJsonCodec } from "../../codec/index.js";
|
|
8
|
-
import { type MutableTreeStoredSchema, type TreeStoredSchema } from "../../core/index.js";
|
|
8
|
+
import { type MutableTreeStoredSchema, type SchemaFormatVersion, type TreeStoredSchema } from "../../core/index.js";
|
|
9
9
|
import type { Summarizable, SummaryElementParser, SummaryElementStringifier } from "../../shared-tree-core/index.js";
|
|
10
10
|
import type { JsonCompatible } from "../../util/index.js";
|
|
11
11
|
import type { CollabWindow } from "../incrementalSummarizationUtils.js";
|
|
@@ -33,5 +33,5 @@ export declare class SchemaSummarizer implements Summarizable {
|
|
|
33
33
|
* @remarks
|
|
34
34
|
* This can be used to help inspect schema for debugging, and to save a snapshot of schema to help detect and review changes to an applications schema.
|
|
35
35
|
*/
|
|
36
|
-
export declare function encodeTreeSchema(schema: TreeStoredSchema, writeVersion:
|
|
36
|
+
export declare function encodeTreeSchema(schema: TreeStoredSchema, writeVersion: SchemaFormatVersion): JsonCompatible;
|
|
37
37
|
//# sourceMappingURL=schemaSummarizer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaSummarizer.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/schemaSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAE7F,OAAO,KAAK,EACX,sCAAsC,EACtC,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,8CAA8C,CAAC;AAGtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKxE;;GAEG;AACH,qBAAa,gBAAiB,YAAW,YAAY;IAMnD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPvB,SAAgB,GAAG,YAAY;IAE/B,OAAO,CAAC,yBAAyB,CAAqB;gBAGpC,MAAM,EAAE,uBAAuB,EAChD,YAAY,EAAE,YAAY,EACT,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAS9C,SAAS,CAAC,KAAK,EAAE;QACvB,SAAS,EAAE,yBAAyB,CAAC;QACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;QACrC,yBAAyB,CAAC,EAAE,sCAAsC,CAAC;KACnE,GAAG,qBAAqB;IAsBZ,IAAI,CAChB,QAAQ,EAAE,sBAAsB,EAChC,KAAK,EAAE,oBAAoB,GACzB,OAAO,CAAC,IAAI,CAAC;CAgBhB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,gBAAgB,EACxB,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"schemaSummarizer.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/schemaSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAE7F,OAAO,KAAK,EACX,sCAAsC,EACtC,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,8CAA8C,CAAC;AAGtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKxE;;GAEG;AACH,qBAAa,gBAAiB,YAAW,YAAY;IAMnD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPvB,SAAgB,GAAG,YAAY;IAE/B,OAAO,CAAC,yBAAyB,CAAqB;gBAGpC,MAAM,EAAE,uBAAuB,EAChD,YAAY,EAAE,YAAY,EACT,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAS9C,SAAS,CAAC,KAAK,EAAE;QACvB,SAAS,EAAE,yBAAyB,CAAC;QACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;QACrC,yBAAyB,CAAC,EAAE,sCAAsC,CAAC;KACnE,GAAG,qBAAqB;IAsBZ,IAAI,CAChB,QAAQ,EAAE,sBAAsB,EAChC,KAAK,EAAE,oBAAoB,GACzB,OAAO,CAAC,IAAI,CAAC;CAgBhB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,gBAAgB,EACxB,YAAY,EAAE,mBAAmB,GAC/B,cAAc,CAEhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaSummarizer.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/schemaSummarizer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA8D;AAC9D,kEAA6D;AAE7D,2EAAiE;AAMjE,qEAA4E;AAG5E,
|
|
1
|
+
{"version":3,"file":"schemaSummarizer.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/schemaSummarizer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA8D;AAC9D,kEAA6D;AAE7D,2EAAiE;AAMjE,qEAA4E;AAG5E,kDAK6B;AAS7B,yCAAwC;AAExC,MAAM,eAAe,GAAG,cAAc,CAAC;AACvC;;GAEG;AACH,MAAa,gBAAgB;IAK5B,YACkB,MAA+B,EAChD,YAA0B,EACT,KAAmC;QAFnC,WAAM,GAAN,MAAM,CAAyB;QAE/B,UAAK,GAAL,KAAK,CAA8B;QAPrC,QAAG,GAAG,QAAQ,CAAC;QAS9B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;YAC/C,gFAAgF;YAChF,uGAAuG;YACvG,IAAI,CAAC,yBAAyB,GAAG,YAAY,CAAC,aAAa,EAAE,CAAC;QAC/D,CAAC,C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C,CAAC;QAC5D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,yBAAyB,GAAG,CAAC,CAAC;IACpC,CAAC;CACD;AAhED,4CAgEC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAC/B,MAAwB,EACxB,YAAiC;IAEjC,OAAO,IAAA,qBAAU,EAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AACzC,CAAC;AALD,4CAKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIExperimentalIncrementalSummaryContext,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\n\nimport type { IJsonCodec } from \"../../codec/index.js\";\nimport {\n\ttype MutableTreeStoredSchema,\n\ttype SchemaFormatVersion,\n\ttype TreeStoredSchema,\n\tschemaDataIsEmpty,\n} from \"../../core/index.js\";\nimport type {\n\tSummarizable,\n\tSummaryElementParser,\n\tSummaryElementStringifier,\n} from \"../../shared-tree-core/index.js\";\nimport type { JsonCompatible } from \"../../util/index.js\";\nimport type { CollabWindow } from \"../incrementalSummarizationUtils.js\";\n\nimport { encodeRepo } from \"./codec.js\";\n\nconst schemaStringKey = \"SchemaString\";\n/**\n * Provides methods for summarizing and loading a schema repository.\n */\nexport class SchemaSummarizer implements Summarizable {\n\tpublic readonly key = \"Schema\";\n\n\tprivate schemaIndexLastChangedSeq: number | undefined;\n\n\tpublic constructor(\n\t\tprivate readonly schema: MutableTreeStoredSchema,\n\t\tcollabWindow: CollabWindow,\n\t\tprivate readonly codec: IJsonCodec<TreeStoredSchema>,\n\t) {\n\t\tthis.schema.events.on(\"afterSchemaChange\", () => {\n\t\t\t// Invalidate the cache, as we need to regenerate the blob if the schema changes\n\t\t\t// We are assuming that schema changes from remote ops are valid, as we are in a summarization context.\n\t\t\tthis.schemaIndexLastChangedSeq = collabWindow.getCurrentSeq();\n\t\t});\n\t}\n\n\tpublic summarize(props: {\n\t\tstringify: SummaryElementStringifier;\n\t\tfullTree?: boolean;\n\t\ttrackState?: boolean;\n\t\ttelemetryContext?: ITelemetryContext;\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext;\n\t}): ISummaryTreeWithStats {\n\t\tconst incrementalSummaryContext = props.incrementalSummaryContext;\n\t\tconst builder = new SummaryTreeBuilder();\n\t\tconst fullTree = props.fullTree ?? false;\n\t\tif (\n\t\t\t!fullTree &&\n\t\t\tincrementalSummaryContext !== undefined &&\n\t\t\tthis.schemaIndexLastChangedSeq !== undefined &&\n\t\t\tincrementalSummaryContext.latestSummarySequenceNumber >= this.schemaIndexLastChangedSeq\n\t\t) {\n\t\t\tbuilder.addHandle(\n\t\t\t\tschemaStringKey,\n\t\t\t\tSummaryType.Blob,\n\t\t\t\t`${incrementalSummaryContext.summaryPath}/${schemaStringKey}`,\n\t\t\t);\n\t\t} else {\n\t\t\tconst dataString = JSON.stringify(this.codec.encode(this.schema));\n\t\t\tbuilder.addBlob(schemaStringKey, dataString);\n\t\t}\n\t\treturn builder.getSummaryTree();\n\t}\n\n\tpublic async load(\n\t\tservices: IChannelStorageService,\n\t\tparse: SummaryElementParser,\n\t): Promise<void> {\n\t\tconst schemaBuffer: ArrayBufferLike = await services.readBlob(schemaStringKey);\n\t\t// After the awaits, validate that the schema is in a clean state.\n\t\t// This detects any schema that could have been accidentally added through\n\t\t// invalid means and are about to be overwritten.\n\t\tassert(\n\t\t\tschemaDataIsEmpty(this.schema),\n\t\t\t0x3da /* there should not already be stored schema when loading stored schema */,\n\t\t);\n\n\t\tconst schemaString = bufferToString(schemaBuffer, \"utf-8\");\n\t\t// Currently no Fluid handles are used, so just use JSON.parse.\n\t\tconst decoded = this.codec.decode(JSON.parse(schemaString));\n\t\tthis.schema.apply(decoded);\n\t\tthis.schemaIndexLastChangedSeq = 0;\n\t}\n}\n\n/**\n * Dumps schema into a deterministic JSON compatible semi-human readable format.\n *\n * @remarks\n * This can be used to help inspect schema for debugging, and to save a snapshot of schema to help detect and review changes to an applications schema.\n */\nexport function encodeTreeSchema(\n\tschema: TreeStoredSchema,\n\twriteVersion: SchemaFormatVersion,\n): JsonCompatible {\n\treturn encodeRepo(schema, writeVersion);\n}\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { type TreeFieldStoredSchema, Multiplicity, type SchemaAndPolicy } from "
|
|
6
|
-
import type { MapTreeFieldViewGeneric, MinimalMapTreeNodeView } from "
|
|
5
|
+
import { type TreeFieldStoredSchema, Multiplicity, type SchemaAndPolicy } from "../core/index.js";
|
|
6
|
+
import type { MapTreeFieldViewGeneric, MinimalMapTreeNodeView } from "./mapTreeCursor.js";
|
|
7
7
|
export declare enum SchemaValidationError {
|
|
8
8
|
Field_KindNotInSchemaPolicy = 0,
|
|
9
9
|
Field_MissingRequiredChild = 1,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaChecker.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/schemaChecker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,KAAK,qBAAqB,EAI1B,YAAY,EACZ,KAAK,eAAe,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAG1F,oBAAY,qBAAqB;IAChC,2BAA2B,IAAA;IAC3B,0BAA0B,IAAA;IAC1B,gCAAgC,IAAA;IAChC,2BAA2B,IAAA;IAC3B,wBAAwB,IAAA;IACxB,qBAAqB,IAAA;IACrB,yBAAyB,IAAA;IACzB,2BAA2B,IAAA;IAC3B,2BAA2B,IAAA;IAC3B,kBAAkB,IAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,qBAAqB,GAAG,KAAK,CAIzE;AAED,KAAK,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzE;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,YAAY,EACpD,IAAI,EAAE,sBAAsB,EAC5B,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,CAAC,GAC1C,CAAC,GAAG,SAAS,CA6Df;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,YAAY,EACrD,UAAU,EAAE,uBAAuB,CAAC,sBAAsB,CAAC,EAC3D,MAAM,EAAE,qBAAqB,EAC7B,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,CAAC,GAC1C,CAAC,GAAG,SAAS,CA6Bf;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACvC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,YAAY,GACxB,qBAAqB,GAAG,SAAS,CAuBnC"}
|
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.compliesWithMultiplicity = exports.isFieldInSchema = exports.isNodeInSchema = exports.throwOutOfSchema = exports.SchemaValidationError = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
9
|
const internal_2 = require("@fluidframework/telemetry-utils/internal");
|
|
10
|
-
const index_js_1 = require("
|
|
11
|
-
const valueUtilities_js_1 = require("
|
|
12
|
-
const index_js_2 = require("
|
|
10
|
+
const index_js_1 = require("../core/index.js");
|
|
11
|
+
const valueUtilities_js_1 = require("./valueUtilities.js");
|
|
12
|
+
const index_js_2 = require("../util/index.js");
|
|
13
13
|
var SchemaValidationError;
|
|
14
14
|
(function (SchemaValidationError) {
|
|
15
15
|
SchemaValidationError[SchemaValidationError["Field_KindNotInSchemaPolicy"] = 0] = "Field_KindNotInSchemaPolicy";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaChecker.js","sourceRoot":"","sources":["../../src/feature-libraries/schemaChecker.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA4E;AAC5E,uEAAsE;AAEtE,+CAO0B;AAC1B,2DAAkD;AAElD,+CAAgE;AAEhE,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC,+GAA2B,CAAA;IAC3B,6GAA0B,CAAA;IAC1B,yHAAgC,CAAA;IAChC,+GAA2B,CAAA;IAC3B,yGAAwB,CAAA;IACxB,mGAAqB,CAAA;IACrB,2GAAyB,CAAA;IACzB,+GAA2B,CAAA;IAC3B,+GAA2B,CAAA;IAC3B,6FAAkB,CAAA;AACnB,CAAC,EAXW,qBAAqB,qCAArB,qBAAqB,QAWhC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,UAAiC;IACjE,MAAM,IAAI,qBAAU,CACnB,oCAAoC,qBAAqB,CAAC,UAAU,CAAC,EAAE,CACvE,CAAC;AACH,CAAC;AAJD,4CAIC;AAID;;;;;;GAMG;AACH,SAAgB,cAAc,CAC7B,IAA4B,EAC5B,eAAgC,EAChC,OAA4C;IAE5C,kDAAkD;IAClD,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,OAAO,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;IAC1D,CAAC;IAED,2DAA2D;IAE3D,IAAI,MAAM,Y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MIT License.\n */\n\nimport { unreachableCase, fail } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\ttype TreeFieldStoredSchema,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tMultiplicity,\n\ttype SchemaAndPolicy,\n} from \"../core/index.js\";\nimport { allowsValue } from \"./valueUtilities.js\";\nimport type { MapTreeFieldViewGeneric, MinimalMapTreeNodeView } from \"./mapTreeCursor.js\";\nimport { iterableHasSome, mapIterable } from \"../util/index.js\";\n\nexport enum SchemaValidationError {\n\tField_KindNotInSchemaPolicy,\n\tField_MissingRequiredChild,\n\tField_MultipleChildrenNotAllowed,\n\tField_ChildInForbiddenField,\n\tField_NodeTypeNotAllowed,\n\tLeafNode_InvalidValue,\n\tLeafNode_FieldsNotAllowed,\n\tObjectNode_FieldNotInSchema,\n\tNonLeafNode_ValueNotAllowed,\n\tNode_MissingSchema,\n}\n\n/**\n * Throws a UsageError indicating a tree is out of schema.\n */\nexport function throwOutOfSchema(maybeError: SchemaValidationError): never {\n\tthrow new UsageError(\n\t\t`Tree does not conform to schema: ${SchemaValidationError[maybeError]}`,\n\t);\n}\n\ntype NotUndefined = number | string | boolean | bigint | symbol | object;\n\n/**\n * Deeply checks that the provided node complies with the schema based on its identifier.\n *\n * @param onError - Called with the first error (if any).\n *\n * @returns the return value from `onError` if the node or anything inside of it is out of schema, otherwise `undefined`.\n */\nexport function isNodeInSchema<T extends NotUndefined>(\n\tnode: MinimalMapTreeNodeView,\n\tschemaAndPolicy: SchemaAndPolicy,\n\tonError: (error: SchemaValidationError) => T,\n): T | undefined {\n\t// Validate the schema declared by the node exists\n\tconst schema = schemaAndPolicy.schema.nodeSchema.get(node.type);\n\tif (schema === undefined) {\n\t\treturn onError(SchemaValidationError.Node_MissingSchema);\n\t}\n\n\t// Validate the node is well formed according to its schema\n\n\tif (schema instanceof LeafNodeStoredSchema) {\n\t\tif (iterableHasSome(node.fields)) {\n\t\t\treturn onError(SchemaValidationError.LeafNode_FieldsNotAllowed);\n\t\t}\n\t\tif (!allowsValue(schema.leafValue, node.value)) {\n\t\t\treturn onError(SchemaValidationError.LeafNode_InvalidValue);\n\t\t}\n\t} else {\n\t\tif (node.value !== undefined) {\n\t\t\treturn onError(SchemaValidationError.NonLeafNode_ValueNotAllowed);\n\t\t}\n\n\t\tif (schema instanceof ObjectNodeStoredSchema) {\n\t\t\tconst uncheckedFieldsFromNode = new Set(mapIterable(node.fields, ([key, field]) => key));\n\t\t\tfor (const [fieldKey, fieldSchema] of schema.objectNodeFields) {\n\t\t\t\tconst nodeField = node.fields.get(fieldKey) ?? [];\n\t\t\t\tconst fieldInSchemaResult = isFieldInSchema(\n\t\t\t\t\tnodeField,\n\t\t\t\t\tfieldSchema,\n\t\t\t\t\tschemaAndPolicy,\n\t\t\t\t\tonError,\n\t\t\t\t);\n\t\t\t\tif (fieldInSchemaResult !== undefined) {\n\t\t\t\t\treturn fieldInSchemaResult;\n\t\t\t\t}\n\t\t\t\tuncheckedFieldsFromNode.delete(fieldKey);\n\t\t\t}\n\t\t\t// The node has fields that we did not check as part of looking at every field defined in the node's schema.\n\t\t\t// Since this is testing compatibility with a stored schema (not view schema), \"allowUnknownOptionalFields\" does not exist at this layer.\n\t\t\t// Code using this with a stored schema derived from a view schema rather than the document can be problematic because it may be missing unknown fields that the actual document has.\n\t\t\t// Other schema evolution features like \"staged\" allowed types will likely cause similar issues elsewhere in this checker.\n\t\t\tif (uncheckedFieldsFromNode.size !== 0) {\n\t\t\t\treturn onError(SchemaValidationError.ObjectNode_FieldNotInSchema);\n\t\t\t}\n\t\t} else if (schema instanceof MapNodeStoredSchema) {\n\t\t\tfor (const [_key, field] of node.fields) {\n\t\t\t\tconst fieldInSchemaResult = isFieldInSchema(\n\t\t\t\t\tfield,\n\t\t\t\t\tschema.mapFields,\n\t\t\t\t\tschemaAndPolicy,\n\t\t\t\t\tonError,\n\t\t\t\t);\n\t\t\t\tif (fieldInSchemaResult !== undefined) {\n\t\t\t\t\treturn fieldInSchemaResult;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfail(0xb0e /* Unknown TreeNodeStoredSchema type */);\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Deeply checks that the nodes comply with the field schema and included schema.\n *\n * @param onError - Called with the first error (if any).\n *\n * @returns the return value from `onError` if the field or anything inside of it is out of schema, otherwise `undefined`.\n */\nexport function isFieldInSchema<T extends NotUndefined>(\n\tchildNodes: MapTreeFieldViewGeneric<MinimalMapTreeNodeView>,\n\tschema: TreeFieldStoredSchema,\n\tschemaAndPolicy: SchemaAndPolicy,\n\tonError: (error: SchemaValidationError) => T,\n): T | undefined {\n\t// Validate that the field kind is handled by the schema policy\n\tconst kind = schemaAndPolicy.policy.fieldKinds.get(schema.kind);\n\tif (kind === undefined) {\n\t\treturn onError(SchemaValidationError.Field_KindNotInSchemaPolicy);\n\t}\n\n\t// Validate that the field doesn't contain more nodes than its type supports\n\t{\n\t\tconst multiplicityCheck = compliesWithMultiplicity(childNodes.length, kind.multiplicity);\n\t\tif (multiplicityCheck !== undefined) {\n\t\t\treturn onError(multiplicityCheck);\n\t\t}\n\t}\n\n\tfor (const node of childNodes) {\n\t\t// Validate the type declared by the node is allowed in this field\n\t\tif (schema.types !== undefined && !schema.types.has(node.type)) {\n\t\t\treturn onError(SchemaValidationError.Field_NodeTypeNotAllowed);\n\t\t}\n\n\t\t// Validate the node complies with the type it declares to be.\n\t\tconst nodeInSchemaResult = isNodeInSchema(node, schemaAndPolicy, onError);\n\t\tif (nodeInSchemaResult !== undefined) {\n\t\t\treturn nodeInSchemaResult;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Validates that a given number of items complies with the specified {@link Multiplicity | multiplicity}.\n * @param numberOfItems - Number of items.\n * @param multiplicity - Kind of multiplicity to validate against.\n * @returns `true` if the specified number of items complies with the specified multiplicity; otherwise, `false`.\n */\nexport function compliesWithMultiplicity(\n\tnumberOfItems: number,\n\tmultiplicity: Multiplicity,\n): SchemaValidationError | undefined {\n\tswitch (multiplicity) {\n\t\tcase Multiplicity.Single:\n\t\t\tif (numberOfItems < 1) {\n\t\t\t\treturn SchemaValidationError.Field_MissingRequiredChild;\n\t\t\t} else if (numberOfItems > 1) {\n\t\t\t\treturn SchemaValidationError.Field_MultipleChildrenNotAllowed;\n\t\t\t} else {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\tcase Multiplicity.Optional:\n\t\t\treturn numberOfItems > 1\n\t\t\t\t? SchemaValidationError.Field_MultipleChildrenNotAllowed\n\t\t\t\t: undefined;\n\t\tcase Multiplicity.Sequence:\n\t\t\treturn undefined;\n\t\tcase Multiplicity.Forbidden:\n\t\t\treturn numberOfItems === 0\n\t\t\t\t? undefined\n\t\t\t\t: SchemaValidationError.Field_ChildInForbiddenField;\n\t\tdefault:\n\t\t\tunreachableCase(multiplicity);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequenceFieldCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAmB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"sequenceFieldCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAmB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAI7E,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtD,eAAO,MAAM,+BAA+B,qBACzB,WACjB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,KACC,aAAa,QAAQ,EAAE,0BAA0B,CAIjD,CAAC"}
|
|
@@ -6,11 +6,9 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.sequenceFieldChangeCodecFactory = void 0;
|
|
8
8
|
const index_js_1 = require("../../codec/index.js");
|
|
9
|
-
const sequenceFieldCodecV1_js_1 = require("./sequenceFieldCodecV1.js");
|
|
10
9
|
const sequenceFieldCodecV2_js_1 = require("./sequenceFieldCodecV2.js");
|
|
11
10
|
const sequenceFieldCodecV3_js_1 = require("./sequenceFieldCodecV3.js");
|
|
12
11
|
const sequenceFieldChangeCodecFactory = (revisionTagCodec) => (0, index_js_1.makeCodecFamily)([
|
|
13
|
-
[1, (0, sequenceFieldCodecV1_js_1.makeV1Codec)(revisionTagCodec)],
|
|
14
12
|
[2, (0, sequenceFieldCodecV2_js_1.makeV2Codec)(revisionTagCodec)],
|
|
15
13
|
[3, (0, sequenceFieldCodecV3_js_1.makeV3Codec)(revisionTagCodec)],
|
|
16
14
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequenceFieldCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mDAA2F;AAQ3F,uEAAwD;AACxD,uEAAwD;
|
|
1
|
+
{"version":3,"file":"sequenceFieldCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mDAA2F;AAQ3F,uEAAwD;AACxD,uEAAwD;AAGjD,MAAM,+BAA+B,GAAG,CAC9C,gBAKC,EACoD,EAAE,CACvD,IAAA,0BAAe,EAAwC;IACtD,CAAC,CAAC,EAAE,IAAA,qCAAW,EAAC,gBAAgB,CAAC,CAAC;IAClC,CAAC,CAAC,EAAE,IAAA,qCAAW,EAAC,gBAAgB,CAAC,CAAC;CAClC,CAAC,CAAC;AAXS,QAAA,+BAA+B,mCAWxC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IJsonCodec, makeCodecFamily, type ICodecFamily } from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../../core/index.js\";\nimport type { FieldChangeEncodingContext } from \"../modular-schema/index.js\";\n\nimport { makeV2Codec } from \"./sequenceFieldCodecV2.js\";\nimport { makeV3Codec } from \"./sequenceFieldCodecV3.js\";\nimport type { Changeset, MarkList } from \"./types.js\";\n\nexport const sequenceFieldChangeCodecFactory = (\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n): ICodecFamily<MarkList, FieldChangeEncodingContext> =>\n\tmakeCodecFamily<Changeset, FieldChangeEncodingContext>([\n\t\t[2, makeV2Codec(revisionTagCodec)],\n\t\t[3, makeV3Codec(revisionTagCodec)],\n\t]);\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,8 +29,8 @@ export type Listenable<T extends object> = EventListenable<T>;
|
|
|
29
29
|
*/
|
|
30
30
|
export type Off = EventOff;
|
|
31
31
|
export { TreeStatus, TreeCompressionStrategy, type TreeIndex, type TreeIndexKey, type TreeIndexNodes, } from "./feature-libraries/index.js";
|
|
32
|
-
export { type ITreeInternal, type SharedTreeOptions, type SharedTreeOptionsBeta, type ForestType, type SharedTreeFormatOptions,
|
|
33
|
-
export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, SchemaFactoryBeta, SchemaFactoryAlpha, type ObjectSchemaOptionsAlpha, type ObjectSchemaOptions, 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 SchemaUpgrade, contentSchemaSymbol, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type System_Unsafe, type FieldSchemaAlphaUnsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type UnannotateAllowedTypeUnsafe, type AnnotatedAllowedTypeUnsafe, type AnnotatedAllowedTypesUnsafe, type AllowedTypesFullUnsafe, type AllowedTypesFullFromMixedUnsafe, type UnannotateAllowedTypesListUnsafe, type AnnotateAllowedTypesListUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, type SimpleTreeIndex, type IdentifierIndex, createSimpleTreeIndex, createIdentifierIndex, type DirtyTreeStatus, trackDirtyNodes, type DirtyTreeMap, adaptEnum, enumFromStrings, singletonSchema, type UnsafeUnknownSchema, type TreeViewAlpha, type TreeViewBeta, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, type ReadableField, type ReadSchema, type AnnotatedAllowedType, type AnnotatedAllowedTypes, type AllowedTypesFullEvaluated, type AllowedTypeMetadata, type AllowedTypesMetadata, type UnannotateAllowedTypesList, type
|
|
32
|
+
export { type ITreeInternal, type SharedTreeOptions, type SharedTreeOptionsBeta, type ForestType, type SharedTreeFormatOptions, Tree, type RunTransaction, type ForestOptions, getBranch, type BranchableTree, type TreeBranchFork, independentInitializedView, type ViewContent, TreeAlpha, type ObservationResults, type TreeIdentifierUtils, independentView, createIndependentTreeBeta, createIndependentTreeAlpha, 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, SchemaFactoryBeta, type SchemaStaticsBeta, SchemaFactoryAlpha, type ObjectSchemaOptionsAlpha, type ObjectSchemaOptions, 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 SchemaUpgrade, contentSchemaSymbol, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type System_Unsafe, type FieldSchemaAlphaUnsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type UnannotateAllowedTypeUnsafe, type AnnotatedAllowedTypeUnsafe, type AnnotatedAllowedTypesUnsafe, type AllowedTypesFullUnsafe, type AllowedTypesFullFromMixedUnsafe, type UnannotateAllowedTypesListUnsafe, type AnnotateAllowedTypesListUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, type SimpleTreeIndex, type IdentifierIndex, createSimpleTreeIndex, createIdentifierIndex, type DirtyTreeStatus, trackDirtyNodes, type DirtyTreeMap, adaptEnum, enumFromStrings, singletonSchema, type UnsafeUnknownSchema, type TreeViewAlpha, type TreeViewBeta, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, type ReadableField, type ReadSchema, type AnnotatedAllowedType, type AnnotatedAllowedTypes, type AllowedTypesFullEvaluated, type AllowedTypeMetadata, type AllowedTypesMetadata, type UnannotateAllowedTypesList, type AnnotateAllowedTypesList, type AllowedTypesFull, type AllowedTypesFullFromMixed, 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 TreeBranchAlpha, 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, KeyEncodingOptions, type TreeParsingOptions, type SchemaFactory_base, type NumberKeys, type SimpleAllowedTypeAttributes, encodeSimpleSchema, decodeSimpleSchema, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, } from "./simple-tree/index.js";
|
|
34
34
|
export { SharedTree, configuredSharedTree, configuredSharedTreeBeta, configuredSharedTreeBetaLegacy, } from "./treeFactory.js";
|
|
35
35
|
export { SharedTreeAttributes, SharedTreeFactoryType } from "./sharedTreeAttributes.js";
|
|
36
36
|
export { persistedToSimpleSchema } from "./shared-tree/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,KAAK,UAAU,EACf,UAAU,EACV,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM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AAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,4BAA4B,GAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO;AACN;;;GAGG;AACH,aAAa,GACb,CAAC;AAKF,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -27,8 +27,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.replaceConciseTreeHandles = exports.evaluateLazySchema = exports.generateSchemaFromSimpleSchema = exports.rollback = exports.asTreeViewAlpha = exports.getSimpleSchema = exports.walkAllowedTypes = exports.walkNodeSchema = exports.walkFieldSchema = exports.normalizeAllowedTypes = exports.getJsonSchema = exports.comparePersistedSchema = exports.extractPersistedSchema = exports.TreeViewConfigurationAlpha = exports.TreeBeta = exports.singletonSchema = exports.enumFromStrings = exports.adaptEnum = exports.trackDirtyNodes = exports.createIdentifierIndex = exports.createSimpleTreeIndex = exports.contentSchemaSymbol = exports.normalizeFieldSchema = exports.ObjectNodeSchema = exports.NodeKind = exports.FieldSchema = exports.FieldKind = exports.SchemaFactoryAlpha = exports.SchemaFactoryBeta = exports.SchemaFactory = exports.TreeViewConfiguration = exports.TreeNode = exports.IterableTreeArrayContent = exports.TreeArrayNode = exports.ForestTypeReference = exports.ForestTypeExpensiveDebug = exports.ForestTypeOptimized = exports.createIndependentTreeAlpha = exports.createIndependentTreeBeta = exports.independentView = exports.TreeAlpha = exports.independentInitializedView = exports.getBranch = exports.Tree = exports.
|
|
31
|
-
exports.asBeta = exports.asAlpha = exports.TableSchema = exports.FluidSerializableAsTree = exports.JsonAsTree = exports.InternalTypes = exports.cloneWithReplacements = exports.FormatValidatorBasic = exports.FormatValidatorNoOp = exports.FluidClientVersion = exports.persistedToSimpleSchema = exports.SharedTreeFactoryType = exports.SharedTreeAttributes = exports.configuredSharedTreeBetaLegacy = exports.configuredSharedTreeBeta = exports.configuredSharedTree = exports.SharedTree = exports.KeyEncodingOptions = exports.RecordNodeSchema = exports.MapNodeSchema = exports.ArrayNodeSchema = exports.allowUnused = exports.replaceVerboseTreeHandles =
|
|
30
|
+
exports.replaceHandles = exports.replaceConciseTreeHandles = exports.evaluateLazySchema = exports.generateSchemaFromSimpleSchema = exports.rollback = exports.asTreeViewAlpha = exports.getSimpleSchema = exports.walkAllowedTypes = exports.walkNodeSchema = exports.walkFieldSchema = exports.normalizeAllowedTypes = exports.getJsonSchema = exports.comparePersistedSchema = exports.extractPersistedSchema = exports.TreeViewConfigurationAlpha = exports.TreeBeta = exports.singletonSchema = exports.enumFromStrings = exports.adaptEnum = exports.trackDirtyNodes = exports.createIdentifierIndex = exports.createSimpleTreeIndex = exports.contentSchemaSymbol = exports.normalizeFieldSchema = exports.ObjectNodeSchema = exports.NodeKind = exports.FieldSchema = exports.FieldKind = exports.SchemaFactoryAlpha = exports.SchemaFactoryBeta = exports.SchemaFactory = exports.TreeViewConfiguration = exports.TreeNode = exports.IterableTreeArrayContent = exports.TreeArrayNode = exports.ForestTypeReference = exports.ForestTypeExpensiveDebug = exports.ForestTypeOptimized = exports.createIndependentTreeAlpha = exports.createIndependentTreeBeta = exports.independentView = exports.TreeAlpha = exports.independentInitializedView = exports.getBranch = exports.Tree = exports.TreeCompressionStrategy = exports.TreeStatus = exports.RevertibleStatus = exports.CommitKind = exports.ValueSchema = void 0;
|
|
31
|
+
exports.asBeta = exports.asAlpha = exports.TableSchema = exports.FluidSerializableAsTree = exports.JsonAsTree = exports.InternalTypes = exports.cloneWithReplacements = exports.FormatValidatorBasic = exports.FormatValidatorNoOp = exports.FluidClientVersion = exports.persistedToSimpleSchema = exports.SharedTreeFactoryType = exports.SharedTreeAttributes = exports.configuredSharedTreeBetaLegacy = exports.configuredSharedTreeBeta = exports.configuredSharedTree = exports.SharedTree = exports.checkCompatibility = exports.importCompatibilitySchemaSnapshot = exports.exportCompatibilitySchemaSnapshot = exports.decodeSimpleSchema = exports.encodeSimpleSchema = exports.KeyEncodingOptions = exports.RecordNodeSchema = exports.MapNodeSchema = exports.ArrayNodeSchema = exports.allowUnused = exports.replaceVerboseTreeHandles = void 0;
|
|
32
32
|
var index_js_1 = require("./core/index.js");
|
|
33
33
|
Object.defineProperty(exports, "ValueSchema", { enumerable: true, get: function () { return index_js_1.ValueSchema; } });
|
|
34
34
|
Object.defineProperty(exports, "CommitKind", { enumerable: true, get: function () { return index_js_1.CommitKind; } });
|
|
@@ -37,7 +37,6 @@ var index_js_2 = require("./feature-libraries/index.js");
|
|
|
37
37
|
Object.defineProperty(exports, "TreeStatus", { enumerable: true, get: function () { return index_js_2.TreeStatus; } });
|
|
38
38
|
Object.defineProperty(exports, "TreeCompressionStrategy", { enumerable: true, get: function () { return index_js_2.TreeCompressionStrategy; } });
|
|
39
39
|
var index_js_3 = require("./shared-tree/index.js");
|
|
40
|
-
Object.defineProperty(exports, "SharedTreeFormatVersion", { enumerable: true, get: function () { return index_js_3.SharedTreeFormatVersion; } });
|
|
41
40
|
Object.defineProperty(exports, "Tree", { enumerable: true, get: function () { return index_js_3.Tree; } });
|
|
42
41
|
Object.defineProperty(exports, "getBranch", { enumerable: true, get: function () { return index_js_3.getBranch; } });
|
|
43
42
|
Object.defineProperty(exports, "independentInitializedView", { enumerable: true, get: function () { return index_js_3.independentInitializedView; } });
|
|
@@ -92,6 +91,11 @@ Object.defineProperty(exports, "ArrayNodeSchema", { enumerable: true, get: funct
|
|
|
92
91
|
Object.defineProperty(exports, "MapNodeSchema", { enumerable: true, get: function () { return index_js_4.MapNodeSchema; } });
|
|
93
92
|
Object.defineProperty(exports, "RecordNodeSchema", { enumerable: true, get: function () { return index_js_4.RecordNodeSchema; } });
|
|
94
93
|
Object.defineProperty(exports, "KeyEncodingOptions", { enumerable: true, get: function () { return index_js_4.KeyEncodingOptions; } });
|
|
94
|
+
Object.defineProperty(exports, "encodeSimpleSchema", { enumerable: true, get: function () { return index_js_4.encodeSimpleSchema; } });
|
|
95
|
+
Object.defineProperty(exports, "decodeSimpleSchema", { enumerable: true, get: function () { return index_js_4.decodeSimpleSchema; } });
|
|
96
|
+
Object.defineProperty(exports, "exportCompatibilitySchemaSnapshot", { enumerable: true, get: function () { return index_js_4.exportCompatibilitySchemaSnapshot; } });
|
|
97
|
+
Object.defineProperty(exports, "importCompatibilitySchemaSnapshot", { enumerable: true, get: function () { return index_js_4.importCompatibilitySchemaSnapshot; } });
|
|
98
|
+
Object.defineProperty(exports, "checkCompatibility", { enumerable: true, get: function () { return index_js_4.checkCompatibility; } });
|
|
95
99
|
var treeFactory_js_1 = require("./treeFactory.js");
|
|
96
100
|
Object.defineProperty(exports, "SharedTree", { enumerable: true, get: function () { return treeFactory_js_1.SharedTree; } });
|
|
97
101
|
Object.defineProperty(exports, "configuredSharedTree", { enumerable: true, get: function () { return treeFactory_js_1.configuredSharedTree; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CASyB;AARxB,uGAAA,WAAW,OAAA;AAEX,sGAAA,UAAU,OAAA;AACV,4GAAA,gBAAgB,OAAA;AAuCjB,yDAMsC;AALrC,sGAAA,UAAU,OAAA;AACV,mHAAA,uBAAuB,OAAA;AAMxB,mDAwBgC;AA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HAAA,yBAAyB,OAAA;AACzB,0GAAA,cAAc,OAAA;AACd,qHAAA,yBAAyB,OAAA;AAEzB,uGAAA,WAAW,OAAA;AAIX,2GAAA,eAAe,OAAA;AAGf,yGAAA,aAAa,OAAA;AAIb,4GAAA,gBAAgB,OAAA;AAKhB,8GAAA,kBAAkB,OAAA;AAMnB,mDAK0B;AAJzB,4GAAA,UAAU,OAAA;AACV,sHAAA,oBAAoB,OAAA;AACpB,0HAAA,wBAAwB,OAAA;AACxB,gIAAA,8BAA8B,OAAA;AAE/B,qEAAwF;AAA/E,+HAAA,oBAAoB,OAAA;AAAE,gIAAA,qBAAqB,OAAA;AACpD,mDAAiE;AAAxD,mHAAA,uBAAuB,OAAA;AAEhC,6CAM0B;AAHzB,8GAAA,kBAAkB,OAAA;AAElB,+GAAA,mBAAmB,OAAA;AAEpB,0DAAqE;AAA5D,gHAAA,oBAAoB,OAAA;AAwB7B,4CAAwD;AAA/C,iHAAA,qBAAqB,OAAA;AAE9B,kEAAoD;AAMnD,sCAAa;AAQd,6DAAmD;AAA1C,iHAAA,UAAU,OAAA;AACnB,6EAAwE;AAA/D,sIAAA,uBAAuB,OAAA;AAChC,mDAAwE;AAA/D,6GAAA,WAAW,OAAA;AACpB,mCAA2C;AAAlC,iGAAA,OAAO,OAAA;AAAE,gGAAA,MAAM,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tValueSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./core/index.js\";\n\nimport type {\n\tListeners as EventListeners,\n\tIsListener as EventIsListener,\n\tListenable as EventListenable,\n\tOff as EventOff,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listeners}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listeners<T extends object> = EventListeners<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#IsListener}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type IsListener<T> = EventIsListener<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listenable}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listenable<T extends object> = EventListenable<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Off}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Off = EventOff;\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ITreeInternal,\n\ttype SharedTreeOptions,\n\ttype SharedTreeOptionsBeta,\n\ttype ForestType,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tTree,\n\ttype RunTransaction,\n\ttype ForestOptions,\n\tgetBranch,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n\tindependentInitializedView,\n\ttype ViewContent,\n\tTreeAlpha,\n\ttype ObservationResults,\n\ttype TreeIdentifierUtils,\n\tindependentView,\n\tcreateIndependentTreeBeta,\n\tcreateIndependentTreeAlpha,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ViewableTree,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\n\tSchemaFactoryBeta,\n\tSchemaFactoryAlpha,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeChangeEvents,\n\ttype NodeFromSchema,\n\ttype TreeMapNode,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaAlpha,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\tObjectNodeSchema,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype NodeChangedData,\n\ttype SchemaUpgrade,\n\tcontentSchemaSymbol,\n\t// Types not really intended for public use, but used in links.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package \"@fluidframework/tree\" does not have an export \"TreeNodeApi\"\n\ttype TreeNodeApi,\n\ttype TreeNodeSchemaCore,\n\t// Types not really intended for public use, but used in inferred types exposed in the public API.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// error TS2742: The inferred type of 'Inventory' cannot be named without a reference to '../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\n\ttype AllowedTypes,\n\ttype System_Unsafe,\n\ttype FieldSchemaAlphaUnsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype UnannotateAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypesUnsafe,\n\ttype AllowedTypesFullUnsafe,\n\ttype AllowedTypesFullFromMixedUnsafe,\n\ttype UnannotateAllowedTypesListUnsafe,\n\ttype AnnotateAllowedTypesListUnsafe,\n\t// System types (not in Internal types for various reasons, like doc links or cannot be named errors).\n\ttype typeSchemaSymbol,\n\ttype TreeNodeSchemaNonClass,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\t// Index APIs\n\ttype SimpleTreeIndex,\n\ttype IdentifierIndex,\n\tcreateSimpleTreeIndex,\n\tcreateIdentifierIndex,\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype AnnotatedAllowedType,\n\ttype AnnotatedAllowedTypes,\n\ttype AllowedTypesFullEvaluated,\n\ttype AllowedTypeMetadata,\n\ttype AllowedTypesMetadata,\n\ttype UnannotateAllowedTypesList,\n\ttype SchemaStaticsAlpha,\n\ttype AnnotateAllowedTypesList,\n\ttype AllowedTypesFull,\n\ttype AllowedTypesFullFromMixed,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\t// Other\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype TreeSchemaEncodingOptions,\n\ttype TreeSchema,\n\tTreeViewConfigurationAlpha,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\t// Back to normal types\n\ttype JsonTreeSchema,\n\ttype JsonSchemaId,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonLeafNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonObjectNodeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonSchemaType,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype SimpleNodeSchemaBase,\n\ttype SimpleNodeSchemaBaseAlpha,\n\ttype SimpleTreeSchema,\n\ttype SimpleNodeSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleLeafNodeSchema,\n\ttype SimpleMapNodeSchema,\n\ttype SimpleArrayNodeSchema,\n\ttype SimpleObjectNodeSchema,\n\ttype SimpleObjectFieldSchema,\n\ttype SimpleRecordNodeSchema,\n\tnormalizeAllowedTypes,\n\twalkFieldSchema,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\tgetSimpleSchema,\n\ttype ReadonlyArrayNode,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype Input,\n\ttype TreeBranch,\n\ttype TreeBranchAlpha,\n\ttype TreeBranchEvents,\n\tasTreeViewAlpha,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype NodeSchemaMetadata,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\tevaluateLazySchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype LeafSchema,\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\ttype ObjectFromSchemaRecord,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\ttype TreeRecordNode,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n\ttype SchemaFactory_base,\n\ttype NumberKeys,\n\ttype SimpleAllowedTypeAttributes,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tconfiguredSharedTree,\n\tconfiguredSharedTreeBeta,\n\tconfiguredSharedTreeBetaLegacy,\n} from \"./treeFactory.js\";\nexport { SharedTreeAttributes, SharedTreeFactoryType } from \"./sharedTreeAttributes.js\";\nexport { persistedToSimpleSchema } from \"./shared-tree/index.js\";\n\nexport {\n\ttype ICodecOptions,\n\ttype CodecWriteOptions,\n\tFluidClientVersion,\n\ttype FormatValidator,\n\tFormatValidatorNoOp,\n} from \"./codec/index.js\";\nexport { FormatValidatorBasic } from \"./external-utilities/index.js\";\n\nexport type {\n\t// Type Testing\n\trequireTrue,\n\trequireFalse,\n\trequireAssignableTo,\n\tareSafelyAssignable,\n\tisAssignableTo,\n\tisAny,\n\teitherIsAny,\n\t// Other\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\tMakeNominal,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n\tJsonCompatible,\n\tJsonCompatibleObject,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlyObject,\n} from \"./util/index.js\";\nexport { cloneWithReplacements } from \"./util/index.js\";\n\nimport * as InternalTypes from \"./internalTypes.js\";\nexport {\n\t/**\n\t * Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.\n\t * They are used internally to implement API aspects, but are not intended for use by external consumers.\n\t */\n\tInternalTypes,\n};\n\n// Internal/System types:\n// These would be put in `internalTypes` except doing so tents to cause errors like:\n// The inferred type of 'NodeMap' cannot be named without a reference to '../../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\nexport type { MapNodeInsertableData } from \"./simple-tree/index.js\";\n\nexport { JsonAsTree } from \"./jsonDomainSchema.js\";\nexport { FluidSerializableAsTree } from \"./serializableDomainSchema.js\";\nexport { TableSchema, type System_TableSchema } from \"./tableSchema.js\";\nexport { asAlpha, asBeta } from \"./api.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CASyB;AARxB,uGAAA,WAAW,OAAA;AAEX,sGAAA,UAAU,OAAA;AACV,4GAAA,gBAAgB,OAAA;AAuCjB,yDAMsC;AALrC,sGAAA,UAAU,OAAA;AACV,mHAAA,uBAAuB,OAAA;AAMxB,mDAuBgC;AAjB/B,gGAAA,IAAI,OAAA;AAGJ,qGAAA,SAAS,OAAA;AAGT,sHAAA,0BAA0B,OAAA;AAE1B,qGAAA,SAAS,OAAA;AAGT,2GAAA,eAAe,OAAA;AACf,qHAAA,yBAAyB,OAAA;AACzB,sHAAA,0BAA0B,OAAA;AAC1B,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,+GAAA,mBAAmB,OAAA;AAGpB,mDAgNgC;AA/M/B,yGAAA,aAAa,OAAA;AAEb,oHAAA,wBAAwB,OAAA;AACxB,oGAAA,QAAQ,OAAA;AAIR,iHAAA,qBAAqB,OAAA;AAKrB,yGAAA,aAAa,OAAA;AACb,6GAAA,iBAAiB,OAAA;AAEjB,8GAAA,kBAAkB,OAAA;AAUlB,qGAAA,SAAS,OAAA;AACT,uGAAA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AACpD,mDAAiE;AAAxD,mHAAA,uBAAuB,OAAA;AAEhC,6CAM0B;AAHzB,8GAAA,kBAAkB,OAAA;AAElB,+GAAA,mBAAmB,OAAA;AAEpB,0DAAqE;AAA5D,gHAAA,oBAAoB,OAAA;AAwB7B,4CAAwD;AAA/C,iHAAA,qBAAqB,OAAA;AAE9B,kEAAoD;AAMnD,sCAAa;AAQd,6DAAmD;AAA1C,iHAAA,UAAU,OAAA;AACnB,6EAAwE;AAA/D,sIAAA,uBAAuB,OAAA;AAChC,mDAAwE;AAA/D,6GAAA,WAAW,OAAA;AACpB,mCAA2C;AAAlC,iGAAA,OAAO,OAAA;AAAE,gGAAA,MAAM,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tValueSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./core/index.js\";\n\nimport type {\n\tListeners as EventListeners,\n\tIsListener as EventIsListener,\n\tListenable as EventListenable,\n\tOff as EventOff,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listeners}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listeners<T extends object> = EventListeners<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#IsListener}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type IsListener<T> = EventIsListener<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listenable}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listenable<T extends object> = EventListenable<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Off}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Off = EventOff;\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ITreeInternal,\n\ttype SharedTreeOptions,\n\ttype SharedTreeOptionsBeta,\n\ttype ForestType,\n\ttype SharedTreeFormatOptions,\n\tTree,\n\ttype RunTransaction,\n\ttype ForestOptions,\n\tgetBranch,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n\tindependentInitializedView,\n\ttype ViewContent,\n\tTreeAlpha,\n\ttype ObservationResults,\n\ttype TreeIdentifierUtils,\n\tindependentView,\n\tcreateIndependentTreeBeta,\n\tcreateIndependentTreeAlpha,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ViewableTree,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\n\tSchemaFactoryBeta,\n\ttype SchemaStaticsBeta,\n\tSchemaFactoryAlpha,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeChangeEvents,\n\ttype NodeFromSchema,\n\ttype TreeMapNode,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaAlpha,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\tObjectNodeSchema,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype NodeChangedData,\n\ttype SchemaUpgrade,\n\tcontentSchemaSymbol,\n\t// Types not really intended for public use, but used in links.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package \"@fluidframework/tree\" does not have an export \"TreeNodeApi\"\n\ttype TreeNodeApi,\n\ttype TreeNodeSchemaCore,\n\t// Types not really intended for public use, but used in inferred types exposed in the public API.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// error TS2742: The inferred type of 'Inventory' cannot be named without a reference to '../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\n\ttype AllowedTypes,\n\ttype System_Unsafe,\n\ttype FieldSchemaAlphaUnsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype UnannotateAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypesUnsafe,\n\ttype AllowedTypesFullUnsafe,\n\ttype AllowedTypesFullFromMixedUnsafe,\n\ttype UnannotateAllowedTypesListUnsafe,\n\ttype AnnotateAllowedTypesListUnsafe,\n\t// System types (not in Internal types for various reasons, like doc links or cannot be named errors).\n\ttype typeSchemaSymbol,\n\ttype TreeNodeSchemaNonClass,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\t// Index APIs\n\ttype SimpleTreeIndex,\n\ttype IdentifierIndex,\n\tcreateSimpleTreeIndex,\n\tcreateIdentifierIndex,\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype AnnotatedAllowedType,\n\ttype AnnotatedAllowedTypes,\n\ttype AllowedTypesFullEvaluated,\n\ttype AllowedTypeMetadata,\n\ttype AllowedTypesMetadata,\n\ttype UnannotateAllowedTypesList,\n\ttype AnnotateAllowedTypesList,\n\ttype AllowedTypesFull,\n\ttype AllowedTypesFullFromMixed,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\t// Other\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype TreeSchemaEncodingOptions,\n\ttype TreeSchema,\n\tTreeViewConfigurationAlpha,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\t// Back to normal types\n\ttype JsonTreeSchema,\n\ttype JsonSchemaId,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonLeafNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonObjectNodeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonSchemaType,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype SimpleNodeSchemaBase,\n\ttype SimpleNodeSchemaBaseAlpha,\n\ttype SimpleTreeSchema,\n\ttype SimpleNodeSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleLeafNodeSchema,\n\ttype SimpleMapNodeSchema,\n\ttype SimpleArrayNodeSchema,\n\ttype SimpleObjectNodeSchema,\n\ttype SimpleObjectFieldSchema,\n\ttype SimpleRecordNodeSchema,\n\tnormalizeAllowedTypes,\n\twalkFieldSchema,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\tgetSimpleSchema,\n\ttype ReadonlyArrayNode,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype Input,\n\ttype TreeBranch,\n\ttype TreeBranchAlpha,\n\ttype TreeBranchEvents,\n\tasTreeViewAlpha,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype NodeSchemaMetadata,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\tevaluateLazySchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype LeafSchema,\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\ttype ObjectFromSchemaRecord,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\ttype TreeRecordNode,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n\ttype SchemaFactory_base,\n\ttype NumberKeys,\n\ttype SimpleAllowedTypeAttributes,\n\tencodeSimpleSchema,\n\tdecodeSimpleSchema,\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tconfiguredSharedTree,\n\tconfiguredSharedTreeBeta,\n\tconfiguredSharedTreeBetaLegacy,\n} from \"./treeFactory.js\";\nexport { SharedTreeAttributes, SharedTreeFactoryType } from \"./sharedTreeAttributes.js\";\nexport { persistedToSimpleSchema } from \"./shared-tree/index.js\";\n\nexport {\n\ttype ICodecOptions,\n\ttype CodecWriteOptions,\n\tFluidClientVersion,\n\ttype FormatValidator,\n\tFormatValidatorNoOp,\n} from \"./codec/index.js\";\nexport { FormatValidatorBasic } from \"./external-utilities/index.js\";\n\nexport type {\n\t// Type Testing\n\trequireTrue,\n\trequireFalse,\n\trequireAssignableTo,\n\tareSafelyAssignable,\n\tisAssignableTo,\n\tisAny,\n\teitherIsAny,\n\t// Other\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\tMakeNominal,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n\tJsonCompatible,\n\tJsonCompatibleObject,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlyObject,\n} from \"./util/index.js\";\nexport { cloneWithReplacements } from \"./util/index.js\";\n\nimport * as InternalTypes from \"./internalTypes.js\";\nexport {\n\t/**\n\t * Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.\n\t * They are used internally to implement API aspects, but are not intended for use by external consumers.\n\t */\n\tInternalTypes,\n};\n\n// Internal/System types:\n// These would be put in `internalTypes` except doing so tents to cause errors like:\n// The inferred type of 'NodeMap' cannot be named without a reference to '../../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\nexport type { MapNodeInsertableData } from \"./simple-tree/index.js\";\n\nexport { JsonAsTree } from \"./jsonDomainSchema.js\";\nexport { FluidSerializableAsTree } from \"./serializableDomainSchema.js\";\nexport { TableSchema, type System_TableSchema } from \"./tableSchema.js\";\nexport { asAlpha, asBeta } from \"./api.js\";\n"]}
|