@workflow/web 5.0.0-beta.27 → 5.0.0-beta.28

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 (25) hide show
  1. package/build/client/assets/{entry.client-DOJDY_4b.js → entry.client-DQZ2hM2V.js} +24 -24
  2. package/build/client/assets/{highlighted-body-B3W2YXNL-B-EF8R0t.js → highlighted-body-B3W2YXNL-CQ-a-eYE.js} +1 -1
  3. package/build/client/assets/{home-DQkixJk4.js → home-DuZRFOMe.js} +1697 -233
  4. package/build/client/assets/{index-C7C6cDW5.js → index-HqNj_XIX.js} +10 -10
  5. package/build/client/assets/{manifest-ce6dd06d.js → manifest-bb838d97.js} +1 -1
  6. package/build/client/assets/{mermaid-3ZIDBTTL-aixonSAh.js → mermaid-3ZIDBTTL-QcES6x1o.js} +374 -71
  7. package/build/client/assets/root-BT69a3LD.css +1 -0
  8. package/build/client/assets/{root-CsCdj08f.js → root-BiHTsCtP.js} +1 -1
  9. package/build/client/assets/{run-detail-CCsVqid_.js → run-detail-DSpZ5dnN.js} +50 -99
  10. package/build/client/assets/server-build-BkKXPNcO.css +1 -0
  11. package/build/client/assets/{workflow-graph-viewer-BlPvo_5I.js → workflow-graph-viewer-CyKfZJOQ.js} +222 -197
  12. package/build/client/assets/{zstd-browser-decoder-RyHgsNO3.js → zstd-browser-decoder-BigjGoI1.js} +2 -2
  13. package/build/server/assets/{app-kYNGZFkW.js → app-Cl6-bhGd.js} +43 -43
  14. package/build/server/assets/{highlighted-body-B3W2YXNL-D1QWoqJB.js → highlighted-body-B3W2YXNL-Daljn6fi.js} +4 -4
  15. package/build/server/assets/{index-fWQcXKhC.js → index-B_N7SdQh.js} +5 -5
  16. package/build/server/assets/{index-BafExO0s.js → index-BfLBLRRi.js} +10 -10
  17. package/build/server/assets/{mermaid-3ZIDBTTL-BOh-zwwU.js → mermaid-3ZIDBTTL-xnUhfFrD.js} +4 -4
  18. package/build/server/assets/{server-build-B21fZEey.js → server-build-D5Nuwxaw.js} +39144 -37202
  19. package/build/server/assets/{token-DmIqmbeU.js → token-DDgfwjzz.js} +2 -2
  20. package/build/server/assets/{token-util-D4JYdrFc.js → token-util-CthtfGuG.js} +2 -2
  21. package/build/server/assets/{zstd-browser-decoder-DgO7NCG6.js → zstd-browser-decoder-zp5ZpR7T.js} +5 -5
  22. package/build/server/index.js +1 -1
  23. package/package.json +10 -8
  24. package/build/client/assets/root-BlaSucTH.css +0 -1
  25. package/build/client/assets/server-build-DPrKlhgf.css +0 -1
@@ -29,8 +29,8 @@ function readCString(memory, ptr) {
29
29
  return new TextDecoder().decode(bytes.subarray(0, end));
30
30
  }
31
31
  class ZstdDecoder {
32
- constructor(exports$1, dctxPtr, inPtr, inCap, outPtr, outCap, bufPtr) {
33
- this.exports = exports$1;
32
+ constructor(exports, dctxPtr, inPtr, inCap, outPtr, outCap, bufPtr) {
33
+ this.exports = exports;
34
34
  this.dctxPtr = dctxPtr;
35
35
  this.inPtr = inPtr;
36
36
  this.inCap = inCap;
@@ -45,19 +45,19 @@ class ZstdDecoder {
45
45
  static async create(wasm) {
46
46
  const module = await compileSource(wasm);
47
47
  const instance = await WebAssembly.instantiate(module, {});
48
- const exports$1 = instance.exports;
49
- const dctxPtr = exports$1.dctx_new();
48
+ const exports = instance.exports;
49
+ const dctxPtr = exports.dctx_new();
50
50
  if (!dctxPtr)
51
51
  throw new Error("zstd: failed to allocate decompression context");
52
- const inCap = exports$1.dstream_in_size();
53
- const outCap = exports$1.dstream_out_size();
54
- const inPtr = exports$1.zstd_malloc(inCap);
55
- const outPtr = exports$1.zstd_malloc(outCap);
56
- const bufPtr = exports$1.zstd_malloc(BUF_LAYOUT.SIZE);
52
+ const inCap = exports.dstream_in_size();
53
+ const outCap = exports.dstream_out_size();
54
+ const inPtr = exports.zstd_malloc(inCap);
55
+ const outPtr = exports.zstd_malloc(outCap);
56
+ const bufPtr = exports.zstd_malloc(BUF_LAYOUT.SIZE);
57
57
  if (!inPtr || !outPtr || !bufPtr) {
58
58
  throw new Error("zstd: failed to allocate streaming buffers");
59
59
  }
60
- return new ZstdDecoder(exports$1, dctxPtr, inPtr, inCap, outPtr, outCap, bufPtr);
60
+ return new ZstdDecoder(exports, dctxPtr, inPtr, inCap, outPtr, outCap, bufPtr);
61
61
  }
62
62
  dispose() {
63
63
  if (!this.dctxPtr)
@@ -1 +1 @@
1
- window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-DOJDY_4b.js","imports":["/assets/index-BXZSIDEp.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-CsCdj08f.js","imports":["/assets/index-BXZSIDEp.js","/assets/mermaid-3ZIDBTTL-aixonSAh.js"],"css":["/assets/root-BlaSucTH.css","/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-DQkixJk4.js","imports":["/assets/index-BXZSIDEp.js","/assets/workflow-graph-viewer-BlPvo_5I.js","/assets/mermaid-3ZIDBTTL-aixonSAh.js","/assets/index-ConSkUmc.js"],"css":["/assets/workflow-graph-viewer-DnlNuQQH.css","/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/run-detail-CCsVqid_.js","imports":["/assets/index-BXZSIDEp.js","/assets/workflow-graph-viewer-BlPvo_5I.js","/assets/mermaid-3ZIDBTTL-aixonSAh.js","/assets/encryption-BQTnudEZ.js","/assets/index-ConSkUmc.js"],"css":["/assets/run-detail-CWoGxu_0.css","/assets/workflow-graph-viewer-DnlNuQQH.css","/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"]},"routes/api.rpc":{"id":"routes/api.rpc","parentId":"root","path":"api/rpc","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.rpc-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.stream.$streamId":{"id":"routes/api.stream.$streamId","parentId":"root","path":"api/stream/:streamId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.stream._streamId-l0sNRNKZ.js","imports":[],"css":[]}},"url":"/assets/manifest-ce6dd06d.js","version":"ce6dd06d"};
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-DQZ2hM2V.js","imports":["/assets/index-BXZSIDEp.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-BiHTsCtP.js","imports":["/assets/index-BXZSIDEp.js","/assets/mermaid-3ZIDBTTL-QcES6x1o.js"],"css":["/assets/root-BT69a3LD.css","/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-DuZRFOMe.js","imports":["/assets/index-BXZSIDEp.js","/assets/workflow-graph-viewer-CyKfZJOQ.js","/assets/mermaid-3ZIDBTTL-QcES6x1o.js","/assets/index-ConSkUmc.js"],"css":["/assets/workflow-graph-viewer-DnlNuQQH.css","/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/run-detail-DSpZ5dnN.js","imports":["/assets/index-BXZSIDEp.js","/assets/workflow-graph-viewer-CyKfZJOQ.js","/assets/mermaid-3ZIDBTTL-QcES6x1o.js","/assets/encryption-BQTnudEZ.js","/assets/index-ConSkUmc.js"],"css":["/assets/run-detail-CWoGxu_0.css","/assets/workflow-graph-viewer-DnlNuQQH.css","/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"]},"routes/api.rpc":{"id":"routes/api.rpc","parentId":"root","path":"api/rpc","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.rpc-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.stream.$streamId":{"id":"routes/api.stream.$streamId","parentId":"root","path":"api/stream/:streamId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.stream._streamId-l0sNRNKZ.js","imports":[],"css":[]}},"url":"/assets/manifest-bb838d97.js","version":"bb838d97"};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-BQTnudEZ.js","assets/index-ConSkUmc.js","assets/index-BXZSIDEp.js","assets/zstd-browser-decoder-RyHgsNO3.js","assets/highlighted-body-B3W2YXNL-B-EF8R0t.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-BQTnudEZ.js","assets/index-ConSkUmc.js","assets/index-BXZSIDEp.js","assets/zstd-browser-decoder-BigjGoI1.js","assets/highlighted-body-B3W2YXNL-CQ-a-eYE.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -16375,7 +16375,7 @@ async function hydrateResourceIOAsync(resource, key) {
16375
16375
  return { hydrateDataWithKey: hydrateDataWithKey3 };
16376
16376
  }, true ? void 0 : void 0);
16377
16377
  const { ensureZstdDecoderRegistered } = await __vitePreload(async () => {
16378
- const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-RyHgsNO3.js");
16378
+ const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-BigjGoI1.js");
16379
16379
  return { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 };
16380
16380
  }, true ? __vite__mapDeps([3,2]) : void 0);
16381
16381
  ensureZstdDecoderRegistered();
@@ -17522,26 +17522,26 @@ const ToastContext = reactExports.createContext(defaultAdapter);
17522
17522
  function useToast() {
17523
17523
  return reactExports.useContext(ToastContext);
17524
17524
  }
17525
- const MS_IN_SECOND = 1e3;
17526
- const MS_IN_MINUTE = 60 * MS_IN_SECOND;
17525
+ const MS_IN_SECOND$1 = 1e3;
17526
+ const MS_IN_MINUTE = 60 * MS_IN_SECOND$1;
17527
17527
  const MS_IN_HOUR = 60 * MS_IN_MINUTE;
17528
17528
  const MS_IN_DAY = 24 * MS_IN_HOUR;
17529
17529
  function formatDuration(ms, compact = false) {
17530
17530
  if (ms === 0) {
17531
17531
  return "0s";
17532
17532
  }
17533
- if (ms < MS_IN_SECOND) {
17533
+ if (ms < MS_IN_SECOND$1) {
17534
17534
  const roundedMs2 = Math.round(ms);
17535
- return roundedMs2 < MS_IN_SECOND ? `${roundedMs2}ms` : "1s";
17535
+ return roundedMs2 < MS_IN_SECOND$1 ? `${roundedMs2}ms` : "1s";
17536
17536
  }
17537
- const roundedMs = Math.round(ms / MS_IN_SECOND) * MS_IN_SECOND;
17537
+ const roundedMs = Math.round(ms / MS_IN_SECOND$1) * MS_IN_SECOND$1;
17538
17538
  if (roundedMs < MS_IN_MINUTE) {
17539
- return `${Math.floor(roundedMs / MS_IN_SECOND)}s`;
17539
+ return `${Math.floor(roundedMs / MS_IN_SECOND$1)}s`;
17540
17540
  }
17541
17541
  if (compact) {
17542
17542
  if (roundedMs < MS_IN_HOUR) {
17543
17543
  const m3 = Math.floor(roundedMs / MS_IN_MINUTE);
17544
- const s2 = Math.floor(roundedMs % MS_IN_MINUTE / MS_IN_SECOND);
17544
+ const s2 = Math.floor(roundedMs % MS_IN_MINUTE / MS_IN_SECOND$1);
17545
17545
  return s2 > 0 ? `${m3}m ${s2}s` : `${m3}m`;
17546
17546
  }
17547
17547
  const h2 = Math.floor(roundedMs / MS_IN_HOUR);
@@ -17551,7 +17551,7 @@ function formatDuration(ms, compact = false) {
17551
17551
  const days = Math.floor(roundedMs / MS_IN_DAY);
17552
17552
  const hours = Math.floor(roundedMs % MS_IN_DAY / MS_IN_HOUR);
17553
17553
  const minutes = Math.floor(roundedMs % MS_IN_HOUR / MS_IN_MINUTE);
17554
- const seconds = Math.floor(roundedMs % MS_IN_MINUTE / MS_IN_SECOND);
17554
+ const seconds = Math.floor(roundedMs % MS_IN_MINUTE / MS_IN_SECOND$1);
17555
17555
  const parts = [];
17556
17556
  if (days > 0) {
17557
17557
  parts.push(`${days}d`);
@@ -17565,28 +17565,25 @@ function formatDuration(ms, compact = false) {
17565
17565
  parts.push(`${seconds}s`);
17566
17566
  return parts.join(" ");
17567
17567
  }
17568
- const preciseSecondsFormatter = new Intl.NumberFormat(void 0, {
17569
- minimumFractionDigits: 2,
17570
- maximumFractionDigits: 2
17571
- });
17572
- function formatDurationPrecise(ms) {
17568
+ function formatDurationPrecise(ms, fractionDigits = 2) {
17573
17569
  if (ms === 0) {
17574
17570
  return "0s";
17575
17571
  }
17576
- if (ms < MS_IN_SECOND) {
17572
+ if (ms < MS_IN_SECOND$1) {
17577
17573
  const roundedMs = Math.round(ms);
17578
- if (roundedMs < MS_IN_SECOND) {
17574
+ if (roundedMs < MS_IN_SECOND$1) {
17579
17575
  return `${roundedMs}ms`;
17580
17576
  }
17581
17577
  }
17582
- const normalizedMs = Math.round(ms / 10) * 10;
17578
+ const granularityMs = MS_IN_SECOND$1 / 10 ** fractionDigits;
17579
+ const normalizedMs = Math.round(ms / granularityMs) * granularityMs;
17583
17580
  if (normalizedMs < MS_IN_MINUTE) {
17584
- return `${preciseSecondsFormatter.format(normalizedMs / MS_IN_SECOND)}s`;
17581
+ return `${Number((normalizedMs / MS_IN_SECOND$1).toFixed(fractionDigits))}s`;
17585
17582
  }
17586
17583
  const days = Math.floor(normalizedMs / MS_IN_DAY);
17587
17584
  const hours = Math.floor(normalizedMs % MS_IN_DAY / MS_IN_HOUR);
17588
17585
  const minutes = Math.floor(normalizedMs % MS_IN_HOUR / MS_IN_MINUTE);
17589
- const seconds = normalizedMs % MS_IN_MINUTE / MS_IN_SECOND;
17586
+ const seconds = normalizedMs % MS_IN_MINUTE / MS_IN_SECOND$1;
17590
17587
  const parts = [];
17591
17588
  if (days > 0) {
17592
17589
  parts.push(`${days}d`);
@@ -17597,7 +17594,7 @@ function formatDurationPrecise(ms) {
17597
17594
  if (minutes > 0) {
17598
17595
  parts.push(`${minutes}m`);
17599
17596
  }
17600
- parts.push(`${preciseSecondsFormatter.format(seconds)}s`);
17597
+ parts.push(`${Number(seconds.toFixed(fractionDigits))}s`);
17601
17598
  return parts.join(" ");
17602
17599
  }
17603
17600
  function isDoStreamStep(stepName) {
@@ -43940,7 +43937,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
43940
43937
  var et = ({ className: e, language: t, style: o, isIncomplete: n, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e), "data-incomplete": n || void 0, "data-language": t, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o }, ...s2 });
43941
43938
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
43942
43939
  var ot = ({ language: e }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e }) });
43943
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-B-EF8R0t.js"), true ? __vite__mapDeps([4,2]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
43940
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-CQ-a-eYE.js"), true ? __vite__mapDeps([4,2]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
43944
43941
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
43945
43942
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
43946
43943
  return jsxRuntimeExports.jsx(Se.Provider, { value: { code: e }, children: jsxRuntimeExports.jsxs(et, { isIncomplete: s2, language: t, children: [jsxRuntimeExports.jsx(ot, { language: t }), n ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe, { className: o, language: t, result: c, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o, code: i, language: t, raw: c, ...r2 }) })] }) });
@@ -46198,6 +46195,26 @@ function computeRootBounds(spans) {
46198
46195
  function getSpanDurationMs(span) {
46199
46196
  return Math.max(0, getHighResInMs(span.endTime) - getHighResInMs(span.startTime));
46200
46197
  }
46198
+ function isSpanErrored(span) {
46199
+ var _a3;
46200
+ const workflowStatus = (_a3 = span.attributes.data) == null ? void 0 : _a3.status;
46201
+ return span.status.code === 2 || workflowStatus === "failed";
46202
+ }
46203
+ function clampViewportToRoot(next2, rootStart, rootEnd, minDurationMs) {
46204
+ const rootDuration = Math.max(rootEnd - rootStart, minDurationMs);
46205
+ const duration2 = Math.min(rootDuration, Math.max(minDurationMs, next2.end - next2.start));
46206
+ const maxStart = rootEnd - duration2;
46207
+ const start = Math.min(Math.max(next2.start, rootStart), maxStart);
46208
+ return { start, end: start + duration2 };
46209
+ }
46210
+ function wheelDeltaToPixels(delta, deltaMode) {
46211
+ return deltaMode === 1 ? delta * 16 : delta;
46212
+ }
46213
+ function wheelZoomScaleFactor(event) {
46214
+ const dy = wheelDeltaToPixels(event.deltaY, event.deltaMode);
46215
+ const isMouseWheel = event.deltaMode === 1 || Math.abs(event.deltaY) >= 50;
46216
+ return 2 ** (dy / (isMouseWheel ? 200 : 60));
46217
+ }
46201
46218
  const NICE_INTERVALS = [
46202
46219
  1,
46203
46220
  2,
@@ -46231,6 +46248,7 @@ const NICE_INTERVALS = [
46231
46248
  5e9
46232
46249
  ];
46233
46250
  const MAX_MARKERS = 8;
46251
+ const MS_IN_SECOND = 1e3;
46234
46252
  function pickInterval(viewDuration, maxTicks) {
46235
46253
  for (const interval of NICE_INTERVALS) {
46236
46254
  if (viewDuration / interval <= maxTicks)
@@ -46243,6 +46261,7 @@ function computeTimeMarkers(viewDuration, offset2) {
46243
46261
  return [];
46244
46262
  const maxTicks = 6;
46245
46263
  const interval = pickInterval(viewDuration, maxTicks);
46264
+ const fractionDigits = interval >= MS_IN_SECOND ? 0 : Math.ceil(-Math.log10(interval / MS_IN_SECOND));
46246
46265
  const firstTick = Math.ceil(offset2 / interval) * interval;
46247
46266
  const markers2 = [];
46248
46267
  for (let t = firstTick; t <= offset2 + viewDuration; t += interval) {
@@ -46251,7 +46270,7 @@ function computeTimeMarkers(viewDuration, offset2) {
46251
46270
  continue;
46252
46271
  markers2.push({
46253
46272
  position: Math.min(Math.max(position2, 0), 1),
46254
- label: formatDuration(Math.abs(t), true),
46273
+ label: fractionDigits === 0 ? formatDuration(Math.abs(t), true) : formatDurationPrecise(Math.abs(t), fractionDigits),
46255
46274
  value: t
46256
46275
  });
46257
46276
  if (markers2.length >= MAX_MARKERS)
@@ -46767,7 +46786,6 @@ function SegmentBar({ segments, showLabels = true }) {
46767
46786
  }) });
46768
46787
  }
46769
46788
  const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, viewDuration, containerWidth, isSelected, isDimmed, onSelect, onRevealTime }) {
46770
- var _a3;
46771
46789
  const startMs = getHighResInMs(span.startTime);
46772
46790
  const endMs = getHighResInMs(span.endTime);
46773
46791
  const totalDurationMs = getSpanDurationMs(span);
@@ -46778,8 +46796,7 @@ const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, v
46778
46796
  const markers2 = reactExports.useMemo(() => geometry.mode.kind === "full" ? cullCollidingMarkers(projectMarkers(baseMarkers, geometry.visibleStartMs, geometry.visibleEndMs), geometry.visiblePixelWidth) : [], [geometry, baseMarkers]);
46779
46797
  const offscreen = reactExports.useMemo(() => geometry.mode.kind === "full" ? computeOffscreenMarkers(baseMarkers, geometry.visibleStartMs, geometry.visibleEndMs) : { left: null, right: null }, [geometry, baseMarkers]);
46780
46798
  const hasMarkers = markers2.length > 0 || offscreen.left !== null || offscreen.right !== null;
46781
- const workflowStatus = (_a3 = span.attributes.data) == null ? void 0 : _a3.status;
46782
- const isErrored = span.status.code === 2 || workflowStatus === "failed";
46799
+ const isErrored = isSpanErrored(span);
46783
46800
  const colors = getResourceColor(span.resource);
46784
46801
  const fallbackBg = isErrored ? colors.errorBg ?? "var(--ds-red-200)" : colors.bg;
46785
46802
  const fallbackBorder = isErrored ? colors.errorBorder ?? "var(--ds-red-500)" : colors.border;
@@ -46828,8 +46845,285 @@ function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, se
46828
46845
  return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative h-full overflow-hidden", style: { minHeight: spans.length * ROW_HEIGHT_PX }, children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: markers2.map((marker2) => (
46829
46846
  // Skip the "0s" origin marker since the left edge already implies it.
46830
46847
  Math.abs(marker2.value) > 1e-6 ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker2.position * 100}%` } }, String(marker2.value)) : null
46831
- )) }), hoverFraction != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0 pointer-events-none z-10", style: TIMELINE_INSET_STYLE, children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-500", style: { left: `${hoverFraction * 100}%` } }) }), jsxRuntimeExports.jsx("div", { style: { transform: `translateY(${start * ROW_HEIGHT_PX}px)` }, children: spans.slice(start, end).map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelect, onRevealTime }, span.spanId)) }), altHeld && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: gaps.map((gap) => jsxRuntimeExports.jsx(DeltaIndicator, { leftFrac: gap.leftFrac, rightFrac: gap.rightFrac, label: formatDuration(gap.gapMs, true), rowIndex: gap.rowIndex }, gap.rowIndex)) })] });
46848
+ )) }), hoverFraction != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0 pointer-events-none z-10", style: TIMELINE_INSET_STYLE, children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-500", style: { left: `${hoverFraction * 100}%` } }) }), jsxRuntimeExports.jsx("div", { style: { transform: `translateY(${start * ROW_HEIGHT_PX}px)` }, children: spans.slice(start, end).map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelect, onRevealTime }, span.spanId)) }), altHeld && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: gaps.map((gap) => jsxRuntimeExports.jsx(DeltaIndicator, { leftFrac: gap.leftFrac, rightFrac: gap.rightFrac, label: formatDurationPrecise(gap.gapMs), rowIndex: gap.rowIndex }, gap.rowIndex)) })] });
46849
+ }
46850
+ const CANVAS_PAD_Y_PX = 6;
46851
+ const MIN_LINE_HEIGHT_PX = 1.5;
46852
+ const MAX_LINE_HEIGHT_PX = 3;
46853
+ const MIN_LINE_WIDTH_PX = 2;
46854
+ const CLICK_DRAG_THRESHOLD_PX = 3;
46855
+ const MIN_BRUSH_WIDTH_PX = 6;
46856
+ const KEYBOARD_PAN_FRACTION = 0.1;
46857
+ const RESOURCE_LINE_TOKENS = {
46858
+ run: "--ds-blue-400",
46859
+ step: "--ds-green-400",
46860
+ hook: "--ds-gray-400",
46861
+ sleep: "--ds-gray-400"
46862
+ };
46863
+ const DEFAULT_LINE_TOKEN = "--ds-gray-400";
46864
+ const ERROR_LINE_TOKEN = "--ds-red-400";
46865
+ function computeDensityLayout(spans, rootStartMs, rootDurationMs, contentWidth, contentHeight) {
46866
+ const count2 = spans.length;
46867
+ const lineHeight = Math.max(MIN_LINE_HEIGHT_PX, Math.min(MAX_LINE_HEIGHT_PX, contentHeight / count2));
46868
+ const rowStep = count2 > 1 ? Math.min((contentHeight - lineHeight) / (count2 - 1), lineHeight + 1) : 0;
46869
+ const rectsByToken = /* @__PURE__ */ new Map();
46870
+ spans.forEach((span, index2) => {
46871
+ const token = isSpanErrored(span) ? ERROR_LINE_TOKEN : RESOURCE_LINE_TOKENS[span.resource] ?? DEFAULT_LINE_TOKEN;
46872
+ const startMs = getHighResInMs(span.startTime);
46873
+ const endMs = getHighResInMs(span.endTime);
46874
+ const x2 = TIMELINE_PADDING_PX + (startMs - rootStartMs) / rootDurationMs * contentWidth;
46875
+ const w2 = Math.max(MIN_LINE_WIDTH_PX, (endMs - startMs) / rootDurationMs * contentWidth);
46876
+ const y2 = CANVAS_PAD_Y_PX + index2 * rowStep;
46877
+ const rects = rectsByToken.get(token) ?? [];
46878
+ rects.push([x2, y2, w2]);
46879
+ rectsByToken.set(token, rects);
46880
+ });
46881
+ return { lineHeight, rectsByToken };
46882
+ }
46883
+ function useDpr() {
46884
+ const [dpr, setDpr] = reactExports.useState(1);
46885
+ reactExports.useLayoutEffect(() => {
46886
+ const onChange = () => setDpr(window.devicePixelRatio || 1);
46887
+ const media = matchMedia(`(resolution: ${dpr}dppx)`);
46888
+ media.addEventListener("change", onChange);
46889
+ onChange();
46890
+ return () => media.removeEventListener("change", onChange);
46891
+ }, [dpr]);
46892
+ return dpr;
46832
46893
  }
46894
+ function useThemeVersion() {
46895
+ const [version2, setVersion] = reactExports.useState(0);
46896
+ reactExports.useEffect(() => {
46897
+ const observer = new MutationObserver(() => setVersion((v2) => v2 + 1));
46898
+ observer.observe(document.documentElement, {
46899
+ attributes: true,
46900
+ attributeFilter: ["class", "data-theme", "style"]
46901
+ });
46902
+ return () => observer.disconnect();
46903
+ }, []);
46904
+ return version2;
46905
+ }
46906
+ const Minimap = reactExports.memo(function Minimap2({ spans, root: root2, viewport, minViewportMs, onViewportChange, onAnimateTo }) {
46907
+ const { startTime: rootStartMs, endTime: rootEndMs, duration: rootDurationMs } = root2;
46908
+ const containerRef = reactExports.useRef(null);
46909
+ const canvasRef = reactExports.useRef(null);
46910
+ const dpr = useDpr();
46911
+ const themeVersion = useThemeVersion();
46912
+ const viewportRef = reactExports.useRef(viewport);
46913
+ viewportRef.current = viewport;
46914
+ const [drag, setDrag] = reactExports.useState(null);
46915
+ const [selection, setSelection] = reactExports.useState(null);
46916
+ const xToTime = reactExports.useCallback((x2, contentWidth) => {
46917
+ if (contentWidth <= 0)
46918
+ return rootStartMs;
46919
+ const fraction = (x2 - TIMELINE_PADDING_PX) / contentWidth;
46920
+ return Math.min(Math.max(rootStartMs + fraction * rootDurationMs, rootStartMs), rootEndMs);
46921
+ }, [rootStartMs, rootDurationMs, rootEndMs]);
46922
+ const clamp2 = reactExports.useCallback((next2) => clampViewportToRoot(next2, rootStartMs, rootEndMs, minViewportMs), [rootStartMs, rootEndMs, minViewportMs]);
46923
+ reactExports.useLayoutEffect(() => {
46924
+ const canvas = canvasRef.current;
46925
+ const container = containerRef.current;
46926
+ const ctx = canvas == null ? void 0 : canvas.getContext("2d");
46927
+ if (!canvas || !container || !ctx)
46928
+ return;
46929
+ const draw = () => {
46930
+ const width = canvas.clientWidth;
46931
+ const height = canvas.clientHeight;
46932
+ const contentWidth = width - TIMELINE_PADDING_PX * 2;
46933
+ if (width <= 0 || height <= 0 || contentWidth <= 0)
46934
+ return;
46935
+ canvas.width = Math.round(width * dpr);
46936
+ canvas.height = Math.round(height * dpr);
46937
+ ctx.scale(dpr, dpr);
46938
+ ctx.clearRect(0, 0, width, height);
46939
+ if (spans.length === 0 || rootDurationMs <= 0)
46940
+ return;
46941
+ const { lineHeight, rectsByToken } = computeDensityLayout(spans, rootStartMs, rootDurationMs, contentWidth, height - CANVAS_PAD_Y_PX * 2);
46942
+ const style2 = getComputedStyle(container);
46943
+ const drawToken = (token) => {
46944
+ const rects = rectsByToken.get(token);
46945
+ if (!rects)
46946
+ return;
46947
+ ctx.fillStyle = style2.getPropertyValue(token).trim() || "rgb(160,160,160)";
46948
+ ctx.beginPath();
46949
+ for (const [x2, y2, w2] of rects) {
46950
+ ctx.roundRect(x2, y2, w2, lineHeight, lineHeight / 2);
46951
+ }
46952
+ ctx.fill();
46953
+ };
46954
+ for (const token of rectsByToken.keys()) {
46955
+ if (token !== ERROR_LINE_TOKEN)
46956
+ drawToken(token);
46957
+ }
46958
+ drawToken(ERROR_LINE_TOKEN);
46959
+ };
46960
+ draw();
46961
+ const observer = new ResizeObserver(draw);
46962
+ observer.observe(container);
46963
+ return () => observer.disconnect();
46964
+ }, [spans, rootStartMs, rootDurationMs, dpr, themeVersion]);
46965
+ const pointerFrame = reactExports.useCallback((e) => {
46966
+ const rect = e.currentTarget.getBoundingClientRect();
46967
+ return {
46968
+ x: e.clientX - rect.left,
46969
+ cw: rect.width - TIMELINE_PADDING_PX * 2
46970
+ };
46971
+ }, []);
46972
+ const resolveDragState = reactExports.useCallback((target2, x2, cw) => {
46973
+ if (target2.closest('[data-minimap-handle="left"]')) {
46974
+ return { mode: "resize-left" };
46975
+ }
46976
+ if (target2.closest('[data-minimap-handle="right"]')) {
46977
+ return { mode: "resize-right" };
46978
+ }
46979
+ const { start, end } = viewportRef.current;
46980
+ const isFullExtent = start - rootStartMs < rootDurationMs * 1e-3 && rootEndMs - end < rootDurationMs * 1e-3;
46981
+ if (target2.closest("[data-minimap-brush]") && !isFullExtent) {
46982
+ return { mode: "pan", grabOffsetMs: xToTime(x2, cw) - start };
46983
+ }
46984
+ return { mode: "select", originX: x2, originMs: xToTime(x2, cw) };
46985
+ }, [xToTime, rootStartMs, rootDurationMs, rootEndMs]);
46986
+ const handlePointerDown = reactExports.useCallback((e) => {
46987
+ if (e.button !== 0)
46988
+ return;
46989
+ const { x: x2, cw } = pointerFrame(e);
46990
+ if (cw <= 0)
46991
+ return;
46992
+ e.currentTarget.setPointerCapture(e.pointerId);
46993
+ setDrag(resolveDragState(e.target, x2, cw));
46994
+ }, [pointerFrame, resolveDragState]);
46995
+ const handlePointerMove = reactExports.useCallback((e) => {
46996
+ if (!drag)
46997
+ return;
46998
+ const { x: x2, cw } = pointerFrame(e);
46999
+ const t = xToTime(x2, cw);
47000
+ const { start, end } = viewportRef.current;
47001
+ if (drag.mode === "pan") {
47002
+ const duration2 = end - start;
47003
+ onViewportChange(clamp2({
47004
+ start: t - drag.grabOffsetMs,
47005
+ end: t - drag.grabOffsetMs + duration2
47006
+ }));
47007
+ } else if (drag.mode === "resize-left") {
47008
+ onViewportChange({ start: Math.min(t, end - minViewportMs), end });
47009
+ } else if (drag.mode === "resize-right") {
47010
+ onViewportChange({ start, end: Math.max(t, start + minViewportMs) });
47011
+ } else if (selection || Math.abs(x2 - drag.originX) > CLICK_DRAG_THRESHOLD_PX) {
47012
+ setSelection({
47013
+ x0: Math.min(drag.originX, x2),
47014
+ x1: Math.max(drag.originX, x2)
47015
+ });
47016
+ }
47017
+ }, [
47018
+ drag,
47019
+ selection,
47020
+ pointerFrame,
47021
+ xToTime,
47022
+ onViewportChange,
47023
+ clamp2,
47024
+ minViewportMs
47025
+ ]);
47026
+ const endDrag = reactExports.useCallback((e) => {
47027
+ if (!drag)
47028
+ return;
47029
+ if (drag.mode === "select") {
47030
+ const { x: x2, cw } = pointerFrame(e);
47031
+ const t = xToTime(x2, cw);
47032
+ if (selection) {
47033
+ onAnimateTo(clamp2({
47034
+ start: Math.min(drag.originMs, t),
47035
+ end: Math.max(drag.originMs, t)
47036
+ }));
47037
+ } else {
47038
+ const { start, end } = viewportRef.current;
47039
+ const duration2 = end - start;
47040
+ onAnimateTo(clamp2({ start: t - duration2 / 2, end: t + duration2 / 2 }));
47041
+ }
47042
+ }
47043
+ setSelection(null);
47044
+ setDrag(null);
47045
+ }, [drag, selection, pointerFrame, xToTime, onAnimateTo, clamp2]);
47046
+ const handleLostPointerCapture = reactExports.useCallback(() => {
47047
+ setSelection(null);
47048
+ setDrag(null);
47049
+ }, []);
47050
+ const handleDoubleClick = reactExports.useCallback(() => {
47051
+ onAnimateTo({ start: rootStartMs, end: rootEndMs });
47052
+ }, [onAnimateTo, rootStartMs, rootEndMs]);
47053
+ reactExports.useEffect(() => {
47054
+ const el = containerRef.current;
47055
+ if (!el || rootDurationMs <= 0)
47056
+ return;
47057
+ const zoomAtCursor = (e, cw, left) => {
47058
+ const scaleFactor = wheelZoomScaleFactor(e);
47059
+ const { start, end } = viewportRef.current;
47060
+ const duration2 = end - start;
47061
+ const cursorFraction = Math.min(Math.max((e.clientX - left - TIMELINE_PADDING_PX) / cw, 0), 1);
47062
+ const cursorMs = rootStartMs + cursorFraction * rootDurationMs;
47063
+ const anchor = Math.min(Math.max(duration2 > 0 ? (cursorMs - start) / duration2 : 0.5, 0), 1);
47064
+ const newDuration = duration2 * scaleFactor;
47065
+ onViewportChange(clamp2({
47066
+ start: cursorMs - anchor * newDuration,
47067
+ end: cursorMs + (1 - anchor) * newDuration
47068
+ }));
47069
+ };
47070
+ const panByMapPixels = (e, cw) => {
47071
+ const dx = wheelDeltaToPixels(e.deltaX, e.deltaMode);
47072
+ const panMs = dx / cw * rootDurationMs;
47073
+ const { start, end } = viewportRef.current;
47074
+ onViewportChange(clamp2({ start: start + panMs, end: end + panMs }));
47075
+ };
47076
+ const onWheel = (e) => {
47077
+ const isZoomGesture = e.ctrlKey || e.metaKey;
47078
+ const hasDeltaX = Math.abs(e.deltaX) > Math.abs(e.deltaY);
47079
+ if (!isZoomGesture && !hasDeltaX)
47080
+ return;
47081
+ e.preventDefault();
47082
+ const rect = el.getBoundingClientRect();
47083
+ const cw = rect.width - TIMELINE_PADDING_PX * 2;
47084
+ if (cw <= 0)
47085
+ return;
47086
+ if (isZoomGesture)
47087
+ zoomAtCursor(e, cw, rect.left);
47088
+ else
47089
+ panByMapPixels(e, cw);
47090
+ };
47091
+ el.addEventListener("wheel", onWheel, { passive: false });
47092
+ return () => el.removeEventListener("wheel", onWheel);
47093
+ }, [rootStartMs, rootDurationMs, onViewportChange, clamp2]);
47094
+ const handleKeyDown = reactExports.useCallback((e) => {
47095
+ const { start, end } = viewportRef.current;
47096
+ const duration2 = end - start;
47097
+ const pan = duration2 * KEYBOARD_PAN_FRACTION;
47098
+ if (e.key === "ArrowLeft") {
47099
+ onViewportChange(clamp2({ start: start - pan, end: end - pan }));
47100
+ } else if (e.key === "ArrowRight") {
47101
+ onViewportChange(clamp2({ start: start + pan, end: end + pan }));
47102
+ } else if (e.key === "Home") {
47103
+ onViewportChange(clamp2({ start: rootStartMs, end: rootStartMs + duration2 }));
47104
+ } else if (e.key === "End") {
47105
+ onViewportChange(clamp2({ start: rootEndMs - duration2, end: rootEndMs }));
47106
+ } else {
47107
+ return;
47108
+ }
47109
+ e.preventDefault();
47110
+ }, [onViewportChange, clamp2, rootStartMs, rootEndMs]);
47111
+ const startFraction = (viewport.start - rootStartMs) / rootDurationMs;
47112
+ const endFraction = (viewport.end - rootStartMs) / rootDurationMs;
47113
+ const trackWidth = `(100% - ${TIMELINE_PADDING_PX * 2}px)`;
47114
+ const brushStyle = {
47115
+ left: `calc(${TIMELINE_PADDING_PX}px + ${startFraction} * ${trackWidth})`,
47116
+ width: `max(${MIN_BRUSH_WIDTH_PX}px, calc(${endFraction - startFraction} * ${trackWidth}))`
47117
+ };
47118
+ const viewDuration = viewport.end - viewport.start;
47119
+ const scrollableMs = Math.max(rootDurationMs - viewDuration, 0);
47120
+ const scrollPercent = scrollableMs > 0 ? Math.round((viewport.start - rootStartMs) / scrollableMs * 100) : 0;
47121
+ return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: cn$4("relative h-10 min-h-10 w-full border-b border-gray-alpha-400 bg-background-100 select-none overflow-hidden touch-none", (drag == null ? void 0 : drag.mode) === "select" && "cursor-crosshair"), onPointerDown: handlePointerDown, onPointerMove: handlePointerMove, onPointerUp: endDrag, onPointerCancel: endDrag, onLostPointerCapture: handleLostPointerCapture, onDoubleClick: handleDoubleClick, children: [jsxRuntimeExports.jsx("canvas", { ref: canvasRef, "aria-hidden": true, className: "pointer-events-none absolute inset-0 h-full w-full mix-blend-multiply [.dark-theme_&]:mix-blend-screen [.dark_&]:mix-blend-screen [[data-theme=dark]_&]:mix-blend-screen" }), selection ? jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-y-0 border border-blue-500 bg-blue-300 opacity-40", style: { left: selection.x0, width: selection.x1 - selection.x0 } }) : null, jsxRuntimeExports.jsxs("div", { "data-minimap-brush": true, role: "scrollbar", "aria-controls": "trace-timeline", "aria-orientation": "horizontal", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": scrollPercent, "aria-valuetext": `Viewing ${formatDurationPrecise(viewport.start - rootStartMs)} to ${formatDurationPrecise(viewport.end - rootStartMs)} of ${formatDurationPrecise(rootDurationMs)}`, "aria-label": "Timeline overview", tabIndex: 0, onKeyDown: handleKeyDown, className: cn$4(
47122
+ // Glass thumb, matching the legacy trace viewer's map window.
47123
+ "group/minimap-brush absolute top-0.5 bottom-0.5 rounded-[3px] border border-gray-alpha-400 bg-gray-alpha-200 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-[var(--ds-focus-color)]",
47124
+ (drag == null ? void 0 : drag.mode) === "pan" ? "cursor-grabbing" : "cursor-grab"
47125
+ ), style: brushStyle, children: [jsxRuntimeExports.jsx("div", { "data-minimap-handle": "left", className: "absolute inset-y-0 -left-1 flex w-2.5 cursor-ew-resize items-center justify-center", children: jsxRuntimeExports.jsx("span", { className: cn$4("h-3.5 w-[3px] rounded-full bg-gray-600 opacity-0 transition-opacity group-hover/minimap-brush:opacity-100 group-focus-visible/minimap-brush:opacity-100", drag && "opacity-100") }) }), jsxRuntimeExports.jsx("div", { "data-minimap-handle": "right", className: "absolute inset-y-0 -right-1 flex w-2.5 cursor-ew-resize items-center justify-center", children: jsxRuntimeExports.jsx("span", { className: cn$4("h-3.5 w-[3px] rounded-full bg-gray-600 opacity-0 transition-opacity group-hover/minimap-brush:opacity-100 group-focus-visible/minimap-brush:opacity-100", drag && "opacity-100") }) })] })] });
47126
+ });
46833
47127
  const DEFAULT_PAGE_SIZE = 10;
46834
47128
  function cn(...inputs) {
46835
47129
  return twMerge(clsx(inputs));
@@ -49194,6 +49488,9 @@ async function fetchEventsByCorrelationId(worldEnv, correlationId, params) {
49194
49488
  async function fetchHooks(worldEnv, params) {
49195
49489
  return rpc("fetchHooks", { worldEnv, params });
49196
49490
  }
49491
+ async function fetchHookToken(worldEnv, runId, hookId) {
49492
+ return rpc("fetchHookToken", { worldEnv, runId, hookId });
49493
+ }
49197
49494
  async function fetchHook(worldEnv, hookId, resolveData = "all") {
49198
49495
  return rpc("fetchHook", { worldEnv, hookId, resolveData });
49199
49496
  }
@@ -49258,7 +49555,7 @@ export {
49258
49555
  Button$1 as Z,
49259
49556
  __vitePreload as _,
49260
49557
  TooltipTrigger as a,
49261
- offset as a$,
49558
+ LIVE_UPDATE_INTERVAL_MS as a$,
49262
49559
  Lock as a0,
49263
49560
  CollapsibleRoot as a1,
49264
49561
  CollapsibleTrigger as a2,
@@ -49269,33 +49566,33 @@ export {
49269
49566
  Yr as a7,
49270
49567
  isEncryptedMarker$1 as a8,
49271
49568
  TimestampTooltip as a9,
49272
- searchSpans as aA,
49273
- computeRootBounds as aB,
49274
- computeTimeMarkers as aC,
49275
- getHighResInMs as aD,
49276
- scrollRowIntoView as aE,
49277
- TIMELINE_PADDING_PX as aF,
49278
- Timeline as aG,
49279
- TimelineHeader as aH,
49280
- SidebarDataProvider as aI,
49281
- fetchHook as aJ,
49282
- hydrateResourceIOAsync as aK,
49283
- fetchStep as aL,
49284
- hydrateResourceIO as aM,
49285
- fetchStreams as aN,
49286
- Slot as aO,
49287
- Slottable as aP,
49288
- buttonVariants as aQ,
49289
- fetchEvent as aR,
49290
- fetchEventsByCorrelationId as aS,
49291
- isEncryptedData as aT,
49292
- hydrateData as aU,
49293
- getWebRevivers as aV,
49294
- LIVE_UPDATE_INTERVAL_MS as aW,
49295
- getEncryptionKeyForRun as aX,
49296
- StreamViewer as aY,
49297
- composeRefs as aZ,
49298
- useFloating as a_,
49569
+ useReducedMotion as aA,
49570
+ searchSpans as aB,
49571
+ computeRootBounds as aC,
49572
+ computeTimeMarkers as aD,
49573
+ clampViewportToRoot as aE,
49574
+ getHighResInMs as aF,
49575
+ scrollRowIntoView as aG,
49576
+ TIMELINE_PADDING_PX as aH,
49577
+ Minimap as aI,
49578
+ Timeline as aJ,
49579
+ TimelineHeader as aK,
49580
+ wheelZoomScaleFactor as aL,
49581
+ wheelDeltaToPixels as aM,
49582
+ SidebarDataProvider as aN,
49583
+ fetchHook as aO,
49584
+ hydrateResourceIOAsync as aP,
49585
+ fetchStep as aQ,
49586
+ hydrateResourceIO as aR,
49587
+ fetchStreams as aS,
49588
+ Slot as aT,
49589
+ Slottable as aU,
49590
+ buttonVariants as aV,
49591
+ fetchEvent as aW,
49592
+ fetchEventsByCorrelationId as aX,
49593
+ isEncryptedData as aY,
49594
+ hydrateData as aZ,
49595
+ getWebRevivers as a_,
49299
49596
  formatDuration as aa,
49300
49597
  _r as ab,
49301
49598
  RunClickContext as ac,
@@ -49318,23 +49615,29 @@ export {
49318
49615
  isSpanDimmedBySearch as at,
49319
49616
  ROW_HEIGHT_PX as au,
49320
49617
  getSpanDurationMs as av,
49321
- formatDurationPrecise as aw,
49322
- TooltipProvider as ax,
49323
- ActiveSpanProvider as ay,
49324
- useReducedMotion as az,
49618
+ isSpanErrored as aw,
49619
+ formatDurationPrecise as ax,
49620
+ TooltipProvider as ay,
49621
+ ActiveSpanProvider as az,
49325
49622
  TooltipContent as b,
49326
- shift as b0,
49327
- limitShift as b1,
49328
- flip as b2,
49329
- size as b3,
49330
- arrow as b4,
49331
- hide as b5,
49332
- autoUpdate as b6,
49333
- cancelRun as b7,
49334
- reenqueueRun as b8,
49335
- wakeUpRun as b9,
49336
- resumeHook as ba,
49337
- recreateRun as bb,
49623
+ getEncryptionKeyForRun as b0,
49624
+ StreamViewer as b1,
49625
+ composeRefs as b2,
49626
+ useFloating as b3,
49627
+ offset as b4,
49628
+ shift as b5,
49629
+ limitShift as b6,
49630
+ flip as b7,
49631
+ size as b8,
49632
+ arrow as b9,
49633
+ hide as ba,
49634
+ autoUpdate as bb,
49635
+ cancelRun as bc,
49636
+ reenqueueRun as bd,
49637
+ wakeUpRun as be,
49638
+ resumeHook as bf,
49639
+ fetchHookToken as bg,
49640
+ recreateRun as bh,
49338
49641
  createLucideIcon as c,
49339
49642
  runHealthCheck as d,
49340
49643
  cn as e,