import { Edition } from "../model/Edition.js"; import { Version } from "../model/Version.js"; import { EditionOp } from "../ops/draft.js"; import { StemmaProposal, Unpinned } from "./proposal.js"; /** * What adopting a proposal makes of the stemma: the versions it puts in * place of the edition's, and what of the edition it leaves out. * @category Filiation */ export interface Adoption { versions: Version[]; /** By version of the proposal, the id of the version it becomes. */ ids: Record; /** The versions of the edition the adoption leaves out. */ removed: string[]; /** The edits the editor wrote that the adoption leaves out, and why. */ dropped: Unpinned[]; /** * The published rules the proposal follows, as far as its costs and * settings carry them out, which the edition's creation comes to * name among its principles. */ principles: string[]; } /** * What adopting the proposal makes of the edition's stemma, worked out * without changing it, so that it can be looked at first. * * A version of the proposal that stands for a version of the edition * keeps its id, system, creation and motivations, the derivation it * states where it still derives from the same version, and its other * derivations, the hypotheses, as long as they name a version that is * still there and does not derive from it. Its edits are the proposal's: * the edits the editor wrote that the proposal keeps, as they are, and * one edit for each further reading it inserts or deletes, or for each * recoding. An edit the version stated before over the very same * readings is taken over with its id and what was written on it, the * kind of change it states among it, which the editor may have said * otherwise than the program read it; the others are new. An edit that * states no kind has the motivation the shape of the change calls for * (`motivationProposedFor`): the generic musical one, whose reason is * left to the editor, or the technical one, which a recoding always has. * The edits of the root state its text, and no kind of change. * * A reading that stands for a symbol of the edition keeps that symbol's * id and whatever it states beside its carriers. A version of the edition * nothing stands for goes, unless it states no edits and derives from a * version that stays, as a version known only from a recording does. * * What the program concluded is stated plainly, as an edition states its * stemma. A derivation the editor holds under a belief of their own * stays as it is, and so does every edit that says why it was made. * @category Filiation */ export declare const adoptionOf: (edition: Edition, proposal: StemmaProposal) => Adoption; /** * Puts the proposed stemma in place of the edition's, as `adoptionOf` * describes, and takes back a copy's statement that it carries a * version that goes. The edition's creation comes to name the rules the * proposal follows among its principles, in place of those of the * stemma it no longer follows, and this release of the library among its * software, which finds the stemma again with the defaults it has. One * operation, and so one undo step. * @category Operations */ export declare const adoptStemma: (proposal: StemmaProposal) => EditionOp;