@fluidframework/tree 2.90.0-378676 → 2.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +6 -5
- package/CHANGELOG.md +342 -0
- package/README.md +1 -1
- package/alpha.d.ts +2 -2
- package/api-extractor/api-extractor-lint-alpha.cjs.json +1 -1
- package/api-extractor/api-extractor-lint-alpha.esm.json +1 -1
- package/api-extractor/api-extractor-lint-beta.cjs.json +1 -1
- package/api-extractor/api-extractor-lint-beta.esm.json +1 -1
- package/api-extractor/api-extractor-lint-bundle.json +1 -1
- package/api-extractor/api-extractor-lint-legacy.cjs.json +1 -1
- package/api-extractor/api-extractor-lint-legacy.esm.json +1 -1
- package/api-extractor/api-extractor-lint-public.cjs.json +1 -1
- package/api-extractor/api-extractor-lint-public.esm.json +1 -1
- package/api-extractor/api-extractor.current.json +1 -1
- package/api-extractor/api-extractor.legacy.json +2 -1
- package/api-extractor.json +1 -0
- package/api-report/tree.alpha.api.md +144 -40
- package/api-report/tree.beta.api.md +30 -0
- package/api-report/tree.legacy.beta.api.md +30 -0
- package/beta.d.ts +2 -2
- package/dist/codec/codec.d.ts +2 -0
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +4 -3
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/index.d.ts +1 -1
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +2 -1
- package/dist/codec/index.js.map +1 -1
- package/dist/codec/versioned/codec.d.ts +13 -1
- package/dist/codec/versioned/codec.d.ts.map +1 -1
- package/dist/codec/versioned/codec.js +18 -3
- package/dist/codec/versioned/codec.js.map +1 -1
- package/dist/codec/versioned/format.d.ts +22 -1
- package/dist/codec/versioned/format.d.ts.map +1 -1
- package/dist/codec/versioned/format.js +16 -3
- package/dist/codec/versioned/format.js.map +1 -1
- package/dist/codec/versioned/index.d.ts +1 -1
- package/dist/codec/versioned/index.d.ts.map +1 -1
- package/dist/codec/versioned/index.js +2 -1
- package/dist/codec/versioned/index.js.map +1 -1
- package/dist/core/change-family/changeFamily.d.ts +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 -4
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +4 -8
- 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 +78 -1
- 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/tree/delta.d.ts +0 -5
- package/dist/core/tree/delta.d.ts.map +1 -1
- package/dist/core/tree/delta.js.map +1 -1
- package/dist/core/tree/detachedFieldIndex.d.ts +1 -13
- package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndex.js +1 -14
- package/dist/core/tree/detachedFieldIndex.js.map +1 -1
- package/dist/core/tree/detachedFieldIndexTypes.d.ts +0 -4
- package/dist/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
- package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
- package/dist/core/tree/index.d.ts +2 -2
- 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.map +1 -1
- package/dist/core/tree/visitDelta.js +13 -17
- package/dist/core/tree/visitDelta.js.map +1 -1
- package/dist/entrypoints/alpha.d.ts +6 -0
- package/dist/entrypoints/alpha.d.ts.map +1 -0
- package/dist/entrypoints/alpha.js +92 -0
- package/dist/entrypoints/alpha.js.map +1 -0
- package/dist/entrypoints/beta.d.ts +6 -0
- package/dist/entrypoints/beta.d.ts.map +1 -0
- package/dist/entrypoints/beta.js +43 -0
- package/dist/entrypoints/beta.js.map +1 -0
- package/{lib/core/schema-view/index.js → dist/entrypoints/internal.d.ts} +2 -2
- package/dist/entrypoints/internal.d.ts.map +1 -0
- package/dist/entrypoints/internal.js +28 -0
- package/dist/entrypoints/internal.js.map +1 -0
- package/dist/entrypoints/legacy.d.ts +6 -0
- package/dist/entrypoints/legacy.d.ts.map +1 -0
- package/dist/entrypoints/legacy.js +49 -0
- package/dist/entrypoints/legacy.js.map +1 -0
- package/dist/entrypoints/public.d.ts +6 -0
- package/dist/entrypoints/public.d.ts.map +1 -0
- package/dist/entrypoints/public.js +27 -0
- package/dist/entrypoints/public.js.map +1 -0
- package/dist/feature-libraries/changeAtomIdBTree.d.ts +2 -3
- package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
- package/dist/feature-libraries/changeAtomIdBTree.js +2 -15
- package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +8 -7
- package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/codecs.js +22 -44
- package/dist/feature-libraries/chunked-forest/codec/codecs.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 +11 -0
- package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts +3 -2
- package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/codec/index.js +2 -4
- package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/index.js +2 -4
- package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -92
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +70 -220
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +2 -12
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +1 -2
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -4
- 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/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 +8 -39
- package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/dist/feature-libraries/flex-tree/observer.d.ts +17 -0
- 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 +5 -12
- package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/codec.js +33 -33
- package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +2 -2
- package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/forestSummarizer.js +6 -7
- package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts +6 -4
- package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/formatCommon.js +13 -11
- package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +19 -14
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +31 -48
- package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts +1 -1
- package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/index.js +2 -2
- package/dist/feature-libraries/forest-summary/index.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +6 -6
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +6 -11
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +3 -3
- package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
- package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
- package/dist/feature-libraries/indexing/index.d.ts +1 -1
- package/dist/feature-libraries/indexing/index.d.ts.map +1 -1
- package/dist/feature-libraries/indexing/index.js.map +1 -1
- package/dist/feature-libraries/indexing/types.d.ts +15 -13
- package/dist/feature-libraries/indexing/types.d.ts.map +1 -1
- package/dist/feature-libraries/indexing/types.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 +24 -100
- package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js +12 -8
- package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts +1 -0
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js +14 -6
- package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
- package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -85
- 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/genericFieldKind.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/genericFieldKind.js +9 -4
- package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +3 -3
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +3 -2
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +22 -18
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +158 -276
- 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 +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +0 -8
- package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +22 -56
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +468 -1392
- 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/modularChangeFormatV2.d.ts +2 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +3 -3
- package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +10 -49
- 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/optional-field/optionalField.d.ts +32 -13
- package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalField.js +446 -257
- package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +31 -31
- 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 +2 -3
- package/dist/feature-libraries/optional-field/requiredField.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/requiredField.js +1 -6
- package/dist/feature-libraries/optional-field/requiredField.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 -81
- 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/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 +116 -109
- 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 +32 -19
- 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 -1
- 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 -388
- 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 +13 -13
- 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 +111 -16
- package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/dist/feature-libraries/sequence-field/types.d.ts +74 -37
- 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 +25 -20
- package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/dist/feature-libraries/sequence-field/utils.js +320 -159
- package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- 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 +3 -3
- 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 +10 -1
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +70 -28
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +3 -9
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +8 -11
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +0 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeCodecs.js +0 -8
- package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.d.ts +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.js +1 -1
- package/dist/shared-tree/tree.js.map +1 -1
- package/dist/shared-tree/treeAlpha.d.ts +8 -1
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
- package/dist/shared-tree/treeAlpha.js +48 -8
- package/dist/shared-tree/treeAlpha.js.map +1 -1
- package/dist/shared-tree/treeCheckout.d.ts +46 -16
- package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
- package/dist/shared-tree/treeCheckout.js +131 -74
- package/dist/shared-tree/treeCheckout.js.map +1 -1
- package/dist/shared-tree/unhydratedTreeContext.d.ts +20 -0
- package/dist/shared-tree/unhydratedTreeContext.d.ts.map +1 -0
- package/dist/shared-tree/unhydratedTreeContext.js +56 -0
- package/dist/shared-tree/unhydratedTreeContext.js.map +1 -0
- package/dist/shared-tree-core/branch.d.ts +2 -3
- 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/editManager.d.ts +2 -2
- package/dist/shared-tree-core/editManager.d.ts.map +1 -1
- package/dist/shared-tree-core/editManager.js +9 -9
- package/dist/shared-tree-core/editManager.js.map +1 -1
- package/dist/shared-tree-core/editManagerCodecs.d.ts +0 -4
- 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/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/index.d.ts +2 -2
- package/dist/shared-tree-core/index.d.ts.map +1 -1
- package/dist/shared-tree-core/index.js +1 -3
- package/dist/shared-tree-core/index.js.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/dist/shared-tree-core/messageCodecs.d.ts +0 -4
- 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/sharedTreeCore.d.ts +0 -1
- package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js +1 -1
- package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/dist/shared-tree-core/transaction.d.ts +15 -27
- package/dist/shared-tree-core/transaction.d.ts.map +1 -1
- package/dist/shared-tree-core/transaction.js +7 -11
- package/dist/shared-tree-core/transaction.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +4 -0
- package/dist/simple-tree/api/configuration.d.ts.map +1 -1
- package/dist/simple-tree/api/configuration.js.map +1 -1
- package/dist/simple-tree/api/eraseSchemaDetails.d.ts +43 -0
- package/dist/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -1
- package/dist/simple-tree/api/eraseSchemaDetails.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 +1 -1
- package/dist/simple-tree/api/identifierIndex.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +6 -5
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +2 -2
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +3 -2
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +3 -2
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +125 -28
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +72 -7
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/dist/simple-tree/api/schemaStatics.d.ts +10 -11
- package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaStatics.js +13 -7
- package/dist/simple-tree/api/schemaStatics.js.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.d.ts +15 -13
- package/dist/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleTreeIndex.js +4 -4
- package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +4 -4
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js +2 -2
- package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/dist/simple-tree/api/transactionTypes.d.ts +22 -25
- package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
- package/dist/simple-tree/api/transactionTypes.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +69 -132
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +23 -2
- 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/core/unhydratedFlexTree.d.ts +12 -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/fieldSchema.d.ts +7 -6
- package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
- package/dist/simple-tree/fieldSchema.js +3 -4
- package/dist/simple-tree/fieldSchema.js.map +1 -1
- package/dist/simple-tree/index.d.ts +4 -4
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +3 -3
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +3 -5
- package/dist/simple-tree/node-kinds/array/arrayNode.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/index.d.ts +1 -1
- package/dist/simple-tree/node-kinds/index.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/map/mapNode.js +2 -2
- package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/index.d.ts +2 -2
- package/dist/simple-tree/node-kinds/object/index.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts +43 -7
- package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNode.js +19 -19
- package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +26 -2
- 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.map +1 -1
- package/dist/simple-tree/node-kinds/record/recordNode.js +2 -4
- package/dist/simple-tree/node-kinds/record/recordNode.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 +125 -183
- package/dist/simple-tree/prepareForInsertion.js.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +3 -8
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +13 -27
- package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/dist/text/textDomain.d.ts +27 -9
- package/dist/text/textDomain.d.ts.map +1 -1
- package/dist/text/textDomain.js +43 -7
- package/dist/text/textDomain.js.map +1 -1
- package/dist/text/textDomainFormatted.d.ts +16 -12
- package/dist/text/textDomainFormatted.d.ts.map +1 -1
- package/dist/text/textDomainFormatted.js +97 -25
- package/dist/text/textDomainFormatted.js.map +1 -1
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +2 -12
- package/dist/treeFactory.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 +10 -14
- package/dist/util/rangeMap.d.ts.map +1 -1
- package/dist/util/rangeMap.js +22 -62
- package/dist/util/rangeMap.js.map +1 -1
- package/dist/util/typeCheck.d.ts.map +1 -1
- package/dist/util/typeCheck.js.map +1 -1
- package/dist/util/typeUtils.d.ts.map +1 -1
- package/dist/util/typeUtils.js.map +1 -1
- package/docs/main/sequence-field/move-composition.md +46 -0
- package/eslint.config.mts +10 -2
- package/internal.d.ts +2 -2
- package/legacy.d.ts +4 -3
- package/lib/codec/codec.d.ts +2 -0
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +4 -3
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/index.d.ts +1 -1
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.js.map +1 -1
- package/lib/codec/versioned/codec.d.ts +13 -1
- package/lib/codec/versioned/codec.d.ts.map +1 -1
- package/lib/codec/versioned/codec.js +18 -3
- package/lib/codec/versioned/codec.js.map +1 -1
- package/lib/codec/versioned/format.d.ts +22 -1
- package/lib/codec/versioned/format.d.ts.map +1 -1
- package/lib/codec/versioned/format.js +15 -2
- package/lib/codec/versioned/format.js.map +1 -1
- package/lib/codec/versioned/index.d.ts +1 -1
- package/lib/codec/versioned/index.d.ts.map +1 -1
- package/lib/codec/versioned/index.js +1 -1
- package/lib/codec/versioned/index.js.map +1 -1
- package/lib/core/change-family/changeFamily.d.ts +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 -4
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +2 -3
- 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 +78 -1
- 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/tree/delta.d.ts +0 -5
- package/lib/core/tree/delta.d.ts.map +1 -1
- package/lib/core/tree/delta.js.map +1 -1
- package/lib/core/tree/detachedFieldIndex.d.ts +1 -13
- package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndex.js +2 -15
- package/lib/core/tree/detachedFieldIndex.js.map +1 -1
- package/lib/core/tree/detachedFieldIndexTypes.d.ts +0 -4
- package/lib/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
- package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
- package/lib/core/tree/index.d.ts +2 -2
- 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.map +1 -1
- package/lib/core/tree/visitDelta.js +13 -17
- package/lib/core/tree/visitDelta.js.map +1 -1
- package/lib/entrypoints/alpha.d.ts +6 -0
- package/lib/entrypoints/alpha.d.ts.map +1 -0
- package/lib/entrypoints/alpha.js +12 -0
- package/lib/entrypoints/alpha.js.map +1 -0
- package/lib/entrypoints/beta.d.ts +6 -0
- package/lib/entrypoints/beta.d.ts.map +1 -0
- package/lib/entrypoints/beta.js +12 -0
- package/lib/entrypoints/beta.js.map +1 -0
- package/{src/core/schema-view/index.ts → lib/entrypoints/internal.d.ts} +2 -6
- package/lib/entrypoints/internal.d.ts.map +1 -0
- package/lib/entrypoints/internal.js +12 -0
- package/lib/entrypoints/internal.js.map +1 -0
- package/lib/entrypoints/legacy.d.ts +6 -0
- package/lib/entrypoints/legacy.d.ts.map +1 -0
- package/lib/entrypoints/legacy.js +15 -0
- package/lib/entrypoints/legacy.js.map +1 -0
- package/lib/entrypoints/public.d.ts +6 -0
- package/lib/entrypoints/public.d.ts.map +1 -0
- package/lib/entrypoints/public.js +10 -0
- package/lib/entrypoints/public.js.map +1 -0
- package/lib/feature-libraries/changeAtomIdBTree.d.ts +2 -3
- package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
- package/lib/feature-libraries/changeAtomIdBTree.js +3 -15
- package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +8 -7
- package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/codecs.js +25 -45
- package/lib/feature-libraries/chunked-forest/codec/codecs.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 +11 -0
- package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts +3 -2
- package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/codec/index.js +2 -2
- package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
- package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/index.js +1 -1
- package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -92
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +69 -217
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +2 -12
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +1 -2
- 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/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 +9 -40
- package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
- package/lib/feature-libraries/flex-tree/observer.d.ts +17 -0
- 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 +5 -12
- package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/codec.js +35 -32
- package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +2 -2
- package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/forestSummarizer.js +7 -8
- package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts +6 -4
- package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/formatCommon.js +7 -4
- package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +19 -14
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +30 -47
- package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts +1 -1
- package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/index.js +1 -1
- package/lib/feature-libraries/forest-summary/index.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +6 -6
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +5 -5
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +3 -3
- package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
- package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
- package/lib/feature-libraries/indexing/index.d.ts +1 -1
- package/lib/feature-libraries/indexing/index.d.ts.map +1 -1
- package/lib/feature-libraries/indexing/index.js.map +1 -1
- package/lib/feature-libraries/indexing/types.d.ts +15 -13
- package/lib/feature-libraries/indexing/types.d.ts.map +1 -1
- package/lib/feature-libraries/indexing/types.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 +24 -100
- package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js +10 -7
- package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts +1 -0
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js +14 -6
- package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
- package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -85
- 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/genericFieldKind.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/genericFieldKind.js +9 -4
- package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +3 -3
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +1 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +22 -18
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +144 -267
- 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 +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +0 -8
- package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +22 -56
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +474 -1389
- 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/modularChangeFormatV2.d.ts +2 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +10 -49
- 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/optional-field/optionalField.d.ts +32 -13
- package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalField.js +442 -254
- package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +31 -31
- 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 +2 -3
- package/lib/feature-libraries/optional-field/requiredField.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/requiredField.js +1 -5
- package/lib/feature-libraries/optional-field/requiredField.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 -83
- 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/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 +118 -111
- 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 +32 -19
- 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 +3 -2
- 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 -379
- 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 +13 -13
- 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 +111 -16
- package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
- package/lib/feature-libraries/sequence-field/types.d.ts +74 -37
- 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 +25 -20
- package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
- package/lib/feature-libraries/sequence-field/utils.js +313 -155
- package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
- package/lib/index.d.ts +9 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -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 +4 -4
- 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 +10 -1
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +71 -30
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +3 -9
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +9 -12
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +0 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeCodecs.js +0 -8
- package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +3 -3
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.d.ts +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.js +1 -1
- package/lib/shared-tree/tree.js.map +1 -1
- package/lib/shared-tree/treeAlpha.d.ts +8 -1
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
- package/lib/shared-tree/treeAlpha.js +49 -9
- package/lib/shared-tree/treeAlpha.js.map +1 -1
- package/lib/shared-tree/treeCheckout.d.ts +46 -16
- package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
- package/lib/shared-tree/treeCheckout.js +134 -77
- package/lib/shared-tree/treeCheckout.js.map +1 -1
- package/lib/shared-tree/unhydratedTreeContext.d.ts +20 -0
- package/lib/shared-tree/unhydratedTreeContext.d.ts.map +1 -0
- package/lib/shared-tree/unhydratedTreeContext.js +52 -0
- package/lib/shared-tree/unhydratedTreeContext.js.map +1 -0
- package/lib/shared-tree-core/branch.d.ts +2 -3
- 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/editManager.d.ts +2 -2
- package/lib/shared-tree-core/editManager.d.ts.map +1 -1
- package/lib/shared-tree-core/editManager.js +9 -9
- package/lib/shared-tree-core/editManager.js.map +1 -1
- package/lib/shared-tree-core/editManagerCodecs.d.ts +0 -4
- 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/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/index.d.ts +2 -2
- package/lib/shared-tree-core/index.d.ts.map +1 -1
- package/lib/shared-tree-core/index.js +2 -2
- package/lib/shared-tree-core/index.js.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
- package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
- package/lib/shared-tree-core/messageCodecs.d.ts +0 -4
- 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/sharedTreeCore.d.ts +0 -1
- package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js +1 -1
- package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
- package/lib/shared-tree-core/transaction.d.ts +15 -27
- package/lib/shared-tree-core/transaction.d.ts.map +1 -1
- package/lib/shared-tree-core/transaction.js +7 -11
- package/lib/shared-tree-core/transaction.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +4 -0
- package/lib/simple-tree/api/configuration.d.ts.map +1 -1
- package/lib/simple-tree/api/configuration.js.map +1 -1
- package/lib/simple-tree/api/eraseSchemaDetails.d.ts +43 -0
- package/lib/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -1
- package/lib/simple-tree/api/eraseSchemaDetails.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 +2 -2
- package/lib/simple-tree/api/identifierIndex.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +6 -5
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +2 -2
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +3 -2
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +3 -2
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +125 -28
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +66 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
- package/lib/simple-tree/api/schemaStatics.d.ts +10 -11
- package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaStatics.js +14 -8
- package/lib/simple-tree/api/schemaStatics.js.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.d.ts +15 -13
- package/lib/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleTreeIndex.js +2 -2
- package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
- package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +4 -4
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js +2 -2
- package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
- package/lib/simple-tree/api/transactionTypes.d.ts +22 -25
- package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
- package/lib/simple-tree/api/transactionTypes.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +69 -132
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +23 -2
- 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/core/unhydratedFlexTree.d.ts +12 -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/fieldSchema.d.ts +7 -6
- package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
- package/lib/simple-tree/fieldSchema.js +3 -4
- package/lib/simple-tree/fieldSchema.js.map +1 -1
- package/lib/simple-tree/index.d.ts +4 -4
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +2 -2
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +4 -6
- package/lib/simple-tree/node-kinds/array/arrayNode.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/index.d.ts +1 -1
- package/lib/simple-tree/node-kinds/index.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/map/mapNode.js +2 -2
- package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/index.d.ts +2 -2
- package/lib/simple-tree/node-kinds/object/index.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts +43 -7
- package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNode.js +20 -20
- package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
- package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +26 -2
- 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.map +1 -1
- package/lib/simple-tree/node-kinds/record/recordNode.js +2 -4
- package/lib/simple-tree/node-kinds/record/recordNode.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/unhydratedFlexTreeFromInsertable.d.ts +3 -8
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +10 -23
- package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
- package/lib/text/textDomain.d.ts +27 -9
- package/lib/text/textDomain.d.ts.map +1 -1
- package/lib/text/textDomain.js +45 -9
- package/lib/text/textDomain.js.map +1 -1
- package/lib/text/textDomainFormatted.d.ts +16 -12
- package/lib/text/textDomainFormatted.d.ts.map +1 -1
- package/lib/text/textDomainFormatted.js +80 -8
- package/lib/text/textDomainFormatted.js.map +1 -1
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +3 -13
- package/lib/treeFactory.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 +10 -14
- package/lib/util/rangeMap.d.ts.map +1 -1
- package/lib/util/rangeMap.js +22 -61
- package/lib/util/rangeMap.js.map +1 -1
- package/lib/util/typeCheck.d.ts.map +1 -1
- package/lib/util/typeCheck.js.map +1 -1
- package/lib/util/typeUtils.d.ts.map +1 -1
- package/lib/util/typeUtils.js.map +1 -1
- package/package.json +49 -49
- package/scripts/generate-entrypoint-sources.sh +29 -0
- package/src/codec/codec.ts +5 -4
- package/src/codec/index.ts +1 -0
- package/src/codec/versioned/codec.ts +32 -6
- package/src/codec/versioned/format.ts +17 -2
- package/src/codec/versioned/index.ts +1 -1
- package/src/core/change-family/changeFamily.ts +0 -5
- package/src/core/change-family/index.ts +0 -1
- package/src/core/index.ts +3 -10
- package/src/core/rebase/changeRebaser.ts +1 -6
- package/src/core/rebase/index.ts +2 -1
- package/src/core/rebase/types.ts +80 -4
- package/src/core/rebase/utils.ts +7 -31
- package/src/core/tree/delta.ts +0 -6
- package/src/core/tree/detachedFieldIndex.ts +1 -29
- package/src/core/tree/detachedFieldIndexTypes.ts +0 -5
- package/src/core/tree/index.ts +12 -13
- package/src/core/tree/pathTree.ts +4 -16
- package/src/core/tree/visitDelta.ts +11 -31
- package/{dist/alpha.d.ts → src/entrypoints/alpha.ts} +22 -11
- package/{lib/beta.d.ts → src/entrypoints/beta.ts} +6 -6
- package/src/entrypoints/internal.ts +13 -0
- package/{lib/legacy.d.ts → src/entrypoints/legacy.ts} +6 -6
- package/{lib/public.d.ts → src/entrypoints/public.ts} +2 -5
- package/src/feature-libraries/changeAtomIdBTree.ts +3 -28
- package/src/feature-libraries/chunked-forest/codec/codecs.ts +59 -78
- package/src/feature-libraries/chunked-forest/codec/format.ts +11 -0
- package/src/feature-libraries/chunked-forest/codec/index.ts +3 -3
- package/src/feature-libraries/chunked-forest/index.ts +2 -3
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +127 -369
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +4 -13
- package/src/feature-libraries/default-schema/index.ts +5 -16
- package/src/feature-libraries/default-schema/mappedEditBuilder.ts +9 -35
- package/src/feature-libraries/deltaUtils.ts +1 -6
- 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 +24 -65
- package/src/feature-libraries/flex-tree/observer.ts +17 -0
- package/src/feature-libraries/forest-summary/codec.ts +46 -56
- package/src/feature-libraries/forest-summary/forestSummarizer.ts +5 -14
- package/src/feature-libraries/forest-summary/formatCommon.ts +14 -19
- package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +44 -74
- package/src/feature-libraries/forest-summary/index.ts +1 -1
- package/src/feature-libraries/index.ts +11 -26
- package/src/feature-libraries/indexing/anchorTreeIndex.ts +3 -5
- package/src/feature-libraries/indexing/index.ts +1 -1
- package/src/feature-libraries/indexing/types.ts +15 -17
- package/src/feature-libraries/mitigatedChangeFamily.ts +1 -3
- package/src/feature-libraries/modular-schema/crossFieldQueries.ts +47 -149
- package/src/feature-libraries/modular-schema/defaultRevisionReplacer.ts +16 -8
- package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +58 -113
- package/src/feature-libraries/modular-schema/genericFieldKind.ts +18 -7
- package/src/feature-libraries/modular-schema/index.ts +16 -16
- package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +329 -604
- package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +0 -1
- package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +0 -14
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +754 -2695
- package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +0 -1
- package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +1 -1
- package/src/feature-libraries/modular-schema/modularChangeTypes.ts +10 -62
- package/src/feature-libraries/optional-field/optionalField.ts +568 -359
- package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +35 -31
- 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 +2 -15
- package/src/feature-libraries/sequence-field/compose.ts +522 -137
- package/src/feature-libraries/sequence-field/helperTypes.ts +19 -34
- package/src/feature-libraries/sequence-field/invert.ts +228 -102
- 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 +207 -171
- package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +57 -0
- package/src/feature-libraries/sequence-field/replaceRevisions.ts +52 -26
- package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +3 -8
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +229 -677
- package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +70 -56
- package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +30 -28
- package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +131 -21
- package/src/feature-libraries/sequence-field/types.ts +79 -40
- package/src/feature-libraries/sequence-field/utils.ts +370 -211
- package/src/index.ts +25 -3
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/independentView.ts +9 -15
- package/src/shared-tree/index.ts +2 -3
- package/src/shared-tree/schematizeTree.ts +8 -21
- package/src/shared-tree/schematizingTreeView.ts +111 -48
- package/src/shared-tree/sharedTree.ts +23 -40
- package/src/shared-tree/sharedTreeChangeCodecs.ts +0 -8
- package/src/shared-tree/sharedTreeChangeFamily.ts +4 -7
- package/src/shared-tree/sharedTreeEditBuilder.ts +8 -43
- package/src/shared-tree/tree.ts +1 -1
- package/src/shared-tree/treeAlpha.ts +64 -11
- package/src/shared-tree/treeCheckout.ts +161 -115
- package/src/shared-tree/unhydratedTreeContext.ts +87 -0
- package/src/shared-tree-core/branch.ts +2 -8
- package/src/shared-tree-core/editManager.ts +2 -16
- package/src/shared-tree-core/editManagerCodecs.ts +1 -11
- package/src/shared-tree-core/editManagerFormatCommons.ts +0 -6
- package/src/shared-tree-core/editManagerFormatV1toV4.ts +1 -3
- package/src/shared-tree-core/index.ts +0 -2
- package/src/shared-tree-core/messageCodecV1ToV4.ts +1 -2
- package/src/shared-tree-core/messageCodecs.ts +1 -11
- package/src/shared-tree-core/messageFormat.ts +0 -6
- package/src/shared-tree-core/messageFormatV1ToV4.ts +1 -3
- package/src/shared-tree-core/sharedTreeCore.ts +1 -4
- package/src/shared-tree-core/transaction.ts +19 -39
- package/src/simple-tree/api/configuration.ts +4 -0
- package/src/simple-tree/api/eraseSchemaDetails.ts +60 -0
- package/src/simple-tree/api/identifierIndex.ts +4 -4
- package/src/simple-tree/api/index.ts +15 -2
- package/src/simple-tree/api/schemaFactory.ts +11 -3
- package/src/simple-tree/api/schemaFactoryAlpha.ts +262 -25
- package/src/simple-tree/api/schemaFactoryBeta.ts +10 -1
- package/src/simple-tree/api/schemaStatics.ts +79 -21
- package/src/simple-tree/api/simpleTreeIndex.ts +26 -20
- package/src/simple-tree/api/snapshotCompatibilityChecker.ts +4 -4
- package/src/simple-tree/api/transactionTypes.ts +24 -26
- package/src/simple-tree/api/tree.ts +92 -131
- package/src/simple-tree/api/typesUnsafe.ts +49 -1
- package/src/simple-tree/core/unhydratedFlexTree.ts +35 -82
- package/src/simple-tree/fieldSchema.ts +33 -11
- package/src/simple-tree/index.ts +15 -4
- package/src/simple-tree/node-kinds/array/arrayNode.ts +5 -7
- package/src/simple-tree/node-kinds/common.ts +5 -2
- package/src/simple-tree/node-kinds/index.ts +3 -0
- package/src/simple-tree/node-kinds/map/mapNode.ts +4 -4
- package/src/simple-tree/node-kinds/object/index.ts +3 -0
- package/src/simple-tree/node-kinds/object/objectNode.ts +95 -37
- package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +33 -2
- package/src/simple-tree/node-kinds/record/recordNode.ts +9 -10
- package/src/simple-tree/prepareForInsertion.ts +200 -342
- package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +15 -35
- package/src/text/textDomain.ts +91 -12
- package/src/text/textDomainFormatted.ts +127 -15
- package/src/treeFactory.ts +4 -16
- package/src/util/index.ts +0 -3
- package/src/util/rangeMap.ts +34 -78
- package/src/util/typeCheck.ts +1 -0
- package/src/util/typeUtils.ts +4 -7
- package/dist/beta.d.ts +0 -149
- package/dist/core/schema-view/index.d.ts +0 -6
- package/dist/core/schema-view/index.d.ts.map +0 -1
- package/dist/core/schema-view/index.js +0 -10
- package/dist/core/schema-view/index.js.map +0 -1
- package/dist/core/schema-view/view.d.ts +0 -31
- package/dist/core/schema-view/view.d.ts.map +0 -1
- package/dist/core/schema-view/view.js +0 -18
- package/dist/core/schema-view/view.js.map +0 -1
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -40
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -153
- package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
- package/dist/feature-libraries/forest-summary/formatV1.d.ts +0 -12
- package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +0 -1
- package/dist/feature-libraries/forest-summary/formatV1.js +0 -10
- package/dist/feature-libraries/forest-summary/formatV1.js.map +0 -1
- package/dist/feature-libraries/forest-summary/formatV2.d.ts +0 -12
- package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +0 -1
- package/dist/feature-libraries/forest-summary/formatV2.js +0 -10
- package/dist/feature-libraries/forest-summary/formatV2.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 -296
- package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -74
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -35
- 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/legacy.d.ts +0 -156
- package/dist/public.d.ts +0 -94
- package/lib/alpha.d.ts +0 -300
- package/lib/core/schema-view/index.d.ts +0 -6
- package/lib/core/schema-view/index.d.ts.map +0 -1
- package/lib/core/schema-view/index.js.map +0 -1
- package/lib/core/schema-view/view.d.ts +0 -31
- package/lib/core/schema-view/view.d.ts.map +0 -1
- package/lib/core/schema-view/view.js +0 -14
- package/lib/core/schema-view/view.js.map +0 -1
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -40
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -149
- package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
- package/lib/feature-libraries/forest-summary/formatV1.d.ts +0 -12
- package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +0 -1
- package/lib/feature-libraries/forest-summary/formatV1.js +0 -7
- package/lib/feature-libraries/forest-summary/formatV1.js.map +0 -1
- package/lib/feature-libraries/forest-summary/formatV2.d.ts +0 -12
- package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +0 -1
- package/lib/feature-libraries/forest-summary/formatV2.js +0 -7
- package/lib/feature-libraries/forest-summary/formatV2.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 -292
- package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -74
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -32
- 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/src/core/schema-view/README.md +0 -9
- package/src/core/schema-view/view.ts +0 -38
- package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +0 -231
- package/src/feature-libraries/forest-summary/formatV1.ts +0 -11
- package/src/feature-libraries/forest-summary/formatV2.ts +0 -11
- package/src/feature-libraries/modular-schema/modularChangeCodecV3.ts +0 -649
- package/src/feature-libraries/modular-schema/modularChangeFormatV3.ts +0 -67
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV3.ts +0 -45
- package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +0 -94
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import type { Static } from "@sinclair/typebox";
|
|
6
|
-
export declare const FormatV1: import("@sinclair/typebox").TObject<{
|
|
7
|
-
version: import("@sinclair/typebox").TLiteral<import("../../util/brand.js").Brand<1, "ForestFormatVersion">>;
|
|
8
|
-
keys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKey>>;
|
|
9
|
-
fields: import("@sinclair/typebox").TUnsafe<import("../../index.js").JsonCompatibleReadOnly>;
|
|
10
|
-
}>;
|
|
11
|
-
export type FormatV1 = Static<typeof FormatV1>;
|
|
12
|
-
//# sourceMappingURL=formatV1.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,eAAO,MAAM,QAAQ;;;;EAAuC,CAAC;AAC7D,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.FormatV1 = void 0;
|
|
8
|
-
const formatCommon_js_1 = require("./formatCommon.js");
|
|
9
|
-
exports.FormatV1 = (0, formatCommon_js_1.FormatCommon)(formatCommon_js_1.ForestFormatVersion.v1);
|
|
10
|
-
//# sourceMappingURL=formatV1.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,uDAAsE;AAEzD,QAAA,QAAQ,GAAG,IAAA,8BAAY,EAAC,qCAAmB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Static } from \"@sinclair/typebox\";\n\nimport { FormatCommon, ForestFormatVersion } from \"./formatCommon.js\";\n\nexport const FormatV1 = FormatCommon(ForestFormatVersion.v1);\nexport type FormatV1 = Static<typeof FormatV1>;\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import type { Static } from "@sinclair/typebox";
|
|
6
|
-
export declare const FormatV2: import("@sinclair/typebox").TObject<{
|
|
7
|
-
version: import("@sinclair/typebox").TLiteral<import("../../util/brand.js").Brand<2, "ForestFormatVersion">>;
|
|
8
|
-
keys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKey>>;
|
|
9
|
-
fields: import("@sinclair/typebox").TUnsafe<import("../../index.js").JsonCompatibleReadOnly>;
|
|
10
|
-
}>;
|
|
11
|
-
export type FormatV2 = Static<typeof FormatV2>;
|
|
12
|
-
//# sourceMappingURL=formatV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,eAAO,MAAM,QAAQ;;;;EAAuC,CAAC;AAC7D,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.FormatV2 = void 0;
|
|
8
|
-
const formatCommon_js_1 = require("./formatCommon.js");
|
|
9
|
-
exports.FormatV2 = (0, formatCommon_js_1.FormatCommon)(formatCommon_js_1.ForestFormatVersion.v2);
|
|
10
|
-
//# sourceMappingURL=formatV2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV2.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,uDAAsE;AAEzD,QAAA,QAAQ,GAAG,IAAA,8BAAY,EAAC,qCAAmB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Static } from \"@sinclair/typebox\";\n\nimport { FormatCommon, ForestFormatVersion } from \"./formatCommon.js\";\n\nexport const FormatV2 = FormatCommon(ForestFormatVersion.v2);\nexport type FormatV2 = Static<typeof FormatV2>;\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { type ICodecOptions, type IJsonCodec } from "../../codec/index.js";
|
|
6
|
-
import { type ChangeEncodingContext, type EncodedRevisionTag, type RevisionTag } from "../../core/index.js";
|
|
7
|
-
import type { FieldBatchCodec } from "../chunked-forest/index.js";
|
|
8
|
-
import { TreeCompressionStrategy } from "../treeCompressionUtils.js";
|
|
9
|
-
import type { FieldKindConfiguration } from "./fieldKindConfiguration.js";
|
|
10
|
-
import { EncodedModularChangesetV3 } from "./modularChangeFormatV3.js";
|
|
11
|
-
import { type ModularChangeset } from "./modularChangeTypes.js";
|
|
12
|
-
type ModularChangeCodec = IJsonCodec<ModularChangeset, EncodedModularChangesetV3, EncodedModularChangesetV3, ChangeEncodingContext>;
|
|
13
|
-
export declare function makeModularChangeCodecV3(fieldKinds: FieldKindConfiguration, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, fieldsCodec: FieldBatchCodec, codecOptions: ICodecOptions, chunkCompressionStrategy?: TreeCompressionStrategy): ModularChangeCodec;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=modularChangeCodecV3.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeCodecV3.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecV3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAIN,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EAGvB,KAAK,WAAW,EAChB,MAAM,qBAAqB,CAAC;AAiB7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAGrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAuB1E,OAAO,EACN,yBAAyB,EAGzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAMN,KAAK,gBAAgB,EAKrB,MAAM,yBAAyB,CAAC;AAEjC,KAAK,kBAAkB,GAAG,UAAU,CACnC,gBAAgB,EAChB,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,CACrB,CAAC;AASF,wBAAgB,wBAAwB,CACvC,UAAU,EAAE,sBAAsB,EAClC,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,WAAW,EAAE,eAAe,EAC5B,YAAY,EAAE,aAAa,EAC3B,wBAAwB,GAAE,uBAA4D,GACpF,kBAAkB,CA2dpB"}
|
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.makeModularChangeCodecV3 = void 0;
|
|
8
|
-
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
|
-
const index_js_1 = require("../../codec/index.js");
|
|
10
|
-
const index_js_2 = require("../../core/index.js");
|
|
11
|
-
const index_js_3 = require("../../util/index.js");
|
|
12
|
-
const changeAtomIdBTree_js_1 = require("../changeAtomIdBTree.js");
|
|
13
|
-
const changeAtomIdCodec_js_1 = require("../changeAtomIdCodec.js");
|
|
14
|
-
const treeCompressionUtils_js_1 = require("../treeCompressionUtils.js");
|
|
15
|
-
const genericFieldKind_js_1 = require("./genericFieldKind.js");
|
|
16
|
-
const modularChangeCodecV1_js_1 = require("./modularChangeCodecV1.js");
|
|
17
|
-
const modularChangeFamily_js_1 = require("./modularChangeFamily.js");
|
|
18
|
-
const modularChangeFormatV3_js_1 = require("./modularChangeFormatV3.js");
|
|
19
|
-
const modularChangeTypes_js_1 = require("./modularChangeTypes.js");
|
|
20
|
-
function makeModularChangeCodecV3(fieldKinds, revisionTagCodec, fieldsCodec, codecOptions, chunkCompressionStrategy = treeCompressionUtils_js_1.TreeCompressionStrategy.Compressed) {
|
|
21
|
-
const fieldChangesetCodecs = (0, modularChangeCodecV1_js_1.getFieldChangesetCodecs)(fieldKinds, revisionTagCodec, codecOptions);
|
|
22
|
-
const getFieldChangesetCodec = (fieldKind) => {
|
|
23
|
-
const entry = fieldChangesetCodecs.get(fieldKind);
|
|
24
|
-
(0, internal_1.assert)(entry !== undefined, "Tried to encode unsupported fieldKind");
|
|
25
|
-
return entry;
|
|
26
|
-
};
|
|
27
|
-
const changeAtomIdCodec = (0, changeAtomIdCodec_js_1.makeChangeAtomIdCodec)(revisionTagCodec);
|
|
28
|
-
function encodeFieldChangesForJson(change, parentId, fieldToRoots, context, encodeNode, getInputDetachId, isAttachId, isDetachId, getCellIdForMove) {
|
|
29
|
-
const encodedFields = [];
|
|
30
|
-
for (const [field, fieldChange] of change) {
|
|
31
|
-
const { codec, compiledSchema } = getFieldChangesetCodec(fieldChange.fieldKind);
|
|
32
|
-
const rootChanges = fieldToRoots.get([parentId?.revision, parentId?.localId, field]);
|
|
33
|
-
const fieldContext = {
|
|
34
|
-
baseContext: context,
|
|
35
|
-
rootNodeChanges: rootChanges?.nodeChanges ?? (0, changeAtomIdBTree_js_1.newChangeAtomIdBTree)(),
|
|
36
|
-
rootRenames: rootChanges?.renames ?? (0, index_js_2.newChangeAtomIdTransform)(),
|
|
37
|
-
encodeNode,
|
|
38
|
-
getInputRootId: getInputDetachId,
|
|
39
|
-
isAttachId,
|
|
40
|
-
isDetachId,
|
|
41
|
-
getCellIdForMove,
|
|
42
|
-
decodeNode: () => (0, internal_1.fail)(0xb1e /* Should not decode nodes during field encoding */),
|
|
43
|
-
decodeRootNodeChange: () => (0, internal_1.fail)("Should not be called during encoding"),
|
|
44
|
-
decodeRootRename: () => (0, internal_1.fail)("Should not be called during encoding"),
|
|
45
|
-
decodeMoveAndDetach: () => (0, internal_1.fail)("Should not be called during encoding"),
|
|
46
|
-
generateId: () => (0, internal_1.fail)("Should not be called during encoding"),
|
|
47
|
-
};
|
|
48
|
-
const encodedChange = codec.encode(fieldChange.change, fieldContext);
|
|
49
|
-
if (compiledSchema !== undefined && !compiledSchema.check(encodedChange)) {
|
|
50
|
-
(0, internal_1.fail)(0xb1f /* Encoded change didn't pass schema validation. */);
|
|
51
|
-
}
|
|
52
|
-
const fieldKey = field;
|
|
53
|
-
const encodedField = {
|
|
54
|
-
fieldKey,
|
|
55
|
-
fieldKind: fieldChange.fieldKind,
|
|
56
|
-
change: encodedChange,
|
|
57
|
-
};
|
|
58
|
-
encodedFields.push(encodedField);
|
|
59
|
-
}
|
|
60
|
-
return encodedFields;
|
|
61
|
-
}
|
|
62
|
-
function encodeNodeChangesForJson(change, id, fieldToRoots, context, encodeNode, getInputDetachId, isAttachId, isDetachId, getCellIdForMove) {
|
|
63
|
-
const encodedChange = {};
|
|
64
|
-
// Note: revert constraints are ignored for now because they would only be needed if we supported reverting changes made by peers.
|
|
65
|
-
const { fieldChanges, nodeExistsConstraint } = change;
|
|
66
|
-
if (fieldChanges !== undefined) {
|
|
67
|
-
encodedChange.fieldChanges = encodeFieldChangesForJson(fieldChanges, id, fieldToRoots, context, encodeNode, getInputDetachId, isAttachId, isDetachId, getCellIdForMove);
|
|
68
|
-
}
|
|
69
|
-
if (nodeExistsConstraint !== undefined) {
|
|
70
|
-
encodedChange.nodeExistsConstraint = nodeExistsConstraint;
|
|
71
|
-
}
|
|
72
|
-
return encodedChange;
|
|
73
|
-
}
|
|
74
|
-
function encodeRootNodesForJson(roots, context, encodeNode) {
|
|
75
|
-
const encoded = [];
|
|
76
|
-
for (const [[revision, localId], nodeId] of roots.entries()) {
|
|
77
|
-
encoded.push({
|
|
78
|
-
detachId: changeAtomIdCodec.encode({ revision, localId }, context),
|
|
79
|
-
nodeChangeset: encodeNode(nodeId),
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
return encoded;
|
|
83
|
-
}
|
|
84
|
-
function encodeRenamesForJson(renames, context) {
|
|
85
|
-
const encoded = [];
|
|
86
|
-
for (const entry of renames.entries()) {
|
|
87
|
-
encoded.push({
|
|
88
|
-
oldId: changeAtomIdCodec.encode(entry.start, context),
|
|
89
|
-
newId: changeAtomIdCodec.encode(entry.value, context),
|
|
90
|
-
count: entry.length,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
return encoded;
|
|
94
|
-
}
|
|
95
|
-
function decodeFieldChangesFromJson(encodedChange, parentId, decodedCrossFieldKeys, context, decodeNode, idAllocator) {
|
|
96
|
-
const decodedFields = new Map();
|
|
97
|
-
for (const field of encodedChange) {
|
|
98
|
-
const { codec, compiledSchema } = getFieldChangesetCodec(field.fieldKind);
|
|
99
|
-
if (compiledSchema !== undefined && !compiledSchema.check(field.change)) {
|
|
100
|
-
(0, internal_1.fail)(0xb20 /* Encoded change didn't pass schema validation. */);
|
|
101
|
-
}
|
|
102
|
-
const fieldId = {
|
|
103
|
-
nodeId: parentId,
|
|
104
|
-
field: field.fieldKey,
|
|
105
|
-
};
|
|
106
|
-
const fieldContext = {
|
|
107
|
-
baseContext: context,
|
|
108
|
-
rootNodeChanges: (0, changeAtomIdBTree_js_1.newChangeAtomIdBTree)(),
|
|
109
|
-
rootRenames: (0, index_js_2.newChangeAtomIdTransform)(),
|
|
110
|
-
encodeNode: () => (0, internal_1.fail)(0xb21 /* Should not encode nodes during field decoding */),
|
|
111
|
-
getInputRootId: () => (0, internal_1.fail)("Should not query during decoding"),
|
|
112
|
-
isAttachId: () => (0, internal_1.fail)("Should not query during decoding"),
|
|
113
|
-
isDetachId: () => (0, internal_1.fail)("Should not query during decoding"),
|
|
114
|
-
getCellIdForMove: () => (0, internal_1.fail)("Should not query during decoding"),
|
|
115
|
-
decodeNode: (encodedNode) => decodeNode(encodedNode, { field: fieldId }),
|
|
116
|
-
decodeRootNodeChange: (detachId, encodedNode) => { },
|
|
117
|
-
decodeRootRename: (oldId, newId, count) => { },
|
|
118
|
-
decodeMoveAndDetach: (detachId, count) => { },
|
|
119
|
-
generateId: () => ({
|
|
120
|
-
revision: context.revision,
|
|
121
|
-
localId: (0, index_js_3.brand)(idAllocator.allocate()),
|
|
122
|
-
}),
|
|
123
|
-
};
|
|
124
|
-
const fieldChangeset = codec.decode(field.change, fieldContext);
|
|
125
|
-
const crossFieldKeys = getChangeHandler(fieldKinds, field.fieldKind).getCrossFieldKeys(fieldChangeset);
|
|
126
|
-
for (const { key, count } of crossFieldKeys) {
|
|
127
|
-
decodedCrossFieldKeys.set(key, count, fieldId);
|
|
128
|
-
}
|
|
129
|
-
const fieldKey = (0, index_js_3.brand)(field.fieldKey);
|
|
130
|
-
decodedFields.set(fieldKey, {
|
|
131
|
-
fieldKind: field.fieldKind,
|
|
132
|
-
change: (0, index_js_3.brand)(fieldChangeset),
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
return decodedFields;
|
|
136
|
-
}
|
|
137
|
-
function decodeNodeChangesetFromJson(encodedChange, id, decodedCrossFieldKeys, decodedRootTable, context, decodeNode, idAllocator) {
|
|
138
|
-
const decodedChange = {};
|
|
139
|
-
const { fieldChanges, nodeExistsConstraint } = encodedChange;
|
|
140
|
-
if (fieldChanges !== undefined) {
|
|
141
|
-
decodedChange.fieldChanges = decodeFieldChangesFromJson(fieldChanges, id, decodedCrossFieldKeys, context, decodeNode, idAllocator);
|
|
142
|
-
}
|
|
143
|
-
if (nodeExistsConstraint !== undefined) {
|
|
144
|
-
decodedChange.nodeExistsConstraint = nodeExistsConstraint;
|
|
145
|
-
}
|
|
146
|
-
return decodedChange;
|
|
147
|
-
}
|
|
148
|
-
function decodeRootTable(encodedRoots, encodedRenames, context, decodeNode) {
|
|
149
|
-
const roots = (0, modularChangeFamily_js_1.newRootTable)();
|
|
150
|
-
if (encodedRoots !== undefined) {
|
|
151
|
-
for (const { detachId, nodeChangeset } of encodedRoots) {
|
|
152
|
-
const decodedId = changeAtomIdCodec.decode(detachId, context);
|
|
153
|
-
(0, changeAtomIdBTree_js_1.setInChangeAtomIdMap)(roots.nodeChanges, decodedId, decodeNode(nodeChangeset, { root: decodedId }));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
if (encodedRenames !== undefined) {
|
|
157
|
-
for (const { oldId, newId, count } of encodedRenames) {
|
|
158
|
-
(0, modularChangeFamily_js_1.addNodeRename)(roots, changeAtomIdCodec.decode(oldId, context), changeAtomIdCodec.decode(newId, context), count, undefined);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return roots;
|
|
162
|
-
}
|
|
163
|
-
const modularChangeCodec = {
|
|
164
|
-
encode: (change, context) => {
|
|
165
|
-
const fieldToRoots = getFieldToRoots(change.rootNodes);
|
|
166
|
-
const isAttachId = (id, count) => {
|
|
167
|
-
const attachEntry = (0, modularChangeFamily_js_1.getFirstAttachField)(change.crossFieldKeys, id, count);
|
|
168
|
-
return { ...attachEntry, value: attachEntry.value !== undefined };
|
|
169
|
-
};
|
|
170
|
-
const isDetachId = (id, count) => {
|
|
171
|
-
const detachEntry = (0, modularChangeFamily_js_1.getFirstDetachField)(change.crossFieldKeys, id, count);
|
|
172
|
-
const renameEntry = change.rootNodes.oldToNewId.getFirst(id, detachEntry.length);
|
|
173
|
-
const isDetach = (detachEntry.value ?? renameEntry.value) !== undefined;
|
|
174
|
-
return { start: id, value: isDetach, length: renameEntry.length };
|
|
175
|
-
};
|
|
176
|
-
const getInputDetachId = (id, count) => {
|
|
177
|
-
return change.rootNodes.newToOldId.getFirst(id, count);
|
|
178
|
-
};
|
|
179
|
-
const moveIdToCellId = (0, modularChangeCodecV1_js_1.getMoveIdToCellId)(change, fieldKinds, fieldToRoots);
|
|
180
|
-
const getCellIdForMove = (id, count) => moveIdToCellId.getFirst(id, count);
|
|
181
|
-
const encodeNode = (nodeId) => {
|
|
182
|
-
// TODO: Handle node aliasing.
|
|
183
|
-
const node = change.nodeChanges.get([nodeId.revision, nodeId.localId]);
|
|
184
|
-
(0, internal_1.assert)(node !== undefined, 0x92e /* Unknown node ID */);
|
|
185
|
-
return encodeNodeChangesForJson(node, nodeId, fieldToRoots, context, encodeNode, getInputDetachId, isAttachId, isDetachId, getCellIdForMove);
|
|
186
|
-
};
|
|
187
|
-
// Destroys only exist in rollback changesets, which are never sent.
|
|
188
|
-
(0, internal_1.assert)(change.destroys === undefined, 0x899 /* Unexpected changeset with destroys */);
|
|
189
|
-
const encoded = {
|
|
190
|
-
maxId: change.maxId,
|
|
191
|
-
revisions: change.revisions === undefined
|
|
192
|
-
? undefined
|
|
193
|
-
: (0, modularChangeCodecV1_js_1.encodeRevisionInfos)(change.revisions, context, revisionTagCodec),
|
|
194
|
-
fieldChanges: encodeFieldChangesForJson(change.fieldChanges, undefined, fieldToRoots, context, encodeNode, getInputDetachId, isAttachId, isDetachId, getCellIdForMove),
|
|
195
|
-
rootNodes: encodeRootNodesForJson(change.rootNodes.nodeChanges, context, encodeNode),
|
|
196
|
-
nodeRenames: encodeRenamesForJson(change.rootNodes.oldToNewId, context),
|
|
197
|
-
builds: (0, modularChangeCodecV1_js_1.encodeDetachedNodes)(change.builds, context, revisionTagCodec, fieldsCodec, chunkCompressionStrategy),
|
|
198
|
-
refreshers: (0, modularChangeCodecV1_js_1.encodeDetachedNodes)(change.refreshers, context, revisionTagCodec, fieldsCodec, chunkCompressionStrategy),
|
|
199
|
-
violations: change.constraintViolationCount,
|
|
200
|
-
};
|
|
201
|
-
if (change.noChangeConstraint !== undefined) {
|
|
202
|
-
encoded.noChangeConstraint = change.noChangeConstraint;
|
|
203
|
-
}
|
|
204
|
-
return encoded;
|
|
205
|
-
},
|
|
206
|
-
decode: (encodedChange, context) => {
|
|
207
|
-
const idAllocator = (0, index_js_3.idAllocatorFromMaxId)(encodedChange.maxId);
|
|
208
|
-
const nodeChanges = (0, changeAtomIdBTree_js_1.newChangeAtomIdBTree)();
|
|
209
|
-
const nodeToParent = (0, changeAtomIdBTree_js_1.newChangeAtomIdBTree)();
|
|
210
|
-
const crossFieldKeys = (0, modularChangeTypes_js_1.newCrossFieldRangeTable)();
|
|
211
|
-
const rootNodes = (0, modularChangeFamily_js_1.newRootTable)();
|
|
212
|
-
const decodeNode = (encodedNode, fieldId) => {
|
|
213
|
-
const nodeId = {
|
|
214
|
-
revision: context.revision,
|
|
215
|
-
localId: (0, index_js_3.brand)(idAllocator.allocate()),
|
|
216
|
-
};
|
|
217
|
-
const node = decodeNodeChangesetFromJson(encodedNode, nodeId, crossFieldKeys, rootNodes, context, decodeNode, idAllocator);
|
|
218
|
-
nodeChanges.set([nodeId.revision, nodeId.localId], node);
|
|
219
|
-
if (fieldId !== undefined) {
|
|
220
|
-
nodeToParent.set([nodeId.revision, nodeId.localId], fieldId);
|
|
221
|
-
}
|
|
222
|
-
return nodeId;
|
|
223
|
-
};
|
|
224
|
-
const decoded = {
|
|
225
|
-
rebaseVersion: 2,
|
|
226
|
-
fieldChanges: decodeFieldChangesFromJson(encodedChange.fieldChanges, undefined, crossFieldKeys, context, decodeNode, idAllocator),
|
|
227
|
-
nodeChanges,
|
|
228
|
-
rootNodes: decodeRootTable(encodedChange.rootNodes, encodedChange.nodeRenames, context, decodeNode),
|
|
229
|
-
nodeToParent,
|
|
230
|
-
nodeAliases: (0, changeAtomIdBTree_js_1.newChangeAtomIdBTree)(),
|
|
231
|
-
crossFieldKeys,
|
|
232
|
-
};
|
|
233
|
-
if (encodedChange.builds !== undefined) {
|
|
234
|
-
decoded.builds = (0, modularChangeCodecV1_js_1.decodeDetachedNodes)(encodedChange.builds, context, revisionTagCodec, fieldsCodec, chunkCompressionStrategy);
|
|
235
|
-
}
|
|
236
|
-
if (encodedChange.refreshers !== undefined) {
|
|
237
|
-
decoded.refreshers = (0, modularChangeCodecV1_js_1.decodeDetachedNodes)(encodedChange.refreshers, context, revisionTagCodec, fieldsCodec, chunkCompressionStrategy);
|
|
238
|
-
}
|
|
239
|
-
if (encodedChange.violations !== undefined) {
|
|
240
|
-
decoded.constraintViolationCount = encodedChange.violations;
|
|
241
|
-
}
|
|
242
|
-
if (encodedChange.noChangeConstraint !== undefined) {
|
|
243
|
-
decoded.noChangeConstraint = encodedChange.noChangeConstraint;
|
|
244
|
-
}
|
|
245
|
-
const decodedRevInfos = (0, modularChangeCodecV1_js_1.decodeRevisionInfos)(encodedChange.revisions, context, revisionTagCodec);
|
|
246
|
-
if (decodedRevInfos !== undefined) {
|
|
247
|
-
decoded.revisions = decodedRevInfos;
|
|
248
|
-
}
|
|
249
|
-
if (encodedChange.maxId !== undefined) {
|
|
250
|
-
decoded.maxId = encodedChange.maxId;
|
|
251
|
-
}
|
|
252
|
-
return decoded;
|
|
253
|
-
},
|
|
254
|
-
};
|
|
255
|
-
return (0, index_js_1.withSchemaValidation)(modularChangeFormatV3_js_1.EncodedModularChangesetV3, modularChangeCodec, codecOptions.jsonValidator);
|
|
256
|
-
}
|
|
257
|
-
exports.makeModularChangeCodecV3 = makeModularChangeCodecV3;
|
|
258
|
-
function getChangeHandler(fieldKinds, fieldKind) {
|
|
259
|
-
if (fieldKind === genericFieldKind_js_1.genericFieldKind.identifier) {
|
|
260
|
-
return genericFieldKind_js_1.genericFieldKind.changeHandler;
|
|
261
|
-
}
|
|
262
|
-
const handler = fieldKinds.get(fieldKind)?.kind.changeHandler;
|
|
263
|
-
(0, internal_1.assert)(handler !== undefined, 0x9c1 /* Unknown field kind */);
|
|
264
|
-
return handler;
|
|
265
|
-
}
|
|
266
|
-
function getFieldToRoots(rootTable) {
|
|
267
|
-
const fieldToRoots = (0, modularChangeFamily_js_1.newFieldIdKeyBTree)();
|
|
268
|
-
for (const [[revision, localId], nodeId] of rootTable.nodeChanges.entries()) {
|
|
269
|
-
const detachId = { revision, localId };
|
|
270
|
-
const fieldId = rootTable.detachLocations.getFirst(detachId, 1).value;
|
|
271
|
-
if (fieldId !== undefined) {
|
|
272
|
-
(0, changeAtomIdBTree_js_1.setInChangeAtomIdMap)(getOrAddInFieldRootMap(fieldToRoots, fieldId).nodeChanges, detachId, nodeId);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
for (const entry of rootTable.oldToNewId.entries()) {
|
|
276
|
-
const fieldId = rootTable.detachLocations.getFirst(entry.start, 1).value;
|
|
277
|
-
if (fieldId !== undefined) {
|
|
278
|
-
getOrAddInFieldRootMap(fieldToRoots, fieldId).renames.set(entry.start, entry.length, entry.value);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
return fieldToRoots;
|
|
282
|
-
}
|
|
283
|
-
function getOrAddInFieldRootMap(map, fieldId) {
|
|
284
|
-
const key = [fieldId.nodeId?.revision, fieldId.nodeId?.localId, fieldId.field];
|
|
285
|
-
const rootChanges = map.get(key);
|
|
286
|
-
if (rootChanges !== undefined) {
|
|
287
|
-
return rootChanges;
|
|
288
|
-
}
|
|
289
|
-
const newRootChanges = {
|
|
290
|
-
nodeChanges: (0, changeAtomIdBTree_js_1.newChangeAtomIdBTree)(),
|
|
291
|
-
renames: (0, index_js_2.newChangeAtomIdTransform)(),
|
|
292
|
-
};
|
|
293
|
-
map.set(key, newRootChanges);
|
|
294
|
-
return newRootChanges;
|
|
295
|
-
}
|
|
296
|
-
//# sourceMappingURL=modularChangeCodecV3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeCodecV3.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeCodecV3.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAmE;AAGnE,mDAK8B;AAC9B,kDAS6B;AAC7B,kDAS6B;AAC7B,kEAIiC;AACjC,kEAAgE;AAEhE,wEAAqE;AAIrE,+DAAyD;AACzD,uEAOmC;AACnC,qEAOkC;AAMlC,yEAIoC;AACpC,mEAWiC;AAgBjC,SAAgB,wBAAwB,CACvC,UAAkC,EAClC,gBAKC,EACD,WAA4B,EAC5B,YAA2B,EAC3B,2BAAoD,iDAAuB,CAAC,UAAU;IAEtF,MAAM,oBAAoB,GAAG,IAAA,iDAAuB,EACnD,UAAU,EACV,gBAAgB,EAChB,YAAY,CACZ,CAAC;IAEF,MAAM,sBAAsB,GAAG,CAC9B,SAA8B,EAI7B,EAAE;QACH,MAAM,KAAK,GAAG,oBAAoB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAClD,IAAA,iBAAM,EAAC,KAAK,KAAK,SAAS,EAAE,uCAAuC,CAAC,CAAC;QACrE,OAAO,KAAK,CAAC;IACd,CAAC,CAAC;IAEF,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Ae,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3F,MAAM,WAAW,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,WAAW,CAAC;IACpB,CAAC;IAED,MAAM,cAAc,GAAqB;QACxC,WAAW,EAAE,IAAA,2CAAoB,GAAE;QACnC,OAAO,EAAE,IAAA,mCAAwB,GAAE;KACnC,CAAC;IACF,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAC7B,OAAO,cAAc,CAAC;AACvB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport {\n\twithSchemaValidation,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\ttype SchemaValidationFunction,\n} from \"../../codec/index.js\";\nimport {\n\tnewChangeAtomIdTransform,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdRangeMap,\n\ttype ChangeEncodingContext,\n\ttype EncodedRevisionTag,\n\ttype FieldKey,\n\ttype FieldKindIdentifier,\n\ttype RevisionTag,\n} from \"../../core/index.js\";\nimport {\n\tbrand,\n\tidAllocatorFromMaxId,\n\ttype IdAllocator,\n\ttype JsonCompatibleReadOnly,\n\ttype Mutable,\n\ttype RangeQueryEntry,\n\ttype RangeQueryResult,\n\ttype TupleBTree,\n} from \"../../util/index.js\";\nimport {\n\tnewChangeAtomIdBTree,\n\tsetInChangeAtomIdMap,\n\ttype ChangeAtomIdBTree,\n} from \"../changeAtomIdBTree.js\";\nimport { makeChangeAtomIdCodec } from \"../changeAtomIdCodec.js\";\nimport type { FieldBatchCodec } from \"../chunked-forest/index.js\";\nimport { TreeCompressionStrategy } from \"../treeCompressionUtils.js\";\n\nimport type { FieldChangeEncodingContext, FieldChangeHandler } from \"./fieldChangeHandler.js\";\nimport type { FieldKindConfiguration } from \"./fieldKindConfiguration.js\";\nimport { genericFieldKind } from \"./genericFieldKind.js\";\nimport {\n\tdecodeDetachedNodes,\n\tdecodeRevisionInfos,\n\tencodeDetachedNodes,\n\tencodeRevisionInfos,\n\tgetFieldChangesetCodecs,\n\tgetMoveIdToCellId,\n} from \"./modularChangeCodecV1.js\";\nimport {\n\taddNodeRename,\n\tgetFirstAttachField,\n\tgetFirstDetachField,\n\tnewFieldIdKeyBTree,\n\tnewRootTable,\n\ttype FieldIdKey,\n} from \"./modularChangeFamily.js\";\nimport type {\n\tEncodedFieldChange,\n\tEncodedFieldChangeMap,\n\tEncodedNodeChangeset,\n} from \"./modularChangeFormatV1.js\";\nimport {\n\tEncodedModularChangesetV3,\n\ttype EncodedRenames,\n\ttype EncodedRootNodes,\n} from \"./modularChangeFormatV3.js\";\nimport {\n\tnewCrossFieldRangeTable,\n\ttype CrossFieldKeyTable,\n\ttype FieldChangeMap,\n\ttype FieldChangeset,\n\ttype FieldId,\n\ttype ModularChangeset,\n\ttype NodeChangeset,\n\ttype NodeId,\n\ttype NodeLocation,\n\ttype RootNodeTable,\n} from \"./modularChangeTypes.js\";\n\ntype ModularChangeCodec = IJsonCodec<\n\tModularChangeset,\n\tEncodedModularChangesetV3,\n\tEncodedModularChangesetV3,\n\tChangeEncodingContext\n>;\n\ntype FieldCodec = IJsonCodec<\n\tFieldChangeset,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tFieldChangeEncodingContext\n>;\n\nexport function makeModularChangeCodecV3(\n\tfieldKinds: FieldKindConfiguration,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tfieldsCodec: FieldBatchCodec,\n\tcodecOptions: ICodecOptions,\n\tchunkCompressionStrategy: TreeCompressionStrategy = TreeCompressionStrategy.Compressed,\n): ModularChangeCodec {\n\tconst fieldChangesetCodecs = getFieldChangesetCodecs(\n\t\tfieldKinds,\n\t\trevisionTagCodec,\n\t\tcodecOptions,\n\t);\n\n\tconst getFieldChangesetCodec = (\n\t\tfieldKind: FieldKindIdentifier,\n\t): {\n\t\tcompiledSchema?: SchemaValidationFunction<TAnySchema>;\n\t\tcodec: FieldCodec;\n\t} => {\n\t\tconst entry = fieldChangesetCodecs.get(fieldKind);\n\t\tassert(entry !== undefined, \"Tried to encode unsupported fieldKind\");\n\t\treturn entry;\n\t};\n\n\tconst changeAtomIdCodec = makeChangeAtomIdCodec(revisionTagCodec);\n\n\tfunction encodeFieldChangesForJson(\n\t\tchange: FieldChangeMap,\n\t\tparentId: NodeId | undefined,\n\t\tfieldToRoots: FieldRootMap,\n\t\tcontext: ChangeEncodingContext,\n\t\tencodeNode: NodeEncoder,\n\t\tgetInputDetachId: ChangeAtomMappingQuery,\n\t\tisAttachId: ChangeAtomIdRangeQuery,\n\t\tisDetachId: ChangeAtomIdRangeQuery,\n\t\tgetCellIdForMove: ChangeAtomMappingQuery,\n\t): EncodedFieldChangeMap {\n\t\tconst encodedFields: EncodedFieldChangeMap = [];\n\n\t\tfor (const [field, fieldChange] of change) {\n\t\t\tconst { codec, compiledSchema } = getFieldChangesetCodec(fieldChange.fieldKind);\n\t\t\tconst rootChanges = fieldToRoots.get([parentId?.revision, parentId?.localId, field]);\n\n\t\t\tconst fieldContext: FieldChangeEncodingContext = {\n\t\t\t\tbaseContext: context,\n\t\t\t\trootNodeChanges: rootChanges?.nodeChanges ?? newChangeAtomIdBTree(),\n\t\t\t\trootRenames: rootChanges?.renames ?? newChangeAtomIdTransform(),\n\n\t\t\t\tencodeNode,\n\t\t\t\tgetInputRootId: getInputDetachId,\n\t\t\t\tisAttachId,\n\t\t\t\tisDetachId,\n\t\t\t\tgetCellIdForMove,\n\n\t\t\t\tdecodeNode: () => fail(0xb1e /* Should not decode nodes during field encoding */),\n\t\t\t\tdecodeRootNodeChange: () => fail(\"Should not be called during encoding\"),\n\t\t\t\tdecodeRootRename: () => fail(\"Should not be called during encoding\"),\n\t\t\t\tdecodeMoveAndDetach: () => fail(\"Should not be called during encoding\"),\n\t\t\t\tgenerateId: () => fail(\"Should not be called during encoding\"),\n\t\t\t};\n\n\t\t\tconst encodedChange = codec.encode(fieldChange.change, fieldContext);\n\t\t\tif (compiledSchema !== undefined && !compiledSchema.check(encodedChange)) {\n\t\t\t\tfail(0xb1f /* Encoded change didn't pass schema validation. */);\n\t\t\t}\n\n\t\t\tconst fieldKey: FieldKey = field;\n\t\t\tconst encodedField: EncodedFieldChange = {\n\t\t\t\tfieldKey,\n\t\t\t\tfieldKind: fieldChange.fieldKind,\n\t\t\t\tchange: encodedChange,\n\t\t\t};\n\n\t\t\tencodedFields.push(encodedField);\n\t\t}\n\n\t\treturn encodedFields;\n\t}\n\n\tfunction encodeNodeChangesForJson(\n\t\tchange: NodeChangeset,\n\t\tid: NodeId,\n\t\tfieldToRoots: FieldRootMap,\n\t\tcontext: ChangeEncodingContext,\n\t\tencodeNode: NodeEncoder,\n\t\tgetInputDetachId: ChangeAtomMappingQuery,\n\t\tisAttachId: ChangeAtomIdRangeQuery,\n\t\tisDetachId: ChangeAtomIdRangeQuery,\n\t\tgetCellIdForMove: ChangeAtomMappingQuery,\n\t): EncodedNodeChangeset {\n\t\tconst encodedChange: EncodedNodeChangeset = {};\n\t\t// Note: revert constraints are ignored for now because they would only be needed if we supported reverting changes made by peers.\n\t\tconst { fieldChanges, nodeExistsConstraint } = change;\n\n\t\tif (fieldChanges !== undefined) {\n\t\t\tencodedChange.fieldChanges = encodeFieldChangesForJson(\n\t\t\t\tfieldChanges,\n\t\t\t\tid,\n\t\t\t\tfieldToRoots,\n\t\t\t\tcontext,\n\t\t\t\tencodeNode,\n\t\t\t\tgetInputDetachId,\n\t\t\t\tisAttachId,\n\t\t\t\tisDetachId,\n\t\t\t\tgetCellIdForMove,\n\t\t\t);\n\t\t}\n\n\t\tif (nodeExistsConstraint !== undefined) {\n\t\t\tencodedChange.nodeExistsConstraint = nodeExistsConstraint;\n\t\t}\n\n\t\treturn encodedChange;\n\t}\n\n\tfunction encodeRootNodesForJson(\n\t\troots: ChangeAtomIdBTree<NodeId>,\n\t\tcontext: ChangeEncodingContext,\n\t\tencodeNode: NodeEncoder,\n\t): EncodedRootNodes {\n\t\tconst encoded: EncodedRootNodes = [];\n\t\tfor (const [[revision, localId], nodeId] of roots.entries()) {\n\t\t\tencoded.push({\n\t\t\t\tdetachId: changeAtomIdCodec.encode({ revision, localId }, context),\n\t\t\t\tnodeChangeset: encodeNode(nodeId),\n\t\t\t});\n\t\t}\n\n\t\treturn encoded;\n\t}\n\n\tfunction encodeRenamesForJson(\n\t\trenames: ChangeAtomIdRangeMap<ChangeAtomId>,\n\t\tcontext: ChangeEncodingContext,\n\t): EncodedRenames {\n\t\tconst encoded: EncodedRenames = [];\n\t\tfor (const entry of renames.entries()) {\n\t\t\tencoded.push({\n\t\t\t\toldId: changeAtomIdCodec.encode(entry.start, context),\n\t\t\t\tnewId: changeAtomIdCodec.encode(entry.value, context),\n\t\t\t\tcount: entry.length,\n\t\t\t});\n\t\t}\n\n\t\treturn encoded;\n\t}\n\n\tfunction decodeFieldChangesFromJson(\n\t\tencodedChange: EncodedFieldChangeMap,\n\t\tparentId: NodeId | undefined,\n\t\tdecodedCrossFieldKeys: CrossFieldKeyTable,\n\t\tcontext: ChangeEncodingContext,\n\t\tdecodeNode: NodeDecoder,\n\t\tidAllocator: IdAllocator,\n\t): FieldChangeMap {\n\t\tconst decodedFields: FieldChangeMap = new Map();\n\t\tfor (const field of encodedChange) {\n\t\t\tconst { codec, compiledSchema } = getFieldChangesetCodec(field.fieldKind);\n\t\t\tif (compiledSchema !== undefined && !compiledSchema.check(field.change)) {\n\t\t\t\tfail(0xb20 /* Encoded change didn't pass schema validation. */);\n\t\t\t}\n\n\t\t\tconst fieldId: FieldId = {\n\t\t\t\tnodeId: parentId,\n\t\t\t\tfield: field.fieldKey,\n\t\t\t};\n\n\t\t\tconst fieldContext: FieldChangeEncodingContext = {\n\t\t\t\tbaseContext: context,\n\t\t\t\trootNodeChanges: newChangeAtomIdBTree(),\n\t\t\t\trootRenames: newChangeAtomIdTransform(),\n\n\t\t\t\tencodeNode: () => fail(0xb21 /* Should not encode nodes during field decoding */),\n\t\t\t\tgetInputRootId: () => fail(\"Should not query during decoding\"),\n\t\t\t\tisAttachId: () => fail(\"Should not query during decoding\"),\n\t\t\t\tisDetachId: () => fail(\"Should not query during decoding\"),\n\t\t\t\tgetCellIdForMove: () => fail(\"Should not query during decoding\"),\n\n\t\t\t\tdecodeNode: (encodedNode: EncodedNodeChangeset): NodeId =>\n\t\t\t\t\tdecodeNode(encodedNode, { field: fieldId }),\n\n\t\t\t\tdecodeRootNodeChange: (detachId, encodedNode): void => {},\n\t\t\t\tdecodeRootRename: (oldId, newId, count): void => {},\n\t\t\t\tdecodeMoveAndDetach: (detachId, count): void => {},\n\n\t\t\t\tgenerateId: (): ChangeAtomId => ({\n\t\t\t\t\trevision: context.revision,\n\t\t\t\t\tlocalId: brand(idAllocator.allocate()),\n\t\t\t\t}),\n\t\t\t};\n\n\t\t\tconst fieldChangeset = codec.decode(field.change, fieldContext);\n\n\t\t\tconst crossFieldKeys = getChangeHandler(fieldKinds, field.fieldKind).getCrossFieldKeys(\n\t\t\t\tfieldChangeset,\n\t\t\t);\n\n\t\t\tfor (const { key, count } of crossFieldKeys) {\n\t\t\t\tdecodedCrossFieldKeys.set(key, count, fieldId);\n\t\t\t}\n\n\t\t\tconst fieldKey: FieldKey = brand<FieldKey>(field.fieldKey);\n\n\t\t\tdecodedFields.set(fieldKey, {\n\t\t\t\tfieldKind: field.fieldKind,\n\t\t\t\tchange: brand(fieldChangeset),\n\t\t\t});\n\t\t}\n\n\t\treturn decodedFields;\n\t}\n\n\tfunction decodeNodeChangesetFromJson(\n\t\tencodedChange: EncodedNodeChangeset,\n\t\tid: NodeId,\n\t\tdecodedCrossFieldKeys: CrossFieldKeyTable,\n\t\tdecodedRootTable: RootNodeTable,\n\t\tcontext: ChangeEncodingContext,\n\t\tdecodeNode: NodeDecoder,\n\t\tidAllocator: IdAllocator,\n\t): NodeChangeset {\n\t\tconst decodedChange: Mutable<NodeChangeset> = {};\n\t\tconst { fieldChanges, nodeExistsConstraint } = encodedChange;\n\n\t\tif (fieldChanges !== undefined) {\n\t\t\tdecodedChange.fieldChanges = decodeFieldChangesFromJson(\n\t\t\t\tfieldChanges,\n\t\t\t\tid,\n\t\t\t\tdecodedCrossFieldKeys,\n\t\t\t\tcontext,\n\t\t\t\tdecodeNode,\n\t\t\t\tidAllocator,\n\t\t\t);\n\t\t}\n\n\t\tif (nodeExistsConstraint !== undefined) {\n\t\t\tdecodedChange.nodeExistsConstraint = nodeExistsConstraint;\n\t\t}\n\n\t\treturn decodedChange;\n\t}\n\n\ttype ChangeAtomMappingQuery = (\n\t\tid: ChangeAtomId,\n\t\tcount: number,\n\t) => RangeQueryResult<ChangeAtomId | undefined>;\n\n\ttype ChangeAtomIdRangeQuery = (id: ChangeAtomId, count: number) => RangeQueryResult<boolean>;\n\ttype NodeEncoder = (nodeId: NodeId) => EncodedNodeChangeset;\n\ttype NodeDecoder = (encoded: EncodedNodeChangeset, fieldId: NodeLocation) => NodeId;\n\n\tfunction decodeRootTable(\n\t\tencodedRoots: EncodedRootNodes | undefined,\n\t\tencodedRenames: EncodedRenames | undefined,\n\t\tcontext: ChangeEncodingContext,\n\t\tdecodeNode: NodeDecoder,\n\t): RootNodeTable {\n\t\tconst roots = newRootTable();\n\t\tif (encodedRoots !== undefined) {\n\t\t\tfor (const { detachId, nodeChangeset } of encodedRoots) {\n\t\t\t\tconst decodedId = changeAtomIdCodec.decode(detachId, context);\n\t\t\t\tsetInChangeAtomIdMap(\n\t\t\t\t\troots.nodeChanges,\n\t\t\t\t\tdecodedId,\n\t\t\t\t\tdecodeNode(nodeChangeset, { root: decodedId }),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (encodedRenames !== undefined) {\n\t\t\tfor (const { oldId, newId, count } of encodedRenames) {\n\t\t\t\taddNodeRename(\n\t\t\t\t\troots,\n\t\t\t\t\tchangeAtomIdCodec.decode(oldId, context),\n\t\t\t\t\tchangeAtomIdCodec.decode(newId, context),\n\t\t\t\t\tcount,\n\t\t\t\t\tundefined,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn roots;\n\t}\n\n\tconst modularChangeCodec: ModularChangeCodec = {\n\t\tencode: (change, context) => {\n\t\t\tconst fieldToRoots = getFieldToRoots(change.rootNodes);\n\t\t\tconst isAttachId = (id: ChangeAtomId, count: number): RangeQueryResult<boolean> => {\n\t\t\t\tconst attachEntry = getFirstAttachField(change.crossFieldKeys, id, count);\n\t\t\t\treturn { ...attachEntry, value: attachEntry.value !== undefined };\n\t\t\t};\n\n\t\t\tconst isDetachId = (\n\t\t\t\tid: ChangeAtomId,\n\t\t\t\tcount: number,\n\t\t\t): RangeQueryEntry<ChangeAtomId, boolean> => {\n\t\t\t\tconst detachEntry = getFirstDetachField(change.crossFieldKeys, id, count);\n\t\t\t\tconst renameEntry = change.rootNodes.oldToNewId.getFirst(id, detachEntry.length);\n\t\t\t\tconst isDetach = (detachEntry.value ?? renameEntry.value) !== undefined;\n\t\t\t\treturn { start: id, value: isDetach, length: renameEntry.length };\n\t\t\t};\n\n\t\t\tconst getInputDetachId = (\n\t\t\t\tid: ChangeAtomId,\n\t\t\t\tcount: number,\n\t\t\t): RangeQueryResult<ChangeAtomId | undefined> => {\n\t\t\t\treturn change.rootNodes.newToOldId.getFirst(id, count);\n\t\t\t};\n\n\t\t\tconst moveIdToCellId = getMoveIdToCellId(change, fieldKinds, fieldToRoots);\n\t\t\tconst getCellIdForMove = (\n\t\t\t\tid: ChangeAtomId,\n\t\t\t\tcount: number,\n\t\t\t): RangeQueryResult<ChangeAtomId | undefined> => moveIdToCellId.getFirst(id, count);\n\n\t\t\tconst encodeNode = (nodeId: NodeId): EncodedNodeChangeset => {\n\t\t\t\t// TODO: Handle node aliasing.\n\t\t\t\tconst node = change.nodeChanges.get([nodeId.revision, nodeId.localId]);\n\t\t\t\tassert(node !== undefined, 0x92e /* Unknown node ID */);\n\t\t\t\treturn encodeNodeChangesForJson(\n\t\t\t\t\tnode,\n\t\t\t\t\tnodeId,\n\t\t\t\t\tfieldToRoots,\n\t\t\t\t\tcontext,\n\t\t\t\t\tencodeNode,\n\t\t\t\t\tgetInputDetachId,\n\t\t\t\t\tisAttachId,\n\t\t\t\t\tisDetachId,\n\t\t\t\t\tgetCellIdForMove,\n\t\t\t\t);\n\t\t\t};\n\n\t\t\t// Destroys only exist in rollback changesets, which are never sent.\n\t\t\tassert(change.destroys === undefined, 0x899 /* Unexpected changeset with destroys */);\n\t\t\tconst encoded: EncodedModularChangesetV3 = {\n\t\t\t\tmaxId: change.maxId,\n\t\t\t\trevisions:\n\t\t\t\t\tchange.revisions === undefined\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: encodeRevisionInfos(change.revisions, context, revisionTagCodec),\n\t\t\t\tfieldChanges: encodeFieldChangesForJson(\n\t\t\t\t\tchange.fieldChanges,\n\t\t\t\t\tundefined,\n\t\t\t\t\tfieldToRoots,\n\t\t\t\t\tcontext,\n\t\t\t\t\tencodeNode,\n\t\t\t\t\tgetInputDetachId,\n\t\t\t\t\tisAttachId,\n\t\t\t\t\tisDetachId,\n\t\t\t\t\tgetCellIdForMove,\n\t\t\t\t),\n\t\t\t\trootNodes: encodeRootNodesForJson(change.rootNodes.nodeChanges, context, encodeNode),\n\t\t\t\tnodeRenames: encodeRenamesForJson(change.rootNodes.oldToNewId, context),\n\t\t\t\tbuilds: encodeDetachedNodes(\n\t\t\t\t\tchange.builds,\n\t\t\t\t\tcontext,\n\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\tfieldsCodec,\n\t\t\t\t\tchunkCompressionStrategy,\n\t\t\t\t),\n\t\t\t\trefreshers: encodeDetachedNodes(\n\t\t\t\t\tchange.refreshers,\n\t\t\t\t\tcontext,\n\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\tfieldsCodec,\n\t\t\t\t\tchunkCompressionStrategy,\n\t\t\t\t),\n\t\t\t\tviolations: change.constraintViolationCount,\n\t\t\t};\n\n\t\t\tif (change.noChangeConstraint !== undefined) {\n\t\t\t\tencoded.noChangeConstraint = change.noChangeConstraint;\n\t\t\t}\n\n\t\t\treturn encoded;\n\t\t},\n\n\t\tdecode: (encodedChange: EncodedModularChangesetV3, context) => {\n\t\t\tconst idAllocator = idAllocatorFromMaxId(encodedChange.maxId);\n\t\t\tconst nodeChanges: ChangeAtomIdBTree<NodeChangeset> = newChangeAtomIdBTree();\n\t\t\tconst nodeToParent: ChangeAtomIdBTree<NodeLocation> = newChangeAtomIdBTree();\n\t\t\tconst crossFieldKeys: CrossFieldKeyTable = newCrossFieldRangeTable();\n\t\t\tconst rootNodes = newRootTable();\n\n\t\t\tconst decodeNode: NodeDecoder = (\n\t\t\t\tencodedNode: EncodedNodeChangeset,\n\t\t\t\tfieldId: NodeLocation,\n\t\t\t): NodeId => {\n\t\t\t\tconst nodeId: NodeId = {\n\t\t\t\t\trevision: context.revision,\n\t\t\t\t\tlocalId: brand(idAllocator.allocate()),\n\t\t\t\t};\n\n\t\t\t\tconst node = decodeNodeChangesetFromJson(\n\t\t\t\t\tencodedNode,\n\t\t\t\t\tnodeId,\n\t\t\t\t\tcrossFieldKeys,\n\t\t\t\t\trootNodes,\n\t\t\t\t\tcontext,\n\t\t\t\t\tdecodeNode,\n\t\t\t\t\tidAllocator,\n\t\t\t\t);\n\n\t\t\t\tnodeChanges.set([nodeId.revision, nodeId.localId], node);\n\n\t\t\t\tif (fieldId !== undefined) {\n\t\t\t\t\tnodeToParent.set([nodeId.revision, nodeId.localId], fieldId);\n\t\t\t\t}\n\n\t\t\t\treturn nodeId;\n\t\t\t};\n\n\t\t\tconst decoded: Mutable<ModularChangeset> = {\n\t\t\t\trebaseVersion: 2,\n\t\t\t\tfieldChanges: decodeFieldChangesFromJson(\n\t\t\t\t\tencodedChange.fieldChanges,\n\t\t\t\t\tundefined,\n\t\t\t\t\tcrossFieldKeys,\n\t\t\t\t\tcontext,\n\t\t\t\t\tdecodeNode,\n\t\t\t\t\tidAllocator,\n\t\t\t\t),\n\t\t\t\tnodeChanges,\n\t\t\t\trootNodes: decodeRootTable(\n\t\t\t\t\tencodedChange.rootNodes,\n\t\t\t\t\tencodedChange.nodeRenames,\n\t\t\t\t\tcontext,\n\t\t\t\t\tdecodeNode,\n\t\t\t\t),\n\t\t\t\tnodeToParent,\n\t\t\t\tnodeAliases: newChangeAtomIdBTree(),\n\t\t\t\tcrossFieldKeys,\n\t\t\t};\n\n\t\t\tif (encodedChange.builds !== undefined) {\n\t\t\t\tdecoded.builds = decodeDetachedNodes(\n\t\t\t\t\tencodedChange.builds,\n\t\t\t\t\tcontext,\n\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\tfieldsCodec,\n\t\t\t\t\tchunkCompressionStrategy,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (encodedChange.refreshers !== undefined) {\n\t\t\t\tdecoded.refreshers = decodeDetachedNodes(\n\t\t\t\t\tencodedChange.refreshers,\n\t\t\t\t\tcontext,\n\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\tfieldsCodec,\n\t\t\t\t\tchunkCompressionStrategy,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (encodedChange.violations !== undefined) {\n\t\t\t\tdecoded.constraintViolationCount = encodedChange.violations;\n\t\t\t}\n\n\t\t\tif (encodedChange.noChangeConstraint !== undefined) {\n\t\t\t\tdecoded.noChangeConstraint = encodedChange.noChangeConstraint;\n\t\t\t}\n\n\t\t\tconst decodedRevInfos = decodeRevisionInfos(\n\t\t\t\tencodedChange.revisions,\n\t\t\t\tcontext,\n\t\t\t\trevisionTagCodec,\n\t\t\t);\n\t\t\tif (decodedRevInfos !== undefined) {\n\t\t\t\tdecoded.revisions = decodedRevInfos;\n\t\t\t}\n\t\t\tif (encodedChange.maxId !== undefined) {\n\t\t\t\tdecoded.maxId = encodedChange.maxId;\n\t\t\t}\n\t\t\treturn decoded;\n\t\t},\n\t};\n\n\treturn withSchemaValidation(\n\t\tEncodedModularChangesetV3,\n\t\tmodularChangeCodec,\n\t\tcodecOptions.jsonValidator,\n\t);\n}\n\nfunction getChangeHandler(\n\tfieldKinds: FieldKindConfiguration,\n\tfieldKind: FieldKindIdentifier,\n): FieldChangeHandler<unknown> {\n\tif (fieldKind === genericFieldKind.identifier) {\n\t\treturn genericFieldKind.changeHandler;\n\t}\n\n\tconst handler = fieldKinds.get(fieldKind)?.kind.changeHandler;\n\tassert(handler !== undefined, 0x9c1 /* Unknown field kind */);\n\treturn handler;\n}\n\nfunction getFieldToRoots(rootTable: RootNodeTable): FieldRootMap {\n\tconst fieldToRoots: FieldRootMap = newFieldIdKeyBTree();\n\tfor (const [[revision, localId], nodeId] of rootTable.nodeChanges.entries()) {\n\t\tconst detachId: ChangeAtomId = { revision, localId };\n\t\tconst fieldId = rootTable.detachLocations.getFirst(detachId, 1).value;\n\t\tif (fieldId !== undefined) {\n\t\t\tsetInChangeAtomIdMap(\n\t\t\t\tgetOrAddInFieldRootMap(fieldToRoots, fieldId).nodeChanges,\n\t\t\t\tdetachId,\n\t\t\t\tnodeId,\n\t\t\t);\n\t\t}\n\t}\n\n\tfor (const entry of rootTable.oldToNewId.entries()) {\n\t\tconst fieldId = rootTable.detachLocations.getFirst(entry.start, 1).value;\n\t\tif (fieldId !== undefined) {\n\t\t\tgetOrAddInFieldRootMap(fieldToRoots, fieldId).renames.set(\n\t\t\t\tentry.start,\n\t\t\t\tentry.length,\n\t\t\t\tentry.value,\n\t\t\t);\n\t\t}\n\t}\n\n\treturn fieldToRoots;\n}\n\nfunction getOrAddInFieldRootMap(map: FieldRootMap, fieldId: FieldId): FieldRootChanges {\n\tconst key: FieldIdKey = [fieldId.nodeId?.revision, fieldId.nodeId?.localId, fieldId.field];\n\tconst rootChanges = map.get(key);\n\tif (rootChanges !== undefined) {\n\t\treturn rootChanges;\n\t}\n\n\tconst newRootChanges: FieldRootChanges = {\n\t\tnodeChanges: newChangeAtomIdBTree(),\n\t\trenames: newChangeAtomIdTransform(),\n\t};\n\tmap.set(key, newRootChanges);\n\treturn newRootChanges;\n}\n\ntype FieldRootMap = TupleBTree<FieldIdKey, FieldRootChanges>;\n\ninterface FieldRootChanges {\n\treadonly nodeChanges: ChangeAtomIdBTree<NodeId>;\n\treadonly renames: ChangeAtomIdRangeMap<ChangeAtomId>;\n}\n"]}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { type Static } from "@sinclair/typebox";
|
|
6
|
-
declare const EncodedRenames: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
7
|
-
oldId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
|
|
8
|
-
newId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
|
|
9
|
-
count: import("@sinclair/typebox").TNumber;
|
|
10
|
-
}>>>;
|
|
11
|
-
export type EncodedRenames = Static<typeof EncodedRenames>;
|
|
12
|
-
declare const EncodedRootNodes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
13
|
-
detachId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
|
|
14
|
-
nodeChangeset: import("@sinclair/typebox").TObject<{
|
|
15
|
-
fieldChanges: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
16
|
-
fieldKey: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKey>;
|
|
17
|
-
fieldKind: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKindIdentifier>;
|
|
18
|
-
change: import("@sinclair/typebox").TUnsafe<import("../../index.js").JsonCompatibleReadOnly>;
|
|
19
|
-
}>>>;
|
|
20
|
-
nodeExistsConstraint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
21
|
-
violated: import("@sinclair/typebox").TBoolean;
|
|
22
|
-
}>>;
|
|
23
|
-
}>;
|
|
24
|
-
}>>>;
|
|
25
|
-
export type EncodedRootNodes = Static<typeof EncodedRootNodes>;
|
|
26
|
-
export declare const EncodedModularChangesetV3: import("@sinclair/typebox").TObject<{
|
|
27
|
-
maxId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>>;
|
|
28
|
-
fieldChanges: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
29
|
-
fieldKey: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKey>;
|
|
30
|
-
fieldKind: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKindIdentifier>;
|
|
31
|
-
change: import("@sinclair/typebox").TUnsafe<import("../../index.js").JsonCompatibleReadOnly>;
|
|
32
|
-
}>>;
|
|
33
|
-
rootNodes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
34
|
-
detachId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
|
|
35
|
-
nodeChangeset: import("@sinclair/typebox").TObject<{
|
|
36
|
-
fieldChanges: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
37
|
-
fieldKey: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKey>;
|
|
38
|
-
fieldKind: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKindIdentifier>;
|
|
39
|
-
change: import("@sinclair/typebox").TUnsafe<import("../../index.js").JsonCompatibleReadOnly>;
|
|
40
|
-
}>>>;
|
|
41
|
-
nodeExistsConstraint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
42
|
-
violated: import("@sinclair/typebox").TBoolean;
|
|
43
|
-
}>>;
|
|
44
|
-
}>;
|
|
45
|
-
}>>>;
|
|
46
|
-
nodeRenames: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
47
|
-
oldId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
|
|
48
|
-
newId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
|
|
49
|
-
count: import("@sinclair/typebox").TNumber;
|
|
50
|
-
}>>>;
|
|
51
|
-
revisions: import("@sinclair/typebox").TReadonlyOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
52
|
-
revision: import("@sinclair/typebox").TReadonly<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
53
|
-
rollbackOf: import("@sinclair/typebox").TReadonlyOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
|
|
54
|
-
}>>>;
|
|
55
|
-
builds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
56
|
-
builds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TNumber]>>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TNumber]>>]>]>>;
|
|
57
|
-
trees: import("@sinclair/typebox").TUnsafe<import("../../index.js").JsonCompatibleReadOnly>;
|
|
58
|
-
}>>;
|
|
59
|
-
refreshers: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
60
|
-
builds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TNumber]>>, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<import("../../core/index.js").ChangesetLocalId>, import("@sinclair/typebox").TNumber]>>]>]>>;
|
|
61
|
-
trees: import("@sinclair/typebox").TUnsafe<import("../../index.js").JsonCompatibleReadOnly>;
|
|
62
|
-
}>>;
|
|
63
|
-
/**
|
|
64
|
-
* The number of constraints within this changeset that are violated.
|
|
65
|
-
*/
|
|
66
|
-
violations: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
67
|
-
/** Global no change constraint that gets violated whenever the changeset is rebased */
|
|
68
|
-
noChangeConstraint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
69
|
-
violated: import("@sinclair/typebox").TBoolean;
|
|
70
|
-
}>>;
|
|
71
|
-
}>;
|
|
72
|
-
export type EncodedModularChangesetV3 = Static<typeof EncodedModularChangesetV3>;
|
|
73
|
-
export {};
|
|
74
|
-
//# sourceMappingURL=modularChangeFormatV3.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeFormatV3.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFormatV3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAc1E,QAAA,MAAM,cAAc;;;;IASnB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAE3D,QAAA,MAAM,gBAAgB;;;;;;;;;;;;IAOrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/D,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYpC;;OAEG;;IAGH,uFAAuF;;;;EAIxF,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.EncodedModularChangesetV3 = void 0;
|
|
8
|
-
const typebox_1 = require("@sinclair/typebox");
|
|
9
|
-
const modularChangeFormatV1_js_1 = require("./modularChangeFormatV1.js");
|
|
10
|
-
const modularChangeFormatV2_js_1 = require("./modularChangeFormatV2.js");
|
|
11
|
-
const noAdditionalProps = { additionalProperties: false };
|
|
12
|
-
const EncodedRenames = typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Object({
|
|
13
|
-
oldId: modularChangeFormatV1_js_1.EncodedChangeAtomId,
|
|
14
|
-
newId: modularChangeFormatV1_js_1.EncodedChangeAtomId,
|
|
15
|
-
count: typebox_1.Type.Number(),
|
|
16
|
-
}), noAdditionalProps));
|
|
17
|
-
const EncodedRootNodes = typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Object({ detachId: modularChangeFormatV1_js_1.EncodedChangeAtomId, nodeChangeset: modularChangeFormatV1_js_1.EncodedNodeChangeset }, noAdditionalProps)));
|
|
18
|
-
exports.EncodedModularChangesetV3 = typebox_1.Type.Object({
|
|
19
|
-
maxId: typebox_1.Type.Optional(modularChangeFormatV1_js_1.ChangesetLocalIdSchema),
|
|
20
|
-
fieldChanges: modularChangeFormatV1_js_1.EncodedFieldChangeMap,
|
|
21
|
-
rootNodes: EncodedRootNodes,
|
|
22
|
-
nodeRenames: EncodedRenames,
|
|
23
|
-
revisions: typebox_1.Type.ReadonlyOptional(typebox_1.Type.Array(modularChangeFormatV1_js_1.EncodedRevisionInfo)),
|
|
24
|
-
// TODO#8574: separating `builds` and `refreshers` here means that we encode their `EncodedBuilds.trees` separately.
|
|
25
|
-
// This can lead to a less efficient wire representation because of duplicated schema/shape information.
|
|
26
|
-
builds: typebox_1.Type.Optional(modularChangeFormatV1_js_1.EncodedBuilds),
|
|
27
|
-
refreshers: typebox_1.Type.Optional(modularChangeFormatV1_js_1.EncodedBuilds),
|
|
28
|
-
/**
|
|
29
|
-
* The number of constraints within this changeset that are violated.
|
|
30
|
-
*/
|
|
31
|
-
violations: typebox_1.Type.Optional(typebox_1.Type.Number({ minimum: 0, multipleOf: 1 })),
|
|
32
|
-
/** Global no change constraint that gets violated whenever the changeset is rebased */
|
|
33
|
-
noChangeConstraint: typebox_1.Type.Optional(modularChangeFormatV2_js_1.EncodedNoChangeConstraint),
|
|
34
|
-
}, noAdditionalProps);
|
|
35
|
-
//# sourceMappingURL=modularChangeFormatV3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeFormatV3.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFormatV3.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,yEAOoC;AACpC,yEAAuE;AAEvE,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE,MAAM,cAAc,GAAG,cAAI,CAAC,QAAQ,CACnC,cAAI,CAAC,KAAK,CACT,cAAI,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,8CAAmB;IAC1B,KAAK,EAAE,8CAAmB;IAC1B,KAAK,EAAE,cAAI,CAAC,MAAM,EAAE;CACpB,CAAC,EACF,iBAAiB,CACjB,CACD,CAAC;AAIF,MAAM,gBAAgB,GAAG,cAAI,CAAC,QAAQ,CACrC,cAAI,CAAC,KAAK,CACT,cAAI,CAAC,MAAM,CACV,EAAE,QAAQ,EAAE,8CAAmB,EAAE,aAAa,EAAE,+CAAoB,EAAE,EACtE,iBAAiB,CACjB,CACD,CACD,CAAC;AAIW,QAAA,yBAAyB,GAAG,cAAI,CAAC,MAAM,CACnD;IACC,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,iDAAsB,CAAC;IAC5C,YAAY,EAAE,gDAAqB;IACnC,SAAS,EAAE,gBAAgB;IAC3B,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,cAAI,CAAC,gBAAgB,CAAC,cAAI,CAAC,KAAK,CAAC,8CAAmB,CAAC,CAAC;IACjE,oHAAoH;IACpH,wGAAwG;IACxG,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,wCAAa,CAAC;IACpC,UAAU,EAAE,cAAI,CAAC,QAAQ,CAAC,wCAAa,CAAC;IAExC;;OAEG;IACH,UAAU,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;IAErE,uFAAuF;IACvF,kBAAkB,EAAE,cAAI,CAAC,QAAQ,CAAC,oDAAyB,CAAC;CAC5D,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport {\n\tChangesetLocalIdSchema,\n\tEncodedBuilds,\n\tEncodedChangeAtomId,\n\tEncodedFieldChangeMap,\n\tEncodedNodeChangeset,\n\tEncodedRevisionInfo,\n} from \"./modularChangeFormatV1.js\";\nimport { EncodedNoChangeConstraint } from \"./modularChangeFormatV2.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nconst EncodedRenames = Type.Optional(\n\tType.Array(\n\t\tType.Object({\n\t\t\toldId: EncodedChangeAtomId,\n\t\t\tnewId: EncodedChangeAtomId,\n\t\t\tcount: Type.Number(),\n\t\t}),\n\t\tnoAdditionalProps,\n\t),\n);\n\nexport type EncodedRenames = Static<typeof EncodedRenames>;\n\nconst EncodedRootNodes = Type.Optional(\n\tType.Array(\n\t\tType.Object(\n\t\t\t{ detachId: EncodedChangeAtomId, nodeChangeset: EncodedNodeChangeset },\n\t\t\tnoAdditionalProps,\n\t\t),\n\t),\n);\n\nexport type EncodedRootNodes = Static<typeof EncodedRootNodes>;\n\nexport const EncodedModularChangesetV3 = Type.Object(\n\t{\n\t\tmaxId: Type.Optional(ChangesetLocalIdSchema),\n\t\tfieldChanges: EncodedFieldChangeMap,\n\t\trootNodes: EncodedRootNodes,\n\t\tnodeRenames: EncodedRenames,\n\t\trevisions: Type.ReadonlyOptional(Type.Array(EncodedRevisionInfo)),\n\t\t// TODO#8574: separating `builds` and `refreshers` here means that we encode their `EncodedBuilds.trees` separately.\n\t\t// This can lead to a less efficient wire representation because of duplicated schema/shape information.\n\t\tbuilds: Type.Optional(EncodedBuilds),\n\t\trefreshers: Type.Optional(EncodedBuilds),\n\n\t\t/**\n\t\t * The number of constraints within this changeset that are violated.\n\t\t */\n\t\tviolations: Type.Optional(Type.Number({ minimum: 0, multipleOf: 1 })),\n\n\t\t/** Global no change constraint that gets violated whenever the changeset is rebased */\n\t\tnoChangeConstraint: Type.Optional(EncodedNoChangeConstraint),\n\t},\n\tnoAdditionalProps,\n);\n\nexport type EncodedModularChangesetV3 = Static<typeof EncodedModularChangesetV3>;\n"]}
|