@pipelex/mthds-ui 0.39.0 → 0.41.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 (41) hide show
  1. package/README.md +8 -6
  2. package/dist/chunk-6S5TQPTO.js +1349 -0
  3. package/dist/chunk-6S5TQPTO.js.map +1 -0
  4. package/dist/chunk-7JZBXBZS.js +258 -0
  5. package/dist/chunk-7JZBXBZS.js.map +1 -0
  6. package/dist/{chunk-AGFLCOWW.js → chunk-HPARBH6K.js} +14 -197
  7. package/dist/chunk-HPARBH6K.js.map +1 -0
  8. package/dist/chunk-N2F62MW7.js +55 -0
  9. package/dist/chunk-N2F62MW7.js.map +1 -0
  10. package/dist/chunk-P6IGZVWE.js +155 -0
  11. package/dist/chunk-P6IGZVWE.js.map +1 -0
  12. package/dist/form/react/index.d.ts +1 -1
  13. package/dist/graph/index.d.ts +19 -3
  14. package/dist/graph/index.js +20 -12
  15. package/dist/graph/react/index.d.ts +13 -13
  16. package/dist/graph/react/index.js +387 -560
  17. package/dist/graph/react/index.js.map +1 -1
  18. package/dist/graph/react/viewer/GraphToolbar.css +2 -107
  19. package/dist/graph/react/viewer/StyleMenu.css +109 -0
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +20 -12
  22. package/dist/registryJoin-C6Wfkik-.d.ts +441 -0
  23. package/dist/standalone/graph-standalone.html +176 -171
  24. package/dist/standalone/graph-viewer.css +75 -70
  25. package/dist/standalone/graph-viewer.js +101 -101
  26. package/dist/static-graph/index.d.ts +1 -1
  27. package/dist/timeline/index.d.ts +344 -83
  28. package/dist/timeline/index.js +67 -3
  29. package/dist/timeline/react/RunTimeline.css +141 -0
  30. package/dist/timeline/react/index.d.ts +57 -6
  31. package/dist/timeline/react/index.js +929 -120
  32. package/dist/timeline/react/index.js.map +1 -1
  33. package/dist/timeline/react/styles/simple/SimpleProgress.css +354 -0
  34. package/dist/{types-DsrzH6gM.d.ts → types-DLAnYNoi.d.ts} +1 -1
  35. package/package.json +6 -4
  36. package/dist/chunk-AGFLCOWW.js.map +0 -1
  37. package/dist/chunk-ILZJIORT.js +0 -54
  38. package/dist/chunk-ILZJIORT.js.map +0 -1
  39. package/dist/chunk-JJG2TO7P.js +0 -473
  40. package/dist/chunk-JJG2TO7P.js.map +0 -1
  41. package/dist/progressSnapshot-VZ4PLul9.d.ts +0 -191
@@ -1,4 +1,4 @@
1
- import { C as ConceptInfo, P as PipeBlueprintUnion, b as PresenceMarker, c as GraphSpec, V as ValidationIssue } from '../types-DsrzH6gM.js';
1
+ import { C as ConceptInfo, P as PipeBlueprintUnion, c as PresenceMarker, d as GraphSpec, V as ValidationIssue } from '../types-DLAnYNoi.js';
2
2
  export { P as ParsedPipeRef, m as makePipeRef, p as parsePipeRef } from '../pipeRefs-BQJO5nh5.js';
3
3
  import 'mthds/errors';
4
4
 
@@ -1,79 +1,7 @@
1
- import { P as ProgressSnapshot, B as BatchProgress, I as InvocationStatus, b as ProgressInvocation, a as ProgressTimestamp } from '../progressSnapshot-VZ4PLul9.js';
2
- export { C as ConditionProgress, D as DEGRADATION_REASON, E as ExecutionAttempt, c as INVOCATION_STATUS, d as InvocationFailure, e as PROGRESS_MODE, f as ProgressDegradation, g as ProgressMode, R as RUN_PROGRESS_STATUS, h as RunProgressStatus, i as compareTimestamps, j as isRunEnded, t as timestampMs } from '../progressSnapshot-VZ4PLul9.js';
3
-
4
- /**
5
- * Invocation paths: the name of each invocation in a run.
6
- *
7
- * A path is the route from the run's entry pipe to the invocation, one segment
8
- * per controller level: `filings.review_filings/step_3/item_2/step_1` is the
9
- * first step of the sequence that the batch at step 3 runs for its second item.
10
- * The root segment is the entry pipe's `pipe_ref`, which never contains `/`,
11
- * and an outcome key is percent-encoded, so splitting on `/` is exact.
12
- *
13
- * step_<n> a PipeSequence's step n, from 1, binding steps counted
14
- * branch_<n> a PipeParallel's branch n, from 1
15
- * item_<n> a PipeBatch's item n, from 1 (the list's index 0 is item_1)
16
- * outcome_<key> a PipeCondition's outcome group, named by its first key
17
- * default a PipeCondition's group that only the default outcome runs
18
- *
19
- * An ordinal counts from 1 with no leading zero. A segment matching none of the
20
- * forms is kept as `unknown` rather than rejected, so a reader keeps drawing a
21
- * path a later grammar adds a segment to.
22
- */
23
- declare const PATH_SEGMENT_KIND: {
24
- readonly STEP: "step";
25
- readonly BRANCH: "branch";
26
- readonly ITEM: "item";
27
- readonly OUTCOME: "outcome";
28
- readonly DEFAULT: "default";
29
- readonly UNKNOWN: "unknown";
30
- };
31
- type PathSegmentKind = (typeof PATH_SEGMENT_KIND)[keyof typeof PATH_SEGMENT_KIND];
32
- /** A segment with a number: a sequence's step, a parallel's branch, a batch's item. */
33
- interface OrdinalPathSegment {
34
- kind: typeof PATH_SEGMENT_KIND.STEP | typeof PATH_SEGMENT_KIND.BRANCH | typeof PATH_SEGMENT_KIND.ITEM;
35
- ordinal: number;
36
- raw: string;
37
- }
38
- /** A condition's outcome group, named by its first key, decoded. */
39
- interface OutcomePathSegment {
40
- kind: typeof PATH_SEGMENT_KIND.OUTCOME;
41
- key: string;
42
- raw: string;
43
- }
44
- /** A condition's group that only the default outcome runs. */
45
- interface DefaultPathSegment {
46
- kind: typeof PATH_SEGMENT_KIND.DEFAULT;
47
- raw: string;
48
- }
49
- /** A segment the grammar this reader knows does not define. */
50
- interface UnknownPathSegment {
51
- kind: typeof PATH_SEGMENT_KIND.UNKNOWN;
52
- raw: string;
53
- }
54
- type PathSegment = OrdinalPathSegment | OutcomePathSegment | DefaultPathSegment | UnknownPathSegment;
55
- /** The root segment (the entry pipe's `pipe_ref`) and the segments after it. */
56
- declare function splitInvocationPath(path: string): {
57
- root: string;
58
- segments: string[];
59
- };
60
- /** The number of a path's segments, the root included: the entry pipe's path has depth 1. */
61
- declare function invocationPathDepth(path: string): number;
62
- /** The path of the invocation one level up, or `null` for a root path. */
63
- declare function parentInvocationPath(path: string): string | null;
64
- /** The last segment of a path, or `null` for a root path. */
65
- declare function lastPathSegment(path: string): PathSegment | null;
66
- /**
67
- * An outcome key decoded from its percent-encoded form: `high%20risk` is
68
- * `high risk`. Each `%XX` is one byte of the key's UTF-8 form. A malformed
69
- * encoding is returned as written rather than thrown, since a label is better
70
- * shown raw than not at all.
71
- */
72
- declare function decodeOutcomeKey(encoded: string): string;
73
- /** One segment after the root, parsed. */
74
- declare function parsePathSegment(raw: string): PathSegment;
75
- /** True for a segment that carries an ordinal: a step, a branch or an item. */
76
- declare function isOrdinalSegment(segment: PathSegment | null): segment is OrdinalPathSegment;
1
+ import { P as ProgressSnapshot, B as BatchProgress, I as InvocationStatus, c as PathSegment, d as ProgressInvocation, a as ProgressTimestamp, e as ProgressDegradation, R as RunProgressStatus, f as ProgressMode, b as TimelinePipeRegistry } from '../registryJoin-C6Wfkik-.js';
2
+ export { C as ConditionProgress, D as DEFAULT_TIMELINE_STYLE, g as DEGRADATION_REASON, h as DefaultPathSegment, E as ExecutionAttempt, i as INVOCATION_STATUS, j as InvocationFailure, k as InvocationTreeNode, J as JoinedBatch, l as JoinedTitle, N as NumberedStep, O as OrdinalPathSegment, m as OutcomePathSegment, n as PATH_SEGMENT_KIND, o as PROGRESS_MODE, p as PathSegmentKind, q as RUN_PROGRESS_STATUS, r as TIMELINE_STYLE, s as TIMELINE_STYLES, t as TIMELINE_STYLE_IDS, u as TimelineStyleDescriptor, T as TimelineStyleId, U as UnknownPathSegment, v as buildInvocationTree, w as compareSiblings, x as compareTimestamps, y as decodeOutcomeKey, z as invocationPathDepth, A as isItemNode, F as isOrdinalSegment, G as isOutcomeNode, H as isRunEnded, K as isTimelineStyleId, L as joinBatch, M as joinedSequence, Q as lastPathSegment, S as parentInvocationPath, V as parsePathSegment, W as pipeOf, X as qualifyPipeCode, Y as resolveTimelineStyle, Z as resolveTimelineStyleMenu, _ as sequenceMatches, $ as sequenceOf, a0 as splitInvocationPath, a1 as stepAt, a2 as stepNumberOf, a3 as stepsAfter, a4 as timestampMs, a5 as titleOf } from '../registryJoin-C6Wfkik-.js';
3
+ import { Problem } from 'mthds/errors';
4
+ import '../types-DLAnYNoi.js';
77
5
 
78
6
  /**
79
7
  * The stream of progress a snapshot belongs to, as one string: its run, its
@@ -118,6 +46,14 @@ declare function fresherSnapshot(held: ProgressSnapshot | null | undefined, inco
118
46
  * auto-fold, which folds a controller drawn as a block of cards.
119
47
  */
120
48
  declare const DEFAULT_WIDE_BATCH_THRESHOLD = 10;
49
+ /**
50
+ * How many items one page of a batch holds: an expanded batch with more items
51
+ * than this draws them a page at a time, and a collapsed one keeps at most this
52
+ * many of its items in trouble in view. The same as the wide threshold, so an
53
+ * expanded batch never draws more items at once than a batch that starts
54
+ * expanded.
55
+ */
56
+ declare const DEFAULT_BATCH_PAGE_SIZE = 10;
121
57
  interface TimelineRowsOptions {
122
58
  /**
123
59
  * The batches a reader expanded (`true`) or collapsed (`false`), by path. A
@@ -126,6 +62,17 @@ interface TimelineRowsOptions {
126
62
  expandedBatches?: Readonly<Record<string, boolean>>;
127
63
  /** A batch with more items than this is wide. Defaults to `DEFAULT_WIDE_BATCH_THRESHOLD`. */
128
64
  wideBatchThreshold?: number;
65
+ /**
66
+ * The page the reader turned each batch to, by path, from 0. A batch absent
67
+ * from it opens on its first page, and an index past its last page draws the
68
+ * last one.
69
+ */
70
+ batchPages?: Readonly<Record<string, number>>;
71
+ /**
72
+ * How many items one page of a batch holds, whether it started collapsed or
73
+ * not. Defaults to `DEFAULT_BATCH_PAGE_SIZE`; a size below one takes the default.
74
+ */
75
+ batchPageSize?: number;
129
76
  }
130
77
  /** A run of consecutive items sharing one status, in item order: one cell of a batch's strip. */
131
78
  interface TimelineStripSegment {
@@ -135,6 +82,35 @@ interface TimelineStripSegment {
135
82
  /** How many items the run holds. */
136
83
  count: number;
137
84
  }
85
+ /**
86
+ * The page of an expanded batch's items that is drawn: a fixed range of item
87
+ * numbers, never of positions among the items the snapshot holds, so an item
88
+ * appearing while the batch fans out lands inside the page it belongs to.
89
+ */
90
+ interface TimelineBatchPage {
91
+ /** Which page, from 0. */
92
+ index: number;
93
+ /** How many pages the batch's items make. */
94
+ count: number;
95
+ /** The number of the first item in its range, from 1. */
96
+ firstItem: number;
97
+ /** The number of the last item in its range. */
98
+ lastItem: number;
99
+ /**
100
+ * How many items the pages span: the batch's total, or the highest item
101
+ * number the snapshot holds when that is larger.
102
+ */
103
+ itemCount: number;
104
+ }
105
+ /** An item in trouble that is not drawn, and the page that holds it. */
106
+ interface TimelineTroubleJump {
107
+ /** The item's number, from 1. */
108
+ item: number;
109
+ /** The page holding it, from 0. */
110
+ page: number;
111
+ /** Why it is in trouble: a failure anywhere beneath it wins over a stuck invocation. */
112
+ reason: KeptVisibleReason;
113
+ }
138
114
  /** What a batch's one row shows of its items. */
139
115
  interface TimelineBatch {
140
116
  /** The snapshot's own counts, `null` when it carries none (a batch that has not fanned out). */
@@ -148,9 +124,23 @@ interface TimelineBatch {
148
124
  /** True when its item rows are drawn. */
149
125
  expanded: boolean;
150
126
  /**
151
- * How many of its item rows are hidden: none while expanded, and while
152
- * collapsed every item but the ones kept in view, those holding a failed or
153
- * stuck invocation, themselves or anywhere beneath them.
127
+ * While expanded and holding more items than one page, the page drawn;
128
+ * otherwise `null`: every item is drawn, or the batch is collapsed.
129
+ */
130
+ page: TimelineBatchPage | null;
131
+ /**
132
+ * The first item in trouble that is not drawn: while paged, the first after
133
+ * the current page, wrapping to the start of the batch; while collapsed, the
134
+ * first the one-page cap leaves out. `null` when every item in trouble is drawn.
135
+ */
136
+ nextTrouble: TimelineTroubleJump | null;
137
+ /** While collapsed, how many items in trouble the one-page cap leaves out, by reason. */
138
+ troubleNotShown: Record<KeptVisibleReason, number>;
139
+ /**
140
+ * How many of the items the snapshot holds are not drawn: while expanded,
141
+ * those off the current page; while collapsed, every item but the ones kept in
142
+ * view, those holding a failed or stuck invocation, themselves or anywhere
143
+ * beneath them, at most one page of them.
154
144
  */
155
145
  hiddenItemCount: number;
156
146
  }
@@ -178,8 +168,15 @@ declare const KEPT_VISIBLE_REASON: {
178
168
  readonly DEGRADED: "degraded";
179
169
  };
180
170
  type KeptVisibleReason = (typeof KEPT_VISIBLE_REASON)[keyof typeof KEPT_VISIBLE_REASON];
171
+ /** The kinds of entry `buildTimelineRows` returns: an invocation's row, or a batch's pager. */
172
+ declare const TIMELINE_ENTRY_KIND: {
173
+ readonly INVOCATION: "invocation";
174
+ readonly PAGER: "pager";
175
+ };
176
+ type TimelineEntryKind = (typeof TIMELINE_ENTRY_KIND)[keyof typeof TIMELINE_ENTRY_KIND];
181
177
  /** One drawn row: one invocation, at its place in the tree. */
182
178
  interface TimelineRow {
179
+ kind: typeof TIMELINE_ENTRY_KIND.INVOCATION;
183
180
  path: string;
184
181
  /** The path of the row it nests under: its nearest ancestor the snapshot holds, `null` at the top. */
185
182
  parentPath: string | null;
@@ -199,6 +196,27 @@ interface TimelineRow {
199
196
  /** Set on an item row drawn under a collapsed batch, saying why. */
200
197
  keptVisible: KeptVisibleReason | null;
201
198
  }
199
+ /**
200
+ * A batch's pager, drawn after the last row of the items it shows, at their
201
+ * depth. While the batch is expanded over several pages, it turns them and
202
+ * offers the jump to the next item in trouble; while collapsed, it stands where
203
+ * the one-page cap left items in trouble out, and says how many.
204
+ */
205
+ interface TimelineItemPager {
206
+ kind: typeof TIMELINE_ENTRY_KIND.PAGER;
207
+ /** The batch's path. */
208
+ batchPath: string;
209
+ /** The batch's pipe code, which names the pager. */
210
+ pipeCode: string;
211
+ /** The depth of the batch's items, one below its row. */
212
+ depth: number;
213
+ /** The batch, as its row carries it. */
214
+ batch: TimelineBatch;
215
+ }
216
+ /** One entry of what a timeline draws, in drawing order. */
217
+ type TimelineEntry = TimelineRow | TimelineItemPager;
218
+ /** Whether an entry is an invocation's row rather than a batch's pager. */
219
+ declare function isTimelineRow(entry: TimelineEntry): entry is TimelineRow;
202
220
  /**
203
221
  * The rows a timeline draws for a snapshot, in drawing order: every invocation
204
222
  * before its descendants, nested by path, each labelled with its place under
@@ -211,13 +229,21 @@ interface TimelineRow {
211
229
  * Collapsed, it still draws each item holding an invocation that failed or
212
230
  * where the run is stuck (one carrying `degradation`), whether the item itself
213
231
  * or anything beneath it, a nested batch's item included, with everything under
214
- * it, so the trouble can always be pointed at, along with the rows leading to it.
232
+ * it, so the trouble can be pointed at, along with the rows leading to it.
233
+ *
234
+ * Both states are bounded by one page of items (`batchPageSize`). Expanded over
235
+ * more items than a page, a batch draws the page the reader turned it to, by
236
+ * item number, and a pager entry after the last row of its items. Collapsed, it
237
+ * keeps at most one page of its items in trouble in view, those where the run
238
+ * is stuck first, then the failed ones, each by item number, and when more are in trouble a pager entry stands after them saying
239
+ * so. The pager carries the jump to the first item in trouble left out.
215
240
  *
216
241
  * Pure, and a function of the snapshot and the options alone: the same snapshot
217
242
  * always yields the same rows, so repainting with a newer snapshot keeps every
218
- * row it still holds at its place relative to the others.
243
+ * row it still holds at its place relative to the others, and a page keeps its
244
+ * range of items while the batch fans out.
219
245
  */
220
- declare function buildTimelineRows(snapshot: ProgressSnapshot, options?: TimelineRowsOptions): TimelineRow[];
246
+ declare function buildTimelineRows(snapshot: ProgressSnapshot, options?: TimelineRowsOptions): TimelineEntry[];
221
247
 
222
248
  /** The stretch of time a timeline's shared axis spans, in epoch milliseconds. */
223
249
  interface TimelineWindow {
@@ -336,4 +362,239 @@ declare function formatDuration(ms: number): string;
336
362
  /** A moment as its UTC time of day, to the millisecond: `09:30:07.034 UTC`. */
337
363
  declare function formatClockTime(ms: number): string;
338
364
 
339
- export { BatchProgress, DEFAULT_WIDE_BATCH_THRESHOLD, type DefaultPathSegment, InvocationStatus, type InvocationTimes, KEPT_VISIBLE_REASON, type KeptVisibleReason, type OrdinalPathSegment, type OutcomePathSegment, PATH_SEGMENT_KIND, type PathSegment, type PathSegmentKind, ProgressInvocation, ProgressSnapshot, ProgressTimestamp, type SnapshotTimes, type TimelineBar, type TimelineBatch, type TimelineOutcome, type TimelineRow, type TimelineRowsOptions, type TimelineStripSegment, type TimelineTick, type TimelineWindow, type UnknownPathSegment, axisPercent, barFollowsClock, buildTimelineRows, decodeOutcomeKey, formatClockTime, formatDuration, fresherSnapshot, invocationBar, invocationPathDepth, invocationTimes, isOrdinalSegment, isSameProgressStream, lastPathSegment, parentInvocationPath, parsePathSegment, progressStreamKey, readingClockMs, snapshotTimes, splitInvocationPath, timelineTicks, timelineWindow, timelineWindowAt };
365
+ /**
366
+ * The simple timeline style's projection: a progress snapshot, joined to the
367
+ * method's pipe registry, as a checklist of lines in the method's own words.
368
+ *
369
+ * Pure and language-free. A line carries its kind, its state, its title as the
370
+ * author wrote it, its counts, its outcome and its health as data, never a
371
+ * sentence: the React view words them through its strings table, and a host can
372
+ * read the same lines to word progress elsewhere. It keys nothing on time, so
373
+ * the view keeps every line it drew in place across snapshots and only the
374
+ * durations move with the clock.
375
+ */
376
+
377
+ /** What a line stands for. */
378
+ declare const SIMPLE_LINE_KIND: {
379
+ /** An operator: one piece of work. */
380
+ readonly STEP: "step";
381
+ /** A sequence, or a pipe of a type the style does not know that holds work of its own. */
382
+ readonly GROUP: "group";
383
+ /** A parallel: work done at the same time. */
384
+ readonly TOGETHER: "together";
385
+ /** A condition, followed by the outcome it took. */
386
+ readonly DECISION: "decision";
387
+ /** A batch: one line for all its items, titled by its branch, with their counts. */
388
+ readonly FOR_EACH: "forEach";
389
+ /** In an expanded batch, one step of its branch, its states counted across the items. */
390
+ readonly BRANCH_STEP: "branchStep";
391
+ /** In a wide parallel, its finished branches folded into one line. */
392
+ readonly FINISHED: "finished";
393
+ /** Past the indentation cap, the deepest work going on beneath a line. */
394
+ readonly NOW: "now";
395
+ };
396
+ type SimpleLineKind = (typeof SIMPLE_LINE_KIND)[keyof typeof SIMPLE_LINE_KIND];
397
+ /** Where a line's work stands. */
398
+ declare const SIMPLE_LINE_STATE: {
399
+ /** Not started: a step the method declares that the run has not reached, or a scheduled item. */
400
+ readonly UPCOMING: "upcoming";
401
+ readonly RUNNING: "running";
402
+ readonly DONE: "done";
403
+ readonly FAILED: "failed";
404
+ /** Skipped: a successful end with no output of its own. */
405
+ readonly SKIPPED: "skipped";
406
+ /** Canceled: it had not ended when the run ended. */
407
+ readonly STOPPED: "stopped";
408
+ /** A step the method declares that its sequence, failed or canceled, never reached. */
409
+ readonly NOT_RUN: "notRun";
410
+ };
411
+ type SimpleLineState = (typeof SIMPLE_LINE_STATE)[keyof typeof SIMPLE_LINE_STATE];
412
+ /** Why the run itself carries a note under the headline. */
413
+ declare const SIMPLE_RUN_NOTE_REASON: {
414
+ /** The run status could not be read, so the progress may be out of date. */
415
+ readonly UNREACHABLE: "unreachable";
416
+ /** The run is not making progress, at no invocation a line stands for. */
417
+ readonly STUCK: "stuck";
418
+ /** A reason the style does not know: the degradation's own message tells it. */
419
+ readonly OTHER: "other";
420
+ };
421
+ type SimpleRunNoteReason = (typeof SIMPLE_RUN_NOTE_REASON)[keyof typeof SIMPLE_RUN_NOTE_REASON];
422
+ /** A parallel with more branches than this folds its finished branches into one line. */
423
+ declare const DEFAULT_WIDE_PARALLEL_THRESHOLD = 5;
424
+ /**
425
+ * The deepest a line is drawn at, the top being 0. A group at this depth draws
426
+ * no line for its children: the deepest work going on beneath it is one "now"
427
+ * line instead, so a method nested five levels deep still reads as a short list.
428
+ */
429
+ declare const SIMPLE_MAX_DEPTH = 2;
430
+ /** On a decision, the outcome it took; on a branch of a condition that resolved none, the outcome it stands for. */
431
+ interface SimpleOutcome {
432
+ /** The outcome map's key, decoded; `null` for the default outcome. */
433
+ key: string | null;
434
+ /** True when it is the condition's `selected_outcome`, false when read off the branch's path. */
435
+ resolved: boolean;
436
+ }
437
+ /** On a branch step of an expanded batch, how many items stand at each state of it. */
438
+ interface SimpleItemTally {
439
+ done: number;
440
+ running: number;
441
+ failed: number;
442
+ skipped: number;
443
+ stopped: number;
444
+ }
445
+ /**
446
+ * What a line says of its health, from its own invocation and from the work it
447
+ * stands for that no line of its own shows: inside a folded group, a batch's
448
+ * items, or the steps past the indentation cap.
449
+ */
450
+ interface SimpleLineHealth {
451
+ /**
452
+ * The work is being tried again: the attempt it is on, the highest among the
453
+ * hidden work it stands for. Never set once the work has ended: a recovered
454
+ * invocation reads as done and nothing more.
455
+ */
456
+ retryAttempt: number | null;
457
+ /**
458
+ * On a line that counts items, a for-each line or a branch step, how many
459
+ * items are being tried again there, the item itself or anything beneath it;
460
+ * an opened for-each line counts only the items themselves, its branch steps
461
+ * counting the rest. Such a line has no `retryAttempt`: each item has its own.
462
+ */
463
+ retryingItems: number;
464
+ /** The run is stuck here, or in the hidden work this line stands for. */
465
+ degradation: ProgressDegradation | null;
466
+ /** On a line that counts items, how many items hold an invocation there where the run is stuck. */
467
+ stuckItems: number;
468
+ /**
469
+ * On a failed line no drawn line beneath shows the failure of: the problem
470
+ * that ended the deepest failed invocation it stands for, when the snapshot
471
+ * carries one.
472
+ */
473
+ problem: Problem | null;
474
+ }
475
+ /** One line of the checklist. */
476
+ interface SimpleProgressLine {
477
+ /**
478
+ * Stable across snapshots: the invocation's path, or for an upcoming line the
479
+ * path its step will have, so a line keeps its place when its step starts.
480
+ * A branch step's key is the batch's path, then a `*` segment standing for
481
+ * every item, then the step's segment; a folded line's is the path it folds
482
+ * beneath followed by `#finished` or `#now`.
483
+ */
484
+ key: string;
485
+ kind: SimpleLineKind;
486
+ state: SimpleLineState;
487
+ /** The pipe's description as a title, or its humanized code when the registry has none. */
488
+ title: string;
489
+ titleFromDescription: boolean;
490
+ /** On a for-each line, the item's name in a sentence (`filing`), `null` when the registry does not name it. */
491
+ forEachItem: string | null;
492
+ outcome: SimpleOutcome | null;
493
+ /**
494
+ * On a for-each line, the snapshot's counts, `null` before it fans out; on a
495
+ * branch step that is itself a batch, its items' counts summed across the
496
+ * outer items.
497
+ */
498
+ counts: BatchProgress | null;
499
+ /**
500
+ * On a for-each line, how many of its items were skipped whole. The
501
+ * contract's `done` counts them, so `done - skippedItems` is how many
502
+ * finished their work.
503
+ */
504
+ skippedItems: number;
505
+ /** On a branch step, how many items stand at each of its states. */
506
+ tally: SimpleItemTally | null;
507
+ /** On a finished line, how many branches it folds. */
508
+ foldedCount: number | null;
509
+ health: SimpleLineHealth | null;
510
+ /** The invocation it stands for; `null` on an upcoming, branch-step or finished line. */
511
+ invocation: ProgressInvocation | null;
512
+ /** True when the reader can open or close it. */
513
+ expandable: boolean;
514
+ /** True when its children are drawn. */
515
+ expanded: boolean;
516
+ children: SimpleProgressLine[];
517
+ }
518
+ /** The run's own degradation, when no line carries it. */
519
+ interface SimpleRunNote {
520
+ reason: SimpleRunNoteReason;
521
+ degradation: ProgressDegradation;
522
+ }
523
+ /** Where a failed run failed. */
524
+ interface SimpleRunFailure {
525
+ /** The top-level line holding the deepest failure, `null` when the entry pipe itself failed with nothing beneath it failing. */
526
+ lineKey: string | null;
527
+ /** The problem that ended the deepest failed invocation carrying one. */
528
+ problem: Problem | null;
529
+ /** True when a drawn line shows that problem, so the headline need not. */
530
+ shownOnLine: boolean;
531
+ }
532
+ /** A snapshot as the simple style draws it. */
533
+ interface SimpleProgress {
534
+ status: RunProgressStatus;
535
+ mode: ProgressMode;
536
+ /** Set when the run failed. */
537
+ failure: SimpleRunFailure | null;
538
+ runNote: SimpleRunNote | null;
539
+ /**
540
+ * The entry sequence, which no line stands for, being tried again: the
541
+ * attempt it is on, while it runs. Any other entry pipe is a line, which
542
+ * carries its own retry.
543
+ */
544
+ retryAttempt: number | null;
545
+ /** The checklist's top-level lines. */
546
+ lines: SimpleProgressLine[];
547
+ }
548
+ interface SimpleProgressOptions {
549
+ /**
550
+ * The method's pipes, keyed by `pipe_ref`, of the version that ran. Without
551
+ * it every line is titled by its humanized pipe code and no upcoming line is
552
+ * drawn.
553
+ */
554
+ pipeRegistry?: TimelinePipeRegistry;
555
+ /**
556
+ * The `pipe_ref` of the run's entry pipe. A snapshot names it once the entry
557
+ * pipe starts; before that, it is what lets a pending run list the steps it
558
+ * will take.
559
+ */
560
+ entryPipeRef?: string;
561
+ /** The lines the reader opened (`true`) or closed (`false`), by key. A line absent from it takes its default. */
562
+ expanded?: Readonly<Record<string, boolean>>;
563
+ /** A parallel with more branches than this folds its finished ones. Defaults to `DEFAULT_WIDE_PARALLEL_THRESHOLD`. */
564
+ wideParallelThreshold?: number;
565
+ }
566
+ /**
567
+ * The checklist the simple style draws for a snapshot.
568
+ *
569
+ * When the entry pipe is a sequence it has no line of its own: its steps are
570
+ * the top-level lines, followed while it runs by the steps the registry
571
+ * declares that the run has not reached. Any other entry pipe is a top-level
572
+ * line itself. A batch is one line, never a line per item. A group's children
573
+ * are drawn while its work is going on or has failed, and folded once it has
574
+ * ended, unless `expanded` says otherwise; past `SIMPLE_MAX_DEPTH` the work
575
+ * beneath a group is one "now" line. A wide parallel folds its finished
576
+ * branches into one line. Annotations of work no line shows are shown on the
577
+ * nearest drawn line.
578
+ *
579
+ * Pure, and a function of its arguments alone.
580
+ */
581
+ declare function buildSimpleProgress(snapshot: ProgressSnapshot, options?: SimpleProgressOptions): SimpleProgress;
582
+ /**
583
+ * What changed between two readings of one run that a reader who cannot see
584
+ * the checklist is told: the top-level lines that ended or started, and
585
+ * whether the run ended. Titles come in drawing order.
586
+ */
587
+ interface SimpleProgressChange {
588
+ done: string[];
589
+ failed: string[];
590
+ started: string[];
591
+ runEnded: boolean;
592
+ }
593
+ /**
594
+ * The change from one projection of a run to the next. A top-level line counts
595
+ * once, when it reaches its state: a line that was already done is not done
596
+ * again, and opening or closing a group changes nothing.
597
+ */
598
+ declare function simpleProgressChanges(previous: SimpleProgress, current: SimpleProgress): SimpleProgressChange;
599
+
600
+ export { BatchProgress, DEFAULT_BATCH_PAGE_SIZE, DEFAULT_WIDE_BATCH_THRESHOLD, DEFAULT_WIDE_PARALLEL_THRESHOLD, InvocationStatus, type InvocationTimes, KEPT_VISIBLE_REASON, type KeptVisibleReason, PathSegment, ProgressDegradation, ProgressInvocation, ProgressMode, ProgressSnapshot, ProgressTimestamp, RunProgressStatus, SIMPLE_LINE_KIND, SIMPLE_LINE_STATE, SIMPLE_MAX_DEPTH, SIMPLE_RUN_NOTE_REASON, type SimpleItemTally, type SimpleLineHealth, type SimpleLineKind, type SimpleLineState, type SimpleOutcome, type SimpleProgress, type SimpleProgressChange, type SimpleProgressLine, type SimpleProgressOptions, type SimpleRunFailure, type SimpleRunNote, type SimpleRunNoteReason, type SnapshotTimes, TIMELINE_ENTRY_KIND, type TimelineBar, type TimelineBatch, type TimelineBatchPage, type TimelineEntry, type TimelineEntryKind, type TimelineItemPager, type TimelineOutcome, TimelinePipeRegistry, type TimelineRow, type TimelineRowsOptions, type TimelineStripSegment, type TimelineTick, type TimelineTroubleJump, type TimelineWindow, axisPercent, barFollowsClock, buildSimpleProgress, buildTimelineRows, formatClockTime, formatDuration, fresherSnapshot, invocationBar, invocationTimes, isSameProgressStream, isTimelineRow, progressStreamKey, readingClockMs, simpleProgressChanges, snapshotTimes, timelineTicks, timelineWindow, timelineWindowAt };
@@ -1,14 +1,28 @@
1
1
  import {
2
+ DEFAULT_BATCH_PAGE_SIZE,
3
+ DEFAULT_TIMELINE_STYLE,
2
4
  DEFAULT_WIDE_BATCH_THRESHOLD,
5
+ DEFAULT_WIDE_PARALLEL_THRESHOLD,
3
6
  DEGRADATION_REASON,
4
7
  INVOCATION_STATUS,
5
8
  KEPT_VISIBLE_REASON,
6
9
  PATH_SEGMENT_KIND,
7
10
  PROGRESS_MODE,
8
11
  RUN_PROGRESS_STATUS,
12
+ SIMPLE_LINE_KIND,
13
+ SIMPLE_LINE_STATE,
14
+ SIMPLE_MAX_DEPTH,
15
+ SIMPLE_RUN_NOTE_REASON,
16
+ TIMELINE_ENTRY_KIND,
17
+ TIMELINE_STYLE,
18
+ TIMELINE_STYLES,
19
+ TIMELINE_STYLE_IDS,
9
20
  axisPercent,
10
21
  barFollowsClock,
22
+ buildInvocationTree,
23
+ buildSimpleProgress,
11
24
  buildTimelineRows,
25
+ compareSiblings,
12
26
  compareTimestamps,
13
27
  decodeOutcomeKey,
14
28
  formatClockTime,
@@ -17,33 +31,66 @@ import {
17
31
  invocationBar,
18
32
  invocationPathDepth,
19
33
  invocationTimes,
34
+ isItemNode,
20
35
  isOrdinalSegment,
36
+ isOutcomeNode,
21
37
  isRunEnded,
22
38
  isSameProgressStream,
39
+ isTimelineRow,
40
+ isTimelineStyleId,
41
+ joinBatch,
42
+ joinedSequence,
23
43
  lastPathSegment,
24
44
  parentInvocationPath,
25
45
  parsePathSegment,
46
+ pipeOf,
26
47
  progressStreamKey,
48
+ qualifyPipeCode,
27
49
  readingClockMs,
50
+ resolveTimelineStyle,
51
+ resolveTimelineStyleMenu,
52
+ sequenceMatches,
53
+ sequenceOf,
54
+ simpleProgressChanges,
28
55
  snapshotTimes,
29
56
  splitInvocationPath,
57
+ stepAt,
58
+ stepNumberOf,
59
+ stepsAfter,
30
60
  timelineTicks,
31
61
  timelineWindow,
32
62
  timelineWindowAt,
33
- timestampMs
34
- } from "../chunk-JJG2TO7P.js";
63
+ timestampMs,
64
+ titleOf
65
+ } from "../chunk-6S5TQPTO.js";
66
+ import "../chunk-P6IGZVWE.js";
67
+ import "../chunk-4KLE62AN.js";
35
68
  import "../chunk-2NMEKWO5.js";
36
69
  export {
70
+ DEFAULT_BATCH_PAGE_SIZE,
71
+ DEFAULT_TIMELINE_STYLE,
37
72
  DEFAULT_WIDE_BATCH_THRESHOLD,
73
+ DEFAULT_WIDE_PARALLEL_THRESHOLD,
38
74
  DEGRADATION_REASON,
39
75
  INVOCATION_STATUS,
40
76
  KEPT_VISIBLE_REASON,
41
77
  PATH_SEGMENT_KIND,
42
78
  PROGRESS_MODE,
43
79
  RUN_PROGRESS_STATUS,
80
+ SIMPLE_LINE_KIND,
81
+ SIMPLE_LINE_STATE,
82
+ SIMPLE_MAX_DEPTH,
83
+ SIMPLE_RUN_NOTE_REASON,
84
+ TIMELINE_ENTRY_KIND,
85
+ TIMELINE_STYLE,
86
+ TIMELINE_STYLES,
87
+ TIMELINE_STYLE_IDS,
44
88
  axisPercent,
45
89
  barFollowsClock,
90
+ buildInvocationTree,
91
+ buildSimpleProgress,
46
92
  buildTimelineRows,
93
+ compareSiblings,
47
94
  compareTimestamps,
48
95
  decodeOutcomeKey,
49
96
  formatClockTime,
@@ -52,19 +99,36 @@ export {
52
99
  invocationBar,
53
100
  invocationPathDepth,
54
101
  invocationTimes,
102
+ isItemNode,
55
103
  isOrdinalSegment,
104
+ isOutcomeNode,
56
105
  isRunEnded,
57
106
  isSameProgressStream,
107
+ isTimelineRow,
108
+ isTimelineStyleId,
109
+ joinBatch,
110
+ joinedSequence,
58
111
  lastPathSegment,
59
112
  parentInvocationPath,
60
113
  parsePathSegment,
114
+ pipeOf,
61
115
  progressStreamKey,
116
+ qualifyPipeCode,
62
117
  readingClockMs,
118
+ resolveTimelineStyle,
119
+ resolveTimelineStyleMenu,
120
+ sequenceMatches,
121
+ sequenceOf,
122
+ simpleProgressChanges,
63
123
  snapshotTimes,
64
124
  splitInvocationPath,
125
+ stepAt,
126
+ stepNumberOf,
127
+ stepsAfter,
65
128
  timelineTicks,
66
129
  timelineWindow,
67
130
  timelineWindowAt,
68
- timestampMs
131
+ timestampMs,
132
+ titleOf
69
133
  };
70
134
  //# sourceMappingURL=index.js.map