@fluidframework/tree 2.33.2 → 2.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +2 -0
- package/CHANGELOG.md +64 -0
- package/api-report/tree.alpha.api.md +124 -51
- package/api-report/tree.beta.api.md +31 -27
- package/api-report/tree.legacy.alpha.api.md +24 -23
- package/api-report/tree.legacy.public.api.md +24 -23
- package/api-report/tree.public.api.md +24 -23
- package/dist/alpha.d.ts +17 -1
- package/dist/beta.d.ts +2 -0
- package/dist/codec/codec.d.ts +5 -1
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +6 -2
- 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/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/schema-stored/{format.d.ts → formatV1.d.ts} +1 -1
- package/dist/core/schema-stored/formatV1.d.ts.map +1 -0
- package/dist/core/schema-stored/{format.js → formatV1.js} +1 -1
- package/dist/core/schema-stored/formatV1.js.map +1 -0
- package/dist/core/schema-stored/index.d.ts +3 -3
- package/dist/core/schema-stored/index.d.ts.map +1 -1
- package/dist/core/schema-stored/index.js +3 -3
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +3 -1
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +8 -6
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/dist/core/schema-view/index.d.ts +1 -1
- package/dist/core/schema-view/index.d.ts.map +1 -1
- package/dist/core/schema-view/index.js +1 -2
- package/dist/core/schema-view/index.js.map +1 -1
- package/dist/core/schema-view/view.d.ts +0 -27
- package/dist/core/schema-view/view.d.ts.map +1 -1
- package/dist/core/schema-view/view.js +1 -35
- package/dist/core/schema-view/view.js.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.d.ts +4 -4
- package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.js +1 -1
- package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/dist/feature-libraries/forest-summary/format.d.ts +2 -2
- package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/format.js +1 -1
- package/dist/feature-libraries/forest-summary/format.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +1 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +4 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts +3 -3
- package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.js +2 -2
- package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +9 -9
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js +2 -2
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +14 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +26 -5
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts +34 -5
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +63 -9
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/{lib/feature-libraries/schema-index/format.d.ts → dist/feature-libraries/schema-index/formatV1.d.ts} +9 -9
- package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -0
- package/dist/feature-libraries/schema-index/{format.js → formatV1.js} +4 -4
- package/dist/feature-libraries/schema-index/formatV1.js.map +1 -0
- package/dist/feature-libraries/schema-index/index.d.ts +2 -2
- package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/index.js +6 -3
- package/dist/feature-libraries/schema-index/index.js.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +5 -5
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +4 -4
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/internalTypes.d.ts +0 -1
- package/dist/internalTypes.d.ts.map +1 -1
- package/dist/internalTypes.js.map +1 -1
- package/dist/jsonDomainSchema.d.ts +2 -2
- package/dist/jsonDomainSchema.js +2 -2
- package/dist/jsonDomainSchema.js.map +1 -1
- package/dist/legacy.d.ts +2 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +2 -0
- package/dist/serializableDomainSchema.d.ts +3 -3
- package/dist/serializableDomainSchema.js +2 -2
- package/dist/serializableDomainSchema.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 +1 -1
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +4 -3
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +6 -5
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts +10 -11
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +11 -36
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +3 -3
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +4 -7
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +28 -3
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +29 -3
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/{treeApi.d.ts → tree.d.ts} +58 -34
- package/dist/shared-tree/tree.d.ts.map +1 -0
- package/dist/shared-tree/{treeApi.js → tree.js} +6 -6
- package/dist/shared-tree/tree.js.map +1 -0
- package/{lib/shared-tree/treeApiAlpha.d.ts → dist/shared-tree/treeAlpha.d.ts} +24 -14
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -0
- package/dist/shared-tree/{treeApiAlpha.js → treeAlpha.js} +7 -5
- package/dist/shared-tree/treeAlpha.js.map +1 -0
- package/dist/shared-tree-core/branchCommitEnricher.d.ts +0 -1
- package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.js +0 -1
- package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/dist/shared-tree-core/transactionEnricher.d.ts +1 -1
- package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/transactionEnricher.js +4 -1
- package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
- package/dist/simple-tree/api/conciseTree.d.ts +1 -1
- package/dist/simple-tree/api/conciseTree.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +177 -0
- package/dist/simple-tree/api/configuration.d.ts.map +1 -0
- package/dist/simple-tree/api/configuration.js +163 -0
- package/dist/simple-tree/api/configuration.js.map +1 -0
- package/dist/simple-tree/api/getJsonSchema.js +2 -2
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +9 -5
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +9 -7
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/{view.d.ts → schemaCompatibilityTester.d.ts} +8 -10
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -0
- package/dist/simple-tree/api/{view.js → schemaCompatibilityTester.js} +9 -9
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -0
- package/dist/simple-tree/api/schemaFactory.d.ts +25 -10
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +27 -12
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +12 -6
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +2 -2
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +67 -4
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts +11 -10
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +16 -11
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +30 -174
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js +1 -156
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/{lib/simple-tree/api/treeApiBeta.d.ts → dist/simple-tree/api/treeBeta.d.ts} +17 -6
- package/dist/simple-tree/api/treeBeta.d.ts.map +1 -0
- package/dist/simple-tree/api/{treeApiBeta.js → treeBeta.js} +5 -4
- package/dist/simple-tree/api/treeBeta.js.map +1 -0
- package/dist/simple-tree/api/treeChangeEvents.d.ts +83 -0
- package/dist/simple-tree/api/treeChangeEvents.d.ts.map +1 -0
- package/dist/simple-tree/api/treeChangeEvents.js +7 -0
- package/dist/simple-tree/api/treeChangeEvents.js.map +1 -0
- package/dist/simple-tree/api/treeNodeApi.d.ts +2 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +4 -9
- package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/arrayNode.d.ts +30 -2
- package/dist/simple-tree/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/arrayNode.js +3 -2
- package/dist/simple-tree/arrayNode.js.map +1 -1
- package/dist/simple-tree/arrayNodeTypes.d.ts +3 -3
- package/dist/simple-tree/arrayNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/arrayNodeTypes.js.map +1 -1
- package/dist/simple-tree/core/getOrCreateNode.d.ts +1 -1
- package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
- package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +2 -1
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +5 -5
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/treeNode.d.ts +94 -0
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -0
- package/dist/simple-tree/core/treeNode.js +123 -0
- package/dist/simple-tree/core/treeNode.js.map +1 -0
- package/dist/simple-tree/core/treeNodeKernel.d.ts +2 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +3 -1
- 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/types.d.ts +0 -165
- package/dist/simple-tree/core/types.d.ts.map +1 -1
- package/dist/simple-tree/core/types.js +1 -113
- package/dist/simple-tree/core/types.js.map +1 -1
- package/dist/simple-tree/core/withType.d.ts +1 -1
- package/dist/simple-tree/core/withType.d.ts.map +1 -1
- package/dist/simple-tree/core/withType.js.map +1 -1
- package/dist/simple-tree/index.d.ts +4 -4
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +4 -3
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/mapNode.d.ts +2 -2
- package/dist/simple-tree/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/mapNode.js +1 -1
- package/dist/simple-tree/mapNode.js.map +1 -1
- package/dist/simple-tree/mapNodeTypes.d.ts +3 -3
- package/dist/simple-tree/mapNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/mapNodeTypes.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts +18 -5
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +4 -3
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/objectNodeTypes.d.ts +4 -4
- package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/objectNodeTypes.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +164 -13
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js +107 -8
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts +8 -8
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +27 -32
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/simple-tree/treeNodeValid.js +2 -2
- package/dist/simple-tree/treeNodeValid.js.map +1 -1
- package/dist/tableSchema.d.ts +455 -125
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +398 -101
- package/dist/tableSchema.js.map +1 -1
- package/dist/treeFactory.d.ts +1 -1
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +30 -75
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/typeUtils.d.ts +1 -1
- package/dist/util/typeUtils.js.map +1 -1
- package/lib/alpha.d.ts +17 -1
- package/lib/beta.d.ts +2 -0
- package/lib/codec/codec.d.ts +5 -1
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +5 -1
- 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/core/index.d.ts +2 -2
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +2 -2
- package/lib/core/index.js.map +1 -1
- package/lib/core/schema-stored/{format.d.ts → formatV1.d.ts} +1 -1
- package/lib/core/schema-stored/formatV1.d.ts.map +1 -0
- package/lib/core/schema-stored/{format.js → formatV1.js} +1 -1
- package/lib/core/schema-stored/formatV1.js.map +1 -0
- package/lib/core/schema-stored/index.d.ts +3 -3
- package/lib/core/schema-stored/index.d.ts.map +1 -1
- package/lib/core/schema-stored/index.js +2 -2
- package/lib/core/schema-stored/index.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +3 -1
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +3 -1
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/lib/core/schema-view/index.d.ts +1 -1
- package/lib/core/schema-view/index.d.ts.map +1 -1
- package/lib/core/schema-view/index.js +1 -1
- package/lib/core/schema-view/index.js.map +1 -1
- package/lib/core/schema-view/view.d.ts +0 -27
- package/lib/core/schema-view/view.d.ts.map +1 -1
- package/lib/core/schema-view/view.js +0 -34
- package/lib/core/schema-view/view.js.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.d.ts +4 -4
- package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.js +2 -2
- package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/lib/feature-libraries/forest-summary/format.d.ts +2 -2
- package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/format.js +2 -2
- package/lib/feature-libraries/forest-summary/format.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +1 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts +3 -3
- package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.js +2 -2
- package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +9 -9
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js +3 -3
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +14 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +26 -6
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js +3 -3
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts +34 -5
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +61 -9
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/{dist/feature-libraries/schema-index/format.d.ts → lib/feature-libraries/schema-index/formatV1.d.ts} +9 -9
- package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -0
- package/lib/feature-libraries/schema-index/{format.js → formatV1.js} +5 -5
- package/lib/feature-libraries/schema-index/formatV1.js.map +1 -0
- package/lib/feature-libraries/schema-index/index.d.ts +2 -2
- package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/index.js +2 -2
- package/lib/feature-libraries/schema-index/index.js.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +5 -5
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +5 -5
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/internalTypes.d.ts +0 -1
- package/lib/internalTypes.d.ts.map +1 -1
- package/lib/internalTypes.js.map +1 -1
- package/lib/jsonDomainSchema.d.ts +2 -2
- package/lib/jsonDomainSchema.js +2 -2
- package/lib/jsonDomainSchema.js.map +1 -1
- package/lib/legacy.d.ts +2 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +2 -0
- package/lib/serializableDomainSchema.d.ts +3 -3
- package/lib/serializableDomainSchema.js +2 -2
- package/lib/serializableDomainSchema.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 +2 -2
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +4 -3
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +3 -3
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts +10 -11
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +12 -37
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +3 -3
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +6 -9
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +28 -3
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +29 -4
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/{treeApi.d.ts → tree.d.ts} +58 -34
- package/lib/shared-tree/tree.d.ts.map +1 -0
- package/lib/shared-tree/{treeApi.js → tree.js} +5 -5
- package/lib/shared-tree/tree.js.map +1 -0
- package/{dist/shared-tree/treeApiAlpha.d.ts → lib/shared-tree/treeAlpha.d.ts} +24 -14
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -0
- package/lib/shared-tree/{treeApiAlpha.js → treeAlpha.js} +8 -6
- package/lib/shared-tree/treeAlpha.js.map +1 -0
- package/lib/shared-tree-core/branchCommitEnricher.d.ts +0 -1
- package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.js +0 -1
- package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/lib/shared-tree-core/transactionEnricher.d.ts +1 -1
- package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/transactionEnricher.js +4 -1
- package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
- package/lib/simple-tree/api/conciseTree.d.ts +1 -1
- package/lib/simple-tree/api/conciseTree.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +177 -0
- package/lib/simple-tree/api/configuration.d.ts.map +1 -0
- package/lib/simple-tree/api/configuration.js +157 -0
- package/lib/simple-tree/api/configuration.js.map +1 -0
- package/lib/simple-tree/api/getJsonSchema.js +1 -1
- package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +9 -5
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +5 -4
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/{view.d.ts → schemaCompatibilityTester.d.ts} +8 -10
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -0
- package/lib/simple-tree/api/{view.js → schemaCompatibilityTester.js} +7 -7
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -0
- package/lib/simple-tree/api/schemaFactory.d.ts +25 -10
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +27 -12
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +12 -6
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +2 -2
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +67 -4
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts +11 -10
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +20 -13
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +30 -174
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js +0 -152
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/{dist/simple-tree/api/treeApiBeta.d.ts → lib/simple-tree/api/treeBeta.d.ts} +17 -6
- package/lib/simple-tree/api/treeBeta.d.ts.map +1 -0
- package/lib/simple-tree/api/{treeApiBeta.js → treeBeta.js} +5 -4
- package/lib/simple-tree/api/treeBeta.js.map +1 -0
- package/lib/simple-tree/api/treeChangeEvents.d.ts +83 -0
- package/lib/simple-tree/api/treeChangeEvents.d.ts.map +1 -0
- package/lib/simple-tree/api/treeChangeEvents.js +6 -0
- package/lib/simple-tree/api/treeChangeEvents.js.map +1 -0
- package/lib/simple-tree/api/treeNodeApi.d.ts +2 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +4 -9
- package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/arrayNode.d.ts +30 -2
- package/lib/simple-tree/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/arrayNode.js +4 -3
- package/lib/simple-tree/arrayNode.js.map +1 -1
- package/lib/simple-tree/arrayNodeTypes.d.ts +3 -3
- package/lib/simple-tree/arrayNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/arrayNodeTypes.js.map +1 -1
- package/lib/simple-tree/core/getOrCreateNode.d.ts +1 -1
- package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
- package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +2 -1
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +1 -1
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/treeNode.d.ts +94 -0
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -0
- package/lib/simple-tree/core/treeNode.js +118 -0
- package/lib/simple-tree/core/treeNode.js.map +1 -0
- package/lib/simple-tree/core/treeNodeKernel.d.ts +2 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +3 -1
- 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/types.d.ts +0 -165
- package/lib/simple-tree/core/types.d.ts.map +1 -1
- package/lib/simple-tree/core/types.js +0 -110
- package/lib/simple-tree/core/types.js.map +1 -1
- package/lib/simple-tree/core/withType.d.ts +1 -1
- package/lib/simple-tree/core/withType.d.ts.map +1 -1
- package/lib/simple-tree/core/withType.js.map +1 -1
- package/lib/simple-tree/index.d.ts +4 -4
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/mapNode.d.ts +2 -2
- package/lib/simple-tree/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/mapNode.js +2 -2
- package/lib/simple-tree/mapNode.js.map +1 -1
- package/lib/simple-tree/mapNodeTypes.d.ts +3 -3
- package/lib/simple-tree/mapNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/mapNodeTypes.js.map +1 -1
- package/lib/simple-tree/objectNode.d.ts +18 -5
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +5 -4
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/objectNodeTypes.d.ts +4 -4
- package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/objectNodeTypes.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +164 -13
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js +96 -8
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts +8 -8
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +26 -31
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/simple-tree/treeNodeValid.js +2 -2
- package/lib/simple-tree/treeNodeValid.js.map +1 -1
- package/lib/tableSchema.d.ts +455 -125
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +398 -101
- package/lib/tableSchema.js.map +1 -1
- package/lib/treeFactory.d.ts +1 -1
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +30 -75
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/typeUtils.d.ts +1 -1
- package/lib/util/typeUtils.js.map +1 -1
- package/package.json +21 -21
- package/src/codec/codec.ts +6 -1
- package/src/codec/index.ts +1 -0
- package/src/core/index.ts +1 -2
- package/src/core/schema-stored/index.ts +3 -3
- package/src/core/schema-stored/schema.ts +3 -1
- package/src/core/schema-stored/storedSchemaRepository.ts +1 -1
- package/src/core/schema-view/index.ts +0 -1
- package/src/core/schema-view/view.ts +0 -31
- package/src/core/tree/persistedTreeTextFormat.ts +2 -2
- package/src/feature-libraries/forest-summary/format.ts +2 -2
- package/src/feature-libraries/index.ts +7 -1
- package/src/feature-libraries/mapTreeCursor.ts +3 -3
- package/src/feature-libraries/modular-schema/modularChangeFormat.ts +3 -3
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +38 -9
- package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +3 -4
- package/src/feature-libraries/schema-index/codec.ts +80 -12
- package/src/feature-libraries/schema-index/{format.ts → formatV1.ts} +4 -4
- package/src/feature-libraries/schema-index/index.ts +7 -2
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +9 -9
- package/src/index.ts +18 -1
- package/src/internalTypes.ts +0 -2
- package/src/jsonDomainSchema.ts +2 -2
- package/src/packageVersion.ts +1 -1
- package/src/serializableDomainSchema.ts +3 -3
- package/src/shared-tree/independentView.ts +4 -3
- package/src/shared-tree/index.ts +5 -6
- package/src/shared-tree/schematizeTree.ts +10 -40
- package/src/shared-tree/schematizingTreeView.ts +12 -17
- package/src/shared-tree/sharedTree.ts +67 -6
- package/src/shared-tree/{treeApi.ts → tree.ts} +75 -51
- package/src/shared-tree/{treeApiAlpha.ts → treeAlpha.ts} +28 -16
- package/src/shared-tree-core/branchCommitEnricher.ts +0 -1
- package/src/shared-tree-core/transactionEnricher.ts +4 -1
- package/src/simple-tree/api/conciseTree.ts +1 -1
- package/src/simple-tree/api/configuration.ts +353 -0
- package/src/simple-tree/api/getJsonSchema.ts +1 -1
- package/src/simple-tree/api/index.ts +23 -15
- package/src/simple-tree/api/{view.ts → schemaCompatibilityTester.ts} +8 -15
- package/src/simple-tree/api/schemaFactory.ts +139 -19
- package/src/simple-tree/api/schemaFactoryAlpha.ts +7 -5
- package/src/simple-tree/api/schemaFactoryRecursive.ts +102 -38
- package/src/simple-tree/api/schemaFromSimple.ts +2 -2
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -1
- package/src/simple-tree/api/storedSchema.ts +32 -17
- package/src/simple-tree/api/tree.ts +38 -354
- package/src/simple-tree/api/{treeApiBeta.ts → treeBeta.ts} +20 -6
- package/src/simple-tree/api/treeChangeEvents.ts +84 -0
- package/src/simple-tree/api/treeNodeApi.ts +1 -1
- package/src/simple-tree/api/typesUnsafe.ts +15 -11
- package/src/simple-tree/arrayNode.ts +38 -5
- package/src/simple-tree/arrayNodeTypes.ts +8 -7
- package/src/simple-tree/core/getOrCreateNode.ts +1 -1
- package/src/simple-tree/core/index.ts +5 -4
- package/src/simple-tree/core/treeNode.ts +163 -0
- package/src/simple-tree/core/treeNodeKernel.ts +2 -1
- package/src/simple-tree/core/treeNodeSchema.ts +3 -1
- package/src/simple-tree/core/types.ts +0 -234
- package/src/simple-tree/core/withType.ts +1 -1
- package/src/simple-tree/index.ts +19 -2
- package/src/simple-tree/mapNode.ts +11 -3
- package/src/simple-tree/mapNodeTypes.ts +10 -7
- package/src/simple-tree/objectNode.ts +39 -15
- package/src/simple-tree/objectNodeTypes.ts +9 -5
- package/src/simple-tree/schemaTypes.ts +354 -25
- package/src/simple-tree/toStoredSchema.ts +42 -41
- package/src/simple-tree/treeNodeValid.ts +2 -2
- package/src/tableSchema.ts +1206 -434
- package/src/treeFactory.ts +56 -173
- package/src/util/typeUtils.ts +1 -1
- package/dist/core/schema-stored/format.d.ts.map +0 -1
- package/dist/core/schema-stored/format.js.map +0 -1
- package/dist/feature-libraries/schema-index/format.d.ts.map +0 -1
- package/dist/feature-libraries/schema-index/format.js.map +0 -1
- package/dist/shared-tree/treeApi.d.ts.map +0 -1
- package/dist/shared-tree/treeApi.js.map +0 -1
- package/dist/shared-tree/treeApiAlpha.d.ts.map +0 -1
- package/dist/shared-tree/treeApiAlpha.js.map +0 -1
- package/dist/simple-tree/api/treeApiBeta.d.ts.map +0 -1
- package/dist/simple-tree/api/treeApiBeta.js.map +0 -1
- package/dist/simple-tree/api/view.d.ts.map +0 -1
- package/dist/simple-tree/api/view.js.map +0 -1
- package/lib/core/schema-stored/format.d.ts.map +0 -1
- package/lib/core/schema-stored/format.js.map +0 -1
- package/lib/feature-libraries/schema-index/format.d.ts.map +0 -1
- package/lib/feature-libraries/schema-index/format.js.map +0 -1
- package/lib/shared-tree/treeApi.d.ts.map +0 -1
- package/lib/shared-tree/treeApi.js.map +0 -1
- package/lib/shared-tree/treeApiAlpha.d.ts.map +0 -1
- package/lib/shared-tree/treeApiAlpha.js.map +0 -1
- package/lib/simple-tree/api/treeApiBeta.d.ts.map +0 -1
- package/lib/simple-tree/api/treeApiBeta.js.map +0 -1
- package/lib/simple-tree/api/view.d.ts.map +0 -1
- package/lib/simple-tree/api/view.js.map +0 -1
- /package/src/core/schema-stored/{format.ts → formatV1.ts} +0 -0
|
@@ -32,7 +32,7 @@ export {
|
|
|
32
32
|
} from "./storedSchemaRepository.js";
|
|
33
33
|
export { Multiplicity } from "./multiplicity.js";
|
|
34
34
|
|
|
35
|
-
export type { TreeNodeSchemaIdentifier, FieldKey, FieldKindIdentifier } from "./
|
|
35
|
+
export type { TreeNodeSchemaIdentifier, FieldKey, FieldKindIdentifier } from "./formatV1.js";
|
|
36
36
|
|
|
37
|
-
import * as
|
|
38
|
-
export {
|
|
37
|
+
import * as schemaFormatV1 from "./formatV1.js";
|
|
38
|
+
export { schemaFormatV1 };
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
PersistedValueSchema,
|
|
14
14
|
type TreeNodeSchemaDataFormat,
|
|
15
15
|
type TreeNodeSchemaIdentifier,
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./formatV1.js";
|
|
17
17
|
import type { Multiplicity } from "./multiplicity.js";
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -126,7 +126,9 @@ export interface TreeFieldStoredSchema {
|
|
|
126
126
|
*
|
|
127
127
|
* @remarks
|
|
128
128
|
* This mainly show up in:
|
|
129
|
+
*
|
|
129
130
|
* 1. The root default field for documents.
|
|
131
|
+
*
|
|
130
132
|
* 2. The schema used for out of schema fields (which thus must be empty/not exist) on object and leaf nodes.
|
|
131
133
|
*/
|
|
132
134
|
export const forbiddenFieldKindIdentifier = "Forbidden";
|
|
@@ -9,7 +9,7 @@ import type { Listenable } from "@fluidframework/core-interfaces/internal";
|
|
|
9
9
|
import { createEmitter } from "@fluid-internal/client-utils";
|
|
10
10
|
import { compareStrings } from "../../util/index.js";
|
|
11
11
|
|
|
12
|
-
import type { TreeNodeSchemaIdentifier } from "./
|
|
12
|
+
import type { TreeNodeSchemaIdentifier } from "./formatV1.js";
|
|
13
13
|
import {
|
|
14
14
|
type StoredSchemaCollection,
|
|
15
15
|
type TreeFieldStoredSchema,
|
|
@@ -9,37 +9,6 @@ import type { TreeNodeSchemaIdentifier, TreeStoredSchema } from "../schema-store
|
|
|
9
9
|
* APIs for applying `view schema` to documents.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* What kinds of updates to stored schema to permit.
|
|
14
|
-
*
|
|
15
|
-
* Bit flags enum.
|
|
16
|
-
*/
|
|
17
|
-
export enum AllowedUpdateType {
|
|
18
|
-
/**
|
|
19
|
-
* Do not update the stored schema to match view schema.
|
|
20
|
-
*/
|
|
21
|
-
None = 0,
|
|
22
|
-
/**
|
|
23
|
-
* Update the stored schema as part of initializing an empty document.
|
|
24
|
-
*
|
|
25
|
-
* Includes "Initialize".
|
|
26
|
-
*/
|
|
27
|
-
// eslint-disable-next-line no-bitwise
|
|
28
|
-
Initialize = 1 << 0,
|
|
29
|
-
/**
|
|
30
|
-
* Update the stored schema to match the view schema if the current document contents are compatible with the view schema.
|
|
31
|
-
* TODO: support this option.
|
|
32
|
-
*/
|
|
33
|
-
// DataCompatible,
|
|
34
|
-
/**
|
|
35
|
-
* Update the stored schema to match view schema if all possible documents based on the current stored schema would be compatible with the view schema.
|
|
36
|
-
*
|
|
37
|
-
* Includes "Initialize".
|
|
38
|
-
*/
|
|
39
|
-
// eslint-disable-next-line no-bitwise
|
|
40
|
-
SchemaCompatible = 1 << 1,
|
|
41
|
-
}
|
|
42
|
-
|
|
43
12
|
/**
|
|
44
13
|
*/
|
|
45
14
|
export interface TreeAdapter {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { type Static, type TSchema, Type } from "@sinclair/typebox";
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { schemaFormatV1 } from "../schema-stored/index.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* This module contains persisted types for a simple, human-readable tree format.
|
|
@@ -58,7 +58,7 @@ const EncodedFieldMapObject = <Schema extends TSchema>(tChild: Schema) =>
|
|
|
58
58
|
type EncodedNodeData = Static<typeof EncodedNodeData>;
|
|
59
59
|
const EncodedNodeData = Type.Object({
|
|
60
60
|
value: Type.Optional(Type.Any()),
|
|
61
|
-
type: Type.Readonly(
|
|
61
|
+
type: Type.Readonly(schemaFormatV1.TreeNodeSchemaIdentifierSchema),
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
/**
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
import { type Static, Type } from "@sinclair/typebox";
|
|
7
7
|
|
|
8
8
|
import { Versioned } from "../../codec/index.js";
|
|
9
|
-
import {
|
|
9
|
+
import { schemaFormatV1 } from "../../core/index.js";
|
|
10
10
|
|
|
11
11
|
export const version = 1.0;
|
|
12
12
|
|
|
13
13
|
export const Format = Type.Object(
|
|
14
14
|
{
|
|
15
15
|
version: Type.Literal(version),
|
|
16
|
-
keys: Type.Array(
|
|
16
|
+
keys: Type.Array(schemaFormatV1.FieldKeySchema),
|
|
17
17
|
fields: Versioned,
|
|
18
18
|
},
|
|
19
19
|
{ additionalProperties: false },
|
|
@@ -17,7 +17,13 @@ export {
|
|
|
17
17
|
mapTreeFieldFromCursor,
|
|
18
18
|
} from "./mapTreeCursor.js";
|
|
19
19
|
export { buildForest } from "./object-forest/index.js";
|
|
20
|
-
export {
|
|
20
|
+
export {
|
|
21
|
+
SchemaSummarizer,
|
|
22
|
+
encodeTreeSchema,
|
|
23
|
+
makeSchemaCodec,
|
|
24
|
+
makeSchemaCodecs,
|
|
25
|
+
SchemaCodecVersion,
|
|
26
|
+
} from "./schema-index/index.js";
|
|
21
27
|
export {
|
|
22
28
|
stackTreeNodeCursor,
|
|
23
29
|
type CursorAdapter,
|
|
@@ -26,17 +26,17 @@ import {
|
|
|
26
26
|
} from "./treeCursorUtils.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Returns an {@link ITreeCursorSynchronous} in nodes mode for a single {@link MapTree}.
|
|
30
30
|
*/
|
|
31
31
|
export function cursorForMapTreeNode(root: MapTree): CursorWithNode<MapTree> {
|
|
32
32
|
return stackTreeNodeCursor(adapter, root);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Returns an {@link ITreeCursorSynchronous} in fields mode for a MapTree field.
|
|
37
37
|
*/
|
|
38
38
|
export function cursorForMapTreeField(
|
|
39
|
-
root: MapTree[],
|
|
39
|
+
root: readonly MapTree[],
|
|
40
40
|
detachedField: DetachedField = rootField,
|
|
41
41
|
): CursorWithNode<MapTree> {
|
|
42
42
|
const key = detachedFieldAsKey(detachedField);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { type ObjectOptions, type Static, Type } from "@sinclair/typebox";
|
|
7
7
|
|
|
8
|
-
import { type ChangesetLocalId, RevisionTagSchema,
|
|
8
|
+
import { type ChangesetLocalId, RevisionTagSchema, schemaFormatV1 } from "../../core/index.js";
|
|
9
9
|
import {
|
|
10
10
|
type JsonCompatibleReadOnly,
|
|
11
11
|
JsonCompatibleReadOnlySchema,
|
|
@@ -27,8 +27,8 @@ export type EncodedChangeAtomId = Static<typeof EncodedChangeAtomId>;
|
|
|
27
27
|
|
|
28
28
|
const EncodedFieldChange = Type.Object(
|
|
29
29
|
{
|
|
30
|
-
fieldKey:
|
|
31
|
-
fieldKind:
|
|
30
|
+
fieldKey: schemaFormatV1.FieldKeySchema,
|
|
31
|
+
fieldKind: schemaFormatV1.FieldKindIdentifierSchema,
|
|
32
32
|
// Implementation note: node and field change encoding is mutually recursive.
|
|
33
33
|
// This field marks a boundary in that recursion to avoid constructing excessively complex
|
|
34
34
|
// recursive types. Encoded changes are validated at this boundary at runtime--see modularChangeCodecs.ts.
|
|
@@ -10,21 +10,50 @@ import {
|
|
|
10
10
|
type ICodecOptions,
|
|
11
11
|
type IJsonCodec,
|
|
12
12
|
makeCodecFamily,
|
|
13
|
+
makeVersionDispatchingCodec,
|
|
13
14
|
withSchemaValidation,
|
|
14
15
|
} from "../../codec/index.js";
|
|
15
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
makeSchemaCodec,
|
|
18
|
+
SchemaCodecVersion,
|
|
19
|
+
type Format as FormatV1,
|
|
20
|
+
} from "../schema-index/index.js";
|
|
16
21
|
|
|
17
22
|
import { EncodedSchemaChange } from "./schemaChangeFormat.js";
|
|
18
23
|
import type { SchemaChange } from "./schemaChangeTypes.js";
|
|
19
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Create a family of schema change codecs.
|
|
27
|
+
* @param options - Specifies common codec options, including which `validator` to use.
|
|
28
|
+
* @returns The composed codec family.
|
|
29
|
+
*/
|
|
20
30
|
export function makeSchemaChangeCodecs(options: ICodecOptions): ICodecFamily<SchemaChange> {
|
|
21
|
-
return makeCodecFamily([[
|
|
31
|
+
return makeCodecFamily([[SchemaCodecVersion.v1, makeSchemaChangeCodecV1(options)]]);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Create a schema change codec.
|
|
36
|
+
* @param options - Specifies common codec options, including which `validator` to use.
|
|
37
|
+
* @param writeVersion - The schema change write version.
|
|
38
|
+
* @returns The composed codec.
|
|
39
|
+
*/
|
|
40
|
+
export function makeSchemaChangeCodec(
|
|
41
|
+
options: ICodecOptions,
|
|
42
|
+
writeVersion: SchemaCodecVersion,
|
|
43
|
+
): IJsonCodec<SchemaChange> {
|
|
44
|
+
const family = makeSchemaChangeCodecs(options);
|
|
45
|
+
return makeVersionDispatchingCodec(family, { ...options, writeVersion });
|
|
22
46
|
}
|
|
23
47
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Compose the v1 schema change codec.
|
|
50
|
+
* @param options - The codec options.
|
|
51
|
+
* @returns The composed schema change codec.
|
|
52
|
+
*/
|
|
53
|
+
function makeSchemaChangeCodecV1(
|
|
54
|
+
options: ICodecOptions,
|
|
55
|
+
): IJsonCodec<SchemaChange, EncodedSchemaChange> {
|
|
56
|
+
const schemaCodec = makeSchemaCodec(options, SchemaCodecVersion.v1);
|
|
28
57
|
const schemaChangeCodec: IJsonCodec<SchemaChange, EncodedSchemaChange> = {
|
|
29
58
|
encode: (schemaChange) => {
|
|
30
59
|
assert(
|
|
@@ -32,8 +61,8 @@ function makeSchemaChangeCodec({
|
|
|
32
61
|
0x933 /* Inverse schema changes should never be transmitted */,
|
|
33
62
|
);
|
|
34
63
|
return {
|
|
35
|
-
new: schemaCodec.encode(schemaChange.schema.new),
|
|
36
|
-
old: schemaCodec.encode(schemaChange.schema.old),
|
|
64
|
+
new: schemaCodec.encode(schemaChange.schema.new) as FormatV1,
|
|
65
|
+
old: schemaCodec.encode(schemaChange.schema.old) as FormatV1,
|
|
37
66
|
};
|
|
38
67
|
},
|
|
39
68
|
decode: (encoded) => {
|
|
@@ -48,5 +77,5 @@ function makeSchemaChangeCodec({
|
|
|
48
77
|
encodedSchema: EncodedSchemaChange,
|
|
49
78
|
};
|
|
50
79
|
|
|
51
|
-
return withSchemaValidation(EncodedSchemaChange, schemaChangeCodec,
|
|
80
|
+
return withSchemaValidation(EncodedSchemaChange, schemaChangeCodec, options.jsonValidator);
|
|
52
81
|
}
|
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { type Static, Type } from "@sinclair/typebox";
|
|
7
|
-
|
|
8
|
-
import { Format } from "../schema-index/index.js";
|
|
7
|
+
import { Format as FormatV1 } from "../schema-index/index.js";
|
|
9
8
|
|
|
10
9
|
export const EncodedSchemaChange = Type.Object({
|
|
11
|
-
new:
|
|
12
|
-
old:
|
|
10
|
+
new: FormatV1,
|
|
11
|
+
old: FormatV1,
|
|
13
12
|
});
|
|
14
13
|
|
|
15
14
|
export type EncodedSchemaChange = Static<typeof EncodedSchemaChange>;
|
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { fail } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { fail, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
7
7
|
import {
|
|
8
|
+
type FluidClientVersion,
|
|
9
|
+
type ICodecFamily,
|
|
8
10
|
type ICodecOptions,
|
|
9
11
|
type IJsonCodec,
|
|
12
|
+
makeCodecFamily,
|
|
13
|
+
makeVersionDispatchingCodec,
|
|
10
14
|
makeVersionedValidatedCodec,
|
|
11
15
|
} from "../../codec/index.js";
|
|
12
16
|
import {
|
|
@@ -15,15 +19,77 @@ import {
|
|
|
15
19
|
type TreeStoredSchema,
|
|
16
20
|
decodeFieldSchema,
|
|
17
21
|
encodeFieldSchema,
|
|
18
|
-
|
|
22
|
+
schemaFormatV1,
|
|
19
23
|
storedSchemaDecodeDispatcher,
|
|
20
24
|
} from "../../core/index.js";
|
|
21
|
-
import { brand } from "../../util/index.js";
|
|
25
|
+
import { brand, type JsonCompatible } from "../../util/index.js";
|
|
22
26
|
|
|
23
|
-
import { Format } from "./
|
|
27
|
+
import { Format as FormatV1 } from "./formatV1.js";
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Versions for the codec that encodes an in-memory representation of a stored schema {@link TreeStoredSchema} into a persisted format (or decodes it in the opposite direction).
|
|
31
|
+
*/
|
|
32
|
+
export enum SchemaCodecVersion {
|
|
33
|
+
v1 = 1,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Convert a FluidClientVersion to a SchemaCodecVersion.
|
|
38
|
+
* @param clientVersion - The FluidClientVersion to convert.
|
|
39
|
+
* @returns The SchemaCodecVersion that corresponds to the provided FluidClientVersion.
|
|
40
|
+
*/
|
|
41
|
+
export function clientVersionToSchemaVersion(
|
|
42
|
+
clientVersion: FluidClientVersion,
|
|
43
|
+
): SchemaCodecVersion {
|
|
44
|
+
// Only one version of the schema codec is currently supported.
|
|
45
|
+
return SchemaCodecVersion.v1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Create a schema codec.
|
|
50
|
+
* @param options - Specifies common codec options, including which `validator` to use.
|
|
51
|
+
* @param writeVersion - The schema write version.
|
|
52
|
+
* @returns The composed codec.
|
|
53
|
+
*
|
|
54
|
+
* @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.
|
|
55
|
+
*/
|
|
56
|
+
export function makeSchemaCodec(
|
|
57
|
+
options: ICodecOptions,
|
|
58
|
+
writeVersion: SchemaCodecVersion,
|
|
59
|
+
): IJsonCodec<TreeStoredSchema> {
|
|
60
|
+
const family = makeSchemaCodecs(options);
|
|
61
|
+
return makeVersionDispatchingCodec(family, { ...options, writeVersion });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Create a family of schema codecs.
|
|
66
|
+
* @param options - Specifies common codec options, including which `validator` to use.
|
|
67
|
+
* @returns The composed codec family.
|
|
68
|
+
*/
|
|
69
|
+
export function makeSchemaCodecs(options: ICodecOptions): ICodecFamily<TreeStoredSchema> {
|
|
70
|
+
return makeCodecFamily([[SchemaCodecVersion.v1, makeSchemaCodecV1(options)]]);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Encode an in-memory TreeStoredSchema into the specified format version.
|
|
75
|
+
* @param repo - The in-memory schema.
|
|
76
|
+
* @param version - The schema write version.
|
|
77
|
+
* @returns The encoded schema.
|
|
78
|
+
*/
|
|
79
|
+
export function encodeRepo(
|
|
80
|
+
repo: TreeStoredSchema,
|
|
81
|
+
version: SchemaCodecVersion,
|
|
82
|
+
): JsonCompatible {
|
|
83
|
+
switch (version) {
|
|
84
|
+
case SchemaCodecVersion.v1:
|
|
85
|
+
return encodeRepoV1(repo);
|
|
86
|
+
default:
|
|
87
|
+
unreachableCase(version);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function encodeRepoV1(repo: TreeStoredSchema): FormatV1 {
|
|
92
|
+
const nodeSchema: Record<string, schemaFormatV1.TreeNodeSchemaDataFormat> =
|
|
27
93
|
Object.create(null);
|
|
28
94
|
const rootFieldSchema = encodeFieldSchema(repo.rootFieldSchema);
|
|
29
95
|
for (const name of [...repo.nodeSchema.keys()].sort()) {
|
|
@@ -36,13 +102,13 @@ export function encodeRepo(repo: TreeStoredSchema): Format {
|
|
|
36
102
|
});
|
|
37
103
|
}
|
|
38
104
|
return {
|
|
39
|
-
version:
|
|
105
|
+
version: schemaFormatV1.version,
|
|
40
106
|
nodes: nodeSchema,
|
|
41
107
|
root: rootFieldSchema,
|
|
42
108
|
};
|
|
43
109
|
}
|
|
44
110
|
|
|
45
|
-
function decode(f:
|
|
111
|
+
function decode(f: FormatV1): TreeStoredSchema {
|
|
46
112
|
const nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();
|
|
47
113
|
for (const [key, schema] of Object.entries(f.nodes)) {
|
|
48
114
|
nodeSchema.set(brand(key), storedSchemaDecodeDispatcher.dispatch(schema));
|
|
@@ -55,10 +121,12 @@ function decode(f: Format): TreeStoredSchema {
|
|
|
55
121
|
|
|
56
122
|
/**
|
|
57
123
|
* Creates a codec which performs synchronous monolithic encoding of schema content.
|
|
124
|
+
* @param options - Specifies common codec options, including which `validator` to use.
|
|
125
|
+
* @returns The codec.
|
|
58
126
|
*/
|
|
59
|
-
|
|
60
|
-
return makeVersionedValidatedCodec(options, new Set([
|
|
61
|
-
encode: (data: TreeStoredSchema) =>
|
|
62
|
-
decode: (data:
|
|
127
|
+
function makeSchemaCodecV1(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV1> {
|
|
128
|
+
return makeVersionedValidatedCodec(options, new Set([schemaFormatV1.version]), FormatV1, {
|
|
129
|
+
encode: (data: TreeStoredSchema) => encodeRepoV1(data),
|
|
130
|
+
decode: (data: FormatV1) => decode(data),
|
|
63
131
|
});
|
|
64
132
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { type ObjectOptions, type Static, Type } from "@sinclair/typebox";
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { schemaFormatV1 } from "../../core/index.js";
|
|
9
9
|
|
|
10
10
|
const noAdditionalProps: ObjectOptions = { additionalProperties: false };
|
|
11
11
|
|
|
@@ -21,9 +21,9 @@ const noAdditionalProps: ObjectOptions = { additionalProperties: false };
|
|
|
21
21
|
*/
|
|
22
22
|
export const Format = Type.Object(
|
|
23
23
|
{
|
|
24
|
-
version: Type.Literal(
|
|
25
|
-
nodes: Type.Record(Type.String(),
|
|
26
|
-
root:
|
|
24
|
+
version: Type.Literal(schemaFormatV1.version),
|
|
25
|
+
nodes: Type.Record(Type.String(), schemaFormatV1.TreeNodeSchemaDataFormat),
|
|
26
|
+
root: schemaFormatV1.FieldSchemaFormat,
|
|
27
27
|
},
|
|
28
28
|
noAdditionalProps,
|
|
29
29
|
);
|
|
@@ -4,5 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export { SchemaSummarizer, encodeTreeSchema } from "./schemaSummarizer.js";
|
|
7
|
-
export {
|
|
8
|
-
|
|
7
|
+
export {
|
|
8
|
+
makeSchemaCodec,
|
|
9
|
+
makeSchemaCodecs,
|
|
10
|
+
SchemaCodecVersion,
|
|
11
|
+
clientVersionToSchemaVersion,
|
|
12
|
+
} from "./codec.js";
|
|
13
|
+
export { Format } from "./formatV1.js";
|
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
} from "@fluidframework/runtime-definitions/internal";
|
|
15
15
|
import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type { IJsonCodec } from "../../codec/index.js";
|
|
18
18
|
import {
|
|
19
19
|
type MutableTreeStoredSchema,
|
|
20
20
|
type TreeStoredSchema,
|
|
@@ -27,8 +27,8 @@ import type {
|
|
|
27
27
|
} from "../../shared-tree-core/index.js";
|
|
28
28
|
import type { CollabWindow } from "../incrementalSummarizationUtils.js";
|
|
29
29
|
|
|
30
|
-
import { encodeRepo
|
|
31
|
-
import type {
|
|
30
|
+
import { encodeRepo } from "./codec.js";
|
|
31
|
+
import type { JsonCompatible } from "../../util/index.js";
|
|
32
32
|
|
|
33
33
|
const schemaStringKey = "SchemaString";
|
|
34
34
|
/**
|
|
@@ -37,16 +37,13 @@ const schemaStringKey = "SchemaString";
|
|
|
37
37
|
export class SchemaSummarizer implements Summarizable {
|
|
38
38
|
public readonly key = "Schema";
|
|
39
39
|
|
|
40
|
-
private readonly codec: IJsonCodec<TreeStoredSchema, Format>;
|
|
41
|
-
|
|
42
40
|
private schemaIndexLastChangedSeq: number | undefined;
|
|
43
41
|
|
|
44
42
|
public constructor(
|
|
45
43
|
private readonly schema: MutableTreeStoredSchema,
|
|
46
|
-
options: ICodecOptions,
|
|
47
44
|
collabWindow: CollabWindow,
|
|
45
|
+
private readonly codec: IJsonCodec<TreeStoredSchema>,
|
|
48
46
|
) {
|
|
49
|
-
this.codec = makeSchemaCodec(options);
|
|
50
47
|
this.schema.events.on("afterSchemaChange", () => {
|
|
51
48
|
// Invalidate the cache, as we need to regenerate the blob if the schema changes
|
|
52
49
|
// We are assuming that schema changes from remote ops are valid, as we are in a summarization context.
|
|
@@ -116,6 +113,9 @@ export class SchemaSummarizer implements Summarizable {
|
|
|
116
113
|
* @remarks
|
|
117
114
|
* This can be used to help inspect schema for debugging, and to save a snapshot of schema to help detect and review changes to an applications schema.
|
|
118
115
|
*/
|
|
119
|
-
export function encodeTreeSchema(
|
|
120
|
-
|
|
116
|
+
export function encodeTreeSchema(
|
|
117
|
+
schema: TreeStoredSchema,
|
|
118
|
+
writeVersion: number,
|
|
119
|
+
): JsonCompatible {
|
|
120
|
+
return encodeRepo(schema, writeVersion);
|
|
121
121
|
}
|
package/src/index.ts
CHANGED
|
@@ -152,6 +152,20 @@ export {
|
|
|
152
152
|
type FactoryContentObject,
|
|
153
153
|
type ReadableField,
|
|
154
154
|
type ReadSchema,
|
|
155
|
+
type ImplicitAnnotatedAllowedTypes,
|
|
156
|
+
type ImplicitAnnotatedFieldSchema,
|
|
157
|
+
type AnnotatedAllowedType,
|
|
158
|
+
type AnnotatedAllowedTypes,
|
|
159
|
+
type AllowedTypeMetadata,
|
|
160
|
+
type AllowedTypesMetadata,
|
|
161
|
+
type InsertableObjectFromAnnotatedSchemaRecord,
|
|
162
|
+
type UnannotateImplicitAllowedTypes,
|
|
163
|
+
type UnannotateAllowedTypes,
|
|
164
|
+
type UnannotateAllowedType,
|
|
165
|
+
type UnannotateAllowedTypesList,
|
|
166
|
+
type UnannotateAllowedTypeOrLazyItem,
|
|
167
|
+
type UnannotateImplicitFieldSchema,
|
|
168
|
+
type UnannotateSchemaRecord,
|
|
155
169
|
// test recursive schema for checking that d.ts files handles schema correctly
|
|
156
170
|
test_RecursiveObject,
|
|
157
171
|
test_RecursiveObject_base,
|
|
@@ -232,12 +246,15 @@ export {
|
|
|
232
246
|
type MapNodePojoEmulationSchema,
|
|
233
247
|
MapNodeSchema,
|
|
234
248
|
type ObjectFromSchemaRecord,
|
|
249
|
+
type ValidateRecursiveSchemaTemplate,
|
|
250
|
+
type FixRecursiveRecursionLimit,
|
|
235
251
|
} from "./simple-tree/index.js";
|
|
236
252
|
export {
|
|
237
253
|
SharedTree,
|
|
238
254
|
configuredSharedTree,
|
|
239
255
|
} from "./treeFactory.js";
|
|
240
256
|
export { SharedTreeAttributes, SharedTreeFactoryType } from "./sharedTreeAttributes.js";
|
|
257
|
+
export { persistedToSimpleSchema } from "./shared-tree/index.js";
|
|
241
258
|
|
|
242
259
|
export {
|
|
243
260
|
type ICodecOptions,
|
|
@@ -286,4 +303,4 @@ export type { MapNodeInsertableData } from "./simple-tree/index.js";
|
|
|
286
303
|
|
|
287
304
|
export { JsonAsTree } from "./jsonDomainSchema.js";
|
|
288
305
|
export { FluidSerializableAsTree } from "./serializableDomainSchema.js";
|
|
289
|
-
export { TableSchema } from "./tableSchema.js";
|
|
306
|
+
export { TableSchema, type System_TableSchema } from "./tableSchema.js";
|
package/src/internalTypes.ts
CHANGED
package/src/jsonDomainSchema.ts
CHANGED
|
@@ -36,7 +36,7 @@ const sf = new SchemaFactory("com.fluidframework.json");
|
|
|
36
36
|
*
|
|
37
37
|
* 2. The order of fields on an object is not preserved. The resulting order is arbitrary.
|
|
38
38
|
*
|
|
39
|
-
* JSON data can be imported from JSON into this format using `JSON.parse` then {@link TreeAlpha.importConcise} with the {@link JsonAsTree.(Tree:variable)} schema.
|
|
39
|
+
* JSON data can be imported from JSON into this format using `JSON.parse` then {@link (TreeAlpha:interface).importConcise} with the {@link JsonAsTree.(Tree:variable)} schema.
|
|
40
40
|
*
|
|
41
41
|
* @alpha
|
|
42
42
|
*/
|
|
@@ -125,7 +125,7 @@ export namespace JsonAsTree {
|
|
|
125
125
|
/**
|
|
126
126
|
* Arbitrary JSON array as a {@link TreeNode}.
|
|
127
127
|
* @remarks
|
|
128
|
-
* This can be imported using {@link TreeAlpha.importConcise}.
|
|
128
|
+
* This can be imported using {@link (TreeAlpha:interface).importConcise}.
|
|
129
129
|
* @example
|
|
130
130
|
* ```typescript
|
|
131
131
|
* // Due to TypeScript restrictions on recursive types, the constructor can be somewhat limiting.
|
package/src/packageVersion.ts
CHANGED
|
@@ -21,14 +21,14 @@ const sf = new SchemaFactory("com.fluidframework.serializable");
|
|
|
21
21
|
* @remarks
|
|
22
22
|
* Schema which replicate the Fluid Serializable data model with {@link TreeNode}s.
|
|
23
23
|
*
|
|
24
|
-
* Fluid Serializable data can be imported from the {@link FluidSerializableAsTree.Data|Fluid Serializable format} into this format using {@link TreeAlpha.importConcise} with the {@link FluidSerializableAsTree.(Tree:variable)} schema.
|
|
24
|
+
* Fluid Serializable data can be imported from the {@link FluidSerializableAsTree.Data|Fluid Serializable format} into this format using {@link (TreeAlpha:interface).importConcise} with the {@link FluidSerializableAsTree.(Tree:variable)} schema.
|
|
25
25
|
* @internal
|
|
26
26
|
*/
|
|
27
27
|
export namespace FluidSerializableAsTree {
|
|
28
28
|
/**
|
|
29
29
|
* Data which can be serialized by Fluid.
|
|
30
30
|
* @remarks
|
|
31
|
-
* Can be encoded as a {@link FluidSerializableAsTree.(Tree:type)} using {@link TreeAlpha.importConcise}.
|
|
31
|
+
* Can be encoded as a {@link FluidSerializableAsTree.(Tree:type)} using {@link (TreeAlpha:interface).importConcise}.
|
|
32
32
|
* @internal
|
|
33
33
|
*/
|
|
34
34
|
export type Data = JsonCompatible<IFluidHandle>;
|
|
@@ -100,7 +100,7 @@ export namespace FluidSerializableAsTree {
|
|
|
100
100
|
/**
|
|
101
101
|
* Arbitrary Fluid Serializable array as a {@link TreeNode}.
|
|
102
102
|
* @remarks
|
|
103
|
-
* This can be imported using {@link TreeAlpha.importConcise}.
|
|
103
|
+
* This can be imported using {@link (TreeAlpha:interface).importConcise}.
|
|
104
104
|
* @example
|
|
105
105
|
* ```typescript
|
|
106
106
|
* // Due to TypeScript restrictions on recursive types, the constructor can be somewhat limiting.
|
|
@@ -23,9 +23,10 @@ import {
|
|
|
23
23
|
defaultSchemaPolicy,
|
|
24
24
|
TreeCompressionStrategy,
|
|
25
25
|
initializeForest,
|
|
26
|
+
SchemaCodecVersion,
|
|
26
27
|
} from "../feature-libraries/index.js";
|
|
27
28
|
// eslint-disable-next-line import/no-internal-modules
|
|
28
|
-
import type { Format } from "../feature-libraries/schema-index/
|
|
29
|
+
import type { Format } from "../feature-libraries/schema-index/formatV1.js";
|
|
29
30
|
import type {
|
|
30
31
|
TreeViewConfiguration,
|
|
31
32
|
ImplicitFieldSchema,
|
|
@@ -92,7 +93,7 @@ export function independentInitializedView<const TSchema extends ImplicitFieldSc
|
|
|
92
93
|
const revisionTagCodec = new RevisionTagCodec(idCompressor);
|
|
93
94
|
|
|
94
95
|
const fieldBatchCodec = makeFieldBatchCodec(options, 1);
|
|
95
|
-
const schemaCodec = makeSchemaCodec(options);
|
|
96
|
+
const schemaCodec = makeSchemaCodec(options, SchemaCodecVersion.v1);
|
|
96
97
|
|
|
97
98
|
const schema = new TreeStoredSchemaRepository(schemaCodec.decode(content.schema as Format));
|
|
98
99
|
const forest = buildConfiguredForest(
|
|
@@ -134,7 +135,7 @@ export function independentInitializedView<const TSchema extends ImplicitFieldSc
|
|
|
134
135
|
*/
|
|
135
136
|
export interface ViewContent {
|
|
136
137
|
/**
|
|
137
|
-
* Compressed tree from {@link TreeAlpha.exportCompressed}.
|
|
138
|
+
* Compressed tree from {@link (TreeAlpha:interface).exportCompressed}.
|
|
138
139
|
* @remarks
|
|
139
140
|
* This is an owning reference:
|
|
140
141
|
* consumers of this content might modify this data in place (for example when applying edits) to avoid copying.
|
package/src/shared-tree/index.ts
CHANGED
|
@@ -21,6 +21,8 @@ export {
|
|
|
21
21
|
ForestTypeExpensiveDebug,
|
|
22
22
|
ForestTypeReference,
|
|
23
23
|
exportSimpleSchema,
|
|
24
|
+
type SharedTreeKernelView,
|
|
25
|
+
persistedToSimpleSchema,
|
|
24
26
|
} from "./sharedTree.js";
|
|
25
27
|
|
|
26
28
|
export {
|
|
@@ -45,13 +47,10 @@ export type {
|
|
|
45
47
|
SharedTreeEditBuilder,
|
|
46
48
|
} from "./sharedTreeEditBuilder.js";
|
|
47
49
|
|
|
48
|
-
export {
|
|
49
|
-
|
|
50
|
-
type TreeApi,
|
|
51
|
-
type RunTransaction,
|
|
52
|
-
} from "./treeApi.js";
|
|
50
|
+
export { Tree } from "./tree.js";
|
|
51
|
+
export type { RunTransaction } from "./tree.js";
|
|
53
52
|
|
|
54
|
-
export { TreeAlpha } from "./
|
|
53
|
+
export { TreeAlpha } from "./treeAlpha.js";
|
|
55
54
|
|
|
56
55
|
export {
|
|
57
56
|
independentInitializedView,
|