@burdenoff/microfe-headshotmarketing 2026.925.1 → 2026.928.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 (55) hide show
  1. package/dist/generated/wspace-operations.d.ts +269 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +330 -205
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/generated/wspace-types.d.ts +83988 -38349
  6. package/dist/generated/wspace-types.d.ts.map +1 -1
  7. package/dist/generated/wspace-types.js +6 -4
  8. package/dist/generated/wspace-types.js.map +1 -1
  9. package/dist/headshotmarketing/pages/campaigns/CampaignTemplateActions.d.ts +11 -0
  10. package/dist/headshotmarketing/pages/campaigns/CampaignTemplateActions.d.ts.map +1 -0
  11. package/dist/headshotmarketing/pages/campaigns/CampaignTemplateActions.js +44 -0
  12. package/dist/headshotmarketing/pages/campaigns/CampaignTemplateActions.js.map +1 -0
  13. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.d.ts.map +1 -1
  14. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +6 -5
  15. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
  16. package/dist/headshotmarketing/pages/campaigns/TemplateCard.d.ts +2 -0
  17. package/dist/headshotmarketing/pages/campaigns/TemplateCard.d.ts.map +1 -1
  18. package/dist/headshotmarketing/pages/campaigns/TemplateCard.js +48 -41
  19. package/dist/headshotmarketing/pages/campaigns/TemplateCard.js.map +1 -1
  20. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignActions.d.ts +13 -0
  21. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignActions.d.ts.map +1 -0
  22. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignActions.js +44 -0
  23. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignActions.js.map +1 -0
  24. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.d.ts.map +1 -1
  25. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js +94 -83
  26. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js.map +1 -1
  27. package/dist/headshotmarketing/pages/social-media/AccountsPage.d.ts.map +1 -1
  28. package/dist/headshotmarketing/pages/social-media/AccountsPage.js +201 -167
  29. package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
  30. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.d.ts.map +1 -1
  31. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +189 -179
  32. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  33. package/dist/headshotmarketing/pages/social-media/socialConnect.d.ts +73 -0
  34. package/dist/headshotmarketing/pages/social-media/socialConnect.d.ts.map +1 -0
  35. package/dist/headshotmarketing/pages/social-media/socialConnect.js +67 -0
  36. package/dist/headshotmarketing/pages/social-media/socialConnect.js.map +1 -0
  37. package/dist/headshotmarketing/pages/social-media/useSocialConnect.d.ts +22 -0
  38. package/dist/headshotmarketing/pages/social-media/useSocialConnect.d.ts.map +1 -0
  39. package/dist/headshotmarketing/pages/social-media/useSocialConnect.js +90 -0
  40. package/dist/headshotmarketing/pages/social-media/useSocialConnect.js.map +1 -0
  41. package/dist/headshotmarketing/types/index.d.ts +4 -0
  42. package/dist/headshotmarketing/types/index.d.ts.map +1 -1
  43. package/dist/headshotmarketing/utils/deleteFeedback.d.ts +11 -0
  44. package/dist/headshotmarketing/utils/deleteFeedback.d.ts.map +1 -1
  45. package/dist/headshotmarketing/utils/deleteFeedback.js +8 -1
  46. package/dist/headshotmarketing/utils/deleteFeedback.js.map +1 -1
  47. package/dist/headshotmarketing/utils/oauthPopup.d.ts +58 -0
  48. package/dist/headshotmarketing/utils/oauthPopup.d.ts.map +1 -0
  49. package/dist/headshotmarketing/utils/oauthPopup.js +68 -0
  50. package/dist/headshotmarketing/utils/oauthPopup.js.map +1 -0
  51. package/dist/headshotmarketing/utils/socialMapper.d.ts +2 -0
  52. package/dist/headshotmarketing/utils/socialMapper.d.ts.map +1 -1
  53. package/dist/headshotmarketing/utils/socialMapper.js +3 -1
  54. package/dist/headshotmarketing/utils/socialMapper.js.map +1 -1
  55. package/package.json +1 -1
@@ -10,26 +10,28 @@ import "../../components/index.js";
10
10
  import { useHeadshotmarketingBootstrap as f } from "../../hooks/useHeadshotmarketingBootstrap.js";
11
11
  import { toSocialAccountModel as p } from "../../utils/socialMapper.js";
12
12
  import "../../hooks/index.js";
13
- import { useMemo as m, useState as h } from "react";
14
- import { CheckCircle as g, Link2 as _, Plus as v, RefreshCw as y, Trash2 as b, TrendingUp as x, Unlink as S, Users as C, XCircle as re } from "lucide-react";
15
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
16
- import { EmphasisPanel as ie, PagePurpose as D } from "@burdenoff/fe-libs/ui";
13
+ import { connectableProviderFor as m } from "./socialConnect.js";
14
+ import { useSocialConnect as re } from "./useSocialConnect.js";
15
+ import { useMemo as ie, useState as h } from "react";
16
+ import { CheckCircle as g, Link2 as _, Loader2 as v, Plus as ae, RefreshCw as y, ShieldCheck as oe, Trash2 as se, TrendingUp as ce, Unlink as b, Users as x, XCircle as S } from "lucide-react";
17
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
18
+ import { EmphasisPanel as le, PagePurpose as ue } from "@burdenoff/fe-libs/ui";
17
19
  //#region src/headshotmarketing/pages/social-media/AccountsPage.tsx
18
- var O = {
20
+ var E = {
19
21
  instagram: "bg-[var(--color-accent-soft)] text-action-primary-bg",
20
22
  facebook: "bg-status-info-bg text-status-info-text",
21
23
  twitter: "bg-status-info-bg text-status-info-text",
22
24
  linkedin: "bg-status-info-bg text-status-info-text",
23
25
  youtube: "bg-status-error-bg text-status-error-text",
24
26
  tiktok: "bg-bg-sunken text-text-secondary"
25
- }, k = {
27
+ }, de = {
26
28
  facebook: c.Facebook,
27
29
  instagram: c.Instagram,
28
30
  twitter: c.Twitter,
29
31
  linkedin: c.Linkedin,
30
32
  youtube: c.Youtube,
31
33
  tiktok: c.Tiktok
32
- }, A = [
34
+ }, D = [
33
35
  {
34
36
  key: "instagram",
35
37
  label: "Instagram",
@@ -61,97 +63,104 @@ var O = {
61
63
  description: "Short-form video content"
62
64
  }
63
65
  ];
64
- function j(e) {
66
+ function O(e) {
65
67
  return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
66
68
  }
67
- var M = {
69
+ var k = {
68
70
  platform: "instagram",
69
71
  accountName: "",
70
72
  profileUrl: "",
71
73
  followerCount: ""
72
- }, N = () => {
73
- let { data: c, loading: N, error: P, refetch: F } = f(), [I, { loading: L }] = e(), [R] = r(), [z] = n(), [B] = t(), [V, H] = h(!1), [ae, U] = h(!1), [W, G] = h(M), [K, q] = h(null), [J, Y] = h(null), X = m(() => (c?.headshotmarketingSocialAccounts.items ?? []).map((e) => p(e)), [c?.headshotmarketingSocialAccounts.items]), oe = X.filter((e) => e.connected).length, se = X.reduce((e, t) => e + t.followers, 0), ce = X.length > 0 ? X.reduce((e, t) => e + t.engagementRate, 0) / X.length : 0, le = X.reduce((e, t) => e + t.posts, 0), ue = async () => {
74
- H(!0), Y(null);
74
+ }, A = () => {
75
+ let { data: c, loading: A, error: j, refetch: M } = f(), [N, { loading: P }] = e(), [F] = r(), [I] = n(), [L] = t(), { connect: R, connecting: z, error: B, clearError: V } = re(async () => {
76
+ await M();
77
+ }), [H, U] = h(!1), [fe, W] = h(!1), [G, K] = h(k), [q, J] = h(null), [Y, X] = h(null), Z = ie(() => (c?.headshotmarketingSocialAccounts.items ?? []).map((e) => p(e)), [c?.headshotmarketingSocialAccounts.items]), pe = Z.filter((e) => e.connected).length, me = Z.reduce((e, t) => e + t.followers, 0), he = Z.length > 0 ? Z.reduce((e, t) => e + t.engagementRate, 0) / Z.length : 0, ge = Z.reduce((e, t) => e + t.posts, 0), _e = async () => {
78
+ U(!0), X(null);
75
79
  try {
76
- await F();
80
+ await M();
77
81
  } finally {
78
- H(!1);
82
+ U(!1);
79
83
  }
80
- }, Z = (e) => {
81
- G({
82
- ...M,
84
+ }, Q = (e) => {
85
+ K({
86
+ ...k,
83
87
  platform: e ?? "instagram"
84
- }), q(null), U(!0);
85
- }, Q = async () => {
86
- let e = W.accountName.trim();
88
+ }), J(null), W(!0);
89
+ }, ve = async () => {
90
+ let e = G.accountName.trim();
87
91
  if (!e) {
88
- q("Account name is required.");
92
+ J("Account name is required.");
89
93
  return;
90
94
  }
91
- let t = W.followerCount ? Number(W.followerCount) : void 0;
95
+ let t = G.followerCount ? Number(G.followerCount) : void 0;
92
96
  if (t !== void 0 && (Number.isNaN(t) || t < 0)) {
93
- q("Follower count must be a positive number.");
97
+ J("Follower count must be a positive number.");
94
98
  return;
95
99
  }
96
- q(null);
100
+ J(null);
97
101
  let n = {
98
- platform: k[W.platform],
102
+ platform: de[G.platform],
99
103
  accountName: e,
100
- platformAccountId: `${W.platform}-${j(e) || "account"}-${Date.now().toString(36)}`,
101
- profileUrl: W.profileUrl.trim() || void 0,
104
+ platformAccountId: `${G.platform}-${O(e) || "account"}-${Date.now().toString(36)}`,
105
+ profileUrl: G.profileUrl.trim() || void 0,
102
106
  followerCount: t
103
107
  };
104
108
  try {
105
- await I({ variables: { input: n } }), await F(), U(!1), G(M);
109
+ await N({ variables: { input: n } }), await M(), W(!1), K(k);
106
110
  } catch (e) {
107
- q(e instanceof Error ? e.message : "Failed to add account.");
111
+ J(e instanceof Error ? e.message : "Failed to add account.");
108
112
  }
109
- }, $ = async (e) => {
110
- Y(null);
113
+ }, ye = async (e) => {
114
+ X(null);
111
115
  try {
112
- await R({ variables: {
116
+ await F({ variables: {
113
117
  id: e,
114
118
  input: { status: s.Connected }
115
- } }), await F();
119
+ } }), await M();
116
120
  } catch (e) {
117
- Y(e instanceof Error ? e.message : "Failed to connect account.");
121
+ X(e instanceof Error ? e.message : "Failed to connect account.");
118
122
  }
119
- }, de = async (e) => {
120
- Y(null);
123
+ }, be = async (e) => {
124
+ X(null);
121
125
  try {
122
- await z({ variables: { id: e } }), await F();
126
+ await I({ variables: { id: e } }), await M();
123
127
  } catch (e) {
124
- Y(e instanceof Error ? e.message : "Failed to disconnect account.");
128
+ X(e instanceof Error ? e.message : "Failed to disconnect account.");
125
129
  }
126
- }, fe = async (e, t) => {
130
+ }, xe = async (e, t) => {
127
131
  if (window.confirm(`Remove ${t}? This disconnects the account and deletes its record.`)) {
128
- Y(null);
132
+ X(null);
129
133
  try {
130
- await B({ variables: { id: e } }), await F();
134
+ await L({ variables: { id: e } }), await M();
131
135
  } catch (e) {
132
- Y(e instanceof Error ? e.message : "Failed to remove account.");
136
+ X(e instanceof Error ? e.message : "Failed to remove account.");
133
137
  }
134
138
  }
135
- }, pe = (e) => {
136
- let t = X.find((t) => t.platform === e);
139
+ }, $ = (e) => {
140
+ V();
141
+ let t = Z.find((t) => t.platform === e);
142
+ if (m(e)) {
143
+ R(e, t ? { existingAccountId: t.id } : {});
144
+ return;
145
+ }
137
146
  if (t && !t.connected) {
138
- $(t.id);
147
+ ye(t.id);
139
148
  return;
140
149
  }
141
- Z(e);
142
- }, me = [
150
+ Q(e);
151
+ }, Se = [
143
152
  {
144
153
  key: "displayName",
145
154
  header: "Account",
146
- render: (e) => /* @__PURE__ */ E("div", {
155
+ render: (e) => /* @__PURE__ */ T("div", {
147
156
  className: "flex items-center gap-3",
148
- children: [/* @__PURE__ */ T("div", {
157
+ children: [/* @__PURE__ */ w("div", {
149
158
  className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-xs font-bold text-text-primary",
150
159
  children: e.displayName.charAt(0)
151
- }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
160
+ }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
152
161
  className: "text-sm font-medium text-text-primary",
153
162
  children: e.displayName
154
- }), /* @__PURE__ */ T("p", {
163
+ }), /* @__PURE__ */ w("p", {
155
164
  className: "text-xs text-text-secondary",
156
165
  children: e.handle
157
166
  })] })]
@@ -160,20 +169,28 @@ var M = {
160
169
  {
161
170
  key: "platform",
162
171
  header: "Platform",
163
- render: (e) => /* @__PURE__ */ T("span", {
164
- className: i("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", O[e.platform]),
172
+ render: (e) => /* @__PURE__ */ w("span", {
173
+ className: i("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", E[e.platform]),
165
174
  children: e.platform
166
175
  })
167
176
  },
168
177
  {
169
178
  key: "connected",
170
179
  header: "Status",
171
- render: (e) => /* @__PURE__ */ T("div", {
180
+ render: (e) => /* @__PURE__ */ w("div", {
172
181
  className: "flex items-center gap-1.5",
173
- children: e.connected ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(g, { className: "h-3.5 w-3.5 text-status-success-text" }), /* @__PURE__ */ T("span", {
174
- className: "text-xs text-status-success-text font-medium",
175
- children: "Connected"
176
- })] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(re, { className: "h-3.5 w-3.5 text-status-error-text" }), /* @__PURE__ */ T("span", {
182
+ children: e.connected ? /* @__PURE__ */ T(C, { children: [
183
+ /* @__PURE__ */ w(g, { className: "h-3.5 w-3.5 text-status-success-text" }),
184
+ /* @__PURE__ */ w("span", {
185
+ className: "text-xs text-status-success-text font-medium",
186
+ children: "Connected"
187
+ }),
188
+ e.integrationConnectionId && /* @__PURE__ */ T("span", {
189
+ className: "inline-flex items-center gap-1 rounded-full bg-status-success-bg/60 px-1.5 py-0.5 text-[10px] font-medium text-status-success-text",
190
+ title: "Authorized via OAuth — publishing uses the live platform API",
191
+ children: [/* @__PURE__ */ w(oe, { className: "h-3 w-3" }), "OAuth"]
192
+ })
193
+ ] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(S, { className: "h-3.5 w-3.5 text-status-error-text" }), /* @__PURE__ */ w("span", {
177
194
  className: "text-xs text-status-error-text font-medium",
178
195
  children: "Disconnected"
179
196
  })] })
@@ -183,7 +200,7 @@ var M = {
183
200
  key: "followers",
184
201
  header: "Followers",
185
202
  sortable: !0,
186
- render: (e) => /* @__PURE__ */ T("span", {
203
+ render: (e) => /* @__PURE__ */ w("span", {
187
204
  className: "text-sm text-text-primary",
188
205
  children: a(e.followers)
189
206
  })
@@ -192,7 +209,7 @@ var M = {
192
209
  key: "engagementRate",
193
210
  header: "Engagement",
194
211
  sortable: !0,
195
- render: (e) => /* @__PURE__ */ T("span", {
212
+ render: (e) => /* @__PURE__ */ w("span", {
196
213
  className: "text-sm text-text-primary",
197
214
  children: o(e.engagementRate)
198
215
  })
@@ -200,7 +217,7 @@ var M = {
200
217
  {
201
218
  key: "lastSyncedAt",
202
219
  header: "Last Synced",
203
- render: (e) => /* @__PURE__ */ T("span", {
220
+ render: (e) => /* @__PURE__ */ w("span", {
204
221
  className: "text-xs text-text-secondary",
205
222
  children: ee(e.lastSyncedAt, "relative")
206
223
  })
@@ -208,177 +225,194 @@ var M = {
208
225
  {
209
226
  key: "actions",
210
227
  header: "",
211
- render: (e) => /* @__PURE__ */ E("div", {
212
- className: "flex flex-wrap items-center justify-end gap-2",
213
- children: [e.connected ? /* @__PURE__ */ E("button", {
214
- type: "button",
215
- onClick: () => void de(e.id),
216
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs text-text-primary hover:bg-bg-sunken",
217
- children: [/* @__PURE__ */ T(S, { className: "h-3.5 w-3.5" }), "Disconnect"]
218
- }) : /* @__PURE__ */ E("button", {
219
- type: "button",
220
- onClick: () => void $(e.id),
221
- className: "inline-flex items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background hover:bg-foreground/90",
222
- children: [/* @__PURE__ */ T(_, { className: "h-3.5 w-3.5" }), "Connect"]
223
- }), /* @__PURE__ */ E("button", {
224
- type: "button",
225
- onClick: () => void fe(e.id, e.displayName),
226
- "aria-label": `Remove ${e.displayName}`,
227
- className: "inline-flex items-center gap-1.5 rounded-md border border-status-error-border px-3 py-1.5 text-xs text-status-error-text hover:bg-status-error-bg/40",
228
- children: [/* @__PURE__ */ T(b, { className: "h-3.5 w-3.5" }), "Remove"]
229
- })]
230
- })
228
+ render: (e) => {
229
+ let t = z?.platform === e.platform, n = !!m(e.platform), r = m(e.platform)?.label ?? e.platform;
230
+ return /* @__PURE__ */ T("div", {
231
+ className: "flex flex-wrap items-center justify-end gap-2",
232
+ children: [e.connected ? /* @__PURE__ */ T("button", {
233
+ type: "button",
234
+ onClick: () => void be(e.id),
235
+ className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs text-text-primary hover:bg-bg-sunken",
236
+ children: [/* @__PURE__ */ w(b, { className: "h-3.5 w-3.5" }), "Disconnect"]
237
+ }) : /* @__PURE__ */ T("button", {
238
+ type: "button",
239
+ onClick: () => $(e.platform),
240
+ disabled: t,
241
+ className: "inline-flex items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background hover:bg-foreground/90 disabled:opacity-60",
242
+ children: [t ? /* @__PURE__ */ w(v, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ w(_, { className: "h-3.5 w-3.5" }), t ? "Connecting..." : n ? `Connect with ${r}` : "Connect"]
243
+ }), /* @__PURE__ */ T("button", {
244
+ type: "button",
245
+ onClick: () => void xe(e.id, e.displayName),
246
+ "aria-label": `Remove ${e.displayName}`,
247
+ className: "inline-flex items-center gap-1.5 rounded-md border border-status-error-border px-3 py-1.5 text-xs text-status-error-text hover:bg-status-error-bg/40",
248
+ children: [/* @__PURE__ */ w(se, { className: "h-3.5 w-3.5" }), "Remove"]
249
+ })]
250
+ });
251
+ }
231
252
  }
232
- ], he = X.map((e) => ({ ...e }));
233
- return /* @__PURE__ */ E(te, {
253
+ ], Ce = Z.map((e) => ({ ...e }));
254
+ return /* @__PURE__ */ T(te, {
234
255
  title: "Connected Accounts",
235
256
  description: "Manage your social media platform connections",
236
- actions: /* @__PURE__ */ E("div", {
257
+ actions: /* @__PURE__ */ T("div", {
237
258
  className: "flex flex-wrap items-center gap-2",
238
- children: [/* @__PURE__ */ E("button", {
239
- onClick: ue,
240
- disabled: V || N,
241
- className: i("inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken", (V || N) && "opacity-50 cursor-not-allowed"),
242
- children: [/* @__PURE__ */ T(y, { className: i("h-4 w-4", (V || N) && "animate-spin") }), V ? "Syncing..." : "Sync All"]
243
- }), /* @__PURE__ */ E("button", {
244
- onClick: () => Z(),
245
- className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90",
246
- children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Add Account"]
259
+ children: [/* @__PURE__ */ T("button", {
260
+ onClick: _e,
261
+ disabled: H || A,
262
+ className: i("inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken", (H || A) && "opacity-50 cursor-not-allowed"),
263
+ children: [/* @__PURE__ */ w(y, { className: i("h-4 w-4", (H || A) && "animate-spin") }), H ? "Syncing..." : "Sync All"]
264
+ }), /* @__PURE__ */ T("button", {
265
+ onClick: () => Q(),
266
+ className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
267
+ children: [/* @__PURE__ */ w(ae, { className: "h-4 w-4" }), "Add manually"]
247
268
  })]
248
269
  }),
249
270
  children: [
250
- /* @__PURE__ */ T(D, { children: "Connect and manage the social platforms you post to. Link your accounts, keep their stats in sync, and see followers and engagement per platform — so everything downstream (composing, scheduling, analytics) has live data to work with." }),
251
- /* @__PURE__ */ T(ie, { children: /* @__PURE__ */ E("div", {
271
+ /* @__PURE__ */ T(ue, { children: [
272
+ "Connect the social platforms you post to. Use",
273
+ " ",
274
+ /* @__PURE__ */ w("span", {
275
+ className: "font-medium",
276
+ children: "Connect with…"
277
+ }),
278
+ " to authorize an account through the platform's own sign-in — posts then publish through the live platform API. Manual entries let you track accounts you haven't authorized yet."
279
+ ] }),
280
+ /* @__PURE__ */ w(le, { children: /* @__PURE__ */ T("div", {
252
281
  className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
253
282
  children: [
254
- /* @__PURE__ */ T(l, {
283
+ /* @__PURE__ */ w(l, {
255
284
  title: "Connected",
256
- value: `${oe}/${A.length}`,
257
- icon: /* @__PURE__ */ T(_, { className: "h-4 w-4" })
285
+ value: `${pe}/${D.length}`,
286
+ icon: /* @__PURE__ */ w(_, { className: "h-4 w-4" })
258
287
  }),
259
- /* @__PURE__ */ T(l, {
288
+ /* @__PURE__ */ w(l, {
260
289
  title: "Total Followers",
261
- value: a(se),
290
+ value: a(me),
262
291
  change: 8.4,
263
- icon: /* @__PURE__ */ T(C, { className: "h-4 w-4" })
292
+ icon: /* @__PURE__ */ w(x, { className: "h-4 w-4" })
264
293
  }),
265
- /* @__PURE__ */ T(l, {
294
+ /* @__PURE__ */ w(l, {
266
295
  title: "Avg Engagement",
267
- value: o(ce),
296
+ value: o(he),
268
297
  change: 1.2,
269
- icon: /* @__PURE__ */ T(x, { className: "h-4 w-4" })
298
+ icon: /* @__PURE__ */ w(ce, { className: "h-4 w-4" })
270
299
  }),
271
- /* @__PURE__ */ T(l, {
300
+ /* @__PURE__ */ w(l, {
272
301
  title: "Total Posts",
273
- value: a(le),
302
+ value: a(ge),
274
303
  change: 5.3
275
304
  })
276
305
  ]
277
306
  }) }),
278
- J && /* @__PURE__ */ T("div", {
307
+ B && /* @__PURE__ */ w("div", {
308
+ className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
309
+ children: B
310
+ }),
311
+ Y && /* @__PURE__ */ w("div", {
279
312
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
280
- children: J
313
+ children: Y
281
314
  }),
282
- /* @__PURE__ */ E(d, {
283
- loading: N,
284
- error: P,
285
- onRetry: F,
315
+ /* @__PURE__ */ T(d, {
316
+ loading: A,
317
+ error: j,
318
+ onRetry: M,
286
319
  hasData: !!c,
287
- children: [/* @__PURE__ */ E("div", {
320
+ children: [/* @__PURE__ */ T("div", {
288
321
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
289
- children: [/* @__PURE__ */ T("h3", {
322
+ children: [/* @__PURE__ */ w("h3", {
290
323
  className: "text-sm font-semibold text-text-primary mb-4",
291
324
  children: "Available Platforms"
292
- }), /* @__PURE__ */ T("div", {
325
+ }), /* @__PURE__ */ w("div", {
293
326
  className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",
294
- children: A.map((e) => {
295
- let t = X.find((t) => t.platform === e.key)?.connected ?? !1;
296
- return /* @__PURE__ */ E("div", {
327
+ children: D.map((e) => {
328
+ let t = Z.find((t) => t.platform === e.key)?.connected ?? !1, n = z?.platform === e.key, r = m(e.key);
329
+ return /* @__PURE__ */ T("div", {
297
330
  className: i("rounded-lg border p-4 text-center transition-colors", t ? "border-status-success-border bg-status-success-bg/50" : "border-border-subtle bg-bg-surface hover:border-foreground/30"),
298
331
  children: [
299
- /* @__PURE__ */ T("span", {
300
- className: i("inline-block rounded-full px-2.5 py-1 text-xs font-medium capitalize mb-2", O[e.key]),
332
+ /* @__PURE__ */ w("span", {
333
+ className: i("inline-block rounded-full px-2.5 py-1 text-xs font-medium capitalize mb-2", E[e.key]),
301
334
  children: e.label
302
335
  }),
303
- /* @__PURE__ */ T("p", {
336
+ /* @__PURE__ */ w("p", {
304
337
  className: "text-xs text-text-secondary mb-2",
305
338
  children: e.description
306
339
  }),
307
340
  t ? /* @__PURE__ */ T("span", {
308
- className: "text-xs text-status-success-text font-medium",
309
- children: "Connected"
341
+ className: "inline-flex items-center gap-1 text-xs text-status-success-text font-medium",
342
+ children: [/* @__PURE__ */ w(g, { className: "h-3 w-3" }), "Connected"]
310
343
  }) : /* @__PURE__ */ T("button", {
311
344
  type: "button",
312
- onClick: () => pe(e.key),
313
- className: "text-xs text-text-primary font-medium underline hover:no-underline",
314
- children: "Connect"
345
+ onClick: () => $(e.key),
346
+ disabled: n,
347
+ className: "inline-flex items-center gap-1 text-xs text-text-primary font-medium underline hover:no-underline disabled:opacity-60 disabled:no-underline",
348
+ children: [n && /* @__PURE__ */ w(v, { className: "h-3 w-3 animate-spin" }), n ? "Connecting..." : r ? `Connect with ${r.label}` : "Add manually"]
315
349
  })
316
350
  ]
317
351
  }, e.key);
318
352
  })
319
353
  })]
320
- }), /* @__PURE__ */ T(ne, {
321
- data: he,
322
- columns: me,
354
+ }), /* @__PURE__ */ w(ne, {
355
+ data: Ce,
356
+ columns: Se,
323
357
  searchable: !0,
324
358
  searchPlaceholder: "Search accounts...",
325
359
  pageSize: 10,
326
360
  emptyMessage: "No connected accounts yet",
327
- emptyDescription: "Add a social account to start posting and tracking performance."
361
+ emptyDescription: "Connect a social account to start posting and tracking performance."
328
362
  })]
329
363
  }),
330
- /* @__PURE__ */ T(u, {
331
- open: ae,
332
- onClose: () => U(!1),
364
+ /* @__PURE__ */ w(u, {
365
+ open: fe,
366
+ onClose: () => W(!1),
333
367
  title: "Add Social Account",
334
- description: "Connect a platform so you can compose, schedule and track posts.",
368
+ description: "Track an account manually. To publish through a platform, use “Connect with…” instead.",
335
369
  size: "md",
336
- footer: /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
370
+ footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
337
371
  type: "button",
338
- onClick: () => U(!1),
372
+ onClick: () => W(!1),
339
373
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
340
374
  children: "Cancel"
341
- }), /* @__PURE__ */ T("button", {
375
+ }), /* @__PURE__ */ w("button", {
342
376
  type: "button",
343
- onClick: Q,
344
- disabled: L,
377
+ onClick: ve,
378
+ disabled: P,
345
379
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
346
- children: L ? "Adding..." : "Add Account"
380
+ children: P ? "Adding..." : "Add Account"
347
381
  })] }),
348
- children: /* @__PURE__ */ E("div", {
382
+ children: /* @__PURE__ */ T("div", {
349
383
  className: "space-y-4",
350
384
  children: [
351
- K && /* @__PURE__ */ T("div", {
385
+ q && /* @__PURE__ */ w("div", {
352
386
  className: "rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
353
- children: K
387
+ children: q
354
388
  }),
355
- /* @__PURE__ */ E("label", {
389
+ /* @__PURE__ */ T("label", {
356
390
  className: "block",
357
- children: [/* @__PURE__ */ T("span", {
391
+ children: [/* @__PURE__ */ w("span", {
358
392
  className: "mb-1 block text-sm font-medium text-text-primary",
359
393
  children: "Platform"
360
- }), /* @__PURE__ */ T("select", {
361
- value: W.platform,
362
- onChange: (e) => G((t) => ({
394
+ }), /* @__PURE__ */ w("select", {
395
+ value: G.platform,
396
+ onChange: (e) => K((t) => ({
363
397
  ...t,
364
398
  platform: e.target.value
365
399
  })),
366
400
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
367
- children: A.map((e) => /* @__PURE__ */ T("option", {
401
+ children: D.map((e) => /* @__PURE__ */ w("option", {
368
402
  value: e.key,
369
403
  children: e.label
370
404
  }, e.key))
371
405
  })]
372
406
  }),
373
- /* @__PURE__ */ E("label", {
407
+ /* @__PURE__ */ T("label", {
374
408
  className: "block",
375
- children: [/* @__PURE__ */ T("span", {
409
+ children: [/* @__PURE__ */ w("span", {
376
410
  className: "mb-1 block text-sm font-medium text-text-primary",
377
411
  children: "Account name"
378
- }), /* @__PURE__ */ T("input", {
412
+ }), /* @__PURE__ */ w("input", {
379
413
  type: "text",
380
- value: W.accountName,
381
- onChange: (e) => G((t) => ({
414
+ value: G.accountName,
415
+ onChange: (e) => K((t) => ({
382
416
  ...t,
383
417
  accountName: e.target.value
384
418
  })),
@@ -386,22 +420,22 @@ var M = {
386
420
  className: "w-full rounded-md 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)]"
387
421
  })]
388
422
  }),
389
- /* @__PURE__ */ E("label", {
423
+ /* @__PURE__ */ T("label", {
390
424
  className: "block",
391
- children: [/* @__PURE__ */ E("span", {
425
+ children: [/* @__PURE__ */ T("span", {
392
426
  className: "mb-1 block text-sm font-medium text-text-primary",
393
427
  children: [
394
428
  "Profile URL / handle",
395
429
  " ",
396
- /* @__PURE__ */ T("span", {
430
+ /* @__PURE__ */ w("span", {
397
431
  className: "text-text-secondary",
398
432
  children: "(optional)"
399
433
  })
400
434
  ]
401
- }), /* @__PURE__ */ T("input", {
435
+ }), /* @__PURE__ */ w("input", {
402
436
  type: "text",
403
- value: W.profileUrl,
404
- onChange: (e) => G((t) => ({
437
+ value: G.profileUrl,
438
+ onChange: (e) => K((t) => ({
405
439
  ...t,
406
440
  profileUrl: e.target.value
407
441
  })),
@@ -409,19 +443,19 @@ var M = {
409
443
  className: "w-full rounded-md 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)]"
410
444
  })]
411
445
  }),
412
- /* @__PURE__ */ E("label", {
446
+ /* @__PURE__ */ T("label", {
413
447
  className: "block",
414
- children: [/* @__PURE__ */ E("span", {
448
+ children: [/* @__PURE__ */ T("span", {
415
449
  className: "mb-1 block text-sm font-medium text-text-primary",
416
- children: ["Followers ", /* @__PURE__ */ T("span", {
450
+ children: ["Followers ", /* @__PURE__ */ w("span", {
417
451
  className: "text-text-secondary",
418
452
  children: "(optional)"
419
453
  })]
420
- }), /* @__PURE__ */ T("input", {
454
+ }), /* @__PURE__ */ w("input", {
421
455
  type: "number",
422
456
  min: 0,
423
- value: W.followerCount,
424
- onChange: (e) => G((t) => ({
457
+ value: G.followerCount,
458
+ onChange: (e) => K((t) => ({
425
459
  ...t,
426
460
  followerCount: e.target.value
427
461
  })),
@@ -436,6 +470,6 @@ var M = {
436
470
  });
437
471
  };
438
472
  //#endregion
439
- export { N as AccountsPage };
473
+ export { A as AccountsPage };
440
474
 
441
475
  //# sourceMappingURL=AccountsPage.js.map