@pipelex/mthds-ui 0.39.0 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/chunk-7JZBXBZS.js +258 -0
- package/dist/chunk-7JZBXBZS.js.map +1 -0
- package/dist/{chunk-AGFLCOWW.js → chunk-HPARBH6K.js} +14 -197
- package/dist/chunk-HPARBH6K.js.map +1 -0
- package/dist/chunk-N2F62MW7.js +55 -0
- package/dist/chunk-N2F62MW7.js.map +1 -0
- package/dist/chunk-P6IGZVWE.js +155 -0
- package/dist/chunk-P6IGZVWE.js.map +1 -0
- package/dist/chunk-RU3CIXFC.js +1251 -0
- package/dist/chunk-RU3CIXFC.js.map +1 -0
- package/dist/form/react/index.d.ts +1 -1
- package/dist/graph/index.d.ts +19 -3
- package/dist/graph/index.js +20 -12
- package/dist/graph/react/index.d.ts +13 -13
- package/dist/graph/react/index.js +387 -560
- package/dist/graph/react/index.js.map +1 -1
- package/dist/graph/react/viewer/GraphToolbar.css +2 -107
- package/dist/graph/react/viewer/StyleMenu.css +109 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -12
- package/dist/registryJoin-C6Wfkik-.d.ts +441 -0
- package/dist/standalone/graph-standalone.html +171 -166
- package/dist/standalone/graph-viewer.css +74 -69
- package/dist/standalone/graph-viewer.js +97 -97
- package/dist/static-graph/index.d.ts +1 -1
- package/dist/timeline/index.d.ts +240 -77
- package/dist/timeline/index.js +61 -3
- package/dist/timeline/react/RunTimeline.css +48 -0
- package/dist/timeline/react/index.d.ts +46 -4
- package/dist/timeline/react/index.js +774 -105
- package/dist/timeline/react/index.js.map +1 -1
- package/dist/timeline/react/styles/simple/SimpleProgress.css +354 -0
- package/dist/{types-DsrzH6gM.d.ts → types-DLAnYNoi.d.ts} +1 -1
- package/package.json +3 -1
- package/dist/chunk-AGFLCOWW.js.map +0 -1
- package/dist/chunk-ILZJIORT.js +0 -54
- package/dist/chunk-ILZJIORT.js.map +0 -1
- package/dist/chunk-JJG2TO7P.js +0 -473
- package/dist/chunk-JJG2TO7P.js.map +0 -1
- package/dist/progressSnapshot-VZ4PLul9.d.ts +0 -191
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ConceptInfo, P as PipeBlueprintUnion,
|
|
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
|
|
package/dist/timeline/index.d.ts
CHANGED
|
@@ -1,79 +1,7 @@
|
|
|
1
|
-
import { P as ProgressSnapshot, B as BatchProgress, I as InvocationStatus,
|
|
2
|
-
export { C as ConditionProgress, D as DEGRADATION_REASON, E as ExecutionAttempt,
|
|
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
|
|
@@ -336,4 +264,239 @@ declare function formatDuration(ms: number): string;
|
|
|
336
264
|
/** A moment as its UTC time of day, to the millisecond: `09:30:07.034 UTC`. */
|
|
337
265
|
declare function formatClockTime(ms: number): string;
|
|
338
266
|
|
|
339
|
-
|
|
267
|
+
/**
|
|
268
|
+
* The simple timeline style's projection: a progress snapshot, joined to the
|
|
269
|
+
* method's pipe registry, as a checklist of lines in the method's own words.
|
|
270
|
+
*
|
|
271
|
+
* Pure and language-free. A line carries its kind, its state, its title as the
|
|
272
|
+
* author wrote it, its counts, its outcome and its health as data, never a
|
|
273
|
+
* sentence: the React view words them through its strings table, and a host can
|
|
274
|
+
* read the same lines to word progress elsewhere. It keys nothing on time, so
|
|
275
|
+
* the view keeps every line it drew in place across snapshots and only the
|
|
276
|
+
* durations move with the clock.
|
|
277
|
+
*/
|
|
278
|
+
|
|
279
|
+
/** What a line stands for. */
|
|
280
|
+
declare const SIMPLE_LINE_KIND: {
|
|
281
|
+
/** An operator: one piece of work. */
|
|
282
|
+
readonly STEP: "step";
|
|
283
|
+
/** A sequence, or a pipe of a type the style does not know that holds work of its own. */
|
|
284
|
+
readonly GROUP: "group";
|
|
285
|
+
/** A parallel: work done at the same time. */
|
|
286
|
+
readonly TOGETHER: "together";
|
|
287
|
+
/** A condition, followed by the outcome it took. */
|
|
288
|
+
readonly DECISION: "decision";
|
|
289
|
+
/** A batch: one line for all its items, titled by its branch, with their counts. */
|
|
290
|
+
readonly FOR_EACH: "forEach";
|
|
291
|
+
/** In an expanded batch, one step of its branch, its states counted across the items. */
|
|
292
|
+
readonly BRANCH_STEP: "branchStep";
|
|
293
|
+
/** In a wide parallel, its finished branches folded into one line. */
|
|
294
|
+
readonly FINISHED: "finished";
|
|
295
|
+
/** Past the indentation cap, the deepest work going on beneath a line. */
|
|
296
|
+
readonly NOW: "now";
|
|
297
|
+
};
|
|
298
|
+
type SimpleLineKind = (typeof SIMPLE_LINE_KIND)[keyof typeof SIMPLE_LINE_KIND];
|
|
299
|
+
/** Where a line's work stands. */
|
|
300
|
+
declare const SIMPLE_LINE_STATE: {
|
|
301
|
+
/** Not started: a step the method declares that the run has not reached, or a scheduled item. */
|
|
302
|
+
readonly UPCOMING: "upcoming";
|
|
303
|
+
readonly RUNNING: "running";
|
|
304
|
+
readonly DONE: "done";
|
|
305
|
+
readonly FAILED: "failed";
|
|
306
|
+
/** Skipped: a successful end with no output of its own. */
|
|
307
|
+
readonly SKIPPED: "skipped";
|
|
308
|
+
/** Canceled: it had not ended when the run ended. */
|
|
309
|
+
readonly STOPPED: "stopped";
|
|
310
|
+
/** A step the method declares that its sequence, failed or canceled, never reached. */
|
|
311
|
+
readonly NOT_RUN: "notRun";
|
|
312
|
+
};
|
|
313
|
+
type SimpleLineState = (typeof SIMPLE_LINE_STATE)[keyof typeof SIMPLE_LINE_STATE];
|
|
314
|
+
/** Why the run itself carries a note under the headline. */
|
|
315
|
+
declare const SIMPLE_RUN_NOTE_REASON: {
|
|
316
|
+
/** The run status could not be read, so the progress may be out of date. */
|
|
317
|
+
readonly UNREACHABLE: "unreachable";
|
|
318
|
+
/** The run is not making progress, at no invocation a line stands for. */
|
|
319
|
+
readonly STUCK: "stuck";
|
|
320
|
+
/** A reason the style does not know: the degradation's own message tells it. */
|
|
321
|
+
readonly OTHER: "other";
|
|
322
|
+
};
|
|
323
|
+
type SimpleRunNoteReason = (typeof SIMPLE_RUN_NOTE_REASON)[keyof typeof SIMPLE_RUN_NOTE_REASON];
|
|
324
|
+
/** A parallel with more branches than this folds its finished branches into one line. */
|
|
325
|
+
declare const DEFAULT_WIDE_PARALLEL_THRESHOLD = 5;
|
|
326
|
+
/**
|
|
327
|
+
* The deepest a line is drawn at, the top being 0. A group at this depth draws
|
|
328
|
+
* no line for its children: the deepest work going on beneath it is one "now"
|
|
329
|
+
* line instead, so a method nested five levels deep still reads as a short list.
|
|
330
|
+
*/
|
|
331
|
+
declare const SIMPLE_MAX_DEPTH = 2;
|
|
332
|
+
/** On a decision, the outcome it took; on a branch of a condition that resolved none, the outcome it stands for. */
|
|
333
|
+
interface SimpleOutcome {
|
|
334
|
+
/** The outcome map's key, decoded; `null` for the default outcome. */
|
|
335
|
+
key: string | null;
|
|
336
|
+
/** True when it is the condition's `selected_outcome`, false when read off the branch's path. */
|
|
337
|
+
resolved: boolean;
|
|
338
|
+
}
|
|
339
|
+
/** On a branch step of an expanded batch, how many items stand at each state of it. */
|
|
340
|
+
interface SimpleItemTally {
|
|
341
|
+
done: number;
|
|
342
|
+
running: number;
|
|
343
|
+
failed: number;
|
|
344
|
+
skipped: number;
|
|
345
|
+
stopped: number;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* What a line says of its health, from its own invocation and from the work it
|
|
349
|
+
* stands for that no line of its own shows: inside a folded group, a batch's
|
|
350
|
+
* items, or the steps past the indentation cap.
|
|
351
|
+
*/
|
|
352
|
+
interface SimpleLineHealth {
|
|
353
|
+
/**
|
|
354
|
+
* The work is being tried again: the attempt it is on, the highest among the
|
|
355
|
+
* hidden work it stands for. Never set once the work has ended: a recovered
|
|
356
|
+
* invocation reads as done and nothing more.
|
|
357
|
+
*/
|
|
358
|
+
retryAttempt: number | null;
|
|
359
|
+
/**
|
|
360
|
+
* On a line that counts items, a for-each line or a branch step, how many
|
|
361
|
+
* items are being tried again there, the item itself or anything beneath it;
|
|
362
|
+
* an opened for-each line counts only the items themselves, its branch steps
|
|
363
|
+
* counting the rest. Such a line has no `retryAttempt`: each item has its own.
|
|
364
|
+
*/
|
|
365
|
+
retryingItems: number;
|
|
366
|
+
/** The run is stuck here, or in the hidden work this line stands for. */
|
|
367
|
+
degradation: ProgressDegradation | null;
|
|
368
|
+
/** On a line that counts items, how many items hold an invocation there where the run is stuck. */
|
|
369
|
+
stuckItems: number;
|
|
370
|
+
/**
|
|
371
|
+
* On a failed line no drawn line beneath shows the failure of: the problem
|
|
372
|
+
* that ended the deepest failed invocation it stands for, when the snapshot
|
|
373
|
+
* carries one.
|
|
374
|
+
*/
|
|
375
|
+
problem: Problem | null;
|
|
376
|
+
}
|
|
377
|
+
/** One line of the checklist. */
|
|
378
|
+
interface SimpleProgressLine {
|
|
379
|
+
/**
|
|
380
|
+
* Stable across snapshots: the invocation's path, or for an upcoming line the
|
|
381
|
+
* path its step will have, so a line keeps its place when its step starts.
|
|
382
|
+
* A branch step's key is the batch's path, then a `*` segment standing for
|
|
383
|
+
* every item, then the step's segment; a folded line's is the path it folds
|
|
384
|
+
* beneath followed by `#finished` or `#now`.
|
|
385
|
+
*/
|
|
386
|
+
key: string;
|
|
387
|
+
kind: SimpleLineKind;
|
|
388
|
+
state: SimpleLineState;
|
|
389
|
+
/** The pipe's description as a title, or its humanized code when the registry has none. */
|
|
390
|
+
title: string;
|
|
391
|
+
titleFromDescription: boolean;
|
|
392
|
+
/** On a for-each line, the item's name in a sentence (`filing`), `null` when the registry does not name it. */
|
|
393
|
+
forEachItem: string | null;
|
|
394
|
+
outcome: SimpleOutcome | null;
|
|
395
|
+
/**
|
|
396
|
+
* On a for-each line, the snapshot's counts, `null` before it fans out; on a
|
|
397
|
+
* branch step that is itself a batch, its items' counts summed across the
|
|
398
|
+
* outer items.
|
|
399
|
+
*/
|
|
400
|
+
counts: BatchProgress | null;
|
|
401
|
+
/**
|
|
402
|
+
* On a for-each line, how many of its items were skipped whole. The
|
|
403
|
+
* contract's `done` counts them, so `done - skippedItems` is how many
|
|
404
|
+
* finished their work.
|
|
405
|
+
*/
|
|
406
|
+
skippedItems: number;
|
|
407
|
+
/** On a branch step, how many items stand at each of its states. */
|
|
408
|
+
tally: SimpleItemTally | null;
|
|
409
|
+
/** On a finished line, how many branches it folds. */
|
|
410
|
+
foldedCount: number | null;
|
|
411
|
+
health: SimpleLineHealth | null;
|
|
412
|
+
/** The invocation it stands for; `null` on an upcoming, branch-step or finished line. */
|
|
413
|
+
invocation: ProgressInvocation | null;
|
|
414
|
+
/** True when the reader can open or close it. */
|
|
415
|
+
expandable: boolean;
|
|
416
|
+
/** True when its children are drawn. */
|
|
417
|
+
expanded: boolean;
|
|
418
|
+
children: SimpleProgressLine[];
|
|
419
|
+
}
|
|
420
|
+
/** The run's own degradation, when no line carries it. */
|
|
421
|
+
interface SimpleRunNote {
|
|
422
|
+
reason: SimpleRunNoteReason;
|
|
423
|
+
degradation: ProgressDegradation;
|
|
424
|
+
}
|
|
425
|
+
/** Where a failed run failed. */
|
|
426
|
+
interface SimpleRunFailure {
|
|
427
|
+
/** The top-level line holding the deepest failure, `null` when the entry pipe itself failed with nothing beneath it failing. */
|
|
428
|
+
lineKey: string | null;
|
|
429
|
+
/** The problem that ended the deepest failed invocation carrying one. */
|
|
430
|
+
problem: Problem | null;
|
|
431
|
+
/** True when a drawn line shows that problem, so the headline need not. */
|
|
432
|
+
shownOnLine: boolean;
|
|
433
|
+
}
|
|
434
|
+
/** A snapshot as the simple style draws it. */
|
|
435
|
+
interface SimpleProgress {
|
|
436
|
+
status: RunProgressStatus;
|
|
437
|
+
mode: ProgressMode;
|
|
438
|
+
/** Set when the run failed. */
|
|
439
|
+
failure: SimpleRunFailure | null;
|
|
440
|
+
runNote: SimpleRunNote | null;
|
|
441
|
+
/**
|
|
442
|
+
* The entry sequence, which no line stands for, being tried again: the
|
|
443
|
+
* attempt it is on, while it runs. Any other entry pipe is a line, which
|
|
444
|
+
* carries its own retry.
|
|
445
|
+
*/
|
|
446
|
+
retryAttempt: number | null;
|
|
447
|
+
/** The checklist's top-level lines. */
|
|
448
|
+
lines: SimpleProgressLine[];
|
|
449
|
+
}
|
|
450
|
+
interface SimpleProgressOptions {
|
|
451
|
+
/**
|
|
452
|
+
* The method's pipes, keyed by `pipe_ref`, of the version that ran. Without
|
|
453
|
+
* it every line is titled by its humanized pipe code and no upcoming line is
|
|
454
|
+
* drawn.
|
|
455
|
+
*/
|
|
456
|
+
pipeRegistry?: TimelinePipeRegistry;
|
|
457
|
+
/**
|
|
458
|
+
* The `pipe_ref` of the run's entry pipe. A snapshot names it once the entry
|
|
459
|
+
* pipe starts; before that, it is what lets a pending run list the steps it
|
|
460
|
+
* will take.
|
|
461
|
+
*/
|
|
462
|
+
entryPipeRef?: string;
|
|
463
|
+
/** The lines the reader opened (`true`) or closed (`false`), by key. A line absent from it takes its default. */
|
|
464
|
+
expanded?: Readonly<Record<string, boolean>>;
|
|
465
|
+
/** A parallel with more branches than this folds its finished ones. Defaults to `DEFAULT_WIDE_PARALLEL_THRESHOLD`. */
|
|
466
|
+
wideParallelThreshold?: number;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* The checklist the simple style draws for a snapshot.
|
|
470
|
+
*
|
|
471
|
+
* When the entry pipe is a sequence it has no line of its own: its steps are
|
|
472
|
+
* the top-level lines, followed while it runs by the steps the registry
|
|
473
|
+
* declares that the run has not reached. Any other entry pipe is a top-level
|
|
474
|
+
* line itself. A batch is one line, never a line per item. A group's children
|
|
475
|
+
* are drawn while its work is going on or has failed, and folded once it has
|
|
476
|
+
* ended, unless `expanded` says otherwise; past `SIMPLE_MAX_DEPTH` the work
|
|
477
|
+
* beneath a group is one "now" line. A wide parallel folds its finished
|
|
478
|
+
* branches into one line. Annotations of work no line shows are shown on the
|
|
479
|
+
* nearest drawn line.
|
|
480
|
+
*
|
|
481
|
+
* Pure, and a function of its arguments alone.
|
|
482
|
+
*/
|
|
483
|
+
declare function buildSimpleProgress(snapshot: ProgressSnapshot, options?: SimpleProgressOptions): SimpleProgress;
|
|
484
|
+
/**
|
|
485
|
+
* What changed between two readings of one run that a reader who cannot see
|
|
486
|
+
* the checklist is told: the top-level lines that ended or started, and
|
|
487
|
+
* whether the run ended. Titles come in drawing order.
|
|
488
|
+
*/
|
|
489
|
+
interface SimpleProgressChange {
|
|
490
|
+
done: string[];
|
|
491
|
+
failed: string[];
|
|
492
|
+
started: string[];
|
|
493
|
+
runEnded: boolean;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* The change from one projection of a run to the next. A top-level line counts
|
|
497
|
+
* once, when it reaches its state: a line that was already done is not done
|
|
498
|
+
* again, and opening or closing a group changes nothing.
|
|
499
|
+
*/
|
|
500
|
+
declare function simpleProgressChanges(previous: SimpleProgress, current: SimpleProgress): SimpleProgressChange;
|
|
501
|
+
|
|
502
|
+
export { BatchProgress, 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, type TimelineBar, type TimelineBatch, type TimelineOutcome, TimelinePipeRegistry, type TimelineRow, type TimelineRowsOptions, type TimelineStripSegment, type TimelineTick, type TimelineWindow, axisPercent, barFollowsClock, buildSimpleProgress, buildTimelineRows, formatClockTime, formatDuration, fresherSnapshot, invocationBar, invocationTimes, isSameProgressStream, progressStreamKey, readingClockMs, simpleProgressChanges, snapshotTimes, timelineTicks, timelineWindow, timelineWindowAt };
|
package/dist/timeline/index.js
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DEFAULT_TIMELINE_STYLE,
|
|
2
3
|
DEFAULT_WIDE_BATCH_THRESHOLD,
|
|
4
|
+
DEFAULT_WIDE_PARALLEL_THRESHOLD,
|
|
3
5
|
DEGRADATION_REASON,
|
|
4
6
|
INVOCATION_STATUS,
|
|
5
7
|
KEPT_VISIBLE_REASON,
|
|
6
8
|
PATH_SEGMENT_KIND,
|
|
7
9
|
PROGRESS_MODE,
|
|
8
10
|
RUN_PROGRESS_STATUS,
|
|
11
|
+
SIMPLE_LINE_KIND,
|
|
12
|
+
SIMPLE_LINE_STATE,
|
|
13
|
+
SIMPLE_MAX_DEPTH,
|
|
14
|
+
SIMPLE_RUN_NOTE_REASON,
|
|
15
|
+
TIMELINE_STYLE,
|
|
16
|
+
TIMELINE_STYLES,
|
|
17
|
+
TIMELINE_STYLE_IDS,
|
|
9
18
|
axisPercent,
|
|
10
19
|
barFollowsClock,
|
|
20
|
+
buildInvocationTree,
|
|
21
|
+
buildSimpleProgress,
|
|
11
22
|
buildTimelineRows,
|
|
23
|
+
compareSiblings,
|
|
12
24
|
compareTimestamps,
|
|
13
25
|
decodeOutcomeKey,
|
|
14
26
|
formatClockTime,
|
|
@@ -17,33 +29,63 @@ import {
|
|
|
17
29
|
invocationBar,
|
|
18
30
|
invocationPathDepth,
|
|
19
31
|
invocationTimes,
|
|
32
|
+
isItemNode,
|
|
20
33
|
isOrdinalSegment,
|
|
34
|
+
isOutcomeNode,
|
|
21
35
|
isRunEnded,
|
|
22
36
|
isSameProgressStream,
|
|
37
|
+
isTimelineStyleId,
|
|
38
|
+
joinBatch,
|
|
39
|
+
joinedSequence,
|
|
23
40
|
lastPathSegment,
|
|
24
41
|
parentInvocationPath,
|
|
25
42
|
parsePathSegment,
|
|
43
|
+
pipeOf,
|
|
26
44
|
progressStreamKey,
|
|
45
|
+
qualifyPipeCode,
|
|
27
46
|
readingClockMs,
|
|
47
|
+
resolveTimelineStyle,
|
|
48
|
+
resolveTimelineStyleMenu,
|
|
49
|
+
sequenceMatches,
|
|
50
|
+
sequenceOf,
|
|
51
|
+
simpleProgressChanges,
|
|
28
52
|
snapshotTimes,
|
|
29
53
|
splitInvocationPath,
|
|
54
|
+
stepAt,
|
|
55
|
+
stepNumberOf,
|
|
56
|
+
stepsAfter,
|
|
30
57
|
timelineTicks,
|
|
31
58
|
timelineWindow,
|
|
32
59
|
timelineWindowAt,
|
|
33
|
-
timestampMs
|
|
34
|
-
|
|
60
|
+
timestampMs,
|
|
61
|
+
titleOf
|
|
62
|
+
} from "../chunk-RU3CIXFC.js";
|
|
63
|
+
import "../chunk-P6IGZVWE.js";
|
|
64
|
+
import "../chunk-4KLE62AN.js";
|
|
35
65
|
import "../chunk-2NMEKWO5.js";
|
|
36
66
|
export {
|
|
67
|
+
DEFAULT_TIMELINE_STYLE,
|
|
37
68
|
DEFAULT_WIDE_BATCH_THRESHOLD,
|
|
69
|
+
DEFAULT_WIDE_PARALLEL_THRESHOLD,
|
|
38
70
|
DEGRADATION_REASON,
|
|
39
71
|
INVOCATION_STATUS,
|
|
40
72
|
KEPT_VISIBLE_REASON,
|
|
41
73
|
PATH_SEGMENT_KIND,
|
|
42
74
|
PROGRESS_MODE,
|
|
43
75
|
RUN_PROGRESS_STATUS,
|
|
76
|
+
SIMPLE_LINE_KIND,
|
|
77
|
+
SIMPLE_LINE_STATE,
|
|
78
|
+
SIMPLE_MAX_DEPTH,
|
|
79
|
+
SIMPLE_RUN_NOTE_REASON,
|
|
80
|
+
TIMELINE_STYLE,
|
|
81
|
+
TIMELINE_STYLES,
|
|
82
|
+
TIMELINE_STYLE_IDS,
|
|
44
83
|
axisPercent,
|
|
45
84
|
barFollowsClock,
|
|
85
|
+
buildInvocationTree,
|
|
86
|
+
buildSimpleProgress,
|
|
46
87
|
buildTimelineRows,
|
|
88
|
+
compareSiblings,
|
|
47
89
|
compareTimestamps,
|
|
48
90
|
decodeOutcomeKey,
|
|
49
91
|
formatClockTime,
|
|
@@ -52,19 +94,35 @@ export {
|
|
|
52
94
|
invocationBar,
|
|
53
95
|
invocationPathDepth,
|
|
54
96
|
invocationTimes,
|
|
97
|
+
isItemNode,
|
|
55
98
|
isOrdinalSegment,
|
|
99
|
+
isOutcomeNode,
|
|
56
100
|
isRunEnded,
|
|
57
101
|
isSameProgressStream,
|
|
102
|
+
isTimelineStyleId,
|
|
103
|
+
joinBatch,
|
|
104
|
+
joinedSequence,
|
|
58
105
|
lastPathSegment,
|
|
59
106
|
parentInvocationPath,
|
|
60
107
|
parsePathSegment,
|
|
108
|
+
pipeOf,
|
|
61
109
|
progressStreamKey,
|
|
110
|
+
qualifyPipeCode,
|
|
62
111
|
readingClockMs,
|
|
112
|
+
resolveTimelineStyle,
|
|
113
|
+
resolveTimelineStyleMenu,
|
|
114
|
+
sequenceMatches,
|
|
115
|
+
sequenceOf,
|
|
116
|
+
simpleProgressChanges,
|
|
63
117
|
snapshotTimes,
|
|
64
118
|
splitInvocationPath,
|
|
119
|
+
stepAt,
|
|
120
|
+
stepNumberOf,
|
|
121
|
+
stepsAfter,
|
|
65
122
|
timelineTicks,
|
|
66
123
|
timelineWindow,
|
|
67
124
|
timelineWindowAt,
|
|
68
|
-
timestampMs
|
|
125
|
+
timestampMs,
|
|
126
|
+
titleOf
|
|
69
127
|
};
|
|
70
128
|
//# sourceMappingURL=index.js.map
|
|
@@ -434,6 +434,54 @@
|
|
|
434
434
|
border: 0;
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
+
/* ─── The header's style menu ───────────────────────────────────────────── */
|
|
438
|
+
/* The list is the graph viewer's (`StyleMenu.css`); the button is drawn */
|
|
439
|
+
/* here, in the header's own vocabulary. */
|
|
440
|
+
|
|
441
|
+
.mthds-run-timeline-header-end {
|
|
442
|
+
margin-left: auto;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.mthds-run-timeline-style-btn {
|
|
446
|
+
display: inline-flex;
|
|
447
|
+
align-items: center;
|
|
448
|
+
justify-content: center;
|
|
449
|
+
width: 26px;
|
|
450
|
+
height: 26px;
|
|
451
|
+
padding: 0;
|
|
452
|
+
border: 1px solid var(--border-default);
|
|
453
|
+
border-radius: 6px;
|
|
454
|
+
background: var(--surface-sunken);
|
|
455
|
+
color: var(--text-secondary);
|
|
456
|
+
cursor: pointer;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.mthds-run-timeline-style-btn:hover,
|
|
460
|
+
.mthds-run-timeline-style-btn--open {
|
|
461
|
+
border-color: var(--border-strong);
|
|
462
|
+
background: var(--surface-elevated-hover);
|
|
463
|
+
color: var(--text-primary);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.mthds-run-timeline-style-btn:focus-visible {
|
|
467
|
+
outline: 2px solid var(--focus-ring);
|
|
468
|
+
outline-offset: 1px;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/* On a phone the button is a 44×44 target, as the graph toolbar's are. */
|
|
472
|
+
@media (max-width: 639.98px) {
|
|
473
|
+
.mthds-run-timeline-style-btn {
|
|
474
|
+
width: 44px;
|
|
475
|
+
height: 44px;
|
|
476
|
+
border-radius: 8px;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.mthds-run-timeline-style-btn svg {
|
|
480
|
+
width: 18px;
|
|
481
|
+
height: 18px;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
437
485
|
/* ─── Narrow: each row on two lines, its bar across the whole width ───────── */
|
|
438
486
|
|
|
439
487
|
@container mthds-run-timeline (max-width: 560px) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { G as GraphThemeMode, a as GraphTheme } from '../../types-
|
|
3
|
-
import { P as ProgressSnapshot, a as ProgressTimestamp } from '../../
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { G as GraphThemeMode, a as GraphTheme } from '../../types-DLAnYNoi.js';
|
|
3
|
+
import { P as ProgressSnapshot, a as ProgressTimestamp, T as TimelineStyleId, b as TimelinePipeRegistry } from '../../registryJoin-C6Wfkik-.js';
|
|
4
4
|
import 'mthds/errors';
|
|
5
5
|
|
|
6
6
|
interface RunTimelineProps {
|
|
@@ -41,8 +41,50 @@ interface RunTimelineProps {
|
|
|
41
41
|
* draws each snapshot as of its `assembled_at`. Defaults to `true`.
|
|
42
42
|
*/
|
|
43
43
|
live?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The style the timeline draws in: `detailed`, the default, every invocation
|
|
46
|
+
* as a bar on a shared time axis; or `simple`, the run as a checklist of its
|
|
47
|
+
* steps in the method's own words, a batch as one line with its counts.
|
|
48
|
+
* Reactive, like `theme`: passing it drives the active style, and clearing it
|
|
49
|
+
* back to `undefined` hands control to the default. The header's style menu,
|
|
50
|
+
* when shown, changes it too. An id this version does not know is treated as
|
|
51
|
+
* unset. This library persists nothing: the host keeps the choice, reported
|
|
52
|
+
* by `onTimelineStyleChange`.
|
|
53
|
+
*/
|
|
54
|
+
timelineStyle?: TimelineStyleId;
|
|
55
|
+
/**
|
|
56
|
+
* Called whenever the style changes — from the menu, or from a prop update —
|
|
57
|
+
* so the host can persist it. Not called on mount.
|
|
58
|
+
*/
|
|
59
|
+
onTimelineStyleChange?: (style: TimelineStyleId) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Show a style menu at the end of the header. Opt-in: `true` offers every
|
|
62
|
+
* registered style in registry order, a list offers those styles in that
|
|
63
|
+
* order, and the default offers no menu, for a host that fixes the style for
|
|
64
|
+
* its audience. A menu needs two styles to choose between.
|
|
65
|
+
*/
|
|
66
|
+
styleMenu?: boolean | readonly TimelineStyleId[];
|
|
67
|
+
/**
|
|
68
|
+
* The registry of the method's pipes, keyed by `pipe_ref`, as a `GraphSpec`'s
|
|
69
|
+
* `pipe_registry`: the simple style titles its lines from the pipes'
|
|
70
|
+
* descriptions, names a batch's item, and lists the steps the run has not
|
|
71
|
+
* reached. Without it each line is titled by its humanized pipe code. The
|
|
72
|
+
* detailed style does not read it.
|
|
73
|
+
*/
|
|
74
|
+
pipeRegistry?: TimelinePipeRegistry;
|
|
75
|
+
/**
|
|
76
|
+
* The `pipe_ref` of the pipe the run starts from. A snapshot taken before
|
|
77
|
+
* anything started names no pipe, so with it and `pipeRegistry` the simple
|
|
78
|
+
* style lists the run's steps from the start.
|
|
79
|
+
*/
|
|
80
|
+
entryPipeRef?: string;
|
|
44
81
|
/** A batch holding more items than this starts collapsed. Defaults to `DEFAULT_WIDE_BATCH_THRESHOLD`. */
|
|
45
82
|
wideBatchThreshold?: number;
|
|
83
|
+
/**
|
|
84
|
+
* In the simple style, a parallel with more branches than this folds its
|
|
85
|
+
* finished branches into one line. Defaults to `DEFAULT_WIDE_PARALLEL_THRESHOLD`.
|
|
86
|
+
*/
|
|
87
|
+
wideParallelThreshold?: number;
|
|
46
88
|
/** Appended to the container's class list. */
|
|
47
89
|
className?: string;
|
|
48
90
|
}
|
|
@@ -64,6 +106,6 @@ interface RunTimelineProps {
|
|
|
64
106
|
* row in place and what the reader expanded expanded. While the clock ticks,
|
|
65
107
|
* only the axis and the rows whose bars follow the clock are drawn again.
|
|
66
108
|
*/
|
|
67
|
-
declare function RunTimeline({ snapshot, theme, systemTheme, paletteColors, now, live, wideBatchThreshold, className, }: RunTimelineProps):
|
|
109
|
+
declare function RunTimeline({ snapshot, theme, systemTheme, paletteColors, now, live, timelineStyle, onTimelineStyleChange, styleMenu, pipeRegistry, entryPipeRef, wideBatchThreshold, wideParallelThreshold, className, }: RunTimelineProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
68
110
|
|
|
69
111
|
export { RunTimeline, type RunTimelineProps };
|