@burdenoff/microfe-headshotmarketing 2026.704.4 → 2026.704.6
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/wspace-operations.js +215 -111
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.js +27 -19
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/Toast.js +56 -2
- package/dist/headshotmarketing/components/Toast.js.map +1 -0
- package/dist/headshotmarketing/pages/HomeFunnel.js +54 -0
- package/dist/headshotmarketing/pages/HomeFunnel.js.map +1 -0
- package/dist/headshotmarketing/pages/HomePage.js +423 -259
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/HomeStatCard.js +79 -0
- package/dist/headshotmarketing/pages/HomeStatCard.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/AdPlatformChips.js +93 -0
- package/dist/headshotmarketing/pages/ads/AdPlatformChips.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js +147 -0
- package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +461 -388
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js +405 -115
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +565 -345
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js +107 -0
- package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js.map +1 -0
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +213 -0
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -0
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +150 -0
- package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +380 -371
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js +92 -0
- package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/SectionContent.js +346 -0
- package/dist/headshotmarketing/pages/builder/SectionContent.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/SectionInspector.js +358 -0
- package/dist/headshotmarketing/pages/builder/SectionInspector.js.map +1 -0
- package/dist/headshotmarketing/pages/builder/builderCatalog.js +274 -0
- package/dist/headshotmarketing/pages/builder/builderCatalog.js.map +1 -0
- package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +123 -233
- package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/TemplateCard.js +81 -0
- package/dist/headshotmarketing/pages/campaigns/TemplateCard.js.map +1 -0
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +479 -193
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +492 -197
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetThumbnail.js +37 -0
- package/dist/headshotmarketing/pages/content/AssetThumbnail.js.map +1 -0
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +672 -219
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +200 -0
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -0
- package/dist/headshotmarketing/pages/content/ContentPage.js +224 -204
- package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentSubNav.js +51 -0
- package/dist/headshotmarketing/pages/content/ContentSubNav.js.map +1 -0
- package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js +107 -0
- package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js.map +1 -0
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +232 -0
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -0
- package/dist/headshotmarketing/pages/crm/LeadsPage.js +330 -177
- package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadsWidgets.js +179 -0
- package/dist/headshotmarketing/pages/crm/LeadsWidgets.js.map +1 -0
- package/dist/headshotmarketing/pages/events/CreateEventPage.js +631 -379
- package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventImageUpload.js +123 -0
- package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -0
- package/dist/headshotmarketing/pages/events/EventPagePreview.js +99 -0
- package/dist/headshotmarketing/pages/events/EventPagePreview.js.map +1 -0
- package/dist/headshotmarketing/pages/events/EventsPage.js +267 -228
- package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/seo/SeoScoreGauge.js +50 -0
- package/dist/headshotmarketing/pages/seo/SeoScoreGauge.js.map +1 -0
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +147 -0
- package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -0
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +562 -419
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +108 -0
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js +100 -0
- package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js.map +1 -0
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +315 -250
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/socialComposerMeta.js +60 -0
- package/dist/headshotmarketing/pages/social-media/socialComposerMeta.js.map +1 -0
- package/dist/headshotmarketing/utils/adsMapper.js +2 -2
- package/dist/headshotmarketing/utils/adsMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/automationMapper.js +1 -1
- package/dist/headshotmarketing/utils/automationMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/campaignMapper.js +1 -22
- package/dist/headshotmarketing/utils/campaignMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/contentMapper.js +4 -24
- package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/crmMapper.js +2 -2
- package/dist/headshotmarketing/utils/crmMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/eventsMapper.js +9 -9
- package/dist/headshotmarketing/utils/eventsMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/helpers.js +7 -4
- package/dist/headshotmarketing/utils/helpers.js.map +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
- package/dist/node_modules/lodash/_arrayEach.js +14 -0
- package/dist/node_modules/lodash/_arrayEach.js.map +1 -0
- package/dist/node_modules/lodash/_assignValue.js +17 -0
- package/dist/node_modules/lodash/_assignValue.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssign.js +16 -0
- package/dist/node_modules/lodash/_baseAssign.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
- package/dist/node_modules/lodash/_baseAssignIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseClone.js +64 -0
- package/dist/node_modules/lodash/_baseClone.js.map +1 -0
- package/dist/node_modules/lodash/_baseCreate.js +21 -0
- package/dist/node_modules/lodash/_baseCreate.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsMap.js +16 -0
- package/dist/node_modules/lodash/_baseIsMap.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsSet.js +16 -0
- package/dist/node_modules/lodash/_baseIsSet.js.map +1 -0
- package/dist/node_modules/lodash/_baseKeysIn.js +20 -0
- package/dist/node_modules/lodash/_baseKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseUnset.js +26 -0
- package/dist/node_modules/lodash/_baseUnset.js.map +1 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneBuffer.js +17 -0
- package/dist/node_modules/lodash/_cloneBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneDataView.js +16 -0
- package/dist/node_modules/lodash/_cloneDataView.js.map +1 -0
- package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
- package/dist/node_modules/lodash/_cloneRegExp.js.map +1 -0
- package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
- package/dist/node_modules/lodash/_cloneSymbol.js.map +1 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyArray.js +15 -0
- package/dist/node_modules/lodash/_copyArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyObject.js +22 -0
- package/dist/node_modules/lodash/_copyObject.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbols.js +16 -0
- package/dist/node_modules/lodash/_copySymbols.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_customOmitClone.js +15 -0
- package/dist/node_modules/lodash/_customOmitClone.js.map +1 -0
- package/dist/node_modules/lodash/_flatRest.js +17 -0
- package/dist/node_modules/lodash/_flatRest.js.map +1 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js +18 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneArray.js +15 -0
- package/dist/node_modules/lodash/_initCloneArray.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneByTag.js +40 -0
- package/dist/node_modules/lodash/_initCloneByTag.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneObject.js +17 -0
- package/dist/node_modules/lodash/_initCloneObject.js.map +1 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js +15 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_parent.js +16 -0
- package/dist/node_modules/lodash/_parent.js.map +1 -0
- package/dist/node_modules/lodash/flatten.js +15 -0
- package/dist/node_modules/lodash/flatten.js.map +1 -0
- package/dist/node_modules/lodash/isMap.js +14 -0
- package/dist/node_modules/lodash/isMap.js.map +1 -0
- package/dist/node_modules/lodash/isSet.js +14 -0
- package/dist/node_modules/lodash/isSet.js.map +1 -0
- package/dist/node_modules/lodash/keysIn.js +17 -0
- package/dist/node_modules/lodash/keysIn.js.map +1 -0
- package/dist/node_modules/lodash/omit.js +28 -0
- package/dist/node_modules/lodash/omit.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/FunnelChart.js +15 -0
- package/dist/node_modules/recharts/es6/chart/FunnelChart.js.map +1 -0
- package/dist/node_modules/recharts/es6/numberAxis/Funnel.js +370 -0
- package/dist/node_modules/recharts/es6/numberAxis/Funnel.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/FunnelUtils.js +81 -0
- package/dist/node_modules/recharts/es6/util/FunnelUtils.js.map +1 -0
- package/package.json +1 -1
|
@@ -4,17 +4,19 @@ import { cn as n } from "../../utils/helpers.js";
|
|
|
4
4
|
import { HeadshotmarketingSocialPostStatus as r } from "../../../generated/wspace-types.js";
|
|
5
5
|
import { PageLayout as i } from "../../components/PageLayout.js";
|
|
6
6
|
import { QueryStateBoundary as a } from "../../components/QueryStateBoundary.js";
|
|
7
|
-
import { AssetUploadButton as o } from "../../components/AssetUploadButton.js";
|
|
8
7
|
import "../../components/index.js";
|
|
9
|
-
import { useHeadshotmarketingBootstrap as
|
|
10
|
-
import { toHashtagSuggestions as
|
|
8
|
+
import { useHeadshotmarketingBootstrap as ee } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
9
|
+
import { toHashtagSuggestions as te, toSocialAccountModel as ne, toSocialPostModel as re } from "../../utils/socialMapper.js";
|
|
11
10
|
import "../../hooks/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
11
|
+
import { PLATFORM_BY_KEY as o, PLATFORM_META as ie } from "./socialComposerMeta.js";
|
|
12
|
+
import { SocialComposerPreview as ae } from "./SocialComposerPreview.js";
|
|
13
|
+
import { MediaDropZone as oe } from "./MediaDropZone.js";
|
|
14
|
+
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 u, Save as fe, Send as pe, SmilePlus as me, Sparkles as he, Wand2 as ge } from "lucide-react";
|
|
16
|
+
import { Fragment as _e, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
17
|
+
import { EmphasisPanel as p, PagePurpose as ve } from "@burdenoff/fe-libs/ui";
|
|
16
18
|
//#region src/headshotmarketing/pages/social-media/SocialMediaComposePage.tsx
|
|
17
|
-
var
|
|
19
|
+
var ye = [
|
|
18
20
|
"😀",
|
|
19
21
|
"😎",
|
|
20
22
|
"🔥",
|
|
@@ -31,361 +33,424 @@ var ce = [
|
|
|
31
33
|
"🏆",
|
|
32
34
|
"🌟",
|
|
33
35
|
"💬"
|
|
34
|
-
],
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
color: "bg-status-info-text"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
key: "twitter",
|
|
49
|
-
label: "Twitter",
|
|
50
|
-
maxChars: 280,
|
|
51
|
-
color: "bg-status-info-text"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
key: "linkedin",
|
|
55
|
-
label: "LinkedIn",
|
|
56
|
-
maxChars: 3e3,
|
|
57
|
-
color: "bg-status-info-text"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
key: "youtube",
|
|
61
|
-
label: "YouTube",
|
|
62
|
-
maxChars: 5e3,
|
|
63
|
-
color: "bg-status-error-text"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
key: "tiktok",
|
|
67
|
-
label: "TikTok",
|
|
68
|
-
maxChars: 2200,
|
|
69
|
-
color: "bg-bg-sunken"
|
|
70
|
-
}
|
|
71
|
-
], v = () => {
|
|
72
|
-
let { navigate: v, basePath: y } = t(), { data: b, loading: le, error: x, refetch: S } = s(), [C, { loading: w, error: ue }] = e(), [T, de] = d(new Set(["instagram"])), [E, D] = d(""), [O, k] = d([]), [A, j] = d(!1), [M, N] = d(""), [P, F] = d(""), [I, L] = d(null), [R, z] = d(!1), [B, V] = d(""), [H, U] = d(!1), W = u(() => (b?.headshotmarketingSocialAccounts.items ?? []).map((e) => l(e)), [b?.headshotmarketingSocialAccounts.items]), G = u(() => Object.fromEntries((b?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.accountName])), [b?.headshotmarketingSocialAccounts.items]), K = u(() => Object.fromEntries(W.map((e) => [e.id, e.platform])), [W]), q = u(() => (b?.headshotmarketingSocialPosts.items ?? []).map((e) => ee(e, G, K)), [
|
|
73
|
-
b?.headshotmarketingSocialPosts.items,
|
|
74
|
-
G,
|
|
75
|
-
K
|
|
76
|
-
]), fe = u(() => c(q), [q]), pe = (e) => {
|
|
77
|
-
de((t) => {
|
|
36
|
+
], m = "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", h = () => {
|
|
37
|
+
let { navigate: h, basePath: g } = t(), { data: _, loading: be, error: xe, refetch: v } = ee(), [Se, { loading: y, error: Ce }] = e(), [b, we] = c(new Set(["instagram"])), [x, S] = c(""), [C, w] = c([]), [T, Te] = c(!1), [E, D] = c(""), [O, Ee] = c(""), [De, k] = c(null), [A, j] = c(!1), [M, N] = c(""), [P, F] = c(!1), [I, L] = c(!1), [R, Oe] = c(null), z = s(() => (_?.headshotmarketingSocialAccounts.items ?? []).map((e) => ne(e)), [_?.headshotmarketingSocialAccounts.items]), B = s(() => Object.fromEntries((_?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.accountName])), [_?.headshotmarketingSocialAccounts.items]), V = s(() => Object.fromEntries(z.map((e) => [e.id, e.platform])), [z]), H = s(() => (_?.headshotmarketingSocialPosts.items ?? []).map((e) => re(e, B, V)), [
|
|
38
|
+
_?.headshotmarketingSocialPosts.items,
|
|
39
|
+
B,
|
|
40
|
+
V
|
|
41
|
+
]), U = s(() => te(H), [H]), ke = s(() => new Set(z.filter((e) => e.connected).map((e) => e.platform)), [z]), W = s(() => {
|
|
42
|
+
let e = /* @__PURE__ */ new Map();
|
|
43
|
+
for (let t of z) e.has(t.platform) || e.set(t.platform, t);
|
|
44
|
+
return e;
|
|
45
|
+
}, [z]), G = s(() => Array.from(b), [b]), K = R && b.has(R) ? R : G[0] ?? "instagram", Ae = W.get(K) ?? null, q = s(() => G.filter((e) => !W.has(e)), [G, W]), je = (e) => {
|
|
46
|
+
we((t) => {
|
|
78
47
|
let n = new Set(t);
|
|
79
48
|
return n.has(e) ? n.size > 1 && n.delete(e) : n.add(e), n;
|
|
80
49
|
});
|
|
81
|
-
}, J = Math.min(...
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
e.url &&
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
let e =
|
|
89
|
-
e && (
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
50
|
+
}, J = Math.min(...G.map((e) => o[e]?.maxChars ?? 280)), Y = Math.min(x.length / J * 100, 100), Me = (e) => {
|
|
51
|
+
x.includes(e) || S((t) => t ? `${t} ${e}` : e);
|
|
52
|
+
}, Ne = (e) => {
|
|
53
|
+
e.url && w((t) => t.includes(e.url) ? t : [...t, e.url]);
|
|
54
|
+
}, Pe = (e) => {
|
|
55
|
+
w((t) => t.filter((t) => t !== e));
|
|
56
|
+
}, X = () => {
|
|
57
|
+
let e = M.trim();
|
|
58
|
+
e && (S((t) => t ? `${t} ${e}` : e), N(""), j(!1));
|
|
59
|
+
}, Fe = (e) => {
|
|
60
|
+
S((t) => `${t}${e}`), F(!1);
|
|
61
|
+
}, Z = (e) => {
|
|
62
|
+
S((t) => `${t}${t.length > 0 && !t.endsWith(" ") ? " " : ""}${e}`);
|
|
63
|
+
}, Ie = () => {
|
|
64
|
+
let e = U.map((e) => e.tag).filter((e) => !x.includes(e)).slice(0, 5);
|
|
65
|
+
e.length > 0 && S((t) => t ? `${t.trimEnd()} ${e.join(" ")}` : e.join(" ")), L(!1);
|
|
66
|
+
}, Le = () => {
|
|
67
|
+
S((e) => e.split("\n").map((e) => e.replace(/[ \t]+$/g, "")).join("\n").replace(/\n{3,}/g, "\n\n").replace(/[ \t]{2,}/g, " ").trim()), L(!1);
|
|
68
|
+
}, Q = De ?? Ce?.message ?? null, Re = () => {
|
|
69
|
+
if (!T) return null;
|
|
70
|
+
let e = `${E}T${O}`, t = new Date(e);
|
|
71
|
+
return !E || !O || Number.isNaN(t.getTime()) ? null : t.toISOString();
|
|
72
|
+
}, ze = () => {
|
|
73
|
+
let e = x.match(/#\w+/g) ?? [];
|
|
98
74
|
return Array.from(new Set(e));
|
|
99
75
|
}, $ = async (e) => {
|
|
100
|
-
let t =
|
|
76
|
+
let t = x.trim();
|
|
101
77
|
if (!t) {
|
|
102
|
-
|
|
78
|
+
k("Post content is required.");
|
|
103
79
|
return;
|
|
104
80
|
}
|
|
105
|
-
let n =
|
|
106
|
-
if (
|
|
107
|
-
|
|
81
|
+
let n = Re();
|
|
82
|
+
if (T && !n) {
|
|
83
|
+
k("Provide a valid schedule date and time.");
|
|
108
84
|
return;
|
|
109
85
|
}
|
|
110
|
-
let r =
|
|
86
|
+
let r = G.filter((e) => !z.some((t) => t.platform === e));
|
|
111
87
|
if (r.length > 0) {
|
|
112
|
-
|
|
88
|
+
k(`Connect a social account for: ${r.map((e) => o[e]?.label ?? e).join(", ")}.`);
|
|
113
89
|
return;
|
|
114
90
|
}
|
|
115
|
-
let i =
|
|
116
|
-
|
|
117
|
-
let a =
|
|
118
|
-
let a =
|
|
91
|
+
let i = ze();
|
|
92
|
+
k(null);
|
|
93
|
+
let a = G.map((r) => {
|
|
94
|
+
let a = z.find((e) => e.platform === r)?.id;
|
|
119
95
|
if (!a) throw Error(`Missing social account for ${r}.`);
|
|
120
96
|
return {
|
|
121
97
|
socialAccountId: a,
|
|
122
98
|
content: t,
|
|
123
99
|
status: e,
|
|
124
|
-
scheduledAt:
|
|
100
|
+
scheduledAt: T ? n : null,
|
|
125
101
|
tags: i,
|
|
126
|
-
mediaUrls:
|
|
102
|
+
mediaUrls: C.length > 0 ? C : void 0
|
|
127
103
|
};
|
|
128
104
|
});
|
|
129
105
|
try {
|
|
130
|
-
for (let e = 0; e < a.length; e += 1) await
|
|
131
|
-
await
|
|
106
|
+
for (let e = 0; e < a.length; e += 1) await Se({ variables: { input: a[e] } });
|
|
107
|
+
await v(), h(g + "/social/posts");
|
|
132
108
|
} catch (e) {
|
|
133
|
-
|
|
109
|
+
k(e instanceof Error ? e.message : "Failed to create social post.");
|
|
134
110
|
}
|
|
135
111
|
};
|
|
136
|
-
return /* @__PURE__ */
|
|
112
|
+
return /* @__PURE__ */ f(i, {
|
|
137
113
|
title: "Compose Post",
|
|
138
114
|
description: "Create and schedule content for your social media platforms",
|
|
139
|
-
actions: /* @__PURE__ */
|
|
140
|
-
onClick: () =>
|
|
115
|
+
actions: /* @__PURE__ */ f("button", {
|
|
116
|
+
onClick: () => h(g + "/social"),
|
|
141
117
|
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",
|
|
142
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ d(ce, { className: "h-4 w-4" }), "Back"]
|
|
143
119
|
}),
|
|
144
|
-
children: [/* @__PURE__ */
|
|
145
|
-
loading:
|
|
146
|
-
error:
|
|
147
|
-
onRetry:
|
|
148
|
-
hasData: !!
|
|
149
|
-
children: /* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ d(ve, { 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__ */ d(a, {
|
|
121
|
+
loading: be,
|
|
122
|
+
error: xe,
|
|
123
|
+
onRetry: v,
|
|
124
|
+
hasData: !!_,
|
|
125
|
+
children: /* @__PURE__ */ f("div", {
|
|
150
126
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ f("div", {
|
|
152
128
|
className: "lg:col-span-2 space-y-6",
|
|
153
129
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ f("div", {
|
|
155
131
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
156
|
-
children: [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ d("h3", {
|
|
134
|
+
className: "text-sm font-semibold text-text-primary mb-3",
|
|
135
|
+
children: "Select Platforms"
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ d("div", {
|
|
138
|
+
className: "flex flex-wrap gap-2",
|
|
139
|
+
children: ie.map((e) => {
|
|
140
|
+
let t = e.icon, r = b.has(e.key), i = ke.has(e.key);
|
|
141
|
+
return /* @__PURE__ */ f("button", {
|
|
142
|
+
onClick: () => je(e.key),
|
|
143
|
+
"aria-pressed": r,
|
|
144
|
+
className: n("group inline-flex min-h-[40px] items-center gap-2 rounded-full border px-4 py-2 text-sm font-medium transition-colors", r ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-secondary hover:text-text-primary hover:border-foreground/50"),
|
|
145
|
+
children: [
|
|
146
|
+
/* @__PURE__ */ d(t, { className: "h-4 w-4" }),
|
|
147
|
+
e.label,
|
|
148
|
+
i && /* @__PURE__ */ d(ue, {
|
|
149
|
+
className: n("h-3.5 w-3.5", r ? "text-background" : "text-status-success-text"),
|
|
150
|
+
"aria-label": "Account connected"
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
}, e.key);
|
|
154
|
+
})
|
|
155
|
+
}),
|
|
156
|
+
q.length > 0 && /* @__PURE__ */ f("p", {
|
|
157
|
+
className: "mt-3 flex items-start gap-1.5 text-xs text-status-warning-text",
|
|
158
|
+
children: [/* @__PURE__ */ d(se, { className: "mt-0.5 h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ f("span", { children: [
|
|
159
|
+
"No connected account for",
|
|
160
|
+
" ",
|
|
161
|
+
q.map((e) => o[e]?.label ?? e).join(", "),
|
|
162
|
+
". Connect one before publishing."
|
|
163
|
+
] })]
|
|
164
|
+
})
|
|
165
|
+
]
|
|
167
166
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ f(p, {
|
|
169
168
|
className: "p-6",
|
|
170
169
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ d("h3", {
|
|
172
171
|
className: "text-sm font-semibold text-text-primary mb-3",
|
|
173
172
|
children: "Content"
|
|
174
173
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
value:
|
|
177
|
-
onChange: (e) =>
|
|
174
|
+
/* @__PURE__ */ d("textarea", {
|
|
175
|
+
value: x,
|
|
176
|
+
onChange: (e) => S(e.target.value),
|
|
178
177
|
placeholder: "What's on your mind? Write your post content here...",
|
|
179
178
|
rows: 6,
|
|
180
179
|
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"
|
|
181
180
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ f("div", {
|
|
183
182
|
className: "mt-2 flex flex-wrap items-center justify-between gap-3",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
185
|
-
className: "flex flex-wrap items-center gap-
|
|
183
|
+
children: [/* @__PURE__ */ f("div", {
|
|
184
|
+
className: "flex flex-wrap items-center gap-1.5",
|
|
186
185
|
children: [
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
accept: "image/*",
|
|
189
|
-
label: "Image",
|
|
190
|
-
variant: "outline",
|
|
191
|
-
folderPath: "/HeadshotMarketing/Social",
|
|
192
|
-
onUploaded: X
|
|
193
|
-
}),
|
|
194
|
-
/* @__PURE__ */ h(o, {
|
|
195
|
-
accept: "video/*",
|
|
196
|
-
label: "Video",
|
|
197
|
-
variant: "outline",
|
|
198
|
-
folderPath: "/HeadshotMarketing/Social",
|
|
199
|
-
onUploaded: X
|
|
200
|
-
}),
|
|
201
|
-
/* @__PURE__ */ g("button", {
|
|
186
|
+
/* @__PURE__ */ d("button", {
|
|
202
187
|
type: "button",
|
|
203
188
|
onClick: () => {
|
|
204
|
-
|
|
189
|
+
F((e) => !e), j(!1), L(!1);
|
|
205
190
|
},
|
|
206
|
-
className: n(
|
|
207
|
-
title: "Add
|
|
208
|
-
|
|
191
|
+
className: n(m, P && "bg-bg-sunken"),
|
|
192
|
+
title: "Add emoji",
|
|
193
|
+
"aria-label": "Add emoji",
|
|
194
|
+
children: /* @__PURE__ */ d(me, { className: "h-4 w-4" })
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ d("button", {
|
|
197
|
+
type: "button",
|
|
198
|
+
onClick: () => Z("#"),
|
|
199
|
+
className: m,
|
|
200
|
+
title: "Insert hashtag",
|
|
201
|
+
"aria-label": "Insert hashtag",
|
|
202
|
+
children: /* @__PURE__ */ d(l, { className: "h-4 w-4" })
|
|
209
203
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ d("button", {
|
|
205
|
+
type: "button",
|
|
206
|
+
onClick: () => Z("@"),
|
|
207
|
+
className: m,
|
|
208
|
+
title: "Insert mention",
|
|
209
|
+
"aria-label": "Insert mention",
|
|
210
|
+
children: /* @__PURE__ */ d(le, { className: "h-4 w-4" })
|
|
211
|
+
}),
|
|
212
|
+
/* @__PURE__ */ d("button", {
|
|
211
213
|
type: "button",
|
|
212
214
|
onClick: () => {
|
|
213
|
-
|
|
215
|
+
j((e) => !e), F(!1), L(!1);
|
|
214
216
|
},
|
|
215
|
-
className: n(
|
|
216
|
-
title: "Add
|
|
217
|
-
|
|
217
|
+
className: n(m, A && "bg-bg-sunken"),
|
|
218
|
+
title: "Add link",
|
|
219
|
+
"aria-label": "Add link",
|
|
220
|
+
children: /* @__PURE__ */ d(u, { className: "h-4 w-4" })
|
|
218
221
|
})
|
|
219
222
|
]
|
|
220
|
-
}), /* @__PURE__ */
|
|
221
|
-
className: "flex items-center gap-
|
|
222
|
-
children: [/* @__PURE__ */
|
|
223
|
-
className: "
|
|
224
|
-
children: /* @__PURE__ */
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
223
|
+
}), /* @__PURE__ */ f("div", {
|
|
224
|
+
className: "flex flex-wrap items-center gap-3",
|
|
225
|
+
children: [/* @__PURE__ */ f("div", {
|
|
226
|
+
className: "relative",
|
|
227
|
+
children: [/* @__PURE__ */ f("button", {
|
|
228
|
+
type: "button",
|
|
229
|
+
onClick: () => {
|
|
230
|
+
L((e) => !e), F(!1), j(!1);
|
|
231
|
+
},
|
|
232
|
+
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", I ? "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"),
|
|
233
|
+
title: "AI Assist",
|
|
234
|
+
children: [/* @__PURE__ */ d(he, { className: "h-4 w-4" }), "AI Assist"]
|
|
235
|
+
}), I && /* @__PURE__ */ f(_e, { children: [/* @__PURE__ */ d("button", {
|
|
236
|
+
type: "button",
|
|
237
|
+
"aria-hidden": !0,
|
|
238
|
+
tabIndex: -1,
|
|
239
|
+
onClick: () => L(!1),
|
|
240
|
+
className: "fixed inset-0 z-10 cursor-default"
|
|
241
|
+
}), /* @__PURE__ */ f("div", {
|
|
242
|
+
className: "absolute right-0 z-20 mt-2 w-64 rounded-lg border border-border-seam bg-bg-surface p-1.5 shadow-pop",
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ d("p", {
|
|
245
|
+
className: "px-2 py-1 text-xs font-semibold text-text-secondary",
|
|
246
|
+
children: "AI Assist"
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ f("button", {
|
|
249
|
+
type: "button",
|
|
250
|
+
onClick: Ie,
|
|
251
|
+
disabled: U.length === 0,
|
|
252
|
+
className: "flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
|
|
253
|
+
children: [
|
|
254
|
+
/* @__PURE__ */ d(l, { className: "h-4 w-4 text-action-primary-bg" }),
|
|
255
|
+
/* @__PURE__ */ d("span", {
|
|
256
|
+
className: "flex-1",
|
|
257
|
+
children: "Add trending hashtags"
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ d("span", {
|
|
260
|
+
className: "text-xs text-text-secondary",
|
|
261
|
+
children: U.length
|
|
262
|
+
})
|
|
263
|
+
]
|
|
264
|
+
}),
|
|
265
|
+
/* @__PURE__ */ f("button", {
|
|
266
|
+
type: "button",
|
|
267
|
+
onClick: Le,
|
|
268
|
+
disabled: !x.trim(),
|
|
269
|
+
className: "flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
|
|
270
|
+
children: [/* @__PURE__ */ d(ge, { className: "h-4 w-4 text-action-primary-bg" }), /* @__PURE__ */ d("span", {
|
|
271
|
+
className: "flex-1",
|
|
272
|
+
children: "Clean up formatting"
|
|
273
|
+
})]
|
|
274
|
+
}),
|
|
275
|
+
/* @__PURE__ */ d("p", {
|
|
276
|
+
className: "px-2 py-1.5 text-[11px] leading-snug text-text-secondary",
|
|
277
|
+
children: "Suggestions use your own top-performing hashtags — no data is invented."
|
|
278
|
+
})
|
|
279
|
+
]
|
|
280
|
+
})] })]
|
|
281
|
+
}), /* @__PURE__ */ f("div", {
|
|
282
|
+
className: "flex items-center gap-2",
|
|
283
|
+
children: [/* @__PURE__ */ d("div", {
|
|
284
|
+
className: "h-2 w-24 rounded-full bg-bg-sunken overflow-hidden",
|
|
285
|
+
children: /* @__PURE__ */ d("div", {
|
|
286
|
+
className: n("h-full rounded-full transition-all", Y > 90 ? "bg-status-error-text" : Y > 70 ? "bg-status-warning-text" : "bg-status-success-text"),
|
|
287
|
+
style: { width: `${Y}%` }
|
|
288
|
+
})
|
|
289
|
+
}), /* @__PURE__ */ f("span", {
|
|
290
|
+
className: n("text-xs font-medium tabular-nums", x.length > J ? "text-status-error-text" : "text-text-secondary"),
|
|
291
|
+
children: [
|
|
292
|
+
x.length,
|
|
293
|
+
"/",
|
|
294
|
+
J
|
|
295
|
+
]
|
|
296
|
+
})]
|
|
235
297
|
})]
|
|
236
298
|
})]
|
|
237
299
|
}),
|
|
238
|
-
|
|
300
|
+
A && /* @__PURE__ */ f("div", {
|
|
239
301
|
className: "mt-3 flex flex-wrap items-center gap-2",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ d("input", {
|
|
241
303
|
type: "url",
|
|
242
|
-
value:
|
|
243
|
-
onChange: (e) =>
|
|
304
|
+
value: M,
|
|
305
|
+
onChange: (e) => N(e.target.value),
|
|
244
306
|
onKeyDown: (e) => {
|
|
245
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
307
|
+
e.key === "Enter" && (e.preventDefault(), X());
|
|
246
308
|
},
|
|
247
309
|
placeholder: "https://example.com/your-link",
|
|
248
310
|
className: "min-w-[12rem] flex-1 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)]"
|
|
249
|
-
}), /* @__PURE__ */
|
|
311
|
+
}), /* @__PURE__ */ d("button", {
|
|
250
312
|
type: "button",
|
|
251
|
-
onClick:
|
|
252
|
-
disabled: !
|
|
313
|
+
onClick: X,
|
|
314
|
+
disabled: !M.trim(),
|
|
253
315
|
className: "rounded-md bg-foreground px-3 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
|
|
254
316
|
children: "Insert"
|
|
255
317
|
})]
|
|
256
318
|
}),
|
|
257
|
-
|
|
319
|
+
P && /* @__PURE__ */ d("div", {
|
|
258
320
|
className: "mt-3 flex flex-wrap gap-1 rounded-md border border-border-subtle bg-bg-surface p-2",
|
|
259
|
-
children:
|
|
321
|
+
children: ye.map((e) => /* @__PURE__ */ d("button", {
|
|
260
322
|
type: "button",
|
|
261
|
-
onClick: () =>
|
|
323
|
+
onClick: () => Fe(e),
|
|
262
324
|
className: "rounded-md px-2 py-1 text-lg hover:bg-bg-sunken",
|
|
263
325
|
"aria-label": `Insert ${e}`,
|
|
264
326
|
children: e
|
|
265
327
|
}, e))
|
|
266
328
|
}),
|
|
267
|
-
|
|
268
|
-
className: "mt-
|
|
269
|
-
children: [/* @__PURE__ */
|
|
270
|
-
className: "text-
|
|
271
|
-
children:
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}), /* @__PURE__ */ h("div", {
|
|
277
|
-
className: "flex flex-wrap gap-2",
|
|
278
|
-
children: O.map((e) => /* @__PURE__ */ g("span", {
|
|
279
|
-
className: "inline-flex max-w-[16rem] items-center gap-1.5 rounded-full border border-border-subtle bg-bg-surface px-3 py-1 text-xs text-text-primary",
|
|
280
|
-
children: [/* @__PURE__ */ h("span", {
|
|
281
|
-
className: "truncate",
|
|
282
|
-
children: e.split("/").pop()?.split("?")[0] || e
|
|
283
|
-
}), /* @__PURE__ */ h("button", {
|
|
284
|
-
type: "button",
|
|
285
|
-
onClick: () => he(e),
|
|
286
|
-
className: "text-text-secondary hover:text-status-error-text",
|
|
287
|
-
"aria-label": "Remove media",
|
|
288
|
-
children: /* @__PURE__ */ h(m, { className: "h-3 w-3" })
|
|
289
|
-
})]
|
|
290
|
-
}, e))
|
|
329
|
+
/* @__PURE__ */ f("div", {
|
|
330
|
+
className: "mt-4",
|
|
331
|
+
children: [/* @__PURE__ */ d("p", {
|
|
332
|
+
className: "mb-2 text-sm font-semibold text-text-primary",
|
|
333
|
+
children: "Media"
|
|
334
|
+
}), /* @__PURE__ */ d(oe, {
|
|
335
|
+
mediaUrls: C,
|
|
336
|
+
onUploaded: Ne,
|
|
337
|
+
onRemove: Pe
|
|
291
338
|
})]
|
|
292
339
|
})
|
|
293
340
|
]
|
|
294
341
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ f("div", {
|
|
296
343
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
344
|
+
children: [/* @__PURE__ */ f("div", {
|
|
298
345
|
className: "flex items-center justify-between mb-3",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
300
347
|
className: "text-sm font-semibold text-text-primary flex items-center gap-2",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
302
|
-
}), /* @__PURE__ */
|
|
303
|
-
onClick: () =>
|
|
304
|
-
|
|
305
|
-
|
|
348
|
+
children: [/* @__PURE__ */ d(de, { className: "h-4 w-4" }), T ? "Schedule for later" : "Publish now"]
|
|
349
|
+
}), /* @__PURE__ */ d("button", {
|
|
350
|
+
onClick: () => Te(!T),
|
|
351
|
+
role: "switch",
|
|
352
|
+
"aria-checked": T,
|
|
353
|
+
"aria-label": "Toggle scheduling",
|
|
354
|
+
className: n("relative inline-flex h-6 w-11 items-center rounded-full transition-colors", T ? "bg-foreground" : "bg-bg-sunken"),
|
|
355
|
+
children: /* @__PURE__ */ d("span", { className: n("inline-block h-4 w-4 transform rounded-full bg-bg-surface transition-transform", T ? "translate-x-6" : "translate-x-1") })
|
|
306
356
|
})]
|
|
307
|
-
}),
|
|
308
|
-
className: "flex items-center gap-3",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
357
|
+
}), T ? /* @__PURE__ */ f("div", {
|
|
358
|
+
className: "flex flex-wrap items-center gap-3",
|
|
359
|
+
children: [/* @__PURE__ */ d("input", {
|
|
310
360
|
type: "date",
|
|
311
|
-
value:
|
|
312
|
-
onChange: (e) =>
|
|
361
|
+
value: E,
|
|
362
|
+
onChange: (e) => D(e.target.value),
|
|
313
363
|
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)]"
|
|
314
|
-
}), /* @__PURE__ */
|
|
364
|
+
}), /* @__PURE__ */ d("input", {
|
|
315
365
|
type: "time",
|
|
316
|
-
value:
|
|
317
|
-
onChange: (e) =>
|
|
366
|
+
value: O,
|
|
367
|
+
onChange: (e) => Ee(e.target.value),
|
|
318
368
|
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)]"
|
|
319
369
|
})]
|
|
370
|
+
}) : /* @__PURE__ */ d("p", {
|
|
371
|
+
className: "text-xs text-text-secondary",
|
|
372
|
+
children: "Your post goes live as soon as you publish. Toggle on to pick a date and time."
|
|
320
373
|
})]
|
|
321
374
|
}),
|
|
322
|
-
Q && /* @__PURE__ */
|
|
375
|
+
Q && /* @__PURE__ */ d("div", {
|
|
323
376
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
324
377
|
children: Q
|
|
325
378
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
className: "flex items-center justify-end gap-3",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ f("div", {
|
|
380
|
+
className: "flex flex-wrap items-center justify-end gap-3",
|
|
381
|
+
children: [/* @__PURE__ */ f("button", {
|
|
329
382
|
onClick: async () => {
|
|
330
383
|
await $(r.Draft);
|
|
331
384
|
},
|
|
332
|
-
disabled:
|
|
333
|
-
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 disabled:opacity-60",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
335
|
-
}), /* @__PURE__ */
|
|
385
|
+
disabled: y,
|
|
386
|
+
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",
|
|
387
|
+
children: [/* @__PURE__ */ d(fe, { className: "h-4 w-4" }), y ? "Saving..." : "Save Draft"]
|
|
388
|
+
}), /* @__PURE__ */ f("button", {
|
|
336
389
|
onClick: async () => {
|
|
337
|
-
await $(
|
|
390
|
+
await $(T ? r.Scheduled : r.Published);
|
|
338
391
|
},
|
|
339
|
-
disabled:
|
|
340
|
-
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",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
392
|
+
disabled: y,
|
|
393
|
+
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",
|
|
394
|
+
children: [/* @__PURE__ */ d(pe, { className: "h-4 w-4" }), y ? "Submitting..." : T ? "Schedule Post" : "Publish Now"]
|
|
342
395
|
})]
|
|
343
396
|
})
|
|
344
397
|
]
|
|
345
|
-
}), /* @__PURE__ */
|
|
398
|
+
}), /* @__PURE__ */ f("div", {
|
|
346
399
|
className: "space-y-6",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ f("div", {
|
|
348
401
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
350
403
|
className: "text-sm font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
351
|
-
children: [/* @__PURE__ */
|
|
352
|
-
}), /* @__PURE__ */
|
|
404
|
+
children: [/* @__PURE__ */ d(l, { className: "h-4 w-4" }), "Suggested Hashtags"]
|
|
405
|
+
}), U.length > 0 ? /* @__PURE__ */ d("div", {
|
|
353
406
|
className: "space-y-2",
|
|
354
|
-
children:
|
|
355
|
-
onClick: () =>
|
|
356
|
-
className: n("flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors",
|
|
357
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: U.map((e) => /* @__PURE__ */ f("button", {
|
|
408
|
+
onClick: () => Me(e.tag),
|
|
409
|
+
className: n("flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors", x.includes(e.tag) ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
|
|
410
|
+
children: [/* @__PURE__ */ d("span", {
|
|
411
|
+
className: "font-medium",
|
|
412
|
+
children: e.tag
|
|
413
|
+
}), /* @__PURE__ */ f("span", {
|
|
358
414
|
className: "text-xs",
|
|
359
415
|
children: [e.posts, " posts"]
|
|
360
416
|
})]
|
|
361
417
|
}, e.tag))
|
|
418
|
+
}) : /* @__PURE__ */ d("p", {
|
|
419
|
+
className: "text-sm text-text-secondary",
|
|
420
|
+
children: "Hashtags from your published posts will appear here as suggestions."
|
|
362
421
|
})]
|
|
363
|
-
}), /* @__PURE__ */
|
|
364
|
-
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
422
|
+
}), /* @__PURE__ */ f("div", {
|
|
423
|
+
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6 lg:sticky lg:top-6",
|
|
365
424
|
children: [
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
-
className: "
|
|
368
|
-
children: "
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}) : /* @__PURE__ */ h("p", {
|
|
376
|
-
className: "text-sm text-text-secondary italic",
|
|
377
|
-
children: "Your post preview will appear here..."
|
|
378
|
-
})
|
|
425
|
+
/* @__PURE__ */ f("div", {
|
|
426
|
+
className: "mb-4 flex items-center justify-between gap-2",
|
|
427
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
428
|
+
className: "text-sm font-semibold text-text-primary",
|
|
429
|
+
children: "Live Preview"
|
|
430
|
+
}), /* @__PURE__ */ d("span", {
|
|
431
|
+
className: "text-xs text-text-secondary",
|
|
432
|
+
children: o[K]?.label
|
|
433
|
+
})]
|
|
379
434
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
className: "
|
|
382
|
-
children:
|
|
383
|
-
let t =
|
|
384
|
-
return /* @__PURE__ */
|
|
385
|
-
|
|
386
|
-
|
|
435
|
+
G.length > 1 && /* @__PURE__ */ d("div", {
|
|
436
|
+
className: "mb-4 flex flex-wrap gap-1.5",
|
|
437
|
+
children: G.map((e) => {
|
|
438
|
+
let t = o[e].icon, r = e === K;
|
|
439
|
+
return /* @__PURE__ */ d("button", {
|
|
440
|
+
type: "button",
|
|
441
|
+
onClick: () => Oe(e),
|
|
442
|
+
"aria-pressed": r,
|
|
443
|
+
title: o[e].label,
|
|
444
|
+
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"),
|
|
445
|
+
children: /* @__PURE__ */ d(t, { className: "h-4 w-4" })
|
|
387
446
|
}, e);
|
|
388
447
|
})
|
|
448
|
+
}),
|
|
449
|
+
/* @__PURE__ */ d(ae, {
|
|
450
|
+
platform: K,
|
|
451
|
+
content: x,
|
|
452
|
+
mediaUrls: C,
|
|
453
|
+
account: Ae
|
|
389
454
|
})
|
|
390
455
|
]
|
|
391
456
|
})]
|
|
@@ -395,6 +460,6 @@ var ce = [
|
|
|
395
460
|
});
|
|
396
461
|
};
|
|
397
462
|
//#endregion
|
|
398
|
-
export {
|
|
463
|
+
export { h as SocialMediaComposePage };
|
|
399
464
|
|
|
400
465
|
//# sourceMappingURL=SocialMediaComposePage.js.map
|