@fluidframework/tree 2.102.0 → 2.110.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 +65 -0
- package/api-report/tree.alpha.api.md +12 -3
- package/api-report/tree.beta.api.md +11 -3
- package/api-report/tree.legacy.beta.api.md +11 -3
- package/dist/codec/versioned/format.d.ts +5 -4
- package/dist/codec/versioned/format.d.ts.map +1 -1
- package/dist/codec/versioned/format.js +4 -3
- package/dist/codec/versioned/format.js.map +1 -1
- package/dist/core/rebase/types.d.ts +4 -3
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +5 -4
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/schema-stored/formatV1.d.ts +16 -15
- package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
- package/dist/core/schema-stored/formatV1.js +9 -8
- package/dist/core/schema-stored/formatV1.js.map +1 -1
- package/dist/core/schema-stored/formatV2.d.ts +29 -28
- package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
- package/dist/core/schema-stored/formatV2.js +11 -10
- package/dist/core/schema-stored/formatV2.js.map +1 -1
- package/dist/core/schema-stored/index.js +3 -25
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/tree/anchorSet.js +4 -8
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +11 -10
- package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatCommon.js +11 -10
- package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +7 -6
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.js +3 -2
- package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.d.ts +19 -18
- package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.js +11 -10
- package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/dist/entrypoints/internal.js +2 -15
- package/dist/entrypoints/internal.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +7 -11
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +13 -12
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js +14 -13
- package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +36 -35
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js +19 -18
- package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +26 -25
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js +5 -4
- package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatVText.d.ts +24 -23
- package/dist/feature-libraries/chunked-forest/codec/format/formatVText.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js +8 -7
- package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +66 -14
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +101 -36
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +36 -14
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.js +9 -19
- package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +3 -13
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts +6 -5
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.js +4 -3
- package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
- package/dist/feature-libraries/index.js +2 -24
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +4 -3
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js +4 -3
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +10 -30
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +45 -44
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js +26 -25
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +23 -22
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +7 -6
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +0 -5
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +11 -55
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +9 -8
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +9 -8
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +14 -13
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +12 -11
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +5 -4
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js +3 -2
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.d.ts +15 -14
- package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/formatV1.js +5 -4
- package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.d.ts +20 -19
- package/dist/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/formatV2.js +5 -4
- package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +1 -3
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV1.d.ts +283 -282
- package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV1.js +41 -40
- package/dist/feature-libraries/sequence-field/formatV1.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.d.ts +180 -179
- package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.js +33 -32
- package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV3.d.ts +126 -125
- package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV3.js +5 -4
- package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
- package/dist/index.js +2 -24
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +1 -0
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +7 -41
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +2 -3
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +6 -45
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.js +6 -5
- package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +14 -5
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +106 -136
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.js +13 -17
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts +2 -2
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +35 -34
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +17 -16
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +15 -15
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js +11 -10
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +40 -40
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +5 -4
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +3 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +5 -5
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js +9 -8
- package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -7
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.js +7 -6
- package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +6 -43
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/transaction.js +20 -30
- package/dist/shared-tree-core/transaction.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.js +2 -24
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +2 -24
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +10 -0
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +5 -0
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +119 -105
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +6 -10
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +2 -12
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +2 -6
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts +121 -120
- package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchemaFormatV1.js +32 -31
- package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/dist/tableSchema.d.ts +50 -4
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +202 -106
- package/dist/tableSchema.js.map +1 -1
- package/dist/util/arrayUtilities.d.ts +20 -0
- package/dist/util/arrayUtilities.d.ts.map +1 -1
- package/dist/util/arrayUtilities.js +24 -1
- package/dist/util/arrayUtilities.js.map +1 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +3 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/rangeMap.d.ts +13 -0
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +69 -8
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/typeboxBrand.d.ts +1 -1
- package/dist/util/typeboxBrand.d.ts.map +1 -1
- package/dist/util/typeboxBrand.js +4 -3
- package/dist/util/typeboxBrand.js.map +1 -1
- package/dist/util/utils.d.ts +2 -2
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +3 -2
- package/dist/util/utils.js.map +1 -1
- package/eslint.config.mts +14 -0
- package/lib/codec/versioned/format.d.ts +5 -4
- package/lib/codec/versioned/format.d.ts.map +1 -1
- package/lib/codec/versioned/format.js +1 -1
- package/lib/codec/versioned/format.js.map +1 -1
- package/lib/core/rebase/types.d.ts +4 -3
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +1 -1
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/schema-stored/formatV1.d.ts +16 -15
- package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
- package/lib/core/schema-stored/formatV1.js +1 -1
- package/lib/core/schema-stored/formatV1.js.map +1 -1
- package/lib/core/schema-stored/formatV2.d.ts +29 -28
- package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
- package/lib/core/schema-stored/formatV2.js +1 -1
- package/lib/core/schema-stored/formatV2.js.map +1 -1
- package/lib/core/tree/anchorSet.js +1 -5
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +11 -10
- package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.js +1 -1
- package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +7 -6
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.js +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.d.ts +19 -18
- package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.js +1 -1
- package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +1 -5
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +13 -12
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +36 -35
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +26 -25
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatVText.d.ts +24 -23
- package/lib/feature-libraries/chunked-forest/codec/format/formatVText.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatVText.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format/formatVText.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +66 -14
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js +101 -36
- package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +36 -14
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.js +1 -11
- package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +1 -11
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts +6 -5
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.js +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +4 -3
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +10 -30
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +45 -44
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +23 -22
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +0 -5
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +1 -45
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +9 -8
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +14 -13
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +5 -4
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.d.ts +15 -14
- package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/formatV1.js +1 -1
- package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.d.ts +20 -19
- package/lib/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/formatV2.js +1 -1
- package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +1 -3
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV1.d.ts +283 -282
- package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV1.js +1 -1
- package/lib/feature-libraries/sequence-field/formatV1.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.d.ts +180 -179
- package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.js +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV3.d.ts +126 -125
- package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV3.js +1 -1
- package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +1 -0
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +4 -38
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +2 -3
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +2 -41
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.js +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +14 -5
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +63 -93
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.js +1 -5
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts +2 -2
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +35 -34
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +15 -15
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +40 -40
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +5 -5
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -7
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.js +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +1 -38
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/transaction.js +1 -11
- package/lib/shared-tree-core/transaction.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +10 -0
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +5 -0
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +36 -23
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +1 -5
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +1 -11
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +1 -5
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts +121 -120
- package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js +1 -1
- package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
- package/lib/tableSchema.d.ts +50 -4
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +171 -75
- package/lib/tableSchema.js.map +1 -1
- package/lib/util/arrayUtilities.d.ts +20 -0
- package/lib/util/arrayUtilities.d.ts.map +1 -1
- package/lib/util/arrayUtilities.js +22 -0
- package/lib/util/arrayUtilities.js.map +1 -1
- package/lib/util/index.d.ts +1 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +1 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/rangeMap.d.ts +13 -0
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +69 -8
- package/lib/util/rangeMap.js.map +1 -1
- package/lib/util/typeboxBrand.d.ts +1 -1
- package/lib/util/typeboxBrand.d.ts.map +1 -1
- package/lib/util/typeboxBrand.js +1 -1
- package/lib/util/typeboxBrand.js.map +1 -1
- package/lib/util/utils.d.ts +2 -2
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +1 -1
- package/lib/util/utils.js.map +1 -1
- package/package.json +24 -23
- package/src/codec/versioned/format.ts +2 -1
- package/src/core/rebase/types.ts +1 -1
- package/src/core/schema-stored/formatV1.ts +2 -1
- package/src/core/schema-stored/formatV2.ts +2 -1
- package/src/core/tree/detachedFieldIndexFormatCommon.ts +2 -1
- package/src/core/tree/detachedFieldIndexFormatV2.ts +2 -1
- package/src/core/tree/persistedTreeTextFormat.ts +2 -1
- package/src/feature-libraries/chunked-forest/chunkTree.ts +3 -2
- package/src/feature-libraries/chunked-forest/codec/format/formatGeneric.ts +2 -1
- package/src/feature-libraries/chunked-forest/codec/format/formatV1.ts +2 -1
- package/src/feature-libraries/chunked-forest/codec/format/formatV2.ts +2 -1
- package/src/feature-libraries/chunked-forest/codec/format/formatVText.ts +2 -1
- package/src/feature-libraries/chunked-forest/uniformChunk.ts +131 -44
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +36 -14
- package/src/feature-libraries/forest-summary/formatCommon.ts +2 -1
- package/src/feature-libraries/modular-schema/genericFieldKindFormat.ts +2 -1
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +14 -47
- package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +2 -1
- package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +2 -1
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +0 -5
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV1.ts +2 -1
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV2.ts +2 -1
- package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +2 -1
- package/src/feature-libraries/schema-index/formatV1.ts +2 -1
- package/src/feature-libraries/schema-index/formatV2.ts +2 -1
- package/src/feature-libraries/sequence-field/compose.ts +1 -4
- package/src/feature-libraries/sequence-field/formatV1.ts +2 -1
- package/src/feature-libraries/sequence-field/formatV2.ts +2 -1
- package/src/feature-libraries/sequence-field/formatV3.ts +2 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/schematizingTreeView.ts +4 -0
- package/src/shared-tree/sharedTree.ts +3 -10
- package/src/shared-tree/sharedTreeChangeFormat.ts +2 -1
- package/src/shared-tree/treeCheckout.ts +61 -56
- package/src/shared-tree-core/editManager.ts +2 -2
- package/src/shared-tree-core/editManagerFormatCommons.ts +2 -1
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -1
- package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +2 -1
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +2 -1
- package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -1
- package/src/shared-tree-core/messageFormatVSharedBranches.ts +2 -1
- package/src/simple-tree/api/tree.ts +11 -0
- package/src/simple-tree/core/treeNodeKernel.ts +39 -15
- package/src/simple-tree/simpleSchemaFormatV1.ts +2 -1
- package/src/tableSchema.ts +306 -80
- package/src/util/arrayUtilities.ts +35 -0
- package/src/util/index.ts +2 -0
- package/src/util/rangeMap.ts +108 -9
- package/src/util/typeboxBrand.ts +2 -1
- package/src/util/utils.ts +2 -1
- package/tsconfig.json +5 -0
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import * as Type from "@sinclair/typebox";
|
|
6
|
+
import type { Static } from "@sinclair/typebox";
|
|
6
7
|
/**
|
|
7
8
|
* The format version for the schema.
|
|
8
9
|
*/
|
|
@@ -13,26 +14,26 @@ export declare const SimpleSchemaFormatVersion: {
|
|
|
13
14
|
* The allowed types and their attributes in the simple schema format.
|
|
14
15
|
* @see {@link SimpleAllowedTypes}.
|
|
15
16
|
*/
|
|
16
|
-
export declare const SimpleAllowedTypeAttributesFormat:
|
|
17
|
-
isStaged:
|
|
17
|
+
export declare const SimpleAllowedTypeAttributesFormat: Type.TObject<{
|
|
18
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
18
19
|
}>;
|
|
19
20
|
export type SimpleAllowedTypeAttributesFormat = Static<typeof SimpleAllowedTypeAttributesFormat>;
|
|
20
21
|
/**
|
|
21
22
|
* A set of allowed types in the simple schema format.
|
|
22
23
|
* The keys are the type identifiers, and the values are their attributes.
|
|
23
24
|
*/
|
|
24
|
-
export declare const SimpleAllowedTypesFormat:
|
|
25
|
-
isStaged:
|
|
25
|
+
export declare const SimpleAllowedTypesFormat: Type.TRecord<Type.TString, Type.TObject<{
|
|
26
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
26
27
|
}>>;
|
|
27
28
|
export type SimpleAllowedTypesFormat = Static<typeof SimpleAllowedTypesFormat>;
|
|
28
29
|
/**
|
|
29
30
|
* Persisted format for a field schema in the simple schema format.
|
|
30
31
|
* @see {@link SimpleFieldSchema}.
|
|
31
32
|
*/
|
|
32
|
-
export declare const SimpleFieldSchemaFormat:
|
|
33
|
-
kind:
|
|
34
|
-
simpleAllowedTypes:
|
|
35
|
-
isStaged:
|
|
33
|
+
export declare const SimpleFieldSchemaFormat: Type.TObject<{
|
|
34
|
+
kind: Type.TInteger;
|
|
35
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
36
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
36
37
|
}>>;
|
|
37
38
|
}>;
|
|
38
39
|
export type SimpleFieldSchemaFormat = Static<typeof SimpleFieldSchemaFormat>;
|
|
@@ -40,22 +41,22 @@ export type SimpleFieldSchemaFormat = Static<typeof SimpleFieldSchemaFormat>;
|
|
|
40
41
|
* Persisted format for an object field schema in the simple schema format.
|
|
41
42
|
* @see {@link SimpleObjectFieldSchema}.
|
|
42
43
|
*/
|
|
43
|
-
export declare const SimpleObjectFieldSchemaFormat:
|
|
44
|
-
kind:
|
|
45
|
-
simpleAllowedTypes:
|
|
46
|
-
isStaged:
|
|
44
|
+
export declare const SimpleObjectFieldSchemaFormat: Type.TObject<{
|
|
45
|
+
kind: Type.TInteger;
|
|
46
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
47
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
47
48
|
}>>;
|
|
48
|
-
storedKey:
|
|
49
|
+
storedKey: Type.TString;
|
|
49
50
|
}>;
|
|
50
51
|
export type SimpleObjectFieldSchemaFormat = Static<typeof SimpleObjectFieldSchemaFormat>;
|
|
51
52
|
/**
|
|
52
53
|
* Persisted format for an array node schema in the simple schema format.
|
|
53
54
|
* @see {@link SimpleArrayNodeSchema}.
|
|
54
55
|
*/
|
|
55
|
-
export declare const SimpleArrayNodeSchemaFormat:
|
|
56
|
-
kind:
|
|
57
|
-
simpleAllowedTypes:
|
|
58
|
-
isStaged:
|
|
56
|
+
export declare const SimpleArrayNodeSchemaFormat: Type.TObject<{
|
|
57
|
+
kind: Type.TInteger;
|
|
58
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
59
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
59
60
|
}>>;
|
|
60
61
|
}>;
|
|
61
62
|
export type SimpleArrayNodeSchemaFormat = Static<typeof SimpleArrayNodeSchemaFormat>;
|
|
@@ -63,10 +64,10 @@ export type SimpleArrayNodeSchemaFormat = Static<typeof SimpleArrayNodeSchemaFor
|
|
|
63
64
|
* Persisted format for a map node schema in the simple schema format.
|
|
64
65
|
* @see {@link SimpleMapNodeSchema}.
|
|
65
66
|
*/
|
|
66
|
-
export declare const SimpleMapNodeSchemaFormat:
|
|
67
|
-
kind:
|
|
68
|
-
simpleAllowedTypes:
|
|
69
|
-
isStaged:
|
|
67
|
+
export declare const SimpleMapNodeSchemaFormat: Type.TObject<{
|
|
68
|
+
kind: Type.TInteger;
|
|
69
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
70
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
70
71
|
}>>;
|
|
71
72
|
}>;
|
|
72
73
|
export type SimpleMapNodeSchemaFormat = Static<typeof SimpleMapNodeSchemaFormat>;
|
|
@@ -74,10 +75,10 @@ export type SimpleMapNodeSchemaFormat = Static<typeof SimpleMapNodeSchemaFormat>
|
|
|
74
75
|
* Persisted format for a record node schema in the simple schema format.
|
|
75
76
|
* @see {@link SimpleRecordNodeSchema}.
|
|
76
77
|
*/
|
|
77
|
-
export declare const SimpleRecordNodeSchemaFormat:
|
|
78
|
-
kind:
|
|
79
|
-
simpleAllowedTypes:
|
|
80
|
-
isStaged:
|
|
78
|
+
export declare const SimpleRecordNodeSchemaFormat: Type.TObject<{
|
|
79
|
+
kind: Type.TInteger;
|
|
80
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
81
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
81
82
|
}>>;
|
|
82
83
|
}>;
|
|
83
84
|
export type SimpleRecordNodeSchemaFormat = Static<typeof SimpleRecordNodeSchemaFormat>;
|
|
@@ -85,36 +86,36 @@ export type SimpleRecordNodeSchemaFormat = Static<typeof SimpleRecordNodeSchemaF
|
|
|
85
86
|
* Persisted format for a leaf node schema in the simple schema format.
|
|
86
87
|
* @see {@link SimpleLeafNodeSchema}.
|
|
87
88
|
*/
|
|
88
|
-
export declare const SimpleLeafNodeSchemaFormat:
|
|
89
|
-
kind:
|
|
90
|
-
leafKind:
|
|
89
|
+
export declare const SimpleLeafNodeSchemaFormat: Type.TObject<{
|
|
90
|
+
kind: Type.TInteger;
|
|
91
|
+
leafKind: Type.TInteger;
|
|
91
92
|
}>;
|
|
92
93
|
export type SimpleLeafNodeSchemaFormat = Static<typeof SimpleLeafNodeSchemaFormat>;
|
|
93
94
|
/**
|
|
94
95
|
* Persisted format for the field schemas of an object node in the simple schema format.
|
|
95
96
|
*/
|
|
96
|
-
export declare const SimpleObjectFieldSchemasFormat:
|
|
97
|
-
kind:
|
|
98
|
-
simpleAllowedTypes:
|
|
99
|
-
isStaged:
|
|
97
|
+
export declare const SimpleObjectFieldSchemasFormat: Type.TRecord<Type.TString, Type.TObject<{
|
|
98
|
+
kind: Type.TInteger;
|
|
99
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
100
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
100
101
|
}>>;
|
|
101
|
-
storedKey:
|
|
102
|
+
storedKey: Type.TString;
|
|
102
103
|
}>>;
|
|
103
104
|
export type SimpleObjectFieldSchemasFormat = Static<typeof SimpleObjectFieldSchemasFormat>;
|
|
104
105
|
/**
|
|
105
106
|
* Persisted format for an object node schema in the simple schema format.
|
|
106
107
|
* @see {@link SimpleObjectNodeSchema}.
|
|
107
108
|
*/
|
|
108
|
-
export declare const SimpleObjectNodeSchemaFormat:
|
|
109
|
-
kind:
|
|
110
|
-
fields:
|
|
111
|
-
kind:
|
|
112
|
-
simpleAllowedTypes:
|
|
113
|
-
isStaged:
|
|
109
|
+
export declare const SimpleObjectNodeSchemaFormat: Type.TObject<{
|
|
110
|
+
kind: Type.TInteger;
|
|
111
|
+
fields: Type.TRecord<Type.TString, Type.TObject<{
|
|
112
|
+
kind: Type.TInteger;
|
|
113
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
114
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
114
115
|
}>>;
|
|
115
|
-
storedKey:
|
|
116
|
+
storedKey: Type.TString;
|
|
116
117
|
}>>;
|
|
117
|
-
allowUnknownOptionalFields:
|
|
118
|
+
allowUnknownOptionalFields: Type.TOptional<Type.TBoolean>;
|
|
118
119
|
}>;
|
|
119
120
|
export type SimpleObjectNodeSchemaFormat = Static<typeof SimpleObjectNodeSchemaFormat>;
|
|
120
121
|
/**
|
|
@@ -122,78 +123,78 @@ export type SimpleObjectNodeSchemaFormat = Static<typeof SimpleObjectNodeSchemaF
|
|
|
122
123
|
*
|
|
123
124
|
* See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
|
|
124
125
|
*/
|
|
125
|
-
export declare const SimpleNodeSchemaUnionFormat:
|
|
126
|
-
array:
|
|
127
|
-
kind:
|
|
128
|
-
simpleAllowedTypes:
|
|
129
|
-
isStaged:
|
|
126
|
+
export declare const SimpleNodeSchemaUnionFormat: Type.TObject<{
|
|
127
|
+
array: Type.TOptional<Type.TObject<{
|
|
128
|
+
kind: Type.TInteger;
|
|
129
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
130
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
130
131
|
}>>;
|
|
131
132
|
}>>;
|
|
132
|
-
map:
|
|
133
|
-
kind:
|
|
134
|
-
simpleAllowedTypes:
|
|
135
|
-
isStaged:
|
|
133
|
+
map: Type.TOptional<Type.TObject<{
|
|
134
|
+
kind: Type.TInteger;
|
|
135
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
136
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
136
137
|
}>>;
|
|
137
138
|
}>>;
|
|
138
|
-
record:
|
|
139
|
-
kind:
|
|
140
|
-
simpleAllowedTypes:
|
|
141
|
-
isStaged:
|
|
139
|
+
record: Type.TOptional<Type.TObject<{
|
|
140
|
+
kind: Type.TInteger;
|
|
141
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
142
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
142
143
|
}>>;
|
|
143
144
|
}>>;
|
|
144
|
-
leaf:
|
|
145
|
-
kind:
|
|
146
|
-
leafKind:
|
|
145
|
+
leaf: Type.TOptional<Type.TObject<{
|
|
146
|
+
kind: Type.TInteger;
|
|
147
|
+
leafKind: Type.TInteger;
|
|
147
148
|
}>>;
|
|
148
|
-
object:
|
|
149
|
-
kind:
|
|
150
|
-
fields:
|
|
151
|
-
kind:
|
|
152
|
-
simpleAllowedTypes:
|
|
153
|
-
isStaged:
|
|
149
|
+
object: Type.TOptional<Type.TObject<{
|
|
150
|
+
kind: Type.TInteger;
|
|
151
|
+
fields: Type.TRecord<Type.TString, Type.TObject<{
|
|
152
|
+
kind: Type.TInteger;
|
|
153
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
154
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
154
155
|
}>>;
|
|
155
|
-
storedKey:
|
|
156
|
+
storedKey: Type.TString;
|
|
156
157
|
}>>;
|
|
157
|
-
allowUnknownOptionalFields:
|
|
158
|
+
allowUnknownOptionalFields: Type.TOptional<Type.TBoolean>;
|
|
158
159
|
}>>;
|
|
159
160
|
}>;
|
|
160
161
|
export type SimpleNodeSchemaUnionFormat = Static<typeof SimpleNodeSchemaUnionFormat>;
|
|
161
162
|
/**
|
|
162
163
|
* Helper type for the schema definitions map in the persisted format.
|
|
163
164
|
*/
|
|
164
|
-
export declare const SimpleSchemaDefinitionsFormat:
|
|
165
|
-
array:
|
|
166
|
-
kind:
|
|
167
|
-
simpleAllowedTypes:
|
|
168
|
-
isStaged:
|
|
165
|
+
export declare const SimpleSchemaDefinitionsFormat: Type.TRecord<Type.TString, Type.TObject<{
|
|
166
|
+
array: Type.TOptional<Type.TObject<{
|
|
167
|
+
kind: Type.TInteger;
|
|
168
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
169
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
169
170
|
}>>;
|
|
170
171
|
}>>;
|
|
171
|
-
map:
|
|
172
|
-
kind:
|
|
173
|
-
simpleAllowedTypes:
|
|
174
|
-
isStaged:
|
|
172
|
+
map: Type.TOptional<Type.TObject<{
|
|
173
|
+
kind: Type.TInteger;
|
|
174
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
175
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
175
176
|
}>>;
|
|
176
177
|
}>>;
|
|
177
|
-
record:
|
|
178
|
-
kind:
|
|
179
|
-
simpleAllowedTypes:
|
|
180
|
-
isStaged:
|
|
178
|
+
record: Type.TOptional<Type.TObject<{
|
|
179
|
+
kind: Type.TInteger;
|
|
180
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
181
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
181
182
|
}>>;
|
|
182
183
|
}>>;
|
|
183
|
-
leaf:
|
|
184
|
-
kind:
|
|
185
|
-
leafKind:
|
|
184
|
+
leaf: Type.TOptional<Type.TObject<{
|
|
185
|
+
kind: Type.TInteger;
|
|
186
|
+
leafKind: Type.TInteger;
|
|
186
187
|
}>>;
|
|
187
|
-
object:
|
|
188
|
-
kind:
|
|
189
|
-
fields:
|
|
190
|
-
kind:
|
|
191
|
-
simpleAllowedTypes:
|
|
192
|
-
isStaged:
|
|
188
|
+
object: Type.TOptional<Type.TObject<{
|
|
189
|
+
kind: Type.TInteger;
|
|
190
|
+
fields: Type.TRecord<Type.TString, Type.TObject<{
|
|
191
|
+
kind: Type.TInteger;
|
|
192
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
193
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
193
194
|
}>>;
|
|
194
|
-
storedKey:
|
|
195
|
+
storedKey: Type.TString;
|
|
195
196
|
}>>;
|
|
196
|
-
allowUnknownOptionalFields:
|
|
197
|
+
allowUnknownOptionalFields: Type.TOptional<Type.TBoolean>;
|
|
197
198
|
}>>;
|
|
198
199
|
}>>;
|
|
199
200
|
export type SimpleSchemaDefinitionsFormat = Static<typeof SimpleSchemaDefinitionsFormat>;
|
|
@@ -201,47 +202,47 @@ export type SimpleSchemaDefinitionsFormat = Static<typeof SimpleSchemaDefinition
|
|
|
201
202
|
* Persisted format for the compatibility impacting subset of simple schema.
|
|
202
203
|
* @see {@link SimpleTreeSchema}.
|
|
203
204
|
*/
|
|
204
|
-
export declare const SimpleTreeSchemaFormat:
|
|
205
|
-
version:
|
|
206
|
-
root:
|
|
207
|
-
kind:
|
|
208
|
-
simpleAllowedTypes:
|
|
209
|
-
isStaged:
|
|
205
|
+
export declare const SimpleTreeSchemaFormat: Type.TObject<{
|
|
206
|
+
version: Type.TLiteral<1>;
|
|
207
|
+
root: Type.TObject<{
|
|
208
|
+
kind: Type.TInteger;
|
|
209
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
210
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
210
211
|
}>>;
|
|
211
212
|
}>;
|
|
212
|
-
definitions:
|
|
213
|
-
array:
|
|
214
|
-
kind:
|
|
215
|
-
simpleAllowedTypes:
|
|
216
|
-
isStaged:
|
|
213
|
+
definitions: Type.TRecord<Type.TString, Type.TObject<{
|
|
214
|
+
array: Type.TOptional<Type.TObject<{
|
|
215
|
+
kind: Type.TInteger;
|
|
216
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
217
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
217
218
|
}>>;
|
|
218
219
|
}>>;
|
|
219
|
-
map:
|
|
220
|
-
kind:
|
|
221
|
-
simpleAllowedTypes:
|
|
222
|
-
isStaged:
|
|
220
|
+
map: Type.TOptional<Type.TObject<{
|
|
221
|
+
kind: Type.TInteger;
|
|
222
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
223
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
223
224
|
}>>;
|
|
224
225
|
}>>;
|
|
225
|
-
record:
|
|
226
|
-
kind:
|
|
227
|
-
simpleAllowedTypes:
|
|
228
|
-
isStaged:
|
|
226
|
+
record: Type.TOptional<Type.TObject<{
|
|
227
|
+
kind: Type.TInteger;
|
|
228
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
229
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
229
230
|
}>>;
|
|
230
231
|
}>>;
|
|
231
|
-
leaf:
|
|
232
|
-
kind:
|
|
233
|
-
leafKind:
|
|
232
|
+
leaf: Type.TOptional<Type.TObject<{
|
|
233
|
+
kind: Type.TInteger;
|
|
234
|
+
leafKind: Type.TInteger;
|
|
234
235
|
}>>;
|
|
235
|
-
object:
|
|
236
|
-
kind:
|
|
237
|
-
fields:
|
|
238
|
-
kind:
|
|
239
|
-
simpleAllowedTypes:
|
|
240
|
-
isStaged:
|
|
236
|
+
object: Type.TOptional<Type.TObject<{
|
|
237
|
+
kind: Type.TInteger;
|
|
238
|
+
fields: Type.TRecord<Type.TString, Type.TObject<{
|
|
239
|
+
kind: Type.TInteger;
|
|
240
|
+
simpleAllowedTypes: Type.TRecord<Type.TString, Type.TObject<{
|
|
241
|
+
isStaged: Type.TOptional<Type.TBoolean>;
|
|
241
242
|
}>>;
|
|
242
|
-
storedKey:
|
|
243
|
+
storedKey: Type.TString;
|
|
243
244
|
}>>;
|
|
244
|
-
allowUnknownOptionalFields:
|
|
245
|
+
allowUnknownOptionalFields: Type.TOptional<Type.TBoolean>;
|
|
245
246
|
}>>;
|
|
246
247
|
}>>;
|
|
247
248
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleSchemaFormatV1.d.ts","sourceRoot":"","sources":["../../src/simple-tree/simpleSchemaFormatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,
|
|
1
|
+
{"version":3,"file":"simpleSchemaFormatV1.d.ts","sourceRoot":"","sources":["../../src/simple-tree/simpleSchemaFormatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI/D;;GAEG;AACH,eAAO,MAAM,yBAAyB;;CAE5B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,iCAAiC;;EAK7C,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,MAAM,CACrD,OAAO,iCAAiC,CACxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;GAGpC,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;EAMnC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;;;EAOzC,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;;;EAMvC,CAAC;AACF,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;EAMrC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;EAMxC,CAAC;AACF,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEvF;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;EAMtC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEnF;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;;;;GAG1C,CAAC;AACF,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAE3F;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;EAOxC,CAAC;AACF,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEvF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMtC,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAErF;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGzC,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOlC,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.SimpleTreeSchemaFormat = exports.SimpleSchemaDefinitionsFormat = exports.SimpleNodeSchemaUnionFormat = exports.SimpleObjectNodeSchemaFormat = exports.SimpleObjectFieldSchemasFormat = exports.SimpleLeafNodeSchemaFormat = exports.SimpleRecordNodeSchemaFormat = exports.SimpleMapNodeSchemaFormat = exports.SimpleArrayNodeSchemaFormat = exports.SimpleObjectFieldSchemaFormat = exports.SimpleFieldSchemaFormat = exports.SimpleAllowedTypesFormat = exports.SimpleAllowedTypeAttributesFormat = exports.SimpleSchemaFormatVersion = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
8
9
|
/*
|
|
9
10
|
* This file contains a format for serializing the compatibility impacting subset of simple schema.
|
|
10
11
|
|
|
@@ -12,7 +13,7 @@ exports.SimpleTreeSchemaFormat = exports.SimpleSchemaDefinitionsFormat = exports
|
|
|
12
13
|
* This only includes all parts of the schema that impact compatibility according to SchemaCompatibilityTester.
|
|
13
14
|
* It may not include some details which impact maintenance of application enforced invariants (like persisted metadata or logic in view schema).
|
|
14
15
|
*/
|
|
15
|
-
const
|
|
16
|
+
const Type = tslib_1.__importStar(require("@sinclair/typebox"));
|
|
16
17
|
const noAdditionalProps = { additionalProperties: false };
|
|
17
18
|
/**
|
|
18
19
|
* The format version for the schema.
|
|
@@ -24,98 +25,98 @@ exports.SimpleSchemaFormatVersion = {
|
|
|
24
25
|
* The allowed types and their attributes in the simple schema format.
|
|
25
26
|
* @see {@link SimpleAllowedTypes}.
|
|
26
27
|
*/
|
|
27
|
-
exports.SimpleAllowedTypeAttributesFormat =
|
|
28
|
-
isStaged:
|
|
28
|
+
exports.SimpleAllowedTypeAttributesFormat = Type.Object({
|
|
29
|
+
isStaged: Type.Optional(Type.Boolean()),
|
|
29
30
|
}, noAdditionalProps);
|
|
30
31
|
/**
|
|
31
32
|
* A set of allowed types in the simple schema format.
|
|
32
33
|
* The keys are the type identifiers, and the values are their attributes.
|
|
33
34
|
*/
|
|
34
|
-
exports.SimpleAllowedTypesFormat =
|
|
35
|
+
exports.SimpleAllowedTypesFormat = Type.Record(Type.String(), exports.SimpleAllowedTypeAttributesFormat);
|
|
35
36
|
/**
|
|
36
37
|
* Persisted format for a field schema in the simple schema format.
|
|
37
38
|
* @see {@link SimpleFieldSchema}.
|
|
38
39
|
*/
|
|
39
|
-
exports.SimpleFieldSchemaFormat =
|
|
40
|
-
kind:
|
|
40
|
+
exports.SimpleFieldSchemaFormat = Type.Object({
|
|
41
|
+
kind: Type.Integer(),
|
|
41
42
|
simpleAllowedTypes: exports.SimpleAllowedTypesFormat,
|
|
42
43
|
}, noAdditionalProps);
|
|
43
44
|
/**
|
|
44
45
|
* Persisted format for an object field schema in the simple schema format.
|
|
45
46
|
* @see {@link SimpleObjectFieldSchema}.
|
|
46
47
|
*/
|
|
47
|
-
exports.SimpleObjectFieldSchemaFormat =
|
|
48
|
-
kind:
|
|
48
|
+
exports.SimpleObjectFieldSchemaFormat = Type.Object({
|
|
49
|
+
kind: Type.Integer(),
|
|
49
50
|
simpleAllowedTypes: exports.SimpleAllowedTypesFormat,
|
|
50
|
-
storedKey:
|
|
51
|
+
storedKey: Type.String(),
|
|
51
52
|
}, noAdditionalProps);
|
|
52
53
|
/**
|
|
53
54
|
* Persisted format for an array node schema in the simple schema format.
|
|
54
55
|
* @see {@link SimpleArrayNodeSchema}.
|
|
55
56
|
*/
|
|
56
|
-
exports.SimpleArrayNodeSchemaFormat =
|
|
57
|
-
kind:
|
|
57
|
+
exports.SimpleArrayNodeSchemaFormat = Type.Object({
|
|
58
|
+
kind: Type.Integer(),
|
|
58
59
|
simpleAllowedTypes: exports.SimpleAllowedTypesFormat,
|
|
59
60
|
}, noAdditionalProps);
|
|
60
61
|
/**
|
|
61
62
|
* Persisted format for a map node schema in the simple schema format.
|
|
62
63
|
* @see {@link SimpleMapNodeSchema}.
|
|
63
64
|
*/
|
|
64
|
-
exports.SimpleMapNodeSchemaFormat =
|
|
65
|
-
kind:
|
|
65
|
+
exports.SimpleMapNodeSchemaFormat = Type.Object({
|
|
66
|
+
kind: Type.Integer(),
|
|
66
67
|
simpleAllowedTypes: exports.SimpleAllowedTypesFormat,
|
|
67
68
|
}, noAdditionalProps);
|
|
68
69
|
/**
|
|
69
70
|
* Persisted format for a record node schema in the simple schema format.
|
|
70
71
|
* @see {@link SimpleRecordNodeSchema}.
|
|
71
72
|
*/
|
|
72
|
-
exports.SimpleRecordNodeSchemaFormat =
|
|
73
|
-
kind:
|
|
73
|
+
exports.SimpleRecordNodeSchemaFormat = Type.Object({
|
|
74
|
+
kind: Type.Integer(),
|
|
74
75
|
simpleAllowedTypes: exports.SimpleAllowedTypesFormat,
|
|
75
76
|
}, noAdditionalProps);
|
|
76
77
|
/**
|
|
77
78
|
* Persisted format for a leaf node schema in the simple schema format.
|
|
78
79
|
* @see {@link SimpleLeafNodeSchema}.
|
|
79
80
|
*/
|
|
80
|
-
exports.SimpleLeafNodeSchemaFormat =
|
|
81
|
-
kind:
|
|
82
|
-
leafKind:
|
|
81
|
+
exports.SimpleLeafNodeSchemaFormat = Type.Object({
|
|
82
|
+
kind: Type.Integer(),
|
|
83
|
+
leafKind: Type.Integer(),
|
|
83
84
|
}, noAdditionalProps);
|
|
84
85
|
/**
|
|
85
86
|
* Persisted format for the field schemas of an object node in the simple schema format.
|
|
86
87
|
*/
|
|
87
|
-
exports.SimpleObjectFieldSchemasFormat =
|
|
88
|
+
exports.SimpleObjectFieldSchemasFormat = Type.Record(Type.String(), exports.SimpleObjectFieldSchemaFormat);
|
|
88
89
|
/**
|
|
89
90
|
* Persisted format for an object node schema in the simple schema format.
|
|
90
91
|
* @see {@link SimpleObjectNodeSchema}.
|
|
91
92
|
*/
|
|
92
|
-
exports.SimpleObjectNodeSchemaFormat =
|
|
93
|
-
kind:
|
|
93
|
+
exports.SimpleObjectNodeSchemaFormat = Type.Object({
|
|
94
|
+
kind: Type.Integer(),
|
|
94
95
|
fields: exports.SimpleObjectFieldSchemasFormat,
|
|
95
|
-
allowUnknownOptionalFields:
|
|
96
|
+
allowUnknownOptionalFields: Type.Optional(Type.Boolean()),
|
|
96
97
|
}, noAdditionalProps);
|
|
97
98
|
/**
|
|
98
99
|
* Discriminated union of all possible node schemas.
|
|
99
100
|
*
|
|
100
101
|
* See {@link DiscriminatedUnionDispatcher} for more information on this pattern.
|
|
101
102
|
*/
|
|
102
|
-
exports.SimpleNodeSchemaUnionFormat =
|
|
103
|
-
array:
|
|
104
|
-
map:
|
|
105
|
-
record:
|
|
106
|
-
leaf:
|
|
107
|
-
object:
|
|
103
|
+
exports.SimpleNodeSchemaUnionFormat = Type.Object({
|
|
104
|
+
array: Type.Optional(exports.SimpleArrayNodeSchemaFormat),
|
|
105
|
+
map: Type.Optional(exports.SimpleMapNodeSchemaFormat),
|
|
106
|
+
record: Type.Optional(exports.SimpleRecordNodeSchemaFormat),
|
|
107
|
+
leaf: Type.Optional(exports.SimpleLeafNodeSchemaFormat),
|
|
108
|
+
object: Type.Optional(exports.SimpleObjectNodeSchemaFormat),
|
|
108
109
|
});
|
|
109
110
|
/**
|
|
110
111
|
* Helper type for the schema definitions map in the persisted format.
|
|
111
112
|
*/
|
|
112
|
-
exports.SimpleSchemaDefinitionsFormat =
|
|
113
|
+
exports.SimpleSchemaDefinitionsFormat = Type.Record(Type.String(), exports.SimpleNodeSchemaUnionFormat);
|
|
113
114
|
/**
|
|
114
115
|
* Persisted format for the compatibility impacting subset of simple schema.
|
|
115
116
|
* @see {@link SimpleTreeSchema}.
|
|
116
117
|
*/
|
|
117
|
-
exports.SimpleTreeSchemaFormat =
|
|
118
|
-
version:
|
|
118
|
+
exports.SimpleTreeSchemaFormat = Type.Object({
|
|
119
|
+
version: Type.Literal(exports.SimpleSchemaFormatVersion.v1),
|
|
119
120
|
root: exports.SimpleFieldSchemaFormat,
|
|
120
121
|
definitions: exports.SimpleSchemaDefinitionsFormat,
|
|
121
122
|
}, noAdditionalProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleSchemaFormatV1.js","sourceRoot":"","sources":["../../src/simple-tree/simpleSchemaFormatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"simpleSchemaFormatV1.js","sourceRoot":"","sources":["../../src/simple-tree/simpleSchemaFormatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH;;;;;;GAMG;AAEH,gEAA0C;AAG1C,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE;;GAEG;AACU,QAAA,yBAAyB,GAAG;IACxC,EAAE,EAAE,CAAC;CACI,CAAC;AAEX;;;GAGG;AACU,QAAA,iCAAiC,GAAG,IAAI,CAAC,MAAM,CAC3D;IACC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;CACvC,EACD,iBAAiB,CACjB,CAAC;AAMF;;;GAGG;AACU,QAAA,wBAAwB,GAAG,IAAI,CAAC,MAAM,CAClD,IAAI,CAAC,MAAM,EAAE,EACb,yCAAiC,CACjC,CAAC;AAGF;;;GAGG;AACU,QAAA,uBAAuB,GAAG,IAAI,CAAC,MAAM,CACjD;IACC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACpB,kBAAkB,EAAE,gCAAwB;CAC5C,EACD,iBAAiB,CACjB,CAAC;AAGF;;;GAGG;AACU,QAAA,6BAA6B,GAAG,IAAI,CAAC,MAAM,CACvD;IACC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACpB,kBAAkB,EAAE,gCAAwB;IAC5C,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE;CACxB,EACD,iBAAiB,CACjB,CAAC;AAGF;;;GAGG;AACU,QAAA,2BAA2B,GAAG,IAAI,CAAC,MAAM,CACrD;IACC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACpB,kBAAkB,EAAE,gCAAwB;CAC5C,EACD,iBAAiB,CACjB,CAAC;AAGF;;;GAGG;AACU,QAAA,yBAAyB,GAAG,IAAI,CAAC,MAAM,CACnD;IACC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACpB,kBAAkB,EAAE,gCAAwB;CAC5C,EACD,iBAAiB,CACjB,CAAC;AAGF;;;GAGG;AACU,QAAA,4BAA4B,GAAG,IAAI,CAAC,MAAM,CACtD;IACC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACpB,kBAAkB,EAAE,gCAAwB;CAC5C,EACD,iBAAiB,CACjB,CAAC;AAGF;;;GAGG;AACU,QAAA,0BAA0B,GAAG,IAAI,CAAC,MAAM,CACpD;IACC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACpB,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE;CACxB,EACD,iBAAiB,CACjB,CAAC;AAGF;;GAEG;AACU,QAAA,8BAA8B,GAAG,IAAI,CAAC,MAAM,CACxD,IAAI,CAAC,MAAM,EAAE,EACb,qCAA6B,CAC7B,CAAC;AAGF;;;GAGG;AACU,QAAA,4BAA4B,GAAG,IAAI,CAAC,MAAM,CACtD;IACC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACpB,MAAM,EAAE,sCAA8B;IACtC,0BAA0B,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;CACzD,EACD,iBAAiB,CACjB,CAAC;AAGF;;;;GAIG;AACU,QAAA,2BAA2B,GAAG,IAAI,CAAC,MAAM,CAAC;IACtD,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,mCAA2B,CAAC;IACjD,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,iCAAyB,CAAC;IAC7C,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,oCAA4B,CAAC;IACnD,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,kCAA0B,CAAC;IAC/C,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,oCAA4B,CAAC;CACnD,CAAC,CAAC;AAGH;;GAEG;AACU,QAAA,6BAA6B,GAAG,IAAI,CAAC,MAAM,CACvD,IAAI,CAAC,MAAM,EAAE,EACb,mCAA2B,CAC3B,CAAC;AAGF;;;GAGG;AACU,QAAA,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAChD;IACC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,iCAAyB,CAAC,EAAE,CAAC;IACnD,IAAI,EAAE,+BAAuB;IAC7B,WAAW,EAAE,qCAA6B;CAC1C,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * This file contains a format for serializing the compatibility impacting subset of simple schema.\n\n * This format can be used for both view and stored simple schema.\n * This only includes all parts of the schema that impact compatibility according to SchemaCompatibilityTester.\n * It may not include some details which impact maintenance of application enforced invariants (like persisted metadata or logic in view schema).\n */\n\nimport * as Type from \"@sinclair/typebox\";\nimport type { ObjectOptions, Static } from \"@sinclair/typebox\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n/**\n * The format version for the schema.\n */\nexport const SimpleSchemaFormatVersion = {\n\tv1: 1,\n} as const;\n\n/**\n * The allowed types and their attributes in the simple schema format.\n * @see {@link SimpleAllowedTypes}.\n */\nexport const SimpleAllowedTypeAttributesFormat = Type.Object(\n\t{\n\t\tisStaged: Type.Optional(Type.Boolean()),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type SimpleAllowedTypeAttributesFormat = Static<\n\ttypeof SimpleAllowedTypeAttributesFormat\n>;\n\n/**\n * A set of allowed types in the simple schema format.\n * The keys are the type identifiers, and the values are their attributes.\n */\nexport const SimpleAllowedTypesFormat = Type.Record(\n\tType.String(),\n\tSimpleAllowedTypeAttributesFormat,\n);\nexport type SimpleAllowedTypesFormat = Static<typeof SimpleAllowedTypesFormat>;\n\n/**\n * Persisted format for a field schema in the simple schema format.\n * @see {@link SimpleFieldSchema}.\n */\nexport const SimpleFieldSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleFieldSchemaFormat = Static<typeof SimpleFieldSchemaFormat>;\n\n/**\n * Persisted format for an object field schema in the simple schema format.\n * @see {@link SimpleObjectFieldSchema}.\n */\nexport const SimpleObjectFieldSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t\tstoredKey: Type.String(),\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleObjectFieldSchemaFormat = Static<typeof SimpleObjectFieldSchemaFormat>;\n\n/**\n * Persisted format for an array node schema in the simple schema format.\n * @see {@link SimpleArrayNodeSchema}.\n */\nexport const SimpleArrayNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleArrayNodeSchemaFormat = Static<typeof SimpleArrayNodeSchemaFormat>;\n\n/**\n * Persisted format for a map node schema in the simple schema format.\n * @see {@link SimpleMapNodeSchema}.\n */\nexport const SimpleMapNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleMapNodeSchemaFormat = Static<typeof SimpleMapNodeSchemaFormat>;\n\n/**\n * Persisted format for a record node schema in the simple schema format.\n * @see {@link SimpleRecordNodeSchema}.\n */\nexport const SimpleRecordNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tsimpleAllowedTypes: SimpleAllowedTypesFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleRecordNodeSchemaFormat = Static<typeof SimpleRecordNodeSchemaFormat>;\n\n/**\n * Persisted format for a leaf node schema in the simple schema format.\n * @see {@link SimpleLeafNodeSchema}.\n */\nexport const SimpleLeafNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tleafKind: Type.Integer(),\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleLeafNodeSchemaFormat = Static<typeof SimpleLeafNodeSchemaFormat>;\n\n/**\n * Persisted format for the field schemas of an object node in the simple schema format.\n */\nexport const SimpleObjectFieldSchemasFormat = Type.Record(\n\tType.String(),\n\tSimpleObjectFieldSchemaFormat,\n);\nexport type SimpleObjectFieldSchemasFormat = Static<typeof SimpleObjectFieldSchemasFormat>;\n\n/**\n * Persisted format for an object node schema in the simple schema format.\n * @see {@link SimpleObjectNodeSchema}.\n */\nexport const SimpleObjectNodeSchemaFormat = Type.Object(\n\t{\n\t\tkind: Type.Integer(),\n\t\tfields: SimpleObjectFieldSchemasFormat,\n\t\tallowUnknownOptionalFields: Type.Optional(Type.Boolean()),\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleObjectNodeSchemaFormat = Static<typeof SimpleObjectNodeSchemaFormat>;\n\n/**\n * Discriminated union of all possible node schemas.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const SimpleNodeSchemaUnionFormat = Type.Object({\n\tarray: Type.Optional(SimpleArrayNodeSchemaFormat),\n\tmap: Type.Optional(SimpleMapNodeSchemaFormat),\n\trecord: Type.Optional(SimpleRecordNodeSchemaFormat),\n\tleaf: Type.Optional(SimpleLeafNodeSchemaFormat),\n\tobject: Type.Optional(SimpleObjectNodeSchemaFormat),\n});\nexport type SimpleNodeSchemaUnionFormat = Static<typeof SimpleNodeSchemaUnionFormat>;\n\n/**\n * Helper type for the schema definitions map in the persisted format.\n */\nexport const SimpleSchemaDefinitionsFormat = Type.Record(\n\tType.String(),\n\tSimpleNodeSchemaUnionFormat,\n);\nexport type SimpleSchemaDefinitionsFormat = Static<typeof SimpleSchemaDefinitionsFormat>;\n\n/**\n * Persisted format for the compatibility impacting subset of simple schema.\n * @see {@link SimpleTreeSchema}.\n */\nexport const SimpleTreeSchemaFormat = Type.Object(\n\t{\n\t\tversion: Type.Literal(SimpleSchemaFormatVersion.v1),\n\t\troot: SimpleFieldSchemaFormat,\n\t\tdefinitions: SimpleSchemaDefinitionsFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type SimpleTreeSchemaFormat = Static<typeof SimpleTreeSchemaFormat>;\n"]}
|