@burdenoff/microfe-subscriberbot 2026.1023.1 → 2026.1029.1

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 (46) hide show
  1. package/dist/subscriberbot/admin/AdminDashboardPage.js +5 -5
  2. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  3. package/dist/subscriberbot/components/PostureOptions.d.ts +10 -0
  4. package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -0
  5. package/dist/subscriberbot/components/PostureOptions.js +20 -0
  6. package/dist/subscriberbot/components/PostureOptions.js.map +1 -0
  7. package/dist/subscriberbot/components/index.d.ts +2 -0
  8. package/dist/subscriberbot/components/index.d.ts.map +1 -1
  9. package/dist/subscriberbot/components/index.js +1 -0
  10. package/dist/subscriberbot/hooks/index.d.ts +1 -0
  11. package/dist/subscriberbot/hooks/index.d.ts.map +1 -1
  12. package/dist/subscriberbot/hooks/index.js +2 -1
  13. package/dist/subscriberbot/hooks/useAutonomousAgentMode.d.ts +15 -0
  14. package/dist/subscriberbot/hooks/useAutonomousAgentMode.d.ts.map +1 -0
  15. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js +13 -0
  16. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js.map +1 -0
  17. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
  18. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +9 -0
  19. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  20. package/dist/subscriberbot/pages/AssetVaultPage.js +16 -16
  21. package/dist/subscriberbot/pages/DashboardPage.js +23 -23
  22. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  23. package/dist/subscriberbot/pages/InboxPage.js +62 -62
  24. package/dist/subscriberbot/pages/InsightsPage.js +14 -14
  25. package/dist/subscriberbot/pages/InvoicesPage.js +66 -66
  26. package/dist/subscriberbot/pages/WorkflowsPage.js +20 -20
  27. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
  28. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +184 -182
  29. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  30. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
  31. package/dist/subscriberbot/pages/agents/AgentNewPage.js +77 -79
  32. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  33. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
  34. package/dist/subscriberbot/pages/agents/AgentsListPage.js +134 -133
  35. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  36. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +64 -64
  37. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +3 -3
  38. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +18 -18
  39. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
  40. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +122 -89
  41. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  42. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +6 -6
  43. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +7 -7
  44. package/dist/subscriberbot/types/index.d.ts +1 -0
  45. package/dist/subscriberbot/types/index.d.ts.map +1 -1
  46. package/package.json +1 -1
@@ -6,10 +6,10 @@ import { formatCurrency as i, formatDate as a, formatEnumLabel as o } from "../u
6
6
  import { StatusBadge as s } from "../components/StatusBadge.js";
7
7
  import { EmptyState as c } from "../components/EmptyState.js";
8
8
  import { Modal as l } from "../components/Modal.js";
9
- import { ErrorView as u, LoadingView as d, Section as f } from "../components/StateViews.js";
10
- import { CHART_COLORS as p, Donut as m, Legend as h } from "../components/viz.js";
11
- import { useCreateInvoice as g, useCreatePaymentInstrument as _, useInvoices as v, useMarkInvoicePaid as y, usePaymentInstruments as b, useRelationships as x, useRemovePaymentInstrument as S } from "../hooks/useSubscriberBotApi.js";
12
- import { useTr as C } from "../hooks/useTr.js";
9
+ import { useTr as u } from "../hooks/useTr.js";
10
+ import { ErrorView as d, LoadingView as f, Section as p } from "../components/StateViews.js";
11
+ import { CHART_COLORS as m, Donut as h, Legend as g } from "../components/viz.js";
12
+ import { useCreateInvoice as _, useCreatePaymentInstrument as v, useInvoices as y, useMarkInvoicePaid as b, usePaymentInstruments as x, useRelationships as S, useRemovePaymentInstrument as C } from "../hooks/useSubscriberBotApi.js";
13
13
  import { useMemo as w, useState as T } from "react";
14
14
  import { AlertTriangle as E, CheckCircle2 as D, CreditCard as O, FileText as ee, Plus as k, Receipt as A, Star as j, Trash2 as M } from "lucide-react";
15
15
  import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
@@ -52,10 +52,10 @@ var L = 25, R = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
52
52
  REFUNDED: "var(--color-status-warning-text)"
53
53
  };
54
54
  function G({ onClose: e }) {
55
- let t = C(), n = g(), r = x({ pagination: {
55
+ let t = u(), n = _(), r = S({ pagination: {
56
56
  limit: 100,
57
57
  offset: 0
58
- } }).data?.items ?? [], [i, a] = T(""), [o, s] = T(""), [c, u] = T("ISSUED"), [d, f] = T("USD"), [p, m] = T(""), [h, _] = T(""), [v, y] = T(""), [b, S] = T(""), [w, E] = T(""), [D, O] = T(null);
58
+ } }).data?.items ?? [], [i, a] = T(""), [o, s] = T(""), [c, d] = T("ISSUED"), [f, p] = T("USD"), [m, h] = T(""), [g, v] = T(""), [y, b] = T(""), [x, C] = T(""), [w, E] = T(""), [D, O] = T(null);
59
59
  return /* @__PURE__ */ P(l, {
60
60
  title: t("invoices.createModal.title", "Create invoice"),
61
61
  onClose: e,
@@ -69,12 +69,12 @@ function G({ onClose: e }) {
69
69
  n.mutate({
70
70
  relationshipId: i,
71
71
  status: c,
72
- currency: d.trim() || "USD",
72
+ currency: f.trim() || "USD",
73
73
  ...o.trim() ? { number: o.trim() } : {},
74
- ...p.trim() ? { subtotal: Number(p) } : {},
75
- ...h.trim() ? { taxAmount: Number(h) } : {},
76
- ...v.trim() ? { total: Number(v) } : {},
77
- ...b ? { issueDate: new Date(b).toISOString() } : {},
74
+ ...m.trim() ? { subtotal: Number(m) } : {},
75
+ ...g.trim() ? { taxAmount: Number(g) } : {},
76
+ ...y.trim() ? { total: Number(y) } : {},
77
+ ...x ? { issueDate: new Date(x).toISOString() } : {},
78
78
  ...w ? { dueDate: new Date(w).toISOString() } : {}
79
79
  }, {
80
80
  onSuccess: () => e(),
@@ -134,7 +134,7 @@ function G({ onClose: e }) {
134
134
  }), /* @__PURE__ */ P("select", {
135
135
  id: "inv-status",
136
136
  value: c,
137
- onChange: (e) => u(e.target.value),
137
+ onChange: (e) => d(e.target.value),
138
138
  className: R,
139
139
  children: V.map((e) => /* @__PURE__ */ P("option", {
140
140
  value: e,
@@ -148,8 +148,8 @@ function G({ onClose: e }) {
148
148
  }), /* @__PURE__ */ P("input", {
149
149
  id: "inv-currency",
150
150
  type: "text",
151
- value: d,
152
- onChange: (e) => f(e.target.value.toUpperCase()),
151
+ value: f,
152
+ onChange: (e) => p(e.target.value.toUpperCase()),
153
153
  maxLength: 3,
154
154
  className: R
155
155
  })] })
@@ -167,8 +167,8 @@ function G({ onClose: e }) {
167
167
  type: "number",
168
168
  min: "0",
169
169
  step: "0.01",
170
- value: p,
171
- onChange: (e) => m(e.target.value),
170
+ value: m,
171
+ onChange: (e) => h(e.target.value),
172
172
  className: R
173
173
  })] }),
174
174
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
@@ -180,8 +180,8 @@ function G({ onClose: e }) {
180
180
  type: "number",
181
181
  min: "0",
182
182
  step: "0.01",
183
- value: h,
184
- onChange: (e) => _(e.target.value),
183
+ value: g,
184
+ onChange: (e) => v(e.target.value),
185
185
  className: R
186
186
  })] }),
187
187
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
@@ -193,8 +193,8 @@ function G({ onClose: e }) {
193
193
  type: "number",
194
194
  min: "0",
195
195
  step: "0.01",
196
- value: v,
197
- onChange: (e) => y(e.target.value),
196
+ value: y,
197
+ onChange: (e) => b(e.target.value),
198
198
  className: R
199
199
  })] })
200
200
  ]
@@ -208,8 +208,8 @@ function G({ onClose: e }) {
208
208
  }), /* @__PURE__ */ P("input", {
209
209
  id: "inv-issue",
210
210
  type: "date",
211
- value: b,
212
- onChange: (e) => S(e.target.value),
211
+ value: x,
212
+ onChange: (e) => C(e.target.value),
213
213
  className: R
214
214
  })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
215
215
  htmlFor: "inv-due",
@@ -242,7 +242,7 @@ function G({ onClose: e }) {
242
242
  });
243
243
  }
244
244
  function K({ onClose: e }) {
245
- let t = C(), n = _(), [r, i] = T(""), [a, s] = T("CARD"), [c, u] = T(""), [d, f] = T(""), [p, m] = T(""), [h, g] = T(""), [v, y] = T(!1), [b, x] = T(null);
245
+ let t = u(), n = v(), [r, i] = T(""), [a, s] = T("CARD"), [c, d] = T(""), [f, p] = T(""), [m, h] = T(""), [g, _] = T(""), [y, b] = T(!1), [x, S] = T(null);
246
246
  return /* @__PURE__ */ P(l, {
247
247
  title: t("invoices.addPaymentMethodModal.title", "Add payment method"),
248
248
  description: t("invoices.addPaymentMethodModal.description", "A passive annotation of which external card/account pays for a subscription — no full card numbers or CVV."),
@@ -250,28 +250,28 @@ function K({ onClose: e }) {
250
250
  maxWidthClassName: "max-w-xl",
251
251
  children: /* @__PURE__ */ F("form", {
252
252
  onSubmit: (i) => {
253
- if (i.preventDefault(), x(null), !r.trim()) {
254
- x(t("invoices.addPaymentMethodModal.labelRequired", "A label is required."));
253
+ if (i.preventDefault(), S(null), !r.trim()) {
254
+ S(t("invoices.addPaymentMethodModal.labelRequired", "A label is required."));
255
255
  return;
256
256
  }
257
257
  n.mutate({
258
258
  label: r.trim(),
259
259
  type: a,
260
- isDefault: v,
260
+ isDefault: y,
261
261
  ...c.trim() ? { brand: c.trim() } : {},
262
- ...d.trim() ? { last4: d.trim() } : {},
263
- ...p.trim() ? { expiryMonth: Number(p) } : {},
264
- ...h.trim() ? { expiryYear: Number(h) } : {}
262
+ ...f.trim() ? { last4: f.trim() } : {},
263
+ ...m.trim() ? { expiryMonth: Number(m) } : {},
264
+ ...g.trim() ? { expiryYear: Number(g) } : {}
265
265
  }, {
266
266
  onSuccess: () => e(),
267
- onError: (e) => x(e instanceof Error ? e.message : t("invoices.addPaymentMethodModal.error", "Could not add payment method."))
267
+ onError: (e) => S(e instanceof Error ? e.message : t("invoices.addPaymentMethodModal.error", "Could not add payment method."))
268
268
  });
269
269
  },
270
270
  className: "space-y-4",
271
271
  children: [
272
- b && /* @__PURE__ */ P("div", {
272
+ x && /* @__PURE__ */ P("div", {
273
273
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
274
- children: b
274
+ children: x
275
275
  }),
276
276
  /* @__PURE__ */ F("div", {
277
277
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
@@ -320,7 +320,7 @@ function K({ onClose: e }) {
320
320
  id: "pm-brand",
321
321
  type: "text",
322
322
  value: c,
323
- onChange: (e) => u(e.target.value),
323
+ onChange: (e) => d(e.target.value),
324
324
  placeholder: t("invoices.addPaymentMethodModal.brandPlaceholder", "Visa, Amex…"),
325
325
  className: R
326
326
  })] }),
@@ -333,8 +333,8 @@ function K({ onClose: e }) {
333
333
  type: "text",
334
334
  inputMode: "numeric",
335
335
  maxLength: 4,
336
- value: d,
337
- onChange: (e) => f(e.target.value.replace(/\D/g, "")),
336
+ value: f,
337
+ onChange: (e) => p(e.target.value.replace(/\D/g, "")),
338
338
  placeholder: t("invoices.addPaymentMethodModal.last4Placeholder", "4242"),
339
339
  className: R
340
340
  })] }),
@@ -349,8 +349,8 @@ function K({ onClose: e }) {
349
349
  type: "number",
350
350
  min: "1",
351
351
  max: "12",
352
- value: p,
353
- onChange: (e) => m(e.target.value),
352
+ value: m,
353
+ onChange: (e) => h(e.target.value),
354
354
  placeholder: t("invoices.addPaymentMethodModal.expMonthPlaceholder", "12"),
355
355
  className: R
356
356
  })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
@@ -362,8 +362,8 @@ function K({ onClose: e }) {
362
362
  type: "number",
363
363
  min: "2024",
364
364
  max: "2099",
365
- value: h,
366
- onChange: (e) => g(e.target.value),
365
+ value: g,
366
+ onChange: (e) => _(e.target.value),
367
367
  placeholder: t("invoices.addPaymentMethodModal.expYearPlaceholder", "2028"),
368
368
  className: R
369
369
  })] })]
@@ -374,8 +374,8 @@ function K({ onClose: e }) {
374
374
  className: "flex items-center gap-2 text-sm text-text-primary",
375
375
  children: [/* @__PURE__ */ P("input", {
376
376
  type: "checkbox",
377
- checked: v,
378
- onChange: (e) => y(e.target.checked),
377
+ checked: y,
378
+ onChange: (e) => b(e.target.checked),
379
379
  className: "size-4 rounded border-border-subtle"
380
380
  }), t("invoices.addPaymentMethodModal.defaultLabel", "Set as default")]
381
381
  }),
@@ -398,13 +398,13 @@ function K({ onClose: e }) {
398
398
  });
399
399
  }
400
400
  function q() {
401
- let e = C(), { data: t, isLoading: n, isError: r, refetch: i } = b(), a = S(), [l, p] = T(!1), m = t ?? [];
402
- return /* @__PURE__ */ F(f, {
401
+ let e = u(), { data: t, isLoading: n, isError: r, refetch: i } = x(), a = C(), [l, m] = T(!1), h = t ?? [];
402
+ return /* @__PURE__ */ F(p, {
403
403
  title: e("invoices.paymentMethods.title", "Payment methods"),
404
404
  description: e("invoices.paymentMethods.description", "Which external cards and accounts pay for your subscriptions"),
405
405
  action: /* @__PURE__ */ F("button", {
406
406
  type: "button",
407
- onClick: () => p(!0),
407
+ onClick: () => m(!0),
408
408
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
409
409
  children: [
410
410
  /* @__PURE__ */ P(k, { className: "h-3.5 w-3.5" }),
@@ -412,17 +412,17 @@ function q() {
412
412
  e("invoices.paymentMethods.add", "Add payment method")
413
413
  ]
414
414
  }),
415
- children: [n ? /* @__PURE__ */ P(d, { label: e("invoices.paymentMethods.loading", "Loading payment methods…") }) : r ? /* @__PURE__ */ P(u, {
415
+ children: [n ? /* @__PURE__ */ P(f, { label: e("invoices.paymentMethods.loading", "Loading payment methods…") }) : r ? /* @__PURE__ */ P(d, {
416
416
  message: e("invoices.paymentMethods.error", "Could not load payment methods."),
417
417
  onRetry: () => void i()
418
- }) : m.length === 0 ? /* @__PURE__ */ P(c, {
418
+ }) : h.length === 0 ? /* @__PURE__ */ P(c, {
419
419
  illustration: "empty-data",
420
420
  icon: /* @__PURE__ */ P(O, { className: "h-12 w-12" }),
421
421
  title: e("invoices.paymentMethods.emptyTitle", "No payment methods"),
422
422
  description: e("invoices.paymentMethods.emptyDescription", "Annotate which card or account pays for each subscription. No full card numbers are stored.")
423
423
  }) : /* @__PURE__ */ P("div", {
424
424
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",
425
- children: m.map((t) => {
425
+ children: h.map((t) => {
426
426
  let n = [t.expiryMonth && t.expiryYear ? `Exp ${String(t.expiryMonth).padStart(2, "0")}/${String(t.expiryYear).slice(-2)}` : null].filter(Boolean);
427
427
  return /* @__PURE__ */ F(I, {
428
428
  treatment: "metric",
@@ -473,23 +473,23 @@ function q() {
473
473
  })]
474
474
  }, t.id);
475
475
  })
476
- }), l && /* @__PURE__ */ P(K, { onClose: () => p(!1) })]
476
+ }), l && /* @__PURE__ */ P(K, { onClose: () => m(!1) })]
477
477
  });
478
478
  }
479
479
  function J() {
480
- let o = C(), { navigateTo: l } = e(), [f, g] = T(0), [_, b] = T(""), [S, O] = T(!1), j = [{
480
+ let o = u(), { navigateTo: l } = e(), [p, _] = T(0), [v, x] = T(""), [C, O] = T(!1), j = [{
481
481
  value: "",
482
482
  label: o("invoices.filters.allStatuses", "All statuses")
483
483
  }, ...V.map((e) => ({
484
484
  value: e,
485
485
  label: o(B[e], e)
486
- }))], { data: M, isLoading: R, isError: z, refetch: H, isFetching: K } = v({
487
- status: _ || void 0,
486
+ }))], { data: M, isLoading: R, isError: z, refetch: H, isFetching: K } = y({
487
+ status: v || void 0,
488
488
  pagination: {
489
489
  limit: L,
490
- offset: f * L
490
+ offset: p * L
491
491
  }
492
- }), J = y(), Y = x({ pagination: {
492
+ }), J = b(), Y = S({ pagination: {
493
493
  limit: 100,
494
494
  offset: 0
495
495
  } }), X = w(() => {
@@ -502,7 +502,7 @@ function J() {
502
502
  let r = Array.from(n.entries()).sort((e, t) => t[1] - e[1]).map(([e, t], n) => ({
503
503
  label: o(B[e], e.charAt(0) + e.slice(1).toLowerCase()),
504
504
  value: t,
505
- color: W[e] ?? p[n % p.length]
505
+ color: W[e] ?? m[n % m.length]
506
506
  }));
507
507
  return {
508
508
  outstandingCount: e.length,
@@ -574,14 +574,14 @@ function J() {
574
574
  }),
575
575
  /* @__PURE__ */ F("div", {
576
576
  className: "mt-4 flex flex-col items-center gap-5 sm:flex-row sm:items-center lg:flex-col xl:flex-row",
577
- children: [/* @__PURE__ */ P(m, {
577
+ children: [/* @__PURE__ */ P(h, {
578
578
  data: $.distribution,
579
579
  size: 132,
580
580
  thickness: 16,
581
581
  centerLabel: String(Z.length),
582
582
  centerSub: o("invoices.metrics.invoices", "invoices"),
583
583
  className: "shrink-0"
584
- }), /* @__PURE__ */ P(h, {
584
+ }), /* @__PURE__ */ P(g, {
585
585
  data: $.distribution,
586
586
  className: "w-full min-w-0 flex-1",
587
587
  valueFormat: (e) => String(e)
@@ -594,9 +594,9 @@ function J() {
594
594
  className: "mt-6 flex flex-wrap items-center gap-3",
595
595
  children: /* @__PURE__ */ P("select", {
596
596
  "aria-label": o("invoices.filters.statusLabel", "Filter by status"),
597
- value: _,
597
+ value: v,
598
598
  onChange: (e) => {
599
- b(e.target.value), g(0);
599
+ x(e.target.value), _(0);
600
600
  },
601
601
  className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
602
602
  children: j.map((e) => /* @__PURE__ */ P("option", {
@@ -605,7 +605,7 @@ function J() {
605
605
  }, e.value))
606
606
  })
607
607
  }),
608
- R ? /* @__PURE__ */ P(d, { label: o("invoices.loading", "Loading invoices…") }) : z ? /* @__PURE__ */ P(u, {
608
+ R ? /* @__PURE__ */ P(f, { label: o("invoices.loading", "Loading invoices…") }) : z ? /* @__PURE__ */ P(d, {
609
609
  message: o("invoices.error", "Could not load invoices."),
610
610
  onRetry: () => void H()
611
611
  }) : Z.length === 0 ? /* @__PURE__ */ P("div", {
@@ -614,7 +614,7 @@ function J() {
614
614
  illustration: "empty-data",
615
615
  icon: /* @__PURE__ */ P(A, { className: "h-12 w-12" }),
616
616
  title: o("invoices.emptyTitle", "No invoices"),
617
- description: _ ? o("invoices.emptyDescriptionFiltered", "No invoices match this status filter.") : o("invoices.emptyDescription", "Invoices from your relationships will appear here — or create one manually."),
617
+ description: v ? o("invoices.emptyDescriptionFiltered", "No invoices match this status filter.") : o("invoices.emptyDescription", "Invoices from your relationships will appear here — or create one manually."),
618
618
  action: /* @__PURE__ */ P("button", {
619
619
  type: "button",
620
620
  onClick: () => O(!0),
@@ -699,26 +699,26 @@ function J() {
699
699
  className: "mt-4 flex items-center justify-between",
700
700
  children: [/* @__PURE__ */ F("p", {
701
701
  className: "text-xs text-text-secondary",
702
- children: [o("invoices.pagination.page", "Page {{page}}", { page: f + 1 }), K ? ` · ${o("invoices.pagination.refreshing", "refreshing…")}` : ""]
702
+ children: [o("invoices.pagination.page", "Page {{page}}", { page: p + 1 }), K ? ` · ${o("invoices.pagination.refreshing", "refreshing…")}` : ""]
703
703
  }), /* @__PURE__ */ F("div", {
704
704
  className: "flex gap-2",
705
705
  children: [/* @__PURE__ */ P("button", {
706
706
  type: "button",
707
- disabled: f === 0,
708
- onClick: () => g((e) => Math.max(0, e - 1)),
709
- className: t("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", f === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
707
+ disabled: p === 0,
708
+ onClick: () => _((e) => Math.max(0, e - 1)),
709
+ className: t("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", p === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
710
710
  children: o("invoices.pagination.previous", "Previous")
711
711
  }), /* @__PURE__ */ P("button", {
712
712
  type: "button",
713
713
  disabled: !Q,
714
- onClick: () => g((e) => e + 1),
714
+ onClick: () => _((e) => e + 1),
715
715
  className: t("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", Q ? "text-text-primary hover:bg-bg-sunken" : "cursor-not-allowed text-text-secondary opacity-50"),
716
716
  children: o("invoices.pagination.next", "Next")
717
717
  })]
718
718
  })]
719
719
  })] }),
720
720
  /* @__PURE__ */ P(q, {}),
721
- S && /* @__PURE__ */ P(G, { onClose: () => O(!1) })
721
+ C && /* @__PURE__ */ P(G, { onClose: () => O(!1) })
722
722
  ]
723
723
  });
724
724
  }
@@ -4,10 +4,10 @@ import { formatRelativeTime as n } from "../utils/formatters.js";
4
4
  import { StatusBadge as r } from "../components/StatusBadge.js";
5
5
  import { EmptyState as i } from "../components/EmptyState.js";
6
6
  import { Modal as a } from "../components/Modal.js";
7
- import { ErrorView as o, LoadingView as s } from "../components/StateViews.js";
7
+ import { useTr as o } from "../hooks/useTr.js";
8
+ import { ErrorView as s, LoadingView as c } from "../components/StateViews.js";
8
9
  import "../components/index.js";
9
- import { useActivateWorkflow as c, useCreateWorkflow as l, useWorkflows as u } from "../hooks/useSubscriberBotApi.js";
10
- import { useTr as d } from "../hooks/useTr.js";
10
+ import { useActivateWorkflow as l, useCreateWorkflow as u, useWorkflows as d } from "../hooks/useSubscriberBotApi.js";
11
11
  import { useState as f } from "react";
12
12
  import { ArrowRight as p, CheckCircle2 as m, Clock as h, Play as g, Plus as _, Sparkles as v, Workflow as y, X as b, Zap as x } from "lucide-react";
13
13
  import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
@@ -71,11 +71,11 @@ function A({ icon: e, kicker: t, title: n, sub: r, accent: i }) {
71
71
  });
72
72
  }
73
73
  function j({ workflow: e, onClose: t, onActivate: i, activating: a }) {
74
- let o = d(), s = /* @__PURE__ */ w("div", {
74
+ let s = o(), c = /* @__PURE__ */ w("div", {
75
75
  className: "flex shrink-0 items-center px-1 text-text-secondary",
76
76
  "aria-hidden": !0,
77
77
  children: [/* @__PURE__ */ C("span", { className: "h-px w-4 bg-border-seam sm:w-6" }), /* @__PURE__ */ C(p, { className: "h-4 w-4" })]
78
- }), c = e.status.charAt(0) + e.status.slice(1).toLowerCase();
78
+ }), l = e.status.charAt(0) + e.status.slice(1).toLowerCase();
79
79
  return /* @__PURE__ */ w(T, {
80
80
  treatment: "glass",
81
81
  glow: !0,
@@ -95,7 +95,7 @@ function j({ workflow: e, onClose: t, onActivate: i, activating: a }) {
95
95
  className: "mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-text-secondary",
96
96
  children: [/* @__PURE__ */ C("span", {
97
97
  className: "tabular-nums",
98
- children: o("workflows.flow.ran", "Ran {{count}}×", { count: e.runCount })
98
+ children: s("workflows.flow.ran", "Ran {{count}}×", { count: e.runCount })
99
99
  }), e.lastRunAt && /* @__PURE__ */ w("span", {
100
100
  className: "inline-flex items-center gap-1",
101
101
  children: [
@@ -104,14 +104,14 @@ function j({ workflow: e, onClose: t, onActivate: i, activating: a }) {
104
104
  "aria-hidden": !0
105
105
  }),
106
106
  " ",
107
- o("workflows.flow.lastRun", "last {{when}}", { when: n(e.lastRunAt) })
107
+ s("workflows.flow.lastRun", "last {{when}}", { when: n(e.lastRunAt) })
108
108
  ]
109
109
  })]
110
110
  })]
111
111
  }), /* @__PURE__ */ C("button", {
112
112
  type: "button",
113
113
  onClick: t,
114
- "aria-label": o("workflows.flow.closeAriaLabel", "Close flow"),
114
+ "aria-label": s("workflows.flow.closeAriaLabel", "Close flow"),
115
115
  className: "rounded-lg border border-border-subtle p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
116
116
  children: /* @__PURE__ */ C(b, { className: "h-4 w-4" })
117
117
  })]
@@ -127,26 +127,26 @@ function j({ workflow: e, onClose: t, onActivate: i, activating: a }) {
127
127
  children: [
128
128
  /* @__PURE__ */ C(A, {
129
129
  accent: "trigger",
130
- kicker: o("workflows.flow.trigger", "When"),
130
+ kicker: s("workflows.flow.trigger", "When"),
131
131
  icon: /* @__PURE__ */ C(x, { className: "h-4 w-4" }),
132
132
  title: e.triggerEvent,
133
- sub: o("workflows.flow.triggerEvent", "Trigger event")
133
+ sub: s("workflows.flow.triggerEvent", "Trigger event")
134
134
  }),
135
- s,
135
+ c,
136
136
  /* @__PURE__ */ C(A, {
137
137
  accent: "run",
138
- kicker: o("workflows.flow.run", "Run"),
138
+ kicker: s("workflows.flow.run", "Run"),
139
139
  icon: /* @__PURE__ */ C(v, { className: "h-4 w-4" }),
140
140
  title: e.name,
141
- sub: o("workflows.flow.automation", "Automation")
141
+ sub: s("workflows.flow.automation", "Automation")
142
142
  }),
143
- s,
143
+ c,
144
144
  /* @__PURE__ */ C(A, {
145
145
  accent: "done",
146
- kicker: o("workflows.flow.then", "Then"),
146
+ kicker: s("workflows.flow.then", "Then"),
147
147
  icon: /* @__PURE__ */ C(m, { className: "h-4 w-4" }),
148
- title: e.status === "ACTIVE" ? o("workflows.flow.live", "Live") : o("workflows.flow.awaitingActivation", "Awaiting activation"),
149
- sub: o("workflows.flow.status", "Status: {{status}}", { status: c })
148
+ title: e.status === "ACTIVE" ? s("workflows.flow.live", "Live") : s("workflows.flow.awaitingActivation", "Awaiting activation"),
149
+ sub: s("workflows.flow.status", "Status: {{status}}", { status: l })
150
150
  })
151
151
  ]
152
152
  })
@@ -161,7 +161,7 @@ function j({ workflow: e, onClose: t, onActivate: i, activating: a }) {
161
161
  children: [
162
162
  /* @__PURE__ */ C(g, { className: "h-4 w-4" }),
163
163
  " ",
164
- a ? o("common.activating", "Activating…") : o("workflows.flow.activate", "Activate workflow")
164
+ a ? s("common.activating", "Activating…") : s("workflows.flow.activate", "Activate workflow")
165
165
  ]
166
166
  })
167
167
  })
@@ -169,7 +169,7 @@ function j({ workflow: e, onClose: t, onActivate: i, activating: a }) {
169
169
  });
170
170
  }
171
171
  function M() {
172
- let [p, m] = f(""), [h, v] = f(!1), [b, A] = f(null), M = d(), { data: N, isLoading: P, isError: F, refetch: I } = u(p || void 0), L = l(), R = c(), [z, B] = f(""), [V, H] = f(""), [U, W] = f(""), [G, K] = f(null), q = N ?? [], J = q.find((e) => e.id === b) ?? null, Y = q.filter((e) => e.status === "ACTIVE").length, X = q.reduce((e, t) => e + (t.runCount || 0), 0), Z = () => {
172
+ let [p, m] = f(""), [h, v] = f(!1), [b, A] = f(null), M = o(), { data: N, isLoading: P, isError: F, refetch: I } = d(p || void 0), L = u(), R = l(), [z, B] = f(""), [V, H] = f(""), [U, W] = f(""), [G, K] = f(null), q = N ?? [], J = q.find((e) => e.id === b) ?? null, Y = q.filter((e) => e.status === "ACTIVE").length, X = q.reduce((e, t) => e + (t.runCount || 0), 0), Z = () => {
173
173
  B(""), H(""), W(""), K(null);
174
174
  }, Q = () => {
175
175
  v(!1), Z();
@@ -205,7 +205,7 @@ function M() {
205
205
  }, e.value))
206
206
  })
207
207
  }),
208
- P ? /* @__PURE__ */ C(s, { label: M("workflows.loading", "Loading workflows…") }) : F ? /* @__PURE__ */ C(o, {
208
+ P ? /* @__PURE__ */ C(c, { label: M("workflows.loading", "Loading workflows…") }) : F ? /* @__PURE__ */ C(s, {
209
209
  message: M("workflows.error", "Could not load workflows."),
210
210
  onRetry: () => void I()
211
211
  }) : q.length === 0 ? /* @__PURE__ */ C("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"AgentDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/agents/AgentDetailPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA2XH,wBAAgB,eAAe,gCAiR9B"}
1
+ {"version":3,"file":"AgentDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/agents/AgentDetailPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA6XH,wBAAgB,eAAe,gCAmR9B"}