@voltro/devtools 0.89.2 → 0.91.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.
@@ -1,10 +1,10 @@
1
- import { Workflow as e } from "../components/icons.js";
2
- import { useDevtoolsStrings as t } from "../strings.js";
3
- import { Badge as n, Button as r, Card as i, Empty as a, SectionTitle as o } from "../components/primitives.js";
1
+ import { Badge as e, Button as t, Card as n, Empty as r, SectionTitle as i } from "../components/primitives.js";
2
+ import { Workflow as a } from "../components/icons.js";
3
+ import { useDocumentVisible as o } from "../useDocumentVisible.js";
4
4
  import { useInspectToken as s } from "../inspectAuth.js";
5
5
  import { fetchInspect as c, postInspect as l } from "../inspectFetch.js";
6
- import { useDocumentVisible as u } from "../useDocumentVisible.js";
7
- import { useInspectChangeEpoch as d } from "../inspectStream.js";
6
+ import { useInspectChangeEpoch as u } from "../inspectStream.js";
7
+ import { useDevtoolsStrings as d } from "../strings.js";
8
8
  import { useEffect as f, useMemo as p, useState as m } from "react";
9
9
  import { useFrameworkRuntimes as h, useWorkflow as g } from "@voltro/client";
10
10
  import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
@@ -42,12 +42,12 @@ var b = {
42
42
  let n = await c(`${e}/_voltro/inspect/workflows/runs?limit=${S}`, t);
43
43
  return n !== null && Array.isArray(n.runs) ? n.runs : null;
44
44
  }, j = (e) => {
45
- let t = u(), n = s(), r = t && e !== "", i = d(e, ["workflowRuns"], r), [a, o] = m([]), [c, l] = m(!1);
45
+ let t = o(), n = s(), r = t && e !== "", i = u(e, ["workflowRuns"], r), [a, c] = m([]), [l, d] = m(!1);
46
46
  return f(() => {
47
47
  if (!r) return;
48
48
  let t = !1, i = async () => {
49
49
  let r = await A(e, n);
50
- t || (r === null ? l(!0) : (l(!1), o(r)));
50
+ t || (r === null ? d(!0) : (d(!1), c(r)));
51
51
  };
52
52
  i();
53
53
  let a = setInterval(i, C);
@@ -61,20 +61,20 @@ var b = {
61
61
  i
62
62
  ]), {
63
63
  runs: a,
64
- failed: c
64
+ failed: l
65
65
  };
66
66
  }, M = (e, t) => {
67
- let n = u(), r = s(), i = d(e, ["workflowSteps", "workflowEvents"], n && e !== ""), [a, o] = m([]), [l, p] = m([]);
67
+ let n = o(), r = s(), i = u(e, ["workflowSteps", "workflowEvents"], n && e !== ""), [a, l] = m([]), [d, p] = m([]);
68
68
  return f(() => {
69
69
  if (!n || e === "") return;
70
- let i = !1, a = `${e}/_voltro/inspect/workflows/runs/${encodeURIComponent(t)}`, s = async () => {
70
+ let i = !1, a = `${e}/_voltro/inspect/workflows/runs/${encodeURIComponent(t)}`, o = async () => {
71
71
  let [e, t] = await Promise.all([c(`${a}/steps`, r), c(`${a}/events`, r)]);
72
- i || (e !== null && Array.isArray(e.steps) && o(e.steps), t !== null && Array.isArray(t.events) && p(t.events));
72
+ i || (e !== null && Array.isArray(e.steps) && l(e.steps), t !== null && Array.isArray(t.events) && p(t.events));
73
73
  };
74
- s();
75
- let l = setInterval(s, C);
74
+ o();
75
+ let s = setInterval(o, C);
76
76
  return () => {
77
- i = !0, clearInterval(l);
77
+ i = !0, clearInterval(s);
78
78
  };
79
79
  }, [
80
80
  e,
@@ -84,146 +84,146 @@ var b = {
84
84
  i
85
85
  ]), {
86
86
  steps: a,
87
- events: l
87
+ events: d
88
88
  };
89
89
  }, N = (e) => {
90
- let t = h(), n = u(), r = s(), i = t.names.join(","), [a, o] = m(0), c = e && n, l = i === "" ? "" : t.get(i.split(",")[0]).inspectBaseUrl ?? "", p = d(l, ["workflowRuns"], c);
90
+ let t = h(), n = o(), r = s(), i = t.names.join(","), [a, c] = m(0), l = e && n, d = i === "" ? "" : t.get(i.split(",")[0]).inspectBaseUrl ?? "", p = u(d, ["workflowRuns"], l);
91
91
  return f(() => {
92
- if (!c) {
93
- o(0);
92
+ if (!l) {
93
+ c(0);
94
94
  return;
95
95
  }
96
96
  let e = i === "" ? [] : i.split(",").map((e) => t.get(e).inspectBaseUrl).filter((e) => e !== "");
97
97
  if (e.length === 0) {
98
- o(0);
98
+ c(0);
99
99
  return;
100
100
  }
101
101
  let n = !1, a = async () => {
102
102
  let t = await Promise.all(e.map((e) => A(e, r)));
103
- n || o(t.reduce((e, t) => e + (t === null ? 0 : t.filter((e) => D(e.status)).length), 0));
103
+ n || c(t.reduce((e, t) => e + (t === null ? 0 : t.filter((e) => D(e.status)).length), 0));
104
104
  };
105
105
  a();
106
- let s = setInterval(a, C);
106
+ let o = setInterval(a, C);
107
107
  return () => {
108
- n = !0, clearInterval(s);
108
+ n = !0, clearInterval(o);
109
109
  };
110
110
  }, [
111
111
  t,
112
112
  i,
113
- c,
113
+ l,
114
114
  r,
115
115
  p
116
116
  ]), a;
117
117
  }, P = () => {
118
- let e = h(), n = t().workflows;
119
- return e.names.length === 0 ? /* @__PURE__ */ v(a, { children: n.noApi }) : /* @__PURE__ */ v("div", {
118
+ let e = h(), t = d().workflows;
119
+ return e.names.length === 0 ? /* @__PURE__ */ v(r, { children: t.noApi }) : /* @__PURE__ */ v("div", {
120
120
  className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
121
121
  children: e.names.map((e) => /* @__PURE__ */ v(F, { apiName: e }, e))
122
122
  });
123
- }, F = ({ apiName: r }) => {
124
- let a = h(), s = t().workflows, c = a.get(r), l = c.inspectBaseUrl, u = p(() => Object.entries(c.descriptors).filter(([, e]) => e.kind === "workflow").map(([e]) => e).sort(), [c.descriptors]), { runs: d, failed: g } = j(l), _ = d.filter((e) => D(e.status)).length, [x, S] = m(null), [C, E] = m(() => Date.now());
123
+ }, F = ({ apiName: t }) => {
124
+ let r = h(), o = d().workflows, s = r.get(t), c = s.inspectBaseUrl, l = p(() => Object.entries(s.descriptors).filter(([, e]) => e.kind === "workflow").map(([e]) => e).sort(), [s.descriptors]), { runs: u, failed: g } = j(c), _ = u.filter((e) => D(e.status)).length, [x, S] = m(null), [C, E] = m(() => Date.now());
125
125
  return f(() => {
126
126
  if (_ === 0) return;
127
127
  let e = setInterval(() => E(Date.now()), 1e3);
128
128
  return () => clearInterval(e);
129
- }, [_]), /* @__PURE__ */ y(i, { children: [
130
- /* @__PURE__ */ v(o, {
131
- Icon: e,
132
- right: _ > 0 ? /* @__PURE__ */ v(n, {
129
+ }, [_]), /* @__PURE__ */ y(n, { children: [
130
+ /* @__PURE__ */ v(i, {
131
+ Icon: a,
132
+ right: _ > 0 ? /* @__PURE__ */ v(e, {
133
133
  tone: "info",
134
- children: s.runningBadge(_)
135
- }) : /* @__PURE__ */ v(n, {
134
+ children: o.runningBadge(_)
135
+ }) : /* @__PURE__ */ v(e, {
136
136
  tone: "neutral",
137
- children: s.runsBadge(d.length)
137
+ children: o.runsBadge(u.length)
138
138
  }),
139
- children: r
139
+ children: t
140
140
  }),
141
141
  /* @__PURE__ */ v(I, {
142
- apiName: r,
143
- definitions: u,
144
- runs: d
142
+ apiName: t,
143
+ definitions: l,
144
+ runs: u
145
145
  }),
146
146
  /* @__PURE__ */ y("div", {
147
147
  className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
148
148
  children: [/* @__PURE__ */ v("div", {
149
149
  className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1.5",
150
- children: s.runs(d.length)
150
+ children: o.runs(u.length)
151
151
  }), g ? /* @__PURE__ */ v("div", {
152
152
  className: "vdt:text-xs vdt:text-danger",
153
- children: s.runsUnavailable
154
- }) : d.length === 0 ? /* @__PURE__ */ v("div", {
153
+ children: o.runsUnavailable
154
+ }) : u.length === 0 ? /* @__PURE__ */ v("div", {
155
155
  className: "vdt:text-xs vdt:text-foreground-subtle",
156
- children: u.length === 0 ? s.noDefinitions : s.noRuns
156
+ children: l.length === 0 ? o.noDefinitions : o.noRuns
157
157
  }) : /* @__PURE__ */ v("div", {
158
158
  className: "vdt:flex vdt:flex-col vdt:gap-0.5",
159
- children: d.map((e) => /* @__PURE__ */ y("div", {
160
- "data-run-id": e.id,
161
- "data-run-status": e.status,
159
+ children: u.map((t) => /* @__PURE__ */ y("div", {
160
+ "data-run-id": t.id,
161
+ "data-run-status": t.status,
162
162
  children: [/* @__PURE__ */ y("button", {
163
163
  type: "button",
164
- "aria-expanded": x === e.id,
165
- onClick: () => S(x === e.id ? null : e.id),
164
+ "aria-expanded": x === t.id,
165
+ onClick: () => S(x === t.id ? null : t.id),
166
166
  className: "vdt:w-full vdt:flex vdt:items-center vdt:gap-2 vdt:text-left vdt:text-xs vdt:px-1.5 vdt:py-1 vdt:rounded-sm vdt:hover:bg-muted",
167
167
  children: [
168
168
  /* @__PURE__ */ v("span", {
169
169
  className: "vdt:text-foreground-subtle vdt:w-2",
170
- children: x === e.id ? "▾" : "▸"
170
+ children: x === t.id ? "▾" : "▸"
171
171
  }),
172
- /* @__PURE__ */ v(n, {
173
- tone: b[e.status] ?? "neutral",
174
- children: e.status
172
+ /* @__PURE__ */ v(e, {
173
+ tone: b[t.status] ?? "neutral",
174
+ children: t.status
175
175
  }),
176
176
  /* @__PURE__ */ v("code", {
177
177
  className: "vdt:font-mono vdt:text-foreground vdt:truncate",
178
- children: e.tag
178
+ children: t.tag
179
179
  }),
180
- e.parentExecutionId === null ? null : /* @__PURE__ */ v(n, {
180
+ t.parentExecutionId === null ? null : /* @__PURE__ */ v(e, {
181
181
  tone: "neutral",
182
- children: s.child
182
+ children: o.child
183
183
  }),
184
- e.errorMessage === null ? null : /* @__PURE__ */ y("span", {
184
+ t.errorMessage === null ? null : /* @__PURE__ */ y("span", {
185
185
  className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
186
- children: [e.errorTag === null ? "" : `${e.errorTag} · `, e.errorMessage]
186
+ children: [t.errorTag === null ? "" : `${t.errorTag} · `, t.errorMessage]
187
187
  }),
188
188
  /* @__PURE__ */ v("span", {
189
189
  className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted vdt:whitespace-nowrap",
190
- children: w(O(e, C))
190
+ children: w(O(t, C))
191
191
  }),
192
192
  /* @__PURE__ */ v("span", {
193
193
  className: "vdt:tabular-nums vdt:text-foreground-subtle vdt:whitespace-nowrap",
194
- children: T(e.startedAt)
194
+ children: T(t.startedAt)
195
195
  })
196
196
  ]
197
- }), x === e.id ? /* @__PURE__ */ v(L, {
198
- baseUrl: l,
199
- run: e
197
+ }), x === t.id ? /* @__PURE__ */ v(L, {
198
+ baseUrl: c,
199
+ run: t
200
200
  }) : null]
201
- }, e.id))
201
+ }, t.id))
202
202
  })]
203
203
  })
204
204
  ] });
205
- }, I = ({ apiName: e, definitions: n, runs: i }) => {
206
- let a = t().workflows, [o, s] = m(n[0] ?? "");
205
+ }, I = ({ apiName: e, definitions: n, runs: r }) => {
206
+ let i = d().workflows, [a, o] = m(n[0] ?? "");
207
207
  f(() => {
208
- o === "" && n.length > 0 && s(n[0]);
209
- }, [n, o]);
210
- let c = p(() => {
211
- let e = i.find((e) => e.tag === o);
208
+ a === "" && n.length > 0 && o(n[0]);
209
+ }, [n, a]);
210
+ let s = p(() => {
211
+ let e = r.find((e) => e.tag === a);
212
212
  return e === void 0 ? "{}" : E(e.payload);
213
- }, [i, o]), [l, u] = m(c), [d, h] = m(!1);
213
+ }, [r, a]), [c, l] = m(s), [u, h] = m(!1);
214
214
  f(() => {
215
- d || u(c);
216
- }, [c, d]);
217
- let [_, b] = m(null), x = g(e, o === "" ? "__voltro.devtools.none" : o);
215
+ u || l(s);
216
+ }, [s, u]);
217
+ let [_, b] = m(null), x = g(e, a === "" ? "__voltro.devtools.none" : a);
218
218
  if (n.length === 0) return null;
219
219
  let S = async () => {
220
220
  let e;
221
221
  try {
222
- e = l.trim() === "" ? {} : JSON.parse(l);
222
+ e = c.trim() === "" ? {} : JSON.parse(c);
223
223
  } catch (e) {
224
224
  b({
225
225
  tone: "danger",
226
- text: a.invalidJson(e instanceof Error ? e.message : String(e))
226
+ text: i.invalidJson(e instanceof Error ? e.message : String(e))
227
227
  });
228
228
  return;
229
229
  }
@@ -232,12 +232,12 @@ var b = {
232
232
  let t = await x.start(e);
233
233
  b({
234
234
  tone: "success",
235
- text: a.started(t.executionId ?? t.id, t.status)
235
+ text: i.started(t.executionId ?? t.id, t.status)
236
236
  }), h(!1);
237
237
  } catch (e) {
238
238
  b({
239
239
  tone: "danger",
240
- text: a.startFailed(e instanceof Error ? e.message : String(e))
240
+ text: i.startFailed(e instanceof Error ? e.message : String(e))
241
241
  });
242
242
  }
243
243
  };
@@ -249,13 +249,13 @@ var b = {
249
249
  children: [
250
250
  /* @__PURE__ */ v("span", {
251
251
  className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider",
252
- children: a.start
252
+ children: i.start
253
253
  }),
254
254
  /* @__PURE__ */ v("select", {
255
- "aria-label": a.workflowLabel,
256
- value: o,
255
+ "aria-label": i.workflowLabel,
256
+ value: a,
257
257
  onChange: (e) => {
258
- s(e.target.value), h(!1), b(null);
258
+ o(e.target.value), h(!1), b(null);
259
259
  },
260
260
  className: "vdt:text-xs vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground",
261
261
  children: n.map((e) => /* @__PURE__ */ v("option", {
@@ -264,28 +264,28 @@ var b = {
264
264
  }, e))
265
265
  }),
266
266
  /* @__PURE__ */ v("span", { className: "vdt:sp" }),
267
- /* @__PURE__ */ v(r, {
267
+ /* @__PURE__ */ v(t, {
268
268
  onClick: () => {
269
269
  S();
270
270
  },
271
- disabled: x.pending || o === "",
272
- children: x.pending ? a.starting : a.start
271
+ disabled: x.pending || a === "",
272
+ children: x.pending ? i.starting : i.start
273
273
  })
274
274
  ]
275
275
  }),
276
276
  /* @__PURE__ */ v("textarea", {
277
- "aria-label": a.payloadLabel,
278
- value: l,
277
+ "aria-label": i.payloadLabel,
278
+ value: c,
279
279
  onChange: (e) => {
280
- u(e.target.value), h(!0);
280
+ l(e.target.value), h(!0);
281
281
  },
282
282
  spellCheck: !1,
283
- rows: Math.min(8, Math.max(2, l.split("\n").length)),
283
+ rows: Math.min(8, Math.max(2, c.split("\n").length)),
284
284
  className: "vdt:w-full vdt:text-[11px] vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-2 vdt:py-1 vdt:text-foreground vdt:resize-y"
285
285
  }),
286
286
  /* @__PURE__ */ v("div", {
287
287
  className: "vdt:text-[10px] vdt:text-foreground-subtle",
288
- children: a.payloadHint
288
+ children: i.payloadHint
289
289
  }),
290
290
  _ === null ? null : /* @__PURE__ */ v("div", {
291
291
  role: _.tone === "danger" ? "alert" : "status",
@@ -294,12 +294,12 @@ var b = {
294
294
  })
295
295
  ]
296
296
  });
297
- }, L = ({ baseUrl: e, run: i }) => {
298
- let a = t().workflows, o = s(), { steps: c, events: u } = M(e, i.id), d = p(() => k(u), [u]), [h, g] = m(""), [b, S] = m("{}"), [C, E] = m(!1), [D, O] = m(null);
297
+ }, L = ({ baseUrl: n, run: r }) => {
298
+ let i = d().workflows, a = s(), { steps: o, events: c } = M(n, r.id), u = p(() => k(c), [c]), [h, g] = m(""), [b, S] = m("{}"), [C, E] = m(!1), [D, O] = m(null);
299
299
  f(() => {
300
- h === "" && d.length > 0 && g(d[0]);
301
- }, [d, h]);
302
- let [A, j] = m(null), N = i.status === "running" || i.status === "queued" || i.status === "suspended", P = `${e}/_voltro/inspect/workflows/runs/${encodeURIComponent(i.id)}`, F = async (e, t) => {
300
+ h === "" && u.length > 0 && g(u[0]);
301
+ }, [u, h]);
302
+ let [A, j] = m(null), N = r.status === "running" || r.status === "queued" || r.status === "suspended", P = `${n}/_voltro/inspect/workflows/runs/${encodeURIComponent(r.id)}`, F = async (e, t) => {
303
303
  O(null), E(!0);
304
304
  try {
305
305
  O({
@@ -309,25 +309,25 @@ var b = {
309
309
  } catch (t) {
310
310
  O({
311
311
  tone: "danger",
312
- text: a.actionFailed(e, t instanceof Error ? t.message : String(t))
312
+ text: i.actionFailed(e, t instanceof Error ? t.message : String(t))
313
313
  });
314
314
  } finally {
315
315
  E(!1);
316
316
  }
317
- }, I = () => F(a.cancel, async () => {
318
- let e = await l(`${P}/cancel`, o, {});
319
- return a.cancelResult(typeof e.kind == "string" ? e.kind : e.cancelled === !0 ? "confirmed" : "submitted");
320
- }), L = () => F(a.sendSignal, async () => {
317
+ }, I = () => F(i.cancel, async () => {
318
+ let e = await l(`${P}/cancel`, a, {});
319
+ return i.cancelResult(typeof e.kind == "string" ? e.kind : e.cancelled === !0 ? "confirmed" : "submitted");
320
+ }), L = () => F(i.sendSignal, async () => {
321
321
  let e;
322
322
  try {
323
323
  e = b.trim() === "" ? void 0 : JSON.parse(b);
324
324
  } catch (e) {
325
- throw Error(a.invalidJson(e instanceof Error ? e.message : String(e)));
325
+ throw Error(i.invalidJson(e instanceof Error ? e.message : String(e)));
326
326
  }
327
- return await l(`${P}/signal`, o, e === void 0 ? { signalName: h } : {
327
+ return await l(`${P}/signal`, a, e === void 0 ? { signalName: h } : {
328
328
  signalName: h,
329
329
  payload: e
330
- }), a.signalSent(h);
330
+ }), i.signalSent(h);
331
331
  });
332
332
  return /* @__PURE__ */ y("div", {
333
333
  className: "vdt:ml-4 vdt:pl-2 vdt:border-l vdt:border-border vdt:py-1 vdt:flex vdt:flex-col vdt:gap-2 vdt:text-xs",
@@ -335,70 +335,70 @@ var b = {
335
335
  /* @__PURE__ */ y("div", {
336
336
  className: "vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2",
337
337
  children: [/* @__PURE__ */ v(R, {
338
- label: a.payloadLabel,
339
- value: i.payload
338
+ label: i.payloadLabel,
339
+ value: r.payload
340
340
  }), /* @__PURE__ */ v(R, {
341
- label: i.status === "failed" ? a.error : a.output,
342
- value: i.status === "failed" ? {
343
- tag: i.errorTag,
344
- message: i.errorMessage
345
- } : i.output
341
+ label: r.status === "failed" ? i.error : i.output,
342
+ value: r.status === "failed" ? {
343
+ tag: r.errorTag,
344
+ message: r.errorMessage
345
+ } : r.output
346
346
  })]
347
347
  }),
348
348
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
349
349
  className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
350
- children: a.steps(c.length)
351
- }), c.length === 0 ? /* @__PURE__ */ v("div", {
350
+ children: i.steps(o.length)
351
+ }), o.length === 0 ? /* @__PURE__ */ v("div", {
352
352
  className: "vdt:text-foreground-subtle",
353
- children: a.noSteps
353
+ children: i.noSteps
354
354
  }) : /* @__PURE__ */ v("div", {
355
355
  className: "vdt:flex vdt:flex-col vdt:gap-0.5",
356
- children: c.map((e) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("button", {
356
+ children: o.map((t) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("button", {
357
357
  type: "button",
358
- onClick: () => j(A === e.id ? null : e.id),
358
+ onClick: () => j(A === t.id ? null : t.id),
359
359
  className: "vdt:w-full vdt:flex vdt:items-center vdt:gap-2 vdt:text-left vdt:px-1 vdt:py-0.5 vdt:rounded-sm vdt:hover:bg-muted",
360
360
  children: [
361
- /* @__PURE__ */ v(n, {
362
- tone: x[e.status] ?? "info",
363
- children: e.status
361
+ /* @__PURE__ */ v(e, {
362
+ tone: x[t.status] ?? "info",
363
+ children: t.status
364
364
  }),
365
365
  /* @__PURE__ */ v("code", {
366
366
  className: "vdt:font-mono vdt:text-foreground",
367
- children: e.stepName
367
+ children: t.stepName
368
368
  }),
369
- e.attempt > 1 ? /* @__PURE__ */ v("span", {
369
+ t.attempt > 1 ? /* @__PURE__ */ v("span", {
370
370
  className: "vdt:text-warning",
371
- children: a.attempt(e.attempt)
371
+ children: i.attempt(t.attempt)
372
372
  }) : null,
373
- e.errorMessage === null ? null : /* @__PURE__ */ v("span", {
373
+ t.errorMessage === null ? null : /* @__PURE__ */ v("span", {
374
374
  className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
375
- children: e.errorMessage
375
+ children: t.errorMessage
376
376
  }),
377
377
  /* @__PURE__ */ v("span", {
378
378
  className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted",
379
- children: w(e.durationMs)
379
+ children: w(t.durationMs)
380
380
  })
381
381
  ]
382
- }), A === e.id ? /* @__PURE__ */ y("div", {
382
+ }), A === t.id ? /* @__PURE__ */ y("div", {
383
383
  className: "vdt:ml-3 vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2 vdt:py-1",
384
384
  children: [/* @__PURE__ */ v(R, {
385
- label: a.input,
386
- value: e.input
385
+ label: i.input,
386
+ value: t.input
387
387
  }), /* @__PURE__ */ v(R, {
388
- label: e.status === "failed" ? a.error : a.output,
389
- value: e.status === "failed" ? e.errorCause ?? {
390
- tag: e.errorTag,
391
- message: e.errorMessage
392
- } : e.output
388
+ label: t.status === "failed" ? i.error : i.output,
389
+ value: t.status === "failed" ? t.errorCause ?? {
390
+ tag: t.errorTag,
391
+ message: t.errorMessage
392
+ } : t.output
393
393
  })]
394
- }) : null] }, e.id))
394
+ }) : null] }, t.id))
395
395
  })] }),
396
- u.length > 0 ? /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
396
+ c.length > 0 ? /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
397
397
  className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
398
- children: a.events(u.length)
398
+ children: i.events(c.length)
399
399
  }), /* @__PURE__ */ v("div", {
400
400
  className: "vdt:flex vdt:flex-wrap vdt:gap-1",
401
- children: u.map((e) => /* @__PURE__ */ y("span", {
401
+ children: c.map((e) => /* @__PURE__ */ y("span", {
402
402
  title: T(e.occurredAt),
403
403
  className: "vdt:inline-flex vdt:items-center vdt:gap-1 vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted vdt:border vdt:border-border vdt:rounded-sm vdt:px-1",
404
404
  children: [e.eventType, e.stepName === null ? "" : ` · ${e.stepName}`]
@@ -407,49 +407,49 @@ var b = {
407
407
  /* @__PURE__ */ y("div", {
408
408
  className: "vdt:flex vdt:flex-wrap vdt:items-center vdt:gap-2",
409
409
  children: [
410
- N ? /* @__PURE__ */ v(r, {
410
+ N ? /* @__PURE__ */ v(t, {
411
411
  onClick: () => {
412
412
  I();
413
413
  },
414
414
  disabled: C,
415
- children: a.cancel
415
+ children: i.cancel
416
416
  }) : null,
417
- d.length > 0 && i.status === "running" ? /* @__PURE__ */ y(_, { children: [
417
+ u.length > 0 && r.status === "running" ? /* @__PURE__ */ y(_, { children: [
418
418
  /* @__PURE__ */ v("span", {
419
419
  className: "vdt:text-foreground-muted",
420
- children: a.awaiting
420
+ children: i.awaiting
421
421
  }),
422
422
  /* @__PURE__ */ v("select", {
423
- "aria-label": a.signalName,
423
+ "aria-label": i.signalName,
424
424
  value: h,
425
425
  onChange: (e) => g(e.target.value),
426
426
  className: "vdt:text-xs vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground",
427
- children: d.map((e) => /* @__PURE__ */ v("option", {
427
+ children: u.map((e) => /* @__PURE__ */ v("option", {
428
428
  value: e,
429
429
  children: e
430
430
  }, e))
431
431
  }),
432
432
  /* @__PURE__ */ v("input", {
433
- "aria-label": a.signalPayload,
433
+ "aria-label": i.signalPayload,
434
434
  value: b,
435
435
  onChange: (e) => S(e.target.value),
436
436
  spellCheck: !1,
437
437
  className: "vdt:text-[11px] vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground vdt:min-w-32"
438
438
  }),
439
- /* @__PURE__ */ v(r, {
439
+ /* @__PURE__ */ v(t, {
440
440
  onClick: () => {
441
441
  L();
442
442
  },
443
443
  disabled: C || h === "",
444
- children: a.sendSignal
444
+ children: i.sendSignal
445
445
  })
446
446
  ] }) : null,
447
- i.traceId === null ? null : /* @__PURE__ */ y("span", {
447
+ r.traceId === null ? null : /* @__PURE__ */ y("span", {
448
448
  className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-subtle",
449
449
  children: [
450
- a.trace,
450
+ i.trace,
451
451
  " · ",
452
- i.traceId
452
+ r.traceId
453
453
  ]
454
454
  })
455
455
  ]
package/dist/strings.js CHANGED
@@ -193,13 +193,23 @@ var o = {
193
193
  empty: "No api processes connected — webhooks discover from `*.webhook.tsx`.",
194
194
  outgoing: (e) => `Outgoing events (${e})`,
195
195
  incoming: (e) => `Incoming routes (${e})`,
196
- targets: (e) => `Active targets (${e})`,
197
- deliveries: (e) => `Recent deliveries (${e})`,
196
+ targets: (e) => `Targets on this page (${e})`,
197
+ deliveries: (e) => `Delivery attempts on this page (${e})`,
198
198
  signed: "signed",
199
199
  unsigned: "unsigned",
200
200
  active: "active",
201
201
  paused: "paused",
202
- attempt: (e) => `attempt ${e}`
202
+ attempt: (e) => `attempt ${e}`,
203
+ targetPages: "Targets",
204
+ deliveryPages: "Delivery history",
205
+ pageRange: (e, t) => `Rows ${e}–${t}`,
206
+ pageLoading: "Loading page…",
207
+ pageError: "This page could not be loaded. Refresh or return to the first page.",
208
+ pageFirst: "First page",
209
+ pagePrevious: "Previous",
210
+ pageNext: "Next",
211
+ pageRefresh: "Refresh",
212
+ pageLiveHint: "Live view: rows can move between pages as data changes."
203
213
  },
204
214
  mutations: {
205
215
  emptyTitle: "No mutations yet.",
package/dist/styles.css CHANGED
@@ -393,12 +393,20 @@
393
393
  font-weight: 600;
394
394
  color: var(--foreground);
395
395
  }
396
+ /* One line. The verb never shrinks; the path's head gives way first (cut with
397
+ * an ellipsis), the last segments only once the head is gone — a middle cut,
398
+ * so the end of the route stays readable. As wide as 60ch where the viewport
399
+ * allows: the capsule's inset, mark, gaps, padding and dots take ~120px. */
396
400
  .vdt-scope .vdt-capsule-label {
397
- max-width: 34ch;
398
- overflow: hidden;
399
- text-overflow: ellipsis;
401
+ display: inline-flex;
402
+ min-width: 0;
403
+ max-width: min(60ch, calc(100vw - 120px));
400
404
  white-space: nowrap;
401
405
  }
406
+ .vdt-scope .vdt-capsule-label > span { overflow: hidden; text-overflow: ellipsis; }
407
+ .vdt-scope .vdt-capsule-label-verb { flex: none; white-space: pre; }
408
+ .vdt-scope .vdt-capsule-label-head { flex: 0 10000 auto; min-width: 1.5ch; }
409
+ .vdt-scope .vdt-capsule-label-tail { flex: 0 1 auto; min-width: 0; }
402
410
 
403
411
  /* A dense host can leave no free space for the full face. Keep a reachable
404
412
  * status mark; the accessible label and title still carry the complete state.
@@ -1,5 +1,5 @@
1
- import { isSamePlacement as e } from "./capsulePlacement.js";
2
- import { clearCapsulePlacement as t, hasCapsuleClearance as n } from "./capsuleClearance.js";
1
+ import { clearCapsulePlacement as e, hasCapsuleClearance as t } from "./capsuleClearance.js";
2
+ import { isSamePlacement as n } from "./capsulePlacement.js";
3
3
  import { useLayoutEffect as r, useRef as i, useState as a } from "react";
4
4
  // src/useCapsuleClearance.ts
5
5
  var o = "a[href],button,input,select,textarea,label,legend,summary,th,td,[role=\"button\"],[role=\"link\"],[role=\"checkbox\"],[role=\"switch\"],[role=\"tab\"],[role=\"alert\"],[role=\"status\"],[role=\"cell\"],[role=\"gridcell\"],[role=\"columnheader\"],[role=\"rowheader\"],[aria-live]:not([aria-live=\"off\"]),[contenteditable=\"true\"],[tabindex]:not([tabindex=\"-1\"]),h1,h2,h3,h4,h5,h6,p", s = (s, c, l) => {
@@ -27,14 +27,14 @@ var o = "a[href],button,input,select,textarea,label,legend,summary,th,td,[role=\
27
27
  let t = e.getBoundingClientRect();
28
28
  t.width === 0 || t.height === 0 || t.right <= 0 || t.bottom <= 0 || t.left >= u.width || t.top >= u.height || a.getComputedStyle(e).visibility !== "hidden" && p.push(t);
29
29
  }
30
- let m = e(f.current.preferred, c), h = m ? f.current.placement : c, g = {
30
+ let m = n(f.current.preferred, c), h = m ? f.current.placement : c, g = {
31
31
  w: l.width,
32
32
  h: l.height
33
- }, _ = t(c, h, g, u, p), v = !n(_, g, u, p), y = v ? t(c, h, {
33
+ }, _ = e(c, h, g, u, p), v = !t(_, g, u, p), y = v ? e(c, h, {
34
34
  w: 44,
35
35
  h: 44
36
36
  }, u, p) : _;
37
- m && e(f.current.placement, y) && f.current.compact === v || (f.current = {
37
+ m && n(f.current.placement, y) && f.current.compact === v || (f.current = {
38
38
  preferred: c,
39
39
  placement: y,
40
40
  compact: v
@@ -76,7 +76,7 @@ var o = "a[href],button,input,select,textarea,label,legend,summary,th,td,[role=\
76
76
  c.x,
77
77
  c.y,
78
78
  l
79
- ]), l && e(u.preferred, c) ? u : {
79
+ ]), l && n(u.preferred, c) ? u : {
80
80
  placement: c,
81
81
  compact: u.compact
82
82
  };