@pipelex/mthds-ui 0.58.1 → 0.58.3

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.
@@ -193,9 +193,7 @@
193
193
  pointer-events: auto;
194
194
  /* The error tint laid over the opaque panel surface, so the drawing beneath
195
195
  never shows through the text. */
196
- background:
197
- linear-gradient(var(--color-error-bg), var(--color-error-bg)),
198
- var(--surface-panel);
196
+ background: linear-gradient(var(--color-error-bg), var(--color-error-bg)), var(--surface-panel);
199
197
  box-shadow: var(--shadow-md);
200
198
  }
201
199
  .react-flow__node {
@@ -301,8 +301,10 @@ interface GraphViewerProps {
301
301
  *
302
302
  * The PDF's URL in a `ready` answer is framed only on the page's own origin,
303
303
  * as a root-relative path or an absolute URL there, as `resolveUrl`'s answer
304
- * is; an answer on another origin, such as a CDN or a presigned storage URL,
305
- * reads as `unavailable`.
304
+ * is. An answer on another origin, such as a CDN or a presigned storage URL,
305
+ * is drawn page by page from `loadBytes`, asked with that URL, when the host
306
+ * also passes `loadBytes` and `pdfWorker`, and reads as `unavailable`
307
+ * otherwise. A `failed` answer with `final: true` shows no Try again.
306
308
  */
307
309
  resolveDocumentPdf?: ResolveDocumentPdf;
308
310
  /**
@@ -311,7 +313,8 @@ interface GraphViewerProps {
311
313
  * storage URL) page by page with pdf.js. It takes effect only with
312
314
  * `pdfWorker`.
313
315
  *
314
- * Called with the document's own `url` member, as `resolveUrl` is, and a
316
+ * Called with the document's own `url` member, as `resolveUrl` is, or with
317
+ * the `url` of the host's own `ready` answer to `resolveDocumentPdf`, and a
315
318
  * `{ maxBytes, signal }` request; resolve to the file's bytes as a
316
319
  * `Uint8Array` or an `ArrayBuffer`, pass `signal` to your `fetch`, and reject
317
320
  * for anything that is not a reference you store yourself: the method chose
@@ -672,13 +675,16 @@ interface StuffResultPanelProps extends StuffResultRendererOptions {
672
675
  * document's preview then shows the PDF's pages, while its name, its copy
673
676
  * control and every download keep the original. Unset, such a document
674
677
  * offers no preview. The PDF's URL in a `ready` answer is framed only on the
675
- * page's own origin; an answer on another origin reads as `unavailable`.
678
+ * page's own origin; an answer on another origin is drawn from `loadBytes`
679
+ * when `pdfWorker` is also given, and reads as `unavailable` otherwise. A
680
+ * `failed` answer with `final: true` shows no Try again.
676
681
  */
677
682
  resolveDocumentPdf?: ResolveDocumentPdf;
678
683
  /**
679
684
  * Reads a document's bytes, for a PDF the panel cannot frame because the
680
685
  * frame rule refused it (another origin, such as a presigned storage URL):
681
- * called with the document's own `url` member and `{ maxBytes, signal }`, it
686
+ * called with the document's own `url` member, or the `url` of the host's
687
+ * own `ready` answer to `resolveDocumentPdf`, and `{ maxBytes, signal }`, it
682
688
  * resolves to the file as a `Uint8Array` or an `ArrayBuffer`, and the kernel
683
689
  * draws its pages with pdf.js. It takes effect only with `pdfWorker`. The
684
690
  * method chose the URL, so it reads only references the host stores itself
@@ -547,6 +547,16 @@ function fromConsumer(contracts, inputForm, consumer) {
547
547
  // src/graph/react/detail/PipeDetailPanel.tsx
548
548
  import React7 from "react";
549
549
 
550
+ // src/graph/react/statusColors.ts
551
+ var PIPE_STATUS_COLOR = {
552
+ succeeded: "var(--color-success, #50FA7B)",
553
+ failed: "var(--color-error, #FF5555)",
554
+ running: "var(--color-accent, #8BE9FD)",
555
+ scheduled: "var(--text-dim, #6272a4)",
556
+ skipped: "var(--text-dim, #6272a4)",
557
+ canceled: "var(--text-dim, #6272a4)"
558
+ };
559
+
550
560
  // src/graph/react/detail/sections/shared.tsx
551
561
  import { useState as useState2 } from "react";
552
562
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
@@ -1294,14 +1304,14 @@ function PipeConditionSection({
1294
1304
  "div",
1295
1305
  {
1296
1306
  className: "detail-kv-row",
1297
- style: selectedOutcome === pipeCode ? { background: "rgba(80,250,123,0.08)" } : void 0,
1307
+ style: selectedOutcome === pipeCode ? { background: "var(--color-success-bg, rgba(80,250,123,0.08))" } : void 0,
1298
1308
  children: [
1299
1309
  /* @__PURE__ */ jsx13("span", { className: "detail-kv-key", children: outcome }),
1300
1310
  /* @__PURE__ */ jsx13(
1301
1311
  "span",
1302
1312
  {
1303
1313
  className: "detail-kv-value",
1304
- style: selectedOutcome === pipeCode ? { color: "#50FA7B" } : void 0,
1314
+ style: selectedOutcome === pipeCode ? { color: PIPE_STATUS_COLOR.succeeded } : void 0,
1305
1315
  children: pipeCode
1306
1316
  }
1307
1317
  )
@@ -1477,14 +1487,7 @@ var CONTROLLER_TYPES = /* @__PURE__ */ new Set([
1477
1487
  "PipeCondition",
1478
1488
  "PipeBatch"
1479
1489
  ]);
1480
- var STATUS_COLORS = {
1481
- succeeded: "#50FA7B",
1482
- failed: "#FF5555",
1483
- running: "#8BE9FD",
1484
- scheduled: "#6272a4",
1485
- skipped: "#6272a4",
1486
- canceled: "#6272a4"
1487
- };
1490
+ var STATUS_COLORS = PIPE_STATUS_COLOR;
1488
1491
  function PipeDetailPanel({ node, spec, onConceptClick }) {
1489
1492
  var _a, _b, _c, _d, _e, _f, _g, _h;
1490
1493
  const pipeType = node.pipe_type;
@@ -1494,7 +1497,7 @@ function PipeDetailPanel({ node, spec, onConceptClick }) {
1494
1497
  const showsGeneratedData = !isStatic && !isDryGraphSpec(spec);
1495
1498
  const badge = PIPE_TYPE_BADGES[pipeType];
1496
1499
  const status = node.status;
1497
- const statusColor = (_a = STATUS_COLORS[status]) != null ? _a : "#6272a4";
1500
+ const statusColor = (_a = STATUS_COLORS[status]) != null ? _a : PIPE_STATUS_COLOR.scheduled;
1498
1501
  const blueprint = React7.useMemo(() => resolveNodeBlueprint(spec, node), [spec, node]);
1499
1502
  const [usageExpanded, setUsageExpanded] = React7.useState(false);
1500
1503
  const inputs = (_c = (_b = node.io) == null ? void 0 : _b.inputs) != null ? _c : [];
@@ -3588,12 +3591,12 @@ function isControllerType(pipeType) {
3588
3591
  return pipeType in CONTROLLER_TYPE_TABLE;
3589
3592
  }
3590
3593
  var STATUS_CONFIG = {
3591
- succeeded: { color: "#50FA7B", label: "Succeeded" },
3592
- failed: { color: "#FF5555", label: "Failed" },
3593
- running: { color: "#8BE9FD", label: "Running" },
3594
- scheduled: { color: "#6272a4", label: "Scheduled" },
3595
- skipped: { color: "#6272a4", label: "Skipped" },
3596
- canceled: { color: "#6272a4", label: "Canceled" }
3594
+ succeeded: { color: PIPE_STATUS_COLOR.succeeded, label: "Succeeded" },
3595
+ failed: { color: PIPE_STATUS_COLOR.failed, label: "Failed" },
3596
+ running: { color: PIPE_STATUS_COLOR.running, label: "Running" },
3597
+ scheduled: { color: PIPE_STATUS_COLOR.scheduled, label: "Scheduled" },
3598
+ skipped: { color: PIPE_STATUS_COLOR.skipped, label: "Skipped" },
3599
+ canceled: { color: PIPE_STATUS_COLOR.canceled, label: "Canceled" }
3597
3600
  };
3598
3601
  var MAX_VISIBLE_INPUTS = 4;
3599
3602
  function getBadge(pipeType) {