linked-rolls 0.70.0 → 0.71.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.
Files changed (125) hide show
  1. package/README.md +20 -5
  2. package/lib/analysis/constraints.d.ts +7 -0
  3. package/lib/analysis/constraints.js +1 -0
  4. package/lib/analysis/ownPaper.d.ts +5 -1
  5. package/lib/analysis/ownPaper.js +5 -1
  6. package/lib/analysis/paper.d.ts +22 -4
  7. package/lib/analysis/paper.js +6 -0
  8. package/lib/analysis/reservations.d.ts +24 -1
  9. package/lib/analysis/reservations.js +15 -1
  10. package/lib/analysis/sigla.d.ts +6 -1
  11. package/lib/analysis/sigla.js +5 -1
  12. package/lib/analysis/stemma.d.ts +6 -1
  13. package/lib/analysis/stemma.js +6 -1
  14. package/lib/analysis/text.d.ts +16 -2
  15. package/lib/analysis/text.js +16 -2
  16. package/lib/analysis/witnesses.d.ts +20 -1
  17. package/lib/analysis/witnesses.js +4 -0
  18. package/lib/collation/Collation.d.ts +47 -8
  19. package/lib/collation/Collation.js +29 -5
  20. package/lib/collation/alignment.d.ts +16 -3
  21. package/lib/collation/alignment.js +15 -3
  22. package/lib/collation/scatter.d.ts +50 -9
  23. package/lib/collation/scatter.js +11 -1
  24. package/lib/collation/statistics.d.ts +39 -9
  25. package/lib/collation/statistics.js +27 -6
  26. package/lib/collation/substitution.d.ts +5 -0
  27. package/lib/collation/substitution.js +4 -0
  28. package/lib/emulation/Emulation.d.ts +16 -1
  29. package/lib/emulation/Emulation.js +10 -0
  30. package/lib/emulation/negotiation.d.ts +1 -0
  31. package/lib/emulation/negotiation.js +1 -0
  32. package/lib/index.d.ts +33 -2
  33. package/lib/index.js +2 -1
  34. package/lib/io/asJsonLd.d.ts +10 -0
  35. package/lib/io/asJsonLd.js +10 -0
  36. package/lib/io/context.d.ts +16 -2
  37. package/lib/io/context.js +16 -2
  38. package/lib/io/importJsonLd.d.ts +1 -0
  39. package/lib/io/importJsonLd.js +1 -0
  40. package/lib/io/migrate.d.ts +8 -0
  41. package/lib/io/migrate.js +8 -0
  42. package/lib/lookup/lookup.d.ts +29 -5
  43. package/lib/lookup/lookup.js +29 -5
  44. package/lib/lookup/paths.d.ts +23 -3
  45. package/lib/lookup/paths.js +17 -3
  46. package/lib/model/Agent.d.ts +28 -2
  47. package/lib/model/Agent.js +15 -1
  48. package/lib/model/Assumption.d.ts +96 -7
  49. package/lib/model/Assumption.js +65 -7
  50. package/lib/model/ConditionState.d.ts +1 -0
  51. package/lib/model/Edit.d.ts +10 -0
  52. package/lib/model/Edit.js +8 -0
  53. package/lib/model/Edition.d.ts +11 -0
  54. package/lib/model/Edition.js +1 -0
  55. package/lib/model/Feature.d.ts +74 -7
  56. package/lib/model/Feature.js +41 -3
  57. package/lib/model/FeatureSource.d.ts +14 -1
  58. package/lib/model/FeatureSource.js +7 -1
  59. package/lib/model/Perforator.d.ts +10 -0
  60. package/lib/model/Perforator.js +1 -0
  61. package/lib/model/Quantity.d.ts +160 -13
  62. package/lib/model/Quantity.js +110 -6
  63. package/lib/model/RollCopy.d.ts +74 -12
  64. package/lib/model/RollCopy.js +53 -10
  65. package/lib/model/Symbol.d.ts +38 -1
  66. package/lib/model/Symbol.js +16 -0
  67. package/lib/model/TrackCalibration.d.ts +10 -2
  68. package/lib/model/TrackCalibration.js +9 -2
  69. package/lib/model/Version.d.ts +24 -4
  70. package/lib/model/Version.js +19 -4
  71. package/lib/model/notes.d.ts +15 -2
  72. package/lib/model/notes.js +9 -2
  73. package/lib/model/procedures.d.ts +5 -1
  74. package/lib/model/procedures.js +5 -1
  75. package/lib/model/vocabulary.d.ts +6 -1
  76. package/lib/model/vocabulary.js +6 -1
  77. package/lib/ops/beliefs.d.ts +23 -1
  78. package/lib/ops/beliefs.js +23 -1
  79. package/lib/ops/collation.d.ts +3 -0
  80. package/lib/ops/collation.js +3 -0
  81. package/lib/ops/commands.d.ts +17 -2
  82. package/lib/ops/commands.js +17 -2
  83. package/lib/ops/copies.d.ts +37 -6
  84. package/lib/ops/copies.js +37 -6
  85. package/lib/ops/draft.d.ts +2 -0
  86. package/lib/ops/draft.js +1 -0
  87. package/lib/ops/edits.d.ts +5 -1
  88. package/lib/ops/edits.js +5 -1
  89. package/lib/ops/features.d.ts +12 -1
  90. package/lib/ops/features.js +7 -0
  91. package/lib/ops/versions.d.ts +15 -3
  92. package/lib/ops/versions.js +15 -3
  93. package/lib/readers/phillipsEroll.d.ts +12 -1
  94. package/lib/readers/phillipsEroll.js +6 -1
  95. package/lib/readers/spencerBar.d.ts +12 -1
  96. package/lib/readers/spencerBar.js +7 -1
  97. package/lib/readers/stanfordAton.d.ts +15 -0
  98. package/lib/readers/stanfordAton.js +9 -0
  99. package/lib/schema.json +10 -0
  100. package/lib/shared/utils.d.ts +12 -0
  101. package/lib/spec/context.json +4 -0
  102. package/lib/systems/ReproducingSystem.d.ts +46 -3
  103. package/lib/systems/TrackerBar.d.ts +45 -4
  104. package/lib/systems/TrackerBar.js +20 -3
  105. package/lib/systems/index.d.ts +9 -2
  106. package/lib/systems/index.js +9 -2
  107. package/lib/systems/velocity.d.ts +1 -0
  108. package/lib/systems/velocity.js +1 -0
  109. package/lib/systems/welte.d.ts +18 -3
  110. package/lib/systems/welte.js +9 -2
  111. package/lib/systems/welteLicensee/bar.d.ts +1 -0
  112. package/lib/systems/welteLicensee/bar.js +1 -0
  113. package/lib/systems/welteLicensee/system.d.ts +18 -0
  114. package/lib/systems/welteLicensee/system.js +17 -0
  115. package/lib/systems/welteT100/bar.d.ts +8 -0
  116. package/lib/systems/welteT100/bar.js +4 -0
  117. package/lib/systems/welteT100/system.d.ts +46 -5
  118. package/lib/systems/welteT100/system.js +29 -3
  119. package/lib/systems/welteT98/bar.d.ts +6 -0
  120. package/lib/systems/welteT98/bar.js +2 -0
  121. package/lib/systems/welteT98/system.d.ts +58 -5
  122. package/lib/systems/welteT98/system.js +42 -3
  123. package/lib/validate.d.ts +16 -0
  124. package/lib/validate.js +15 -0
  125. package/package.json +2 -1
@@ -8,6 +8,7 @@ import { Measure, Millimeters, Track } from "./Quantity.js";
8
8
  * measured in millimeters from the beginning of the roll.
9
9
  * The `from` value is the start position and `to` is the end position.
10
10
  * @see crm:E54 Dimension
11
+ * @category Format types
11
12
  */
12
13
  export interface HorizontalSpan {
13
14
  /**
@@ -34,6 +35,7 @@ export interface HorizontalSpan {
34
35
  * measured in track numbers. Track numbers correspond to
35
36
  * positions on the tracker bar.
36
37
  * @see crm:E54 Dimension
38
+ * @category Format types
37
39
  */
38
40
  export interface VerticalSpan {
39
41
  /**
@@ -53,14 +55,28 @@ export interface VerticalSpan {
53
55
  */
54
56
  to?: Track;
55
57
  }
58
+ /**
59
+ * The kinds of feature, a patch among them, each by the type that names
60
+ * it.
61
+ * @category Vocabulary
62
+ */
56
63
  export declare const featureTypes: readonly ['HoleChain', 'Writing', 'Mark', 'Patch'];
64
+ /**
65
+ * The type naming a kind of feature.
66
+ * @category Format types
67
+ */
57
68
  export type FeatureType = typeof featureTypes[number];
69
+ /**
70
+ * Whether the value names a kind of feature.
71
+ * @category Lookups
72
+ */
58
73
  export declare const isFeatureType: (value: unknown) => value is FeatureType;
59
74
  /**
60
75
  * A feature on the roll, e.g. a perforation, a writing, a mark or a
61
76
  * patch, defined by its horizontal and vertical position and
62
77
  * extent. Each kind of feature is a class of its own, which its type
63
78
  * names.
79
+ * @category Format types
64
80
  */
65
81
  export interface RollFeature<T extends FeatureType, DamageT extends string> extends WithId, WithType<T> {
66
82
  /**
@@ -85,18 +101,26 @@ export interface RollFeature<T extends FeatureType, DamageT extends string> exte
85
101
  */
86
102
  condition?: ObjectAssumption<ConditionState<DamageT>>;
87
103
  }
104
+ /**
105
+ * The kinds of condition each kind of feature may be in.
106
+ * @category Vocabulary
107
+ */
88
108
  export declare const conditions: {
89
109
  readonly HoleChain: readonly ["partially-torn", "missing-perforation"];
90
110
  readonly Writing: readonly ["illegible"];
91
111
  readonly Mark: readonly ["faded"];
92
112
  readonly Patch: readonly ["detaching", "ripped"];
93
113
  };
94
- /** The kinds of condition a feature may be in, whichever kind of feature it is. */
114
+ /**
115
+ * The kinds of condition a feature may be in, whichever kind of feature it is.
116
+ * @category Format types
117
+ */
95
118
  export type FeatureConditionType = typeof conditions[FeatureType][number];
96
119
  /**
97
120
  * A condition assigned to a feature, annotatable with a belief about
98
121
  * its certainty. Which of the kinds a feature may be in depends on its
99
122
  * own kind, which `conditions` states.
123
+ * @category Format types
100
124
  */
101
125
  export type FeatureConditionAssignment = ObjectAssumption<ConditionState<FeatureConditionType>>;
102
126
  /**
@@ -109,12 +133,14 @@ export type FeatureConditionAssignment = ObjectAssumption<ConditionState<Feature
109
133
  * features on mechanical or digital carriers" among the features
110
134
  * purposely created by human activity.
111
135
  * @see reo:HoleChain
136
+ * @category Format types
112
137
  */
113
138
  export interface HoleChain extends RollFeature<'HoleChain', typeof conditions.HoleChain[number]> {
114
139
  }
115
140
  /**
116
141
  * Something that lies on a face of the paper rather than through it. A
117
142
  * chain of holes is not one: it goes through, and is on both faces at once.
143
+ * @category Format types
118
144
  */
119
145
  export interface OnAFace {
120
146
  /**
@@ -124,15 +150,30 @@ export interface OnAFace {
124
150
  */
125
151
  side?: 'recto' | 'verso';
126
152
  }
153
+ /**
154
+ * The ways a trace may have been put on the paper.
155
+ * @category Vocabulary
156
+ */
127
157
  export declare const techniques: readonly ['print', 'handwriting', 'stamp'];
128
- /** How a trace was put on the paper. */
158
+ /**
159
+ * How a trace was put on the paper.
160
+ * @category Format types
161
+ */
129
162
  export type Technique = typeof techniques[number];
163
+ /**
164
+ * What a trace may have been put on the paper with.
165
+ * @category Vocabulary
166
+ */
130
167
  export declare const media: readonly ['ink', 'pencil', 'crayon'];
131
- /** What a trace was put on with. */
168
+ /**
169
+ * What a trace was put on with.
170
+ * @category Format types
171
+ */
132
172
  export type Medium = typeof media[number];
133
173
  /**
134
174
  * A trace is a visible mark or writing on the roll surface.
135
175
  * Traces may fade over time.
176
+ * @category Format types
136
177
  */
137
178
  export interface Trace<T extends FeatureType> extends RollFeature<T, typeof conditions[T][number]>, OnAFace {
138
179
  /**
@@ -149,13 +190,17 @@ export interface Trace<T extends FeatureType> extends RollFeature<T, typeof cond
149
190
  */
150
191
  medium?: Medium;
151
192
  }
152
- /** The text a writing carries. It names no carriers of its own, the writing being its carrier. */
193
+ /**
194
+ * The text a writing carries. It names no carriers of its own, the writing being its carrier.
195
+ * @category Format types
196
+ */
153
197
  export type Transcription = Omit<Text, 'carriers'>;
154
198
  /**
155
199
  * A piece of writing found on the roll, such as a label,
156
200
  * catalogue number, or annotation. Writings state how they were made
157
201
  * and a transcription of their content.
158
202
  * @see reo:Writing
203
+ * @category Format types
159
204
  */
160
205
  export interface Writing extends Trace<'Writing'> {
161
206
  /**
@@ -187,6 +232,7 @@ export interface Writing extends Trace<'Writing'> {
187
232
  * reading of it (crminf:I16 Meaning Comprehension) rather than a
188
233
  * property of the feature, so its shape is not stated here.
189
234
  * @see reo:Mark
235
+ * @category Format types
190
236
  */
191
237
  export interface Mark extends Trace<'Mark'> {
192
238
  }
@@ -195,6 +241,7 @@ export interface Mark extends Trace<'Mark'> {
195
241
  * strip covering perforations, or a patch reinforcing a tear. A patch
196
242
  * may itself carry other features, such as writings or holes.
197
243
  * @see reo:Patch
244
+ * @category Format types
198
245
  */
199
246
  export interface Patch extends RollFeature<'Patch', typeof conditions.Patch[number]>, OnAFace {
200
247
  /**
@@ -220,12 +267,14 @@ export interface Patch extends RollFeature<'Patch', typeof conditions.Patch[numb
220
267
  * The features proper: a chain of holes, a writing and a mark are all
221
268
  * human-made features, and each of them is borne by whatever it sits on.
222
269
  * A patch is an object glued onto the paper and stands apart from them.
270
+ * @category Format types
223
271
  */
224
272
  export type AnyFeature = HoleChain | Writing | Mark;
225
273
  /**
226
274
  * Anything found at a place of its own on the roll: a feature or a
227
275
  * patch. E24 Physical Human-Made Thing is the class both fall under,
228
276
  * E22 and E25 being its subclasses.
277
+ * @category Format types
229
278
  */
230
279
  export type FeatureOrPatch = AnyFeature | Patch;
231
280
  /**
@@ -236,14 +285,32 @@ type Unplaced<T> = T extends FeatureOrPatch ? PartialBy<T, 'horizontal' | 'verti
236
285
  /**
237
286
  * A feature borne by another feature. It states no place of its own,
238
287
  * the feature bearing it standing in one.
288
+ * @category Format types
239
289
  */
240
290
  export type NestedFeature = Unplaced<FeatureOrPatch>;
241
- /** Whether the feature states a place of its own, which one a patch bears does not. */
291
+ /**
292
+ * Whether the feature states a place of its own, which one a patch bears does not.
293
+ * @category Lookups
294
+ */
242
295
  export declare const isPlaced: (feature: NestedFeature) => feature is FeatureOrPatch;
296
+ /**
297
+ * Whether the object is a feature or a patch, as its type says.
298
+ * @category Lookups
299
+ */
243
300
  export declare const isRollFeature: (obj: object) => obj is FeatureOrPatch;
301
+ /**
302
+ * Whether the feature is a patch.
303
+ * @category Lookups
304
+ */
244
305
  export declare const isPatch: <T extends NestedFeature>(feature: T) => feature is T & Patch;
245
- /** The features a feature bears: a patch those stated as parts of it, any other feature none. */
306
+ /**
307
+ * The features a feature bears: a patch those stated as parts of it, any other feature none.
308
+ * @category Lookups
309
+ */
246
310
  export declare const featuresBorneBy: (feature: NestedFeature) => NestedFeature[];
247
- /** The feature together with everything it bears, as deep as a patch on a patch goes. */
311
+ /**
312
+ * The feature together with everything it bears, as deep as a patch on a patch goes.
313
+ * @category Lookups
314
+ */
248
315
  export declare const withBorneFeatures: (feature: NestedFeature) => NestedFeature[];
249
316
  export {};
@@ -1,20 +1,58 @@
1
+ /**
2
+ * The kinds of feature, a patch among them, each by the type that names
3
+ * it.
4
+ * @category Vocabulary
5
+ */
1
6
  export const featureTypes = ['HoleChain', 'Writing', 'Mark', 'Patch'];
7
+ /**
8
+ * Whether the value names a kind of feature.
9
+ * @category Lookups
10
+ */
2
11
  export const isFeatureType = (value) => featureTypes.includes(value);
12
+ /**
13
+ * The kinds of condition each kind of feature may be in.
14
+ * @category Vocabulary
15
+ */
3
16
  export const conditions = {
4
17
  HoleChain: ['partially-torn', 'missing-perforation'],
5
18
  Writing: ['illegible'],
6
19
  Mark: ['faded'],
7
20
  Patch: ['detaching', 'ripped']
8
21
  };
22
+ /**
23
+ * The ways a trace may have been put on the paper.
24
+ * @category Vocabulary
25
+ */
9
26
  export const techniques = ['print', 'handwriting', 'stamp'];
27
+ /**
28
+ * What a trace may have been put on the paper with.
29
+ * @category Vocabulary
30
+ */
10
31
  export const media = ['ink', 'pencil', 'crayon'];
11
- /** Whether the feature states a place of its own, which one a patch bears does not. */
32
+ /**
33
+ * Whether the feature states a place of its own, which one a patch bears does not.
34
+ * @category Lookups
35
+ */
12
36
  export const isPlaced = (feature) => feature.horizontal !== undefined && feature.vertical !== undefined;
37
+ /**
38
+ * Whether the object is a feature or a patch, as its type says.
39
+ * @category Lookups
40
+ */
13
41
  export const isRollFeature = (obj) => {
14
42
  return 'type' in obj && isFeatureType(obj.type);
15
43
  };
44
+ /**
45
+ * Whether the feature is a patch.
46
+ * @category Lookups
47
+ */
16
48
  export const isPatch = (feature) => feature.type === 'Patch';
17
- /** The features a feature bears: a patch those stated as parts of it, any other feature none. */
49
+ /**
50
+ * The features a feature bears: a patch those stated as parts of it, any other feature none.
51
+ * @category Lookups
52
+ */
18
53
  export const featuresBorneBy = (feature) => isPatch(feature) ? feature.features ?? [] : [];
19
- /** The feature together with everything it bears, as deep as a patch on a patch goes. */
54
+ /**
55
+ * The feature together with everything it bears, as deep as a patch on a patch goes.
56
+ * @category Lookups
57
+ */
20
58
  export const withBorneFeatures = (feature) => [feature, ...featuresBorneBy(feature).flatMap(withBorneFeatures)];
@@ -6,10 +6,19 @@ import { WithNote } from "../shared/utils.js";
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
8
8
  * notes and commands, to a sound recording of the copy being played.
9
+ * @category Vocabulary
9
10
  */
10
11
  export declare const sourceKinds: readonly ['roll', 'scan', 'analysis', 'reading', 'emulation', 'recording'];
12
+ /**
13
+ * A kind of source a copy's features can be read from, from the paper
14
+ * itself to a sound recording of the copy being played.
15
+ * @category Format types
16
+ */
11
17
  export type SourceKind = typeof sourceKinds[number];
12
- /** How each kind of source is referred to in prose. */
18
+ /**
19
+ * How each kind of source is referred to in prose.
20
+ * @category Vocabulary
21
+ */
13
22
  export declare const sourceLabels: Record<SourceKind, string>;
14
23
  /**
15
24
  * Whether a source of this kind gives positions that were measured. A
@@ -17,12 +26,14 @@ export declare const sourceLabels: Record<SourceKind, string>;
17
26
  * emulation and a recording give the reading somebody else made: the
18
27
  * roll has been turned into notes and commands already, and turning
19
28
  * those back into chains of holes reconstructs them.
29
+ * @category Lookups
20
30
  */
21
31
  export declare const isMeasured: (kind: SourceKind) => boolean;
22
32
  /**
23
33
  * Whether a source of this kind bears witness to the paper. Punch
24
34
  * diameter, hole separation, punching pattern, marks and writings can
25
35
  * be observed on the roll and on an image of it, and on nothing else.
36
+ * @category Lookups
26
37
  */
27
38
  export declare const bearsPhysicalEvidence: (kind: SourceKind) => boolean;
28
39
  export type { Software } from "./Agent.js";
@@ -30,6 +41,7 @@ export type { Software } from "./Agent.js";
30
41
  * An instrument a copy was played on to be recorded. How it was
31
42
  * regulated, where that is known, is its condition.
32
43
  * @see crm:E22 Human-Made Object
44
+ * @category Format types
33
45
  */
34
46
  export interface Instrument extends Named {
35
47
  /**
@@ -47,6 +59,7 @@ export interface Instrument extends Named {
47
59
  * `reservationsAbout`, which works out what a copy cannot vouch for
48
60
  * from what it states here.
49
61
  * @see crm:E7 Activity
62
+ * @category Format types
50
63
  */
51
64
  export interface FeatureSource extends WithNote {
52
65
  /**
@@ -2,6 +2,7 @@
2
2
  * What a copy's features were read from. The kinds run from the paper
3
3
  * itself, through files in which the roll has already been read into
4
4
  * notes and commands, to a sound recording of the copy being played.
5
+ * @category Vocabulary
5
6
  */
6
7
  export const sourceKinds = [
7
8
  'roll',
@@ -11,7 +12,10 @@ export const sourceKinds = [
11
12
  'emulation',
12
13
  'recording'
13
14
  ];
14
- /** How each kind of source is referred to in prose. */
15
+ /**
16
+ * How each kind of source is referred to in prose.
17
+ * @category Vocabulary
18
+ */
15
19
  export const sourceLabels = {
16
20
  roll: 'the roll itself',
17
21
  scan: 'a scan of the roll',
@@ -28,11 +32,13 @@ const physical = ['roll', 'scan'];
28
32
  * emulation and a recording give the reading somebody else made: the
29
33
  * roll has been turned into notes and commands already, and turning
30
34
  * those back into chains of holes reconstructs them.
35
+ * @category Lookups
31
36
  */
32
37
  export const isMeasured = (kind) => measured.includes(kind);
33
38
  /**
34
39
  * Whether a source of this kind bears witness to the paper. Punch
35
40
  * diameter, hole separation, punching pattern, marks and writings can
36
41
  * be observed on the roll and on an image of it, and on nothing else.
42
+ * @category Lookups
37
43
  */
38
44
  export const bearsPhysicalEvidence = (kind) => physical.includes(kind);
@@ -10,6 +10,7 @@ import { WithId, WithType } from "../shared/utils.js";
10
10
  * runs along the roll, and is another thing than the hole separation,
11
11
  * which is the distance across the roll from one track to the next.
12
12
  * @see crm:E54 Dimension
13
+ * @category Format types
13
14
  */
14
15
  export interface ChainPitch extends Measure<'mm'> {
15
16
  /**
@@ -35,6 +36,7 @@ export interface ChainPitch extends Measure<'mm'> {
35
36
  * with a whole number of steps, so its lengths fall on a comb of this
36
37
  * spacing.
37
38
  * @see crm:E54 Dimension
39
+ * @category Format types
38
40
  */
39
41
  export interface Advance extends Measure<'mm'> {
40
42
  /**
@@ -57,6 +59,7 @@ export interface Advance extends Measure<'mm'> {
57
59
  * perforations show it. No time is stated: how long a machine kept a
58
60
  * setting is for a comparison across rolls to find out.
59
61
  * @see crm:E3 Condition State
62
+ * @category Format types
60
63
  */
61
64
  export interface PerforatorSetting extends ConditionState<'setting'> {
62
65
  /**
@@ -81,6 +84,7 @@ export interface PerforatorSetting extends ConditionState<'setting'> {
81
84
  * own. `ontology/types.ttl` defines them, and a test holds this list
82
85
  * against it.
83
86
  * @see crm:E55 Type
87
+ * @category Vocabulary
84
88
  */
85
89
  export declare const drives: readonly [{
86
90
  readonly id: 'https://w3id.org/reo/type/drive/ram-head';
@@ -89,10 +93,15 @@ export declare const drives: readonly [{
89
93
  readonly id: 'https://w3id.org/reo/type/drive/asynchronous';
90
94
  readonly name: 'asynchronous';
91
95
  }];
96
+ /**
97
+ * The IRI of a drive the type vocabulary declares.
98
+ * @category Format types
99
+ */
92
100
  export type DriveId = typeof drives[number]['id'];
93
101
  /**
94
102
  * A drive, named by its IRI alone.
95
103
  * @see crm:E55 Type
104
+ * @category Format types
96
105
  */
97
106
  export interface Drive {
98
107
  /** The IRI the type vocabulary gives the drive. */
@@ -103,6 +112,7 @@ export interface Drive {
103
112
  * alone. Whether it is the one another copy was punched on is left to a
104
113
  * statement of identity made about it elsewhere, which its id allows.
105
114
  * @see crm:E22 Human-Made Object
115
+ * @category Format types
106
116
  */
107
117
  export interface Perforator extends WithType<'Perforator'>, WithId {
108
118
  /**
@@ -4,6 +4,7 @@
4
4
  * own. `ontology/types.ttl` defines them, and a test holds this list
5
5
  * against it.
6
6
  * @see crm:E55 Type
7
+ * @category Vocabulary
7
8
  */
8
9
  export const drives = [
9
10
  { id: 'https://w3id.org/reo/type/drive/ram-head', name: 'ram head' },
@@ -10,45 +10,133 @@ declare const unit: unique symbol;
10
10
  /**
11
11
  * The units a record may state. A `Measure` is limited to these, since
12
12
  * they are what the `unit` field is allowed to say.
13
+ * @category Format types
13
14
  */
14
15
  export type Unit = 'mm' | 'cm' | 'px' | 'track' | 's' | 'ms' | 'ft/min' | 'm/min' | 'px/in' | 'deg' | 'percent';
15
16
  export type Quantity<U extends string> = number & {
16
17
  readonly [unit]: U;
17
18
  };
18
- /** A place along the roll, or any length on the paper. */
19
+ /**
20
+ * A place along the roll, or any length on the paper.
21
+ * @category Units
22
+ */
19
23
  export type Millimeters = Quantity<'mm'>;
24
+ /**
25
+ * A length in centimetres.
26
+ * @category Units
27
+ */
20
28
  export type Centimeters = Quantity<'cm'>;
21
- /** A place in a scan. Comparable within one scan only, since the resolution is the scan's. */
29
+ /**
30
+ * A place in a scan. Comparable within one scan only, since the resolution is the scan's.
31
+ * @category Units
32
+ */
22
33
  export type Pixels = Quantity<'px'>;
23
- /** A position across the roll, numbered as the tracker bar does. */
34
+ /**
35
+ * A position across the roll, numbered as the tracker bar does.
36
+ * @category Units
37
+ */
24
38
  export type Track = Quantity<'track'>;
39
+ /**
40
+ * A time in seconds, such as the moment a performed event falls at.
41
+ * @category Units
42
+ */
25
43
  export type Seconds = Quantity<'s'>;
44
+ /**
45
+ * A time in milliseconds.
46
+ * @category Units
47
+ */
26
48
  export type Milliseconds = Quantity<'ms'>;
49
+ /**
50
+ * A paper speed in feet per minute.
51
+ * @category Units
52
+ */
27
53
  export type FeetPerMinute = Quantity<'ft/min'>;
54
+ /**
55
+ * A paper speed in metres per minute.
56
+ * @category Units
57
+ */
28
58
  export type MetersPerMinute = Quantity<'m/min'>;
29
- /** How finely a scan was read: pixels of the image per inch of paper. */
59
+ /**
60
+ * How finely a scan was read: pixels of the image per inch of paper.
61
+ * @category Units
62
+ */
30
63
  export type Resolution = Quantity<'px/in'>;
31
- /** An angle on the roll, turning from the line across the paper towards the end of the roll. */
64
+ /**
65
+ * An angle on the roll, turning from the line across the paper towards the end of the roll.
66
+ * @category Units
67
+ */
32
68
  export type Degrees = Quantity<'deg'>;
33
- /** A share of a length, such as how far the paper has stretched: dimensionless, in hundredths. */
69
+ /**
70
+ * A share of a length, such as how far the paper has stretched: dimensionless, in hundredths.
71
+ * @category Units
72
+ */
34
73
  export type Percent = Quantity<'percent'>;
35
- /** Names a number in a unit. Partially apply it to make a constructor. */
74
+ /**
75
+ * Names a number in a unit. Partially apply it to make a constructor.
76
+ * @category Units
77
+ */
36
78
  export declare const quantity: <U extends string>(value: number) => Quantity<U>;
79
+ /**
80
+ * Names a number in millimetres.
81
+ * @category Units
82
+ */
37
83
  export declare const mm: (value: number) => Quantity<"mm">;
84
+ /**
85
+ * Names a number in centimetres.
86
+ * @category Units
87
+ */
38
88
  export declare const cm: (value: number) => Quantity<"cm">;
89
+ /**
90
+ * Names a number in pixels of a scan.
91
+ * @category Units
92
+ */
39
93
  export declare const px: (value: number) => Quantity<"px">;
94
+ /**
95
+ * Names a number as a position across the roll, as the tracker bar
96
+ * numbers it.
97
+ * @category Units
98
+ */
40
99
  export declare const track: (value: number) => Quantity<"track">;
100
+ /**
101
+ * Names a number in seconds.
102
+ * @category Units
103
+ */
41
104
  export declare const seconds: (value: number) => Quantity<"s">;
105
+ /**
106
+ * Names a number in milliseconds.
107
+ * @category Units
108
+ */
42
109
  export declare const milliseconds: (value: number) => Quantity<"ms">;
110
+ /**
111
+ * Names a number as a paper speed in feet per minute.
112
+ * @category Units
113
+ */
43
114
  export declare const feetPerMinute: (value: number) => Quantity<"ft/min">;
115
+ /**
116
+ * Names a number as a paper speed in metres per minute.
117
+ * @category Units
118
+ */
44
119
  export declare const metersPerMinute: (value: number) => Quantity<"m/min">;
120
+ /**
121
+ * Names a number as the resolution of a scan, in pixels per inch.
122
+ * @category Units
123
+ */
45
124
  export declare const pixelsPerInch: (value: number) => Quantity<"px/in">;
125
+ /**
126
+ * Names a number as an angle in degrees.
127
+ * @category Units
128
+ */
46
129
  export declare const degrees: (value: number) => Quantity<"deg">;
130
+ /**
131
+ * Names a number as a share in per cent.
132
+ * @category Units
133
+ */
47
134
  export declare const percent: (value: number) => Quantity<"percent">;
48
135
  /**
49
136
  * A value together with the unit it was measured in, as a record
50
137
  * states it.
51
138
  * @see crm:E54 Dimension
139
+ * @category Format types
52
140
  */
53
141
  export interface Measure<U extends Unit> {
54
142
  /**
@@ -62,26 +150,85 @@ export interface Measure<U extends Unit> {
62
150
  */
63
151
  unit: U;
64
152
  }
153
+ /**
154
+ * The sum of two quantities in one unit.
155
+ * @internal
156
+ */
65
157
  export declare const add: <U extends string>(a: Quantity<U>, b: Quantity<NoInfer<U>>) => Quantity<U>;
158
+ /**
159
+ * The first quantity less the second, in their unit.
160
+ * @internal
161
+ */
66
162
  export declare const subtract: <U extends string>(a: Quantity<U>, b: Quantity<NoInfer<U>>) => Quantity<U>;
163
+ /**
164
+ * How far apart two quantities in one unit lie, whichever is the
165
+ * larger.
166
+ * @internal
167
+ */
67
168
  export declare const distance: <U extends string>(a: Quantity<U>, b: Quantity<NoInfer<U>>) => Quantity<U>;
68
- /** A quantity times a plain factor, such as a stretch. */
169
+ /**
170
+ * A quantity times a plain factor, such as a stretch.
171
+ * @internal
172
+ */
69
173
  export declare const scale: <U extends string>(a: Quantity<U>, factor: number) => Quantity<U>;
174
+ /**
175
+ * The smaller of two quantities in one unit.
176
+ * @internal
177
+ */
70
178
  export declare const min: <U extends string>(a: Quantity<U>, b: Quantity<NoInfer<U>>) => Quantity<U>;
179
+ /**
180
+ * The larger of two quantities in one unit.
181
+ * @internal
182
+ */
71
183
  export declare const max: <U extends string>(a: Quantity<U>, b: Quantity<NoInfer<U>>) => Quantity<U>;
72
- /** The value brought inside the bounds, which must not be the wrong way round. */
184
+ /**
185
+ * The value brought inside the bounds, which must not be the wrong way round.
186
+ * @internal
187
+ */
73
188
  export declare const clamp: <U extends string>(value: Quantity<U>, low: Quantity<NoInfer<U>>, high: Quantity<NoInfer<U>>) => Quantity<U>;
189
+ /**
190
+ * The quantities added up, zero where there are none.
191
+ * @internal
192
+ */
74
193
  export declare const sum: <U extends string>(values: readonly Quantity<U>[]) => Quantity<U>;
194
+ /**
195
+ * The mean of the quantities.
196
+ * @internal
197
+ */
75
198
  export declare const mean: <U extends string>(values: readonly Quantity<U>[]) => Quantity<U>;
76
- /** A place in a scan taken at `dpi` dots per inch, on the paper. */
199
+ /**
200
+ * A place in a scan taken at `dpi` dots per inch, on the paper.
201
+ * @internal
202
+ */
77
203
  export declare const inMillimeters: (place: Pixels, dpi: number) => Millimeters;
78
- /** A place on the paper, in a scan taken at `dpi` dots per inch. */
204
+ /**
205
+ * A place on the paper, in a scan taken at `dpi` dots per inch.
206
+ * @internal
207
+ */
79
208
  export declare const inPixels: (place: Millimeters, dpi: number) => Pixels;
209
+ /**
210
+ * A length in millimetres, in centimetres.
211
+ * @internal
212
+ */
80
213
  export declare const inCentimeters: (length: Millimeters) => Centimeters;
214
+ /**
215
+ * A time in milliseconds, in seconds.
216
+ * @internal
217
+ */
81
218
  export declare const inSeconds: (time: Milliseconds) => Seconds;
219
+ /**
220
+ * A time in seconds, in milliseconds.
221
+ * @internal
222
+ */
82
223
  export declare const inMilliseconds: (time: Seconds) => Milliseconds;
83
- /** A speed as a record states it, in feet or metres per minute. */
224
+ /**
225
+ * A speed as a record states it, in feet or metres per minute.
226
+ * @category Format types
227
+ */
84
228
  export type SpeedMeasure = Measure<'ft/min'> | Measure<'m/min'>;
85
- /** A speed in metres per minute, whichever unit it was stated in. */
229
+ /**
230
+ * A speed in metres per minute, whichever unit it was stated in.
231
+ * @category Units
232
+ */
86
233
  export declare const inMetersPerMinute: (speed: SpeedMeasure) => MetersPerMinute;
87
234
  export {};