@burdenoff/microfe-subscriberbot 2026.1105.2 → 2026.1107.2

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 (28) hide show
  1. package/dist/stories/pages/ProviderDetailPage.stories.d.ts +1 -0
  2. package/dist/stories/pages/ProviderDetailPage.stories.d.ts.map +1 -1
  3. package/dist/stories/support/fixtures.d.ts +3 -1
  4. package/dist/stories/support/fixtures.d.ts.map +1 -1
  5. package/dist/stories/support/handlers.d.ts.map +1 -1
  6. package/dist/subscriberbot/components/index.d.ts +2 -2
  7. package/dist/subscriberbot/components/index.d.ts.map +1 -1
  8. package/dist/subscriberbot/components/viz.d.ts +26 -0
  9. package/dist/subscriberbot/components/viz.d.ts.map +1 -1
  10. package/dist/subscriberbot/components/viz.js +99 -1
  11. package/dist/subscriberbot/components/viz.js.map +1 -1
  12. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +3 -1
  13. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
  14. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +114 -70
  15. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  16. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
  17. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +306 -301
  18. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  19. package/dist/subscriberbot/pages/providers/ProviderInsights.d.ts +23 -0
  20. package/dist/subscriberbot/pages/providers/ProviderInsights.d.ts.map +1 -0
  21. package/dist/subscriberbot/pages/providers/ProviderInsights.js +293 -0
  22. package/dist/subscriberbot/pages/providers/ProviderInsights.js.map +1 -0
  23. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +1 -1
  24. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +105 -94
  25. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
  26. package/dist/subscriberbot/types/index.d.ts +75 -0
  27. package/dist/subscriberbot/types/index.d.ts.map +1 -1
  28. package/package.json +1 -1
@@ -12,10 +12,10 @@ import { AlertTriangle as x, ArrowLeft as S, CheckCircle2 as C, Clock as w, GitB
12
12
  import { useParams as j } from "react-router";
13
13
  import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
14
14
  import { GlassCard as F } from "@burdenoff/fe-libs/ui";
15
- import { Background as I, Controls as L, Handle as R, MarkerType as oe, Position as z, ReactFlow as se, applyNodeChanges as B } from "@xyflow/react";
15
+ import { Background as I, Controls as L, Handle as R, MarkerType as oe, Position as z, ReactFlow as se, applyNodeChanges as ce } from "@xyflow/react";
16
16
  import "@xyflow/react/dist/style.css";
17
17
  //#region src/subscriberbot/pages/workflows/WorkflowBuilderPage.tsx
18
- var V = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] disabled:opacity-60", H = "mb-1 block text-xs font-medium text-text-secondary", U = "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50", W = "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50", G = {
18
+ var B = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] disabled:opacity-60", V = "mb-1 block text-xs font-medium text-text-secondary", H = "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50", U = "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50", W = {
19
19
  TRIGGER: {
20
20
  icon: A,
21
21
  bar: "bg-[var(--color-accent-indigo)]",
@@ -51,7 +51,7 @@ var V = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
51
51
  fallback: "Branch",
52
52
  hint: "Run two or more paths in parallel"
53
53
  }
54
- }, K = {
54
+ }, G = {
55
55
  NOTIFY: "Notify",
56
56
  ALERT: "Raise an alert",
57
57
  CREATE_TASK: "Create a task",
@@ -59,13 +59,21 @@ var V = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
59
59
  CLASSIFY: "Classify with AI",
60
60
  EVALUATE_POLICIES: "Evaluate agent policies",
61
61
  CALL_ADAPTER: "Call the provider adapter"
62
- }, q = {
62
+ }, le = [
63
+ "overflow-hidden rounded-lg border border-border-subtle",
64
+ "[--xy-controls-box-shadow:none]",
65
+ "[--xy-controls-button-background-color:var(--color-bg-elevated)]",
66
+ "[--xy-controls-button-background-color-hover:var(--color-bg-surface)]",
67
+ "[--xy-controls-button-border-color:var(--color-border-subtle)]",
68
+ "[--xy-controls-button-color:var(--color-text-secondary)]",
69
+ "[--xy-controls-button-color-hover:var(--color-text-primary)]"
70
+ ].join(" "), K = {
63
71
  background: "var(--color-text-secondary)",
64
72
  width: 10,
65
73
  height: 10
66
74
  };
67
- function J({ data: e, selected: n }) {
68
- let r = t(), i = G[e.kind], a = i.icon;
75
+ function q({ data: e, selected: n }) {
76
+ let r = t(), i = W[e.kind], a = i.icon;
69
77
  return /* @__PURE__ */ P("div", {
70
78
  "data-testid": `workflow-node-${e.kind.toLowerCase()}`,
71
79
  className: `w-52 overflow-hidden rounded-xl border bg-bg-surface shadow-sm ${n ? "border-[var(--color-focus-ring)] ring-2 ring-[var(--color-focus-ring)]" : e.hasIssue ? "border-status-warning-text" : "border-border-subtle"}`,
@@ -73,7 +81,7 @@ function J({ data: e, selected: n }) {
73
81
  e.kind !== "TRIGGER" && /* @__PURE__ */ N(R, {
74
82
  type: "target",
75
83
  position: z.Left,
76
- style: q
84
+ style: K
77
85
  }),
78
86
  /* @__PURE__ */ N("div", {
79
87
  className: `h-1 w-full ${i.bar}`,
@@ -116,7 +124,7 @@ function J({ data: e, selected: n }) {
116
124
  type: "source",
117
125
  position: z.Right,
118
126
  style: {
119
- ...q,
127
+ ...K,
120
128
  top: "35%",
121
129
  background: "var(--color-status-success-text)"
122
130
  }
@@ -125,21 +133,21 @@ function J({ data: e, selected: n }) {
125
133
  type: "source",
126
134
  position: z.Right,
127
135
  style: {
128
- ...q,
136
+ ...K,
129
137
  top: "70%",
130
138
  background: "var(--color-status-error-text)"
131
139
  }
132
140
  })] }) : /* @__PURE__ */ N(R, {
133
141
  type: "source",
134
142
  position: z.Right,
135
- style: q
143
+ style: K
136
144
  })
137
145
  ]
138
146
  });
139
147
  }
140
- var ce = { workflow: J };
141
- function le({ node: e, readOnly: n, onChange: r, onDelete: i }) {
142
- let a = t(), o = G[e.kind], s = (t) => r({ config: {
148
+ var ue = { workflow: q };
149
+ function de({ node: e, readOnly: n, onChange: r, onDelete: i }) {
150
+ let a = t(), o = W[e.kind], s = (t) => r({ config: {
143
151
  ...e.config,
144
152
  ...t
145
153
  } });
@@ -153,11 +161,11 @@ function le({ node: e, readOnly: n, onChange: r, onDelete: i }) {
153
161
  }),
154
162
  /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
155
163
  htmlFor: "wfb-label",
156
- className: H,
164
+ className: V,
157
165
  children: a("workflows.builder.inspector.label", "Label")
158
166
  }), /* @__PURE__ */ N("input", {
159
167
  id: "wfb-label",
160
- className: V,
168
+ className: B,
161
169
  value: e.label,
162
170
  maxLength: 120,
163
171
  disabled: n,
@@ -165,11 +173,11 @@ function le({ node: e, readOnly: n, onChange: r, onDelete: i }) {
165
173
  })] }),
166
174
  e.kind === "TRIGGER" && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
167
175
  htmlFor: "wfb-event",
168
- className: H,
176
+ className: V,
169
177
  children: a("workflows.builder.inspector.event", "Trigger event")
170
178
  }), /* @__PURE__ */ N("input", {
171
179
  id: "wfb-event",
172
- className: V,
180
+ className: B,
173
181
  value: typeof e.config.event == "string" ? e.config.event : "",
174
182
  maxLength: 120,
175
183
  placeholder: a("workflows.form.triggerPlaceholder", "e.g. InvoiceReceived, RenewalDetected"),
@@ -178,11 +186,11 @@ function le({ node: e, readOnly: n, onChange: r, onDelete: i }) {
178
186
  })] }),
179
187
  e.kind === "ACTION" && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
180
188
  htmlFor: "wfb-action",
181
- className: H,
189
+ className: V,
182
190
  children: a("workflows.builder.inspector.action", "Action")
183
191
  }), /* @__PURE__ */ P("select", {
184
192
  id: "wfb-action",
185
- className: V,
193
+ className: B,
186
194
  value: typeof e.config.action == "string" ? e.config.action : "",
187
195
  disabled: n,
188
196
  onChange: (e) => s({ action: e.target.value || void 0 }),
@@ -191,16 +199,16 @@ function le({ node: e, readOnly: n, onChange: r, onDelete: i }) {
191
199
  children: a("workflows.builder.inspector.chooseAction", "Choose an action…")
192
200
  }), d.map((e) => /* @__PURE__ */ N("option", {
193
201
  value: e,
194
- children: a(`workflows.builder.action.${e.toLowerCase()}`, K[e])
202
+ children: a(`workflows.builder.action.${e.toLowerCase()}`, G[e])
195
203
  }, e))]
196
204
  })] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
197
205
  htmlFor: "wfb-message",
198
- className: H,
206
+ className: V,
199
207
  children: a("workflows.builder.inspector.message", "Message (optional)")
200
208
  }), /* @__PURE__ */ N("textarea", {
201
209
  id: "wfb-message",
202
210
  rows: 3,
203
- className: V,
211
+ className: B,
204
212
  maxLength: 1e3,
205
213
  value: typeof e.config.message == "string" ? e.config.message : "",
206
214
  disabled: n,
@@ -209,12 +217,12 @@ function le({ node: e, readOnly: n, onChange: r, onDelete: i }) {
209
217
  e.kind === "CONDITION" && /* @__PURE__ */ P("div", { children: [
210
218
  /* @__PURE__ */ N("label", {
211
219
  htmlFor: "wfb-expression",
212
- className: H,
220
+ className: V,
213
221
  children: a("workflows.builder.inspector.expression", "Condition")
214
222
  }),
215
223
  /* @__PURE__ */ N("input", {
216
224
  id: "wfb-expression",
217
- className: V,
225
+ className: B,
218
226
  maxLength: 500,
219
227
  placeholder: a("workflows.builder.inspector.expressionPlaceholder", "e.g. monthlySpend > 100"),
220
228
  value: typeof e.config.expression == "string" ? e.config.expression : "",
@@ -228,7 +236,7 @@ function le({ node: e, readOnly: n, onChange: r, onDelete: i }) {
228
236
  ] }),
229
237
  e.kind === "DELAY" && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
230
238
  htmlFor: "wfb-delay",
231
- className: H,
239
+ className: V,
232
240
  children: a("workflows.builder.inspector.delay", "Wait (minutes)")
233
241
  }), /* @__PURE__ */ N("input", {
234
242
  id: "wfb-delay",
@@ -236,7 +244,7 @@ function le({ node: e, readOnly: n, onChange: r, onDelete: i }) {
236
244
  min: 1,
237
245
  max: 525600,
238
246
  step: 1,
239
- className: V,
247
+ className: B,
240
248
  value: typeof e.config.durationMinutes == "number" ? e.config.durationMinutes : "",
241
249
  disabled: n,
242
250
  onChange: (e) => {
@@ -261,10 +269,10 @@ function le({ node: e, readOnly: n, onChange: r, onDelete: i }) {
261
269
  ]
262
270
  });
263
271
  }
264
- function Y({ workflow: e }) {
265
- let n = t(), a = l(), o = s(), u = c(), [d, S] = b(() => h(e.graph)), [w, T] = b(e.graph.issues), [E, O] = b(!1), [j, R] = b(null), [z, V] = b(null), [H, K] = b(null), [q, J] = b(1), Y = e.status === "ACTIVE", X = Y || a.isPending, [ue, de] = b(e.graph);
266
- ue !== e.graph && (de(e.graph), E || (S(h(e.graph)), T(e.graph.issues)));
267
- let Z = y(() => new Set(w.map((e) => e.nodeId).filter((e) => !!e)), [w]), fe = y(() => d.nodes.map((e) => ({
272
+ function J({ workflow: e }) {
273
+ let n = t(), a = l(), o = s(), u = c(), [d, S] = b(() => h(e.graph)), [w, T] = b(e.graph.issues), [E, O] = b(!1), [j, R] = b(null), [z, B] = b(null), [V, G] = b(null), [K, q] = b(1), J = e.status === "ACTIVE", Y = J || a.isPending, [fe, pe] = b(e.graph);
274
+ fe !== e.graph && (pe(e.graph), E || (S(h(e.graph)), T(e.graph.issues)));
275
+ let X = y(() => new Set(w.map((e) => e.nodeId).filter((e) => !!e)), [w]), me = y(() => d.nodes.map((e) => ({
268
276
  id: e.id,
269
277
  type: "workflow",
270
278
  position: {
@@ -276,15 +284,15 @@ function Y({ workflow: e }) {
276
284
  kind: e.kind,
277
285
  label: e.label || n(`workflowBuilder.nodeLabel.${e.kind.toLowerCase()}`, m(e.kind)),
278
286
  summary: ee(e, n),
279
- hasIssue: !E && Z.has(e.id)
287
+ hasIssue: !E && X.has(e.id)
280
288
  }
281
289
  })), [
282
290
  d.nodes,
283
291
  j,
284
292
  E,
285
- Z,
293
+ X,
286
294
  n
287
- ]), pe = y(() => d.edges.map((e) => ({
295
+ ]), Z = y(() => d.edges.map((e) => ({
288
296
  id: e.id,
289
297
  source: e.source,
290
298
  target: e.target,
@@ -304,11 +312,11 @@ function Y({ workflow: e }) {
304
312
  z,
305
313
  n
306
314
  ]), Q = v((e) => {
307
- S((t) => e(t)), O(!0), K(null);
308
- }, []), me = v((e) => {
315
+ S((t) => e(t)), O(!0), G(null);
316
+ }, []), he = v((e) => {
309
317
  let t = e.filter((e) => e.type === "position" && e.position), n = e.filter((e) => e.type === "remove");
310
- X || t.length === 0 && n.length === 0 || Q((e) => {
311
- let r = B(t, e.nodes.map((e) => ({
318
+ Y || t.length === 0 && n.length === 0 || Q((e) => {
319
+ let r = ce(t, e.nodes.map((e) => ({
312
320
  id: e.id,
313
321
  position: {
314
322
  x: e.x,
@@ -329,17 +337,17 @@ function Y({ workflow: e }) {
329
337
  for (let e of n) e.type === "remove" && (i = _(i, e.id));
330
338
  return i;
331
339
  });
332
- }, [Q, X]), he = v((e) => {
340
+ }, [Q, Y]), ge = v((e) => {
333
341
  let t = new Set(e.filter((e) => e.type === "remove").map((e) => e.id));
334
- X || t.size === 0 || Q((e) => ({
342
+ Y || t.size === 0 || Q((e) => ({
335
343
  nodes: e.nodes,
336
344
  edges: e.edges.filter((e) => !t.has(e.id))
337
345
  }));
338
- }, [Q, X]), ge = v((e) => {
339
- if (X) return;
346
+ }, [Q, Y]), _e = v((e) => {
347
+ if (Y) return;
340
348
  let t = e.sourceHandle ?? null, r = te(d, e.source, e.target, t, n);
341
349
  if (r) {
342
- K({
350
+ G({
343
351
  tone: "error",
344
352
  text: r
345
353
  });
@@ -358,11 +366,11 @@ function Y({ workflow: e }) {
358
366
  }, [
359
367
  Q,
360
368
  d,
361
- X,
369
+ Y,
362
370
  n
363
- ]), _e = (e) => {
364
- let t = `new-${q}`;
365
- J((e) => e + 1);
371
+ ]), ve = (e) => {
372
+ let t = `new-${K}`;
373
+ q((e) => e + 1);
366
374
  let r = ne(d.nodes);
367
375
  Q((i) => ({
368
376
  nodes: [...i.nodes, {
@@ -374,42 +382,42 @@ function Y({ workflow: e }) {
374
382
  y: r.y
375
383
  }],
376
384
  edges: i.edges
377
- })), R(t), V(null);
378
- }, $ = d.nodes.find((e) => e.id === j) ?? null, ve = () => {
385
+ })), R(t), B(null);
386
+ }, $ = d.nodes.find((e) => e.id === j) ?? null, ye = () => {
379
387
  a.mutate({
380
388
  workflowId: e.id,
381
389
  input: re(d)
382
390
  }, {
383
391
  onSuccess: (e) => {
384
- S(h(e)), T(e.issues), O(!1), R(null), V(null), K({
392
+ S(h(e)), T(e.issues), O(!1), R(null), B(null), G({
385
393
  tone: "success",
386
394
  text: e.valid ? n("workflows.builder.savedValid", "Saved. This workflow is ready to activate.") : n("workflows.builder.savedWithIssues", "Saved as a draft. Fix the issues below before activating.")
387
395
  });
388
396
  },
389
- onError: (e) => K({
397
+ onError: (e) => G({
390
398
  tone: "error",
391
399
  text: e instanceof Error ? e.message : n("common.error", "An error occurred")
392
400
  })
393
401
  });
394
- }, ye = () => o.mutate(e.id, {
395
- onSuccess: () => K({
402
+ }, be = () => o.mutate(e.id, {
403
+ onSuccess: () => G({
396
404
  tone: "success",
397
405
  text: n("workflows.builder.activated", "Workflow activated.")
398
406
  }),
399
- onError: (e) => K({
407
+ onError: (e) => G({
400
408
  tone: "error",
401
409
  text: e instanceof Error ? e.message : n("common.error", "An error occurred")
402
410
  })
403
- }), be = () => u.mutate(e.id, {
404
- onSuccess: () => K({
411
+ }), xe = () => u.mutate(e.id, {
412
+ onSuccess: () => G({
405
413
  tone: "success",
406
414
  text: n("workflows.builder.paused", "Workflow paused. You can edit it now.")
407
415
  }),
408
- onError: (e) => K({
416
+ onError: (e) => G({
409
417
  tone: "error",
410
418
  text: e instanceof Error ? e.message : n("common.error", "An error occurred")
411
419
  })
412
- }), xe = !Y && !E && w.length === 0 && d.nodes.length > 0;
420
+ }), Se = !J && !E && w.length === 0 && d.nodes.length > 0;
413
421
  return /* @__PURE__ */ P(M, { children: [
414
422
  /* @__PURE__ */ P("div", {
415
423
  className: "flex flex-wrap items-center justify-between gap-3",
@@ -432,10 +440,10 @@ function Y({ workflow: e }) {
432
440
  ]
433
441
  }), /* @__PURE__ */ N("div", {
434
442
  className: "flex flex-wrap items-center gap-2",
435
- children: Y ? /* @__PURE__ */ P("button", {
443
+ children: J ? /* @__PURE__ */ P("button", {
436
444
  type: "button",
437
- className: U,
438
- onClick: be,
445
+ className: H,
446
+ onClick: xe,
439
447
  disabled: u.isPending,
440
448
  children: [
441
449
  /* @__PURE__ */ N(D, { className: "h-4 w-4" }),
@@ -444,8 +452,8 @@ function Y({ workflow: e }) {
444
452
  ]
445
453
  }) : /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("button", {
446
454
  type: "button",
447
- className: U,
448
- onClick: ve,
455
+ className: H,
456
+ onClick: ye,
449
457
  disabled: !E || a.isPending,
450
458
  children: [
451
459
  /* @__PURE__ */ N(ae, { className: "h-4 w-4" }),
@@ -454,9 +462,9 @@ function Y({ workflow: e }) {
454
462
  ]
455
463
  }), /* @__PURE__ */ P("button", {
456
464
  type: "button",
457
- className: W,
458
- onClick: ye,
459
- disabled: !xe || o.isPending,
465
+ className: U,
466
+ onClick: be,
467
+ disabled: !Se || o.isPending,
460
468
  title: E ? n("workflows.builder.saveFirst", "Save your changes first") : w.length > 0 ? n("workflows.builder.fixIssuesFirst", "Fix the issues first") : void 0,
461
469
  children: [
462
470
  /* @__PURE__ */ N(ie, { className: "h-4 w-4" }),
@@ -466,12 +474,12 @@ function Y({ workflow: e }) {
466
474
  })] })
467
475
  })]
468
476
  }),
469
- H && /* @__PURE__ */ N("div", {
470
- role: H.tone === "error" ? "alert" : "status",
471
- className: `mt-3 rounded-lg border px-4 py-2 text-sm ${H.tone === "error" ? "border-status-error-text/30 bg-status-error-bg-subtle text-status-error-text" : "border-status-success-text/30 bg-status-success-bg-subtle text-status-success-text"}`,
472
- children: H.text
477
+ V && /* @__PURE__ */ N("div", {
478
+ role: V.tone === "error" ? "alert" : "status",
479
+ className: `mt-3 rounded-lg border px-4 py-2 text-sm ${V.tone === "error" ? "border-status-error-text/30 bg-status-error-bg-subtle text-status-error-text" : "border-status-success-text/30 bg-status-success-bg-subtle text-status-success-text"}`,
480
+ children: V.text
473
481
  }),
474
- Y && /* @__PURE__ */ N("p", {
482
+ J && /* @__PURE__ */ N("p", {
475
483
  className: "mt-3 text-sm text-text-secondary",
476
484
  children: n("workflows.builder.readOnlyActive", "This workflow is active, so it is shown read-only. Pause it to change its steps.")
477
485
  }),
@@ -489,11 +497,11 @@ function Y({ workflow: e }) {
489
497
  role: "group",
490
498
  "aria-label": n("workflows.builder.palette", "Add a step"),
491
499
  children: f.map((e) => {
492
- let t = G[e], r = t.icon;
500
+ let t = W[e], r = t.icon;
493
501
  return /* @__PURE__ */ P("button", {
494
502
  type: "button",
495
- disabled: X || !p(e, d.nodes),
496
- onClick: () => _e(e),
503
+ disabled: Y || !p(e, d.nodes),
504
+ onClick: () => ve(e),
497
505
  title: n(`${t.labelKey}Hint`, t.hint),
498
506
  className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface px-2.5 py-2 text-start text-sm text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
499
507
  children: [/* @__PURE__ */ N(r, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ N("span", {
@@ -515,24 +523,24 @@ function Y({ workflow: e }) {
515
523
  description: n("workflows.builder.emptyDescription", "Add a trigger from the palette, then connect the steps that should follow it.")
516
524
  })
517
525
  }) : /* @__PURE__ */ P(se, {
518
- nodes: fe,
519
- edges: pe,
520
- nodeTypes: ce,
521
- onNodesChange: me,
522
- onEdgesChange: he,
523
- onConnect: ge,
526
+ nodes: me,
527
+ edges: Z,
528
+ nodeTypes: ue,
529
+ onNodesChange: he,
530
+ onEdgesChange: ge,
531
+ onConnect: _e,
524
532
  onNodeClick: (e, t) => {
525
- R(t.id), V(null);
533
+ R(t.id), B(null);
526
534
  },
527
535
  onEdgeClick: (e, t) => {
528
- V(t.id), R(null);
536
+ B(t.id), R(null);
529
537
  },
530
538
  onPaneClick: () => {
531
- R(null), V(null);
539
+ R(null), B(null);
532
540
  },
533
- nodesDraggable: !X,
534
- nodesConnectable: !X,
535
- deleteKeyCode: X ? null : ["Backspace", "Delete"],
541
+ nodesDraggable: !Y,
542
+ nodesConnectable: !Y,
543
+ deleteKeyCode: Y ? null : ["Backspace", "Delete"],
536
544
  fitView: !0,
537
545
  fitViewOptions: {
538
546
  padding: .2,
@@ -542,7 +550,10 @@ function Y({ workflow: e }) {
542
550
  children: [/* @__PURE__ */ N(I, {
543
551
  color: "var(--color-border-subtle)",
544
552
  gap: 20
545
- }), /* @__PURE__ */ N(L, { showInteractive: !1 })]
553
+ }), /* @__PURE__ */ N(L, {
554
+ showInteractive: !1,
555
+ className: le
556
+ })]
546
557
  })
547
558
  }),
548
559
  /* @__PURE__ */ P("div", {
@@ -550,9 +561,9 @@ function Y({ workflow: e }) {
550
561
  children: [/* @__PURE__ */ N(F, {
551
562
  treatment: "metric",
552
563
  className: "p-4",
553
- children: $ ? /* @__PURE__ */ N(le, {
564
+ children: $ ? /* @__PURE__ */ N(de, {
554
565
  node: $,
555
- readOnly: X,
566
+ readOnly: Y,
556
567
  onChange: (e) => Q((t) => ({
557
568
  nodes: t.nodes.map((t) => t.id === $.id ? {
558
569
  ...t,
@@ -563,7 +574,7 @@ function Y({ workflow: e }) {
563
574
  onDelete: () => {
564
575
  Q((e) => _(e, $.id)), R(null);
565
576
  }
566
- }) : z && !X ? /* @__PURE__ */ P("div", {
577
+ }) : z && !Y ? /* @__PURE__ */ P("div", {
567
578
  className: "space-y-3",
568
579
  children: [/* @__PURE__ */ N("p", {
569
580
  className: "text-sm text-text-primary",
@@ -574,7 +585,7 @@ function Y({ workflow: e }) {
574
585
  Q((e) => ({
575
586
  nodes: e.nodes,
576
587
  edges: e.edges.filter((e) => e.id !== z)
577
- })), V(null);
588
+ })), B(null);
578
589
  },
579
590
  className: "inline-flex items-center gap-1.5 rounded-lg border border-status-error-text/40 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle",
580
591
  children: [
@@ -620,14 +631,14 @@ function Y({ workflow: e }) {
620
631
  })
621
632
  ] });
622
633
  }
623
- function X() {
634
+ function Y() {
624
635
  let { id: r } = j(), s = t(), { navigateTo: c } = e(), { data: l, isLoading: d, isError: f, refetch: p } = u(r);
625
636
  return /* @__PURE__ */ N(n, {
626
637
  title: l?.name ?? s("workflows.builder.title", "Workflow builder"),
627
638
  description: l ? s("workflows.builder.subtitle", "Visual builder · starts on {{trigger}}", { trigger: l.triggerEvent || "—" }) : void 0,
628
639
  actions: /* @__PURE__ */ P("button", {
629
640
  type: "button",
630
- className: U,
641
+ className: H,
631
642
  onClick: () => c(r ? `/workflows/${r}` : "/workflows"),
632
643
  children: [
633
644
  /* @__PURE__ */ N(S, { className: "rtl:rotate-180 h-4 w-4" }),
@@ -638,13 +649,13 @@ function X() {
638
649
  children: d ? /* @__PURE__ */ N(o, { label: s("workflows.builder.loading", "Loading workflow…") }) : f ? /* @__PURE__ */ N(a, {
639
650
  message: s("workflows.builder.error", "Could not load this workflow."),
640
651
  onRetry: () => void p()
641
- }) : l ? /* @__PURE__ */ N(Y, { workflow: l }, l.id) : /* @__PURE__ */ N(i, {
652
+ }) : l ? /* @__PURE__ */ N(J, { workflow: l }, l.id) : /* @__PURE__ */ N(i, {
642
653
  title: s("workflows.builder.notFound", "Workflow not found"),
643
654
  description: s("workflows.builder.notFoundDescription", "It may have been deleted, or it belongs to another workspace.")
644
655
  })
645
656
  });
646
657
  }
647
658
  //#endregion
648
- export { X as WorkflowBuilderPage };
659
+ export { Y as WorkflowBuilderPage };
649
660
 
650
661
  //# sourceMappingURL=WorkflowBuilderPage.js.map