@fluidframework/tree 2.74.0-368706 → 2.74.0-370705
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/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +1 -0
- package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js +5 -1
- package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
- package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts +1 -1
- package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/default-schema/index.js +2 -1
- package/dist/feature-libraries/default-schema/index.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +1 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +2 -1
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +2 -1
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -0
- package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js +9 -1
- package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +23 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +31 -0
- package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +12 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js +57 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js.map +1 -0
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +5 -1
- package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js +1 -1
- package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/dist/shared-tree/sharedTreeChangeFamily.js +8 -2
- package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js +1 -1
- package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +1 -0
- package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js +4 -1
- package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js +1 -1
- package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts +1 -1
- package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/default-schema/index.js +1 -1
- package/lib/feature-libraries/default-schema/index.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +1 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
- 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/modularChangeFamily.d.ts +1 -0
- package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js +7 -0
- package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +23 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +27 -0
- package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +12 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js +53 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js.map +1 -0
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +5 -1
- package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeEnricher.js +2 -2
- package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
- package/lib/shared-tree/sharedTreeChangeFamily.js +8 -2
- package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js +1 -1
- package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
- package/package.json +21 -21
- package/src/feature-libraries/default-schema/defaultEditBuilder.ts +5 -0
- package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -1
- package/src/feature-libraries/default-schema/index.ts +1 -0
- package/src/feature-libraries/index.ts +1 -0
- package/src/feature-libraries/modular-schema/index.ts +1 -0
- package/src/feature-libraries/modular-schema/modularChangeFamily.ts +8 -0
- package/src/feature-libraries/optional-field/optionalFieldChangeFormatV3.ts +45 -0
- package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +94 -0
- package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +5 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/sharedTreeChangeEnricher.ts +2 -0
- package/src/shared-tree/sharedTreeChangeFamily.ts +8 -1
- package/src/shared-tree/sharedTreeEditBuilder.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultEditBuilder.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultEditBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAGtE,OAAO,EAiBN,mBAAmB,EACnB,mCAAmC,EACnC,SAAS,EACT,WAAW,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAKN,mBAAmB,EAEnB,kBAAkB,EAClB,SAAS,IAAI,gBAAgB,EAC7B,oBAAoB,IAAI,2BAA2B,GACnD,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACN,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,IAAI,cAAc,GAC1B,MAAM,wBAAwB,CAA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,WAAW,KAAK,UAAU,CAAC,WAAW,EAChD,CAAC;gBACF,MAAM;YACP,CAAC;QACF,CAAC;QACD,WAAW,IAAI,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,WAAW,CAAC;AACpB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, oob } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { ICodecFamily } from \"../../codec/index.js\";\nimport {\n\ttype ChangeAtomId,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamily,\n\ttype ChangeFamilyEditor,\n\ttype ChangeRebaser,\n\ttype ChangesetLocalId,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaRoot,\n\ttype EditorOptions,\n\ttype FieldUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype NormalizedUpPath,\n\ttype RevisionTag,\n\ttype TaggedChange,\n\ttype TreeChunk,\n\ttype UpPath,\n\tcompareFieldUpPaths,\n\tgetDetachedFieldContainingFieldPath,\n\trootField,\n\ttopDownPath,\n} from \"../../core/index.js\";\nimport { brand, RangeMap } from \"../../util/index.js\";\nimport {\n\ttype EditDescription,\n\ttype FieldChangeset,\n\ttype FieldEditDescription,\n\ttype GlobalEditDescription,\n\tModularChangeFamily,\n\ttype ModularChangeset,\n\tModularEditBuilder,\n\tintoDelta as intoModularDelta,\n\trelevantRemovedRoots as relevantModularRemovedRoots,\n} from \"../modular-schema/index.js\";\n\nimport {\n\tfieldKinds,\n\toptional,\n\tsequence,\n\trequired as valueFieldKind,\n} from \"./defaultFieldKinds.js\";\nimport type { CellId } from \"../sequence-field/index.js\";\n\nexport type DefaultChangeset = ModularChangeset;\n\n/**\n * Implementation of {@link ChangeFamily} based on the default set of supported field kinds.\n *\n * @sealed\n */\nexport class DefaultChangeFamily\n\timplements ChangeFamily<IdBasedChangeFamilyDataEditor, DefaultChangeset>\n{\n\tprivate readonly modularFamily: ModularChangeFamily;\n\n\tpublic constructor(codecs: ICodecFamily<ModularChangeset, ChangeEncodingContext>) {\n\t\tthis.modularFamily = new ModularChangeFamily(fieldKinds, codecs);\n\t}\n\n\tpublic get rebaser(): ChangeRebaser<DefaultChangeset> {\n\t\treturn this.modularFamily.rebaser;\n\t}\n\n\tpublic get codecs(): ICodecFamily<DefaultChangeset, ChangeEncodingContext> {\n\t\treturn this.modularFamily.codecs;\n\t}\n\n\tpublic buildEditor(\n\t\tmintRevisionTag: () => RevisionTag,\n\t\tchangeReceiver: (change: TaggedChange<DefaultChangeset>) => void,\n\t\toptions?: EditorOptions,\n\t): IdBasedChangeFamilyDataEditor {\n\t\treturn new DefaultIdBasedDataEditor(this, mintRevisionTag, changeReceiver, options);\n\t}\n}\n\n/**\n * @param change - The change to convert into a delta.\n */\nexport function intoDelta(taggedChange: TaggedChange<ModularChangeset>): DeltaRoot {\n\treturn intoModularDelta(taggedChange, fieldKinds);\n}\n\n/**\n * Returns the set of removed roots that should be in memory for the given change to be applied.\n * A removed root is relevant if any of the following is true:\n * - It is being inserted\n * - It is being restored\n * - It is being edited\n * - The ID it is associated with is being changed\n *\n * May be conservative by returning more removed roots than strictly necessary.\n *\n * Will never return IDs for non-root trees, even if they are removed.\n *\n * @param change - The change to be applied.\n */\nexport function relevantRemovedRoots(change: ModularChangeset): Iterable<DeltaDetachedNodeId> {\n\treturn relevantModularRemovedRoots(change, fieldKinds);\n}\n\nexport type DetachedRootIds = readonly DetachedRootIdRange[];\nexport interface DetachedRootIdRange {\n\treadonly first: ChangeAtomId;\n\treadonly count: number;\n}\n\n/**\n * Default editor for tree data changes.\n * @privateRemarks\n * When taking into account not just the content of the tree,\n * but also how the merge identities (and thus anchors, flex-tree and simple-tree nodes) of nodes before and after the edits correspond,\n * some edits are currently impossible to express.\n * Examples of these non-expressible edits include:\n *\n * - Changing the type of a node while keeping its merge identity.\n * - Changing the value of a leaf while keeping its merge identity.\n * - Swapping subtrees between two value fields.\n * - Replacing a node in the middle of a tree while reusing some of the old nodes decedents that were under value fields.\n *\n * At some point it will likely be worth supporting at least some of these, possibly using a mechanism that could support all of them if desired.\n * If/when such a mechanism becomes available, an evaluation should be done to determine if any existing editing operations should be changed to leverage it\n * (Possibly by adding opt ins at the view schema layer).\n */\nexport interface DataEditor<TContent, TDetachedRoot, TDetachedRoots> {\n\t/**\n\t * Moves a subsequence from one sequence field to another sequence field.\n\t *\n\t * Note that the `destinationIndex` is interpreted based on the state of the sequence *before* the move operation.\n\t * For example, `move(field, 0, 1, field, 2)` changes `[A, B, C]` to `[B, A, C]`.\n\t */\n\tmove(\n\t\tsourceField: NormalizedFieldUpPath,\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestinationField: NormalizedFieldUpPath,\n\t\tdestinationIndex: number,\n\t): void;\n\n\t/**\n\t * Add a constraint that the node at the given path must exist.\n\t * @param path - The path to the node that must exist.\n\t */\n\taddNodeExistsConstraint(path: NormalizedUpPath): void;\n\n\t/**\n\t * Add a constraint that the node at the given path must exist when reverting a change.\n\t * @param path - The path to the node that must exist when reverting a change.\n\t */\n\taddNodeExistsConstraintOnRevert(path: NormalizedUpPath): void;\n\n\t/**\n\t * Builds the detached roots for the given content.\n\t * @param content - The content to be built into detached nodes.\n\t *\n\t * Requires SharedTreeFormatVersion.vDetachedRoots or later.\n\t */\n\tbuildRoots(content: TContent): TDetachedRoots;\n\n\t/**\n\t * @param field - the value field which is being edited under the parent node\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\tvalueField(field: NormalizedFieldUpPath): RequiredFieldEditor<TContent, TDetachedRoot>;\n\n\t/**\n\t * @param field - the optional field which is being edited under the parent node\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\toptionalField(field: NormalizedFieldUpPath): OptionalFieldEditor<TContent, TDetachedRoot>;\n\n\t/**\n\t * @param field - the sequence field which is being edited under the parent node\n\t *\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\tsequenceField(field: NormalizedFieldUpPath): SequenceFieldEditor<TContent, TDetachedRoots>;\n}\n\nexport type IdBasedChangeFamilyDataEditor = ChangeFamilyEditor &\n\tDataEditor<TreeChunk, ChangeAtomId, DetachedRootIds>;\n\nexport function offsetChangesetLocalId(\n\tid: ChangesetLocalId,\n\toffset: number,\n): ChangesetLocalId {\n\treturn brand(id + offset);\n}\n\nexport function subtractChangesetLocalId(a: ChangesetLocalId, b: ChangesetLocalId): number {\n\treturn a - b;\n}\n\n/**\n * Implementation of {@link IdBasedChangeFamilyDataEditor} based on the default set of supported field kinds.\n * @sealed\n */\nexport class DefaultIdBasedDataEditor implements IdBasedChangeFamilyDataEditor {\n\tprivate readonly modularBuilder: ModularEditBuilder;\n\tprivate readonly nodesWithoutCells: RangeMap<ChangesetLocalId, true> = new RangeMap(\n\t\toffsetChangesetLocalId,\n\t\tsubtractChangesetLocalId,\n\t);\n\n\tpublic constructor(\n\t\tfamily: ChangeFamily<ChangeFamilyEditor, DefaultChangeset>,\n\t\tprivate readonly mintRevisionTag: () => RevisionTag,\n\t\tchangeReceiver: (change: TaggedChange<DefaultChangeset>) => void,\n\t\tprivate readonly options: EditorOptions = { canMakeDetachedRootEdits: false },\n\t) {\n\t\tthis.modularBuilder = new ModularEditBuilder(family, fieldKinds, changeReceiver);\n\t}\n\n\tpublic enterTransaction(): void {\n\t\tif (this.modularBuilder.isInTransaction() === false) {\n\t\t\tthis.nodesWithoutCells.clear();\n\t\t}\n\t\tthis.modularBuilder.enterTransaction();\n\t}\n\tpublic exitTransaction(): void {\n\t\tthis.modularBuilder.exitTransaction();\n\t\tif (this.modularBuilder.isInTransaction() === false) {\n\t\t\tthis.nodesWithoutCells.clear();\n\t\t}\n\t}\n\n\tpublic addNodeExistsConstraint(path: NormalizedUpPath): void {\n\t\tenforceEditsToDetachedTreesOptions(\n\t\t\t{ parent: path.parent, field: path.parentField },\n\t\t\tthis.options,\n\t\t);\n\t\tthis.modularBuilder.addNodeExistsConstraint(path, this.mintRevisionTag());\n\t}\n\n\tpublic addNodeExistsConstraintOnRevert(path: NormalizedUpPath): void {\n\t\tenforceEditsToDetachedTreesOptions(\n\t\t\t{ parent: path.parent, field: path.parentField },\n\t\t\tthis.options,\n\t\t);\n\t\tthis.modularBuilder.addNodeExistsConstraintOnRevert(path, this.mintRevisionTag());\n\t}\n\n\tpublic buildRoots(content: TreeChunk): DetachedRootIds {\n\t\tconst detachedRoots = [];\n\t\tconst count = content.topLevelLength;\n\t\tif (count > 0) {\n\t\t\tconst buildRevision = this.mintRevisionTag();\n\t\t\tconst buildId = {\n\t\t\t\tlocalId: this.modularBuilder.generateId(count),\n\t\t\t\trevision: buildRevision,\n\t\t\t};\n\t\t\tconst build = this.modularBuilder.buildTrees(buildId.localId, content, buildRevision);\n\t\t\tthis.modularBuilder.submitChanges([build], buildRevision);\n\t\t\tdetachedRoots.push({ first: buildId, count });\n\t\t\tthis.nodesWithoutCells.set(buildId.localId, count, true);\n\t\t}\n\t\treturn detachedRoots;\n\t}\n\n\tpublic valueField(\n\t\tfield: NormalizedFieldUpPath,\n\t): RequiredFieldEditor<TreeChunk, ChangeAtomId> {\n\t\tenforceEditsToDetachedTreesOptions(field, this.options);\n\t\tconst makeAttachEditDescription = (\n\t\t\tfill: ChangeAtomId,\n\t\t\trevision: RevisionTag,\n\t\t): FieldEditDescription => {\n\t\t\tconst detachLocalId = this.modularBuilder.generateId();\n\t\t\tconst detach = { localId: detachLocalId, revision };\n\t\t\tconst change = valueFieldKind.changeHandler.editor.set({ fill, detach });\n\t\t\treturn {\n\t\t\t\ttype: \"field\",\n\t\t\t\tfield,\n\t\t\t\tfieldKind: valueFieldKind.identifier,\n\t\t\t\tchange: brand(change),\n\t\t\t\trevision,\n\t\t\t};\n\t\t};\n\t\treturn {\n\t\t\tset: (newContent: TreeChunk): void => {\n\t\t\t\tassert(newContent.topLevelLength === 1, \"Expected exactly one node\");\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst buildLocalId = this.modularBuilder.generateId();\n\t\t\t\tconst buildId = { localId: buildLocalId, revision };\n\t\t\t\tconst build = this.modularBuilder.buildTrees(buildLocalId, newContent, revision);\n\t\t\t\tconst attach = makeAttachEditDescription(buildId, revision);\n\t\t\t\tthis.modularBuilder.submitChanges([build, attach], revision);\n\t\t\t},\n\n\t\t\tattach: (newContent: ChangeAtomId): void => {\n\t\t\t\tconst isWithoutCell = this.nodesWithoutCells.delete(newContent.localId, 1) === 1;\n\t\t\t\tif (!isWithoutCell) {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\"A hydrated node that has been attached before cannot be attached into an object's required field. Assign new content to the field instead.\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst attach = makeAttachEditDescription(newContent, revision);\n\t\t\t\tthis.modularBuilder.submitChanges([attach], revision);\n\t\t\t},\n\t\t};\n\t}\n\n\tpublic optionalField(\n\t\tfield: NormalizedFieldUpPath,\n\t): OptionalFieldEditor<TreeChunk, ChangeAtomId> {\n\t\tenforceEditsToDetachedTreesOptions(field, this.options);\n\t\tconst makeAttachEditDescription = (\n\t\t\tfill: ChangeAtomId,\n\t\t\trevision: RevisionTag,\n\t\t\twasEmpty: boolean,\n\t\t): FieldEditDescription => {\n\t\t\tconst detachLocalId = this.modularBuilder.generateId();\n\t\t\tconst detach = { localId: detachLocalId, revision };\n\t\t\tconst change = optional.changeHandler.editor.set(wasEmpty, { fill, detach });\n\t\t\treturn {\n\t\t\t\ttype: \"field\",\n\t\t\t\tfield,\n\t\t\t\tfieldKind: optional.identifier,\n\t\t\t\tchange: brand(change),\n\t\t\t\trevision,\n\t\t\t};\n\t\t};\n\t\tconst editBuilder = {\n\t\t\tset: (newContent: TreeChunk | undefined, wasEmpty: boolean): void => {\n\t\t\t\tif (newContent === undefined) {\n\t\t\t\t\teditBuilder.clear(wasEmpty);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tassert(newContent.topLevelLength === 1, \"Expected exactly one node\");\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst buildLocalId = this.modularBuilder.generateId();\n\t\t\t\tconst buildId = { localId: buildLocalId, revision };\n\t\t\t\tconst build = this.modularBuilder.buildTrees(buildLocalId, newContent, revision);\n\t\t\t\tconst attach = makeAttachEditDescription(buildId, revision, wasEmpty);\n\t\t\t\tthis.modularBuilder.submitChanges([build, attach], revision);\n\t\t\t},\n\t\t\tattach: (content: ChangeAtomId | undefined, wasEmpty: boolean): void => {\n\t\t\t\tif (content === undefined) {\n\t\t\t\t\teditBuilder.clear(wasEmpty);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst isWithoutCell = this.nodesWithoutCells.delete(content.localId, 1) === 1;\n\t\t\t\tif (!isWithoutCell && this.options.canMakeDetachedRootEdits !== true) {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Attach edits require a minimum version for collaboration >= TBD.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst edits: EditDescription[] = [];\n\t\t\t\tlet stableSrcId: ChangeAtomId;\n\t\t\t\tif (isWithoutCell) {\n\t\t\t\t\tstableSrcId = content;\n\t\t\t\t} else {\n\t\t\t\t\t// If the node has an associated cell, then it may be concurrently moved to another location.\n\t\t\t\t\t// We use a rename to ensure that the node will be moved to a specific grave before the attach.\n\t\t\t\t\tstableSrcId = { localId: this.modularBuilder.generateId(), revision };\n\t\t\t\t\tconst rename: GlobalEditDescription = {\n\t\t\t\t\t\ttype: \"global\",\n\t\t\t\t\t\trevision,\n\t\t\t\t\t\trenames: [\n\t\t\t\t\t\t\t{ count: 1, oldId: content, newId: stableSrcId, detachLocation: undefined },\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t\tedits.push(rename);\n\t\t\t\t}\n\t\t\t\tconst attach = makeAttachEditDescription(stableSrcId, revision, wasEmpty);\n\t\t\t\tedits.push(attach);\n\t\t\t\tthis.modularBuilder.submitChanges(edits, revision);\n\t\t\t},\n\t\t\tclear: (wasEmpty: boolean): void => {\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst detach: ChangeAtomId = { localId: this.modularBuilder.generateId(), revision };\n\t\t\t\tconst optionalChange = optional.changeHandler.editor.clear(wasEmpty, detach);\n\t\t\t\tconst change: FieldChangeset = brand(optionalChange);\n\t\t\t\tconst edit: FieldEditDescription = {\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield,\n\t\t\t\t\tfieldKind: optional.identifier,\n\t\t\t\t\tchange,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tthis.modularBuilder.submitChanges([edit], revision);\n\t\t\t},\n\t\t};\n\t\treturn editBuilder;\n\t}\n\n\tpublic move(\n\t\tsourceField: NormalizedFieldUpPath,\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestinationField: NormalizedFieldUpPath,\n\t\tdestIndex: number,\n\t): void {\n\t\tif (count === 0) {\n\t\t\treturn;\n\t\t} else if (count < 0 || !Number.isSafeInteger(count)) {\n\t\t\tthrow new UsageError(`Expected non-negative integer count, got ${count}.`);\n\t\t}\n\t\tenforceEditsToDetachedTreesOptions(sourceField, this.options);\n\t\tenforceEditsToDetachedTreesOptions(destinationField, this.options);\n\t\tconst revision = this.mintRevisionTag();\n\t\tconst detachCellId = this.modularBuilder.generateId(count);\n\t\tconst attachCellId: CellId = { localId: this.modularBuilder.generateId(count), revision };\n\t\tif (compareFieldUpPaths(sourceField, destinationField)) {\n\t\t\tconst change = sequence.changeHandler.editor.move(\n\t\t\t\tsourceIndex,\n\t\t\t\tcount,\n\t\t\t\tdestIndex,\n\t\t\t\tdetachCellId,\n\t\t\t\tattachCellId,\n\t\t\t\trevision,\n\t\t\t);\n\t\t\tthis.modularBuilder.submitChange(\n\t\t\t\tsourceField,\n\t\t\t\tsequence.identifier,\n\t\t\t\tbrand(change),\n\t\t\t\trevision,\n\t\t\t);\n\t\t} else {\n\t\t\tconst detachPath = topDownPath(sourceField.parent);\n\t\t\tconst attachPath = topDownPath(destinationField.parent);\n\t\t\tconst sharedDepth = getSharedPrefixLength(detachPath, attachPath);\n\t\t\tlet adjustedAttachField = destinationField;\n\t\t\t// `sharedDepth` is the number of elements, starting from the root, that both paths have in common.\n\t\t\tif (sharedDepth === detachPath.length) {\n\t\t\t\tconst lowestCommonAncestor: NormalizedUpPath | undefined = attachPath[sharedDepth];\n\t\t\t\tconst attachField = lowestCommonAncestor?.parentField ?? destinationField.field;\n\t\t\t\tif (attachField === sourceField.field) {\n\t\t\t\t\t// The detach occurs in an ancestor field of the field where the attach occurs.\n\t\t\t\t\tconst attachAncestorIndex = lowestCommonAncestor?.parentIndex ?? destIndex;\n\t\t\t\t\tif (attachAncestorIndex < sourceIndex) {\n\t\t\t\t\t\t// The attach path runs through a node located before the detached nodes.\n\t\t\t\t\t\t// No need to adjust the attach path.\n\t\t\t\t\t} else if (sourceIndex + count <= attachAncestorIndex) {\n\t\t\t\t\t\t// The attach path runs through a node located after the detached nodes.\n\t\t\t\t\t\t// adjust the index for the node at that depth of the path, so that it is interpreted correctly\n\t\t\t\t\t\t// in the composition performed by `submitChanges`.\n\t\t\t\t\t\tconst adjustedAttachAncestorIndex = attachAncestorIndex - count;\n\t\t\t\t\t\tlet parent: NormalizedUpPath =\n\t\t\t\t\t\t\tlowestCommonAncestor === undefined\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\tparent: undefined,\n\t\t\t\t\t\t\t\t\t\tdetachedNodeId: undefined,\n\t\t\t\t\t\t\t\t\t\tparentIndex: adjustedAttachAncestorIndex,\n\t\t\t\t\t\t\t\t\t\tparentField: destinationField.field,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t...lowestCommonAncestor,\n\t\t\t\t\t\t\t\t\t\tparentIndex: adjustedAttachAncestorIndex,\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\tfor (let i = sharedDepth + 1; i < attachPath.length; i += 1) {\n\t\t\t\t\t\t\tparent = {\n\t\t\t\t\t\t\t\t...(attachPath[i] ?? oob()),\n\t\t\t\t\t\t\t\tparent,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tadjustedAttachField = { parent, field: destinationField.field };\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\"Invalid move operation: the destination is located under one of the moved elements. Consider using the Tree.contains API to detect this.\",\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst moveOut = sequence.changeHandler.editor.remove(\n\t\t\t\tsourceIndex,\n\t\t\t\tcount,\n\t\t\t\tdetachCellId,\n\t\t\t\trevision,\n\t\t\t);\n\t\t\tconst moveIn = sequence.changeHandler.editor.insert(\n\t\t\t\tdestIndex,\n\t\t\t\tcount,\n\t\t\t\tattachCellId,\n\t\t\t\trevision,\n\t\t\t\tdetachCellId,\n\t\t\t);\n\n\t\t\tthis.modularBuilder.submitChanges(\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"field\",\n\t\t\t\t\t\tfield: sourceField,\n\t\t\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\t\t\tchange: brand(moveOut),\n\t\t\t\t\t\trevision,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"field\",\n\t\t\t\t\t\tfield: adjustedAttachField,\n\t\t\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\t\t\tchange: brand(moveIn),\n\t\t\t\t\t\trevision,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\trevision,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic sequenceField(\n\t\tfield: NormalizedFieldUpPath,\n\t): SequenceFieldEditor<TreeChunk, DetachedRootIds> {\n\t\tenforceEditsToDetachedTreesOptions(field, this.options);\n\t\tconst makeAttachEditDescription = (\n\t\t\tindex: number,\n\t\t\t{ first, count }: DetachedRootIdRange,\n\t\t\trevision: RevisionTag,\n\t\t\tareWithoutCells: boolean,\n\t\t): EditDescription[] => {\n\t\t\tconst edits: EditDescription[] = [];\n\t\t\t// If the nodes have never been attached in cell, then we must use a cell ID that matches the build ID.\n\t\t\t// This ensures back-compatibility with the v1 ModularChangeFamily model which requires that every node be associated with cell\n\t\t\t// by generating an insert whose destination cell is the cell associated with the build ID.\n\t\t\tlet stableSrcId: ChangeAtomId;\n\t\t\tif (areWithoutCells) {\n\t\t\t\tstableSrcId = first;\n\t\t\t} else {\n\t\t\t\t// If the node has an associated cell, then it may be concurrently moved to another location.\n\t\t\t\t// We use a rename to ensure that the node will be moved to a specific grave before the attach.\n\t\t\t\tstableSrcId = { localId: this.modularBuilder.generateId(count), revision };\n\t\t\t\tconst rename: GlobalEditDescription = {\n\t\t\t\t\ttype: \"global\",\n\t\t\t\t\trevision,\n\t\t\t\t\trenames: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount,\n\t\t\t\t\t\t\toldId: first,\n\t\t\t\t\t\t\tnewId: stableSrcId,\n\t\t\t\t\t\t\tdetachLocation: undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t\tedits.push(rename);\n\t\t\t}\n\t\t\tassert(stableSrcId.revision !== undefined, \"Detached nodes ID must have a revision\");\n\t\t\tconst change = sequence.changeHandler.editor.insert(\n\t\t\t\tindex,\n\t\t\t\tcount,\n\t\t\t\tstableSrcId,\n\t\t\t\tstableSrcId.revision,\n\t\t\t\tstableSrcId.localId,\n\t\t\t);\n\t\t\tconst attach: FieldEditDescription = {\n\t\t\t\ttype: \"field\",\n\t\t\t\tfield,\n\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\tchange: brand(change),\n\t\t\t\trevision,\n\t\t\t};\n\t\t\tedits.push(attach);\n\t\t\treturn edits;\n\t\t};\n\t\tconst editBuilder = {\n\t\t\tinsert: (index: number, content: TreeChunk): void => {\n\t\t\t\tconst count = content.topLevelLength;\n\t\t\t\tif (count === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst buildLocalId = this.modularBuilder.generateId();\n\t\t\t\tconst build = this.modularBuilder.buildTrees(buildLocalId, content, revision);\n\t\t\t\tconst roots: DetachedRootIdRange = {\n\t\t\t\t\tfirst: { localId: buildLocalId, revision },\n\t\t\t\t\tcount,\n\t\t\t\t};\n\n\t\t\t\tconst attach = makeAttachEditDescription(index, roots, revision, true);\n\t\t\t\tthis.modularBuilder.submitChanges([build, ...attach], revision);\n\t\t\t},\n\t\t\tattach: (index: number, newContent: DetachedRootIds): void => {\n\t\t\t\tconst attachRevision = this.mintRevisionTag();\n\t\t\t\tlet areAllWithoutCells = true;\n\t\t\t\tlet insertOffset = 0;\n\t\t\t\tconst edits: EditDescription[] = [];\n\t\t\t\tfor (const range of newContent) {\n\t\t\t\t\tif (range.count === 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst countWithoutCells = this.nodesWithoutCells.delete(\n\t\t\t\t\t\trange.first.localId,\n\t\t\t\t\t\trange.count,\n\t\t\t\t\t);\n\t\t\t\t\tassert(\n\t\t\t\t\t\tcountWithoutCells === 0 || countWithoutCells === range.count,\n\t\t\t\t\t\t\"All detached roots within the same ID range must either all have or all not have a cell\",\n\t\t\t\t\t);\n\t\t\t\t\tconst areWithoutCells = countWithoutCells === range.count;\n\t\t\t\t\tif (!areWithoutCells) {\n\t\t\t\t\t\tareAllWithoutCells = false;\n\t\t\t\t\t}\n\t\t\t\t\tconst renameAndAttach = makeAttachEditDescription(\n\t\t\t\t\t\tindex + insertOffset,\n\t\t\t\t\t\trange,\n\t\t\t\t\t\tattachRevision,\n\t\t\t\t\t\tareWithoutCells,\n\t\t\t\t\t);\n\t\t\t\t\tedits.push(...renameAndAttach);\n\t\t\t\t\tinsertOffset += range.count;\n\t\t\t\t}\n\t\t\t\tif (!areAllWithoutCells && this.options.canMakeDetachedRootEdits !== true) {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Attach edits require a minimum version for collaboration >= TBD.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (edits.length > 0) {\n\t\t\t\t\tthis.modularBuilder.submitChanges(edits, attachRevision);\n\t\t\t\t}\n\t\t\t},\n\t\t\tremove: (index: number, count: number): void => {\n\t\t\t\tif (count === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst id = this.modularBuilder.generateId(count);\n\t\t\t\tconst change: FieldChangeset = brand(\n\t\t\t\t\tsequence.changeHandler.editor.remove(index, count, id, revision),\n\t\t\t\t);\n\t\t\t\tthis.modularBuilder.submitChange(field, sequence.identifier, change, revision);\n\t\t\t},\n\t\t};\n\t\treturn editBuilder;\n\t}\n}\n\nfunction enforceEditsToDetachedTreesOptions(field: FieldUpPath, options: EditorOptions): void {\n\tif (options.canMakeDetachedRootEdits !== true) {\n\t\tconst topField = getDetachedFieldContainingFieldPath(field);\n\t\tif (topField !== rootField) {\n\t\t\tthrow new UsageError(\n\t\t\t\t`Edits and constraints on detached trees require a minimum version for collaboration >= TBD.`,\n\t\t\t);\n\t\t}\n\t}\n}\n\nexport interface RequiredFieldEditor<TContent, TDetachedRoot> {\n\t/**\n\t * Issues a change which replaces the content of the field with the given detached node.\n\t * @param content - The content to be attached in the field in the given order.\n\t * Must represent a single detached node.\n\t * Must have been created in the same JS turn.\n\t *\n\t * Requires SharedTreeFormatVersion.vDetachedRoots or later.\n\t */\n\tattach(content: TDetachedRoot): void;\n\n\t/**\n\t * Issues a change which replaces the content of the field with `newContent`.\n\t * @param newContent - the new content for the field.\n\t */\n\tset(newContent: TContent): void;\n}\n\nexport interface OptionalFieldEditor<TContent, TDetachedRoots> {\n\t/**\n\t * Issues a change which replaces the content of the field with the given detached node.\n\t * @param content - The content to be attached in the field in the given order.\n\t * Must represent a single detached node.\n\t *\n\t * Requires SharedTreeFormatVersion.vDetachedRoots or later.\n\t */\n\tattach(content: TDetachedRoots | undefined, wasEmpty: boolean): void;\n\n\t/**\n\t * Issues a change which clears content of the field.\n\t * @param wasEmpty - whether the field is empty when creating this change\n\t */\n\tclear(wasEmpty: boolean): void;\n\n\t/**\n\t * Issues a change which replaces the content of the field with `newContent`\n\t * @param newContent - the new content for the field.\n\t * @param wasEmpty - whether the field is empty when creating this change\n\t */\n\tset(newContent: TContent | undefined, wasEmpty: boolean): void;\n}\n\n/**\n * Editor for the sequence field kind.\n */\nexport interface SequenceFieldEditor<TContent, TDetachedRoots, TRemoved = void> {\n\t/**\n\t * Issues a change which attaches a sequence of detached nodes at the given `index`.\n\t * @param index - The index at which to attach the detached nodes.\n\t * @param detachedContent - The content to be attached in the field in the given order. Each node must be detached.\n\t *\n\t * Requires SharedTreeFormatVersion.vDetachedRoots or later.\n\t */\n\tattach(index: number, detachedContent: TDetachedRoots): void;\n\n\t/**\n\t * Issues a change which inserts the `newContent` at the given `index`.\n\t * @param index - the index at which to insert the `newContent`.\n\t * @param newContent - the new content to be inserted in the field.\n\t */\n\tinsert(index: number, newContent: TContent): void;\n\n\t/**\n\t * Issues a change which removes `count` elements starting at the given `index`.\n\t * @param index - The index of the first removed element.\n\t * @param count - The number of elements to remove.\n\t */\n\tremove(index: number, count: number): TRemoved;\n}\n\n/**\n * Gets the number of path elements that both paths share, starting at index 0.\n */\nfunction getSharedPrefixLength(pathA: readonly UpPath[], pathB: readonly UpPath[]): number {\n\tconst minDepth = Math.min(pathA.length, pathB.length);\n\tlet sharedDepth = 0;\n\twhile (sharedDepth < minDepth) {\n\t\tconst detachStep = pathA[sharedDepth] ?? oob();\n\t\tconst attachStep = pathB[sharedDepth] ?? oob();\n\t\tif (detachStep !== attachStep) {\n\t\t\tif (\n\t\t\t\tdetachStep.parentField !== attachStep.parentField ||\n\t\t\t\tdetachStep.parentIndex !== attachStep.parentIndex\n\t\t\t) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsharedDepth += 1;\n\t}\n\treturn sharedDepth;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"defaultEditBuilder.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultEditBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAGtE,OAAO,EAiBN,mBAAmB,EACnB,mCAAmC,EACnC,SAAS,EACT,WAAW,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAKN,mBAAmB,EAEnB,kBAAkB,EAClB,SAAS,IAAI,gBAAgB,EAC7B,oBAAoB,IAAI,2BAA2B,EACnD,WAAW,IAAI,kBAAkB,GACjC,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACN,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,IAAI,cAAc,GAC1B,MAAM,wBAAwB,CAAC;AAKhC;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAK/B,YAAmB,MAA6D;QAC/E,IAAI,CAAC,aAAa,GAAG,IAAI,mBAAmB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAClE,CAAC;IAED,IAAW,OAAO;QACjB,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;IACnC,CAAC;IAED,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,aAAa,CAAC,MAA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ved.\n * Licensed under the MIT License.\n */\n\nimport { assert, oob } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { ICodecFamily } from \"../../codec/index.js\";\nimport {\n\ttype ChangeAtomId,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamily,\n\ttype ChangeFamilyEditor,\n\ttype ChangeRebaser,\n\ttype ChangesetLocalId,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaRoot,\n\ttype EditorOptions,\n\ttype FieldUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype NormalizedUpPath,\n\ttype RevisionTag,\n\ttype TaggedChange,\n\ttype TreeChunk,\n\ttype UpPath,\n\tcompareFieldUpPaths,\n\tgetDetachedFieldContainingFieldPath,\n\trootField,\n\ttopDownPath,\n} from \"../../core/index.js\";\nimport { brand, RangeMap } from \"../../util/index.js\";\nimport {\n\ttype EditDescription,\n\ttype FieldChangeset,\n\ttype FieldEditDescription,\n\ttype GlobalEditDescription,\n\tModularChangeFamily,\n\ttype ModularChangeset,\n\tModularEditBuilder,\n\tintoDelta as intoModularDelta,\n\trelevantRemovedRoots as relevantModularRemovedRoots,\n\tgetBuildIds as getModularBuildIds,\n} from \"../modular-schema/index.js\";\n\nimport {\n\tfieldKinds,\n\toptional,\n\tsequence,\n\trequired as valueFieldKind,\n} from \"./defaultFieldKinds.js\";\nimport type { CellId } from \"../sequence-field/index.js\";\n\nexport type DefaultChangeset = ModularChangeset;\n\n/**\n * Implementation of {@link ChangeFamily} based on the default set of supported field kinds.\n *\n * @sealed\n */\nexport class DefaultChangeFamily\n\timplements ChangeFamily<IdBasedChangeFamilyDataEditor, DefaultChangeset>\n{\n\tprivate readonly modularFamily: ModularChangeFamily;\n\n\tpublic constructor(codecs: ICodecFamily<ModularChangeset, ChangeEncodingContext>) {\n\t\tthis.modularFamily = new ModularChangeFamily(fieldKinds, codecs);\n\t}\n\n\tpublic get rebaser(): ChangeRebaser<DefaultChangeset> {\n\t\treturn this.modularFamily.rebaser;\n\t}\n\n\tpublic get codecs(): ICodecFamily<DefaultChangeset, ChangeEncodingContext> {\n\t\treturn this.modularFamily.codecs;\n\t}\n\n\tpublic buildEditor(\n\t\tmintRevisionTag: () => RevisionTag,\n\t\tchangeReceiver: (change: TaggedChange<DefaultChangeset>) => void,\n\t\toptions?: EditorOptions,\n\t): IdBasedChangeFamilyDataEditor {\n\t\treturn new DefaultIdBasedDataEditor(this, mintRevisionTag, changeReceiver, options);\n\t}\n}\n\n/**\n * @param change - The change to convert into a delta.\n */\nexport function intoDelta(taggedChange: TaggedChange<ModularChangeset>): DeltaRoot {\n\treturn intoModularDelta(taggedChange, fieldKinds);\n}\n\n/**\n * Returns the set of removed roots that should be in memory for the given change to be applied.\n * A removed root is relevant if any of the following is true:\n * - It is being inserted\n * - It is being restored\n * - It is being edited\n * - The ID it is associated with is being changed\n *\n * May be conservative by returning more removed roots than strictly necessary.\n *\n * Will never return IDs for non-root trees, even if they are removed.\n *\n * @param change - The change to be applied.\n */\nexport function relevantRemovedRoots(change: ModularChangeset): Iterable<DeltaDetachedNodeId> {\n\treturn relevantModularRemovedRoots(change, fieldKinds);\n}\n\nexport function getBuildsIds(change: ModularChangeset): Iterable<DeltaDetachedNodeId> {\n\treturn getModularBuildIds(change);\n}\n\nexport type DetachedRootIds = readonly DetachedRootIdRange[];\nexport interface DetachedRootIdRange {\n\treadonly first: ChangeAtomId;\n\treadonly count: number;\n}\n\n/**\n * Default editor for tree data changes.\n * @privateRemarks\n * When taking into account not just the content of the tree,\n * but also how the merge identities (and thus anchors, flex-tree and simple-tree nodes) of nodes before and after the edits correspond,\n * some edits are currently impossible to express.\n * Examples of these non-expressible edits include:\n *\n * - Changing the type of a node while keeping its merge identity.\n * - Changing the value of a leaf while keeping its merge identity.\n * - Swapping subtrees between two value fields.\n * - Replacing a node in the middle of a tree while reusing some of the old nodes decedents that were under value fields.\n *\n * At some point it will likely be worth supporting at least some of these, possibly using a mechanism that could support all of them if desired.\n * If/when such a mechanism becomes available, an evaluation should be done to determine if any existing editing operations should be changed to leverage it\n * (Possibly by adding opt ins at the view schema layer).\n */\nexport interface DataEditor<TContent, TDetachedRoot, TDetachedRoots> {\n\t/**\n\t * Moves a subsequence from one sequence field to another sequence field.\n\t *\n\t * Note that the `destinationIndex` is interpreted based on the state of the sequence *before* the move operation.\n\t * For example, `move(field, 0, 1, field, 2)` changes `[A, B, C]` to `[B, A, C]`.\n\t */\n\tmove(\n\t\tsourceField: NormalizedFieldUpPath,\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestinationField: NormalizedFieldUpPath,\n\t\tdestinationIndex: number,\n\t): void;\n\n\t/**\n\t * Add a constraint that the node at the given path must exist.\n\t * @param path - The path to the node that must exist.\n\t */\n\taddNodeExistsConstraint(path: NormalizedUpPath): void;\n\n\t/**\n\t * Add a constraint that the node at the given path must exist when reverting a change.\n\t * @param path - The path to the node that must exist when reverting a change.\n\t */\n\taddNodeExistsConstraintOnRevert(path: NormalizedUpPath): void;\n\n\t/**\n\t * Builds the detached roots for the given content.\n\t * @param content - The content to be built into detached nodes.\n\t *\n\t * Requires SharedTreeFormatVersion.vDetachedRoots or later.\n\t */\n\tbuildRoots(content: TContent): TDetachedRoots;\n\n\t/**\n\t * @param field - the value field which is being edited under the parent node\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\tvalueField(field: NormalizedFieldUpPath): RequiredFieldEditor<TContent, TDetachedRoot>;\n\n\t/**\n\t * @param field - the optional field which is being edited under the parent node\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\toptionalField(field: NormalizedFieldUpPath): OptionalFieldEditor<TContent, TDetachedRoot>;\n\n\t/**\n\t * @param field - the sequence field which is being edited under the parent node\n\t *\n\t * @returns An object with methods to edit the given field of the given parent.\n\t * The returned object can be used (i.e., have its methods called) multiple times but its lifetime\n\t * is bounded by the lifetime of this edit builder.\n\t */\n\tsequenceField(field: NormalizedFieldUpPath): SequenceFieldEditor<TContent, TDetachedRoots>;\n}\n\nexport type IdBasedChangeFamilyDataEditor = ChangeFamilyEditor &\n\tDataEditor<TreeChunk, ChangeAtomId, DetachedRootIds>;\n\nexport function offsetChangesetLocalId(\n\tid: ChangesetLocalId,\n\toffset: number,\n): ChangesetLocalId {\n\treturn brand(id + offset);\n}\n\nexport function subtractChangesetLocalId(a: ChangesetLocalId, b: ChangesetLocalId): number {\n\treturn a - b;\n}\n\n/**\n * Implementation of {@link IdBasedChangeFamilyDataEditor} based on the default set of supported field kinds.\n * @sealed\n */\nexport class DefaultIdBasedDataEditor implements IdBasedChangeFamilyDataEditor {\n\tprivate readonly modularBuilder: ModularEditBuilder;\n\tprivate readonly nodesWithoutCells: RangeMap<ChangesetLocalId, true> = new RangeMap(\n\t\toffsetChangesetLocalId,\n\t\tsubtractChangesetLocalId,\n\t);\n\n\tpublic constructor(\n\t\tfamily: ChangeFamily<ChangeFamilyEditor, DefaultChangeset>,\n\t\tprivate readonly mintRevisionTag: () => RevisionTag,\n\t\tchangeReceiver: (change: TaggedChange<DefaultChangeset>) => void,\n\t\tprivate readonly options: EditorOptions = { canMakeDetachedRootEdits: false },\n\t) {\n\t\tthis.modularBuilder = new ModularEditBuilder(family, fieldKinds, changeReceiver);\n\t}\n\n\tpublic enterTransaction(): void {\n\t\tif (this.modularBuilder.isInTransaction() === false) {\n\t\t\tthis.nodesWithoutCells.clear();\n\t\t}\n\t\tthis.modularBuilder.enterTransaction();\n\t}\n\tpublic exitTransaction(): void {\n\t\tthis.modularBuilder.exitTransaction();\n\t\tif (this.modularBuilder.isInTransaction() === false) {\n\t\t\tthis.nodesWithoutCells.clear();\n\t\t}\n\t}\n\n\tpublic addNodeExistsConstraint(path: NormalizedUpPath): void {\n\t\tenforceEditsToDetachedTreesOptions(\n\t\t\t{ parent: path.parent, field: path.parentField },\n\t\t\tthis.options,\n\t\t);\n\t\tthis.modularBuilder.addNodeExistsConstraint(path, this.mintRevisionTag());\n\t}\n\n\tpublic addNodeExistsConstraintOnRevert(path: NormalizedUpPath): void {\n\t\tenforceEditsToDetachedTreesOptions(\n\t\t\t{ parent: path.parent, field: path.parentField },\n\t\t\tthis.options,\n\t\t);\n\t\tthis.modularBuilder.addNodeExistsConstraintOnRevert(path, this.mintRevisionTag());\n\t}\n\n\tpublic buildRoots(content: TreeChunk): DetachedRootIds {\n\t\tconst detachedRoots = [];\n\t\tconst count = content.topLevelLength;\n\t\tif (count > 0) {\n\t\t\tconst buildRevision = this.mintRevisionTag();\n\t\t\tconst buildId = {\n\t\t\t\tlocalId: this.modularBuilder.generateId(count),\n\t\t\t\trevision: buildRevision,\n\t\t\t};\n\t\t\tconst build = this.modularBuilder.buildTrees(buildId.localId, content, buildRevision);\n\t\t\tthis.modularBuilder.submitChanges([build], buildRevision);\n\t\t\tdetachedRoots.push({ first: buildId, count });\n\t\t\tthis.nodesWithoutCells.set(buildId.localId, count, true);\n\t\t}\n\t\treturn detachedRoots;\n\t}\n\n\tpublic valueField(\n\t\tfield: NormalizedFieldUpPath,\n\t): RequiredFieldEditor<TreeChunk, ChangeAtomId> {\n\t\tenforceEditsToDetachedTreesOptions(field, this.options);\n\t\tconst makeAttachEditDescription = (\n\t\t\tfill: ChangeAtomId,\n\t\t\trevision: RevisionTag,\n\t\t): FieldEditDescription => {\n\t\t\tconst detachLocalId = this.modularBuilder.generateId();\n\t\t\tconst detach = { localId: detachLocalId, revision };\n\t\t\tconst change = valueFieldKind.changeHandler.editor.set({ fill, detach });\n\t\t\treturn {\n\t\t\t\ttype: \"field\",\n\t\t\t\tfield,\n\t\t\t\tfieldKind: valueFieldKind.identifier,\n\t\t\t\tchange: brand(change),\n\t\t\t\trevision,\n\t\t\t};\n\t\t};\n\t\treturn {\n\t\t\tset: (newContent: TreeChunk): void => {\n\t\t\t\tassert(newContent.topLevelLength === 1, \"Expected exactly one node\");\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst buildLocalId = this.modularBuilder.generateId();\n\t\t\t\tconst buildId = { localId: buildLocalId, revision };\n\t\t\t\tconst build = this.modularBuilder.buildTrees(buildLocalId, newContent, revision);\n\t\t\t\tconst attach = makeAttachEditDescription(buildId, revision);\n\t\t\t\tthis.modularBuilder.submitChanges([build, attach], revision);\n\t\t\t},\n\n\t\t\tattach: (newContent: ChangeAtomId): void => {\n\t\t\t\tconst isWithoutCell = this.nodesWithoutCells.delete(newContent.localId, 1) === 1;\n\t\t\t\tif (!isWithoutCell) {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\"A hydrated node that has been attached before cannot be attached into an object's required field. Assign new content to the field instead.\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst attach = makeAttachEditDescription(newContent, revision);\n\t\t\t\tthis.modularBuilder.submitChanges([attach], revision);\n\t\t\t},\n\t\t};\n\t}\n\n\tpublic optionalField(\n\t\tfield: NormalizedFieldUpPath,\n\t): OptionalFieldEditor<TreeChunk, ChangeAtomId> {\n\t\tenforceEditsToDetachedTreesOptions(field, this.options);\n\t\tconst makeAttachEditDescription = (\n\t\t\tfill: ChangeAtomId,\n\t\t\trevision: RevisionTag,\n\t\t\twasEmpty: boolean,\n\t\t): FieldEditDescription => {\n\t\t\tconst detachLocalId = this.modularBuilder.generateId();\n\t\t\tconst detach = { localId: detachLocalId, revision };\n\t\t\tconst change = optional.changeHandler.editor.set(wasEmpty, { fill, detach });\n\t\t\treturn {\n\t\t\t\ttype: \"field\",\n\t\t\t\tfield,\n\t\t\t\tfieldKind: optional.identifier,\n\t\t\t\tchange: brand(change),\n\t\t\t\trevision,\n\t\t\t};\n\t\t};\n\t\tconst editBuilder = {\n\t\t\tset: (newContent: TreeChunk | undefined, wasEmpty: boolean): void => {\n\t\t\t\tif (newContent === undefined) {\n\t\t\t\t\teditBuilder.clear(wasEmpty);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tassert(newContent.topLevelLength === 1, \"Expected exactly one node\");\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst buildLocalId = this.modularBuilder.generateId();\n\t\t\t\tconst buildId = { localId: buildLocalId, revision };\n\t\t\t\tconst build = this.modularBuilder.buildTrees(buildLocalId, newContent, revision);\n\t\t\t\tconst attach = makeAttachEditDescription(buildId, revision, wasEmpty);\n\t\t\t\tthis.modularBuilder.submitChanges([build, attach], revision);\n\t\t\t},\n\t\t\tattach: (content: ChangeAtomId | undefined, wasEmpty: boolean): void => {\n\t\t\t\tif (content === undefined) {\n\t\t\t\t\teditBuilder.clear(wasEmpty);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst isWithoutCell = this.nodesWithoutCells.delete(content.localId, 1) === 1;\n\t\t\t\tif (!isWithoutCell && this.options.canMakeDetachedRootEdits !== true) {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Attach edits require a minimum version for collaboration >= TBD.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst edits: EditDescription[] = [];\n\t\t\t\tlet stableSrcId: ChangeAtomId;\n\t\t\t\tif (isWithoutCell) {\n\t\t\t\t\tstableSrcId = content;\n\t\t\t\t} else {\n\t\t\t\t\t// If the node has an associated cell, then it may be concurrently moved to another location.\n\t\t\t\t\t// We use a rename to ensure that the node will be moved to a specific grave before the attach.\n\t\t\t\t\tstableSrcId = { localId: this.modularBuilder.generateId(), revision };\n\t\t\t\t\tconst rename: GlobalEditDescription = {\n\t\t\t\t\t\ttype: \"global\",\n\t\t\t\t\t\trevision,\n\t\t\t\t\t\trenames: [\n\t\t\t\t\t\t\t{ count: 1, oldId: content, newId: stableSrcId, detachLocation: undefined },\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t\tedits.push(rename);\n\t\t\t\t}\n\t\t\t\tconst attach = makeAttachEditDescription(stableSrcId, revision, wasEmpty);\n\t\t\t\tedits.push(attach);\n\t\t\t\tthis.modularBuilder.submitChanges(edits, revision);\n\t\t\t},\n\t\t\tclear: (wasEmpty: boolean): void => {\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst detach: ChangeAtomId = { localId: this.modularBuilder.generateId(), revision };\n\t\t\t\tconst optionalChange = optional.changeHandler.editor.clear(wasEmpty, detach);\n\t\t\t\tconst change: FieldChangeset = brand(optionalChange);\n\t\t\t\tconst edit: FieldEditDescription = {\n\t\t\t\t\ttype: \"field\",\n\t\t\t\t\tfield,\n\t\t\t\t\tfieldKind: optional.identifier,\n\t\t\t\t\tchange,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tthis.modularBuilder.submitChanges([edit], revision);\n\t\t\t},\n\t\t};\n\t\treturn editBuilder;\n\t}\n\n\tpublic move(\n\t\tsourceField: NormalizedFieldUpPath,\n\t\tsourceIndex: number,\n\t\tcount: number,\n\t\tdestinationField: NormalizedFieldUpPath,\n\t\tdestIndex: number,\n\t): void {\n\t\tif (count === 0) {\n\t\t\treturn;\n\t\t} else if (count < 0 || !Number.isSafeInteger(count)) {\n\t\t\tthrow new UsageError(`Expected non-negative integer count, got ${count}.`);\n\t\t}\n\t\tenforceEditsToDetachedTreesOptions(sourceField, this.options);\n\t\tenforceEditsToDetachedTreesOptions(destinationField, this.options);\n\t\tconst revision = this.mintRevisionTag();\n\t\tconst detachCellId = this.modularBuilder.generateId(count);\n\t\tconst attachCellId: CellId = { localId: this.modularBuilder.generateId(count), revision };\n\t\tif (compareFieldUpPaths(sourceField, destinationField)) {\n\t\t\tconst change = sequence.changeHandler.editor.move(\n\t\t\t\tsourceIndex,\n\t\t\t\tcount,\n\t\t\t\tdestIndex,\n\t\t\t\tdetachCellId,\n\t\t\t\tattachCellId,\n\t\t\t\trevision,\n\t\t\t);\n\t\t\tthis.modularBuilder.submitChange(\n\t\t\t\tsourceField,\n\t\t\t\tsequence.identifier,\n\t\t\t\tbrand(change),\n\t\t\t\trevision,\n\t\t\t);\n\t\t} else {\n\t\t\tconst detachPath = topDownPath(sourceField.parent);\n\t\t\tconst attachPath = topDownPath(destinationField.parent);\n\t\t\tconst sharedDepth = getSharedPrefixLength(detachPath, attachPath);\n\t\t\tlet adjustedAttachField = destinationField;\n\t\t\t// `sharedDepth` is the number of elements, starting from the root, that both paths have in common.\n\t\t\tif (sharedDepth === detachPath.length) {\n\t\t\t\tconst lowestCommonAncestor: NormalizedUpPath | undefined = attachPath[sharedDepth];\n\t\t\t\tconst attachField = lowestCommonAncestor?.parentField ?? destinationField.field;\n\t\t\t\tif (attachField === sourceField.field) {\n\t\t\t\t\t// The detach occurs in an ancestor field of the field where the attach occurs.\n\t\t\t\t\tconst attachAncestorIndex = lowestCommonAncestor?.parentIndex ?? destIndex;\n\t\t\t\t\tif (attachAncestorIndex < sourceIndex) {\n\t\t\t\t\t\t// The attach path runs through a node located before the detached nodes.\n\t\t\t\t\t\t// No need to adjust the attach path.\n\t\t\t\t\t} else if (sourceIndex + count <= attachAncestorIndex) {\n\t\t\t\t\t\t// The attach path runs through a node located after the detached nodes.\n\t\t\t\t\t\t// adjust the index for the node at that depth of the path, so that it is interpreted correctly\n\t\t\t\t\t\t// in the composition performed by `submitChanges`.\n\t\t\t\t\t\tconst adjustedAttachAncestorIndex = attachAncestorIndex - count;\n\t\t\t\t\t\tlet parent: NormalizedUpPath =\n\t\t\t\t\t\t\tlowestCommonAncestor === undefined\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\tparent: undefined,\n\t\t\t\t\t\t\t\t\t\tdetachedNodeId: undefined,\n\t\t\t\t\t\t\t\t\t\tparentIndex: adjustedAttachAncestorIndex,\n\t\t\t\t\t\t\t\t\t\tparentField: destinationField.field,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t...lowestCommonAncestor,\n\t\t\t\t\t\t\t\t\t\tparentIndex: adjustedAttachAncestorIndex,\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\tfor (let i = sharedDepth + 1; i < attachPath.length; i += 1) {\n\t\t\t\t\t\t\tparent = {\n\t\t\t\t\t\t\t\t...(attachPath[i] ?? oob()),\n\t\t\t\t\t\t\t\tparent,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tadjustedAttachField = { parent, field: destinationField.field };\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\"Invalid move operation: the destination is located under one of the moved elements. Consider using the Tree.contains API to detect this.\",\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst moveOut = sequence.changeHandler.editor.remove(\n\t\t\t\tsourceIndex,\n\t\t\t\tcount,\n\t\t\t\tdetachCellId,\n\t\t\t\trevision,\n\t\t\t);\n\t\t\tconst moveIn = sequence.changeHandler.editor.insert(\n\t\t\t\tdestIndex,\n\t\t\t\tcount,\n\t\t\t\tattachCellId,\n\t\t\t\trevision,\n\t\t\t\tdetachCellId,\n\t\t\t);\n\n\t\t\tthis.modularBuilder.submitChanges(\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"field\",\n\t\t\t\t\t\tfield: sourceField,\n\t\t\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\t\t\tchange: brand(moveOut),\n\t\t\t\t\t\trevision,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"field\",\n\t\t\t\t\t\tfield: adjustedAttachField,\n\t\t\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\t\t\tchange: brand(moveIn),\n\t\t\t\t\t\trevision,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\trevision,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic sequenceField(\n\t\tfield: NormalizedFieldUpPath,\n\t): SequenceFieldEditor<TreeChunk, DetachedRootIds> {\n\t\tenforceEditsToDetachedTreesOptions(field, this.options);\n\t\tconst makeAttachEditDescription = (\n\t\t\tindex: number,\n\t\t\t{ first, count }: DetachedRootIdRange,\n\t\t\trevision: RevisionTag,\n\t\t\tareWithoutCells: boolean,\n\t\t): EditDescription[] => {\n\t\t\tconst edits: EditDescription[] = [];\n\t\t\t// If the nodes have never been attached in cell, then we must use a cell ID that matches the build ID.\n\t\t\t// This ensures back-compatibility with the v1 ModularChangeFamily model which requires that every node be associated with cell\n\t\t\t// by generating an insert whose destination cell is the cell associated with the build ID.\n\t\t\tlet stableSrcId: ChangeAtomId;\n\t\t\tif (areWithoutCells) {\n\t\t\t\tstableSrcId = first;\n\t\t\t} else {\n\t\t\t\t// If the node has an associated cell, then it may be concurrently moved to another location.\n\t\t\t\t// We use a rename to ensure that the node will be moved to a specific grave before the attach.\n\t\t\t\tstableSrcId = { localId: this.modularBuilder.generateId(count), revision };\n\t\t\t\tconst rename: GlobalEditDescription = {\n\t\t\t\t\ttype: \"global\",\n\t\t\t\t\trevision,\n\t\t\t\t\trenames: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount,\n\t\t\t\t\t\t\toldId: first,\n\t\t\t\t\t\t\tnewId: stableSrcId,\n\t\t\t\t\t\t\tdetachLocation: undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t\tedits.push(rename);\n\t\t\t}\n\t\t\tassert(stableSrcId.revision !== undefined, \"Detached nodes ID must have a revision\");\n\t\t\tconst change = sequence.changeHandler.editor.insert(\n\t\t\t\tindex,\n\t\t\t\tcount,\n\t\t\t\tstableSrcId,\n\t\t\t\tstableSrcId.revision,\n\t\t\t\tstableSrcId.localId,\n\t\t\t);\n\t\t\tconst attach: FieldEditDescription = {\n\t\t\t\ttype: \"field\",\n\t\t\t\tfield,\n\t\t\t\tfieldKind: sequence.identifier,\n\t\t\t\tchange: brand(change),\n\t\t\t\trevision,\n\t\t\t};\n\t\t\tedits.push(attach);\n\t\t\treturn edits;\n\t\t};\n\t\tconst editBuilder = {\n\t\t\tinsert: (index: number, content: TreeChunk): void => {\n\t\t\t\tconst count = content.topLevelLength;\n\t\t\t\tif (count === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst buildLocalId = this.modularBuilder.generateId();\n\t\t\t\tconst build = this.modularBuilder.buildTrees(buildLocalId, content, revision);\n\t\t\t\tconst roots: DetachedRootIdRange = {\n\t\t\t\t\tfirst: { localId: buildLocalId, revision },\n\t\t\t\t\tcount,\n\t\t\t\t};\n\n\t\t\t\tconst attach = makeAttachEditDescription(index, roots, revision, true);\n\t\t\t\tthis.modularBuilder.submitChanges([build, ...attach], revision);\n\t\t\t},\n\t\t\tattach: (index: number, newContent: DetachedRootIds): void => {\n\t\t\t\tconst attachRevision = this.mintRevisionTag();\n\t\t\t\tlet areAllWithoutCells = true;\n\t\t\t\tlet insertOffset = 0;\n\t\t\t\tconst edits: EditDescription[] = [];\n\t\t\t\tfor (const range of newContent) {\n\t\t\t\t\tif (range.count === 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst countWithoutCells = this.nodesWithoutCells.delete(\n\t\t\t\t\t\trange.first.localId,\n\t\t\t\t\t\trange.count,\n\t\t\t\t\t);\n\t\t\t\t\tassert(\n\t\t\t\t\t\tcountWithoutCells === 0 || countWithoutCells === range.count,\n\t\t\t\t\t\t\"All detached roots within the same ID range must either all have or all not have a cell\",\n\t\t\t\t\t);\n\t\t\t\t\tconst areWithoutCells = countWithoutCells === range.count;\n\t\t\t\t\tif (!areWithoutCells) {\n\t\t\t\t\t\tareAllWithoutCells = false;\n\t\t\t\t\t}\n\t\t\t\t\tconst renameAndAttach = makeAttachEditDescription(\n\t\t\t\t\t\tindex + insertOffset,\n\t\t\t\t\t\trange,\n\t\t\t\t\t\tattachRevision,\n\t\t\t\t\t\tareWithoutCells,\n\t\t\t\t\t);\n\t\t\t\t\tedits.push(...renameAndAttach);\n\t\t\t\t\tinsertOffset += range.count;\n\t\t\t\t}\n\t\t\t\tif (!areAllWithoutCells && this.options.canMakeDetachedRootEdits !== true) {\n\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t`Attach edits require a minimum version for collaboration >= TBD.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (edits.length > 0) {\n\t\t\t\t\tthis.modularBuilder.submitChanges(edits, attachRevision);\n\t\t\t\t}\n\t\t\t},\n\t\t\tremove: (index: number, count: number): void => {\n\t\t\t\tif (count === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst revision = this.mintRevisionTag();\n\t\t\t\tconst id = this.modularBuilder.generateId(count);\n\t\t\t\tconst change: FieldChangeset = brand(\n\t\t\t\t\tsequence.changeHandler.editor.remove(index, count, id, revision),\n\t\t\t\t);\n\t\t\t\tthis.modularBuilder.submitChange(field, sequence.identifier, change, revision);\n\t\t\t},\n\t\t};\n\t\treturn editBuilder;\n\t}\n}\n\nfunction enforceEditsToDetachedTreesOptions(field: FieldUpPath, options: EditorOptions): void {\n\tif (options.canMakeDetachedRootEdits !== true) {\n\t\tconst topField = getDetachedFieldContainingFieldPath(field);\n\t\tif (topField !== rootField) {\n\t\t\tthrow new UsageError(\n\t\t\t\t`Edits and constraints on detached trees require a minimum version for collaboration >= TBD.`,\n\t\t\t);\n\t\t}\n\t}\n}\n\nexport interface RequiredFieldEditor<TContent, TDetachedRoot> {\n\t/**\n\t * Issues a change which replaces the content of the field with the given detached node.\n\t * @param content - The content to be attached in the field in the given order.\n\t * Must represent a single detached node.\n\t * Must have been created in the same JS turn.\n\t *\n\t * Requires SharedTreeFormatVersion.vDetachedRoots or later.\n\t */\n\tattach(content: TDetachedRoot): void;\n\n\t/**\n\t * Issues a change which replaces the content of the field with `newContent`.\n\t * @param newContent - the new content for the field.\n\t */\n\tset(newContent: TContent): void;\n}\n\nexport interface OptionalFieldEditor<TContent, TDetachedRoots> {\n\t/**\n\t * Issues a change which replaces the content of the field with the given detached node.\n\t * @param content - The content to be attached in the field in the given order.\n\t * Must represent a single detached node.\n\t *\n\t * Requires SharedTreeFormatVersion.vDetachedRoots or later.\n\t */\n\tattach(content: TDetachedRoots | undefined, wasEmpty: boolean): void;\n\n\t/**\n\t * Issues a change which clears content of the field.\n\t * @param wasEmpty - whether the field is empty when creating this change\n\t */\n\tclear(wasEmpty: boolean): void;\n\n\t/**\n\t * Issues a change which replaces the content of the field with `newContent`\n\t * @param newContent - the new content for the field.\n\t * @param wasEmpty - whether the field is empty when creating this change\n\t */\n\tset(newContent: TContent | undefined, wasEmpty: boolean): void;\n}\n\n/**\n * Editor for the sequence field kind.\n */\nexport interface SequenceFieldEditor<TContent, TDetachedRoots, TRemoved = void> {\n\t/**\n\t * Issues a change which attaches a sequence of detached nodes at the given `index`.\n\t * @param index - The index at which to attach the detached nodes.\n\t * @param detachedContent - The content to be attached in the field in the given order. Each node must be detached.\n\t *\n\t * Requires SharedTreeFormatVersion.vDetachedRoots or later.\n\t */\n\tattach(index: number, detachedContent: TDetachedRoots): void;\n\n\t/**\n\t * Issues a change which inserts the `newContent` at the given `index`.\n\t * @param index - the index at which to insert the `newContent`.\n\t * @param newContent - the new content to be inserted in the field.\n\t */\n\tinsert(index: number, newContent: TContent): void;\n\n\t/**\n\t * Issues a change which removes `count` elements starting at the given `index`.\n\t * @param index - The index of the first removed element.\n\t * @param count - The number of elements to remove.\n\t */\n\tremove(index: number, count: number): TRemoved;\n}\n\n/**\n * Gets the number of path elements that both paths share, starting at index 0.\n */\nfunction getSharedPrefixLength(pathA: readonly UpPath[], pathB: readonly UpPath[]): number {\n\tconst minDepth = Math.min(pathA.length, pathB.length);\n\tlet sharedDepth = 0;\n\twhile (sharedDepth < minDepth) {\n\t\tconst detachStep = pathA[sharedDepth] ?? oob();\n\t\tconst attachStep = pathB[sharedDepth] ?? oob();\n\t\tif (detachStep !== attachStep) {\n\t\t\tif (\n\t\t\t\tdetachStep.parentField !== attachStep.parentField ||\n\t\t\t\tdetachStep.parentIndex !== attachStep.parentIndex\n\t\t\t) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsharedDepth += 1;\n\t}\n\treturn sharedDepth;\n}\n"]}
|
|
@@ -138,7 +138,7 @@ export const fieldKindConfigurations = new Map([
|
|
|
138
138
|
brand(101), // Detached roots
|
|
139
139
|
new Map([
|
|
140
140
|
[required.identifier, { kind: required, formatVersion: 2 }],
|
|
141
|
-
[optional.identifier, { kind: optional, formatVersion:
|
|
141
|
+
[optional.identifier, { kind: optional, formatVersion: 3 }],
|
|
142
142
|
[sequence.identifier, { kind: sequence, formatVersion: 2 }],
|
|
143
143
|
[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],
|
|
144
144
|
[identifier.identifier, { kind: identifier, formatVersion: 1 }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultFieldKinds.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultFieldKinds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAE3D,OAAO,EAIN,4BAA4B,EAC5B,YAAY,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAKN,aAAa,EAGb,+BAA+B,GAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGN,qBAAqB,EACrB,mBAAmB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,0BAA0B,GAE1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAc,MAAM,qBAAqB,CAAC;AAEpE;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAA0B;IACrD,OAAO,EAAE,+BAA+B,CAAC;QACxC,OAAO,EAAE,CAA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AAC,CAAC,CAAC,CACnF,CAAC;AAkCF;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAOnB,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AAE5D;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAqB;IACpD,UAAU;CACV,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ChangeAtomId,\n\ttype DeltaFieldChanges,\n\ttype FieldKindIdentifier,\n\tforbiddenFieldKindIdentifier,\n\tMultiplicity,\n} from \"../../core/index.js\";\nimport {\n\ttype FieldChangeHandler,\n\ttype FieldEditor,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\ttype ToDelta,\n\treferenceFreeFieldChangeRebaser,\n} from \"../modular-schema/index.js\";\nimport {\n\ttype OptionalChangeset,\n\ttype OptionalFieldEditor,\n\toptionalChangeHandler,\n\toptionalFieldEditor,\n} from \"../optional-field/index.js\";\nimport {\n\tsequenceFieldChangeHandler,\n\ttype SequenceFieldEditor,\n} from \"../sequence-field/index.js\";\n\nimport { noChangeCodecFamily } from \"./noChangeCodecs.js\";\nimport type { CodecTree } from \"../../codec/index.js\";\nimport { brand, brandConst, type Brand } from \"../../util/index.js\";\n\n/**\n * ChangeHandler that only handles no-op / identity changes.\n */\nexport const noChangeHandler: FieldChangeHandler<0> = {\n\trebaser: referenceFreeFieldChangeRebaser({\n\t\tcompose: (change1: 0, change2: 0) => 0,\n\t\tinvert: (changes: 0) => 0,\n\t\trebase: (change: 0, over: 0) => 0,\n\t\tmute: (changes: 0) => 0,\n\t}),\n\tcodecsFactory: () => noChangeCodecFamily,\n\teditor: { buildChildChanges: () => fail(0xb0d /* Child changes not supported */) },\n\tintoDelta: (change, deltaFromChild: ToDelta): DeltaFieldChanges => [],\n\tisEmpty: (change: 0) => true,\n\tgetNestedChanges: (change: 0) => [],\n\tcreateEmpty: () => 0,\n\tgetCrossFieldKeys: () => [],\n};\n\n/**\n * {@link FieldEditor} for required fields (always contain exactly 1 child).\n * @remarks\n * This shares code with optional fields, since they are the same edit wise except setting to empty is not allowed,\n * and the content is always assumed to not be empty.\n * This means the actual edits implemented for optional fields are sufficient to support required fields\n * which is why this is defined and implemented in terms of optional fields.\n */\nexport interface RequiredFieldEditor extends FieldEditor<OptionalChangeset> {\n\t/**\n\t * Creates a change which replaces the current value of the field with `newValue`.\n\t * @param ids - The ids for the fill and detach fields.\n\t */\n\tset(ids: { fill: ChangeAtomId; detach: ChangeAtomId }): OptionalChangeset;\n}\n\nconst optionalIdentifier = brandConst(\"Optional\")<FieldKindIdentifier>();\nconst requiredIdentifier = brandConst(\"Value\")<FieldKindIdentifier>();\nconst sequenceIdentifier = brandConst(\"Sequence\")<FieldKindIdentifier>();\nconst identifierFieldIdentifier = brandConst(\"Identifier\")<FieldKindIdentifier>();\n\n/**\n * 0 or 1 items.\n */\nexport const optional = new FlexFieldKind(optionalIdentifier, Multiplicity.Optional, {\n\tchangeHandler: optionalChangeHandler,\n\tallowMonotonicUpgradeFrom: new Set([\n\t\tidentifierFieldIdentifier,\n\t\trequiredIdentifier,\n\t\tforbiddenFieldKindIdentifier,\n\t]),\n});\n\nexport const requiredFieldEditor: RequiredFieldEditor = {\n\t...optionalFieldEditor,\n\tset: (ids: {\n\t\tfill: ChangeAtomId;\n\t\tdetach: ChangeAtomId;\n\t}): OptionalChangeset => optionalFieldEditor.set(false, ids),\n};\n\nexport const requiredFieldChangeHandler: FieldChangeHandler<\n\tOptionalChangeset,\n\tRequiredFieldEditor\n> = {\n\t...optionalChangeHandler,\n\teditor: requiredFieldEditor,\n};\n\n/**\n * Exactly one item.\n */\nexport const required = new FlexFieldKind(requiredIdentifier, Multiplicity.Single, {\n\tchangeHandler: requiredFieldChangeHandler,\n\tallowMonotonicUpgradeFrom: new Set([identifierFieldIdentifier]),\n});\n\n/**\n * 0 or more items.\n */\nexport const sequence = new FlexFieldKind(sequenceIdentifier, Multiplicity.Sequence, {\n\tchangeHandler: sequenceFieldChangeHandler,\n\tallowMonotonicUpgradeFrom: new Set([\n\t\trequired.identifier,\n\t\toptional.identifier,\n\t\tidentifierFieldIdentifier,\n\t\tforbiddenFieldKindIdentifier,\n\t]),\n});\n\n/**\n * Exactly one identifier.\n */\nexport const identifier = new FlexFieldKind(identifierFieldIdentifier, Multiplicity.Single, {\n\tchangeHandler: noChangeHandler,\n\t// By omitting required here,\n\t// this is making a policy choice that a schema upgrade cannot be done from required to identifier.\n\t// Since an identifier can be upgraded into a required field,\n\t// preventing the inverse helps ensure that schema upgrades are monotonic.\n\t// Which direction is allowed is a subjective policy choice.\n\tallowMonotonicUpgradeFrom: new Set([]),\n});\n\n/**\n * Exactly 0 items.\n *\n * Using Forbidden makes what types are listed for allowed in a field irrelevant\n * since the field will never have values in it.\n *\n * Using Forbidden is equivalent to picking a kind that permits empty (like sequence or optional)\n * and having no allowed types (or only never types).\n * Because of this, its possible to express everything constraint wise without Forbidden,\n * but using Forbidden can be more semantically clear than optional with no allowed types.\n *\n * For view schema, this can be useful if you need to:\n * - run a specific out of schema handler when a field is present,\n * but otherwise are ignoring or tolerating (ex: via extra fields) unmentioned fields.\n * - prevent a specific field from being used as an extra field\n * (perhaps for some past of future compatibility reason)\n * - keep a field in a schema for metadata purposes\n * (ex: for improved error messaging, error handling or documentation)\n * that is not used in this specific version of the schema (ex: to document what it was or will be used for).\n *\n * For stored schema, this can be useful if you need to:\n * - have a field which can have its schema updated to Optional or Sequence of any type.\n * - to exclude a field from extra fields\n * - for the schema system to use as a default for fields which aren't declared\n * (ex: when updating a field that did not exist into one that does)\n *\n * See {@link emptyField} for a constant, reusable field using Forbidden.\n */\nexport const forbidden = new FlexFieldKind(\n\tforbiddenFieldKindIdentifier,\n\tMultiplicity.Forbidden,\n\t{\n\t\tchangeHandler: noChangeHandler,\n\t\tallowMonotonicUpgradeFrom: new Set(),\n\t},\n);\n\nexport const fieldKindConfigurations: ReadonlyMap<\n\tModularChangeFormatVersion,\n\tFieldKindConfiguration\n> = new Map([\n\t[\n\t\tbrand(3),\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 2 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 2 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n\t[\n\t\tbrand(4),\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 2 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 3 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n\t[\n\t\tbrand(101), // Detached roots\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 2 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 2 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n]);\n\nexport type ModularChangeFormatVersion = Brand<3 | 4 | 101, \"ModularChangeFormatVersion\">;\nexport function getCodecTreeForModularChangeFormat(\n\tversion: ModularChangeFormatVersion,\n): CodecTree {\n\tconst dependencies =\n\t\tfieldKindConfigurations.get(version) ?? fail(0xc7c /* Unknown modular change format */);\n\tconst children: CodecTree[] = Array.from(dependencies.entries()).map(\n\t\t([key, { formatVersion }]) => ({\n\t\t\tname: `FieldKind:${key}`,\n\t\t\tversion: formatVersion,\n\t\t}),\n\t);\n\treturn {\n\t\tname: \"ModularChange\",\n\t\tversion,\n\t\tchildren,\n\t};\n}\n\n/**\n * All supported field kinds.\n *\n * @privateRemarks\n * Before making a SharedTree format change which impacts which set of field kinds are allowed,\n * code which uses this should be audited for compatibility considerations.\n */\nexport const fieldKinds: ReadonlyMap<FieldKindIdentifier, FlexFieldKind> = new Map(\n\t[required, optional, sequence, identifier, forbidden].map((s) => [s.identifier, s]),\n);\n\n// Create named Aliases for nicer intellisense.\n\n// TODO: Find a way to make docs like {@inheritDoc required} work in vscode.\n// TODO: ensure thy work in generated docs.\n// TODO: add these comments to the rest of the cases below.\nexport interface Required\n\textends FlexFieldKind<RequiredFieldEditor, typeof requiredIdentifier, Multiplicity.Single> {}\nexport interface Optional\n\textends FlexFieldKind<\n\t\tOptionalFieldEditor,\n\t\ttypeof optionalIdentifier,\n\t\tMultiplicity.Optional\n\t> {}\nexport interface Sequence\n\textends FlexFieldKind<\n\t\tSequenceFieldEditor,\n\t\ttypeof sequenceIdentifier,\n\t\tMultiplicity.Sequence\n\t> {}\nexport interface Identifier\n\textends FlexFieldKind<\n\t\tFieldEditor<0>,\n\t\ttypeof identifierFieldIdentifier,\n\t\tMultiplicity.Single\n\t> {}\nexport interface Forbidden\n\textends FlexFieldKind<\n\t\tFieldEditor<0>,\n\t\ttypeof forbiddenFieldKindIdentifier,\n\t\tMultiplicity.Forbidden\n\t> {}\n\n/**\n * Default FieldKinds with their editor types erased.\n */\nexport const FieldKinds: {\n\t// TODO: inheritDoc for these somehow\n\treadonly required: Required;\n\treadonly optional: Optional;\n\treadonly sequence: Sequence;\n\treadonly identifier: Identifier;\n\treadonly forbidden: Forbidden;\n} = { required, optional, sequence, identifier, forbidden };\n\n/**\n * FullSchemaPolicy with the default field kinds.\n */\nexport const defaultSchemaPolicy: FullSchemaPolicy = {\n\tfieldKinds,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"defaultFieldKinds.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/defaultFieldKinds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAE3D,OAAO,EAIN,4BAA4B,EAC5B,YAAY,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAKN,aAAa,EAGb,+BAA+B,GAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGN,qBAAqB,EACrB,mBAAmB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,0BAA0B,GAE1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAc,MAAM,qBAAqB,CAAC;AAEpE;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAA0B;IACrD,OAAO,EAAE,+BAA+B,CAAC;QACxC,OAAO,EAAE,CAAC,OAAU,EAAE,OAAU,EAAE,EAAE,CAAC,CAAC;QACtC,MAAM,EAAE,CAAC,OAAU,EAAE,EAAE,CAAC,CAAC;QACzB,MAAM,EAAE,CAAC,MAAS,EAAE,IAAO,EAAE,EAAE,CAAC,CAAC;QACjC,IAAI,EAAE,CAAC,OAAU,EAAE,EAAE,CAAC,CAAC;KACvB,CAAC;IACF,aAAa,EAAE,GAAG,EAAE,CAAC,mBAAmB;IACxC,MAAM,EAAE,EAAE,iBAAiB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,iCAAiC,CAAC,EAAE;IAClF,SAAS,EAAE,CAAC,MAAM,EAAE,cAAuB,EAAqB,EAAE,CAAC,EAAE;IACrE,OAAO,EAAE,CAAC,MAAS,EAAE,EAAE,CAAC,IAAI;IAC5B,gBAAgB,EAAE,CAAC,MAAS,EAAE,EAAE,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AAkC,CACjD,OAAmC;IAEnC,MAAM,YAAY,GACjB,uBAAuB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACzF,MAAM,QAAQ,GAAgB,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CACnE,CAAC,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9B,IAAI,EAAE,aAAa,GAAG,EAAE;QACxB,OAAO,EAAE,aAAa;KACtB,CAAC,CACF,CAAC;IACF,OAAO;QACN,IAAI,EAAE,eAAe;QACrB,OAAO;QACP,QAAQ;KACR,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAoD,IAAI,GAAG,CACjF,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CACnF,CAAC;AAkCF;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAOnB,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AAE5D;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAqB;IACpD,UAAU;CACV,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ChangeAtomId,\n\ttype DeltaFieldChanges,\n\ttype FieldKindIdentifier,\n\tforbiddenFieldKindIdentifier,\n\tMultiplicity,\n} from \"../../core/index.js\";\nimport {\n\ttype FieldChangeHandler,\n\ttype FieldEditor,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\ttype ToDelta,\n\treferenceFreeFieldChangeRebaser,\n} from \"../modular-schema/index.js\";\nimport {\n\ttype OptionalChangeset,\n\ttype OptionalFieldEditor,\n\toptionalChangeHandler,\n\toptionalFieldEditor,\n} from \"../optional-field/index.js\";\nimport {\n\tsequenceFieldChangeHandler,\n\ttype SequenceFieldEditor,\n} from \"../sequence-field/index.js\";\n\nimport { noChangeCodecFamily } from \"./noChangeCodecs.js\";\nimport type { CodecTree } from \"../../codec/index.js\";\nimport { brand, brandConst, type Brand } from \"../../util/index.js\";\n\n/**\n * ChangeHandler that only handles no-op / identity changes.\n */\nexport const noChangeHandler: FieldChangeHandler<0> = {\n\trebaser: referenceFreeFieldChangeRebaser({\n\t\tcompose: (change1: 0, change2: 0) => 0,\n\t\tinvert: (changes: 0) => 0,\n\t\trebase: (change: 0, over: 0) => 0,\n\t\tmute: (changes: 0) => 0,\n\t}),\n\tcodecsFactory: () => noChangeCodecFamily,\n\teditor: { buildChildChanges: () => fail(0xb0d /* Child changes not supported */) },\n\tintoDelta: (change, deltaFromChild: ToDelta): DeltaFieldChanges => [],\n\tisEmpty: (change: 0) => true,\n\tgetNestedChanges: (change: 0) => [],\n\tcreateEmpty: () => 0,\n\tgetCrossFieldKeys: () => [],\n};\n\n/**\n * {@link FieldEditor} for required fields (always contain exactly 1 child).\n * @remarks\n * This shares code with optional fields, since they are the same edit wise except setting to empty is not allowed,\n * and the content is always assumed to not be empty.\n * This means the actual edits implemented for optional fields are sufficient to support required fields\n * which is why this is defined and implemented in terms of optional fields.\n */\nexport interface RequiredFieldEditor extends FieldEditor<OptionalChangeset> {\n\t/**\n\t * Creates a change which replaces the current value of the field with `newValue`.\n\t * @param ids - The ids for the fill and detach fields.\n\t */\n\tset(ids: { fill: ChangeAtomId; detach: ChangeAtomId }): OptionalChangeset;\n}\n\nconst optionalIdentifier = brandConst(\"Optional\")<FieldKindIdentifier>();\nconst requiredIdentifier = brandConst(\"Value\")<FieldKindIdentifier>();\nconst sequenceIdentifier = brandConst(\"Sequence\")<FieldKindIdentifier>();\nconst identifierFieldIdentifier = brandConst(\"Identifier\")<FieldKindIdentifier>();\n\n/**\n * 0 or 1 items.\n */\nexport const optional = new FlexFieldKind(optionalIdentifier, Multiplicity.Optional, {\n\tchangeHandler: optionalChangeHandler,\n\tallowMonotonicUpgradeFrom: new Set([\n\t\tidentifierFieldIdentifier,\n\t\trequiredIdentifier,\n\t\tforbiddenFieldKindIdentifier,\n\t]),\n});\n\nexport const requiredFieldEditor: RequiredFieldEditor = {\n\t...optionalFieldEditor,\n\tset: (ids: {\n\t\tfill: ChangeAtomId;\n\t\tdetach: ChangeAtomId;\n\t}): OptionalChangeset => optionalFieldEditor.set(false, ids),\n};\n\nexport const requiredFieldChangeHandler: FieldChangeHandler<\n\tOptionalChangeset,\n\tRequiredFieldEditor\n> = {\n\t...optionalChangeHandler,\n\teditor: requiredFieldEditor,\n};\n\n/**\n * Exactly one item.\n */\nexport const required = new FlexFieldKind(requiredIdentifier, Multiplicity.Single, {\n\tchangeHandler: requiredFieldChangeHandler,\n\tallowMonotonicUpgradeFrom: new Set([identifierFieldIdentifier]),\n});\n\n/**\n * 0 or more items.\n */\nexport const sequence = new FlexFieldKind(sequenceIdentifier, Multiplicity.Sequence, {\n\tchangeHandler: sequenceFieldChangeHandler,\n\tallowMonotonicUpgradeFrom: new Set([\n\t\trequired.identifier,\n\t\toptional.identifier,\n\t\tidentifierFieldIdentifier,\n\t\tforbiddenFieldKindIdentifier,\n\t]),\n});\n\n/**\n * Exactly one identifier.\n */\nexport const identifier = new FlexFieldKind(identifierFieldIdentifier, Multiplicity.Single, {\n\tchangeHandler: noChangeHandler,\n\t// By omitting required here,\n\t// this is making a policy choice that a schema upgrade cannot be done from required to identifier.\n\t// Since an identifier can be upgraded into a required field,\n\t// preventing the inverse helps ensure that schema upgrades are monotonic.\n\t// Which direction is allowed is a subjective policy choice.\n\tallowMonotonicUpgradeFrom: new Set([]),\n});\n\n/**\n * Exactly 0 items.\n *\n * Using Forbidden makes what types are listed for allowed in a field irrelevant\n * since the field will never have values in it.\n *\n * Using Forbidden is equivalent to picking a kind that permits empty (like sequence or optional)\n * and having no allowed types (or only never types).\n * Because of this, its possible to express everything constraint wise without Forbidden,\n * but using Forbidden can be more semantically clear than optional with no allowed types.\n *\n * For view schema, this can be useful if you need to:\n * - run a specific out of schema handler when a field is present,\n * but otherwise are ignoring or tolerating (ex: via extra fields) unmentioned fields.\n * - prevent a specific field from being used as an extra field\n * (perhaps for some past of future compatibility reason)\n * - keep a field in a schema for metadata purposes\n * (ex: for improved error messaging, error handling or documentation)\n * that is not used in this specific version of the schema (ex: to document what it was or will be used for).\n *\n * For stored schema, this can be useful if you need to:\n * - have a field which can have its schema updated to Optional or Sequence of any type.\n * - to exclude a field from extra fields\n * - for the schema system to use as a default for fields which aren't declared\n * (ex: when updating a field that did not exist into one that does)\n *\n * See {@link emptyField} for a constant, reusable field using Forbidden.\n */\nexport const forbidden = new FlexFieldKind(\n\tforbiddenFieldKindIdentifier,\n\tMultiplicity.Forbidden,\n\t{\n\t\tchangeHandler: noChangeHandler,\n\t\tallowMonotonicUpgradeFrom: new Set(),\n\t},\n);\n\nexport const fieldKindConfigurations: ReadonlyMap<\n\tModularChangeFormatVersion,\n\tFieldKindConfiguration\n> = new Map([\n\t[\n\t\tbrand(3),\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 2 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 2 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n\t[\n\t\tbrand(4),\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 2 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 3 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n\t[\n\t\tbrand(101), // Detached roots\n\t\tnew Map<FieldKindIdentifier, FieldKindConfigurationEntry>([\n\t\t\t[required.identifier, { kind: required, formatVersion: 2 }],\n\t\t\t[optional.identifier, { kind: optional, formatVersion: 3 }],\n\t\t\t[sequence.identifier, { kind: sequence, formatVersion: 2 }],\n\t\t\t[forbidden.identifier, { kind: forbidden, formatVersion: 1 }],\n\t\t\t[identifier.identifier, { kind: identifier, formatVersion: 1 }],\n\t\t]),\n\t],\n]);\n\nexport type ModularChangeFormatVersion = Brand<3 | 4 | 101, \"ModularChangeFormatVersion\">;\nexport function getCodecTreeForModularChangeFormat(\n\tversion: ModularChangeFormatVersion,\n): CodecTree {\n\tconst dependencies =\n\t\tfieldKindConfigurations.get(version) ?? fail(0xc7c /* Unknown modular change format */);\n\tconst children: CodecTree[] = Array.from(dependencies.entries()).map(\n\t\t([key, { formatVersion }]) => ({\n\t\t\tname: `FieldKind:${key}`,\n\t\t\tversion: formatVersion,\n\t\t}),\n\t);\n\treturn {\n\t\tname: \"ModularChange\",\n\t\tversion,\n\t\tchildren,\n\t};\n}\n\n/**\n * All supported field kinds.\n *\n * @privateRemarks\n * Before making a SharedTree format change which impacts which set of field kinds are allowed,\n * code which uses this should be audited for compatibility considerations.\n */\nexport const fieldKinds: ReadonlyMap<FieldKindIdentifier, FlexFieldKind> = new Map(\n\t[required, optional, sequence, identifier, forbidden].map((s) => [s.identifier, s]),\n);\n\n// Create named Aliases for nicer intellisense.\n\n// TODO: Find a way to make docs like {@inheritDoc required} work in vscode.\n// TODO: ensure thy work in generated docs.\n// TODO: add these comments to the rest of the cases below.\nexport interface Required\n\textends FlexFieldKind<RequiredFieldEditor, typeof requiredIdentifier, Multiplicity.Single> {}\nexport interface Optional\n\textends FlexFieldKind<\n\t\tOptionalFieldEditor,\n\t\ttypeof optionalIdentifier,\n\t\tMultiplicity.Optional\n\t> {}\nexport interface Sequence\n\textends FlexFieldKind<\n\t\tSequenceFieldEditor,\n\t\ttypeof sequenceIdentifier,\n\t\tMultiplicity.Sequence\n\t> {}\nexport interface Identifier\n\textends FlexFieldKind<\n\t\tFieldEditor<0>,\n\t\ttypeof identifierFieldIdentifier,\n\t\tMultiplicity.Single\n\t> {}\nexport interface Forbidden\n\textends FlexFieldKind<\n\t\tFieldEditor<0>,\n\t\ttypeof forbiddenFieldKindIdentifier,\n\t\tMultiplicity.Forbidden\n\t> {}\n\n/**\n * Default FieldKinds with their editor types erased.\n */\nexport const FieldKinds: {\n\t// TODO: inheritDoc for these somehow\n\treadonly required: Required;\n\treadonly optional: Optional;\n\treadonly sequence: Sequence;\n\treadonly identifier: Identifier;\n\treadonly forbidden: Forbidden;\n} = { required, optional, sequence, identifier, forbidden };\n\n/**\n * FullSchemaPolicy with the default field kinds.\n */\nexport const defaultSchemaPolicy: FullSchemaPolicy = {\n\tfieldKinds,\n};\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
export { FieldKinds, type Required, type Optional, type Sequence, type Identifier, type Forbidden, fieldKinds, fieldKindConfigurations, getCodecTreeForModularChangeFormat, type ModularChangeFormatVersion, defaultSchemaPolicy, } from "./defaultFieldKinds.js";
|
|
6
|
-
export { type DefaultChangeset, type DetachedRootIds, type DetachedRootIdRange, DefaultChangeFamily, type IdBasedChangeFamilyDataEditor, DefaultIdBasedDataEditor, type DataEditor, type RequiredFieldEditor, type OptionalFieldEditor, type SequenceFieldEditor, intoDelta, relevantRemovedRoots, } from "./defaultEditBuilder.js";
|
|
6
|
+
export { type DefaultChangeset, type DetachedRootIds, type DetachedRootIdRange, DefaultChangeFamily, type IdBasedChangeFamilyDataEditor, DefaultIdBasedDataEditor, type DataEditor, type RequiredFieldEditor, type OptionalFieldEditor, type SequenceFieldEditor, intoDelta, getBuildsIds, relevantRemovedRoots, } from "./defaultEditBuilder.js";
|
|
7
7
|
export { type DetachedRootLocation, type DetachedRootsLocation, type Locator, LocationBasedDataEditor, type ILocationBasedDataEditor, } from "./locationBasedEditBuilder.js";
|
|
8
8
|
export { MappedEditBuilder } from "./mappedEditBuilder.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,SAAS,EACd,UAAU,EACV,uBAAuB,EACvB,kCAAkC,EAClC,KAAK,0BAA0B,EAC/B,mBAAmB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,wBAAwB,EACxB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,SAAS,EACT,oBAAoB,GACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACN,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EACZ,uBAAuB,EACvB,KAAK,wBAAwB,GAC7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,SAAS,EACd,UAAU,EACV,uBAAuB,EACvB,kCAAkC,EAClC,KAAK,0BAA0B,EAC/B,mBAAmB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,wBAAwB,EACxB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,SAAS,EACT,YAAY,EACZ,oBAAoB,GACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACN,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EACZ,uBAAuB,EACvB,KAAK,wBAAwB,GAC7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
export { FieldKinds, fieldKinds, fieldKindConfigurations, getCodecTreeForModularChangeFormat, defaultSchemaPolicy, } from "./defaultFieldKinds.js";
|
|
6
|
-
export { DefaultChangeFamily, DefaultIdBasedDataEditor, intoDelta, relevantRemovedRoots, } from "./defaultEditBuilder.js";
|
|
6
|
+
export { DefaultChangeFamily, DefaultIdBasedDataEditor, intoDelta, getBuildsIds, relevantRemovedRoots, } from "./defaultEditBuilder.js";
|
|
7
7
|
export { LocationBasedDataEditor, } from "./locationBasedEditBuilder.js";
|
|
8
8
|
export { MappedEditBuilder } from "./mappedEditBuilder.js";
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EAMV,UAAU,EACV,uBAAuB,EACvB,kCAAkC,EAElC,mBAAmB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAIN,mBAAmB,EAEnB,wBAAwB,EAKxB,SAAS,EACT,oBAAoB,GACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAIN,uBAAuB,GAEvB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tgetCodecTreeForModularChangeFormat,\n\ttype ModularChangeFormatVersion,\n\tdefaultSchemaPolicy,\n} from \"./defaultFieldKinds.js\";\n\nexport {\n\ttype DefaultChangeset,\n\ttype DetachedRootIds,\n\ttype DetachedRootIdRange,\n\tDefaultChangeFamily,\n\ttype IdBasedChangeFamilyDataEditor,\n\tDefaultIdBasedDataEditor,\n\ttype DataEditor,\n\ttype RequiredFieldEditor,\n\ttype OptionalFieldEditor,\n\ttype SequenceFieldEditor,\n\tintoDelta,\n\trelevantRemovedRoots,\n} from \"./defaultEditBuilder.js\";\n\nexport {\n\ttype DetachedRootLocation,\n\ttype DetachedRootsLocation,\n\ttype Locator,\n\tLocationBasedDataEditor,\n\ttype ILocationBasedDataEditor,\n} from \"./locationBasedEditBuilder.js\";\n\nexport { MappedEditBuilder } from \"./mappedEditBuilder.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/default-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,UAAU,EAMV,UAAU,EACV,uBAAuB,EACvB,kCAAkC,EAElC,mBAAmB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAIN,mBAAmB,EAEnB,wBAAwB,EAKxB,SAAS,EACT,YAAY,EACZ,oBAAoB,GACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAIN,uBAAuB,GAEvB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tgetCodecTreeForModularChangeFormat,\n\ttype ModularChangeFormatVersion,\n\tdefaultSchemaPolicy,\n} from \"./defaultFieldKinds.js\";\n\nexport {\n\ttype DefaultChangeset,\n\ttype DetachedRootIds,\n\ttype DetachedRootIdRange,\n\tDefaultChangeFamily,\n\ttype IdBasedChangeFamilyDataEditor,\n\tDefaultIdBasedDataEditor,\n\ttype DataEditor,\n\ttype RequiredFieldEditor,\n\ttype OptionalFieldEditor,\n\ttype SequenceFieldEditor,\n\tintoDelta,\n\tgetBuildsIds,\n\trelevantRemovedRoots,\n} from \"./defaultEditBuilder.js\";\n\nexport {\n\ttype DetachedRootLocation,\n\ttype DetachedRootsLocation,\n\ttype Locator,\n\tLocationBasedDataEditor,\n\ttype ILocationBasedDataEditor,\n} from \"./locationBasedEditBuilder.js\";\n\nexport { MappedEditBuilder } from \"./mappedEditBuilder.js\";\n"]}
|
|
@@ -16,7 +16,7 @@ export { isNeverField, ModularEditBuilder, type FieldEditDescription as EditDesc
|
|
|
16
16
|
export { mapRootChanges, nodeIdFromChangeAtom, changeAtomFromDetachedNodeId, } from "./deltaUtils.js";
|
|
17
17
|
export { type TreeChunk, chunkTree, chunkField, chunkFieldSingle, buildChunkedForest, defaultChunkPolicy, type FieldBatch, type FieldBatchCodec, FieldBatchFormatVersion, getCodecTreeForFieldBatchFormat, makeTreeChunker, makeFieldBatchCodec, type FieldBatchEncodingContext, emptyChunk, combineChunks, type IncrementalEncodingPolicy, defaultIncrementalEncodingPolicy, } from "./chunked-forest/index.js";
|
|
18
18
|
export { compareLocalNodeIdentifiers, createNodeIdentifierManager, isStableNodeIdentifier, type LocalNodeIdentifier, MockNodeIdentifierManager, type NodeIdentifierManager, nodeKeyTreeIdentifier, type StableNodeIdentifier, } from "./node-identifier/index.js";
|
|
19
|
-
export { FieldKinds, type Required, type Optional, type Sequence, type Identifier, type Forbidden, type DefaultChangeset, type DetachedRootIds, DefaultChangeFamily, type IdBasedChangeFamilyDataEditor, DefaultIdBasedDataEditor, type DataEditor, type RequiredFieldEditor, type OptionalFieldEditor, type SequenceFieldEditor, defaultSchemaPolicy, fieldKinds, fieldKindConfigurations, intoDelta, relevantRemovedRoots, type DetachedRootLocation, type DetachedRootsLocation, type DetachedRootIdRange, type Locator, LocationBasedDataEditor, type ILocationBasedDataEditor, getCodecTreeForModularChangeFormat, type ModularChangeFormatVersion, } from "./default-schema/index.js";
|
|
19
|
+
export { FieldKinds, type Required, type Optional, type Sequence, type Identifier, type Forbidden, type DefaultChangeset, type DetachedRootIds, DefaultChangeFamily, type IdBasedChangeFamilyDataEditor, DefaultIdBasedDataEditor, type DataEditor, type RequiredFieldEditor, type OptionalFieldEditor, type SequenceFieldEditor, defaultSchemaPolicy, fieldKinds, fieldKindConfigurations, intoDelta, relevantRemovedRoots, getBuildsIds, type DetachedRootLocation, type DetachedRootsLocation, type DetachedRootIdRange, type Locator, LocationBasedDataEditor, type ILocationBasedDataEditor, getCodecTreeForModularChangeFormat, type ModularChangeFormatVersion, } from "./default-schema/index.js";
|
|
20
20
|
export { SchemaValidationError, isNodeInSchema, isFieldInSchema, throwOutOfSchema, } from "./schemaChecker.js";
|
|
21
21
|
export { type FlexTreeOptionalField, type FlexTreeRequiredField, type FlexTreeSequenceField, type FlexTreeContext, type FlexTreeHydratedContext, type FlexTreeTypedField, type FlexTreeEntity, type FlexTreeField, type FlexTreeNode, TreeStatus, Context, type FlexTreeNodeEvents, type FlexTreeUnknownUnboxed, isFlexTreeNode, ContextSlot, flexTreeMarker, assertFlexTreeEntityNotFreed, flexTreeSlot, getSchemaAndPolicy, LazyEntity, treeStatusFromAnchorCache, indexForAt, FlexTreeEntityKind, type FlexibleNodeContent, type FlexibleFieldContent, type FlexTreeHydratedContextMinimal, type HydratedFlexTreeNode, getOrCreateHydratedFlexTreeNode, currentObserver, withObservation, type Observer, } from "./flex-tree/index.js";
|
|
22
22
|
export { TreeCompressionStrategy } from "./treeCompressionUtils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,QAAQ,EACb,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,4BAA4B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,mBAAmB,EACnB,KAAK,aAAa,EAClB,UAAU,EACV,eAAe,EACf,KAAK,cAAc,EACnB,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OA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EX,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,EACzB,+BAA+B,EAC/B,eAAe,EACf,eAAe,EACf,KAAK,QAAQ,GACb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EACN,KAAK,YAAY,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EACN,KAAK,SAAS,EACd,eAAe,EACf,UAAU,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC"}
|
|
@@ -17,7 +17,7 @@ export { isNeverField, ModularEditBuilder, makeModularChangeCodecFamily, CrossFi
|
|
|
17
17
|
export { mapRootChanges, nodeIdFromChangeAtom, changeAtomFromDetachedNodeId, } from "./deltaUtils.js";
|
|
18
18
|
export { chunkTree, chunkField, chunkFieldSingle, buildChunkedForest, defaultChunkPolicy, FieldBatchFormatVersion, getCodecTreeForFieldBatchFormat, makeTreeChunker, makeFieldBatchCodec, emptyChunk, combineChunks, defaultIncrementalEncodingPolicy, } from "./chunked-forest/index.js";
|
|
19
19
|
export { compareLocalNodeIdentifiers, createNodeIdentifierManager, isStableNodeIdentifier, MockNodeIdentifierManager, nodeKeyTreeIdentifier, } from "./node-identifier/index.js";
|
|
20
|
-
export { FieldKinds, DefaultChangeFamily, DefaultIdBasedDataEditor, defaultSchemaPolicy, fieldKinds, fieldKindConfigurations, intoDelta, relevantRemovedRoots, LocationBasedDataEditor, getCodecTreeForModularChangeFormat, } from "./default-schema/index.js";
|
|
20
|
+
export { FieldKinds, DefaultChangeFamily, DefaultIdBasedDataEditor, defaultSchemaPolicy, fieldKinds, fieldKindConfigurations, intoDelta, relevantRemovedRoots, getBuildsIds, LocationBasedDataEditor, getCodecTreeForModularChangeFormat, } from "./default-schema/index.js";
|
|
21
21
|
export { SchemaValidationError, isNodeInSchema, isFieldInSchema, throwOutOfSchema, } from "./schemaChecker.js";
|
|
22
22
|
export { TreeStatus, Context, isFlexTreeNode, ContextSlot,
|
|
23
23
|
// Internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EAEtB,sBAAsB,EACtB,gBAAgB,GAIhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,4BAA4B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,mBAAmB,EAEnB,UAAU,EACV,eAAe,EAEf,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,GACtB,MAAM,qBAAqB,CAAC;AAE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ElC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACN,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,gBAAgB,GAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAUN,UAAU,EACV,OAAO,EAGP,cAAc,EACd,WAAW;AACX,WAAW;AACX,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAKlB,+BAA+B,EAC/B,eAAe,EACf,eAAe,GAEf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EAEN,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAEN,eAAe,EACf,UAAU,GAIV,MAAM,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport {\n\tForestSummarizer,\n\tgetCodecTreeForForestFormat,\n\tForestFormatVersion,\n} from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n\ttype MinimalMapTreeNodeView,\n\tmapTreeFieldsWithField,\n\tmapTreeWithField,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype MinimalFieldMap,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport {\n\tSchemaSummarizer,\n\tencodeTreeSchema,\n\tmakeSchemaCodec,\n\tmakeSchemaCodecs,\n\tgetCodecTreeForSchemaFormat,\n\tclientVersionToSchemaVersion,\n} from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\n// Split this up into separate import and export for compatibility with API-Extractor.\nimport * as SequenceField from \"./sequence-field/index.js\";\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype ComposeNodeManager,\n\ttype InvertNodeManager,\n\ttype RebaseNodeManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tModularChangeFamily,\n\tEncodedModularChangeset,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tisNeverTree,\n} from \"./modular-schema/index.js\";\n\nexport {\n\tmapRootChanges,\n\tnodeIdFromChangeAtom,\n\tchangeAtomFromDetachedNodeId,\n} from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkField,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tFieldBatchFormatVersion,\n\tgetCodecTreeForFieldBatchFormat,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\temptyChunk,\n\tcombineChunks,\n\ttype IncrementalEncodingPolicy,\n\tdefaultIncrementalEncodingPolicy,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\ttype DefaultChangeset,\n\ttype DetachedRootIds,\n\tDefaultChangeFamily,\n\ttype IdBasedChangeFamilyDataEditor,\n\tDefaultIdBasedDataEditor,\n\ttype DataEditor,\n\ttype RequiredFieldEditor,\n\ttype OptionalFieldEditor,\n\ttype SequenceFieldEditor,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tgetBuildsIds,\n\ttype DetachedRootLocation,\n\ttype DetachedRootsLocation,\n\ttype DetachedRootIdRange,\n\ttype Locator,\n\tLocationBasedDataEditor,\n\ttype ILocationBasedDataEditor,\n\tgetCodecTreeForModularChangeFormat,\n\ttype ModularChangeFormatVersion,\n} from \"./default-schema/index.js\";\n\nexport {\n\tSchemaValidationError,\n\tisNodeInSchema,\n\tisFieldInSchema,\n\tthrowOutOfSchema,\n} from \"./schemaChecker.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n\ttype FlexibleNodeContent,\n\ttype FlexibleFieldContent,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype HydratedFlexTreeNode,\n\tgetOrCreateHydratedFlexTreeNode,\n\tcurrentObserver,\n\twithObservation,\n\ttype Observer,\n} from \"./flex-tree/index.js\";\n\nexport { TreeCompressionStrategy } from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n\tgetCodecTreeForSchemaChangeFormat,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n"]}
|
|
@@ -11,7 +11,7 @@ export { type FieldChangeHandler, type FieldChangeRebaser, type FieldEditor, typ
|
|
|
11
11
|
export { type CrossFieldKey, type CrossFieldKeyRange, type FieldChange, type FieldChangeMap, type FieldChangeset, type HasFieldChanges, type ModularChangeset, type NodeExistsConstraint, type NodeId, type ChangeAtomIdBTree, type RebaseVersion, getFromChangeAtomIdMap, setInChangeAtomIdMap, rangeQueryChangeAtomIdMap, } from "./modularChangeTypes.js";
|
|
12
12
|
export { convertGenericChange, genericChangeHandler, genericFieldKind, } from "./genericFieldKind.js";
|
|
13
13
|
export type { GenericChangeset } from "./genericFieldKindTypes.js";
|
|
14
|
-
export { ModularChangeFamily, ModularEditBuilder, type EditDescription, type GlobalEditDescription, type FieldEditDescription, rebaseRevisionMetadataFromInfo, intoDelta, relevantRemovedRoots, updateRefreshers, } from "./modularChangeFamily.js";
|
|
14
|
+
export { ModularChangeFamily, ModularEditBuilder, type EditDescription, type GlobalEditDescription, type FieldEditDescription, rebaseRevisionMetadataFromInfo, intoDelta, relevantRemovedRoots, getBuildIds, updateRefreshers, } from "./modularChangeFamily.js";
|
|
15
15
|
export { makeModularChangeCodecFamily } from "./modularChangeCodecs.js";
|
|
16
16
|
export type { FieldKindConfiguration, FieldKindConfigurationEntry, } from "./fieldKindConfiguration.js";
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,kCAAkC,EAClC,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACN,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,+BAA+B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,OAAO,EACZ,eAAe,EACf,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACN,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,8BAA8B,EAC9B,SAAS,EACT,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,YAAY,EACX,sBAAsB,EACtB,2BAA2B,GAC3B,MAAM,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,kCAAkC,EAClC,mBAAm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AAkB,EAClB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,8BAA8B,EAC9B,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,gBAAgB,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,YAAY,EACX,sBAAsB,EACtB,2BAA2B,GAC3B,MAAM,6BAA6B,CAAC"}
|
|
@@ -10,6 +10,6 @@ export { FlexFieldKind } from "./fieldKind.js";
|
|
|
10
10
|
export { referenceFreeFieldChangeRebaser, NodeAttachState, } from "./fieldChangeHandler.js";
|
|
11
11
|
export { getFromChangeAtomIdMap, setInChangeAtomIdMap, rangeQueryChangeAtomIdMap, } from "./modularChangeTypes.js";
|
|
12
12
|
export { convertGenericChange, genericChangeHandler, genericFieldKind, } from "./genericFieldKind.js";
|
|
13
|
-
export { ModularChangeFamily, ModularEditBuilder, rebaseRevisionMetadataFromInfo, intoDelta, relevantRemovedRoots, updateRefreshers, } from "./modularChangeFamily.js";
|
|
13
|
+
export { ModularChangeFamily, ModularEditBuilder, rebaseRevisionMetadataFromInfo, intoDelta, relevantRemovedRoots, getBuildIds, updateRefreshers, } from "./modularChangeFamily.js";
|
|
14
14
|
export { makeModularChangeCodecFamily } from "./modularChangeCodecs.js";
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,kCAAkC,EAClC,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAON,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAyB,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAQN,+BAA+B,EAG/B,eAAe,GAGf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAYN,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACN,mBAAmB,EACnB,kBAAkB,EAIlB,8BAA8B,EAC9B,SAAS,EACT,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tallowsRepoSuperset,\n\tallowsTreeSchemaIdentifierSuperset,\n\tallowsFieldSuperset,\n\tallowsTreeSuperset,\n\tallowsMultiplicitySuperset,\n} from \"./comparison.js\";\nexport { isNeverField, isNeverTree } from \"./isNeverTree.js\";\nexport {\n\ttype InvertNodeManager,\n\ttype RebaseNodeManager,\n\ttype ComposeNodeManager,\n\ttype CrossFieldMap,\n\ttype CrossFieldQuerySet,\n\ttype DetachedNodeEntry,\n\tCrossFieldTarget,\n\tsetInCrossFieldMap,\n} from \"./crossFieldQueries.js\";\nexport {\n\tChangesetLocalIdSchema,\n\tEncodedChangeAtomId,\n\tEncodedRevisionInfo,\n\tEncodedModularChangeset,\n\tEncodedNodeChangeset,\n} from \"./modularChangeFormatV1.js\";\nexport { FlexFieldKind, type FullSchemaPolicy } from \"./fieldKind.js\";\nexport {\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\treferenceFreeFieldChangeRebaser,\n\ttype RebaseRevisionMetadata,\n\ttype ToDelta,\n\tNodeAttachState,\n\ttype FieldChangeEncodingContext,\n\ttype NestedChangesIndices,\n} from \"./fieldChangeHandler.js\";\nexport {\n\ttype CrossFieldKey,\n\ttype CrossFieldKeyRange,\n\ttype FieldChange,\n\ttype FieldChangeMap,\n\ttype FieldChangeset,\n\ttype HasFieldChanges,\n\ttype ModularChangeset,\n\ttype NodeExistsConstraint,\n\ttype NodeId,\n\ttype ChangeAtomIdBTree,\n\ttype RebaseVersion,\n\tgetFromChangeAtomIdMap,\n\tsetInChangeAtomIdMap,\n\trangeQueryChangeAtomIdMap,\n} from \"./modularChangeTypes.js\";\nexport {\n\tconvertGenericChange,\n\tgenericChangeHandler,\n\tgenericFieldKind,\n} from \"./genericFieldKind.js\";\nexport type { GenericChangeset } from \"./genericFieldKindTypes.js\";\nexport {\n\tModularChangeFamily,\n\tModularEditBuilder,\n\ttype EditDescription,\n\ttype GlobalEditDescription,\n\ttype FieldEditDescription,\n\trebaseRevisionMetadataFromInfo,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tupdateRefreshers,\n} from \"./modularChangeFamily.js\";\nexport { makeModularChangeCodecFamily } from \"./modularChangeCodecs.js\";\nexport type {\n\tFieldKindConfiguration,\n\tFieldKindConfigurationEntry,\n} from \"./fieldKindConfiguration.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,kCAAkC,EAClC,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAON,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAyB,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAQN,+BAA+B,EAG/B,eAAe,GAGf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAYN,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACN,mBAAmB,EACnB,kBAAkB,EAIlB,8BAA8B,EAC9B,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,gBAAgB,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tallowsRepoSuperset,\n\tallowsTreeSchemaIdentifierSuperset,\n\tallowsFieldSuperset,\n\tallowsTreeSuperset,\n\tallowsMultiplicitySuperset,\n} from \"./comparison.js\";\nexport { isNeverField, isNeverTree } from \"./isNeverTree.js\";\nexport {\n\ttype InvertNodeManager,\n\ttype RebaseNodeManager,\n\ttype ComposeNodeManager,\n\ttype CrossFieldMap,\n\ttype CrossFieldQuerySet,\n\ttype DetachedNodeEntry,\n\tCrossFieldTarget,\n\tsetInCrossFieldMap,\n} from \"./crossFieldQueries.js\";\nexport {\n\tChangesetLocalIdSchema,\n\tEncodedChangeAtomId,\n\tEncodedRevisionInfo,\n\tEncodedModularChangeset,\n\tEncodedNodeChangeset,\n} from \"./modularChangeFormatV1.js\";\nexport { FlexFieldKind, type FullSchemaPolicy } from \"./fieldKind.js\";\nexport {\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\treferenceFreeFieldChangeRebaser,\n\ttype RebaseRevisionMetadata,\n\ttype ToDelta,\n\tNodeAttachState,\n\ttype FieldChangeEncodingContext,\n\ttype NestedChangesIndices,\n} from \"./fieldChangeHandler.js\";\nexport {\n\ttype CrossFieldKey,\n\ttype CrossFieldKeyRange,\n\ttype FieldChange,\n\ttype FieldChangeMap,\n\ttype FieldChangeset,\n\ttype HasFieldChanges,\n\ttype ModularChangeset,\n\ttype NodeExistsConstraint,\n\ttype NodeId,\n\ttype ChangeAtomIdBTree,\n\ttype RebaseVersion,\n\tgetFromChangeAtomIdMap,\n\tsetInChangeAtomIdMap,\n\trangeQueryChangeAtomIdMap,\n} from \"./modularChangeTypes.js\";\nexport {\n\tconvertGenericChange,\n\tgenericChangeHandler,\n\tgenericFieldKind,\n} from \"./genericFieldKind.js\";\nexport type { GenericChangeset } from \"./genericFieldKindTypes.js\";\nexport {\n\tModularChangeFamily,\n\tModularEditBuilder,\n\ttype EditDescription,\n\ttype GlobalEditDescription,\n\ttype FieldEditDescription,\n\trebaseRevisionMetadataFromInfo,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tgetBuildIds,\n\tupdateRefreshers,\n} from \"./modularChangeFamily.js\";\nexport { makeModularChangeCodecFamily } from \"./modularChangeCodecs.js\";\nexport type {\n\tFieldKindConfiguration,\n\tFieldKindConfigurationEntry,\n} from \"./fieldKindConfiguration.js\";\n"]}
|
|
@@ -136,6 +136,7 @@ export declare class ModularChangeFamily implements ChangeFamily<ModularEditBuil
|
|
|
136
136
|
* @param fieldKinds - The field kinds to delegate to.
|
|
137
137
|
*/
|
|
138
138
|
export declare function relevantRemovedRoots(change: ModularChangeset, fieldKinds: ReadonlyMap<FieldKindIdentifier, FlexFieldKind>): Iterable<DeltaDetachedNodeId>;
|
|
139
|
+
export declare function getBuildIds(change: ModularChangeset): Iterable<DeltaDetachedNodeId>;
|
|
139
140
|
/**
|
|
140
141
|
* Adds any refreshers missing from the provided change that are relevant to the change and
|
|
141
142
|
* removes any refreshers from the provided change that are not relevant to the change.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modularChangeFamily.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAGrB,KAAK,mBAAmB,EAGxB,KAAK,SAAS,EACd,WAAW,EACX,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,YAAY,EAKjB,KAAK,YAAY,EAWjB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAI1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,KAAK,WAAW,EAKhB,KAAK,gBAAgB,EASrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAY5D,OAAO,EACN,KAAK,kBAAkB,EAEvB,KAAK,sBAAsB,EAC3B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACN,KAAK,iBAAiB,EAGtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAEvB,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,OAAO,EAEZ,KAAK,gBAAgB,EAErB,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,YAAY,EAGjB,KAAK,aAAa,EAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE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AE,MAAM,GACX,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAEvC;AAED,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,kBAAkB,EACzB,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,MAAM,GACX,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAEvC;AAED,wBAAgB,aAAa,CAC5B,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,OAAO,GAAG,SAAS,GACjC,IAAI,CA2BN"}
|
|
1
|
+
{"version":3,"file":"modularChangeFamily.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/modular-schema/modularChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAGrB,KAAK,mBAAmB,EAGxB,KAAK,SAAS,EACd,WAAW,EACX,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,YAAY,EAKjB,KAAK,YAAY,EAWjB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAI1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,KAAK,WAAW,EAKhB,KAAK,gBAAgB,EASrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAY5D,OAAO,EACN,KAAK,kBAAkB,EAEvB,KAAK,sBAAsB,EAC3B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACN,KAAK,iBAAiB,EAGtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAEvB,KAAK,WAA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EG;AACH,wBAAgB,eAAe,CAC9B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,iBAAiB,CAAC,MAAM,CAAC,GACpC,MAAM,CAuBR;AA0DD,wBAAgB,YAAY,IAAI,aAAa,CAQ5C;AAqYD,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CAQlE;AA2GD,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,kBAAkB,EACzB,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,MAAM,GACX,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAEvC;AAED,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,kBAAkB,EACzB,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,MAAM,GACX,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAEvC;AAED,wBAAgB,aAAa,CAC5B,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,OAAO,GAAG,SAAS,GACjC,IAAI,CA2BN"}
|
|
@@ -1116,6 +1116,13 @@ export function* relevantRemovedRoots(change, fieldKinds) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
+
export function* getBuildIds(change) {
|
|
1120
|
+
if (change.builds !== undefined) {
|
|
1121
|
+
for (const [[revision, localId]] of change.builds.entries()) {
|
|
1122
|
+
yield makeDetachedNodeId(revision, localId);
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1119
1126
|
function addAttachesToSet(change, rootIds) {
|
|
1120
1127
|
// This includes each attach which does not have a corresponding detach.
|
|
1121
1128
|
for (const entry of change.crossFieldKeys.entries()) {
|