@burdenoff/microfe-headshotmarketing 2026.1201.1 → 2026.1202.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 (161) hide show
  1. package/dist/headshotmarketing/components/ActionMenu.js +1 -1
  2. package/dist/headshotmarketing/components/ActionMenu.js.map +1 -1
  3. package/dist/headshotmarketing/components/AssetUploadButton.js +35 -23
  4. package/dist/headshotmarketing/components/AssetUploadButton.js.map +1 -1
  5. package/dist/headshotmarketing/components/DataTable.js +33 -33
  6. package/dist/headshotmarketing/components/DataTable.js.map +1 -1
  7. package/dist/headshotmarketing/components/EmptyState.d.ts +15 -0
  8. package/dist/headshotmarketing/components/EmptyState.js +35 -15
  9. package/dist/headshotmarketing/components/EmptyState.js.map +1 -1
  10. package/dist/headshotmarketing/components/FilterBar.js +2 -2
  11. package/dist/headshotmarketing/components/FilterBar.js.map +1 -1
  12. package/dist/headshotmarketing/components/InfluencerModals.js +96 -95
  13. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
  14. package/dist/headshotmarketing/components/Pagination.js +38 -37
  15. package/dist/headshotmarketing/components/Pagination.js.map +1 -1
  16. package/dist/headshotmarketing/components/TagChipsInput.js +1 -1
  17. package/dist/headshotmarketing/components/TagChipsInput.js.map +1 -1
  18. package/dist/headshotmarketing/components/Toast.js +1 -1
  19. package/dist/headshotmarketing/components/Toast.js.map +1 -1
  20. package/dist/headshotmarketing/components/UploadAudienceSelect.d.ts +7 -0
  21. package/dist/headshotmarketing/components/UploadAudienceSelect.js +40 -0
  22. package/dist/headshotmarketing/components/UploadAudienceSelect.js.map +1 -0
  23. package/dist/headshotmarketing/hooks/useAssetUpload.d.ts +2 -19
  24. package/dist/headshotmarketing/hooks/useAssetUpload.js +38 -32
  25. package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
  26. package/dist/headshotmarketing/pages/HomeMonthlyGoals.js.map +1 -1
  27. package/dist/headshotmarketing/pages/HomePage.js +10 -10
  28. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  29. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +203 -203
  30. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  31. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +148 -148
  32. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
  33. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js +74 -73
  34. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js.map +1 -1
  35. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +427 -412
  36. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  37. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js +111 -110
  38. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js.map +1 -1
  39. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js +1 -1
  40. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js.map +1 -1
  41. package/dist/headshotmarketing/pages/ads/AdsPage.js +6 -6
  42. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  43. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +49 -49
  44. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  45. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +112 -112
  46. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  47. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js +57 -57
  48. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js.map +1 -1
  49. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js +175 -174
  50. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js.map +1 -1
  51. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +1 -1
  52. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
  53. package/dist/headshotmarketing/pages/analytics/AttributionPage.js +129 -129
  54. package/dist/headshotmarketing/pages/analytics/AttributionPage.js.map +1 -1
  55. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +9 -9
  56. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
  57. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js +95 -94
  58. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js.map +1 -1
  59. package/dist/headshotmarketing/pages/analytics/ReportsPage.js +4 -4
  60. package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
  61. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +42 -41
  62. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -1
  63. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js +132 -131
  64. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js.map +1 -1
  65. package/dist/headshotmarketing/pages/automation/AutomationPage.js +8 -8
  66. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  67. package/dist/headshotmarketing/pages/automation/TriggersPage.js +48 -48
  68. package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
  69. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +4 -3
  70. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  71. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +143 -142
  72. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -1
  73. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +79 -78
  74. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -1
  75. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +92 -92
  76. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
  77. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +143 -143
  78. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  79. package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js +3 -3
  80. package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js.map +1 -1
  81. package/dist/headshotmarketing/pages/builder/SectionInspector.js +24 -23
  82. package/dist/headshotmarketing/pages/builder/SectionInspector.js.map +1 -1
  83. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +198 -193
  84. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  85. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +41 -41
  86. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
  87. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +234 -229
  88. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  89. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +199 -187
  90. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  91. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js +46 -46
  92. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js.map +1 -1
  93. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js +29 -29
  94. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js.map +1 -1
  95. package/dist/headshotmarketing/pages/content/AIToolsPage.js +3 -3
  96. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  97. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +230 -220
  98. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  99. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +431 -420
  100. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  101. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +7 -7
  102. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  103. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +2 -2
  104. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
  105. package/dist/headshotmarketing/pages/content/ContentPage.js +88 -88
  106. package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
  107. package/dist/headshotmarketing/pages/crm/ContactsPage.js +111 -111
  108. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  109. package/dist/headshotmarketing/pages/crm/CreateContactPage.js +59 -59
  110. package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
  111. package/dist/headshotmarketing/pages/crm/CreateDealPage.js +86 -86
  112. package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
  113. package/dist/headshotmarketing/pages/crm/CrmActions.js +93 -92
  114. package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -1
  115. package/dist/headshotmarketing/pages/crm/CrmPage.js +4 -4
  116. package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
  117. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +63 -62
  118. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
  119. package/dist/headshotmarketing/pages/crm/LeadsPage.js +68 -68
  120. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  121. package/dist/headshotmarketing/pages/crm/PipelinePage.js +2 -2
  122. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  123. package/dist/headshotmarketing/pages/events/CreateEventPage.js +165 -165
  124. package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
  125. package/dist/headshotmarketing/pages/events/EventDetailsPage.js +255 -250
  126. package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
  127. package/dist/headshotmarketing/pages/events/EventImageUpload.js +8 -2
  128. package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -1
  129. package/dist/headshotmarketing/pages/events/EventPagePreview.js +2 -2
  130. package/dist/headshotmarketing/pages/events/EventPagePreview.js.map +1 -1
  131. package/dist/headshotmarketing/pages/events/EventsPage.js +70 -70
  132. package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
  133. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js +7 -7
  134. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js.map +1 -1
  135. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +98 -98
  136. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  137. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +1 -1
  138. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  139. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +145 -140
  140. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
  141. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +1 -1
  142. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -1
  143. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +286 -286
  144. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
  145. package/dist/headshotmarketing/pages/social-media/AccountsPage.js +171 -166
  146. package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
  147. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js +1 -1
  148. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js.map +1 -1
  149. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js +1 -1
  150. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js.map +1 -1
  151. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +3 -3
  152. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
  153. package/dist/headshotmarketing/pages/social-media/PostsPage.js +257 -252
  154. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  155. package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js +2 -2
  156. package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js.map +1 -1
  157. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +4 -4
  158. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
  159. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +115 -115
  160. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  161. package/package.json +6 -4
@@ -1,23 +1,23 @@
1
1
  import { useCreateHeadshotmarketingSocialAccountMutation as e, useDeleteHeadshotmarketingSocialAccountMutation as t, useDisconnectHeadshotmarketingSocialAccountMutation as n, useUpdateHeadshotmarketingSocialAccountMutation as r } from "../../../generated/wspace-operations.js";
2
- import { HeadshotmarketingSocialAccountStatus as i, HeadshotmarketingSocialPlatform as a } from "../../../generated/wspace-types.js";
3
- import { cn as o, formatNumber as s, formatPercentage as c } from "../../utils/helpers.js";
4
- import { PageLayout as l } from "../../components/PageLayout.js";
5
- import { StatCard as u } from "../../components/StatCard.js";
6
- import { EmptyState as ee } from "../../components/EmptyState.js";
7
- import { Modal as te } from "../../components/Modal.js";
8
- import { QueryStateBoundary as ne } from "../../components/QueryStateBoundary.js";
2
+ import { HeadshotmarketingSocialAccountStatus as ee, HeadshotmarketingSocialPlatform as i } from "../../../generated/wspace-types.js";
3
+ import { cn as a, formatNumber as o, formatPercentage as te } from "../../utils/helpers.js";
4
+ import { PageLayout as ne } from "../../components/PageLayout.js";
5
+ import { StatCard as s } from "../../components/StatCard.js";
6
+ import { EmptyState as c } from "../../components/EmptyState.js";
7
+ import { Modal as l } from "../../components/Modal.js";
8
+ import { QueryStateBoundary as u } from "../../components/QueryStateBoundary.js";
9
9
  import { toSocialAccountModel as d } from "../../utils/socialMapper.js";
10
10
  import { useHeadshotmarketingBootstrap as f } from "../../hooks/useHeadshotmarketingBootstrap.js";
11
11
  import { summarizeSocialAccounts as p } from "../../utils/socialAccountStats.js";
12
12
  import "../../components/index.js";
13
13
  import "../../hooks/index.js";
14
- import { useSocialConnect as m } from "./useSocialConnect.js";
15
- import { connectableProviderFor as h } from "./socialConnect.js";
16
- import { SocialAccountCard as g } from "./SocialAccountCard.js";
17
- import { useMemo as _, useState as v } from "react";
18
- import { CheckCircle as re, FileText as ie, Link2 as ae, Loader2 as oe, Plus as se, RefreshCw as ce, TrendingUp as le, Users as y } from "lucide-react";
19
- import { Fragment as ue, jsx as b, jsxs as x } from "react/jsx-runtime";
20
- import { EmphasisPanel as de, PagePurpose as fe } from "@burdenoff/fe-libs/ui";
14
+ import { useSocialConnect as re } from "./useSocialConnect.js";
15
+ import { connectableProviderFor as m } from "./socialConnect.js";
16
+ import { SocialAccountCard as ie } from "./SocialAccountCard.js";
17
+ import { useMemo as h, useState as g } from "react";
18
+ import { CheckCircle as ae, FileText as oe, Link2 as se, Loader2 as ce, Plus as le, RefreshCw as _, TrendingUp as v, Users as y } from "lucide-react";
19
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
20
+ import { EmphasisPanel as C, PagePurpose as ue, ThemedSelect as de, useConfirm as fe } from "@burdenoff/fe-libs/ui";
21
21
  // src/headshotmarketing/pages/social-media/AccountsPage.tsx
22
22
  var pe = {
23
23
  instagram: "bg-[var(--color-accent-soft)] text-action-primary-bg",
@@ -27,13 +27,13 @@ var pe = {
27
27
  youtube: "bg-status-error-bg text-status-error-text",
28
28
  tiktok: "bg-bg-sunken text-text-secondary"
29
29
  }, me = {
30
- facebook: a.Facebook,
31
- instagram: a.Instagram,
32
- twitter: a.Twitter,
33
- linkedin: a.Linkedin,
34
- youtube: a.Youtube,
35
- tiktok: a.Tiktok
36
- }, S = [
30
+ facebook: i.Facebook,
31
+ instagram: i.Instagram,
32
+ twitter: i.Twitter,
33
+ linkedin: i.Linkedin,
34
+ youtube: i.Youtube,
35
+ tiktok: i.Tiktok
36
+ }, w = [
37
37
  {
38
38
  key: "instagram",
39
39
  label: "Instagram",
@@ -65,212 +65,217 @@ var pe = {
65
65
  description: "Short-form video content"
66
66
  }
67
67
  ];
68
- function C(e) {
68
+ function T(e) {
69
69
  return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
70
70
  }
71
- var w = {
71
+ var E = {
72
72
  platform: "instagram",
73
73
  accountName: "",
74
74
  profileUrl: "",
75
75
  followerCount: ""
76
- }, T = () => {
77
- let { data: a, loading: T, error: E, refetch: D } = f(), [O, { loading: k }] = e(), [A] = r(), [j] = n(), [M] = t(), { connect: N, connecting: P, error: F, clearError: I } = m(async () => {
78
- await D();
79
- }), [L, R] = v(!1), [z, B] = v(!1), [V, H] = v(w), [U, W] = v(null), [G, K] = v(null), q = _(() => (a?.headshotmarketingSocialAccounts.items ?? []).map((e) => d(e)), [a?.headshotmarketingSocialAccounts.items]), J = _(() => p(q), [q]), [Y, he] = v(""), X = _(() => {
80
- let e = Y.trim().toLowerCase();
81
- return e ? q.filter((t) => [
76
+ }, D = () => {
77
+ let i = fe(), { data: D, loading: O, error: k, refetch: A } = f(), [j, { loading: M }] = e(), [N] = r(), [P] = n(), [F] = t(), { connect: I, connecting: L, error: R, clearError: he } = re(async () => {
78
+ await A();
79
+ }), [z, B] = g(!1), [ge, V] = g(!1), [H, U] = g(E), [W, G] = g(null), [K, q] = g(null), J = h(() => (D?.headshotmarketingSocialAccounts.items ?? []).map((e) => d(e)), [D?.headshotmarketingSocialAccounts.items]), Y = h(() => p(J), [J]), [X, _e] = g(""), Z = h(() => {
80
+ let e = X.trim().toLowerCase();
81
+ return e ? J.filter((t) => [
82
82
  t.displayName,
83
83
  t.handle,
84
84
  t.platform
85
- ].some((t) => t.toLowerCase().includes(e))) : q;
86
- }, [Y, q]), ge = async () => {
87
- R(!0), K(null);
85
+ ].some((t) => t.toLowerCase().includes(e))) : J;
86
+ }, [X, J]), ve = async () => {
87
+ B(!0), q(null);
88
88
  try {
89
- await D();
89
+ await A();
90
90
  } finally {
91
- R(!1);
91
+ B(!1);
92
92
  }
93
- }, Z = (e) => {
94
- H({
95
- ...w,
93
+ }, Q = (e) => {
94
+ U({
95
+ ...E,
96
96
  platform: e ?? "instagram"
97
- }), W(null), B(!0);
98
- }, _e = async () => {
99
- let e = V.accountName.trim();
97
+ }), G(null), V(!0);
98
+ }, ye = async () => {
99
+ let e = H.accountName.trim();
100
100
  if (!e) {
101
- W("Account name is required.");
101
+ G("Account name is required.");
102
102
  return;
103
103
  }
104
- let t = V.followerCount ? Number(V.followerCount) : void 0;
104
+ let t = H.followerCount ? Number(H.followerCount) : void 0;
105
105
  if (t !== void 0 && (Number.isNaN(t) || t < 0)) {
106
- W("Follower count must be a positive number.");
106
+ G("Follower count must be a positive number.");
107
107
  return;
108
108
  }
109
- W(null);
109
+ G(null);
110
110
  let n = {
111
- platform: me[V.platform],
111
+ platform: me[H.platform],
112
112
  accountName: e,
113
- platformAccountId: `${V.platform}-${C(e) || "account"}-${Date.now().toString(36)}`,
114
- profileUrl: V.profileUrl.trim() || void 0,
113
+ platformAccountId: `${H.platform}-${T(e) || "account"}-${Date.now().toString(36)}`,
114
+ profileUrl: H.profileUrl.trim() || void 0,
115
115
  followerCount: t
116
116
  };
117
117
  try {
118
- await O({ variables: { input: n } }), await D(), B(!1), H(w);
118
+ await j({ variables: { input: n } }), await A(), V(!1), U(E);
119
119
  } catch (e) {
120
- W(e instanceof Error ? e.message : "Failed to add account.");
120
+ G(e instanceof Error ? e.message : "Failed to add account.");
121
121
  }
122
- }, Q = async (e) => {
123
- K(null);
122
+ }, be = async (e) => {
123
+ q(null);
124
124
  try {
125
- await A({ variables: {
125
+ await N({ variables: {
126
126
  id: e,
127
- input: { status: i.Connected }
128
- } }), await D();
127
+ input: { status: ee.Connected }
128
+ } }), await A();
129
129
  } catch (e) {
130
- K(e instanceof Error ? e.message : "Failed to connect account.");
130
+ q(e instanceof Error ? e.message : "Failed to connect account.");
131
131
  }
132
- }, ve = async (e) => {
133
- K(null);
132
+ }, xe = async (e) => {
133
+ q(null);
134
134
  try {
135
- await j({ variables: { id: e } }), await D();
135
+ await P({ variables: { id: e } }), await A();
136
136
  } catch (e) {
137
- K(e instanceof Error ? e.message : "Failed to disconnect account.");
137
+ q(e instanceof Error ? e.message : "Failed to disconnect account.");
138
138
  }
139
- }, ye = async (e, t) => {
140
- if (window.confirm(`Remove ${t}? This disconnects the account and deletes its record.`)) {
141
- K(null);
139
+ }, Se = async (e, t) => {
140
+ if (await i({
141
+ title: `Remove ${t}?`,
142
+ description: "This disconnects the account and deletes its record.",
143
+ tone: "danger",
144
+ confirmLabel: "Remove"
145
+ })) {
146
+ q(null);
142
147
  try {
143
- await M({ variables: { id: e } }), await D();
148
+ await F({ variables: { id: e } }), await A();
144
149
  } catch (e) {
145
- K(e instanceof Error ? e.message : "Failed to remove account.");
150
+ q(e instanceof Error ? e.message : "Failed to remove account.");
146
151
  }
147
152
  }
148
153
  }, $ = (e) => {
149
- I();
150
- let t = q.find((t) => t.platform === e);
151
- h(e) ? N(e, t ? { existingAccountId: t.id } : {}) : t && !t.connected ? Q(t.id) : Z(e);
154
+ he();
155
+ let t = J.find((t) => t.platform === e);
156
+ m(e) ? I(e, t ? { existingAccountId: t.id } : {}) : t && !t.connected ? be(t.id) : Q(e);
152
157
  };
153
- return /* @__PURE__ */ x(l, {
158
+ return /* @__PURE__ */ S(ne, {
154
159
  title: "Connected Accounts",
155
160
  description: "Manage your social media platform connections",
156
- actions: /* @__PURE__ */ x("div", {
161
+ actions: /* @__PURE__ */ S("div", {
157
162
  className: "flex flex-wrap items-center gap-2",
158
- children: [/* @__PURE__ */ x("button", {
159
- onClick: ge,
160
- disabled: L || T,
161
- className: o("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", (L || T) && "opacity-50 cursor-not-allowed"),
162
- children: [/* @__PURE__ */ b(ce, { className: o("h-4 w-4", (L || T) && "animate-spin") }), L ? "Syncing..." : "Sync All"]
163
- }), /* @__PURE__ */ x("button", {
164
- onClick: () => Z(),
163
+ children: [/* @__PURE__ */ S("button", {
164
+ onClick: ve,
165
+ disabled: z || O,
166
+ className: a("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", (z || O) && "opacity-50 cursor-not-allowed"),
167
+ children: [/* @__PURE__ */ x(_, { className: a("h-4 w-4", (z || O) && "animate-spin") }), z ? "Syncing..." : "Sync All"]
168
+ }), /* @__PURE__ */ S("button", {
169
+ onClick: () => Q(),
165
170
  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",
166
- children: [/* @__PURE__ */ b(se, { className: "h-4 w-4" }), "Add manually"]
171
+ children: [/* @__PURE__ */ x(le, { className: "h-4 w-4" }), "Add manually"]
167
172
  })]
168
173
  }),
169
174
  children: [
170
- /* @__PURE__ */ x(fe, { children: [
175
+ /* @__PURE__ */ S(ue, { children: [
171
176
  "Connect the social platforms you post to. Use",
172
177
  " ",
173
- /* @__PURE__ */ b("span", {
178
+ /* @__PURE__ */ x("span", {
174
179
  className: "font-medium",
175
180
  children: "Connect with…"
176
181
  }),
177
182
  " 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."
178
183
  ] }),
179
- /* @__PURE__ */ b(de, { children: /* @__PURE__ */ x("div", {
184
+ /* @__PURE__ */ x(C, { children: /* @__PURE__ */ S("div", {
180
185
  className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
181
186
  children: [
182
- /* @__PURE__ */ b(u, {
187
+ /* @__PURE__ */ x(s, {
183
188
  title: "Total Accounts",
184
- value: s(J.totalAccounts),
185
- icon: /* @__PURE__ */ b(ae, { className: "h-4 w-4" })
189
+ value: o(Y.totalAccounts),
190
+ icon: /* @__PURE__ */ x(se, { className: "h-4 w-4" })
186
191
  }),
187
- /* @__PURE__ */ b(u, {
192
+ /* @__PURE__ */ x(s, {
188
193
  title: "Total Followers",
189
- value: s(J.totalFollowers),
190
- icon: /* @__PURE__ */ b(y, { className: "h-4 w-4" })
194
+ value: o(Y.totalFollowers),
195
+ icon: /* @__PURE__ */ x(y, { className: "h-4 w-4" })
191
196
  }),
192
- /* @__PURE__ */ b(u, {
197
+ /* @__PURE__ */ x(s, {
193
198
  title: "Total Posts",
194
- value: s(J.totalPosts),
195
- icon: /* @__PURE__ */ b(ie, { className: "h-4 w-4" })
199
+ value: o(Y.totalPosts),
200
+ icon: /* @__PURE__ */ x(oe, { className: "h-4 w-4" })
196
201
  }),
197
- /* @__PURE__ */ b(u, {
202
+ /* @__PURE__ */ x(s, {
198
203
  title: "Avg Engagement",
199
- value: J.avgEngagementRate === null ? "—" : c(J.avgEngagementRate),
200
- icon: /* @__PURE__ */ b(le, { className: "h-4 w-4" })
204
+ value: Y.avgEngagementRate === null ? "—" : te(Y.avgEngagementRate),
205
+ icon: /* @__PURE__ */ x(v, { className: "h-4 w-4" })
201
206
  })
202
207
  ]
203
208
  }) }),
204
- F && /* @__PURE__ */ b("div", {
209
+ R && /* @__PURE__ */ x("div", {
205
210
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
206
- children: F
211
+ children: R
207
212
  }),
208
- G && /* @__PURE__ */ b("div", {
213
+ K && /* @__PURE__ */ x("div", {
209
214
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
210
- children: G
215
+ children: K
211
216
  }),
212
- /* @__PURE__ */ x(ne, {
213
- loading: T,
214
- error: E,
215
- onRetry: D,
216
- hasData: !!a,
217
- children: [/* @__PURE__ */ x("section", {
217
+ /* @__PURE__ */ S(u, {
218
+ loading: O,
219
+ error: k,
220
+ onRetry: A,
221
+ hasData: !!D,
222
+ children: [/* @__PURE__ */ S("section", {
218
223
  "aria-label": "Connected accounts",
219
224
  className: "space-y-3",
220
- children: [q.length > 0 && /* @__PURE__ */ b("input", {
225
+ children: [J.length > 0 && /* @__PURE__ */ x("input", {
221
226
  type: "search",
222
- value: Y,
223
- onChange: (e) => he(e.target.value),
227
+ value: X,
228
+ onChange: (e) => _e(e.target.value),
224
229
  placeholder: "Search accounts...",
225
230
  "aria-label": "Search accounts",
226
231
  className: "w-full max-w-xs 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)]"
227
- }), X.length > 0 ? /* @__PURE__ */ b("div", {
232
+ }), Z.length > 0 ? /* @__PURE__ */ x("div", {
228
233
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",
229
- children: X.map((e) => {
230
- let t = h(e.platform);
231
- return /* @__PURE__ */ b(g, {
234
+ children: Z.map((e) => {
235
+ let t = m(e.platform);
236
+ return /* @__PURE__ */ x(ie, {
232
237
  account: e,
233
- connecting: P?.platform === e.platform,
238
+ connecting: L?.platform === e.platform,
234
239
  reconnectLabel: t ? `Connect with ${t.label}` : "Reconnect",
235
240
  onReconnect: () => $(e.platform),
236
- onDisconnect: () => void ve(e.id),
237
- onRemove: () => void ye(e.id, e.displayName)
241
+ onDisconnect: () => void xe(e.id),
242
+ onRemove: () => void Se(e.id, e.displayName)
238
243
  }, e.id);
239
244
  })
240
- }) : /* @__PURE__ */ b(ee, {
241
- icon: /* @__PURE__ */ b(y, { className: "h-8 w-8" }),
242
- title: q.length > 0 ? "No accounts match your search" : "No connected accounts yet",
243
- description: q.length > 0 ? "Try a different name, handle or platform." : "Connect a social account to start posting and tracking performance."
245
+ }) : /* @__PURE__ */ x(c, {
246
+ icon: /* @__PURE__ */ x(y, { className: "h-8 w-8" }),
247
+ title: J.length > 0 ? "No accounts match your search" : "No connected accounts yet",
248
+ description: J.length > 0 ? "Try a different name, handle or platform." : "Connect a social account to start posting and tracking performance."
244
249
  })]
245
- }), /* @__PURE__ */ x("div", {
250
+ }), /* @__PURE__ */ S("div", {
246
251
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
247
- children: [/* @__PURE__ */ b("h3", {
252
+ children: [/* @__PURE__ */ x("h3", {
248
253
  className: "text-sm font-semibold text-text-primary mb-4",
249
254
  children: "Available Platforms"
250
- }), /* @__PURE__ */ b("div", {
255
+ }), /* @__PURE__ */ x("div", {
251
256
  className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",
252
- children: S.map((e) => {
253
- let t = q.find((t) => t.platform === e.key)?.connected ?? !1, n = P?.platform === e.key, r = h(e.key);
254
- return /* @__PURE__ */ x("div", {
255
- className: o("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"),
257
+ children: w.map((e) => {
258
+ let t = J.find((t) => t.platform === e.key)?.connected ?? !1, n = L?.platform === e.key, r = m(e.key);
259
+ return /* @__PURE__ */ S("div", {
260
+ className: a("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"),
256
261
  children: [
257
- /* @__PURE__ */ b("span", {
258
- className: o("inline-block rounded-full px-2.5 py-1 text-xs font-medium capitalize mb-2", pe[e.key]),
262
+ /* @__PURE__ */ x("span", {
263
+ className: a("inline-block rounded-full px-2.5 py-1 text-xs font-medium capitalize mb-2", pe[e.key]),
259
264
  children: e.label
260
265
  }),
261
- /* @__PURE__ */ b("p", {
266
+ /* @__PURE__ */ x("p", {
262
267
  className: "text-xs text-text-secondary mb-2",
263
268
  children: e.description
264
269
  }),
265
- t ? /* @__PURE__ */ x("span", {
270
+ t ? /* @__PURE__ */ S("span", {
266
271
  className: "inline-flex items-center gap-1 text-xs text-status-success-text font-medium",
267
- children: [/* @__PURE__ */ b(re, { className: "h-3 w-3" }), "Connected"]
268
- }) : /* @__PURE__ */ x("button", {
272
+ children: [/* @__PURE__ */ x(ae, { className: "h-3 w-3" }), "Connected"]
273
+ }) : /* @__PURE__ */ S("button", {
269
274
  type: "button",
270
275
  onClick: () => $(e.key),
271
276
  disabled: n,
272
277
  className: "inline-flex items-center gap-1 text-xs text-text-primary font-medium underline hover:no-underline disabled:opacity-60 disabled:no-underline",
273
- children: [n && /* @__PURE__ */ b(oe, { className: "h-3 w-3 animate-spin" }), n ? "Connecting..." : r ? `Connect with ${r.label}` : "Add manually"]
278
+ children: [n && /* @__PURE__ */ x(ce, { className: "h-3 w-3 animate-spin" }), n ? "Connecting..." : r ? `Connect with ${r.label}` : "Add manually"]
274
279
  })
275
280
  ]
276
281
  }, e.key);
@@ -278,58 +283,58 @@ var w = {
278
283
  })]
279
284
  })]
280
285
  }),
281
- /* @__PURE__ */ b(te, {
282
- open: z,
283
- onClose: () => B(!1),
286
+ /* @__PURE__ */ x(l, {
287
+ open: ge,
288
+ onClose: () => V(!1),
284
289
  title: "Add Social Account",
285
290
  description: "Track an account manually. To publish through a platform, use “Connect with…” instead.",
286
291
  size: "md",
287
- footer: /* @__PURE__ */ x(ue, { children: [/* @__PURE__ */ b("button", {
292
+ footer: /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("button", {
288
293
  type: "button",
289
- onClick: () => B(!1),
294
+ onClick: () => V(!1),
290
295
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
291
296
  children: "Cancel"
292
- }), /* @__PURE__ */ b("button", {
297
+ }), /* @__PURE__ */ x("button", {
293
298
  type: "button",
294
- onClick: _e,
295
- disabled: k,
299
+ onClick: ye,
300
+ disabled: M,
296
301
  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",
297
- children: k ? "Adding..." : "Add Account"
302
+ children: M ? "Adding..." : "Add Account"
298
303
  })] }),
299
- children: /* @__PURE__ */ x("div", {
304
+ children: /* @__PURE__ */ S("div", {
300
305
  className: "space-y-4",
301
306
  children: [
302
- U && /* @__PURE__ */ b("div", {
307
+ W && /* @__PURE__ */ x("div", {
303
308
  className: "rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
304
- children: U
309
+ children: W
305
310
  }),
306
- /* @__PURE__ */ x("label", {
311
+ /* @__PURE__ */ S("label", {
307
312
  className: "block",
308
- children: [/* @__PURE__ */ b("span", {
313
+ children: [/* @__PURE__ */ x("span", {
309
314
  className: "mb-1 block text-sm font-medium text-text-primary",
310
315
  children: "Platform"
311
- }), /* @__PURE__ */ b("select", {
312
- value: V.platform,
313
- onChange: (e) => H((t) => ({
316
+ }), /* @__PURE__ */ x(de, {
317
+ value: H.platform,
318
+ onChange: (e) => U((t) => ({
314
319
  ...t,
315
320
  platform: e.target.value
316
321
  })),
317
322
  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)]",
318
- children: S.map((e) => /* @__PURE__ */ b("option", {
323
+ children: w.map((e) => /* @__PURE__ */ x("option", {
319
324
  value: e.key,
320
325
  children: e.label
321
326
  }, e.key))
322
327
  })]
323
328
  }),
324
- /* @__PURE__ */ x("label", {
329
+ /* @__PURE__ */ S("label", {
325
330
  className: "block",
326
- children: [/* @__PURE__ */ b("span", {
331
+ children: [/* @__PURE__ */ x("span", {
327
332
  className: "mb-1 block text-sm font-medium text-text-primary",
328
333
  children: "Account name"
329
- }), /* @__PURE__ */ b("input", {
334
+ }), /* @__PURE__ */ x("input", {
330
335
  type: "text",
331
- value: V.accountName,
332
- onChange: (e) => H((t) => ({
336
+ value: H.accountName,
337
+ onChange: (e) => U((t) => ({
333
338
  ...t,
334
339
  accountName: e.target.value
335
340
  })),
@@ -337,22 +342,22 @@ var w = {
337
342
  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)]"
338
343
  })]
339
344
  }),
340
- /* @__PURE__ */ x("label", {
345
+ /* @__PURE__ */ S("label", {
341
346
  className: "block",
342
- children: [/* @__PURE__ */ x("span", {
347
+ children: [/* @__PURE__ */ S("span", {
343
348
  className: "mb-1 block text-sm font-medium text-text-primary",
344
349
  children: [
345
350
  "Profile URL / handle",
346
351
  " ",
347
- /* @__PURE__ */ b("span", {
352
+ /* @__PURE__ */ x("span", {
348
353
  className: "text-text-secondary",
349
354
  children: "(optional)"
350
355
  })
351
356
  ]
352
- }), /* @__PURE__ */ b("input", {
357
+ }), /* @__PURE__ */ x("input", {
353
358
  type: "text",
354
- value: V.profileUrl,
355
- onChange: (e) => H((t) => ({
359
+ value: H.profileUrl,
360
+ onChange: (e) => U((t) => ({
356
361
  ...t,
357
362
  profileUrl: e.target.value
358
363
  })),
@@ -360,19 +365,19 @@ var w = {
360
365
  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)]"
361
366
  })]
362
367
  }),
363
- /* @__PURE__ */ x("label", {
368
+ /* @__PURE__ */ S("label", {
364
369
  className: "block",
365
- children: [/* @__PURE__ */ x("span", {
370
+ children: [/* @__PURE__ */ S("span", {
366
371
  className: "mb-1 block text-sm font-medium text-text-primary",
367
- children: ["Followers ", /* @__PURE__ */ b("span", {
372
+ children: ["Followers ", /* @__PURE__ */ x("span", {
368
373
  className: "text-text-secondary",
369
374
  children: "(optional)"
370
375
  })]
371
- }), /* @__PURE__ */ b("input", {
376
+ }), /* @__PURE__ */ x("input", {
372
377
  type: "number",
373
378
  min: 0,
374
- value: V.followerCount,
375
- onChange: (e) => H((t) => ({
379
+ value: H.followerCount,
380
+ onChange: (e) => U((t) => ({
376
381
  ...t,
377
382
  followerCount: e.target.value
378
383
  })),
@@ -386,6 +391,6 @@ var w = {
386
391
  ]
387
392
  });
388
393
  };
389
- export { T as AccountsPage };
394
+ export { D as AccountsPage };
390
395
 
391
396
  //# sourceMappingURL=AccountsPage.js.map