linked-rolls 0.33.0 → 0.34.0
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/lib/reservations.d.ts +1 -1
- package/lib/reservations.js +15 -2
- package/package.json +1 -1
package/lib/reservations.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface Reservation<T extends string = ReservationType> {
|
|
|
24
24
|
* the measurement leaves open, then who holds it.
|
|
25
25
|
*/
|
|
26
26
|
export declare const reservationsAbout: (copy: RollCopy) => Reservation[];
|
|
27
|
-
export declare const versionReservationTypes: readonly ['text-not-stated', 'witnessed-by-statement-only'];
|
|
27
|
+
export declare const versionReservationTypes: readonly ['text-not-stated', 'witnessed-by-statement-only', 'no-direct-witness'];
|
|
28
28
|
export type VersionReservationType = typeof versionReservationTypes[number];
|
|
29
29
|
/** What the edition cannot vouch for in a version, in the order the checks are listed. */
|
|
30
30
|
export declare const reservationsAboutVersion: (view: EditionView, version: Readonly<Version>) => Reservation<VersionReservationType>[];
|
package/lib/reservations.js
CHANGED
|
@@ -102,7 +102,8 @@ const checks = [
|
|
|
102
102
|
export const reservationsAbout = (copy) => checks.flatMap(check => check(copy) ?? []);
|
|
103
103
|
export const versionReservationTypes = [
|
|
104
104
|
'text-not-stated',
|
|
105
|
-
'witnessed-by-statement-only'
|
|
105
|
+
'witnessed-by-statement-only',
|
|
106
|
+
'no-direct-witness'
|
|
106
107
|
];
|
|
107
108
|
const textStated = (_view, version) => version.edits ? undefined : {
|
|
108
109
|
type: 'text-not-stated',
|
|
@@ -115,6 +116,18 @@ const witnessedByFeatures = (view, version) => {
|
|
|
115
116
|
note: 'No copy\'s features carry what the version inserts; only copies that state they carry it bear witness to it.'
|
|
116
117
|
} : undefined;
|
|
117
118
|
};
|
|
118
|
-
|
|
119
|
+
/**
|
|
120
|
+
* A version every copy reaches only through a version derived from it.
|
|
121
|
+
* Its text is a reconstruction from below, as a lost state's is, and
|
|
122
|
+
* nothing surviving shows it as it stood.
|
|
123
|
+
*/
|
|
124
|
+
const witnessedAtFirstHand = (view, version) => {
|
|
125
|
+
const carriers = witnessesOf(view, version.id).filter(({ by }) => by === 'carriers');
|
|
126
|
+
return carriers.length > 0 && carriers.every(({ through }) => through !== undefined) ? {
|
|
127
|
+
type: 'no-direct-witness',
|
|
128
|
+
note: 'No copy carries it at first hand; it is attested only through the versions derived from it.'
|
|
129
|
+
} : undefined;
|
|
130
|
+
};
|
|
131
|
+
const versionChecks = [textStated, witnessedByFeatures, witnessedAtFirstHand];
|
|
119
132
|
/** What the edition cannot vouch for in a version, in the order the checks are listed. */
|
|
120
133
|
export const reservationsAboutVersion = (view, version) => versionChecks.flatMap(check => check(view, version) ?? []);
|
package/package.json
CHANGED