@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.
- package/dist/generated/global-types.d.ts +3589 -380
- package/dist/generated/wspace-operations.d.ts +101 -3
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +61782 -2332
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/EntityTagPicker.js +29 -28
- package/dist/headshotmarketing/components/EntityTagPicker.js.map +1 -1
- package/dist/headshotmarketing/components/InfluencerModals.js +264 -263
- package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
- package/dist/headshotmarketing/components/QueryStateBoundary.js +31 -22
- package/dist/headshotmarketing/components/QueryStateBoundary.js.map +1 -1
- package/dist/headshotmarketing/components/StatusBadge.js +1 -1
- package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
- package/dist/headshotmarketing/components/Toast.js +3 -3
- package/dist/headshotmarketing/components/Toast.js.map +1 -1
- package/dist/headshotmarketing/components/TrackedLinksPanel.js +97 -96
- package/dist/headshotmarketing/components/TrackedLinksPanel.js.map +1 -1
- package/dist/headshotmarketing/hooks/useAssetUpload.js +41 -40
- package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
- package/dist/headshotmarketing/pages/HomePage.js +6 -6
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdBudgetAiPanel.js +47 -46
- package/dist/headshotmarketing/pages/ads/AdBudgetAiPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +66 -65
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +273 -272
- package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js +3 -3
- package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +125 -124
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js +33 -32
- package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js +108 -107
- package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js +65 -60
- package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdsPage.js +4 -4
- package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js +287 -286
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +59 -54
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js +96 -95
- package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js.map +1 -1
- package/dist/headshotmarketing/pages/ai/AiDecisionCard.js +5 -5
- package/dist/headshotmarketing/pages/ai/AiDecisionCard.js.map +1 -1
- package/dist/headshotmarketing/pages/ai/AiOperationsPage.js +179 -178
- package/dist/headshotmarketing/pages/ai/AiOperationsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js +156 -151
- package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js +222 -217
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +59 -58
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js +152 -151
- package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/AutomationPage.js +34 -33
- package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/TriggersPage.js +6 -6
- package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowActions.js +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowActions.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +235 -234
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +24 -23
- package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +4 -4
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +339 -338
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignAiPanel.js +95 -94
- package/dist/headshotmarketing/pages/campaigns/CampaignAiPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +82 -81
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +107 -106
- package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +104 -103
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +262 -261
- package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js +68 -67
- package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +204 -203
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +177 -176
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +373 -372
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +4 -4
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js +51 -50
- package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CreateContactPage.js +100 -99
- package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CreateDealPage.js +134 -133
- package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CreatePipelineModal.js +66 -65
- package/dist/headshotmarketing/pages/crm/CreatePipelineModal.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CrmActions.js +229 -228
- package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/DealNextActionPanel.js +62 -61
- package/dist/headshotmarketing/pages/crm/DealNextActionPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadAiDecisionPanel.js +126 -125
- package/dist/headshotmarketing/pages/crm/LeadAiDecisionPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +93 -92
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/PipelinePage.js +5 -5
- package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/CreateEventPage.js +127 -126
- package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js +76 -75
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +8 -8
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +4 -4
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +4 -4
- package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +1 -1
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -1
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +104 -103
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/AccountsPage.js +102 -101
- package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js +59 -58
- package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/PostsPage.js +103 -102
- package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +123 -122
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +4 -4
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
- package/dist/headshotmarketing/utils/index.d.ts +1 -0
- package/dist/headshotmarketing/utils/readableError.d.ts +16 -0
- package/dist/headshotmarketing/utils/readableError.js +12 -0
- package/dist/headshotmarketing/utils/readableError.js.map +1 -0
- 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 {
|
|
9
|
-
import { useHeadshotMarketing as
|
|
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
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import { EmphasisPanel as
|
|
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
|
|
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 } =
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
]),
|
|
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
|
|
44
|
+
for (let t of L) e.has(t.platform) || e.set(t.platform, t);
|
|
44
45
|
return e;
|
|
45
|
-
}, [
|
|
46
|
-
|
|
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
|
-
},
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
e.url &&
|
|
54
|
-
},
|
|
55
|
-
|
|
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 =
|
|
58
|
-
e && (
|
|
59
|
-
},
|
|
60
|
-
|
|
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
|
-
|
|
63
|
-
},
|
|
64
|
-
let e =
|
|
65
|
-
e.length > 0 &&
|
|
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
|
-
|
|
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 =
|
|
77
|
+
let t = y.trim();
|
|
77
78
|
if (!t) {
|
|
78
|
-
|
|
79
|
+
D("Post content is required.");
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
|
-
let n =
|
|
82
|
-
if (
|
|
83
|
-
|
|
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 =
|
|
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
|
-
|
|
90
|
+
D(`Connect a social account for: ${e}.`);
|
|
90
91
|
return;
|
|
91
92
|
}
|
|
92
|
-
let i =
|
|
93
|
-
|
|
94
|
-
let a =
|
|
95
|
-
let a =
|
|
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:
|
|
102
|
+
scheduledAt: C ? n : null,
|
|
102
103
|
tags: i,
|
|
103
|
-
mediaUrls:
|
|
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
|
|
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
|
-
|
|
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(
|
|
120
|
+
children: [/* @__PURE__ */ u(ue, { className: "h-4 w-4" }), "Back"]
|
|
120
121
|
}),
|
|
121
|
-
children: [/* @__PURE__ */ u(
|
|
122
|
-
loading:
|
|
123
|
-
error:
|
|
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 =
|
|
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: () =>
|
|
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: () =>
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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:
|
|
203
|
-
onChange: (e) =>
|
|
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
|
-
|
|
217
|
+
N((e) => !e), k(!1), F(!1);
|
|
217
218
|
},
|
|
218
|
-
className: n(f,
|
|
219
|
+
className: n(f, M && "bg-bg-sunken"),
|
|
219
220
|
title: "Add emoji",
|
|
220
221
|
"aria-label": "Add emoji",
|
|
221
|
-
children: /* @__PURE__ */ u(
|
|
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(
|
|
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
|
-
|
|
243
|
+
k((e) => !e), N(!1), F(!1);
|
|
243
244
|
},
|
|
244
|
-
className: n(f,
|
|
245
|
+
className: n(f, O && "bg-bg-sunken"),
|
|
245
246
|
title: "Add link",
|
|
246
247
|
"aria-label": "Add link",
|
|
247
|
-
children: /* @__PURE__ */ u(
|
|
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
|
-
|
|
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",
|
|
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(
|
|
262
|
-
}),
|
|
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: () =>
|
|
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:
|
|
278
|
-
disabled:
|
|
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:
|
|
289
|
+
children: V.length
|
|
289
290
|
})
|
|
290
291
|
]
|
|
291
292
|
}),
|
|
292
293
|
/* @__PURE__ */ d("button", {
|
|
293
294
|
type: "button",
|
|
294
|
-
onClick:
|
|
295
|
-
disabled: !
|
|
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(
|
|
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",
|
|
314
|
-
style: { width: `${
|
|
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",
|
|
318
|
+
className: n("text-xs font-medium tabular-nums", y.length > q ? "text-status-error-text" : "text-text-secondary"),
|
|
318
319
|
children: [
|
|
319
|
-
|
|
320
|
+
y.length,
|
|
320
321
|
"/",
|
|
321
|
-
|
|
322
|
+
q
|
|
322
323
|
]
|
|
323
324
|
})]
|
|
324
325
|
})]
|
|
325
326
|
})]
|
|
326
327
|
}),
|
|
327
|
-
|
|
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:
|
|
332
|
-
onChange: (e) =>
|
|
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: !
|
|
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
|
-
|
|
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:
|
|
349
|
+
children: we.map((e) => /* @__PURE__ */ u("button", {
|
|
349
350
|
type: "button",
|
|
350
|
-
onClick: () =>
|
|
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:
|
|
363
|
-
onUploaded:
|
|
364
|
-
onRemove:
|
|
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(
|
|
376
|
+
children: [/* @__PURE__ */ u(pe, { className: "h-4 w-4" }), C ? "Schedule for later" : "Publish now"]
|
|
376
377
|
}), /* @__PURE__ */ u("button", {
|
|
377
|
-
onClick: () =>
|
|
378
|
+
onClick: () => w(!C),
|
|
378
379
|
role: "switch",
|
|
379
|
-
"aria-checked":
|
|
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",
|
|
382
|
-
children: /* @__PURE__ */ u("span", { className: n("inline-block h-4 w-4 transform rounded-full bg-bg-surface transition-transform",
|
|
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
|
-
}),
|
|
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) =>
|
|
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:
|
|
394
|
-
onChange: (e) =>
|
|
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(
|
|
415
|
+
children: [/* @__PURE__ */ u(he, { className: "h-4 w-4" }), _ ? "Saving..." : "Save Draft"]
|
|
415
416
|
}), /* @__PURE__ */ d("button", {
|
|
416
417
|
onClick: async () => {
|
|
417
|
-
await $(
|
|
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(
|
|
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
|
-
}),
|
|
433
|
+
}), V.length > 0 ? /* @__PURE__ */ u("div", {
|
|
433
434
|
className: "space-y-2",
|
|
434
|
-
children:
|
|
435
|
-
onClick: () =>
|
|
436
|
-
className: n("flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors",
|
|
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[
|
|
460
|
+
children: o[W]?.label
|
|
460
461
|
})]
|
|
461
462
|
}),
|
|
462
|
-
|
|
463
|
+
U.length > 1 && /* @__PURE__ */ u("div", {
|
|
463
464
|
className: "mb-4 flex flex-wrap gap-1.5",
|
|
464
|
-
children:
|
|
465
|
-
let t = o[e].icon, r = e ===
|
|
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: () =>
|
|
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:
|
|
478
|
-
content:
|
|
479
|
-
mediaUrls:
|
|
480
|
-
account:
|
|
478
|
+
platform: W,
|
|
479
|
+
content: y,
|
|
480
|
+
mediaUrls: x,
|
|
481
|
+
account: Fe
|
|
481
482
|
})
|
|
482
483
|
]
|
|
483
484
|
})]
|