import { CollationTolerance } from "../collation/Collation.js"; import { ObjectAssumption } from "../model/Assumption.js"; import { EditionOp } from "./draft.js"; /** * Bases the child on the parent. A symbol of the child that collates * with one the parent hands down adds its carriers to that symbol; the * rest become the child's insertions, and what the parent hands down * and the child lacks becomes its deletions. The derivation states the * tolerance it was collated at and becomes the principal one; the * hypotheses the child stated beside its former one stay. * * The edits the child already stated are rewritten only as far as they * are the program's (`isCollationsOwn`). An editor's reading of the * difference between the two texts stays, and the symbols it speaks for * are left out of the collation, so that connecting the two again * neither doubles them nor silently drops what somebody established by * hand. An equivalence is the collation's own, since it is drawn from * the two systems' vocabularies rather than read off the paper, but one * drawn again over the very same symbols is kept as it stands, with its * identifier and whatever was written on it. An insertion or deletion * drawn anew has the motivation its shape calls for * (`motivationProposedFor`): the generic musical one, or the technical * one, which an equivalence drawn anew always has. * * The child's own text is what it shows less what the parent hands * down, so that connecting two versions already connected collates the * child's symbols and not the parent's with themselves. * * A version is based on itself or on one of its own descendants in no * statement, since the stemma would loop; asked for that, nothing * changes. * @category Operations */ export declare const connectVersions: (childId: string, parentId: string, tolerance?: ObjectAssumption) => EditionOp; /** * Folds the version's own symbols into those it inherits and collates * with: the carriers pass over, and the insertions go. Collates at the * tolerance of the derivation, where the caller names none. * @category Operations */ export declare const collateSymbols: (versionId: string, symbolIds: readonly string[], tolerance?: CollationTolerance) => EditionOp; /** * Takes the named copies' reading of a symbol back out of the symbol it * was collated into: their carriers pass to a new symbol of the * version's own, the remaining copies keep the symbol they had, and the * version states the exchange, with the motivation its shape calls for * (`motivationProposedFor`) where the version derives from another. * * This is the inverse of the hand-over a collation makes, and it is * what lets a derivation be collated a second time. A collated symbol * is one symbol carrying every copy that reads it, so nothing else * takes the two readings apart again, and without that a tolerance * arrived at after the fact could never be applied. * * The copies named are one **side** of the derivation, the same side a * window is measured over, and `sidesOf` is what says which they are. * Naming one copy of a side that has several does not separate that * side: what stays behind is the rest of it, mixed with the other * side's copies, and a collation then compares one copy against that * mixture rather than the two texts against each other. * * Symbols the named copies alone carry are already the version's own * and are passed over, so a reading somebody has separated by hand * keeps its identifier and the edit that speaks for it. Named symbols * narrow the act to those; naming none separates the whole reading. * @category Operations */ export declare const separateReadings: (versionId: string, copies: ReadonlySet, symbolIds?: readonly string[]) => EditionOp;