/** Operations on the copies: adding and aligning them, and what they state of their source, their carriage and their condition. */ import { Draft } from "immer"; import { Edition } from "../model/Edition.js"; import { AnySymbol } from "../model/Symbol.js"; import { Alignment, GeneralRollCondition, PaperStretch, RollCopy, Tear } from "../model/RollCopy.js"; import { FeatureSource } from "../model/FeatureSource.js"; import { Belief, ObjectAssumption, ReferenceAssumption } from "../model/Assumption.js"; import { Millimeters } from "../model/Quantity.js"; import { EditionOp } from "./draft.js"; /** * Puts the copy into the edition with a version of its own, which * inserts every symbol the copy's own tracker bar reads on it. The * version is a reading in that system's words, so it is coded for the * system the copy was cut for. * @category Operations */ export declare const createVersion: (copy: RollCopy) => EditionOp; /** * Puts the copy into the edition without a version of its own, as for a * copy whose features are not read into symbols: one known only from a * recording states instead which versions it carries. * @category Operations */ export declare const addCopy: (copy: RollCopy) => EditionOp; /** * What aligning the copy with the reference copy finds, or nothing * where the two share no run of notes, where there is no reference * copy, or where the copy is the reference itself. The copy is read at * its own places whatever alignment it has, and through its own bar, * which is what lets a copy cut for another system be aligned at all. * @category Operations */ export declare const alignmentFor: (edition: Edition, copy: RollCopy, date?: Date) => Alignment | undefined; /** * Aligns the copy with the edition's reference copy: finds the shift * and scale that carry its notes onto the reference copy's, and puts * its features and tears onto the axis by them, in place of any * alignment it had. A copy that shares no run of notes with the * reference copy is left as it was. * @category Operations */ export declare const alignCopy: (copyId: string, date?: Date) => EditionOp; /** * Aligns every copy that has features with the reference copy, as * `alignCopy` does one. The reference copy itself is taken off any * alignment it had, its places being the axis. * @category Operations */ export declare const alignCopies: (date?: Date) => EditionOp; /** * Makes the copy the one whose millimetres are the edition's axis, and * aligns every other copy onto it. Every place the edition gives along * the roll moves with this, which is why it is a choice and not * something worked out. * @category Operations */ export declare const chooseReferenceCopy: (copyId: string, date?: Date) => EditionOp; /** * Puts the copy's features back where they were measured, off the * axis. What the alignments say about the paper goes with it, since * that is worked out from them. * @category Operations */ export declare const unalignCopy: (copyId: string) => EditionOp; /** * Takes the extension a pneumatic reader adds off the ends of the * copy's chains of holes, and records how much was taken, so that their lengths * can be compared with a scanned copy's at all. * @category Operations */ export declare const shortenCopy: (copyId: string, extension: Millimeters, leaving?: ReadonlySet) => EditionOp; /** * Puts the reader's extension back on the copy's chains of holes. * @category Operations */ export declare const unshortenCopy: (copyId: string) => EditionOp; /** * States what the copy's features were read from, in place of any earlier statement. * @category Operations */ export declare const stateSource: (copyId: string, source: FeatureSource) => EditionOp; /** * Takes back the statement, leaving the copy silent about its source again. * @category Operations */ export declare const clearSource: (copyId: string) => EditionOp; /** * Gives the copy the siglum it is referred to by, or takes it away where the siglum given is blank. * @category Operations */ export declare const nameCopy: (copyId: string, siglum: string) => EditionOp; /** Takes out the copy's statements that match, and the list itself where none is left. */ export declare const dropStatements: (copy: Draft, matches: (statement: Readonly) => boolean) => void; /** * States that the copy carries the version, under the belief given. It * is meant for a copy whose features are not read into symbols, such as * one known only from a recording, and `carriageProblems` reports it * where features carry symbols already. A second statement about one * version is none. * @category Operations */ export declare const stateCarriage: (copyId: string, versionId: string, belief?: Belief) => EditionOp; /** * Takes back the copy's statement that it carries the version. * @category Operations */ export declare const clearCarriage: (copyId: string, versionId: string) => EditionOp; /** * Adds a general condition to the copy, beside whatever is stated of it * already. A paper stretch is added the same way, where one was * measured; what the alignments say of the paper is worked out from * them and stated nowhere. * @category Operations */ export declare const addGeneralCondition: (copyId: string, condition: ObjectAssumption) => EditionOp; /** * States what the copy's paper was measured to have done, in place of * what was stated before; given nothing, it takes the statement away. A * copy has one paper, so it has one such condition, which may give a * strain in either direction. * @category Operations */ export declare const statePaperStretch: (copyId: string, stretch?: ObjectAssumption) => EditionOp; /** * Adds a tear to the copy, beside whatever is stated of it already. The * tear is given on the axis, where the copy's features stand, and moves * with them from then on. * @category Operations */ export declare const addTear: (copyId: string, tear: ObjectAssumption) => EditionOp; /** * The symbols of the versions that no other copy carries. * @category Operations */ export declare const symbolsCarriedOnlyBy: (edition: Edition, copyId: string) => AnySymbol[]; /** * Takes the copy out of the edition together with the symbols only it * carries, and with every reference the versions and the argumentations * made to those symbols. * @category Operations */ export declare const removeCopy: (copyId: string) => EditionOp;