@fluidframework/tree 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.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/.eslintrc.cjs +2 -0
- package/CHANGELOG.md +74 -0
- package/api-extractor.json +2 -3
- package/api-report/tree.api.md +208 -154
- package/beta.d.ts +11 -0
- package/dist/beta.d.ts +90 -0
- package/dist/codec/codec.d.ts +10 -4
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +2 -2
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/discriminatedUnions.d.ts.map +1 -1
- package/dist/codec/discriminatedUnions.js +6 -2
- package/dist/codec/discriminatedUnions.js.map +1 -1
- package/dist/codec/index.d.ts +2 -2
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +3 -2
- package/dist/codec/index.js.map +1 -1
- package/dist/codec/noopValidator.d.ts.map +1 -1
- package/dist/codec/noopValidator.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +10 -2
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js +28 -6
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/codec/versioned/index.d.ts +1 -1
- package/dist/codec/versioned/index.d.ts.map +1 -1
- package/dist/codec/versioned/index.js +2 -1
- package/dist/codec/versioned/index.js.map +1 -1
- package/dist/core/change-family/changeFamily.d.ts +2 -2
- package/dist/core/change-family/changeFamily.d.ts.map +1 -1
- package/dist/core/change-family/changeFamily.js.map +1 -1
- package/dist/core/forest/editableForest.d.ts +1 -1
- package/dist/core/forest/editableForest.d.ts.map +1 -1
- package/dist/core/forest/editableForest.js +2 -2
- package/dist/core/forest/editableForest.js.map +1 -1
- package/dist/core/forest/forest.d.ts +5 -1
- package/dist/core/forest/forest.d.ts.map +1 -1
- package/dist/core/forest/forest.js +2 -2
- package/dist/core/forest/forest.js.map +1 -1
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +6 -3
- package/dist/core/index.js.map +1 -1
- 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 +4 -1
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/revisionTagCodec.d.ts.map +1 -1
- package/dist/core/rebase/revisionTagCodec.js +2 -2
- package/dist/core/rebase/revisionTagCodec.js.map +1 -1
- package/dist/core/rebase/types.d.ts +30 -0
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +26 -1
- package/dist/core/rebase/types.js.map +1 -1
- package/dist/core/rebase/utils.d.ts.map +1 -1
- package/dist/core/rebase/utils.js +11 -10
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/revertible/index.d.ts +1 -1
- package/dist/core/revertible/index.d.ts.map +1 -1
- package/dist/core/revertible/index.js +1 -3
- package/dist/core/revertible/index.js.map +1 -1
- package/dist/core/revertible/revertible.d.ts +15 -49
- package/dist/core/revertible/revertible.d.ts.map +1 -1
- package/dist/core/revertible/revertible.js +3 -33
- package/dist/core/revertible/revertible.js.map +1 -1
- package/dist/core/schema-stored/format.d.ts.map +1 -1
- package/dist/core/schema-stored/format.js.map +1 -1
- package/dist/core/schema-stored/index.d.ts +2 -1
- package/dist/core/schema-stored/index.d.ts.map +1 -1
- package/dist/core/schema-stored/index.js +4 -1
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/multiplicity.d.ts.map +1 -0
- package/dist/{feature-libraries → core/schema-stored}/multiplicity.js +2 -2
- package/{lib/feature-libraries → dist/core/schema-stored}/multiplicity.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +32 -9
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +14 -7
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts +31 -16
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +37 -62
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/cursor.d.ts.map +1 -1
- package/dist/core/tree/cursor.js +4 -4
- package/dist/core/tree/cursor.js.map +1 -1
- package/dist/core/tree/delta.d.ts.map +1 -1
- package/dist/core/tree/delta.js.map +1 -1
- package/dist/core/tree/deltaUtil.d.ts +1 -1
- package/dist/core/tree/deltaUtil.d.ts.map +1 -1
- package/dist/core/tree/deltaUtil.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +2 -2
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +15 -15
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodec.js +4 -4
- package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormat.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormat.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
- package/dist/core/tree/mapTree.d.ts.map +1 -1
- package/dist/core/tree/mapTree.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/dist/core/tree/sparseTree.d.ts.map +1 -1
- package/dist/core/tree/sparseTree.js +5 -5
- package/dist/core/tree/sparseTree.js.map +1 -1
- package/dist/core/tree/treeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/treeTextFormat.js.map +1 -1
- package/dist/core/tree/types.d.ts +1 -1
- package/dist/core/tree/types.d.ts.map +1 -1
- package/dist/core/tree/types.js +7 -7
- package/dist/core/tree/types.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +13 -2
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js +47 -18
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitPath.d.ts +1 -1
- package/dist/core/tree/visitPath.d.ts.map +1 -1
- package/dist/core/tree/visitPath.js +4 -0
- package/dist/core/tree/visitPath.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts +4 -4
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js +2 -2
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/domains/json/jsonCursor.d.ts.map +1 -1
- package/dist/domains/json/jsonCursor.js +7 -7
- package/dist/domains/json/jsonCursor.js.map +1 -1
- package/dist/domains/json/jsonDomainSchema.d.ts.map +1 -1
- package/dist/domains/json/jsonDomainSchema.js.map +1 -1
- package/dist/domains/leafDomain.d.ts.map +1 -1
- package/dist/domains/leafDomain.js +8 -8
- package/dist/domains/leafDomain.js.map +1 -1
- package/dist/domains/nodeKey/nodeKeySchema.d.ts.map +1 -1
- package/dist/domains/nodeKey/nodeKeySchema.js +2 -2
- package/dist/domains/nodeKey/nodeKeySchema.js.map +1 -1
- package/dist/domains/schemaBuilder.d.ts +19 -81
- package/dist/domains/schemaBuilder.d.ts.map +1 -1
- package/dist/domains/schemaBuilder.js +24 -93
- package/dist/domains/schemaBuilder.js.map +1 -1
- package/dist/domains/testRecursiveDomain.d.ts +0 -4
- package/dist/domains/testRecursiveDomain.d.ts.map +1 -1
- package/dist/domains/testRecursiveDomain.js +1 -8
- package/dist/domains/testRecursiveDomain.js.map +1 -1
- package/dist/events/events.d.ts.map +1 -1
- package/dist/events/events.js +2 -2
- package/dist/events/events.js.map +1 -1
- package/dist/external-utilities/typeboxValidator.d.ts.map +1 -1
- package/dist/external-utilities/typeboxValidator.js.map +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.d.ts +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
- package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts +3 -3
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +29 -29
- 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 +2 -2
- package/dist/feature-libraries/chunked-forest/chunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +13 -14
- package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +25 -24
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +4 -4
- package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +13 -13
- package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +3 -3
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -9
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +6 -5
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +3 -3
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +8 -8
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +1 -2
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts +2 -2
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js +3 -3
- package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts +3 -3
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js +4 -5
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.js +1 -1
- package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +3 -3
- package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/uniformChunk.js +21 -21
- package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/dist/feature-libraries/contextuallyTyped.d.ts +5 -9
- package/dist/feature-libraries/contextuallyTyped.d.ts.map +1 -1
- package/dist/feature-libraries/contextuallyTyped.js +33 -48
- package/dist/feature-libraries/contextuallyTyped.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -5
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +7 -7
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +18 -4
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +59 -24
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -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/noChangeCodecs.d.ts +8 -0
- package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -0
- package/dist/feature-libraries/default-schema/noChangeCodecs.js +10 -0
- package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -0
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js +2 -2
- package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/dist/feature-libraries/editableTreeBinder.d.ts.map +1 -1
- package/dist/feature-libraries/editableTreeBinder.js +6 -6
- package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
- package/dist/feature-libraries/fieldGenerator.d.ts +1 -1
- package/dist/feature-libraries/fieldGenerator.d.ts.map +1 -1
- package/dist/feature-libraries/fieldGenerator.js.map +1 -1
- package/dist/feature-libraries/flex-tree/context.d.ts +16 -4
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +27 -15
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +43 -36
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js +9 -6
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/index.d.ts +3 -3
- package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/index.js +3 -2
- package/dist/feature-libraries/flex-tree/index.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.d.ts +7 -8
- package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyEntity.js +12 -17
- package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +21 -7
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +69 -46
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts +12 -9
- package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyNode.js +51 -97
- package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/dist/feature-libraries/flex-tree/nodeKeys.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/nodeKeys.js.map +1 -1
- package/dist/feature-libraries/flex-tree/treeEvents.d.ts +7 -70
- 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/unboxed.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/unboxed.js +1 -1
- package/dist/feature-libraries/flex-tree/unboxed.js.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.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/forest-summary/forestSummarizer.d.ts +3 -3
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +14 -14
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/format.js +4 -4
- package/dist/feature-libraries/forest-summary/format.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +8 -9
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +9 -9
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.js +2 -2
- package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
- package/dist/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/comparison.js +20 -20
- package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +19 -13
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts +3 -4
- package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +21 -0
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -0
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js +7 -0
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -0
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -2
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +4 -4
- package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +3 -7
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +3 -5
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +7 -7
- package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +4 -4
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +5 -4
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +3 -2
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/isNeverTree.js +10 -11
- package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +4 -5
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +73 -37
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +13 -25
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +261 -169
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +5 -12
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js +0 -10
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +6 -4
- 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 +1 -1
- package/dist/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
- package/dist/feature-libraries/node-key/nodeKey.js.map +1 -1
- package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts +2 -2
- package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts.map +1 -1
- package/dist/feature-libraries/node-key/nodeKeyIndex.js +3 -3
- package/dist/feature-libraries/node-key/nodeKeyIndex.js.map +1 -1
- package/dist/feature-libraries/node-key/nodeKeyManager.d.ts +2 -2
- package/dist/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
- package/dist/feature-libraries/node-key/nodeKeyManager.js +9 -9
- package/dist/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +49 -48
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/optional-field/index.d.ts +1 -1
- package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/index.js +1 -2
- package/dist/feature-libraries/optional-field/index.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts +3 -5
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +33 -39
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/optional-field/{optionalFieldChangeFormat.d.ts → optionalFieldChangeFormatV1.d.ts} +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/{optionalFieldChangeFormat.js → optionalFieldChangeFormatV1.js} +11 -2
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +25 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +44 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +4 -7
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts +12 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.js +158 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV1.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +12 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +87 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -4
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +7 -150
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-aware/schemaAware.d.ts +3 -4
- package/dist/feature-libraries/schema-aware/schemaAware.d.ts.map +1 -1
- package/dist/feature-libraries/schema-aware/schemaAware.js +1 -1
- package/dist/feature-libraries/schema-aware/schemaAware.js.map +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts +1 -1
- package/dist/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/index.js +2 -2
- package/dist/feature-libraries/schema-edits/index.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -3
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +13 -5
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeTypes.d.ts +5 -0
- package/dist/feature-libraries/schema-edits/schemaChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeTypes.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +10 -10
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/dist/feature-libraries/schema-index/format.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/format.js.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +4 -4
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/feature-libraries/schemaBuilder.d.ts +1 -1
- package/dist/feature-libraries/schemaBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/schemaBuilder.js +1 -1
- package/dist/feature-libraries/schemaBuilder.js.map +1 -1
- package/dist/feature-libraries/schemaBuilderBase.d.ts +1 -1
- package/dist/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
- package/dist/feature-libraries/schemaBuilderBase.js +19 -19
- package/dist/feature-libraries/schemaBuilderBase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts +9 -13
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +76 -43
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/format.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/format.js +14 -14
- package/dist/feature-libraries/sequence-field/format.js.map +1 -1
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts +3 -3
- 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 +5 -5
- 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 +1 -2
- package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +30 -39
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/markListFactory.d.ts +4 -4
- package/dist/feature-libraries/sequence-field/markListFactory.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/markListFactory.js.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.d.ts +7 -7
- package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.js +2 -2
- package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +25 -14
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.js +20 -11
- package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/dist/feature-libraries/sequence-field/prune.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -4
- package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.js +34 -40
- package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +2 -2
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +2 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js +17 -19
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +17 -17
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +2 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +10 -10
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts +7 -8
- 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 +42 -35
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +43 -21
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/feature-libraries/storedToViewSchema.d.ts +2 -2
- package/dist/feature-libraries/storedToViewSchema.d.ts.map +1 -1
- package/dist/feature-libraries/storedToViewSchema.js +3 -3
- package/dist/feature-libraries/storedToViewSchema.js.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.d.ts +1 -1
- package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/dist/feature-libraries/treeCursorUtils.js +8 -8
- package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
- package/dist/feature-libraries/treeTextCursor.d.ts +1 -1
- package/dist/feature-libraries/treeTextCursor.d.ts.map +1 -1
- package/dist/feature-libraries/treeTextCursor.js +3 -3
- package/dist/feature-libraries/treeTextCursor.js.map +1 -1
- package/dist/feature-libraries/typed-schema/flexList.d.ts +1 -2
- 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 +0 -1
- package/dist/feature-libraries/typed-schema/index.d.ts.map +1 -1
- 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 +14 -14
- package/dist/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
- package/dist/feature-libraries/typed-schema/typeUtils.d.ts +0 -5
- package/dist/feature-libraries/typed-schema/typeUtils.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/typeUtils.js.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +5 -4
- package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js +19 -11
- package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/dist/feature-libraries/typed-schema/view.d.ts +1 -1
- package/dist/feature-libraries/typed-schema/view.d.ts.map +1 -1
- package/dist/feature-libraries/typed-schema/view.js +10 -10
- package/dist/feature-libraries/typed-schema/view.js.map +1 -1
- package/dist/feature-libraries/valueUtilities.d.ts +6 -3
- package/dist/feature-libraries/valueUtilities.d.ts.map +1 -1
- package/dist/feature-libraries/valueUtilities.js +11 -10
- package/dist/feature-libraries/valueUtilities.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +90 -0
- package/dist/shared-tree/index.d.ts +3 -3
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +2 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts +1 -1
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +11 -11
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +10 -3
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +39 -39
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +58 -8
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +45 -12
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +3 -5
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +18 -11
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -0
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +9 -6
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts +4 -188
- package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFormat.js +3 -3
- package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +4 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/dist/shared-tree/treeApi.d.ts +83 -2
- package/dist/shared-tree/treeApi.d.ts.map +1 -1
- package/dist/shared-tree/treeApi.js +37 -14
- package/dist/shared-tree/treeApi.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +41 -20
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +135 -61
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree/treeView.d.ts +3 -3
- 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 +5 -32
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +12 -142
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts +2 -15
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +38 -82
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +4 -4
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +24 -10
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormat.d.ts +4 -5
- package/dist/shared-tree-core/editManagerFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormat.js +9 -10
- package/dist/shared-tree-core/editManagerFormat.js.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.d.ts +7 -6
- package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerSummarizer.js +6 -9
- package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +1 -1
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +2 -2
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +7 -4
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +21 -4
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +10 -2
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +1 -0
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
- package/dist/shared-tree-core/messageTypes.js.map +1 -1
- package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
- package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts +10 -5
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +18 -18
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/simple-tree/arrayNode.d.ts +187 -0
- package/dist/simple-tree/arrayNode.d.ts.map +1 -0
- package/dist/simple-tree/arrayNode.js +438 -0
- package/dist/simple-tree/arrayNode.js.map +1 -0
- package/dist/simple-tree/index.d.ts +10 -8
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +9 -8
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +11 -0
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -0
- package/dist/simple-tree/leafNodeSchema.js +51 -0
- package/dist/simple-tree/leafNodeSchema.js.map +1 -0
- package/dist/simple-tree/mapNode.d.ts +86 -0
- package/dist/simple-tree/mapNode.d.ts.map +1 -0
- package/dist/simple-tree/mapNode.js +204 -0
- package/dist/simple-tree/mapNode.js.map +1 -0
- package/dist/simple-tree/objectNode.d.ts +62 -0
- package/dist/simple-tree/objectNode.d.ts.map +1 -0
- package/dist/simple-tree/objectNode.js +242 -0
- package/dist/simple-tree/objectNode.js.map +1 -0
- package/dist/simple-tree/proxies.d.ts +21 -62
- package/dist/simple-tree/proxies.d.ts.map +1 -1
- package/dist/simple-tree/proxies.js +128 -679
- package/dist/simple-tree/proxies.js.map +1 -1
- package/dist/simple-tree/proxyBinding.d.ts +48 -0
- package/dist/simple-tree/proxyBinding.d.ts.map +1 -0
- package/dist/simple-tree/proxyBinding.js +132 -0
- package/dist/simple-tree/proxyBinding.js.map +1 -0
- package/dist/simple-tree/rawNode.d.ts +9 -50
- package/dist/simple-tree/rawNode.d.ts.map +1 -1
- package/dist/simple-tree/rawNode.js +15 -91
- package/dist/simple-tree/rawNode.js.map +1 -1
- package/dist/simple-tree/schemaCaching.d.ts +26 -0
- package/dist/simple-tree/schemaCaching.d.ts.map +1 -0
- package/dist/simple-tree/schemaCaching.js +69 -0
- package/dist/simple-tree/schemaCaching.js.map +1 -0
- package/dist/simple-tree/schemaCreationUtilities.d.ts +2 -1
- package/dist/simple-tree/schemaCreationUtilities.d.ts.map +1 -1
- package/dist/simple-tree/schemaCreationUtilities.js +3 -3
- package/dist/simple-tree/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/schemaFactory.d.ts +92 -43
- package/dist/simple-tree/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/schemaFactory.js +124 -177
- package/dist/simple-tree/schemaFactory.js.map +1 -1
- package/dist/simple-tree/schemaFactoryRecursive.d.ts +27 -83
- package/dist/simple-tree/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/schemaFactoryRecursive.js +1 -115
- package/dist/simple-tree/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +123 -70
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js +86 -5
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/testRecursiveDomain.d.ts +8 -8
- package/dist/simple-tree/testRecursiveDomain.d.ts.map +1 -1
- package/dist/simple-tree/testRecursiveDomain.js +2 -2
- package/dist/simple-tree/testRecursiveDomain.js.map +1 -1
- package/dist/simple-tree/toFlexSchema.d.ts +8 -20
- package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/dist/simple-tree/toFlexSchema.js +33 -41
- package/dist/simple-tree/toFlexSchema.js.map +1 -1
- package/dist/simple-tree/toMapTree.d.ts +12 -22
- package/dist/simple-tree/toMapTree.d.ts.map +1 -1
- package/dist/simple-tree/toMapTree.js +185 -136
- package/dist/simple-tree/toMapTree.js.map +1 -1
- package/dist/simple-tree/tree.d.ts +20 -3
- package/dist/simple-tree/tree.d.ts.map +1 -1
- package/dist/simple-tree/tree.js.map +1 -1
- package/dist/simple-tree/treeApi.d.ts +82 -5
- package/dist/simple-tree/treeApi.d.ts.map +1 -1
- package/dist/simple-tree/treeApi.js +96 -18
- package/dist/simple-tree/treeApi.js.map +1 -1
- package/dist/simple-tree/types.d.ts +1 -142
- package/dist/simple-tree/types.d.ts.map +1 -1
- package/dist/simple-tree/types.js.map +1 -1
- package/dist/simple-tree/typesUnsafe.d.ts +32 -17
- package/dist/simple-tree/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/typesUnsafe.js.map +1 -1
- package/dist/treeFactory.d.ts +31 -14
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +50 -23
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/brand.d.ts +26 -114
- package/dist/util/brand.d.ts.map +1 -1
- package/dist/util/brand.js +24 -91
- package/dist/util/brand.js.map +1 -1
- package/dist/util/idAllocator.d.ts.map +1 -1
- package/dist/util/idAllocator.js +2 -2
- package/dist/util/idAllocator.js.map +1 -1
- package/dist/util/index.d.ts +5 -3
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +8 -9
- package/dist/util/index.js.map +1 -1
- package/dist/util/nestedSet.d.ts.map +1 -1
- package/dist/util/nestedSet.js.map +1 -1
- package/dist/util/opaque.d.ts +46 -0
- package/dist/util/opaque.d.ts.map +1 -0
- package/dist/util/opaque.js +29 -0
- package/dist/util/opaque.js.map +1 -0
- package/dist/util/referenceCounting.d.ts +1 -1
- package/dist/util/referenceCounting.d.ts.map +1 -1
- package/dist/util/referenceCounting.js +3 -3
- package/dist/util/referenceCounting.js.map +1 -1
- package/dist/util/typeCheckTests.d.ts +1 -1
- package/dist/util/typeCheckTests.d.ts.map +1 -1
- package/dist/util/typeCheckTests.js.map +1 -1
- package/dist/util/typeUtils.d.ts +13 -0
- package/dist/util/typeUtils.d.ts.map +1 -1
- package/dist/util/typeUtils.js.map +1 -1
- package/dist/util/typeboxBrand.d.ts +17 -0
- package/dist/util/typeboxBrand.d.ts.map +1 -0
- package/dist/util/typeboxBrand.js +32 -0
- package/dist/util/typeboxBrand.js.map +1 -0
- package/dist/util/utils.d.ts +2 -15
- package/dist/util/utils.d.ts.map +1 -1
- package/dist/util/utils.js +11 -11
- package/dist/util/utils.js.map +1 -1
- package/docs/main/compatibility.md +95 -0
- package/docs/main/schema2.md +3 -3
- package/docs/main/sequence-field/move-composition.md +46 -0
- package/docs/main/tree-content-apis.md +5 -5
- package/docs/roadmap.md +4 -4
- package/internal.d.ts +11 -0
- package/lib/beta.d.ts +90 -0
- package/lib/codec/codec.d.ts +10 -4
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +2 -2
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/discriminatedUnions.d.ts.map +1 -1
- package/lib/codec/discriminatedUnions.js +5 -1
- package/lib/codec/discriminatedUnions.js.map +1 -1
- package/lib/codec/index.d.ts +2 -2
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.js.map +1 -1
- package/lib/codec/noopValidator.d.ts.map +1 -1
- package/lib/codec/noopValidator.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts +10 -2
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js +25 -4
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/codec/versioned/index.d.ts +1 -1
- package/lib/codec/versioned/index.d.ts.map +1 -1
- package/lib/codec/versioned/index.js +1 -1
- package/lib/codec/versioned/index.js.map +1 -1
- package/lib/core/change-family/changeFamily.d.ts +2 -2
- package/lib/core/change-family/changeFamily.d.ts.map +1 -1
- package/lib/core/change-family/changeFamily.js.map +1 -1
- package/lib/core/forest/editableForest.d.ts +1 -1
- package/lib/core/forest/editableForest.d.ts.map +1 -1
- package/lib/core/forest/editableForest.js +2 -2
- package/lib/core/forest/editableForest.js.map +1 -1
- package/lib/core/forest/forest.d.ts +5 -1
- package/lib/core/forest/forest.d.ts.map +1 -1
- package/lib/core/forest/forest.js +1 -1
- package/lib/core/forest/forest.js.map +1 -1
- package/lib/core/index.d.ts +3 -3
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +3 -3
- package/lib/core/index.js.map +1 -1
- 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/revisionTagCodec.d.ts.map +1 -1
- package/lib/core/rebase/revisionTagCodec.js +1 -1
- package/lib/core/rebase/revisionTagCodec.js.map +1 -1
- package/lib/core/rebase/types.d.ts +30 -0
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +23 -0
- package/lib/core/rebase/types.js.map +1 -1
- package/lib/core/rebase/utils.d.ts.map +1 -1
- package/lib/core/rebase/utils.js +6 -5
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/revertible/index.d.ts +1 -1
- package/lib/core/revertible/index.d.ts.map +1 -1
- package/lib/core/revertible/index.js +1 -1
- package/lib/core/revertible/index.js.map +1 -1
- package/lib/core/revertible/revertible.d.ts +15 -49
- package/lib/core/revertible/revertible.d.ts.map +1 -1
- package/lib/core/revertible/revertible.js +2 -32
- package/lib/core/revertible/revertible.js.map +1 -1
- package/lib/core/schema-stored/format.d.ts.map +1 -1
- package/lib/core/schema-stored/format.js.map +1 -1
- package/lib/core/schema-stored/index.d.ts +2 -1
- package/lib/core/schema-stored/index.d.ts.map +1 -1
- package/lib/core/schema-stored/index.js +2 -1
- package/lib/core/schema-stored/index.js.map +1 -1
- package/lib/core/schema-stored/multiplicity.d.ts.map +1 -0
- package/lib/core/schema-stored/multiplicity.js.map +1 -0
- package/lib/core/schema-stored/schema.d.ts +32 -9
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +13 -7
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts +31 -16
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +10 -35
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/cursor.d.ts.map +1 -1
- package/lib/core/tree/cursor.js +1 -1
- package/lib/core/tree/cursor.js.map +1 -1
- package/lib/core/tree/delta.d.ts.map +1 -1
- package/lib/core/tree/delta.js.map +1 -1
- package/lib/core/tree/deltaUtil.d.ts +1 -1
- package/lib/core/tree/deltaUtil.d.ts.map +1 -1
- package/lib/core/tree/deltaUtil.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +2 -2
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +2 -2
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.js +1 -1
- package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormat.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormat.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
- package/lib/core/tree/mapTree.d.ts.map +1 -1
- package/lib/core/tree/mapTree.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/lib/core/tree/sparseTree.d.ts.map +1 -1
- package/lib/core/tree/sparseTree.js +1 -1
- package/lib/core/tree/sparseTree.js.map +1 -1
- package/lib/core/tree/treeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/treeTextFormat.js.map +1 -1
- package/lib/core/tree/types.d.ts +1 -1
- package/lib/core/tree/types.d.ts.map +1 -1
- package/lib/core/tree/types.js +1 -1
- package/lib/core/tree/types.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +13 -2
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js +43 -14
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/core/tree/visitPath.d.ts +1 -1
- package/lib/core/tree/visitPath.d.ts.map +1 -1
- package/lib/core/tree/visitPath.js +4 -0
- package/lib/core/tree/visitPath.js.map +1 -1
- package/lib/core/tree/visitorUtils.d.ts +4 -4
- package/lib/core/tree/visitorUtils.d.ts.map +1 -1
- package/lib/core/tree/visitorUtils.js +1 -1
- package/lib/core/tree/visitorUtils.js.map +1 -1
- package/lib/domains/json/jsonCursor.d.ts.map +1 -1
- package/lib/domains/json/jsonCursor.js +1 -1
- package/lib/domains/json/jsonCursor.js.map +1 -1
- package/lib/domains/json/jsonDomainSchema.d.ts.map +1 -1
- package/lib/domains/json/jsonDomainSchema.js.map +1 -1
- package/lib/domains/leafDomain.d.ts.map +1 -1
- package/lib/domains/leafDomain.js +1 -1
- package/lib/domains/leafDomain.js.map +1 -1
- package/lib/domains/nodeKey/nodeKeySchema.d.ts.map +1 -1
- package/lib/domains/nodeKey/nodeKeySchema.js +2 -2
- package/lib/domains/nodeKey/nodeKeySchema.js.map +1 -1
- package/lib/domains/schemaBuilder.d.ts +19 -81
- package/lib/domains/schemaBuilder.d.ts.map +1 -1
- package/lib/domains/schemaBuilder.js +24 -92
- package/lib/domains/schemaBuilder.js.map +1 -1
- package/lib/domains/testRecursiveDomain.d.ts +0 -4
- package/lib/domains/testRecursiveDomain.d.ts.map +1 -1
- package/lib/domains/testRecursiveDomain.js +1 -8
- package/lib/domains/testRecursiveDomain.js.map +1 -1
- package/lib/events/events.d.ts.map +1 -1
- package/lib/events/events.js +1 -1
- package/lib/events/events.js.map +1 -1
- package/lib/external-utilities/typeboxValidator.d.ts.map +1 -1
- package/lib/external-utilities/typeboxValidator.js.map +1 -1
- package/lib/feature-libraries/changeAtomIdCodec.d.ts +1 -1
- package/lib/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
- package/lib/feature-libraries/changeAtomIdCodec.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts +3 -3
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +4 -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 +1 -1
- package/lib/feature-libraries/chunked-forest/chunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +5 -6
- package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +4 -3
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +3 -3
- package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -9
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +4 -3
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +3 -3
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +2 -3
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts +2 -2
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts +3 -3
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js +3 -4
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.js +1 -1
- package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +3 -3
- package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/uniformChunk.js +4 -4
- package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
- package/lib/feature-libraries/contextuallyTyped.d.ts +5 -9
- package/lib/feature-libraries/contextuallyTyped.d.ts.map +1 -1
- package/lib/feature-libraries/contextuallyTyped.js +6 -20
- package/lib/feature-libraries/contextuallyTyped.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -5
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +6 -6
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +18 -4
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +55 -20
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -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/noChangeCodecs.d.ts +8 -0
- package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -0
- package/lib/feature-libraries/default-schema/noChangeCodecs.js +7 -0
- package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -0
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js +1 -1
- package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
- package/lib/feature-libraries/editableTreeBinder.d.ts.map +1 -1
- package/lib/feature-libraries/editableTreeBinder.js +1 -1
- package/lib/feature-libraries/editableTreeBinder.js.map +1 -1
- package/lib/feature-libraries/fieldGenerator.d.ts +1 -1
- package/lib/feature-libraries/fieldGenerator.d.ts.map +1 -1
- package/lib/feature-libraries/fieldGenerator.js.map +1 -1
- package/lib/feature-libraries/flex-tree/context.d.ts +16 -4
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +17 -5
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +43 -36
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js +8 -5
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/index.d.ts +3 -3
- package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/index.js +2 -2
- package/lib/feature-libraries/flex-tree/index.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +7 -8
- package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyEntity.js +8 -12
- package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +21 -7
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +43 -22
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts +12 -9
- package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyNode.js +35 -80
- package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
- package/lib/feature-libraries/flex-tree/nodeKeys.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/nodeKeys.js.map +1 -1
- package/lib/feature-libraries/flex-tree/treeEvents.d.ts +7 -70
- 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/unboxed.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/unboxed.js +1 -1
- package/lib/feature-libraries/flex-tree/unboxed.js.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +1 -1
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -3
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +3 -3
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/format.js +1 -1
- package/lib/feature-libraries/forest-summary/format.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +8 -9
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +6 -7
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.js +2 -2
- package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
- package/lib/feature-libraries/memoizedIdRangeAllocator.js +1 -1
- package/lib/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/comparison.js +3 -3
- package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +19 -13
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts +3 -4
- package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +21 -0
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -0
- package/lib/{test/codec/codec.spec.d.ts → feature-libraries/modular-schema/fieldKindConfiguration.js} +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -0
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -2
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +3 -3
- package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +3 -7
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +3 -5
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js +7 -7
- package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +4 -4
- package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +5 -4
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +2 -2
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/isNeverTree.js +6 -7
- package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +4 -5
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +63 -27
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +13 -25
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +202 -110
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +5 -12
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js +2 -12
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +6 -4
- 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 +1 -1
- package/lib/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
- package/lib/feature-libraries/node-key/nodeKey.js.map +1 -1
- package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts +2 -2
- package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts.map +1 -1
- package/lib/feature-libraries/node-key/nodeKeyIndex.js +2 -2
- package/lib/feature-libraries/node-key/nodeKeyIndex.js.map +1 -1
- package/lib/feature-libraries/node-key/nodeKeyManager.d.ts +2 -2
- package/lib/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
- package/lib/feature-libraries/node-key/nodeKeyManager.js +2 -2
- package/lib/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +6 -5
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/optional-field/index.d.ts +1 -1
- package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/index.js +1 -1
- package/lib/feature-libraries/optional-field/index.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts +3 -5
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +18 -22
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/optional-field/{optionalFieldChangeFormat.d.ts → optionalFieldChangeFormatV1.d.ts} +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/{optionalFieldChangeFormat.js → optionalFieldChangeFormatV1.js} +11 -2
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +25 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +40 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +4 -7
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts +12 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.js +154 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV1.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +12 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +83 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -4
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +7 -150
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-aware/schemaAware.d.ts +3 -4
- package/lib/feature-libraries/schema-aware/schemaAware.d.ts.map +1 -1
- package/lib/feature-libraries/schema-aware/schemaAware.js +1 -1
- package/lib/feature-libraries/schema-aware/schemaAware.js.map +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts +1 -1
- package/lib/feature-libraries/schema-edits/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/index.js +1 -1
- package/lib/feature-libraries/schema-edits/index.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -3
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +10 -2
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeTypes.d.ts +5 -0
- package/lib/feature-libraries/schema-edits/schemaChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeTypes.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +3 -3
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/lib/feature-libraries/schema-index/format.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/format.js.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +2 -2
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/feature-libraries/schemaBuilder.d.ts +1 -1
- package/lib/feature-libraries/schemaBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/schemaBuilder.js +1 -1
- package/lib/feature-libraries/schemaBuilder.js.map +1 -1
- package/lib/feature-libraries/schemaBuilderBase.d.ts +1 -1
- package/lib/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
- package/lib/feature-libraries/schemaBuilderBase.js +2 -2
- package/lib/feature-libraries/schemaBuilderBase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts +9 -13
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +63 -30
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/format.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/format.js +1 -1
- package/lib/feature-libraries/sequence-field/format.js.map +1 -1
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts +3 -3
- 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 +5 -5
- 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 +1 -2
- package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.js +20 -29
- package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
- package/lib/feature-libraries/sequence-field/markListFactory.d.ts +4 -4
- package/lib/feature-libraries/sequence-field/markListFactory.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/markListFactory.js.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.d.ts +7 -7
- package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.js +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +25 -14
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.js +15 -6
- package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/lib/feature-libraries/sequence-field/prune.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -4
- package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.js +11 -17
- package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +2 -2
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +2 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js +13 -15
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +17 -17
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +7 -7
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts +7 -8
- 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 +42 -35
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +28 -7
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/feature-libraries/storedToViewSchema.d.ts +2 -2
- package/lib/feature-libraries/storedToViewSchema.d.ts.map +1 -1
- package/lib/feature-libraries/storedToViewSchema.js +3 -3
- package/lib/feature-libraries/storedToViewSchema.js.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.d.ts +1 -1
- package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
- package/lib/feature-libraries/treeCursorUtils.js +2 -2
- package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
- package/lib/feature-libraries/treeTextCursor.d.ts +1 -1
- package/lib/feature-libraries/treeTextCursor.d.ts.map +1 -1
- package/lib/feature-libraries/treeTextCursor.js +2 -2
- package/lib/feature-libraries/treeTextCursor.js.map +1 -1
- package/lib/feature-libraries/typed-schema/flexList.d.ts +1 -2
- 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 +0 -1
- package/lib/feature-libraries/typed-schema/index.d.ts.map +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 +4 -4
- package/lib/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
- package/lib/feature-libraries/typed-schema/typeUtils.d.ts +0 -5
- package/lib/feature-libraries/typed-schema/typeUtils.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/typeUtils.js.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +5 -4
- package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js +16 -8
- package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
- package/lib/feature-libraries/typed-schema/view.d.ts +1 -1
- package/lib/feature-libraries/typed-schema/view.d.ts.map +1 -1
- package/lib/feature-libraries/typed-schema/view.js +1 -1
- package/lib/feature-libraries/typed-schema/view.js.map +1 -1
- package/lib/feature-libraries/valueUtilities.d.ts +6 -3
- package/lib/feature-libraries/valueUtilities.d.ts.map +1 -1
- package/lib/feature-libraries/valueUtilities.js +8 -7
- package/lib/feature-libraries/valueUtilities.js.map +1 -1
- package/lib/index.d.ts +7 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -7
- package/lib/index.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 +90 -0
- package/lib/shared-tree/index.d.ts +3 -3
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +2 -2
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts +1 -1
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +6 -6
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +10 -3
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +21 -21
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +58 -8
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +43 -10
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +3 -5
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +18 -10
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -0
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +7 -5
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts +4 -188
- package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFormat.js +3 -3
- package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +4 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/shared-tree/treeApi.d.ts +83 -2
- package/lib/shared-tree/treeApi.d.ts.map +1 -1
- package/lib/shared-tree/treeApi.js +30 -7
- package/lib/shared-tree/treeApi.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +41 -20
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +115 -41
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree/treeView.d.ts +3 -3
- 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 +5 -32
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +9 -139
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts +2 -15
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +4 -48
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +4 -4
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +19 -6
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormat.d.ts +4 -5
- package/lib/shared-tree-core/editManagerFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormat.js +2 -3
- package/lib/shared-tree-core/editManagerFormat.js.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.d.ts +7 -6
- package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerSummarizer.js +4 -7
- package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +1 -1
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +7 -4
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +19 -3
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +10 -2
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +1 -0
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
- package/lib/shared-tree-core/messageTypes.js.map +1 -1
- package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
- package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts +10 -5
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +12 -12
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/simple-tree/arrayNode.d.ts +187 -0
- package/lib/simple-tree/arrayNode.d.ts.map +1 -0
- package/lib/simple-tree/arrayNode.js +433 -0
- package/lib/simple-tree/arrayNode.js.map +1 -0
- package/lib/simple-tree/index.d.ts +10 -8
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +4 -4
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +11 -0
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -0
- package/lib/simple-tree/leafNodeSchema.js +48 -0
- package/lib/simple-tree/leafNodeSchema.js.map +1 -0
- package/lib/simple-tree/mapNode.d.ts +86 -0
- package/lib/simple-tree/mapNode.d.ts.map +1 -0
- package/lib/simple-tree/mapNode.js +198 -0
- package/lib/simple-tree/mapNode.js.map +1 -0
- package/lib/simple-tree/objectNode.d.ts +62 -0
- package/lib/simple-tree/objectNode.d.ts.map +1 -0
- package/lib/simple-tree/objectNode.js +236 -0
- package/lib/simple-tree/objectNode.js.map +1 -0
- package/lib/simple-tree/proxies.d.ts +21 -62
- package/lib/simple-tree/proxies.d.ts.map +1 -1
- package/lib/simple-tree/proxies.js +119 -667
- package/lib/simple-tree/proxies.js.map +1 -1
- package/lib/simple-tree/proxyBinding.d.ts +48 -0
- package/lib/simple-tree/proxyBinding.d.ts.map +1 -0
- package/lib/simple-tree/proxyBinding.js +124 -0
- package/lib/simple-tree/proxyBinding.js.map +1 -0
- package/lib/simple-tree/rawNode.d.ts +9 -50
- package/lib/simple-tree/rawNode.d.ts.map +1 -1
- package/lib/simple-tree/rawNode.js +12 -85
- package/lib/simple-tree/rawNode.js.map +1 -1
- package/lib/simple-tree/schemaCaching.d.ts +26 -0
- package/lib/simple-tree/schemaCaching.d.ts.map +1 -0
- package/lib/simple-tree/schemaCaching.js +61 -0
- package/lib/simple-tree/schemaCaching.js.map +1 -0
- package/lib/simple-tree/schemaCreationUtilities.d.ts +2 -1
- package/lib/simple-tree/schemaCreationUtilities.d.ts.map +1 -1
- package/lib/simple-tree/schemaCreationUtilities.js +1 -1
- package/lib/simple-tree/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/schemaFactory.d.ts +92 -43
- package/lib/simple-tree/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/schemaFactory.js +105 -157
- package/lib/simple-tree/schemaFactory.js.map +1 -1
- package/lib/simple-tree/schemaFactoryRecursive.d.ts +27 -83
- package/lib/simple-tree/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/schemaFactoryRecursive.js +1 -114
- package/lib/simple-tree/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +123 -70
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js +81 -4
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/testRecursiveDomain.d.ts +8 -8
- package/lib/simple-tree/testRecursiveDomain.d.ts.map +1 -1
- package/lib/simple-tree/testRecursiveDomain.js +2 -2
- package/lib/simple-tree/testRecursiveDomain.js.map +1 -1
- package/lib/simple-tree/toFlexSchema.d.ts +8 -20
- package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
- package/lib/simple-tree/toFlexSchema.js +22 -27
- package/lib/simple-tree/toFlexSchema.js.map +1 -1
- package/lib/simple-tree/toMapTree.d.ts +12 -22
- package/lib/simple-tree/toMapTree.d.ts.map +1 -1
- package/lib/simple-tree/toMapTree.js +183 -133
- package/lib/simple-tree/toMapTree.js.map +1 -1
- package/lib/simple-tree/tree.d.ts +20 -3
- package/lib/simple-tree/tree.d.ts.map +1 -1
- package/lib/simple-tree/tree.js.map +1 -1
- package/lib/simple-tree/treeApi.d.ts +82 -5
- package/lib/simple-tree/treeApi.d.ts.map +1 -1
- package/lib/simple-tree/treeApi.js +90 -12
- package/lib/simple-tree/treeApi.js.map +1 -1
- package/lib/simple-tree/types.d.ts +1 -142
- package/lib/simple-tree/types.d.ts.map +1 -1
- package/lib/simple-tree/types.js.map +1 -1
- package/lib/simple-tree/typesUnsafe.d.ts +32 -17
- package/lib/simple-tree/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/typesUnsafe.js.map +1 -1
- package/lib/treeFactory.d.ts +31 -14
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +48 -22
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/brand.d.ts +26 -114
- package/lib/util/brand.d.ts.map +1 -1
- package/lib/util/brand.js +23 -83
- package/lib/util/brand.js.map +1 -1
- package/lib/util/idAllocator.d.ts.map +1 -1
- package/lib/util/idAllocator.js +1 -1
- package/lib/util/idAllocator.js.map +1 -1
- package/lib/util/index.d.ts +5 -3
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +3 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/nestedSet.d.ts.map +1 -1
- package/lib/util/nestedSet.js.map +1 -1
- package/lib/util/opaque.d.ts +46 -0
- package/lib/util/opaque.d.ts.map +1 -0
- package/lib/util/opaque.js +24 -0
- package/lib/util/opaque.js.map +1 -0
- package/lib/util/referenceCounting.d.ts +1 -1
- package/lib/util/referenceCounting.d.ts.map +1 -1
- package/lib/util/referenceCounting.js +2 -2
- package/lib/util/referenceCounting.js.map +1 -1
- package/lib/util/typeCheckTests.d.ts +1 -1
- package/lib/util/typeCheckTests.d.ts.map +1 -1
- package/lib/util/typeCheckTests.js.map +1 -1
- package/lib/util/typeUtils.d.ts +13 -0
- package/lib/util/typeUtils.d.ts.map +1 -1
- package/lib/util/typeUtils.js.map +1 -1
- package/lib/util/typeboxBrand.d.ts +17 -0
- package/lib/util/typeboxBrand.d.ts.map +1 -0
- package/lib/util/typeboxBrand.js +27 -0
- package/lib/util/typeboxBrand.js.map +1 -0
- package/lib/util/utils.d.ts +2 -15
- package/lib/util/utils.d.ts.map +1 -1
- package/lib/util/utils.js +3 -3
- package/lib/util/utils.js.map +1 -1
- package/package.json +55 -50
- package/src/codec/codec.ts +15 -7
- package/src/codec/discriminatedUnions.ts +3 -1
- package/src/codec/index.ts +8 -1
- package/src/codec/noopValidator.ts +1 -0
- package/src/codec/versioned/codec.ts +55 -25
- package/src/codec/versioned/index.ts +5 -1
- package/src/core/README.md +1 -5
- package/src/core/change-family/changeFamily.ts +3 -2
- package/src/core/forest/editableForest.ts +7 -5
- package/src/core/forest/forest.ts +11 -4
- package/src/core/index.ts +10 -8
- package/src/core/rebase/changeRebaser.ts +1 -0
- package/src/core/rebase/index.ts +4 -0
- package/src/core/rebase/revisionTagCodec.ts +3 -1
- package/src/core/rebase/types.ts +46 -1
- package/src/core/rebase/utils.ts +9 -6
- package/src/core/revertible/index.ts +1 -1
- package/src/core/revertible/revertible.ts +17 -50
- package/src/core/schema-stored/format.ts +1 -0
- package/src/core/schema-stored/index.ts +5 -2
- package/src/{feature-libraries → core/schema-stored}/multiplicity.ts +1 -0
- package/src/core/schema-stored/schema.ts +51 -23
- package/src/core/schema-stored/storedSchemaRepository.ts +4 -2
- package/src/core/tree/anchorSet.ts +52 -63
- package/src/core/tree/cursor.ts +3 -1
- package/src/core/tree/delta.ts +1 -0
- package/src/core/tree/deltaUtil.ts +2 -1
- package/src/core/tree/detachedFieldIndex.ts +6 -4
- package/src/core/tree/detachedFieldIndexCodec.ts +4 -2
- package/src/core/tree/detachedFieldIndexFormat.ts +2 -0
- package/src/core/tree/detachedFieldIndexTypes.ts +1 -0
- package/src/core/tree/mapTree.ts +1 -0
- package/src/core/tree/pathTree.ts +1 -0
- package/src/core/tree/persistedTreeTextFormat.ts +1 -0
- package/src/core/tree/sparseTree.ts +4 -2
- package/src/core/tree/treeTextFormat.ts +1 -0
- package/src/core/tree/types.ts +2 -1
- package/src/core/tree/visitDelta.ts +65 -18
- package/src/core/tree/visitPath.ts +2 -1
- package/src/core/tree/visitorUtils.ts +7 -5
- package/src/domains/json/jsonCursor.ts +6 -4
- package/src/domains/json/jsonDomainSchema.ts +1 -2
- package/src/domains/leafDomain.ts +1 -1
- package/src/domains/nodeKey/nodeKeySchema.ts +5 -4
- package/src/domains/schemaBuilder.ts +25 -214
- package/src/domains/testRecursiveDomain.ts +2 -25
- package/src/events/events.ts +2 -1
- package/src/external-utilities/typeboxValidator.ts +2 -1
- package/src/feature-libraries/README.md +4 -4
- package/src/feature-libraries/changeAtomIdCodec.ts +4 -4
- package/src/feature-libraries/chunked-forest/basicChunk.ts +12 -10
- package/src/feature-libraries/chunked-forest/chunk.ts +3 -2
- package/src/feature-libraries/chunked-forest/chunkTree.ts +17 -15
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +20 -17
- package/src/feature-libraries/chunked-forest/codec/chunkCodecUtilities.ts +4 -3
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +16 -14
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +5 -3
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +2 -1
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +9 -12
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +11 -9
- package/src/feature-libraries/chunked-forest/codec/format.ts +4 -3
- package/src/feature-libraries/chunked-forest/codec/index.ts +1 -6
- package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +8 -6
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncoding.ts +13 -11
- package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +2 -1
- package/src/feature-libraries/chunked-forest/emptyChunk.ts +5 -4
- package/src/feature-libraries/chunked-forest/index.ts +0 -1
- package/src/feature-libraries/chunked-forest/sequenceChunk.ts +3 -2
- package/src/feature-libraries/chunked-forest/uniformChunk.ts +11 -9
- package/src/feature-libraries/contextuallyTyped.ts +23 -36
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +36 -57
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +78 -25
- package/src/feature-libraries/default-schema/defaultSchema.ts +1 -0
- package/src/feature-libraries/default-schema/index.ts +2 -0
- package/src/feature-libraries/default-schema/noChangeCodecs.ts +12 -0
- package/src/feature-libraries/detachedFieldIndexSummarizer.ts +4 -3
- package/src/feature-libraries/editableTreeBinder.ts +3 -1
- package/src/feature-libraries/fieldGenerator.ts +2 -1
- package/src/feature-libraries/flex-tree/README.md +2 -2
- package/src/feature-libraries/flex-tree/context.ts +34 -8
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +63 -45
- package/src/feature-libraries/flex-tree/index.ts +3 -3
- package/src/feature-libraries/flex-tree/lazyEntity.ts +13 -23
- package/src/feature-libraries/flex-tree/lazyField.ts +95 -47
- package/src/feature-libraries/flex-tree/lazyNode.ts +65 -131
- package/src/feature-libraries/flex-tree/nodeKeys.ts +1 -0
- package/src/feature-libraries/flex-tree/treeEvents.ts +7 -73
- package/src/feature-libraries/flex-tree/unboxed.ts +3 -2
- package/src/feature-libraries/flex-tree/utilities.ts +1 -0
- package/src/feature-libraries/forest-summary/codec.ts +3 -1
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +13 -11
- package/src/feature-libraries/forest-summary/format.ts +2 -1
- package/src/feature-libraries/index.ts +13 -12
- package/src/feature-libraries/mapTreeCursor.ts +8 -6
- package/src/feature-libraries/memoizedIdRangeAllocator.ts +3 -3
- package/src/feature-libraries/modular-schema/comparison.ts +11 -9
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +29 -28
- package/src/feature-libraries/modular-schema/fieldKind.ts +8 -4
- package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +24 -0
- package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +7 -5
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +12 -20
- package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +18 -31
- package/src/feature-libraries/modular-schema/genericFieldKindFormat.ts +2 -2
- package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +4 -4
- package/src/feature-libraries/modular-schema/index.ts +5 -2
- package/src/feature-libraries/modular-schema/isNeverTree.ts +12 -12
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +151 -56
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +460 -251
- package/src/feature-libraries/modular-schema/modularChangeFormat.ts +4 -22
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +7 -3
- package/src/feature-libraries/node-key/nodeKey.ts +2 -1
- package/src/feature-libraries/node-key/nodeKeyIndex.ts +5 -3
- package/src/feature-libraries/node-key/nodeKeyManager.ts +6 -4
- package/src/feature-libraries/object-forest/objectForest.ts +25 -23
- package/src/feature-libraries/optional-field/index.ts +1 -1
- package/src/feature-libraries/optional-field/optionalField.ts +38 -44
- package/src/feature-libraries/optional-field/{optionalFieldChangeFormat.ts → optionalFieldChangeFormatV1.ts} +10 -1
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV2.ts +60 -0
- package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +4 -7
- package/src/feature-libraries/optional-field/optionalFieldCodecV1.ts +204 -0
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +135 -0
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +11 -207
- package/src/feature-libraries/schema-aware/README.md +1 -1
- package/src/feature-libraries/schema-aware/schemaAware.ts +13 -9
- package/src/feature-libraries/schema-edits/index.ts +1 -1
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +23 -3
- package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +1 -0
- package/src/feature-libraries/schema-edits/schemaChangeTypes.ts +6 -0
- package/src/feature-libraries/schema-index/codec.ts +8 -7
- package/src/feature-libraries/schema-index/format.ts +1 -0
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +10 -8
- package/src/feature-libraries/schemaBuilder.ts +2 -1
- package/src/feature-libraries/schemaBuilderBase.ts +16 -14
- package/src/feature-libraries/sequence-field/compose.ts +283 -176
- package/src/feature-libraries/sequence-field/format.ts +2 -1
- package/src/feature-libraries/sequence-field/helperTypes.ts +5 -5
- package/src/feature-libraries/sequence-field/index.ts +4 -5
- package/src/feature-libraries/sequence-field/invert.ts +49 -82
- package/src/feature-libraries/sequence-field/markListFactory.ts +4 -4
- package/src/feature-libraries/sequence-field/markQueue.ts +12 -10
- package/src/feature-libraries/sequence-field/moveEffectTable.ts +61 -31
- package/src/feature-libraries/sequence-field/prune.ts +4 -8
- package/src/feature-libraries/sequence-field/rebase.ts +128 -141
- package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +9 -10
- package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +3 -2
- package/src/feature-libraries/sequence-field/sequenceFieldChangeRebaser.ts +3 -2
- package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +31 -38
- package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +38 -59
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +15 -15
- package/src/feature-libraries/sequence-field/types.ts +7 -9
- package/src/feature-libraries/sequence-field/utils.ts +95 -76
- package/src/feature-libraries/storedToViewSchema.ts +13 -12
- package/src/feature-libraries/treeCursorUtils.ts +9 -8
- package/src/feature-libraries/treeTextCursor.ts +12 -10
- package/src/feature-libraries/typed-schema/flexList.ts +1 -3
- package/src/feature-libraries/typed-schema/index.ts +0 -2
- package/src/feature-libraries/typed-schema/schemaCollection.ts +11 -10
- package/src/feature-libraries/typed-schema/typeUtils.ts +0 -6
- package/src/feature-libraries/typed-schema/typedTreeSchema.ts +32 -18
- package/src/feature-libraries/typed-schema/view.ts +6 -5
- package/src/feature-libraries/valueUtilities.ts +11 -9
- package/src/index.ts +34 -26
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/index.ts +9 -1
- package/src/shared-tree/schematizeTree.ts +12 -10
- package/src/shared-tree/schematizingTreeView.ts +47 -28
- package/src/shared-tree/sharedTree.ts +131 -44
- package/src/shared-tree/sharedTreeChangeCodecs.ts +79 -62
- package/src/shared-tree/sharedTreeChangeFamily.ts +13 -7
- package/src/shared-tree/sharedTreeChangeFormat.ts +4 -3
- package/src/shared-tree/sharedTreeEditBuilder.ts +5 -1
- package/src/shared-tree/treeApi.ts +141 -10
- package/src/shared-tree/treeCheckout.ts +203 -60
- package/src/shared-tree/treeView.ts +5 -4
- package/src/shared-tree-core/branch.ts +20 -204
- package/src/shared-tree-core/editManager.ts +20 -78
- package/src/shared-tree-core/editManagerCodecs.ts +111 -63
- package/src/shared-tree-core/editManagerFormat.ts +7 -8
- package/src/shared-tree-core/editManagerSummarizer.ts +14 -36
- package/src/shared-tree-core/index.ts +2 -0
- package/src/shared-tree-core/messageCodecs.ts +62 -5
- package/src/shared-tree-core/messageFormat.ts +12 -2
- package/src/shared-tree-core/messageTypes.ts +1 -0
- package/src/shared-tree-core/sequenceIdUtils.ts +1 -0
- package/src/shared-tree-core/sharedTreeCore.ts +40 -22
- package/src/simple-tree/ProxyBinding.md +102 -0
- package/src/simple-tree/README.md +0 -6
- package/src/simple-tree/arrayNode.ts +769 -0
- package/src/simple-tree/index.ts +16 -9
- package/src/simple-tree/leafNodeSchema.ts +72 -0
- package/src/simple-tree/mapNode.ts +343 -0
- package/src/simple-tree/objectNode.ts +411 -0
- package/src/simple-tree/proxies.ts +197 -932
- package/src/simple-tree/proxyBinding.ts +182 -0
- package/src/simple-tree/rawNode.ts +19 -135
- package/src/simple-tree/schemaCaching.ts +90 -0
- package/src/simple-tree/schemaCreationUtilities.ts +6 -9
- package/src/simple-tree/schemaFactory.ts +247 -261
- package/src/simple-tree/schemaFactoryRecursive.ts +32 -185
- package/src/simple-tree/schemaTypes.ts +149 -81
- package/src/simple-tree/testRecursiveDomain.ts +3 -3
- package/src/simple-tree/toFlexSchema.ts +39 -47
- package/src/simple-tree/toMapTree.ts +236 -196
- package/src/simple-tree/tree.ts +24 -3
- package/src/simple-tree/treeApi.ts +209 -24
- package/src/simple-tree/types.ts +1 -173
- package/src/simple-tree/typesUnsafe.ts +42 -21
- package/src/treeFactory.ts +51 -26
- package/src/util/brand.ts +36 -168
- package/src/util/idAllocator.ts +2 -1
- package/src/util/index.ts +4 -18
- package/src/util/nestedSet.ts +1 -1
- package/src/util/opaque.ts +68 -0
- package/src/util/referenceCounting.ts +3 -3
- package/src/util/typeCheckTests.ts +7 -7
- package/src/util/typeUtils.ts +14 -0
- package/src/util/typeboxBrand.ts +31 -0
- package/src/util/utils.ts +3 -17
- package/tsconfig.json +1 -1
- package/api-extractor-cjs.json +0 -18
- package/api-extractor-esm.json +0 -14
- package/dist/feature-libraries/multiplicity.d.ts.map +0 -1
- package/dist/feature-libraries/multiplicity.js.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormat.d.ts.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormat.js.map +0 -1
- package/dist/simple-tree/flexNode.d.ts +0 -35
- package/dist/simple-tree/flexNode.d.ts.map +0 -1
- package/dist/simple-tree/flexNode.js +0 -62
- package/dist/simple-tree/flexNode.js.map +0 -1
- package/dist/simple-tree/treeArrayNode.d.ts +0 -46
- package/dist/simple-tree/treeArrayNode.d.ts.map +0 -1
- package/dist/simple-tree/treeArrayNode.js +0 -50
- package/dist/simple-tree/treeArrayNode.js.map +0 -1
- package/dist/tree-alpha.d.ts +0 -2159
- package/dist/tree-beta.d.ts +0 -2159
- package/dist/tree-public.d.ts +0 -1942
- package/dist/tree-untrimmed.d.ts +0 -6880
- package/lib/feature-libraries/multiplicity.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormat.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormat.js.map +0 -1
- package/lib/simple-tree/flexNode.d.ts +0 -35
- package/lib/simple-tree/flexNode.d.ts.map +0 -1
- package/lib/simple-tree/flexNode.js +0 -55
- package/lib/simple-tree/flexNode.js.map +0 -1
- package/lib/simple-tree/treeArrayNode.d.ts +0 -46
- package/lib/simple-tree/treeArrayNode.d.ts.map +0 -1
- package/lib/simple-tree/treeArrayNode.js +0 -46
- package/lib/simple-tree/treeArrayNode.js.map +0 -1
- package/lib/test/codec/ajvValidator.cjs +0 -70
- package/lib/test/codec/ajvValidator.cjs.map +0 -1
- package/lib/test/codec/ajvValidator.d.cts +0 -13
- package/lib/test/codec/ajvValidator.d.cts.map +0 -1
- package/lib/test/codec/codec.spec.d.ts.map +0 -1
- package/lib/test/codec/codec.spec.js +0 -36
- package/lib/test/codec/codec.spec.js.map +0 -1
- package/lib/test/codec/index.d.ts +0 -7
- package/lib/test/codec/index.d.ts.map +0 -1
- package/lib/test/codec/index.js +0 -7
- package/lib/test/codec/index.js.map +0 -1
- package/lib/test/codec/utils.d.ts +0 -58
- package/lib/test/codec/utils.d.ts.map +0 -1
- package/lib/test/codec/utils.js +0 -61
- package/lib/test/codec/utils.js.map +0 -1
- package/lib/test/cursorTestSuite.d.ts +0 -106
- package/lib/test/cursorTestSuite.d.ts.map +0 -1
- package/lib/test/cursorTestSuite.js +0 -680
- package/lib/test/cursorTestSuite.js.map +0 -1
- package/lib/test/domains/json/benchmarks.d.ts +0 -17
- package/lib/test/domains/json/benchmarks.d.ts.map +0 -1
- package/lib/test/domains/json/benchmarks.js +0 -61
- package/lib/test/domains/json/benchmarks.js.map +0 -1
- package/lib/test/domains/json/canada.d.ts +0 -33
- package/lib/test/domains/json/canada.d.ts.map +0 -1
- package/lib/test/domains/json/canada.js +0 -81
- package/lib/test/domains/json/canada.js.map +0 -1
- package/lib/test/domains/json/citm.d.ts +0 -81
- package/lib/test/domains/json/citm.d.ts.map +0 -1
- package/lib/test/domains/json/citm.js +0 -515
- package/lib/test/domains/json/citm.js.map +0 -1
- package/lib/test/domains/json/jsDirectObject.bench.d.ts +0 -13
- package/lib/test/domains/json/jsDirectObject.bench.d.ts.map +0 -1
- package/lib/test/domains/json/jsDirectObject.bench.js +0 -74
- package/lib/test/domains/json/jsDirectObject.bench.js.map +0 -1
- package/lib/test/domains/json/jsObjectUtil.d.ts +0 -12
- package/lib/test/domains/json/jsObjectUtil.d.ts.map +0 -1
- package/lib/test/domains/json/jsObjectUtil.js +0 -36
- package/lib/test/domains/json/jsObjectUtil.js.map +0 -1
- package/lib/test/domains/json/jsonCursor.bench.d.ts +0 -11
- package/lib/test/domains/json/jsonCursor.bench.d.ts.map +0 -1
- package/lib/test/domains/json/jsonCursor.bench.js +0 -220
- package/lib/test/domains/json/jsonCursor.bench.js.map +0 -1
- package/lib/test/domains/json/jsonCursor.spec.d.ts +0 -6
- package/lib/test/domains/json/jsonCursor.spec.d.ts.map +0 -1
- package/lib/test/domains/json/jsonCursor.spec.js +0 -75
- package/lib/test/domains/json/jsonCursor.spec.js.map +0 -1
- package/lib/test/domains/json/jsonGeneratorUtils.d.ts +0 -9
- package/lib/test/domains/json/jsonGeneratorUtils.d.ts.map +0 -1
- package/lib/test/domains/json/jsonGeneratorUtils.js +0 -36
- package/lib/test/domains/json/jsonGeneratorUtils.js.map +0 -1
- package/lib/test/domains/json/twitter.d.ts +0 -204
- package/lib/test/domains/json/twitter.d.ts.map +0 -1
- package/lib/test/domains/json/twitter.js +0 -7413
- package/lib/test/domains/json/twitter.js.map +0 -1
- package/lib/test/domains/schemaBuilder.spec.d.ts +0 -6
- package/lib/test/domains/schemaBuilder.spec.d.ts.map +0 -1
- package/lib/test/domains/schemaBuilder.spec.js +0 -148
- package/lib/test/domains/schemaBuilder.spec.js.map +0 -1
- package/lib/test/editMinter.d.ts +0 -8
- package/lib/test/editMinter.d.ts.map +0 -1
- package/lib/test/editMinter.js +0 -21
- package/lib/test/editMinter.js.map +0 -1
- package/lib/test/events/eventEmitter.spec.d.ts +0 -6
- package/lib/test/events/eventEmitter.spec.d.ts.map +0 -1
- package/lib/test/events/eventEmitter.spec.js +0 -159
- package/lib/test/events/eventEmitter.spec.js.map +0 -1
- package/lib/test/exhaustiveRebaserUtils.d.ts +0 -78
- package/lib/test/exhaustiveRebaserUtils.d.ts.map +0 -1
- package/lib/test/exhaustiveRebaserUtils.js +0 -53
- package/lib/test/exhaustiveRebaserUtils.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/basicChunk.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/basicChunk.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/basicChunk.spec.js +0 -161
- package/lib/test/feature-libraries/chunked-forest/basicChunk.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.d.ts +0 -2
- package/lib/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.js +0 -102
- package/lib/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkTree.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/chunkTree.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkTree.spec.js +0 -259
- package/lib/test/feature-libraries/chunked-forest/chunkTree.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkedForest.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/chunkedForest.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/chunkedForest.spec.js +0 -47
- package/lib/test/feature-libraries/chunked-forest/chunkedForest.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.d.ts +0 -9
- package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.js +0 -124
- package/lib/test/feature-libraries/chunked-forest/codec/checkEncode.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkCodecUtilities.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/chunkCodecUtilities.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkCodecUtilities.spec.js +0 -187
- package/lib/test/feature-libraries/chunked-forest/codec/chunkCodecUtilities.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecoding.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecoding.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecoding.spec.js +0 -308
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecoding.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.spec.js +0 -123
- package/lib/test/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.spec.d.ts +0 -7
- package/lib/test/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.spec.js +0 -135
- package/lib/test/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.d.ts +0 -11
- package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.js +0 -211
- package/lib/test/feature-libraries/chunked-forest/codec/compressedEncode.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/format.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/format.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/format.spec.js +0 -15
- package/lib/test/feature-libraries/chunked-forest/codec/format.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/nodeShape.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/nodeShape.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/nodeShape.spec.js +0 -98
- package/lib/test/feature-libraries/chunked-forest/codec/nodeShape.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/schemaBasedEncoding.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/schemaBasedEncoding.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/schemaBasedEncoding.spec.js +0 -176
- package/lib/test/feature-libraries/chunked-forest/codec/schemaBasedEncoding.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/uncompressedEncode.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/codec/uncompressedEncode.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/codec/uncompressedEncode.spec.js +0 -29
- package/lib/test/feature-libraries/chunked-forest/codec/uncompressedEncode.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/fieldCursorTestUtilities.d.ts +0 -12
- package/lib/test/feature-libraries/chunked-forest/fieldCursorTestUtilities.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/fieldCursorTestUtilities.js +0 -38
- package/lib/test/feature-libraries/chunked-forest/fieldCursorTestUtilities.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/uniformChunk.spec.d.ts +0 -6
- package/lib/test/feature-libraries/chunked-forest/uniformChunk.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/uniformChunk.spec.js +0 -138
- package/lib/test/feature-libraries/chunked-forest/uniformChunk.spec.js.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.d.ts +0 -34
- package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.d.ts.map +0 -1
- package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.js +0 -114
- package/lib/test/feature-libraries/chunked-forest/uniformChunkTestData.js.map +0 -1
- package/lib/test/feature-libraries/contextuallyTyped.spec.d.ts +0 -6
- package/lib/test/feature-libraries/contextuallyTyped.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/contextuallyTyped.spec.js +0 -107
- package/lib/test/feature-libraries/contextuallyTyped.spec.js.map +0 -1
- package/lib/test/feature-libraries/default-field-kinds/defaultChangeFamily.spec.d.ts +0 -6
- package/lib/test/feature-libraries/default-field-kinds/defaultChangeFamily.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/default-field-kinds/defaultChangeFamily.spec.js +0 -850
- package/lib/test/feature-libraries/default-field-kinds/defaultChangeFamily.spec.js.map +0 -1
- package/lib/test/feature-libraries/default-field-kinds/defaultFieldKinds.spec.d.ts +0 -6
- package/lib/test/feature-libraries/default-field-kinds/defaultFieldKinds.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/default-field-kinds/defaultFieldKinds.spec.js +0 -110
- package/lib/test/feature-libraries/default-field-kinds/defaultFieldKinds.spec.js.map +0 -1
- package/lib/test/feature-libraries/deltaUtils.spec.d.ts +0 -6
- package/lib/test/feature-libraries/deltaUtils.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/deltaUtils.spec.js +0 -87
- package/lib/test/feature-libraries/deltaUtils.spec.js.map +0 -1
- package/lib/test/feature-libraries/fieldKindTestUtils.d.ts +0 -20
- package/lib/test/feature-libraries/fieldKindTestUtils.d.ts.map +0 -1
- package/lib/test/feature-libraries/fieldKindTestUtils.js +0 -42
- package/lib/test/feature-libraries/fieldKindTestUtils.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/editableTree.identifier.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/editableTree.identifier.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/editableTree.identifier.spec.js +0 -91
- package/lib/test/feature-libraries/flex-tree/editableTree.identifier.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/editableTreeTypes.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/editableTreeTypes.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/editableTreeTypes.spec.js +0 -225
- package/lib/test/feature-libraries/flex-tree/editableTreeTypes.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/events.spec.d.ts +0 -2
- package/lib/test/feature-libraries/flex-tree/events.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/events.spec.js +0 -605
- package/lib/test/feature-libraries/flex-tree/events.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/lazyField.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/lazyField.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/lazyField.spec.js +0 -326
- package/lib/test/feature-libraries/flex-tree/lazyField.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/lazyNode.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/lazyNode.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/lazyNode.spec.js +0 -381
- package/lib/test/feature-libraries/flex-tree/lazyNode.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/navigation.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/navigation.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/navigation.spec.js +0 -50
- package/lib/test/feature-libraries/flex-tree/navigation.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/unboxed.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/unboxed.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/unboxed.spec.js +0 -197
- package/lib/test/feature-libraries/flex-tree/unboxed.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/utilities.spec.d.ts +0 -6
- package/lib/test/feature-libraries/flex-tree/utilities.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/utilities.spec.js +0 -109
- package/lib/test/feature-libraries/flex-tree/utilities.spec.js.map +0 -1
- package/lib/test/feature-libraries/flex-tree/utils.d.ts +0 -32
- package/lib/test/feature-libraries/flex-tree/utils.d.ts.map +0 -1
- package/lib/test/feature-libraries/flex-tree/utils.js +0 -50
- package/lib/test/feature-libraries/flex-tree/utils.js.map +0 -1
- package/lib/test/feature-libraries/forest-summary/forestSummarizerCodec.spec.d.ts +0 -6
- package/lib/test/feature-libraries/forest-summary/forestSummarizerCodec.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/forest-summary/forestSummarizerCodec.spec.js +0 -115
- package/lib/test/feature-libraries/forest-summary/forestSummarizerCodec.spec.js.map +0 -1
- package/lib/test/feature-libraries/mapTreeCursor.spec.d.ts +0 -6
- package/lib/test/feature-libraries/mapTreeCursor.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/mapTreeCursor.spec.js +0 -8
- package/lib/test/feature-libraries/mapTreeCursor.spec.js.map +0 -1
- package/lib/test/feature-libraries/memoizedIdRangeAllocator.spec.d.ts +0 -6
- package/lib/test/feature-libraries/memoizedIdRangeAllocator.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/memoizedIdRangeAllocator.spec.js +0 -80
- package/lib/test/feature-libraries/memoizedIdRangeAllocator.spec.js.map +0 -1
- package/lib/test/feature-libraries/mitigatedChangeFamily.spec.d.ts +0 -6
- package/lib/test/feature-libraries/mitigatedChangeFamily.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/mitigatedChangeFamily.spec.js +0 -96
- package/lib/test/feature-libraries/mitigatedChangeFamily.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/basicRebasers.d.ts +0 -44
- package/lib/test/feature-libraries/modular-schema/basicRebasers.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/basicRebasers.js +0 -77
- package/lib/test/feature-libraries/modular-schema/basicRebasers.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/comparison.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/comparison.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/comparison.spec.js +0 -264
- package/lib/test/feature-libraries/modular-schema/comparison.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/genericFieldKind.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/genericFieldKind.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/genericFieldKind.spec.js +0 -345
- package/lib/test/feature-libraries/modular-schema/genericFieldKind.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/genericFieldSnapshots.test.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/genericFieldSnapshots.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/genericFieldSnapshots.test.js +0 -49
- package/lib/test/feature-libraries/modular-schema/genericFieldSnapshots.test.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/isNeverTree.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/isNeverTree.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/isNeverTree.spec.js +0 -126
- package/lib/test/feature-libraries/modular-schema/isNeverTree.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/modularChangeFamily.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/modularChangeFamily.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/modularChangeFamily.spec.js +0 -1070
- package/lib/test/feature-libraries/modular-schema/modularChangeFamily.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/rangeMap.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/rangeMap.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/rangeMap.spec.js +0 -182
- package/lib/test/feature-libraries/modular-schema/rangeMap.spec.js.map +0 -1
- package/lib/test/feature-libraries/modular-schema/schemaEvolutionExamples.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modular-schema/schemaEvolutionExamples.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modular-schema/schemaEvolutionExamples.spec.js +0 -390
- package/lib/test/feature-libraries/modular-schema/schemaEvolutionExamples.spec.js.map +0 -1
- package/lib/test/feature-libraries/modularChangeFamilyIntegration.spec.d.ts +0 -6
- package/lib/test/feature-libraries/modularChangeFamilyIntegration.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/modularChangeFamilyIntegration.spec.js +0 -556
- package/lib/test/feature-libraries/modularChangeFamilyIntegration.spec.js.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKey.spec.d.ts +0 -6
- package/lib/test/feature-libraries/node-key/nodeKey.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKey.spec.js +0 -74
- package/lib/test/feature-libraries/node-key/nodeKey.spec.js.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.bench.d.ts +0 -6
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.bench.d.ts.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.bench.js +0 -258
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.bench.js.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.spec.d.ts +0 -6
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.spec.js +0 -262
- package/lib/test/feature-libraries/node-key/nodeKeyIndex.spec.js.map +0 -1
- package/lib/test/feature-libraries/objectForest.spec.d.ts +0 -6
- package/lib/test/feature-libraries/objectForest.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/objectForest.spec.js +0 -62
- package/lib/test/feature-libraries/objectForest.spec.js.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.d.ts +0 -6
- package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.js +0 -352
- package/lib/test/feature-libraries/optional-field/optionalChangeRebaser.test.js.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalField.spec.d.ts +0 -6
- package/lib/test/feature-libraries/optional-field/optionalField.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalField.spec.js +0 -396
- package/lib/test/feature-libraries/optional-field/optionalField.spec.js.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldChangeCodecs.test.d.ts +0 -6
- package/lib/test/feature-libraries/optional-field/optionalFieldChangeCodecs.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldChangeCodecs.test.js +0 -50
- package/lib/test/feature-libraries/optional-field/optionalFieldChangeCodecs.test.js.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldSnapshots.test.d.ts +0 -6
- package/lib/test/feature-libraries/optional-field/optionalFieldSnapshots.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldSnapshots.test.js +0 -59
- package/lib/test/feature-libraries/optional-field/optionalFieldSnapshots.test.js.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldUtils.d.ts +0 -62
- package/lib/test/feature-libraries/optional-field/optionalFieldUtils.d.ts.map +0 -1
- package/lib/test/feature-libraries/optional-field/optionalFieldUtils.js +0 -232
- package/lib/test/feature-libraries/optional-field/optionalFieldUtils.js.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaAware.spec.d.ts +0 -6
- package/lib/test/feature-libraries/schema-aware/schemaAware.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaAware.spec.js +0 -133
- package/lib/test/feature-libraries/schema-aware/schemaAware.spec.js.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaComplex.d.ts +0 -16
- package/lib/test/feature-libraries/schema-aware/schemaComplex.d.ts.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaComplex.js +0 -40
- package/lib/test/feature-libraries/schema-aware/schemaComplex.js.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaSimple.d.ts +0 -13
- package/lib/test/feature-libraries/schema-aware/schemaSimple.d.ts.map +0 -1
- package/lib/test/feature-libraries/schema-aware/schemaSimple.js +0 -28
- package/lib/test/feature-libraries/schema-aware/schemaSimple.js.map +0 -1
- package/lib/test/feature-libraries/schema-index/codec.spec.d.ts +0 -6
- package/lib/test/feature-libraries/schema-index/codec.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/schema-index/codec.spec.js +0 -81
- package/lib/test/feature-libraries/schema-index/codec.spec.js.map +0 -1
- package/lib/test/feature-libraries/schema-index/schemaSummarizer.spec.d.ts +0 -6
- package/lib/test/feature-libraries/schema-index/schemaSummarizer.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/schema-index/schemaSummarizer.spec.js +0 -28
- package/lib/test/feature-libraries/schema-index/schemaSummarizer.spec.js.map +0 -1
- package/lib/test/feature-libraries/schemaBuilder.spec.d.ts +0 -6
- package/lib/test/feature-libraries/schemaBuilder.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/schemaBuilder.spec.js +0 -88
- package/lib/test/feature-libraries/schemaBuilder.spec.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/compose.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/compose.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/compose.test.js +0 -1431
- package/lib/test/feature-libraries/sequence-field/compose.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/invert.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/invert.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/invert.test.js +0 -418
- package/lib/test/feature-libraries/sequence-field/invert.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/markListFactory.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/markListFactory.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/markListFactory.test.js +0 -239
- package/lib/test/feature-libraries/sequence-field/markListFactory.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/populatedMarks.d.ts +0 -18
- package/lib/test/feature-libraries/sequence-field/populatedMarks.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/populatedMarks.js +0 -95
- package/lib/test/feature-libraries/sequence-field/populatedMarks.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.d.ts +0 -12
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.js +0 -35
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.test.js +0 -42
- package/lib/test/feature-libraries/sequence-field/randomChangeGenerator.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/rebase.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/rebase.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/rebase.test.js +0 -1038
- package/lib/test/feature-libraries/sequence-field/rebase.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/relevantRemovedRoots.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/relevantRemovedRoots.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/relevantRemovedRoots.test.js +0 -211
- package/lib/test/feature-libraries/sequence-field/relevantRemovedRoots.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.d.ts +0 -11
- package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.js +0 -784
- package/lib/test/feature-libraries/sequence-field/sequenceChangeRebaser.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceField.spec.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceField.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceField.spec.js +0 -36
- package/lib/test/feature-libraries/sequence-field/sequenceField.spec.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldCodecs.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceFieldCodecs.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldCodecs.test.js +0 -34
- package/lib/test/feature-libraries/sequence-field/sequenceFieldCodecs.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldEditor.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceFieldEditor.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldEditor.test.js +0 -38
- package/lib/test/feature-libraries/sequence-field/sequenceFieldEditor.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldSnapshots.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceFieldSnapshots.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldSnapshots.test.js +0 -34
- package/lib/test/feature-libraries/sequence-field/sequenceFieldSnapshots.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldToDelta.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceFieldToDelta.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldToDelta.test.js +0 -417
- package/lib/test/feature-libraries/sequence-field/sequenceFieldToDelta.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldUtils.test.d.ts +0 -6
- package/lib/test/feature-libraries/sequence-field/sequenceFieldUtils.test.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/sequenceFieldUtils.test.js +0 -40
- package/lib/test/feature-libraries/sequence-field/sequenceFieldUtils.test.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/testEdits.d.ts +0 -124
- package/lib/test/feature-libraries/sequence-field/testEdits.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/testEdits.js +0 -270
- package/lib/test/feature-libraries/sequence-field/testEdits.js.map +0 -1
- package/lib/test/feature-libraries/sequence-field/utils.d.ts +0 -106
- package/lib/test/feature-libraries/sequence-field/utils.d.ts.map +0 -1
- package/lib/test/feature-libraries/sequence-field/utils.js +0 -535
- package/lib/test/feature-libraries/sequence-field/utils.js.map +0 -1
- package/lib/test/feature-libraries/storedToViewSchema.spec.d.ts +0 -6
- package/lib/test/feature-libraries/storedToViewSchema.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/storedToViewSchema.spec.js +0 -117
- package/lib/test/feature-libraries/storedToViewSchema.spec.js.map +0 -1
- package/lib/test/feature-libraries/treeCursorUtils.spec.d.ts +0 -6
- package/lib/test/feature-libraries/treeCursorUtils.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/treeCursorUtils.spec.js +0 -237
- package/lib/test/feature-libraries/treeCursorUtils.spec.js.map +0 -1
- package/lib/test/feature-libraries/treeTextCursor.spec.d.ts +0 -6
- package/lib/test/feature-libraries/treeTextCursor.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/treeTextCursor.spec.js +0 -8
- package/lib/test/feature-libraries/treeTextCursor.spec.js.map +0 -1
- package/lib/test/feature-libraries/typedSchema/example.spec.d.ts +0 -6
- package/lib/test/feature-libraries/typedSchema/example.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/typedSchema/example.spec.js +0 -20
- package/lib/test/feature-libraries/typedSchema/example.spec.js.map +0 -1
- package/lib/test/feature-libraries/typedSchema/flexList.spec.d.ts +0 -6
- package/lib/test/feature-libraries/typedSchema/flexList.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/typedSchema/flexList.spec.js +0 -52
- package/lib/test/feature-libraries/typedSchema/flexList.spec.js.map +0 -1
- package/lib/test/feature-libraries/typedSchema/typeUtils.spec.d.ts +0 -6
- package/lib/test/feature-libraries/typedSchema/typeUtils.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/typedSchema/typeUtils.spec.js +0 -10
- package/lib/test/feature-libraries/typedSchema/typeUtils.spec.js.map +0 -1
- package/lib/test/feature-libraries/typedSchema/typedTreeSchema.spec.d.ts +0 -6
- package/lib/test/feature-libraries/typedSchema/typedTreeSchema.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/typedSchema/typedTreeSchema.spec.js +0 -83
- package/lib/test/feature-libraries/typedSchema/typedTreeSchema.spec.js.map +0 -1
- package/lib/test/feature-libraries/valueUtilities.spec.d.ts +0 -6
- package/lib/test/feature-libraries/valueUtilities.spec.d.ts.map +0 -1
- package/lib/test/feature-libraries/valueUtilities.spec.js +0 -69
- package/lib/test/feature-libraries/valueUtilities.spec.js.map +0 -1
- package/lib/test/forestTestSuite.d.ts +0 -26
- package/lib/test/forestTestSuite.d.ts.map +0 -1
- package/lib/test/forestTestSuite.js +0 -793
- package/lib/test/forestTestSuite.js.map +0 -1
- package/lib/test/objMerge.d.ts +0 -24
- package/lib/test/objMerge.d.ts.map +0 -1
- package/lib/test/objMerge.js +0 -181
- package/lib/test/objMerge.js.map +0 -1
- package/lib/test/rebase/findAncestor.spec.d.ts +0 -6
- package/lib/test/rebase/findAncestor.spec.d.ts.map +0 -1
- package/lib/test/rebase/findAncestor.spec.js +0 -139
- package/lib/test/rebase/findAncestor.spec.js.map +0 -1
- package/lib/test/rebase/fuzz.d.ts +0 -16
- package/lib/test/rebase/fuzz.d.ts.map +0 -1
- package/lib/test/rebase/fuzz.js +0 -57
- package/lib/test/rebase/fuzz.js.map +0 -1
- package/lib/test/rebase/generateFuzzyCombinedChange.spec.d.ts +0 -6
- package/lib/test/rebase/generateFuzzyCombinedChange.spec.d.ts.map +0 -1
- package/lib/test/rebase/generateFuzzyCombinedChange.spec.js +0 -42
- package/lib/test/rebase/generateFuzzyCombinedChange.spec.js.map +0 -1
- package/lib/test/rebase/rebaseBranch.spec.d.ts +0 -6
- package/lib/test/rebase/rebaseBranch.spec.d.ts.map +0 -1
- package/lib/test/rebase/rebaseBranch.spec.js +0 -208
- package/lib/test/rebase/rebaseBranch.spec.js.map +0 -1
- package/lib/test/rebase/rebaser.spec.d.ts +0 -14
- package/lib/test/rebase/rebaser.spec.d.ts.map +0 -1
- package/lib/test/rebase/rebaser.spec.js +0 -166
- package/lib/test/rebase/rebaser.spec.js.map +0 -1
- package/lib/test/rebase/revisionTagCodec.spec.d.ts +0 -6
- package/lib/test/rebase/revisionTagCodec.spec.d.ts.map +0 -1
- package/lib/test/rebase/revisionTagCodec.spec.js +0 -56
- package/lib/test/rebase/revisionTagCodec.spec.js.map +0 -1
- package/lib/test/rebase/verifyChangeRebaser.spec.d.ts +0 -6
- package/lib/test/rebase/verifyChangeRebaser.spec.d.ts.map +0 -1
- package/lib/test/rebase/verifyChangeRebaser.spec.js +0 -52
- package/lib/test/rebase/verifyChangeRebaser.spec.js.map +0 -1
- package/lib/test/rebaserAxiomaticTests.d.ts +0 -15
- package/lib/test/rebaserAxiomaticTests.d.ts.map +0 -1
- package/lib/test/rebaserAxiomaticTests.js +0 -202
- package/lib/test/rebaserAxiomaticTests.js.map +0 -1
- package/lib/test/scalableTestTrees.d.ts +0 -89
- package/lib/test/scalableTestTrees.d.ts.map +0 -1
- package/lib/test/scalableTestTrees.js +0 -188
- package/lib/test/scalableTestTrees.js.map +0 -1
- package/lib/test/shared-tree/editing.spec.d.ts +0 -2
- package/lib/test/shared-tree/editing.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/editing.spec.js +0 -2091
- package/lib/test/shared-tree/editing.spec.js.map +0 -1
- package/lib/test/shared-tree/fuzz/anchorStability.fuzz.spec.d.ts +0 -2
- package/lib/test/shared-tree/fuzz/anchorStability.fuzz.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/anchorStability.fuzz.spec.js +0 -161
- package/lib/test/shared-tree/fuzz/anchorStability.fuzz.spec.js.map +0 -1
- package/lib/test/shared-tree/fuzz/composeVsIndividual.fuzz.spec.d.ts +0 -2
- package/lib/test/shared-tree/fuzz/composeVsIndividual.fuzz.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/composeVsIndividual.fuzz.spec.js +0 -105
- package/lib/test/shared-tree/fuzz/composeVsIndividual.fuzz.spec.js.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzEditGenerators.d.ts +0 -127
- package/lib/test/shared-tree/fuzz/fuzzEditGenerators.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzEditGenerators.js +0 -439
- package/lib/test/shared-tree/fuzz/fuzzEditGenerators.js.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzEditReducers.d.ts +0 -21
- package/lib/test/shared-tree/fuzz/fuzzEditReducers.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzEditReducers.js +0 -214
- package/lib/test/shared-tree/fuzz/fuzzEditReducers.js.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzUtils.d.ts +0 -33
- package/lib/test/shared-tree/fuzz/fuzzUtils.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/fuzzUtils.js +0 -78
- package/lib/test/shared-tree/fuzz/fuzzUtils.js.map +0 -1
- package/lib/test/shared-tree/fuzz/operationTypes.d.ts +0 -116
- package/lib/test/shared-tree/fuzz/operationTypes.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/operationTypes.js +0 -6
- package/lib/test/shared-tree/fuzz/operationTypes.js.map +0 -1
- package/lib/test/shared-tree/fuzz/topLevel.fuzz.spec.d.ts +0 -2
- package/lib/test/shared-tree/fuzz/topLevel.fuzz.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/topLevel.fuzz.spec.js +0 -110
- package/lib/test/shared-tree/fuzz/topLevel.fuzz.spec.js.map +0 -1
- package/lib/test/shared-tree/fuzz/undoRedo.fuzz.spec.d.ts +0 -6
- package/lib/test/shared-tree/fuzz/undoRedo.fuzz.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/fuzz/undoRedo.fuzz.spec.js +0 -220
- package/lib/test/shared-tree/fuzz/undoRedo.fuzz.spec.js.map +0 -1
- package/lib/test/shared-tree/opSize.bench.d.ts +0 -2
- package/lib/test/shared-tree/opSize.bench.d.ts.map +0 -1
- package/lib/test/shared-tree/opSize.bench.js +0 -559
- package/lib/test/shared-tree/opSize.bench.js.map +0 -1
- package/lib/test/shared-tree/schematizeTree.spec.d.ts +0 -6
- package/lib/test/shared-tree/schematizeTree.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/schematizeTree.spec.js +0 -331
- package/lib/test/shared-tree/schematizeTree.spec.js.map +0 -1
- package/lib/test/shared-tree/schematizingTreeView.spec.d.ts +0 -6
- package/lib/test/shared-tree/schematizingTreeView.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/schematizingTreeView.spec.js +0 -137
- package/lib/test/shared-tree/schematizingTreeView.spec.js.map +0 -1
- package/lib/test/shared-tree/sharedTree.bench.d.ts +0 -2
- package/lib/test/shared-tree/sharedTree.bench.d.ts.map +0 -1
- package/lib/test/shared-tree/sharedTree.bench.js +0 -349
- package/lib/test/shared-tree/sharedTree.bench.js.map +0 -1
- package/lib/test/shared-tree/sharedTree.spec.d.ts +0 -2
- package/lib/test/shared-tree/sharedTree.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/sharedTree.spec.js +0 -1375
- package/lib/test/shared-tree/sharedTree.spec.js.map +0 -1
- package/lib/test/shared-tree/sharedTreeChangeCodec.spec.d.ts +0 -6
- package/lib/test/shared-tree/sharedTreeChangeCodec.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/sharedTreeChangeCodec.spec.js +0 -52
- package/lib/test/shared-tree/sharedTreeChangeCodec.spec.js.map +0 -1
- package/lib/test/shared-tree/sharedTreeChangeFamily.spec.d.ts +0 -6
- package/lib/test/shared-tree/sharedTreeChangeFamily.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/sharedTreeChangeFamily.spec.js +0 -139
- package/lib/test/shared-tree/sharedTreeChangeFamily.spec.js.map +0 -1
- package/lib/test/shared-tree/summary.bench.d.ts +0 -6
- package/lib/test/shared-tree/summary.bench.d.ts.map +0 -1
- package/lib/test/shared-tree/summary.bench.js +0 -111
- package/lib/test/shared-tree/summary.bench.js.map +0 -1
- package/lib/test/shared-tree/treeApi.spec.d.ts +0 -2
- package/lib/test/shared-tree/treeApi.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/treeApi.spec.js +0 -151
- package/lib/test/shared-tree/treeApi.spec.js.map +0 -1
- package/lib/test/shared-tree/treeCheckout.spec.d.ts +0 -2
- package/lib/test/shared-tree/treeCheckout.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/treeCheckout.spec.js +0 -678
- package/lib/test/shared-tree/treeCheckout.spec.js.map +0 -1
- package/lib/test/shared-tree/treeView.spec.d.ts +0 -2
- package/lib/test/shared-tree/treeView.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/treeView.spec.js +0 -16
- package/lib/test/shared-tree/treeView.spec.js.map +0 -1
- package/lib/test/shared-tree/undo.spec.d.ts +0 -2
- package/lib/test/shared-tree/undo.spec.d.ts.map +0 -1
- package/lib/test/shared-tree/undo.spec.js +0 -298
- package/lib/test/shared-tree/undo.spec.js.map +0 -1
- package/lib/test/shared-tree-core/branch.spec.d.ts +0 -6
- package/lib/test/shared-tree-core/branch.spec.d.ts.map +0 -1
- package/lib/test/shared-tree-core/branch.spec.js +0 -766
- package/lib/test/shared-tree-core/branch.spec.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManager.bench.d.ts +0 -6
- package/lib/test/shared-tree-core/edit-manager/editManager.bench.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManager.bench.js +0 -227
- package/lib/test/shared-tree-core/edit-manager/editManager.bench.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManager.spec.d.ts +0 -6
- package/lib/test/shared-tree-core/edit-manager/editManager.spec.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManager.spec.js +0 -13
- package/lib/test/shared-tree-core/edit-manager/editManager.spec.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerCodecs.test.d.ts +0 -6
- package/lib/test/shared-tree-core/edit-manager/editManagerCodecs.test.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerCodecs.test.js +0 -161
- package/lib/test/shared-tree-core/edit-manager/editManagerCodecs.test.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerCorrectness.test.d.ts +0 -6
- package/lib/test/shared-tree-core/edit-manager/editManagerCorrectness.test.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerCorrectness.test.js +0 -568
- package/lib/test/shared-tree-core/edit-manager/editManagerCorrectness.test.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerPerf.test.d.ts +0 -6
- package/lib/test/shared-tree-core/edit-manager/editManagerPerf.test.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerPerf.test.js +0 -442
- package/lib/test/shared-tree-core/edit-manager/editManagerPerf.test.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerScenario.d.ts +0 -80
- package/lib/test/shared-tree-core/edit-manager/editManagerScenario.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerScenario.js +0 -267
- package/lib/test/shared-tree-core/edit-manager/editManagerScenario.js.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.d.ts +0 -211
- package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.d.ts.map +0 -1
- package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.js +0 -130
- package/lib/test/shared-tree-core/edit-manager/editManagerTestUtils.js.map +0 -1
- package/lib/test/shared-tree-core/message.spec.d.ts +0 -2
- package/lib/test/shared-tree-core/message.spec.d.ts.map +0 -1
- package/lib/test/shared-tree-core/message.spec.js +0 -99
- package/lib/test/shared-tree-core/message.spec.js.map +0 -1
- package/lib/test/shared-tree-core/sharedTreeCore.spec.d.ts +0 -2
- package/lib/test/shared-tree-core/sharedTreeCore.spec.d.ts.map +0 -1
- package/lib/test/shared-tree-core/sharedTreeCore.spec.js +0 -316
- package/lib/test/shared-tree-core/sharedTreeCore.spec.js.map +0 -1
- package/lib/test/shared-tree-core/utils.d.ts +0 -19
- package/lib/test/shared-tree-core/utils.d.ts.map +0 -1
- package/lib/test/shared-tree-core/utils.js +0 -26
- package/lib/test/shared-tree-core/utils.js.map +0 -1
- package/lib/test/simple-tree/list.spec.d.ts +0 -6
- package/lib/test/simple-tree/list.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/list.spec.js +0 -613
- package/lib/test/simple-tree/list.spec.js.map +0 -1
- package/lib/test/simple-tree/object.spec.d.ts +0 -6
- package/lib/test/simple-tree/object.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/object.spec.js +0 -390
- package/lib/test/simple-tree/object.spec.js.map +0 -1
- package/lib/test/simple-tree/objectFactory.spec.d.ts +0 -6
- package/lib/test/simple-tree/objectFactory.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/objectFactory.spec.js +0 -210
- package/lib/test/simple-tree/objectFactory.spec.js.map +0 -1
- package/lib/test/simple-tree/primitives.spec.d.ts +0 -6
- package/lib/test/simple-tree/primitives.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/primitives.spec.js +0 -134
- package/lib/test/simple-tree/primitives.spec.js.map +0 -1
- package/lib/test/simple-tree/proxies.spec.d.ts +0 -6
- package/lib/test/simple-tree/proxies.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/proxies.spec.js +0 -597
- package/lib/test/simple-tree/proxies.spec.js.map +0 -1
- package/lib/test/simple-tree/rawObjectNode.spec.d.ts +0 -6
- package/lib/test/simple-tree/rawObjectNode.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/rawObjectNode.spec.js +0 -73
- package/lib/test/simple-tree/rawObjectNode.spec.js.map +0 -1
- package/lib/test/simple-tree/schemaCreationUtilities.spec.d.ts +0 -6
- package/lib/test/simple-tree/schemaCreationUtilities.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/schemaCreationUtilities.spec.js +0 -153
- package/lib/test/simple-tree/schemaCreationUtilities.spec.js.map +0 -1
- package/lib/test/simple-tree/schemaFactory.examples.spec.d.ts +0 -6
- package/lib/test/simple-tree/schemaFactory.examples.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/schemaFactory.examples.spec.js +0 -107
- package/lib/test/simple-tree/schemaFactory.examples.spec.js.map +0 -1
- package/lib/test/simple-tree/schemaFactory.spec.d.ts +0 -6
- package/lib/test/simple-tree/schemaFactory.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/schemaFactory.spec.js +0 -515
- package/lib/test/simple-tree/schemaFactory.spec.js.map +0 -1
- package/lib/test/simple-tree/schemaFactoryRecursive.spec.d.ts +0 -6
- package/lib/test/simple-tree/schemaFactoryRecursive.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/schemaFactoryRecursive.spec.js +0 -282
- package/lib/test/simple-tree/schemaFactoryRecursive.spec.js.map +0 -1
- package/lib/test/simple-tree/schemaTypes.spec.d.ts +0 -6
- package/lib/test/simple-tree/schemaTypes.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/schemaTypes.spec.js +0 -89
- package/lib/test/simple-tree/schemaTypes.spec.js.map +0 -1
- package/lib/test/simple-tree/toFlexSchema.spec.d.ts +0 -6
- package/lib/test/simple-tree/toFlexSchema.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/toFlexSchema.spec.js +0 -30
- package/lib/test/simple-tree/toFlexSchema.spec.js.map +0 -1
- package/lib/test/simple-tree/toMapTree.spec.d.ts +0 -6
- package/lib/test/simple-tree/toMapTree.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/toMapTree.spec.js +0 -423
- package/lib/test/simple-tree/toMapTree.spec.js.map +0 -1
- package/lib/test/simple-tree/tree.spec.d.ts +0 -6
- package/lib/test/simple-tree/tree.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/tree.spec.js +0 -71
- package/lib/test/simple-tree/tree.spec.js.map +0 -1
- package/lib/test/simple-tree/treeApi.spec.d.ts +0 -6
- package/lib/test/simple-tree/treeApi.spec.d.ts.map +0 -1
- package/lib/test/simple-tree/treeApi.spec.js +0 -146
- package/lib/test/simple-tree/treeApi.spec.js.map +0 -1
- package/lib/test/simple-tree/utils.d.ts +0 -16
- package/lib/test/simple-tree/utils.d.ts.map +0 -1
- package/lib/test/simple-tree/utils.js +0 -33
- package/lib/test/simple-tree/utils.js.map +0 -1
- package/lib/test/snapshots/gc.spec.d.ts +0 -6
- package/lib/test/snapshots/gc.spec.d.ts.map +0 -1
- package/lib/test/snapshots/gc.spec.js +0 -106
- package/lib/test/snapshots/gc.spec.js.map +0 -1
- package/lib/test/snapshots/index.d.ts +0 -6
- package/lib/test/snapshots/index.d.ts.map +0 -1
- package/lib/test/snapshots/index.js +0 -6
- package/lib/test/snapshots/index.js.map +0 -1
- package/lib/test/snapshots/schema.spec.d.ts +0 -6
- package/lib/test/snapshots/schema.spec.d.ts.map +0 -1
- package/lib/test/snapshots/schema.spec.js +0 -17
- package/lib/test/snapshots/schema.spec.js.map +0 -1
- package/lib/test/snapshots/snapshotTools.d.ts +0 -25
- package/lib/test/snapshots/snapshotTools.d.ts.map +0 -1
- package/lib/test/snapshots/snapshotTools.js +0 -85
- package/lib/test/snapshots/snapshotTools.js.map +0 -1
- package/lib/test/snapshots/summary.spec.d.ts +0 -6
- package/lib/test/snapshots/summary.spec.d.ts.map +0 -1
- package/lib/test/snapshots/summary.spec.js +0 -26
- package/lib/test/snapshots/summary.spec.js.map +0 -1
- package/lib/test/snapshots/testTrees.d.ts +0 -15
- package/lib/test/snapshots/testTrees.d.ts.map +0 -1
- package/lib/test/snapshots/testTrees.js +0 -374
- package/lib/test/snapshots/testTrees.js.map +0 -1
- package/lib/test/snapshots/utils.d.ts +0 -7
- package/lib/test/snapshots/utils.d.ts.map +0 -1
- package/lib/test/snapshots/utils.js +0 -106
- package/lib/test/snapshots/utils.js.map +0 -1
- package/lib/test/testChange.d.ts +0 -90
- package/lib/test/testChange.d.ts.map +0 -1
- package/lib/test/testChange.js +0 -234
- package/lib/test/testChange.js.map +0 -1
- package/lib/test/testChange.spec.d.ts +0 -6
- package/lib/test/testChange.spec.d.ts.map +0 -1
- package/lib/test/testChange.spec.js +0 -113
- package/lib/test/testChange.spec.js.map +0 -1
- package/lib/test/testTrees.d.ts +0 -56
- package/lib/test/testTrees.d.ts.map +0 -1
- package/lib/test/testTrees.js +0 -175
- package/lib/test/testTrees.js.map +0 -1
- package/lib/test/tree/anchorSet.spec.d.ts +0 -6
- package/lib/test/tree/anchorSet.spec.d.ts.map +0 -1
- package/lib/test/tree/anchorSet.spec.js +0 -593
- package/lib/test/tree/anchorSet.spec.js.map +0 -1
- package/lib/test/tree/detachedFieldIndex.spec.d.ts +0 -11
- package/lib/test/tree/detachedFieldIndex.spec.d.ts.map +0 -1
- package/lib/test/tree/detachedFieldIndex.spec.js +0 -218
- package/lib/test/tree/detachedFieldIndex.spec.js.map +0 -1
- package/lib/test/tree/pathTree.spec.d.ts +0 -6
- package/lib/test/tree/pathTree.spec.d.ts.map +0 -1
- package/lib/test/tree/pathTree.spec.js +0 -122
- package/lib/test/tree/pathTree.spec.js.map +0 -1
- package/lib/test/tree/visitDelta.spec.d.ts +0 -6
- package/lib/test/tree/visitDelta.spec.d.ts.map +0 -1
- package/lib/test/tree/visitDelta.spec.js +0 -1055
- package/lib/test/tree/visitDelta.spec.js.map +0 -1
- package/lib/test/util/brand.spec.d.ts +0 -22
- package/lib/test/util/brand.spec.d.ts.map +0 -1
- package/lib/test/util/brand.spec.js +0 -19
- package/lib/test/util/brand.spec.js.map +0 -1
- package/lib/test/util/deepFreeze.spec.d.ts +0 -6
- package/lib/test/util/deepFreeze.spec.d.ts.map +0 -1
- package/lib/test/util/deepFreeze.spec.js +0 -176
- package/lib/test/util/deepFreeze.spec.js.map +0 -1
- package/lib/test/util/nestedMap.spec.d.ts +0 -6
- package/lib/test/util/nestedMap.spec.d.ts.map +0 -1
- package/lib/test/util/nestedMap.spec.js +0 -190
- package/lib/test/util/nestedMap.spec.js.map +0 -1
- package/lib/test/util/offsetList.spec.d.ts +0 -6
- package/lib/test/util/offsetList.spec.d.ts.map +0 -1
- package/lib/test/util/offsetList.spec.js +0 -35
- package/lib/test/util/offsetList.spec.js.map +0 -1
- package/lib/test/util/testTreeProvider.spec.d.ts +0 -6
- package/lib/test/util/testTreeProvider.spec.d.ts.map +0 -1
- package/lib/test/util/testTreeProvider.spec.js +0 -56
- package/lib/test/util/testTreeProvider.spec.js.map +0 -1
- package/lib/test/util/typeUtils.spec.d.ts +0 -6
- package/lib/test/util/typeUtils.spec.d.ts.map +0 -1
- package/lib/test/util/typeUtils.spec.js +0 -19
- package/lib/test/util/typeUtils.spec.js.map +0 -1
- package/lib/test/util/utils.spec.d.ts +0 -6
- package/lib/test/util/utils.spec.d.ts.map +0 -1
- package/lib/test/util/utils.spec.js +0 -27
- package/lib/test/util/utils.spec.js.map +0 -1
- package/lib/test/utils.d.ts +0 -313
- package/lib/test/utils.d.ts.map +0 -1
- package/lib/test/utils.js +0 -765
- package/lib/test/utils.js.map +0 -1
- package/lib/tree-alpha.d.ts +0 -2159
- package/lib/tree-beta.d.ts +0 -2159
- package/lib/tree-public.d.ts +0 -1942
- package/lib/tree-untrimmed.d.ts +0 -6880
- package/src/simple-tree/flexNode.ts +0 -96
- package/src/simple-tree/treeArrayNode.ts +0 -70
- /package/dist/{feature-libraries → core/schema-stored}/multiplicity.d.ts +0 -0
- /package/lib/{feature-libraries → core/schema-stored}/multiplicity.d.ts +0 -0
- /package/lib/{feature-libraries → core/schema-stored}/multiplicity.js +0 -0
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniformChunk.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/uniformChunk.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"uniformChunk.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/uniformChunk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,wBAAwB,EACxB,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAQ,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAA+B,MAAM,uBAAuB,CAAC;AAEvF,OAAO,EAAE,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|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { assert, compareArrays } from "@fluidframework/core-utils";
|
|
6
|
-
import {
|
|
7
|
-
import { prefixFieldPath, prefixPath
|
|
5
|
+
import { assert, compareArrays } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { ReferenceCountedBase, fail } from "../../util/index.js";
|
|
7
|
+
import { SynchronousCursor, prefixFieldPath, prefixPath } from "../treeCursorUtils.js";
|
|
8
8
|
import { cursorChunk, dummyRoot } from "./chunk.js";
|
|
9
9
|
/**
|
|
10
10
|
* Create a tree chunk with ref count 1.
|
|
@@ -43,7 +43,7 @@ export class UniformChunk extends ReferenceCountedBase {
|
|
|
43
43
|
cursor() {
|
|
44
44
|
return new Cursor(this);
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
onUnreferenced() { }
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* The "shape" of a tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniformChunk.js","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/uniformChunk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAWnE,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAiB,WAAW,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,KAAiB,EAAE,MAAmB;IAClE,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACxC,CAAC;AAED;;;;;GAKG;AACH,MAAM,OAAO,YAAa,SAAQ,oBAAoB;IACrD;;;;;OAKG;IACH,YACQ,KAAiB,EACjB,MAAmB;QAE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;QACpC,IAAI,CAAC,YAAY;YAChB,SAAS,KAAK,SAAS;gBACtB,CAAC,CAAC,QAAQ,CAAC,IAAI;gBACf,CAAC,CAAC,SAAS,CAAC,kBAAkB,IAAI,IAAI,CAAC,8BAA8B,CAAC,CAAC;QACzE,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,IAAI,CAAC,IAAI,oCAA4B,CAAC;IACvC,CAAC;IAED,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,QAAQ,kCAA0B,CAAC,KAAK,CAAC,IAAI,CAAC;IAC3D,CAAC;IAED,IAAW,KAAK;QACf,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,kCAA0B,CAAC;QACrD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9E,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, compareArrays } from \"@fluidframework/core-utils\";\nimport {\n\tFieldKey,\n\tTreeNodeSchemaIdentifier,\n\tCursorLocationType,\n\tFieldUpPath,\n\tUpPath,\n\tTreeValue,\n\tValue,\n\tPathRootPrefix,\n} from \"../../core/index.js\";\nimport { fail, ReferenceCountedBase } from \"../../util/index.js\";\nimport { prefixFieldPath, prefixPath, SynchronousCursor } from \"../treeCursorUtils.js\";\nimport { ChunkedCursor, cursorChunk, dummyRoot, TreeChunk } from \"./chunk.js\";\n\n/**\n * Create a tree chunk with ref count 1.\n *\n * @param shape - describes the semantics and layout of `values`.\n * @param values - provides exclusive ownership of this array to this object (which might mutate it in the future).\n */\nexport function uniformChunk(shape: ChunkShape, values: TreeValue[]): TreeChunk {\n\treturn new UniformChunk(shape, values);\n}\n\n/**\n * Chunk which handles a sequence of trees with identical \"shape\" (see `TreeShape`).\n *\n * Separates shape from content,\n * allowing deduplication of shape information and storing of content as a flat sequence of values.\n */\nexport class UniformChunk extends ReferenceCountedBase implements TreeChunk {\n\t/**\n\t * Create a tree chunk with ref count 1.\n\t *\n\t * @param shape - describes the semantics and layout of `values`.\n\t * @param values - provides exclusive ownership of this array to this object (which might mutate it in the future).\n\t */\n\tpublic constructor(\n\t\tpublic shape: ChunkShape,\n\t\tpublic values: TreeValue[],\n\t) {\n\t\tsuper();\n\t\tassert(\n\t\t\tshape.treeShape.valuesPerTopLevelNode * shape.topLevelLength === values.length,\n\t\t\t0x4c3 /* invalid number of values for shape */,\n\t\t);\n\t}\n\n\tpublic get topLevelLength(): number {\n\t\treturn this.shape.topLevelLength;\n\t}\n\n\tpublic clone(): UniformChunk {\n\t\treturn new UniformChunk(this.shape, this.values.slice());\n\t}\n\n\tpublic cursor(): Cursor {\n\t\treturn new Cursor(this);\n\t}\n\n\tprotected dispose(): void {}\n}\n\n/**\n * The \"shape\" of a field.\n *\n * Requires that all trees in the field have the same shape, which is described by `TreeShape`.\n * Note that this requirement means that not all fields can be described using this type.\n */\nexport type FieldShape = readonly [FieldKey, TreeShape, number];\n\n/**\n * The \"shape\" of a tree.\n * Does not contain the actual values from the tree, but describes everything else,\n * including where the values would be found in a flat values array.\n *\n * Note that since this requires fields to have uniform shapes (see `FieldShape`),\n * not all trees can have their shape described using this type.\n */\nexport class TreeShape {\n\tpublic readonly fields: ReadonlyMap<FieldKey, OffsetShape>;\n\tpublic readonly fieldsOffsetArray: readonly OffsetShape[];\n\tpublic readonly valuesPerTopLevelNode: number;\n\n\t// TODO: this is only needed at chunk roots. Optimize it base on that.\n\tpublic readonly positions: readonly NodePositionInfo[];\n\n\tpublic constructor(\n\t\tpublic readonly type: TreeNodeSchemaIdentifier,\n\t\tpublic readonly hasValue: boolean,\n\t\tpublic readonly fieldsArray: readonly FieldShape[],\n\t) {\n\t\tconst fields: Map<FieldKey, OffsetShape> = new Map();\n\t\tlet numberOfValues = hasValue ? 1 : 0;\n\t\tconst infos: NodePositionInfo[] = [\n\t\t\tnew NodePositionInfo(undefined, dummyRoot, 0, undefined, undefined, this, 1, 0),\n\t\t];\n\t\tlet fieldIndex = 0;\n\t\tfor (const [k, f, length] of fieldsArray) {\n\t\t\tassert(!fields.has(k), 0x4c5 /* no duplicate keys */);\n\t\t\tconst offset = new OffsetShape(f, length, infos.length, k, fieldIndex);\n\t\t\tfields.set(k, offset);\n\t\t\tclonePositions(0, [k, f, length], fieldIndex, numberOfValues, infos);\n\t\t\tnumberOfValues += f.valuesPerTopLevelNode * length;\n\t\t\tfieldIndex++;\n\t\t}\n\t\tthis.fields = fields;\n\t\tthis.valuesPerTopLevelNode = numberOfValues;\n\t\tthis.positions = infos;\n\n\t\tthis.fieldsOffsetArray = [...fields.values()];\n\t}\n\n\tpublic equals(other: TreeShape): boolean {\n\t\t// TODO: either dedup instances and/or store a collision resistant hash for fast compare.\n\n\t\tif (\n\t\t\t!compareArrays(\n\t\t\t\tthis.fieldsArray,\n\t\t\t\tother.fieldsArray,\n\t\t\t\t([k, f, l], [k2, f2, l2]) => k === k2 && l === l2 && f.equals(f2),\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.type === other.type && this.hasValue === other.hasValue;\n\t}\n\n\tpublic withTopLevelLength(topLevelLength: number): ChunkShape {\n\t\treturn new ChunkShape(this, topLevelLength);\n\t}\n}\n\nfunction clonePositions(\n\tindexOfParentInOutput: number | undefined,\n\t[key, shape, copies]: FieldShape,\n\tindexOfParentField: number,\n\tvalueOffset: number,\n\toutputInto: NodePositionInfo[] | (NodePositionInfo | undefined)[],\n): void {\n\tconst offset = outputInto.length;\n\tfor (let index = 0; index < copies; index++) {\n\t\tfor (const inner of shape.positions) {\n\t\t\tconst wasRoot = inner.indexOfParentPosition === undefined;\n\t\t\tconst parentPositionIndex = wasRoot\n\t\t\t\t? indexOfParentInOutput\n\t\t\t\t: inner.indexOfParentPosition + index * shape.positions.length + offset;\n\t\t\toutputInto.push(\n\t\t\t\tnew NodePositionInfo(\n\t\t\t\t\tparentPositionIndex === undefined ? undefined : outputInto[parentPositionIndex],\n\t\t\t\t\tinner.parentField === dummyRoot ? key : inner.parentField,\n\t\t\t\t\twasRoot ? index : inner.parentIndex,\n\t\t\t\t\tinner.indexOfParentField ?? indexOfParentField,\n\t\t\t\t\tparentPositionIndex,\n\t\t\t\t\tinner.shape,\n\t\t\t\t\twasRoot ? copies : inner.topLevelLength,\n\t\t\t\t\tinner.valueOffset + valueOffset + shape.valuesPerTopLevelNode * index,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * The shape (see `TreeShape`) of a sequence of trees, all with the same shape (like `FieldShape`, but without a field key).\n *\n * This shape is optimized (by caching derived data like the positions array),\n * so that when paired with a value array it can be efficiently traversed like a tree by an {@link ITreeCursorSynchronous}.\n * See {@link uniformChunk} for how to do this.\n *\n * TODO: consider storing shape information in WASM\n */\nexport class ChunkShape {\n\tpublic readonly positions: readonly (NodePositionInfo | undefined)[];\n\n\tpublic constructor(\n\t\tpublic readonly treeShape: TreeShape,\n\t\tpublic readonly topLevelLength: number,\n\t) {\n\t\tassert(topLevelLength > 0, 0x4c6 /* topLevelLength must be greater than 0 */);\n\n\t\t// TODO: avoid duplication from inner loop\n\t\tconst positions: (NodePositionInfo | undefined)[] = [undefined];\n\t\tclonePositions(0, [dummyRoot, treeShape, topLevelLength], 0, 0, positions);\n\t\tthis.positions = positions;\n\t}\n\n\tpublic equals(other: ChunkShape): boolean {\n\t\t// TODO: either dedup instances and/or store a collision resistant hash for fast compare.\n\t\treturn this.topLevelLength === other.topLevelLength && this.treeShape === other.treeShape;\n\t}\n}\n\n/**\n * Shape of a field (like `FieldShape`) but with information about how it would be offset within a chunk because of its parents.\n */\nclass OffsetShape {\n\t/**\n\t * @param shape - the shape of each child in this field\n\t * @param topLevelLength - number of top level nodes in this sequence chunk (either field within a chunk, or top level chunk)\n\t * @param offset - number of nodes before this in the parent's subtree\n\t * @param key - field key\n\t * @param indexOfParentField - index of node with this shape\n\t */\n\tpublic constructor(\n\t\tpublic readonly shape: TreeShape,\n\t\tpublic readonly topLevelLength: number,\n\t\tpublic readonly offset: number,\n\t\tpublic readonly key: FieldKey,\n\t\tpublic readonly indexOfParentField: number | undefined,\n\t) {}\n}\n\n/**\n * Information about a node at a specific position within a uniform chunk.\n */\nclass NodePositionInfo implements UpPath {\n\t/**\n\t * @param parent - TODO\n\t * @param parentField - TODO\n\t * @param parentIndex - indexWithinParentField\n\t * @param indexOfParentField - which field of the parent `parentIndex` is indexing into to locate this.\n\t * @param indexOfParentPosition - Index of parent NodePositionInfo in positions array. TODO: use offsets to avoid copying at top level?\n\t * @param shape - Shape of the top level sequence this node is part of\n\t * @param valueOffset - TODO\n\t */\n\tpublic constructor(\n\t\tpublic readonly parent: NodePositionInfo | undefined, // TODO; general UpPath to allow prefixing here?\n\t\tpublic readonly parentField: FieldKey,\n\t\tpublic readonly parentIndex: number,\n\t\tpublic readonly indexOfParentField: number | undefined,\n\t\tpublic readonly indexOfParentPosition: number | undefined,\n\t\tpublic readonly shape: TreeShape, // Shape of sequence that contains this node (top level is parent of this node)\n\t\tpublic readonly topLevelLength: number,\n\t\tpublic readonly valueOffset: number,\n\t) {}\n}\n\n/**\n * The cursor implementation for `UniformChunk`.\n *\n * Works by tracking its location in the chunk's `positions` array.\n */\nclass Cursor extends SynchronousCursor implements ChunkedCursor {\n\tprivate positionIndex!: number; // When in fields mode, this points to the parent node.\n\t// Undefined when in root field\n\tprivate nodePositionInfo: NodePositionInfo | undefined;\n\n\t// Cached constants for faster access\n\tprivate readonly shape: ChunkShape;\n\tprivate readonly positions: readonly (NodePositionInfo | undefined)[];\n\n\tpublic mode: CursorLocationType = CursorLocationType.Fields;\n\n\t// Undefined when not in fields mode.\n\tprivate fieldKey?: FieldKey;\n\n\t// Valid only in fields mode. Can be past end for empty fields.\n\t// This is redundant with fieldKey above (but might be worth keeping for perf), and could be removed.\n\tprivate indexOfField: number = 0;\n\n\t// TODO: support prefix (path above root, including index offset of chunk in its containing field)\n\tpublic constructor(private readonly chunk: UniformChunk) {\n\t\tsuper();\n\t\tthis.shape = this.chunk.shape;\n\t\tthis.positions = this.shape.positions;\n\t\tthis.fieldKey = dummyRoot;\n\t\tthis.moveToPosition(0);\n\t}\n\n\tpublic get [cursorChunk](): UniformChunk | undefined {\n\t\treturn this.atChunkRoot() ? this.chunk : undefined;\n\t}\n\n\tpublic atChunkRoot(): boolean {\n\t\tassert(\n\t\t\t(this.fieldKey === undefined) === (this.mode === CursorLocationType.Nodes),\n\t\t\t0x560 /* expect valid field key */,\n\t\t);\n\t\treturn (\n\t\t\tthis.nodePositionInfo === undefined ||\n\t\t\t(this.nodePositionInfo.parent === undefined && this.fieldKey === undefined)\n\t\t);\n\t}\n\n\tpublic fork(): Cursor {\n\t\tconst cursor = new Cursor(this.chunk);\n\t\tcursor.mode = this.mode;\n\t\tcursor.fieldKey = this.fieldKey;\n\t\tcursor.indexOfField = this.indexOfField;\n\t\tcursor.moveToPosition(this.positionIndex);\n\t\treturn cursor;\n\t}\n\n\t/**\n\t * Change the current node within the chunk.\n\t * See `nodeInfo` for getting data about the current node.\n\t *\n\t * @param positionIndex - index of the position of the newly selected node in `positions`.\n\t * This is NOT an index within a field, and is not bounds checked.\n\t */\n\tprivate moveToPosition(positionIndex: number): void {\n\t\tthis.nodePositionInfo = this.positions[positionIndex];\n\t\tthis.positionIndex = positionIndex;\n\t\tif (this.nodePositionInfo === undefined) {\n\t\t\tassert(positionIndex === 0, 0x561 /* expected root at start */);\n\t\t\tassert(\n\t\t\t\tthis.mode === CursorLocationType.Fields,\n\t\t\t\t0x562 /* expected root to be a field */,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Gets information about the current node.\n\t *\n\t * When in Nodes mode, this means the node this cursor is current at.\n\t * When if fields mode, this means the node which is the parent of the current field.\n\t * This cursor is in Nodes mode at the root, so there is no case where a fields mode does not have a parent.\n\t *\n\t * @param requiredMode - asserts that the mode matches this. Since the semantics of this function are somewhat mode dependent,\n\t * providing this ensures that the caller knows what the results will mean.\n\t */\n\tprivate nodeInfo(requiredMode: CursorLocationType): NodePositionInfo {\n\t\tassert(this.mode === requiredMode, 0x4c8 /* tried to access cursor when in wrong mode */);\n\t\tassert(\n\t\t\tthis.nodePositionInfo !== undefined,\n\t\t\t0x53e /* can not access nodeInfo in root field */,\n\t\t);\n\t\treturn this.nodePositionInfo;\n\t}\n\n\tpublic nextField(): boolean {\n\t\tthis.indexOfField++;\n\t\tconst fields = this.nodeInfo(CursorLocationType.Fields).shape.fieldsArray;\n\t\tif (this.indexOfField < fields.length) {\n\t\t\tthis.fieldKey = fields[this.indexOfField][0];\n\t\t\treturn true;\n\t\t}\n\t\tthis.exitField();\n\t\treturn false;\n\t}\n\n\tpublic exitField(): void {\n\t\tassert(this.mode === CursorLocationType.Fields, 0x4c9 /* exitField when in wrong mode */);\n\t\tassert(this.nodePositionInfo !== undefined, 0x563 /* can not exit root field */);\n\t\tthis.fieldKey = undefined;\n\t\tthis.mode = CursorLocationType.Nodes;\n\t}\n\n\tpublic getFieldKey(): FieldKey {\n\t\treturn this.fieldKey ?? fail(\"not in a field\");\n\t}\n\n\tpublic getFieldLength(): number {\n\t\tassert(\n\t\t\tthis.mode === CursorLocationType.Fields,\n\t\t\t0x53f /* tried to access cursor when in wrong mode */,\n\t\t);\n\t\tif (this.nodePositionInfo === undefined) {\n\t\t\treturn this.shape.topLevelLength;\n\t\t}\n\t\tconst fieldInfo = this.nodePositionInfo.shape.fieldsArray[this.indexOfField];\n\t\tif (fieldInfo === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn fieldInfo[2];\n\t}\n\n\tpublic firstNode(): boolean {\n\t\tassert(\n\t\t\tthis.mode === CursorLocationType.Fields,\n\t\t\t0x540 /* tried to access cursor when in wrong mode */,\n\t\t);\n\n\t\tif (this.nodePositionInfo === undefined) {\n\t\t\t// Root field is not allowed to be empty, so we can skip handling that case.\n\t\t\tthis.enterRootNodeInner(0);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn this.enterNodeInner(this.nodePositionInfo, 0);\n\t\t}\n\t}\n\n\tpublic enterNode(childIndex: number): void {\n\t\tassert(\n\t\t\tthis.mode === CursorLocationType.Fields,\n\t\t\t0x541 /* tried to access cursor when in wrong mode */,\n\t\t);\n\t\tassert(childIndex >= 0, 0x4ca /* index must be positive */);\n\t\tif (this.nodePositionInfo === undefined) {\n\t\t\tassert(\n\t\t\t\tchildIndex < this.shape.topLevelLength,\n\t\t\t\t0x542 /* index must not be past the end of the field */,\n\t\t\t);\n\t\t\tthis.enterRootNodeInner(childIndex);\n\t\t} else {\n\t\t\tconst moved = this.enterNodeInner(this.nodePositionInfo, childIndex);\n\t\t\tassert(moved, 0x4cb /* index must not be past the end of the field */);\n\t\t}\n\t}\n\n\t/**\n\t * Enter the current field, at `childIndex`.\n\t * @param childIndex - index into current field to navigate to. Must be non-negative integer.\n\t */\n\tprivate enterNodeInner(currentPosition: NodePositionInfo, childIndex: number): boolean {\n\t\tconst shape = currentPosition.shape;\n\t\tconst fields = shape.fieldsOffsetArray;\n\t\tif (this.indexOfField >= fields.length) {\n\t\t\treturn false; // Handle empty field (indexed by key into empty field)\n\t\t}\n\t\tconst f = shape.fieldsOffsetArray[this.indexOfField];\n\t\tif (childIndex >= f.topLevelLength) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.mode = CursorLocationType.Nodes;\n\t\tthis.fieldKey = undefined;\n\t\tthis.moveToPosition(this.positionIndex + f.offset + childIndex * f.shape.positions.length);\n\t\tassert(this.fieldIndex === childIndex, 0x4cc /* should be at selected child */);\n\t\treturn true;\n\t}\n\n\tprivate enterRootNodeInner(childIndex: number): void {\n\t\tthis.mode = CursorLocationType.Nodes;\n\t\tthis.fieldKey = undefined;\n\t\t// 1 for the \"undefined\" at the beginning of the positions array, then stride by top level tree shape.\n\t\tthis.moveToPosition(1 + childIndex * this.shape.treeShape.positions.length);\n\t\tassert(this.fieldIndex === childIndex, 0x543 /* should be at selected child */);\n\t}\n\n\tpublic getFieldPath(prefix?: PathRootPrefix): FieldUpPath {\n\t\treturn prefixFieldPath(prefix, {\n\t\t\tfield: this.getFieldKey(),\n\t\t\tparent: this.nodePositionInfo,\n\t\t});\n\t}\n\n\tpublic getPath(prefix?: PathRootPrefix): UpPath | undefined {\n\t\treturn prefixPath(prefix, this.nodeInfo(CursorLocationType.Nodes));\n\t}\n\n\tpublic get fieldIndex(): number {\n\t\treturn this.nodeInfo(CursorLocationType.Nodes).parentIndex;\n\t}\n\n\tpublic readonly chunkStart: number = 0;\n\n\tpublic get chunkLength(): number {\n\t\treturn this.nodeInfo(CursorLocationType.Nodes).topLevelLength;\n\t}\n\n\tpublic seekNodes(offset: number): boolean {\n\t\tconst info = this.nodeInfo(CursorLocationType.Nodes);\n\t\tconst index = offset + info.parentIndex;\n\t\tif (index >= 0 && index < info.topLevelLength) {\n\t\t\tthis.moveToPosition(this.positionIndex + offset * info.shape.positions.length);\n\t\t\treturn true;\n\t\t}\n\t\tthis.exitNode();\n\t\treturn false;\n\t}\n\n\tpublic nextNode(): boolean {\n\t\t// This is the same as `return this.seekNodes(1);` but slightly faster.\n\n\t\tconst info = this.nodeInfo(CursorLocationType.Nodes);\n\t\tconst index = info.parentIndex + 1;\n\t\tif (index === info.topLevelLength) {\n\t\t\tthis.exitNode();\n\t\t\treturn false;\n\t\t}\n\t\tthis.moveToPosition(this.positionIndex + info.shape.positions.length);\n\t\treturn true;\n\t}\n\n\tpublic exitNode(): void {\n\t\tconst info = this.nodeInfo(CursorLocationType.Nodes);\n\t\tthis.indexOfField =\n\t\t\tinfo.indexOfParentField ?? fail(\"navigation up to root field not yet supported\"); // TODO;\n\t\tthis.fieldKey = info.parentField;\n\t\tthis.mode = CursorLocationType.Fields;\n\t\tthis.moveToPosition(\n\t\t\tinfo.indexOfParentPosition ?? fail(\"navigation up to root field not yet supported\"),\n\t\t); // TODO\n\t}\n\n\tpublic firstField(): boolean {\n\t\tconst fieldsArray = this.nodeInfo(CursorLocationType.Nodes).shape.fieldsArray;\n\t\tif (fieldsArray.length === 0) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.indexOfField = 0;\n\t\tthis.mode = CursorLocationType.Fields;\n\t\tthis.fieldKey = fieldsArray[0][0];\n\t\treturn true;\n\t}\n\n\tpublic enterField(key: FieldKey): void {\n\t\tconst fieldMap = this.nodeInfo(CursorLocationType.Nodes).shape.fields;\n\t\tconst fieldInfo = fieldMap.get(key);\n\t\tthis.indexOfField =\n\t\t\tfieldInfo === undefined\n\t\t\t\t? fieldMap.size\n\t\t\t\t: fieldInfo.indexOfParentField ?? fail(\"children should have parents\");\n\t\tthis.fieldKey = key;\n\t\tthis.mode = CursorLocationType.Fields;\n\t}\n\n\tpublic get type(): TreeNodeSchemaIdentifier {\n\t\treturn this.nodeInfo(CursorLocationType.Nodes).shape.type;\n\t}\n\n\tpublic get value(): Value {\n\t\tconst info = this.nodeInfo(CursorLocationType.Nodes);\n\t\treturn info.shape.hasValue ? this.chunk.values[info.valueOffset] : undefined;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"uniformChunk.js","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/uniformChunk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAY5E,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEvF,OAAO,EAA4B,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,KAAiB,EAAE,MAAmB;IAClE,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACxC,CAAC;AAED;;;;;GAKG;AACH,MAAM,OAA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M,CAAC;QACtE,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,CAAC,YAAY;YAChB,SAAS,KAAK,SAAS;gBACtB,CAAC,CAAC,QAAQ,CAAC,IAAI;gBACf,CAAC,CAAC,SAAS,CAAC,kBAAkB,IAAI,IAAI,CAAC,8BAA8B,CAAC,CAAC;QACzE,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,IAAI,CAAC,IAAI,oCAA4B,CAAC;IACvC,CAAC;IAED,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,QAAQ,kCAA0B,CAAC,KAAK,CAAC,IAAI,CAAC;IAC3D,CAAC;IAED,IAAW,KAAK;QACf,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,kCAA0B,CAAC;QACrD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9E,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, compareArrays } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tCursorLocationType,\n\tFieldKey,\n\tFieldUpPath,\n\tPathRootPrefix,\n\tTreeNodeSchemaIdentifier,\n\tTreeValue,\n\tUpPath,\n\tValue,\n} from \"../../core/index.js\";\nimport { ReferenceCountedBase, fail } from \"../../util/index.js\";\nimport { SynchronousCursor, prefixFieldPath, prefixPath } from \"../treeCursorUtils.js\";\n\nimport { ChunkedCursor, TreeChunk, cursorChunk, dummyRoot } from \"./chunk.js\";\n\n/**\n * Create a tree chunk with ref count 1.\n *\n * @param shape - describes the semantics and layout of `values`.\n * @param values - provides exclusive ownership of this array to this object (which might mutate it in the future).\n */\nexport function uniformChunk(shape: ChunkShape, values: TreeValue[]): TreeChunk {\n\treturn new UniformChunk(shape, values);\n}\n\n/**\n * Chunk which handles a sequence of trees with identical \"shape\" (see `TreeShape`).\n *\n * Separates shape from content,\n * allowing deduplication of shape information and storing of content as a flat sequence of values.\n */\nexport class UniformChunk extends ReferenceCountedBase implements TreeChunk {\n\t/**\n\t * Create a tree chunk with ref count 1.\n\t *\n\t * @param shape - describes the semantics and layout of `values`.\n\t * @param values - provides exclusive ownership of this array to this object (which might mutate it in the future).\n\t */\n\tpublic constructor(\n\t\tpublic shape: ChunkShape,\n\t\tpublic values: TreeValue[],\n\t) {\n\t\tsuper();\n\t\tassert(\n\t\t\tshape.treeShape.valuesPerTopLevelNode * shape.topLevelLength === values.length,\n\t\t\t0x4c3 /* invalid number of values for shape */,\n\t\t);\n\t}\n\n\tpublic get topLevelLength(): number {\n\t\treturn this.shape.topLevelLength;\n\t}\n\n\tpublic clone(): UniformChunk {\n\t\treturn new UniformChunk(this.shape, this.values.slice());\n\t}\n\n\tpublic cursor(): Cursor {\n\t\treturn new Cursor(this);\n\t}\n\n\tprotected onUnreferenced(): void {}\n}\n\n/**\n * The \"shape\" of a field.\n *\n * Requires that all trees in the field have the same shape, which is described by `TreeShape`.\n * Note that this requirement means that not all fields can be described using this type.\n */\nexport type FieldShape = readonly [FieldKey, TreeShape, number];\n\n/**\n * The \"shape\" of a tree.\n * Does not contain the actual values from the tree, but describes everything else,\n * including where the values would be found in a flat values array.\n *\n * Note that since this requires fields to have uniform shapes (see `FieldShape`),\n * not all trees can have their shape described using this type.\n */\nexport class TreeShape {\n\tpublic readonly fields: ReadonlyMap<FieldKey, OffsetShape>;\n\tpublic readonly fieldsOffsetArray: readonly OffsetShape[];\n\tpublic readonly valuesPerTopLevelNode: number;\n\n\t// TODO: this is only needed at chunk roots. Optimize it base on that.\n\tpublic readonly positions: readonly NodePositionInfo[];\n\n\tpublic constructor(\n\t\tpublic readonly type: TreeNodeSchemaIdentifier,\n\t\tpublic readonly hasValue: boolean,\n\t\tpublic readonly fieldsArray: readonly FieldShape[],\n\t) {\n\t\tconst fields: Map<FieldKey, OffsetShape> = new Map();\n\t\tlet numberOfValues = hasValue ? 1 : 0;\n\t\tconst infos: NodePositionInfo[] = [\n\t\t\tnew NodePositionInfo(undefined, dummyRoot, 0, undefined, undefined, this, 1, 0),\n\t\t];\n\t\tlet fieldIndex = 0;\n\t\tfor (const [k, f, length] of fieldsArray) {\n\t\t\tassert(!fields.has(k), 0x4c5 /* no duplicate keys */);\n\t\t\tconst offset = new OffsetShape(f, length, infos.length, k, fieldIndex);\n\t\t\tfields.set(k, offset);\n\t\t\tclonePositions(0, [k, f, length], fieldIndex, numberOfValues, infos);\n\t\t\tnumberOfValues += f.valuesPerTopLevelNode * length;\n\t\t\tfieldIndex++;\n\t\t}\n\t\tthis.fields = fields;\n\t\tthis.valuesPerTopLevelNode = numberOfValues;\n\t\tthis.positions = infos;\n\n\t\tthis.fieldsOffsetArray = [...fields.values()];\n\t}\n\n\tpublic equals(other: TreeShape): boolean {\n\t\t// TODO: either dedup instances and/or store a collision resistant hash for fast compare.\n\n\t\tif (\n\t\t\t!compareArrays(\n\t\t\t\tthis.fieldsArray,\n\t\t\t\tother.fieldsArray,\n\t\t\t\t([k, f, l], [k2, f2, l2]) => k === k2 && l === l2 && f.equals(f2),\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\treturn this.type === other.type && this.hasValue === other.hasValue;\n\t}\n\n\tpublic withTopLevelLength(topLevelLength: number): ChunkShape {\n\t\treturn new ChunkShape(this, topLevelLength);\n\t}\n}\n\nfunction clonePositions(\n\tindexOfParentInOutput: number | undefined,\n\t[key, shape, copies]: FieldShape,\n\tindexOfParentField: number,\n\tvalueOffset: number,\n\toutputInto: NodePositionInfo[] | (NodePositionInfo | undefined)[],\n): void {\n\tconst offset = outputInto.length;\n\tfor (let index = 0; index < copies; index++) {\n\t\tfor (const inner of shape.positions) {\n\t\t\tconst wasRoot = inner.indexOfParentPosition === undefined;\n\t\t\tconst parentPositionIndex = wasRoot\n\t\t\t\t? indexOfParentInOutput\n\t\t\t\t: inner.indexOfParentPosition + index * shape.positions.length + offset;\n\t\t\toutputInto.push(\n\t\t\t\tnew NodePositionInfo(\n\t\t\t\t\tparentPositionIndex === undefined ? undefined : outputInto[parentPositionIndex],\n\t\t\t\t\tinner.parentField === dummyRoot ? key : inner.parentField,\n\t\t\t\t\twasRoot ? index : inner.parentIndex,\n\t\t\t\t\tinner.indexOfParentField ?? indexOfParentField,\n\t\t\t\t\tparentPositionIndex,\n\t\t\t\t\tinner.shape,\n\t\t\t\t\twasRoot ? copies : inner.topLevelLength,\n\t\t\t\t\tinner.valueOffset + valueOffset + shape.valuesPerTopLevelNode * index,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * The shape (see `TreeShape`) of a sequence of trees, all with the same shape (like `FieldShape`, but without a field key).\n *\n * This shape is optimized (by caching derived data like the positions array),\n * so that when paired with a value array it can be efficiently traversed like a tree by an {@link ITreeCursorSynchronous}.\n * See {@link uniformChunk} for how to do this.\n *\n * TODO: consider storing shape information in WASM\n */\nexport class ChunkShape {\n\tpublic readonly positions: readonly (NodePositionInfo | undefined)[];\n\n\tpublic constructor(\n\t\tpublic readonly treeShape: TreeShape,\n\t\tpublic readonly topLevelLength: number,\n\t) {\n\t\tassert(topLevelLength > 0, 0x4c6 /* topLevelLength must be greater than 0 */);\n\n\t\t// TODO: avoid duplication from inner loop\n\t\tconst positions: (NodePositionInfo | undefined)[] = [undefined];\n\t\tclonePositions(0, [dummyRoot, treeShape, topLevelLength], 0, 0, positions);\n\t\tthis.positions = positions;\n\t}\n\n\tpublic equals(other: ChunkShape): boolean {\n\t\t// TODO: either dedup instances and/or store a collision resistant hash for fast compare.\n\t\treturn this.topLevelLength === other.topLevelLength && this.treeShape === other.treeShape;\n\t}\n}\n\n/**\n * Shape of a field (like `FieldShape`) but with information about how it would be offset within a chunk because of its parents.\n */\nclass OffsetShape {\n\t/**\n\t * @param shape - the shape of each child in this field\n\t * @param topLevelLength - number of top level nodes in this sequence chunk (either field within a chunk, or top level chunk)\n\t * @param offset - number of nodes before this in the parent's subtree\n\t * @param key - field key\n\t * @param indexOfParentField - index of node with this shape\n\t */\n\tpublic constructor(\n\t\tpublic readonly shape: TreeShape,\n\t\tpublic readonly topLevelLength: number,\n\t\tpublic readonly offset: number,\n\t\tpublic readonly key: FieldKey,\n\t\tpublic readonly indexOfParentField: number | undefined,\n\t) {}\n}\n\n/**\n * Information about a node at a specific position within a uniform chunk.\n */\nclass NodePositionInfo implements UpPath {\n\t/**\n\t * @param parent - TODO\n\t * @param parentField - TODO\n\t * @param parentIndex - indexWithinParentField\n\t * @param indexOfParentField - which field of the parent `parentIndex` is indexing into to locate this.\n\t * @param indexOfParentPosition - Index of parent NodePositionInfo in positions array. TODO: use offsets to avoid copying at top level?\n\t * @param shape - Shape of the top level sequence this node is part of\n\t * @param valueOffset - TODO\n\t */\n\tpublic constructor(\n\t\tpublic readonly parent: NodePositionInfo | undefined, // TODO; general UpPath to allow prefixing here?\n\t\tpublic readonly parentField: FieldKey,\n\t\tpublic readonly parentIndex: number,\n\t\tpublic readonly indexOfParentField: number | undefined,\n\t\tpublic readonly indexOfParentPosition: number | undefined,\n\t\tpublic readonly shape: TreeShape, // Shape of sequence that contains this node (top level is parent of this node)\n\t\tpublic readonly topLevelLength: number,\n\t\tpublic readonly valueOffset: number,\n\t) {}\n}\n\n/**\n * The cursor implementation for `UniformChunk`.\n *\n * Works by tracking its location in the chunk's `positions` array.\n */\nclass Cursor extends SynchronousCursor implements ChunkedCursor {\n\tprivate positionIndex!: number; // When in fields mode, this points to the parent node.\n\t// Undefined when in root field\n\tprivate nodePositionInfo: NodePositionInfo | undefined;\n\n\t// Cached constants for faster access\n\tprivate readonly shape: ChunkShape;\n\tprivate readonly positions: readonly (NodePositionInfo | undefined)[];\n\n\tpublic mode: CursorLocationType = CursorLocationType.Fields;\n\n\t// Undefined when not in fields mode.\n\tprivate fieldKey?: FieldKey;\n\n\t// Valid only in fields mode. Can be past end for empty fields.\n\t// This is redundant with fieldKey above (but might be worth keeping for perf), and could be removed.\n\tprivate indexOfField: number = 0;\n\n\t// TODO: support prefix (path above root, including index offset of chunk in its containing field)\n\tpublic constructor(private readonly chunk: UniformChunk) {\n\t\tsuper();\n\t\tthis.shape = this.chunk.shape;\n\t\tthis.positions = this.shape.positions;\n\t\tthis.fieldKey = dummyRoot;\n\t\tthis.moveToPosition(0);\n\t}\n\n\tpublic get [cursorChunk](): UniformChunk | undefined {\n\t\treturn this.atChunkRoot() ? this.chunk : undefined;\n\t}\n\n\tpublic atChunkRoot(): boolean {\n\t\tassert(\n\t\t\t(this.fieldKey === undefined) === (this.mode === CursorLocationType.Nodes),\n\t\t\t0x560 /* expect valid field key */,\n\t\t);\n\t\treturn (\n\t\t\tthis.nodePositionInfo === undefined ||\n\t\t\t(this.nodePositionInfo.parent === undefined && this.fieldKey === undefined)\n\t\t);\n\t}\n\n\tpublic fork(): Cursor {\n\t\tconst cursor = new Cursor(this.chunk);\n\t\tcursor.mode = this.mode;\n\t\tcursor.fieldKey = this.fieldKey;\n\t\tcursor.indexOfField = this.indexOfField;\n\t\tcursor.moveToPosition(this.positionIndex);\n\t\treturn cursor;\n\t}\n\n\t/**\n\t * Change the current node within the chunk.\n\t * See `nodeInfo` for getting data about the current node.\n\t *\n\t * @param positionIndex - index of the position of the newly selected node in `positions`.\n\t * This is NOT an index within a field, and is not bounds checked.\n\t */\n\tprivate moveToPosition(positionIndex: number): void {\n\t\tthis.nodePositionInfo = this.positions[positionIndex];\n\t\tthis.positionIndex = positionIndex;\n\t\tif (this.nodePositionInfo === undefined) {\n\t\t\tassert(positionIndex === 0, 0x561 /* expected root at start */);\n\t\t\tassert(\n\t\t\t\tthis.mode === CursorLocationType.Fields,\n\t\t\t\t0x562 /* expected root to be a field */,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Gets information about the current node.\n\t *\n\t * When in Nodes mode, this means the node this cursor is current at.\n\t * When if fields mode, this means the node which is the parent of the current field.\n\t * This cursor is in Nodes mode at the root, so there is no case where a fields mode does not have a parent.\n\t *\n\t * @param requiredMode - asserts that the mode matches this. Since the semantics of this function are somewhat mode dependent,\n\t * providing this ensures that the caller knows what the results will mean.\n\t */\n\tprivate nodeInfo(requiredMode: CursorLocationType): NodePositionInfo {\n\t\tassert(this.mode === requiredMode, 0x4c8 /* tried to access cursor when in wrong mode */);\n\t\tassert(\n\t\t\tthis.nodePositionInfo !== undefined,\n\t\t\t0x53e /* can not access nodeInfo in root field */,\n\t\t);\n\t\treturn this.nodePositionInfo;\n\t}\n\n\tpublic nextField(): boolean {\n\t\tthis.indexOfField++;\n\t\tconst fields = this.nodeInfo(CursorLocationType.Fields).shape.fieldsArray;\n\t\tif (this.indexOfField < fields.length) {\n\t\t\tthis.fieldKey = fields[this.indexOfField][0];\n\t\t\treturn true;\n\t\t}\n\t\tthis.exitField();\n\t\treturn false;\n\t}\n\n\tpublic exitField(): void {\n\t\tassert(this.mode === CursorLocationType.Fields, 0x4c9 /* exitField when in wrong mode */);\n\t\tassert(this.nodePositionInfo !== undefined, 0x563 /* can not exit root field */);\n\t\tthis.fieldKey = undefined;\n\t\tthis.mode = CursorLocationType.Nodes;\n\t}\n\n\tpublic getFieldKey(): FieldKey {\n\t\treturn this.fieldKey ?? fail(\"not in a field\");\n\t}\n\n\tpublic getFieldLength(): number {\n\t\tassert(\n\t\t\tthis.mode === CursorLocationType.Fields,\n\t\t\t0x53f /* tried to access cursor when in wrong mode */,\n\t\t);\n\t\tif (this.nodePositionInfo === undefined) {\n\t\t\treturn this.shape.topLevelLength;\n\t\t}\n\t\tconst fieldInfo = this.nodePositionInfo.shape.fieldsArray[this.indexOfField];\n\t\tif (fieldInfo === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn fieldInfo[2];\n\t}\n\n\tpublic firstNode(): boolean {\n\t\tassert(\n\t\t\tthis.mode === CursorLocationType.Fields,\n\t\t\t0x540 /* tried to access cursor when in wrong mode */,\n\t\t);\n\n\t\tif (this.nodePositionInfo === undefined) {\n\t\t\t// Root field is not allowed to be empty, so we can skip handling that case.\n\t\t\tthis.enterRootNodeInner(0);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn this.enterNodeInner(this.nodePositionInfo, 0);\n\t\t}\n\t}\n\n\tpublic enterNode(childIndex: number): void {\n\t\tassert(\n\t\t\tthis.mode === CursorLocationType.Fields,\n\t\t\t0x541 /* tried to access cursor when in wrong mode */,\n\t\t);\n\t\tassert(childIndex >= 0, 0x4ca /* index must be positive */);\n\t\tif (this.nodePositionInfo === undefined) {\n\t\t\tassert(\n\t\t\t\tchildIndex < this.shape.topLevelLength,\n\t\t\t\t0x542 /* index must not be past the end of the field */,\n\t\t\t);\n\t\t\tthis.enterRootNodeInner(childIndex);\n\t\t} else {\n\t\t\tconst moved = this.enterNodeInner(this.nodePositionInfo, childIndex);\n\t\t\tassert(moved, 0x4cb /* index must not be past the end of the field */);\n\t\t}\n\t}\n\n\t/**\n\t * Enter the current field, at `childIndex`.\n\t * @param childIndex - index into current field to navigate to. Must be non-negative integer.\n\t */\n\tprivate enterNodeInner(currentPosition: NodePositionInfo, childIndex: number): boolean {\n\t\tconst shape = currentPosition.shape;\n\t\tconst fields = shape.fieldsOffsetArray;\n\t\tif (this.indexOfField >= fields.length) {\n\t\t\treturn false; // Handle empty field (indexed by key into empty field)\n\t\t}\n\t\tconst f = shape.fieldsOffsetArray[this.indexOfField];\n\t\tif (childIndex >= f.topLevelLength) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.mode = CursorLocationType.Nodes;\n\t\tthis.fieldKey = undefined;\n\t\tthis.moveToPosition(this.positionIndex + f.offset + childIndex * f.shape.positions.length);\n\t\tassert(this.fieldIndex === childIndex, 0x4cc /* should be at selected child */);\n\t\treturn true;\n\t}\n\n\tprivate enterRootNodeInner(childIndex: number): void {\n\t\tthis.mode = CursorLocationType.Nodes;\n\t\tthis.fieldKey = undefined;\n\t\t// 1 for the \"undefined\" at the beginning of the positions array, then stride by top level tree shape.\n\t\tthis.moveToPosition(1 + childIndex * this.shape.treeShape.positions.length);\n\t\tassert(this.fieldIndex === childIndex, 0x543 /* should be at selected child */);\n\t}\n\n\tpublic getFieldPath(prefix?: PathRootPrefix): FieldUpPath {\n\t\treturn prefixFieldPath(prefix, {\n\t\t\tfield: this.getFieldKey(),\n\t\t\tparent: this.nodePositionInfo,\n\t\t});\n\t}\n\n\tpublic getPath(prefix?: PathRootPrefix): UpPath | undefined {\n\t\treturn prefixPath(prefix, this.nodeInfo(CursorLocationType.Nodes));\n\t}\n\n\tpublic get fieldIndex(): number {\n\t\treturn this.nodeInfo(CursorLocationType.Nodes).parentIndex;\n\t}\n\n\tpublic readonly chunkStart: number = 0;\n\n\tpublic get chunkLength(): number {\n\t\treturn this.nodeInfo(CursorLocationType.Nodes).topLevelLength;\n\t}\n\n\tpublic seekNodes(offset: number): boolean {\n\t\tconst info = this.nodeInfo(CursorLocationType.Nodes);\n\t\tconst index = offset + info.parentIndex;\n\t\tif (index >= 0 && index < info.topLevelLength) {\n\t\t\tthis.moveToPosition(this.positionIndex + offset * info.shape.positions.length);\n\t\t\treturn true;\n\t\t}\n\t\tthis.exitNode();\n\t\treturn false;\n\t}\n\n\tpublic nextNode(): boolean {\n\t\t// This is the same as `return this.seekNodes(1);` but slightly faster.\n\n\t\tconst info = this.nodeInfo(CursorLocationType.Nodes);\n\t\tconst index = info.parentIndex + 1;\n\t\tif (index === info.topLevelLength) {\n\t\t\tthis.exitNode();\n\t\t\treturn false;\n\t\t}\n\t\tthis.moveToPosition(this.positionIndex + info.shape.positions.length);\n\t\treturn true;\n\t}\n\n\tpublic exitNode(): void {\n\t\tconst info = this.nodeInfo(CursorLocationType.Nodes);\n\t\tthis.indexOfField =\n\t\t\tinfo.indexOfParentField ?? fail(\"navigation up to root field not yet supported\"); // TODO;\n\t\tthis.fieldKey = info.parentField;\n\t\tthis.mode = CursorLocationType.Fields;\n\t\tthis.moveToPosition(\n\t\t\tinfo.indexOfParentPosition ?? fail(\"navigation up to root field not yet supported\"),\n\t\t); // TODO\n\t}\n\n\tpublic firstField(): boolean {\n\t\tconst fieldsArray = this.nodeInfo(CursorLocationType.Nodes).shape.fieldsArray;\n\t\tif (fieldsArray.length === 0) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.indexOfField = 0;\n\t\tthis.mode = CursorLocationType.Fields;\n\t\tthis.fieldKey = fieldsArray[0][0];\n\t\treturn true;\n\t}\n\n\tpublic enterField(key: FieldKey): void {\n\t\tconst fieldMap = this.nodeInfo(CursorLocationType.Nodes).shape.fields;\n\t\tconst fieldInfo = fieldMap.get(key);\n\t\tthis.indexOfField =\n\t\t\tfieldInfo === undefined\n\t\t\t\t? fieldMap.size\n\t\t\t\t: fieldInfo.indexOfParentField ?? fail(\"children should have parents\");\n\t\tthis.fieldKey = key;\n\t\tthis.mode = CursorLocationType.Fields;\n\t}\n\n\tpublic get type(): TreeNodeSchemaIdentifier {\n\t\treturn this.nodeInfo(CursorLocationType.Nodes).shape.type;\n\t}\n\n\tpublic get value(): Value {\n\t\tconst info = this.nodeInfo(CursorLocationType.Nodes);\n\t\treturn info.shape.hasValue ? this.chunk.values[info.valueOffset] : undefined;\n\t}\n}\n"]}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { FieldKey,
|
|
5
|
+
import { FieldKey, ITreeCursorSynchronous, MapTree, Value } from "../core/index.js";
|
|
6
|
+
import { TreeDataContext } from "./fieldGenerator.js";
|
|
6
7
|
import { FlexFieldKind } from "./modular-schema/index.js";
|
|
7
|
-
import { AllowedTypeSet, FlexAllowedTypes, FlexTreeSchema, FlexFieldSchema, FlexTreeNodeSchema } from "./typed-schema/index.js";
|
|
8
8
|
import { AllowedTypesToFlexInsertableTree, InsertableFlexField, InsertableFlexNode } from "./schema-aware/index.js";
|
|
9
|
-
import {
|
|
9
|
+
import { AllowedTypeSet, FlexAllowedTypes, FlexFieldSchema, FlexTreeNodeSchema, FlexTreeSchema } from "./typed-schema/index.js";
|
|
10
10
|
/**
|
|
11
11
|
* This library defines a tree data format that can infer its types from context.
|
|
12
12
|
* It can only be used when the schema is known.
|
|
@@ -17,7 +17,7 @@ import { TreeDataContext } from "./fieldGenerator.js";
|
|
|
17
17
|
* APIs exposing data in this format should likely further constrain what is allowed.
|
|
18
18
|
* For example guarantee which fields and nodes should be inlined, and that types will be required everywhere.
|
|
19
19
|
*
|
|
20
|
-
* This is from
|
|
20
|
+
* This is from Flex tree one which has been deleted and should no longer be used!
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
23
|
* Check if NewFieldContent is made of {@link ITreeCursor}s.
|
|
@@ -36,10 +36,6 @@ export declare const typeNameSymbol: unique symbol;
|
|
|
36
36
|
* @internal
|
|
37
37
|
*/
|
|
38
38
|
export declare const valueSymbol: unique symbol;
|
|
39
|
-
/**
|
|
40
|
-
* Checks if a value is a {@link TreeValue}.
|
|
41
|
-
*/
|
|
42
|
-
export declare function isTreeValue(nodeValue: unknown): nodeValue is TreeValue;
|
|
43
39
|
export declare function getFieldKind(fieldSchema: FlexFieldSchema): FlexFieldKind;
|
|
44
40
|
/**
|
|
45
41
|
* @returns all allowed child types for `typeSet`.
|
|
@@ -127,7 +123,7 @@ export interface ContextuallyTypedNodeDataObject {
|
|
|
127
123
|
/**
|
|
128
124
|
* Fields of this node, indexed by their field keys.
|
|
129
125
|
*
|
|
130
|
-
* Allow explicit undefined for compatibility with
|
|
126
|
+
* Allow explicit undefined for compatibility with FlexTree, and type-safety on read.
|
|
131
127
|
*/
|
|
132
128
|
[key: FieldKey]: ContextuallyTypedFieldData;
|
|
133
129
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextuallyTyped.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/contextuallyTyped.ts"],"names":[],"mappings":"AAAA;;;GAG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tB,IAAI,EAAE,0BAA0B,GAC9B,OAAO,EAAE,CAqBX;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,GACxB,sBAAsB,GACtB,SAAS,sBAAsB,EAAE,GACjC,0BAA0B,CAAC;AAE9B;;;GAGG;AACH,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,eAAe,GACtB,sBAAsB,CAmBxB"}
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { assert } from "@fluidframework/core-utils";
|
|
5
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
6
|
+
import { EmptyKey, isCursor, Multiplicity, } from "../core/index.js";
|
|
6
7
|
import { fail, isReadonlyArray } from "../util/index.js";
|
|
7
|
-
import { EmptyKey, isCursor, } from "../core/index.js";
|
|
8
8
|
// TODO:
|
|
9
9
|
// This module currently is assuming use of default-field-kinds.
|
|
10
10
|
// The field kinds should instead come from a view schema registry thats provided somewhere.
|
|
11
11
|
import { fieldKinds } from "./default-schema/index.js";
|
|
12
|
-
import { Any, FlexFieldNodeSchema, LeafNodeSchema, FlexMapNodeSchema, FlexObjectNodeSchema, allowedTypesSchemaSet, } from "./typed-schema/index.js";
|
|
13
12
|
import { cursorForMapTreeField, cursorForMapTreeNode, mapTreeFromCursor } from "./mapTreeCursor.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import { Any, FlexFieldNodeSchema, FlexMapNodeSchema, FlexObjectNodeSchema, LeafNodeSchema, allowedTypesSchemaSet, } from "./typed-schema/index.js";
|
|
14
|
+
import { allowsValue, isTreeValue } from "./valueUtilities.js";
|
|
16
15
|
/**
|
|
17
16
|
* This library defines a tree data format that can infer its types from context.
|
|
18
17
|
* It can only be used when the schema is known.
|
|
@@ -23,7 +22,7 @@ import { Multiplicity } from "./multiplicity.js";
|
|
|
23
22
|
* APIs exposing data in this format should likely further constrain what is allowed.
|
|
24
23
|
* For example guarantee which fields and nodes should be inlined, and that types will be required everywhere.
|
|
25
24
|
*
|
|
26
|
-
* This is from
|
|
25
|
+
* This is from Flex tree one which has been deleted and should no longer be used!
|
|
27
26
|
*/
|
|
28
27
|
/**
|
|
29
28
|
* Check if NewFieldContent is made of {@link ITreeCursor}s.
|
|
@@ -56,19 +55,6 @@ export const typeNameSymbol = Symbol(`${scope}:typeName`);
|
|
|
56
55
|
* @internal
|
|
57
56
|
*/
|
|
58
57
|
export const valueSymbol = Symbol(`${scope}:value`);
|
|
59
|
-
/**
|
|
60
|
-
* Checks if a value is a {@link TreeValue}.
|
|
61
|
-
*/
|
|
62
|
-
export function isTreeValue(nodeValue) {
|
|
63
|
-
switch (typeof nodeValue) {
|
|
64
|
-
case "string":
|
|
65
|
-
case "number":
|
|
66
|
-
case "boolean":
|
|
67
|
-
return true;
|
|
68
|
-
default:
|
|
69
|
-
return nodeValue === null || isFluidHandle(nodeValue);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
58
|
export function getFieldKind(fieldSchema) {
|
|
73
59
|
// TODO:
|
|
74
60
|
// This module currently is assuming use of defaultFieldKinds.
|
|
@@ -267,7 +253,7 @@ function setFieldForKey(key, context, schema, fields) {
|
|
|
267
253
|
const requiredFieldSchema = schema.getFieldSchema(key);
|
|
268
254
|
const multiplicity = getFieldKind(requiredFieldSchema).multiplicity;
|
|
269
255
|
if (multiplicity === Multiplicity.Single && context.fieldSource !== undefined) {
|
|
270
|
-
const fieldGenerator = context.fieldSource(key, requiredFieldSchema);
|
|
256
|
+
const fieldGenerator = context.fieldSource(key, requiredFieldSchema.stored);
|
|
271
257
|
if (fieldGenerator !== undefined) {
|
|
272
258
|
const children = fieldGenerator();
|
|
273
259
|
fields.set(key, children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextuallyTyped.js","sourceRoot":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\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { fail, isReadonlyArray } from \"../util/index.js\";\nimport {\n\tEmptyKey,\n\tFieldKey,\n\tValue,\n\tMapTree,\n\tITreeCursorSynchronous,\n\tisCursor,\n\tTreeValue,\n\tCursorLocationType,\n} from \"../core/index.js\";\n// TODO:\n// This module currently is assuming use of default-field-kinds.\n// The field kinds should instead come from a view schema registry thats provided somewhere.\nimport { fieldKinds } from \"./default-schema/index.js\";\nimport { FlexFieldKind } from \"./modular-schema/index.js\";\nimport {\n\tAllowedTypeSet,\n\tFlexAllowedTypes,\n\tAny,\n\tFlexFieldNodeSchema,\n\tFlexTreeSchema,\n\tLeafNodeSchema,\n\tFlexMapNodeSchema,\n\tFlexObjectNodeSchema,\n\tFlexFieldSchema,\n\tFlexTreeNodeSchema,\n\tallowedTypesSchemaSet,\n} from \"./typed-schema/index.js\";\nimport { cursorForMapTreeField, cursorForMapTreeNode, mapTreeFromCursor } from \"./mapTreeCursor.js\";\nimport {\n\tAllowedTypesToFlexInsertableTree,\n\tInsertableFlexField,\n\tInsertableFlexNode,\n} from \"./schema-aware/index.js\";\nimport { isFluidHandle, allowsValue } from \"./valueUtilities.js\";\nimport { TreeDataContext } from \"./fieldGenerator.js\";\nimport { Multiplicity } from \"./multiplicity.js\";\n\n/**\n * This library defines a tree data format that can infer its types from context.\n * It can only be used when the schema is known.\n * The format is optimized for ergonomics when the developer knows the schema,\n * and needs to declare or navigate trees.\n *\n * The format defined here is very tolerant to optimize for flexibility of expressing trees:\n * APIs exposing data in this format should likely further constrain what is allowed.\n * For example guarantee which fields and nodes should be inlined, and that types will be required everywhere.\n *\n * This is from Editable tree one which has been deleted and should no longer be used!\n */\n\n/**\n * Check if NewFieldContent is made of {@link ITreeCursor}s.\n *\n * Useful when APIs want to take in tree data in multiple formats, including cursors.\n */\nexport function areCursors(\n\tdata: NewFieldContent,\n): data is ITreeCursorSynchronous | readonly ITreeCursorSynchronous[] {\n\tif (isCursor(data)) {\n\t\treturn true;\n\t}\n\n\tif (Array.isArray(data) && data.length >= 0 && isCursor(data[0])) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * String which identifies this code.\n * Targeted at developers: can be used for symbol strings, or other developer targeted strings,\n * like error messages.\n */\nconst scope = \"contextuallyTyped\";\n\n/**\n * A symbol for the name of the type of a tree in contexts where string keys are already in use for fields.\n * See {@link TreeNodeSchemaIdentifier}.\n * @internal\n */\nexport const typeNameSymbol: unique symbol = Symbol(`${scope}:typeName`);\n\n/**\n * A symbol for the value of a tree node in contexts where string keys are already in use for fields.\n * @internal\n */\nexport const valueSymbol: unique symbol = Symbol(`${scope}:value`);\n\n/**\n * Checks if a value is a {@link TreeValue}.\n */\nexport function isTreeValue(nodeValue: unknown): nodeValue is TreeValue {\n\tswitch (typeof nodeValue) {\n\t\tcase \"string\":\n\t\tcase \"number\":\n\t\tcase \"boolean\":\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn nodeValue === null || isFluidHandle(nodeValue);\n\t}\n}\n\nexport function getFieldKind(fieldSchema: FlexFieldSchema): FlexFieldKind {\n\t// TODO:\n\t// This module currently is assuming use of defaultFieldKinds.\n\t// The field kinds should instead come from a view schema registry thats provided somewhere.\n\treturn fieldKinds.get(fieldSchema.kind.identifier) ?? fail(\"missing field kind\");\n}\n\n/**\n * @returns all allowed child types for `typeSet`.\n */\nexport function getAllowedTypes(\n\tschemaData: FlexTreeSchema,\n\ttypeSet: AllowedTypeSet,\n): ReadonlySet<FlexTreeNodeSchema> {\n\t// TODO: Performance: avoid the `Any` case being frequent, possibly with caching in the caller of `getPossibleChildTypes`.\n\treturn typeSet === Any ? new Set(schemaData.nodeSchema.values()) : typeSet;\n}\n\n/**\n * @returns all types, for which the data is schema-compatible.\n */\nexport function getPossibleTypes(\n\tcontext: FlexTreeSchema,\n\ttypeSet: AllowedTypeSet,\n\tdata: ContextuallyTypedNodeData,\n) {\n\t// All types allowed by schema\n\tconst allowedTypes = getAllowedTypes(context, typeSet);\n\n\tconst possibleTypes: FlexTreeNodeSchema[] = [];\n\tfor (const allowed of allowedTypes) {\n\t\tif (shallowCompatibilityTest(allowed, data)) {\n\t\t\tpossibleTypes.push(allowed);\n\t\t}\n\t}\n\treturn possibleTypes;\n}\n\n/**\n * A symbol used to define a {@link MarkedArrayLike} interface.\n * @internal\n */\nexport const arrayLikeMarkerSymbol: unique symbol = Symbol(\"editable-tree:arrayLikeMarker\");\n\n/**\n * Can be used to mark a type which works like an array, but is not compatible with `Array.isArray`.\n * @internal\n */\nexport interface MarkedArrayLike<TGet, TSet extends TGet = TGet> extends ArrayLikeMut<TGet, TSet> {\n\treadonly [arrayLikeMarkerSymbol]: true;\n\t[Symbol.iterator](): IterableIterator<TGet>;\n}\n\n/**\n * Can be used to mark a type which works like an array, but is not compatible with `Array.isArray`.\n * @internal\n */\nexport interface ReadonlyMarkedArrayLike<T> extends ArrayLike<T> {\n\treadonly [arrayLikeMarkerSymbol]: true;\n\t[Symbol.iterator](): IterableIterator<T>;\n}\n\n/**\n * `ArrayLike` numeric indexed access, but writable.\n *\n * @remarks\n * Note that due to language limitations, this also allows reading as TSet.\n * This is why `TSet extends TGet` is required.\n *\n * See https://github.com/microsoft/TypeScript/issues/43826.\n * @internal\n */\nexport interface ArrayLikeMut<TGet, TSet extends TGet = TGet> extends ArrayLike<TGet> {\n\t[n: number]: TSet;\n}\n\n/**\n * Content of a tree which needs external schema information to interpret.\n *\n * This format is intended for concise authoring of tree literals when the schema is statically known.\n *\n * Once schema aware APIs are implemented, they can be used to provide schema specific subsets of this type.\n * @internal\n */\nexport type ContextuallyTypedNodeData =\n\t| ContextuallyTypedNodeDataObject\n\t| number\n\t| string\n\t| boolean\n\t// eslint-disable-next-line @rushstack/no-new-null\n\t| null\n\t| readonly ContextuallyTypedNodeData[]\n\t| MarkedArrayLike<ContextuallyTypedNodeData>;\n\n/**\n * Content of a field which needs external schema information to interpret.\n *\n * This format is intended for concise authoring of tree literals when the schema is statically known.\n *\n * Once schema aware APIs are implemented, they can be used to provide schema specific subsets of this type.\n * @internal\n */\nexport type ContextuallyTypedFieldData = ContextuallyTypedNodeData | undefined;\n\n/**\n * Checks the type of a `ContextuallyTypedNodeData`.\n */\nexport function isArrayLike(\n\tdata: ContextuallyTypedFieldData,\n): data is\n\t| readonly ContextuallyTypedNodeData[]\n\t| ReadonlyMarkedArrayLike<ContextuallyTypedNodeData> {\n\tif (typeof data !== \"object\" || data === null) {\n\t\treturn false;\n\t}\n\treturn (\n\t\t(data as Partial<MarkedArrayLike<ContextuallyTypedNodeData>>)[arrayLikeMarkerSymbol] ===\n\t\t\ttrue || Array.isArray(data)\n\t);\n}\n\n/**\n * Checks the type of a `ContextuallyTypedNodeData`.\n * @internal\n */\nexport function isContextuallyTypedNodeDataObject(\n\tdata: ContextuallyTypedNodeData | undefined,\n): data is ContextuallyTypedNodeDataObject {\n\treturn !(isTreeValue(data) || isArrayLike(data));\n}\n\n/**\n * Object case of {@link ContextuallyTypedNodeData}.\n * @internal\n */\nexport interface ContextuallyTypedNodeDataObject {\n\t/**\n\t * Value stored on this node.\n\t */\n\treadonly [valueSymbol]?: Value;\n\n\t/**\n\t * The type of the node.\n\t * If this node is well-formed, it must follow this schema.\n\t */\n\treadonly [typeNameSymbol]?: string;\n\n\t/**\n\t * Fields of this node, indexed by their field keys.\n\t *\n\t * Allow explicit undefined for compatibility with EditableTree, and type-safety on read.\n\t */\n\t// TODO: make sure explicit undefined is actually handled correctly.\n\t[key: FieldKey]: ContextuallyTypedFieldData;\n\n\t/**\n\t * Fields of this node, indexed by their field keys as strings.\n\t *\n\t * Allow unbranded field keys as a convenience for literals.\n\t */\n\t[key: string]: ContextuallyTypedFieldData;\n}\n\n/**\n * Checks if data might be schema-compatible.\n *\n * @returns false if `data` is incompatible with `type` based on a cheap/shallow check.\n *\n * Note that this may return true for cases where data is incompatible, but it must not return false in cases where the data is compatible.\n */\nfunction shallowCompatibilityTest(\n\tschema: FlexTreeNodeSchema,\n\tdata: ContextuallyTypedNodeData,\n): boolean {\n\tassert(!areCursors(data), 0x6b1 /* cursors cannot be used as contextually typed data. */);\n\tassert(\n\t\tdata !== undefined,\n\t\t0x6b2 /* undefined cannot be used as contextually typed data. Use ContextuallyTypedFieldData. */,\n\t);\n\n\tif (schema instanceof LeafNodeSchema) {\n\t\t// Reject objects with no value from being leaf nodes.\n\t\t// Note that if allowing IFluidHandles without wrapping them in a leaf node object,\n\t\t// this (or the above isPrimitiveValue) would have to change.\n\n\t\tif (isTreeValue(data)) {\n\t\t\treturn allowsValue(schema.leafValue, data);\n\t\t}\n\t\tif ((data as ContextuallyTypedNodeDataObject)[valueSymbol] === undefined) {\n\t\t\treturn false;\n\t\t}\n\t}\n\tif (isTreeValue(data)) {\n\t\treturn false;\n\t}\n\tif (isArrayLike(data)) {\n\t\tif (schema instanceof FlexFieldNodeSchema) {\n\t\t\tconst field = schema.getFieldSchema();\n\t\t\treturn field.kind.multiplicity === Multiplicity.Sequence;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\tif (data[typeNameSymbol] !== undefined) {\n\t\treturn data[typeNameSymbol] === schema.name;\n\t}\n\t// For now, consider all not explicitly typed objects shallow compatible.\n\t// This will require explicit differentiation in polymorphic cases rather than automatic structural differentiation.\n\n\treturn true;\n}\n\n/**\n * Construct a tree from ContextuallyTypedNodeData.\n *\n * TODO: this should probably be refactored into a `try` function which either returns a Cursor or a SchemaError with a path to the error.\n * @returns a cursor in Nodes mode for a single node containing the provided data.\n * @internal\n */\nexport function cursorFromContextualData(\n\tcontext: TreeDataContext,\n\ttypeSet: AllowedTypeSet,\n\tdata: ContextuallyTypedNodeData,\n): ITreeCursorSynchronous {\n\tconst mapTree = applyTypesFromContext(context, typeSet, data);\n\treturn cursorForMapTreeNode(mapTree);\n}\n\n/**\n * Strongly typed {@link cursorFromContextualData} for a TreeNodeSchema.\n * @returns a cursor in Nodes mode for a single node containing the provided data.\n * @internal\n */\nexport function cursorForTypedTreeData<T extends FlexTreeNodeSchema>(\n\tcontext: TreeDataContext,\n\tschema: T,\n\tdata: InsertableFlexNode<T>,\n): ITreeCursorSynchronous {\n\treturn cursorFromContextualData(context, new Set([schema]), data as ContextuallyTypedNodeData);\n}\n\n/**\n * Strongly typed {@link cursorFromContextualData} for AllowedTypes.\n * @returns a cursor in Nodes mode for a single node containing the provided data.\n * @internal\n */\nexport function cursorForTypedData<T extends FlexAllowedTypes>(\n\tcontext: TreeDataContext,\n\tschema: T,\n\tdata: AllowedTypesToFlexInsertableTree<T>,\n): ITreeCursorSynchronous {\n\treturn cursorFromContextualData(\n\t\tcontext,\n\t\tallowedTypesSchemaSet(schema),\n\t\tdata as unknown as ContextuallyTypedNodeData,\n\t);\n}\n\n/**\n * Construct a tree from ContextuallyTypedNodeData.\n * Returns a cursor in Field mode.\n *\n * TODO: this should probably be refactored into a `try` function which either returns a Cursor or a SchemaError with a path to the error.\n */\nexport function cursorsFromContextualData(\n\tcontext: TreeDataContext,\n\tfield: FlexFieldSchema,\n\tdata: ContextuallyTypedNodeData | undefined,\n): ITreeCursorSynchronous {\n\tconst mapTrees = applyFieldTypesFromContext(context, field, data);\n\treturn cursorForMapTreeField(mapTrees);\n}\n\n/**\n * Strongly typed {@link cursorsFromContextualData} for a TreeFieldSchema\n * @internal\n */\nexport function cursorsForTypedFieldData<T extends FlexFieldSchema>(\n\tcontext: TreeDataContext,\n\tschema: T,\n\tdata: InsertableFlexField<T>,\n): ITreeCursorSynchronous {\n\treturn cursorsFromContextualData(context, schema, data as ContextuallyTypedNodeData);\n}\n\n/**\n * Construct a MapTree from ContextuallyTypedNodeData.\n *\n * TODO: this should probably be refactored into a `try` function which either returns a MapTree or a SchemaError with a path to the error.\n * TODO: test suite.\n *\n * @remarks\n * This version is only exported as a more testable entry point than `cursorFromContextualData` which keeps the use of `MapTree` as an implementation detail.\n * This should not be reexported from the parent module.\n */\nexport function applyTypesFromContext(\n\tcontext: TreeDataContext,\n\ttypeSet: AllowedTypeSet,\n\tdata: ContextuallyTypedNodeData,\n): MapTree {\n\tconst possibleTypes: FlexTreeNodeSchema[] = getPossibleTypes(context.schema, typeSet, data);\n\n\tassert(\n\t\tpossibleTypes.length !== 0,\n\t\t0x4d4 /* data incompatible with all types allowed by the schema */,\n\t);\n\tassert(\n\t\tpossibleTypes.length === 1,\n\t\t0x4d5 /* data compatible with more than one type allowed by the schema */,\n\t);\n\n\tconst schema = possibleTypes[0];\n\n\tif (schema instanceof LeafNodeSchema) {\n\t\tconst value = isTreeValue(data)\n\t\t\t? data\n\t\t\t: (data as ContextuallyTypedNodeDataObject)[valueSymbol];\n\n\t\tassert(\n\t\t\tallowsValue(schema.leafValue, value),\n\t\t\t0x4d3 /* unsupported schema for provided primitive */,\n\t\t);\n\t\treturn { value, type: schema.name, fields: new Map() };\n\t}\n\tassert(!isTreeValue(data), 0x880 /* leaf value for non leaf */);\n\tif (schema instanceof FlexFieldNodeSchema) {\n\t\tif (isArrayLike(data)) {\n\t\t\tconst children = applyFieldTypesFromContext(context, schema.getFieldSchema(), data);\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\ttype: schema.name,\n\t\t\t\tfields: new Map(children.length > 0 ? [[EmptyKey, children]] : []),\n\t\t\t};\n\t\t}\n\t}\n\tassert(!isArrayLike(data), 0x881 /* array for non field node */);\n\tif (\n\t\tschema instanceof FlexMapNodeSchema ||\n\t\tschema instanceof FlexObjectNodeSchema ||\n\t\tschema instanceof FlexFieldNodeSchema\n\t) {\n\t\tconst fields: Map<FieldKey, MapTree[]> = new Map();\n\t\tfor (const key of fieldKeysFromData(data)) {\n\t\t\tassert(!fields.has(key), 0x6b3 /* Keys should not be duplicated */);\n\t\t\tconst childSchema = schema.getFieldSchema(key);\n\t\t\tconst children = applyFieldTypesFromContext(context, childSchema, data[key]);\n\n\t\t\tif (children.length > 0) {\n\t\t\t\tfields.set(key, children);\n\t\t\t}\n\t\t}\n\n\t\tif (schema instanceof FlexObjectNodeSchema) {\n\t\t\tfor (const key of schema.objectNodeFields.keys()) {\n\t\t\t\tif (data[key] === undefined) {\n\t\t\t\t\tsetFieldForKey(key, context, schema, fields);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst value = data[valueSymbol];\n\t\tassert(value === undefined, 0x4d7 /* provided value not permitted by the schema */);\n\t\treturn { value, type: schema.name, fields };\n\t} else {\n\t\tfail(\"unexpected node kind\");\n\t}\n}\n\nfunction setFieldForKey(\n\tkey: FieldKey,\n\tcontext: TreeDataContext,\n\tschema: FlexTreeNodeSchema,\n\tfields: Map<FieldKey, MapTree[]>,\n): void {\n\tconst requiredFieldSchema = schema.getFieldSchema(key);\n\tconst multiplicity = getFieldKind(requiredFieldSchema).multiplicity;\n\tif (multiplicity === Multiplicity.Single && context.fieldSource !== undefined) {\n\t\tconst fieldGenerator = context.fieldSource(key, requiredFieldSchema);\n\t\tif (fieldGenerator !== undefined) {\n\t\t\tconst children = fieldGenerator();\n\t\t\tfields.set(key, children);\n\t\t}\n\t}\n}\n\nfunction fieldKeysFromData(data: ContextuallyTypedNodeDataObject): FieldKey[] {\n\tconst keys: (string | symbol)[] = Reflect.ownKeys(data).filter(\n\t\t(key) => typeof key === \"string\",\n\t);\n\treturn keys as FieldKey[];\n}\n\n/**\n * Construct a MapTree from ContextuallyTypedNodeData.\n *\n * TODO: this should probably be refactored into a `try` function which either returns a MapTree or a SchemaError with a path to the error.\n * TODO: test suite.\n *\n * @remarks\n * This version is only exported as a more testable entry point than `cursorsFromContextualData` which keeps the use of `MapTree` as an implementation detail.\n * This should not be reexported from the parent module.\n */\nexport function applyFieldTypesFromContext(\n\tcontext: TreeDataContext,\n\tfield: FlexFieldSchema,\n\tdata: ContextuallyTypedFieldData,\n): MapTree[] {\n\tconst multiplicity = getFieldKind(field).multiplicity;\n\tif (data === undefined) {\n\t\tassert(\n\t\t\tmultiplicity === Multiplicity.Forbidden || multiplicity === Multiplicity.Optional,\n\t\t\t0x4d8 /* `undefined` provided for a field that does not support `undefined` */,\n\t\t);\n\t\treturn [];\n\t}\n\tif (multiplicity === Multiplicity.Sequence) {\n\t\tassert(isArrayLike(data), 0x4d9 /* expected array for a sequence field */);\n\t\tconst children = Array.from(data, (child) =>\n\t\t\tapplyTypesFromContext(context, field.allowedTypeSet, child),\n\t\t);\n\t\treturn children;\n\t}\n\tassert(\n\t\tmultiplicity === Multiplicity.Single || multiplicity === Multiplicity.Optional,\n\t\t0x4da /* single value provided for an unsupported field */,\n\t);\n\treturn [applyTypesFromContext(context, field.allowedTypeSet, data)];\n}\n\n/**\n * Content to use for a field.\n *\n * When used, this content will be deeply copied into the tree, and must comply with the schema.\n *\n * The content must follow the {@link Multiplicity} of the {@link FlexFieldKind}:\n * - use a single cursor for an `optional` or `value` field;\n * - use array of cursors for a `sequence` field;\n *\n * TODO: this should allow a field cursor instead of an array of cursors.\n * TODO: Make this generic so a variant of this type that allows placeholders for detached sequences to consume.\n * @internal\n */\nexport type NewFieldContent =\n\t| ITreeCursorSynchronous\n\t| readonly ITreeCursorSynchronous[]\n\t| ContextuallyTypedFieldData;\n\n/**\n * Convert NewFieldContent into ITreeCursorSynchronous.\n * The returned cursor will be in Field mode.\n */\nexport function normalizeNewFieldContent(\n\tcontext: TreeDataContext,\n\tschema: FlexFieldSchema,\n\tcontent: NewFieldContent,\n): ITreeCursorSynchronous {\n\tif (areCursors(content)) {\n\t\tif (isReadonlyArray(content)) {\n\t\t\tassert(\n\t\t\t\tgetFieldKind(schema).multiplicity === Multiplicity.Sequence || content.length === 1,\n\t\t\t\t0x6b8 /* non-sequence fields can not be provided content that is multiple cursors */,\n\t\t\t);\n\t\t\t// TODO: is there a better way to get a field cursor from an array of node cursors?\n\t\t\tconst mapTrees = content.map((c) => mapTreeFromCursor(c));\n\t\t\treturn cursorForMapTreeField(mapTrees);\n\t\t}\n\t\tif (content.mode === CursorLocationType.Fields) {\n\t\t\treturn content;\n\t\t}\n\t\t// TODO: is there a better way to get a field cursor from a node cursor?\n\t\treturn cursorForMapTreeField([mapTreeFromCursor(content)]);\n\t}\n\n\treturn cursorsFromContextualData(context, schema, content);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"contextuallyTyped.js","sourceRoot":"","sources":["../../src/feature-libraries/contextuallyTyped.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAEN,QAAQ,EAKR,QAAQ,EACR,YAAY,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEzD,QAAQ;AACR,gEAAgE;AAChE,4FAA4F;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAOpG,OAAO,EAEN,GAAG,EAEH,mBAAmB,EAEnB,iBAAiB,EACjB,oBAAoB,EAGpB,cAAc,EACd,qBAAqB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE/D;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,MAAM,UAAU,UAAU,CACzB,IAAqB;IAErB,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;QACnB,OAAO,IAAI,CAAC;KACZ;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;QACjE,OAAO,IAAI,CAAC;KACZ;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,KAAK,GAAG,mBAAmB,CAAC;AAElC;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB,MAAM,CAAC,GAAG,KAAK,WAAW,CAAC,CAAC;AAEzE;;;GAGG;AACH,M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MAAM,CACL,YAAY,KAAK,YAAY,CAAC,MAAM,IAAI,YAAY,KAAK,YAAY,CAAC,QAAQ,EAC9E,KAAK,CAAC,oDAAoD,CAC1D,CAAC;IACF,OAAO,CAAC,qBAAqB,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC;AACrE,CAAC;AAoBD;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CACvC,OAAwB,EACxB,MAAuB,EACvB,OAAwB;IAExB,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE;QACxB,IAAI,eAAe,CAAC,OAAO,CAAC,EAAE;YAC7B,MAAM,CACL,YAAY,CAAC,MAAM,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EACnF,KAAK,CAAC,8EAA8E,CACpF,CAAC;YACF,mFAAmF;YACnF,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1D,OAAO,qBAAqB,CAAC,QAAQ,CAAC,CAAC;SACvC;QACD,IAAI,OAAO,CAAC,IAAI,sCAA8B,EAAE;YAC/C,OAAO,OAAO,CAAC;SACf;QACD,wEAAwE;QACxE,OAAO,qBAAqB,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;KAC3D;IAED,OAAO,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAC5D,CAAC","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\tCursorLocationType,\n\tEmptyKey,\n\tFieldKey,\n\tITreeCursorSynchronous,\n\tMapTree,\n\tValue,\n\tisCursor,\n\tMultiplicity,\n} from \"../core/index.js\";\nimport { fail, isReadonlyArray } from \"../util/index.js\";\n\n// TODO:\n// This module currently is assuming use of default-field-kinds.\n// The field kinds should instead come from a view schema registry thats provided somewhere.\nimport { fieldKinds } from \"./default-schema/index.js\";\nimport { TreeDataContext } from \"./fieldGenerator.js\";\nimport { cursorForMapTreeField, cursorForMapTreeNode, mapTreeFromCursor } from \"./mapTreeCursor.js\";\nimport { FlexFieldKind } from \"./modular-schema/index.js\";\nimport {\n\tAllowedTypesToFlexInsertableTree,\n\tInsertableFlexField,\n\tInsertableFlexNode,\n} from \"./schema-aware/index.js\";\nimport {\n\tAllowedTypeSet,\n\tAny,\n\tFlexAllowedTypes,\n\tFlexFieldNodeSchema,\n\tFlexFieldSchema,\n\tFlexMapNodeSchema,\n\tFlexObjectNodeSchema,\n\tFlexTreeNodeSchema,\n\tFlexTreeSchema,\n\tLeafNodeSchema,\n\tallowedTypesSchemaSet,\n} from \"./typed-schema/index.js\";\nimport { allowsValue, isTreeValue } from \"./valueUtilities.js\";\n\n/**\n * This library defines a tree data format that can infer its types from context.\n * It can only be used when the schema is known.\n * The format is optimized for ergonomics when the developer knows the schema,\n * and needs to declare or navigate trees.\n *\n * The format defined here is very tolerant to optimize for flexibility of expressing trees:\n * APIs exposing data in this format should likely further constrain what is allowed.\n * For example guarantee which fields and nodes should be inlined, and that types will be required everywhere.\n *\n * This is from Flex tree one which has been deleted and should no longer be used!\n */\n\n/**\n * Check if NewFieldContent is made of {@link ITreeCursor}s.\n *\n * Useful when APIs want to take in tree data in multiple formats, including cursors.\n */\nexport function areCursors(\n\tdata: NewFieldContent,\n): data is ITreeCursorSynchronous | readonly ITreeCursorSynchronous[] {\n\tif (isCursor(data)) {\n\t\treturn true;\n\t}\n\n\tif (Array.isArray(data) && data.length >= 0 && isCursor(data[0])) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * String which identifies this code.\n * Targeted at developers: can be used for symbol strings, or other developer targeted strings,\n * like error messages.\n */\nconst scope = \"contextuallyTyped\";\n\n/**\n * A symbol for the name of the type of a tree in contexts where string keys are already in use for fields.\n * See {@link TreeNodeSchemaIdentifier}.\n * @internal\n */\nexport const typeNameSymbol: unique symbol = Symbol(`${scope}:typeName`);\n\n/**\n * A symbol for the value of a tree node in contexts where string keys are already in use for fields.\n * @internal\n */\nexport const valueSymbol: unique symbol = Symbol(`${scope}:value`);\n\nexport function getFieldKind(fieldSchema: FlexFieldSchema): FlexFieldKind {\n\t// TODO:\n\t// This module currently is assuming use of defaultFieldKinds.\n\t// The field kinds should instead come from a view schema registry thats provided somewhere.\n\treturn fieldKinds.get(fieldSchema.kind.identifier) ?? fail(\"missing field kind\");\n}\n\n/**\n * @returns all allowed child types for `typeSet`.\n */\nexport function getAllowedTypes(\n\tschemaData: FlexTreeSchema,\n\ttypeSet: AllowedTypeSet,\n): ReadonlySet<FlexTreeNodeSchema> {\n\t// TODO: Performance: avoid the `Any` case being frequent, possibly with caching in the caller of `getPossibleChildTypes`.\n\treturn typeSet === Any ? new Set(schemaData.nodeSchema.values()) : typeSet;\n}\n\n/**\n * @returns all types, for which the data is schema-compatible.\n */\nexport function getPossibleTypes(\n\tcontext: FlexTreeSchema,\n\ttypeSet: AllowedTypeSet,\n\tdata: ContextuallyTypedNodeData,\n) {\n\t// All types allowed by schema\n\tconst allowedTypes = getAllowedTypes(context, typeSet);\n\n\tconst possibleTypes: FlexTreeNodeSchema[] = [];\n\tfor (const allowed of allowedTypes) {\n\t\tif (shallowCompatibilityTest(allowed, data)) {\n\t\t\tpossibleTypes.push(allowed);\n\t\t}\n\t}\n\treturn possibleTypes;\n}\n\n/**\n * A symbol used to define a {@link MarkedArrayLike} interface.\n * @internal\n */\nexport const arrayLikeMarkerSymbol: unique symbol = Symbol(\"editable-tree:arrayLikeMarker\");\n\n/**\n * Can be used to mark a type which works like an array, but is not compatible with `Array.isArray`.\n * @internal\n */\nexport interface MarkedArrayLike<TGet, TSet extends TGet = TGet> extends ArrayLikeMut<TGet, TSet> {\n\treadonly [arrayLikeMarkerSymbol]: true;\n\t[Symbol.iterator](): IterableIterator<TGet>;\n}\n\n/**\n * Can be used to mark a type which works like an array, but is not compatible with `Array.isArray`.\n * @internal\n */\nexport interface ReadonlyMarkedArrayLike<T> extends ArrayLike<T> {\n\treadonly [arrayLikeMarkerSymbol]: true;\n\t[Symbol.iterator](): IterableIterator<T>;\n}\n\n/**\n * `ArrayLike` numeric indexed access, but writable.\n *\n * @remarks\n * Note that due to language limitations, this also allows reading as TSet.\n * This is why `TSet extends TGet` is required.\n *\n * See https://github.com/microsoft/TypeScript/issues/43826.\n * @internal\n */\nexport interface ArrayLikeMut<TGet, TSet extends TGet = TGet> extends ArrayLike<TGet> {\n\t[n: number]: TSet;\n}\n\n/**\n * Content of a tree which needs external schema information to interpret.\n *\n * This format is intended for concise authoring of tree literals when the schema is statically known.\n *\n * Once schema aware APIs are implemented, they can be used to provide schema specific subsets of this type.\n * @internal\n */\nexport type ContextuallyTypedNodeData =\n\t| ContextuallyTypedNodeDataObject\n\t| number\n\t| string\n\t| boolean\n\t// eslint-disable-next-line @rushstack/no-new-null\n\t| null\n\t| readonly ContextuallyTypedNodeData[]\n\t| MarkedArrayLike<ContextuallyTypedNodeData>;\n\n/**\n * Content of a field which needs external schema information to interpret.\n *\n * This format is intended for concise authoring of tree literals when the schema is statically known.\n *\n * Once schema aware APIs are implemented, they can be used to provide schema specific subsets of this type.\n * @internal\n */\nexport type ContextuallyTypedFieldData = ContextuallyTypedNodeData | undefined;\n\n/**\n * Checks the type of a `ContextuallyTypedNodeData`.\n */\nexport function isArrayLike(\n\tdata: ContextuallyTypedFieldData,\n): data is\n\t| readonly ContextuallyTypedNodeData[]\n\t| ReadonlyMarkedArrayLike<ContextuallyTypedNodeData> {\n\tif (typeof data !== \"object\" || data === null) {\n\t\treturn false;\n\t}\n\treturn (\n\t\t(data as Partial<MarkedArrayLike<ContextuallyTypedNodeData>>)[arrayLikeMarkerSymbol] ===\n\t\t\ttrue || Array.isArray(data)\n\t);\n}\n\n/**\n * Checks the type of a `ContextuallyTypedNodeData`.\n * @internal\n */\nexport function isContextuallyTypedNodeDataObject(\n\tdata: ContextuallyTypedNodeData | undefined,\n): data is ContextuallyTypedNodeDataObject {\n\treturn !(isTreeValue(data) || isArrayLike(data));\n}\n\n/**\n * Object case of {@link ContextuallyTypedNodeData}.\n * @internal\n */\nexport interface ContextuallyTypedNodeDataObject {\n\t/**\n\t * Value stored on this node.\n\t */\n\treadonly [valueSymbol]?: Value;\n\n\t/**\n\t * The type of the node.\n\t * If this node is well-formed, it must follow this schema.\n\t */\n\treadonly [typeNameSymbol]?: string;\n\n\t/**\n\t * Fields of this node, indexed by their field keys.\n\t *\n\t * Allow explicit undefined for compatibility with FlexTree, and type-safety on read.\n\t */\n\t// TODO: make sure explicit undefined is actually handled correctly.\n\t[key: FieldKey]: ContextuallyTypedFieldData;\n\n\t/**\n\t * Fields of this node, indexed by their field keys as strings.\n\t *\n\t * Allow unbranded field keys as a convenience for literals.\n\t */\n\t[key: string]: ContextuallyTypedFieldData;\n}\n\n/**\n * Checks if data might be schema-compatible.\n *\n * @returns false if `data` is incompatible with `type` based on a cheap/shallow check.\n *\n * Note that this may return true for cases where data is incompatible, but it must not return false in cases where the data is compatible.\n */\nfunction shallowCompatibilityTest(\n\tschema: FlexTreeNodeSchema,\n\tdata: ContextuallyTypedNodeData,\n): boolean {\n\tassert(!areCursors(data), 0x6b1 /* cursors cannot be used as contextually typed data. */);\n\tassert(\n\t\tdata !== undefined,\n\t\t0x6b2 /* undefined cannot be used as contextually typed data. Use ContextuallyTypedFieldData. */,\n\t);\n\n\tif (schema instanceof LeafNodeSchema) {\n\t\t// Reject objects with no value from being leaf nodes.\n\t\t// Note that if allowing IFluidHandles without wrapping them in a leaf node object,\n\t\t// this (or the above isPrimitiveValue) would have to change.\n\n\t\tif (isTreeValue(data)) {\n\t\t\treturn allowsValue(schema.leafValue, data);\n\t\t}\n\t\tif ((data as ContextuallyTypedNodeDataObject)[valueSymbol] === undefined) {\n\t\t\treturn false;\n\t\t}\n\t}\n\tif (isTreeValue(data)) {\n\t\treturn false;\n\t}\n\tif (isArrayLike(data)) {\n\t\tif (schema instanceof FlexFieldNodeSchema) {\n\t\t\tconst field = schema.getFieldSchema();\n\t\t\treturn field.kind.multiplicity === Multiplicity.Sequence;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\tif (data[typeNameSymbol] !== undefined) {\n\t\treturn data[typeNameSymbol] === schema.name;\n\t}\n\t// For now, consider all not explicitly typed objects shallow compatible.\n\t// This will require explicit differentiation in polymorphic cases rather than automatic structural differentiation.\n\n\treturn true;\n}\n\n/**\n * Construct a tree from ContextuallyTypedNodeData.\n *\n * TODO: this should probably be refactored into a `try` function which either returns a Cursor or a SchemaError with a path to the error.\n * @returns a cursor in Nodes mode for a single node containing the provided data.\n * @internal\n */\nexport function cursorFromContextualData(\n\tcontext: TreeDataContext,\n\ttypeSet: AllowedTypeSet,\n\tdata: ContextuallyTypedNodeData,\n): ITreeCursorSynchronous {\n\tconst mapTree = applyTypesFromContext(context, typeSet, data);\n\treturn cursorForMapTreeNode(mapTree);\n}\n\n/**\n * Strongly typed {@link cursorFromContextualData} for a TreeNodeSchema.\n * @returns a cursor in Nodes mode for a single node containing the provided data.\n * @internal\n */\nexport function cursorForTypedTreeData<T extends FlexTreeNodeSchema>(\n\tcontext: TreeDataContext,\n\tschema: T,\n\tdata: InsertableFlexNode<T>,\n): ITreeCursorSynchronous {\n\treturn cursorFromContextualData(context, new Set([schema]), data as ContextuallyTypedNodeData);\n}\n\n/**\n * Strongly typed {@link cursorFromContextualData} for AllowedTypes.\n * @returns a cursor in Nodes mode for a single node containing the provided data.\n * @internal\n */\nexport function cursorForTypedData<T extends FlexAllowedTypes>(\n\tcontext: TreeDataContext,\n\tschema: T,\n\tdata: AllowedTypesToFlexInsertableTree<T>,\n): ITreeCursorSynchronous {\n\treturn cursorFromContextualData(\n\t\tcontext,\n\t\tallowedTypesSchemaSet(schema),\n\t\tdata as unknown as ContextuallyTypedNodeData,\n\t);\n}\n\n/**\n * Construct a tree from ContextuallyTypedNodeData.\n * Returns a cursor in Field mode.\n *\n * TODO: this should probably be refactored into a `try` function which either returns a Cursor or a SchemaError with a path to the error.\n */\nexport function cursorsFromContextualData(\n\tcontext: TreeDataContext,\n\tfield: FlexFieldSchema,\n\tdata: ContextuallyTypedNodeData | undefined,\n): ITreeCursorSynchronous {\n\tconst mapTrees = applyFieldTypesFromContext(context, field, data);\n\treturn cursorForMapTreeField(mapTrees);\n}\n\n/**\n * Strongly typed {@link cursorsFromContextualData} for a TreeFieldSchema\n * @internal\n */\nexport function cursorsForTypedFieldData<T extends FlexFieldSchema>(\n\tcontext: TreeDataContext,\n\tschema: T,\n\tdata: InsertableFlexField<T>,\n): ITreeCursorSynchronous {\n\treturn cursorsFromContextualData(context, schema, data as ContextuallyTypedNodeData);\n}\n\n/**\n * Construct a MapTree from ContextuallyTypedNodeData.\n *\n * TODO: this should probably be refactored into a `try` function which either returns a MapTree or a SchemaError with a path to the error.\n * TODO: test suite.\n *\n * @remarks\n * This version is only exported as a more testable entry point than `cursorFromContextualData` which keeps the use of `MapTree` as an implementation detail.\n * This should not be reexported from the parent module.\n */\nexport function applyTypesFromContext(\n\tcontext: TreeDataContext,\n\ttypeSet: AllowedTypeSet,\n\tdata: ContextuallyTypedNodeData,\n): MapTree {\n\tconst possibleTypes: FlexTreeNodeSchema[] = getPossibleTypes(context.schema, typeSet, data);\n\n\tassert(\n\t\tpossibleTypes.length !== 0,\n\t\t0x4d4 /* data incompatible with all types allowed by the schema */,\n\t);\n\tassert(\n\t\tpossibleTypes.length === 1,\n\t\t0x4d5 /* data compatible with more than one type allowed by the schema */,\n\t);\n\n\tconst schema = possibleTypes[0];\n\n\tif (schema instanceof LeafNodeSchema) {\n\t\tconst value = isTreeValue(data)\n\t\t\t? data\n\t\t\t: (data as ContextuallyTypedNodeDataObject)[valueSymbol];\n\n\t\tassert(\n\t\t\tallowsValue(schema.leafValue, value),\n\t\t\t0x4d3 /* unsupported schema for provided primitive */,\n\t\t);\n\t\treturn { value, type: schema.name, fields: new Map() };\n\t}\n\tassert(!isTreeValue(data), 0x880 /* leaf value for non leaf */);\n\tif (schema instanceof FlexFieldNodeSchema) {\n\t\tif (isArrayLike(data)) {\n\t\t\tconst children = applyFieldTypesFromContext(context, schema.getFieldSchema(), data);\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\ttype: schema.name,\n\t\t\t\tfields: new Map(children.length > 0 ? [[EmptyKey, children]] : []),\n\t\t\t};\n\t\t}\n\t}\n\tassert(!isArrayLike(data), 0x881 /* array for non field node */);\n\tif (\n\t\tschema instanceof FlexMapNodeSchema ||\n\t\tschema instanceof FlexObjectNodeSchema ||\n\t\tschema instanceof FlexFieldNodeSchema\n\t) {\n\t\tconst fields: Map<FieldKey, MapTree[]> = new Map();\n\t\tfor (const key of fieldKeysFromData(data)) {\n\t\t\tassert(!fields.has(key), 0x6b3 /* Keys should not be duplicated */);\n\t\t\tconst childSchema = schema.getFieldSchema(key);\n\t\t\tconst children = applyFieldTypesFromContext(context, childSchema, data[key]);\n\n\t\t\tif (children.length > 0) {\n\t\t\t\tfields.set(key, children);\n\t\t\t}\n\t\t}\n\n\t\tif (schema instanceof FlexObjectNodeSchema) {\n\t\t\tfor (const key of schema.objectNodeFields.keys()) {\n\t\t\t\tif (data[key] === undefined) {\n\t\t\t\t\tsetFieldForKey(key, context, schema, fields);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst value = data[valueSymbol];\n\t\tassert(value === undefined, 0x4d7 /* provided value not permitted by the schema */);\n\t\treturn { value, type: schema.name, fields };\n\t} else {\n\t\tfail(\"unexpected node kind\");\n\t}\n}\n\nfunction setFieldForKey(\n\tkey: FieldKey,\n\tcontext: TreeDataContext,\n\tschema: FlexTreeNodeSchema,\n\tfields: Map<FieldKey, MapTree[]>,\n): void {\n\tconst requiredFieldSchema = schema.getFieldSchema(key);\n\tconst multiplicity = getFieldKind(requiredFieldSchema).multiplicity;\n\tif (multiplicity === Multiplicity.Single && context.fieldSource !== undefined) {\n\t\tconst fieldGenerator = context.fieldSource(key, requiredFieldSchema.stored);\n\t\tif (fieldGenerator !== undefined) {\n\t\t\tconst children = fieldGenerator();\n\t\t\tfields.set(key, children);\n\t\t}\n\t}\n}\n\nfunction fieldKeysFromData(data: ContextuallyTypedNodeDataObject): FieldKey[] {\n\tconst keys: (string | symbol)[] = Reflect.ownKeys(data).filter(\n\t\t(key) => typeof key === \"string\",\n\t);\n\treturn keys as FieldKey[];\n}\n\n/**\n * Construct a MapTree from ContextuallyTypedNodeData.\n *\n * TODO: this should probably be refactored into a `try` function which either returns a MapTree or a SchemaError with a path to the error.\n * TODO: test suite.\n *\n * @remarks\n * This version is only exported as a more testable entry point than `cursorsFromContextualData` which keeps the use of `MapTree` as an implementation detail.\n * This should not be reexported from the parent module.\n */\nexport function applyFieldTypesFromContext(\n\tcontext: TreeDataContext,\n\tfield: FlexFieldSchema,\n\tdata: ContextuallyTypedFieldData,\n): MapTree[] {\n\tconst multiplicity = getFieldKind(field).multiplicity;\n\tif (data === undefined) {\n\t\tassert(\n\t\t\tmultiplicity === Multiplicity.Forbidden || multiplicity === Multiplicity.Optional,\n\t\t\t0x4d8 /* `undefined` provided for a field that does not support `undefined` */,\n\t\t);\n\t\treturn [];\n\t}\n\tif (multiplicity === Multiplicity.Sequence) {\n\t\tassert(isArrayLike(data), 0x4d9 /* expected array for a sequence field */);\n\t\tconst children = Array.from(data, (child) =>\n\t\t\tapplyTypesFromContext(context, field.allowedTypeSet, child),\n\t\t);\n\t\treturn children;\n\t}\n\tassert(\n\t\tmultiplicity === Multiplicity.Single || multiplicity === Multiplicity.Optional,\n\t\t0x4da /* single value provided for an unsupported field */,\n\t);\n\treturn [applyTypesFromContext(context, field.allowedTypeSet, data)];\n}\n\n/**\n * Content to use for a field.\n *\n * When used, this content will be deeply copied into the tree, and must comply with the schema.\n *\n * The content must follow the {@link Multiplicity} of the {@link FlexFieldKind}:\n * - use a single cursor for an `optional` or `value` field;\n * - use array of cursors for a `sequence` field;\n *\n * TODO: this should allow a field cursor instead of an array of cursors.\n * TODO: Make this generic so a variant of this type that allows placeholders for detached sequences to consume.\n * @internal\n */\nexport type NewFieldContent =\n\t| ITreeCursorSynchronous\n\t| readonly ITreeCursorSynchronous[]\n\t| ContextuallyTypedFieldData;\n\n/**\n * Convert NewFieldContent into ITreeCursorSynchronous.\n * The returned cursor will be in Field mode.\n */\nexport function normalizeNewFieldContent(\n\tcontext: TreeDataContext,\n\tschema: FlexFieldSchema,\n\tcontent: NewFieldContent,\n): ITreeCursorSynchronous {\n\tif (areCursors(content)) {\n\t\tif (isReadonlyArray(content)) {\n\t\t\tassert(\n\t\t\t\tgetFieldKind(schema).multiplicity === Multiplicity.Sequence || content.length === 1,\n\t\t\t\t0x6b8 /* non-sequence fields can not be provided content that is multiple cursors */,\n\t\t\t);\n\t\t\t// TODO: is there a better way to get a field cursor from an array of node cursors?\n\t\t\tconst mapTrees = content.map((c) => mapTreeFromCursor(c));\n\t\t\treturn cursorForMapTreeField(mapTrees);\n\t\t}\n\t\tif (content.mode === CursorLocationType.Fields) {\n\t\t\treturn content;\n\t\t}\n\t\t// TODO: is there a better way to get a field cursor from a node cursor?\n\t\treturn cursorForMapTreeField([mapTreeFromCursor(content)]);\n\t}\n\n\treturn cursorsFromContextualData(context, schema, content);\n}\n"]}
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ICodecFamily
|
|
6
|
-
import {
|
|
5
|
+
import { ICodecFamily } from "../../codec/index.js";
|
|
6
|
+
import { ChangeEncodingContext, ChangeFamily, ChangeFamilyEditor, ChangeRebaser, DeltaDetachedNodeId, DeltaRoot, FieldUpPath, ITreeCursorSynchronous, TaggedChange, UpPath } from "../../core/index.js";
|
|
7
7
|
import { ModularChangeset } from "../modular-schema/index.js";
|
|
8
|
-
import { FieldBatchCodec } from "../chunked-forest/index.js";
|
|
9
|
-
import { TreeCompressionStrategy } from "../treeCompressionUtils.js";
|
|
10
8
|
export type DefaultChangeset = ModularChangeset;
|
|
11
9
|
/**
|
|
12
10
|
* Implementation of {@link ChangeFamily} based on the default set of supported field kinds.
|
|
@@ -15,7 +13,7 @@ export type DefaultChangeset = ModularChangeset;
|
|
|
15
13
|
*/
|
|
16
14
|
export declare class DefaultChangeFamily implements ChangeFamily<DefaultEditBuilder, DefaultChangeset> {
|
|
17
15
|
private readonly modularFamily;
|
|
18
|
-
constructor(
|
|
16
|
+
constructor(codecs: ICodecFamily<ModularChangeset, ChangeEncodingContext>);
|
|
19
17
|
get rebaser(): ChangeRebaser<DefaultChangeset>;
|
|
20
18
|
get codecs(): ICodecFamily<DefaultChangeset, ChangeEncodingContext>;
|
|
21
19
|
buildEditor(changeReceiver: (change: DefaultChangeset) => void): DefaultEditBuilder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultEditBuilder.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultEditBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"defaultEditBuilder.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultEditBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACN,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EAClB,aAAa,EAGb,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,sBAAsB,EACtB,YAAY,EACZ,MAAM,EAGN,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAKN,gBAAgB,EAIhB,MAAM,4BAA4B,CAAC;AAKpC,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEhD;;;;GAIG;AACH,qBA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ved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { assert } from "@fluidframework/core-utils";
|
|
5
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
6
6
|
import { compareFieldUpPaths, topDownPath, } from "../../core/index.js";
|
|
7
7
|
import { brand } from "../../util/index.js";
|
|
8
8
|
import { ModularChangeFamily, ModularEditBuilder, intoDelta as intoModularDelta, relevantRemovedRoots as relevantModularRemovedRoots, } from "../modular-schema/index.js";
|
|
@@ -13,8 +13,8 @@ import { fieldKinds, optional, sequence, required as valueFieldKind } from "./de
|
|
|
13
13
|
* @sealed
|
|
14
14
|
*/
|
|
15
15
|
export class DefaultChangeFamily {
|
|
16
|
-
constructor(
|
|
17
|
-
this.modularFamily = new ModularChangeFamily(fieldKinds,
|
|
16
|
+
constructor(codecs) {
|
|
17
|
+
this.modularFamily = new ModularChangeFamily(fieldKinds, codecs);
|
|
18
18
|
}
|
|
19
19
|
get rebaser() {
|
|
20
20
|
return this.modularFamily.rebaser;
|
|
@@ -112,7 +112,7 @@ export class DefaultEditBuilder {
|
|
|
112
112
|
change,
|
|
113
113
|
};
|
|
114
114
|
edits.push(edit);
|
|
115
|
-
this.modularBuilder.submitChanges(edits
|
|
115
|
+
this.modularBuilder.submitChanges(edits);
|
|
116
116
|
},
|
|
117
117
|
};
|
|
118
118
|
}
|
|
@@ -175,7 +175,7 @@ export class DefaultEditBuilder {
|
|
|
175
175
|
fieldKind: sequence.identifier,
|
|
176
176
|
change: brand(moveIn),
|
|
177
177
|
},
|
|
178
|
-
]
|
|
178
|
+
]);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
sequenceField(field) {
|
|
@@ -196,7 +196,7 @@ export class DefaultEditBuilder {
|
|
|
196
196
|
};
|
|
197
197
|
// The changes have to be submitted together, otherwise they will be assigned different revisions,
|
|
198
198
|
// which will prevent the build ID and the insert ID from matching.
|
|
199
|
-
this.modularBuilder.submitChanges([build, attach]
|
|
199
|
+
this.modularBuilder.submitChanges([build, attach]);
|
|
200
200
|
},
|
|
201
201
|
remove: (index, count) => {
|
|
202
202
|
if (count === 0) {
|