linked-rolls 0.44.0 → 0.46.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/README.md +17 -2
- package/lib/Agent.d.ts +1 -1
- package/lib/Assumption.d.ts +2 -2
- package/lib/Collation.d.ts +15 -8
- package/lib/Collation.js +4 -4
- package/lib/ConditionState.d.ts +1 -1
- package/lib/Edit.d.ts +3 -3
- package/lib/Edition.d.ts +6 -6
- package/lib/EditionView.d.ts +8 -8
- package/lib/EditionView.js +6 -6
- package/lib/Emulation.d.ts +4 -4
- package/lib/Emulation.js +3 -3
- package/lib/Feature.d.ts +5 -5
- package/lib/FeatureSource.d.ts +4 -4
- package/lib/ReproducingSystem.d.ts +4 -4
- package/lib/RollCopy.d.ts +10 -10
- package/lib/RollCopy.js +4 -4
- package/lib/Symbol.d.ts +2 -2
- package/lib/Symbol.js +1 -1
- package/lib/TrackCalibration.d.ts +1 -1
- package/lib/TrackCalibration.js +1 -1
- package/lib/TrackerBar.d.ts +3 -3
- package/lib/TrackerBar.js +1 -1
- package/lib/Version.d.ts +6 -6
- package/lib/Version.js +2 -2
- package/lib/alignment.d.ts +4 -4
- package/lib/alignment.js +3 -3
- package/lib/asJsonLd.d.ts +1 -1
- package/lib/asJsonLd.js +3 -3
- package/lib/constraints.d.ts +1 -1
- package/lib/constraints.js +5 -5
- package/lib/context.js +4 -4
- package/lib/editionOps.d.ts +9 -9
- package/lib/editionOps.js +12 -12
- package/lib/importJsonLd.d.ts +1 -1
- package/lib/importJsonLd.js +3 -3
- package/lib/index.d.ts +42 -42
- package/lib/index.js +42 -42
- package/lib/migrate.js +6 -6
- package/lib/procedures.d.ts +1 -1
- package/lib/readers/phillipsEroll.d.ts +3 -3
- package/lib/readers/phillipsEroll.js +5 -5
- package/lib/readers/spencerBar.d.ts +2 -2
- package/lib/readers/spencerBar.js +3 -3
- package/lib/readers/stanfordAton.d.ts +3 -3
- package/lib/readers/stanfordAton.js +4 -4
- package/lib/reservations.d.ts +3 -3
- package/lib/reservations.js +4 -4
- package/lib/scatter.d.ts +122 -14
- package/lib/scatter.js +104 -12
- package/lib/schema.json +4 -4
- package/lib/sigla.d.ts +1 -1
- package/lib/sigla.js +4 -4
- package/lib/statistics.d.ts +1 -1
- package/lib/statistics.js +1 -1
- package/lib/substitution.d.ts +5 -5
- package/lib/substitution.js +2 -2
- package/lib/systems/index.d.ts +2 -2
- package/lib/systems/index.js +4 -4
- package/lib/systems/welteLicensee/bar.d.ts +1 -1
- package/lib/systems/welteLicensee/bar.js +2 -2
- package/lib/systems/welteLicensee/system.d.ts +2 -2
- package/lib/systems/welteLicensee/system.js +3 -3
- package/lib/systems/welteT100/bar.d.ts +1 -1
- package/lib/systems/welteT100/bar.js +2 -2
- package/lib/systems/welteT100/system.d.ts +4 -4
- package/lib/systems/welteT100/system.js +4 -4
- package/lib/systems/welteT98/bar.d.ts +1 -1
- package/lib/systems/welteT98/bar.js +2 -2
- package/lib/systems/welteT98/system.d.ts +4 -4
- package/lib/systems/welteT98/system.js +4 -4
- package/lib/validate.d.ts +1 -1
- package/lib/validate.js +1 -1
- package/lib/vocabulary.d.ts +1 -1
- package/lib/vocabulary.js +3 -3
- package/lib/witnesses.d.ts +2 -2
- package/lib/witnesses.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,14 +100,29 @@ displacements an editor is looking for are in the sample, and a
|
|
|
100
100
|
standard deviation would grow towards them until they no longer stood
|
|
101
101
|
out.
|
|
102
102
|
|
|
103
|
+
The copies named are one **side** of the comparison and the rest are
|
|
104
|
+
the other, so which copies to name is the first question and the
|
|
105
|
+
edition no longer answers it: a collation hands a child's carriers up
|
|
106
|
+
to the parent's symbols, so a descendant's copies come to bear an
|
|
107
|
+
ancestor's readings and look like its own. `sidesOf` reads the sides
|
|
108
|
+
off the edits instead, the copies bearing what a version inserts
|
|
109
|
+
standing for the reading it moves to and those bearing what it strikes
|
|
110
|
+
for the reading it moves from. Naming a set that is not a side measures
|
|
111
|
+
one copy's noise against a mixture of both sides, which is wider than
|
|
112
|
+
the truth.
|
|
113
|
+
|
|
103
114
|
The tolerance that follows is the scatter times a threshold fixed by
|
|
104
115
|
the size of the sample, the point beyond which fewer than one reading
|
|
105
116
|
is expected to fall by chance (`departureThreshold`). For the few
|
|
106
117
|
hundred readings an edge of a stemma yields this lands a little above
|
|
107
118
|
three. `toleranceAcross` covers several samples with one window, since
|
|
108
119
|
a derivation states one tolerance while notes and expressions scatter
|
|
109
|
-
differently
|
|
110
|
-
|
|
120
|
+
differently. It asks which side was measured, because a window is
|
|
121
|
+
signed: the offset runs from the parent to the child, and one stored
|
|
122
|
+
the other way round has the right width and the wrong centre, so it
|
|
123
|
+
separates readings that belong together and merges readings that do
|
|
124
|
+
not while nothing in the number looks wrong. `inferredTolerance` builds
|
|
125
|
+
the belief the number rests on, to annotate `collationTolerance` with. It is held likely and not
|
|
111
126
|
true: the tolerance follows from the sample only as far as the sample
|
|
112
127
|
is normal, which is what the reported excess kurtosis and tail counts
|
|
113
128
|
are there to show.
|
package/lib/Agent.d.ts
CHANGED
package/lib/Assumption.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WithNote, WithId } from "./utils";
|
|
2
|
-
import { Person, WithActor } from "./Agent";
|
|
1
|
+
import { WithNote, WithId } from "./utils.js";
|
|
2
|
+
import { Person, WithActor } from "./Agent.js";
|
|
3
3
|
export declare const certainties: readonly ['true', 'likely', 'possible', 'unlikely', 'false'];
|
|
4
4
|
/**
|
|
5
5
|
* Certainty levels for beliefs, ranging from 'true' to 'false'
|
package/lib/Collation.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Edit } from "./Edit";
|
|
2
|
-
import { HorizontalSpan } from "./Feature";
|
|
3
|
-
import { AnySymbol } from "./Symbol";
|
|
4
|
-
import { Millimeters } from "./Quantity";
|
|
1
|
+
import { Edit } from "./Edit.js";
|
|
2
|
+
import { HorizontalSpan } from "./Feature.js";
|
|
3
|
+
import { AnySymbol } from "./Symbol.js";
|
|
4
|
+
import { Millimeters } from "./Quantity.js";
|
|
5
5
|
/** A value taken at each end of a feature: where it begins and where it stops. */
|
|
6
6
|
export interface BothEnds<T> {
|
|
7
7
|
from: T;
|
|
@@ -28,12 +28,19 @@ export interface CollationTolerance {
|
|
|
28
28
|
/** How far they may lie apart at the end, measured from `offsetEnd`. */
|
|
29
29
|
toleranceEnd: Millimeters;
|
|
30
30
|
/**
|
|
31
|
-
* How much later the
|
|
32
|
-
* the
|
|
33
|
-
* Nothing where they do not.
|
|
31
|
+
* How much later the derived version puts the start of a feature
|
|
32
|
+
* than the version it is read against, where the two differ
|
|
33
|
+
* systematically. Nothing where they do not.
|
|
34
|
+
*
|
|
35
|
+
* The direction is the one a collation measures in, the child less
|
|
36
|
+
* the parent, and it is not symmetric: stored the other way round
|
|
37
|
+
* the window sits on the wrong side of the readings and merges what
|
|
38
|
+
* it should separate. A measurement taken over the parent's copies
|
|
39
|
+
* gives the negative of this, which is what `toleranceAcross` asks
|
|
40
|
+
* the side for.
|
|
34
41
|
*/
|
|
35
42
|
offsetStart?: Millimeters;
|
|
36
|
-
/** The same at the end of a feature. */
|
|
43
|
+
/** The same at the end of a feature, in the same direction. */
|
|
37
44
|
offsetEnd?: Millimeters;
|
|
38
45
|
}
|
|
39
46
|
export declare const defaultCollationTolerance: CollationTolerance;
|
package/lib/Collation.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { keyOf } from "./TrackerBar";
|
|
2
|
-
import { distance, mm } from "./Quantity";
|
|
3
|
-
import { partitionPoint } from "./sorted";
|
|
4
|
-
import { groupBy } from "./utils";
|
|
1
|
+
import { keyOf } from "./TrackerBar.js";
|
|
2
|
+
import { distance, mm } from "./Quantity.js";
|
|
3
|
+
import { partitionPoint } from "./sorted.js";
|
|
4
|
+
import { groupBy } from "./utils.js";
|
|
5
5
|
export const defaultCollationTolerance = { toleranceStart: mm(5), toleranceEnd: mm(5) };
|
|
6
6
|
/** Where the window is centred at the start of a feature, on nothing where it names no offset. */
|
|
7
7
|
export const offsetStartOf = (tolerance) => tolerance.offsetStart ?? mm(0);
|
package/lib/ConditionState.d.ts
CHANGED
package/lib/Edit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Assumption } from "./Assumption";
|
|
2
|
-
import { AnySymbol } from "./Symbol";
|
|
3
|
-
import { WithId } from "./utils";
|
|
1
|
+
import { Assumption } from "./Assumption.js";
|
|
2
|
+
import { AnySymbol } from "./Symbol.js";
|
|
3
|
+
import { WithId } from "./utils.js";
|
|
4
4
|
export declare const editTypes: readonly [
|
|
5
5
|
/**
|
|
6
6
|
* An additional accent that can only be encoded with
|
package/lib/Edition.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { RollCopy } from "./RollCopy";
|
|
2
|
-
import { Version } from "./Version";
|
|
3
|
-
import { CollationTolerance } from "./Collation";
|
|
4
|
-
import { DateAssignment, ObjectAssumption } from "./Assumption";
|
|
5
|
-
import { Editor, Person, Place } from "./Agent";
|
|
6
|
-
import { RollTempo } from "./ReproducingSystem";
|
|
1
|
+
import { RollCopy } from "./RollCopy.js";
|
|
2
|
+
import { Version } from "./Version.js";
|
|
3
|
+
import { CollationTolerance } from "./Collation.js";
|
|
4
|
+
import { DateAssignment, ObjectAssumption } from "./Assumption.js";
|
|
5
|
+
import { Editor, Person, Place } from "./Agent.js";
|
|
6
|
+
import { RollTempo } from "./ReproducingSystem.js";
|
|
7
7
|
/**
|
|
8
8
|
* This type describes the creation of an edition,
|
|
9
9
|
* i.e. the editor, publisher, and publication date.
|
package/lib/EditionView.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Edition } from "./Edition";
|
|
2
|
-
import { HorizontalSpan, FeatureOrPatch } from "./Feature";
|
|
3
|
-
import { AnySymbol, Expression, Note } from "./Symbol";
|
|
4
|
-
import { Version } from "./Version";
|
|
5
|
-
import { NegotiatedEvent } from "./ReproducingSystem";
|
|
6
|
-
import { TrackerBar } from "./TrackerBar";
|
|
7
|
-
import { Modification, ProductionEvent, RollCopy } from "./RollCopy";
|
|
8
|
-
import { Millimeters } from "./Quantity";
|
|
1
|
+
import { Edition } from "./Edition.js";
|
|
2
|
+
import { HorizontalSpan, FeatureOrPatch } from "./Feature.js";
|
|
3
|
+
import { AnySymbol, Expression, Note } from "./Symbol.js";
|
|
4
|
+
import { Version } from "./Version.js";
|
|
5
|
+
import { NegotiatedEvent } from "./ReproducingSystem.js";
|
|
6
|
+
import { TrackerBar } from "./TrackerBar.js";
|
|
7
|
+
import { Modification, ProductionEvent, RollCopy } from "./RollCopy.js";
|
|
8
|
+
import { Millimeters } from "./Quantity.js";
|
|
9
9
|
export type Path = (string | number)[];
|
|
10
10
|
export declare const getAt: <T>(path: Path, obj: unknown) => T | undefined;
|
|
11
11
|
export declare class EditionView {
|
package/lib/EditionView.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { withBorneFeatures } from "./Feature";
|
|
2
|
-
import { deletedBy, insertedBy, principalDerivationOf } from "./Version";
|
|
3
|
-
import { systemIdOf } from "./TrackerBar";
|
|
4
|
-
import { featuresMadeBy, featuresOf, isPaperStretch } from "./RollCopy";
|
|
5
|
-
import { idOf, idsOf } from "./Assumption";
|
|
6
|
-
import { mean } from "./Quantity";
|
|
1
|
+
import { withBorneFeatures } from "./Feature.js";
|
|
2
|
+
import { deletedBy, insertedBy, principalDerivationOf } from "./Version.js";
|
|
3
|
+
import { systemIdOf } from "./TrackerBar.js";
|
|
4
|
+
import { featuresMadeBy, featuresOf, isPaperStretch } from "./RollCopy.js";
|
|
5
|
+
import { idOf, idsOf } from "./Assumption.js";
|
|
6
|
+
import { mean } from "./Quantity.js";
|
|
7
7
|
export const getAt = (path, obj) => {
|
|
8
8
|
let node = obj;
|
|
9
9
|
for (const key of path) {
|
package/lib/Emulation.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MidiFile } from "midifile-ts";
|
|
2
|
-
import { EditionView } from "./EditionView";
|
|
3
|
-
import { Version } from "./Version";
|
|
4
|
-
import { AnyPerformedRollFeature, EmulatedCurve, NegotiatedEvent, ReproducingSystem } from "./ReproducingSystem";
|
|
5
|
-
import { Millimeters } from "./Quantity";
|
|
2
|
+
import { EditionView } from "./EditionView.js";
|
|
3
|
+
import { Version } from "./Version.js";
|
|
4
|
+
import { AnyPerformedRollFeature, EmulatedCurve, NegotiatedEvent, ReproducingSystem } from "./ReproducingSystem.js";
|
|
5
|
+
import { Millimeters } from "./Quantity.js";
|
|
6
6
|
export type EmulationScope = {
|
|
7
7
|
/** Only notes whose onset lies within this span of the roll are played. */
|
|
8
8
|
range?: [Millimeters, Millimeters];
|
package/lib/Emulation.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MIDIControlEvents } from "midifile-ts";
|
|
2
|
-
import { idOf } from "./Assumption";
|
|
3
|
-
import { isCommand, pairsAmong, placementsOf } from "./Symbol";
|
|
4
|
-
import { add, mean, mm, seconds, subtract } from "./Quantity";
|
|
2
|
+
import { idOf } from "./Assumption.js";
|
|
3
|
+
import { isCommand, pairsAmong, placementsOf } from "./Symbol.js";
|
|
4
|
+
import { add, mean, mm, seconds, subtract } from "./Quantity.js";
|
|
5
5
|
/** The punch diameter the edition's copies report, where any of them does. */
|
|
6
6
|
const punchDiameterOf = (view) => {
|
|
7
7
|
const measured = view.edition.copies
|
package/lib/Feature.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ObjectAssumption } from "./Assumption";
|
|
2
|
-
import { ConditionState } from "./ConditionState";
|
|
3
|
-
import { Text } from "./Symbol";
|
|
4
|
-
import { PartialBy, WithId, WithType } from "./utils";
|
|
5
|
-
import { Measure, Millimeters, Track } from "./Quantity";
|
|
1
|
+
import { ObjectAssumption } from "./Assumption.js";
|
|
2
|
+
import { ConditionState } from "./ConditionState.js";
|
|
3
|
+
import { Text } from "./Symbol.js";
|
|
4
|
+
import { PartialBy, WithId, WithType } from "./utils.js";
|
|
5
|
+
import { Measure, Millimeters, Track } from "./Quantity.js";
|
|
6
6
|
/**
|
|
7
7
|
* Describes the horizontal extent of a feature on the roll,
|
|
8
8
|
* measured in millimeters from the beginning of the roll.
|
package/lib/FeatureSource.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ActorAssignment, DateAssignment, ObjectAssumption } from "./Assumption";
|
|
2
|
-
import { Concept, Named } from "./Agent";
|
|
3
|
-
import { ConditionState } from "./ConditionState";
|
|
4
|
-
import { WithNote } from "./utils";
|
|
1
|
+
import { ActorAssignment, DateAssignment, ObjectAssumption } from "./Assumption.js";
|
|
2
|
+
import { Concept, Named } from "./Agent.js";
|
|
3
|
+
import { ConditionState } from "./ConditionState.js";
|
|
4
|
+
import { WithNote } from "./utils.js";
|
|
5
5
|
/**
|
|
6
6
|
* What a copy's features were read from. The kinds run from the paper
|
|
7
7
|
* itself, through files in which the roll has already been read into
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Hole } from "./Feature";
|
|
2
|
-
import { Expression, Note } from "./Symbol";
|
|
3
|
-
import { TrackerBar } from "./TrackerBar";
|
|
4
|
-
import { Millimeters, Quantity, Seconds } from "./Quantity";
|
|
1
|
+
import { Hole } from "./Feature.js";
|
|
2
|
+
import { Expression, Note } from "./Symbol.js";
|
|
3
|
+
import { TrackerBar } from "./TrackerBar.js";
|
|
4
|
+
import { Millimeters, Quantity, Seconds } from "./Quantity.js";
|
|
5
5
|
export type SpeedUnit = 'ft/min' | 'm/min';
|
|
6
6
|
/**
|
|
7
7
|
* The playback tempo of the roll as a paper speed, stated at the
|
package/lib/RollCopy.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ConditionState } from "./ConditionState";
|
|
2
|
-
import { AnySymbol } from "./Symbol";
|
|
3
|
-
import { TrackerBar } from "./TrackerBar";
|
|
4
|
-
import { TrackCalibration } from "./TrackCalibration";
|
|
5
|
-
import { AnyFeature, FeatureOrPatch, GluedOn } from "./Feature";
|
|
6
|
-
import { ActorAssignment, DateAssignment, ObjectAssumption, ReferenceAssumption } from "./Assumption";
|
|
7
|
-
import { WithId, WithType } from "./utils";
|
|
8
|
-
import { Agent, Concept } from "./Agent";
|
|
9
|
-
import { FeatureSource } from "./FeatureSource";
|
|
10
|
-
import { Measure, Millimeters, Quantity, Track } from "./Quantity";
|
|
1
|
+
import { ConditionState } from "./ConditionState.js";
|
|
2
|
+
import { AnySymbol } from "./Symbol.js";
|
|
3
|
+
import { TrackerBar } from "./TrackerBar.js";
|
|
4
|
+
import { TrackCalibration } from "./TrackCalibration.js";
|
|
5
|
+
import { AnyFeature, FeatureOrPatch, GluedOn } from "./Feature.js";
|
|
6
|
+
import { ActorAssignment, DateAssignment, ObjectAssumption, ReferenceAssumption } from "./Assumption.js";
|
|
7
|
+
import { WithId, WithType } from "./utils.js";
|
|
8
|
+
import { Agent, Concept } from "./Agent.js";
|
|
9
|
+
import { FeatureSource } from "./FeatureSource.js";
|
|
10
|
+
import { Measure, Millimeters, Quantity, Track } from "./Quantity.js";
|
|
11
11
|
/**
|
|
12
12
|
* This condition state is used to describe the roll's
|
|
13
13
|
* paper shrinkage or stretching. It might be calculated
|
package/lib/RollCopy.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { v4 } from "uuid";
|
|
2
|
-
import { welteT100 } from "./systems/welteT100/bar";
|
|
3
|
-
import { trackerBarOf } from "./systems";
|
|
4
|
-
import { assignReference } from "./Assumption";
|
|
5
|
-
import { px, track } from "./Quantity";
|
|
2
|
+
import { welteT100 } from "./systems/welteT100/bar.js";
|
|
3
|
+
import { trackerBarOf } from "./systems/index.js";
|
|
4
|
+
import { assignReference } from "./Assumption.js";
|
|
5
|
+
import { px, track } from "./Quantity.js";
|
|
6
6
|
export const rollConditions = [
|
|
7
7
|
'general',
|
|
8
8
|
'paper-stretch'
|
package/lib/Symbol.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReferenceAssumption } from "./Assumption";
|
|
2
|
-
import { WithId } from "./utils";
|
|
1
|
+
import { ReferenceAssumption } from "./Assumption.js";
|
|
2
|
+
import { WithId } from "./utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* A symbol is an abstract musical or textual entity carried by one or more
|
|
5
5
|
* physical features on the roll. Symbols are the result of interpreting
|
package/lib/Symbol.js
CHANGED
package/lib/TrackCalibration.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { px, subtract, track } from "./Quantity";
|
|
1
|
+
import { px, subtract, track } from "./Quantity.js";
|
|
2
2
|
/** Image column at the centre of a tracker bar track. */
|
|
3
3
|
export const columnOf = (position, calibration) => px(calibration.offset + (position - calibration.shift) * calibration.separation);
|
|
4
4
|
/** Tracker bar track covering an image column, unrounded. */
|
package/lib/TrackerBar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Concept } from "./Agent";
|
|
2
|
-
import { Expression, Note } from "./Symbol";
|
|
3
|
-
import { Millimeters, SpeedMeasure, Track } from "./Quantity";
|
|
1
|
+
import type { Concept } from "./Agent.js";
|
|
2
|
+
import { Expression, Note } from "./Symbol.js";
|
|
3
|
+
import { Millimeters, SpeedMeasure, Track } from "./Quantity.js";
|
|
4
4
|
/**
|
|
5
5
|
* What a tracker bar position does: sound a note, or operate one of
|
|
6
6
|
* the expression valves on the bass or the treble side.
|
package/lib/TrackerBar.js
CHANGED
package/lib/Version.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Edit } from "./Edit";
|
|
2
|
-
import { Concept } from "./Agent";
|
|
3
|
-
import { ActorAssignment, Belief, Certainty, DateAssignment, ObjectAssumption, ReferenceAssumption } from "./Assumption";
|
|
4
|
-
import { CollationTolerance } from "./Collation";
|
|
5
|
-
import { AnySymbol } from "./Symbol";
|
|
6
|
-
import { WithId, WithNote, WithType } from "./utils";
|
|
1
|
+
import { Edit } from "./Edit.js";
|
|
2
|
+
import { Concept } from "./Agent.js";
|
|
3
|
+
import { ActorAssignment, Belief, Certainty, DateAssignment, ObjectAssumption, ReferenceAssumption } from "./Assumption.js";
|
|
4
|
+
import { CollationTolerance } from "./Collation.js";
|
|
5
|
+
import { AnySymbol } from "./Symbol.js";
|
|
6
|
+
import { WithId, WithNote, WithType } from "./utils.js";
|
|
7
7
|
/**
|
|
8
8
|
* A motivation provides a reason or rationale for an editorial change.
|
|
9
9
|
* Motivations are defined at the version level and referenced by edits.
|
package/lib/Version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { certainties, certaintyOf, idOf } from "./Assumption";
|
|
2
|
-
import { defaultCollationTolerance } from "./Collation";
|
|
1
|
+
import { certainties, certaintyOf, idOf } from "./Assumption.js";
|
|
2
|
+
import { defaultCollationTolerance } from "./Collation.js";
|
|
3
3
|
/** The tolerance the derivation was collated at, or the default where it states none. */
|
|
4
4
|
export const collationToleranceOf = (derivation) => derivation.collationTolerance ?? defaultCollationTolerance;
|
|
5
5
|
/** The edits the version states, none where it leaves its text unstated. */
|
package/lib/alignment.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FeatureOrPatch } from "./Feature";
|
|
2
|
-
import { RollCopy, Shift } from "./RollCopy";
|
|
3
|
-
import { TrackerBar } from "./TrackerBar";
|
|
4
|
-
import { Millimeters } from "./Quantity";
|
|
1
|
+
import { FeatureOrPatch } from "./Feature.js";
|
|
2
|
+
import { RollCopy, Shift } from "./RollCopy.js";
|
|
3
|
+
import { TrackerBar } from "./TrackerBar.js";
|
|
4
|
+
import { Millimeters } from "./Quantity.js";
|
|
5
5
|
export declare const applyShift: (shift: Shift, copy: RollCopy) => void;
|
|
6
6
|
/** Scales the copy's features away from the beginning of the roll, and records the factor. */
|
|
7
7
|
export declare const applyScale: (factor: number, copy: RollCopy) => void;
|
package/lib/alignment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { featuresOf } from "./RollCopy";
|
|
2
|
-
import { welteT100 } from "./systems/welteT100/bar";
|
|
3
|
-
import { add, mm, scale } from "./Quantity";
|
|
1
|
+
import { featuresOf } from "./RollCopy.js";
|
|
2
|
+
import { welteT100 } from "./systems/welteT100/bar.js";
|
|
3
|
+
import { add, mm, scale } from "./Quantity.js";
|
|
4
4
|
/** Moves both ends of a span, the far end only where the span has one. */
|
|
5
5
|
const move = (span, by) => {
|
|
6
6
|
span.from = add(span.from, by);
|
package/lib/asJsonLd.d.ts
CHANGED
package/lib/asJsonLd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { systemIdIn } from "./TrackerBar";
|
|
2
|
-
import { certaintyOf, isAsserted } from "./Assumption";
|
|
3
|
-
import context from "./spec/context.json";
|
|
1
|
+
import { systemIdIn } from "./TrackerBar.js";
|
|
2
|
+
import { certaintyOf, isAsserted } from "./Assumption.js";
|
|
3
|
+
import context from "./spec/context.json" with { type: 'json' };
|
|
4
4
|
/**
|
|
5
5
|
* The keys an export derives from the tree, which no node of the
|
|
6
6
|
* edition states itself. An import reads them off again.
|
package/lib/constraints.d.ts
CHANGED
package/lib/constraints.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { idOf } from "./Assumption";
|
|
2
|
-
import { isCommand, pairsAmong, placementsOf } from "./Symbol";
|
|
3
|
-
import { keyOf } from "./TrackerBar";
|
|
4
|
-
import { trackerBarOf } from "./systems";
|
|
5
|
-
import { barOf } from "./RollCopy";
|
|
1
|
+
import { idOf } from "./Assumption.js";
|
|
2
|
+
import { isCommand, pairsAmong, placementsOf } from "./Symbol.js";
|
|
3
|
+
import { keyOf } from "./TrackerBar.js";
|
|
4
|
+
import { trackerBarOf } from "./systems/index.js";
|
|
5
|
+
import { barOf } from "./RollCopy.js";
|
|
6
6
|
const missingReference = {
|
|
7
7
|
alignedWith: 'alignment-reference-missing',
|
|
8
8
|
before: 'before-reference-missing',
|
package/lib/context.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { default as jsonLdContext } from './spec/context.json';
|
|
1
|
+
export { default as jsonLdContext } from './spec/context.json' with { type: 'json' };
|
|
2
2
|
/** The context of the Welte-Mignon T-100, added to a version coded for it. */
|
|
3
|
-
export { default as welteT100JsonLdContext } from './spec/welte-t100.context.json';
|
|
3
|
+
export { default as welteT100JsonLdContext } from './spec/welte-t100.context.json' with { type: 'json' };
|
|
4
4
|
/**
|
|
5
5
|
* The context of the Welte-Mignon Licensee. Its expression terms are
|
|
6
6
|
* the T-100's, the two systems differing in the tracker scale rather
|
|
7
7
|
* than in the coding, so it reads them out of the T-100's vocabulary
|
|
8
8
|
* rather than minting a second set of IRIs for the same commands.
|
|
9
9
|
*/
|
|
10
|
-
export { default as welteLicenseeJsonLdContext } from './spec/welte-licensee.context.json';
|
|
10
|
+
export { default as welteLicenseeJsonLdContext } from './spec/welte-licensee.context.json' with { type: 'json' };
|
|
11
11
|
/** The context of the Welte-Mignon T-98, added to an edition of a green roll. */
|
|
12
|
-
export { default as welteT98JsonLdContext } from './spec/welte-t98.context.json';
|
|
12
|
+
export { default as welteT98JsonLdContext } from './spec/welte-t98.context.json' with { type: 'json' };
|
package/lib/editionOps.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Draft } from "immer";
|
|
2
|
-
import { EditionView, Path } from "./EditionView";
|
|
3
|
-
import { Edition } from "./Edition";
|
|
4
|
-
import { AnySymbol, PlacementRelation } from "./Symbol";
|
|
5
|
-
import { CollationTolerance } from "./Collation";
|
|
6
|
-
import { Edit } from "./Edit";
|
|
7
|
-
import { GeneralRollCondition, ModificationPurpose, RollCopy, ScaleReading, Shift } from "./RollCopy";
|
|
8
|
-
import { FeatureSource } from "./FeatureSource";
|
|
9
|
-
import { AnyArgumentation, Belief, Certainty, ObjectAssumption } from "./Assumption";
|
|
10
|
-
import { FeatureConditionAssignment, FeatureOrPatch, NestedFeature } from "./Feature";
|
|
2
|
+
import { EditionView, Path } from "./EditionView.js";
|
|
3
|
+
import { Edition } from "./Edition.js";
|
|
4
|
+
import { AnySymbol, PlacementRelation } from "./Symbol.js";
|
|
5
|
+
import { CollationTolerance } from "./Collation.js";
|
|
6
|
+
import { Edit } from "./Edit.js";
|
|
7
|
+
import { GeneralRollCondition, ModificationPurpose, RollCopy, ScaleReading, Shift } from "./RollCopy.js";
|
|
8
|
+
import { FeatureSource } from "./FeatureSource.js";
|
|
9
|
+
import { AnyArgumentation, Belief, Certainty, ObjectAssumption } from "./Assumption.js";
|
|
10
|
+
import { FeatureConditionAssignment, FeatureOrPatch, NestedFeature } from "./Feature.js";
|
|
11
11
|
/**
|
|
12
12
|
* A change to an edition, written onto an immer draft of it. One
|
|
13
13
|
* operation is one undo step, so an operation that has to read the
|
package/lib/editionOps.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { current, isDraft } from "immer";
|
|
2
2
|
import { v4 } from "uuid";
|
|
3
|
-
import { getAt } from "./EditionView";
|
|
4
|
-
import { isCommand, placementRelations } from "./Symbol";
|
|
5
|
-
import { collationsOf, defaultCollationTolerance, isCollationsOwn } from "./Collation";
|
|
6
|
-
import { collationToleranceOf, editsOf, insertedBy, principalDerivationOf } from "./Version";
|
|
7
|
-
import { asSymbols, barOf, featuresByAct, featuresOf, isPaperStretch, statesNothing } from "./RollCopy";
|
|
8
|
-
import { systemOf } from "./TrackerBar";
|
|
9
|
-
import { substitutionsBetween } from "./substitution";
|
|
10
|
-
import { trackerBarOf } from "./systems";
|
|
11
|
-
import { applyShift, applyScale, revertShift, revertScale } from "./alignment";
|
|
12
|
-
import { assignReference, idOf } from "./Assumption";
|
|
13
|
-
import { conditions as conditionsAllowed, featuresBorneBy, isGluedOn, withBorneFeatures } from "./Feature";
|
|
14
|
-
import { distance, mm, subtract } from "./Quantity";
|
|
3
|
+
import { getAt } from "./EditionView.js";
|
|
4
|
+
import { isCommand, placementRelations } from "./Symbol.js";
|
|
5
|
+
import { collationsOf, defaultCollationTolerance, isCollationsOwn } from "./Collation.js";
|
|
6
|
+
import { collationToleranceOf, editsOf, insertedBy, principalDerivationOf } from "./Version.js";
|
|
7
|
+
import { asSymbols, barOf, featuresByAct, featuresOf, isPaperStretch, statesNothing } from "./RollCopy.js";
|
|
8
|
+
import { systemOf } from "./TrackerBar.js";
|
|
9
|
+
import { substitutionsBetween } from "./substitution.js";
|
|
10
|
+
import { trackerBarOf } from "./systems/index.js";
|
|
11
|
+
import { applyShift, applyScale, revertShift, revertScale } from "./alignment.js";
|
|
12
|
+
import { assignReference, idOf } from "./Assumption.js";
|
|
13
|
+
import { conditions as conditionsAllowed, featuresBorneBy, isGluedOn, withBorneFeatures } from "./Feature.js";
|
|
14
|
+
import { distance, mm, subtract } from "./Quantity.js";
|
|
15
15
|
const noChange = () => undefined;
|
|
16
16
|
const onCopy = (copyId, op) => draft => {
|
|
17
17
|
const copy = draft.copies.find(c => c.id === copyId);
|
package/lib/importJsonLd.d.ts
CHANGED
package/lib/importJsonLd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { derivedKeys } from "./asJsonLd";
|
|
2
|
-
import { migrate } from "./migrate";
|
|
3
|
-
import { isDateString } from "./utils";
|
|
1
|
+
import { derivedKeys } from "./asJsonLd.js";
|
|
2
|
+
import { migrate } from "./migrate.js";
|
|
3
|
+
import { isDateString } from "./utils.js";
|
|
4
4
|
export const importDate = (str) => {
|
|
5
5
|
const [y, m, d] = str.split('-').map(s => parseInt(s, 10));
|
|
6
6
|
if ([y, m, d].some(n => isNaN(n))) {
|
package/lib/index.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
export * from './utils';
|
|
2
|
-
export * from './Quantity';
|
|
3
|
-
export * from './Agent';
|
|
4
|
-
export * from './Assumption';
|
|
5
|
-
export * from './ConditionState';
|
|
6
|
-
export * from './Symbol';
|
|
7
|
-
export * from './Feature';
|
|
8
|
-
export * from './Edit';
|
|
9
|
-
export * from './Version';
|
|
10
|
-
export * from './Collation';
|
|
11
|
-
export * from './TrackCalibration';
|
|
12
|
-
export * from './TrackerBar';
|
|
13
|
-
export * from './systems/welteT100/bar';
|
|
14
|
-
export * from './systems/welteLicensee/bar';
|
|
15
|
-
export * from './systems/welteT98/bar';
|
|
16
|
-
export * from './systems';
|
|
17
|
-
export * from './ReproducingSystem';
|
|
18
|
-
export * from './FeatureSource';
|
|
19
|
-
export * from './RollCopy';
|
|
20
|
-
export * from './procedures';
|
|
21
|
-
export * from './vocabulary';
|
|
22
|
-
export * from './reservations';
|
|
23
|
-
export * from './witnesses';
|
|
24
|
-
export * from './alignment';
|
|
25
|
-
export * from './statistics';
|
|
26
|
-
export * from './Edition';
|
|
27
|
-
export * from './EditionView';
|
|
28
|
-
export * from './scatter';
|
|
29
|
-
export * from './editionOps';
|
|
30
|
-
export * from './Emulation';
|
|
31
|
-
export * from './validate';
|
|
32
|
-
export * from './constraints';
|
|
33
|
-
export * from './substitution';
|
|
34
|
-
export * from './context';
|
|
35
|
-
export * from './sigla';
|
|
36
|
-
export * from './notes';
|
|
37
|
-
export * from './asJsonLd';
|
|
38
|
-
export * from './importJsonLd';
|
|
39
|
-
export * from './migrate';
|
|
40
|
-
export { readFromStanfordAton, type StanfordAtonOptions } from './readers/stanfordAton';
|
|
41
|
-
export { readFromPhillipsEroll, CONTROL_OFFSET, phillipsSystems, type PhillipsErollOptions } from './readers/phillipsEroll';
|
|
42
|
-
export { readFromSpencerBar, readSpencerAnn, paperSpeedOfSpencerAnn, SPENCER_ROWS_PER_INCH, type SpencerBarOptions } from './readers/spencerBar';
|
|
1
|
+
export * from './utils.js';
|
|
2
|
+
export * from './Quantity.js';
|
|
3
|
+
export * from './Agent.js';
|
|
4
|
+
export * from './Assumption.js';
|
|
5
|
+
export * from './ConditionState.js';
|
|
6
|
+
export * from './Symbol.js';
|
|
7
|
+
export * from './Feature.js';
|
|
8
|
+
export * from './Edit.js';
|
|
9
|
+
export * from './Version.js';
|
|
10
|
+
export * from './Collation.js';
|
|
11
|
+
export * from './TrackCalibration.js';
|
|
12
|
+
export * from './TrackerBar.js';
|
|
13
|
+
export * from './systems/welteT100/bar.js';
|
|
14
|
+
export * from './systems/welteLicensee/bar.js';
|
|
15
|
+
export * from './systems/welteT98/bar.js';
|
|
16
|
+
export * from './systems/index.js';
|
|
17
|
+
export * from './ReproducingSystem.js';
|
|
18
|
+
export * from './FeatureSource.js';
|
|
19
|
+
export * from './RollCopy.js';
|
|
20
|
+
export * from './procedures.js';
|
|
21
|
+
export * from './vocabulary.js';
|
|
22
|
+
export * from './reservations.js';
|
|
23
|
+
export * from './witnesses.js';
|
|
24
|
+
export * from './alignment.js';
|
|
25
|
+
export * from './statistics.js';
|
|
26
|
+
export * from './Edition.js';
|
|
27
|
+
export * from './EditionView.js';
|
|
28
|
+
export * from './scatter.js';
|
|
29
|
+
export * from './editionOps.js';
|
|
30
|
+
export * from './Emulation.js';
|
|
31
|
+
export * from './validate.js';
|
|
32
|
+
export * from './constraints.js';
|
|
33
|
+
export * from './substitution.js';
|
|
34
|
+
export * from './context.js';
|
|
35
|
+
export * from './sigla.js';
|
|
36
|
+
export * from './notes.js';
|
|
37
|
+
export * from './asJsonLd.js';
|
|
38
|
+
export * from './importJsonLd.js';
|
|
39
|
+
export * from './migrate.js';
|
|
40
|
+
export { readFromStanfordAton, type StanfordAtonOptions } from './readers/stanfordAton.js';
|
|
41
|
+
export { readFromPhillipsEroll, CONTROL_OFFSET, phillipsSystems, type PhillipsErollOptions } from './readers/phillipsEroll.js';
|
|
42
|
+
export { readFromSpencerBar, readSpencerAnn, paperSpeedOfSpencerAnn, SPENCER_ROWS_PER_INCH, type SpencerBarOptions } from './readers/spencerBar.js';
|