@tangle-network/sandbox-ui 0.76.0 → 0.77.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.
|
@@ -260,9 +260,11 @@ var STATUS_QUEUED = "hsl(var(--muted-foreground))";
|
|
|
260
260
|
var STATUS_DONE = "var(--surface-success-text)";
|
|
261
261
|
var STATUS_FAILED = "var(--surface-danger-text)";
|
|
262
262
|
var STATUS_RUNNING = "hsl(var(--primary))";
|
|
263
|
+
var STATUS_WAITING = "var(--surface-warning-text)";
|
|
263
264
|
var STATUS_COLOR = {
|
|
264
265
|
queued: STATUS_QUEUED,
|
|
265
266
|
running: STATUS_RUNNING,
|
|
267
|
+
waiting: STATUS_WAITING,
|
|
266
268
|
succeeded: STATUS_DONE,
|
|
267
269
|
failed: STATUS_FAILED
|
|
268
270
|
};
|
|
@@ -272,6 +274,7 @@ function edgeColor(status) {
|
|
|
272
274
|
var STATUS_LABEL = {
|
|
273
275
|
queued: "Queued",
|
|
274
276
|
running: "Running",
|
|
277
|
+
waiting: "Waiting on you",
|
|
275
278
|
succeeded: "Done",
|
|
276
279
|
failed: "Failed"
|
|
277
280
|
};
|
|
@@ -286,6 +289,11 @@ var STATUS_PILL = {
|
|
|
286
289
|
color: "hsl(var(--primary))",
|
|
287
290
|
borderColor: "color-mix(in srgb, hsl(var(--primary)) 40%, transparent)"
|
|
288
291
|
},
|
|
292
|
+
waiting: {
|
|
293
|
+
background: "var(--surface-warning-bg)",
|
|
294
|
+
color: "var(--surface-warning-text)",
|
|
295
|
+
borderColor: "var(--surface-warning-border)"
|
|
296
|
+
},
|
|
289
297
|
succeeded: {
|
|
290
298
|
background: "var(--surface-success-bg)",
|
|
291
299
|
color: "var(--surface-success-text)",
|
|
@@ -301,6 +309,7 @@ function statusBorder(status) {
|
|
|
301
309
|
const color = STATUS_COLOR[status];
|
|
302
310
|
switch (status) {
|
|
303
311
|
case "running":
|
|
312
|
+
case "waiting":
|
|
304
313
|
return {
|
|
305
314
|
borderColor: color,
|
|
306
315
|
boxShadow: `0 0 0 1px color-mix(in srgb, ${color} 45%, transparent), 0 0 24px -6px ${color}`
|
|
@@ -315,7 +324,7 @@ function statusBorder(status) {
|
|
|
315
324
|
}
|
|
316
325
|
}
|
|
317
326
|
function progressFill(status) {
|
|
318
|
-
return status === "succeeded" || status === "failed" ? "100%" : status === "running" ? "58%" : "6%";
|
|
327
|
+
return status === "succeeded" || status === "failed" ? "100%" : status === "running" || status === "waiting" ? "58%" : "6%";
|
|
319
328
|
}
|
|
320
329
|
var KIND_ICON = {
|
|
321
330
|
schedule: Clock,
|
|
@@ -395,6 +404,7 @@ function StatusFooter({
|
|
|
395
404
|
children: /* @__PURE__ */ jsx3(
|
|
396
405
|
"div",
|
|
397
406
|
{
|
|
407
|
+
"data-testid": "wf-node-progress",
|
|
398
408
|
className: `h-full ${status === "running" ? "animate-pulse" : ""}`,
|
|
399
409
|
style: {
|
|
400
410
|
width: progressFill(status),
|
package/dist/workflows.d.ts
CHANGED
|
@@ -12,7 +12,14 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
12
12
|
* so the spine stays a single readable column.
|
|
13
13
|
*/
|
|
14
14
|
type WfNodeTone = "trigger" | "structural" | "action";
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* A node's live run status. `waiting` is NOT a variant of `running`: the run has
|
|
17
|
+
* stopped at that node and makes no further progress until a human answers it (a
|
|
18
|
+
* `decision` step). Collapsing it into `running` tells the viewer the workflow is
|
|
19
|
+
* working when in fact it is blocked on THEM — so it gets its own colour, its own
|
|
20
|
+
* label, and a progress bar that does not move.
|
|
21
|
+
*/
|
|
22
|
+
type WfNodeStatus = "queued" | "running" | "waiting" | "succeeded" | "failed";
|
|
16
23
|
/**
|
|
17
24
|
* Live RUN state for one node, supplied by the host (keyed by node id) and
|
|
18
25
|
* merged onto {@link WfNodeData.state} at render time. Absent ⇒ the graph shows
|
package/dist/workflows.js
CHANGED
|
@@ -26,7 +26,7 @@ function retryImport(factory, retries = 2, delayMs = 350) {
|
|
|
26
26
|
function lazyWorkflowGraph() {
|
|
27
27
|
return lazy(
|
|
28
28
|
() => retryImport(
|
|
29
|
-
() => import("./WorkflowGraph-
|
|
29
|
+
() => import("./WorkflowGraph-SJ2SG5TP.js").then((m) => ({ default: m.WorkflowGraph }))
|
|
30
30
|
)
|
|
31
31
|
);
|
|
32
32
|
}
|
package/package.json
CHANGED