@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
|
@@ -4,9 +4,26 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.uncompressedEncodeV2 = exports.uncompressedEncodeV1 = void 0;
|
|
8
8
|
const index_js_1 = require("../../../core/index.js");
|
|
9
|
+
const index_js_2 = require("../../../util/index.js");
|
|
9
10
|
const format_js_1 = require("./format.js");
|
|
11
|
+
/**
|
|
12
|
+
* Encode data from `cursor` in the simplest way supported by `EncodedChunk` using {@link FieldBatchFormatVersion.v1}.
|
|
13
|
+
* @remarks See {@link uncompressedEncode} for more details.
|
|
14
|
+
*/
|
|
15
|
+
function uncompressedEncodeV1(batch) {
|
|
16
|
+
return uncompressedEncode(batch, (0, index_js_2.brand)(format_js_1.FieldBatchFormatVersion.v1));
|
|
17
|
+
}
|
|
18
|
+
exports.uncompressedEncodeV1 = uncompressedEncodeV1;
|
|
19
|
+
/**
|
|
20
|
+
* Encode data from `cursor` in the simplest way supported by `EncodedChunk` using {@link FieldBatchFormatVersion.v2}.
|
|
21
|
+
* @remarks See {@link uncompressedEncode} for more details.
|
|
22
|
+
*/
|
|
23
|
+
function uncompressedEncodeV2(batch) {
|
|
24
|
+
return uncompressedEncode(batch, (0, index_js_2.brand)(format_js_1.FieldBatchFormatVersion.v2));
|
|
25
|
+
}
|
|
26
|
+
exports.uncompressedEncodeV2 = uncompressedEncodeV2;
|
|
10
27
|
/**
|
|
11
28
|
* Encode data from `cursor` in the simplest way supported by `EncodedChunk`.
|
|
12
29
|
*
|
|
@@ -15,10 +32,10 @@ const format_js_1 = require("./format.js");
|
|
|
15
32
|
*
|
|
16
33
|
* This is intended as a simple reference implementation with minimal code and dependencies.
|
|
17
34
|
*/
|
|
18
|
-
function uncompressedEncode(batch) {
|
|
35
|
+
function uncompressedEncode(batch, version) {
|
|
19
36
|
const rootFields = batch.map(encodeSequence);
|
|
20
37
|
return {
|
|
21
|
-
version
|
|
38
|
+
version,
|
|
22
39
|
identifiers: [],
|
|
23
40
|
// A single shape used to encode all fields.
|
|
24
41
|
shapes: [{ c: anyNodeShape }, { a: anyArray }],
|
|
@@ -26,7 +43,6 @@ function uncompressedEncode(batch) {
|
|
|
26
43
|
data: rootFields.map((data) => [arrayIndex, data]),
|
|
27
44
|
};
|
|
28
45
|
}
|
|
29
|
-
exports.uncompressedEncode = uncompressedEncode;
|
|
30
46
|
const treeIndex = 0;
|
|
31
47
|
const arrayIndex = 1;
|
|
32
48
|
const anyNodeShape = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uncompressedEncode.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qDAIgC;
|
|
1
|
+
{"version":3,"file":"uncompressedEncode.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qDAIgC;AAChC,qDAA+C;AAI/C,2CAOqB;AAGrB;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,KAAiB;IACrD,OAAO,kBAAkB,CAAC,KAAK,EAAE,IAAA,gBAAK,EAAC,mCAAuB,CAAC,EAAE,CAAC,CAAC,CAAC;AACrE,CAAC;AAFD,oDAEC;AAED;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,KAAiB;IACrD,OAAO,kBAAkB,CAAC,KAAK,EAAE,IAAA,gBAAK,EAAC,mCAAuB,CAAC,EAAE,CAAC,CAAC,CAAC;AACrE,CAAC;AAFD,oDAEC;AAED;;;;;;;GAOG;AACH,SAAS,kBAAkB,CAC1B,KAAiB,EACjB,OAAgC;IAEhC,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC7C,OAAO;QACN,OAAO;QACP,WAAW,EAAE,EAAE;QACf,4CAA4C;QAC5C,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;QAC9C,mFAAmF;QACnF,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;KAClD,CAAC;AACH,CAAC;AAED,MAAM,SAAS,GAAe,CAAC,CAAC;AAChC,MAAM,UAAU,GAAe,CAAC,CAAC;AAEjC,MAAM,YAAY,GAAqB;IACtC,WAAW,EAAE,UAAU;CACvB,CAAC;AAEF,MAAM,QAAQ,GAA4B,SAAS,CAAC;AAEpD;;;;;GAKG;AACH,SAAS,cAAc,CAAC,MAA8B;IACrD,MAAM,IAAI,GAAgC,EAAE,CAAC;IAC7C,IAAA,sBAAW,EAAC,MAAM,EAAE,GAAG,EAAE;QACxB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;QAC/B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,KAAK,GAAgC,EAAE,CAAC;QAC9C,IAAA,uBAAY,EAAC,MAAM,EAAE,GAAG,EAAE;YACzB,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACb,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype ITreeCursorSynchronous,\n\tforEachField,\n\tforEachNode,\n} from \"../../../core/index.js\";\nimport { brand } from \"../../../util/index.js\";\nimport type { FluidSerializableReadOnly } from \"../../valueUtilities.js\";\n\nimport type { FieldBatch } from \"./fieldBatch.js\";\nimport {\n\tFieldBatchFormatVersion,\n\ttype EncodedFieldBatch,\n\ttype EncodedFieldBatchV1,\n\ttype EncodedFieldBatchV2,\n\ttype EncodedNestedArrayShape,\n\ttype EncodedNodeShape,\n} from \"./format.js\";\nimport type { ShapeIndex } from \"./formatGeneric.js\";\n\n/**\n * Encode data from `cursor` in the simplest way supported by `EncodedChunk` using {@link FieldBatchFormatVersion.v1}.\n * @remarks See {@link uncompressedEncode} for more details.\n */\nexport function uncompressedEncodeV1(batch: FieldBatch): EncodedFieldBatchV1 {\n\treturn uncompressedEncode(batch, brand(FieldBatchFormatVersion.v1));\n}\n\n/**\n * Encode data from `cursor` in the simplest way supported by `EncodedChunk` using {@link FieldBatchFormatVersion.v2}.\n * @remarks See {@link uncompressedEncode} for more details.\n */\nexport function uncompressedEncodeV2(batch: FieldBatch): EncodedFieldBatchV2 {\n\treturn uncompressedEncode(batch, brand(FieldBatchFormatVersion.v2));\n}\n\n/**\n * Encode data from `cursor` in the simplest way supported by `EncodedChunk`.\n *\n * No polymorphism, identifier deduplication or schema based compression.\n * Just uses two hard coded shapes and inline identifiers.\n *\n * This is intended as a simple reference implementation with minimal code and dependencies.\n */\nfunction uncompressedEncode(\n\tbatch: FieldBatch,\n\tversion: FieldBatchFormatVersion,\n): EncodedFieldBatch {\n\tconst rootFields = batch.map(encodeSequence);\n\treturn {\n\t\tversion,\n\t\tidentifiers: [],\n\t\t// A single shape used to encode all fields.\n\t\tshapes: [{ c: anyNodeShape }, { a: anyArray }],\n\t\t// Wrap up each field as an indicator to use the above shape, and its encoded data.\n\t\tdata: rootFields.map((data) => [arrayIndex, data]),\n\t};\n}\n\nconst treeIndex: ShapeIndex = 0;\nconst arrayIndex: ShapeIndex = 1;\n\nconst anyNodeShape: EncodedNodeShape = {\n\textraFields: arrayIndex,\n};\n\nconst anyArray: EncodedNestedArrayShape = treeIndex;\n\n/**\n * Encode a field using the hard coded shape above.\n * @remarks\n * Since this shape contains no information about the actual schema, all schema/shape information is inline in the data:\n * that is why this encoding is called \"uncompressed\".\n */\nfunction encodeSequence(cursor: ITreeCursorSynchronous): FluidSerializableReadOnly[] {\n\tconst data: FluidSerializableReadOnly[] = [];\n\tforEachNode(cursor, () => {\n\t\tdata.push(cursor.type);\n\t\tconst value = cursor.value;\n\t\tdata.push(value !== undefined);\n\t\tif (value !== undefined) {\n\t\t\tdata.push(value);\n\t\t}\n\t\tconst local: FluidSerializableReadOnly[] = [];\n\t\tforEachField(cursor, () => {\n\t\t\tconst key = cursor.getFieldKey();\n\t\t\tlocal.push(key, encodeSequence(cursor));\n\t\t});\n\t\tdata.push(local);\n\t});\n\treturn data;\n}\n"]}
|
|
@@ -6,6 +6,6 @@ export { uniformChunk, ChunkShape } from "./uniformChunk.js";
|
|
|
6
6
|
export { type TreeChunk, dummyRoot } from "../../core/index.js";
|
|
7
7
|
export { chunkTree, defaultChunkPolicy, makeTreeChunker, type IChunker, chunkFieldSingle, chunkField, combineChunks, } from "./chunkTree.js";
|
|
8
8
|
export { buildChunkedForest } from "./chunkedForest.js";
|
|
9
|
-
export { EncodedFieldBatch,
|
|
9
|
+
export { EncodedFieldBatch, FieldBatchFormatVersion, getCodecTreeForFieldBatchFormat, type FieldBatch, type FieldBatchCodec, makeFieldBatchCodec, type FieldBatchEncodingContext, type IncrementalEncoderDecoder, type ChunkReferenceId, type IncrementalEncodingPolicy, defaultIncrementalEncodingPolicy, } from "./codec/index.js";
|
|
10
10
|
export { emptyChunk } from "./emptyChunk.js";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EACN,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,KAAK,QAAQ,EACb,gBAAgB,EAChB,UAAU,EACV,aAAa,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EACN,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EACN,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,KAAK,QAAQ,EACb,gBAAgB,EAChB,UAAU,EACV,aAAa,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EACN,iBAAiB,EACjB,uBAAuB,EACvB,+BAA+B,EAC/B,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,gCAAgC,GAChC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.emptyChunk = exports.defaultIncrementalEncodingPolicy = exports.
|
|
7
|
+
exports.emptyChunk = exports.defaultIncrementalEncodingPolicy = exports.makeFieldBatchCodec = exports.getCodecTreeForFieldBatchFormat = exports.FieldBatchFormatVersion = exports.EncodedFieldBatch = exports.buildChunkedForest = exports.combineChunks = exports.chunkField = exports.chunkFieldSingle = exports.makeTreeChunker = exports.defaultChunkPolicy = exports.chunkTree = exports.dummyRoot = exports.ChunkShape = exports.uniformChunk = void 0;
|
|
8
8
|
var uniformChunk_js_1 = require("./uniformChunk.js");
|
|
9
9
|
Object.defineProperty(exports, "uniformChunk", { enumerable: true, get: function () { return uniformChunk_js_1.uniformChunk; } });
|
|
10
10
|
Object.defineProperty(exports, "ChunkShape", { enumerable: true, get: function () { return uniformChunk_js_1.ChunkShape; } });
|
|
@@ -21,9 +21,9 @@ var chunkedForest_js_1 = require("./chunkedForest.js");
|
|
|
21
21
|
Object.defineProperty(exports, "buildChunkedForest", { enumerable: true, get: function () { return chunkedForest_js_1.buildChunkedForest; } });
|
|
22
22
|
var index_js_2 = require("./codec/index.js");
|
|
23
23
|
Object.defineProperty(exports, "EncodedFieldBatch", { enumerable: true, get: function () { return index_js_2.EncodedFieldBatch; } });
|
|
24
|
+
Object.defineProperty(exports, "FieldBatchFormatVersion", { enumerable: true, get: function () { return index_js_2.FieldBatchFormatVersion; } });
|
|
24
25
|
Object.defineProperty(exports, "getCodecTreeForFieldBatchFormat", { enumerable: true, get: function () { return index_js_2.getCodecTreeForFieldBatchFormat; } });
|
|
25
26
|
Object.defineProperty(exports, "makeFieldBatchCodec", { enumerable: true, get: function () { return index_js_2.makeFieldBatchCodec; } });
|
|
26
|
-
Object.defineProperty(exports, "fluidVersionToFieldBatchCodecWriteVersion", { enumerable: true, get: function () { return index_js_2.fluidVersionToFieldBatchCodecWriteVersion; } });
|
|
27
27
|
Object.defineProperty(exports, "defaultIncrementalEncodingPolicy", { enumerable: true, get: function () { return index_js_2.defaultIncrementalEncodingPolicy; } });
|
|
28
28
|
var emptyChunk_js_1 = require("./emptyChunk.js");
|
|
29
29
|
Object.defineProperty(exports, "emptyChunk", { enumerable: true, get: function () { return emptyChunk_js_1.emptyChunk; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qDAA6D;AAApD,+GAAA,YAAY,OAAA;AAAE,6GAAA,UAAU,OAAA;AACjC,gDAAgE;AAAvC,qGAAA,SAAS,OAAA;AAClC,+CAQwB;AAPvB,yGAAA,SAAS,OAAA;AACT,kHAAA,kBAAkB,OAAA;AAClB,+GAAA,eAAe,OAAA;AAEf,gHAAA,gBAAgB,OAAA;AAChB,0GAAA,UAAU,OAAA;AACV,6GAAA,aAAa,OAAA;AAEd,uDAAwD;AAA/C,sHAAA,kBAAkB,OAAA;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qDAA6D;AAApD,+GAAA,YAAY,OAAA;AAAE,6GAAA,UAAU,OAAA;AACjC,gDAAgE;AAAvC,qGAAA,SAAS,OAAA;AAClC,+CAQwB;AAPvB,yGAAA,SAAS,OAAA;AACT,kHAAA,kBAAkB,OAAA;AAClB,+GAAA,eAAe,OAAA;AAEf,gHAAA,gBAAgB,OAAA;AAChB,0GAAA,UAAU,OAAA;AACV,6GAAA,aAAa,OAAA;AAEd,uDAAwD;AAA/C,sHAAA,kBAAkB,OAAA;AAC3B,6CAY0B;AAXzB,6GAAA,iBAAiB,OAAA;AACjB,mHAAA,uBAAuB,OAAA;AACvB,2HAAA,+BAA+B,OAAA;AAG/B,+GAAA,mBAAmB,OAAA;AAKnB,4HAAA,gCAAgC,OAAA;AAEjC,iDAA6C;AAApC,2GAAA,UAAU,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { uniformChunk, ChunkShape } from \"./uniformChunk.js\";\nexport { type TreeChunk, dummyRoot } from \"../../core/index.js\";\nexport {\n\tchunkTree,\n\tdefaultChunkPolicy,\n\tmakeTreeChunker,\n\ttype IChunker,\n\tchunkFieldSingle,\n\tchunkField,\n\tcombineChunks,\n} from \"./chunkTree.js\";\nexport { buildChunkedForest } from \"./chunkedForest.js\";\nexport {\n\tEncodedFieldBatch,\n\tFieldBatchFormatVersion,\n\tgetCodecTreeForFieldBatchFormat,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\ttype IncrementalEncoderDecoder,\n\ttype ChunkReferenceId,\n\ttype IncrementalEncodingPolicy,\n\tdefaultIncrementalEncodingPolicy,\n} from \"./codec/index.js\";\nexport { emptyChunk } from \"./emptyChunk.js\";\n"]}
|
|
@@ -3,15 +3,24 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { type ChangeAtomId, type FieldKindIdentifier, forbiddenFieldKindIdentifier, Multiplicity } from "../../core/index.js";
|
|
6
|
-
import { type FieldChangeHandler, type FieldEditor, type FieldKindConfiguration,
|
|
7
|
-
import { type OptionalChangeset } from "../optional-field/index.js";
|
|
6
|
+
import { type FieldChangeHandler, type FieldEditor, type FieldKindConfiguration, FlexFieldKind, type FullSchemaPolicy } from "../modular-schema/index.js";
|
|
7
|
+
import { type OptionalChangeset, type OptionalFieldEditor } from "../optional-field/index.js";
|
|
8
|
+
import { type SequenceFieldEditor } from "../sequence-field/index.js";
|
|
8
9
|
import type { CodecTree } from "../../codec/index.js";
|
|
9
10
|
import { type Brand } from "../../util/index.js";
|
|
10
11
|
/**
|
|
11
12
|
* ChangeHandler that only handles no-op / identity changes.
|
|
12
13
|
*/
|
|
13
14
|
export declare const noChangeHandler: FieldChangeHandler<0>;
|
|
14
|
-
|
|
15
|
+
/**
|
|
16
|
+
* {@link FieldEditor} for required fields (always contain exactly 1 child).
|
|
17
|
+
* @remarks
|
|
18
|
+
* This shares code with optional fields, since they are the same edit wise except setting to empty is not allowed,
|
|
19
|
+
* and the content is always assumed to not be empty.
|
|
20
|
+
* This means the actual edits implemented for optional fields are sufficient to support required fields
|
|
21
|
+
* which is why this is defined and implemented in terms of optional fields.
|
|
22
|
+
*/
|
|
23
|
+
export interface RequiredFieldEditor extends FieldEditor<OptionalChangeset> {
|
|
15
24
|
/**
|
|
16
25
|
* Creates a change which replaces the current value of the field with `newValue`.
|
|
17
26
|
* @param ids - The ids for the fill and detach fields.
|
|
@@ -21,32 +30,28 @@ export interface ValueFieldEditor extends FieldEditor<OptionalChangeset> {
|
|
|
21
30
|
detach: ChangeAtomId;
|
|
22
31
|
}): OptionalChangeset;
|
|
23
32
|
}
|
|
33
|
+
declare const optionalIdentifier: import("../../util/brand.js").BrandedType<string, "tree.FieldKindIdentifier"> & "Optional";
|
|
24
34
|
/**
|
|
25
35
|
* 0 or 1 items.
|
|
26
36
|
*/
|
|
27
|
-
export declare const optional:
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
37
|
+
export declare const optional: FlexFieldKind<OptionalFieldEditor, import("../../util/brand.js").BrandedType<string, "tree.FieldKindIdentifier"> & "Optional", Multiplicity.Optional>;
|
|
38
|
+
export declare const requiredFieldEditor: RequiredFieldEditor;
|
|
39
|
+
export declare const requiredFieldChangeHandler: FieldChangeHandler<OptionalChangeset, RequiredFieldEditor>;
|
|
40
|
+
declare const requiredIdentifier: import("../../util/brand.js").BrandedType<string, "tree.FieldKindIdentifier"> & "Value";
|
|
30
41
|
/**
|
|
31
42
|
* Exactly one item.
|
|
32
43
|
*/
|
|
33
|
-
export declare const required:
|
|
44
|
+
export declare const required: FlexFieldKind<RequiredFieldEditor, import("../../util/brand.js").BrandedType<string, "tree.FieldKindIdentifier"> & "Value", Multiplicity.Single>;
|
|
45
|
+
declare const sequenceIdentifier: import("../../util/brand.js").BrandedType<string, "tree.FieldKindIdentifier"> & "Sequence";
|
|
34
46
|
/**
|
|
35
47
|
* 0 or more items.
|
|
36
48
|
*/
|
|
37
|
-
export declare const sequence:
|
|
38
|
-
|
|
39
|
-
* Exactly one identifier.
|
|
40
|
-
*
|
|
41
|
-
* TODO: this is almost the same as identifier, but apparently unused.
|
|
42
|
-
* Confirm if this is truly unused since before the document format was stabilized, and remove if possible.
|
|
43
|
-
* @deprecated Superseded by {@link identifier}.
|
|
44
|
-
*/
|
|
45
|
-
export declare const nodeKey: FieldKindWithEditor<FieldEditor<0>, Multiplicity.Single, "NodeKey">;
|
|
49
|
+
export declare const sequence: FlexFieldKind<SequenceFieldEditor, import("../../util/brand.js").BrandedType<string, "tree.FieldKindIdentifier"> & "Sequence", Multiplicity.Sequence>;
|
|
50
|
+
declare const identifierFieldIdentifier: import("../../util/brand.js").BrandedType<string, "tree.FieldKindIdentifier"> & "Identifier";
|
|
46
51
|
/**
|
|
47
52
|
* Exactly one identifier.
|
|
48
53
|
*/
|
|
49
|
-
export declare const identifier:
|
|
54
|
+
export declare const identifier: FlexFieldKind<FieldEditor<0>, import("../../util/brand.js").BrandedType<string, "tree.FieldKindIdentifier"> & "Identifier", Multiplicity.Single>;
|
|
50
55
|
/**
|
|
51
56
|
* Exactly 0 items.
|
|
52
57
|
*
|
|
@@ -75,9 +80,9 @@ export declare const identifier: FieldKindWithEditor<FieldEditor<0>, Multiplicit
|
|
|
75
80
|
*
|
|
76
81
|
* See {@link emptyField} for a constant, reusable field using Forbidden.
|
|
77
82
|
*/
|
|
78
|
-
export declare const forbidden:
|
|
83
|
+
export declare const forbidden: FlexFieldKind<FieldEditor<0>, import("../../util/brand.js").BrandedType<string, "tree.FieldKindIdentifier"> & "Forbidden", Multiplicity.Forbidden>;
|
|
79
84
|
export declare const fieldKindConfigurations: ReadonlyMap<ModularChangeFormatVersion, FieldKindConfiguration>;
|
|
80
|
-
export type ModularChangeFormatVersion = Brand<
|
|
85
|
+
export type ModularChangeFormatVersion = Brand<3 | 4, "ModularChangeFormatVersion">;
|
|
81
86
|
export declare function getCodecTreeForModularChangeFormat(version: ModularChangeFormatVersion): CodecTree;
|
|
82
87
|
/**
|
|
83
88
|
* All supported field kinds.
|
|
@@ -86,16 +91,16 @@ export declare function getCodecTreeForModularChangeFormat(version: ModularChang
|
|
|
86
91
|
* Before making a SharedTree format change which impacts which set of field kinds are allowed,
|
|
87
92
|
* code which uses this should be audited for compatibility considerations.
|
|
88
93
|
*/
|
|
89
|
-
export declare const fieldKinds: ReadonlyMap<FieldKindIdentifier,
|
|
90
|
-
export interface Required extends FlexFieldKind<
|
|
94
|
+
export declare const fieldKinds: ReadonlyMap<FieldKindIdentifier, FlexFieldKind>;
|
|
95
|
+
export interface Required extends FlexFieldKind<RequiredFieldEditor, typeof requiredIdentifier, Multiplicity.Single> {
|
|
91
96
|
}
|
|
92
|
-
export interface Optional extends FlexFieldKind<
|
|
97
|
+
export interface Optional extends FlexFieldKind<OptionalFieldEditor, typeof optionalIdentifier, Multiplicity.Optional> {
|
|
93
98
|
}
|
|
94
|
-
export interface Sequence extends FlexFieldKind<
|
|
99
|
+
export interface Sequence extends FlexFieldKind<SequenceFieldEditor, typeof sequenceIdentifier, Multiplicity.Sequence> {
|
|
95
100
|
}
|
|
96
|
-
export interface Identifier extends FlexFieldKind<
|
|
101
|
+
export interface Identifier extends FlexFieldKind<FieldEditor<0>, typeof identifierFieldIdentifier, Multiplicity.Single> {
|
|
97
102
|
}
|
|
98
|
-
export interface Forbidden extends FlexFieldKind<typeof forbiddenFieldKindIdentifier, Multiplicity.Forbidden> {
|
|
103
|
+
export interface Forbidden extends FlexFieldKind<FieldEditor<0>, typeof forbiddenFieldKindIdentifier, Multiplicity.Forbidden> {
|
|
99
104
|
}
|
|
100
105
|
/**
|
|
101
106
|
* Default FieldKinds with their editor types erased.
|
|
@@ -107,4 +112,9 @@ export declare const FieldKinds: {
|
|
|
107
112
|
readonly identifier: Identifier;
|
|
108
113
|
readonly forbidden: Forbidden;
|
|
109
114
|
};
|
|
115
|
+
/**
|
|
116
|
+
* FullSchemaPolicy with the default field kinds.
|
|
117
|
+
*/
|
|
118
|
+
export declare const defaultSchemaPolicy: FullSchemaPolicy;
|
|
119
|
+
export {};
|
|
110
120
|
//# sourceMappingURL=defaultFieldKinds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultFieldKinds.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultFieldKinds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,YAAY,EAEjB,KAAK,mBAAmB,EACxB,4BAA4B,EAC5B,YAAY,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAE3B,
|
|
1
|
+
{"version":3,"file":"defaultFieldKinds.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultFieldKinds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,YAAY,EAEjB,KAAK,mBAAmB,EACxB,4BAA4B,EAC5B,YAAY,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAE3B,aAAa,EACb,KAAK,gBAAgB,EAIrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAGxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAqB,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,kBAAkB,CAAC,CAAC,CAejD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAoB,SAAQ,WAAW,CAAC,iBAAiB,CAAC;IAC1E;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,YAAY,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,GAAG,iBAAiB,CAAC;CAC1E;AAED,QAAA,MAAM,kBAAkB,4FAAgD,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,QAAQ,uJAKnB,CA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yB,EAChC,YAAY,CAAC,MAAM,CACnB;CAAG;AACL,MAAM,WAAW,SAChB,SAAQ,aAAa,CACpB,WAAW,CAAC,CAAC,CAAC,EACd,OAAO,4BAA4B,EACnC,YAAY,CAAC,SAAS,CACtB;CAAG;AAEL;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE;IAExB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC4B,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBAEjC,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.FieldKinds = exports.fieldKinds = exports.getCodecTreeForModularChangeFormat = exports.fieldKindConfigurations = exports.forbidden = exports.identifier = exports.
|
|
7
|
+
exports.defaultSchemaPolicy = exports.FieldKinds = exports.fieldKinds = exports.getCodecTreeForModularChangeFormat = exports.fieldKindConfigurations = exports.forbidden = exports.identifier = exports.sequence = exports.required = exports.requiredFieldChangeHandler = exports.requiredFieldEditor = exports.optional = exports.noChangeHandler = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
9
|
const index_js_1 = require("../../core/index.js");
|
|
10
10
|
const index_js_2 = require("../modular-schema/index.js");
|
|
@@ -31,67 +31,63 @@ exports.noChangeHandler = {
|
|
|
31
31
|
createEmpty: () => 0,
|
|
32
32
|
getCrossFieldKeys: () => [],
|
|
33
33
|
};
|
|
34
|
-
const optionalIdentifier = "Optional";
|
|
34
|
+
const optionalIdentifier = (0, index_js_5.brandConst)("Optional")();
|
|
35
35
|
/**
|
|
36
36
|
* 0 or 1 items.
|
|
37
37
|
*/
|
|
38
|
-
exports.optional = new index_js_2.
|
|
39
|
-
|
|
40
|
-
exports.
|
|
38
|
+
exports.optional = new index_js_2.FlexFieldKind(optionalIdentifier, index_js_1.Multiplicity.Optional, {
|
|
39
|
+
changeHandler: index_js_3.optionalChangeHandler,
|
|
40
|
+
allowsTreeSupersetOf: (types, other) => (other.kind === exports.sequence.identifier || other.kind === optionalIdentifier) &&
|
|
41
|
+
(0, index_js_2.allowsTreeSchemaIdentifierSuperset)(types, other.types),
|
|
42
|
+
});
|
|
43
|
+
exports.requiredFieldEditor = {
|
|
41
44
|
...index_js_3.optionalFieldEditor,
|
|
42
45
|
set: (ids) => index_js_3.optionalFieldEditor.set(false, ids),
|
|
43
46
|
};
|
|
44
|
-
exports.
|
|
45
|
-
...
|
|
46
|
-
editor: exports.
|
|
47
|
+
exports.requiredFieldChangeHandler = {
|
|
48
|
+
...index_js_3.optionalChangeHandler,
|
|
49
|
+
editor: exports.requiredFieldEditor,
|
|
47
50
|
};
|
|
48
|
-
const requiredIdentifier = "Value";
|
|
51
|
+
const requiredIdentifier = (0, index_js_5.brandConst)("Value")();
|
|
49
52
|
/**
|
|
50
53
|
* Exactly one item.
|
|
51
54
|
*/
|
|
52
|
-
exports.required = new index_js_2.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
other.kind === exports.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
exports.required = new index_js_2.FlexFieldKind(requiredIdentifier, index_js_1.Multiplicity.Single, {
|
|
56
|
+
changeHandler: exports.requiredFieldChangeHandler,
|
|
57
|
+
allowsTreeSupersetOf: (types, other) =>
|
|
58
|
+
// By omitting Identifier here,
|
|
59
|
+
// this is making a policy choice that a schema upgrade cannot be done from required to identifier.
|
|
60
|
+
// Since an identifier can be upgraded into a required field,
|
|
61
|
+
// preventing the inverse helps ensure that schema upgrades are monotonic.
|
|
62
|
+
// Which direction is allowed is a subjective policy choice.
|
|
63
|
+
(other.kind === exports.sequence.identifier ||
|
|
64
|
+
other.kind === requiredIdentifier ||
|
|
65
|
+
other.kind === exports.optional.identifier) &&
|
|
66
|
+
(0, index_js_2.allowsTreeSchemaIdentifierSuperset)(types, other.types),
|
|
67
|
+
});
|
|
68
|
+
const sequenceIdentifier = (0, index_js_5.brandConst)("Sequence")();
|
|
64
69
|
/**
|
|
65
70
|
* 0 or more items.
|
|
66
71
|
*/
|
|
67
|
-
exports.sequence = new index_js_2.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
* Exactly one identifier.
|
|
74
|
-
*
|
|
75
|
-
* TODO: this is almost the same as identifier, but apparently unused.
|
|
76
|
-
* Confirm if this is truly unused since before the document format was stabilized, and remove if possible.
|
|
77
|
-
* @deprecated Superseded by {@link identifier}.
|
|
78
|
-
*/
|
|
79
|
-
exports.nodeKey = new index_js_2.FieldKindWithEditor(nodeKeyIdentifier, index_js_1.Multiplicity.Single, exports.noChangeHandler, (types, other) => (other.kind === exports.sequence.identifier ||
|
|
80
|
-
other.kind === requiredIdentifier ||
|
|
81
|
-
other.kind === exports.optional.identifier ||
|
|
82
|
-
other.kind === nodeKeyIdentifier) &&
|
|
83
|
-
(0, index_js_2.allowsTreeSchemaIdentifierSuperset)(types, other.types), new Set());
|
|
84
|
-
const identifierFieldIdentifier = "Identifier";
|
|
72
|
+
exports.sequence = new index_js_2.FlexFieldKind(sequenceIdentifier, index_js_1.Multiplicity.Sequence, {
|
|
73
|
+
changeHandler: index_js_4.sequenceFieldChangeHandler,
|
|
74
|
+
allowsTreeSupersetOf: (types, other) => other.kind === sequenceIdentifier &&
|
|
75
|
+
(0, index_js_2.allowsTreeSchemaIdentifierSuperset)(types, other.types),
|
|
76
|
+
});
|
|
77
|
+
const identifierFieldIdentifier = (0, index_js_5.brandConst)("Identifier")();
|
|
85
78
|
/**
|
|
86
79
|
* Exactly one identifier.
|
|
87
80
|
*/
|
|
88
|
-
exports.identifier = new index_js_2.
|
|
89
|
-
|
|
90
|
-
(other
|
|
91
|
-
|
|
92
|
-
other.kind === exports.
|
|
93
|
-
|
|
94
|
-
|
|
81
|
+
exports.identifier = new index_js_2.FlexFieldKind(identifierFieldIdentifier, index_js_1.Multiplicity.Single, {
|
|
82
|
+
changeHandler: exports.noChangeHandler,
|
|
83
|
+
allowsTreeSupersetOf: (types, other) =>
|
|
84
|
+
// Allows upgrading from identifier to required: which way this upgrade is allowed to go is a subjective policy choice.
|
|
85
|
+
(other.kind === exports.sequence.identifier ||
|
|
86
|
+
other.kind === requiredIdentifier ||
|
|
87
|
+
other.kind === exports.optional.identifier ||
|
|
88
|
+
other.kind === identifierFieldIdentifier) &&
|
|
89
|
+
(0, index_js_2.allowsTreeSchemaIdentifierSuperset)(types, other.types),
|
|
90
|
+
});
|
|
95
91
|
/**
|
|
96
92
|
* Exactly 0 items.
|
|
97
93
|
*
|
|
@@ -120,36 +116,15 @@ exports.identifier = new index_js_2.FieldKindWithEditor(identifierFieldIdentifie
|
|
|
120
116
|
*
|
|
121
117
|
* See {@link emptyField} for a constant, reusable field using Forbidden.
|
|
122
118
|
*/
|
|
123
|
-
exports.forbidden = new index_js_2.
|
|
124
|
-
|
|
125
|
-
|
|
119
|
+
exports.forbidden = new index_js_2.FlexFieldKind(index_js_1.forbiddenFieldKindIdentifier, index_js_1.Multiplicity.Forbidden, {
|
|
120
|
+
changeHandler: exports.noChangeHandler,
|
|
121
|
+
// All multiplicities other than Value support empty.
|
|
122
|
+
allowsTreeSupersetOf: (types, other) => exports.fieldKinds.get(other.kind)?.multiplicity !== index_js_1.Multiplicity.Single,
|
|
123
|
+
});
|
|
126
124
|
exports.fieldKindConfigurations = new Map([
|
|
127
|
-
[
|
|
128
|
-
(0, index_js_5.brand)(1),
|
|
129
|
-
new Map([
|
|
130
|
-
[exports.nodeKey.identifier, { kind: exports.nodeKey, formatVersion: 1 }],
|
|
131
|
-
[exports.required.identifier, { kind: exports.required, formatVersion: 1 }],
|
|
132
|
-
[exports.optional.identifier, { kind: exports.optional, formatVersion: 1 }],
|
|
133
|
-
[exports.sequence.identifier, { kind: exports.sequence, formatVersion: 1 }],
|
|
134
|
-
[exports.forbidden.identifier, { kind: exports.forbidden, formatVersion: 1 }],
|
|
135
|
-
[exports.identifier.identifier, { kind: exports.identifier, formatVersion: 1 }],
|
|
136
|
-
]),
|
|
137
|
-
],
|
|
138
|
-
[
|
|
139
|
-
(0, index_js_5.brand)(2),
|
|
140
|
-
new Map([
|
|
141
|
-
[exports.nodeKey.identifier, { kind: exports.nodeKey, formatVersion: 1 }],
|
|
142
|
-
[exports.required.identifier, { kind: exports.required, formatVersion: 2 }],
|
|
143
|
-
[exports.optional.identifier, { kind: exports.optional, formatVersion: 2 }],
|
|
144
|
-
[exports.sequence.identifier, { kind: exports.sequence, formatVersion: 1 }],
|
|
145
|
-
[exports.forbidden.identifier, { kind: exports.forbidden, formatVersion: 1 }],
|
|
146
|
-
[exports.identifier.identifier, { kind: exports.identifier, formatVersion: 1 }],
|
|
147
|
-
]),
|
|
148
|
-
],
|
|
149
125
|
[
|
|
150
126
|
(0, index_js_5.brand)(3),
|
|
151
127
|
new Map([
|
|
152
|
-
[exports.nodeKey.identifier, { kind: exports.nodeKey, formatVersion: 1 }],
|
|
153
128
|
[exports.required.identifier, { kind: exports.required, formatVersion: 2 }],
|
|
154
129
|
[exports.optional.identifier, { kind: exports.optional, formatVersion: 2 }],
|
|
155
130
|
[exports.sequence.identifier, { kind: exports.sequence, formatVersion: 2 }],
|
|
@@ -160,7 +135,6 @@ exports.fieldKindConfigurations = new Map([
|
|
|
160
135
|
[
|
|
161
136
|
(0, index_js_5.brand)(4),
|
|
162
137
|
new Map([
|
|
163
|
-
[exports.nodeKey.identifier, { kind: exports.nodeKey, formatVersion: 1 }],
|
|
164
138
|
[exports.required.identifier, { kind: exports.required, formatVersion: 2 }],
|
|
165
139
|
[exports.optional.identifier, { kind: exports.optional, formatVersion: 2 }],
|
|
166
140
|
[exports.sequence.identifier, { kind: exports.sequence, formatVersion: 3 }],
|
|
@@ -189,9 +163,15 @@ exports.getCodecTreeForModularChangeFormat = getCodecTreeForModularChangeFormat;
|
|
|
189
163
|
* Before making a SharedTree format change which impacts which set of field kinds are allowed,
|
|
190
164
|
* code which uses this should be audited for compatibility considerations.
|
|
191
165
|
*/
|
|
192
|
-
exports.fieldKinds = new Map([exports.required, exports.optional, exports.sequence, exports.
|
|
166
|
+
exports.fieldKinds = new Map([exports.required, exports.optional, exports.sequence, exports.identifier, exports.forbidden].map((s) => [s.identifier, s]));
|
|
193
167
|
/**
|
|
194
168
|
* Default FieldKinds with their editor types erased.
|
|
195
169
|
*/
|
|
196
170
|
exports.FieldKinds = { required: exports.required, optional: exports.optional, sequence: exports.sequence, identifier: exports.identifier, forbidden: exports.forbidden };
|
|
171
|
+
/**
|
|
172
|
+
* FullSchemaPolicy with the default field kinds.
|
|
173
|
+
*/
|
|
174
|
+
exports.defaultSchemaPolicy = {
|
|
175
|
+
fieldKinds: exports.fieldKinds,
|
|
176
|
+
};
|
|
197
177
|
//# sourceMappingURL=defaultFieldKinds.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultFieldKinds.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultFieldKinds.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA2D;AAE3D,kDAM6B;AAC7B,yDAWoC;AACpC,yDAIoC;AACpC,yDAAwE;AAExE,2DAA0D;AAE1D,kDAAwD;AAExD;;GAEG;AACU,QAAA,eAAe,GAA0B;IACrD,OAAO,EAAE,IAAA,0CAA+B,EAAC;QACxC,OAAO,EAAE,CAAC,OAAU,EAAE,OAAU,EAAE,EAAE,CAAC,CAAC;QACtC,MAAM,EAAE,CAAC,OAAU,EAAE,EAAE,CAAC,CAAC;QACzB,MAAM,EAA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BAAU,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,kBAAU,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;SAC/D,CAAC;KACF;CACD,CAAC,CAAC;AAGH,SAAgB,kCAAkC,CACjD,OAAmC;IAEnC,MAAM,YAAY,GACjB,+BAAuB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAA,eAAI,EAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACzF,MAAM,QAAQ,GAAgB,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CACnE,CAAC,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9B,IAAI,EAAE,aAAa,GAAG,EAAE;QACxB,OAAO,EAAE,aAAa;KACtB,CAAC,CACF,CAAC;IACF,OAAO;QACN,IAAI,EAAE,eAAe;QACrB,OAAO;QACP,QAAQ;KACR,CAAC;AACH,CAAC;AAhBD,gFAgBC;AAED;;;;;;GAMG;AACU,QAAA,UAAU,GAA0D,IAAI,GAAG,CACvF,CAAC,gBAAQ,EAAE,gBAAQ,EAAE,gBAAQ,EAAE,eAAO,EAAE,kBAAU,EAAE,iBAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAC5F,CAAC;AAcF;;GAEG;AACU,QAAA,UAAU,GAOnB,EAAE,QAAQ,EAAR,gBAAQ,EAAE,QAAQ,EAAR,gBAAQ,EAAE,QAAQ,EAAR,gBAAQ,EAAE,UAAU,EAAV,kBAAU,EAAE,SAAS,EAAT,iBAAS,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ChangeAtomId,\n\ttype DeltaDetachedNodeId,\n\ttype FieldKindIdentifier,\n\tforbiddenFieldKindIdentifier,\n\tMultiplicity,\n} from \"../../core/index.js\";\nimport {\n\ttype FieldChangeDelta,\n\ttype FieldChangeHandler,\n\ttype FieldEditor,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tFieldKindWithEditor,\n\ttype FlexFieldKind,\n\ttype ToDelta,\n\tallowsTreeSchemaIdentifierSuperset,\n\treferenceFreeFieldChangeRebaser,\n} from \"../modular-schema/index.js\";\nimport {\n\ttype OptionalChangeset,\n\toptionalChangeHandler,\n\toptionalFieldEditor,\n} from \"../optional-field/index.js\";\nimport { sequenceFieldChangeHandler } from \"../sequence-field/index.js\";\n\nimport { noChangeCodecFamily } from \"./noChangeCodecs.js\";\nimport type { CodecTree } from \"../../codec/index.js\";\nimport { brand, type Brand } from \"../../util/index.js\";\n\n/**\n * ChangeHandler that only handles no-op / identity changes.\n */\nexport const noChangeHandler: FieldChangeHandler<0> = {\n\trebaser: referenceFreeFieldChangeRebaser({\n\t\tcompose: (change1: 0, change2: 0) => 0,\n\t\tinvert: (changes: 0) => 0,\n\t\trebase: (change: 0, over: 0) => 0,\n\t\tmute: (changes: 0) => 0,\n\t}),\n\tcodecsFactory: () => noChangeCodecFamily,\n\teditor: { buildChildChanges: () => fail(0xb0d /* Child changes not supported */) },\n\tintoDelta: (change, deltaFromChild: ToDelta): FieldChangeDelta => ({}),\n\trelevantRemovedRoots: (change): Iterable<DeltaDetachedNodeId> => [],\n\tisEmpty: (change: 0) => true,\n\tgetNestedChanges: (change: 0) => [],\n\tcreateEmpty: () => 0,\n\tgetCrossFieldKeys: () => [],\n};\n\nexport interface ValueFieldEditor extends FieldEditor<OptionalChangeset> {\n\t/**\n\t * Creates a change which replaces the current value of the field with `newValue`.\n\t * @param ids - The ids for the fill and detach fields.\n\t */\n\tset(ids: { fill: ChangeAtomId; detach: ChangeAtomId }): OptionalChangeset;\n}\n\nconst optionalIdentifier = \"Optional\";\n/**\n * 0 or 1 items.\n */\nexport const optional = new FieldKindWithEditor(\n\toptionalIdentifier,\n\tMultiplicity.Optional,\n\toptionalChangeHandler,\n\t(types, other) =>\n\t\t(other.kind === sequence.identifier || other.kind === optionalIdentifier) &&\n\t\tallowsTreeSchemaIdentifierSuperset(types, other.types),\n\tnew Set([]),\n);\n\nexport const valueFieldEditor: ValueFieldEditor = {\n\t...optionalFieldEditor,\n\tset: (ids: {\n\t\tfill: ChangeAtomId;\n\t\tdetach: ChangeAtomId;\n\t}): OptionalChangeset => optionalFieldEditor.set(false, ids),\n};\n\nexport const valueChangeHandler: FieldChangeHandler<OptionalChangeset, ValueFieldEditor> = {\n\t...optional.changeHandler,\n\teditor: valueFieldEditor,\n};\n\nconst requiredIdentifier = \"Value\";\n\n/**\n * Exactly one item.\n */\nexport const required = new FieldKindWithEditor(\n\trequiredIdentifier,\n\tMultiplicity.Single,\n\tvalueChangeHandler,\n\t(types, other) =>\n\t\t// By omitting Identifier here,\n\t\t// this is making a policy choice that a schema upgrade cannot be done from required to identifier.\n\t\t// Since an identifier can be upgraded into a required field,\n\t\t// preventing the inverse helps ensure that schema upgrades are monotonic.\n\t\t// Which direction is allowed is a subjective policy choice.\n\t\t(other.kind === sequence.identifier ||\n\t\t\tother.kind === requiredIdentifier ||\n\t\t\tother.kind === optional.identifier ||\n\t\t\tother.kind === nodeKey.identifier) &&\n\t\tallowsTreeSchemaIdentifierSuperset(types, other.types),\n\tnew Set(),\n);\n\nconst sequenceIdentifier = \"Sequence\";\n\n/**\n * 0 or more items.\n */\nexport const sequence = new FieldKindWithEditor(\n\tsequenceIdentifier,\n\tMultiplicity.Sequence,\n\tsequenceFieldChangeHandler,\n\t(types, other) =>\n\t\tother.kind === sequenceIdentifier &&\n\t\tallowsTreeSchemaIdentifierSuperset(types, other.types),\n\t// TODO: add normalizer/importers for handling ops from other kinds.\n\tnew Set([]),\n);\n\nconst nodeKeyIdentifier = \"NodeKey\";\n\n/**\n * Exactly one identifier.\n *\n * TODO: this is almost the same as identifier, but apparently unused.\n * Confirm if this is truly unused since before the document format was stabilized, and remove if possible.\n * @deprecated Superseded by {@link identifier}.\n */\nexport const nodeKey = new FieldKindWithEditor(\n\tnodeKeyIdentifier,\n\tMultiplicity.Single,\n\tnoChangeHandler,\n\t(types, other) =>\n\t\t(other.kind === sequence.identifier ||\n\t\t\tother.kind === requiredIdentifier ||\n\t\t\tother.kind === optional.identifier ||\n\t\t\tother.kind === nodeKeyIdentifier) &&\n\t\tallowsTreeSchemaIdentifierSuperset(types, other.types),\n\tnew Set(),\n);\n\nconst identifierFieldIdentifier = \"Identifier\";\n\n/**\n * Exactly one identifier.\n */\nexport const identifier = new FieldKindWithEditor(\n\tidentifierFieldIdentifier,\n\tMultiplicity.Single,\n\tnoChangeHandler,\n\t(types, other) =>\n\t\t// Allows upgrading from identifier to required: which way this upgrade is allowed to go is a subjective policy choice.\n\t\t(other.kind === sequence.identifier ||\n\t\t\tother.kind === requiredIdentifier ||\n\t\t\tother.kind === optional.identifier ||\n\t\t\tother.kind === identifierFieldIdentifier) &&\n\t\tallowsTreeSchemaIdentifierSuperset(types, other.types),\n\tnew Set(),\n);\n\n/**\n * Exactly 0 items.\n *\n * Using Forbidden makes what types are listed for allowed in a field irrelevant\n * since the field will never have values in it.\n *\n * Using Forbidden is equivalent to picking a kind that permits empty (like sequence or optional)\n * and having no allowed types (or only never types).\n * Because of this, its possible to express everything constraint wise without Forbidden,\n * but using Forbidden can be more semantically clear than optional with no allowed types.\n *\n * For view schema, this can be useful if you need to:\n * - run a specific out of schema handler when a field is present,\n * but otherwise are ignoring or tolerating (ex: via extra fields) unmentioned fields.\n * - prevent a specific field from being used as an extra field\n * (perhaps for some past of future compatibility reason)\n * - keep a field in a schema for metadata purposes\n * (ex: for improved error messaging, error handling or documentation)\n * that is not used in this specific version of the schema (ex: to document what it was or will be used for).\n *\n * For stored schema, this can be useful if you need to:\n * - have a field which can have its schema updated to Optional or Sequence of any type.\n * - to exclude a field from extra fields\n * - for the schema system to use as a default for fields which aren't declared\n * (ex: when updating a field that did not exist into one that does)\n *\n * See {@link emptyField} for a constant, reusable field using Forbidden.\n */\nexport const forbidden = new FieldKindWithEditor(\n\tforbiddenFieldKindIdentifier,\n\tMultiplicity.Forbidden,\n\tnoChangeHandler,\n\t// All multiplicities other than Value support empty.\n\t(types, other) => fieldKinds.get(other.kind)?.multiplicity !== Multiplicity.Single,\n\tnew Set(),\n);\n\nexport const fieldKindConfigurations: ReadonlyMap<\n\tModularChangeFormatVersion,\n\tFieldKindConfiguration\n> = new Map([\n\t[\n\t\tbrand(1),\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[nodeKey.identifier, { kind: nodeKey, formatVersion: 1 }],\n\t\t\t[required.identifier, { kind: required, formatVersion: 1 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 1 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 1 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n\t[\n\t\tbrand(2),\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[nodeKey.identifier, { kind: nodeKey, formatVersion: 1 }],\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 2 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 1 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n\t[\n\t\tbrand(3),\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[nodeKey.identifier, { kind: nodeKey, formatVersion: 1 }],\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 2 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 2 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n\t[\n\t\tbrand(4),\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[nodeKey.identifier, { kind: nodeKey, formatVersion: 1 }],\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 2 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 3 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n]);\n\nexport type ModularChangeFormatVersion = Brand<1 | 2 | 3 | 4, \"ModularChangeFormatVersion\">;\nexport function getCodecTreeForModularChangeFormat(\n\tversion: ModularChangeFormatVersion,\n): CodecTree {\n\tconst dependencies =\n\t\tfieldKindConfigurations.get(version) ?? fail(0xc7c /* Unknown modular change format */);\n\tconst children: CodecTree[] = Array.from(dependencies.entries()).map(\n\t\t([key, { formatVersion }]) => ({\n\t\t\tname: `FieldKind:${key}`,\n\t\t\tversion: formatVersion,\n\t\t}),\n\t);\n\treturn {\n\t\tname: \"ModularChange\",\n\t\tversion,\n\t\tchildren,\n\t};\n}\n\n/**\n * All supported field kinds.\n *\n * @privateRemarks\n * Before making a SharedTree format change which impacts which set of field kinds are allowed,\n * code which uses this should be audited for compatibility considerations.\n */\nexport const fieldKinds: ReadonlyMap<FieldKindIdentifier, FieldKindWithEditor> = new Map(\n\t[required, optional, sequence, nodeKey, identifier, forbidden].map((s) => [s.identifier, s]),\n);\n\n// Create named Aliases for nicer intellisense.\n\n// TODO: Find a way to make docs like {@inheritDoc required} work in vscode.\n// TODO: ensure thy work in generated docs.\n// TODO: add these comments to the rest of the cases below.\nexport interface Required extends FlexFieldKind<\"Value\", Multiplicity.Single> {}\nexport interface Optional extends FlexFieldKind<\"Optional\", Multiplicity.Optional> {}\nexport interface Sequence extends FlexFieldKind<\"Sequence\", Multiplicity.Sequence> {}\nexport interface Identifier extends FlexFieldKind<\"Identifier\", Multiplicity.Single> {}\nexport interface Forbidden\n\textends FlexFieldKind<typeof forbiddenFieldKindIdentifier, Multiplicity.Forbidden> {}\n\n/**\n * Default FieldKinds with their editor types erased.\n */\nexport const FieldKinds: {\n\t// TODO: inheritDoc for these somehow\n\treadonly required: Required;\n\treadonly optional: Optional;\n\treadonly sequence: Sequence;\n\treadonly identifier: Identifier;\n\treadonly forbidden: Forbidden;\n} = { required, optional, sequence, identifier, forbidden };\n"]}
|
|
1
|
+
{"version":3,"file":"defaultFieldKinds.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultFieldKinds.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA2D;AAE3D,kDAM6B;AAC7B,yDAWoC;AACpC,yDAKoC;AACpC,yDAGoC;AAEpC,2DAA0D;AAE1D,kDAAoE;AAEpE;;GAEG;AACU,QAAA,eAAe,GAA0B;IACrD,OAAO,EAAE,IAAA,0CAA+B,EAAC;QACxC,OAAO,EAAE,CAAC,OAAU,EAAE,OAAU,EAAE,EAAE,CAAC,CAAC;QACtC,MAAM,EAAE,CAAC,OAAU,EAAE,EAAE,CAAC,CAAC;QACzB,MAAM,EAAE,CAAC,MAAS,EAAE,IAAO,EAAE,EAAE,CAAC,CAAC;QACjC,IAAI,EAAE,CAAC,OAAU,EAAE,EAAE,CAAC,CAAC;KACvB,CAAC;IACF,aAAa,EAAE,GAAG,EAAE,CAAC,uCAAmB;IACxC,MAAM,EAAE,EAAE,iBAAiB,EAAE,GAAG,EAAE,CAAC,IAAA,eAAI,EAAC,KAAK,CAAC,iCAAiC,CAAC,EAAE;IAClF,SAAS,EAAE,CAAC,MAAM,EAAE,cAAuB,EAAoB,EAAE,CAAC,CAAC,EAAE,CAAC;IACtE,oBAAoB,EAAE,CAAC,MAAM,EAAiC,EA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pD,UAAU,EAAV,kBAAU;CACV,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ChangeAtomId,\n\ttype DeltaDetachedNodeId,\n\ttype FieldKindIdentifier,\n\tforbiddenFieldKindIdentifier,\n\tMultiplicity,\n} from \"../../core/index.js\";\nimport {\n\ttype FieldChangeDelta,\n\ttype FieldChangeHandler,\n\ttype FieldEditor,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\ttype ToDelta,\n\tallowsTreeSchemaIdentifierSuperset,\n\treferenceFreeFieldChangeRebaser,\n} from \"../modular-schema/index.js\";\nimport {\n\ttype OptionalChangeset,\n\ttype OptionalFieldEditor,\n\toptionalChangeHandler,\n\toptionalFieldEditor,\n} from \"../optional-field/index.js\";\nimport {\n\tsequenceFieldChangeHandler,\n\ttype SequenceFieldEditor,\n} from \"../sequence-field/index.js\";\n\nimport { noChangeCodecFamily } from \"./noChangeCodecs.js\";\nimport type { CodecTree } from \"../../codec/index.js\";\nimport { brand, brandConst, type Brand } from \"../../util/index.js\";\n\n/**\n * ChangeHandler that only handles no-op / identity changes.\n */\nexport const noChangeHandler: FieldChangeHandler<0> = {\n\trebaser: referenceFreeFieldChangeRebaser({\n\t\tcompose: (change1: 0, change2: 0) => 0,\n\t\tinvert: (changes: 0) => 0,\n\t\trebase: (change: 0, over: 0) => 0,\n\t\tmute: (changes: 0) => 0,\n\t}),\n\tcodecsFactory: () => noChangeCodecFamily,\n\teditor: { buildChildChanges: () => fail(0xb0d /* Child changes not supported */) },\n\tintoDelta: (change, deltaFromChild: ToDelta): FieldChangeDelta => ({}),\n\trelevantRemovedRoots: (change): Iterable<DeltaDetachedNodeId> => [],\n\tisEmpty: (change: 0) => true,\n\tgetNestedChanges: (change: 0) => [],\n\tcreateEmpty: () => 0,\n\tgetCrossFieldKeys: () => [],\n};\n\n/**\n * {@link FieldEditor} for required fields (always contain exactly 1 child).\n * @remarks\n * This shares code with optional fields, since they are the same edit wise except setting to empty is not allowed,\n * and the content is always assumed to not be empty.\n * This means the actual edits implemented for optional fields are sufficient to support required fields\n * which is why this is defined and implemented in terms of optional fields.\n */\nexport interface RequiredFieldEditor extends FieldEditor<OptionalChangeset> {\n\t/**\n\t * Creates a change which replaces the current value of the field with `newValue`.\n\t * @param ids - The ids for the fill and detach fields.\n\t */\n\tset(ids: { fill: ChangeAtomId; detach: ChangeAtomId }): OptionalChangeset;\n}\n\nconst optionalIdentifier = brandConst(\"Optional\")<FieldKindIdentifier>();\n\n/**\n * 0 or 1 items.\n */\nexport const optional = new FlexFieldKind(optionalIdentifier, Multiplicity.Optional, {\n\tchangeHandler: optionalChangeHandler,\n\tallowsTreeSupersetOf: (types, other) =>\n\t\t(other.kind === sequence.identifier || other.kind === optionalIdentifier) &&\n\t\tallowsTreeSchemaIdentifierSuperset(types, other.types),\n});\n\nexport const requiredFieldEditor: RequiredFieldEditor = {\n\t...optionalFieldEditor,\n\tset: (ids: {\n\t\tfill: ChangeAtomId;\n\t\tdetach: ChangeAtomId;\n\t}): OptionalChangeset => optionalFieldEditor.set(false, ids),\n};\n\nexport const requiredFieldChangeHandler: FieldChangeHandler<\n\tOptionalChangeset,\n\tRequiredFieldEditor\n> = {\n\t...optionalChangeHandler,\n\teditor: requiredFieldEditor,\n};\n\nconst requiredIdentifier = brandConst(\"Value\")<FieldKindIdentifier>();\n\n/**\n * Exactly one item.\n */\nexport const required = new FlexFieldKind(requiredIdentifier, Multiplicity.Single, {\n\tchangeHandler: requiredFieldChangeHandler,\n\tallowsTreeSupersetOf: (types, other) =>\n\t\t// By omitting Identifier here,\n\t\t// this is making a policy choice that a schema upgrade cannot be done from required to identifier.\n\t\t// Since an identifier can be upgraded into a required field,\n\t\t// preventing the inverse helps ensure that schema upgrades are monotonic.\n\t\t// Which direction is allowed is a subjective policy choice.\n\t\t(other.kind === sequence.identifier ||\n\t\t\tother.kind === requiredIdentifier ||\n\t\t\tother.kind === optional.identifier) &&\n\t\tallowsTreeSchemaIdentifierSuperset(types, other.types),\n});\n\nconst sequenceIdentifier = brandConst(\"Sequence\")<FieldKindIdentifier>();\n\n/**\n * 0 or more items.\n */\nexport const sequence = new FlexFieldKind(sequenceIdentifier, Multiplicity.Sequence, {\n\tchangeHandler: sequenceFieldChangeHandler,\n\tallowsTreeSupersetOf: (types, other) =>\n\t\tother.kind === sequenceIdentifier &&\n\t\tallowsTreeSchemaIdentifierSuperset(types, other.types),\n});\n\nconst identifierFieldIdentifier = brandConst(\"Identifier\")<FieldKindIdentifier>();\n\n/**\n * Exactly one identifier.\n */\nexport const identifier = new FlexFieldKind(identifierFieldIdentifier, Multiplicity.Single, {\n\tchangeHandler: noChangeHandler,\n\tallowsTreeSupersetOf: (types, other) =>\n\t\t// Allows upgrading from identifier to required: which way this upgrade is allowed to go is a subjective policy choice.\n\t\t(other.kind === sequence.identifier ||\n\t\t\tother.kind === requiredIdentifier ||\n\t\t\tother.kind === optional.identifier ||\n\t\t\tother.kind === identifierFieldIdentifier) &&\n\t\tallowsTreeSchemaIdentifierSuperset(types, other.types),\n});\n\n/**\n * Exactly 0 items.\n *\n * Using Forbidden makes what types are listed for allowed in a field irrelevant\n * since the field will never have values in it.\n *\n * Using Forbidden is equivalent to picking a kind that permits empty (like sequence or optional)\n * and having no allowed types (or only never types).\n * Because of this, its possible to express everything constraint wise without Forbidden,\n * but using Forbidden can be more semantically clear than optional with no allowed types.\n *\n * For view schema, this can be useful if you need to:\n * - run a specific out of schema handler when a field is present,\n * but otherwise are ignoring or tolerating (ex: via extra fields) unmentioned fields.\n * - prevent a specific field from being used as an extra field\n * (perhaps for some past of future compatibility reason)\n * - keep a field in a schema for metadata purposes\n * (ex: for improved error messaging, error handling or documentation)\n * that is not used in this specific version of the schema (ex: to document what it was or will be used for).\n *\n * For stored schema, this can be useful if you need to:\n * - have a field which can have its schema updated to Optional or Sequence of any type.\n * - to exclude a field from extra fields\n * - for the schema system to use as a default for fields which aren't declared\n * (ex: when updating a field that did not exist into one that does)\n *\n * See {@link emptyField} for a constant, reusable field using Forbidden.\n */\nexport const forbidden = new FlexFieldKind(\n\tforbiddenFieldKindIdentifier,\n\tMultiplicity.Forbidden,\n\t{\n\t\tchangeHandler: noChangeHandler,\n\t\t// All multiplicities other than Value support empty.\n\t\tallowsTreeSupersetOf: (types, other) =>\n\t\t\tfieldKinds.get(other.kind)?.multiplicity !== Multiplicity.Single,\n\t},\n);\n\nexport const fieldKindConfigurations: ReadonlyMap<\n\tModularChangeFormatVersion,\n\tFieldKindConfiguration\n> = new Map([\n\t[\n\t\tbrand(3),\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 2 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 2 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n\t[\n\t\tbrand(4),\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 2 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 3 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n]);\n\nexport type ModularChangeFormatVersion = Brand<3 | 4, \"ModularChangeFormatVersion\">;\nexport function getCodecTreeForModularChangeFormat(\n\tversion: ModularChangeFormatVersion,\n): CodecTree {\n\tconst dependencies =\n\t\tfieldKindConfigurations.get(version) ?? fail(0xc7c /* Unknown modular change format */);\n\tconst children: CodecTree[] = Array.from(dependencies.entries()).map(\n\t\t([key, { formatVersion }]) => ({\n\t\t\tname: `FieldKind:${key}`,\n\t\t\tversion: formatVersion,\n\t\t}),\n\t);\n\treturn {\n\t\tname: \"ModularChange\",\n\t\tversion,\n\t\tchildren,\n\t};\n}\n\n/**\n * All supported field kinds.\n *\n * @privateRemarks\n * Before making a SharedTree format change which impacts which set of field kinds are allowed,\n * code which uses this should be audited for compatibility considerations.\n */\nexport const fieldKinds: ReadonlyMap<FieldKindIdentifier, FlexFieldKind> = new Map(\n\t[required, optional, sequence, identifier, forbidden].map((s) => [s.identifier, s]),\n);\n\n// Create named Aliases for nicer intellisense.\n\n// TODO: Find a way to make docs like {@inheritDoc required} work in vscode.\n// TODO: ensure thy work in generated docs.\n// TODO: add these comments to the rest of the cases below.\nexport interface Required\n\textends FlexFieldKind<RequiredFieldEditor, typeof requiredIdentifier, Multiplicity.Single> {}\nexport interface Optional\n\textends FlexFieldKind<\n\t\tOptionalFieldEditor,\n\t\ttypeof optionalIdentifier,\n\t\tMultiplicity.Optional\n\t> {}\nexport interface Sequence\n\textends FlexFieldKind<\n\t\tSequenceFieldEditor,\n\t\ttypeof sequenceIdentifier,\n\t\tMultiplicity.Sequence\n\t> {}\nexport interface Identifier\n\textends FlexFieldKind<\n\t\tFieldEditor<0>,\n\t\ttypeof identifierFieldIdentifier,\n\t\tMultiplicity.Single\n\t> {}\nexport interface Forbidden\n\textends FlexFieldKind<\n\t\tFieldEditor<0>,\n\t\ttypeof forbiddenFieldKindIdentifier,\n\t\tMultiplicity.Forbidden\n\t> {}\n\n/**\n * Default FieldKinds with their editor types erased.\n */\nexport const FieldKinds: {\n\t// TODO: inheritDoc for these somehow\n\treadonly required: Required;\n\treadonly optional: Optional;\n\treadonly sequence: Sequence;\n\treadonly identifier: Identifier;\n\treadonly forbidden: Forbidden;\n} = { required, optional, sequence, identifier, forbidden };\n\n/**\n * FullSchemaPolicy with the default field kinds.\n */\nexport const defaultSchemaPolicy: FullSchemaPolicy = {\n\tfieldKinds,\n};\n"]}
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { FieldKinds, type Required, type Optional, type Sequence, type Identifier, type Forbidden, fieldKinds, fieldKindConfigurations, getCodecTreeForModularChangeFormat, type ModularChangeFormatVersion, } from "./defaultFieldKinds.js";
|
|
5
|
+
export { FieldKinds, type Required, type Optional, type Sequence, type Identifier, type Forbidden, fieldKinds, fieldKindConfigurations, getCodecTreeForModularChangeFormat, type ModularChangeFormatVersion, defaultSchemaPolicy, } from "./defaultFieldKinds.js";
|
|
6
6
|
export { type DefaultChangeset, DefaultChangeFamily, DefaultEditBuilder, type IDefaultEditBuilder, type ValueFieldEditBuilder, type OptionalFieldEditBuilder, type SequenceFieldEditBuilder, intoDelta, relevantRemovedRoots, } from "./defaultEditBuilder.js";
|
|
7
|
-
export { SchemaValidationError, isNodeInSchema, isFieldInSchema, throwOutOfSchema, } from "./schemaChecker.js";
|
|
8
|
-
export { defaultSchemaPolicy } from "./defaultSchema.js";
|
|
9
7
|
export { MappedEditBuilder } from "./mappedEditBuilder.js";
|
|
10
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,SAAS,EACd,UAAU,EACV,uBAAuB,EACvB,kCAAkC,EAClC,KAAK,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,SAAS,EACd,UAAU,EACV,uBAAuB,EACvB,kCAAkC,EAClC,KAAK,0BAA0B,EAC/B,mBAAmB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,SAAS,EACT,oBAAoB,GACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -4,24 +4,18 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.MappedEditBuilder = exports.
|
|
7
|
+
exports.MappedEditBuilder = exports.relevantRemovedRoots = exports.intoDelta = exports.DefaultEditBuilder = exports.DefaultChangeFamily = exports.defaultSchemaPolicy = exports.getCodecTreeForModularChangeFormat = exports.fieldKindConfigurations = exports.fieldKinds = exports.FieldKinds = void 0;
|
|
8
8
|
var defaultFieldKinds_js_1 = require("./defaultFieldKinds.js");
|
|
9
9
|
Object.defineProperty(exports, "FieldKinds", { enumerable: true, get: function () { return defaultFieldKinds_js_1.FieldKinds; } });
|
|
10
10
|
Object.defineProperty(exports, "fieldKinds", { enumerable: true, get: function () { return defaultFieldKinds_js_1.fieldKinds; } });
|
|
11
11
|
Object.defineProperty(exports, "fieldKindConfigurations", { enumerable: true, get: function () { return defaultFieldKinds_js_1.fieldKindConfigurations; } });
|
|
12
12
|
Object.defineProperty(exports, "getCodecTreeForModularChangeFormat", { enumerable: true, get: function () { return defaultFieldKinds_js_1.getCodecTreeForModularChangeFormat; } });
|
|
13
|
+
Object.defineProperty(exports, "defaultSchemaPolicy", { enumerable: true, get: function () { return defaultFieldKinds_js_1.defaultSchemaPolicy; } });
|
|
13
14
|
var defaultEditBuilder_js_1 = require("./defaultEditBuilder.js");
|
|
14
15
|
Object.defineProperty(exports, "DefaultChangeFamily", { enumerable: true, get: function () { return defaultEditBuilder_js_1.DefaultChangeFamily; } });
|
|
15
16
|
Object.defineProperty(exports, "DefaultEditBuilder", { enumerable: true, get: function () { return defaultEditBuilder_js_1.DefaultEditBuilder; } });
|
|
16
17
|
Object.defineProperty(exports, "intoDelta", { enumerable: true, get: function () { return defaultEditBuilder_js_1.intoDelta; } });
|
|
17
18
|
Object.defineProperty(exports, "relevantRemovedRoots", { enumerable: true, get: function () { return defaultEditBuilder_js_1.relevantRemovedRoots; } });
|
|
18
|
-
var schemaChecker_js_1 = require("./schemaChecker.js");
|
|
19
|
-
Object.defineProperty(exports, "SchemaValidationError", { enumerable: true, get: function () { return schemaChecker_js_1.SchemaValidationError; } });
|
|
20
|
-
Object.defineProperty(exports, "isNodeInSchema", { enumerable: true, get: function () { return schemaChecker_js_1.isNodeInSchema; } });
|
|
21
|
-
Object.defineProperty(exports, "isFieldInSchema", { enumerable: true, get: function () { return schemaChecker_js_1.isFieldInSchema; } });
|
|
22
|
-
Object.defineProperty(exports, "throwOutOfSchema", { enumerable: true, get: function () { return schemaChecker_js_1.throwOutOfSchema; } });
|
|
23
|
-
var defaultSchema_js_1 = require("./defaultSchema.js");
|
|
24
|
-
Object.defineProperty(exports, "defaultSchemaPolicy", { enumerable: true, get: function () { return defaultSchema_js_1.defaultSchemaPolicy; } });
|
|
25
19
|
var mappedEditBuilder_js_1 = require("./mappedEditBuilder.js");
|
|
26
20
|
Object.defineProperty(exports, "MappedEditBuilder", { enumerable: true, get: function () { return mappedEditBuilder_js_1.MappedEditBuilder; } });
|
|
27
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAYgC;AAX/B,kHAAA,UAAU,OAAA;AAMV,kHAAA,UAAU,OAAA;AACV,+HAAA,uBAAuB,OAAA;AACvB,0IAAA,kCAAkC,OAAA;AAElC,2HAAA,mBAAmB,OAAA;AAGpB,iEAUiC;AARhC,4HAAA,mBAAmB,OAAA;AACnB,2HAAA,kBAAkB,OAAA;AAKlB,kHAAA,SAAS,OAAA;AACT,6HAAA,oBAAoB,OAAA;AAGrB,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tgetCodecTreeForModularChangeFormat,\n\ttype ModularChangeFormatVersion,\n\tdefaultSchemaPolicy,\n} from \"./defaultFieldKinds.js\";\n\nexport {\n\ttype DefaultChangeset,\n\tDefaultChangeFamily,\n\tDefaultEditBuilder,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tintoDelta,\n\trelevantRemovedRoots,\n} from \"./defaultEditBuilder.js\";\n\nexport { MappedEditBuilder } from \"./mappedEditBuilder.js\";\n"]}
|