@burdenoff/microfe-headshotmarketing 2026.1205.1 → 2026.1206.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 (144) hide show
  1. package/dist/generated/global-types.d.ts +3589 -380
  2. package/dist/generated/wspace-operations.d.ts +101 -3
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/generated/wspace-types.d.ts +61782 -2332
  5. package/dist/generated/wspace-types.js.map +1 -1
  6. package/dist/headshotmarketing/components/EntityTagPicker.js +29 -28
  7. package/dist/headshotmarketing/components/EntityTagPicker.js.map +1 -1
  8. package/dist/headshotmarketing/components/InfluencerModals.js +264 -263
  9. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
  10. package/dist/headshotmarketing/components/QueryStateBoundary.js +31 -22
  11. package/dist/headshotmarketing/components/QueryStateBoundary.js.map +1 -1
  12. package/dist/headshotmarketing/components/StatusBadge.js +1 -1
  13. package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
  14. package/dist/headshotmarketing/components/Toast.js +3 -3
  15. package/dist/headshotmarketing/components/Toast.js.map +1 -1
  16. package/dist/headshotmarketing/components/TrackedLinksPanel.js +97 -96
  17. package/dist/headshotmarketing/components/TrackedLinksPanel.js.map +1 -1
  18. package/dist/headshotmarketing/hooks/useAssetUpload.js +41 -40
  19. package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
  20. package/dist/headshotmarketing/pages/HomePage.js +6 -6
  21. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  22. package/dist/headshotmarketing/pages/ads/AdBudgetAiPanel.js +47 -46
  23. package/dist/headshotmarketing/pages/ads/AdBudgetAiPanel.js.map +1 -1
  24. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +66 -65
  25. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  26. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +273 -272
  27. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
  28. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js +3 -3
  29. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js.map +1 -1
  30. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +125 -124
  31. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  32. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js +33 -32
  33. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js.map +1 -1
  34. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js +108 -107
  35. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js.map +1 -1
  36. package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js +65 -60
  37. package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js.map +1 -1
  38. package/dist/headshotmarketing/pages/ads/AdsPage.js +4 -4
  39. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  40. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +287 -286
  41. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  42. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +59 -54
  43. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  44. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js +96 -95
  45. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js.map +1 -1
  46. package/dist/headshotmarketing/pages/ai/AiDecisionCard.js +5 -5
  47. package/dist/headshotmarketing/pages/ai/AiDecisionCard.js.map +1 -1
  48. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js +179 -178
  49. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js.map +1 -1
  50. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js +156 -151
  51. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js.map +1 -1
  52. package/dist/headshotmarketing/pages/analytics/ReportsPage.js +222 -217
  53. package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
  54. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +59 -58
  55. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -1
  56. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js +152 -151
  57. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js.map +1 -1
  58. package/dist/headshotmarketing/pages/automation/AutomationPage.js +34 -33
  59. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  60. package/dist/headshotmarketing/pages/automation/TriggersPage.js +6 -6
  61. package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
  62. package/dist/headshotmarketing/pages/automation/WorkflowActions.js +1 -1
  63. package/dist/headshotmarketing/pages/automation/WorkflowActions.js.map +1 -1
  64. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +235 -234
  65. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  66. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +24 -23
  67. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -1
  68. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +1 -1
  69. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
  70. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +4 -4
  71. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -1
  72. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +339 -338
  73. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  74. package/dist/headshotmarketing/pages/campaigns/CampaignAiPanel.js +95 -94
  75. package/dist/headshotmarketing/pages/campaigns/CampaignAiPanel.js.map +1 -1
  76. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +82 -81
  77. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  78. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +107 -106
  79. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
  80. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +104 -103
  81. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  82. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +262 -261
  83. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  84. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js +68 -67
  85. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js.map +1 -1
  86. package/dist/headshotmarketing/pages/content/AIToolsPage.js +204 -203
  87. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  88. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +177 -176
  89. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  90. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +373 -372
  91. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  92. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +1 -1
  93. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  94. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +4 -4
  95. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
  96. package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js +51 -50
  97. package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js.map +1 -1
  98. package/dist/headshotmarketing/pages/crm/CreateContactPage.js +100 -99
  99. package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
  100. package/dist/headshotmarketing/pages/crm/CreateDealPage.js +134 -133
  101. package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
  102. package/dist/headshotmarketing/pages/crm/CreatePipelineModal.js +66 -65
  103. package/dist/headshotmarketing/pages/crm/CreatePipelineModal.js.map +1 -1
  104. package/dist/headshotmarketing/pages/crm/CrmActions.js +229 -228
  105. package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -1
  106. package/dist/headshotmarketing/pages/crm/DealNextActionPanel.js +62 -61
  107. package/dist/headshotmarketing/pages/crm/DealNextActionPanel.js.map +1 -1
  108. package/dist/headshotmarketing/pages/crm/LeadAiDecisionPanel.js +126 -125
  109. package/dist/headshotmarketing/pages/crm/LeadAiDecisionPanel.js.map +1 -1
  110. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +93 -92
  111. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
  112. package/dist/headshotmarketing/pages/crm/PipelinePage.js +5 -5
  113. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  114. package/dist/headshotmarketing/pages/events/CreateEventPage.js +127 -126
  115. package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
  116. package/dist/headshotmarketing/pages/events/EventDetailsPage.js +76 -75
  117. package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
  118. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +8 -8
  119. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  120. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +4 -4
  121. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  122. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +4 -4
  123. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
  124. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +1 -1
  125. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -1
  126. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +104 -103
  127. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
  128. package/dist/headshotmarketing/pages/social-media/AccountsPage.js +102 -101
  129. package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
  130. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js +59 -58
  131. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js.map +1 -1
  132. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +1 -1
  133. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
  134. package/dist/headshotmarketing/pages/social-media/PostsPage.js +103 -102
  135. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  136. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +123 -122
  137. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
  138. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +4 -4
  139. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  140. package/dist/headshotmarketing/utils/index.d.ts +1 -0
  141. package/dist/headshotmarketing/utils/readableError.d.ts +16 -0
  142. package/dist/headshotmarketing/utils/readableError.js +12 -0
  143. package/dist/headshotmarketing/utils/readableError.js.map +1 -0
  144. package/package.json +5 -3
@@ -3,20 +3,21 @@ import { HeadshotmarketingSocialPostStatus as t } from "../../../generated/wspac
3
3
  import { cn as n } from "../../utils/helpers.js";
4
4
  import { toHashtagSuggestions as r, toSocialAccountModel as i, toSocialPostModel as a } from "../../utils/socialMapper.js";
5
5
  import { PageLayout as ee } from "../../components/PageLayout.js";
6
- import { QueryStateBoundary as te } from "../../components/QueryStateBoundary.js";
7
6
  import "../../components/index.js";
8
- import { useHeadshotmarketingBootstrap as ne } from "../../hooks/useHeadshotmarketingBootstrap.js";
9
- import { useHeadshotMarketing as re } from "../../context/HeadshotMarketingContext.js";
7
+ import { QueryStateBoundary as te } from "../../components/QueryStateBoundary.js";
8
+ import { useHeadshotMarketing as ne } from "../../context/HeadshotMarketingContext.js";
9
+ import { useHeadshotmarketingBootstrap as re } from "../../hooks/useHeadshotmarketingBootstrap.js";
10
10
  import "../../hooks/index.js";
11
11
  import { PLATFORM_BY_KEY as o, PLATFORM_META as ie } from "./socialComposerMeta.js";
12
12
  import { SocialComposerPreview as ae } from "./SocialComposerPreview.js";
13
13
  import { MediaDropZone as oe } from "./MediaDropZone.js";
14
+ import { readableError as se, readableErrorOrNull as ce } from "../../utils/readableError.js";
14
15
  import { useMemo as s, useState as c } from "react";
15
- import { AlertTriangle as se, ArrowLeft as ce, AtSign as le, CheckCircle2 as ue, Clock as de, Hash as l, Link2 as fe, Save as pe, Send as me, SmilePlus as he, Sparkles as ge, Wand2 as _e, X as ve } from "lucide-react";
16
- import { Fragment as ye, jsx as u, jsxs as d } from "react/jsx-runtime";
17
- import { EmphasisPanel as be, PagePurpose as xe } from "@burdenoff/fe-libs/ui";
16
+ import { AlertTriangle as le, ArrowLeft as ue, AtSign as de, CheckCircle2 as fe, Clock as pe, Hash as l, Link2 as me, Save as he, Send as ge, SmilePlus as _e, Sparkles as ve, Wand2 as ye, X as be } from "lucide-react";
17
+ import { Fragment as xe, jsx as u, jsxs as d } from "react/jsx-runtime";
18
+ import { EmphasisPanel as Se, PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
18
19
  // src/headshotmarketing/pages/social-media/SocialMediaComposePage.tsx
19
- var Se = [
20
+ var we = [
20
21
  "😀",
21
22
  "😎",
22
23
  "🔥",
@@ -34,80 +35,80 @@ var Se = [
34
35
  "🌟",
35
36
  "💬"
36
37
  ], f = "inline-flex h-10 min-w-[40px] items-center justify-center gap-1.5 rounded-md border border-border-subtle px-2.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken", p = () => {
37
- let { navigate: p, basePath: m } = re(), { data: h, loading: Ce, error: we, refetch: g } = ne(), [Te, { loading: _, error: Ee }] = e(), [v, y] = c(/* @__PURE__ */ new Set(["instagram"])), [b, x] = c(""), [S, C] = c([]), [w, De] = c(!1), [T, E] = c(""), [D, Oe] = c(""), [ke, O] = c(null), [k, A] = c(!1), [j, M] = c(""), [N, P] = c(!1), [F, I] = c(!1), [L, Ae] = c(null), R = s(() => (h?.headshotmarketingSocialAccounts.items ?? []).map((e) => i(e)), [h?.headshotmarketingSocialAccounts.items]), z = s(() => Object.fromEntries((h?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.accountName])), [h?.headshotmarketingSocialAccounts.items]), B = s(() => Object.fromEntries(R.map((e) => [e.id, e.platform])), [R]), V = s(() => (h?.headshotmarketingSocialPosts.items ?? []).map((e) => a(e, z, B)), [
38
+ let { navigate: p, basePath: m } = ne(), { data: h, loading: Te, error: Ee, refetch: g } = re(), [De, { loading: _, error: Oe }] = e(), [v, ke] = c(/* @__PURE__ */ new Set(["instagram"])), [y, b] = c(""), [x, S] = c([]), [C, w] = c(!1), [T, Ae] = c(""), [E, je] = c(""), [Me, D] = c(null), [O, k] = c(!1), [A, j] = c(""), [M, N] = c(!1), [P, F] = c(!1), [I, Ne] = c(null), L = s(() => (h?.headshotmarketingSocialAccounts.items ?? []).map((e) => i(e)), [h?.headshotmarketingSocialAccounts.items]), R = s(() => Object.fromEntries((h?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.accountName])), [h?.headshotmarketingSocialAccounts.items]), z = s(() => Object.fromEntries(L.map((e) => [e.id, e.platform])), [L]), B = s(() => (h?.headshotmarketingSocialPosts.items ?? []).map((e) => a(e, R, z)), [
38
39
  h?.headshotmarketingSocialPosts.items,
39
- z,
40
- B
41
- ]), H = s(() => r(V), [V]), je = s(() => new Set(R.filter((e) => e.connected).map((e) => e.platform)), [R]), U = s(() => {
40
+ R,
41
+ z
42
+ ]), V = s(() => r(B), [B]), Pe = s(() => new Set(L.filter((e) => e.connected).map((e) => e.platform)), [L]), H = s(() => {
42
43
  let e = /* @__PURE__ */ new Map();
43
- for (let t of R) e.has(t.platform) || e.set(t.platform, t);
44
+ for (let t of L) e.has(t.platform) || e.set(t.platform, t);
44
45
  return e;
45
- }, [R]), W = s(() => Array.from(v), [v]), G = L && v.has(L) ? L : W[0] ?? "instagram", Me = U.get(G) ?? null, K = s(() => W.filter((e) => !U.has(e)), [W, U]), q = (e) => {
46
- y((t) => {
46
+ }, [L]), U = s(() => Array.from(v), [v]), W = I && v.has(I) ? I : U[0] ?? "instagram", Fe = H.get(W) ?? null, G = s(() => U.filter((e) => !H.has(e)), [U, H]), K = (e) => {
47
+ ke((t) => {
47
48
  let n = new Set(t);
48
49
  return n.has(e) ? n.size > 1 && n.delete(e) : n.add(e), n;
49
50
  });
50
- }, J = Math.min(...W.map((e) => o[e]?.maxChars ?? 280)), Y = Math.min(b.length / J * 100, 100), Ne = (e) => {
51
- b.includes(e) || x((t) => t ? `${t} ${e}` : e);
52
- }, Pe = (e) => {
53
- e.url && C((t) => t.includes(e.url) ? t : [...t, e.url]);
54
- }, Fe = (e) => {
55
- C((t) => t.filter((t) => t !== e));
51
+ }, q = Math.min(...U.map((e) => o[e]?.maxChars ?? 280)), J = Math.min(y.length / q * 100, 100), Ie = (e) => {
52
+ y.includes(e) || b((t) => t ? `${t} ${e}` : e);
53
+ }, Y = (e) => {
54
+ e.url && S((t) => t.includes(e.url) ? t : [...t, e.url]);
55
+ }, Le = (e) => {
56
+ S((t) => t.filter((t) => t !== e));
56
57
  }, X = () => {
57
- let e = j.trim();
58
- e && (x((t) => t ? `${t} ${e}` : e), M(""), A(!1));
59
- }, Ie = (e) => {
60
- x((t) => `${t}${e}`), P(!1);
58
+ let e = A.trim();
59
+ e && (b((t) => t ? `${t} ${e}` : e), j(""), k(!1));
60
+ }, Re = (e) => {
61
+ b((t) => `${t}${e}`), N(!1);
61
62
  }, Z = (e) => {
62
- x((t) => `${t}${t.length > 0 && !t.endsWith(" ") ? " " : ""}${e}`);
63
- }, Le = () => {
64
- let e = H.map((e) => e.tag).filter((e) => !b.includes(e)).slice(0, 5);
65
- e.length > 0 && x((t) => t ? `${t.trimEnd()} ${e.join(" ")}` : e.join(" ")), I(!1);
66
- }, Re = () => {
67
- x((e) => e.split("\n").map((e) => e.replace(/[ \t]+$/g, "")).join("\n").replace(/\n{3,}/g, "\n\n").replace(/[ \t]{2,}/g, " ").trim()), I(!1);
68
- }, Q = ke ?? Ee?.message ?? null, ze = () => {
69
- if (!w) return null;
70
- let e = `${T}T${D}`, t = new Date(e);
71
- return !T || !D || Number.isNaN(t.getTime()) ? null : t.toISOString();
63
+ b((t) => `${t}${t.length > 0 && !t.endsWith(" ") ? " " : ""}${e}`);
64
+ }, ze = () => {
65
+ let e = V.map((e) => e.tag).filter((e) => !y.includes(e)).slice(0, 5);
66
+ e.length > 0 && b((t) => t ? `${t.trimEnd()} ${e.join(" ")}` : e.join(" ")), F(!1);
72
67
  }, Be = () => {
73
- let e = b.match(/#\w+/g) ?? [];
68
+ b((e) => e.split("\n").map((e) => e.replace(/[ \t]+$/g, "")).join("\n").replace(/\n{3,}/g, "\n\n").replace(/[ \t]{2,}/g, " ").trim()), F(!1);
69
+ }, Q = Me ?? ce(Oe) ?? null, Ve = () => {
70
+ if (!C) return null;
71
+ let e = `${T}T${E}`, t = new Date(e);
72
+ return !T || !E || Number.isNaN(t.getTime()) ? null : t.toISOString();
73
+ }, He = () => {
74
+ let e = y.match(/#\w+/g) ?? [];
74
75
  return Array.from(new Set(e));
75
76
  }, $ = async (e) => {
76
- let t = b.trim();
77
+ let t = y.trim();
77
78
  if (!t) {
78
- O("Post content is required.");
79
+ D("Post content is required.");
79
80
  return;
80
81
  }
81
- let n = ze();
82
- if (w && !n) {
83
- O("Provide a valid schedule date and time.");
82
+ let n = Ve();
83
+ if (C && !n) {
84
+ D("Provide a valid schedule date and time.");
84
85
  return;
85
86
  }
86
- let r = W.filter((e) => !R.some((t) => t.platform === e));
87
+ let r = U.filter((e) => !L.some((t) => t.platform === e));
87
88
  if (r.length > 0) {
88
89
  let e = r.map((e) => o[e]?.label ?? e).join(", ");
89
- O(`Connect a social account for: ${e}.`);
90
+ D(`Connect a social account for: ${e}.`);
90
91
  return;
91
92
  }
92
- let i = Be();
93
- O(null);
94
- let a = W.map((r) => {
95
- let a = R.find((e) => e.platform === r)?.id;
93
+ let i = He();
94
+ D(null);
95
+ let a = U.map((r) => {
96
+ let a = L.find((e) => e.platform === r)?.id;
96
97
  if (!a) throw Error(`Missing social account for ${r}.`);
97
98
  return {
98
99
  socialAccountId: a,
99
100
  content: t,
100
101
  status: e,
101
- scheduledAt: w ? n : null,
102
+ scheduledAt: C ? n : null,
102
103
  tags: i,
103
- mediaUrls: S.length > 0 ? S : void 0
104
+ mediaUrls: x.length > 0 ? x : void 0
104
105
  };
105
106
  });
106
107
  try {
107
- for (let e = 0; e < a.length; e += 1) await Te({ variables: { input: a[e] } });
108
+ for (let e = 0; e < a.length; e += 1) await De({ variables: { input: a[e] } });
108
109
  await g(), p(m + "/social/posts");
109
110
  } catch (e) {
110
- O(e instanceof Error ? e.message : "Failed to create social post.");
111
+ D(se(e, "Failed to create social post."));
111
112
  }
112
113
  };
113
114
  return /* @__PURE__ */ d(ee, {
@@ -116,11 +117,11 @@ var Se = [
116
117
  actions: /* @__PURE__ */ d("button", {
117
118
  onClick: () => p(m + "/social"),
118
119
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
119
- children: [/* @__PURE__ */ u(ce, { className: "h-4 w-4" }), "Back"]
120
+ children: [/* @__PURE__ */ u(ue, { className: "h-4 w-4" }), "Back"]
120
121
  }),
121
- children: [/* @__PURE__ */ u(xe, { children: "Write once, publish everywhere. Pick the platforms to post to, craft your message with a live phone preview per channel, add media and hashtags, then publish now or schedule it for later." }), /* @__PURE__ */ u(te, {
122
- loading: Ce,
123
- error: we,
122
+ children: [/* @__PURE__ */ u(Ce, { children: "Write once, publish everywhere. Pick the platforms to post to, craft your message with a live phone preview per channel, add media and hashtags, then publish now or schedule it for later." }), /* @__PURE__ */ u(te, {
123
+ loading: Te,
124
+ error: Ee,
124
125
  onRetry: g,
125
126
  hasData: !!h,
126
127
  children: /* @__PURE__ */ d("div", {
@@ -138,13 +139,13 @@ var Se = [
138
139
  /* @__PURE__ */ u("div", {
139
140
  className: "flex flex-wrap gap-2",
140
141
  children: ie.map((e) => {
141
- let t = e.icon, r = v.has(e.key), i = je.has(e.key) && /* @__PURE__ */ u(ue, {
142
+ let t = e.icon, r = v.has(e.key), i = Pe.has(e.key) && /* @__PURE__ */ u(fe, {
142
143
  className: n("h-3.5 w-3.5", r ? "text-background" : "text-status-success-text"),
143
144
  "aria-label": "Account connected"
144
145
  });
145
146
  if (!r) return /* @__PURE__ */ d("button", {
146
147
  type: "button",
147
- onClick: () => q(e.key),
148
+ onClick: () => K(e.key),
148
149
  "aria-pressed": !1,
149
150
  className: "group inline-flex min-h-[40px] items-center gap-2 rounded-full border border-border-subtle px-4 py-2 text-sm font-medium text-text-secondary transition-colors hover:border-foreground/50 hover:text-text-primary",
150
151
  children: [
@@ -166,12 +167,12 @@ var Se = [
166
167
  i,
167
168
  /* @__PURE__ */ u("button", {
168
169
  type: "button",
169
- onClick: () => q(e.key),
170
+ onClick: () => K(e.key),
170
171
  disabled: a,
171
172
  "aria-label": `Remove ${e.label}`,
172
173
  title: a ? "Select another platform before removing this one" : `Remove ${e.label}`,
173
174
  className: "inline-flex h-7 w-7 items-center justify-center rounded-full text-background transition-colors hover:bg-background/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50",
174
- children: /* @__PURE__ */ u(ve, {
175
+ children: /* @__PURE__ */ u(be, {
175
176
  className: "h-3.5 w-3.5",
176
177
  "aria-hidden": "true"
177
178
  })
@@ -180,18 +181,18 @@ var Se = [
180
181
  }, e.key);
181
182
  })
182
183
  }),
183
- K.length > 0 && /* @__PURE__ */ d("p", {
184
+ G.length > 0 && /* @__PURE__ */ d("p", {
184
185
  className: "mt-3 flex items-start gap-1.5 text-xs text-status-warning-text",
185
- children: [/* @__PURE__ */ u(se, { className: "mt-0.5 h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ d("span", { children: [
186
+ children: [/* @__PURE__ */ u(le, { className: "mt-0.5 h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ d("span", { children: [
186
187
  "No connected account for",
187
188
  " ",
188
- K.map((e) => o[e]?.label ?? e).join(", "),
189
+ G.map((e) => o[e]?.label ?? e).join(", "),
189
190
  ". Connect one before publishing."
190
191
  ] })]
191
192
  })
192
193
  ]
193
194
  }),
194
- /* @__PURE__ */ d(be, {
195
+ /* @__PURE__ */ d(Se, {
195
196
  className: "p-6",
196
197
  children: [
197
198
  /* @__PURE__ */ u("h3", {
@@ -199,8 +200,8 @@ var Se = [
199
200
  children: "Content"
200
201
  }),
201
202
  /* @__PURE__ */ u("textarea", {
202
- value: b,
203
- onChange: (e) => x(e.target.value),
203
+ value: y,
204
+ onChange: (e) => b(e.target.value),
204
205
  placeholder: "What's on your mind? Write your post content here...",
205
206
  rows: 6,
206
207
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
@@ -213,12 +214,12 @@ var Se = [
213
214
  /* @__PURE__ */ u("button", {
214
215
  type: "button",
215
216
  onClick: () => {
216
- P((e) => !e), A(!1), I(!1);
217
+ N((e) => !e), k(!1), F(!1);
217
218
  },
218
- className: n(f, N && "bg-bg-sunken"),
219
+ className: n(f, M && "bg-bg-sunken"),
219
220
  title: "Add emoji",
220
221
  "aria-label": "Add emoji",
221
- children: /* @__PURE__ */ u(he, { className: "h-4 w-4" })
222
+ children: /* @__PURE__ */ u(_e, { className: "h-4 w-4" })
222
223
  }),
223
224
  /* @__PURE__ */ u("button", {
224
225
  type: "button",
@@ -234,17 +235,17 @@ var Se = [
234
235
  className: f,
235
236
  title: "Insert mention",
236
237
  "aria-label": "Insert mention",
237
- children: /* @__PURE__ */ u(le, { className: "h-4 w-4" })
238
+ children: /* @__PURE__ */ u(de, { className: "h-4 w-4" })
238
239
  }),
239
240
  /* @__PURE__ */ u("button", {
240
241
  type: "button",
241
242
  onClick: () => {
242
- A((e) => !e), P(!1), I(!1);
243
+ k((e) => !e), N(!1), F(!1);
243
244
  },
244
- className: n(f, k && "bg-bg-sunken"),
245
+ className: n(f, O && "bg-bg-sunken"),
245
246
  title: "Add link",
246
247
  "aria-label": "Add link",
247
- children: /* @__PURE__ */ u(fe, { className: "h-4 w-4" })
248
+ children: /* @__PURE__ */ u(me, { className: "h-4 w-4" })
248
249
  })
249
250
  ]
250
251
  }), /* @__PURE__ */ d("div", {
@@ -254,16 +255,16 @@ var Se = [
254
255
  children: [/* @__PURE__ */ d("button", {
255
256
  type: "button",
256
257
  onClick: () => {
257
- I((e) => !e), P(!1), A(!1);
258
+ F((e) => !e), N(!1), k(!1);
258
259
  },
259
- className: n("inline-flex min-h-[40px] items-center gap-1.5 rounded-md border px-3 py-2 text-sm font-medium transition-colors", F ? "border-action-primary-bg bg-action-primary-bg/15 text-action-primary-bg" : "border-action-primary-bg/30 bg-action-primary-bg/10 text-action-primary-bg hover:bg-action-primary-bg/15"),
260
+ className: n("inline-flex min-h-[40px] items-center gap-1.5 rounded-md border px-3 py-2 text-sm font-medium transition-colors", P ? "border-action-primary-bg bg-action-primary-bg/15 text-action-primary-bg" : "border-action-primary-bg/30 bg-action-primary-bg/10 text-action-primary-bg hover:bg-action-primary-bg/15"),
260
261
  title: "AI Assist",
261
- children: [/* @__PURE__ */ u(ge, { className: "h-4 w-4" }), "AI Assist"]
262
- }), F && /* @__PURE__ */ d(ye, { children: [/* @__PURE__ */ u("button", {
262
+ children: [/* @__PURE__ */ u(ve, { className: "h-4 w-4" }), "AI Assist"]
263
+ }), P && /* @__PURE__ */ d(xe, { children: [/* @__PURE__ */ u("button", {
263
264
  type: "button",
264
265
  "aria-hidden": !0,
265
266
  tabIndex: -1,
266
- onClick: () => I(!1),
267
+ onClick: () => F(!1),
267
268
  className: "fixed inset-0 z-10 cursor-default"
268
269
  }), /* @__PURE__ */ d("div", {
269
270
  className: "absolute end-0 z-20 mt-2 w-64 rounded-lg border border-border-seam bg-bg-surface p-1.5 shadow-pop",
@@ -274,8 +275,8 @@ var Se = [
274
275
  }),
275
276
  /* @__PURE__ */ d("button", {
276
277
  type: "button",
277
- onClick: Le,
278
- disabled: H.length === 0,
278
+ onClick: ze,
279
+ disabled: V.length === 0,
279
280
  className: "flex w-full items-center gap-2 rounded-md px-2 py-2 text-start text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
280
281
  children: [
281
282
  /* @__PURE__ */ u(l, { className: "h-4 w-4 text-action-primary-bg" }),
@@ -285,16 +286,16 @@ var Se = [
285
286
  }),
286
287
  /* @__PURE__ */ u("span", {
287
288
  className: "text-xs text-text-secondary",
288
- children: H.length
289
+ children: V.length
289
290
  })
290
291
  ]
291
292
  }),
292
293
  /* @__PURE__ */ d("button", {
293
294
  type: "button",
294
- onClick: Re,
295
- disabled: !b.trim(),
295
+ onClick: Be,
296
+ disabled: !y.trim(),
296
297
  className: "flex w-full items-center gap-2 rounded-md px-2 py-2 text-start text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
297
- children: [/* @__PURE__ */ u(_e, { className: "h-4 w-4 text-action-primary-bg" }), /* @__PURE__ */ u("span", {
298
+ children: [/* @__PURE__ */ u(ye, { className: "h-4 w-4 text-action-primary-bg" }), /* @__PURE__ */ u("span", {
298
299
  className: "flex-1",
299
300
  children: "Clean up formatting"
300
301
  })]
@@ -310,26 +311,26 @@ var Se = [
310
311
  children: [/* @__PURE__ */ u("div", {
311
312
  className: "h-2 w-24 rounded-full bg-bg-sunken overflow-hidden",
312
313
  children: /* @__PURE__ */ u("div", {
313
- className: n("h-full rounded-full transition-all", Y > 90 ? "bg-status-error-text" : Y > 70 ? "bg-status-warning-text" : "bg-status-success-text"),
314
- style: { width: `${Y}%` }
314
+ className: n("h-full rounded-full transition-all", J > 90 ? "bg-status-error-text" : J > 70 ? "bg-status-warning-text" : "bg-status-success-text"),
315
+ style: { width: `${J}%` }
315
316
  })
316
317
  }), /* @__PURE__ */ d("span", {
317
- className: n("text-xs font-medium tabular-nums", b.length > J ? "text-status-error-text" : "text-text-secondary"),
318
+ className: n("text-xs font-medium tabular-nums", y.length > q ? "text-status-error-text" : "text-text-secondary"),
318
319
  children: [
319
- b.length,
320
+ y.length,
320
321
  "/",
321
- J
322
+ q
322
323
  ]
323
324
  })]
324
325
  })]
325
326
  })]
326
327
  }),
327
- k && /* @__PURE__ */ d("div", {
328
+ O && /* @__PURE__ */ d("div", {
328
329
  className: "mt-3 flex flex-wrap items-center gap-2",
329
330
  children: [/* @__PURE__ */ u("input", {
330
331
  type: "url",
331
- value: j,
332
- onChange: (e) => M(e.target.value),
332
+ value: A,
333
+ onChange: (e) => j(e.target.value),
333
334
  onKeyDown: (e) => {
334
335
  e.key === "Enter" && (e.preventDefault(), X());
335
336
  },
@@ -338,16 +339,16 @@ var Se = [
338
339
  }), /* @__PURE__ */ u("button", {
339
340
  type: "button",
340
341
  onClick: X,
341
- disabled: !j.trim(),
342
+ disabled: !A.trim(),
342
343
  className: "rounded-md bg-foreground px-3 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
343
344
  children: "Insert"
344
345
  })]
345
346
  }),
346
- N && /* @__PURE__ */ u("div", {
347
+ M && /* @__PURE__ */ u("div", {
347
348
  className: "mt-3 flex flex-wrap gap-1 rounded-md border border-border-subtle bg-bg-surface p-2",
348
- children: Se.map((e) => /* @__PURE__ */ u("button", {
349
+ children: we.map((e) => /* @__PURE__ */ u("button", {
349
350
  type: "button",
350
- onClick: () => Ie(e),
351
+ onClick: () => Re(e),
351
352
  className: "rounded-md px-2 py-1 text-lg hover:bg-bg-sunken",
352
353
  "aria-label": `Insert ${e}`,
353
354
  children: e
@@ -359,9 +360,9 @@ var Se = [
359
360
  className: "mb-2 text-sm font-semibold text-text-primary",
360
361
  children: "Media"
361
362
  }), /* @__PURE__ */ u(oe, {
362
- mediaUrls: S,
363
- onUploaded: Pe,
364
- onRemove: Fe
363
+ mediaUrls: x,
364
+ onUploaded: Y,
365
+ onRemove: Le
365
366
  })]
366
367
  })
367
368
  ]
@@ -372,26 +373,26 @@ var Se = [
372
373
  className: "flex items-center justify-between mb-3",
373
374
  children: [/* @__PURE__ */ d("h3", {
374
375
  className: "text-sm font-semibold text-text-primary flex items-center gap-2",
375
- children: [/* @__PURE__ */ u(de, { className: "h-4 w-4" }), w ? "Schedule for later" : "Publish now"]
376
+ children: [/* @__PURE__ */ u(pe, { className: "h-4 w-4" }), C ? "Schedule for later" : "Publish now"]
376
377
  }), /* @__PURE__ */ u("button", {
377
- onClick: () => De(!w),
378
+ onClick: () => w(!C),
378
379
  role: "switch",
379
- "aria-checked": w,
380
+ "aria-checked": C,
380
381
  "aria-label": "Toggle scheduling",
381
- className: n("relative inline-flex h-6 w-11 items-center rounded-full transition-colors", w ? "bg-foreground" : "bg-bg-sunken"),
382
- children: /* @__PURE__ */ u("span", { className: n("inline-block h-4 w-4 transform rounded-full bg-bg-surface transition-transform", w ? "translate-x-6" : "translate-x-1") })
382
+ className: n("relative inline-flex h-6 w-11 items-center rounded-full transition-colors", C ? "bg-foreground" : "bg-bg-sunken"),
383
+ children: /* @__PURE__ */ u("span", { className: n("inline-block h-4 w-4 transform rounded-full bg-bg-surface transition-transform", C ? "translate-x-6" : "translate-x-1") })
383
384
  })]
384
- }), w ? /* @__PURE__ */ d("div", {
385
+ }), C ? /* @__PURE__ */ d("div", {
385
386
  className: "flex flex-wrap items-center gap-3",
386
387
  children: [/* @__PURE__ */ u("input", {
387
388
  type: "date",
388
389
  value: T,
389
- onChange: (e) => E(e.target.value),
390
+ onChange: (e) => Ae(e.target.value),
390
391
  className: "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)]"
391
392
  }), /* @__PURE__ */ u("input", {
392
393
  type: "time",
393
- value: D,
394
- onChange: (e) => Oe(e.target.value),
394
+ value: E,
395
+ onChange: (e) => je(e.target.value),
395
396
  className: "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)]"
396
397
  })]
397
398
  }) : /* @__PURE__ */ u("p", {
@@ -411,14 +412,14 @@ var Se = [
411
412
  },
412
413
  disabled: _,
413
414
  className: "inline-flex min-h-[40px] 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 disabled:opacity-60",
414
- children: [/* @__PURE__ */ u(pe, { className: "h-4 w-4" }), _ ? "Saving..." : "Save Draft"]
415
+ children: [/* @__PURE__ */ u(he, { className: "h-4 w-4" }), _ ? "Saving..." : "Save Draft"]
415
416
  }), /* @__PURE__ */ d("button", {
416
417
  onClick: async () => {
417
- await $(w ? t.Scheduled : t.Published);
418
+ await $(C ? t.Scheduled : t.Published);
418
419
  },
419
420
  disabled: _,
420
421
  className: "inline-flex min-h-[40px] 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",
421
- children: [/* @__PURE__ */ u(me, { className: "h-4 w-4" }), _ ? "Submitting..." : w ? "Schedule Post" : "Publish Now"]
422
+ children: [/* @__PURE__ */ u(ge, { className: "h-4 w-4" }), _ ? "Submitting..." : C ? "Schedule Post" : "Publish Now"]
422
423
  })]
423
424
  })
424
425
  ]
@@ -429,11 +430,11 @@ var Se = [
429
430
  children: [/* @__PURE__ */ d("h3", {
430
431
  className: "text-sm font-semibold text-text-primary mb-3 flex items-center gap-2",
431
432
  children: [/* @__PURE__ */ u(l, { className: "h-4 w-4" }), "Suggested Hashtags"]
432
- }), H.length > 0 ? /* @__PURE__ */ u("div", {
433
+ }), V.length > 0 ? /* @__PURE__ */ u("div", {
433
434
  className: "space-y-2",
434
- children: H.map((e) => /* @__PURE__ */ d("button", {
435
- onClick: () => Ne(e.tag),
436
- className: n("flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors", b.includes(e.tag) ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
435
+ children: V.map((e) => /* @__PURE__ */ d("button", {
436
+ onClick: () => Ie(e.tag),
437
+ className: n("flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors", y.includes(e.tag) ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
437
438
  children: [/* @__PURE__ */ u("span", {
438
439
  className: "font-medium",
439
440
  children: e.tag
@@ -456,16 +457,16 @@ var Se = [
456
457
  children: "Live Preview"
457
458
  }), /* @__PURE__ */ u("span", {
458
459
  className: "text-xs text-text-secondary",
459
- children: o[G]?.label
460
+ children: o[W]?.label
460
461
  })]
461
462
  }),
462
- W.length > 1 && /* @__PURE__ */ u("div", {
463
+ U.length > 1 && /* @__PURE__ */ u("div", {
463
464
  className: "mb-4 flex flex-wrap gap-1.5",
464
- children: W.map((e) => {
465
- let t = o[e].icon, r = e === G;
465
+ children: U.map((e) => {
466
+ let t = o[e].icon, r = e === W;
466
467
  return /* @__PURE__ */ u("button", {
467
468
  type: "button",
468
- onClick: () => Ae(e),
469
+ onClick: () => Ne(e),
469
470
  "aria-pressed": r,
470
471
  title: o[e].label,
471
472
  className: n("inline-flex h-8 w-8 items-center justify-center rounded-md border transition-colors", r ? "border-action-primary-bg bg-action-primary-bg/10 text-action-primary-bg" : "border-border-subtle text-text-secondary hover:text-text-primary"),
@@ -474,10 +475,10 @@ var Se = [
474
475
  })
475
476
  }),
476
477
  /* @__PURE__ */ u(ae, {
477
- platform: G,
478
- content: b,
479
- mediaUrls: S,
480
- account: Me
478
+ platform: W,
479
+ content: y,
480
+ mediaUrls: x,
481
+ account: Fe
481
482
  })
482
483
  ]
483
484
  })]