import { Belief, Certainty } from "../model/Assumption.js"; import { Edition } from "../model/Edition.js"; /** * How a copy bears witness to a version: its features carry what the * version inserts (`carriers`), or it states that it carries the * version (`statement`). * @category Analysis */ export type WitnessBy = 'carriers' | 'statement'; /** * A copy that bears witness to a version, and how. * @category Analysis */ export interface Witness { /** The copy, by id. */ copy: string; /** Whether the copy's features carry what the version inserts, or the copy states that it carries the version. */ by: WitnessBy; /** * The later version this copy reaches the version through, where its * features carry what a version derived from this one inserts. It then * attests the text only as that later version passed it on. A copy * that bears witness at first hand names none. */ through?: string; /** How certainly a statement is held. Carriage through features is no statement and holds none. */ certainty?: Certainty; /** The belief a statement rests on, where it states one. */ belief?: Belief; } /** * The versions a copy's features carry at first hand: for every copy, * the latest state it bears. A version left out is reached only through * the versions derived from it, or is attested by statement alone, and * its text is a reconstruction rather than a reading. * @category Analysis */ export declare const attestedVersions: (edition: Edition) => ReadonlySet; /** * The copies that bear witness to the version: those whose features carry * a symbol the version's own edits insert, and those that state they carry * it, with the certainty each statement is held with. * * What a version inherits is carried by nearly every copy of the roll, so * only what it inserts tells its witnesses apart from its ancestors'. Its * insertions are in turn inherited downwards, and the copies of the * versions derived from it carry them as well. Those bear witness to it * only through the latest state they carry, which `through` names; a copy * carrying nothing a later version inserts speaks for the version at first * hand. A version no copy attests at first hand survives, as a lost state * does, in what its descendants passed on. * * A statement is the editor's own about the version it names and is * reported as it stands. A version whose edits are not stated inserts * nothing and is witnessed by statement alone. * @category Analysis */ export declare const witnessesOf: (edition: Edition, versionId: string) => Witness[]; /** * The versions the copy bears witness to, each with how, in the order the * edition lists its versions. * @category Analysis */ export declare const versionsWitnessedBy: (edition: Edition, copyId: string) => (Witness & { version: string; })[]; /** * A copy's statement that it carries a version, where the statement * cannot stand (`carriageProblems`): it is made beside features that * carry symbols, or it names a version the edition lacks. * @category Analysis */ export type CarriageProblem = { copy: string; version: string; problem: 'stated-beside-carriers' | 'version-missing'; }; /** * Where a copy's statement that it carries a version cannot stand: one * made although the copy's features carry symbols, which say by * themselves what it carries, and one naming a version the edition lacks. * @category Analysis */ export declare const carriageProblems: (edition: Edition) => CarriageProblem[];