@burdenoff/microfe-subscriberbot 2026.1102.3 → 2026.1102.5

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 (76) hide show
  1. package/dist/stories/pages/BankConnectionsPage.stories.d.ts +12 -0
  2. package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -0
  3. package/dist/stories/pages/DashboardPage.stories.d.ts +4 -0
  4. package/dist/stories/pages/DashboardPage.stories.d.ts.map +1 -1
  5. package/dist/stories/pages/RelationshipsListPage.stories.d.ts +5 -0
  6. package/dist/stories/pages/RelationshipsListPage.stories.d.ts.map +1 -1
  7. package/dist/stories/support/bankingFixtures.d.ts +8 -0
  8. package/dist/stories/support/bankingFixtures.d.ts.map +1 -0
  9. package/dist/stories/support/phoneViewport.d.ts +4 -0
  10. package/dist/stories/support/phoneViewport.d.ts.map +1 -0
  11. package/dist/subscriberbot/SubscriberBotRoot.d.ts.map +1 -1
  12. package/dist/subscriberbot/SubscriberBotRoot.js +58 -50
  13. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  14. package/dist/subscriberbot/SubscriberBotRoutes.d.ts.map +1 -1
  15. package/dist/subscriberbot/SubscriberBotRoutes.js +10 -6
  16. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  17. package/dist/subscriberbot/components/PageLayout.d.ts.map +1 -1
  18. package/dist/subscriberbot/components/PageLayout.js +3 -3
  19. package/dist/subscriberbot/components/PageLayout.js.map +1 -1
  20. package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
  21. package/dist/subscriberbot/components/StatusBadge.js +3 -0
  22. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  23. package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts +18 -0
  24. package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +1 -0
  25. package/dist/subscriberbot/components/mobile/MobileDashboard.js +247 -0
  26. package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -0
  27. package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts +10 -0
  28. package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +1 -0
  29. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +217 -0
  30. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -0
  31. package/dist/subscriberbot/components/mobile/MobileScreen.d.ts +26 -0
  32. package/dist/subscriberbot/components/mobile/MobileScreen.d.ts.map +1 -0
  33. package/dist/subscriberbot/components/mobile/MobileScreen.js +46 -0
  34. package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -0
  35. package/dist/subscriberbot/components/mobile/RelationshipGlyph.d.ts +10 -0
  36. package/dist/subscriberbot/components/mobile/RelationshipGlyph.d.ts.map +1 -0
  37. package/dist/subscriberbot/components/mobile/RelationshipGlyph.js +25 -0
  38. package/dist/subscriberbot/components/mobile/RelationshipGlyph.js.map +1 -0
  39. package/dist/subscriberbot/components/mobile/index.d.ts +9 -0
  40. package/dist/subscriberbot/components/mobile/index.d.ts.map +1 -0
  41. package/dist/subscriberbot/components/mobile/index.js +4 -0
  42. package/dist/subscriberbot/hooks/index.d.ts +1 -0
  43. package/dist/subscriberbot/hooks/index.d.ts.map +1 -1
  44. package/dist/subscriberbot/hooks/index.js +1 -0
  45. package/dist/subscriberbot/hooks/useBankingApi.d.ts +31 -0
  46. package/dist/subscriberbot/hooks/useBankingApi.d.ts.map +1 -0
  47. package/dist/subscriberbot/hooks/useBankingApi.js +105 -0
  48. package/dist/subscriberbot/hooks/useBankingApi.js.map +1 -0
  49. package/dist/subscriberbot/hooks/useCompactViewport.d.ts +13 -0
  50. package/dist/subscriberbot/hooks/useCompactViewport.d.ts.map +1 -0
  51. package/dist/subscriberbot/hooks/useCompactViewport.js +21 -0
  52. package/dist/subscriberbot/hooks/useCompactViewport.js.map +1 -0
  53. package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
  54. package/dist/subscriberbot/pages/DashboardPage.js +166 -189
  55. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  56. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +11 -0
  57. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -0
  58. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +564 -0
  59. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -0
  60. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
  61. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +120 -119
  62. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  63. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
  64. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +226 -212
  65. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  66. package/dist/subscriberbot/types/banking.d.ts +86 -0
  67. package/dist/subscriberbot/types/banking.d.ts.map +1 -0
  68. package/dist/subscriberbot/utils/plaidLink.d.ts +47 -0
  69. package/dist/subscriberbot/utils/plaidLink.d.ts.map +1 -0
  70. package/dist/subscriberbot/utils/plaidLink.js +35 -0
  71. package/dist/subscriberbot/utils/plaidLink.js.map +1 -0
  72. package/dist/subscriberbot/utils/portfolio.d.ts +106 -0
  73. package/dist/subscriberbot/utils/portfolio.d.ts.map +1 -0
  74. package/dist/subscriberbot/utils/portfolio.js +151 -0
  75. package/dist/subscriberbot/utils/portfolio.js.map +1 -0
  76. package/package.json +1 -1
@@ -5,121 +5,98 @@ import { formatCurrency as r, formatEnumLabel as i, formatRelativeTime as a } fr
5
5
  import { StatusBadge as o } from "../components/StatusBadge.js";
6
6
  import { EmptyState as s } from "../components/EmptyState.js";
7
7
  import { useTr as c } from "../hooks/useTr.js";
8
- import { ErrorView as ee, LoadingView as l, Section as u } from "../components/StateViews.js";
9
- import { Donut as d, Legend as f, Timeline as p } from "../components/viz.js";
8
+ import { ErrorView as l, LoadingView as u, Section as d } from "../components/StateViews.js";
9
+ import { Donut as f, Legend as p, Timeline as m } from "../components/viz.js";
10
10
  import "../components/index.js";
11
- import { useInboxMessages as m, useInvoices as h, useRelationships as g, useRenewalEvents as _ } from "../hooks/useSubscriberBotApi.js";
12
- import { useMemo as v } from "react";
13
- import { AlertTriangle as y, ArrowRight as b, ArrowUpRight as x, Bot as S, CalendarClock as C, Inbox as w, Repeat2 as T, ShieldCheck as E, Sparkles as D, Wallet as O } from "lucide-react";
14
- import { jsx as k, jsxs as A } from "react/jsx-runtime";
15
- import { GlassCard as j, PagePurpose as M } from "@burdenoff/fe-libs/ui";
11
+ import { useDecisions as h, useInboxMessages as g, useInvoices as _, useRelationships as v, useRenewalEvents as y } from "../hooks/useSubscriberBotApi.js";
12
+ import { buildUpcomingRenewals as ee, recurringSpend as te } from "../utils/portfolio.js";
13
+ import { useCompactViewport as ne } from "../hooks/useCompactViewport.js";
14
+ import { MobileDashboard as re } from "../components/mobile/MobileDashboard.js";
15
+ import "../components/mobile/index.js";
16
+ import { useMemo as b } from "react";
17
+ import { AlertTriangle as x, ArrowRight as S, ArrowUpRight as C, Bot as w, CalendarClock as T, Inbox as E, Repeat2 as D, ShieldCheck as ie, Sparkles as O, Wallet as k } from "lucide-react";
18
+ import { jsx as A, jsxs as j } from "react/jsx-runtime";
19
+ import { GlassCard as M, PagePurpose as N } from "@burdenoff/fe-libs/ui";
16
20
  //#region src/subscriberbot/pages/DashboardPage.tsx
17
- var N = {
18
- DAILY: 30,
19
- WEEKLY: 4.345,
20
- MONTHLY: 1,
21
- QUARTERLY: 1 / 3,
22
- YEARLY: 1 / 12,
23
- LIFETIME: 0,
24
- FREE: 0,
25
- USAGE_BASED: 1
26
- }, P = 1e3 * 60 * 60 * 24;
27
- function F() {
28
- let { navigateTo: F, currentUser: I } = e(), L = c(), R = g({ pagination: {
21
+ function P() {
22
+ let { navigateTo: P, currentUser: F } = e(), I = c(), L = v({ pagination: {
29
23
  limit: 100,
30
24
  offset: 0
31
- } }), z = h({ pagination: {
25
+ } }), R = _({ pagination: {
32
26
  limit: 50,
33
27
  offset: 0
34
- } }), B = m({ pagination: {
28
+ } }), z = g({ pagination: {
35
29
  limit: 50,
36
30
  offset: 0
37
- } }), V = _({ upcomingOnly: !0 }), H = v(() => R.data?.items ?? [], [R.data]), U = v(() => z.data?.items ?? [], [z.data]), W = v(() => B.data?.items ?? [], [B.data]), G = v(() => V.data ?? [], [V.data]), K = v(() => {
31
+ } }), B = y({ upcomingOnly: !0 }), V = ne(), H = h({ status: "PROPOSED" }, { enabled: V }), U = b(() => L.data?.items ?? [], [L.data]), W = b(() => R.data?.items ?? [], [R.data]), G = b(() => z.data?.items ?? [], [z.data]), K = b(() => B.data ?? [], [B.data]), q = b(() => {
38
32
  let e = /* @__PURE__ */ new Map();
39
- return H.forEach((t) => e.set(t.id, t)), e;
40
- }, [H]), q = v(() => {
41
- let e = H.filter((e) => e.status === "ACTIVE" || e.status === "TRIAL"), t = e.reduce((e, t) => e + t.amount * (N[t.interval] ?? 1), 0), n = e[0]?.currency ?? H[0]?.currency ?? "USD", r = W.filter((e) => e.actionRequired).length, i = U.filter((e) => e.status === "ISSUED" || e.status === "OVERDUE" || e.status === "FAILED"), a = i.reduce((e, t) => e + t.total, 0), o = H.filter((e) => e.status === "PAST_DUE" || e.status === "LAPSED").length;
33
+ return U.forEach((t) => e.set(t.id, t)), e;
34
+ }, [U]), J = b(() => {
35
+ let e = te(U), t = G.filter((e) => e.actionRequired).length, n = W.filter((e) => e.status === "ISSUED" || e.status === "OVERDUE" || e.status === "FAILED"), r = n.reduce((e, t) => e + t.total, 0), i = U.filter((e) => e.status === "PAST_DUE" || e.status === "LAPSED").length;
42
36
  return {
43
- activeCount: e.length,
44
- totalCount: H.length,
45
- monthlySpend: t,
46
- primaryCurrency: n,
47
- actionRequired: r,
48
- openInvoiceCount: i.length,
49
- openInvoiceTotal: a,
50
- atRisk: o
37
+ activeCount: e.activeCount,
38
+ totalCount: U.length,
39
+ monthlySpend: e.monthly,
40
+ primaryCurrency: e.currency,
41
+ actionRequired: t,
42
+ openInvoiceCount: n.length,
43
+ openInvoiceTotal: r,
44
+ atRisk: i
51
45
  };
52
46
  }, [
53
- H,
54
- W,
55
- U
56
- ]), J = v(() => {
47
+ U,
48
+ G,
49
+ W
50
+ ]), Y = b(() => {
57
51
  let e = /* @__PURE__ */ new Map();
58
- return H.forEach((t) => e.set(t.status, (e.get(t.status) ?? 0) + 1)), Array.from(e.entries()).sort((e, t) => t[1] - e[1]).map(([e, t]) => ({
52
+ return U.forEach((t) => e.set(t.status, (e.get(t.status) ?? 0) + 1)), Array.from(e.entries()).sort((e, t) => t[1] - e[1]).map(([e, t]) => ({
59
53
  label: i(e),
60
54
  value: t
61
55
  }));
62
- }, [H]), Y = v(() => {
63
- let e = Date.now(), t = G.map((t) => {
64
- let n = K.get(t.relationshipId), r = new Date(t.occursAt).getTime();
65
- return {
66
- id: t.id,
67
- relationshipId: t.relationshipId,
68
- title: n?.label ?? i(t.eventType),
69
- when: t.occursAt,
70
- amount: t.amount ?? n?.amount ?? null,
71
- currency: t.currency ?? n?.currency ?? null,
72
- soon: !Number.isNaN(r) && r - e <= 7 * P
73
- };
74
- });
75
- return t.length > 0 ? t.filter((e) => !Number.isNaN(new Date(e.when).getTime())).sort((e, t) => new Date(e.when).getTime() - new Date(t.when).getTime()) : H.filter((t) => {
76
- if (!t.renewsAt) return !1;
77
- let n = new Date(t.renewsAt).getTime();
78
- return !Number.isNaN(n) && n >= e;
79
- }).map((t) => {
80
- let n = new Date(t.renewsAt).getTime();
81
- return {
82
- id: t.id,
83
- relationshipId: t.id,
84
- title: t.label,
85
- when: t.renewsAt,
86
- amount: t.amount,
87
- currency: t.currency,
88
- soon: n - e <= 7 * P
89
- };
90
- }).sort((e, t) => new Date(e.when).getTime() - new Date(t.when).getTime());
91
- }, [
92
- G,
93
- H,
94
- K
95
- ]), X = v(() => Y.slice(0, 6).map((e) => ({
56
+ }, [U]), X = b(() => ee(U, K, (e) => i(e)), [U, K]), Z = b(() => X.slice(0, 6).map((e) => ({
96
57
  title: e.title,
97
58
  sub: a(e.when),
98
59
  tone: e.soon ? "warning" : "default",
99
- meta: e.amount == null ? void 0 : r(e.amount, e.currency ?? q.primaryCurrency, { maximumFractionDigits: 0 })
100
- })), [Y, q.primaryCurrency]), Z = v(() => W.filter((e) => e.actionRequired), [W]), Q = R.isLoading || z.isLoading || B.isLoading || V.isLoading, te = R.isError && z.isError && B.isError && V.isError;
101
- if (Q) return /* @__PURE__ */ k(t, {
102
- title: L("dashboard.title", "Overview"),
103
- description: L("dashboard.description", "Your recurring digital relationships at a glance"),
104
- children: /* @__PURE__ */ k(l, { label: L("dashboard.loading", "Loading your subscription portfolio…") })
60
+ meta: e.amount == null ? void 0 : r(e.amount, e.currency ?? J.primaryCurrency, { maximumFractionDigits: 0 })
61
+ })), [X, J.primaryCurrency]), Q = b(() => G.filter((e) => e.actionRequired), [G]), ae = L.isLoading || R.isLoading || z.isLoading || B.isLoading, oe = L.isError && R.isError && z.isError && B.isError;
62
+ if (ae) return /* @__PURE__ */ A(t, {
63
+ title: I("dashboard.title", "Overview"),
64
+ description: I("dashboard.description", "Your recurring digital relationships at a glance"),
65
+ children: /* @__PURE__ */ A(u, { label: I("dashboard.loading", "Loading your subscription portfolio…") })
105
66
  });
106
- if (te) return /* @__PURE__ */ k(t, {
107
- title: L("dashboard.title", "Overview"),
108
- description: L("dashboard.description", "Your recurring digital relationships at a glance"),
109
- children: /* @__PURE__ */ k(ee, {
110
- message: L("dashboard.error", "We couldn't reach the Subscriber Bot service. Please try again."),
67
+ if (oe) return /* @__PURE__ */ A(t, {
68
+ title: I("dashboard.title", "Overview"),
69
+ description: I("dashboard.description", "Your recurring digital relationships at a glance"),
70
+ children: /* @__PURE__ */ A(l, {
71
+ message: I("dashboard.error", "We couldn't reach the Subscriber Bot service. Please try again."),
111
72
  onRetry: () => {
112
- R.refetch(), z.refetch(), B.refetch(), V.refetch();
73
+ L.refetch(), R.refetch(), z.refetch(), B.refetch();
113
74
  }
114
75
  })
115
76
  });
116
- let $ = I?.firstName || I?.name?.split(" ")[0], ne = [
77
+ let $ = F?.firstName || F?.name?.split(" ")[0];
78
+ if (V) return /* @__PURE__ */ A(re, {
79
+ greetingName: $ || void 0,
80
+ spend: {
81
+ monthly: J.monthlySpend,
82
+ currency: J.primaryCurrency,
83
+ activeCount: J.activeCount
84
+ },
85
+ upcoming: X,
86
+ actionMessages: Q,
87
+ decisions: H.data?.items ?? [],
88
+ relationshipLabel: (e) => q.get(e)?.label,
89
+ openInvoiceCount: J.openInvoiceCount,
90
+ openInvoiceTotal: J.openInvoiceTotal,
91
+ navigateTo: P
92
+ });
93
+ let se = [
117
94
  {
118
95
  labelKey: "dashboard.quickActions.addRelationship.label",
119
96
  descriptionKey: "dashboard.quickActions.addRelationship.description",
120
97
  fallbackLabel: "Add a relationship",
121
98
  fallbackDescription: "Track a new subscription",
122
- icon: /* @__PURE__ */ k(T, { className: "h-5 w-5" }),
99
+ icon: /* @__PURE__ */ A(D, { className: "h-5 w-5" }),
123
100
  path: "/relationships/new"
124
101
  },
125
102
  {
@@ -127,7 +104,7 @@ function F() {
127
104
  descriptionKey: "dashboard.quickActions.discoverProviders.description",
128
105
  fallbackLabel: "Discover providers",
129
106
  fallbackDescription: "Browse the registry",
130
- icon: /* @__PURE__ */ k(D, { className: "h-5 w-5" }),
107
+ icon: /* @__PURE__ */ A(O, { className: "h-5 w-5" }),
131
108
  path: "/providers"
132
109
  },
133
110
  {
@@ -135,7 +112,7 @@ function F() {
135
112
  descriptionKey: "dashboard.quickActions.openInbox.description",
136
113
  fallbackLabel: "Open inbox",
137
114
  fallbackDescription: "Merged communications",
138
- icon: /* @__PURE__ */ k(w, { className: "h-5 w-5" }),
115
+ icon: /* @__PURE__ */ A(E, { className: "h-5 w-5" }),
139
116
  path: "/inbox"
140
117
  },
141
118
  {
@@ -143,151 +120,151 @@ function F() {
143
120
  descriptionKey: "dashboard.quickActions.configureAgents.description",
144
121
  fallbackLabel: "Configure agents",
145
122
  fallbackDescription: "Automate your portfolio",
146
- icon: /* @__PURE__ */ k(S, { className: "h-5 w-5" }),
123
+ icon: /* @__PURE__ */ A(w, { className: "h-5 w-5" }),
147
124
  path: "/agents"
148
125
  }
149
126
  ];
150
- return /* @__PURE__ */ A(t, {
151
- title: $ ? L("dashboard.welcomeBack", "Welcome back, {{name}}", { name: $ }) : L("dashboard.title", "Overview"),
152
- description: L("dashboard.description", "Everything you pay for on repeat — in one intelligent console."),
127
+ return /* @__PURE__ */ j(t, {
128
+ title: $ ? I("dashboard.welcomeBack", "Welcome back, {{name}}", { name: $ }) : I("dashboard.title", "Overview"),
129
+ description: I("dashboard.description", "Everything you pay for on repeat — in one intelligent console."),
153
130
  children: [
154
- /* @__PURE__ */ k(M, {
131
+ /* @__PURE__ */ A(N, {
155
132
  className: "mb-6",
156
- children: L("dashboard.purpose", "Subscriber Bot is your system of record for every recurring digital relationship. See total recurring spend, what renews next, what needs action, and what to optimize — all from real data across your providers.")
133
+ children: I("dashboard.purpose", "Subscriber Bot is your system of record for every recurring digital relationship. See total recurring spend, what renews next, what needs action, and what to optimize — all from real data across your providers.")
157
134
  }),
158
- /* @__PURE__ */ A("div", {
135
+ /* @__PURE__ */ j("div", {
159
136
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
160
137
  children: [
161
- /* @__PURE__ */ k(n, {
138
+ /* @__PURE__ */ A(n, {
162
139
  featured: !0,
163
- icon: /* @__PURE__ */ k(O, {}),
164
- value: r(q.monthlySpend, q.primaryCurrency, { maximumFractionDigits: 0 }),
165
- label: L("dashboard.metrics.recurringSpend", "Recurring spend / month")
140
+ icon: /* @__PURE__ */ A(k, {}),
141
+ value: r(J.monthlySpend, J.primaryCurrency, { maximumFractionDigits: 0 }),
142
+ label: I("dashboard.metrics.recurringSpend", "Recurring spend / month")
166
143
  }),
167
- /* @__PURE__ */ k(n, {
168
- icon: /* @__PURE__ */ k(T, {}),
169
- value: q.activeCount,
170
- label: L("dashboard.metrics.activeRelationships", "Active relationships")
144
+ /* @__PURE__ */ A(n, {
145
+ icon: /* @__PURE__ */ A(D, {}),
146
+ value: J.activeCount,
147
+ label: I("dashboard.metrics.activeRelationships", "Active relationships")
171
148
  }),
172
- /* @__PURE__ */ k(n, {
173
- icon: /* @__PURE__ */ k(C, {}),
174
- value: Y.length,
175
- label: L("dashboard.metrics.upcomingRenewals", "Upcoming renewals")
149
+ /* @__PURE__ */ A(n, {
150
+ icon: /* @__PURE__ */ A(T, {}),
151
+ value: X.length,
152
+ label: I("dashboard.metrics.upcomingRenewals", "Upcoming renewals")
176
153
  }),
177
- /* @__PURE__ */ k(n, {
178
- icon: /* @__PURE__ */ k(y, {}),
179
- value: q.actionRequired,
180
- label: L("dashboard.metrics.needsAction", "Need your action"),
181
- trend: q.actionRequired > 0 ? "down" : void 0
154
+ /* @__PURE__ */ A(n, {
155
+ icon: /* @__PURE__ */ A(x, {}),
156
+ value: J.actionRequired,
157
+ label: I("dashboard.metrics.needsAction", "Need your action"),
158
+ trend: J.actionRequired > 0 ? "down" : void 0
182
159
  })
183
160
  ]
184
161
  }),
185
- /* @__PURE__ */ A("div", {
162
+ /* @__PURE__ */ j("div", {
186
163
  className: "mt-8 grid grid-cols-1 gap-6 lg:grid-cols-3",
187
- children: [/* @__PURE__ */ k("div", {
164
+ children: [/* @__PURE__ */ A("div", {
188
165
  className: "lg:col-span-2",
189
- children: /* @__PURE__ */ k(u, {
190
- title: L("dashboard.renewals.title", "Upcoming renewals"),
191
- description: L("dashboard.renewals.description", "What's charging next across your portfolio"),
166
+ children: /* @__PURE__ */ A(d, {
167
+ title: I("dashboard.renewals.title", "Upcoming renewals"),
168
+ description: I("dashboard.renewals.description", "What's charging next across your portfolio"),
192
169
  className: "mt-0",
193
- action: /* @__PURE__ */ A("button", {
170
+ action: /* @__PURE__ */ j("button", {
194
171
  type: "button",
195
- onClick: () => F("/relationships"),
172
+ onClick: () => P("/relationships"),
196
173
  className: "inline-flex items-center gap-1 text-sm font-medium text-text-link hover:underline",
197
174
  children: [
198
- L("common.viewAll", "View all"),
175
+ I("common.viewAll", "View all"),
199
176
  " ",
200
- /* @__PURE__ */ k(x, { className: "h-3.5 w-3.5" })
177
+ /* @__PURE__ */ A(C, { className: "h-3.5 w-3.5" })
201
178
  ]
202
179
  }),
203
- children: /* @__PURE__ */ k(j, {
180
+ children: /* @__PURE__ */ A(M, {
204
181
  treatment: "plain",
205
182
  className: "p-5",
206
- children: X.length === 0 ? /* @__PURE__ */ k(s, {
183
+ children: Z.length === 0 ? /* @__PURE__ */ A(s, {
207
184
  illustration: "empty-calendar",
208
- title: L("dashboard.renewals.emptyTitle", "No upcoming renewals"),
209
- description: L("dashboard.renewals.emptyDescription", "Renewals you track will appear here ahead of time.")
210
- }) : /* @__PURE__ */ k(p, { items: X })
185
+ title: I("dashboard.renewals.emptyTitle", "No upcoming renewals"),
186
+ description: I("dashboard.renewals.emptyDescription", "Renewals you track will appear here ahead of time.")
187
+ }) : /* @__PURE__ */ A(m, { items: Z })
211
188
  })
212
189
  })
213
- }), /* @__PURE__ */ A("div", {
190
+ }), /* @__PURE__ */ j("div", {
214
191
  className: "flex flex-col gap-6",
215
- children: [/* @__PURE__ */ k(u, {
216
- title: L("dashboard.portfolio.title", "Portfolio by status"),
217
- description: L("dashboard.portfolio.description", "Where your relationships stand"),
192
+ children: [/* @__PURE__ */ A(d, {
193
+ title: I("dashboard.portfolio.title", "Portfolio by status"),
194
+ description: I("dashboard.portfolio.description", "Where your relationships stand"),
218
195
  className: "mt-0",
219
- children: /* @__PURE__ */ k(j, {
196
+ children: /* @__PURE__ */ A(M, {
220
197
  treatment: "glass",
221
198
  className: "p-5",
222
- children: J.length === 0 ? /* @__PURE__ */ k(s, {
199
+ children: Y.length === 0 ? /* @__PURE__ */ A(s, {
223
200
  illustration: "empty-data",
224
- title: L("dashboard.portfolio.emptyTitle", "No relationships yet"),
225
- description: L("dashboard.portfolio.emptyDescription", "Add your first subscription to see the breakdown."),
226
- action: /* @__PURE__ */ k("button", {
201
+ title: I("dashboard.portfolio.emptyTitle", "No relationships yet"),
202
+ description: I("dashboard.portfolio.emptyDescription", "Add your first subscription to see the breakdown."),
203
+ action: /* @__PURE__ */ A("button", {
227
204
  type: "button",
228
- onClick: () => F("/relationships/new"),
205
+ onClick: () => P("/relationships/new"),
229
206
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
230
- children: L("dashboard.portfolio.addRelationship", "Add relationship")
207
+ children: I("dashboard.portfolio.addRelationship", "Add relationship")
231
208
  })
232
- }) : /* @__PURE__ */ A("div", {
209
+ }) : /* @__PURE__ */ j("div", {
233
210
  className: "flex flex-col items-center gap-5 sm:flex-row sm:items-center lg:flex-col xl:flex-row",
234
- children: [/* @__PURE__ */ k(d, {
235
- data: J,
211
+ children: [/* @__PURE__ */ A(f, {
212
+ data: Y,
236
213
  size: 148,
237
214
  thickness: 20,
238
- centerLabel: String(q.totalCount),
239
- centerSub: L(q.totalCount === 1 ? "dashboard.portfolio.relationshipSingular" : "dashboard.portfolio.relationshipPlural", q.totalCount === 1 ? "relationship" : "relationships"),
215
+ centerLabel: String(J.totalCount),
216
+ centerSub: I(J.totalCount === 1 ? "dashboard.portfolio.relationshipSingular" : "dashboard.portfolio.relationshipPlural", J.totalCount === 1 ? "relationship" : "relationships"),
240
217
  className: "shrink-0"
241
- }), /* @__PURE__ */ k(f, {
242
- data: J,
218
+ }), /* @__PURE__ */ A(p, {
219
+ data: Y,
243
220
  className: "w-full min-w-0 flex-1"
244
221
  })]
245
222
  })
246
223
  })
247
- }), /* @__PURE__ */ k(u, {
248
- title: L("dashboard.needsAttention.title", "Needs attention"),
249
- description: L("dashboard.needsAttention.description", "Required actions from the Universal Inbox"),
224
+ }), /* @__PURE__ */ A(d, {
225
+ title: I("dashboard.needsAttention.title", "Needs attention"),
226
+ description: I("dashboard.needsAttention.description", "Required actions from the Universal Inbox"),
250
227
  className: "mt-0",
251
- action: /* @__PURE__ */ k("button", {
228
+ action: /* @__PURE__ */ A("button", {
252
229
  type: "button",
253
- onClick: () => F("/inbox"),
230
+ onClick: () => P("/inbox"),
254
231
  className: "text-sm font-medium text-text-link hover:underline",
255
- children: L("dashboard.needsAttention.openInbox", "Open inbox")
232
+ children: I("dashboard.needsAttention.openInbox", "Open inbox")
256
233
  }),
257
- children: /* @__PURE__ */ k(j, {
234
+ children: /* @__PURE__ */ A(M, {
258
235
  treatment: "plain",
259
236
  className: "p-3",
260
- children: Z.length === 0 ? /* @__PURE__ */ A("div", {
237
+ children: Q.length === 0 ? /* @__PURE__ */ j("div", {
261
238
  className: "flex items-center gap-3 px-2 py-4",
262
- children: [/* @__PURE__ */ k("span", {
239
+ children: [/* @__PURE__ */ A("span", {
263
240
  className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-status-success-bg-subtle text-status-success-text",
264
- children: /* @__PURE__ */ k(E, { className: "h-5 w-5" })
265
- }), /* @__PURE__ */ A("div", {
241
+ children: /* @__PURE__ */ A(ie, { className: "h-5 w-5" })
242
+ }), /* @__PURE__ */ j("div", {
266
243
  className: "min-w-0",
267
- children: [/* @__PURE__ */ k("p", {
244
+ children: [/* @__PURE__ */ A("p", {
268
245
  className: "text-sm font-medium text-text-primary",
269
- children: L("dashboard.needsAttention.allCaughtUp", "You're all caught up")
270
- }), /* @__PURE__ */ k("p", {
246
+ children: I("dashboard.needsAttention.allCaughtUp", "You're all caught up")
247
+ }), /* @__PURE__ */ A("p", {
271
248
  className: "text-xs text-text-secondary",
272
- children: L("dashboard.needsAttention.allCaughtUpDescription", "Required actions across your channels will surface here.")
249
+ children: I("dashboard.needsAttention.allCaughtUpDescription", "Required actions across your channels will surface here.")
273
250
  })]
274
251
  })]
275
- }) : /* @__PURE__ */ k("ul", {
252
+ }) : /* @__PURE__ */ A("ul", {
276
253
  className: "space-y-1",
277
- children: Z.slice(0, 5).map((e) => /* @__PURE__ */ k("li", { children: /* @__PURE__ */ A("button", {
254
+ children: Q.slice(0, 5).map((e) => /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j("button", {
278
255
  type: "button",
279
- onClick: () => F("/inbox"),
256
+ onClick: () => P("/inbox"),
280
257
  className: "flex w-full items-center gap-3 rounded-lg border-l-2 border-status-warning-text/60 bg-status-warning-bg-subtle/50 p-3 text-left transition-colors hover:bg-status-warning-bg-subtle",
281
- children: [/* @__PURE__ */ A("div", {
258
+ children: [/* @__PURE__ */ j("div", {
282
259
  className: "min-w-0 flex-1",
283
- children: [/* @__PURE__ */ k("p", {
260
+ children: [/* @__PURE__ */ A("p", {
284
261
  className: "truncate text-sm font-medium text-text-primary",
285
- children: e.subject || L("dashboard.needsAttention.noSubject", "(no subject)")
286
- }), e.preview && /* @__PURE__ */ k("p", {
262
+ children: e.subject || I("dashboard.needsAttention.noSubject", "(no subject)")
263
+ }), e.preview && /* @__PURE__ */ A("p", {
287
264
  className: "truncate text-xs text-text-secondary",
288
265
  children: e.preview
289
266
  })]
290
- }), /* @__PURE__ */ k(o, {
267
+ }), /* @__PURE__ */ A(o, {
291
268
  status: e.category,
292
269
  className: "shrink-0"
293
270
  })]
@@ -297,46 +274,46 @@ function F() {
297
274
  })]
298
275
  })]
299
276
  }),
300
- q.openInvoiceCount > 0 && /* @__PURE__ */ A("button", {
277
+ J.openInvoiceCount > 0 && /* @__PURE__ */ j("button", {
301
278
  type: "button",
302
- onClick: () => F("/invoices"),
279
+ onClick: () => P("/invoices"),
303
280
  className: "mt-6 flex w-full items-center justify-between gap-3 rounded-xl border border-status-warning-text/30 bg-status-warning-bg-subtle px-5 py-4 text-left transition-shadow hover:shadow-md",
304
- children: [/* @__PURE__ */ A("div", {
281
+ children: [/* @__PURE__ */ j("div", {
305
282
  className: "flex items-center gap-3",
306
- children: [/* @__PURE__ */ k(y, { className: "h-5 w-5 shrink-0 text-status-warning-text" }), /* @__PURE__ */ k("span", {
283
+ children: [/* @__PURE__ */ A(x, { className: "h-5 w-5 shrink-0 text-status-warning-text" }), /* @__PURE__ */ A("span", {
307
284
  className: "text-sm font-medium text-status-warning-text",
308
- children: L("dashboard.openInvoices.label", "{{count}} open invoice · {{amount}} outstanding", {
309
- count: q.openInvoiceCount,
310
- amount: r(q.openInvoiceTotal, q.primaryCurrency)
285
+ children: I("dashboard.openInvoices.label", "{{count}} open invoice · {{amount}} outstanding", {
286
+ count: J.openInvoiceCount,
287
+ amount: r(J.openInvoiceTotal, J.primaryCurrency)
311
288
  })
312
289
  })]
313
- }), /* @__PURE__ */ k(b, { className: "h-4 w-4 shrink-0 text-status-warning-text" })]
290
+ }), /* @__PURE__ */ A(S, { className: "h-4 w-4 shrink-0 text-status-warning-text" })]
314
291
  }),
315
- /* @__PURE__ */ k(u, {
316
- title: L("dashboard.quickActions.title", "Quick actions"),
317
- description: L("dashboard.quickActions.description", "Jump straight into your workflow"),
318
- children: /* @__PURE__ */ k("div", {
292
+ /* @__PURE__ */ A(d, {
293
+ title: I("dashboard.quickActions.title", "Quick actions"),
294
+ description: I("dashboard.quickActions.description", "Jump straight into your workflow"),
295
+ children: /* @__PURE__ */ A("div", {
319
296
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",
320
- children: ne.map((e) => /* @__PURE__ */ A("button", {
297
+ children: se.map((e) => /* @__PURE__ */ j("button", {
321
298
  type: "button",
322
- onClick: () => F(e.path),
299
+ onClick: () => P(e.path),
323
300
  className: "group flex items-center gap-3 rounded-xl border border-border-subtle bg-bg-surface p-4 text-left transition-all hover:-translate-y-0.5 hover:border-border-seam hover:shadow-md",
324
301
  children: [
325
- /* @__PURE__ */ k("span", {
302
+ /* @__PURE__ */ A("span", {
326
303
  className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
327
304
  children: e.icon
328
305
  }),
329
- /* @__PURE__ */ A("span", {
306
+ /* @__PURE__ */ j("span", {
330
307
  className: "min-w-0 flex-1",
331
- children: [/* @__PURE__ */ k("span", {
308
+ children: [/* @__PURE__ */ A("span", {
332
309
  className: "block text-sm font-medium text-text-primary",
333
- children: L(e.labelKey, e.fallbackLabel)
334
- }), /* @__PURE__ */ k("span", {
310
+ children: I(e.labelKey, e.fallbackLabel)
311
+ }), /* @__PURE__ */ A("span", {
335
312
  className: "block text-xs text-text-secondary",
336
- children: L(e.descriptionKey, e.fallbackDescription)
313
+ children: I(e.descriptionKey, e.fallbackDescription)
337
314
  })]
338
315
  }),
339
- /* @__PURE__ */ k(b, { className: "h-4 w-4 shrink-0 text-text-secondary transition-transform group-hover:translate-x-0.5" })
316
+ /* @__PURE__ */ A(S, { className: "h-4 w-4 shrink-0 text-text-secondary transition-transform group-hover:translate-x-0.5" })
340
317
  ]
341
318
  }, e.path))
342
319
  })
@@ -345,6 +322,6 @@ function F() {
345
322
  });
346
323
  }
347
324
  //#endregion
348
- export { F as DashboardPage };
325
+ export { P as DashboardPage };
349
326
 
350
327
  //# sourceMappingURL=DashboardPage.js.map