@fluidframework/tree 2.32.0 → 2.33.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 +53 -0
- package/api-report/tree.alpha.api.md +169 -192
- package/api-report/tree.beta.api.md +135 -164
- package/api-report/tree.legacy.alpha.api.md +138 -167
- package/api-report/tree.legacy.public.api.md +135 -164
- package/api-report/tree.public.api.md +135 -164
- package/dist/alpha.d.ts +3 -11
- package/dist/beta.d.ts +2 -11
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/schema-stored/index.d.ts +1 -1
- package/dist/core/schema-stored/index.d.ts.map +1 -1
- package/dist/core/schema-stored/index.js +1 -2
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +4 -11
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +7 -14
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +31 -24
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/deltaUtil.d.ts +1 -4
- package/dist/core/tree/deltaUtil.d.ts.map +1 -1
- package/dist/core/tree/deltaUtil.js +1 -13
- package/dist/core/tree/deltaUtil.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +6 -29
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js +11 -50
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts +12 -9
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js +19 -32
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +6 -11
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts +41 -5
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js +43 -26
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts +5 -0
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +4 -0
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +8 -0
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js +8 -0
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.js +15 -22
- package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
- package/dist/feature-libraries/node-identifier/nodeIdentifierManager.d.ts.map +1 -1
- package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js +29 -25
- package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +1 -7
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +1 -1
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/internalTypes.d.ts +1 -1
- package/dist/internalTypes.d.ts.map +1 -1
- package/dist/internalTypes.js.map +1 -1
- package/dist/jsonDomainSchema.d.ts +6 -6
- package/dist/jsonDomainSchema.d.ts.map +1 -1
- package/dist/jsonDomainSchema.js.map +1 -1
- package/dist/legacy.d.ts +2 -11
- 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 -11
- package/dist/serializableDomainSchema.d.ts +5 -5
- package/dist/shared-tree/checkoutFlexTreeView.d.ts +1 -0
- package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
- package/dist/shared-tree/checkoutFlexTreeView.js +4 -0
- package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +3 -2
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +2 -2
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +4 -35
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +4 -54
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +2 -1
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +3 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +28 -28
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +11 -11
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +6 -7
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +24 -5
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js +14 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/testRecursiveDomain.d.ts +10 -10
- package/dist/simple-tree/api/tree.d.ts +1 -14
- 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/api/typesUnsafe.d.ts +237 -220
- 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 +2 -2
- package/dist/simple-tree/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/arrayNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +9 -2
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +39 -24
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/types.d.ts +14 -4
- package/dist/simple-tree/core/types.d.ts.map +1 -1
- package/dist/simple-tree/core/types.js +14 -4
- package/dist/simple-tree/core/types.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +2 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +3 -0
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/index.d.ts +1 -1
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +3 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts +9 -2
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +3 -0
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +10 -5
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js +5 -2
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/tableSchema.d.ts +78 -26
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +53 -24
- package/dist/tableSchema.js.map +1 -1
- package/dist/treeFactory.d.ts +6 -12
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +56 -5
- package/dist/treeFactory.js.map +1 -1
- package/lib/alpha.d.ts +3 -11
- package/lib/beta.d.ts +2 -11
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/schema-stored/index.d.ts +1 -1
- package/lib/core/schema-stored/index.d.ts.map +1 -1
- package/lib/core/schema-stored/index.js +1 -1
- package/lib/core/schema-stored/index.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +4 -11
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +6 -12
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +31 -24
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/deltaUtil.d.ts +1 -4
- package/lib/core/tree/deltaUtil.d.ts.map +1 -1
- package/lib/core/tree/deltaUtil.js +0 -9
- package/lib/core/tree/deltaUtil.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +6 -29
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js +12 -51
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts +12 -9
- package/lib/core/tree/visitorUtils.d.ts.map +1 -1
- package/lib/core/tree/visitorUtils.js +19 -32
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +6 -11
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts +41 -5
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js +43 -26
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts +5 -0
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +5 -1
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +8 -0
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js +8 -0
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.js +15 -22
- package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
- package/lib/feature-libraries/node-identifier/nodeIdentifierManager.d.ts.map +1 -1
- package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js +28 -24
- package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +1 -7
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +2 -2
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/internalTypes.d.ts +1 -1
- package/lib/internalTypes.d.ts.map +1 -1
- package/lib/internalTypes.js.map +1 -1
- package/lib/jsonDomainSchema.d.ts +6 -6
- package/lib/jsonDomainSchema.d.ts.map +1 -1
- package/lib/jsonDomainSchema.js.map +1 -1
- package/lib/legacy.d.ts +2 -11
- 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 -11
- package/lib/serializableDomainSchema.d.ts +5 -5
- package/lib/shared-tree/checkoutFlexTreeView.d.ts +1 -0
- package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
- package/lib/shared-tree/checkoutFlexTreeView.js +4 -0
- package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +3 -2
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +4 -35
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +2 -51
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +2 -1
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +1 -0
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +28 -28
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +11 -11
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +6 -7
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +24 -5
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js +12 -0
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/testRecursiveDomain.d.ts +10 -10
- package/lib/simple-tree/api/tree.d.ts +1 -14
- 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/api/typesUnsafe.d.ts +237 -220
- 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 +2 -2
- package/lib/simple-tree/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/arrayNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +9 -2
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +40 -25
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/types.d.ts +14 -4
- package/lib/simple-tree/core/types.d.ts.map +1 -1
- package/lib/simple-tree/core/types.js +14 -4
- package/lib/simple-tree/core/types.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +2 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +3 -0
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/index.d.ts +1 -1
- 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/objectNode.d.ts +9 -2
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +4 -1
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +10 -5
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js +5 -2
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/tableSchema.d.ts +78 -26
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +53 -24
- package/lib/tableSchema.js.map +1 -1
- package/lib/treeFactory.d.ts +6 -12
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +55 -3
- package/lib/treeFactory.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +22 -23
- package/src/core/index.ts +0 -2
- package/src/core/schema-stored/index.ts +0 -2
- package/src/core/schema-stored/schema.ts +10 -29
- package/src/core/tree/anchorSet.ts +32 -24
- package/src/core/tree/deltaUtil.ts +1 -13
- package/src/core/tree/visitDelta.ts +24 -81
- package/src/core/tree/visitorUtils.ts +43 -53
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +7 -22
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +45 -27
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +1 -1
- package/src/feature-libraries/flex-tree/context.ts +11 -1
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +8 -0
- package/src/feature-libraries/indexing/anchorTreeIndex.ts +17 -28
- package/src/feature-libraries/node-identifier/nodeIdentifierManager.ts +39 -38
- package/src/feature-libraries/object-forest/objectForest.ts +1 -18
- package/src/feature-libraries/schema-index/codec.ts +1 -2
- package/src/index.ts +3 -11
- package/src/internalTypes.ts +0 -19
- package/src/jsonDomainSchema.ts +1 -3
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/checkoutFlexTreeView.ts +6 -0
- package/src/shared-tree/index.ts +8 -3
- package/src/shared-tree/sharedTree.ts +5 -133
- package/src/simple-tree/api/index.ts +2 -22
- package/src/simple-tree/api/schemaFactory.ts +40 -54
- package/src/simple-tree/api/schemaFactoryAlpha.ts +9 -14
- package/src/simple-tree/api/schemaFactoryRecursive.ts +25 -5
- package/src/simple-tree/api/tree.ts +1 -14
- package/src/simple-tree/api/typesUnsafe.ts +359 -341
- package/src/simple-tree/arrayNode.ts +2 -2
- package/src/simple-tree/core/treeNodeKernel.ts +46 -28
- package/src/simple-tree/core/types.ts +14 -4
- package/src/simple-tree/core/unhydratedFlexTree.ts +5 -1
- package/src/simple-tree/index.ts +2 -22
- package/src/simple-tree/objectNode.ts +13 -4
- package/src/simple-tree/schemaTypes.ts +11 -7
- package/src/tableSchema.ts +190 -63
- package/src/treeFactory.ts +151 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA2D;AAC3D,mDAI8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA2D;AAC3D,mDAI8B;AAC9B,kDAQ6B;AAC7B,kDAA4C;AAE5C,2CAAqC;AAErC,SAAgB,UAAU,CAAC,IAAsB;IAChD,MAAM,UAAU,GACf,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,MAAM,eAAe,GAAG,IAAA,4BAAiB,EAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAChE,KAAK,MAAM,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QACvD,MAAM,MAAM,GAAG,IAAI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* Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\nimport {\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeVersionedValidatedCodec,\n} from \"../../codec/index.js\";\nimport {\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tschemaFormat,\n\tstoredSchemaDecodeDispatcher,\n} from \"../../core/index.js\";\nimport { brand } from \"../../util/index.js\";\n\nimport { Format } from \"./format.js\";\n\nexport function encodeRepo(repo: TreeStoredSchema): Format {\n\tconst nodeSchema: Record<string, schemaFormat.TreeNodeSchemaDataFormat> =\n\t\tObject.create(null);\n\tconst rootFieldSchema = encodeFieldSchema(repo.rootFieldSchema);\n\tfor (const name of [...repo.nodeSchema.keys()].sort()) {\n\t\tconst schema = repo.nodeSchema.get(name) ?? fail(0xb28 /* missing schema */);\n\t\tObject.defineProperty(nodeSchema, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tvalue: schema.encode(),\n\t\t});\n\t}\n\treturn {\n\t\tversion: schemaFormat.version,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\nfunction decode(f: Format): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tnodeSchema.set(brand(key), storedSchemaDecodeDispatcher.dispatch(schema));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n */\nexport function makeSchemaCodec(options: ICodecOptions): IJsonCodec<TreeStoredSchema, Format> {\n\treturn makeVersionedValidatedCodec(options, new Set([schemaFormat.version]), Format, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepo(data),\n\t\tdecode: (data: Format) => decode(data),\n\t});\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export type Listenable<T extends object> = EventListenable<T>;
|
|
|
30
30
|
export type Off = EventOff;
|
|
31
31
|
export { TreeStatus, TreeCompressionStrategy, type TreeIndex, type TreeIndexKey, type TreeIndexNodes, } from "./feature-libraries/index.js";
|
|
32
32
|
export { type ITreeInternal, type SharedTreeOptions, type ForestType, type SharedTreeFormatOptions, SharedTreeFormatVersion, Tree, type RunTransaction, type ForestOptions, getBranch, type BranchableTree, type TreeBranchFork, independentInitializedView, type ViewContent, TreeAlpha, independentView, ForestTypeOptimized, ForestTypeExpensiveDebug, ForestTypeReference, } from "./shared-tree/index.js";
|
|
33
|
-
export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, SchemaFactoryAlpha, type SchemaFactoryObjectOptions, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaAlpha, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, ObjectNodeSchema, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type InternalTreeNode, type WithType, type NodeChangedData, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type
|
|
33
|
+
export { TreeArrayNode, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, SchemaFactoryAlpha, type SchemaFactoryObjectOptions, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaAlpha, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, ObjectNodeSchema, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type InternalTreeNode, type WithType, type NodeChangedData, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type System_Unsafe, type FieldSchemaAlphaUnsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, type SimpleTreeIndex, type IdentifierIndex, createSimpleTreeIndex, createIdentifierIndex, adaptEnum, enumFromStrings, singletonSchema, type UnsafeUnknownSchema, type TreeViewAlpha, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, type ReadableField, type ReadSchema, test_RecursiveObject, test_RecursiveObject_base, test_RecursiveObjectPojoMode, TreeBeta, type TreeChangeEventsBeta, type VerboseTreeNode, type TreeEncodingOptions, type TreeSchemaEncodingOptions, type TreeSchema, TreeViewConfigurationAlpha, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, type JsonTreeSchema, type JsonSchemaId, type JsonNodeSchema, type JsonNodeSchemaBase, type JsonLeafNodeSchema, type JsonMapNodeSchema, type JsonArrayNodeSchema, type JsonObjectNodeSchema, type JsonFieldSchema, type JsonSchemaRef, type JsonRefPath, type JsonSchemaType, type JsonLeafSchemaType, getJsonSchema, type LazyItem, type Unenforced, type SimpleNodeSchemaBase, type SimpleTreeSchema, type SimpleNodeSchema, type SimpleFieldSchema, type SimpleLeafNodeSchema, type SimpleMapNodeSchema, type SimpleArrayNodeSchema, type SimpleObjectNodeSchema, type SimpleObjectFieldSchema, normalizeAllowedTypes, getSimpleSchema, type ReadonlyArrayNode, type InsertableTreeNodeFromAllowedTypes, type Input, type TreeBranch, type TreeBranchEvents, asTreeViewAlpha, type NodeSchemaOptions, type NodeSchemaMetadata, type SchemaStatics, type ITreeAlpha, type TransactionConstraint, type NodeInDocumentConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type LeafSchema, type ArrayNodeCustomizableSchema, type ArrayNodePojoEmulationSchema, ArrayNodeSchema, type MapNodeCustomizableSchema, type MapNodePojoEmulationSchema, MapNodeSchema, type ObjectFromSchemaRecord, } from "./simple-tree/index.js";
|
|
34
34
|
export { SharedTree, configuredSharedTree, } from "./treeFactory.js";
|
|
35
35
|
export { SharedTreeAttributes, SharedTreeFactoryType } from "./sharedTreeAttributes.js";
|
|
36
36
|
export { type ICodecOptions, type JsonValidator, type SchemaValidationFunction, FluidClientVersion, } from "./codec/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,KAAK,UAAU,EACf,UAAU,EACV,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACX,SAAS,IAAI,cAAc,EAC3B,UAAU,IAAI,eAAe,EAC7B,UAAU,IAAI,eAAe,EAC7B,GAAG,IAAI,QAAQ,EACf,MAAM,iCAAiC,CAAC;AAEzC;;;;GAI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AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -27,8 +27,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.
|
|
31
|
-
exports.TableSchema = exports.FluidSerializableAsTree = exports.JsonAsTree = exports.InternalTypes = exports.cloneWithReplacements = exports.typeboxValidator = exports.noopValidator = exports.FluidClientVersion = exports.SharedTreeFactoryType = void 0;
|
|
30
|
+
exports.configuredSharedTree = exports.SharedTree = exports.MapNodeSchema = exports.ArrayNodeSchema = exports.allowUnused = exports.replaceVerboseTreeHandles = exports.replaceHandles = exports.replaceConciseTreeHandles = exports.evaluateLazySchema = exports.generateSchemaFromSimpleSchema = exports.rollback = exports.asTreeViewAlpha = exports.getSimpleSchema = exports.normalizeAllowedTypes = exports.getJsonSchema = exports.comparePersistedSchema = exports.extractPersistedSchema = exports.TreeViewConfigurationAlpha = exports.TreeBeta = exports.test_RecursiveObjectPojoMode = exports.test_RecursiveObject_base = exports.test_RecursiveObject = exports.singletonSchema = exports.enumFromStrings = exports.adaptEnum = exports.createIdentifierIndex = exports.createSimpleTreeIndex = exports.ObjectNodeSchema = exports.NodeKind = exports.FieldSchema = exports.FieldKind = exports.SchemaFactoryAlpha = exports.SchemaFactory = exports.TreeViewConfiguration = exports.IterableTreeArrayContent = exports.TreeArrayNode = exports.ForestTypeReference = exports.ForestTypeExpensiveDebug = exports.ForestTypeOptimized = exports.independentView = exports.TreeAlpha = exports.independentInitializedView = exports.getBranch = exports.Tree = exports.SharedTreeFormatVersion = exports.TreeCompressionStrategy = exports.TreeStatus = exports.RevertibleStatus = exports.CommitKind = exports.ValueSchema = void 0;
|
|
31
|
+
exports.TableSchema = exports.FluidSerializableAsTree = exports.JsonAsTree = exports.InternalTypes = exports.cloneWithReplacements = exports.typeboxValidator = exports.noopValidator = exports.FluidClientVersion = exports.SharedTreeFactoryType = exports.SharedTreeAttributes = void 0;
|
|
32
32
|
var index_js_1 = require("./core/index.js");
|
|
33
33
|
Object.defineProperty(exports, "ValueSchema", { enumerable: true, get: function () { return index_js_1.ValueSchema; } });
|
|
34
34
|
Object.defineProperty(exports, "CommitKind", { enumerable: true, get: function () { return index_js_1.CommitKind; } });
|
|
@@ -81,6 +81,7 @@ Object.defineProperty(exports, "evaluateLazySchema", { enumerable: true, get: fu
|
|
|
81
81
|
Object.defineProperty(exports, "replaceConciseTreeHandles", { enumerable: true, get: function () { return index_js_4.replaceConciseTreeHandles; } });
|
|
82
82
|
Object.defineProperty(exports, "replaceHandles", { enumerable: true, get: function () { return index_js_4.replaceHandles; } });
|
|
83
83
|
Object.defineProperty(exports, "replaceVerboseTreeHandles", { enumerable: true, get: function () { return index_js_4.replaceVerboseTreeHandles; } });
|
|
84
|
+
Object.defineProperty(exports, "allowUnused", { enumerable: true, get: function () { return index_js_4.allowUnused; } });
|
|
84
85
|
Object.defineProperty(exports, "ArrayNodeSchema", { enumerable: true, get: function () { return index_js_4.ArrayNodeSchema; } });
|
|
85
86
|
Object.defineProperty(exports, "MapNodeSchema", { enumerable: true, get: function () { return index_js_4.MapNodeSchema; } });
|
|
86
87
|
var treeFactory_js_1 = require("./treeFactory.js");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CASyB;AARxB,uGAAA,WAAW,OAAA;AAEX,sGAAA,UAAU,OAAA;AACV,4GAAA,gBAAgB,OAAA;AAuCjB,yDAMsC;AALrC,sGAAA,UAAU,OAAA;AACV,mHAAA,uBAAuB,OAAA;AAMxB,mDAmBgC;AAd/B,mHAAA,uBAAuB,OAAA;AAC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;AAA/E,+HAAA,oBAAoB,OAAA;AAAE,gIAAA,qBAAqB,OAAA;AAEpD,6CAK0B;AADzB,8GAAA,kBAAkB,OAAA;AAEnB,6CAAiD;AAAxC,yGAAA,aAAa,OAAA;AACtB,0DAAiE;AAAxD,4GAAA,gBAAgB,OAAA;AAsBzB,4CAAwD;AAA/C,iHAAA,qBAAqB,OAAA;AAE9B,kEAAoD;AAMnD,sCAAa;AAQd,6DAAmD;AAA1C,iHAAA,UAAU,OAAA;AACnB,6EAAwE;AAA/D,sIAAA,uBAAuB,OAAA;AAChC,mDAA+C;AAAtC,6GAAA,WAAW,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tValueSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./core/index.js\";\n\nimport type {\n\tListeners as EventListeners,\n\tIsListener as EventIsListener,\n\tListenable as EventListenable,\n\tOff as EventOff,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listeners}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listeners<T extends object> = EventListeners<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#IsListener}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type IsListener<T> = EventIsListener<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listenable}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listenable<T extends object> = EventListenable<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Off}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Off = EventOff;\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ITreeInternal,\n\ttype SharedTreeOptions,\n\ttype ForestType,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tTree,\n\ttype RunTransaction,\n\ttype ForestOptions,\n\tgetBranch,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n\tindependentInitializedView,\n\ttype ViewContent,\n\tTreeAlpha,\n\tindependentView,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ViewableTree,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\n\tSchemaFactoryAlpha,\n\ttype SchemaFactoryObjectOptions,\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeChangeEvents,\n\ttype NodeFromSchema,\n\ttype TreeMapNode,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaAlpha,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\tObjectNodeSchema,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype NodeChangedData,\n\t// Types not really intended for public use, but used in links.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package \"@fluidframework/tree\" does not have an export \"TreeNodeApi\"\n\ttype TreeNodeApi,\n\ttype TreeNodeSchemaCore,\n\t// Types not really intended for public use, but used in inferred types exposed in the public API.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// error TS2742: The inferred type of 'Inventory' cannot be named without a reference to '../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\n\ttype AllowedTypes,\n\ttype ImplicitAllowedTypesUnsafe,\n\ttype ImplicitFieldSchemaUnsafe,\n\ttype TreeObjectNodeUnsafe,\n\ttype InsertableTreeNodeFromImplicitAllowedTypesUnsafe,\n\ttype TreeArrayNodeUnsafe,\n\ttype TreeMapNodeUnsafe,\n\ttype InsertableObjectFromSchemaRecordUnsafe,\n\ttype InsertableTreeFieldFromImplicitFieldUnsafe,\n\ttype FieldSchemaUnsafe,\n\ttype TreeNodeSchemaClassUnsafe,\n\ttype InsertableTreeNodeFromAllowedTypesUnsafe,\n\ttype FieldSchemaAlphaUnsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\t// System types (not in Internal types for various reasons, like doc links or cannot be named errors).\n\ttype typeSchemaSymbol,\n\ttype TreeNodeSchemaNonClass,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\t// Index APIs\n\ttype SimpleTreeIndex,\n\ttype IdentifierIndex,\n\tcreateSimpleTreeIndex,\n\tcreateIdentifierIndex,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\ttype ReadableField,\n\ttype ReadSchema,\n\t// test recursive schema for checking that d.ts files handles schema correctly\n\ttest_RecursiveObject,\n\ttest_RecursiveObject_base,\n\ttest_RecursiveObjectPojoMode,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\t// Other\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype TreeSchemaEncodingOptions,\n\ttype TreeSchema,\n\tTreeViewConfigurationAlpha,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\t// Back to normal types\n\ttype JsonTreeSchema,\n\ttype JsonSchemaId,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonLeafNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonObjectNodeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonSchemaType,\n\ttype JsonLeafSchemaType,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype SimpleNodeSchemaBase,\n\ttype SimpleTreeSchema,\n\ttype SimpleNodeSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleLeafNodeSchema,\n\ttype SimpleMapNodeSchema,\n\ttype SimpleArrayNodeSchema,\n\ttype SimpleObjectNodeSchema,\n\ttype SimpleObjectFieldSchema,\n\tnormalizeAllowedTypes,\n\tgetSimpleSchema,\n\ttype ReadonlyArrayNode,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype Input,\n\ttype TreeBranch,\n\ttype TreeBranchEvents,\n\tasTreeViewAlpha,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaMetadata,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\tevaluateLazySchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\ttype LeafSchema,\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tconfiguredSharedTree,\n} from \"./treeFactory.js\";\nexport { SharedTreeAttributes, SharedTreeFactoryType } from \"./sharedTreeAttributes.js\";\n\nexport {\n\ttype ICodecOptions,\n\ttype JsonValidator,\n\ttype SchemaValidationFunction,\n\tFluidClientVersion,\n} from \"./codec/index.js\";\nexport { noopValidator } from \"./codec/index.js\";\nexport { typeboxValidator } from \"./external-utilities/index.js\";\n\nexport type {\n\t// Type Testing\n\trequireTrue,\n\trequireFalse,\n\trequireAssignableTo,\n\tareSafelyAssignable,\n\tisAssignableTo,\n\tisAny,\n\teitherIsAny,\n\t// Other\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\tMakeNominal,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n\tJsonCompatible,\n\tJsonCompatibleObject,\n} from \"./util/index.js\";\nexport { cloneWithReplacements } from \"./util/index.js\";\n\nimport * as InternalTypes from \"./internalTypes.js\";\nexport {\n\t/**\n\t * Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.\n\t * They are used internally to implement API aspects, but are not intended for use by external consumers.\n\t */\n\tInternalTypes,\n};\n\n// Internal/System types:\n// These would be put in `internalTypes` except doing so tents to cause errors like:\n// The inferred type of 'NodeMap' cannot be named without a reference to '../../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\nexport type { MapNodeInsertableData } from \"./simple-tree/index.js\";\n\nexport { JsonAsTree } from \"./jsonDomainSchema.js\";\nexport { FluidSerializableAsTree } from \"./serializableDomainSchema.js\";\nexport { TableSchema } from \"./tableSchema.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CASyB;AARxB,uGAAA,WAAW,OAAA;AAEX,sGAAA,UAAU,OAAA;AACV,4GAAA,gBAAgB,OAAA;AAuCjB,yDAMsC;AALrC,sGAAA,UAAU,OAAA;AACV,mHAAA,uBAAuB,OAAA;AAMxB,mDAmBgC;AAd/B,mHAAA,uBAAuB,OAAA;AACvB,gGAAA,IAAI,OAAA;AAGJ,qGAAA,SAAS,OAAA;AAGT,sHAAA,0BAA0B,OAAA;AAE1B,qGAAA,SAAS,OAAA;AACT,2GAAA,eAAe,OAAA;AACf,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,+GAAA,mBAAmB,OAAA;AAGpB,mDA6JgC;AA5J/B,yGAAA,aAAa,OAAA;AAEb,oHAAA,wBAAwB,OAAA;AAKxB,iHAAA,qBAAqB,OAAA;AAKrB,yGAAA,aAAa,OAAA;AACb,8GAAA,kBAAkB,OAAA;AASlB,qGAAA,SAAS,OAAA;AACT,uGAAA,WAAW,OAAA;AAMX,oGAAA,QAAQ,OAAA;AAER,4GAAA,gBAAgB,OAAA;AA8BhB,iHAAA,qBAAqB,OAAA;AACrB,iHAAA,qBAAqB,OAAA;AACrB,4BAA4B;AAC5B,qGAAA,SAAS,OAAA;AACT,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AAUf,8EAA8E;AAC9E,gHAAA,oBAAoB,OAAA;AACpB,qHAAA,yBAAyB,OAAA;AACzB,wHAAA,4BAA4B,OAAA;AAC5B,YAAY;AACZ,oGAAA,QAAQ,OAAA;AAOR,sHAAA,0BAA0B,OAAA;AAE1B,kHAAA,sBAAsB,OAAA;AACtB,kHAAA,sBAAsB,OAAA;AAgBtB,yGAAA,aAAa,OAAA;AAYb,iHAAA,qBAAqB,OAAA;AACrB,2GAAA,eAAe,OAAA;AAMf,2GAAA,eAAe,OAAA;AAcf,oGAAA,QAAQ,OAAA;AACR,0HAAA,8BAA8B,OAAA;AAC9B,8GAAA,kBAAkB,OAAA;AAClB,qHAAA,yBAAyB,OAAA;AACzB,0GAAA,cAAc,OAAA;AACd,qHAAA,yBAAyB,OAAA;AAEzB,uGAAA,WAAW,OAAA;AAIX,2GAAA,eAAe,OAAA;AAGf,yGAAA,aAAa,OAAA;AAGd,mDAG0B;AAFzB,4GAAA,UAAU,OAAA;AACV,sHAAA,oBAAoB,OAAA;AAErB,qEAAwF;AAA/E,+HAAA,oBAAoB,OAAA;AAAE,gIAAA,qBAAqB,OAAA;AAEpD,6CAK0B;AADzB,8GAAA,kBAAkB,OAAA;AAEnB,6CAAiD;AAAxC,yGAAA,aAAa,OAAA;AACtB,0DAAiE;AAAxD,4GAAA,gBAAgB,OAAA;AAsBzB,4CAAwD;AAA/C,iHAAA,qBAAqB,OAAA;AAE9B,kEAAoD;AAMnD,sCAAa;AAQd,6DAAmD;AAA1C,iHAAA,UAAU,OAAA;AACnB,6EAAwE;AAA/D,sIAAA,uBAAuB,OAAA;AAChC,mDAA+C;AAAtC,6GAAA,WAAW,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tValueSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./core/index.js\";\n\nimport type {\n\tListeners as EventListeners,\n\tIsListener as EventIsListener,\n\tListenable as EventListenable,\n\tOff as EventOff,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listeners}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listeners<T extends object> = EventListeners<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#IsListener}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type IsListener<T> = EventIsListener<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listenable}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listenable<T extends object> = EventListenable<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Off}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Off = EventOff;\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ITreeInternal,\n\ttype SharedTreeOptions,\n\ttype ForestType,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tTree,\n\ttype RunTransaction,\n\ttype ForestOptions,\n\tgetBranch,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n\tindependentInitializedView,\n\ttype ViewContent,\n\tTreeAlpha,\n\tindependentView,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ViewableTree,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\n\tSchemaFactoryAlpha,\n\ttype SchemaFactoryObjectOptions,\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeChangeEvents,\n\ttype NodeFromSchema,\n\ttype TreeMapNode,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaAlpha,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\tObjectNodeSchema,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype NodeChangedData,\n\t// Types not really intended for public use, but used in links.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package \"@fluidframework/tree\" does not have an export \"TreeNodeApi\"\n\ttype TreeNodeApi,\n\ttype TreeNodeSchemaCore,\n\t// Types not really intended for public use, but used in inferred types exposed in the public API.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// error TS2742: The inferred type of 'Inventory' cannot be named without a reference to '../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\n\ttype AllowedTypes,\n\ttype System_Unsafe,\n\ttype FieldSchemaAlphaUnsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\t// System types (not in Internal types for various reasons, like doc links or cannot be named errors).\n\ttype typeSchemaSymbol,\n\ttype TreeNodeSchemaNonClass,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\t// Index APIs\n\ttype SimpleTreeIndex,\n\ttype IdentifierIndex,\n\tcreateSimpleTreeIndex,\n\tcreateIdentifierIndex,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\ttype ReadableField,\n\ttype ReadSchema,\n\t// test recursive schema for checking that d.ts files handles schema correctly\n\ttest_RecursiveObject,\n\ttest_RecursiveObject_base,\n\ttest_RecursiveObjectPojoMode,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\t// Other\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype TreeSchemaEncodingOptions,\n\ttype TreeSchema,\n\tTreeViewConfigurationAlpha,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\t// Back to normal types\n\ttype JsonTreeSchema,\n\ttype JsonSchemaId,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonLeafNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonObjectNodeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonSchemaType,\n\ttype JsonLeafSchemaType,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype SimpleNodeSchemaBase,\n\ttype SimpleTreeSchema,\n\ttype SimpleNodeSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleLeafNodeSchema,\n\ttype SimpleMapNodeSchema,\n\ttype SimpleArrayNodeSchema,\n\ttype SimpleObjectNodeSchema,\n\ttype SimpleObjectFieldSchema,\n\tnormalizeAllowedTypes,\n\tgetSimpleSchema,\n\ttype ReadonlyArrayNode,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype Input,\n\ttype TreeBranch,\n\ttype TreeBranchEvents,\n\tasTreeViewAlpha,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaMetadata,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\tevaluateLazySchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype LeafSchema,\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\ttype ObjectFromSchemaRecord,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tconfiguredSharedTree,\n} from \"./treeFactory.js\";\nexport { SharedTreeAttributes, SharedTreeFactoryType } from \"./sharedTreeAttributes.js\";\n\nexport {\n\ttype ICodecOptions,\n\ttype JsonValidator,\n\ttype SchemaValidationFunction,\n\tFluidClientVersion,\n} from \"./codec/index.js\";\nexport { noopValidator } from \"./codec/index.js\";\nexport { typeboxValidator } from \"./external-utilities/index.js\";\n\nexport type {\n\t// Type Testing\n\trequireTrue,\n\trequireFalse,\n\trequireAssignableTo,\n\tareSafelyAssignable,\n\tisAssignableTo,\n\tisAny,\n\teitherIsAny,\n\t// Other\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\tMakeNominal,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n\tJsonCompatible,\n\tJsonCompatibleObject,\n} from \"./util/index.js\";\nexport { cloneWithReplacements } from \"./util/index.js\";\n\nimport * as InternalTypes from \"./internalTypes.js\";\nexport {\n\t/**\n\t * Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.\n\t * They are used internally to implement API aspects, but are not intended for use by external consumers.\n\t */\n\tInternalTypes,\n};\n\n// Internal/System types:\n// These would be put in `internalTypes` except doing so tents to cause errors like:\n// The inferred type of 'NodeMap' cannot be named without a reference to '../../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\nexport type { MapNodeInsertableData } from \"./simple-tree/index.js\";\n\nexport { JsonAsTree } from \"./jsonDomainSchema.js\";\nexport { FluidSerializableAsTree } from \"./serializableDomainSchema.js\";\nexport { TableSchema } from \"./tableSchema.js\";\n"]}
|
package/dist/internalTypes.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
export type { _InlineTrick, FlattenKeys } from "./util/index.js";
|
|
6
|
-
export type { ApplyKind, ApplyKindInput, NodeBuilderData, FieldHasDefault, ScopedSchemaName, DefaultProvider, typeNameSymbol, InsertableObjectFromSchemaRecord,
|
|
6
|
+
export type { ApplyKind, ApplyKindInput, NodeBuilderData, FieldHasDefault, ScopedSchemaName, DefaultProvider, typeNameSymbol, InsertableObjectFromSchemaRecord, } from "./simple-tree/index.js";
|
|
7
7
|
export type { FlexList, FlexListToUnion, ExtractItemType } from "./simple-tree/index.js";
|
|
8
8
|
export type { TreeApi } from "./shared-tree/index.js";
|
|
9
9
|
//# sourceMappingURL=internalTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internalTypes.d.ts","sourceRoot":"","sources":["../src/internalTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACjE,YAAY,EACX,SAAS,EACT,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,gCAAgC,
|
|
1
|
+
{"version":3,"file":"internalTypes.d.ts","sourceRoot":"","sources":["../src/internalTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACjE,YAAY,EACX,SAAS,EACT,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,gCAAgC,GAChC,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzF,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internalTypes.js","sourceRoot":"","sources":["../src/internalTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Used by public types, but not part of the desired API surface.\n// Since these are used in the public API, changing them can still be a breaking change, but renaming or inlining them should not be.\n// Note that this should only contain types which are `@public` since this is reexported as a namespace and our rollup generator does not filter that.\n\nexport type { _InlineTrick, FlattenKeys } from \"./util/index.js\";\nexport type {\n\tApplyKind,\n\tApplyKindInput,\n\tNodeBuilderData,\n\tFieldHasDefault,\n\tScopedSchemaName,\n\tDefaultProvider,\n\ttypeNameSymbol,\n\tInsertableObjectFromSchemaRecord,\n
|
|
1
|
+
{"version":3,"file":"internalTypes.js","sourceRoot":"","sources":["../src/internalTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Used by public types, but not part of the desired API surface.\n// Since these are used in the public API, changing them can still be a breaking change, but renaming or inlining them should not be.\n// Note that this should only contain types which are `@public` since this is reexported as a namespace and our rollup generator does not filter that.\n\nexport type { _InlineTrick, FlattenKeys } from \"./util/index.js\";\nexport type {\n\tApplyKind,\n\tApplyKindInput,\n\tNodeBuilderData,\n\tFieldHasDefault,\n\tScopedSchemaName,\n\tDefaultProvider,\n\ttypeNameSymbol,\n\tInsertableObjectFromSchemaRecord,\n} from \"./simple-tree/index.js\";\nexport type { FlexList, FlexListToUnion, ExtractItemType } from \"./simple-tree/index.js\";\n\nexport type { TreeApi } from \"./shared-tree/index.js\";\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import type { FixRecursiveArraySchema, TreeNodeFromImplicitAllowedTypes,
|
|
5
|
+
import type { FixRecursiveArraySchema, TreeNodeFromImplicitAllowedTypes, System_Unsafe, TreeNodeSchemaClass, NodeKind, WithType, LeafSchema } from "./simple-tree/index.js";
|
|
6
6
|
/**
|
|
7
7
|
* Utilities for storing JSON data in {@link TreeNode}s.
|
|
8
8
|
* @remarks
|
|
@@ -50,10 +50,10 @@ export declare namespace JsonAsTree {
|
|
|
50
50
|
* Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.
|
|
51
51
|
* @system @alpha
|
|
52
52
|
*/
|
|
53
|
-
const _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass<"com.fluidframework.json.object", NodeKind.Map, TreeMapNodeUnsafe<readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array]> & WithType<"com.fluidframework.json.object", NodeKind.Map, unknown>, {
|
|
54
|
-
[Symbol.iterator](): Iterator<[string, string | number | JsonObject | Array | InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | null], any, undefined>;
|
|
53
|
+
const _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass<"com.fluidframework.json.object", NodeKind.Map, System_Unsafe.TreeMapNodeUnsafe<readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array]> & WithType<"com.fluidframework.json.object", NodeKind.Map, unknown>, {
|
|
54
|
+
[Symbol.iterator](): Iterator<[string, string | number | JsonObject | Array | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | null], any, undefined>;
|
|
55
55
|
} | {
|
|
56
|
-
readonly [x: string]: string | number | JsonObject | Array | InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | null;
|
|
56
|
+
readonly [x: string]: string | number | JsonObject | Array | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | null;
|
|
57
57
|
}, false, readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array], undefined>;
|
|
58
58
|
/**
|
|
59
59
|
* Arbitrary JSON object as a {@link TreeNode}.
|
|
@@ -86,8 +86,8 @@ export declare namespace JsonAsTree {
|
|
|
86
86
|
* Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.
|
|
87
87
|
* @system @alpha
|
|
88
88
|
*/
|
|
89
|
-
const _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass<"com.fluidframework.json.array", NodeKind.Array, TreeArrayNodeUnsafe<readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array]> & WithType<"com.fluidframework.json.array", NodeKind.Array, unknown>, {
|
|
90
|
-
[Symbol.iterator](): Iterator<string | number | JsonObject | Array | InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | null, any, undefined>;
|
|
89
|
+
const _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass<"com.fluidframework.json.array", NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array]> & WithType<"com.fluidframework.json.array", NodeKind.Array, unknown>, {
|
|
90
|
+
[Symbol.iterator](): Iterator<string | number | JsonObject | Array | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | null, any, undefined>;
|
|
91
91
|
}, false, readonly [LeafSchema<"null", null>, LeafSchema<"number", number>, LeafSchema<"string", string>, LeafSchema<"boolean", boolean>, () => typeof JsonObject, () => typeof Array], undefined>;
|
|
92
92
|
/**
|
|
93
93
|
* Arbitrary JSON array as a {@link TreeNode}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonDomainSchema.d.ts","sourceRoot":"","sources":["../src/jsonDomainSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAEX,uBAAuB,EACvB,gCAAgC,EAIhC,
|
|
1
|
+
{"version":3,"file":"jsonDomainSchema.d.ts","sourceRoot":"","sources":["../src/jsonDomainSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAEX,uBAAuB,EACvB,gCAAgC,EAIhC,aAAa,EAEb,mBAAmB,EACnB,QAAQ,EAER,QAAQ,EACR,UAAU,EAGV,MAAM,wBAAwB,CAAC;AAIhC;;;;;;;;;;;;;;GAcG;AACH,yBAAiB,UAAU,CAAC;IAC3B;;;OAGG;IACI,MAAM,SAAS,iIAKW,CAAC;IAElC;;OAEG;IACH,KAAY,SAAS,GAAG,gCAAgC,CAAC,OAAO,SAAS,CAAC,CAAC;IAE3E;;;;;;;;;;;;OAYG;IACI,MAAM,IAAI,8KAAyD,CAAC;IAE3E;;OAEG;IACH,KAAY,IAAI,GAAG,gCAAgC,CAAC,OAAO,IAAI,CAAC,CAAC;IAEjE;;;OAGG;IACI,MAAM,iCAAiC;;;;sMAAkC,CAAC;IAEjF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAa,UAAW,SAAQ,iCAAiC;KAAG;IAKpE;;;;;;OAMG;IACH,KAAoB,kCAAkC,GAAG,uBAAuB,CAC/E,OAAO,KAAK,CACZ,CAAC;IAEF;;;OAGG;IACI,MAAM,gCAAgC;;sMAAmC,CAAC;IAEjF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAa,KAAM,SAAQ,gCAAgC;KAAG;CAI9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonDomainSchema.js","sourceRoot":"","sources":["../src/jsonDomainSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qDAAuD;
|
|
1
|
+
{"version":3,"file":"jsonDomainSchema.js","sourceRoot":"","sources":["../src/jsonDomainSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qDAAuD;AAoBvD,MAAM,EAAE,GAAG,IAAI,wBAAa,CAAC,yBAAyB,CAAC,CAAC;AAExD;;;;;;;;;;;;;;GAcG;AACH,IAAiB,UAAU,CAuG1B;AAvGD,WAAiB,UAAU;IAC1B;;;OAGG;IACU,oBAAS,GAAG;QACxB,wBAAa,CAAC,IAAI;QAClB,wBAAa,CAAC,MAAM;QACpB,wBAAa,CAAC,MAAM;QACpB,wBAAa,CAAC,OAAO;KACW,CAAC;IAOlC;;;;;;;;;;;;OAYG;IACU,eAAI,GAAG,CAAC,GAAG,WAAA,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,KAAK,CAAU,CAAC;IAO3E;;;OAGG;IACU,4CAAiC,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,WAAA,IAAI,CAAC,CAAC;IAEjF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAa,UAAW,SAAQ,WAAA,iCAAiC;KAAG;IAAvD,qBAAU,aAA6C,CAAA;IACpE,CAAC;IAED,CAAC;IAaD;;;OAGG;IACU,2CAAgC,GAAG,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,WAAA,IAAI,CAAC,CAAC;IAEjF;;;;;;;;;;;;;;;;OAgBG;IACH,MAAa,KAAM,SAAQ,WAAA,gCAAgC;KAAG;IAAjD,gBAAK,QAA4C,CAAA;IAC9D,CAAC;IAED,CAAC;AACF,CAAC,EAvGgB,UAAU,0BAAV,UAAU,QAuG1B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SchemaFactory } from \"./simple-tree/index.js\";\n\nimport type {\n\tAllowedTypes,\n\tFixRecursiveArraySchema,\n\tTreeNodeFromImplicitAllowedTypes,\n\tValidateRecursiveSchema,\n\t// #region Unused imports to make d.ts cleaner\n\t/* eslint-disable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars */\n\tSystem_Unsafe,\n\tTreeNodeSchemaNonClass,\n\tTreeNodeSchemaClass,\n\tNodeKind,\n\tTreeNodeSchemaCore,\n\tWithType,\n\tLeafSchema,\n\t/* eslint-enable unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars */\n\t// #endregion\n} from \"./simple-tree/index.js\";\n\nconst sf = new SchemaFactory(\"com.fluidframework.json\");\n\n/**\n * Utilities for storing JSON data in {@link TreeNode}s.\n * @remarks\n * Schema which replicate the JSON data model with {@link TreeNode}s.\n *\n * This allows JSON to be losslessly round-tripped through a tree with the following limitations:\n *\n * 1. Only information that would be preserved by JSON.parse is preserved. This means (among other things) that numbers are limited to JavasScript's numeric precision.\n *\n * 2. The order of fields on an object is not preserved. The resulting order is arbitrary.\n *\n * JSON data can be imported from JSON into this format using `JSON.parse` then {@link TreeAlpha.importConcise} with the {@link JsonAsTree.(Tree:variable)} schema.\n *\n * @alpha\n */\nexport namespace JsonAsTree {\n\t/**\n\t * {@link AllowedTypes} for primitives types allowed in JSON.\n\t * @alpha\n\t */\n\texport const Primitive = [\n\t\tSchemaFactory.null,\n\t\tSchemaFactory.number,\n\t\tSchemaFactory.string,\n\t\tSchemaFactory.boolean,\n\t] as const satisfies AllowedTypes;\n\n\t/**\n\t * @alpha\n\t */\n\texport type Primitive = TreeNodeFromImplicitAllowedTypes<typeof Primitive>;\n\n\t/**\n\t * {@link AllowedTypes} for any content allowed in the {@link JsonAsTree} domain.\n\t * @example\n\t * ```typescript\n\t * const tree = TreeAlpha.importConcise(JsonAsTree.Union, { example: { nested: true }, value: 5 });\n\t * ```\n\t * @privateRemarks\n\t * The order here should not matter for any functionality related reasons.\n\t * In an attempt to improve readability of derived types (in errors, api-reports, IntelliSense etc.)\n\t * and possibly reduce incremental build related order dependence issues,\n\t * the simpler non-recursive types are listed first, followed by the recursive types.\n\t * @alpha\n\t */\n\texport const Tree = [...Primitive, () => JsonObject, () => Array] as const;\n\n\t/**\n\t * @alpha\n\t */\n\texport type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;\n\n\t/**\n\t * Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.\n\t * @system @alpha\n\t */\n\texport const _APIExtractorWorkaroundObjectBase = sf.mapRecursive(\"object\", Tree);\n\n\t/**\n\t * Arbitrary JSON object as a {@link TreeNode}.\n\t * @remarks\n\t * API of the tree node is more aligned with an es6 map than a JS object using its properties like a map.\n\t * @example\n\t * ```typescript\n\t * // Due to TypeScript restrictions on recursive types, the constructor and be somewhat limiting.\n\t * const fromArray = new JsonAsTreeObject([[\"a\", 0]]);\n\t * // Using `importConcise` can work better for JSON data:\n\t * const imported = TreeAlpha.importConcise(JsonAsTree.Object, { a: 0 });\n\t * // Node API is like a Map:\n\t * const value = imported.get(\"a\");\n\t * ```\n\t * @privateRemarks\n\t * Due to https://github.com/microsoft/TypeScript/issues/61270 this can't be named `Object`.\n\t * @sealed @alpha\n\t */\n\texport class JsonObject extends _APIExtractorWorkaroundObjectBase {}\n\t{\n\t\ttype _check = ValidateRecursiveSchema<typeof JsonObject>;\n\t}\n\n\t/**\n\t * D.ts bug workaround, see {@link FixRecursiveArraySchema}.\n\t * @privateRemarks\n\t * In the past this this had to reference the base type (_APIExtractorWorkaroundArrayBase).\n\t * Testing for this in examples/utils/import-testing now shows it has to reference JsonAsTree.Array instead.\n\t * @system @alpha\n\t */\n\texport declare type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<\n\t\ttypeof Array\n\t>;\n\n\t/**\n\t * Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.\n\t * @system @alpha\n\t */\n\texport const _APIExtractorWorkaroundArrayBase = sf.arrayRecursive(\"array\", Tree);\n\n\t/**\n\t * Arbitrary JSON array as a {@link TreeNode}.\n\t * @remarks\n\t * This can be imported using {@link TreeAlpha.importConcise}.\n\t * @example\n\t * ```typescript\n\t * // Due to TypeScript restrictions on recursive types, the constructor can be somewhat limiting.\n\t * const usingConstructor = new JsonAsTree.Array([\"a\", 0, new JsonAsTree.Array([1])]);\n\t * // Using `importConcise` can work better for JSON data:\n\t * const imported = TreeAlpha.importConcise(JsonAsTree.Array, [\"a\", 0, [1]]);\n\t * // Node API is like an Array:\n\t * const inner: JsonAsTree.Tree = imported[2];\n\t * assert(Tree.is(inner, JsonAsTree.Array));\n\t * const leaf = inner[0];\n\t * ```\n\t * @sealed @alpha\n\t */\n\texport class Array extends _APIExtractorWorkaroundArrayBase {}\n\t{\n\t\ttype _check = ValidateRecursiveSchema<typeof Array>;\n\t}\n}\n"]}
|
package/dist/legacy.d.ts
CHANGED
|
@@ -20,22 +20,15 @@ export {
|
|
|
20
20
|
FieldProps,
|
|
21
21
|
FieldSchema,
|
|
22
22
|
FieldSchemaMetadata,
|
|
23
|
-
FieldSchemaUnsafe,
|
|
24
23
|
ITree,
|
|
25
24
|
ITreeConfigurationOptions,
|
|
26
25
|
ITreeViewConfiguration,
|
|
27
26
|
ImplicitAllowedTypes,
|
|
28
|
-
ImplicitAllowedTypesUnsafe,
|
|
29
27
|
ImplicitFieldSchema,
|
|
30
|
-
ImplicitFieldSchemaUnsafe,
|
|
31
28
|
Input,
|
|
32
|
-
InsertableObjectFromSchemaRecordUnsafe,
|
|
33
29
|
InsertableTreeFieldFromImplicitField,
|
|
34
|
-
InsertableTreeFieldFromImplicitFieldUnsafe,
|
|
35
30
|
InsertableTreeNodeFromAllowedTypes,
|
|
36
|
-
InsertableTreeNodeFromAllowedTypesUnsafe,
|
|
37
31
|
InsertableTreeNodeFromImplicitAllowedTypes,
|
|
38
|
-
InsertableTreeNodeFromImplicitAllowedTypesUnsafe,
|
|
39
32
|
InsertableTypedNode,
|
|
40
33
|
InternalTreeNode,
|
|
41
34
|
IsListener,
|
|
@@ -51,6 +44,7 @@ export {
|
|
|
51
44
|
NodeKind,
|
|
52
45
|
NodeSchemaMetadata,
|
|
53
46
|
NodeSchemaOptions,
|
|
47
|
+
ObjectFromSchemaRecord,
|
|
54
48
|
Off,
|
|
55
49
|
ReadonlyArrayNode,
|
|
56
50
|
RestrictiveReadonlyRecord,
|
|
@@ -63,25 +57,22 @@ export {
|
|
|
63
57
|
SchemaFactory,
|
|
64
58
|
SchemaStatics,
|
|
65
59
|
SimpleNodeSchemaBase,
|
|
60
|
+
System_Unsafe,
|
|
66
61
|
TransactionConstraint,
|
|
67
62
|
Tree,
|
|
68
63
|
TreeArrayNode,
|
|
69
|
-
TreeArrayNodeUnsafe,
|
|
70
64
|
TreeChangeEvents,
|
|
71
65
|
TreeFieldFromImplicitField,
|
|
72
66
|
TreeLeafValue,
|
|
73
67
|
TreeMapNode,
|
|
74
|
-
TreeMapNodeUnsafe,
|
|
75
68
|
TreeNode,
|
|
76
69
|
TreeNodeApi,
|
|
77
70
|
TreeNodeFromImplicitAllowedTypes,
|
|
78
71
|
TreeNodeSchema,
|
|
79
72
|
TreeNodeSchemaClass,
|
|
80
|
-
TreeNodeSchemaClassUnsafe,
|
|
81
73
|
TreeNodeSchemaCore,
|
|
82
74
|
TreeNodeSchemaNonClass,
|
|
83
75
|
TreeObjectNode,
|
|
84
|
-
TreeObjectNodeUnsafe,
|
|
85
76
|
TreeStatus,
|
|
86
77
|
TreeView,
|
|
87
78
|
TreeViewConfiguration,
|
package/dist/packageVersion.d.ts
CHANGED
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/tree";
|
|
11
|
-
exports.pkgVersion = "2.
|
|
11
|
+
exports.pkgVersion = "2.33.0";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sBAAsB,CAAC;AACjC,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tree\";\nexport const pkgVersion = \"2.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sBAAsB,CAAC;AACjC,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tree\";\nexport const pkgVersion = \"2.33.0\";\n"]}
|
package/dist/public.d.ts
CHANGED
|
@@ -20,22 +20,15 @@ export {
|
|
|
20
20
|
FieldProps,
|
|
21
21
|
FieldSchema,
|
|
22
22
|
FieldSchemaMetadata,
|
|
23
|
-
FieldSchemaUnsafe,
|
|
24
23
|
ITree,
|
|
25
24
|
ITreeConfigurationOptions,
|
|
26
25
|
ITreeViewConfiguration,
|
|
27
26
|
ImplicitAllowedTypes,
|
|
28
|
-
ImplicitAllowedTypesUnsafe,
|
|
29
27
|
ImplicitFieldSchema,
|
|
30
|
-
ImplicitFieldSchemaUnsafe,
|
|
31
28
|
Input,
|
|
32
|
-
InsertableObjectFromSchemaRecordUnsafe,
|
|
33
29
|
InsertableTreeFieldFromImplicitField,
|
|
34
|
-
InsertableTreeFieldFromImplicitFieldUnsafe,
|
|
35
30
|
InsertableTreeNodeFromAllowedTypes,
|
|
36
|
-
InsertableTreeNodeFromAllowedTypesUnsafe,
|
|
37
31
|
InsertableTreeNodeFromImplicitAllowedTypes,
|
|
38
|
-
InsertableTreeNodeFromImplicitAllowedTypesUnsafe,
|
|
39
32
|
InsertableTypedNode,
|
|
40
33
|
InternalTreeNode,
|
|
41
34
|
IsListener,
|
|
@@ -51,6 +44,7 @@ export {
|
|
|
51
44
|
NodeKind,
|
|
52
45
|
NodeSchemaMetadata,
|
|
53
46
|
NodeSchemaOptions,
|
|
47
|
+
ObjectFromSchemaRecord,
|
|
54
48
|
Off,
|
|
55
49
|
ReadonlyArrayNode,
|
|
56
50
|
RestrictiveReadonlyRecord,
|
|
@@ -63,25 +57,22 @@ export {
|
|
|
63
57
|
SchemaFactory,
|
|
64
58
|
SchemaStatics,
|
|
65
59
|
SimpleNodeSchemaBase,
|
|
60
|
+
System_Unsafe,
|
|
66
61
|
TransactionConstraint,
|
|
67
62
|
Tree,
|
|
68
63
|
TreeArrayNode,
|
|
69
|
-
TreeArrayNodeUnsafe,
|
|
70
64
|
TreeChangeEvents,
|
|
71
65
|
TreeFieldFromImplicitField,
|
|
72
66
|
TreeLeafValue,
|
|
73
67
|
TreeMapNode,
|
|
74
|
-
TreeMapNodeUnsafe,
|
|
75
68
|
TreeNode,
|
|
76
69
|
TreeNodeApi,
|
|
77
70
|
TreeNodeFromImplicitAllowedTypes,
|
|
78
71
|
TreeNodeSchema,
|
|
79
72
|
TreeNodeSchemaClass,
|
|
80
|
-
TreeNodeSchemaClassUnsafe,
|
|
81
73
|
TreeNodeSchemaCore,
|
|
82
74
|
TreeNodeSchemaNonClass,
|
|
83
75
|
TreeObjectNode,
|
|
84
|
-
TreeObjectNodeUnsafe,
|
|
85
76
|
TreeStatus,
|
|
86
77
|
TreeView,
|
|
87
78
|
TreeViewConfiguration,
|
|
@@ -40,10 +40,10 @@ export declare namespace FluidSerializableAsTree {
|
|
|
40
40
|
* Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.
|
|
41
41
|
* @system @internal
|
|
42
42
|
*/
|
|
43
|
-
const _APIExtractorWorkaroundObjectBase: import("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Map, import("./simple-tree/index.js").TreeMapNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Map, unknown>, {
|
|
44
|
-
[Symbol.iterator](): Iterator<[string, string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null], any, undefined>;
|
|
43
|
+
const _APIExtractorWorkaroundObjectBase: import("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Map, import("./simple-tree/index.js").System_Unsafe.TreeMapNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Map, unknown>, {
|
|
44
|
+
[Symbol.iterator](): Iterator<[string, string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null], any, undefined>;
|
|
45
45
|
} | {
|
|
46
|
-
readonly [x: string]: string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null;
|
|
46
|
+
readonly [x: string]: string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null;
|
|
47
47
|
}, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>], undefined>;
|
|
48
48
|
/**
|
|
49
49
|
* Arbitrary Fluid Serializable object as a {@link TreeNode}.
|
|
@@ -76,8 +76,8 @@ export declare namespace FluidSerializableAsTree {
|
|
|
76
76
|
* Do not use. Exists only as a workaround for {@link https://github.com/microsoft/TypeScript/issues/59550} and {@link https://github.com/microsoft/rushstack/issues/4429}.
|
|
77
77
|
* @system @internal
|
|
78
78
|
*/
|
|
79
|
-
const _APIExtractorWorkaroundArrayBase: import("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, import("./simple-tree/index.js").TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, unknown>, {
|
|
80
|
-
[Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
|
|
79
|
+
const _APIExtractorWorkaroundArrayBase: import("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, import("./simple-tree/index.js").System_Unsafe.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, unknown>, {
|
|
80
|
+
[Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
|
|
81
81
|
}, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>], undefined>;
|
|
82
82
|
/**
|
|
83
83
|
* Arbitrary Fluid Serializable array as a {@link TreeNode}.
|
|
@@ -30,6 +30,7 @@ export declare class CheckoutFlexTreeView<out TCheckout extends ITreeCheckout =
|
|
|
30
30
|
* Get a typed view of the tree content using the flex-tree API.
|
|
31
31
|
*/
|
|
32
32
|
readonly flexTree: FlexTreeField;
|
|
33
|
+
private disposed;
|
|
33
34
|
constructor(
|
|
34
35
|
/**
|
|
35
36
|
* Access non-view schema specific aspects of this branch.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkoutFlexTreeView.d.ts","sourceRoot":"","sources":["../../src/shared-tree/checkoutFlexTreeView.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAE1B,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE1E;;GAEG;AACH,qBAAa,oBAAoB,CAAC,GAAG,CAAC,SAAS,SAAS,aAAa,GAAG,aAAa;
|
|
1
|
+
{"version":3,"file":"checkoutFlexTreeView.d.ts","sourceRoot":"","sources":["../../src/shared-tree/checkoutFlexTreeView.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAE1B,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE1E;;GAEG;AACH,qBAAa,oBAAoB,CAAC,GAAG,CAAC,SAAS,SAAS,aAAa,GAAG,aAAa;IAiBnF;;;;;OAKG;aACa,QAAQ,EAAE,SAAS;aACnB,MAAM,EAAE,gBAAgB;aACxB,cAAc,EAAE,qBAAqB;IACrD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;IAzB5B;;;;;OAKG;IACH,SAAgB,OAAO,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,SAAgB,QAAQ,EAAE,aAAa,CAAC;IAExC,OAAO,CAAC,QAAQ,CAAS;;IAGxB;;;;;OAKG;IACa,QAAQ,EAAE,SAAS,EACnB,MAAM,EAAE,gBAAgB,EACxB,cAAc,EAAE,qBAAqB,EACpC,SAAS,CAAC,SAAQ,IAAI,aAAA;IAOjC,CAAC,aAAa,CAAC,IAAI,IAAI;IAY9B;;;OAGG;IACI,IAAI,IAAI,oBAAoB,CAAC,aAAa,GAAG,iBAAiB,CAAC;CAKtE;AAQD;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,OAAO,EAAE,uBAAuB,GAC9B,oBAAoB,CAItB"}
|
|
@@ -25,11 +25,14 @@ class CheckoutFlexTreeView {
|
|
|
25
25
|
this.schema = schema;
|
|
26
26
|
this.nodeKeyManager = nodeKeyManager;
|
|
27
27
|
this.onDispose = onDispose;
|
|
28
|
+
this.disposed = false;
|
|
28
29
|
this.context = (0, index_js_1.getTreeContext)(schema, this.checkout, nodeKeyManager);
|
|
29
30
|
contextToTreeViewMap.set(this.context, this);
|
|
30
31
|
this.flexTree = this.context.root;
|
|
31
32
|
}
|
|
32
33
|
[index_js_3.disposeSymbol]() {
|
|
34
|
+
(0, internal_1.assert)(!this.disposed, 0xb80 /* Double disposed */);
|
|
35
|
+
this.disposed = true;
|
|
33
36
|
for (const anchorNode of this.checkout.forest.anchors) {
|
|
34
37
|
(0, index_js_2.tryDisposeTreeNode)(anchorNode);
|
|
35
38
|
}
|
|
@@ -41,6 +44,7 @@ class CheckoutFlexTreeView {
|
|
|
41
44
|
* Any mutations of the new view will not apply to this view until the new view is merged back into this view via `merge()`.
|
|
42
45
|
*/
|
|
43
46
|
fork() {
|
|
47
|
+
(0, internal_1.assert)(!this.disposed, 0xb81 /* disposed */);
|
|
44
48
|
const branch = this.checkout.branch();
|
|
45
49
|
return new CheckoutFlexTreeView(branch, this.schema, this.nodeKeyManager);
|
|
46
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkoutFlexTreeView.js","sourceRoot":"","sources":["../../src/shared-tree/checkoutFlexTreeView.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEA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IAAA,iBAAM,EAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACtC,OAAO,IAAI,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3E,CAAC;CACD;AAtDD,oDAsDC;AAED;;;GAGG;AACH,MAAM,oBAAoB,GAAG,IAAI,OAAO,EAAiD,CAAC;AAE1F;;;GAGG;AACH,SAAgB,uBAAuB,CACtC,OAAgC;IAEhC,MAAM,IAAI,GAAG,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/C,IAAA,iBAAM,EAAC,IAAI,KAAK,SAAS,EAAE,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACnF,OAAO,IAAI,CAAC;AACb,CAAC;AAND,0DAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\ttype Context,\n\ttype FlexTreeField,\n\ttype NodeIdentifierManager,\n\tgetTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FullSchemaPolicy,\n} from \"../feature-libraries/index.js\";\nimport { tryDisposeTreeNode } from \"../simple-tree/index.js\";\nimport { disposeSymbol } from \"../util/index.js\";\n\nimport type { ITreeCheckout, ITreeCheckoutFork } from \"./treeCheckout.js\";\n\n/**\n * An editable view of a (version control style) branch of a shared tree.\n */\nexport class CheckoutFlexTreeView<out TCheckout extends ITreeCheckout = ITreeCheckout> {\n\t/**\n\t * Context for controlling the FlexTree nodes produced from {@link FlexTreeView.flexTree}.\n\t *\n\t * @remarks\n\t * This is an owning reference: disposing of this view disposes its context.\n\t */\n\tpublic readonly context: Context;\n\n\t/**\n\t * Get a typed view of the tree content using the flex-tree API.\n\t */\n\tpublic readonly flexTree: FlexTreeField;\n\n\tprivate disposed = false;\n\n\tpublic constructor(\n\t\t/**\n\t\t * Access non-view schema specific aspects of this branch.\n\t\t *\n\t\t * @remarks\n\t\t * This is a non-owning reference: disposing of this view does not impact the branch.\n\t\t */\n\t\tpublic readonly checkout: TCheckout,\n\t\tpublic readonly schema: FullSchemaPolicy,\n\t\tpublic readonly nodeKeyManager: NodeIdentifierManager,\n\t\tprivate readonly onDispose?: () => void,\n\t) {\n\t\tthis.context = getTreeContext(schema, this.checkout, nodeKeyManager);\n\t\tcontextToTreeViewMap.set(this.context, this);\n\t\tthis.flexTree = this.context.root;\n\t}\n\n\tpublic [disposeSymbol](): void {\n\t\tassert(!this.disposed, 0xb80 /* Double disposed */);\n\t\tthis.disposed = true;\n\n\t\tfor (const anchorNode of this.checkout.forest.anchors) {\n\t\t\ttryDisposeTreeNode(anchorNode);\n\t\t}\n\n\t\tthis.context[disposeSymbol]();\n\t\tthis.onDispose?.();\n\t}\n\n\t/**\n\t * Spawn a new view which is based off of the current state of this view.\n\t * Any mutations of the new view will not apply to this view until the new view is merged back into this view via `merge()`.\n\t */\n\tpublic fork(): CheckoutFlexTreeView<ITreeCheckout & ITreeCheckoutFork> {\n\t\tassert(!this.disposed, 0xb81 /* disposed */);\n\t\tconst branch = this.checkout.branch();\n\t\treturn new CheckoutFlexTreeView(branch, this.schema, this.nodeKeyManager);\n\t}\n}\n\n/**\n * Maps the context of every {@link CheckoutFlexTreeView} to the view.\n * In practice, this allows the view or checkout to be obtained from a flex node by first getting the context from the flex node and then using this map.\n */\nconst contextToTreeViewMap = new WeakMap<FlexTreeHydratedContext, CheckoutFlexTreeView>();\n\n/**\n * Retrieve the {@link CheckoutFlexTreeView | view} for the given {@link FlexTreeHydratedContext | context}.\n * @remarks Every {@link CheckoutFlexTreeView} is associated with its context upon creation.\n */\nexport function getCheckoutFlexTreeView(\n\tcontext: FlexTreeHydratedContext,\n): CheckoutFlexTreeView {\n\tconst view = contextToTreeViewMap.get(context);\n\tassert(view !== undefined, 0xa41 /* Expected view to be registered for context */);\n\treturn view;\n}\n"]}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { type
|
|
5
|
+
export { type ITreePrivate, type SharedTreeOptionsInternal, type SharedTreeOptions, SharedTreeKernel, getBranch, type ForestType, type SharedTreeContentSnapshot, type SharedTreeFormatOptions, SharedTreeFormatVersion, buildConfiguredForest, defaultSharedTreeOptions, type ForestOptions, type ITreeInternal, ForestTypeOptimized, ForestTypeExpensiveDebug, ForestTypeReference, exportSimpleSchema, } from "./sharedTree.js";
|
|
6
6
|
export { createTreeCheckout, TreeCheckout, type ITreeCheckout, type CheckoutEvents, type ITreeCheckoutFork, type BranchableTree, type TreeBranchFork, } from "./treeCheckout.js";
|
|
7
7
|
export { type TreeStoredContent } from "./schematizeTree.js";
|
|
8
8
|
export { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
|
|
9
9
|
export { CheckoutFlexTreeView } from "./checkoutFlexTreeView.js";
|
|
10
|
-
export type { ISharedTreeEditor, ISchemaEditor } from "./sharedTreeEditBuilder.js";
|
|
10
|
+
export type { ISharedTreeEditor, ISchemaEditor, SharedTreeEditBuilder, } from "./sharedTreeEditBuilder.js";
|
|
11
11
|
export { treeApi as Tree, type TreeApi, type RunTransaction, } from "./treeApi.js";
|
|
12
12
|
export { TreeAlpha } from "./treeApiAlpha.js";
|
|
13
13
|
export { independentInitializedView, type ViewContent, independentView, } from "./independentView.js";
|
|
14
|
+
export type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,SAAS,EACT,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,GAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,kBAAkB,EAClB,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,cAAc,GACnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,YAAY,EACX,iBAAiB,EACjB,aAAa,EACb,qBAAqB,GACrB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACN,OAAO,IAAI,IAAI,EACf,KAAK,OAAO,EACZ,KAAK,cAAc,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EACN,0BAA0B,EAC1B,KAAK,WAAW,EAChB,eAAe,GACf,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.independentView = exports.independentInitializedView = exports.TreeAlpha = exports.Tree = exports.CheckoutFlexTreeView = exports.SchematizingSimpleTreeView = exports.TreeCheckout = exports.createTreeCheckout = exports.exportSimpleSchema = exports.ForestTypeReference = exports.ForestTypeExpensiveDebug = exports.ForestTypeOptimized = exports.defaultSharedTreeOptions = exports.buildConfiguredForest = exports.SharedTreeFormatVersion = exports.getBranch = exports.
|
|
7
|
+
exports.independentView = exports.independentInitializedView = exports.TreeAlpha = exports.Tree = exports.CheckoutFlexTreeView = exports.SchematizingSimpleTreeView = exports.TreeCheckout = exports.createTreeCheckout = exports.exportSimpleSchema = exports.ForestTypeReference = exports.ForestTypeExpensiveDebug = exports.ForestTypeOptimized = exports.defaultSharedTreeOptions = exports.buildConfiguredForest = exports.SharedTreeFormatVersion = exports.getBranch = exports.SharedTreeKernel = void 0;
|
|
8
8
|
var sharedTree_js_1 = require("./sharedTree.js");
|
|
9
|
-
Object.defineProperty(exports, "
|
|
9
|
+
Object.defineProperty(exports, "SharedTreeKernel", { enumerable: true, get: function () { return sharedTree_js_1.SharedTreeKernel; } });
|
|
10
10
|
Object.defineProperty(exports, "getBranch", { enumerable: true, get: function () { return sharedTree_js_1.getBranch; } });
|
|
11
11
|
Object.defineProperty(exports, "SharedTreeFormatVersion", { enumerable: true, get: function () { return sharedTree_js_1.SharedTreeFormatVersion; } });
|
|
12
12
|
Object.defineProperty(exports, "buildConfiguredForest", { enumerable: true, get: function () { return sharedTree_js_1.buildConfiguredForest; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAkByB;AAdxB,iHAAA,gBAAgB,OAAA;AAChB,0GAAA,SAAS,OAAA;AAIT,wHAAA,uBAAuB,OAAA;AACvB,sHAAA,qBAAqB,OAAA;AACrB,yHAAA,wBAAwB,OAAA;AAGxB,oHAAA,mBAAmB,OAAA;AACnB,yHAAA,wBAAwB,OAAA;AACxB,oHAAA,mBAAmB,OAAA;AACnB,mHAAA,kBAAkB,OAAA;AAGnB,qDAQ2B;AAP1B,qHAAA,kBAAkB,OAAA;AAClB,+GAAA,YAAY,OAAA;AAUb,qEAAuE;AAA9D,qIAAA,0BAA0B,OAAA;AAEnC,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAQ7B,2CAIsB;AAHrB,kGAAA,OAAO,OAAQ;AAKhB,qDAA8C;AAArC,4GAAA,SAAS,OAAA;AAElB,2DAI8B;AAH7B,gIAAA,0BAA0B,OAAA;AAE1B,qHAAA,eAAe,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype ITreePrivate,\n\ttype SharedTreeOptionsInternal,\n\ttype SharedTreeOptions,\n\tSharedTreeKernel,\n\tgetBranch,\n\ttype ForestType,\n\ttype SharedTreeContentSnapshot,\n\ttype SharedTreeFormatOptions,\n\tSharedTreeFormatVersion,\n\tbuildConfiguredForest,\n\tdefaultSharedTreeOptions,\n\ttype ForestOptions,\n\ttype ITreeInternal,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n\texportSimpleSchema,\n} from \"./sharedTree.js\";\n\nexport {\n\tcreateTreeCheckout,\n\tTreeCheckout,\n\ttype ITreeCheckout,\n\ttype CheckoutEvents,\n\ttype ITreeCheckoutFork,\n\ttype BranchableTree,\n\ttype TreeBranchFork,\n} from \"./treeCheckout.js\";\n\nexport { type TreeStoredContent } from \"./schematizeTree.js\";\n\nexport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\n\nexport { CheckoutFlexTreeView } from \"./checkoutFlexTreeView.js\";\n\nexport type {\n\tISharedTreeEditor,\n\tISchemaEditor,\n\tSharedTreeEditBuilder,\n} from \"./sharedTreeEditBuilder.js\";\n\nexport {\n\ttreeApi as Tree,\n\ttype TreeApi,\n\ttype RunTransaction,\n} from \"./treeApi.js\";\n\nexport { TreeAlpha } from \"./treeApiAlpha.js\";\n\nexport {\n\tindependentInitializedView,\n\ttype ViewContent,\n\tindependentView,\n} from \"./independentView.js\";\n\nexport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\n"]}
|