@fluidframework/tree 2.1.0 → 2.2.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/.mocharc.customBenchmarks.cjs +33 -0
- package/CHANGELOG.md +297 -0
- package/README.md +34 -4
- package/api-extractor.json +17 -0
- package/api-report/tree.alpha.api.md +119 -25
- package/api-report/tree.beta.api.md +51 -25
- package/api-report/tree.public.api.md +51 -25
- package/dist/beta.d.ts +3 -1
- package/dist/codec/discriminatedUnions.d.ts +11 -5
- package/dist/codec/discriminatedUnions.d.ts.map +1 -1
- package/dist/codec/discriminatedUnions.js.map +1 -1
- package/dist/codec/index.d.ts +1 -1
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js.map +1 -1
- package/dist/core/forest/editableForest.d.ts +1 -5
- package/dist/core/forest/editableForest.d.ts.map +1 -1
- package/dist/core/forest/editableForest.js.map +1 -1
- package/dist/core/forest/forest.d.ts +0 -6
- package/dist/core/forest/forest.d.ts.map +1 -1
- package/dist/core/forest/forest.js +0 -2
- package/dist/core/forest/forest.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +3 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.d.ts +0 -4
- package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
- package/dist/core/rebase/changeRebaser.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js +1 -3
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +1 -8
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +1 -9
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/rebase/utils.d.ts +0 -1
- package/dist/core/rebase/utils.d.ts.map +1 -1
- package/dist/core/rebase/utils.js +12 -7
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/schema-stored/multiplicity.d.ts +0 -1
- package/dist/core/schema-stored/multiplicity.d.ts.map +1 -1
- package/dist/core/schema-stored/multiplicity.js +0 -1
- package/dist/core/schema-stored/multiplicity.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +0 -7
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +0 -4
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts +0 -3
- package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/dist/core/schema-view/view.d.ts +0 -3
- package/dist/core/schema-view/view.d.ts.map +1 -1
- package/dist/core/schema-view/view.js +0 -1
- package/dist/core/schema-view/view.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts +0 -10
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +1 -4
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/cursor.d.ts +1 -6
- package/dist/core/tree/cursor.d.ts.map +1 -1
- package/dist/core/tree/cursor.js +0 -2
- package/dist/core/tree/cursor.js.map +1 -1
- package/dist/core/tree/delta.d.ts +0 -11
- package/dist/core/tree/delta.d.ts.map +1 -1
- package/dist/core/tree/delta.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.js +3 -2
- package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexTypes.d.ts +0 -1
- package/dist/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
- package/dist/core/tree/index.d.ts +1 -1
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +3 -1
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/mapTree.d.ts +20 -4
- package/dist/core/tree/mapTree.d.ts.map +1 -1
- package/dist/core/tree/mapTree.js +29 -0
- package/dist/core/tree/mapTree.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts +0 -11
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/core/tree/treeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/treeTextFormat.js +3 -2
- package/dist/core/tree/treeTextFormat.js.map +1 -1
- package/dist/core/tree/types.d.ts +0 -11
- package/dist/core/tree/types.d.ts.map +1 -1
- package/dist/core/tree/types.js +0 -4
- package/dist/core/tree/types.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +0 -1
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js +2 -2
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitPath.d.ts +0 -2
- package/dist/core/tree/visitPath.d.ts.map +1 -1
- package/dist/core/tree/visitPath.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts +0 -1
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/domains/index.d.ts +1 -1
- package/dist/domains/index.d.ts.map +1 -1
- package/dist/domains/index.js +2 -1
- package/dist/domains/index.js.map +1 -1
- package/dist/domains/json/index.d.ts +1 -1
- package/dist/domains/json/index.d.ts.map +1 -1
- package/dist/domains/json/index.js +2 -1
- package/dist/domains/json/index.js.map +1 -1
- package/dist/domains/json/jsonCursor.d.ts +36 -2
- package/dist/domains/json/jsonCursor.d.ts.map +1 -1
- package/dist/domains/json/jsonCursor.js +76 -5
- package/dist/domains/json/jsonCursor.js.map +1 -1
- package/dist/domains/json/jsonDomainSchema.d.ts +13 -3
- package/dist/domains/json/jsonDomainSchema.d.ts.map +1 -1
- package/dist/domains/json/jsonDomainSchema.js +12 -4
- package/dist/domains/json/jsonDomainSchema.js.map +1 -1
- package/dist/domains/leafDomain.d.ts +0 -1
- package/dist/domains/leafDomain.d.ts.map +1 -1
- package/dist/domains/leafDomain.js +0 -1
- package/dist/domains/leafDomain.js.map +1 -1
- package/dist/domains/schemaBuilder.d.ts +1 -7
- package/dist/domains/schemaBuilder.d.ts.map +1 -1
- package/dist/domains/schemaBuilder.js +0 -10
- package/dist/domains/schemaBuilder.js.map +1 -1
- package/dist/events/events.d.ts +0 -4
- package/dist/events/events.d.ts.map +1 -1
- package/dist/events/events.js +0 -1
- package/dist/events/events.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +8 -3
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunk.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +3 -3
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +7 -5
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +8 -5
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +5 -3
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +12 -24
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +9 -19
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +0 -6
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +11 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultSchema.d.ts +0 -1
- package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultSchema.js +0 -1
- package/dist/feature-libraries/default-schema/defaultSchema.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -1
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/schemaChecker.d.ts +6 -0
- package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/schemaChecker.js +6 -0
- package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
- package/dist/feature-libraries/editableTreeBinder.d.ts +0 -67
- package/dist/feature-libraries/editableTreeBinder.d.ts.map +1 -1
- package/dist/feature-libraries/editableTreeBinder.js +5 -24
- package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
- package/dist/feature-libraries/fieldGenerator.d.ts +0 -3
- package/dist/feature-libraries/fieldGenerator.d.ts.map +1 -1
- package/dist/feature-libraries/fieldGenerator.js +0 -1
- package/dist/feature-libraries/fieldGenerator.js.map +1 -1
- package/dist/feature-libraries/flex-map-tree/index.d.ts +1 -1
- package/dist/feature-libraries/flex-map-tree/index.d.ts.map +1 -1
- package/dist/feature-libraries/flex-map-tree/index.js +2 -2
- package/dist/feature-libraries/flex-map-tree/index.js.map +1 -1
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts +57 -49
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.js +171 -168
- package/dist/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts +0 -1
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +17 -282
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js +0 -4
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/index.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +9 -26
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +26 -99
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts +2 -10
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +3 -42
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/treeEvents.d.ts +0 -2
- package/dist/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/treeEvents.js.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.d.ts +2 -1
- package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.js +4 -0
- package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +2 -2
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +6 -8
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +7 -18
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts +6 -2
- package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.js +9 -1
- package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
- package/dist/feature-libraries/memoizedIdRangeAllocator.d.ts +0 -4
- package/dist/feature-libraries/memoizedIdRangeAllocator.d.ts.map +1 -1
- package/dist/feature-libraries/memoizedIdRangeAllocator.js +0 -1
- package/dist/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +0 -2
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js +0 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/discrepancies.d.ts +18 -0
- package/dist/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/discrepancies.js +105 -2
- package/dist/feature-libraries/modular-schema/discrepancies.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +0 -8
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js +0 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts +1 -3
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.js +1 -2
- package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -2
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +57 -85
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +5 -8
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +3 -14
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js +6 -0
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +2 -2
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +2 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +39 -22
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -8
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +192 -228
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -14
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/node-key/nodeKey.d.ts +0 -4
- package/dist/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
- package/dist/feature-libraries/node-key/nodeKey.js +0 -2
- package/dist/feature-libraries/node-key/nodeKey.js.map +1 -1
- package/dist/feature-libraries/node-key/nodeKeyManager.d.ts +0 -1
- package/dist/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
- package/dist/feature-libraries/node-key/nodeKeyManager.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 -10
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +6 -6
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +7 -7
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
- package/dist/feature-libraries/schemaBuilderBase.d.ts +2 -28
- package/dist/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
- package/dist/feature-libraries/schemaBuilderBase.js +1 -27
- package/dist/feature-libraries/schemaBuilderBase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +24 -21
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV2.js +7 -6
- package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/formatV3.d.ts +195 -0
- package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -0
- package/dist/feature-libraries/sequence-field/formatV3.js +23 -0
- package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -0
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts +11 -0
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
- package/dist/feature-libraries/sequence-field/index.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/index.js.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +21 -13
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.js +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.js +24 -6
- package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.js +16 -3
- package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +38 -4
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +54 -9
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +11 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +85 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js +2 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +4 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts +23 -4
- package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/types.js.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.d.ts +5 -4
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +70 -42
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/feature-libraries/storedToViewSchema.d.ts +0 -1
- package/dist/feature-libraries/storedToViewSchema.d.ts.map +1 -1
- package/dist/feature-libraries/storedToViewSchema.js +0 -1
- package/dist/feature-libraries/storedToViewSchema.js.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.d.ts +0 -6
- package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.js +8 -6
- package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
- package/dist/feature-libraries/treeTextCursor.d.ts +0 -2
- package/dist/feature-libraries/treeTextCursor.d.ts.map +1 -1
- package/dist/feature-libraries/treeTextCursor.js +0 -2
- package/dist/feature-libraries/treeTextCursor.js.map +1 -1
- package/dist/feature-libraries/typed-schema/flexList.d.ts +0 -3
- package/dist/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/flexList.js.map +1 -1
- package/dist/feature-libraries/typed-schema/index.d.ts +1 -1
- package/dist/feature-libraries/typed-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/index.js +1 -3
- package/dist/feature-libraries/typed-schema/index.js.map +1 -1
- package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/schemaCollection.js +0 -4
- package/dist/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +2 -41
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js +1 -40
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/dist/feature-libraries/typed-schema/view.d.ts +0 -1
- package/dist/feature-libraries/typed-schema/view.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/view.js.map +1 -1
- package/dist/index.d.ts +8 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -90
- 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/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +3 -1
- package/dist/shared-tree/schematizeTree.d.ts +2 -11
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +13 -2
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +4 -4
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +2 -2
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +4 -17
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +4 -8
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +4 -0
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts +0 -2
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/dist/shared-tree/treeApi.js +2 -2
- package/dist/shared-tree/treeApi.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +0 -5
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +5 -3
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree/treeView.d.ts +3 -6
- package/dist/shared-tree/treeView.d.ts.map +1 -1
- package/dist/shared-tree/treeView.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +11 -6
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.js +3 -3
- package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +1 -0
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormat.d.ts +2 -2
- package/dist/shared-tree-core/editManagerFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormat.js +6 -1
- package/dist/shared-tree-core/editManagerFormat.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +1 -0
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +3 -1
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts +54 -0
- package/dist/simple-tree/api/create.d.ts.map +1 -0
- package/dist/simple-tree/api/create.js +99 -0
- package/dist/simple-tree/api/create.js.map +1 -0
- package/dist/simple-tree/api/index.d.ts +12 -0
- package/dist/simple-tree/api/index.d.ts.map +1 -0
- package/dist/simple-tree/api/index.js +28 -0
- package/dist/simple-tree/api/index.js.map +1 -0
- package/{lib/simple-tree → dist/simple-tree/api}/schemaCreationUtilities.d.ts +7 -4
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -0
- package/dist/simple-tree/{schemaCreationUtilities.js → api/schemaCreationUtilities.js} +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -0
- package/dist/simple-tree/{schemaFactory.d.ts → api/schemaFactory.d.ts} +15 -14
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -0
- package/dist/simple-tree/{schemaFactory.js → api/schemaFactory.js} +10 -9
- package/dist/simple-tree/api/schemaFactory.js.map +1 -0
- package/{lib/simple-tree → dist/simple-tree/api}/schemaFactoryRecursive.d.ts +40 -7
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -0
- package/dist/simple-tree/{schemaFactoryRecursive.js → api/schemaFactoryRecursive.js} +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -0
- package/dist/simple-tree/api/testRecursiveDomain.d.ts +62 -0
- package/dist/simple-tree/api/testRecursiveDomain.d.ts.map +1 -0
- package/dist/simple-tree/api/testRecursiveDomain.js.map +1 -0
- package/{lib/simple-tree → dist/simple-tree/api}/tree.d.ts +111 -20
- package/dist/simple-tree/api/tree.d.ts.map +1 -0
- package/dist/simple-tree/api/tree.js +173 -0
- package/dist/simple-tree/api/tree.js.map +1 -0
- package/dist/simple-tree/{treeNodeApi.d.ts → api/treeNodeApi.d.ts} +6 -5
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -0
- package/dist/simple-tree/{treeNodeApi.js → api/treeNodeApi.js} +28 -20
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -0
- package/dist/simple-tree/api/verboseTree.d.ts +136 -0
- package/dist/simple-tree/api/verboseTree.d.ts.map +1 -0
- package/dist/simple-tree/api/verboseTree.js +220 -0
- package/dist/simple-tree/api/verboseTree.js.map +1 -0
- package/dist/simple-tree/arrayNode.d.ts +3 -3
- package/dist/simple-tree/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/arrayNode.js +70 -69
- package/dist/simple-tree/arrayNode.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +10 -0
- package/dist/simple-tree/core/index.d.ts.map +1 -0
- package/dist/simple-tree/core/index.js +27 -0
- package/dist/simple-tree/core/index.js.map +1 -0
- package/{lib/simple-tree → dist/simple-tree/core}/schemaCaching.d.ts +2 -9
- package/dist/simple-tree/core/schemaCaching.d.ts.map +1 -0
- package/dist/simple-tree/{schemaCaching.js → core/schemaCaching.js} +2 -23
- package/dist/simple-tree/core/schemaCaching.js.map +1 -0
- package/dist/simple-tree/core/treeNodeKernel.d.ts +57 -0
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -0
- package/dist/simple-tree/{treeNodeKernel.js → core/treeNodeKernel.js} +49 -4
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -0
- package/dist/simple-tree/core/treeNodeSchema.d.ts +149 -0
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -0
- package/dist/simple-tree/core/treeNodeSchema.js +35 -0
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -0
- package/dist/simple-tree/{types.d.ts → core/types.d.ts} +23 -70
- package/dist/simple-tree/core/types.d.ts.map +1 -0
- package/dist/simple-tree/core/types.js +117 -0
- package/dist/simple-tree/core/types.js.map +1 -0
- package/dist/simple-tree/core/withType.d.ts +82 -0
- package/dist/simple-tree/core/withType.d.ts.map +1 -0
- package/dist/simple-tree/core/withType.js +39 -0
- package/dist/simple-tree/core/withType.js.map +1 -0
- package/dist/simple-tree/getJsonSchema.d.ts +55 -0
- package/dist/simple-tree/getJsonSchema.d.ts.map +1 -0
- package/dist/simple-tree/getJsonSchema.js +69 -0
- package/dist/simple-tree/getJsonSchema.js.map +1 -0
- package/dist/simple-tree/getSimpleFieldSchema.d.ts +14 -0
- package/dist/simple-tree/getSimpleFieldSchema.d.ts.map +1 -0
- package/dist/simple-tree/getSimpleFieldSchema.js +29 -0
- package/dist/simple-tree/getSimpleFieldSchema.js.map +1 -0
- package/dist/simple-tree/getSimpleSchema.d.ts +58 -0
- package/dist/simple-tree/getSimpleSchema.d.ts.map +1 -0
- package/dist/simple-tree/getSimpleSchema.js +68 -0
- package/dist/simple-tree/getSimpleSchema.js.map +1 -0
- package/dist/simple-tree/index.d.ts +12 -13
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +26 -23
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/jsonSchema.d.ts +206 -0
- package/dist/simple-tree/jsonSchema.d.ts.map +1 -0
- package/dist/{feature-libraries/schema-aware/index.js → simple-tree/jsonSchema.js} +1 -1
- package/dist/simple-tree/jsonSchema.js.map +1 -0
- package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +3 -4
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/mapNode.d.ts +9 -3
- package/dist/simple-tree/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/mapNode.js +33 -35
- package/dist/simple-tree/mapNode.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts +18 -16
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +43 -44
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/objectNodeTypes.d.ts +38 -0
- package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -0
- package/dist/simple-tree/objectNodeTypes.js +19 -0
- package/dist/simple-tree/objectNodeTypes.js.map +1 -0
- package/dist/simple-tree/proxies.d.ts +6 -25
- package/dist/simple-tree/proxies.d.ts.map +1 -1
- package/dist/simple-tree/proxies.js +50 -63
- package/dist/simple-tree/proxies.js.map +1 -1
- package/dist/simple-tree/proxyBinding.d.ts +45 -22
- package/dist/simple-tree/proxyBinding.d.ts.map +1 -1
- package/dist/simple-tree/proxyBinding.js +94 -59
- package/dist/simple-tree/proxyBinding.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +10 -159
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js +11 -42
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts +124 -0
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -0
- package/dist/{feature-libraries/schema-aware/schemaAware.js → simple-tree/simpleSchema.js} +1 -1
- package/dist/simple-tree/simpleSchema.js.map +1 -0
- package/dist/simple-tree/simpleSchemaToJsonSchema.d.ts +12 -0
- package/dist/simple-tree/simpleSchemaToJsonSchema.d.ts.map +1 -0
- package/dist/simple-tree/simpleSchemaToJsonSchema.js +146 -0
- package/dist/simple-tree/simpleSchemaToJsonSchema.js.map +1 -0
- package/dist/simple-tree/toFlexSchema.d.ts +4 -12
- package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/dist/simple-tree/toFlexSchema.js +42 -52
- package/dist/simple-tree/toFlexSchema.js.map +1 -1
- package/dist/simple-tree/toMapTree.d.ts +39 -39
- package/dist/simple-tree/toMapTree.d.ts.map +1 -1
- package/dist/simple-tree/toMapTree.js +227 -171
- package/dist/simple-tree/toMapTree.js.map +1 -1
- package/dist/simple-tree/treeNodeValid.d.ts +74 -0
- package/dist/simple-tree/treeNodeValid.d.ts.map +1 -0
- package/dist/simple-tree/{types.js → treeNodeValid.js} +18 -111
- package/dist/simple-tree/treeNodeValid.js.map +1 -0
- package/dist/simple-tree/typesUnsafe.d.ts +35 -4
- package/dist/simple-tree/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/viewSchemaToSimpleSchema.d.ts +11 -0
- package/dist/simple-tree/viewSchemaToSimpleSchema.d.ts.map +1 -0
- package/dist/simple-tree/viewSchemaToSimpleSchema.js +171 -0
- package/dist/simple-tree/viewSchemaToSimpleSchema.js.map +1 -0
- package/dist/util/brand.d.ts +0 -3
- package/dist/util/brand.d.ts.map +1 -1
- package/dist/util/brand.js +1 -2
- package/dist/util/brand.js.map +1 -1
- package/dist/util/brandedMap.d.ts +0 -5
- package/dist/util/brandedMap.d.ts.map +1 -1
- package/dist/util/brandedMap.js +0 -1
- package/dist/util/brandedMap.js.map +1 -1
- package/dist/util/idAllocator.d.ts +0 -2
- package/dist/util/idAllocator.d.ts.map +1 -1
- package/dist/util/idAllocator.js +0 -1
- package/dist/util/idAllocator.js.map +1 -1
- package/dist/util/index.d.ts +2 -2
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +4 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/nestedMap.d.ts +5 -19
- package/dist/util/nestedMap.d.ts.map +1 -1
- package/dist/util/nestedMap.js +17 -17
- package/dist/util/nestedMap.js.map +1 -1
- package/dist/util/opaque.d.ts +0 -4
- package/dist/util/opaque.d.ts.map +1 -1
- package/dist/util/opaque.js +0 -2
- package/dist/util/opaque.js.map +1 -1
- package/dist/util/rangeMap.d.ts +0 -2
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +4 -3
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/transactionResult.d.ts +0 -1
- package/dist/util/transactionResult.d.ts.map +1 -1
- package/dist/util/transactionResult.js +0 -1
- package/dist/util/transactionResult.js.map +1 -1
- package/dist/util/typeCheck.d.ts +2 -20
- package/dist/util/typeCheck.d.ts.map +1 -1
- package/dist/util/typeCheck.js.map +1 -1
- package/dist/util/typeCheckTests.d.ts +4 -4
- package/dist/util/typeCheckTests.d.ts.map +1 -1
- package/dist/util/typeCheckTests.js.map +1 -1
- package/dist/util/typeUtils.d.ts +0 -7
- package/dist/util/typeUtils.d.ts.map +1 -1
- package/dist/util/typeUtils.js.map +1 -1
- package/dist/util/utils.d.ts +6 -8
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +14 -5
- package/dist/util/utils.js.map +1 -1
- package/lib/beta.d.ts +3 -1
- package/lib/codec/discriminatedUnions.d.ts +11 -5
- package/lib/codec/discriminatedUnions.d.ts.map +1 -1
- package/lib/codec/discriminatedUnions.js.map +1 -1
- package/lib/codec/index.d.ts +1 -1
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.js.map +1 -1
- package/lib/core/forest/editableForest.d.ts +1 -5
- package/lib/core/forest/editableForest.d.ts.map +1 -1
- package/lib/core/forest/editableForest.js.map +1 -1
- package/lib/core/forest/forest.d.ts +0 -6
- package/lib/core/forest/forest.d.ts.map +1 -1
- package/lib/core/forest/forest.js +0 -2
- package/lib/core/forest/forest.js.map +1 -1
- package/lib/core/index.d.ts +2 -2
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +2 -2
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/changeRebaser.d.ts +0 -4
- package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
- package/lib/core/rebase/changeRebaser.js.map +1 -1
- package/lib/core/rebase/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/types.d.ts +1 -8
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +1 -7
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/rebase/utils.d.ts +0 -1
- package/lib/core/rebase/utils.d.ts.map +1 -1
- package/lib/core/rebase/utils.js +13 -8
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/schema-stored/multiplicity.d.ts +0 -1
- package/lib/core/schema-stored/multiplicity.d.ts.map +1 -1
- package/lib/core/schema-stored/multiplicity.js +0 -1
- package/lib/core/schema-stored/multiplicity.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +0 -7
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +0 -4
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts +0 -3
- package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/lib/core/schema-view/view.d.ts +0 -3
- package/lib/core/schema-view/view.d.ts.map +1 -1
- package/lib/core/schema-view/view.js +0 -1
- package/lib/core/schema-view/view.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts +0 -10
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +1 -4
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/cursor.d.ts +1 -6
- package/lib/core/tree/cursor.d.ts.map +1 -1
- package/lib/core/tree/cursor.js +0 -2
- package/lib/core/tree/cursor.js.map +1 -1
- package/lib/core/tree/delta.d.ts +0 -11
- package/lib/core/tree/delta.d.ts.map +1 -1
- package/lib/core/tree/delta.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.js +4 -3
- package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexTypes.d.ts +0 -1
- package/lib/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
- package/lib/core/tree/index.d.ts +1 -1
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +1 -0
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/mapTree.d.ts +20 -4
- package/lib/core/tree/mapTree.d.ts.map +1 -1
- package/lib/core/tree/mapTree.js +27 -1
- package/lib/core/tree/mapTree.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts +0 -11
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/core/tree/treeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/treeTextFormat.js +3 -2
- package/lib/core/tree/treeTextFormat.js.map +1 -1
- package/lib/core/tree/types.d.ts +0 -11
- package/lib/core/tree/types.d.ts.map +1 -1
- package/lib/core/tree/types.js +0 -4
- package/lib/core/tree/types.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +0 -1
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js +2 -2
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/core/tree/visitPath.d.ts +0 -2
- package/lib/core/tree/visitPath.d.ts.map +1 -1
- package/lib/core/tree/visitPath.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts +0 -1
- package/lib/core/tree/visitorUtils.d.ts.map +1 -1
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/domains/index.d.ts +1 -1
- package/lib/domains/index.d.ts.map +1 -1
- package/lib/domains/index.js +1 -1
- package/lib/domains/index.js.map +1 -1
- package/lib/domains/json/index.d.ts +1 -1
- package/lib/domains/json/index.d.ts.map +1 -1
- package/lib/domains/json/index.js +1 -1
- package/lib/domains/json/index.js.map +1 -1
- package/lib/domains/json/jsonCursor.d.ts +36 -2
- package/lib/domains/json/jsonCursor.d.ts.map +1 -1
- package/lib/domains/json/jsonCursor.js +76 -5
- package/lib/domains/json/jsonCursor.js.map +1 -1
- package/lib/domains/json/jsonDomainSchema.d.ts +13 -3
- package/lib/domains/json/jsonDomainSchema.d.ts.map +1 -1
- package/lib/domains/json/jsonDomainSchema.js +9 -1
- package/lib/domains/json/jsonDomainSchema.js.map +1 -1
- package/lib/domains/leafDomain.d.ts +0 -1
- package/lib/domains/leafDomain.d.ts.map +1 -1
- package/lib/domains/leafDomain.js +0 -1
- package/lib/domains/leafDomain.js.map +1 -1
- package/lib/domains/schemaBuilder.d.ts +1 -7
- package/lib/domains/schemaBuilder.d.ts.map +1 -1
- package/lib/domains/schemaBuilder.js +1 -11
- package/lib/domains/schemaBuilder.js.map +1 -1
- package/lib/events/events.d.ts +0 -4
- package/lib/events/events.d.ts.map +1 -1
- package/lib/events/events.js +0 -1
- package/lib/events/events.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +9 -4
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunk.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +4 -4
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +8 -6
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +9 -6
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js +6 -4
- package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +12 -24
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +6 -16
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +0 -6
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +11 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultSchema.d.ts +0 -1
- package/lib/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultSchema.js +0 -1
- package/lib/feature-libraries/default-schema/defaultSchema.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -1
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/schemaChecker.d.ts +6 -0
- package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/schemaChecker.js +6 -0
- package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
- package/lib/feature-libraries/editableTreeBinder.d.ts +0 -67
- package/lib/feature-libraries/editableTreeBinder.d.ts.map +1 -1
- package/lib/feature-libraries/editableTreeBinder.js +6 -25
- package/lib/feature-libraries/editableTreeBinder.js.map +1 -1
- package/lib/feature-libraries/fieldGenerator.d.ts +0 -3
- package/lib/feature-libraries/fieldGenerator.d.ts.map +1 -1
- package/lib/feature-libraries/fieldGenerator.js +0 -1
- package/lib/feature-libraries/fieldGenerator.js.map +1 -1
- package/lib/feature-libraries/flex-map-tree/index.d.ts +1 -1
- package/lib/feature-libraries/flex-map-tree/index.d.ts.map +1 -1
- package/lib/feature-libraries/flex-map-tree/index.js +1 -1
- package/lib/feature-libraries/flex-map-tree/index.js.map +1 -1
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts +57 -49
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.js +172 -168
- package/lib/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts +0 -1
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +17 -282
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js +0 -4
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/index.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +9 -26
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +28 -101
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts +2 -10
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +4 -42
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/flex-tree/treeEvents.d.ts +0 -2
- package/lib/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/treeEvents.js.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.d.ts +2 -1
- package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.js +4 -0
- package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +3 -3
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +6 -8
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +5 -6
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts +6 -2
- package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.js +7 -0
- package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
- package/lib/feature-libraries/memoizedIdRangeAllocator.d.ts +0 -4
- package/lib/feature-libraries/memoizedIdRangeAllocator.d.ts.map +1 -1
- package/lib/feature-libraries/memoizedIdRangeAllocator.js +0 -1
- package/lib/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +0 -2
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js +0 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/lib/feature-libraries/modular-schema/discrepancies.d.ts +18 -0
- package/lib/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/discrepancies.js +103 -1
- package/lib/feature-libraries/modular-schema/discrepancies.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +0 -8
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js +0 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts +1 -3
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.js +1 -2
- package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -2
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +56 -83
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js +6 -9
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +3 -14
- package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js +4 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +2 -2
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +1 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +42 -25
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -8
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +169 -206
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -14
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/node-key/nodeKey.d.ts +0 -4
- package/lib/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
- package/lib/feature-libraries/node-key/nodeKey.js +0 -2
- package/lib/feature-libraries/node-key/nodeKey.js.map +1 -1
- package/lib/feature-libraries/node-key/nodeKeyManager.d.ts +0 -1
- package/lib/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
- package/lib/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +2 -11
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +6 -6
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +7 -7
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
- package/lib/feature-libraries/schemaBuilderBase.d.ts +2 -28
- package/lib/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
- package/lib/feature-libraries/schemaBuilderBase.js +2 -28
- package/lib/feature-libraries/schemaBuilderBase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +25 -22
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV2.js +3 -3
- package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/formatV3.d.ts +195 -0
- package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -0
- package/lib/feature-libraries/sequence-field/formatV3.js +19 -0
- package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -0
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts +11 -0
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
- package/lib/feature-libraries/sequence-field/index.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/index.js.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.js +22 -14
- package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.js +2 -2
- package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.js +25 -7
- package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/replaceRevisions.js +16 -3
- package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +40 -6
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +55 -11
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +11 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +81 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js +2 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +5 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts +23 -4
- package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/types.js.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.d.ts +5 -4
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +67 -41
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/feature-libraries/storedToViewSchema.d.ts +0 -1
- package/lib/feature-libraries/storedToViewSchema.d.ts.map +1 -1
- package/lib/feature-libraries/storedToViewSchema.js +0 -1
- package/lib/feature-libraries/storedToViewSchema.js.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.d.ts +0 -6
- package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.js +9 -7
- package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
- package/lib/feature-libraries/treeTextCursor.d.ts +0 -2
- package/lib/feature-libraries/treeTextCursor.d.ts.map +1 -1
- package/lib/feature-libraries/treeTextCursor.js +0 -2
- package/lib/feature-libraries/treeTextCursor.js.map +1 -1
- package/lib/feature-libraries/typed-schema/flexList.d.ts +0 -3
- package/lib/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/flexList.js.map +1 -1
- package/lib/feature-libraries/typed-schema/index.d.ts +1 -1
- package/lib/feature-libraries/typed-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/index.js +1 -1
- package/lib/feature-libraries/typed-schema/index.js.map +1 -1
- package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/schemaCollection.js +1 -5
- package/lib/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +2 -41
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js +1 -38
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/lib/feature-libraries/typed-schema/view.d.ts +0 -1
- package/lib/feature-libraries/typed-schema/view.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/view.js.map +1 -1
- package/lib/index.d.ts +8 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -9
- 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/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +3 -1
- package/lib/shared-tree/schematizeTree.d.ts +2 -11
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +15 -4
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +4 -4
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +3 -3
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +4 -17
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +6 -10
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +4 -0
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +3 -3
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts +0 -2
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/shared-tree/treeApi.js +3 -3
- package/lib/shared-tree/treeApi.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +0 -5
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +6 -4
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree/treeView.d.ts +3 -6
- package/lib/shared-tree/treeView.d.ts.map +1 -1
- package/lib/shared-tree/treeView.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +12 -7
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.js +4 -4
- package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +1 -0
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormat.d.ts +2 -2
- package/lib/shared-tree-core/editManagerFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormat.js +6 -1
- package/lib/shared-tree-core/editManagerFormat.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +1 -0
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +4 -2
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts +54 -0
- package/lib/simple-tree/api/create.d.ts.map +1 -0
- package/lib/simple-tree/api/create.js +92 -0
- package/lib/simple-tree/api/create.js.map +1 -0
- package/lib/simple-tree/api/index.d.ts +12 -0
- package/lib/simple-tree/api/index.d.ts.map +1 -0
- package/lib/simple-tree/api/index.js +13 -0
- package/lib/simple-tree/api/index.js.map +1 -0
- package/{dist/simple-tree → lib/simple-tree/api}/schemaCreationUtilities.d.ts +7 -4
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -0
- package/lib/simple-tree/{schemaCreationUtilities.js → api/schemaCreationUtilities.js} +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -0
- package/lib/simple-tree/{schemaFactory.d.ts → api/schemaFactory.d.ts} +15 -14
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -0
- package/lib/simple-tree/{schemaFactory.js → api/schemaFactory.js} +9 -8
- package/lib/simple-tree/api/schemaFactory.js.map +1 -0
- package/{dist/simple-tree → lib/simple-tree/api}/schemaFactoryRecursive.d.ts +40 -7
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -0
- package/lib/simple-tree/{schemaFactoryRecursive.js → api/schemaFactoryRecursive.js} +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -0
- package/lib/simple-tree/api/testRecursiveDomain.d.ts +62 -0
- package/lib/simple-tree/api/testRecursiveDomain.d.ts.map +1 -0
- package/lib/simple-tree/api/testRecursiveDomain.js.map +1 -0
- package/{dist/simple-tree → lib/simple-tree/api}/tree.d.ts +111 -20
- package/lib/simple-tree/api/tree.d.ts.map +1 -0
- package/lib/simple-tree/api/tree.js +165 -0
- package/lib/simple-tree/api/tree.js.map +1 -0
- package/lib/simple-tree/{treeNodeApi.d.ts → api/treeNodeApi.d.ts} +6 -5
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -0
- package/lib/simple-tree/{treeNodeApi.js → api/treeNodeApi.js} +25 -17
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -0
- package/lib/simple-tree/api/verboseTree.d.ts +136 -0
- package/lib/simple-tree/api/verboseTree.d.ts.map +1 -0
- package/lib/simple-tree/api/verboseTree.js +213 -0
- package/lib/simple-tree/api/verboseTree.js.map +1 -0
- package/lib/simple-tree/arrayNode.d.ts +3 -3
- package/lib/simple-tree/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/arrayNode.js +56 -53
- package/lib/simple-tree/arrayNode.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +10 -0
- package/lib/simple-tree/core/index.d.ts.map +1 -0
- package/lib/simple-tree/core/index.js +10 -0
- package/lib/simple-tree/core/index.js.map +1 -0
- package/{dist/simple-tree → lib/simple-tree/core}/schemaCaching.d.ts +2 -9
- package/lib/simple-tree/core/schemaCaching.d.ts.map +1 -0
- package/lib/simple-tree/{schemaCaching.js → core/schemaCaching.js} +1 -21
- package/lib/simple-tree/core/schemaCaching.js.map +1 -0
- package/lib/simple-tree/core/treeNodeKernel.d.ts +57 -0
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -0
- package/lib/simple-tree/{treeNodeKernel.js → core/treeNodeKernel.js} +45 -3
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -0
- package/lib/simple-tree/core/treeNodeSchema.d.ts +149 -0
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -0
- package/lib/simple-tree/core/treeNodeSchema.js +32 -0
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -0
- package/lib/simple-tree/{types.d.ts → core/types.d.ts} +23 -70
- package/lib/simple-tree/core/types.d.ts.map +1 -0
- package/lib/simple-tree/core/types.js +111 -0
- package/lib/simple-tree/core/types.js.map +1 -0
- package/lib/simple-tree/core/withType.d.ts +82 -0
- package/lib/simple-tree/core/withType.d.ts.map +1 -0
- package/lib/simple-tree/core/withType.js +36 -0
- package/lib/simple-tree/core/withType.js.map +1 -0
- package/lib/simple-tree/getJsonSchema.d.ts +55 -0
- package/lib/simple-tree/getJsonSchema.d.ts.map +1 -0
- package/lib/simple-tree/getJsonSchema.js +65 -0
- package/lib/simple-tree/getJsonSchema.js.map +1 -0
- package/lib/simple-tree/getSimpleFieldSchema.d.ts +14 -0
- package/lib/simple-tree/getSimpleFieldSchema.d.ts.map +1 -0
- package/lib/simple-tree/getSimpleFieldSchema.js +25 -0
- package/lib/simple-tree/getSimpleFieldSchema.js.map +1 -0
- package/lib/simple-tree/getSimpleSchema.d.ts +58 -0
- package/lib/simple-tree/getSimpleSchema.d.ts.map +1 -0
- package/lib/simple-tree/getSimpleSchema.js +64 -0
- package/lib/simple-tree/getSimpleSchema.js.map +1 -0
- package/lib/simple-tree/index.d.ts +12 -13
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +8 -11
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/jsonSchema.d.ts +206 -0
- package/lib/simple-tree/jsonSchema.d.ts.map +1 -0
- package/lib/simple-tree/{nodeKeys.js → jsonSchema.js} +1 -1
- package/lib/simple-tree/jsonSchema.js.map +1 -0
- package/lib/simple-tree/leafNodeSchema.d.ts +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +1 -2
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/mapNode.d.ts +9 -3
- package/lib/simple-tree/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/mapNode.js +36 -36
- package/lib/simple-tree/mapNode.js.map +1 -1
- package/lib/simple-tree/objectNode.d.ts +18 -16
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +36 -34
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/objectNodeTypes.d.ts +38 -0
- package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -0
- package/lib/simple-tree/objectNodeTypes.js +15 -0
- package/lib/simple-tree/objectNodeTypes.js.map +1 -0
- package/lib/simple-tree/proxies.d.ts +6 -25
- package/lib/simple-tree/proxies.d.ts.map +1 -1
- package/lib/simple-tree/proxies.js +46 -57
- package/lib/simple-tree/proxies.js.map +1 -1
- package/lib/simple-tree/proxyBinding.d.ts +45 -22
- package/lib/simple-tree/proxyBinding.d.ts.map +1 -1
- package/lib/simple-tree/proxyBinding.js +89 -52
- package/lib/simple-tree/proxyBinding.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +10 -159
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js +9 -41
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts +124 -0
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -0
- package/lib/{feature-libraries/schema-aware/schemaAware.js → simple-tree/simpleSchema.js} +1 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -0
- package/lib/simple-tree/simpleSchemaToJsonSchema.d.ts +12 -0
- package/lib/simple-tree/simpleSchemaToJsonSchema.d.ts.map +1 -0
- package/lib/simple-tree/simpleSchemaToJsonSchema.js +142 -0
- package/lib/simple-tree/simpleSchemaToJsonSchema.js.map +1 -0
- package/lib/simple-tree/toFlexSchema.d.ts +4 -12
- package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/lib/simple-tree/toFlexSchema.js +9 -18
- package/lib/simple-tree/toFlexSchema.js.map +1 -1
- package/lib/simple-tree/toMapTree.d.ts +39 -39
- package/lib/simple-tree/toMapTree.d.ts.map +1 -1
- package/lib/simple-tree/toMapTree.js +214 -158
- package/lib/simple-tree/toMapTree.js.map +1 -1
- package/lib/simple-tree/treeNodeValid.d.ts +74 -0
- package/lib/simple-tree/treeNodeValid.d.ts.map +1 -0
- package/lib/simple-tree/{types.js → treeNodeValid.js} +8 -98
- package/lib/simple-tree/treeNodeValid.js.map +1 -0
- package/lib/simple-tree/typesUnsafe.d.ts +35 -4
- package/lib/simple-tree/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/viewSchemaToSimpleSchema.d.ts +11 -0
- package/lib/simple-tree/viewSchemaToSimpleSchema.d.ts.map +1 -0
- package/lib/simple-tree/viewSchemaToSimpleSchema.js +167 -0
- package/lib/simple-tree/viewSchemaToSimpleSchema.js.map +1 -0
- package/lib/util/brand.d.ts +0 -3
- package/lib/util/brand.d.ts.map +1 -1
- package/lib/util/brand.js +1 -2
- package/lib/util/brand.js.map +1 -1
- package/lib/util/brandedMap.d.ts +0 -5
- package/lib/util/brandedMap.d.ts.map +1 -1
- package/lib/util/brandedMap.js +0 -1
- package/lib/util/brandedMap.js.map +1 -1
- package/lib/util/idAllocator.d.ts +0 -2
- package/lib/util/idAllocator.d.ts.map +1 -1
- package/lib/util/idAllocator.js +0 -1
- package/lib/util/idAllocator.js.map +1 -1
- package/lib/util/index.d.ts +2 -2
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -2
- package/lib/util/index.js.map +1 -1
- package/lib/util/nestedMap.d.ts +5 -19
- package/lib/util/nestedMap.d.ts.map +1 -1
- package/lib/util/nestedMap.js +15 -16
- package/lib/util/nestedMap.js.map +1 -1
- package/lib/util/opaque.d.ts +0 -4
- package/lib/util/opaque.d.ts.map +1 -1
- package/lib/util/opaque.js +0 -2
- package/lib/util/opaque.js.map +1 -1
- package/lib/util/rangeMap.d.ts +0 -2
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +4 -3
- package/lib/util/rangeMap.js.map +1 -1
- package/lib/util/transactionResult.d.ts +0 -1
- package/lib/util/transactionResult.d.ts.map +1 -1
- package/lib/util/transactionResult.js +0 -1
- package/lib/util/transactionResult.js.map +1 -1
- package/lib/util/typeCheck.d.ts +2 -20
- package/lib/util/typeCheck.d.ts.map +1 -1
- package/lib/util/typeCheck.js.map +1 -1
- package/lib/util/typeCheckTests.d.ts +4 -4
- package/lib/util/typeCheckTests.d.ts.map +1 -1
- package/lib/util/typeCheckTests.js.map +1 -1
- package/lib/util/typeUtils.d.ts +0 -7
- package/lib/util/typeUtils.d.ts.map +1 -1
- package/lib/util/typeUtils.js.map +1 -1
- package/lib/util/utils.d.ts +6 -8
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +12 -4
- package/lib/util/utils.js.map +1 -1
- package/package.json +36 -25
- package/src/codec/discriminatedUnions.ts +20 -10
- package/src/codec/index.ts +5 -1
- package/src/core/forest/README.md +4 -2
- package/src/core/forest/editableForest.ts +1 -6
- package/src/core/forest/forest.ts +0 -6
- package/src/core/index.ts +2 -2
- package/src/core/rebase/changeRebaser.ts +0 -4
- package/src/core/rebase/index.ts +0 -2
- package/src/core/rebase/types.ts +1 -23
- package/src/core/rebase/utils.ts +13 -11
- package/src/core/schema-stored/multiplicity.ts +0 -1
- package/src/core/schema-stored/schema.ts +0 -7
- package/src/core/schema-stored/storedSchemaRepository.ts +0 -3
- package/src/core/schema-view/view.ts +0 -3
- package/src/core/tree/anchorSet.ts +7 -17
- package/src/core/tree/cursor.ts +1 -6
- package/src/core/tree/delta.ts +0 -11
- package/src/core/tree/detachedFieldIndexCodec.ts +4 -3
- package/src/core/tree/detachedFieldIndexTypes.ts +0 -1
- package/src/core/tree/index.ts +1 -1
- package/src/core/tree/mapTree.ts +45 -4
- package/src/core/tree/pathTree.ts +0 -11
- package/src/core/tree/treeTextFormat.ts +3 -2
- package/src/core/tree/types.ts +0 -11
- package/src/core/tree/visitDelta.ts +2 -3
- package/src/core/tree/visitPath.ts +0 -2
- package/src/core/tree/visitorUtils.ts +0 -1
- package/src/domains/index.ts +3 -0
- package/src/domains/json/index.ts +7 -1
- package/src/domains/json/jsonCursor.ts +113 -6
- package/src/domains/json/jsonDomainSchema.ts +4 -5
- package/src/domains/leafDomain.ts +0 -1
- package/src/domains/schemaBuilder.ts +0 -22
- package/src/events/events.ts +0 -4
- package/src/feature-libraries/chunked-forest/README.md +9 -1
- package/src/feature-libraries/chunked-forest/basicChunk.ts +14 -9
- package/src/feature-libraries/chunked-forest/chunk.ts +1 -1
- package/src/feature-libraries/chunked-forest/chunkTree.ts +4 -4
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +8 -6
- package/src/feature-libraries/chunked-forest/codec/chunkCodecUtilities.ts +2 -2
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +9 -6
- package/src/feature-libraries/chunked-forest/uniformChunk.ts +6 -4
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +18 -46
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +11 -6
- package/src/feature-libraries/default-schema/defaultSchema.ts +0 -1
- package/src/feature-libraries/default-schema/index.ts +1 -1
- package/src/feature-libraries/default-schema/schemaChecker.ts +6 -0
- package/src/feature-libraries/editableTreeBinder.ts +6 -78
- package/src/feature-libraries/fieldGenerator.ts +0 -3
- package/src/feature-libraries/flex-map-tree/index.ts +2 -1
- package/src/feature-libraries/flex-map-tree/mapTreeNode.ts +238 -267
- package/src/feature-libraries/flex-tree/context.ts +0 -1
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +27 -357
- package/src/feature-libraries/flex-tree/index.ts +0 -1
- package/src/feature-libraries/flex-tree/lazyField.ts +38 -208
- package/src/feature-libraries/flex-tree/lazyNode.ts +5 -66
- package/src/feature-libraries/flex-tree/treeEvents.ts +0 -2
- package/src/feature-libraries/flex-tree/utilities.ts +6 -1
- package/src/feature-libraries/forest-summary/codec.ts +3 -3
- package/src/feature-libraries/index.ts +5 -35
- package/src/feature-libraries/mapTreeCursor.ts +13 -4
- package/src/feature-libraries/memoizedIdRangeAllocator.ts +0 -4
- package/src/feature-libraries/modular-schema/crossFieldQueries.ts +0 -2
- package/src/feature-libraries/modular-schema/discrepancies.ts +117 -1
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +0 -8
- package/src/feature-libraries/modular-schema/fieldKind.ts +1 -3
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +69 -92
- package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +7 -14
- package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +6 -15
- package/src/feature-libraries/modular-schema/index.ts +2 -2
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +68 -34
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +330 -336
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +7 -14
- package/src/feature-libraries/node-key/nodeKey.ts +0 -4
- package/src/feature-libraries/node-key/nodeKeyManager.ts +0 -1
- package/src/feature-libraries/object-forest/objectForest.ts +1 -13
- package/src/feature-libraries/schemaBuilderBase.ts +1 -49
- package/src/feature-libraries/sequence-field/compose.ts +41 -20
- package/src/feature-libraries/sequence-field/formatV2.ts +3 -3
- package/src/feature-libraries/sequence-field/formatV3.ts +65 -0
- package/src/feature-libraries/sequence-field/helperTypes.ts +33 -0
- package/src/feature-libraries/sequence-field/index.ts +1 -0
- package/src/feature-libraries/sequence-field/invert.ts +28 -18
- package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
- package/src/feature-libraries/sequence-field/moveEffectTable.ts +2 -2
- package/src/feature-libraries/sequence-field/rebase.ts +30 -13
- package/src/feature-libraries/sequence-field/replaceRevisions.ts +27 -3
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +52 -7
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +92 -19
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +134 -0
- package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +2 -0
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +8 -2
- package/src/feature-libraries/sequence-field/types.ts +24 -4
- package/src/feature-libraries/sequence-field/utils.ts +78 -50
- package/src/feature-libraries/storedToViewSchema.ts +0 -1
- package/src/feature-libraries/treeCursorUtils.ts +11 -11
- package/src/feature-libraries/treeTextCursor.ts +0 -2
- package/src/feature-libraries/typed-schema/flexList.ts +0 -3
- package/src/feature-libraries/typed-schema/index.ts +0 -2
- package/src/feature-libraries/typed-schema/schemaCollection.ts +0 -5
- package/src/feature-libraries/typed-schema/typedTreeSchema.ts +2 -68
- package/src/feature-libraries/typed-schema/view.ts +0 -1
- package/src/index.ts +27 -245
- package/src/internalTypes.ts +1 -0
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/schematizeTree.ts +25 -21
- package/src/shared-tree/schematizingTreeView.ts +6 -6
- package/src/shared-tree/sharedTree.ts +8 -39
- package/src/shared-tree/sharedTreeChangeCodecs.ts +8 -0
- package/src/shared-tree/sharedTreeChangeFamily.ts +3 -3
- package/src/shared-tree/sharedTreeEditBuilder.ts +0 -2
- package/src/shared-tree/treeApi.ts +3 -3
- package/src/shared-tree/treeCheckout.ts +6 -8
- package/src/shared-tree/treeView.ts +3 -6
- package/src/shared-tree-core/branch.ts +20 -8
- package/src/shared-tree-core/defaultResubmitMachine.ts +4 -4
- package/src/shared-tree-core/editManagerCodecs.ts +1 -0
- package/src/shared-tree-core/editManagerFormat.ts +7 -2
- package/src/shared-tree-core/messageCodecs.ts +2 -1
- package/src/shared-tree-core/sharedTreeCore.ts +5 -3
- package/src/simple-tree/ProxyBinding.md +2 -0
- package/src/simple-tree/api/README.md +7 -0
- package/src/simple-tree/api/create.ts +179 -0
- package/src/simple-tree/api/index.ts +36 -0
- package/src/simple-tree/{schemaCreationUtilities.ts → api/schemaCreationUtilities.ts} +13 -5
- package/src/simple-tree/{schemaFactory.ts → api/schemaFactory.ts} +36 -34
- package/src/simple-tree/{schemaFactoryRecursive.ts → api/schemaFactoryRecursive.ts} +47 -10
- package/src/simple-tree/{testRecursiveDomain.ts → api/testRecursiveDomain.ts} +3 -1
- package/src/simple-tree/{tree.ts → api/tree.ts} +246 -34
- package/src/simple-tree/{treeNodeApi.ts → api/treeNodeApi.ts} +47 -36
- package/src/simple-tree/api/verboseTree.ts +415 -0
- package/src/simple-tree/arrayNode.ts +100 -98
- package/src/simple-tree/core/README.md +11 -0
- package/src/simple-tree/core/index.ts +33 -0
- package/src/simple-tree/{schemaCaching.ts → core/schemaCaching.ts} +3 -37
- package/src/simple-tree/{treeNodeKernel.ts → core/treeNodeKernel.ts} +55 -5
- package/src/simple-tree/core/treeNodeSchema.ts +184 -0
- package/src/simple-tree/core/types.ts +255 -0
- package/src/simple-tree/core/withType.ts +89 -0
- package/src/simple-tree/getJsonSchema.ts +70 -0
- package/src/simple-tree/getSimpleFieldSchema.ts +36 -0
- package/src/simple-tree/getSimpleSchema.ts +69 -0
- package/src/simple-tree/index.ts +58 -33
- package/src/simple-tree/jsonSchema.ts +230 -0
- package/src/simple-tree/leafNodeSchema.ts +6 -3
- package/src/simple-tree/mapNode.ts +56 -55
- package/src/simple-tree/objectNode.ts +66 -90
- package/src/simple-tree/objectNodeTypes.ts +68 -0
- package/src/simple-tree/proxies.ts +52 -68
- package/src/simple-tree/proxyBinding.ts +127 -72
- package/src/simple-tree/schemaTypes.ts +29 -194
- package/src/simple-tree/simpleSchema.ts +138 -0
- package/src/simple-tree/simpleSchemaToJsonSchema.ts +178 -0
- package/src/simple-tree/toFlexSchema.ts +9 -42
- package/src/simple-tree/toMapTree.ts +270 -296
- package/src/simple-tree/{types.ts → treeNodeValid.ts} +16 -232
- package/src/simple-tree/typesUnsafe.ts +51 -5
- package/src/simple-tree/viewSchemaToSimpleSchema.ts +209 -0
- package/src/util/brand.ts +1 -4
- package/src/util/brandedMap.ts +0 -5
- package/src/util/idAllocator.ts +0 -2
- package/src/util/index.ts +2 -0
- package/src/util/nestedMap.ts +23 -20
- package/src/util/opaque.ts +0 -4
- package/src/util/rangeMap.ts +5 -5
- package/src/util/transactionResult.ts +0 -1
- package/src/util/typeCheck.ts +2 -20
- package/src/util/typeCheckTests.ts +4 -4
- package/src/util/typeUtils.ts +0 -7
- package/src/util/utils.ts +13 -8
- package/tsconfig.json +0 -1
- package/dist/feature-libraries/contextuallyTyped.d.ts +0 -209
- package/dist/feature-libraries/contextuallyTyped.d.ts.map +0 -1
- package/dist/feature-libraries/contextuallyTyped.js +0 -328
- package/dist/feature-libraries/contextuallyTyped.js.map +0 -1
- package/dist/feature-libraries/schema-aware/index.d.ts +0 -6
- package/dist/feature-libraries/schema-aware/index.d.ts.map +0 -1
- package/dist/feature-libraries/schema-aware/index.js.map +0 -1
- package/dist/feature-libraries/schema-aware/schemaAware.d.ts +0 -76
- package/dist/feature-libraries/schema-aware/schemaAware.d.ts.map +0 -1
- package/dist/feature-libraries/schema-aware/schemaAware.js.map +0 -1
- package/dist/simple-tree/nodeKeys.d.ts +0 -41
- package/dist/simple-tree/nodeKeys.d.ts.map +0 -1
- package/dist/simple-tree/nodeKeys.js +0 -7
- package/dist/simple-tree/nodeKeys.js.map +0 -1
- package/dist/simple-tree/schemaCaching.d.ts.map +0 -1
- package/dist/simple-tree/schemaCaching.js.map +0 -1
- package/dist/simple-tree/schemaCreationUtilities.d.ts.map +0 -1
- package/dist/simple-tree/schemaCreationUtilities.js.map +0 -1
- package/dist/simple-tree/schemaFactory.d.ts.map +0 -1
- package/dist/simple-tree/schemaFactory.js.map +0 -1
- package/dist/simple-tree/schemaFactoryRecursive.d.ts.map +0 -1
- package/dist/simple-tree/schemaFactoryRecursive.js.map +0 -1
- package/dist/simple-tree/testRecursiveDomain.d.ts +0 -61
- package/dist/simple-tree/testRecursiveDomain.d.ts.map +0 -1
- package/dist/simple-tree/testRecursiveDomain.js.map +0 -1
- package/dist/simple-tree/tree.d.ts.map +0 -1
- package/dist/simple-tree/tree.js +0 -73
- package/dist/simple-tree/tree.js.map +0 -1
- package/dist/simple-tree/treeNodeApi.d.ts.map +0 -1
- package/dist/simple-tree/treeNodeApi.js.map +0 -1
- package/dist/simple-tree/treeNodeKernel.d.ts +0 -26
- package/dist/simple-tree/treeNodeKernel.d.ts.map +0 -1
- package/dist/simple-tree/treeNodeKernel.js.map +0 -1
- package/dist/simple-tree/types.d.ts.map +0 -1
- package/dist/simple-tree/types.js.map +0 -1
- package/lib/feature-libraries/contextuallyTyped.d.ts +0 -209
- package/lib/feature-libraries/contextuallyTyped.d.ts.map +0 -1
- package/lib/feature-libraries/contextuallyTyped.js +0 -311
- package/lib/feature-libraries/contextuallyTyped.js.map +0 -1
- package/lib/feature-libraries/schema-aware/index.d.ts +0 -6
- package/lib/feature-libraries/schema-aware/index.d.ts.map +0 -1
- package/lib/feature-libraries/schema-aware/index.js +0 -6
- package/lib/feature-libraries/schema-aware/index.js.map +0 -1
- package/lib/feature-libraries/schema-aware/schemaAware.d.ts +0 -76
- package/lib/feature-libraries/schema-aware/schemaAware.d.ts.map +0 -1
- package/lib/feature-libraries/schema-aware/schemaAware.js.map +0 -1
- package/lib/simple-tree/nodeKeys.d.ts +0 -41
- package/lib/simple-tree/nodeKeys.d.ts.map +0 -1
- package/lib/simple-tree/nodeKeys.js.map +0 -1
- package/lib/simple-tree/schemaCaching.d.ts.map +0 -1
- package/lib/simple-tree/schemaCaching.js.map +0 -1
- package/lib/simple-tree/schemaCreationUtilities.d.ts.map +0 -1
- package/lib/simple-tree/schemaCreationUtilities.js.map +0 -1
- package/lib/simple-tree/schemaFactory.d.ts.map +0 -1
- package/lib/simple-tree/schemaFactory.js.map +0 -1
- package/lib/simple-tree/schemaFactoryRecursive.d.ts.map +0 -1
- package/lib/simple-tree/schemaFactoryRecursive.js.map +0 -1
- package/lib/simple-tree/testRecursiveDomain.d.ts +0 -61
- package/lib/simple-tree/testRecursiveDomain.d.ts.map +0 -1
- package/lib/simple-tree/testRecursiveDomain.js.map +0 -1
- package/lib/simple-tree/tree.d.ts.map +0 -1
- package/lib/simple-tree/tree.js +0 -66
- package/lib/simple-tree/tree.js.map +0 -1
- package/lib/simple-tree/treeNodeApi.d.ts.map +0 -1
- package/lib/simple-tree/treeNodeApi.js.map +0 -1
- package/lib/simple-tree/treeNodeKernel.d.ts +0 -26
- package/lib/simple-tree/treeNodeKernel.d.ts.map +0 -1
- package/lib/simple-tree/treeNodeKernel.js.map +0 -1
- package/lib/simple-tree/types.d.ts.map +0 -1
- package/lib/simple-tree/types.js.map +0 -1
- package/src/feature-libraries/contextuallyTyped.ts +0 -582
- package/src/feature-libraries/schema-aware/README.md +0 -19
- package/src/feature-libraries/schema-aware/index.ts +0 -16
- package/src/feature-libraries/schema-aware/schemaAware.ts +0 -135
- package/src/simple-tree/nodeKeys.ts +0 -42
- /package/dist/simple-tree/{testRecursiveDomain.js → api/testRecursiveDomain.js} +0 -0
- /package/lib/simple-tree/{testRecursiveDomain.js → api/testRecursiveDomain.js} +0 -0
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.cursorToJsonObject = exports.singleJsonCursor = void 0;
|
|
7
|
+
exports.typedJsonCursor = exports.cursorToJsonObject = exports.singleJsonCursor = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
9
|
const index_js_1 = require("../../core/index.js");
|
|
10
10
|
const index_js_2 = require("../../feature-libraries/index.js");
|
|
11
|
+
const index_js_3 = require("../../util/index.js");
|
|
11
12
|
const leafDomain_js_1 = require("../leafDomain.js");
|
|
12
13
|
const jsonDomainSchema_js_1 = require("./jsonDomainSchema.js");
|
|
13
14
|
const internal_2 = require("@fluidframework/runtime-utils/internal");
|
|
@@ -28,7 +29,7 @@ const adapter = {
|
|
|
28
29
|
if (node === null) {
|
|
29
30
|
return leafDomain_js_1.leaf.null.name;
|
|
30
31
|
}
|
|
31
|
-
else if (
|
|
32
|
+
else if ((0, index_js_3.isReadonlyArray)(node)) {
|
|
32
33
|
return jsonDomainSchema_js_1.jsonArray.name;
|
|
33
34
|
}
|
|
34
35
|
else {
|
|
@@ -42,7 +43,7 @@ const adapter = {
|
|
|
42
43
|
if (node === null) {
|
|
43
44
|
return [];
|
|
44
45
|
}
|
|
45
|
-
else if (
|
|
46
|
+
else if ((0, index_js_3.isReadonlyArray)(node)) {
|
|
46
47
|
return node.length === 0 ? [] : [index_js_1.EmptyKey];
|
|
47
48
|
}
|
|
48
49
|
else {
|
|
@@ -61,7 +62,7 @@ const adapter = {
|
|
|
61
62
|
if (node === null) {
|
|
62
63
|
return [];
|
|
63
64
|
}
|
|
64
|
-
if (
|
|
65
|
+
if ((0, index_js_3.isReadonlyArray)(node)) {
|
|
65
66
|
return key === index_js_1.EmptyKey ? node : [];
|
|
66
67
|
}
|
|
67
68
|
if (Object.prototype.hasOwnProperty.call(node, key)) {
|
|
@@ -73,7 +74,8 @@ const adapter = {
|
|
|
73
74
|
},
|
|
74
75
|
};
|
|
75
76
|
/**
|
|
76
|
-
* Used to read a
|
|
77
|
+
* Used to read generic json compatible data as a tree in the JSON domain.
|
|
78
|
+
* The returned tree will have a schema in the json domain as defined by {@link jsonRoot}.
|
|
77
79
|
*
|
|
78
80
|
* @returns an {@link ITreeCursorSynchronous} for a single {@link JsonCompatible}.
|
|
79
81
|
*/
|
|
@@ -123,4 +125,73 @@ function cursorToJsonObject(reader) {
|
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
exports.cursorToJsonObject = cursorToJsonObject;
|
|
128
|
+
const typedJsonSymbol = Symbol("JSON Cursor Type");
|
|
129
|
+
function isObject(json) {
|
|
130
|
+
if (typeof json === "object" && json !== null) {
|
|
131
|
+
const typed = json;
|
|
132
|
+
return typed[typedJsonSymbol] !== undefined;
|
|
133
|
+
}
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
const typedAdapter = {
|
|
137
|
+
value: (node) => {
|
|
138
|
+
if ((0, internal_2.isFluidHandle)(node)) {
|
|
139
|
+
return node;
|
|
140
|
+
}
|
|
141
|
+
// TODO: Get rid of this cast by combining TypedJsonCompatible and JsonCompatible into a single cursor with flags to configure behavior.
|
|
142
|
+
// This cast is necessary because TypedJsonCompatible can have Fluid handles underneath it, however, `adapter` only cares if `node` itself is a FluidHandle, which it is not.
|
|
143
|
+
return adapter.value(node);
|
|
144
|
+
},
|
|
145
|
+
type: (node) => {
|
|
146
|
+
if ((0, internal_2.isFluidHandle)(node)) {
|
|
147
|
+
return leafDomain_js_1.leaf.handle.name;
|
|
148
|
+
}
|
|
149
|
+
if (isObject(node)) {
|
|
150
|
+
const type = node[typedJsonSymbol];
|
|
151
|
+
return type instanceof index_js_2.TreeNodeSchemaBase ? type.name : (0, index_js_3.brand)(type);
|
|
152
|
+
}
|
|
153
|
+
return adapter.type(node);
|
|
154
|
+
},
|
|
155
|
+
keysFromNode: (node) => {
|
|
156
|
+
if ((0, internal_2.isFluidHandle)(node)) {
|
|
157
|
+
return [];
|
|
158
|
+
}
|
|
159
|
+
return adapter.keysFromNode(node);
|
|
160
|
+
},
|
|
161
|
+
getFieldFromNode: (node, key) => {
|
|
162
|
+
if ((0, internal_2.isFluidHandle)(node)) {
|
|
163
|
+
return [];
|
|
164
|
+
}
|
|
165
|
+
const field = adapter.getFieldFromNode(node, key);
|
|
166
|
+
if ((0, index_js_3.isReadonlyArray)(field) && field.length === 1 && (0, index_js_3.isReadonlyArray)(field[0])) {
|
|
167
|
+
// If the field is an array wrapping another array, then unbox to the inner array
|
|
168
|
+
return field[0];
|
|
169
|
+
}
|
|
170
|
+
return field;
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* A variant of {@link singleJsonCursor} which allows types to be provided for nodes.
|
|
175
|
+
*
|
|
176
|
+
* @remarks Types are optional, but if present will be used to derive the type of the node when the cursor is read.
|
|
177
|
+
*
|
|
178
|
+
* This cursor differs from singleJsonCursor in that it inlines arrays, (arrays are not boxed into an "array node" but are directly interpreted as sequence fields).
|
|
179
|
+
*
|
|
180
|
+
* It also allows Fluid handles as input.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```ts
|
|
184
|
+
* const cursor = typedJsonCursor({
|
|
185
|
+
* [typedJsonCursor.type]: Point,
|
|
186
|
+
* x: 3,
|
|
187
|
+
* y: 42
|
|
188
|
+
* });
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
const singleTypedJsonCursor = function (root) {
|
|
192
|
+
return (0, index_js_2.stackTreeNodeCursor)(typedAdapter, root);
|
|
193
|
+
};
|
|
194
|
+
exports.typedJsonCursor = singleTypedJsonCursor;
|
|
195
|
+
singleTypedJsonCursor.type = typedJsonSymbol;
|
|
196
|
+
// #endregion TypedJsonCursor
|
|
126
197
|
//# sourceMappingURL=jsonCursor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonCursor.js","sourceRoot":"","sources":["../../../src/domains/json/jsonCursor.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D,kDAO6B;AAC7B,+DAA2F;AAE3F,oDAAwC;AAExC,+DAA8D;AAC9D,qEAAuE;AAEvE,MAAM,OAAO,GAAkC;IAC9C,KAAK,EAAE,CAAC,IAAoB,EAAE,EAAE,CAC/B,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QACxC,CAAC,CAAC,SAAS,CAAC,2CAA2C;QACvD,CAAC,CAAC,IAAI,EAAE,2DAA2D;IACrE,IAAI,EAAE,CAAC,IAAoB,EAAE,EAAE;QAC9B,MAAM,IAAI,GAAG,OAAO,IAAI,CAAC;QAEzB,QAAQ,IAAI,EAAE,CAAC;YACd,KAAK,QAAQ;gBACZ,OAAO,oBAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACzB,KAAK,QAAQ;gBACZ,OAAO,oBAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACzB,KAAK,SAAS;gBACb,OAAO,oBAAI,CAAC,OAAO,CAAC,IAAI,CAAC;YAC1B;gBACC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;oBACnB,OAAO,oBAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBACvB,CAAC;qBAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;oBAChC,OAAO,+BAAS,CAAC,IAAI,CAAC;gBACvB,CAAC;qBAAM,CAAC;oBACP,OAAO,gCAAU,CAAC,IAAI,CAAC;gBACxB,CAAC;QACH,CAAC;IACF,CAAC;IACD,YAAY,EAAE,CAAC,IAAoB,EAAuB,EAAE;QAC3D,QAAQ,OAAO,IAAI,EAAE,CAAC;YACrB,KAAK,QAAQ;gBACZ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ACd,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC;iBACjC,CAAC,CAAC;gBACH,IAAA,iBAAM,EAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,+BAA+B,CAAC,CAAC;YACnE,CAAC,CAAC,CAAC;YACH,OAAO,MAAM,CAAC;QACf,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACT,IAAA,iBAAM,EAAC,IAAI,KAAK,oBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;YAC7D,OAAO,IAAI,CAAC;QACb,CAAC;IACF,CAAC;AACF,CAAC;AArCD,gDAqCC","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\";\n\nimport {\n\tEmptyKey,\n\ttype FieldKey,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\tmapCursorField,\n\tmapCursorFields,\n} from \"../../core/index.js\";\nimport { type CursorAdapter, stackTreeNodeCursor } from \"../../feature-libraries/index.js\";\nimport type { JsonCompatible } from \"../../util/index.js\";\nimport { leaf } from \"../leafDomain.js\";\n\nimport { jsonArray, jsonObject } from \"./jsonDomainSchema.js\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils/internal\";\n\nconst adapter: CursorAdapter<JsonCompatible> = {\n\tvalue: (node: JsonCompatible) =>\n\t\tnode !== null && typeof node === \"object\"\n\t\t\t? undefined // arrays and objects have no defined value\n\t\t\t: node, // null, boolean, numbers, and strings are their own values\n\ttype: (node: JsonCompatible) => {\n\t\tconst type = typeof node;\n\n\t\tswitch (type) {\n\t\t\tcase \"number\":\n\t\t\t\treturn leaf.number.name;\n\t\t\tcase \"string\":\n\t\t\t\treturn leaf.string.name;\n\t\t\tcase \"boolean\":\n\t\t\t\treturn leaf.boolean.name;\n\t\t\tdefault:\n\t\t\t\tif (node === null) {\n\t\t\t\t\treturn leaf.null.name;\n\t\t\t\t} else if (Array.isArray(node)) {\n\t\t\t\t\treturn jsonArray.name;\n\t\t\t\t} else {\n\t\t\t\t\treturn jsonObject.name;\n\t\t\t\t}\n\t\t}\n\t},\n\tkeysFromNode: (node: JsonCompatible): readonly FieldKey[] => {\n\t\tswitch (typeof node) {\n\t\t\tcase \"object\":\n\t\t\t\tif (node === null) {\n\t\t\t\t\treturn [];\n\t\t\t\t} else if (Array.isArray(node)) {\n\t\t\t\t\treturn node.length === 0 ? [] : [EmptyKey];\n\t\t\t\t} else {\n\t\t\t\t\treturn Object.keys(node) as FieldKey[];\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn [];\n\t\t}\n\t},\n\tgetFieldFromNode: (node: JsonCompatible, key: FieldKey): readonly JsonCompatible[] => {\n\t\t// Object.prototype.hasOwnProperty can return true for strings (ex: with key \"0\"), so we have to filter them out.\n\t\t// Rather than just special casing strings, we can handle them with an early return for all primitives.\n\t\tif (typeof node !== \"object\") {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (node === null) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (Array.isArray(node)) {\n\t\t\treturn key === EmptyKey ? node : [];\n\t\t}\n\n\t\tif (Object.prototype.hasOwnProperty.call(node, key)) {\n\t\t\tconst field = node[key];\n\t\t\tassert(\n\t\t\t\tfield !== undefined,\n\t\t\t\t0x41e /* explicit undefined fields should not be preserved in JSON */,\n\t\t\t);\n\t\t\treturn [field];\n\t\t}\n\n\t\treturn [];\n\t},\n};\n\n/**\n * Used to read a Jsonable tree for testing and benchmarking.\n *\n * @returns an {@link ITreeCursorSynchronous} for a single {@link JsonCompatible}.\n */\nexport function singleJsonCursor(root: JsonCompatible): ITreeCursorSynchronous {\n\treturn stackTreeNodeCursor(adapter, root);\n}\n\n/**\n * Extract a JS object tree from the contents of the given ITreeCursor.\n * Assumes that ITreeCursor contains only unaugmented JsonTypes.\n */\nexport function cursorToJsonObject(reader: ITreeCursor): JsonCompatible {\n\tconst type = reader.type;\n\n\tswitch (type) {\n\t\tcase leaf.number.name:\n\t\tcase leaf.boolean.name:\n\t\tcase leaf.string.name:\n\t\t\tassert(reader.value !== undefined, 0x84f /* out of schema: missing value */);\n\t\t\tassert(!isFluidHandle(reader.value), 0x850 /* out of schema: unexpected FluidHandle */);\n\t\t\treturn reader.value;\n\t\tcase jsonArray.name: {\n\t\t\treader.enterField(EmptyKey);\n\t\t\tconst result = mapCursorField(reader, cursorToJsonObject);\n\t\t\treader.exitField();\n\t\t\treturn result;\n\t\t}\n\t\tcase jsonObject.name: {\n\t\t\tconst result: JsonCompatible = {};\n\t\t\tmapCursorFields(reader, (cursor) => {\n\t\t\t\tconst key = cursor.getFieldKey();\n\t\t\t\tassert(cursor.firstNode(), 0x420 /* expected non-empty field */);\n\t\t\t\t// like `result[key] = cursorToJsonObject(reader);` except safe when keyString == \"__proto__\".\n\t\t\t\tObject.defineProperty(result, key, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: cursorToJsonObject(reader),\n\t\t\t\t});\n\t\t\t\tassert(!cursor.nextNode(), 0x421 /* expected exactly one node */);\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\tdefault: {\n\t\t\tassert(type === leaf.null.name, 0x422 /* unexpected type */);\n\t\t\treturn null;\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"jsonCursor.js","sourceRoot":"","sources":["../../../src/domains/json/jsonCursor.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D,kDAO6B;AAC7B,+DAI0C;AAC1C,kDAAkF;AAClF,oDAAwC;AAExC,+DAA8D;AAC9D,qEAAuE;AAGvE,MAAM,OAAO,GAAkC;IAC9C,KAAK,EAAE,CAAC,IAAoB,EAAE,EAAE,CAC/B,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QACxC,CAAC,CAAC,SAAS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EACzB,GAAa,EACoB,EAAE;QACnC,IAAI,IAAA,wBAAa,EAAC,IAAI,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,CAAC;QACX,CAAC;QAED,MAAM,KAAK,GAAG,OAAO,CAAC,gBAAgB,CAAC,IAAsB,EAAE,GAAG,CAAC,CAAC;QACpE,IAAI,IAAA,0BAAe,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,IAAA,0BAAe,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/E,iFAAiF;YACjF,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;CACD,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,qBAAqB,GAAG,UAAU,IAAyB;IAChE,OAAO,IAAA,8BAAmB,EAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC,CAAC;AAIgC,gDAAe;AAFjD,qBAAqB,CAAC,IAAI,GAAG,eAAe,CAAC;AAI7C,6BAA6B","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\";\n\nimport {\n\tEmptyKey,\n\ttype FieldKey,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\tmapCursorField,\n\tmapCursorFields,\n} from \"../../core/index.js\";\nimport {\n\ttype CursorAdapter,\n\tstackTreeNodeCursor,\n\tTreeNodeSchemaBase,\n} from \"../../feature-libraries/index.js\";\nimport { brand, isReadonlyArray, type JsonCompatible } from \"../../util/index.js\";\nimport { leaf } from \"../leafDomain.js\";\n\nimport { jsonArray, jsonObject } from \"./jsonDomainSchema.js\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils/internal\";\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces/internal\";\n\nconst adapter: CursorAdapter<JsonCompatible> = {\n\tvalue: (node: JsonCompatible) =>\n\t\tnode !== null && typeof node === \"object\"\n\t\t\t? undefined // arrays and objects have no defined value\n\t\t\t: node, // null, boolean, numbers, and strings are their own values\n\ttype: (node: JsonCompatible) => {\n\t\tconst type = typeof node;\n\n\t\tswitch (type) {\n\t\t\tcase \"number\":\n\t\t\t\treturn leaf.number.name;\n\t\t\tcase \"string\":\n\t\t\t\treturn leaf.string.name;\n\t\t\tcase \"boolean\":\n\t\t\t\treturn leaf.boolean.name;\n\t\t\tdefault:\n\t\t\t\tif (node === null) {\n\t\t\t\t\treturn leaf.null.name;\n\t\t\t\t} else if (isReadonlyArray(node)) {\n\t\t\t\t\treturn jsonArray.name;\n\t\t\t\t} else {\n\t\t\t\t\treturn jsonObject.name;\n\t\t\t\t}\n\t\t}\n\t},\n\tkeysFromNode: (node: JsonCompatible): readonly FieldKey[] => {\n\t\tswitch (typeof node) {\n\t\t\tcase \"object\":\n\t\t\t\tif (node === null) {\n\t\t\t\t\treturn [];\n\t\t\t\t} else if (isReadonlyArray(node)) {\n\t\t\t\t\treturn node.length === 0 ? [] : [EmptyKey];\n\t\t\t\t} else {\n\t\t\t\t\treturn Object.keys(node) as FieldKey[];\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn [];\n\t\t}\n\t},\n\tgetFieldFromNode: (node: JsonCompatible, key: FieldKey): readonly JsonCompatible[] => {\n\t\t// Object.prototype.hasOwnProperty can return true for strings (ex: with key \"0\"), so we have to filter them out.\n\t\t// Rather than just special casing strings, we can handle them with an early return for all primitives.\n\t\tif (typeof node !== \"object\") {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (node === null) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (isReadonlyArray(node)) {\n\t\t\treturn key === EmptyKey ? node : [];\n\t\t}\n\n\t\tif (Object.prototype.hasOwnProperty.call(node, key)) {\n\t\t\tconst field = node[key];\n\t\t\tassert(\n\t\t\t\tfield !== undefined,\n\t\t\t\t0x41e /* explicit undefined fields should not be preserved in JSON */,\n\t\t\t);\n\t\t\treturn [field];\n\t\t}\n\n\t\treturn [];\n\t},\n};\n\n/**\n * Used to read generic json compatible data as a tree in the JSON domain.\n * The returned tree will have a schema in the json domain as defined by {@link jsonRoot}.\n *\n * @returns an {@link ITreeCursorSynchronous} for a single {@link JsonCompatible}.\n */\nexport function singleJsonCursor(root: JsonCompatible): ITreeCursorSynchronous {\n\treturn stackTreeNodeCursor(adapter, root);\n}\n\n/**\n * Extract a JS object tree from the contents of the given ITreeCursor.\n * Assumes that ITreeCursor contains only unaugmented JsonTypes.\n */\nexport function cursorToJsonObject(reader: ITreeCursor): JsonCompatible {\n\tconst type = reader.type;\n\n\tswitch (type) {\n\t\tcase leaf.number.name:\n\t\tcase leaf.boolean.name:\n\t\tcase leaf.string.name:\n\t\t\tassert(reader.value !== undefined, 0x84f /* out of schema: missing value */);\n\t\t\tassert(!isFluidHandle(reader.value), 0x850 /* out of schema: unexpected FluidHandle */);\n\t\t\treturn reader.value;\n\t\tcase jsonArray.name: {\n\t\t\treader.enterField(EmptyKey);\n\t\t\tconst result = mapCursorField(reader, cursorToJsonObject);\n\t\t\treader.exitField();\n\t\t\treturn result;\n\t\t}\n\t\tcase jsonObject.name: {\n\t\t\tconst result: JsonCompatible = {};\n\t\t\tmapCursorFields(reader, (cursor) => {\n\t\t\t\tconst key = cursor.getFieldKey();\n\t\t\t\tassert(cursor.firstNode(), 0x420 /* expected non-empty field */);\n\t\t\t\t// like `result[key] = cursorToJsonObject(reader);` except safe when keyString == \"__proto__\".\n\t\t\t\tObject.defineProperty(result, key, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: cursorToJsonObject(reader),\n\t\t\t\t});\n\t\t\t\tassert(!cursor.nextNode(), 0x421 /* expected exactly one node */);\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\tdefault: {\n\t\t\tassert(type === leaf.null.name, 0x422 /* unexpected type */);\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n// #region TypedJsonCursor\n\n/** Used to construct a {@link TypedJsonCursor} */\nexport interface TypedJsonCompatibleObject {\n\t[key: string]: TypedJsonCompatible;\n\t[typedJsonSymbol]: string | TreeNodeSchemaBase;\n}\n\n/** Used to construct a {@link TypedJsonCursor} */\nexport type TypedJsonCompatible =\n\t| JsonCompatible\n\t| TypedJsonCompatibleObject\n\t| TypedJsonCompatible[]\n\t| IFluidHandle\n\t| JsonCompatible;\n\nconst typedJsonSymbol = Symbol(\"JSON Cursor Type\");\n\nfunction isObject(json: TypedJsonCompatible): json is TypedJsonCompatibleObject {\n\tif (typeof json === \"object\" && json !== null) {\n\t\tconst typed = json as Partial<TypedJsonCompatibleObject>;\n\t\treturn typed[typedJsonSymbol] !== undefined;\n\t}\n\n\treturn false;\n}\n\nconst typedAdapter: CursorAdapter<TypedJsonCompatible> = {\n\tvalue: (node: TypedJsonCompatible) => {\n\t\tif (isFluidHandle(node)) {\n\t\t\treturn node;\n\t\t}\n\n\t\t// TODO: Get rid of this cast by combining TypedJsonCompatible and JsonCompatible into a single cursor with flags to configure behavior.\n\t\t// This cast is necessary because TypedJsonCompatible can have Fluid handles underneath it, however, `adapter` only cares if `node` itself is a FluidHandle, which it is not.\n\t\treturn adapter.value(node as JsonCompatible);\n\t},\n\ttype: (node: TypedJsonCompatible) => {\n\t\tif (isFluidHandle(node)) {\n\t\t\treturn leaf.handle.name;\n\t\t}\n\n\t\tif (isObject(node)) {\n\t\t\tconst type = node[typedJsonSymbol];\n\t\t\treturn type instanceof TreeNodeSchemaBase ? type.name : brand(type);\n\t\t}\n\n\t\treturn adapter.type(node as JsonCompatible);\n\t},\n\tkeysFromNode: (node: TypedJsonCompatible): readonly FieldKey[] => {\n\t\tif (isFluidHandle(node)) {\n\t\t\treturn [];\n\t\t}\n\t\treturn adapter.keysFromNode(node as JsonCompatible);\n\t},\n\tgetFieldFromNode: (\n\t\tnode: TypedJsonCompatible,\n\t\tkey: FieldKey,\n\t): readonly TypedJsonCompatible[] => {\n\t\tif (isFluidHandle(node)) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst field = adapter.getFieldFromNode(node as JsonCompatible, key);\n\t\tif (isReadonlyArray(field) && field.length === 1 && isReadonlyArray(field[0])) {\n\t\t\t// If the field is an array wrapping another array, then unbox to the inner array\n\t\t\treturn field[0];\n\t\t}\n\n\t\treturn field;\n\t},\n};\n\n/**\n * A variant of {@link singleJsonCursor} which allows types to be provided for nodes.\n *\n * @remarks Types are optional, but if present will be used to derive the type of the node when the cursor is read.\n *\n * This cursor differs from singleJsonCursor in that it inlines arrays, (arrays are not boxed into an \"array node\" but are directly interpreted as sequence fields).\n *\n * It also allows Fluid handles as input.\n *\n * @example\n * ```ts\n * const cursor = typedJsonCursor({\n * [typedJsonCursor.type]: Point,\n * x: 3,\n * y: 42\n * });\n * ```\n */\nconst singleTypedJsonCursor = function (root: TypedJsonCompatible): ITreeCursorSynchronous {\n\treturn stackTreeNodeCursor(typedAdapter, root);\n};\n\nsingleTypedJsonCursor.type = typedJsonSymbol;\n\nexport { singleTypedJsonCursor as typedJsonCursor };\n\n// #endregion TypedJsonCursor\n"]}
|
|
@@ -7,8 +7,18 @@ import { FlexFieldSchema } from "../../feature-libraries/index.js";
|
|
|
7
7
|
/**
|
|
8
8
|
* Types allowed as roots of Json content.
|
|
9
9
|
*/
|
|
10
|
-
export declare const jsonRoot: readonly [() => import("../../feature-libraries/index.js").FlexMapNodeSchema<"com.fluidframework.json.object", FlexFieldSchema<import("../../feature-libraries/index.js").Optional, readonly [any, () => import("../../feature-libraries/index.js").
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export declare const jsonRoot: readonly [() => import("../../feature-libraries/index.js").FlexMapNodeSchema<"com.fluidframework.json.object", FlexFieldSchema<import("../../feature-libraries/index.js").Optional, readonly [any, () => import("../../feature-libraries/index.js").FlexObjectNodeSchema<"com.fluidframework.json.array", {
|
|
11
|
+
readonly [x: string]: FlexFieldSchema<import("../../feature-libraries/index.js").Sequence, readonly [any, any, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>;
|
|
12
|
+
}>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>>, () => import("../../feature-libraries/index.js").FlexObjectNodeSchema<"com.fluidframework.json.array", {
|
|
13
|
+
readonly [x: string]: FlexFieldSchema<import("../../feature-libraries/index.js").Sequence, readonly [() => import("../../feature-libraries/index.js").FlexMapNodeSchema<"com.fluidframework.json.object", FlexFieldSchema<import("../../feature-libraries/index.js").Optional, readonly [any, any, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>>, any, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>;
|
|
14
|
+
}>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>];
|
|
15
|
+
export declare const jsonObject: import("../../feature-libraries/index.js").FlexMapNodeSchema<"com.fluidframework.json.object", FlexFieldSchema<import("../../feature-libraries/index.js").Optional, readonly [() => import("../../feature-libraries/index.js").FlexMapNodeSchema<"com.fluidframework.json.object", FlexFieldSchema<import("../../feature-libraries/index.js").Optional, readonly [any, () => import("../../feature-libraries/index.js").FlexObjectNodeSchema<"com.fluidframework.json.array", {
|
|
16
|
+
readonly [x: string]: FlexFieldSchema<import("../../feature-libraries/index.js").Sequence, readonly [any, any, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>;
|
|
17
|
+
}>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>>, () => import("../../feature-libraries/index.js").FlexObjectNodeSchema<"com.fluidframework.json.array", {
|
|
18
|
+
readonly [x: string]: FlexFieldSchema<import("../../feature-libraries/index.js").Sequence, readonly [() => import("../../feature-libraries/index.js").FlexMapNodeSchema<"com.fluidframework.json.object", FlexFieldSchema<import("../../feature-libraries/index.js").Optional, readonly [any, any, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>>, any, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>;
|
|
19
|
+
}>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>>;
|
|
20
|
+
export declare const jsonArray: import("../../feature-libraries/index.js").FlexObjectNodeSchema<"com.fluidframework.json.array", {
|
|
21
|
+
readonly [x: string]: FlexFieldSchema<import("../../feature-libraries/index.js").Sequence, readonly [() => import("../../feature-libraries/index.js").FlexMapNodeSchema<"com.fluidframework.json.object", FlexFieldSchema<import("../../feature-libraries/index.js").Optional, readonly [any, () => import("../../feature-libraries/index.js").FlexObjectNodeSchema<"com.fluidframework.json.array", any>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>>, () => import("../../feature-libraries/index.js").FlexObjectNodeSchema<"com.fluidframework.json.array", any>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.string", ValueSchema.String>, import("../../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.null", ValueSchema.Null>]>;
|
|
22
|
+
}>;
|
|
13
23
|
export declare const jsonSchema: import("../../feature-libraries/schemaBuilderBase.js").SchemaLibrary;
|
|
14
24
|
//# sourceMappingURL=jsonDomainSchema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonDomainSchema.d.ts","sourceRoot":"","sources":["../../../src/domains/json/jsonDomainSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,
|
|
1
|
+
{"version":3,"file":"jsonDomainSchema.d.ts","sourceRoot":"","sources":["../../../src/domains/json/jsonDomainSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAY,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAGN,eAAe,EAEf,MAAM,kCAAkC,CAAC;AAW1C;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;qcAAkE,CAAC;AAOxF,eAAO,MAAM,UAAU;;;;ucAGtB,CAAC;AAEF,eAAO,MAAM,SAAS;;EAEpB,CAAC;AAEH,eAAO,MAAM,UAAU,sEAAwB,CAAC"}
|
|
@@ -5,9 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.jsonSchema = exports.jsonArray = exports.jsonObject = exports.jsonRoot = void 0;
|
|
8
|
-
|
|
8
|
+
// Adding this unused import makes the generated d.ts file produced by TypeScript stop breaking API-Extractor's rollup generation.
|
|
9
|
+
// Without this import, TypeScript generates inline `import("../..")` statements in the d.ts file,
|
|
10
|
+
// which API-Extractor leaves as is when generating the rollup, leaving them pointing at the wrong directory.
|
|
11
|
+
// API-Extractor issue: https://github.com/microsoft/rushstack/issues/4507
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports
|
|
13
|
+
const index_js_1 = require("../../core/index.js");
|
|
14
|
+
const index_js_2 = require("../../feature-libraries/index.js");
|
|
9
15
|
const leafDomain_js_1 = require("../leafDomain.js");
|
|
10
|
-
const builder = new
|
|
16
|
+
const builder = new index_js_2.SchemaBuilderInternal({
|
|
11
17
|
scope: "com.fluidframework.json",
|
|
12
18
|
libraries: [leafDomain_js_1.leaf.library],
|
|
13
19
|
});
|
|
@@ -18,7 +24,9 @@ const jsonPrimitives = [...leafDomain_js_1.leaf.primitives, leafDomain_js_1.leaf
|
|
|
18
24
|
exports.jsonRoot = [() => exports.jsonObject, () => exports.jsonArray, ...jsonPrimitives];
|
|
19
25
|
{
|
|
20
26
|
}
|
|
21
|
-
exports.jsonObject = builder.mapRecursive("object",
|
|
22
|
-
exports.jsonArray = builder.
|
|
27
|
+
exports.jsonObject = builder.mapRecursive("object", index_js_2.FlexFieldSchema.createUnsafe(index_js_2.FieldKinds.optional, exports.jsonRoot));
|
|
28
|
+
exports.jsonArray = builder.objectRecursive("array", {
|
|
29
|
+
[index_js_1.EmptyKey]: index_js_2.FlexFieldSchema.createUnsafe(index_js_2.FieldKinds.sequence, exports.jsonRoot),
|
|
30
|
+
});
|
|
23
31
|
exports.jsonSchema = builder.intoLibrary();
|
|
24
32
|
//# sourceMappingURL=jsonDomainSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonDomainSchema.js","sourceRoot":"","sources":["../../../src/domains/json/jsonDomainSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"jsonDomainSchema.js","sourceRoot":"","sources":["../../../src/domains/json/jsonDomainSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kIAAkI;AAClI,kGAAkG;AAClG,6GAA6G;AAC7G,0EAA0E;AAC1E,+FAA+F;AAC/F,kDAA4D;AAC5D,+DAK0C;AAE1C,oDAAwC;AAExC,MAAM,OAAO,GAAG,IAAI,gCAAqB,CAAC;IACzC,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,CAAC,oBAAI,CAAC,OAAO,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,CAAC,GAAG,oBAAI,CAAC,UAAU,EAAE,oBAAI,CAAC,IAAI,CAAU,CAAC;AAEhE;;GAEG;AACU,QAAA,QAAQ,GAAG,CAAC,GAAG,EAAE,CAAC,kBAAU,EAAE,GAAG,EAAE,CAAC,iBAAS,EAAE,GAAG,cAAc,CAAU,CAAC;AAExF,CAAC;AAGD,CAAC;AAEY,QAAA,UAAU,GAAG,OAAO,CAAC,YAAY,CAC7C,QAAQ,EACR,0BAAe,CAAC,YAAY,CAAC,qBAAU,CAAC,QAAQ,EAAE,gBAAQ,CAAC,CAC3D,CAAC;AAEW,QAAA,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,EAAE;IACzD,CAAC,mBAAQ,CAAC,EAAE,0BAAe,CAAC,YAAY,CAAC,qBAAU,CAAC,QAAQ,EAAE,gBAAQ,CAAC;CACvE,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Adding this unused import makes the generated d.ts file produced by TypeScript stop breaking API-Extractor's rollup generation.\n// Without this import, TypeScript generates inline `import(\"../..\")` statements in the d.ts file,\n// which API-Extractor leaves as is when generating the rollup, leaving them pointing at the wrong directory.\n// API-Extractor issue: https://github.com/microsoft/rushstack/issues/4507\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports\nimport { EmptyKey, ValueSchema } from \"../../core/index.js\";\nimport {\n\tFieldKinds,\n\ttype FlexAllowedTypes,\n\tFlexFieldSchema,\n\tSchemaBuilderInternal,\n} from \"../../feature-libraries/index.js\";\nimport type { requireAssignableTo } from \"../../util/index.js\";\nimport { leaf } from \"../leafDomain.js\";\n\nconst builder = new SchemaBuilderInternal({\n\tscope: \"com.fluidframework.json\",\n\tlibraries: [leaf.library],\n});\n\nconst jsonPrimitives = [...leaf.primitives, leaf.null] as const;\n\n/**\n * Types allowed as roots of Json content.\n */\nexport const jsonRoot = [() => jsonObject, () => jsonArray, ...jsonPrimitives] as const;\n\n{\n\t// Recursive objects don't get this type checking automatically, so confirm it\n\ttype _check = requireAssignableTo<typeof jsonRoot, FlexAllowedTypes>;\n}\n\nexport const jsonObject = builder.mapRecursive(\n\t\"object\",\n\tFlexFieldSchema.createUnsafe(FieldKinds.optional, jsonRoot),\n);\n\nexport const jsonArray = builder.objectRecursive(\"array\", {\n\t[EmptyKey]: FlexFieldSchema.createUnsafe(FieldKinds.sequence, jsonRoot),\n});\n\nexport const jsonSchema = builder.intoLibrary();\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leafDomain.d.ts","sourceRoot":"","sources":["../../src/domains/leafDomain.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAmB/C
|
|
1
|
+
{"version":3,"file":"leafDomain.d.ts","sourceRoot":"","sources":["../../src/domains/leafDomain.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAmB/C;;GAEG;AACH,eAAO,MAAM,IAAI;IAChB;;;;;;;;;;;;;OAaG;;IAGH;;OAEG;;IAGH;;;;;;;;;;;;OAYG;;IAGH;;OAEG;;IAGH;;;;;;;OAOG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;CAEH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leafDomain.js","sourceRoot":"","sources":["../../src/domains/leafDomain.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA+C;AAC/C,4DAAsE;AAEtE;;GAEG;AACH,MAAM,OAAO,GAAG,IAAI,gCAAqB,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,CAAC,CAAC;AAEhF,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,sBAAW,CAAC,MAAM,CAAC,CAAC;AAC1D,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,sBAAW,CAAC,OAAO,CAAC,CAAC;AAC7D,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,sBAAW,CAAC,MAAM,CAAC,CAAC;AAC1D,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,sBAAW,CAAC,WAAW,CAAC,CAAC;AAC/D,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,sBAAW,CAAC,IAAI,CAAC,CAAC;AAE1D,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AACtD,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAU,CAAC;AAEzD,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;AAEtC
|
|
1
|
+
{"version":3,"file":"leafDomain.js","sourceRoot":"","sources":["../../src/domains/leafDomain.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA+C;AAC/C,4DAAsE;AAEtE;;GAEG;AACH,MAAM,OAAO,GAAG,IAAI,gCAAqB,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,CAAC,CAAC;AAEhF,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,sBAAW,CAAC,MAAM,CAAC,CAAC;AAC1D,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,sBAAW,CAAC,OAAO,CAAC,CAAC;AAC7D,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,sBAAW,CAAC,MAAM,CAAC,CAAC;AAC1D,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,sBAAW,CAAC,WAAW,CAAC,CAAC;AAC/D,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,sBAAW,CAAC,IAAI,CAAC,CAAC;AAE1D,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AACtD,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAU,CAAC;AAEzD,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;AAEtC;;GAEG;AACU,QAAA,IAAI,GAAG;IACnB;;;;;;;;;;;;;OAaG;IACH,MAAM;IAEN;;OAEG;IACH,OAAO;IAEP;;;;;;;;;;;;OAYG;IACH,MAAM;IAEN;;OAEG;IACH,MAAM;IAEN;;;;;;;OAOG;IACH,IAAI,EAAE,UAAU;IAEhB;;OAEG;IACH,UAAU;IAEV;;OAEG;IACH,GAAG;IAEH;;;;;OAKG;IACH,OAAO;CACP,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ValueSchema } from \"../core/index.js\";\nimport { SchemaBuilderInternal } from \"../feature-libraries/index.js\";\n\n/**\n * Names in this domain follow https://en.wikipedia.org/wiki/Reverse_domain_name_notation\n */\nconst builder = new SchemaBuilderInternal({ scope: \"com.fluidframework.leaf\" });\n\nconst number = builder.leaf(\"number\", ValueSchema.Number);\nconst boolean = builder.leaf(\"boolean\", ValueSchema.Boolean);\nconst string = builder.leaf(\"string\", ValueSchema.String);\nconst handle = builder.leaf(\"handle\", ValueSchema.FluidHandle);\nconst nullSchema = builder.leaf(\"null\", ValueSchema.Null);\n\nconst primitives = [number, boolean, string] as const;\nconst all = [handle, nullSchema, ...primitives] as const;\n\nconst library = builder.intoLibrary();\n\n/**\n * Built-in {@link LeafNodeSchema}.\n */\nexport const leaf = {\n\t/**\n\t * {@link LeafNodeSchema} for holding a JavaScript `number`.\n\t *\n\t * @remarks\n\t * The number is a [double-precision 64-bit binary format IEEE 754](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) value, however there are some exceptions:\n\t * - `NaN`, and the infinities should not be used.\n\t * - `-0` may be converted to `0` in some cases.\n\t *\n\t * These limitations match the limitations of JSON.\n\t * @privateRemarks\n\t * TODO:\n\t * We should be much more clear about what happens if you use problematic values.\n\t * We should validate and/or normalize them when inserting content.\n\t */\n\tnumber,\n\n\t/**\n\t * {@link LeafNodeSchema} for holding a boolean.\n\t */\n\tboolean,\n\n\t/**\n\t * {@link LeafNodeSchema} for holding a JavaScript `string`.\n\t *\n\t * @remarks\n\t * Strings containing unpaired UTF-16 surrogate pair code units may not be handled correctly.\n\t *\n\t * These limitations come from the use of UTF-8 encoding of the strings, which requires them to be valid unicode.\n\t * JavaScript does not make this requirement for its strings so not all possible JavaScript strings are supported.\n\t * @privateRemarks\n\t * TODO:\n\t * We should be much more clear about what happens if you use problematic values.\n\t * We should validate and/or normalize them when inserting content.\n\t */\n\tstring,\n\n\t/**\n\t * {@link LeafNodeSchema} for holding an {@link @fluidframework/core-interfaces#(IFluidHandle:interface)}.\n\t */\n\thandle,\n\n\t/**\n\t * {@link LeafNodeSchema} for JavaScript `null`.\n\t *\n\t * @remarks\n\t * There are good [reasons to avoid using null](https://www.npmjs.com/package/%40rushstack/eslint-plugin#rushstackno-new-null) in JavaScript, however sometimes it is desired.\n\t * This {@link LeafNodeSchema} node provides the option to include nulls in trees when desired.\n\t * Unless directly inter-operating with existing data using null, consider other approaches, like wrapping the value in an optional field, or using a more specifically named empty object node.\n\t */\n\tnull: nullSchema,\n\n\t/**\n\t * The set of {@link LeafNodeSchema} which correspond to JavaScript primitive (non-object) types.\n\t */\n\tprimitives,\n\n\t/**\n\t * All {@link LeafNodeSchema} defined in this library..\n\t */\n\tall,\n\n\t/**\n\t * {@link SchemaLibrary} of the {@link LeafNodeSchema}.\n\t *\n\t * @privateRemarks\n\t * This is included by default in schema produced with {@link SchemaBuilder}.\n\t */\n\tlibrary,\n};\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 { FieldKinds,
|
|
5
|
+
import { FieldKinds, type FlexFieldSchema, type FlexImplicitAllowedTypes, type FlexImplicitFieldSchema, type FlexObjectNodeSchema, type NormalizeAllowedTypes, SchemaBuilderBase, type SchemaBuilderOptions, type Unenforced } from "../feature-libraries/index.js";
|
|
6
6
|
import type { RestrictiveReadonlyRecord } from "../util/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* Builds schema libraries, and the schema within them.
|
|
@@ -29,12 +29,6 @@ import type { RestrictiveReadonlyRecord } from "../util/index.js";
|
|
|
29
29
|
export declare class SchemaBuilder<TScope extends string = string, TName extends string | number = string> extends SchemaBuilderBase<TScope, typeof FieldKinds.required, TName> {
|
|
30
30
|
constructor(options: SchemaBuilderOptions<TScope>);
|
|
31
31
|
objectRecursive<const Name extends TName, const T extends Unenforced<RestrictiveReadonlyRecord<string, FlexImplicitFieldSchema>>>(name: Name, t: T): FlexObjectNodeSchema<`${TScope}.${Name}`, T>;
|
|
32
|
-
/**
|
|
33
|
-
* Define (and add to this library) a {@link FlexFieldNodeSchema} for a {@link Sequence}.
|
|
34
|
-
*
|
|
35
|
-
* The name must be unique among all TreeNodeSchema in the the document schema.
|
|
36
|
-
*/
|
|
37
|
-
list<Name extends TName, const T extends FlexImplicitAllowedTypes>(name: Name, allowedTypes: T): FlexFieldNodeSchema<`${TScope}.${Name}`, FlexFieldSchema<typeof FieldKinds.sequence, NormalizeAllowedTypes<T>>>;
|
|
38
32
|
/**
|
|
39
33
|
* Define a schema for an {@link FieldKinds.optional|optional field}.
|
|
40
34
|
* @remarks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaBuilder.d.ts","sourceRoot":"","sources":["../../src/domains/schemaBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EAEV,
|
|
1
|
+
{"version":3,"file":"schemaBuilder.d.ts","sourceRoot":"","sources":["../../src/domains/schemaBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EAEV,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAIlE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,aAAa,CACzB,MAAM,SAAS,MAAM,GAAG,MAAM,EAC9B,KAAK,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CACrC,SAAQ,iBAAiB,CAAC,MAAM,EAAE,OAAO,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC;gBAClD,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC;IAQxC,eAAe,CAC9B,KAAK,CAAC,IAAI,SAAS,KAAK,EACxB,KAAK,CAAC,CAAC,SAAS,UAAU,CAAC,yBAAyB,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,EACrF,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAOlB;;;;;;OAMG;IACH,OAAc,QAAQ,6JAAoC;IAE1D;;;;;;;OAOG;IACH,SAAgB,QAAQ,6JAA0B;IAElD;;;;;;OAMG;IACH,OAAc,QAAQ,6JAAoC;IAE1D;;;;;;;;;OASG;IACH,SAAgB,QAAQ,6JAA0B;IAElD;;;;;;OAMG;IACH,OAAc,QAAQ,6JAAoC;IAE1D;;;;;;;OAOG;IACH,SAAgB,QAAQ,6JAA0B;IAElD;;;;;;OAMG;IACH,OAAc,UAAU,+JAAsC;IAE9D;;;;;;;OAOG;IACH,SAAgB,UAAU,+JAA4B;CACtD"}
|
|
@@ -78,16 +78,6 @@ class SchemaBuilder extends index_js_1.SchemaBuilderBase {
|
|
|
78
78
|
objectRecursive(name, t) {
|
|
79
79
|
return this.object(name, t);
|
|
80
80
|
}
|
|
81
|
-
/**
|
|
82
|
-
* Define (and add to this library) a {@link FlexFieldNodeSchema} for a {@link Sequence}.
|
|
83
|
-
*
|
|
84
|
-
* The name must be unique among all TreeNodeSchema in the the document schema.
|
|
85
|
-
*/
|
|
86
|
-
list(name, allowedTypes) {
|
|
87
|
-
const schema = index_js_1.FlexFieldNodeSchema.create(this, this.scoped(name), this.sequence(allowedTypes));
|
|
88
|
-
this.addNodeSchema(schema);
|
|
89
|
-
return schema;
|
|
90
|
-
}
|
|
91
81
|
}
|
|
92
82
|
exports.SchemaBuilder = SchemaBuilder;
|
|
93
83
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaBuilder.js","sourceRoot":"","sources":["../../src/domains/schemaBuilder.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"schemaBuilder.js","sourceRoot":"","sources":["../../src/domains/sch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CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tFieldKinds,\n\ttype FlexFieldKind,\n\ttype FlexFieldSchema,\n\ttype FlexImplicitAllowedTypes,\n\ttype FlexImplicitFieldSchema,\n\ttype FlexObjectNodeSchema,\n\ttype NormalizeAllowedTypes,\n\tSchemaBuilderBase,\n\ttype SchemaBuilderOptions,\n\ttype Unenforced,\n} from \"../feature-libraries/index.js\";\nimport type { RestrictiveReadonlyRecord } from \"../util/index.js\";\n\nimport { leaf } from \"./leafDomain.js\";\n\n/**\n * Builds schema libraries, and the schema within them.\n *\n * @remarks\n * Fields, when inferred from {@link FlexImplicitFieldSchema}, default to the `Required` {@link FlexFieldKind} (except for in Maps, which default to `Optional`).\n * Implicitly includes `leaf` schema library by default.\n *\n * This type has some built in defaults which impact compatibility.\n * This includes which {@link FlexFieldKind}s it uses.\n * To ensure that these defaults can be updated without compatibility issues,\n * this class is versioned: the number in its name indicates its compatibility,\n * and if its defaults are changed to ones that would not be compatible with a version of the application using the previous versions,\n * this number will be updated to make it impossible for an app to implicitly do a compatibility breaking change by updating this package.\n * Major package version updates are allowed to break API compatibility, but must not break content compatibility unless a corresponding code change is made in the app to opt in.\n *\n * @privateRemarks\n * TODO: Maybe rename to DefaultSchemaBuilder1 because of the versioning implications above.\n * Same applies to SchemaBuilder.\n * TODO: figure out a way to link `leaf` above without breaking API Extractor.\n * @sealed\n * @deprecated Users of this class should either use {@link SchemaBuilderBase} and explicitly work with {@link FlexFieldSchema}, or use SchemaFactory and work at its higher level of abstraction.\n */\nexport class SchemaBuilder<\n\tTScope extends string = string,\n\tTName extends string | number = string,\n> extends SchemaBuilderBase<TScope, typeof FieldKinds.required, TName> {\n\tpublic constructor(options: SchemaBuilderOptions<TScope>) {\n\t\tsuper(FieldKinds.required, {\n\t\t\t...options,\n\t\t\tlibraries: [...(options.libraries ?? []), leaf.library],\n\t\t});\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tpublic override objectRecursive<\n\t\tconst Name extends TName,\n\t\tconst T extends Unenforced<RestrictiveReadonlyRecord<string, FlexImplicitFieldSchema>>,\n\t>(name: Name, t: T) {\n\t\treturn this.object(\n\t\t\tname,\n\t\t\tt as unknown as RestrictiveReadonlyRecord<string, FlexImplicitFieldSchema>,\n\t\t) as unknown as FlexObjectNodeSchema<`${TScope}.${Name}`, T>;\n\t}\n\n\t/**\n\t * Define a schema for an {@link FieldKinds.optional|optional field}.\n\t * @remarks\n\t * Shorthand for passing `FieldKinds.optional` to {@link FlexFieldSchema.create}.\n\t *\n\t * This method is also available as an instance method on {@link SchemaBuilder}.\n\t */\n\tpublic static optional = fieldHelper(FieldKinds.optional);\n\n\t/**\n\t * Define a schema for an {@link FieldKinds.optional|optional field}.\n\t * @remarks\n\t * Shorthand for passing `FieldKinds.optional` to {@link FlexFieldSchema.create}.\n\t *\n\t * Since this creates a {@link FlexFieldSchema} (and not a {@link FlexTreeNodeSchema}), the resulting schema is structurally typed, and not impacted by the {@link SchemaBuilderBase.scope}:\n\t * therefore this method is the same as the static version.\n\t */\n\tpublic readonly optional = SchemaBuilder.optional;\n\n\t/**\n\t * Define a schema for a {@link FieldKinds.required|required field}.\n\t * @remarks\n\t * Shorthand for passing `FieldKinds.required` to {@link FlexFieldSchema.create}.\n\t *\n\t * This method is also available as an instance method on {@link SchemaBuilder}.\n\t */\n\tpublic static required = fieldHelper(FieldKinds.required);\n\n\t/**\n\t * Define a schema for a {@link FieldKinds.required|required field}.\n\t * @remarks\n\t * Shorthand for passing `FieldKinds.required` to {@link FlexFieldSchema.create}.\n\t * Note that `FieldKinds.required` is the current default field kind, so APIs accepting {@link FlexImplicitFieldSchema}\n\t * can be passed the `allowedTypes` and will implicitly wrap it up in a {@link FieldKinds.required|required field}.\n\t *\n\t * Since this creates a {@link FlexFieldSchema} (and not a {@link FlexTreeNodeSchema}), the resulting schema is structurally typed, and not impacted by the {@link SchemaBuilderBase.scope}:\n\t * therefore this method is the same as the static version.\n\t */\n\tpublic readonly required = SchemaBuilder.required;\n\n\t/**\n\t * Define a schema for a {@link FieldKinds.sequence|sequence field}.\n\t * @remarks\n\t * Shorthand for passing `FieldKinds.sequence` to {@link FlexFieldSchema.create}.\n\t *\n\t * This method is also available as an instance method on {@link SchemaBuilder}\n\t */\n\tpublic static sequence = fieldHelper(FieldKinds.sequence);\n\n\t/**\n\t * Define a schema for a {@link FieldKinds.sequence|sequence field}.\n\t * @remarks\n\t * Shorthand for passing `FieldKinds.sequence` to {@link FlexFieldSchema.create}.\n\t *\n\t * Since this creates a {@link FlexFieldSchema} (and not a {@link FlexTreeNodeSchema}), the resulting schema is structurally typed, and not impacted by the {@link SchemaBuilderBase.scope}:\n\t * therefore this method is the same as the static version.\n\t */\n\tpublic readonly sequence = SchemaBuilder.sequence;\n\n\t/**\n\t * Define a schema for an {@link FieldKinds.identifier|identifier field}.\n\t * @remarks\n\t * Shorthand for passing `FieldKinds.identifier` to {@link TreeFieldSchema.create}.\n\t *\n\t * This method is also available as an instance method on {@link SchemaBuilder}\n\t */\n\tpublic static identifier = fieldHelper(FieldKinds.identifier);\n\n\t/**\n\t * Define a schema for a {@link FieldKinds.identifier|identifier field}.\n\t * @remarks\n\t * Shorthand for passing `FieldKinds.identifier` to {@link TreeFieldSchema.create}.\n\t *\n\t * Since this creates a {@link TreeFieldSchema} (and not a {@link FlexTreeNodeSchema}), the resulting schema is structurally typed, and not impacted by the {@link SchemaBuilderBase.scope}:\n\t * therefore this method is the same as the static version.\n\t */\n\tpublic readonly identifier = SchemaBuilder.identifier;\n}\n\n/**\n * Returns a wrapper around SchemaBuilder.field for a specific FieldKind.\n */\nfunction fieldHelper<Kind extends FlexFieldKind>(kind: Kind) {\n\treturn <const T extends FlexImplicitAllowedTypes>(\n\t\tallowedTypes: T,\n\t): FlexFieldSchema<Kind, NormalizeAllowedTypes<T>> =>\n\t\tSchemaBuilder.field(kind, allowedTypes);\n}\n"]}
|
package/dist/events/events.d.ts
CHANGED
|
@@ -94,7 +94,6 @@ export interface Listenable<TListeners extends object> {
|
|
|
94
94
|
export type Off = () => void;
|
|
95
95
|
/**
|
|
96
96
|
* Interface for an event emitter that can emit typed events to subscribed listeners.
|
|
97
|
-
* @internal
|
|
98
97
|
*/
|
|
99
98
|
export interface IEmitter<TListeners extends Listeners<TListeners>> {
|
|
100
99
|
/**
|
|
@@ -120,17 +119,14 @@ export interface IEmitter<TListeners extends Listeners<TListeners>> {
|
|
|
120
119
|
*
|
|
121
120
|
* A class can delegate handling {@link Listenable} to the returned value while using it to emit the events.
|
|
122
121
|
* See also `EventEmitter` which be used as a base class to implement {@link Listenable} via extension.
|
|
123
|
-
* @internal
|
|
124
122
|
*/
|
|
125
123
|
export declare function createEmitter<TListeners extends object>(noListeners?: NoListenersCallback<TListeners>): Listenable<TListeners> & IEmitter<TListeners> & HasListeners<TListeners>;
|
|
126
124
|
/**
|
|
127
125
|
* Called when the last listener for `eventName` is removed.
|
|
128
126
|
* Useful for determining when to clean up resources related to detecting when the event might occurs.
|
|
129
|
-
* @internal
|
|
130
127
|
*/
|
|
131
128
|
export type NoListenersCallback<TListeners extends object> = (eventName: keyof Listeners<TListeners>) => void;
|
|
132
129
|
/**
|
|
133
|
-
* @internal
|
|
134
130
|
*/
|
|
135
131
|
export interface HasListeners<TListeners extends Listeners<TListeners>> {
|
|
136
132
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/events/events.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAG9D;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,KAAK,CAAC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,IAAI,CAAC,CAAC,SAAS,MAAM,UAAU,EAC9C,SAAS,EAAE,CAAC,EACZ,GAAG,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAChC,IAAI;IAIS,cAAc,CAAC,CAAC,SAAS,MAAM,UAAU,EACxD,SAAS,EAAE,CAAC,EACZ,GAAG,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAChC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE;CAG9B"}
|
package/dist/events/events.js
CHANGED
|
@@ -11,7 +11,6 @@ const index_js_1 = require("../util/index.js");
|
|
|
11
11
|
*
|
|
12
12
|
* A class can delegate handling {@link Listenable} to the returned value while using it to emit the events.
|
|
13
13
|
* See also `EventEmitter` which be used as a base class to implement {@link Listenable} via extension.
|
|
14
|
-
* @internal
|
|
15
14
|
*/
|
|
16
15
|
function createEmitter(noListeners) {
|
|
17
16
|
return new ComposableEventEmitter(noListeners);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/events/events.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+CAA+C;AAyI/C;;;;;;GAMG;AACH,SAAgB,aAAa,CAC5B,WAA6C;IAE7C,OAAO,IAAI,sBAAsB,CAAa,WAAW,CAAC,CAAC;AAC5D,CAAC;AAJD,sCAIC;AA0BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAa,YAAY;IAQxB,uJAAuJ;IACvJ,6FAA6F;IAC7F,YAAuC,WAA6C;QAA7C,gBAAW,GAAX,WAAW,CAAkC;QAPjE,cAAS,GAAG,IAAI,GAAG,EAGnC,CAAC;IAImF,CAAC;IAE9E,IAAI,CACb,SAAY,EACZ,GAAG,IAA+B;QAElC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAChD,IAAI,SAAS,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CAAC,SAAS,CAAC,CAAC;gBAC/B,CAAC;YACF,CAAC;QACF,CAAC,CAAC;QAEF,IAAA,sBAAW,EAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC3E,OAAO,GAAG,CAAC;IACZ,CAAC;IAEM,YAAY,CAAC,SAA4B;QAC/C,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,CAAC;QAClC,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;CACD;AA5ED,oCA4EC;AAED;;GAEG;AACH,MAAa,sBACZ,SAAQ,YAAwB;IAGhC,YAAmB,WAA6C;QAC/D,KAAK,CAAC,WAAW,CAAC,CAAC;IACpB,CAAC;IAEe,IAAI,CACnB,SAAY,EACZ,GAAG,IAA+B;QAElC,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;IACvC,CAAC;IAEe,cAAc,CAC7B,SAAY,EACZ,GAAG,IAA+B;QAElC,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;IACjD,CAAC;CACD;AArBD,wDAqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IEvent } from \"@fluidframework/core-interfaces\";\nimport { getOrCreate } from \"../util/index.js\";\n\n/**\n * Convert a union of types to an intersection of those types. Useful for `TransformEvents`.\n * @privateRemarks\n * First an always true extends clause is used (T extends T) to distribute T into to a union of types contravariant over each member of the T union.\n * Then the constraint on the type parameter in this new context is inferred, giving the intersection.\n */\nexport type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) extends (\n\tk: infer U,\n) => unknown\n\t? U\n\t: never;\n\n/**\n * `true` iff the given type is an acceptable shape for a {@link Listeners | event} listener\n * @public\n */\nexport type IsListener<TListener> = TListener extends (...args: any[]) => void ? true : false;\n\n/**\n * Used to specify the kinds of events emitted by a {@link Listenable}.\n *\n * @remarks\n * Any object type is a valid {@link Listeners}, but only the {@link IsListener | event-like} properties of that\n * type will be included.\n *\n * @example\n * ```typescript\n * interface MyEvents {\n * load: (user: string, data: IUserData) => void;\n * error: (errorCode: number) => void;\n * }\n * ```\n *\n * @public\n */\nexport type Listeners<T extends object> = {\n\t[P in (string | symbol) & keyof T as IsListener<T[P]> extends true ? P : never]: T[P];\n};\n\n/**\n * Converts a {@link Listeners} type (i.e. the event registry for a {@link Listenable}) into a type consumable\n * by an IEventProvider from `@fluidframework/core-interfaces`.\n * @param E - the `Events` type to transform\n * @param Target - an optional `IEvent` type that will be merged into the result along with the transformed `E`\n *\n * @example\n *\n * ```typescript\n * interface MyEvents {\n * load: (user: string, data: IUserData) => void;\n * error: (errorCode: number) => void;\n * }\n *\n * class MySharedObject extends SharedObject<TransformEvents<MyEvents, ISharedObjectEvents>> {\n * // ...\n * }\n * ```\n */\nexport type TransformListeners<\n\tTListeners extends Listeners<TListeners>,\n\tTTarget extends IEvent = IEvent,\n> = {\n\t[P in keyof Listeners<TListeners>]: (event: P, listener: TListeners[P]) => void;\n} extends Record<string | number | symbol, infer Z>\n\t? UnionToIntersection<Z> & TTarget\n\t: never;\n\n/**\n * An object which allows the registration of listeners so that subscribers can be notified when an event happens.\n * @param TListeners - All the {@link Listeners | events} that this subscribable supports\n *\n * @privateRemarks\n * `EventEmitter` can be used as a base class to implement this via extension.\n * ```ts\n * type MyEventEmitter = IEventEmitter<{\n * load: (user: string, data: IUserData) => void;\n * error: (errorCode: number) => void;\n * }>\n * ```\n * {@link createEmitter} can help implement this interface via delegation.\n *\n * @sealed @public\n */\nexport interface Listenable<TListeners extends object> {\n\t/**\n\t * Register an event listener.\n\t * @param eventName - the name of the event\n\t * @param listener - the handler to run when the event is fired by the emitter\n\t * @returns a {@link Off | function} which will deregister the listener when called.\n\t * This deregistration function is idempotent and therefore may be safely called more than once with no effect.\n\t * @remarks Do not register the exact same `listener` object for the same event more than once.\n\t * Doing so will result in undefined behavior, and is not guaranteed to behave the same in future versions of this library.\n\t */\n\ton<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): Off;\n}\n\n/**\n * A function that, when called, will deregister an event listener subscription that was previously registered.\n * @remarks\n * It is returned by the {@link Listenable.on | event registration function} when event registration occurs.\n * @public\n */\nexport type Off = () => void;\n\n/**\n * Interface for an event emitter that can emit typed events to subscribed listeners.\n * @internal\n */\nexport interface IEmitter<TListeners extends Listeners<TListeners>> {\n\t/**\n\t * Emits an event with the specified name and arguments, notifying all subscribers by calling their registered listener functions.\n\t * @param eventName - the name of the event to fire\n\t * @param args - the arguments passed to the event listener functions\n\t */\n\temit<K extends keyof Listeners<TListeners>>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): void;\n\n\t/**\n\t * Emits an event with the specified name and arguments, notifying all subscribers by calling their registered listener functions.\n\t * It also collects the return values of all listeners into an array.\n\t *\n\t * Warning: This method should be used with caution. It deviates from the standard event-based integration pattern as creates substantial coupling between the emitter and its listeners.\n\t * For the majority of use-cases it is recommended to use the standard {@link IEmitter.emit} functionality.\n\t * @param eventName - the name of the event to fire\n\t * @param args - the arguments passed to the event listener functions\n\t * @returns An array of the return values of each listener, preserving the order listeners were called.\n\t */\n\temitAndCollect<K extends keyof Listeners<TListeners>>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): ReturnType<TListeners[K]>[];\n}\n\n/**\n * Create a {@link Listenable} that can be instructed to emit events via the {@link IEmitter} interface.\n *\n * A class can delegate handling {@link Listenable} to the returned value while using it to emit the events.\n * See also `EventEmitter` which be used as a base class to implement {@link Listenable} via extension.\n * @internal\n */\nexport function createEmitter<TListeners extends object>(\n\tnoListeners?: NoListenersCallback<TListeners>,\n): Listenable<TListeners> & IEmitter<TListeners> & HasListeners<TListeners> {\n\treturn new ComposableEventEmitter<TListeners>(noListeners);\n}\n\n/**\n * Called when the last listener for `eventName` is removed.\n * Useful for determining when to clean up resources related to detecting when the event might occurs.\n * @internal\n */\nexport type NoListenersCallback<TListeners extends object> = (\n\teventName: keyof Listeners<TListeners>,\n) => void;\n\n/**\n * @internal\n */\nexport interface HasListeners<TListeners extends Listeners<TListeners>> {\n\t/**\n\t * When no `eventName` is provided, returns true iff there are any listeners.\n\t *\n\t * When `eventName` is provided, returns true iff there are listeners for that event.\n\t *\n\t * @remarks\n\t * This can be used to know when its safe to cleanup data-structures which only exist to fire events for their listeners.\n\t */\n\thasListeners(eventName?: keyof Listeners<TListeners>): boolean;\n}\n\n/**\n * Provides an API for subscribing to and listening to events.\n *\n * @remarks Classes wishing to emit events may either extend this class or compose over it.\n *\n * @example Extending this class\n *\n * ```typescript\n * interface MyEvents {\n * \"loaded\": () => void;\n * }\n *\n * class MyClass extends EventEmitter<MyEvents> {\n * private load() {\n * this.emit(\"loaded\");\n * }\n * }\n * ```\n *\n * @example Composing over this class\n *\n * ```typescript\n * class MyClass implements ISubscribable<MyEvents> {\n * private readonly events = EventEmitter.create<MyEvents>();\n *\n * private load() {\n * this.events.emit(\"loaded\");\n * }\n *\n * public on<K extends keyof MyEvents>(eventName: K, listener: MyEvents[K]): Off {\n * return this.events.on(eventName, listener);\n * }\n * }\n * ```\n */\nexport class EventEmitter<TListeners extends Listeners<TListeners>>\n\timplements Listenable<TListeners>, HasListeners<TListeners>\n{\n\tprotected readonly listeners = new Map<\n\t\tkeyof TListeners,\n\t\tMap<Off, (...args: any[]) => TListeners[keyof TListeners]>\n\t>();\n\n\t// Because this is protected and not public, calling this externally (not from a subclass) makes sending events to the constructed instance impossible.\n\t// Instead, use the static `create` function to get an instance which allows emitting events.\n\tprotected constructor(private readonly noListeners?: NoListenersCallback<TListeners>) {}\n\n\tprotected emit<K extends keyof TListeners>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): void {\n\t\tconst listeners = this.listeners.get(eventName);\n\t\tif (listeners !== undefined) {\n\t\t\tconst argArray: unknown[] = args; // TODO: Current TS (4.5.5) cannot spread `args` into `listener()`, but future versions (e.g. 4.8.4) can.\n\t\t\t// This explicitly copies listeners so that new listeners added during this call to emit will not receive this event.\n\t\t\tfor (const [off, listener] of [...listeners]) {\n\t\t\t\t// If listener has been unsubscribed while invoking other listeners, skip it.\n\t\t\t\tif (listeners.has(off)) {\n\t\t\t\t\tlistener(...argArray);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected emitAndCollect<K extends keyof TListeners>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): ReturnType<TListeners[K]>[] {\n\t\tconst listeners = this.listeners.get(eventName);\n\t\tif (listeners !== undefined) {\n\t\t\tconst argArray: unknown[] = args;\n\t\t\tconst resultArray: ReturnType<TListeners[K]>[] = [];\n\t\t\tfor (const listener of [...listeners.values()]) {\n\t\t\t\tresultArray.push(listener(...argArray));\n\t\t\t}\n\t\t\treturn resultArray;\n\t\t}\n\t\treturn [];\n\t}\n\n\t/**\n\t * Register an event listener.\n\t * @param eventName - the name of the event\n\t * @param listener - the handler to run when the event is fired by the emitter\n\t * @returns a function which will deregister the listener when run.\n\t * This function will error if called more than once.\n\t */\n\tpublic on<K extends keyof Listeners<TListeners>>(\n\t\teventName: K,\n\t\tlistener: TListeners[K],\n\t): Off {\n\t\tconst off: Off = () => {\n\t\t\tconst currentListeners = this.listeners.get(eventName);\n\t\t\tif (currentListeners?.delete(off) === true) {\n\t\t\t\tif (currentListeners.size === 0) {\n\t\t\t\t\tthis.listeners.delete(eventName);\n\t\t\t\t\tthis.noListeners?.(eventName);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tgetOrCreate(this.listeners, eventName, () => new Map()).set(off, listener);\n\t\treturn off;\n\t}\n\n\tpublic hasListeners(eventName?: keyof TListeners): boolean {\n\t\tif (eventName === undefined) {\n\t\t\treturn this.listeners.size !== 0;\n\t\t}\n\t\treturn this.listeners.has(eventName);\n\t}\n}\n\n/**\n * This class exposes the constructor and the `emit` method of `EventEmitter`, elevating them from protected to public\n */\nexport class ComposableEventEmitter<TListeners extends Listeners<TListeners>>\n\textends EventEmitter<TListeners>\n\timplements IEmitter<TListeners>\n{\n\tpublic constructor(noListeners?: NoListenersCallback<TListeners>) {\n\t\tsuper(noListeners);\n\t}\n\n\tpublic override emit<K extends keyof TListeners>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): void {\n\t\treturn super.emit(eventName, ...args);\n\t}\n\n\tpublic override emitAndCollect<K extends keyof TListeners>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): ReturnType<TListeners[K]>[] {\n\t\treturn super.emitAndCollect(eventName, ...args);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/events/events.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+CAA+C;AAwI/C;;;;;GAKG;AACH,SAAgB,aAAa,CAC5B,WAA6C;IAE7C,OAAO,IAAI,sBAAsB,CAAa,WAAW,CAAC,CAAC;AAC5D,CAAC;AAJD,sCAIC;AAwBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAa,YAAY;IAQxB,uJAAuJ;IACvJ,6FAA6F;IAC7F,YAAuC,WAA6C;QAA7C,gBAAW,GAAX,WAAW,CAAkC;QAPjE,cAAS,GAAG,IAAI,GAAG,EAGnC,CAAC;IAImF,CAAC;IAE9E,IAAI,CACb,SAAY,EACZ,GAAG,IAA+B;QAElC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAChD,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,QAAQ,GAAc,IAAI,CAAC,CAAC,yGAAyG;YAC3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AW,EAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC3E,OAAO,GAAG,CAAC;IACZ,CAAC;IAEM,YAAY,CAAC,SAA4B;QAC/C,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,CAAC;QAClC,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;CACD;AA5ED,oCA4EC;AAED;;GAEG;AACH,MAAa,sBACZ,SAAQ,YAAwB;IAGhC,YAAmB,WAA6C;QAC/D,KAAK,CAAC,WAAW,CAAC,CAAC;IACpB,CAAC;IAEe,IAAI,CACnB,SAAY,EACZ,GAAG,IAA+B;QAElC,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;IACvC,CAAC;IAEe,cAAc,CAC7B,SAAY,EACZ,GAAG,IAA+B;QAElC,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;IACjD,CAAC;CACD;AArBD,wDAqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IEvent } from \"@fluidframework/core-interfaces\";\nimport { getOrCreate } from \"../util/index.js\";\n\n/**\n * Convert a union of types to an intersection of those types. Useful for `TransformEvents`.\n * @privateRemarks\n * First an always true extends clause is used (T extends T) to distribute T into to a union of types contravariant over each member of the T union.\n * Then the constraint on the type parameter in this new context is inferred, giving the intersection.\n */\nexport type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) extends (\n\tk: infer U,\n) => unknown\n\t? U\n\t: never;\n\n/**\n * `true` iff the given type is an acceptable shape for a {@link Listeners | event} listener\n * @public\n */\nexport type IsListener<TListener> = TListener extends (...args: any[]) => void ? true : false;\n\n/**\n * Used to specify the kinds of events emitted by a {@link Listenable}.\n *\n * @remarks\n * Any object type is a valid {@link Listeners}, but only the {@link IsListener | event-like} properties of that\n * type will be included.\n *\n * @example\n * ```typescript\n * interface MyEvents {\n * load: (user: string, data: IUserData) => void;\n * error: (errorCode: number) => void;\n * }\n * ```\n *\n * @public\n */\nexport type Listeners<T extends object> = {\n\t[P in (string | symbol) & keyof T as IsListener<T[P]> extends true ? P : never]: T[P];\n};\n\n/**\n * Converts a {@link Listeners} type (i.e. the event registry for a {@link Listenable}) into a type consumable\n * by an IEventProvider from `@fluidframework/core-interfaces`.\n * @param E - the `Events` type to transform\n * @param Target - an optional `IEvent` type that will be merged into the result along with the transformed `E`\n *\n * @example\n *\n * ```typescript\n * interface MyEvents {\n * load: (user: string, data: IUserData) => void;\n * error: (errorCode: number) => void;\n * }\n *\n * class MySharedObject extends SharedObject<TransformEvents<MyEvents, ISharedObjectEvents>> {\n * // ...\n * }\n * ```\n */\nexport type TransformListeners<\n\tTListeners extends Listeners<TListeners>,\n\tTTarget extends IEvent = IEvent,\n> = {\n\t[P in keyof Listeners<TListeners>]: (event: P, listener: TListeners[P]) => void;\n} extends Record<string | number | symbol, infer Z>\n\t? UnionToIntersection<Z> & TTarget\n\t: never;\n\n/**\n * An object which allows the registration of listeners so that subscribers can be notified when an event happens.\n * @param TListeners - All the {@link Listeners | events} that this subscribable supports\n *\n * @privateRemarks\n * `EventEmitter` can be used as a base class to implement this via extension.\n * ```ts\n * type MyEventEmitter = IEventEmitter<{\n * load: (user: string, data: IUserData) => void;\n * error: (errorCode: number) => void;\n * }>\n * ```\n * {@link createEmitter} can help implement this interface via delegation.\n *\n * @sealed @public\n */\nexport interface Listenable<TListeners extends object> {\n\t/**\n\t * Register an event listener.\n\t * @param eventName - the name of the event\n\t * @param listener - the handler to run when the event is fired by the emitter\n\t * @returns a {@link Off | function} which will deregister the listener when called.\n\t * This deregistration function is idempotent and therefore may be safely called more than once with no effect.\n\t * @remarks Do not register the exact same `listener` object for the same event more than once.\n\t * Doing so will result in undefined behavior, and is not guaranteed to behave the same in future versions of this library.\n\t */\n\ton<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): Off;\n}\n\n/**\n * A function that, when called, will deregister an event listener subscription that was previously registered.\n * @remarks\n * It is returned by the {@link Listenable.on | event registration function} when event registration occurs.\n * @public\n */\nexport type Off = () => void;\n\n/**\n * Interface for an event emitter that can emit typed events to subscribed listeners.\n */\nexport interface IEmitter<TListeners extends Listeners<TListeners>> {\n\t/**\n\t * Emits an event with the specified name and arguments, notifying all subscribers by calling their registered listener functions.\n\t * @param eventName - the name of the event to fire\n\t * @param args - the arguments passed to the event listener functions\n\t */\n\temit<K extends keyof Listeners<TListeners>>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): void;\n\n\t/**\n\t * Emits an event with the specified name and arguments, notifying all subscribers by calling their registered listener functions.\n\t * It also collects the return values of all listeners into an array.\n\t *\n\t * Warning: This method should be used with caution. It deviates from the standard event-based integration pattern as creates substantial coupling between the emitter and its listeners.\n\t * For the majority of use-cases it is recommended to use the standard {@link IEmitter.emit} functionality.\n\t * @param eventName - the name of the event to fire\n\t * @param args - the arguments passed to the event listener functions\n\t * @returns An array of the return values of each listener, preserving the order listeners were called.\n\t */\n\temitAndCollect<K extends keyof Listeners<TListeners>>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): ReturnType<TListeners[K]>[];\n}\n\n/**\n * Create a {@link Listenable} that can be instructed to emit events via the {@link IEmitter} interface.\n *\n * A class can delegate handling {@link Listenable} to the returned value while using it to emit the events.\n * See also `EventEmitter` which be used as a base class to implement {@link Listenable} via extension.\n */\nexport function createEmitter<TListeners extends object>(\n\tnoListeners?: NoListenersCallback<TListeners>,\n): Listenable<TListeners> & IEmitter<TListeners> & HasListeners<TListeners> {\n\treturn new ComposableEventEmitter<TListeners>(noListeners);\n}\n\n/**\n * Called when the last listener for `eventName` is removed.\n * Useful for determining when to clean up resources related to detecting when the event might occurs.\n */\nexport type NoListenersCallback<TListeners extends object> = (\n\teventName: keyof Listeners<TListeners>,\n) => void;\n\n/**\n */\nexport interface HasListeners<TListeners extends Listeners<TListeners>> {\n\t/**\n\t * When no `eventName` is provided, returns true iff there are any listeners.\n\t *\n\t * When `eventName` is provided, returns true iff there are listeners for that event.\n\t *\n\t * @remarks\n\t * This can be used to know when its safe to cleanup data-structures which only exist to fire events for their listeners.\n\t */\n\thasListeners(eventName?: keyof Listeners<TListeners>): boolean;\n}\n\n/**\n * Provides an API for subscribing to and listening to events.\n *\n * @remarks Classes wishing to emit events may either extend this class or compose over it.\n *\n * @example Extending this class\n *\n * ```typescript\n * interface MyEvents {\n * \"loaded\": () => void;\n * }\n *\n * class MyClass extends EventEmitter<MyEvents> {\n * private load() {\n * this.emit(\"loaded\");\n * }\n * }\n * ```\n *\n * @example Composing over this class\n *\n * ```typescript\n * class MyClass implements ISubscribable<MyEvents> {\n * private readonly events = EventEmitter.create<MyEvents>();\n *\n * private load() {\n * this.events.emit(\"loaded\");\n * }\n *\n * public on<K extends keyof MyEvents>(eventName: K, listener: MyEvents[K]): Off {\n * return this.events.on(eventName, listener);\n * }\n * }\n * ```\n */\nexport class EventEmitter<TListeners extends Listeners<TListeners>>\n\timplements Listenable<TListeners>, HasListeners<TListeners>\n{\n\tprotected readonly listeners = new Map<\n\t\tkeyof TListeners,\n\t\tMap<Off, (...args: any[]) => TListeners[keyof TListeners]>\n\t>();\n\n\t// Because this is protected and not public, calling this externally (not from a subclass) makes sending events to the constructed instance impossible.\n\t// Instead, use the static `create` function to get an instance which allows emitting events.\n\tprotected constructor(private readonly noListeners?: NoListenersCallback<TListeners>) {}\n\n\tprotected emit<K extends keyof TListeners>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): void {\n\t\tconst listeners = this.listeners.get(eventName);\n\t\tif (listeners !== undefined) {\n\t\t\tconst argArray: unknown[] = args; // TODO: Current TS (4.5.5) cannot spread `args` into `listener()`, but future versions (e.g. 4.8.4) can.\n\t\t\t// This explicitly copies listeners so that new listeners added during this call to emit will not receive this event.\n\t\t\tfor (const [off, listener] of [...listeners]) {\n\t\t\t\t// If listener has been unsubscribed while invoking other listeners, skip it.\n\t\t\t\tif (listeners.has(off)) {\n\t\t\t\t\tlistener(...argArray);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected emitAndCollect<K extends keyof TListeners>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): ReturnType<TListeners[K]>[] {\n\t\tconst listeners = this.listeners.get(eventName);\n\t\tif (listeners !== undefined) {\n\t\t\tconst argArray: unknown[] = args;\n\t\t\tconst resultArray: ReturnType<TListeners[K]>[] = [];\n\t\t\tfor (const listener of [...listeners.values()]) {\n\t\t\t\tresultArray.push(listener(...argArray));\n\t\t\t}\n\t\t\treturn resultArray;\n\t\t}\n\t\treturn [];\n\t}\n\n\t/**\n\t * Register an event listener.\n\t * @param eventName - the name of the event\n\t * @param listener - the handler to run when the event is fired by the emitter\n\t * @returns a function which will deregister the listener when run.\n\t * This function will error if called more than once.\n\t */\n\tpublic on<K extends keyof Listeners<TListeners>>(\n\t\teventName: K,\n\t\tlistener: TListeners[K],\n\t): Off {\n\t\tconst off: Off = () => {\n\t\t\tconst currentListeners = this.listeners.get(eventName);\n\t\t\tif (currentListeners?.delete(off) === true) {\n\t\t\t\tif (currentListeners.size === 0) {\n\t\t\t\t\tthis.listeners.delete(eventName);\n\t\t\t\t\tthis.noListeners?.(eventName);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tgetOrCreate(this.listeners, eventName, () => new Map()).set(off, listener);\n\t\treturn off;\n\t}\n\n\tpublic hasListeners(eventName?: keyof TListeners): boolean {\n\t\tif (eventName === undefined) {\n\t\t\treturn this.listeners.size !== 0;\n\t\t}\n\t\treturn this.listeners.has(eventName);\n\t}\n}\n\n/**\n * This class exposes the constructor and the `emit` method of `EventEmitter`, elevating them from protected to public\n */\nexport class ComposableEventEmitter<TListeners extends Listeners<TListeners>>\n\textends EventEmitter<TListeners>\n\timplements IEmitter<TListeners>\n{\n\tpublic constructor(noListeners?: NoListenersCallback<TListeners>) {\n\t\tsuper(noListeners);\n\t}\n\n\tpublic override emit<K extends keyof TListeners>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): void {\n\t\treturn super.emit(eventName, ...args);\n\t}\n\n\tpublic override emitAndCollect<K extends keyof TListeners>(\n\t\teventName: K,\n\t\t...args: Parameters<TListeners[K]>\n\t): ReturnType<TListeners[K]>[] {\n\t\treturn super.emitAndCollect(eventName, ...args);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicChunk.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/basicChunk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,kBAAkB,EAClB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,KAAK,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAQ,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAc,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,WAAW,EAAa,MAAM,YAAY,CAAC;AAExF;;GAEG;AACH,qBAAa,UAAW,SAAQ,oBAAqB,YAAW,SAAS;IAYhE,IAAI,EAAE,wBAAwB;IAC9B,MAAM,EAAE,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClC,KAAK,CAAC;IAbd,SAAgB,cAAc,EAAE,MAAM,CAAK;IAE3C;;;;;;;OAOG;gBAEK,IAAI,EAAE,wBAAwB,E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