@umriss-ui/schedule 0.2.0 → 0.3.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/dist/index.d.ts CHANGED
@@ -8,37 +8,149 @@ import { RefAttributes } from 'react';
8
8
  it as it is. */
9
9
  export declare function applyIntent<S extends Subtask>(subtask: S, intent: Intent): S;
10
10
 
11
- /** When a transport has to have arrived at its subtask, by its anchor. */
12
- export declare function arrival(transport: Transport, to: Subtask): number;
11
+ /** When a dependency has to have arrived at its subtask, by its anchor. */
12
+ export declare function arrival(dependency: Dependency, to: Subtask): number;
13
+
14
+ /** Time a lane is not available: leave, maintenance, a holiday. Work does
15
+ not belong in it - a subtask that covers some of it is a finding
16
+ (`inBlockedTime`), and a drag does not put one there.
17
+
18
+ A list of its own, keyed by lane like a subtask, and not a prop of `Lane`:
19
+ a lane is structure (ADR-0025) and blocked time is data (ADR-0023) - it
20
+ comes from the caller's leave table or maintenance plan as one array, and
21
+ the pure `findings` reads exactly the array `<BlockedTimes>` draws. */
22
+ export declare interface BlockedTime {
23
+ /** The caller's identity of the interval - what a finding names. */
24
+ readonly id: string;
25
+ /** The id of the lane it blocks. */
26
+ readonly lane: string;
27
+ /** Where it begins. */
28
+ readonly from: number;
29
+ /** Where it ends. */
30
+ readonly to: number;
31
+ /** Why the lane is blocked - "Leave", "Maintenance" -, where the schedule
32
+ names it. */
33
+ readonly label?: string;
34
+ }
35
+
36
+ /** A layer of blocked time. Wherever it is declared, it is drawn behind every
37
+ subtask and dependency: it is a property of the lane, not something on it. */
38
+ export declare function BlockedTimes({ data }: BlockedTimesProps): null;
13
39
 
14
- /** When a transport leaves its subtask, by its anchor. */
15
- export declare function departure(transport: Transport, from: Subtask): number;
40
+ export declare interface BlockedTimesProps {
41
+ /** The blocked time of the lanes - leave, maintenance, unavailability -, as
42
+ the caller holds it: one list, each interval naming its lane. */
43
+ data: readonly BlockedTime[];
44
+ }
45
+
46
+ /** When a dependency leaves its subtask, by its anchor. */
47
+ export declare function departure(dependency: Dependency, from: Subtask): number;
48
+
49
+ /** A layer of dependencies. Declared before `Subtasks`, the lines run beneath the
50
+ bars; after them, above. */
51
+ export declare function Dependencies({ data }: DependenciesProps): null;
52
+
53
+ export declare interface DependenciesProps {
54
+ /** The dependencies, as the caller holds them. */
55
+ data: readonly Dependency[];
56
+ }
16
57
 
17
- /** Both kinds of finding over the same data. */
58
+ /** Two subtasks of one task in order: the later one may not begin before the
59
+ earlier one ends plus a lag. Always from an end to a start. */
60
+ export declare interface Dependency {
61
+ /** The caller's identity of the dependency. */
62
+ readonly id: string;
63
+ /** The id of the subtask it leaves. */
64
+ readonly from: string;
65
+ /** The id of the subtask it arrives at. */
66
+ readonly to: string;
67
+ /** The least time between the two anchors; zero where the successor may
68
+ begin as soon as the predecessor ends. */
69
+ readonly lag: number;
70
+ /** Where it leaves: at the end of the main time, or after the lead-out.
71
+ Default `"leadOut"` - the predecessor counts as ended once its lead-out is. */
72
+ readonly leaves?: "main" | "leadOut";
73
+ /** Where it arrives: at the start of the main time, or before the lead-in.
74
+ Default `"leadIn"` - the lag must have run out before the successor's
75
+ lead-in begins. */
76
+ readonly arrives?: "main" | "leadIn";
77
+ /** How this one is drawn, where it is not drawn like the rest. It changes
78
+ the picture and never the finding: whether a dependency is violated follows
79
+ from `leaves` and `arrives` alone. */
80
+ readonly route?: DependencyRoute;
81
+ /** Where on the bars this one's line attaches, where it does not attach like
82
+ the rest. Also picture only, and not to be confused with the two anchors
83
+ above: those say what the dependency connects, this says where the line
84
+ touches. */
85
+ readonly attach?: DependencyAttachment;
86
+ /** Whether this one's ends are marked with a dot, where it is not marked
87
+ like the rest. Also picture only. */
88
+ readonly ends?: DependencyEnds;
89
+ }
90
+
91
+ /** Where on its bars a dependency's line attaches: the middle of both, or the
92
+ edge that faces the other stop - which is the shortest line between them.
93
+
94
+ Deliberately not called an anchor: a dependency already HAS two anchors
95
+ (`leaves`, `arrives`), and those decide what it connects and therefore
96
+ whether it is violated. This decides where the line touches, and nothing else.
97
+ The tree has an **Anchor** of its own as well (CONTEXT.md). */
98
+ export declare type DependencyAttachment = "centre" | "nearest";
99
+
100
+ /** Whether a dependency's two ends carry a dot. The dot says where the line is
101
+ anchored, which is worth saying while a plan is being read and is noise in a
102
+ plan full of short moves - so it is the caller's choice. */
103
+ export declare type DependencyEnds = "dot" | "none";
104
+
105
+ /** How a dependency is drawn between its two ends: a curve that leaves and
106
+ arrives forwards, a straight line, or axis-parallel segments. */
107
+ export declare type DependencyRoute = "curve" | "straight" | "orthogonal";
108
+
109
+ /** Every kind of finding over the same data. */
18
110
  export declare interface Findings {
19
111
  readonly overlaps: readonly Overlap[];
20
- readonly lateTransports: readonly LateTransport[];
112
+ readonly violatedDependencies: readonly ViolatedDependency[];
113
+ readonly inBlockedTime: readonly InBlockedTime[];
21
114
  }
22
115
 
23
- /** Overlaps and late transports at once. */
24
- export declare function findings(subtasks: readonly Subtask[], transports: readonly Transport[]): Findings;
116
+ /** Every finding at once. Without blocked time there is none in it. */
117
+ export declare function findings(subtasks: readonly Subtask[], dependencies: readonly Dependency[], blocked?: readonly BlockedTime[]): Findings;
118
+
119
+ /** A subtask covering time its lane is blocked. */
120
+ export declare interface InBlockedTime {
121
+ /** The id of the subtask. */
122
+ readonly subtask: string;
123
+ /** The id of the blocked time it covers. */
124
+ readonly blocked: string;
125
+ /** The lane both are on. */
126
+ readonly lane: string;
127
+ /** Where the covering begins. */
128
+ readonly from: number;
129
+ /** Where it ends. */
130
+ readonly to: number;
131
+ }
132
+
133
+ /** Every subtask that covers blocked time on its lane, lead-in and lead-out
134
+ included - once per blocked interval it covers, in the order of the
135
+ subtasks. Touching at a shared edge is not covering. */
136
+ export declare function inBlockedTime(subtasks: readonly Subtask[], blocked: readonly BlockedTime[]): InBlockedTime[];
25
137
 
26
138
  /** What the schedule reports when an interaction asks for a change. Every
27
139
  intent carries the values it asks for, not a difference: two intents of one
28
140
  drop - a move and a lane - give the same data in either order. */
29
- export declare type Intent = MoveIntent | StretchIntent | SetupIntent | TeardownIntent | LaneIntent | PlaceIntent;
141
+ export declare type Intent = MoveIntent | StretchIntent | LeadInIntent | LeadOutIntent | LaneIntent | PlaceIntent;
30
142
 
31
143
  /** The names of the intents - the editing API of the schedule. */
32
144
  export declare type IntentKind = Intent["kind"];
33
145
 
34
- /** One lane: a machine or station. The lanes run top to bottom in the order
146
+ /** One lane: a person, a vehicle, a room. The lanes run top to bottom in the order
35
147
  they are declared - whichever group they are declared in. */
36
148
  export declare function Lane({ id, label }: LaneProps): null;
37
149
 
38
150
  /** A group of lanes: structure over them, and never a lane itself.
39
151
 
40
152
  It gives its id to its children through context, so a lane never names its
41
- group and a group reads in JSX as it reads in the plant. Folded, it becomes
153
+ group and a group reads in JSX as it reads in the organisation. Folded, it becomes
42
154
  one row showing a **Miniature** of everything in it; open, it shows a slim
43
155
  head above its lanes. Which groups are folded is `collapsedGroups` on
44
156
  `Schedule` - a view state, never an **Intent**. */
@@ -49,7 +161,7 @@ export declare interface LaneGroupProps {
49
161
  no subtask sits on it, no finding is reported for it, and no intent names
50
162
  it (ADR-0025). */
51
163
  id: string;
52
- /** What the group's header says - the hall, the line, the machine group.
164
+ /** What the group's header says - the team, the depot, the region.
53
165
  Real text, read by a screen reader; without one the header shows the id. */
54
166
  label?: ReactNode;
55
167
  /** `Lane`s and further `LaneGroup`s, to any depth. */
@@ -68,27 +180,28 @@ export declare interface LaneIntent {
68
180
  export declare interface LaneProps {
69
181
  /** The identity subtasks name in their `lane`. */
70
182
  id: string;
71
- /** What the lane header says - the machine or station. Real text, read by a
183
+ /** What the lane header says - the person, vehicle or room. Real text, read by a
72
184
  screen reader; without one the header shows the id. */
73
185
  label?: ReactNode;
74
186
  }
75
187
 
76
- /** A transport whose duration does not fit between its anchors. */
77
- export declare interface LateTransport {
78
- /** The id of the transport. */
79
- readonly transport: string;
80
- /** When it leaves, by its anchor. */
81
- readonly departure: number;
82
- /** When it has to have arrived, by its anchor. */
83
- readonly arrival: number;
84
- /** How much time is missing: departure plus duration, minus arrival. */
85
- readonly shortBy: number;
188
+ /** Change the lead-in on its own. */
189
+ export declare interface LeadInIntent {
190
+ readonly kind: "leadIn";
191
+ /** The id of the subtask. */
192
+ readonly subtask: string;
193
+ /** The new duration of the lead-in. */
194
+ readonly leadIn: number;
86
195
  }
87
196
 
88
- /** Every transport whose successor is to be reached before the predecessor's
89
- departure plus the transport's duration. A transport naming a subtask that
90
- is not in the data is passed over: there is nothing to judge. */
91
- export declare function lateTransports(subtasks: readonly Subtask[], transports: readonly Transport[]): LateTransport[];
197
+ /** Change the lead-out on its own. */
198
+ export declare interface LeadOutIntent {
199
+ readonly kind: "leadOut";
200
+ /** The id of the subtask. */
201
+ readonly subtask: string;
202
+ /** The new duration of the lead-out. */
203
+ readonly leadOut: number;
204
+ }
92
205
 
93
206
  /** Move the subtask in time: the main time keeps its length. */
94
207
  export declare interface MoveIntent {
@@ -101,7 +214,7 @@ export declare interface MoveIntent {
101
214
  readonly to: number;
102
215
  }
103
216
 
104
- /** The interval a subtask occupies on its lane: setup and teardown included. */
217
+ /** The interval a subtask occupies on its lane: lead-in and lead-out included. */
105
218
  export declare function occupied(subtask: Subtask): {
106
219
  from: number;
107
220
  to: number;
@@ -111,7 +224,7 @@ export declare function occupied(subtask: Subtask): {
111
224
  export declare interface Overlap {
112
225
  /** The lane both sit on. */
113
226
  readonly lane: string;
114
- /** The subtask that starts earlier (setup included); on a tie, the one that
227
+ /** The subtask that starts earlier (lead-in included); on a tie, the one that
115
228
  stands first in the data. */
116
229
  readonly first: string;
117
230
  /** The other one. */
@@ -143,10 +256,10 @@ export declare interface PlaceIntent {
143
256
  readonly from: number;
144
257
  /** Where its main time would end. */
145
258
  readonly to: number;
146
- /** The setup it was declared with. */
147
- readonly setup?: number;
148
- /** The teardown it was declared with. */
149
- readonly teardown?: number;
259
+ /** The lead-in it was declared with. */
260
+ readonly leadIn?: number;
261
+ /** The lead-out it was declared with. */
262
+ readonly leadOut?: number;
150
263
  }
151
264
 
152
265
  /** What the application says it is dragging in, while it drags it
@@ -159,10 +272,10 @@ export declare interface PlacingItem {
159
272
  readonly task: string;
160
273
  /** How long its main time is. */
161
274
  readonly duration: number;
162
- /** The setup it brings. */
163
- readonly setup?: number;
164
- /** The teardown it brings. */
165
- readonly teardown?: number;
275
+ /** The lead-in it brings. */
276
+ readonly leadIn?: number;
277
+ /** The lead-out it brings. */
278
+ readonly leadOut?: number;
166
279
  }
167
280
 
168
281
  export declare function resolveAppearance(appearance: readonly SubtaskAppearance[] | undefined): ResolvedAppearance;
@@ -183,18 +296,18 @@ export declare interface ResolvedAppearance {
183
296
  kept only so that this type did not change with the picture. */
184
297
  readonly hatched: boolean;
185
298
  /** `muted`: the SATURATION - the task colour mixed half into the surface,
186
- opaque and at full height. Another shift's, another crew's. */
299
+ opaque and at full height. Another team's, another crew's. */
187
300
  readonly muted: boolean;
188
301
  /** `open`: the FADE, where the bar passes the edge of the view. It goes on
189
302
  past what is drawn. */
190
303
  readonly open: boolean;
191
304
  }
192
305
 
193
- /** The moves that push every successor whose transport no longer fits after
306
+ /** The moves that push every successor whose dependency no longer fits after
194
307
  `intent` - transitively, in the order they were first pushed. The subtask the
195
308
  intent is about is never moved, and a cycle among the successors ends after a
196
309
  bounded number of pushes instead of running on. */
197
- export declare function ripple(subtasks: readonly Subtask[], transports: readonly Transport[], intent: Intent): MoveIntent[];
310
+ export declare function ripple(subtasks: readonly Subtask[], dependencies: readonly Dependency[], intent: Intent): MoveIntent[];
198
311
 
199
312
  export declare const Schedule: ForwardRefExoticComponent<ScheduleProps & RefAttributes<ScheduleHandle>>;
200
313
 
@@ -220,10 +333,10 @@ export declare interface ScheduleHandle {
220
333
  export declare type ScheduleHit = {
221
334
  readonly kind: "subtask";
222
335
  readonly subtask: Subtask;
223
- readonly part: "setup" | "main" | "teardown";
336
+ readonly part: "leadIn" | "main" | "leadOut";
224
337
  } | {
225
- readonly kind: "transport";
226
- readonly transport: Transport;
338
+ readonly kind: "dependency";
339
+ readonly dependency: Dependency;
227
340
  } | {
228
341
  readonly kind: "lane";
229
342
  readonly lane: string;
@@ -261,7 +374,7 @@ export declare interface ScheduleProps {
261
374
  /** Width of the lane headers in pixels - at most 40 % of the schedule, so
262
375
  that on a phone the plot keeps the larger part. */
263
376
  headerWidth?: number;
264
- /** An operating calendar: the intervals in which time counts. Nights and
377
+ /** A working calendar: the intervals in which time counts. Nights and
265
378
  weekends outside them are cut out of the axis. Default: the wall clock. */
266
379
  calendar?: CalendarInput;
267
380
  /** The narrowest and widest time span zoom may reach, in milliseconds.
@@ -298,7 +411,7 @@ export declare interface ScheduleProps {
298
411
  selection itself. */
299
412
  selectedTask?: string | null;
300
413
  /** Called when a click selects a task or clears the selection, with the
301
- subtask that was clicked - null where the click was on a transport or on
414
+ subtask that was clicked - null where the click was on a dependency or on
302
415
  nothing. It is called again when another subtask of the same task is
303
416
  clicked. */
304
417
  onSelectedTaskChange?: (task: string | null, subtask: string | null) => void;
@@ -321,34 +434,34 @@ export declare interface ScheduleProps {
321
434
  span handed in through `initialDomain` is not reported back. */
322
435
  onDomainChange?: (domain: readonly [number, number]) => void;
323
436
  /** What the application is dragging in from outside while it drags it - its
324
- key, task, the length of its main time, its setup and teardown. The
437
+ key, task, the length of its main time, its lead-in and lead-out. The
325
438
  browser hands the dragged data over only on the drop, so the ghost before
326
439
  it can only come from here: set it on your own `dragstart`, clear it on
327
440
  `dragend`. Without `"place"` in `intents` no drop is accepted. */
328
441
  placing?: PlacingItem | null;
329
- /** How the transports are drawn: a `"curve"` that leaves and arrives
330
- forwards, a `"straight"` line, or `"orthogonal"` segments. A transport may
442
+ /** How the dependencies are drawn: a `"curve"` that leaves and arrives
443
+ forwards, a `"straight"` line, or `"orthogonal"` segments. A dependency may
331
444
  say otherwise for itself. */
332
- route?: TransportRoute;
333
- /** Where a transport's ends sit on their bars: the `"centre"` of both, or the
445
+ route?: DependencyRoute;
446
+ /** Where a dependency's ends sit on their bars: the `"centre"` of both, or the
334
447
  `"nearest"` edge - which is the shortest line between two stops. Within
335
- one lane both mean the middle. A transport may say otherwise for itself.
448
+ one lane both mean the middle. A dependency may say otherwise for itself.
336
449
 
337
- It changes the picture and never a finding: whether a transport is late
450
+ It changes the picture and never a finding: whether a dependency is violated
338
451
  follows from its `leaves` and `arrives` alone. */
339
- attach?: TransportAttachment;
340
- /** Whether a transport's two ends carry a dot (`"dot"`, the default) or the
452
+ attach?: DependencyAttachment;
453
+ /** Whether a dependency's two ends carry a dot (`"dot"`, the default) or the
341
454
  line stands alone (`"none"`). The dot says where the line is anchored - a
342
455
  help while a plan is being read, and noise in a plan full of short moves.
343
- A transport may say otherwise for itself. */
344
- ends?: TransportEnds;
456
+ A dependency may say otherwise for itself. */
457
+ ends?: DependencyEnds;
345
458
  /** What stands written in a bar: a function from a subtask to a line of
346
459
  text, or nothing for bars without text. The text is cut off with an
347
460
  ellipsis where the bar is too narrow for it and left out where even that
348
461
  would say nothing; a bar that began before the view keeps its text at the
349
462
  view's edge. */
350
463
  label?: (subtask: Subtask) => string;
351
- /** The tooltip on a hovered subtask or transport: its order, its times, its
464
+ /** The tooltip on a hovered subtask or dependency: its order, its times, its
352
465
  parts and its findings. `false` switches it off; a function receives
353
466
  what the pointer rests on and returns content of the application's own. */
354
467
  tooltip?: false | ((target: ScheduleTooltipTarget) => ReactNode);
@@ -359,12 +472,12 @@ export declare interface ScheduleProps {
359
472
  className?: string;
360
473
  /** Goes to the root element. */
361
474
  style?: CSSProperties;
362
- /** `Lane`, `Transports` and `Subtasks`, in the order they are to stand and
475
+ /** `Lane`, `Dependencies` and `Subtasks`, in the order they are to stand and
363
476
  be drawn. */
364
477
  children?: ReactNode;
365
478
  }
366
479
 
367
- /** What a tooltip is about: the hovered subtask or transport, with what the
480
+ /** What a tooltip is about: the hovered subtask or dependency, with what the
368
481
  schedule knows about it. */
369
482
  export declare type ScheduleTooltipTarget = {
370
483
  /** A subtask is hovered. */
@@ -375,32 +488,25 @@ export declare type ScheduleTooltipTarget = {
375
488
  readonly task: Task | undefined;
376
489
  /** The subtasks it overlaps with on its lane. */
377
490
  readonly overlapping: readonly Subtask[];
378
- /** The late transports leaving or reaching it. */
379
- readonly lateTransports: readonly LateTransport[];
491
+ /** The violated dependencies leaving or reaching it. */
492
+ readonly violatedDependencies: readonly ViolatedDependency[];
493
+ /** The blocked time it covers on its lane. */
494
+ readonly blocked: readonly BlockedTime[];
380
495
  } | {
381
- /** A transport is hovered. */
382
- readonly kind: "transport";
383
- /** The hovered transport. */
384
- readonly transport: Transport;
496
+ /** A dependency is hovered. */
497
+ readonly kind: "dependency";
498
+ /** The hovered dependency. */
499
+ readonly dependency: Dependency;
385
500
  /** Its task, where the tasks name it. */
386
501
  readonly task: Task | undefined;
387
502
  /** The subtask it leaves. */
388
503
  readonly from: Subtask | undefined;
389
504
  /** The subtask it reaches. */
390
505
  readonly to: Subtask | undefined;
391
- /** Its finding, where it is late. */
392
- readonly late: LateTransport | undefined;
506
+ /** Its finding, where it is violated. */
507
+ readonly violated: ViolatedDependency | undefined;
393
508
  };
394
509
 
395
- /** Change the setup on its own. */
396
- export declare interface SetupIntent {
397
- readonly kind: "setup";
398
- /** The id of the subtask. */
399
- readonly subtask: string;
400
- /** The new duration of the setup. */
401
- readonly setup: number;
402
- }
403
-
404
510
  export declare function shiftTask(subtasks: readonly Subtask[], task: string, by: number): MoveIntent[];
405
511
 
406
512
  /** A raster: a step, and where it starts after local midnight. */
@@ -408,7 +514,7 @@ export declare interface SnapRaster {
408
514
  /** The distance between two lines of the raster, in milliseconds. */
409
515
  readonly step: number;
410
516
  /** Where the raster starts after local midnight, in milliseconds: six
411
- hours for shifts that change at 06:00. */
517
+ hours for handovers at 06:00, 14:00 and 22:00. */
412
518
  readonly offset: number;
413
519
  }
414
520
 
@@ -428,8 +534,8 @@ export declare interface StretchIntent {
428
534
  readonly to: number;
429
535
  }
430
536
 
431
- /** The drawn interval: a main time on one lane, with an optional setup before
432
- it and a teardown after it. */
537
+ /** The drawn interval: a main time on one lane, with an optional lead-in before
538
+ it and a lead-out after it. */
433
539
  export declare interface Subtask {
434
540
  /** The caller's identity of the subtask. */
435
541
  readonly id: string;
@@ -441,10 +547,10 @@ export declare interface Subtask {
441
547
  readonly from: number;
442
548
  /** End of the main time. */
443
549
  readonly to: number;
444
- /** Duration of the setup before the main time; none is zero. */
445
- readonly setup?: number;
446
- /** Duration of the teardown after the main time; none is zero. */
447
- readonly teardown?: number;
550
+ /** Duration of the lead-in before the main time; none is zero. */
551
+ readonly leadIn?: number;
552
+ /** Duration of the lead-out after the main time; none is zero. */
553
+ readonly leadOut?: number;
448
554
  /** What the subtask is called, where the schedule names it. */
449
555
  readonly name?: string;
450
556
  /** What the bar says besides its colour: `"provisional"`, `"fixed"`,
@@ -486,70 +592,21 @@ export declare interface Task {
486
592
  readonly name?: string;
487
593
  }
488
594
 
489
- /** Change the teardown on its own. */
490
- export declare interface TeardownIntent {
491
- readonly kind: "teardown";
492
- /** The id of the subtask. */
493
- readonly subtask: string;
494
- /** The new duration of the teardown. */
495
- readonly teardown: number;
496
- }
497
-
498
- /** A task's move between two of its subtasks: always from an end to a start. */
499
- export declare interface Transport {
500
- /** The caller's identity of the transport. */
501
- readonly id: string;
502
- /** The id of the subtask it leaves. */
503
- readonly from: string;
504
- /** The id of the subtask it arrives at. */
505
- readonly to: string;
506
- /** How long the move takes. */
507
- readonly duration: number;
508
- /** Where it leaves: at the end of the main time, or after the teardown.
509
- Default `"teardown"` - the part leaves once the machine is cleared. */
510
- readonly leaves?: "main" | "teardown";
511
- /** Where it arrives: at the start of the main time, or before the setup.
512
- Default `"setup"` - the part must be there before the machine is set up. */
513
- readonly arrives?: "main" | "setup";
514
- /** How this one is drawn, where it is not drawn like the rest. It changes
515
- the picture and never the finding: whether a transport is late follows
516
- from `leaves` and `arrives` alone. */
517
- readonly route?: TransportRoute;
518
- /** Where on the bars this one's line attaches, where it does not attach like
519
- the rest. Also picture only, and not to be confused with the two anchors
520
- above: those say what the transport connects, this says where the line
521
- touches. */
522
- readonly attach?: TransportAttachment;
523
- /** Whether this one's ends are marked with a dot, where it is not marked
524
- like the rest. Also picture only. */
525
- readonly ends?: TransportEnds;
526
- }
527
-
528
- /** Where on its bars a transport's line attaches: the middle of both, or the
529
- edge that faces the other stop - which is the shortest line between them.
530
-
531
- Deliberately not called an anchor: a transport already HAS two anchors
532
- (`leaves`, `arrives`), and those decide what it connects and therefore
533
- whether it is late. This decides where the line touches, and nothing else.
534
- The tree has an **Anchor** of its own as well (CONTEXT.md). */
535
- export declare type TransportAttachment = "centre" | "nearest";
536
-
537
- /** Whether a transport's two ends carry a dot. The dot says where the line is
538
- anchored, which is worth saying while a plan is being read and is noise in a
539
- plan full of short moves - so it is the caller's choice. */
540
- export declare type TransportEnds = "dot" | "none";
541
-
542
- /** How a transport is drawn between its two ends: a curve that leaves and
543
- arrives forwards, a straight line, or axis-parallel segments. */
544
- export declare type TransportRoute = "curve" | "straight" | "orthogonal";
545
-
546
- /** A layer of transports. Declared before `Subtasks`, the lines run beneath the
547
- bars; after them, above. */
548
- export declare function Transports({ data }: TransportsProps): null;
595
+ /** Every dependency whose successor is to be reached before the predecessor's
596
+ departure plus the dependency's lag. A dependency naming a subtask that
597
+ is not in the data is passed over: there is nothing to judge. */
598
+ export declare function violatedDependencies(subtasks: readonly Subtask[], dependencies: readonly Dependency[]): ViolatedDependency[];
549
599
 
550
- export declare interface TransportsProps {
551
- /** The transports, as the caller holds them. */
552
- data: readonly Transport[];
600
+ /** A dependency whose lag does not fit between its anchors. */
601
+ export declare interface ViolatedDependency {
602
+ /** The id of the dependency. */
603
+ readonly dependency: string;
604
+ /** When it leaves, by its anchor. */
605
+ readonly departure: number;
606
+ /** When it has to have arrived, by its anchor. */
607
+ readonly arrival: number;
608
+ /** How much time is missing: departure plus lag, minus arrival. */
609
+ readonly shortBy: number;
553
610
  }
554
611
 
555
612
  /** The narrowest and the widest span zoom may reach. */