@fluidframework/tree 2.81.0-374083 → 2.81.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/api-report/tree.alpha.api.md +0 -1
- package/dist/codec/codec.d.ts +2 -2
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +8 -8
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +1 -1
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js +12 -12
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/core/change-family/changeFamily.d.ts +1 -4
- package/dist/core/change-family/changeFamily.d.ts.map +1 -1
- package/dist/core/change-family/changeFamily.js.map +1 -1
- package/dist/core/change-family/index.d.ts +1 -1
- package/dist/core/change-family/index.d.ts.map +1 -1
- package/dist/core/change-family/index.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 +4 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/rebase/changeRebaser.d.ts +1 -6
- package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
- package/dist/core/rebase/changeRebaser.js.map +1 -1
- package/dist/core/rebase/index.d.ts +1 -1
- package/dist/core/rebase/index.d.ts.map +1 -1
- package/dist/core/rebase/index.js +1 -2
- package/dist/core/rebase/index.js.map +1 -1
- package/dist/core/rebase/types.d.ts +1 -2
- package/dist/core/rebase/types.d.ts.map +1 -1
- package/dist/core/rebase/types.js +1 -5
- 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 +7 -25
- package/dist/core/rebase/utils.js.map +1 -1
- package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
- package/dist/core/schema-stored/formatV2.js +4 -4
- package/dist/core/schema-stored/formatV2.js.map +1 -1
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js +1 -1
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +0 -6
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +0 -9
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -3
- package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexCodecV2.js +2 -2
- package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV1.js +3 -3
- package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexFormatV2.js +4 -4
- package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/dist/core/tree/index.d.ts +1 -1
- package/dist/core/tree/index.d.ts.map +1 -1
- package/dist/core/tree/index.js +3 -4
- package/dist/core/tree/index.js.map +1 -1
- package/dist/core/tree/pathTree.d.ts +3 -11
- package/dist/core/tree/pathTree.d.ts.map +1 -1
- package/dist/core/tree/pathTree.js +2 -14
- package/dist/core/tree/pathTree.js.map +1 -1
- package/dist/core/tree/visitDelta.d.ts +1 -1
- package/dist/core/tree/visitDelta.d.ts.map +1 -1
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/core/tree/visitorUtils.d.ts.map +1 -1
- package/dist/core/tree/visitorUtils.js +1 -1
- package/dist/core/tree/visitorUtils.js.map +1 -1
- package/dist/feature-libraries/changeAtomIdBTree.d.ts +3 -4
- package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
- package/dist/feature-libraries/changeAtomIdBTree.js +2 -16
- package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +0 -7
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -4
- package/dist/feature-libraries/chunked-forest/chunkTree.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.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
- 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 +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js +1 -1
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
- package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +78 -245
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +25 -75
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +2 -3
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -5
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
- package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
- package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/dist/feature-libraries/deltaUtils.d.ts +0 -1
- package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
- package/dist/feature-libraries/deltaUtils.js +1 -6
- package/dist/feature-libraries/deltaUtils.js.map +1 -1
- package/dist/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
- package/dist/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
- package/dist/feature-libraries/fieldKindIdentifiers.js +16 -0
- package/dist/feature-libraries/fieldKindIdentifiers.js.map +1 -0
- package/dist/feature-libraries/flex-tree/context.d.ts +0 -9
- package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/context.js +0 -6
- package/dist/feature-libraries/flex-tree/context.js.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
- package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.d.ts +7 -8
- package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/lazyField.js +17 -48
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/observer.d.ts +1 -1
- package/dist/feature-libraries/flex-tree/observer.d.ts.map +1 -1
- package/dist/feature-libraries/flex-tree/observer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +1 -1
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +3 -3
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV1.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatV2.js.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +3 -3
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +3 -8
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.js +0 -1
- package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
- package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +21 -97
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js +7 -4
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
- 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/fieldKindConfiguration.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +11 -5
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +4 -4
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +2 -2
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +162 -254
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +460 -1325
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js +3 -3
- package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/dist/feature-libraries/object-forest/objectForest.js +2 -2
- package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/dist/feature-libraries/optional-field/index.d.ts +2 -2
- package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/index.js +4 -7
- package/dist/feature-libraries/optional-field/index.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.d.ts +34 -5
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +455 -221
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
- 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/optionalFieldCodecV2.d.ts +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +28 -57
- package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/dist/feature-libraries/optional-field/requiredField.d.ts +36 -0
- package/dist/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/requiredField.js +27 -0
- package/dist/feature-libraries/optional-field/requiredField.js.map +1 -0
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +7 -7
- 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/schemaChecker.d.ts.map +1 -1
- package/dist/feature-libraries/schemaChecker.js +1 -1
- package/dist/feature-libraries/schemaChecker.js.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.d.ts +7 -6
- package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/compose.js +259 -83
- package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
- package/dist/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
- 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 +2 -13
- package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/index.js +3 -28
- package/dist/feature-libraries/sequence-field/index.js.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/invert.js +167 -65
- package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
- package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/moveEffectTable.js +90 -7
- package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
- package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/rebase.js +114 -107
- package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +50 -0
- package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
- package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/replaceRevisions.js +31 -18
- package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -0
- package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +187 -365
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +62 -20
- package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
- package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
- package/dist/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
- package/dist/feature-libraries/sequence-field/sequenceKind.js +24 -0
- package/dist/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
- package/dist/feature-libraries/sequence-field/types.d.ts +59 -30
- 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 +24 -15
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +305 -116
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +7 -7
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +1 -1
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts +4 -4
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +1 -2
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +5 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +39 -40
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +5 -11
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +5 -43
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +0 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js +75 -58
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +4 -10
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +7 -14
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/dist/shared-tree/tree.d.ts.map +1 -1
- package/dist/shared-tree/tree.js +14 -14
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +1 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +77 -77
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +29 -13
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +80 -79
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree-core/branch.d.ts +3 -4
- package/dist/shared-tree-core/branch.d.ts.map +1 -1
- package/dist/shared-tree-core/branch.js +3 -4
- package/dist/shared-tree-core/branch.js.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.d.ts +18 -31
- package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.js +24 -76
- package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/dist/shared-tree-core/branchIdCodec.d.ts.map +1 -1
- package/dist/shared-tree-core/branchIdCodec.js.map +1 -1
- package/dist/shared-tree-core/changeEnricher.d.ts +8 -43
- package/dist/shared-tree-core/changeEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/changeEnricher.js +0 -13
- package/dist/shared-tree-core/changeEnricher.js.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
- package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/dist/shared-tree-core/defaultResubmitMachine.js +26 -36
- package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/dist/shared-tree-core/editManager.d.ts +3 -3
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +11 -11
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +1 -5
- package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.js +2 -10
- package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsCommons.js +1 -2
- package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
- package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
- package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
- package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatCommons.js +0 -6
- package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
- package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js +0 -1
- package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
- package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/index.d.ts +4 -4
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +1 -5
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecVSharedBranches.js +2 -2
- package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +2 -6
- package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecs.js +2 -10
- package/dist/shared-tree-core/messageCodecs.js.map +1 -1
- package/dist/shared-tree-core/messageFormat.d.ts +0 -1
- package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormat.js +0 -6
- package/dist/shared-tree-core/messageFormat.js.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
- package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js +0 -1
- package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/dist/shared-tree-core/messageFormatVSharedBranches.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/sharedTreeCore.d.ts +8 -5
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +14 -14
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
- package/dist/shared-tree-core/versionedSummarizer.js +1 -1
- package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +2 -2
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js +14 -14
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/create.d.ts +1 -1
- package/dist/simple-tree/api/create.d.ts.map +1 -1
- package/dist/simple-tree/api/create.js +7 -7
- package/dist/simple-tree/api/create.js.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.d.ts +1 -1
- package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
- package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/dist/simple-tree/api/discrepancies.js +23 -23
- package/dist/simple-tree/api/discrepancies.js.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/getJsonSchema.js +1 -1
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/identifierIndex.d.ts +2 -2
- package/dist/simple-tree/api/identifierIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/identifierIndex.js.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/incrementalAllowedTypes.js +6 -6
- package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js +1 -1
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js +7 -7
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +2 -2
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +7 -7
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.js +1 -0
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaStatics.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaCodec.js +17 -17
- package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.d.ts +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.js +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +14 -14
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +2 -2
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/treeBeta.d.ts +1 -1
- package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/treeBeta.js +2 -2
- package/dist/simple-tree/api/treeBeta.js.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js +4 -4
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/api/verboseTree.d.ts +1 -1
- package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/dist/simple-tree/api/verboseTree.js +22 -22
- package/dist/simple-tree/api/verboseTree.js.map +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts +1 -1
- package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/dist/simple-tree/core/allowedTypes.js +7 -7
- package/dist/simple-tree/core/allowedTypes.js.map +1 -1
- package/dist/simple-tree/core/context.d.ts.map +1 -1
- package/dist/simple-tree/core/context.js.map +1 -1
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNode.js +1 -1
- package/dist/simple-tree/core/treeNode.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +1 -3
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +5 -5
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.d.ts +3 -3
- package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeValid.js +2 -2
- package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +8 -59
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/core/withType.d.ts.map +1 -1
- package/dist/simple-tree/core/withType.js.map +1 -1
- package/dist/simple-tree/createContext.d.ts.map +1 -1
- package/dist/simple-tree/createContext.js.map +1 -1
- package/dist/simple-tree/fieldSchema.d.ts +5 -5
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +2 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +1 -1
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
- package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/leafNodeSchema.js +15 -15
- package/dist/simple-tree/leafNodeSchema.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +47 -49
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/common.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/common.js +1 -1
- package/dist/simple-tree/node-kinds/common.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts +2 -2
- package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +26 -26
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +28 -28
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.d.ts +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +36 -38
- package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/dist/simple-tree/prepareForInsertion.d.ts +47 -54
- package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/dist/simple-tree/prepareForInsertion.js +128 -186
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
- package/dist/simple-tree/simpleSchema.js.map +1 -1
- package/dist/simple-tree/treeSchema.d.ts.map +1 -1
- package/dist/simple-tree/treeSchema.js.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +22 -40
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +22 -21
- package/dist/tableSchema.js.map +1 -1
- package/dist/text/index.d.ts +1 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.js +3 -1
- package/dist/text/index.js.map +1 -1
- package/dist/text/textDomain.d.ts +8 -0
- package/dist/text/textDomain.d.ts.map +1 -1
- package/dist/text/textDomain.js +2 -1
- package/dist/text/textDomain.js.map +1 -1
- package/dist/text/textDomainFormatted.d.ts +572 -0
- package/dist/text/textDomainFormatted.d.ts.map +1 -0
- package/dist/text/textDomainFormatted.js +183 -0
- package/dist/text/textDomainFormatted.js.map +1 -0
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +11 -21
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/bTreeUtils.d.ts.map +1 -1
- package/dist/util/bTreeUtils.js +1 -1
- package/dist/util/bTreeUtils.js.map +1 -1
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +1 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/rangeMap.d.ts +12 -24
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +6 -46
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/readSnapshotBlob.d.ts +1 -1
- package/dist/util/readSnapshotBlob.d.ts.map +1 -1
- package/dist/util/readSnapshotBlob.js.map +1 -1
- package/docs/main/sequence-field/move-composition.md +46 -0
- package/eslint.config.mts +4 -4
- package/lib/codec/codec.d.ts +2 -2
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +1 -1
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts +1 -1
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js +2 -2
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/core/change-family/changeFamily.d.ts +1 -4
- package/lib/core/change-family/changeFamily.d.ts.map +1 -1
- package/lib/core/change-family/changeFamily.js.map +1 -1
- package/lib/core/change-family/index.d.ts +1 -1
- package/lib/core/change-family/index.d.ts.map +1 -1
- package/lib/core/change-family/index.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 +2 -2
- package/lib/core/index.js.map +1 -1
- package/lib/core/rebase/changeRebaser.d.ts +1 -6
- package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
- package/lib/core/rebase/changeRebaser.js.map +1 -1
- package/lib/core/rebase/index.d.ts +1 -1
- package/lib/core/rebase/index.d.ts.map +1 -1
- package/lib/core/rebase/index.js +1 -1
- package/lib/core/rebase/index.js.map +1 -1
- package/lib/core/rebase/types.d.ts +1 -2
- package/lib/core/rebase/types.d.ts.map +1 -1
- package/lib/core/rebase/types.js +0 -3
- 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 +7 -25
- package/lib/core/rebase/utils.js.map +1 -1
- package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
- package/lib/core/schema-stored/formatV2.js +1 -1
- package/lib/core/schema-stored/formatV2.js.map +1 -1
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js +1 -1
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +0 -6
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +1 -10
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.js +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexCodecV2.js +2 -2
- package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV1.js +2 -2
- package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexFormatV2.js +2 -2
- package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
- package/lib/core/tree/index.d.ts +1 -1
- package/lib/core/tree/index.d.ts.map +1 -1
- package/lib/core/tree/index.js +1 -1
- package/lib/core/tree/index.js.map +1 -1
- package/lib/core/tree/pathTree.d.ts +3 -11
- package/lib/core/tree/pathTree.d.ts.map +1 -1
- package/lib/core/tree/pathTree.js +1 -12
- package/lib/core/tree/pathTree.js.map +1 -1
- package/lib/core/tree/visitDelta.d.ts +1 -1
- package/lib/core/tree/visitDelta.d.ts.map +1 -1
- package/lib/core/tree/visitDelta.js.map +1 -1
- 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/feature-libraries/changeAtomIdBTree.d.ts +3 -4
- package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
- package/lib/feature-libraries/changeAtomIdBTree.js +1 -14
- package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -8
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -4
- package/lib/feature-libraries/chunked-forest/chunkTree.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.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +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 +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js +1 -1
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +73 -237
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +6 -56
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +2 -3
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -2
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
- package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
- package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
- package/lib/feature-libraries/deltaUtils.d.ts +0 -1
- package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
- package/lib/feature-libraries/deltaUtils.js +1 -5
- package/lib/feature-libraries/deltaUtils.js.map +1 -1
- package/lib/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
- package/lib/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
- package/lib/feature-libraries/fieldKindIdentifiers.js +13 -0
- package/lib/feature-libraries/fieldKindIdentifiers.js.map +1 -0
- package/lib/feature-libraries/flex-tree/context.d.ts +0 -9
- package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/context.js +0 -6
- package/lib/feature-libraries/flex-tree/context.js.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
- package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.d.ts +7 -8
- package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/lazyField.js +11 -42
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/observer.d.ts +1 -1
- package/lib/feature-libraries/flex-tree/observer.d.ts.map +1 -1
- package/lib/feature-libraries/flex-tree/observer.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.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/formatV1.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV1.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatV2.js.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +3 -3
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +2 -2
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.js +1 -2
- package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
- package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
- package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +21 -97
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js +5 -3
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
- 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/fieldKindConfiguration.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +11 -5
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +4 -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/modularChangeCodecV1.d.ts +28 -11
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +144 -246
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +463 -1319
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
- package/lib/feature-libraries/object-forest/objectForest.js +2 -2
- package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
- package/lib/feature-libraries/optional-field/index.d.ts +2 -2
- package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/index.js +2 -2
- package/lib/feature-libraries/optional-field/index.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.d.ts +34 -5
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +453 -221
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
- 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/optionalFieldCodecV2.d.ts +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +26 -55
- package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/lib/feature-libraries/optional-field/requiredField.d.ts +36 -0
- package/lib/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/requiredField.js +24 -0
- package/lib/feature-libraries/optional-field/requiredField.js.map +1 -0
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +1 -1
- 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/schemaChecker.d.ts.map +1 -1
- package/lib/feature-libraries/schemaChecker.js +1 -1
- package/lib/feature-libraries/schemaChecker.js.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.d.ts +7 -6
- package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/compose.js +261 -85
- package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
- package/lib/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
- 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 +2 -13
- package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/index.js +1 -12
- package/lib/feature-libraries/sequence-field/index.js.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/invert.js +169 -67
- package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
- package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/moveEffectTable.js +84 -6
- package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
- package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/rebase.js +116 -109
- package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +46 -0
- package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
- package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/replaceRevisions.js +31 -18
- package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -0
- package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +182 -356
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +63 -21
- package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
- package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
- package/lib/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
- package/lib/feature-libraries/sequence-field/sequenceKind.js +21 -0
- package/lib/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
- package/lib/feature-libraries/sequence-field/types.d.ts +59 -30
- 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 +24 -15
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +298 -112
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +3 -3
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +1 -1
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts +4 -4
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +2 -3
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +5 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +42 -43
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +5 -11
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +5 -43
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +0 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +74 -56
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +5 -11
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +6 -12
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/shared-tree/tree.d.ts.map +1 -1
- package/lib/shared-tree/tree.js +7 -7
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +1 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +3 -3
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +29 -13
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +55 -54
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree-core/branch.d.ts +3 -4
- package/lib/shared-tree-core/branch.d.ts.map +1 -1
- package/lib/shared-tree-core/branch.js +3 -4
- package/lib/shared-tree-core/branch.js.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.d.ts +18 -31
- package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.js +24 -76
- package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/lib/shared-tree-core/branchIdCodec.d.ts.map +1 -1
- package/lib/shared-tree-core/branchIdCodec.js.map +1 -1
- package/lib/shared-tree-core/changeEnricher.d.ts +8 -43
- package/lib/shared-tree-core/changeEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/changeEnricher.js +1 -11
- package/lib/shared-tree-core/changeEnricher.js.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
- package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
- package/lib/shared-tree-core/defaultResubmitMachine.js +28 -38
- package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
- package/lib/shared-tree-core/editManager.d.ts +3 -3
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +11 -11
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +1 -5
- package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.js +1 -8
- package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsCommons.js +1 -2
- package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
- package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
- package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
- package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatCommons.js +0 -6
- package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
- package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js +0 -1
- package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
- package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/index.d.ts +4 -4
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +2 -3
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecVSharedBranches.js +2 -2
- package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +2 -6
- package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecs.js +1 -8
- package/lib/shared-tree-core/messageCodecs.js.map +1 -1
- package/lib/shared-tree-core/messageFormat.d.ts +0 -1
- package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormat.js +0 -6
- package/lib/shared-tree-core/messageFormat.js.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
- package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js +0 -1
- package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
- package/lib/shared-tree-core/messageFormatVSharedBranches.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/sharedTreeCore.d.ts +8 -5
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +15 -15
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
- package/lib/shared-tree-core/versionedSummarizer.js +1 -1
- package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +2 -2
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js +4 -4
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/create.d.ts +1 -1
- package/lib/simple-tree/api/create.d.ts.map +1 -1
- package/lib/simple-tree/api/create.js +1 -1
- package/lib/simple-tree/api/create.js.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.d.ts +1 -1
- package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
- package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
- package/lib/simple-tree/api/discrepancies.js +3 -3
- package/lib/simple-tree/api/discrepancies.js.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/getJsonSchema.js +1 -1
- package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/identifierIndex.d.ts +2 -2
- package/lib/simple-tree/api/identifierIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/identifierIndex.js.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/incrementalAllowedTypes.js +3 -3
- package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js +1 -1
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +2 -2
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +2 -2
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js +1 -0
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaStatics.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaCodec.js +3 -3
- package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.d.ts +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.js +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +5 -5
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +2 -2
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/treeBeta.d.ts +1 -1
- package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/treeBeta.js +2 -2
- package/lib/simple-tree/api/treeBeta.js.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js +4 -4
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/api/verboseTree.d.ts +1 -1
- package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
- package/lib/simple-tree/api/verboseTree.js +3 -3
- package/lib/simple-tree/api/verboseTree.js.map +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts +1 -1
- package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
- package/lib/simple-tree/core/allowedTypes.js +2 -2
- package/lib/simple-tree/core/allowedTypes.js.map +1 -1
- package/lib/simple-tree/core/context.d.ts.map +1 -1
- package/lib/simple-tree/core/context.js.map +1 -1
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNode.js +1 -1
- package/lib/simple-tree/core/treeNode.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +1 -3
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +5 -5
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.d.ts +3 -3
- package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeValid.js +2 -2
- package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +8 -58
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/core/withType.d.ts.map +1 -1
- package/lib/simple-tree/core/withType.js.map +1 -1
- package/lib/simple-tree/createContext.d.ts.map +1 -1
- package/lib/simple-tree/createContext.js.map +1 -1
- package/lib/simple-tree/fieldSchema.d.ts +5 -5
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +2 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts +1 -1
- package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/leafNodeSchema.js +2 -2
- package/lib/simple-tree/leafNodeSchema.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +6 -8
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/common.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/common.js +2 -2
- package/lib/simple-tree/node-kinds/common.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts +2 -2
- package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +8 -8
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +22 -22
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.d.ts +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +6 -8
- package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
- package/lib/simple-tree/prepareForInsertion.d.ts +47 -54
- package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
- package/lib/simple-tree/prepareForInsertion.js +125 -184
- package/lib/simple-tree/prepareForInsertion.js.map +1 -1
- package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
- package/lib/simple-tree/simpleSchema.js.map +1 -1
- package/lib/simple-tree/treeSchema.d.ts.map +1 -1
- package/lib/simple-tree/treeSchema.js.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +13 -30
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +2 -1
- package/lib/tableSchema.js.map +1 -1
- package/lib/text/index.d.ts +1 -0
- package/lib/text/index.d.ts.map +1 -1
- package/lib/text/index.js +1 -0
- package/lib/text/index.js.map +1 -1
- package/lib/text/textDomain.d.ts +8 -0
- package/lib/text/textDomain.d.ts.map +1 -1
- package/lib/text/textDomain.js +1 -1
- package/lib/text/textDomain.js.map +1 -1
- package/lib/text/textDomainFormatted.d.ts +572 -0
- package/lib/text/textDomainFormatted.d.ts.map +1 -0
- package/lib/text/textDomainFormatted.js +180 -0
- package/lib/text/textDomainFormatted.js.map +1 -0
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +4 -14
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/bTreeUtils.d.ts.map +1 -1
- package/lib/util/bTreeUtils.js +1 -1
- package/lib/util/bTreeUtils.js.map +1 -1
- package/lib/util/index.d.ts +1 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +1 -1
- package/lib/util/index.js.map +1 -1
- package/lib/util/rangeMap.d.ts +12 -24
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +5 -44
- package/lib/util/rangeMap.js.map +1 -1
- package/lib/util/readSnapshotBlob.d.ts +1 -1
- package/lib/util/readSnapshotBlob.d.ts.map +1 -1
- package/lib/util/readSnapshotBlob.js.map +1 -1
- package/package.json +22 -22
- package/src/codec/codec.ts +10 -7
- package/src/codec/versioned/codec.ts +3 -3
- package/src/core/change-family/changeFamily.ts +0 -5
- package/src/core/change-family/index.ts +0 -1
- package/src/core/index.ts +1 -4
- package/src/core/rebase/changeRebaser.ts +1 -6
- package/src/core/rebase/index.ts +0 -1
- package/src/core/rebase/types.ts +1 -8
- package/src/core/rebase/utils.ts +7 -31
- package/src/core/schema-stored/formatV2.ts +2 -1
- package/src/core/tree/anchorSet.ts +1 -1
- package/src/core/tree/detachedFieldIndex.ts +2 -18
- package/src/core/tree/detachedFieldIndexCodecCommon.ts +2 -1
- package/src/core/tree/detachedFieldIndexCodecV1.ts +2 -2
- package/src/core/tree/detachedFieldIndexCodecV2.ts +3 -3
- package/src/core/tree/detachedFieldIndexFormatV1.ts +3 -2
- package/src/core/tree/detachedFieldIndexFormatV2.ts +3 -2
- package/src/core/tree/index.ts +1 -2
- package/src/core/tree/pathTree.ts +4 -16
- package/src/core/tree/visitDelta.ts +2 -3
- package/src/core/tree/visitorUtils.ts +2 -1
- package/src/feature-libraries/changeAtomIdBTree.ts +4 -28
- package/src/feature-libraries/chunked-forest/basicChunk.ts +1 -7
- package/src/feature-libraries/chunked-forest/chunkTree.ts +2 -7
- package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +2 -2
- package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/format.ts +1 -1
- package/src/feature-libraries/chunked-forest/codec/formatGeneric.ts +1 -0
- package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +3 -3
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +128 -405
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +27 -123
- package/src/feature-libraries/default-schema/index.ts +5 -22
- package/src/feature-libraries/default-schema/mappedEditBuilder.ts +9 -35
- package/src/feature-libraries/deltaUtils.ts +1 -6
- package/src/feature-libraries/fieldKindIdentifiers.ts +16 -0
- package/src/feature-libraries/flex-tree/context.ts +0 -17
- package/src/feature-libraries/flex-tree/flexTreeTypes.ts +8 -7
- package/src/feature-libraries/flex-tree/lazyField.ts +26 -69
- package/src/feature-libraries/flex-tree/observer.ts +3 -1
- package/src/feature-libraries/forest-summary/codec.ts +1 -1
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +6 -6
- package/src/feature-libraries/forest-summary/formatV1.ts +1 -0
- package/src/feature-libraries/forest-summary/formatV2.ts +1 -0
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +9 -7
- package/src/feature-libraries/forest-summary/summaryTypes.ts +1 -0
- package/src/feature-libraries/index.ts +8 -27
- package/src/feature-libraries/mapTreeCursor.ts +2 -3
- package/src/feature-libraries/mitigatedChangeFamily.ts +1 -3
- package/src/feature-libraries/modular-schema/crossFieldQueries.ts +44 -142
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +58 -32
- package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +1 -0
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +20 -8
- package/src/feature-libraries/modular-schema/index.ts +15 -16
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +336 -543
- package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +2 -2
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +3 -15
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +753 -2582
- package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +0 -1
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +8 -55
- package/src/feature-libraries/object-forest/objectForest.ts +2 -2
- package/src/feature-libraries/optional-field/index.ts +5 -5
- package/src/feature-libraries/optional-field/optionalField.ts +592 -317
- package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +38 -24
- package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +35 -89
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +1 -5
- package/src/feature-libraries/optional-field/requiredField.ts +62 -0
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +1 -1
- package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +1 -0
- package/src/feature-libraries/schemaChecker.ts +3 -2
- package/src/feature-libraries/sequence-field/compose.ts +522 -139
- package/src/feature-libraries/sequence-field/helperTypes.ts +19 -34
- package/src/feature-libraries/sequence-field/index.ts +2 -42
- package/src/feature-libraries/sequence-field/invert.ts +228 -103
- package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
- package/src/feature-libraries/sequence-field/moveEffectTable.ts +195 -8
- package/src/feature-libraries/sequence-field/rebase.ts +205 -169
- package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +57 -0
- package/src/feature-libraries/sequence-field/replaceRevisions.ts +47 -25
- package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +2 -0
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +228 -648
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +70 -56
- package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +27 -25
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +129 -19
- package/src/feature-libraries/sequence-field/sequenceKind.ts +40 -0
- package/src/feature-libraries/sequence-field/types.ts +64 -34
- package/src/feature-libraries/sequence-field/utils.ts +353 -139
- package/src/index.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +4 -3
- package/src/shared-tree/index.ts +2 -3
- package/src/shared-tree/schematizeTree.ts +8 -21
- package/src/shared-tree/schematizingTreeView.ts +79 -61
- package/src/shared-tree/sharedTree.ts +10 -64
- package/src/shared-tree/sharedTreeChangeCodecs.ts +2 -5
- package/src/shared-tree/sharedTreeChangeEnricher.ts +87 -68
- package/src/shared-tree/sharedTreeChangeFamily.ts +5 -15
- package/src/shared-tree/sharedTreeEditBuilder.ts +8 -39
- package/src/shared-tree/tree.ts +10 -10
- package/src/shared-tree/treeAlpha.ts +26 -25
- package/src/shared-tree/treeCheckout.ts +119 -94
- package/src/shared-tree-core/branch.ts +6 -12
- package/src/shared-tree-core/branchCommitEnricher.ts +25 -77
- package/src/shared-tree-core/branchIdCodec.ts +1 -0
- package/src/shared-tree-core/changeEnricher.ts +8 -52
- package/src/shared-tree-core/defaultResubmitMachine.ts +39 -51
- package/src/shared-tree-core/editManager.ts +8 -22
- package/src/shared-tree-core/editManagerCodecs.ts +3 -13
- package/src/shared-tree-core/editManagerCodecsCommons.ts +7 -6
- package/src/shared-tree-core/editManagerCodecsV1toV4.ts +1 -1
- package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +2 -2
- package/src/shared-tree-core/editManagerFormatCommons.ts +1 -6
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -3
- package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +3 -2
- package/src/shared-tree-core/index.ts +2 -7
- package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -5
- package/src/shared-tree-core/messageCodecVSharedBranches.ts +4 -4
- package/src/shared-tree-core/messageCodecs.ts +3 -13
- package/src/shared-tree-core/messageFormat.ts +0 -6
- package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -3
- package/src/shared-tree-core/messageFormatVSharedBranches.ts +1 -0
- package/src/shared-tree-core/messageTypes.ts +1 -0
- package/src/shared-tree-core/sharedTreeCore.ts +27 -31
- package/src/shared-tree-core/versionedSummarizer.ts +3 -1
- package/src/simple-tree/api/configuration.ts +9 -9
- package/src/simple-tree/api/create.ts +7 -6
- package/src/simple-tree/api/dirtyIndex.ts +4 -2
- package/src/simple-tree/api/discrepancies.ts +9 -8
- package/src/simple-tree/api/getJsonSchema.ts +4 -3
- package/src/simple-tree/api/identifierIndex.ts +4 -2
- package/src/simple-tree/api/incrementalAllowedTypes.ts +6 -5
- package/src/simple-tree/api/schemaCompatibilityTester.ts +3 -3
- package/src/simple-tree/api/schemaCreationUtilities.ts +4 -3
- package/src/simple-tree/api/schemaFactory.ts +16 -17
- package/src/simple-tree/api/schemaFactoryAlpha.ts +21 -21
- package/src/simple-tree/api/schemaFactoryBeta.ts +17 -15
- package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -1
- package/src/simple-tree/api/schemaFromSimple.ts +1 -1
- package/src/simple-tree/api/schemaStatics.ts +2 -0
- package/src/simple-tree/api/simpleSchemaCodec.ts +12 -11
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +20 -18
- package/src/simple-tree/api/simpleTreeIndex.ts +6 -4
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +7 -5
- package/src/simple-tree/api/storedSchema.ts +2 -1
- package/src/simple-tree/api/tree.ts +2 -2
- package/src/simple-tree/api/treeBeta.ts +3 -3
- package/src/simple-tree/api/treeNodeApi.ts +14 -13
- package/src/simple-tree/api/typesUnsafe.ts +7 -8
- package/src/simple-tree/api/verboseTree.ts +6 -5
- package/src/simple-tree/core/allowedTypes.ts +4 -4
- package/src/simple-tree/core/context.ts +1 -1
- package/src/simple-tree/core/treeNode.ts +1 -1
- package/src/simple-tree/core/treeNodeKernel.ts +1 -3
- package/src/simple-tree/core/treeNodeSchema.ts +7 -6
- package/src/simple-tree/core/treeNodeValid.ts +9 -9
- package/src/simple-tree/core/unhydratedFlexTree.ts +37 -88
- package/src/simple-tree/core/withType.ts +3 -2
- package/src/simple-tree/createContext.ts +1 -0
- package/src/simple-tree/fieldSchema.ts +5 -8
- package/src/simple-tree/index.ts +1 -2
- package/src/simple-tree/leafNodeSchema.ts +3 -3
- package/src/simple-tree/node-kinds/array/arrayNode.ts +20 -21
- package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +2 -2
- package/src/simple-tree/node-kinds/common.ts +6 -3
- package/src/simple-tree/node-kinds/map/mapNode.ts +20 -19
- package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +2 -2
- package/src/simple-tree/node-kinds/object/objectNode.ts +37 -37
- package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +8 -7
- package/src/simple-tree/node-kinds/record/recordNode.ts +21 -22
- package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +1 -2
- package/src/simple-tree/prepareForInsertion.ts +205 -345
- package/src/simple-tree/simpleSchema.ts +1 -0
- package/src/simple-tree/treeSchema.ts +1 -0
- package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +16 -44
- package/src/tableSchema.ts +3 -1
- package/src/text/index.ts +1 -0
- package/src/text/textDomain.ts +1 -1
- package/src/text/textDomainFormatted.ts +309 -0
- package/src/treeFactory.ts +8 -18
- package/src/util/bTreeUtils.ts +1 -1
- package/src/util/index.ts +0 -3
- package/src/util/rangeMap.ts +18 -72
- package/src/util/readSnapshotBlob.ts +4 -2
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -132
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -393
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -32
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -31
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -57
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
- package/dist/shared-tree-core/transactionEnricher.d.ts +0 -23
- package/dist/shared-tree-core/transactionEnricher.d.ts.map +0 -1
- package/dist/shared-tree-core/transactionEnricher.js +0 -74
- package/dist/shared-tree-core/transactionEnricher.js.map +0 -1
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -128
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -389
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -29
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -27
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -53
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
- package/lib/shared-tree-core/transactionEnricher.d.ts +0 -23
- package/lib/shared-tree-core/transactionEnricher.d.ts.map +0 -1
- package/lib/shared-tree-core/transactionEnricher.js +0 -70
- package/lib/shared-tree-core/transactionEnricher.js.map +0 -1
- package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +0 -188
- package/src/feature-libraries/modular-schema/modularChangeCodecV3.ts +0 -760
- package/src/feature-libraries/modular-schema/modularChangeFormatV3.ts +0 -62
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV3.ts +0 -45
- package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +0 -94
- package/src/shared-tree-core/transactionEnricher.ts +0 -74
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leafNodeSchema.js","sourceRoot":"","sources":["../../src/simple-tree/leafNodeSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAEN,cAAc,EACd,WAAW,EACX,iBAAiB,GACjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACN,QAAQ,EAOR,iBAAiB,EAEjB,kBAAkB,GAElB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,EAAqC,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE;;;;;;;;GAQG;AACH,MAAM,OAAO,cAAc;IAyBnB,MAAM,CAAC,IAAiC;QAC9C,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACvE,OAAO,KAAK,CAAC;QACd,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,oBAAoB,CAAC,IAAkB;QAC7C,OAAO,IAAI,CAAC;IACb,CAAC;IA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AO,CAAC,CAAC,CAAC;YACT,MAAM,IAAI,UAAU,CAAC,oCAAoC,KAAK,GAAG,CAAC,CAAC;QACpE,CAAC;IACF,CAAC;AACF,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\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils/internal\";\n\nimport { type TreeValue, ValueSchema } from \"../core/index.js\";\nimport {\n\ttype FlexTreeNode,\n\tisFlexTreeNode,\n\tisTreeValue,\n\tvalueSchemaAllows,\n} from \"../feature-libraries/index.js\";\n\nimport {\n\tNodeKind,\n\ttype TreeNodeSchema,\n\ttype TreeNodeSchemaNonClass,\n\ttype NodeSchemaMetadata,\n\ttype TreeLeafValue,\n\ttype TreeNodeSchemaCorePrivate,\n\ttype TreeNodeSchemaPrivateData,\n\tprivateDataSymbol,\n\ttype TreeNodeSchemaInitializedData,\n\tCompatibilityLevel,\n\ttype FlexContent,\n} from \"./core/index.js\";\nimport type { SimpleLeafNodeSchema } from \"./simpleSchema.js\";\nimport { brand, type JsonCompatibleReadOnlyObject } from \"../util/index.js\";\nimport { getTreeNodeSchemaInitializedData } from \"./createContext.js\";\nimport type { FactoryContent } from \"./unhydratedFlexTreeFromInsertable.js\";\n\n/**\n * Instances of this class are schema for leaf nodes.\n * @remarks\n * Unlike other schema, leaf schema are class instances instead of classes themselves.\n * This is because the instance type (the tree node type) for leaves are not objects,\n * so those instances can't be instances of a schema based class.\n * @privateRemarks\n * This class refers to the underlying flex tree schema in its constructor, so this class can't be included in the package API.\n */\nexport class LeafNodeSchema<Name extends string, const T extends ValueSchema>\n\timplements\n\t\tTreeNodeSchemaNonClass<Name, NodeKind.Leaf, TreeValue<T>, TreeValue<T>>,\n\t\tSimpleLeafNodeSchema,\n\t\tTreeNodeSchemaCorePrivate\n{\n\tpublic readonly identifier: Name;\n\tpublic readonly kind = NodeKind.Leaf;\n\tpublic readonly info: T;\n\tpublic readonly implicitlyConstructable = true as const;\n\tpublic readonly childTypes: ReadonlySet<TreeNodeSchema> = new Set();\n\tpublic readonly [privateDataSymbol]: TreeNodeSchemaPrivateData = {\n\t\tidempotentInitialize: () =>\n\t\t\t(this.#initializedData ??= getTreeNodeSchemaInitializedData(this, {\n\t\t\t\tshallowCompatibilityTest: (data: FactoryContent): CompatibilityLevel =>\n\t\t\t\t\tshallowCompatibilityTest(this, data),\n\t\t\t\ttoFlexContent: (\n\t\t\t\t\tdata: FactoryContent,\n\t\t\t\t\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n\t\t\t\t): FlexContent => leafToFlexContent(data, this, allowedTypes),\n\t\t\t})),\n\t\tchildAllowedTypes: [],\n\t};\n\t#initializedData: TreeNodeSchemaInitializedData | undefined;\n\n\tpublic create(data: TreeValue<T> | FlexTreeNode): TreeValue<T> {\n\t\tif (isFlexTreeNode(data)) {\n\t\t\tconst value = data.value;\n\t\t\tassert(valueSchemaAllows(this.info, value), 0x916 /* invalid value */);\n\t\t\treturn value;\n\t\t}\n\t\treturn data;\n\t}\n\n\tpublic createFromInsertable(data: TreeValue<T>): TreeValue<T> {\n\t\treturn data;\n\t}\n\n\tpublic readonly leafKind: ValueSchema;\n\n\tpublic readonly metadata: NodeSchemaMetadata = {};\n\tpublic readonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined;\n\n\tpublic constructor(name: Name, t: T) {\n\t\tthis.identifier = name;\n\t\tthis.info = t;\n\t\tthis.leafKind = t;\n\t}\n}\n\n/**\n * Wrapper around LeafNodeSchema's constructor that provides the return type that is desired in the package public API.\n */\nfunction makeLeaf<Name extends string, const T extends ValueSchema>(\n\tname: Name,\n\tt: T,\n): LeafSchema<Name, TreeValue<T>> & SimpleLeafNodeSchema {\n\t// Names in this domain follow https://en.wikipedia.org/wiki/Reverse_domain_name_notation\n\treturn new LeafNodeSchema(`com.fluidframework.leaf.${name}`, t);\n}\n\n/**\n * A {@link TreeNodeSchema} for a {@link TreeLeafValue}.\n * @remarks\n * This is just a more specific alias for a particular {@link TreeNodeSchemaNonClass}.\n * It only exists to make the API (particularly errors, IntelliSense, and generated .d.ts files) more readable.\n *\n * See {@link SchemaFactory} and its various properties for actual leaf schema objects.\n * @privateRemarks\n * This is an interface so its name will show up in things like type errors instead of the fully expanded TreeNodeSchemaNonClass.\n * @system @sealed @public\n */\nexport interface LeafSchema<Name extends string, T extends TreeLeafValue>\n\textends TreeNodeSchemaNonClass<\n\t\t`com.fluidframework.leaf.${Name}`,\n\t\tNodeKind.Leaf,\n\t\t/* TNode */ T,\n\t\t/* TInsertable */ T,\n\t\t/* ImplicitlyConstructable */ true\n\t> {}\n\n// Leaf schema shared between all SchemaFactory instances.\nexport const stringSchema = makeLeaf(\"string\", ValueSchema.String);\nexport const numberSchema = makeLeaf(\"number\", ValueSchema.Number);\nexport const booleanSchema = makeLeaf(\"boolean\", ValueSchema.Boolean);\nexport const nullSchema = makeLeaf(\"null\", ValueSchema.Null);\nexport const handleSchema = makeLeaf(\"handle\", ValueSchema.FluidHandle);\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: TreeNodeSchema,\n\tdata: FactoryContent,\n): CompatibilityLevel {\n\tif (isTreeValue(data)) {\n\t\treturn allowsValue(schema, data) ? CompatibilityLevel.Normal : CompatibilityLevel.None;\n\t}\n\n\treturn CompatibilityLevel.None;\n}\n\nfunction allowsValue(schema: TreeNodeSchema, value: TreeValue): boolean {\n\tif (schema.kind === NodeKind.Leaf) {\n\t\treturn valueSchemaAllows(schema.info as ValueSchema, value);\n\t}\n\treturn false;\n}\n\n/**\n * Transforms data under a Leaf schema.\n * @param data - The tree data to be transformed. Must be a {@link TreeValue}.\n * @param schema - The schema associated with the value.\n * @param allowedTypes - The allowed types specified by the parent.\n * Used to determine which fallback values may be appropriate.\n */\nexport function leafToFlexContent(\n\tdata: FactoryContent,\n\tschema: TreeNodeSchema,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): FlexContent {\n\tassert(schema.kind === NodeKind.Leaf, 0x921 /* Expected a leaf schema. */);\n\tif (!isTreeValue(data)) {\n\t\t// This rule exists to protect against useless `toString` output like `[object Object]`.\n\t\t// In this case, that's actually reasonable behavior, since object input is not compatible with Leaf schemas.\n\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\tthrow new UsageError(`Input data is incompatible with leaf schema: ${data}`);\n\t}\n\n\tconst mappedValue = mapValueWithFallbacks(data, allowedTypes);\n\tconst mappedSchema = [...allowedTypes].find((type) => allowsValue(type, mappedValue));\n\n\tassert(mappedSchema !== undefined, 0x84a /* Unsupported schema for provided primitive. */);\n\n\tconst result: FlexContent = [\n\t\t{\n\t\t\tvalue: mappedValue,\n\t\t\ttype: brand(mappedSchema.identifier),\n\t\t},\n\t\tnew Map(),\n\t];\n\n\treturn result;\n}\n\n/**\n * Checks an incoming {@link TreeLeafValue} to ensure it is compatible with its requirements.\n * For unsupported values with a schema-compatible replacement, return the replacement value.\n * For unsupported values without a schema-compatible replacement, throw.\n * For supported values, return the input.\n */\nfunction mapValueWithFallbacks(\n\tvalue: TreeLeafValue,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): TreeValue {\n\tswitch (typeof value) {\n\t\tcase \"number\": {\n\t\t\tif (Object.is(value, -0)) {\n\t\t\t\t// Our serialized data format does not support -0.\n\t\t\t\t// Map such input to +0.\n\t\t\t\treturn 0;\n\t\t\t} else if (Number.isFinite(value)) {\n\t\t\t\treturn value;\n\t\t\t} else {\n\t\t\t\t// Our serialized data format does not support NaN nor +/-∞.\n\t\t\t\t// If the schema supports `null`, fall back to that. Otherwise, throw.\n\t\t\t\t// This is intended to match JSON's behavior for such values.\n\t\t\t\tif (allowedTypes.has(nullSchema)) {\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new UsageError(`Received unsupported numeric value: ${value}.`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcase \"string\":\n\t\t// TODO:\n\t\t// This should detect invalid strings. Something like @stdlib/regexp-utf16-unpaired-surrogate could be used to do this.\n\t\t// See SchemaFactory.string for details.\n\t\tcase \"boolean\": {\n\t\t\treturn value;\n\t\t}\n\t\tcase \"object\": {\n\t\t\tif (value === null || isFluidHandle(value)) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\t// fallthrough\n\t\tdefault: {\n\t\t\tthrow new UsageError(`Received unsupported leaf value: ${value}.`);\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"leafNodeSchema.js","sourceRoot":"","sources":["../../src/simple-tree/leafNodeSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtE,OAAO,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAEN,cAAc,EACd,WAAW,EACX,iBAAiB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,EAAqC,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EACN,QAAQ,EAOR,iBAAiB,EAEjB,kBAAkB,GAElB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAItE;;;;;;;;GAQG;AACH,MAAM,OAAO,cAAc;IAyBnB,MAAM,CAAC,IAAiC;QAC9C,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,MAAM,CAAC,iBAAiB,CA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AAC;YAChB,OAAO,KAAK,CAAC;QACd,CAAC;QACD,KAAK,QAAQ,CAAC,CAAC,CAAC;YACf,IAAI,KAAK,KAAK,IAAI,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC5C,OAAO,KAAK,CAAC;YACd,CAAC;QACF,CAAC;QACD,cAAc;QACd,OAAO,CAAC,CAAC,CAAC;YACT,MAAM,IAAI,UAAU,CAAC,oCAAoC,KAAK,GAAG,CAAC,CAAC;QACpE,CAAC;IACF,CAAC;AACF,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\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { type TreeValue, ValueSchema } from \"../core/index.js\";\nimport {\n\ttype FlexTreeNode,\n\tisFlexTreeNode,\n\tisTreeValue,\n\tvalueSchemaAllows,\n} from \"../feature-libraries/index.js\";\nimport { brand, type JsonCompatibleReadOnlyObject } from \"../util/index.js\";\n\nimport {\n\tNodeKind,\n\ttype TreeNodeSchema,\n\ttype TreeNodeSchemaNonClass,\n\ttype NodeSchemaMetadata,\n\ttype TreeLeafValue,\n\ttype TreeNodeSchemaCorePrivate,\n\ttype TreeNodeSchemaPrivateData,\n\tprivateDataSymbol,\n\ttype TreeNodeSchemaInitializedData,\n\tCompatibilityLevel,\n\ttype FlexContent,\n} from \"./core/index.js\";\nimport { getTreeNodeSchemaInitializedData } from \"./createContext.js\";\nimport type { SimpleLeafNodeSchema } from \"./simpleSchema.js\";\nimport type { FactoryContent } from \"./unhydratedFlexTreeFromInsertable.js\";\n\n/**\n * Instances of this class are schema for leaf nodes.\n * @remarks\n * Unlike other schema, leaf schema are class instances instead of classes themselves.\n * This is because the instance type (the tree node type) for leaves are not objects,\n * so those instances can't be instances of a schema based class.\n * @privateRemarks\n * This class refers to the underlying flex tree schema in its constructor, so this class can't be included in the package API.\n */\nexport class LeafNodeSchema<Name extends string, const T extends ValueSchema>\n\timplements\n\t\tTreeNodeSchemaNonClass<Name, NodeKind.Leaf, TreeValue<T>, TreeValue<T>>,\n\t\tSimpleLeafNodeSchema,\n\t\tTreeNodeSchemaCorePrivate\n{\n\tpublic readonly identifier: Name;\n\tpublic readonly kind = NodeKind.Leaf;\n\tpublic readonly info: T;\n\tpublic readonly implicitlyConstructable = true as const;\n\tpublic readonly childTypes: ReadonlySet<TreeNodeSchema> = new Set();\n\tpublic readonly [privateDataSymbol]: TreeNodeSchemaPrivateData = {\n\t\tidempotentInitialize: () =>\n\t\t\t(this.#initializedData ??= getTreeNodeSchemaInitializedData(this, {\n\t\t\t\tshallowCompatibilityTest: (data: FactoryContent): CompatibilityLevel =>\n\t\t\t\t\tshallowCompatibilityTest(this, data),\n\t\t\t\ttoFlexContent: (\n\t\t\t\t\tdata: FactoryContent,\n\t\t\t\t\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n\t\t\t\t): FlexContent => leafToFlexContent(data, this, allowedTypes),\n\t\t\t})),\n\t\tchildAllowedTypes: [],\n\t};\n\t#initializedData: TreeNodeSchemaInitializedData | undefined;\n\n\tpublic create(data: TreeValue<T> | FlexTreeNode): TreeValue<T> {\n\t\tif (isFlexTreeNode(data)) {\n\t\t\tconst value = data.value;\n\t\t\tassert(valueSchemaAllows(this.info, value), 0x916 /* invalid value */);\n\t\t\treturn value;\n\t\t}\n\t\treturn data;\n\t}\n\n\tpublic createFromInsertable(data: TreeValue<T>): TreeValue<T> {\n\t\treturn data;\n\t}\n\n\tpublic readonly leafKind: ValueSchema;\n\n\tpublic readonly metadata: NodeSchemaMetadata = {};\n\tpublic readonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined;\n\n\tpublic constructor(name: Name, t: T) {\n\t\tthis.identifier = name;\n\t\tthis.info = t;\n\t\tthis.leafKind = t;\n\t}\n}\n\n/**\n * Wrapper around LeafNodeSchema's constructor that provides the return type that is desired in the package public API.\n */\nfunction makeLeaf<Name extends string, const T extends ValueSchema>(\n\tname: Name,\n\tt: T,\n): LeafSchema<Name, TreeValue<T>> & SimpleLeafNodeSchema {\n\t// Names in this domain follow https://en.wikipedia.org/wiki/Reverse_domain_name_notation\n\treturn new LeafNodeSchema(`com.fluidframework.leaf.${name}`, t);\n}\n\n/**\n * A {@link TreeNodeSchema} for a {@link TreeLeafValue}.\n * @remarks\n * This is just a more specific alias for a particular {@link TreeNodeSchemaNonClass}.\n * It only exists to make the API (particularly errors, IntelliSense, and generated .d.ts files) more readable.\n *\n * See {@link SchemaFactory} and its various properties for actual leaf schema objects.\n * @privateRemarks\n * This is an interface so its name will show up in things like type errors instead of the fully expanded TreeNodeSchemaNonClass.\n * @system @sealed @public\n */\nexport interface LeafSchema<Name extends string, T extends TreeLeafValue>\n\textends TreeNodeSchemaNonClass<\n\t\t`com.fluidframework.leaf.${Name}`,\n\t\tNodeKind.Leaf,\n\t\t/* TNode */ T,\n\t\t/* TInsertable */ T,\n\t\t/* ImplicitlyConstructable */ true\n\t> {}\n\n// Leaf schema shared between all SchemaFactory instances.\nexport const stringSchema = makeLeaf(\"string\", ValueSchema.String);\nexport const numberSchema = makeLeaf(\"number\", ValueSchema.Number);\nexport const booleanSchema = makeLeaf(\"boolean\", ValueSchema.Boolean);\nexport const nullSchema = makeLeaf(\"null\", ValueSchema.Null);\nexport const handleSchema = makeLeaf(\"handle\", ValueSchema.FluidHandle);\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: TreeNodeSchema,\n\tdata: FactoryContent,\n): CompatibilityLevel {\n\tif (isTreeValue(data)) {\n\t\treturn allowsValue(schema, data) ? CompatibilityLevel.Normal : CompatibilityLevel.None;\n\t}\n\n\treturn CompatibilityLevel.None;\n}\n\nfunction allowsValue(schema: TreeNodeSchema, value: TreeValue): boolean {\n\tif (schema.kind === NodeKind.Leaf) {\n\t\treturn valueSchemaAllows(schema.info as ValueSchema, value);\n\t}\n\treturn false;\n}\n\n/**\n * Transforms data under a Leaf schema.\n * @param data - The tree data to be transformed. Must be a {@link TreeValue}.\n * @param schema - The schema associated with the value.\n * @param allowedTypes - The allowed types specified by the parent.\n * Used to determine which fallback values may be appropriate.\n */\nexport function leafToFlexContent(\n\tdata: FactoryContent,\n\tschema: TreeNodeSchema,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): FlexContent {\n\tassert(schema.kind === NodeKind.Leaf, 0x921 /* Expected a leaf schema. */);\n\tif (!isTreeValue(data)) {\n\t\t// This rule exists to protect against useless `toString` output like `[object Object]`.\n\t\t// In this case, that's actually reasonable behavior, since object input is not compatible with Leaf schemas.\n\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\tthrow new UsageError(`Input data is incompatible with leaf schema: ${data}`);\n\t}\n\n\tconst mappedValue = mapValueWithFallbacks(data, allowedTypes);\n\tconst mappedSchema = [...allowedTypes].find((type) => allowsValue(type, mappedValue));\n\n\tassert(mappedSchema !== undefined, 0x84a /* Unsupported schema for provided primitive. */);\n\n\tconst result: FlexContent = [\n\t\t{\n\t\t\tvalue: mappedValue,\n\t\t\ttype: brand(mappedSchema.identifier),\n\t\t},\n\t\tnew Map(),\n\t];\n\n\treturn result;\n}\n\n/**\n * Checks an incoming {@link TreeLeafValue} to ensure it is compatible with its requirements.\n * For unsupported values with a schema-compatible replacement, return the replacement value.\n * For unsupported values without a schema-compatible replacement, throw.\n * For supported values, return the input.\n */\nfunction mapValueWithFallbacks(\n\tvalue: TreeLeafValue,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): TreeValue {\n\tswitch (typeof value) {\n\t\tcase \"number\": {\n\t\t\tif (Object.is(value, -0)) {\n\t\t\t\t// Our serialized data format does not support -0.\n\t\t\t\t// Map such input to +0.\n\t\t\t\treturn 0;\n\t\t\t} else if (Number.isFinite(value)) {\n\t\t\t\treturn value;\n\t\t\t} else {\n\t\t\t\t// Our serialized data format does not support NaN nor +/-∞.\n\t\t\t\t// If the schema supports `null`, fall back to that. Otherwise, throw.\n\t\t\t\t// This is intended to match JSON's behavior for such values.\n\t\t\t\tif (allowedTypes.has(nullSchema)) {\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new UsageError(`Received unsupported numeric value: ${value}.`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcase \"string\":\n\t\t// TODO:\n\t\t// This should detect invalid strings. Something like @stdlib/regexp-utf16-unpaired-surrogate could be used to do this.\n\t\t// See SchemaFactory.string for details.\n\t\tcase \"boolean\": {\n\t\t\treturn value;\n\t\t}\n\t\tcase \"object\": {\n\t\t\tif (value === null || isFluidHandle(value)) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\t// fallthrough\n\t\tdefault: {\n\t\t\tthrow new UsageError(`Received unsupported leaf value: ${value}.`);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { type WithType, NodeKind, type TreeNode, type ImplicitAllowedTypes, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaCorePrivate } from "../../core/index.js";
|
|
6
5
|
import type { NodeSchemaOptionsAlpha, System_Unsafe } from "../../api/index.js";
|
|
6
|
+
import { type WithType, NodeKind, type TreeNode, type ImplicitAllowedTypes, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaCorePrivate } from "../../core/index.js";
|
|
7
7
|
import type { ArrayNodeCustomizableSchema, ArrayNodePojoEmulationSchema } from "./arrayNodeTypes.js";
|
|
8
8
|
/**
|
|
9
9
|
* A covariant base type for {@link (TreeArrayNode:interface)}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayNode.d.ts","sourceRoot":"","sources":["../../../../src/simple-tree/node-kinds/array/arrayNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"arrayNode.d.ts","sourceRoot":"","sources":["../../../../src/simple-tree/node-kinds/array/arrayNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAEN,KAAK,QAAQ,EAGb,QAAQ,EACR,KAAK,QAAQ,EAab,KAAK,oBAAoB,EACzB,KAAK,0CAA0C,EAE/C,KAAK,aAAa,EAClB,KAAK,gCAAgC,EAIrC,KAAK,yBAAyB,EAO9B,MAAM,qBAAqB,CAAC;AAe7B,OAAO,KAAK,EACX,2BAA2B,EAC3B,4BAA4B,EAE5B,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,GAAG,aAAa,CAClE,SAAQ,aAAa,CAAC,CAAC,CAAC,EACvB,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;CAAG;AAEzD;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa,CAC7B,aAAa,SAAS,aAAa,CAAC,0BAA0B,GAAG,oBAAoB,EACrF,GAAG,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,SAAS,CAAC,oBAAoB,CAAC,GACnD,gCAAgC,CAAC,aAAa,CAAC,GAC/C,gCAAgC,CAAC,oBAAoB,CAAC,EACzD,EAAE,CAAC,IAAI,GAAG,CAAC,aAAa,CAAC,SAAS,CAAC,oBAAoB,CAAC,GACrD,0CAA0C,CAAC,aAAa,CAAC,GACzD,0CAA0C,C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AEP;;OAEG;IACI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;CAGvC;AAuND;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAqBtF;AAyaD;;;;;GAKG;AAEH,wBAAgB,WAAW,CAC1B,KAAK,SAAS,MAAM,EACpB,KAAK,CAAC,CAAC,SAAS,oBAAoB,EACpC,KAAK,CAAC,uBAAuB,SAAS,OAAO,EAC7C,KAAK,CAAC,eAAe,GAAG,OAAO,EAE/B,UAAU,EAAE,KAAK,EACjB,IAAI,EAAE,CAAC,EACP,uBAAuB,EAAE,uBAAuB,EAChD,YAAY,EAAE,OAAO,EACrB,WAAW,EAAE,sBAAsB,CAAC,eAAe,CAAC,sPAyIpD"}
|
|
@@ -12,14 +12,14 @@ import { Lazy, oob, fail, assert } from "@fluidframework/core-utils/internal";
|
|
|
12
12
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
13
13
|
import { EmptyKey, ObjectNodeStoredSchema } from "../../../core/index.js";
|
|
14
14
|
import { FieldKinds, isTreeValue } from "../../../feature-libraries/index.js";
|
|
15
|
+
import { brand, validateIndex, validateIndexRange, } from "../../../util/index.js";
|
|
15
16
|
import { CompatibilityLevel,
|
|
16
17
|
// eslint-disable-next-line import-x/no-deprecated
|
|
17
18
|
typeNameSymbol, NodeKind, typeSchemaSymbol, getOrCreateNodeFromInnerNode, getSimpleNodeSchemaFromInnerNode, getInnerNode, getKernel, UnhydratedSequenceField, getOrCreateNodeFromInnerUnboxedNode, normalizeAllowedTypes, TreeNodeValid, privateDataSymbol, createTreeNodeSchemaPrivateData, withBufferedTreeEvents, AnnotatedAllowedTypesInternal, } from "../../core/index.js";
|
|
18
|
-
import { flexTreeFromInsertableNode, unhydratedFlexTreeFromInsertable, } from "../../unhydratedFlexTreeFromInsertable.js";
|
|
19
|
-
import { prepareArrayContentForInsertion } from "../../prepareForInsertion.js";
|
|
20
19
|
import { getTreeNodeSchemaInitializedData, getUnhydratedContext, } from "../../createContext.js";
|
|
21
|
-
import { brand, validateIndex, validateIndexRange, } from "../../../util/index.js";
|
|
22
20
|
import { nullSchema } from "../../leafNodeSchema.js";
|
|
21
|
+
import { prepareArrayContentForInsertion } from "../../prepareForInsertion.js";
|
|
22
|
+
import { unhydratedFlexTreeFromInsertable, unhydratedFlexTreeFromInsertableNode, } from "../../unhydratedFlexTreeFromInsertable.js";
|
|
23
23
|
/**
|
|
24
24
|
* A {@link TreeNode} which implements 'readonly T[]' and the array mutation APIs.
|
|
25
25
|
* @public
|
|
@@ -314,10 +314,8 @@ class CustomArrayNodeBase extends TreeNodeWithArrayFeatures {
|
|
|
314
314
|
insertAt(index, ...value) {
|
|
315
315
|
const field = getSequenceField(this);
|
|
316
316
|
validateIndex(index, field, "TreeArrayNode.insertAt", true);
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
field.editor.attach(index, content);
|
|
320
|
-
});
|
|
317
|
+
const content = __classPrivateFieldGet(this, _CustomArrayNodeBase_instances, "m", _CustomArrayNodeBase_mapTreesFromFieldData).call(this, value);
|
|
318
|
+
field.editor.insert(index, content);
|
|
321
319
|
}
|
|
322
320
|
insertAtStart(...value) {
|
|
323
321
|
this.insertAt(0, ...value);
|
|
@@ -554,7 +552,7 @@ function arrayChildToFlexTree(child, allowedTypes) {
|
|
|
554
552
|
throw new TypeError(`Received unsupported array entry value: ${child}.`);
|
|
555
553
|
}
|
|
556
554
|
}
|
|
557
|
-
return
|
|
555
|
+
return unhydratedFlexTreeFromInsertableNode(childWithFallback, allowedTypes);
|
|
558
556
|
}
|
|
559
557
|
/**
|
|
560
558
|
* {@link TreeNodeSchemaInitializedData.toFlexContent} for Array nodes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayNode.js","sourceRoot":"","sources":["../../../../src/simple-tree/node-kinds/array/arrayNode.ts"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,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC;IAEzD,8CAA8C;IAC9C,MAAM,aAAa,GAClB,UAAU,CAAC,MAAM,KAAK,CAAC;QACtB,CAAC,CAAC,EAAE;QACJ,CAAC,CAAE;YACD;gBACC,QAAQ;gBACR,IAAI,uBAAuB,CAC1B,OAAO,EACP,UAAU,CAAC,QAAQ,CAAC,UAAU,EAC9B,QAAQ,EACR,UAAU,CACV;aACD;SACS,CAAC;IAEf,OAAO;QACN;YACC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;SAC9B;QACD,IAAI,GAAG,CAAC,aAAa,CAAC;KACtB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,wBAAwB,CAChC,IAAoB,EACpB,MAAuB;IAEvB,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QACvB,OAAO,kBAAkB,CAAC,IAAI,CAAC;IAChC,CAAC;IAED,IAAI,IAAI,YAAY,GAAG,EAAE,CAAC;QACzB,4KAA4K;QAC5K,OAAO,kBAAkB,CAAC,GAAG,CAAC;IAC/B,CAAC;IAED,IAAI,MAAM,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;QAC7B,OAAO,kBAAkB,CAAC,MAAM,CAAC;IAClC,CAAC;IAED,OAAO,kBAAkB,CAAC,IAAI,CAAC;AAChC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Lazy, oob, fail, assert } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { EmptyKey, ObjectNodeStoredSchema } from \"../../../core/index.js\";\nimport type {\n\tFlexibleFieldContent,\n\tFlexTreeNode,\n\tFlexTreeSequenceField,\n} from \"../../../feature-libraries/index.js\";\nimport { FieldKinds, isTreeValue } from \"../../../feature-libraries/index.js\";\nimport {\n\tCompatibilityLevel,\n\ttype WithType,\n\t// eslint-disable-next-line import-x/no-deprecated\n\ttypeNameSymbol,\n\tNodeKind,\n\ttype TreeNode,\n\ttype InternalTreeNode,\n\ttype TreeNodeSchema,\n\ttypeSchemaSymbol,\n\tgetOrCreateNodeFromInnerNode,\n\tgetSimpleNodeSchemaFromInnerNode,\n\tgetInnerNode,\n\ttype TreeNodeSchemaClass,\n\tgetKernel,\n\ttype UnhydratedFlexTreeNode,\n\tUnhydratedSequenceField,\n\tgetOrCreateNodeFromInnerUnboxedNode,\n\tnormalizeAllowedTypes,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype NodeSchemaMetadata,\n\ttype TreeLeafValue,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\tTreeNodeValid,\n\ttype MostDerivedData,\n\ttype TreeNodeSchemaInitializedData,\n\ttype TreeNodeSchemaCorePrivate,\n\tprivateDataSymbol,\n\tcreateTreeNodeSchemaPrivateData,\n\ttype FlexContent,\n\ttype TreeNodeSchemaPrivateData,\n\twithBufferedTreeEvents,\n\tAnnotatedAllowedTypesInternal,\n} from \"../../core/index.js\";\nimport {\n\ttype FactoryContent,\n\tflexTreeFromInsertableNode,\n\ttype InsertableContent,\n\tunhydratedFlexTreeFromInsertable,\n} from \"../../unhydratedFlexTreeFromInsertable.js\";\nimport { prepareArrayContentForInsertion } from \"../../prepareForInsertion.js\";\nimport {\n\tgetTreeNodeSchemaInitializedData,\n\tgetUnhydratedContext,\n} from \"../../createContext.js\";\nimport type { NodeSchemaOptionsAlpha, System_Unsafe } from \"../../api/index.js\";\nimport type {\n\tArrayNodeCustomizableSchema,\n\tArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n} from \"./arrayNodeTypes.js\";\nimport {\n\tbrand,\n\tvalidateIndex,\n\tvalidateIndexRange,\n\ttype JsonCompatibleReadOnlyObject,\n} from \"../../../util/index.js\";\nimport { nullSchema } from \"../../leafNodeSchema.js\";\nimport type { SchemaType, SimpleAllowedTypeAttributes } from \"../../simpleSchema.js\";\n\n/**\n * A covariant base type for {@link (TreeArrayNode:interface)}.\n *\n * This provides the readonly subset of TreeArrayNode functionality, and is used as the source interface for moves since that needs to be covariant.\n * @privateRemarks\n * Ideally this would just include `TreeNode, WithType<string, NodeKind.Array>` in the extends list but https://github.com/microsoft/TypeScript/issues/16936 prevents that from compiling.\n * As a workaround around for this TypeScript limitation, the conflicting type intersection is wrapped in `Awaited` (which has no effect on the type in this case) which allows it to compile.\n * @system @sealed @public\n */\nexport interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue>\n\textends ReadonlyArray<T>,\n\t\tAwaited<TreeNode & WithType<string, NodeKind.Array>> {}\n\n/**\n * A {@link TreeNode} which implements 'readonly T[]' and the array mutation APIs.\n *\n * @typeParam TAllowedTypes - Schema for types which are allowed as members of this array.\n * @typeParam T - Use Default: Do not specify. Type of values to read from the array.\n * @typeParam TNew - Use Default: Do not specify. Type of values to write into the array.\n * @typeParam TMoveFrom - Use Default: Do not specify. Type of node from which children can be moved into this array.\n *\n * @sealed @public\n */\nexport interface TreeArrayNode<\n\tTAllowedTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe = ImplicitAllowedTypes,\n\tout T = [TAllowedTypes] extends [ImplicitAllowedTypes]\n\t\t? TreeNodeFromImplicitAllowedTypes<TAllowedTypes>\n\t\t: TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>,\n\tin TNew = [TAllowedTypes] extends [ImplicitAllowedTypes]\n\t\t? InsertableTreeNodeFromImplicitAllowedTypes<TAllowedTypes>\n\t\t: InsertableTreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>,\n\tin TMoveFrom = ReadonlyArrayNode,\n> extends ReadonlyArrayNode<T> {\n\t/**\n\t * Inserts new item(s) at a specified location.\n\t * @param index - The index at which to insert `value`.\n\t * @param value - The content to insert.\n\t * @throws Throws if `index` is not in the range [0, `array.length`).\n\t */\n\tinsertAt(index: number, ...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;\n\n\t/**\n\t * Inserts new item(s) at the start of the array.\n\t * @param value - The content to insert.\n\t */\n\tinsertAtStart(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;\n\n\t/**\n\t * Inserts new item(s) at the end of the array.\n\t * @param value - The content to insert.\n\t */\n\tinsertAtEnd(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;\n\n\t/**\n\t * Removes the item at the specified location.\n\t * @param index - The index at which to remove the item.\n\t * @throws Throws if `index` is not in the range [0, `array.length`).\n\t */\n\tremoveAt(index: number): void;\n\n\t/**\n\t * Removes all items between the specified indices.\n\t * @param start - The starting index of the range to remove (inclusive). Defaults to the start of the array.\n\t * @param end - The ending index of the range to remove (exclusive). Defaults to `array.length`.\n\t * @throws Throws if `start` is not in the range [0, `array.length`].\n\t * @throws Throws if `end` is less than `start`.\n\t * If `end` is not supplied or is greater than the length of the array, all items after `start` are removed.\n\t *\n\t * @remarks\n\t * The default values for start and end are computed when this is called,\n\t * and thus the behavior is the same as providing them explicitly, even with respect to merge resolution with concurrent edits.\n\t * For example, two concurrent transactions both emptying the array with `node.removeRange()` then inserting an item,\n\t * will merge to result in the array having both inserted items.\n\t */\n\tremoveRange(start?: number, end?: number): void;\n\n\t/**\n\t * Moves the specified item to the start of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToStart(sourceIndex: number): void;\n\n\t/**\n\t * Moves the specified item to the start of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @param source - The source array to move the item out of.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToStart(sourceIndex: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified item to the end of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToEnd(sourceIndex: number): void;\n\n\t/**\n\t * Moves the specified item to the end of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @param source - The source array to move the item out of.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToEnd(sourceIndex: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified item to the desired location in the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceIndex - The index of the item to move.\n\t * @throws Throws if any of the input indices are not in the range [0, `array.length`).\n\t */\n\tmoveToIndex(destinationGap: number, sourceIndex: number): void;\n\n\t/**\n\t * Moves the specified item to the desired location in the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceIndex - The index of the item to move.\n\t * @param source - The source array to move the item out of.\n\t * @throws Throws if any of the source index is not in the range [0, `array.length`),\n\t * or if the index is not in the range [0, `array.length`].\n\t */\n\tmoveToIndex(destinationGap: number, sourceIndex: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified items to the start of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @throws Throws if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToStart(sourceStart: number, sourceEnd: number): void;\n\n\t/**\n\t * Moves the specified items to the start of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @param source - The source array to move items out of.\n\t * @throws Throws if the types of any of the items being moved are not allowed in the destination array,\n\t * if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToStart(sourceStart: number, sourceEnd: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified items to the end of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @throws Throws if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToEnd(sourceStart: number, sourceEnd: number): void;\n\n\t/**\n\t * Moves the specified items to the end of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @param source - The source array to move items out of.\n\t * @throws Throws if the types of any of the items being moved are not allowed in the destination array,\n\t * if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToEnd(sourceStart: number, sourceEnd: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified items to the desired location within the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @throws Throws if any of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToIndex(destinationGap: number, sourceStart: number, sourceEnd: number): void;\n\n\t/**\n\t * Moves the specified items to the desired location within the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @param source - The source array to move items out of.\n\t * @throws Throws if the types of any of the items being moved are not allowed in the destination array,\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToIndex(\n\t\tdestinationGap: number,\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource: TMoveFrom,\n\t): void;\n\n\t/**\n\t * Returns a custom IterableIterator which throws usage errors if concurrent editing and iteration occurs.\n\t */\n\tvalues(): IterableIterator<T>;\n}\n\n/**\n * A {@link TreeNode} which implements 'readonly T[]' and the array mutation APIs.\n * @public\n */\nexport const TreeArrayNode = {\n\t/**\n\t * Wrap an iterable of items to inserted as consecutive items in a array.\n\t * @remarks\n\t * The object returned by this function can be inserted into a {@link (TreeArrayNode:interface)}.\n\t * Its contents will be inserted consecutively in the corresponding location in the array.\n\t * @example\n\t * ```ts\n\t * array.insertAtEnd(TreeArrayNode.spread(iterable))\n\t * ```\n\t */\n\tspread: <T>(content: Iterable<T>) => create(content),\n} as const;\n\n/**\n * Package internal construction API.\n * Use {@link (TreeArrayNode:variable).spread} to create an instance of this type instead.\n */\nlet create: <T>(content: Iterable<T>) => IterableTreeArrayContent<T>;\n\n/**\n * Used to insert iterable content into a {@link (TreeArrayNode:interface)}.\n * Use {@link (TreeArrayNode:variable).spread} to create an instance of this type.\n * @sealed @public\n */\nexport class IterableTreeArrayContent<T> implements Iterable<T> {\n\tstatic {\n\t\tcreate = <T2>(content: Iterable<T2>) => new IterableTreeArrayContent(content);\n\t}\n\n\tprivate constructor(private readonly content: Iterable<T>) {}\n\n\t/**\n\t * Iterates over content for nodes to insert.\n\t */\n\tpublic [Symbol.iterator](): Iterator<T> {\n\t\treturn this.content[Symbol.iterator]();\n\t}\n}\n\n/**\n * Given a array node proxy, returns its underlying LazySequence field.\n */\nfunction getSequenceField(arrayNode: ReadonlyArrayNode): FlexTreeSequenceField {\n\treturn getInnerNode(arrayNode).getBoxed(EmptyKey) as FlexTreeSequenceField;\n}\n\n// For compatibility, we are initially implement 'readonly T[]' by applying the Array.prototype methods\n// to the array node proxy. Over time, we should replace these with efficient implementations on LazySequence\n// to avoid re-entering the proxy as these methods access 'length' and the indexed properties.\n//\n// For brevity, the current implementation dynamically builds a property descriptor map from a list of\n// Array functions we want to re-expose via the proxy.\n\nconst arrayPrototypeKeys = [\n\t\"concat\",\n\t\"entries\",\n\t\"every\",\n\t\"filter\",\n\t\"find\",\n\t\"findIndex\",\n\t\"flat\",\n\t\"flatMap\",\n\t\"forEach\",\n\t\"includes\",\n\t\"indexOf\",\n\t\"join\",\n\t\"keys\",\n\t\"lastIndexOf\",\n\t\"map\",\n\t\"reduce\",\n\t\"reduceRight\",\n\t\"slice\",\n\t\"some\",\n\t\"toLocaleString\",\n\t\"toString\",\n\n\t// \"copyWithin\",\n\t// \"fill\",\n\t// \"length\",\n\t// \"pop\",\n\t// \"push\",\n\t// \"reverse\",\n\t// \"shift\",\n\t// \"sort\",\n\t// \"splice\",\n\t// \"unshift\",\n] as const;\n\n/**\n * {@link TreeNodeValid}, but modified to add members from Array.prototype named in {@link arrayPrototypeKeys}.\n * @privateRemarks\n * Since a lot of scratch types and values are involved with creating this,\n * it's generating using an immediately invoked function expression (IIFE).\n * This is a common JavaScript pattern for cases like this to avoid cluttering the scope.\n */\nconst TreeNodeWithArrayFeatures = (() => {\n\t/**\n\t * {@link TreeNodeValid}, but modified to add members from Array.prototype named in {@link arrayPrototypeKeys}.\n\t */\n\tabstract class TreeNodeWithArrayFeaturesUntyped<\n\t\tconst T extends ImplicitAllowedTypes,\n\t> extends TreeNodeValid<Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>> {}\n\n\t// Modify TreeNodeWithArrayFeaturesUntyped to add the members from Array.prototype\n\tfor (const key of arrayPrototypeKeys) {\n\t\tObject.defineProperty(TreeNodeWithArrayFeaturesUntyped.prototype, key, {\n\t\t\tvalue: Array.prototype[key],\n\t\t});\n\t}\n\n\treturn TreeNodeWithArrayFeaturesUntyped as unknown as typeof NodeWithArrayFeatures;\n})();\n\n/**\n * Type of {@link TreeNodeValid}, but with array members added to the instance type.\n *\n * TypeScript has a rule that `Base constructors must all have the same return type.ts(2510)`.\n * This means that intersecting two types with different constructors to create a type with a more constrained constructor (ex: more specific return type)\n * is not supported.\n *\n * TypeScript also has a limitation that there is no way to replace or remove just the constructor of a type without losing all the private and protected members.\n * See https://github.com/microsoft/TypeScript/issues/35416 for details.\n *\n * TypeScript also does not support explicitly specifying the instance type in a class definition as the constructor return type.\n *\n * Thus to replace the instance type, while preserving the protected static members of TreeNodeValid,\n * the only option seems to be actually declaring a class with all the members explicitly inline.\n *\n * To avoid incurring any bundle size / runtime overhead from this and having to stub out the function bodies,\n * the class uses `declare`.\n * TypeScript does not support `declare` inside scopes, so this is not inside the function scope above.\n *\n * The members of this class were generated using the \"implement interface\" refactoring.\n * Since that refactoring does not add `public`, the lint to require it is disabled for this section of the file.\n * To update this class delete all members and reapply the \"implement interface\" refactoring.\n * As these signatures get formatted to be over three times as many lines with prettier (which is not helpful), it is also suppressed.\n */\n/* eslint-disable @typescript-eslint/explicit-member-accessibility, @typescript-eslint/no-explicit-any */\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare abstract class NodeWithArrayFeatures<Input, T>\n\textends TreeNodeValid<Input>\n\timplements Pick<readonly T[], (typeof arrayPrototypeKeys)[number]>\n{\n\tconcat(...items: ConcatArray<T>[]): T[];\n\tconcat(...items: (T | ConcatArray<T>)[]): T[];\n\tentries(): IterableIterator<[number, T]>;\n\tevery<S extends T>(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => value is S,\n\t\tthisArg?: any,\n\t): this is readonly S[];\n\tevery(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): boolean;\n\tfilter<S extends T>(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => value is S,\n\t\tthisArg?: any,\n\t): S[];\n\tfilter(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): T[];\n\tfind<S extends T>(\n\t\tpredicate: (value: T, index: number, obj: readonly T[]) => value is S,\n\t\tthisArg?: any,\n\t): S | undefined;\n\tfind(\n\t\tpredicate: (value: T, index: number, obj: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): T | undefined;\n\tfindIndex(\n\t\tpredicate: (value: T, index: number, obj: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): number;\n\tflat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];\n\tflatMap<U, This = undefined>(\n\t\tcallback: (this: This, value: T, index: number, array: T[]) => U | readonly U[],\n\t\tthisArg?: This | undefined,\n\t): U[];\n\tforEach(\n\t\tcallbackfn: (value: T, index: number, array: readonly T[]) => void,\n\t\tthisArg?: any,\n\t): void;\n\tincludes(searchElement: T, fromIndex?: number | undefined): boolean;\n\tindexOf(searchElement: T, fromIndex?: number | undefined): number;\n\tjoin(separator?: string | undefined): string;\n\tkeys(): IterableIterator<number>;\n\tlastIndexOf(searchElement: T, fromIndex?: number | undefined): number;\n\tmap<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[];\n\treduce(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t): T;\n\treduce(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t\tinitialValue: T,\n\t): T;\n\treduce<U>(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: U,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => U,\n\t\tinitialValue: U,\n\t): U;\n\treduceRight(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t): T;\n\treduceRight(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t\tinitialValue: T,\n\t): T;\n\treduceRight<U>(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: U,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => U,\n\t\tinitialValue: U,\n\t): U;\n\tslice(start?: number | undefined, end?: number | undefined): T[];\n\tsome(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): boolean;\n\ttoLocaleString(): string;\n\ttoString(): string;\n}\n/* eslint-enable @typescript-eslint/explicit-member-accessibility, @typescript-eslint/no-explicit-any */\n\n/**\n * Attempts to coerce the given property key to an integer index property.\n * @param key - The property key to coerce.\n * @param exclusiveMax - This restricts the range in which the resulting index is allowed to be.\n * The coerced index of `key` must be less than `exclusiveMax` or else this function will return `undefined`.\n * This is useful for reading an array within the bounds of its length, e.g. `asIndex(key, array.length)`.\n */\nexport function asIndex(key: string | symbol, exclusiveMax: number): number | undefined {\n\tif (typeof key !== \"string\") {\n\t\treturn undefined;\n\t}\n\n\t// TODO: It may be worth a '0' <= ch <= '9' check before calling 'Number' to quickly\n\t// reject 'length' as an index, or even parsing integers ourselves.\n\tconst asNumber = Number(key);\n\tif (!Number.isInteger(asNumber)) {\n\t\treturn undefined;\n\t}\n\n\t// Check that the original string is the same after converting to a number and back again.\n\t// This prevents keys like \"5.0\", \"0x5\", \" 5\" from coercing to 5, and keys like \" \" or \"\" from coercing to 0.\n\tconst asString = String(asNumber);\n\tif (asString !== key) {\n\t\treturn undefined;\n\t}\n\n\t// TODO: See 'matrix/range.ts' for fast integer coercing + range check.\n\treturn 0 <= asNumber && asNumber < exclusiveMax ? asNumber : undefined;\n}\n\n/**\n * Create a proxy which implements the {@link TreeArrayNode} API.\n * @param allowAdditionalProperties - If true, setting of unexpected properties will be forwarded to the target object.\n * Otherwise setting of unexpected properties will error.\n * @param proxyTarget - Target object of the proxy. Must provide an own `length` value property\n * (which is not used but must exist for getOwnPropertyDescriptor invariants) and the array functionality from {@link arrayNodePrototype}.\n * Controls the prototype exposed by the produced proxy.\n * @param dispatchTarget - provides the functionally of the node, implementing all fields.\n */\nfunction createArrayNodeProxy(\n\tallowAdditionalProperties: boolean,\n\tproxyTarget: object,\n\tdispatchTarget: object,\n): TreeArrayNode {\n\t// To satisfy 'deepEquals' level scrutiny, the target of the proxy must be an array literal in order\n\t// to pass 'Object.getPrototypeOf'. It also satisfies 'Array.isArray' and 'Object.prototype.toString'\n\t// requirements without use of Array[Symbol.species], which is potentially on a path to deprecation.\n\tconst proxy: TreeArrayNode = new Proxy<TreeArrayNode>(proxyTarget as TreeArrayNode, {\n\t\tget: (target, key, receiver) => {\n\t\t\tconst field = getSequenceField(receiver);\n\t\t\tconst maybeIndex = asIndex(key, field.length);\n\n\t\t\tif (maybeIndex === undefined) {\n\t\t\t\tif (key === \"length\") {\n\t\t\t\t\treturn field.length;\n\t\t\t\t}\n\n\t\t\t\t// In NodeJS 22, assert.strict.deepEqual started special casing well known constructors like Array.\n\t\t\t\t// That made this necessary, ensuring that in POJO mode, TreeArrayNode are still deepEqual to arrays.\n\t\t\t\tif (key === \"constructor\") {\n\t\t\t\t\treturn proxyTarget.constructor;\n\t\t\t\t}\n\n\t\t\t\t// Pass the proxy as the receiver here, so that any methods on\n\t\t\t\t// the prototype receive `proxy` as `this`.\n\t\t\t\treturn Reflect.get(dispatchTarget, key, receiver) as unknown;\n\t\t\t}\n\n\t\t\tconst maybeContent = field.at(maybeIndex);\n\t\t\treturn maybeContent === undefined\n\t\t\t\t? undefined\n\t\t\t\t: getOrCreateNodeFromInnerUnboxedNode(maybeContent);\n\t\t},\n\t\tset: (target, key, newValue, receiver) => {\n\t\t\tif (key === \"length\") {\n\t\t\t\t// To allow \"length\" to look like \"length\" on an array, getOwnPropertyDescriptor has to report it as a writable value.\n\t\t\t\t// This means the proxy target must provide a length value, but since it can't use getters and setters, it can't be correct.\n\t\t\t\t// Therefor length has to be handled in this proxy.\n\t\t\t\t// Since it's not actually mutable, return false so setting it will produce a type error.\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// 'Symbol.isConcatSpreadable' may be set on an Array instance to modify the behavior of\n\t\t\t// the concat method. We allow this property to be added to the dispatch object.\n\t\t\tif (key === Symbol.isConcatSpreadable) {\n\t\t\t\treturn Reflect.set(dispatchTarget, key, newValue, receiver);\n\t\t\t}\n\n\t\t\t// Array nodes treat all non-negative integer indexes as array access.\n\t\t\t// Using Infinity here (rather than length) ensures that indexing past the end doesn't create additional session local properties.\n\t\t\tconst maybeIndex = asIndex(key, Number.POSITIVE_INFINITY);\n\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\t// For MVP, we otherwise disallow setting properties (mutation is only available via the array node mutation APIs).\n\t\t\t\t// To ensure a clear and actionable error experience, we will throw explicitly here, rather than just returning false.\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot set indexed properties on array nodes. Use array node mutation APIs to alter the array.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn allowAdditionalProperties ? Reflect.set(target, key, newValue, receiver) : false;\n\t\t},\n\t\thas: (target, key) => {\n\t\t\tconst field = getSequenceField(proxy);\n\t\t\tconst maybeIndex = asIndex(key, field.length);\n\t\t\treturn maybeIndex !== undefined || Reflect.has(dispatchTarget, key);\n\t\t},\n\t\townKeys: (target) => {\n\t\t\tconst field = getSequenceField(proxy);\n\n\t\t\t// TODO: Would a lazy iterator to produce the indexes work / be more efficient?\n\t\t\t// TODO: Need to surface 'Symbol.isConcatSpreadable' as an own key.\n\t\t\tconst keys: (string | symbol)[] = Array.from(\n\t\t\t\t{ length: field.length },\n\t\t\t\t(_, index) => `${index}`,\n\t\t\t);\n\n\t\t\tif (allowAdditionalProperties) {\n\t\t\t\tkeys.push(...Reflect.ownKeys(target));\n\t\t\t} else {\n\t\t\t\tkeys.push(\"length\");\n\t\t\t}\n\t\t\treturn keys;\n\t\t},\n\t\tgetOwnPropertyDescriptor: (target, key) => {\n\t\t\tconst field = getSequenceField(proxy);\n\t\t\tconst maybeIndex = asIndex(key, field.length);\n\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\tconst val = field.at(maybeIndex);\n\t\t\t\t// To satisfy 'deepEquals' level scrutiny, the property descriptor for indexed properties must\n\t\t\t\t// be a simple value property (as opposed to using getter) and declared writable/enumerable/configurable.\n\t\t\t\treturn {\n\t\t\t\t\tvalue: val === undefined ? undefined : getOrCreateNodeFromInnerUnboxedNode(val),\n\t\t\t\t\twritable: true, // For MVP, setting indexed properties is reported as allowed here (for deep equals compatibility noted above), but not actually supported.\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t};\n\t\t\t} else if (key === \"length\") {\n\t\t\t\t// To satisfy 'deepEquals' level scrutiny, the property descriptor for 'length' must be a simple\n\t\t\t\t// value property (as opposed to using getter) and be declared writable / non-configurable.\n\t\t\t\treturn {\n\t\t\t\t\tvalue: field.length,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn Reflect.getOwnPropertyDescriptor(dispatchTarget, key);\n\t\t},\n\t\tdefineProperty(target, key, attributes) {\n\t\t\tconst maybeIndex = asIndex(key, Number.POSITIVE_INFINITY);\n\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\tthrow new UsageError(\"Shadowing of array indices is not permitted.\");\n\t\t\t}\n\t\t\treturn Reflect.defineProperty(dispatchTarget, key, attributes);\n\t\t},\n\t});\n\treturn proxy;\n}\n\ntype Insertable<T extends ImplicitAllowedTypes> = readonly (\n\t| InsertableTreeNodeFromImplicitAllowedTypes<T>\n\t| IterableTreeArrayContent<InsertableTreeNodeFromImplicitAllowedTypes<T>>\n)[];\n\nabstract class CustomArrayNodeBase<const T extends ImplicitAllowedTypes>\n\textends TreeNodeWithArrayFeatures<\n\t\tIterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>,\n\t\tTreeNodeFromImplicitAllowedTypes<T>\n\t>\n\timplements TreeArrayNode<T>\n{\n\t// Indexing must be provided by subclass.\n\t[k: number]: TreeNodeFromImplicitAllowedTypes<T>;\n\n\tpublic static readonly kind = NodeKind.Array;\n\n\tprotected abstract get childSchema(): ImplicitAllowedTypes;\n\tprotected abstract get allowedTypes(): ReadonlySet<TreeNodeSchema>;\n\n\tpublic abstract override get [typeSchemaSymbol](): TreeNodeSchemaClass<\n\t\tstring,\n\t\tNodeKind.Array\n\t>;\n\n\tpublic constructor(\n\t\tinput?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>> | InternalTreeNode,\n\t) {\n\t\tsuper(input ?? []);\n\t}\n\n\t#mapTreesFromFieldData(value: Insertable<T>): FlexibleFieldContent {\n\t\tconst sequenceField = getSequenceField(this);\n\t\tconst content = value as readonly (\n\t\t\t| InsertableContent\n\t\t\t| IterableTreeArrayContent<InsertableContent>\n\t\t)[];\n\n\t\tconst contentArray = content.flatMap((c): InsertableContent[] =>\n\t\t\tc instanceof IterableTreeArrayContent ? [...c] : [c],\n\t\t);\n\n\t\tconst kernel = getKernel(this);\n\t\tconst flexContext = kernel.getInnerNode().context;\n\t\tassert(\n\t\t\tflexContext === kernel.context.flexContext,\n\t\t\t0xc14 /* Expected flexContext to match */,\n\t\t);\n\t\tconst innerSchema = kernel.context.flexContext.schema.nodeSchema.get(\n\t\t\tbrand(kernel.schema.identifier),\n\t\t);\n\t\tassert(\n\t\t\tinnerSchema instanceof ObjectNodeStoredSchema,\n\t\t\t0xc15 /* Expected ObjectNodeStoredSchema */,\n\t\t);\n\t\tconst fieldSchema = innerSchema.getFieldSchema(EmptyKey);\n\n\t\tconst mapTrees = prepareArrayContentForInsertion(\n\t\t\tcontentArray,\n\t\t\tthis.childSchema,\n\t\t\tsequenceField.context,\n\t\t\tfieldSchema.types,\n\t\t);\n\n\t\treturn mapTrees;\n\t}\n\n\tpublic toJSON(): unknown {\n\t\t// This override causes the class instance to `JSON.stringify` as `[a, b]` rather than `{0: a, 1: b}`.\n\t\treturn [...(this as unknown as TreeArrayNode)];\n\t}\n\n\t// Instances of this class are used as the dispatch object for the proxy,\n\t// and thus its set of keys is used to implement `has` (for the `in` operator) for the non-numeric cases.\n\t// Therefore it must include `length`,\n\t// even though this \"length\" is never invoked (due to being shadowed by the proxy provided own property).\n\tpublic get length(): number {\n\t\treturn fail(0xadb /* Proxy should intercept length */);\n\t}\n\n\tpublic [Symbol.iterator](): IterableIterator<TreeNodeFromImplicitAllowedTypes<T>> {\n\t\treturn this.values();\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tpublic get [Symbol.unscopables]() {\n\t\t// This might not be the exact right set of values, but it only matters for `with` clauses which are deprecated and are banned in strict mode, so it shouldn't matter much.\n\t\t// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with for details.\n\t\treturn Array.prototype[Symbol.unscopables];\n\t}\n\n\tpublic at(\n\t\tthis: TreeArrayNode<T>,\n\t\tindex: number,\n\t): TreeNodeFromImplicitAllowedTypes<T> | undefined {\n\t\tconst field = getSequenceField(this);\n\t\tconst val = field.boxedAt(index);\n\n\t\tif (val === undefined) {\n\t\t\treturn val;\n\t\t}\n\n\t\treturn getOrCreateNodeFromInnerNode(val) as TreeNodeFromImplicitAllowedTypes<T>;\n\t}\n\tpublic insertAt(index: number, ...value: Insertable<T>): void {\n\t\tconst field = getSequenceField(this);\n\t\tvalidateIndex(index, field, \"TreeArrayNode.insertAt\", true);\n\t\tfield.context.runInTransaction(() => {\n\t\t\tconst content = this.#mapTreesFromFieldData(value);\n\t\t\tfield.editor.attach(index, content);\n\t\t});\n\t}\n\tpublic insertAtStart(...value: Insertable<T>): void {\n\t\tthis.insertAt(0, ...value);\n\t}\n\tpublic insertAtEnd(...value: Insertable<T>): void {\n\t\tthis.insertAt(this.length, ...value);\n\t}\n\tpublic removeAt(index: number): void {\n\t\tconst field = getSequenceField(this);\n\t\tvalidateIndex(index, field, \"TreeArrayNode.removeAt\");\n\t\tfield.editor.remove(index, 1);\n\t}\n\tpublic removeRange(start?: number, end?: number): void {\n\t\tconst field = getSequenceField(this);\n\t\tconst { length, editor } = field;\n\t\tconst removeStart = start ?? 0;\n\t\tvalidateIndex(removeStart, field, \"TreeArrayNode.removeRange\", true);\n\n\t\tconst removeEnd = Math.min(length, end ?? length);\n\t\tvalidateIndexRange(removeStart, removeEnd, field, \"TreeArrayNode.removeRange\");\n\n\t\teditor.remove(removeStart, removeEnd - removeStart);\n\t}\n\tpublic moveToStart(sourceIndex: number, source?: ReadonlyArrayNode): void {\n\t\tconst sourceArray = source ?? this;\n\t\tconst sourceField = getSequenceField(sourceArray);\n\t\tvalidateIndex(sourceIndex, sourceField, \"TreeArrayNode.moveToStart\");\n\t\tthis.moveRangeToIndex(0, sourceIndex, sourceIndex + 1, source);\n\t}\n\tpublic moveToEnd(sourceIndex: number, source?: ReadonlyArrayNode): void {\n\t\tconst sourceArray = source ?? this;\n\t\tconst sourceField = getSequenceField(sourceArray);\n\t\tvalidateIndex(sourceIndex, sourceField, \"TreeArrayNode.moveToEnd\");\n\t\tthis.moveRangeToIndex(this.length, sourceIndex, sourceIndex + 1, source);\n\t}\n\tpublic moveToIndex(\n\t\tdestinationGap: number,\n\t\tsourceIndex: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tconst sourceArray = source ?? this;\n\t\tconst sourceField = getSequenceField(sourceArray);\n\t\tconst destinationField = getSequenceField(this);\n\t\tvalidateIndex(destinationGap, destinationField, \"TreeArrayNode.moveToIndex\", true);\n\t\tvalidateIndex(sourceIndex, sourceField, \"TreeArrayNode.moveToIndex\");\n\t\tthis.moveRangeToIndex(destinationGap, sourceIndex, sourceIndex + 1, source);\n\t}\n\tpublic moveRangeToStart(\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tvalidateIndexRange(\n\t\t\tsourceStart,\n\t\t\tsourceEnd,\n\t\t\tsource ?? getSequenceField(this),\n\t\t\t\"TreeArrayNode.moveRangeToStart\",\n\t\t);\n\t\tthis.moveRangeToIndex(0, sourceStart, sourceEnd, source);\n\t}\n\tpublic moveRangeToEnd(\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tvalidateIndexRange(\n\t\t\tsourceStart,\n\t\t\tsourceEnd,\n\t\t\tsource ?? getSequenceField(this),\n\t\t\t\"TreeArrayNode.moveRangeToEnd\",\n\t\t);\n\t\tthis.moveRangeToIndex(this.length, sourceStart, sourceEnd, source);\n\t}\n\tpublic moveRangeToIndex(\n\t\tdestinationGap: number,\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tconst destinationField = getSequenceField(this);\n\t\tconst destinationSchema = this.allowedTypes;\n\t\tconst kernel = getKernel(this);\n\t\tconst destinationStored = (\n\t\t\tkernel.context.flexContext.schema.nodeSchema.get(brand(kernel.schema.identifier)) ??\n\t\t\tfail(0xc16 /* missing schema for array node */)\n\t\t).getFieldSchema(EmptyKey).types;\n\t\tconst sourceField = source === undefined ? destinationField : getSequenceField(source);\n\n\t\tvalidateIndex(destinationGap, destinationField, \"TreeArrayNode.moveRangeToIndex\", true);\n\t\tvalidateIndexRange(\n\t\t\tsourceStart,\n\t\t\tsourceEnd,\n\t\t\tsource ?? destinationField,\n\t\t\t\"TreeArrayNode.moveRangeToIndex\",\n\t\t);\n\n\t\t// TODO: determine support for move across different sequence types\n\t\tif (sourceField !== destinationField) {\n\t\t\tfor (let i = sourceStart; i < sourceEnd; i++) {\n\t\t\t\tconst sourceNode = sourceField.boxedAt(i) ?? oob();\n\t\t\t\tconst sourceSchema = getSimpleNodeSchemaFromInnerNode(sourceNode);\n\t\t\t\tif (!destinationSchema.has(sourceSchema)) {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Type ${sourceNode.type} in source sequence is not allowed in destination.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (!destinationStored.has(sourceNode.type)) {\n\t\t\t\t\t// TODO: better and centralized messages for missing staged schema updates.\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Type ${sourceNode.type} in source sequence is not allowed in destination's stored schema: this would likely require upgrading the document to permit a staged schema.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst movedCount = sourceEnd - sourceStart;\n\t\tif (destinationField.context.isHydrated()) {\n\t\t\tif (!sourceField.context.isHydrated()) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot move elements from an unhydrated array to a hydrated array.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (sourceField.context !== destinationField.context) {\n\t\t\t\tthrow new UsageError(\"Cannot move elements between two different TreeViews.\");\n\t\t\t}\n\n\t\t\tdestinationField.context.checkout.editor.move(\n\t\t\t\tsourceField.getFieldPath(),\n\t\t\t\tsourceStart,\n\t\t\t\tmovedCount,\n\t\t\t\tdestinationField.getFieldPath(),\n\t\t\t\tdestinationGap,\n\t\t\t);\n\t\t} else {\n\t\t\tif (!(sourceField instanceof UnhydratedSequenceField)) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot move elements from a hydrated array to an unhydrated array.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (sourceField.context.isHydrated()) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot move elements from an unhydrated array to a hydrated array.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// We implement move here via subsequent `remove` and `insert`.\n\t\t\t// This is strictly an implementation detail and should not be observable by the user.\n\t\t\t// TODO:AB#47457: Implement proper move support for unhydrated trees.\n\t\t\t// As a temporary mitigation, we will pause tree events until both edits have been completed.\n\t\t\t// That way, users will only see a single change event for the array instead of 2.\n\t\t\twithBufferedTreeEvents(() => {\n\t\t\t\tif (sourceField !== destinationField || destinationGap < sourceStart) {\n\t\t\t\t\tdestinationField.editor.insert(\n\t\t\t\t\t\tdestinationGap,\n\t\t\t\t\t\tsourceField.editor.remove(sourceStart, movedCount),\n\t\t\t\t\t);\n\t\t\t\t} else if (destinationGap > sourceStart + movedCount) {\n\t\t\t\t\tdestinationField.editor.insert(\n\t\t\t\t\t\tdestinationGap - movedCount,\n\t\t\t\t\t\tsourceField.editor.remove(sourceStart, movedCount),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic values(): IterableIterator<TreeNodeFromImplicitAllowedTypes<T>> {\n\t\treturn this.generateValues(getKernel(this).generationNumber);\n\t}\n\tprivate *generateValues(\n\t\tinitialLastUpdatedStamp: number,\n\t): Generator<TreeNodeFromImplicitAllowedTypes<T>> {\n\t\tconst kernel = getKernel(this);\n\t\tif (initialLastUpdatedStamp !== kernel.generationNumber) {\n\t\t\tthrow new UsageError(`Concurrent editing and iteration is not allowed.`);\n\t\t}\n\t\tfor (let i = 0; i < this.length; i++) {\n\t\t\tyield this.at(i) ?? fail(0xadc /* Index is out of bounds */);\n\t\t\tif (initialLastUpdatedStamp !== kernel.generationNumber) {\n\t\t\t\tthrow new UsageError(`Concurrent editing and iteration is not allowed.`);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Define a {@link TreeNodeSchema} for a {@link (TreeArrayNode:interface)}.\n *\n * @param name - Unique identifier for this schema including the factory's scope.\n * @param persistedMetadata - Optional persisted metadata for the object node schema.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function arraySchema<\n\tTName extends string,\n\tconst T extends ImplicitAllowedTypes,\n\tconst ImplicitlyConstructable extends boolean,\n\tconst TCustomMetadata = unknown,\n>(\n\tidentifier: TName,\n\tinfo: T,\n\timplicitlyConstructable: ImplicitlyConstructable,\n\tcustomizable: boolean,\n\tnodeOptions: NodeSchemaOptionsAlpha<TCustomMetadata>,\n) {\n\ttype Output = ArrayNodeCustomizableSchema<\n\t\tTName,\n\t\tT,\n\t\tImplicitlyConstructable,\n\t\tTCustomMetadata\n\t> &\n\t\tArrayNodePojoEmulationSchema<TName, T, ImplicitlyConstructable, TCustomMetadata> &\n\t\tTreeNodeSchemaCorePrivate;\n\n\tconst persistedMetadata = nodeOptions?.persistedMetadata;\n\tconst normalizedTypes = normalizeAllowedTypes(info);\n\tconst lazyAllowedTypesIdentifiers = new Lazy(\n\t\t() => new Set(normalizedTypes.evaluate().map((type) => type.identifier)),\n\t);\n\tconst lazySimpleAllowedTypes = new Lazy(() => {\n\t\treturn AnnotatedAllowedTypesInternal.evaluateSimpleAllowedTypes(normalizedTypes);\n\t});\n\n\tlet privateData: TreeNodeSchemaPrivateData | undefined;\n\n\t// This class returns a proxy from its constructor to handle numeric indexing.\n\t// Alternatively it could extend a normal class which gets tons of numeric properties added.\n\tclass Schema extends CustomArrayNodeBase<T> {\n\t\tpublic static override prepareInstance<T2>(\n\t\t\tthis: typeof TreeNodeValid<T2>,\n\t\t\tinstance: TreeNodeValid<T2>,\n\t\t\tflexNode: FlexTreeNode,\n\t\t): TreeNodeValid<T2> {\n\t\t\tconst proxyTarget = customizable ? instance : [];\n\n\t\t\tif (customizable) {\n\t\t\t\t// Since proxy reports this as a \"non-configurable\" property, it must exist on the underlying object used as the proxy target, not as an inherited property.\n\t\t\t\t// This should not get used as the proxy should intercept all use.\n\t\t\t\tObject.defineProperty(instance, \"length\", {\n\t\t\t\t\tvalue: Number.NaN,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn createArrayNodeProxy(customizable, proxyTarget, instance) as unknown as Schema;\n\t\t}\n\n\t\tpublic static override buildRawNode<T2>(\n\t\t\tthis: typeof TreeNodeValid<T2>,\n\t\t\tinstance: TreeNodeValid<T2>,\n\t\t\tinput: T2,\n\t\t): UnhydratedFlexTreeNode {\n\t\t\treturn unhydratedFlexTreeFromInsertable(input as object, this as typeof Schema);\n\t\t}\n\n\t\tpublic static get allowedTypesIdentifiers(): ReadonlySet<string> {\n\t\t\treturn lazyAllowedTypesIdentifiers.value;\n\t\t}\n\n\t\tpublic static get simpleAllowedTypes(): ReadonlyMap<\n\t\t\tstring,\n\t\t\tSimpleAllowedTypeAttributes<SchemaType.View>\n\t\t> {\n\t\t\treturn lazySimpleAllowedTypes.value;\n\t\t}\n\n\t\tprotected static override constructorCached: MostDerivedData | undefined = undefined;\n\n\t\tprotected static override oneTimeSetup(): TreeNodeSchemaInitializedData {\n\t\t\t// First run, do extra validation.\n\t\t\t// TODO: provide a way for TreeConfiguration to trigger this same validation to ensure it gets run early.\n\t\t\t// Scan for shadowing inherited members which won't work, but stop scan early to allow shadowing built in (which seems to work ok).\n\t\t\t{\n\t\t\t\tlet prototype: object = this.prototype;\n\t\t\t\t// There isn't a clear cleaner way to author this loop.\n\t\t\t\twhile (prototype !== Schema.prototype) {\n\t\t\t\t\t// Search prototype keys and check for positive integers. Throw if any are found.\n\t\t\t\t\t// Shadowing of index properties on array nodes is not supported.\n\t\t\t\t\tfor (const key of Object.getOwnPropertyNames(prototype)) {\n\t\t\t\t\t\tconst maybeIndex = asIndex(key, Number.POSITIVE_INFINITY);\n\t\t\t\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\t`Schema ${identifier} defines an inherited index property \"${key.toString()}\" which shadows a possible array index. Shadowing of array indices is not permitted.`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Since this stops at the array node base schema, it should never see a null prototype, so this case is safe.\n\t\t\t\t\t// Additionally, if the prototype chain is ever messed up such that the array base schema is not in it,\n\t\t\t\t\t// the null that would show up here does at least ensure this code throws instead of hanging.\n\t\t\t\t\tprototype = Reflect.getPrototypeOf(prototype) as object;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst schema = this as ArrayNodeSchema;\n\n\t\t\treturn getTreeNodeSchemaInitializedData(this, {\n\t\t\t\tshallowCompatibilityTest: (data: FactoryContent): CompatibilityLevel =>\n\t\t\t\t\tshallowCompatibilityTest(data, schema),\n\t\t\t\ttoFlexContent: (\n\t\t\t\t\tdata: FactoryContent,\n\t\t\t\t\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n\t\t\t\t): FlexContent => arrayToFlexContent(data, schema),\n\t\t\t});\n\t\t}\n\n\t\tpublic static readonly identifier = identifier;\n\t\tpublic static readonly info = info;\n\t\tpublic static readonly implicitlyConstructable: ImplicitlyConstructable =\n\t\t\timplicitlyConstructable;\n\t\tpublic static get childTypes(): ReadonlySet<TreeNodeSchema> {\n\t\t\treturn normalizedTypes.evaluateSet();\n\t\t}\n\t\tpublic static readonly metadata: NodeSchemaMetadata<TCustomMetadata> =\n\t\t\tnodeOptions.metadata ?? {};\n\t\tpublic static readonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined =\n\t\t\tpersistedMetadata;\n\n\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\tpublic get [typeNameSymbol](): TName {\n\t\t\treturn identifier;\n\t\t}\n\t\tpublic get [typeSchemaSymbol](): Output {\n\t\t\treturn Schema.constructorCached?.constructor as unknown as Output;\n\t\t}\n\n\t\tprotected get childSchema(): T {\n\t\t\treturn info;\n\t\t}\n\t\tprotected get allowedTypes(): ReadonlySet<TreeNodeSchema> {\n\t\t\treturn normalizedTypes.evaluateSet();\n\t\t}\n\n\t\tpublic static get [privateDataSymbol](): TreeNodeSchemaPrivateData {\n\t\t\treturn (privateData ??= createTreeNodeSchemaPrivateData(this, [normalizedTypes]));\n\t\t}\n\t}\n\n\tconst output: Output = Schema;\n\treturn output;\n}\n\n/**\n * Transforms data for a child of an array.\n * @param child - The tree data to be transformed.\n * @param allowedTypes - The set of types allowed by the parent context. Used to validate the input tree.\n */\nfunction arrayChildToFlexTree(\n\tchild: InsertableContent,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): FlexTreeNode {\n\t// We do not support undefined sequence entries.\n\t// If we encounter an undefined entry, use null instead if supported by the schema, otherwise throw.\n\tlet childWithFallback = child;\n\tif (child === undefined) {\n\t\tif (allowedTypes.has(nullSchema)) {\n\t\t\tchildWithFallback = null;\n\t\t} else {\n\t\t\tthrow new TypeError(`Received unsupported array entry value: ${child}.`);\n\t\t}\n\t}\n\treturn flexTreeFromInsertableNode(childWithFallback, allowedTypes);\n}\n\n/**\n * {@link TreeNodeSchemaInitializedData.toFlexContent} for Array nodes.\n *\n * @param data - The tree data to be transformed. Must be an iterable.\n * @param schema - The schema to comply with.\n */\nfunction arrayToFlexContent(data: FactoryContent, schema: ArrayNodeSchema): FlexContent {\n\tif (!(typeof data === \"object\" && data !== null && Symbol.iterator in data)) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\tthrow new UsageError(`Input data is incompatible with Array schema: ${data}`);\n\t}\n\n\tconst allowedChildTypes = normalizeAllowedTypes(schema.info);\n\n\tconst mappedData = Array.from(data, (child) =>\n\t\tarrayChildToFlexTree(child, allowedChildTypes.evaluateSet()),\n\t);\n\n\tconst context = getUnhydratedContext(schema).flexContext;\n\n\t// Array nodes have a single `EmptyKey` field:\n\tconst fieldsEntries =\n\t\tmappedData.length === 0\n\t\t\t? []\n\t\t\t: ([\n\t\t\t\t\t[\n\t\t\t\t\t\tEmptyKey,\n\t\t\t\t\t\tnew UnhydratedSequenceField(\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tFieldKinds.sequence.identifier,\n\t\t\t\t\t\t\tEmptyKey,\n\t\t\t\t\t\t\tmappedData,\n\t\t\t\t\t\t),\n\t\t\t\t\t],\n\t\t\t\t] as const);\n\n\treturn [\n\t\t{\n\t\t\ttype: brand(schema.identifier),\n\t\t},\n\t\tnew Map(fieldsEntries),\n\t];\n}\n\n/**\n * {@link TreeNodeSchemaInitializedData.shallowCompatibilityTest} for Array nodes.\n */\nfunction shallowCompatibilityTest(\n\tdata: FactoryContent,\n\tschema: ArrayNodeSchema,\n): CompatibilityLevel {\n\tif (isTreeValue(data)) {\n\t\treturn CompatibilityLevel.None;\n\t}\n\n\tif (data instanceof Map) {\n\t\t// Maps are iterable, so type checking does allow constructing an ArrayNode from a map if the ArrayNode's type is an array that includes the key and value types of the map.\n\t\treturn CompatibilityLevel.Low;\n\t}\n\n\tif (Symbol.iterator in data) {\n\t\treturn CompatibilityLevel.Normal;\n\t}\n\n\treturn CompatibilityLevel.None;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"arrayNode.js","sourceRoot":"","sources":["../../../../src/simple-tree/node-kinds/array/arrayNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAM1E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EACN,KAAK,EACL,aAAa,EACb,kBAAkB,GAElB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,kBAAkB;AAElB,kDAAkD;AAClD,cAAc,EACd,QAAQ,EAIR,gBAAgB,EAChB,4BAA4B,EAC5B,gCAAgC,EAChC,YAAY,EAEZ,SAAS,EAET,uBAAuB,EACvB,mCAAmC,EACnC,qBAAqB,EAMrB,aAAa,EAIb,iBAAiB,EACjB,+BAA+B,EAG/B,sBAAsB,EACtB,6BAA6B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,gCAAgC,EAChC,o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CAAC;IAClC,CAAC;IAED,OAAO,kBAAkB,CAAC,IAAI,CAAC;AAChC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Lazy, oob, fail, assert } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { EmptyKey, ObjectNodeStoredSchema } from \"../../../core/index.js\";\nimport type {\n\tFlexibleFieldContent,\n\tFlexTreeNode,\n\tFlexTreeSequenceField,\n} from \"../../../feature-libraries/index.js\";\nimport { FieldKinds, isTreeValue } from \"../../../feature-libraries/index.js\";\nimport {\n\tbrand,\n\tvalidateIndex,\n\tvalidateIndexRange,\n\ttype JsonCompatibleReadOnlyObject,\n} from \"../../../util/index.js\";\nimport type { NodeSchemaOptionsAlpha, System_Unsafe } from \"../../api/index.js\";\nimport {\n\tCompatibilityLevel,\n\ttype WithType,\n\t// eslint-disable-next-line import-x/no-deprecated\n\ttypeNameSymbol,\n\tNodeKind,\n\ttype TreeNode,\n\ttype InternalTreeNode,\n\ttype TreeNodeSchema,\n\ttypeSchemaSymbol,\n\tgetOrCreateNodeFromInnerNode,\n\tgetSimpleNodeSchemaFromInnerNode,\n\tgetInnerNode,\n\ttype TreeNodeSchemaClass,\n\tgetKernel,\n\ttype UnhydratedFlexTreeNode,\n\tUnhydratedSequenceField,\n\tgetOrCreateNodeFromInnerUnboxedNode,\n\tnormalizeAllowedTypes,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype NodeSchemaMetadata,\n\ttype TreeLeafValue,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\tTreeNodeValid,\n\ttype MostDerivedData,\n\ttype TreeNodeSchemaInitializedData,\n\ttype TreeNodeSchemaCorePrivate,\n\tprivateDataSymbol,\n\tcreateTreeNodeSchemaPrivateData,\n\ttype FlexContent,\n\ttype TreeNodeSchemaPrivateData,\n\twithBufferedTreeEvents,\n\tAnnotatedAllowedTypesInternal,\n} from \"../../core/index.js\";\nimport {\n\tgetTreeNodeSchemaInitializedData,\n\tgetUnhydratedContext,\n} from \"../../createContext.js\";\nimport { nullSchema } from \"../../leafNodeSchema.js\";\nimport { prepareArrayContentForInsertion } from \"../../prepareForInsertion.js\";\nimport type { SchemaType, SimpleAllowedTypeAttributes } from \"../../simpleSchema.js\";\nimport {\n\ttype FactoryContent,\n\ttype InsertableContent,\n\tunhydratedFlexTreeFromInsertable,\n\tunhydratedFlexTreeFromInsertableNode,\n} from \"../../unhydratedFlexTreeFromInsertable.js\";\n\nimport type {\n\tArrayNodeCustomizableSchema,\n\tArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n} from \"./arrayNodeTypes.js\";\n\n/**\n * A covariant base type for {@link (TreeArrayNode:interface)}.\n *\n * This provides the readonly subset of TreeArrayNode functionality, and is used as the source interface for moves since that needs to be covariant.\n * @privateRemarks\n * Ideally this would just include `TreeNode, WithType<string, NodeKind.Array>` in the extends list but https://github.com/microsoft/TypeScript/issues/16936 prevents that from compiling.\n * As a workaround around for this TypeScript limitation, the conflicting type intersection is wrapped in `Awaited` (which has no effect on the type in this case) which allows it to compile.\n * @system @sealed @public\n */\nexport interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue>\n\textends ReadonlyArray<T>,\n\t\tAwaited<TreeNode & WithType<string, NodeKind.Array>> {}\n\n/**\n * A {@link TreeNode} which implements 'readonly T[]' and the array mutation APIs.\n *\n * @typeParam TAllowedTypes - Schema for types which are allowed as members of this array.\n * @typeParam T - Use Default: Do not specify. Type of values to read from the array.\n * @typeParam TNew - Use Default: Do not specify. Type of values to write into the array.\n * @typeParam TMoveFrom - Use Default: Do not specify. Type of node from which children can be moved into this array.\n *\n * @sealed @public\n */\nexport interface TreeArrayNode<\n\tTAllowedTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe = ImplicitAllowedTypes,\n\tout T = [TAllowedTypes] extends [ImplicitAllowedTypes]\n\t\t? TreeNodeFromImplicitAllowedTypes<TAllowedTypes>\n\t\t: TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>,\n\tin TNew = [TAllowedTypes] extends [ImplicitAllowedTypes]\n\t\t? InsertableTreeNodeFromImplicitAllowedTypes<TAllowedTypes>\n\t\t: InsertableTreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>,\n\tin TMoveFrom = ReadonlyArrayNode,\n> extends ReadonlyArrayNode<T> {\n\t/**\n\t * Inserts new item(s) at a specified location.\n\t * @param index - The index at which to insert `value`.\n\t * @param value - The content to insert.\n\t * @throws Throws if `index` is not in the range [0, `array.length`).\n\t */\n\tinsertAt(index: number, ...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;\n\n\t/**\n\t * Inserts new item(s) at the start of the array.\n\t * @param value - The content to insert.\n\t */\n\tinsertAtStart(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;\n\n\t/**\n\t * Inserts new item(s) at the end of the array.\n\t * @param value - The content to insert.\n\t */\n\tinsertAtEnd(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;\n\n\t/**\n\t * Removes the item at the specified location.\n\t * @param index - The index at which to remove the item.\n\t * @throws Throws if `index` is not in the range [0, `array.length`).\n\t */\n\tremoveAt(index: number): void;\n\n\t/**\n\t * Removes all items between the specified indices.\n\t * @param start - The starting index of the range to remove (inclusive). Defaults to the start of the array.\n\t * @param end - The ending index of the range to remove (exclusive). Defaults to `array.length`.\n\t * @throws Throws if `start` is not in the range [0, `array.length`].\n\t * @throws Throws if `end` is less than `start`.\n\t * If `end` is not supplied or is greater than the length of the array, all items after `start` are removed.\n\t *\n\t * @remarks\n\t * The default values for start and end are computed when this is called,\n\t * and thus the behavior is the same as providing them explicitly, even with respect to merge resolution with concurrent edits.\n\t * For example, two concurrent transactions both emptying the array with `node.removeRange()` then inserting an item,\n\t * will merge to result in the array having both inserted items.\n\t */\n\tremoveRange(start?: number, end?: number): void;\n\n\t/**\n\t * Moves the specified item to the start of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToStart(sourceIndex: number): void;\n\n\t/**\n\t * Moves the specified item to the start of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @param source - The source array to move the item out of.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToStart(sourceIndex: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified item to the end of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToEnd(sourceIndex: number): void;\n\n\t/**\n\t * Moves the specified item to the end of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @param source - The source array to move the item out of.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToEnd(sourceIndex: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified item to the desired location in the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceIndex - The index of the item to move.\n\t * @throws Throws if any of the input indices are not in the range [0, `array.length`).\n\t */\n\tmoveToIndex(destinationGap: number, sourceIndex: number): void;\n\n\t/**\n\t * Moves the specified item to the desired location in the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceIndex - The index of the item to move.\n\t * @param source - The source array to move the item out of.\n\t * @throws Throws if any of the source index is not in the range [0, `array.length`),\n\t * or if the index is not in the range [0, `array.length`].\n\t */\n\tmoveToIndex(destinationGap: number, sourceIndex: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified items to the start of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @throws Throws if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToStart(sourceStart: number, sourceEnd: number): void;\n\n\t/**\n\t * Moves the specified items to the start of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @param source - The source array to move items out of.\n\t * @throws Throws if the types of any of the items being moved are not allowed in the destination array,\n\t * if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToStart(sourceStart: number, sourceEnd: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified items to the end of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @throws Throws if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToEnd(sourceStart: number, sourceEnd: number): void;\n\n\t/**\n\t * Moves the specified items to the end of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @param source - The source array to move items out of.\n\t * @throws Throws if the types of any of the items being moved are not allowed in the destination array,\n\t * if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToEnd(sourceStart: number, sourceEnd: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified items to the desired location within the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @throws Throws if any of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToIndex(destinationGap: number, sourceStart: number, sourceEnd: number): void;\n\n\t/**\n\t * Moves the specified items to the desired location within the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @param source - The source array to move items out of.\n\t * @throws Throws if the types of any of the items being moved are not allowed in the destination array,\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToIndex(\n\t\tdestinationGap: number,\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource: TMoveFrom,\n\t): void;\n\n\t/**\n\t * Returns a custom IterableIterator which throws usage errors if concurrent editing and iteration occurs.\n\t */\n\tvalues(): IterableIterator<T>;\n}\n\n/**\n * A {@link TreeNode} which implements 'readonly T[]' and the array mutation APIs.\n * @public\n */\nexport const TreeArrayNode = {\n\t/**\n\t * Wrap an iterable of items to inserted as consecutive items in a array.\n\t * @remarks\n\t * The object returned by this function can be inserted into a {@link (TreeArrayNode:interface)}.\n\t * Its contents will be inserted consecutively in the corresponding location in the array.\n\t * @example\n\t * ```ts\n\t * array.insertAtEnd(TreeArrayNode.spread(iterable))\n\t * ```\n\t */\n\tspread: <T>(content: Iterable<T>) => create(content),\n} as const;\n\n/**\n * Package internal construction API.\n * Use {@link (TreeArrayNode:variable).spread} to create an instance of this type instead.\n */\nlet create: <T>(content: Iterable<T>) => IterableTreeArrayContent<T>;\n\n/**\n * Used to insert iterable content into a {@link (TreeArrayNode:interface)}.\n * Use {@link (TreeArrayNode:variable).spread} to create an instance of this type.\n * @sealed @public\n */\nexport class IterableTreeArrayContent<T> implements Iterable<T> {\n\tstatic {\n\t\tcreate = <T2>(content: Iterable<T2>) => new IterableTreeArrayContent(content);\n\t}\n\n\tprivate constructor(private readonly content: Iterable<T>) {}\n\n\t/**\n\t * Iterates over content for nodes to insert.\n\t */\n\tpublic [Symbol.iterator](): Iterator<T> {\n\t\treturn this.content[Symbol.iterator]();\n\t}\n}\n\n/**\n * Given a array node proxy, returns its underlying LazySequence field.\n */\nfunction getSequenceField(arrayNode: ReadonlyArrayNode): FlexTreeSequenceField {\n\treturn getInnerNode(arrayNode).getBoxed(EmptyKey) as FlexTreeSequenceField;\n}\n\n// For compatibility, we are initially implement 'readonly T[]' by applying the Array.prototype methods\n// to the array node proxy. Over time, we should replace these with efficient implementations on LazySequence\n// to avoid re-entering the proxy as these methods access 'length' and the indexed properties.\n//\n// For brevity, the current implementation dynamically builds a property descriptor map from a list of\n// Array functions we want to re-expose via the proxy.\n\nconst arrayPrototypeKeys = [\n\t\"concat\",\n\t\"entries\",\n\t\"every\",\n\t\"filter\",\n\t\"find\",\n\t\"findIndex\",\n\t\"flat\",\n\t\"flatMap\",\n\t\"forEach\",\n\t\"includes\",\n\t\"indexOf\",\n\t\"join\",\n\t\"keys\",\n\t\"lastIndexOf\",\n\t\"map\",\n\t\"reduce\",\n\t\"reduceRight\",\n\t\"slice\",\n\t\"some\",\n\t\"toLocaleString\",\n\t\"toString\",\n\n\t// \"copyWithin\",\n\t// \"fill\",\n\t// \"length\",\n\t// \"pop\",\n\t// \"push\",\n\t// \"reverse\",\n\t// \"shift\",\n\t// \"sort\",\n\t// \"splice\",\n\t// \"unshift\",\n] as const;\n\n/**\n * {@link TreeNodeValid}, but modified to add members from Array.prototype named in {@link arrayPrototypeKeys}.\n * @privateRemarks\n * Since a lot of scratch types and values are involved with creating this,\n * it's generating using an immediately invoked function expression (IIFE).\n * This is a common JavaScript pattern for cases like this to avoid cluttering the scope.\n */\nconst TreeNodeWithArrayFeatures = (() => {\n\t/**\n\t * {@link TreeNodeValid}, but modified to add members from Array.prototype named in {@link arrayPrototypeKeys}.\n\t */\n\tabstract class TreeNodeWithArrayFeaturesUntyped<\n\t\tconst T extends ImplicitAllowedTypes,\n\t> extends TreeNodeValid<Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>> {}\n\n\t// Modify TreeNodeWithArrayFeaturesUntyped to add the members from Array.prototype\n\tfor (const key of arrayPrototypeKeys) {\n\t\tObject.defineProperty(TreeNodeWithArrayFeaturesUntyped.prototype, key, {\n\t\t\tvalue: Array.prototype[key],\n\t\t});\n\t}\n\n\treturn TreeNodeWithArrayFeaturesUntyped as unknown as typeof NodeWithArrayFeatures;\n})();\n\n/**\n * Type of {@link TreeNodeValid}, but with array members added to the instance type.\n *\n * TypeScript has a rule that `Base constructors must all have the same return type.ts(2510)`.\n * This means that intersecting two types with different constructors to create a type with a more constrained constructor (ex: more specific return type)\n * is not supported.\n *\n * TypeScript also has a limitation that there is no way to replace or remove just the constructor of a type without losing all the private and protected members.\n * See https://github.com/microsoft/TypeScript/issues/35416 for details.\n *\n * TypeScript also does not support explicitly specifying the instance type in a class definition as the constructor return type.\n *\n * Thus to replace the instance type, while preserving the protected static members of TreeNodeValid,\n * the only option seems to be actually declaring a class with all the members explicitly inline.\n *\n * To avoid incurring any bundle size / runtime overhead from this and having to stub out the function bodies,\n * the class uses `declare`.\n * TypeScript does not support `declare` inside scopes, so this is not inside the function scope above.\n *\n * The members of this class were generated using the \"implement interface\" refactoring.\n * Since that refactoring does not add `public`, the lint to require it is disabled for this section of the file.\n * To update this class delete all members and reapply the \"implement interface\" refactoring.\n * As these signatures get formatted to be over three times as many lines with prettier (which is not helpful), it is also suppressed.\n */\n/* eslint-disable @typescript-eslint/explicit-member-accessibility, @typescript-eslint/no-explicit-any */\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare abstract class NodeWithArrayFeatures<Input, T>\n\textends TreeNodeValid<Input>\n\timplements Pick<readonly T[], (typeof arrayPrototypeKeys)[number]>\n{\n\tconcat(...items: ConcatArray<T>[]): T[];\n\tconcat(...items: (T | ConcatArray<T>)[]): T[];\n\tentries(): IterableIterator<[number, T]>;\n\tevery<S extends T>(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => value is S,\n\t\tthisArg?: any,\n\t): this is readonly S[];\n\tevery(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): boolean;\n\tfilter<S extends T>(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => value is S,\n\t\tthisArg?: any,\n\t): S[];\n\tfilter(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): T[];\n\tfind<S extends T>(\n\t\tpredicate: (value: T, index: number, obj: readonly T[]) => value is S,\n\t\tthisArg?: any,\n\t): S | undefined;\n\tfind(\n\t\tpredicate: (value: T, index: number, obj: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): T | undefined;\n\tfindIndex(\n\t\tpredicate: (value: T, index: number, obj: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): number;\n\tflat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];\n\tflatMap<U, This = undefined>(\n\t\tcallback: (this: This, value: T, index: number, array: T[]) => U | readonly U[],\n\t\tthisArg?: This | undefined,\n\t): U[];\n\tforEach(\n\t\tcallbackfn: (value: T, index: number, array: readonly T[]) => void,\n\t\tthisArg?: any,\n\t): void;\n\tincludes(searchElement: T, fromIndex?: number | undefined): boolean;\n\tindexOf(searchElement: T, fromIndex?: number | undefined): number;\n\tjoin(separator?: string | undefined): string;\n\tkeys(): IterableIterator<number>;\n\tlastIndexOf(searchElement: T, fromIndex?: number | undefined): number;\n\tmap<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[];\n\treduce(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t): T;\n\treduce(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t\tinitialValue: T,\n\t): T;\n\treduce<U>(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: U,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => U,\n\t\tinitialValue: U,\n\t): U;\n\treduceRight(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t): T;\n\treduceRight(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t\tinitialValue: T,\n\t): T;\n\treduceRight<U>(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: U,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => U,\n\t\tinitialValue: U,\n\t): U;\n\tslice(start?: number | undefined, end?: number | undefined): T[];\n\tsome(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): boolean;\n\ttoLocaleString(): string;\n\ttoString(): string;\n}\n/* eslint-enable @typescript-eslint/explicit-member-accessibility, @typescript-eslint/no-explicit-any */\n\n/**\n * Attempts to coerce the given property key to an integer index property.\n * @param key - The property key to coerce.\n * @param exclusiveMax - This restricts the range in which the resulting index is allowed to be.\n * The coerced index of `key` must be less than `exclusiveMax` or else this function will return `undefined`.\n * This is useful for reading an array within the bounds of its length, e.g. `asIndex(key, array.length)`.\n */\nexport function asIndex(key: string | symbol, exclusiveMax: number): number | undefined {\n\tif (typeof key !== \"string\") {\n\t\treturn undefined;\n\t}\n\n\t// TODO: It may be worth a '0' <= ch <= '9' check before calling 'Number' to quickly\n\t// reject 'length' as an index, or even parsing integers ourselves.\n\tconst asNumber = Number(key);\n\tif (!Number.isInteger(asNumber)) {\n\t\treturn undefined;\n\t}\n\n\t// Check that the original string is the same after converting to a number and back again.\n\t// This prevents keys like \"5.0\", \"0x5\", \" 5\" from coercing to 5, and keys like \" \" or \"\" from coercing to 0.\n\tconst asString = String(asNumber);\n\tif (asString !== key) {\n\t\treturn undefined;\n\t}\n\n\t// TODO: See 'matrix/range.ts' for fast integer coercing + range check.\n\treturn 0 <= asNumber && asNumber < exclusiveMax ? asNumber : undefined;\n}\n\n/**\n * Create a proxy which implements the {@link TreeArrayNode} API.\n * @param allowAdditionalProperties - If true, setting of unexpected properties will be forwarded to the target object.\n * Otherwise setting of unexpected properties will error.\n * @param proxyTarget - Target object of the proxy. Must provide an own `length` value property\n * (which is not used but must exist for getOwnPropertyDescriptor invariants) and the array functionality from {@link arrayNodePrototype}.\n * Controls the prototype exposed by the produced proxy.\n * @param dispatchTarget - provides the functionally of the node, implementing all fields.\n */\nfunction createArrayNodeProxy(\n\tallowAdditionalProperties: boolean,\n\tproxyTarget: object,\n\tdispatchTarget: object,\n): TreeArrayNode {\n\t// To satisfy 'deepEquals' level scrutiny, the target of the proxy must be an array literal in order\n\t// to pass 'Object.getPrototypeOf'. It also satisfies 'Array.isArray' and 'Object.prototype.toString'\n\t// requirements without use of Array[Symbol.species], which is potentially on a path to deprecation.\n\tconst proxy: TreeArrayNode = new Proxy<TreeArrayNode>(proxyTarget as TreeArrayNode, {\n\t\tget: (target, key, receiver) => {\n\t\t\tconst field = getSequenceField(receiver);\n\t\t\tconst maybeIndex = asIndex(key, field.length);\n\n\t\t\tif (maybeIndex === undefined) {\n\t\t\t\tif (key === \"length\") {\n\t\t\t\t\treturn field.length;\n\t\t\t\t}\n\n\t\t\t\t// In NodeJS 22, assert.strict.deepEqual started special casing well known constructors like Array.\n\t\t\t\t// That made this necessary, ensuring that in POJO mode, TreeArrayNode are still deepEqual to arrays.\n\t\t\t\tif (key === \"constructor\") {\n\t\t\t\t\treturn proxyTarget.constructor;\n\t\t\t\t}\n\n\t\t\t\t// Pass the proxy as the receiver here, so that any methods on\n\t\t\t\t// the prototype receive `proxy` as `this`.\n\t\t\t\treturn Reflect.get(dispatchTarget, key, receiver) as unknown;\n\t\t\t}\n\n\t\t\tconst maybeContent = field.at(maybeIndex);\n\t\t\treturn maybeContent === undefined\n\t\t\t\t? undefined\n\t\t\t\t: getOrCreateNodeFromInnerUnboxedNode(maybeContent);\n\t\t},\n\t\tset: (target, key, newValue, receiver) => {\n\t\t\tif (key === \"length\") {\n\t\t\t\t// To allow \"length\" to look like \"length\" on an array, getOwnPropertyDescriptor has to report it as a writable value.\n\t\t\t\t// This means the proxy target must provide a length value, but since it can't use getters and setters, it can't be correct.\n\t\t\t\t// Therefor length has to be handled in this proxy.\n\t\t\t\t// Since it's not actually mutable, return false so setting it will produce a type error.\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// 'Symbol.isConcatSpreadable' may be set on an Array instance to modify the behavior of\n\t\t\t// the concat method. We allow this property to be added to the dispatch object.\n\t\t\tif (key === Symbol.isConcatSpreadable) {\n\t\t\t\treturn Reflect.set(dispatchTarget, key, newValue, receiver);\n\t\t\t}\n\n\t\t\t// Array nodes treat all non-negative integer indexes as array access.\n\t\t\t// Using Infinity here (rather than length) ensures that indexing past the end doesn't create additional session local properties.\n\t\t\tconst maybeIndex = asIndex(key, Number.POSITIVE_INFINITY);\n\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\t// For MVP, we otherwise disallow setting properties (mutation is only available via the array node mutation APIs).\n\t\t\t\t// To ensure a clear and actionable error experience, we will throw explicitly here, rather than just returning false.\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot set indexed properties on array nodes. Use array node mutation APIs to alter the array.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn allowAdditionalProperties ? Reflect.set(target, key, newValue, receiver) : false;\n\t\t},\n\t\thas: (target, key) => {\n\t\t\tconst field = getSequenceField(proxy);\n\t\t\tconst maybeIndex = asIndex(key, field.length);\n\t\t\treturn maybeIndex !== undefined || Reflect.has(dispatchTarget, key);\n\t\t},\n\t\townKeys: (target) => {\n\t\t\tconst field = getSequenceField(proxy);\n\n\t\t\t// TODO: Would a lazy iterator to produce the indexes work / be more efficient?\n\t\t\t// TODO: Need to surface 'Symbol.isConcatSpreadable' as an own key.\n\t\t\tconst keys: (string | symbol)[] = Array.from(\n\t\t\t\t{ length: field.length },\n\t\t\t\t(_, index) => `${index}`,\n\t\t\t);\n\n\t\t\tif (allowAdditionalProperties) {\n\t\t\t\tkeys.push(...Reflect.ownKeys(target));\n\t\t\t} else {\n\t\t\t\tkeys.push(\"length\");\n\t\t\t}\n\t\t\treturn keys;\n\t\t},\n\t\tgetOwnPropertyDescriptor: (target, key) => {\n\t\t\tconst field = getSequenceField(proxy);\n\t\t\tconst maybeIndex = asIndex(key, field.length);\n\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\tconst val = field.at(maybeIndex);\n\t\t\t\t// To satisfy 'deepEquals' level scrutiny, the property descriptor for indexed properties must\n\t\t\t\t// be a simple value property (as opposed to using getter) and declared writable/enumerable/configurable.\n\t\t\t\treturn {\n\t\t\t\t\tvalue: val === undefined ? undefined : getOrCreateNodeFromInnerUnboxedNode(val),\n\t\t\t\t\twritable: true, // For MVP, setting indexed properties is reported as allowed here (for deep equals compatibility noted above), but not actually supported.\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t};\n\t\t\t} else if (key === \"length\") {\n\t\t\t\t// To satisfy 'deepEquals' level scrutiny, the property descriptor for 'length' must be a simple\n\t\t\t\t// value property (as opposed to using getter) and be declared writable / non-configurable.\n\t\t\t\treturn {\n\t\t\t\t\tvalue: field.length,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn Reflect.getOwnPropertyDescriptor(dispatchTarget, key);\n\t\t},\n\t\tdefineProperty(target, key, attributes) {\n\t\t\tconst maybeIndex = asIndex(key, Number.POSITIVE_INFINITY);\n\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\tthrow new UsageError(\"Shadowing of array indices is not permitted.\");\n\t\t\t}\n\t\t\treturn Reflect.defineProperty(dispatchTarget, key, attributes);\n\t\t},\n\t});\n\treturn proxy;\n}\n\ntype Insertable<T extends ImplicitAllowedTypes> = readonly (\n\t| InsertableTreeNodeFromImplicitAllowedTypes<T>\n\t| IterableTreeArrayContent<InsertableTreeNodeFromImplicitAllowedTypes<T>>\n)[];\n\nabstract class CustomArrayNodeBase<const T extends ImplicitAllowedTypes>\n\textends TreeNodeWithArrayFeatures<\n\t\tIterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>,\n\t\tTreeNodeFromImplicitAllowedTypes<T>\n\t>\n\timplements TreeArrayNode<T>\n{\n\t// Indexing must be provided by subclass.\n\t[k: number]: TreeNodeFromImplicitAllowedTypes<T>;\n\n\tpublic static readonly kind = NodeKind.Array;\n\n\tprotected abstract get childSchema(): ImplicitAllowedTypes;\n\tprotected abstract get allowedTypes(): ReadonlySet<TreeNodeSchema>;\n\n\tpublic abstract override get [typeSchemaSymbol](): TreeNodeSchemaClass<\n\t\tstring,\n\t\tNodeKind.Array\n\t>;\n\n\tpublic constructor(\n\t\tinput?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>> | InternalTreeNode,\n\t) {\n\t\tsuper(input ?? []);\n\t}\n\n\t#mapTreesFromFieldData(value: Insertable<T>): FlexibleFieldContent {\n\t\tconst sequenceField = getSequenceField(this);\n\t\tconst content = value as readonly (\n\t\t\t| InsertableContent\n\t\t\t| IterableTreeArrayContent<InsertableContent>\n\t\t)[];\n\n\t\tconst contentArray = content.flatMap((c): InsertableContent[] =>\n\t\t\tc instanceof IterableTreeArrayContent ? [...c] : [c],\n\t\t);\n\n\t\tconst kernel = getKernel(this);\n\t\tconst flexContext = kernel.getInnerNode().context;\n\t\tassert(\n\t\t\tflexContext === kernel.context.flexContext,\n\t\t\t0xc14 /* Expected flexContext to match */,\n\t\t);\n\t\tconst innerSchema = kernel.context.flexContext.schema.nodeSchema.get(\n\t\t\tbrand(kernel.schema.identifier),\n\t\t);\n\t\tassert(\n\t\t\tinnerSchema instanceof ObjectNodeStoredSchema,\n\t\t\t0xc15 /* Expected ObjectNodeStoredSchema */,\n\t\t);\n\t\tconst fieldSchema = innerSchema.getFieldSchema(EmptyKey);\n\n\t\tconst mapTrees = prepareArrayContentForInsertion(\n\t\t\tcontentArray,\n\t\t\tthis.childSchema,\n\t\t\tsequenceField.context,\n\t\t\tfieldSchema.types,\n\t\t);\n\n\t\treturn mapTrees;\n\t}\n\n\tpublic toJSON(): unknown {\n\t\t// This override causes the class instance to `JSON.stringify` as `[a, b]` rather than `{0: a, 1: b}`.\n\t\treturn [...(this as unknown as TreeArrayNode)];\n\t}\n\n\t// Instances of this class are used as the dispatch object for the proxy,\n\t// and thus its set of keys is used to implement `has` (for the `in` operator) for the non-numeric cases.\n\t// Therefore it must include `length`,\n\t// even though this \"length\" is never invoked (due to being shadowed by the proxy provided own property).\n\tpublic get length(): number {\n\t\treturn fail(0xadb /* Proxy should intercept length */);\n\t}\n\n\tpublic [Symbol.iterator](): IterableIterator<TreeNodeFromImplicitAllowedTypes<T>> {\n\t\treturn this.values();\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tpublic get [Symbol.unscopables]() {\n\t\t// This might not be the exact right set of values, but it only matters for `with` clauses which are deprecated and are banned in strict mode, so it shouldn't matter much.\n\t\t// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with for details.\n\t\treturn Array.prototype[Symbol.unscopables];\n\t}\n\n\tpublic at(\n\t\tthis: TreeArrayNode<T>,\n\t\tindex: number,\n\t): TreeNodeFromImplicitAllowedTypes<T> | undefined {\n\t\tconst field = getSequenceField(this);\n\t\tconst val = field.boxedAt(index);\n\n\t\tif (val === undefined) {\n\t\t\treturn val;\n\t\t}\n\n\t\treturn getOrCreateNodeFromInnerNode(val) as TreeNodeFromImplicitAllowedTypes<T>;\n\t}\n\tpublic insertAt(index: number, ...value: Insertable<T>): void {\n\t\tconst field = getSequenceField(this);\n\t\tvalidateIndex(index, field, \"TreeArrayNode.insertAt\", true);\n\t\tconst content = this.#mapTreesFromFieldData(value);\n\t\tfield.editor.insert(index, content);\n\t}\n\tpublic insertAtStart(...value: Insertable<T>): void {\n\t\tthis.insertAt(0, ...value);\n\t}\n\tpublic insertAtEnd(...value: Insertable<T>): void {\n\t\tthis.insertAt(this.length, ...value);\n\t}\n\tpublic removeAt(index: number): void {\n\t\tconst field = getSequenceField(this);\n\t\tvalidateIndex(index, field, \"TreeArrayNode.removeAt\");\n\t\tfield.editor.remove(index, 1);\n\t}\n\tpublic removeRange(start?: number, end?: number): void {\n\t\tconst field = getSequenceField(this);\n\t\tconst { length, editor } = field;\n\t\tconst removeStart = start ?? 0;\n\t\tvalidateIndex(removeStart, field, \"TreeArrayNode.removeRange\", true);\n\n\t\tconst removeEnd = Math.min(length, end ?? length);\n\t\tvalidateIndexRange(removeStart, removeEnd, field, \"TreeArrayNode.removeRange\");\n\n\t\teditor.remove(removeStart, removeEnd - removeStart);\n\t}\n\tpublic moveToStart(sourceIndex: number, source?: ReadonlyArrayNode): void {\n\t\tconst sourceArray = source ?? this;\n\t\tconst sourceField = getSequenceField(sourceArray);\n\t\tvalidateIndex(sourceIndex, sourceField, \"TreeArrayNode.moveToStart\");\n\t\tthis.moveRangeToIndex(0, sourceIndex, sourceIndex + 1, source);\n\t}\n\tpublic moveToEnd(sourceIndex: number, source?: ReadonlyArrayNode): void {\n\t\tconst sourceArray = source ?? this;\n\t\tconst sourceField = getSequenceField(sourceArray);\n\t\tvalidateIndex(sourceIndex, sourceField, \"TreeArrayNode.moveToEnd\");\n\t\tthis.moveRangeToIndex(this.length, sourceIndex, sourceIndex + 1, source);\n\t}\n\tpublic moveToIndex(\n\t\tdestinationGap: number,\n\t\tsourceIndex: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tconst sourceArray = source ?? this;\n\t\tconst sourceField = getSequenceField(sourceArray);\n\t\tconst destinationField = getSequenceField(this);\n\t\tvalidateIndex(destinationGap, destinationField, \"TreeArrayNode.moveToIndex\", true);\n\t\tvalidateIndex(sourceIndex, sourceField, \"TreeArrayNode.moveToIndex\");\n\t\tthis.moveRangeToIndex(destinationGap, sourceIndex, sourceIndex + 1, source);\n\t}\n\tpublic moveRangeToStart(\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tvalidateIndexRange(\n\t\t\tsourceStart,\n\t\t\tsourceEnd,\n\t\t\tsource ?? getSequenceField(this),\n\t\t\t\"TreeArrayNode.moveRangeToStart\",\n\t\t);\n\t\tthis.moveRangeToIndex(0, sourceStart, sourceEnd, source);\n\t}\n\tpublic moveRangeToEnd(\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tvalidateIndexRange(\n\t\t\tsourceStart,\n\t\t\tsourceEnd,\n\t\t\tsource ?? getSequenceField(this),\n\t\t\t\"TreeArrayNode.moveRangeToEnd\",\n\t\t);\n\t\tthis.moveRangeToIndex(this.length, sourceStart, sourceEnd, source);\n\t}\n\tpublic moveRangeToIndex(\n\t\tdestinationGap: number,\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tconst destinationField = getSequenceField(this);\n\t\tconst destinationSchema = this.allowedTypes;\n\t\tconst kernel = getKernel(this);\n\t\tconst destinationStored = (\n\t\t\tkernel.context.flexContext.schema.nodeSchema.get(brand(kernel.schema.identifier)) ??\n\t\t\tfail(0xc16 /* missing schema for array node */)\n\t\t).getFieldSchema(EmptyKey).types;\n\t\tconst sourceField = source === undefined ? destinationField : getSequenceField(source);\n\n\t\tvalidateIndex(destinationGap, destinationField, \"TreeArrayNode.moveRangeToIndex\", true);\n\t\tvalidateIndexRange(\n\t\t\tsourceStart,\n\t\t\tsourceEnd,\n\t\t\tsource ?? destinationField,\n\t\t\t\"TreeArrayNode.moveRangeToIndex\",\n\t\t);\n\n\t\t// TODO: determine support for move across different sequence types\n\t\tif (sourceField !== destinationField) {\n\t\t\tfor (let i = sourceStart; i < sourceEnd; i++) {\n\t\t\t\tconst sourceNode = sourceField.boxedAt(i) ?? oob();\n\t\t\t\tconst sourceSchema = getSimpleNodeSchemaFromInnerNode(sourceNode);\n\t\t\t\tif (!destinationSchema.has(sourceSchema)) {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Type ${sourceNode.type} in source sequence is not allowed in destination.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (!destinationStored.has(sourceNode.type)) {\n\t\t\t\t\t// TODO: better and centralized messages for missing staged schema updates.\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Type ${sourceNode.type} in source sequence is not allowed in destination's stored schema: this would likely require upgrading the document to permit a staged schema.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst movedCount = sourceEnd - sourceStart;\n\t\tif (destinationField.context.isHydrated()) {\n\t\t\tif (!sourceField.context.isHydrated()) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot move elements from an unhydrated array to a hydrated array.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (sourceField.context !== destinationField.context) {\n\t\t\t\tthrow new UsageError(\"Cannot move elements between two different TreeViews.\");\n\t\t\t}\n\n\t\t\tdestinationField.context.checkout.editor.move(\n\t\t\t\tsourceField.getFieldPath(),\n\t\t\t\tsourceStart,\n\t\t\t\tmovedCount,\n\t\t\t\tdestinationField.getFieldPath(),\n\t\t\t\tdestinationGap,\n\t\t\t);\n\t\t} else {\n\t\t\tif (!(sourceField instanceof UnhydratedSequenceField)) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot move elements from a hydrated array to an unhydrated array.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (sourceField.context.isHydrated()) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot move elements from an unhydrated array to a hydrated array.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// We implement move here via subsequent `remove` and `insert`.\n\t\t\t// This is strictly an implementation detail and should not be observable by the user.\n\t\t\t// TODO:AB#47457: Implement proper move support for unhydrated trees.\n\t\t\t// As a temporary mitigation, we will pause tree events until both edits have been completed.\n\t\t\t// That way, users will only see a single change event for the array instead of 2.\n\t\t\twithBufferedTreeEvents(() => {\n\t\t\t\tif (sourceField !== destinationField || destinationGap < sourceStart) {\n\t\t\t\t\tdestinationField.editor.insert(\n\t\t\t\t\t\tdestinationGap,\n\t\t\t\t\t\tsourceField.editor.remove(sourceStart, movedCount),\n\t\t\t\t\t);\n\t\t\t\t} else if (destinationGap > sourceStart + movedCount) {\n\t\t\t\t\tdestinationField.editor.insert(\n\t\t\t\t\t\tdestinationGap - movedCount,\n\t\t\t\t\t\tsourceField.editor.remove(sourceStart, movedCount),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic values(): IterableIterator<TreeNodeFromImplicitAllowedTypes<T>> {\n\t\treturn this.generateValues(getKernel(this).generationNumber);\n\t}\n\tprivate *generateValues(\n\t\tinitialLastUpdatedStamp: number,\n\t): Generator<TreeNodeFromImplicitAllowedTypes<T>> {\n\t\tconst kernel = getKernel(this);\n\t\tif (initialLastUpdatedStamp !== kernel.generationNumber) {\n\t\t\tthrow new UsageError(`Concurrent editing and iteration is not allowed.`);\n\t\t}\n\t\tfor (let i = 0; i < this.length; i++) {\n\t\t\tyield this.at(i) ?? fail(0xadc /* Index is out of bounds */);\n\t\t\tif (initialLastUpdatedStamp !== kernel.generationNumber) {\n\t\t\t\tthrow new UsageError(`Concurrent editing and iteration is not allowed.`);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Define a {@link TreeNodeSchema} for a {@link (TreeArrayNode:interface)}.\n *\n * @param name - Unique identifier for this schema including the factory's scope.\n * @param persistedMetadata - Optional persisted metadata for the object node schema.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function arraySchema<\n\tTName extends string,\n\tconst T extends ImplicitAllowedTypes,\n\tconst ImplicitlyConstructable extends boolean,\n\tconst TCustomMetadata = unknown,\n>(\n\tidentifier: TName,\n\tinfo: T,\n\timplicitlyConstructable: ImplicitlyConstructable,\n\tcustomizable: boolean,\n\tnodeOptions: NodeSchemaOptionsAlpha<TCustomMetadata>,\n) {\n\ttype Output = ArrayNodeCustomizableSchema<\n\t\tTName,\n\t\tT,\n\t\tImplicitlyConstructable,\n\t\tTCustomMetadata\n\t> &\n\t\tArrayNodePojoEmulationSchema<TName, T, ImplicitlyConstructable, TCustomMetadata> &\n\t\tTreeNodeSchemaCorePrivate;\n\n\tconst persistedMetadata = nodeOptions?.persistedMetadata;\n\tconst normalizedTypes = normalizeAllowedTypes(info);\n\tconst lazyAllowedTypesIdentifiers = new Lazy(\n\t\t() => new Set(normalizedTypes.evaluate().map((type) => type.identifier)),\n\t);\n\tconst lazySimpleAllowedTypes = new Lazy(() => {\n\t\treturn AnnotatedAllowedTypesInternal.evaluateSimpleAllowedTypes(normalizedTypes);\n\t});\n\n\tlet privateData: TreeNodeSchemaPrivateData | undefined;\n\n\t// This class returns a proxy from its constructor to handle numeric indexing.\n\t// Alternatively it could extend a normal class which gets tons of numeric properties added.\n\tclass Schema extends CustomArrayNodeBase<T> {\n\t\tpublic static override prepareInstance<T2>(\n\t\t\tthis: typeof TreeNodeValid<T2>,\n\t\t\tinstance: TreeNodeValid<T2>,\n\t\t\tflexNode: FlexTreeNode,\n\t\t): TreeNodeValid<T2> {\n\t\t\tconst proxyTarget = customizable ? instance : [];\n\n\t\t\tif (customizable) {\n\t\t\t\t// Since proxy reports this as a \"non-configurable\" property, it must exist on the underlying object used as the proxy target, not as an inherited property.\n\t\t\t\t// This should not get used as the proxy should intercept all use.\n\t\t\t\tObject.defineProperty(instance, \"length\", {\n\t\t\t\t\tvalue: Number.NaN,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn createArrayNodeProxy(customizable, proxyTarget, instance) as unknown as Schema;\n\t\t}\n\n\t\tpublic static override buildRawNode<T2>(\n\t\t\tthis: typeof TreeNodeValid<T2>,\n\t\t\tinstance: TreeNodeValid<T2>,\n\t\t\tinput: T2,\n\t\t): UnhydratedFlexTreeNode {\n\t\t\treturn unhydratedFlexTreeFromInsertable(input as object, this as typeof Schema);\n\t\t}\n\n\t\tpublic static get allowedTypesIdentifiers(): ReadonlySet<string> {\n\t\t\treturn lazyAllowedTypesIdentifiers.value;\n\t\t}\n\n\t\tpublic static get simpleAllowedTypes(): ReadonlyMap<\n\t\t\tstring,\n\t\t\tSimpleAllowedTypeAttributes<SchemaType.View>\n\t\t> {\n\t\t\treturn lazySimpleAllowedTypes.value;\n\t\t}\n\n\t\tprotected static override constructorCached: MostDerivedData | undefined = undefined;\n\n\t\tprotected static override oneTimeSetup(): TreeNodeSchemaInitializedData {\n\t\t\t// First run, do extra validation.\n\t\t\t// TODO: provide a way for TreeConfiguration to trigger this same validation to ensure it gets run early.\n\t\t\t// Scan for shadowing inherited members which won't work, but stop scan early to allow shadowing built in (which seems to work ok).\n\t\t\t{\n\t\t\t\tlet prototype: object = this.prototype;\n\t\t\t\t// There isn't a clear cleaner way to author this loop.\n\t\t\t\twhile (prototype !== Schema.prototype) {\n\t\t\t\t\t// Search prototype keys and check for positive integers. Throw if any are found.\n\t\t\t\t\t// Shadowing of index properties on array nodes is not supported.\n\t\t\t\t\tfor (const key of Object.getOwnPropertyNames(prototype)) {\n\t\t\t\t\t\tconst maybeIndex = asIndex(key, Number.POSITIVE_INFINITY);\n\t\t\t\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\t`Schema ${identifier} defines an inherited index property \"${key.toString()}\" which shadows a possible array index. Shadowing of array indices is not permitted.`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Since this stops at the array node base schema, it should never see a null prototype, so this case is safe.\n\t\t\t\t\t// Additionally, if the prototype chain is ever messed up such that the array base schema is not in it,\n\t\t\t\t\t// the null that would show up here does at least ensure this code throws instead of hanging.\n\t\t\t\t\tprototype = Reflect.getPrototypeOf(prototype) as object;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst schema = this as ArrayNodeSchema;\n\n\t\t\treturn getTreeNodeSchemaInitializedData(this, {\n\t\t\t\tshallowCompatibilityTest: (data: FactoryContent): CompatibilityLevel =>\n\t\t\t\t\tshallowCompatibilityTest(data, schema),\n\t\t\t\ttoFlexContent: (\n\t\t\t\t\tdata: FactoryContent,\n\t\t\t\t\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n\t\t\t\t): FlexContent => arrayToFlexContent(data, schema),\n\t\t\t});\n\t\t}\n\n\t\tpublic static readonly identifier = identifier;\n\t\tpublic static readonly info = info;\n\t\tpublic static readonly implicitlyConstructable: ImplicitlyConstructable =\n\t\t\timplicitlyConstructable;\n\t\tpublic static get childTypes(): ReadonlySet<TreeNodeSchema> {\n\t\t\treturn normalizedTypes.evaluateSet();\n\t\t}\n\t\tpublic static readonly metadata: NodeSchemaMetadata<TCustomMetadata> =\n\t\t\tnodeOptions.metadata ?? {};\n\t\tpublic static readonly persistedMetadata: JsonCompatibleReadOnlyObject | undefined =\n\t\t\tpersistedMetadata;\n\n\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\tpublic get [typeNameSymbol](): TName {\n\t\t\treturn identifier;\n\t\t}\n\t\tpublic get [typeSchemaSymbol](): Output {\n\t\t\treturn Schema.constructorCached?.constructor as unknown as Output;\n\t\t}\n\n\t\tprotected get childSchema(): T {\n\t\t\treturn info;\n\t\t}\n\t\tprotected get allowedTypes(): ReadonlySet<TreeNodeSchema> {\n\t\t\treturn normalizedTypes.evaluateSet();\n\t\t}\n\n\t\tpublic static get [privateDataSymbol](): TreeNodeSchemaPrivateData {\n\t\t\treturn (privateData ??= createTreeNodeSchemaPrivateData(this, [normalizedTypes]));\n\t\t}\n\t}\n\n\tconst output: Output = Schema;\n\treturn output;\n}\n\n/**\n * Transforms data for a child of an array.\n * @param child - The tree data to be transformed.\n * @param allowedTypes - The set of types allowed by the parent context. Used to validate the input tree.\n */\nfunction arrayChildToFlexTree(\n\tchild: InsertableContent,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): UnhydratedFlexTreeNode {\n\t// We do not support undefined sequence entries.\n\t// If we encounter an undefined entry, use null instead if supported by the schema, otherwise throw.\n\tlet childWithFallback = child;\n\tif (child === undefined) {\n\t\tif (allowedTypes.has(nullSchema)) {\n\t\t\tchildWithFallback = null;\n\t\t} else {\n\t\t\tthrow new TypeError(`Received unsupported array entry value: ${child}.`);\n\t\t}\n\t}\n\treturn unhydratedFlexTreeFromInsertableNode(childWithFallback, allowedTypes);\n}\n\n/**\n * {@link TreeNodeSchemaInitializedData.toFlexContent} for Array nodes.\n *\n * @param data - The tree data to be transformed. Must be an iterable.\n * @param schema - The schema to comply with.\n */\nfunction arrayToFlexContent(data: FactoryContent, schema: ArrayNodeSchema): FlexContent {\n\tif (!(typeof data === \"object\" && data !== null && Symbol.iterator in data)) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\tthrow new UsageError(`Input data is incompatible with Array schema: ${data}`);\n\t}\n\n\tconst allowedChildTypes = normalizeAllowedTypes(schema.info);\n\n\tconst mappedData = Array.from(data, (child) =>\n\t\tarrayChildToFlexTree(child, allowedChildTypes.evaluateSet()),\n\t);\n\n\tconst context = getUnhydratedContext(schema).flexContext;\n\n\t// Array nodes have a single `EmptyKey` field:\n\tconst fieldsEntries =\n\t\tmappedData.length === 0\n\t\t\t? []\n\t\t\t: ([\n\t\t\t\t\t[\n\t\t\t\t\t\tEmptyKey,\n\t\t\t\t\t\tnew UnhydratedSequenceField(\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tFieldKinds.sequence.identifier,\n\t\t\t\t\t\t\tEmptyKey,\n\t\t\t\t\t\t\tmappedData,\n\t\t\t\t\t\t),\n\t\t\t\t\t],\n\t\t\t\t] as const);\n\n\treturn [\n\t\t{\n\t\t\ttype: brand(schema.identifier),\n\t\t},\n\t\tnew Map(fieldsEntries),\n\t];\n}\n\n/**\n * {@link TreeNodeSchemaInitializedData.shallowCompatibilityTest} for Array nodes.\n */\nfunction shallowCompatibilityTest(\n\tdata: FactoryContent,\n\tschema: ArrayNodeSchema,\n): CompatibilityLevel {\n\tif (isTreeValue(data)) {\n\t\treturn CompatibilityLevel.None;\n\t}\n\n\tif (data instanceof Map) {\n\t\t// Maps are iterable, so type checking does allow constructing an ArrayNode from a map if the ArrayNode's type is an array that includes the key and value types of the map.\n\t\treturn CompatibilityLevel.Low;\n\t}\n\n\tif (Symbol.iterator in data) {\n\t\treturn CompatibilityLevel.Normal;\n\t}\n\n\treturn CompatibilityLevel.None;\n}\n"]}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import type { TreeArrayNode } from "./arrayNode.js";
|
|
6
5
|
import { NodeKind } from "../../core/index.js";
|
|
7
6
|
import type { TreeNodeSchemaClass, TreeNodeSchema, TreeNodeSchemaNonClass, WithType, ImplicitAllowedTypes, InsertableTreeNodeFromImplicitAllowedTypes } from "../../core/index.js";
|
|
8
7
|
import type { SchemaType, SimpleArrayNodeSchema } from "../../simpleSchema.js";
|
|
8
|
+
import type { TreeArrayNode } from "./arrayNode.js";
|
|
9
9
|
/**
|
|
10
10
|
* A schema for customizable {@link (TreeArrayNode:interface)}s.
|
|
11
11
|
* @system @sealed @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayNodeTypes.d.ts","sourceRoot":"","sources":["../../../../src/simple-tree/node-kinds/array/arrayNodeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"arrayNodeTypes.d.ts","sourceRoot":"","sources":["../../../../src/simple-tree/node-kinds/array/arrayNodeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EACX,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACR,oBAAoB,EACpB,0CAA0C,EAC1C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,2BAA2B,CAC3C,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EACjC,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EAC5D,GAAG,CAAC,uBAAuB,SAAS,OAAO,GAAG,IAAI,EAClD,GAAG,CAAC,eAAe,GAAG,OAAO,CAC5B,SAAQ,mBAAmB,CAC1B,KAAK,EACL,QAAQ,CAAC,KAAK,EACd,aAAa,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,EACrD,QAAQ,CAAC,0CAA0C,CAAC,CAAC,CAAC,CAAC,EACvD,uBAAuB,EACvB,CAAC,EACD,SAAS,EACT,eAAe,CACf,EACD,qBAAqB,CAAC,UAAU,CAAC,IAAI,EAAE,eAAe,CAAC;CAAG;AAE5D;;;GAGG;AACH,MAAM,WAAW,4BAA4B,CAC5C,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EACjC,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EAC5D,GAAG,CAAC,uBAAuB,SAAS,OAAO,GAAG,IAAI,EAClD,GAAG,CAAC,eAAe,GAAG,OAAO,CAC5B,SAAQ,sBAAsB,CAC7B,KAAK,EACL,QAAQ,CAAC,KAAK,EACd,aAAa,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,EACrD,QAAQ,CAAC,0CAA0C,CAAC,CAAC,CAAC,CAAC,EACvD,uBAAuB,EACvB,CAAC,EACD,SAAS,EACT,eAAe,CACf,EACD,qBAAqB,CAAC,UAAU,CAAC,IAAI,EAAE,eAAe,CAAC;CAAG;AAE5D;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,2BAA2B,GAAG,4BAA4B,CAAC;AAEzF;;GAEG;AACH,eAAO,MAAM,eAAe;IAC3B;;OAEG;2CACyB,cAAc;CAGjC,CAAC;AAEX;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,IAAI,eAAe,CAEnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayNodeTypes.js","sourceRoot":"","sources":["../../../../src/simple-tree/node-kinds/array/arrayNodeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"arrayNodeTypes.js","sourceRoot":"","sources":["../../../../src/simple-tree/node-kinds/array/arrayNodeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAiE/C;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,KAAqB;QACzC,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;CACQ,CAAC;AAEX;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAsB;IACvD,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,KAAK,CAAC;AACvC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { NodeKind } from \"../../core/index.js\";\nimport type {\n\tTreeNodeSchemaClass,\n\tTreeNodeSchema,\n\tTreeNodeSchemaNonClass,\n\tWithType,\n\tImplicitAllowedTypes,\n\tInsertableTreeNodeFromImplicitAllowedTypes,\n} from \"../../core/index.js\";\nimport type { SchemaType, SimpleArrayNodeSchema } from \"../../simpleSchema.js\";\n\nimport type { TreeArrayNode } from \"./arrayNode.js\";\n\n/**\n * A schema for customizable {@link (TreeArrayNode:interface)}s.\n * @system @sealed @alpha\n */\nexport interface ArrayNodeCustomizableSchema<\n\tout TName extends string = string,\n\tin out T extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\tout ImplicitlyConstructable extends boolean = true,\n\tout TCustomMetadata = unknown,\n> extends TreeNodeSchemaClass<\n\t\t\tTName,\n\t\t\tNodeKind.Array,\n\t\t\tTreeArrayNode<T> & WithType<TName, NodeKind.Array, T>,\n\t\t\tIterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>,\n\t\t\tImplicitlyConstructable,\n\t\t\tT,\n\t\t\tundefined,\n\t\t\tTCustomMetadata\n\t\t>,\n\t\tSimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {}\n\n/**\n * A schema for POJO emulation mode {@link (TreeArrayNode:interface)}s.\n * @system @sealed @alpha\n */\nexport interface ArrayNodePojoEmulationSchema<\n\tout TName extends string = string,\n\tin out T extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\tout ImplicitlyConstructable extends boolean = true,\n\tout TCustomMetadata = unknown,\n> extends TreeNodeSchemaNonClass<\n\t\t\tTName,\n\t\t\tNodeKind.Array,\n\t\t\tTreeArrayNode<T> & WithType<TName, NodeKind.Array, T>,\n\t\t\tIterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>,\n\t\t\tImplicitlyConstructable,\n\t\t\tT,\n\t\t\tundefined,\n\t\t\tTCustomMetadata\n\t\t>,\n\t\tSimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {}\n\n/**\n * A schema for {@link (TreeArrayNode:interface)}s.\n * @privateRemarks\n * This could have generic arguments added and forwarded.\n * The expected use-cases for this don't need them however, and if they did want an argument it would probably be the allowed types;\n * perhaps if moving to an order independent way to pass generic arguments, adding support for them here would make sense.\n * @alpha\n */\nexport type ArrayNodeSchema = ArrayNodeCustomizableSchema | ArrayNodePojoEmulationSchema;\n\n/**\n * @alpha\n */\nexport const ArrayNodeSchema = {\n\t/**\n\t * instanceof-based narrowing support for ArrayNodeSchema in Javascript and TypeScript 5.3 or newer.\n\t */\n\t[Symbol.hasInstance](value: TreeNodeSchema): value is ArrayNodeSchema {\n\t\treturn isArrayNodeSchema(value);\n\t},\n} as const;\n\n/**\n * Narrows a {@link (TreeNodeSchema:interface)} to an {@link (ArrayNodeSchema:interface)}.\n * @privateRemarks\n * If at some point we want to have internal only APIs for ArrayNodeSchema (like done for objects),\n * this can include those since its not the public facing API.\n */\nexport function isArrayNodeSchema(schema: TreeNodeSchema): schema is ArrayNodeSchema {\n\treturn schema.kind === NodeKind.Array;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/node-kinds/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/node-kinds/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAIN,KAAK,WAAW,EAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEN,KAAK,iBAAiB,EACtB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;GAEG;AAEH;;GAEG;AACH,wBAAgB,2BAA2B,CAC1C,cAAc,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,EAC9D,MAAM,EAAE,aAAa,GAAG,gBAAgB,GACtC,WAAW,CA0Bb"}
|
|
@@ -7,7 +7,7 @@ import { FieldKinds } from "../../feature-libraries/index.js";
|
|
|
7
7
|
import { brand } from "../../util/index.js";
|
|
8
8
|
import { createField, normalizeAllowedTypes, } from "../core/index.js";
|
|
9
9
|
import { getUnhydratedContext } from "../createContext.js";
|
|
10
|
-
import {
|
|
10
|
+
import { unhydratedFlexTreeFromInsertableNode, } from "../unhydratedFlexTreeFromInsertable.js";
|
|
11
11
|
/**
|
|
12
12
|
* Utilities shared by multiple node kinds.
|
|
13
13
|
*/
|
|
@@ -23,7 +23,7 @@ export function recordLikeDataToFlexContent(fieldsIterator, schema) {
|
|
|
23
23
|
assert(!transformedFields.has(brand(key)), 0x84c /* Keys should not be duplicated */);
|
|
24
24
|
// Omit undefined values - an entry with an undefined value is equivalent to one that has been removed or omitted
|
|
25
25
|
if (value !== undefined) {
|
|
26
|
-
const child =
|
|
26
|
+
const child = unhydratedFlexTreeFromInsertableNode(value, allowedChildTypes.evaluateSet());
|
|
27
27
|
const field = createField(context, FieldKinds.optional.identifier, brand(key), [child]);
|
|
28
28
|
transformedFields.set(brand(key), field);
|
|
29
29
|
}
|