@burdenoff/microfe-headshotmarketing 2026.1201.1 → 2026.1202.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/headshotmarketing/components/ActionMenu.js +1 -1
- package/dist/headshotmarketing/components/ActionMenu.js.map +1 -1
- package/dist/headshotmarketing/components/AssetUploadButton.js +35 -23
- package/dist/headshotmarketing/components/AssetUploadButton.js.map +1 -1
- package/dist/headshotmarketing/components/DataTable.js +33 -33
- package/dist/headshotmarketing/components/DataTable.js.map +1 -1
- package/dist/headshotmarketing/components/EmptyState.d.ts +15 -0
- package/dist/headshotmarketing/components/EmptyState.js +35 -15
- package/dist/headshotmarketing/components/EmptyState.js.map +1 -1
- package/dist/headshotmarketing/components/FilterBar.js +2 -2
- package/dist/headshotmarketing/components/FilterBar.js.map +1 -1
- package/dist/headshotmarketing/components/InfluencerModals.js +96 -95
- package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
- package/dist/headshotmarketing/components/Pagination.js +38 -37
- package/dist/headshotmarketing/components/Pagination.js.map +1 -1
- package/dist/headshotmarketing/components/TagChipsInput.js +1 -1
- package/dist/headshotmarketing/components/TagChipsInput.js.map +1 -1
- package/dist/headshotmarketing/components/Toast.js +1 -1
- package/dist/headshotmarketing/components/Toast.js.map +1 -1
- package/dist/headshotmarketing/components/UploadAudienceSelect.d.ts +7 -0
- package/dist/headshotmarketing/components/UploadAudienceSelect.js +40 -0
- package/dist/headshotmarketing/components/UploadAudienceSelect.js.map +1 -0
- package/dist/headshotmarketing/hooks/useAssetUpload.d.ts +2 -19
- package/dist/headshotmarketing/hooks/useAssetUpload.js +38 -32
- package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
- package/dist/headshotmarketing/pages/HomeMonthlyGoals.js.map +1 -1
- package/dist/headshotmarketing/pages/HomePage.js +10 -10
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +203 -203
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +148 -148
- package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js +74 -73
- package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +427 -412
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js +111 -110
- package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js +1 -1
- package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdsPage.js +6 -6
- package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js +49 -49
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +112 -112
- package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js +57 -57
- package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js.map +1 -1
- package/dist/headshotmarketing/pages/ai/AiOperationsPage.js +175 -174
- package/dist/headshotmarketing/pages/ai/AiOperationsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +1 -1
- package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AttributionPage.js +129 -129
- package/dist/headshotmarketing/pages/analytics/AttributionPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +9 -9
- package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js +95 -94
- package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js +4 -4
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +42 -41
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js +132 -131
- package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/AutomationPage.js +8 -8
- package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/TriggersPage.js +48 -48
- package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +4 -3
- package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +143 -142
- package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +79 -78
- package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +92 -92
- package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +143 -143
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js +3 -3
- package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/SectionInspector.js +24 -23
- package/dist/headshotmarketing/pages/builder/SectionInspector.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +198 -193
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +41 -41
- package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +234 -229
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +199 -187
- package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js +46 -46
- package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AIExecutionLedger.js +29 -29
- package/dist/headshotmarketing/pages/content/AIExecutionLedger.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +3 -3
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +230 -220
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +431 -420
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +7 -7
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +2 -2
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentPage.js +88 -88
- package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/ContactsPage.js +111 -111
- package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CreateContactPage.js +59 -59
- package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CreateDealPage.js +86 -86
- package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CrmActions.js +93 -92
- package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CrmPage.js +4 -4
- package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +63 -62
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadsPage.js +68 -68
- package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/PipelinePage.js +2 -2
- package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/CreateEventPage.js +165 -165
- package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js +255 -250
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventImageUpload.js +8 -2
- package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventPagePreview.js +2 -2
- package/dist/headshotmarketing/pages/events/EventPagePreview.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventsPage.js +70 -70
- package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js +7 -7
- package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +98 -98
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +145 -140
- 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 +286 -286
- package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/AccountsPage.js +171 -166
- package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js +1 -1
- package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js +1 -1
- package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +3 -3
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/PostsPage.js +257 -252
- package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js +2 -2
- package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +4 -4
- package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +115 -115
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
- package/package.json +6 -4
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { sanitizeContentHtml as e } from "../../utils/sanitizeContentHtml.js";
|
|
2
2
|
import { useHeadshotmarketingContentItemDetailQuery as t, useHeadshotmarketingCreateContentItemMutation as n, useRunHeadshotmarketingEditorAiToolMutation as ee, useUpdateHeadshotmarketingContentItemMutation as te } from "../../../generated/wspace-operations.js";
|
|
3
|
-
import { HeadshotmarketingAiToolCategory as r, HeadshotmarketingContentItemStatus as
|
|
3
|
+
import { HeadshotmarketingAiToolCategory as r, HeadshotmarketingContentItemStatus as i } from "../../../generated/wspace-types.js";
|
|
4
4
|
import "../../components/index.js";
|
|
5
|
-
import { PageLayout as
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { QueryStateBoundary as
|
|
8
|
-
import { TagChipsInput as
|
|
9
|
-
import { cn as
|
|
10
|
-
import { useHeadshotMarketing as
|
|
11
|
-
import { useHeadshotmarketingBootstrap as
|
|
12
|
-
import { useAssetUpload as
|
|
13
|
-
import { toResultStrings as
|
|
14
|
-
import { CONTENT_STATUS_OPTIONS as
|
|
15
|
-
import { useEffect as
|
|
16
|
-
import { ArrowLeft as
|
|
17
|
-
import { useParams as
|
|
18
|
-
import { gql as
|
|
19
|
-
import { useMutation as
|
|
20
|
-
import { Fragment as
|
|
21
|
-
import { EmphasisPanel as
|
|
5
|
+
import { PageLayout as ne } from "../../components/PageLayout.js";
|
|
6
|
+
import { EmptyState as re } from "../../components/EmptyState.js";
|
|
7
|
+
import { QueryStateBoundary as ie } from "../../components/QueryStateBoundary.js";
|
|
8
|
+
import { TagChipsInput as ae } from "../../components/TagChipsInput.js";
|
|
9
|
+
import { cn as a } from "../../utils/helpers.js";
|
|
10
|
+
import { useHeadshotMarketing as oe } from "../../context/HeadshotMarketingContext.js";
|
|
11
|
+
import { useHeadshotmarketingBootstrap as se } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
12
|
+
import { useAssetUpload as ce } from "../../hooks/useAssetUpload.js";
|
|
13
|
+
import { toResultStrings as le } from "../../utils/aiToolOutput.js";
|
|
14
|
+
import { CONTENT_STATUS_OPTIONS as ue, EDITOR_TYPE_TO_CONTENT_TYPE as de, buildContentUpdateInput as fe, buildEditorAIPrompt as pe, contentTypeLabel as me, editorTypeForContentType as he, mergeGeneratedCopy as ge, toContentEditorDraft as _e, withAIAssistExecution as ve } from "../../utils/contentLibrary.js";
|
|
15
|
+
import { useEffect as ye, useLayoutEffect as be, useMemo as o, useRef as xe, useState as s } from "react";
|
|
16
|
+
import { ArrowLeft as Se, ArrowUpRight as Ce, Bold as we, CalendarClock as Te, Check as c, Code2 as Ee, Edit3 as l, Eye as De, FileText as Oe, Globe as u, Heading1 as ke, Heading2 as Ae, Image as je, Italic as Me, Link2 as Ne, List as Pe, ListOrdered as Fe, ListPlus as Ie, Loader2 as d, Mail as f, Megaphone as p, Quote as Le, Replace as Re, Save as ze, Search as Be, Send as Ve, Settings2 as He, Share2 as m, Sparkles as Ue, Underline as We, Wand2 as Ge } from "lucide-react";
|
|
17
|
+
import { useParams as Ke } from "react-router";
|
|
18
|
+
import { gql as h } from "@apollo/client";
|
|
19
|
+
import { useMutation as qe } from "@apollo/client/react";
|
|
20
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
21
|
+
import { EmphasisPanel as Je, PagePurpose as Ye, ThemedSelect as Xe, usePrompt as Ze } from "@burdenoff/fe-libs/ui";
|
|
22
22
|
// src/headshotmarketing/pages/content/ContentCreationPage.tsx
|
|
23
23
|
var Qe = [
|
|
24
24
|
{
|
|
25
25
|
id: "blog",
|
|
26
26
|
label: "Blog Post",
|
|
27
|
-
icon:
|
|
27
|
+
icon: Oe,
|
|
28
28
|
description: "Long-form articles and guides",
|
|
29
29
|
color: "text-status-info-text bg-status-info-bg"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
id: "social",
|
|
33
33
|
label: "Social Post",
|
|
34
|
-
icon:
|
|
34
|
+
icon: m,
|
|
35
35
|
description: "Posts for social platforms",
|
|
36
36
|
color: "text-status-success-text bg-status-success-bg"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
id: "email",
|
|
40
40
|
label: "Email",
|
|
41
|
-
icon:
|
|
41
|
+
icon: f,
|
|
42
42
|
description: "Email campaigns and newsletters",
|
|
43
43
|
color: "text-action-primary-bg bg-[var(--color-accent-soft)]"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
id: "landing",
|
|
47
47
|
label: "Landing Page",
|
|
48
|
-
icon:
|
|
48
|
+
icon: u,
|
|
49
49
|
description: "Conversion-focused pages",
|
|
50
50
|
color: "text-status-warning-text bg-status-warning-bg"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
id: "ad",
|
|
54
54
|
label: "Ad Copy",
|
|
55
|
-
icon:
|
|
55
|
+
icon: p,
|
|
56
56
|
description: "Advertising copy for campaigns",
|
|
57
57
|
color: "text-status-error-text bg-status-error-bg"
|
|
58
58
|
}
|
|
@@ -93,7 +93,7 @@ var Qe = [
|
|
|
93
93
|
category: "ad",
|
|
94
94
|
description: "Google Ads copy template"
|
|
95
95
|
}
|
|
96
|
-
], et =
|
|
96
|
+
], et = h`
|
|
97
97
|
mutation HeadshotmarketingPublishContentItem(
|
|
98
98
|
$id: ID!
|
|
99
99
|
$input: HeadshotmarketingUpdateContentItemInput!
|
|
@@ -160,248 +160,259 @@ function at(e) {
|
|
|
160
160
|
}
|
|
161
161
|
];
|
|
162
162
|
}
|
|
163
|
-
var
|
|
163
|
+
var ot = "inline-flex h-9 min-w-9 items-center justify-center gap-1 rounded-md px-2 text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60", y = "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", st = "prose prose-sm max-w-none text-text-primary [&_h1]:text-xl [&_h1]:font-bold [&_h2]:text-lg [&_h2]:font-semibold [&_a]:text-primary [&_a]:underline [&_img]:max-w-full [&_img]:h-auto [&_ul]:list-disc [&_ul]:ps-5 [&_ol]:list-decimal [&_ol]:ps-5 [&_blockquote]:border-s-2 [&_blockquote]:border-border-strong [&_blockquote]:ps-3 [&_blockquote]:text-text-secondary [&_pre]:rounded-md [&_pre]:bg-bg-sunken [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-xs [&_pre]:whitespace-pre-wrap", b = ({ onClick: e, label: t, disabled: n, children: ee }) => /* @__PURE__ */ _("button", {
|
|
164
164
|
type: "button",
|
|
165
165
|
onMouseDown: (e) => e.preventDefault(),
|
|
166
166
|
onClick: e,
|
|
167
167
|
disabled: n,
|
|
168
168
|
"aria-label": t,
|
|
169
169
|
title: t,
|
|
170
|
-
className:
|
|
170
|
+
className: ot,
|
|
171
171
|
children: ee
|
|
172
|
-
}),
|
|
172
|
+
}), x = () => /* @__PURE__ */ _("span", {
|
|
173
173
|
className: "mx-0.5 h-5 w-px bg-border-subtle",
|
|
174
174
|
"aria-hidden": "true"
|
|
175
|
-
}),
|
|
176
|
-
let { navigate:
|
|
177
|
-
variables: { id:
|
|
178
|
-
skip: !
|
|
175
|
+
}), S = () => {
|
|
176
|
+
let r = Ze(), { navigate: u, basePath: f } = oe(), { contentId: p } = Ke(), m = !!p, { data: h, refetch: ot } = se(), S = t({
|
|
177
|
+
variables: { id: p ?? "" },
|
|
178
|
+
skip: !m,
|
|
179
179
|
fetchPolicy: "network-only"
|
|
180
|
-
}), [
|
|
181
|
-
|
|
182
|
-
if (!
|
|
183
|
-
let t =
|
|
184
|
-
|
|
180
|
+
}), [ct, { loading: lt, error: ut }] = n(), [dt, { loading: ft, error: pt }] = te(), [mt, { loading: ht }] = ee(), [gt, { loading: _t, error: vt }] = qe(et), { uploadFile: yt, uploading: bt, error: xt } = ce("/HeadshotMarketing/Content"), C = xe(null), St = xe(null), [w, Ct] = s(null), [wt, Tt] = s(null), [T, Et] = s(""), [E, Dt] = s(""), [D, Ot] = s([]), [O, k] = s(""), [kt, At] = s(""), [jt, Mt] = s(!1), [A, Nt] = s(""), [j, Pt] = s(""), [M, Ft] = s(""), [N, It] = s(""), [P, Lt] = s("settings"), [F, Rt] = s("edit"), [zt, I] = s(null), [L, Bt] = s(!1), [Vt, Ht] = s(null), [Ut, Wt] = s({}), [Gt, Kt] = s(""), [R, qt] = s(""), [Jt, Yt] = s(!0), [Xt, z] = s([]), [Zt, B] = s(null), [Qt, $t] = s(null), [en, tn] = s(null), [V, nn] = s(null), H = S.data?.headshotmarketingContentItem ?? null;
|
|
181
|
+
ye(() => {
|
|
182
|
+
if (!m || L || !H) return;
|
|
183
|
+
let t = _e(H);
|
|
184
|
+
Ct(t.type), Tt(t.templateId), Et(t.title), Dt(t.summary), Ot(t.tags), k(e(t.body)), At(t.slug), Mt(!0), Nt(t.campaignId), Pt(t.scheduledAt), Ft(t.metaTitle), It(t.metaDescription), Ht(t.status), Wt(t.metadata), Bt(!0);
|
|
185
185
|
}, [
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
m,
|
|
187
|
+
L,
|
|
188
|
+
H
|
|
189
189
|
]);
|
|
190
|
-
let
|
|
191
|
-
if (!
|
|
192
|
-
let e = new Date(
|
|
190
|
+
let rn = o(() => h?.headshotmarketingCampaigns.items ?? [], [h]), U = o(() => (h?.headshotmarketingAITools.items ?? []).filter((e) => e.isEnabled && tt.has(e.category)), [h]), W = he(w), an = Qe.find((e) => e.id === W), G = an?.label ?? me(w), on = W ? $e.filter((e) => e.category === W) : $e, K = jt ? kt : rt(T), q = o(() => {
|
|
191
|
+
if (!j) return null;
|
|
192
|
+
let e = new Date(j);
|
|
193
193
|
return Number.isNaN(e.getTime()) ? null : e.toISOString();
|
|
194
|
-
}, [
|
|
195
|
-
title:
|
|
196
|
-
metaTitle:
|
|
197
|
-
metaDescription:
|
|
198
|
-
slug:
|
|
199
|
-
bodyChars:
|
|
200
|
-
tagCount:
|
|
194
|
+
}, [j]), J = q ? new Date(q).getTime() > Date.now() : !1, Y = o(() => it(O), [O]), sn = o(() => at({
|
|
195
|
+
title: T,
|
|
196
|
+
metaTitle: M,
|
|
197
|
+
metaDescription: N,
|
|
198
|
+
slug: K,
|
|
199
|
+
bodyChars: Y,
|
|
200
|
+
tagCount: D.length
|
|
201
201
|
}), [
|
|
202
|
-
|
|
203
|
-
j,
|
|
202
|
+
T,
|
|
204
203
|
M,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
204
|
+
N,
|
|
205
|
+
K,
|
|
206
|
+
Y,
|
|
207
|
+
D.length
|
|
208
|
+
]), X = sn.reduce((e, t) => t.passed ? e + t.weight : e, 0), Z = X >= 80 ? "success" : X >= 50 ? "warning" : "error", cn = () => {
|
|
209
|
+
C.current && k(C.current.innerHTML);
|
|
210
|
+
}, ln = xe(O);
|
|
211
|
+
ln.current = O, be(() => {
|
|
212
|
+
let e = C.current;
|
|
213
|
+
e && e.innerHTML !== ln.current && (e.innerHTML = ln.current);
|
|
214
214
|
}, [
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
F,
|
|
216
|
+
w,
|
|
217
|
+
L
|
|
218
218
|
]);
|
|
219
|
-
let
|
|
220
|
-
|
|
221
|
-
},
|
|
222
|
-
let n =
|
|
223
|
-
n && (n.focus(), document.execCommand(e, !1, t),
|
|
224
|
-
},
|
|
225
|
-
let e = window.
|
|
226
|
-
|
|
227
|
-
|
|
219
|
+
let un = (e) => {
|
|
220
|
+
k(e), C.current && (C.current.innerHTML = e);
|
|
221
|
+
}, Q = (e, t) => {
|
|
222
|
+
let n = C.current;
|
|
223
|
+
n && (n.focus(), document.execCommand(e, !1, t), cn());
|
|
224
|
+
}, dn = async () => {
|
|
225
|
+
let e = window.getSelection(), t = e && e.rangeCount > 0 ? e.getRangeAt(0).cloneRange() : null, n = await r({
|
|
226
|
+
title: "Link URL",
|
|
227
|
+
defaultValue: "https://",
|
|
228
|
+
inputType: "url",
|
|
229
|
+
submitLabel: "Add link"
|
|
230
|
+
});
|
|
231
|
+
if (n) {
|
|
232
|
+
if (C.current?.focus(), t) {
|
|
233
|
+
let e = window.getSelection();
|
|
234
|
+
e?.removeAllRanges(), e?.addRange(t);
|
|
235
|
+
}
|
|
236
|
+
Q("createLink", n);
|
|
237
|
+
}
|
|
238
|
+
}, fn = (e) => {
|
|
228
239
|
let t = e.target.files?.[0];
|
|
229
|
-
e.target.value = "", t &&
|
|
230
|
-
let t =
|
|
231
|
-
t && (t.innerHTML += `<img src="${nt(e.url)}" alt="${nt(e.name)}" style="max-width:100%;height:auto" />`,
|
|
240
|
+
e.target.value = "", t && yt(t, "PRIVATE").then((e) => {
|
|
241
|
+
let t = C.current;
|
|
242
|
+
t && (t.innerHTML += `<img src="${nt(e.url)}" alt="${nt(e.name)}" style="max-width:100%;height:auto" />`, cn());
|
|
232
243
|
}).catch(() => {});
|
|
233
|
-
},
|
|
234
|
-
if (!
|
|
235
|
-
|
|
244
|
+
}, pn = async (e) => {
|
|
245
|
+
if (!w) {
|
|
246
|
+
I("Select a content type.");
|
|
236
247
|
return;
|
|
237
248
|
}
|
|
238
|
-
if (!
|
|
239
|
-
|
|
249
|
+
if (!T.trim()) {
|
|
250
|
+
I("Content title is required.");
|
|
240
251
|
return;
|
|
241
252
|
}
|
|
242
|
-
|
|
243
|
-
let t =
|
|
244
|
-
metaTitle:
|
|
245
|
-
metaDescription:
|
|
253
|
+
I(null);
|
|
254
|
+
let t = M.trim() || N.trim() ? {
|
|
255
|
+
metaTitle: M.trim() || null,
|
|
256
|
+
metaDescription: N.trim() || null
|
|
246
257
|
} : null, n = {
|
|
247
|
-
title:
|
|
248
|
-
slug:
|
|
249
|
-
summary:
|
|
250
|
-
body:
|
|
251
|
-
type:
|
|
252
|
-
tags:
|
|
253
|
-
campaignId:
|
|
254
|
-
scheduledAt:
|
|
258
|
+
title: T.trim(),
|
|
259
|
+
slug: K.trim() || null,
|
|
260
|
+
summary: E.trim() || null,
|
|
261
|
+
body: O || null,
|
|
262
|
+
type: w,
|
|
263
|
+
tags: D,
|
|
264
|
+
campaignId: A || null,
|
|
265
|
+
scheduledAt: q,
|
|
255
266
|
metadata: {
|
|
256
|
-
templateId:
|
|
267
|
+
templateId: wt,
|
|
257
268
|
seo: t
|
|
258
269
|
},
|
|
259
|
-
...
|
|
270
|
+
...V ? { aiToolExecutionId: V } : {}
|
|
260
271
|
};
|
|
261
|
-
if (
|
|
262
|
-
let t = e && !
|
|
272
|
+
if (m && p) {
|
|
273
|
+
let t = e && !J;
|
|
263
274
|
try {
|
|
264
|
-
await
|
|
265
|
-
id:
|
|
266
|
-
input:
|
|
267
|
-
type:
|
|
268
|
-
title:
|
|
269
|
-
slug:
|
|
270
|
-
summary:
|
|
271
|
-
body:
|
|
272
|
-
tags:
|
|
273
|
-
campaignId:
|
|
274
|
-
scheduledIso:
|
|
275
|
-
metaTitle:
|
|
276
|
-
metaDescription:
|
|
277
|
-
templateId:
|
|
278
|
-
},
|
|
279
|
-
} }),
|
|
275
|
+
await dt({ variables: {
|
|
276
|
+
id: p,
|
|
277
|
+
input: ve(fe({
|
|
278
|
+
type: w,
|
|
279
|
+
title: T,
|
|
280
|
+
slug: K,
|
|
281
|
+
summary: E,
|
|
282
|
+
body: O,
|
|
283
|
+
tags: D,
|
|
284
|
+
campaignId: A,
|
|
285
|
+
scheduledIso: q,
|
|
286
|
+
metaTitle: M,
|
|
287
|
+
metaDescription: N,
|
|
288
|
+
templateId: wt
|
|
289
|
+
}, Ut, t ? i.Published : void 0), V)
|
|
290
|
+
} }), ot(), u(f + "/content/" + p);
|
|
280
291
|
} catch (e) {
|
|
281
|
-
|
|
292
|
+
I(e instanceof Error ? e.message : "Failed to save content item.");
|
|
282
293
|
}
|
|
283
294
|
} else try {
|
|
284
|
-
let t = (await
|
|
285
|
-
e && !
|
|
295
|
+
let t = (await ct({ variables: { input: n } })).data?.headshotmarketingCreateContentItem.id;
|
|
296
|
+
e && !J && t && await gt({ variables: {
|
|
286
297
|
id: t,
|
|
287
|
-
input: { status:
|
|
288
|
-
} }),
|
|
298
|
+
input: { status: i.Published }
|
|
299
|
+
} }), ot(), u(f + "/content");
|
|
289
300
|
} catch (e) {
|
|
290
|
-
|
|
301
|
+
I(e instanceof Error ? e.message : "Failed to save content item.");
|
|
291
302
|
}
|
|
292
|
-
},
|
|
293
|
-
if ($ &&
|
|
294
|
-
|
|
303
|
+
}, mn = lt || _t || ft, hn = zt ?? ut?.message ?? vt?.message ?? pt?.message ?? xt ?? null, gn = J ? "Schedule" : "Publish", _n = J ? Te : Ve, vn = Vt === i.Published, yn = !m || !vn, bn = ue.find((e) => e.value === Vt)?.label ?? "Draft", $ = U.find((e) => e.id === Gt) ?? U[0] ?? null, xn = async () => {
|
|
304
|
+
if ($ && R.trim()) {
|
|
305
|
+
B(null), $t(null);
|
|
295
306
|
try {
|
|
296
|
-
let e = (await
|
|
307
|
+
let e = (await mt({ variables: { input: {
|
|
297
308
|
toolId: $.id,
|
|
298
|
-
input: { prompt:
|
|
299
|
-
instruction:
|
|
300
|
-
title:
|
|
301
|
-
bodyHtml:
|
|
302
|
-
includeDraft:
|
|
303
|
-
contentTypeLabel:
|
|
309
|
+
input: { prompt: pe({
|
|
310
|
+
instruction: R,
|
|
311
|
+
title: T,
|
|
312
|
+
bodyHtml: O,
|
|
313
|
+
includeDraft: Jt,
|
|
314
|
+
contentTypeLabel: G
|
|
304
315
|
}) },
|
|
305
316
|
metadata: {
|
|
306
317
|
source: "content-editor",
|
|
307
318
|
provider: $.provider,
|
|
308
|
-
contentId:
|
|
319
|
+
contentId: p ?? null
|
|
309
320
|
}
|
|
310
321
|
} } })).data?.headshotmarketingExecuteAITool;
|
|
311
322
|
if (!e) throw Error("No response from the tool.");
|
|
312
323
|
if (e.status === "FAILED") {
|
|
313
|
-
|
|
324
|
+
z([]), B(e.errorMessage ?? "The tool failed to generate a result. Please try again.");
|
|
314
325
|
return;
|
|
315
326
|
}
|
|
316
|
-
let t =
|
|
317
|
-
|
|
327
|
+
let t = le(e.output).filter((e) => e.trim());
|
|
328
|
+
z(t), tn(e.id), t.length === 0 && B("The tool returned no copy. Try a more specific request.");
|
|
318
329
|
} catch (e) {
|
|
319
|
-
|
|
330
|
+
z([]), B(e instanceof Error ? e.message : "Generation failed.");
|
|
320
331
|
}
|
|
321
332
|
}
|
|
322
|
-
},
|
|
323
|
-
|
|
333
|
+
}, Sn = (e, t, n) => {
|
|
334
|
+
un(ge(O, t, n)), Rt("edit"), $t(e), en && nn(en);
|
|
324
335
|
};
|
|
325
|
-
if (
|
|
326
|
-
let e = !
|
|
327
|
-
return /* @__PURE__ */
|
|
336
|
+
if (m && !L) {
|
|
337
|
+
let e = !S.loading && !S.error && !H;
|
|
338
|
+
return /* @__PURE__ */ _(ne, {
|
|
328
339
|
title: "Edit content",
|
|
329
|
-
children: /* @__PURE__ */
|
|
330
|
-
loading:
|
|
331
|
-
error:
|
|
332
|
-
onRetry: () => void
|
|
333
|
-
hasData: !!
|
|
334
|
-
children: e && /* @__PURE__ */
|
|
340
|
+
children: /* @__PURE__ */ _(ie, {
|
|
341
|
+
loading: S.loading,
|
|
342
|
+
error: S.error,
|
|
343
|
+
onRetry: () => void S.refetch(),
|
|
344
|
+
hasData: !!H || e,
|
|
345
|
+
children: e && /* @__PURE__ */ _(re, {
|
|
335
346
|
illustration: "empty-files",
|
|
336
347
|
title: "Content not found",
|
|
337
348
|
description: "This content item doesn't exist or has been removed.",
|
|
338
|
-
action: /* @__PURE__ */
|
|
349
|
+
action: /* @__PURE__ */ v("button", {
|
|
339
350
|
type: "button",
|
|
340
|
-
onClick: () =>
|
|
351
|
+
onClick: () => u(f + "/content"),
|
|
341
352
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ _(Se, { className: "h-4 w-4" }), "Back to Content"]
|
|
343
354
|
})
|
|
344
355
|
})
|
|
345
356
|
})
|
|
346
357
|
});
|
|
347
358
|
}
|
|
348
|
-
let
|
|
359
|
+
let Cn = [
|
|
349
360
|
{
|
|
350
361
|
key: "settings",
|
|
351
362
|
label: "Settings",
|
|
352
|
-
icon:
|
|
363
|
+
icon: He
|
|
353
364
|
},
|
|
354
365
|
{
|
|
355
366
|
key: "seo",
|
|
356
367
|
label: "SEO",
|
|
357
|
-
icon:
|
|
368
|
+
icon: Be
|
|
358
369
|
},
|
|
359
370
|
{
|
|
360
371
|
key: "ai",
|
|
361
372
|
label: "AI Assist",
|
|
362
|
-
icon:
|
|
373
|
+
icon: Ue
|
|
363
374
|
}
|
|
364
375
|
];
|
|
365
|
-
return /* @__PURE__ */
|
|
366
|
-
title:
|
|
367
|
-
description:
|
|
368
|
-
actions: /* @__PURE__ */
|
|
376
|
+
return /* @__PURE__ */ v(ne, {
|
|
377
|
+
title: m ? `Edit ${G}` : w ? `New ${G}` : "Content Creation",
|
|
378
|
+
description: m ? "Update the copy, settings and status of this content item" : "Create marketing content from scratch or templates",
|
|
379
|
+
actions: /* @__PURE__ */ v("button", {
|
|
369
380
|
type: "button",
|
|
370
|
-
onClick: () =>
|
|
381
|
+
onClick: () => u(f + (m && p ? "/content/" + p : "/content")),
|
|
371
382
|
className: "inline-flex min-h-[40px] 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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
372
|
-
children: [/* @__PURE__ */
|
|
383
|
+
children: [/* @__PURE__ */ _(Se, { className: "h-4 w-4" }), "Back"]
|
|
373
384
|
}),
|
|
374
385
|
children: [
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ _(Ye, { children: m ? "Edit this piece of content: refine the copy, adjust its settings and SEO, use AI Assist to draft or rewrite sections, then save or publish." : "Create a new piece of content from scratch or from a template. Pick the format you want (blog post, email, social post, ad copy, landing page), optionally start from a proven template, then draft, refine and publish — all in one place." }),
|
|
387
|
+
/* @__PURE__ */ v(Je, { children: [/* @__PURE__ */ _("h3", {
|
|
377
388
|
className: "text-sm font-semibold text-text-primary mb-3",
|
|
378
389
|
children: "Choose Content Type"
|
|
379
|
-
}), /* @__PURE__ */
|
|
390
|
+
}), /* @__PURE__ */ _("div", {
|
|
380
391
|
className: "grid grid-cols-2 md:grid-cols-5 gap-3",
|
|
381
392
|
children: Qe.map((e) => {
|
|
382
|
-
let t = e.icon, n =
|
|
383
|
-
return /* @__PURE__ */
|
|
393
|
+
let t = e.icon, n = W === e.id;
|
|
394
|
+
return /* @__PURE__ */ v("button", {
|
|
384
395
|
type: "button",
|
|
385
396
|
onClick: () => {
|
|
386
|
-
let t =
|
|
387
|
-
t &&
|
|
397
|
+
let t = de[e.id];
|
|
398
|
+
t && Ct(t), m || Tt(null);
|
|
388
399
|
},
|
|
389
400
|
"aria-pressed": n,
|
|
390
|
-
className:
|
|
401
|
+
className: a("group relative flex flex-col items-center gap-2 rounded-xl border-2 p-4 text-center transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", n ? "border-action-primary-bg bg-action-primary-bg/5 shadow-pop" : "border-border-subtle bg-bg-surface hover:border-action-primary-bg/40 hover:shadow-pop"),
|
|
391
402
|
children: [
|
|
392
|
-
n && /* @__PURE__ */
|
|
393
|
-
className: "absolute
|
|
394
|
-
children: /* @__PURE__ */
|
|
403
|
+
n && /* @__PURE__ */ _("span", {
|
|
404
|
+
className: "absolute end-2 top-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text",
|
|
405
|
+
children: /* @__PURE__ */ _(c, { className: "h-3 w-3" })
|
|
395
406
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
className:
|
|
398
|
-
children: /* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ _("div", {
|
|
408
|
+
className: a("rounded-lg p-2 transition-transform group-hover:scale-105", e.color),
|
|
409
|
+
children: /* @__PURE__ */ _(t, { className: "h-5 w-5" })
|
|
399
410
|
}),
|
|
400
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ _("span", {
|
|
401
412
|
className: "text-sm font-medium text-text-primary",
|
|
402
413
|
children: e.label
|
|
403
414
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ _("span", {
|
|
405
416
|
className: "text-[10px] leading-tight text-text-secondary",
|
|
406
417
|
children: e.description
|
|
407
418
|
})
|
|
@@ -409,404 +420,404 @@ var _ = "inline-flex h-9 min-w-9 items-center justify-center gap-1 rounded-md px
|
|
|
409
420
|
}, e.id);
|
|
410
421
|
})
|
|
411
422
|
})] }),
|
|
412
|
-
|
|
423
|
+
w && !m && /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h3", {
|
|
413
424
|
className: "text-sm font-semibold text-text-primary mb-3",
|
|
414
425
|
children: "Select Template (Optional)"
|
|
415
|
-
}), /* @__PURE__ */
|
|
426
|
+
}), /* @__PURE__ */ _("div", {
|
|
416
427
|
className: "grid grid-cols-1 md:grid-cols-3 gap-3",
|
|
417
|
-
children:
|
|
418
|
-
let t =
|
|
419
|
-
return /* @__PURE__ */
|
|
428
|
+
children: on.map((e) => {
|
|
429
|
+
let t = wt === e.id;
|
|
430
|
+
return /* @__PURE__ */ v("button", {
|
|
420
431
|
type: "button",
|
|
421
|
-
onClick: () =>
|
|
432
|
+
onClick: () => Tt(t ? null : e.id),
|
|
422
433
|
"aria-pressed": t,
|
|
423
|
-
className:
|
|
424
|
-
children: [/* @__PURE__ */
|
|
434
|
+
className: a("flex flex-col items-start rounded-xl border-2 p-4 text-start transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", t ? "border-action-primary-bg bg-action-primary-bg/5 shadow-pop" : "border-border-subtle bg-bg-surface hover:border-action-primary-bg/40"),
|
|
435
|
+
children: [/* @__PURE__ */ v("span", {
|
|
425
436
|
className: "flex w-full items-center justify-between text-sm font-medium text-text-primary",
|
|
426
|
-
children: [e.name, t && /* @__PURE__ */
|
|
427
|
-
}), /* @__PURE__ */
|
|
437
|
+
children: [e.name, t && /* @__PURE__ */ _(c, { className: "h-4 w-4 text-action-primary-bg" })]
|
|
438
|
+
}), /* @__PURE__ */ _("span", {
|
|
428
439
|
className: "mt-1 text-xs text-text-secondary",
|
|
429
440
|
children: e.description
|
|
430
441
|
})]
|
|
431
442
|
}, e.id);
|
|
432
443
|
})
|
|
433
444
|
})] }),
|
|
434
|
-
|
|
445
|
+
w && /* @__PURE__ */ v("div", {
|
|
435
446
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ v("div", {
|
|
437
448
|
className: "lg:col-span-2",
|
|
438
449
|
children: [
|
|
439
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ v("div", {
|
|
440
451
|
className: "mb-3 flex items-center justify-between gap-2",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
452
|
+
children: [/* @__PURE__ */ v("h3", {
|
|
442
453
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
443
|
-
children: [/* @__PURE__ */
|
|
444
|
-
}), /* @__PURE__ */
|
|
454
|
+
children: [/* @__PURE__ */ _(l, { className: "h-4 w-4" }), "Editor"]
|
|
455
|
+
}), /* @__PURE__ */ v("div", {
|
|
445
456
|
className: "inline-flex items-center rounded-lg border border-border-subtle p-0.5",
|
|
446
457
|
role: "tablist",
|
|
447
458
|
"aria-label": "Editor view",
|
|
448
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ v("button", {
|
|
449
460
|
type: "button",
|
|
450
461
|
role: "tab",
|
|
451
|
-
"aria-selected":
|
|
452
|
-
onClick: () =>
|
|
453
|
-
className:
|
|
454
|
-
children: [/* @__PURE__ */
|
|
455
|
-
}), /* @__PURE__ */
|
|
462
|
+
"aria-selected": F === "edit",
|
|
463
|
+
onClick: () => Rt("edit"),
|
|
464
|
+
className: a("inline-flex min-h-[32px] items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors", F === "edit" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
|
|
465
|
+
children: [/* @__PURE__ */ _(l, { className: "h-3.5 w-3.5" }), "Edit"]
|
|
466
|
+
}), /* @__PURE__ */ v("button", {
|
|
456
467
|
type: "button",
|
|
457
468
|
role: "tab",
|
|
458
|
-
"aria-selected":
|
|
459
|
-
onClick: () =>
|
|
460
|
-
className:
|
|
461
|
-
children: [/* @__PURE__ */
|
|
469
|
+
"aria-selected": F === "preview",
|
|
470
|
+
onClick: () => Rt("preview"),
|
|
471
|
+
className: a("inline-flex min-h-[32px] items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors", F === "preview" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
|
|
472
|
+
children: [/* @__PURE__ */ _(De, { className: "h-3.5 w-3.5" }), "Preview"]
|
|
462
473
|
})]
|
|
463
474
|
})]
|
|
464
475
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ v("div", {
|
|
466
477
|
className: "rounded-xl border border-border-seam bg-gloss-card shadow-pop",
|
|
467
|
-
children: [/* @__PURE__ */
|
|
478
|
+
children: [/* @__PURE__ */ _("div", {
|
|
468
479
|
className: "border-b border-border-subtle p-3",
|
|
469
|
-
children: /* @__PURE__ */
|
|
480
|
+
children: /* @__PURE__ */ _("input", {
|
|
470
481
|
type: "text",
|
|
471
|
-
value:
|
|
472
|
-
onChange: (e) =>
|
|
482
|
+
value: T,
|
|
483
|
+
onChange: (e) => Et(e.target.value),
|
|
473
484
|
placeholder: "Content title",
|
|
474
485
|
"aria-label": "Content title",
|
|
475
486
|
className: "w-full bg-transparent px-1 py-1 text-lg font-semibold text-text-primary placeholder:text-text-secondary focus:outline-none"
|
|
476
487
|
})
|
|
477
|
-
}),
|
|
488
|
+
}), F === "edit" ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
|
|
478
489
|
className: "flex flex-wrap items-center gap-0.5 overflow-x-auto border-b border-border-subtle p-2",
|
|
479
490
|
children: [
|
|
480
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ _(b, {
|
|
481
492
|
label: "Bold",
|
|
482
|
-
onClick: () =>
|
|
483
|
-
children: /* @__PURE__ */
|
|
493
|
+
onClick: () => Q("bold"),
|
|
494
|
+
children: /* @__PURE__ */ _(we, { className: "h-4 w-4" })
|
|
484
495
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ _(b, {
|
|
486
497
|
label: "Italic",
|
|
487
|
-
onClick: () =>
|
|
488
|
-
children: /* @__PURE__ */
|
|
498
|
+
onClick: () => Q("italic"),
|
|
499
|
+
children: /* @__PURE__ */ _(Me, { className: "h-4 w-4" })
|
|
489
500
|
}),
|
|
490
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ _(b, {
|
|
491
502
|
label: "Underline",
|
|
492
|
-
onClick: () =>
|
|
493
|
-
children: /* @__PURE__ */
|
|
503
|
+
onClick: () => Q("underline"),
|
|
504
|
+
children: /* @__PURE__ */ _(We, { className: "h-4 w-4" })
|
|
494
505
|
}),
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ _(x, {}),
|
|
507
|
+
/* @__PURE__ */ _(b, {
|
|
497
508
|
label: "Heading 1",
|
|
498
|
-
onClick: () =>
|
|
499
|
-
children: /* @__PURE__ */
|
|
509
|
+
onClick: () => Q("formatBlock", "<h1>"),
|
|
510
|
+
children: /* @__PURE__ */ _(ke, { className: "h-4 w-4" })
|
|
500
511
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ _(b, {
|
|
502
513
|
label: "Heading 2",
|
|
503
|
-
onClick: () =>
|
|
504
|
-
children: /* @__PURE__ */
|
|
514
|
+
onClick: () => Q("formatBlock", "<h2>"),
|
|
515
|
+
children: /* @__PURE__ */ _(Ae, { className: "h-4 w-4" })
|
|
505
516
|
}),
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ _(x, {}),
|
|
518
|
+
/* @__PURE__ */ _(b, {
|
|
508
519
|
label: "Bulleted list",
|
|
509
|
-
onClick: () =>
|
|
510
|
-
children: /* @__PURE__ */
|
|
520
|
+
onClick: () => Q("insertUnorderedList"),
|
|
521
|
+
children: /* @__PURE__ */ _(Pe, { className: "h-4 w-4" })
|
|
511
522
|
}),
|
|
512
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ _(b, {
|
|
513
524
|
label: "Numbered list",
|
|
514
|
-
onClick: () =>
|
|
515
|
-
children: /* @__PURE__ */
|
|
525
|
+
onClick: () => Q("insertOrderedList"),
|
|
526
|
+
children: /* @__PURE__ */ _(Fe, { className: "h-4 w-4" })
|
|
516
527
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ _(x, {}),
|
|
529
|
+
/* @__PURE__ */ _(b, {
|
|
519
530
|
label: "Quote",
|
|
520
|
-
onClick: () =>
|
|
521
|
-
children: /* @__PURE__ */
|
|
531
|
+
onClick: () => Q("formatBlock", "<blockquote>"),
|
|
532
|
+
children: /* @__PURE__ */ _(Le, { className: "h-4 w-4" })
|
|
522
533
|
}),
|
|
523
|
-
/* @__PURE__ */
|
|
534
|
+
/* @__PURE__ */ _(b, {
|
|
524
535
|
label: "Code block",
|
|
525
|
-
onClick: () =>
|
|
526
|
-
children: /* @__PURE__ */
|
|
536
|
+
onClick: () => Q("formatBlock", "<pre>"),
|
|
537
|
+
children: /* @__PURE__ */ _(Ee, { className: "h-4 w-4" })
|
|
527
538
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ _(x, {}),
|
|
540
|
+
/* @__PURE__ */ _(b, {
|
|
530
541
|
label: "Insert link",
|
|
531
|
-
onClick:
|
|
532
|
-
children: /* @__PURE__ */
|
|
542
|
+
onClick: () => void dn(),
|
|
543
|
+
children: /* @__PURE__ */ _(Ne, { className: "h-4 w-4" })
|
|
533
544
|
}),
|
|
534
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ _(b, {
|
|
535
546
|
label: "Insert image",
|
|
536
|
-
disabled:
|
|
537
|
-
onClick: () =>
|
|
538
|
-
children:
|
|
547
|
+
disabled: bt,
|
|
548
|
+
onClick: () => St.current?.click(),
|
|
549
|
+
children: bt ? /* @__PURE__ */ _(d, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _(je, { className: "h-4 w-4" })
|
|
539
550
|
}),
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
ref:
|
|
551
|
+
/* @__PURE__ */ _("input", {
|
|
552
|
+
ref: St,
|
|
542
553
|
type: "file",
|
|
543
554
|
accept: "image/*",
|
|
544
|
-
onChange:
|
|
555
|
+
onChange: fn,
|
|
545
556
|
className: "hidden",
|
|
546
557
|
"aria-hidden": "true",
|
|
547
558
|
tabIndex: -1
|
|
548
559
|
})
|
|
549
560
|
]
|
|
550
|
-
}), /* @__PURE__ */
|
|
551
|
-
ref:
|
|
561
|
+
}), /* @__PURE__ */ _("div", {
|
|
562
|
+
ref: C,
|
|
552
563
|
contentEditable: !0,
|
|
553
564
|
suppressContentEditableWarning: !0,
|
|
554
565
|
role: "textbox",
|
|
555
566
|
"aria-multiline": "true",
|
|
556
567
|
"aria-label": "Content body",
|
|
557
|
-
onInput:
|
|
568
|
+
onInput: cn,
|
|
558
569
|
"data-placeholder": "Start writing your content...",
|
|
559
|
-
className:
|
|
560
|
-
})] }) : /* @__PURE__ */
|
|
570
|
+
className: a("min-h-[420px] w-full p-4 text-sm focus:outline-none", st, "empty:before:text-text-secondary empty:before:content-[attr(data-placeholder)]")
|
|
571
|
+
})] }) : /* @__PURE__ */ _("div", {
|
|
561
572
|
className: "min-h-[420px] p-6",
|
|
562
|
-
children:
|
|
563
|
-
className:
|
|
564
|
-
dangerouslySetInnerHTML: { __html: e(
|
|
565
|
-
}) : /* @__PURE__ */
|
|
573
|
+
children: O ? /* @__PURE__ */ _("div", {
|
|
574
|
+
className: st,
|
|
575
|
+
dangerouslySetInnerHTML: { __html: e(O) }
|
|
576
|
+
}) : /* @__PURE__ */ _("div", {
|
|
566
577
|
className: "flex min-h-[380px] items-center justify-center text-sm text-text-secondary",
|
|
567
578
|
children: "Nothing to preview yet — switch to Edit and start writing."
|
|
568
579
|
})
|
|
569
580
|
})]
|
|
570
581
|
}),
|
|
571
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ v("div", {
|
|
572
583
|
className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 px-1 text-xs text-text-secondary",
|
|
573
584
|
children: [
|
|
574
|
-
/* @__PURE__ */
|
|
575
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ v("span", { children: [Y.toLocaleString(), " characters"] }),
|
|
586
|
+
/* @__PURE__ */ _("span", {
|
|
576
587
|
"aria-hidden": "true",
|
|
577
588
|
children: "•"
|
|
578
589
|
}),
|
|
579
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ v("span", { children: [O ? Math.max(1, Math.ceil(Y / 1e3)) : 0, " min read"] })
|
|
580
591
|
]
|
|
581
592
|
})
|
|
582
593
|
]
|
|
583
|
-
}), /* @__PURE__ */
|
|
594
|
+
}), /* @__PURE__ */ _("div", {
|
|
584
595
|
className: "lg:col-span-1",
|
|
585
|
-
children: /* @__PURE__ */
|
|
596
|
+
children: /* @__PURE__ */ v("div", {
|
|
586
597
|
className: "lg:sticky lg:top-4",
|
|
587
|
-
children: [/* @__PURE__ */
|
|
598
|
+
children: [/* @__PURE__ */ _("div", {
|
|
588
599
|
className: "mb-3 flex items-center gap-1 overflow-x-auto border-b border-border-seam",
|
|
589
600
|
role: "tablist",
|
|
590
601
|
"aria-label": "Content settings",
|
|
591
|
-
children:
|
|
592
|
-
let t = e.icon, n =
|
|
593
|
-
return /* @__PURE__ */
|
|
602
|
+
children: Cn.map((e) => {
|
|
603
|
+
let t = e.icon, n = P === e.key;
|
|
604
|
+
return /* @__PURE__ */ v("button", {
|
|
594
605
|
type: "button",
|
|
595
606
|
role: "tab",
|
|
596
607
|
"aria-selected": n,
|
|
597
|
-
onClick: () =>
|
|
598
|
-
className:
|
|
608
|
+
onClick: () => Lt(e.key),
|
|
609
|
+
className: a("relative inline-flex min-h-[40px] shrink-0 items-center gap-1.5 whitespace-nowrap px-3 pb-2.5 pt-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", n ? "text-text-primary" : "text-text-secondary hover:text-text-primary"),
|
|
599
610
|
children: [
|
|
600
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ _(t, { className: "h-4 w-4" }),
|
|
601
612
|
e.label,
|
|
602
|
-
n && /* @__PURE__ */
|
|
613
|
+
n && /* @__PURE__ */ _("span", { className: "absolute inset-x-2 -bottom-px h-0.5 rounded-full bg-action-primary-bg" })
|
|
603
614
|
]
|
|
604
615
|
}, e.key);
|
|
605
616
|
})
|
|
606
|
-
}), /* @__PURE__ */
|
|
617
|
+
}), /* @__PURE__ */ v("div", {
|
|
607
618
|
className: "rounded-xl border border-border-seam bg-gloss-card shadow-pop p-4",
|
|
608
619
|
children: [
|
|
609
|
-
|
|
620
|
+
P === "settings" && /* @__PURE__ */ v("div", {
|
|
610
621
|
className: "space-y-4",
|
|
611
622
|
children: [
|
|
612
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ v("div", {
|
|
613
624
|
className: "grid grid-cols-2 gap-3",
|
|
614
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
|
|
615
626
|
className: "mb-1 block text-xs font-medium text-text-secondary",
|
|
616
627
|
children: "Content type"
|
|
617
|
-
}), /* @__PURE__ */
|
|
628
|
+
}), /* @__PURE__ */ v("span", {
|
|
618
629
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-sm text-text-primary",
|
|
619
|
-
children: [
|
|
620
|
-
})] }), /* @__PURE__ */
|
|
630
|
+
children: [_(an ? an.icon : Oe, { className: "h-3.5 w-3.5" }), G]
|
|
631
|
+
})] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
|
|
621
632
|
className: "mb-1 block text-xs font-medium text-text-secondary",
|
|
622
633
|
children: "Status"
|
|
623
|
-
}), /* @__PURE__ */
|
|
624
|
-
className:
|
|
625
|
-
children:
|
|
634
|
+
}), /* @__PURE__ */ _("span", {
|
|
635
|
+
className: a("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium", J ? "bg-status-info-bg text-status-info-text" : "bg-status-warning-bg text-status-warning-text"),
|
|
636
|
+
children: J ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(Te, { className: "h-3.5 w-3.5" }), "Scheduled"] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(l, { className: "h-3.5 w-3.5" }), m ? bn : "Draft"] })
|
|
626
637
|
})] })]
|
|
627
638
|
}),
|
|
628
|
-
/* @__PURE__ */
|
|
629
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ v("div", { children: [
|
|
640
|
+
/* @__PURE__ */ _("label", {
|
|
630
641
|
htmlFor: "content-slug",
|
|
631
642
|
className: "mb-1 block text-xs font-medium text-text-secondary",
|
|
632
643
|
children: "Slug"
|
|
633
644
|
}),
|
|
634
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ _("input", {
|
|
635
646
|
id: "content-slug",
|
|
636
647
|
type: "text",
|
|
637
|
-
value:
|
|
648
|
+
value: K,
|
|
638
649
|
onChange: (e) => {
|
|
639
|
-
|
|
650
|
+
Mt(!0), At(rt(e.target.value));
|
|
640
651
|
},
|
|
641
652
|
placeholder: "auto-generated-from-title",
|
|
642
|
-
className:
|
|
653
|
+
className: a(y, "font-mono text-xs")
|
|
643
654
|
}),
|
|
644
|
-
|
|
655
|
+
jt && /* @__PURE__ */ _("button", {
|
|
645
656
|
type: "button",
|
|
646
657
|
onClick: () => {
|
|
647
|
-
|
|
658
|
+
Mt(!1), At("");
|
|
648
659
|
},
|
|
649
660
|
className: "mt-1 text-xs text-text-secondary underline hover:text-text-primary",
|
|
650
661
|
children: "Reset to title"
|
|
651
662
|
})
|
|
652
663
|
] }),
|
|
653
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
654
665
|
htmlFor: "content-summary",
|
|
655
666
|
className: "mb-1 block text-xs font-medium text-text-secondary",
|
|
656
667
|
children: "Summary"
|
|
657
|
-
}), /* @__PURE__ */
|
|
668
|
+
}), /* @__PURE__ */ _("input", {
|
|
658
669
|
id: "content-summary",
|
|
659
670
|
type: "text",
|
|
660
|
-
value:
|
|
661
|
-
onChange: (e) =>
|
|
671
|
+
value: E,
|
|
672
|
+
onChange: (e) => Dt(e.target.value),
|
|
662
673
|
placeholder: "Short summary (optional)",
|
|
663
|
-
className:
|
|
674
|
+
className: y
|
|
664
675
|
})] }),
|
|
665
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
|
|
666
677
|
className: "mb-1 block text-xs font-medium text-text-secondary",
|
|
667
678
|
children: "Tags"
|
|
668
|
-
}), /* @__PURE__ */
|
|
669
|
-
value:
|
|
670
|
-
onChange:
|
|
679
|
+
}), /* @__PURE__ */ _(ae, {
|
|
680
|
+
value: D,
|
|
681
|
+
onChange: Ot,
|
|
671
682
|
placeholder: "Add a tag…"
|
|
672
683
|
})] }),
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ v("div", { children: [
|
|
685
|
+
/* @__PURE__ */ _("label", {
|
|
675
686
|
htmlFor: "content-campaign",
|
|
676
687
|
className: "mb-1 block text-xs font-medium text-text-secondary",
|
|
677
688
|
children: "Campaign"
|
|
678
689
|
}),
|
|
679
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ v(Xe, {
|
|
680
691
|
id: "content-campaign",
|
|
681
|
-
value:
|
|
682
|
-
onChange: (e) =>
|
|
683
|
-
className:
|
|
684
|
-
children: [/* @__PURE__ */
|
|
692
|
+
value: A,
|
|
693
|
+
onChange: (e) => Nt(e.target.value),
|
|
694
|
+
className: a(y, "h-10"),
|
|
695
|
+
children: [/* @__PURE__ */ _("option", {
|
|
685
696
|
value: "",
|
|
686
697
|
children: "No campaign"
|
|
687
|
-
}),
|
|
698
|
+
}), rn.map((e) => /* @__PURE__ */ _("option", {
|
|
688
699
|
value: e.id,
|
|
689
700
|
children: e.name
|
|
690
701
|
}, e.id))]
|
|
691
702
|
}),
|
|
692
|
-
|
|
703
|
+
rn.length === 0 && /* @__PURE__ */ _("p", {
|
|
693
704
|
className: "mt-1 text-xs text-text-secondary",
|
|
694
705
|
children: "No campaigns yet — create one to link content."
|
|
695
706
|
})
|
|
696
707
|
] }),
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
-
/* @__PURE__ */
|
|
708
|
+
/* @__PURE__ */ v("div", { children: [
|
|
709
|
+
/* @__PURE__ */ v("label", {
|
|
699
710
|
htmlFor: "content-schedule",
|
|
700
711
|
className: "mb-1 flex items-center gap-1.5 text-xs font-medium text-text-secondary",
|
|
701
|
-
children: [/* @__PURE__ */
|
|
712
|
+
children: [/* @__PURE__ */ _(Te, { className: "h-3.5 w-3.5" }), "Publish schedule"]
|
|
702
713
|
}),
|
|
703
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ _("input", {
|
|
704
715
|
id: "content-schedule",
|
|
705
716
|
type: "datetime-local",
|
|
706
|
-
value:
|
|
707
|
-
onChange: (e) =>
|
|
708
|
-
className:
|
|
717
|
+
value: j,
|
|
718
|
+
onChange: (e) => Pt(e.target.value),
|
|
719
|
+
className: a(y, "h-10")
|
|
709
720
|
}),
|
|
710
|
-
|
|
721
|
+
j && !J && /* @__PURE__ */ _("p", {
|
|
711
722
|
className: "mt-1 text-xs text-status-warning-text",
|
|
712
723
|
children: "Pick a future time to schedule publishing."
|
|
713
724
|
}),
|
|
714
|
-
|
|
725
|
+
J && /* @__PURE__ */ _("p", {
|
|
715
726
|
className: "mt-1 text-xs text-text-secondary",
|
|
716
727
|
children: "Saved as a draft and published automatically at this time."
|
|
717
728
|
})
|
|
718
729
|
] })
|
|
719
730
|
]
|
|
720
731
|
}),
|
|
721
|
-
|
|
732
|
+
P === "seo" && /* @__PURE__ */ v("div", {
|
|
722
733
|
className: "space-y-4",
|
|
723
734
|
children: [
|
|
724
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("div", {
|
|
725
736
|
className: "mb-1 flex items-center justify-between",
|
|
726
|
-
children: [/* @__PURE__ */
|
|
737
|
+
children: [/* @__PURE__ */ _("span", {
|
|
727
738
|
className: "text-xs font-medium text-text-secondary",
|
|
728
739
|
children: "SEO score"
|
|
729
|
-
}), /* @__PURE__ */
|
|
730
|
-
className:
|
|
731
|
-
children: [
|
|
740
|
+
}), /* @__PURE__ */ v("span", {
|
|
741
|
+
className: a("text-sm font-semibold", Z === "success" && "text-status-success-text", Z === "warning" && "text-status-warning-text", Z === "error" && "text-status-error-text"),
|
|
742
|
+
children: [X, "/100"]
|
|
732
743
|
})]
|
|
733
|
-
}), /* @__PURE__ */
|
|
744
|
+
}), /* @__PURE__ */ _("div", {
|
|
734
745
|
className: "h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
735
|
-
children: /* @__PURE__ */
|
|
736
|
-
className:
|
|
737
|
-
style: { width: `${
|
|
746
|
+
children: /* @__PURE__ */ _("div", {
|
|
747
|
+
className: a("h-full rounded-full transition-all", Z === "success" && "bg-status-success-text", Z === "warning" && "bg-status-warning-text", Z === "error" && "bg-status-error-text"),
|
|
748
|
+
style: { width: `${X}%` }
|
|
738
749
|
})
|
|
739
750
|
})] }),
|
|
740
|
-
/* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ v("div", { children: [
|
|
752
|
+
/* @__PURE__ */ _("label", {
|
|
742
753
|
htmlFor: "content-meta-title",
|
|
743
754
|
className: "mb-1 block text-xs font-medium text-text-secondary",
|
|
744
755
|
children: "Meta title"
|
|
745
756
|
}),
|
|
746
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ _("input", {
|
|
747
758
|
id: "content-meta-title",
|
|
748
759
|
type: "text",
|
|
749
|
-
value:
|
|
750
|
-
onChange: (e) =>
|
|
751
|
-
placeholder:
|
|
760
|
+
value: M,
|
|
761
|
+
onChange: (e) => Ft(e.target.value),
|
|
762
|
+
placeholder: T || "Page title for search results",
|
|
752
763
|
maxLength: 70,
|
|
753
|
-
className:
|
|
764
|
+
className: y
|
|
754
765
|
}),
|
|
755
|
-
/* @__PURE__ */
|
|
756
|
-
className: "mt-1 text-
|
|
757
|
-
children: [(
|
|
766
|
+
/* @__PURE__ */ v("p", {
|
|
767
|
+
className: "mt-1 text-end text-xs text-text-secondary",
|
|
768
|
+
children: [(M || T).length, "/60"]
|
|
758
769
|
})
|
|
759
770
|
] }),
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ v("div", { children: [
|
|
772
|
+
/* @__PURE__ */ _("label", {
|
|
762
773
|
htmlFor: "content-meta-desc",
|
|
763
774
|
className: "mb-1 block text-xs font-medium text-text-secondary",
|
|
764
775
|
children: "Meta description"
|
|
765
776
|
}),
|
|
766
|
-
/* @__PURE__ */
|
|
777
|
+
/* @__PURE__ */ _("textarea", {
|
|
767
778
|
id: "content-meta-desc",
|
|
768
|
-
value:
|
|
769
|
-
onChange: (e) =>
|
|
779
|
+
value: N,
|
|
780
|
+
onChange: (e) => It(e.target.value),
|
|
770
781
|
placeholder: "Description shown in search results",
|
|
771
782
|
rows: 3,
|
|
772
783
|
maxLength: 200,
|
|
773
|
-
className:
|
|
784
|
+
className: a(y, "resize-none")
|
|
774
785
|
}),
|
|
775
|
-
/* @__PURE__ */
|
|
776
|
-
className: "mt-1 text-
|
|
777
|
-
children: [
|
|
786
|
+
/* @__PURE__ */ v("p", {
|
|
787
|
+
className: "mt-1 text-end text-xs text-text-secondary",
|
|
788
|
+
children: [N.length, "/160"]
|
|
778
789
|
})
|
|
779
790
|
] }),
|
|
780
|
-
/* @__PURE__ */
|
|
791
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("span", {
|
|
781
792
|
className: "mb-1.5 block text-xs font-medium text-text-secondary",
|
|
782
793
|
children: "Search preview"
|
|
783
|
-
}), /* @__PURE__ */
|
|
794
|
+
}), /* @__PURE__ */ v("div", {
|
|
784
795
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
|
|
785
796
|
children: [
|
|
786
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ _("p", {
|
|
787
798
|
className: "truncate text-xs text-status-success-text",
|
|
788
|
-
children:
|
|
799
|
+
children: K ? `/${K}` : "/your-content-slug"
|
|
789
800
|
}),
|
|
790
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ _("p", {
|
|
791
802
|
className: "mt-0.5 truncate text-sm font-medium text-primary",
|
|
792
|
-
children:
|
|
803
|
+
children: M || T || "Untitled content"
|
|
793
804
|
}),
|
|
794
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ _("p", {
|
|
795
806
|
className: "mt-0.5 line-clamp-2 text-xs text-text-secondary",
|
|
796
|
-
children:
|
|
807
|
+
children: N || E || "Add a meta description to control how this appears in search results."
|
|
797
808
|
})
|
|
798
809
|
]
|
|
799
810
|
})] }),
|
|
800
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ _("ul", {
|
|
801
812
|
className: "space-y-1.5",
|
|
802
|
-
children:
|
|
813
|
+
children: sn.map((e) => /* @__PURE__ */ v("li", {
|
|
803
814
|
className: "flex items-start gap-2 text-xs",
|
|
804
|
-
children: [/* @__PURE__ */
|
|
805
|
-
className:
|
|
806
|
-
children: e.passed ? /* @__PURE__ */
|
|
807
|
-
}), /* @__PURE__ */
|
|
815
|
+
children: [/* @__PURE__ */ _("span", {
|
|
816
|
+
className: a("mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full", e.passed ? "bg-status-success-bg text-status-success-text" : "bg-bg-sunken text-text-secondary"),
|
|
817
|
+
children: e.passed ? /* @__PURE__ */ _(c, { className: "h-3 w-3" }) : /* @__PURE__ */ _("span", { className: "h-1.5 w-1.5 rounded-full bg-current" })
|
|
818
|
+
}), /* @__PURE__ */ v("span", {
|
|
808
819
|
className: e.passed ? "text-text-primary" : "text-text-secondary",
|
|
809
|
-
children: [e.label, !e.passed && /* @__PURE__ */
|
|
820
|
+
children: [e.label, !e.passed && /* @__PURE__ */ v("span", {
|
|
810
821
|
className: "text-text-secondary",
|
|
811
822
|
children: [
|
|
812
823
|
" ",
|
|
@@ -819,106 +830,106 @@ var _ = "inline-flex h-9 min-w-9 items-center justify-center gap-1 rounded-md px
|
|
|
819
830
|
})
|
|
820
831
|
]
|
|
821
832
|
}),
|
|
822
|
-
|
|
833
|
+
P === "ai" && /* @__PURE__ */ v("div", {
|
|
823
834
|
className: "space-y-3",
|
|
824
835
|
children: [
|
|
825
|
-
/* @__PURE__ */
|
|
836
|
+
/* @__PURE__ */ v("div", {
|
|
826
837
|
className: "flex items-start gap-2 rounded-lg border border-border-subtle bg-bg-surface p-3",
|
|
827
|
-
children: [/* @__PURE__ */
|
|
838
|
+
children: [/* @__PURE__ */ _(Ue, { className: "mt-0.5 h-4 w-4 shrink-0 text-action-primary-bg" }), /* @__PURE__ */ _("p", {
|
|
828
839
|
className: "text-xs text-text-secondary",
|
|
829
840
|
children: "Draft, rewrite and optimize copy with your workspace AI tools, then insert the result straight into the editor."
|
|
830
841
|
})]
|
|
831
842
|
}),
|
|
832
|
-
|
|
843
|
+
U.length > 0 && $ ? /* @__PURE__ */ v("div", {
|
|
833
844
|
className: "space-y-3",
|
|
834
845
|
children: [
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ v("div", { children: [
|
|
847
|
+
/* @__PURE__ */ _("label", {
|
|
837
848
|
htmlFor: "content-ai-tool",
|
|
838
849
|
className: "mb-1 block text-xs font-medium text-text-secondary",
|
|
839
850
|
children: "AI tool"
|
|
840
851
|
}),
|
|
841
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ _(Xe, {
|
|
842
853
|
id: "content-ai-tool",
|
|
843
854
|
value: $.id,
|
|
844
855
|
onChange: (e) => {
|
|
845
|
-
|
|
856
|
+
Kt(e.target.value), z([]), B(null);
|
|
846
857
|
},
|
|
847
|
-
className:
|
|
848
|
-
children:
|
|
858
|
+
className: a(y, "h-10"),
|
|
859
|
+
children: U.map((e) => /* @__PURE__ */ _("option", {
|
|
849
860
|
value: e.id,
|
|
850
861
|
children: e.name
|
|
851
862
|
}, e.id))
|
|
852
863
|
}),
|
|
853
|
-
$.description && /* @__PURE__ */
|
|
864
|
+
$.description && /* @__PURE__ */ _("p", {
|
|
854
865
|
className: "mt-1 text-xs text-text-secondary",
|
|
855
866
|
children: $.description
|
|
856
867
|
})
|
|
857
868
|
] }),
|
|
858
|
-
/* @__PURE__ */
|
|
869
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
859
870
|
htmlFor: "content-ai-instruction",
|
|
860
871
|
className: "mb-1 block text-xs font-medium text-text-secondary",
|
|
861
872
|
children: "What should it write?"
|
|
862
|
-
}), /* @__PURE__ */
|
|
873
|
+
}), /* @__PURE__ */ _("textarea", {
|
|
863
874
|
id: "content-ai-instruction",
|
|
864
|
-
value:
|
|
865
|
-
onChange: (e) =>
|
|
875
|
+
value: R,
|
|
876
|
+
onChange: (e) => qt(e.target.value),
|
|
866
877
|
placeholder: "e.g. Write an engaging intro paragraph about spring headshot sessions",
|
|
867
878
|
rows: 3,
|
|
868
879
|
maxLength: 1e3,
|
|
869
|
-
className:
|
|
880
|
+
className: a(y, "resize-none")
|
|
870
881
|
})] }),
|
|
871
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ v("label", {
|
|
872
883
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
873
|
-
children: [/* @__PURE__ */
|
|
884
|
+
children: [/* @__PURE__ */ _("input", {
|
|
874
885
|
type: "checkbox",
|
|
875
|
-
checked:
|
|
876
|
-
onChange: (e) =>
|
|
886
|
+
checked: Jt,
|
|
887
|
+
onChange: (e) => Yt(e.target.checked),
|
|
877
888
|
className: "h-4 w-4 rounded border-border-subtle"
|
|
878
889
|
}), "Use the title and current draft as context"]
|
|
879
890
|
}),
|
|
880
|
-
/* @__PURE__ */
|
|
891
|
+
/* @__PURE__ */ v("button", {
|
|
881
892
|
type: "button",
|
|
882
893
|
onClick: () => {
|
|
883
|
-
|
|
894
|
+
xn();
|
|
884
895
|
},
|
|
885
|
-
disabled:
|
|
896
|
+
disabled: ht || !R.trim(),
|
|
886
897
|
className: "inline-flex w-full min-h-[40px] items-center justify-center gap-2 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:opacity-60",
|
|
887
|
-
children: [
|
|
898
|
+
children: [ht ? /* @__PURE__ */ _(d, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _(Ge, { className: "h-4 w-4" }), ht ? "Generating…" : "Generate"]
|
|
888
899
|
}),
|
|
889
|
-
|
|
900
|
+
Zt && /* @__PURE__ */ _("p", {
|
|
890
901
|
role: "alert",
|
|
891
902
|
className: "rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-xs text-status-error-text",
|
|
892
|
-
children:
|
|
903
|
+
children: Zt
|
|
893
904
|
}),
|
|
894
|
-
|
|
905
|
+
Xt.length > 0 && /* @__PURE__ */ _("ul", {
|
|
895
906
|
className: "space-y-2",
|
|
896
907
|
"aria-label": "Generated suggestions",
|
|
897
|
-
children:
|
|
908
|
+
children: Xt.map((e, t) => {
|
|
898
909
|
let n = `ai-${t}`;
|
|
899
|
-
return /* @__PURE__ */
|
|
910
|
+
return /* @__PURE__ */ v("li", {
|
|
900
911
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
|
|
901
|
-
children: [/* @__PURE__ */
|
|
912
|
+
children: [/* @__PURE__ */ _("p", {
|
|
902
913
|
className: "max-h-48 overflow-y-auto whitespace-pre-wrap text-xs text-text-primary",
|
|
903
914
|
children: e
|
|
904
|
-
}), /* @__PURE__ */
|
|
915
|
+
}), /* @__PURE__ */ v("div", {
|
|
905
916
|
className: "mt-2 flex flex-wrap items-center gap-2",
|
|
906
917
|
children: [
|
|
907
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ v("button", {
|
|
908
919
|
type: "button",
|
|
909
|
-
onClick: () =>
|
|
920
|
+
onClick: () => Sn(n, e, "append"),
|
|
910
921
|
className: "inline-flex min-h-[32px] items-center gap-1.5 rounded-md border border-border-subtle px-2.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
911
|
-
children: [/* @__PURE__ */
|
|
922
|
+
children: [/* @__PURE__ */ _(Ie, { className: "h-3.5 w-3.5" }), "Insert into draft"]
|
|
912
923
|
}),
|
|
913
|
-
/* @__PURE__ */
|
|
924
|
+
/* @__PURE__ */ v("button", {
|
|
914
925
|
type: "button",
|
|
915
|
-
onClick: () =>
|
|
926
|
+
onClick: () => Sn(n, e, "replace"),
|
|
916
927
|
className: "inline-flex min-h-[32px] items-center gap-1.5 rounded-md border border-border-subtle px-2.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
917
|
-
children: [/* @__PURE__ */
|
|
928
|
+
children: [/* @__PURE__ */ _(Re, { className: "h-3.5 w-3.5" }), "Replace draft"]
|
|
918
929
|
}),
|
|
919
|
-
|
|
930
|
+
Qt === n && /* @__PURE__ */ v("span", {
|
|
920
931
|
className: "inline-flex items-center gap-1 text-xs text-status-success-text",
|
|
921
|
-
children: [/* @__PURE__ */
|
|
932
|
+
children: [/* @__PURE__ */ _(c, { className: "h-3.5 w-3.5" }), "Inserted"]
|
|
922
933
|
})
|
|
923
934
|
]
|
|
924
935
|
})]
|
|
@@ -926,18 +937,18 @@ var _ = "inline-flex h-9 min-w-9 items-center justify-center gap-1 rounded-md px
|
|
|
926
937
|
})
|
|
927
938
|
})
|
|
928
939
|
]
|
|
929
|
-
}) : /* @__PURE__ */
|
|
940
|
+
}) : /* @__PURE__ */ _("div", {
|
|
930
941
|
className: "rounded-lg border border-dashed border-border-subtle p-4 text-center",
|
|
931
|
-
children: /* @__PURE__ */
|
|
942
|
+
children: /* @__PURE__ */ _("p", {
|
|
932
943
|
className: "text-xs text-text-secondary",
|
|
933
944
|
children: "No content AI tools are enabled yet."
|
|
934
945
|
})
|
|
935
946
|
}),
|
|
936
|
-
/* @__PURE__ */
|
|
947
|
+
/* @__PURE__ */ v("button", {
|
|
937
948
|
type: "button",
|
|
938
|
-
onClick: () =>
|
|
949
|
+
onClick: () => u(f + "/content/ai-tools"),
|
|
939
950
|
className: "inline-flex w-full min-h-[40px] items-center justify-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
940
|
-
children: [/* @__PURE__ */
|
|
951
|
+
children: [/* @__PURE__ */ _(Ce, { className: "h-4 w-4" }), "Open AI Tools"]
|
|
941
952
|
})
|
|
942
953
|
]
|
|
943
954
|
})
|
|
@@ -946,42 +957,42 @@ var _ = "inline-flex h-9 min-w-9 items-center justify-center gap-1 rounded-md px
|
|
|
946
957
|
})
|
|
947
958
|
})]
|
|
948
959
|
}),
|
|
949
|
-
|
|
960
|
+
hn && /* @__PURE__ */ _("div", {
|
|
950
961
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
951
|
-
children:
|
|
962
|
+
children: hn
|
|
952
963
|
}),
|
|
953
|
-
|
|
964
|
+
w && /* @__PURE__ */ v("div", {
|
|
954
965
|
className: "flex flex-col-reverse gap-3 border-t border-border-seam pt-4 sm:flex-row sm:items-center sm:justify-between",
|
|
955
|
-
children: [/* @__PURE__ */
|
|
966
|
+
children: [/* @__PURE__ */ _("p", {
|
|
956
967
|
className: "text-xs text-text-secondary",
|
|
957
|
-
children:
|
|
958
|
-
}), /* @__PURE__ */
|
|
968
|
+
children: m ? vn ? "This item is live. Saving updates the published copy." : `Saving keeps the current status (${bn}). Publish to make it live.` : J ? "This item will be saved as a draft and published on schedule." : "New items are saved as drafts. Publish to make them live."
|
|
969
|
+
}), /* @__PURE__ */ v("div", {
|
|
959
970
|
className: "flex items-center gap-2",
|
|
960
|
-
children: [/* @__PURE__ */
|
|
971
|
+
children: [/* @__PURE__ */ v("button", {
|
|
961
972
|
type: "button",
|
|
962
973
|
onClick: () => {
|
|
963
|
-
|
|
974
|
+
pn(!1);
|
|
964
975
|
},
|
|
965
|
-
disabled:
|
|
976
|
+
disabled: mn,
|
|
966
977
|
className: "inline-flex min-h-[44px] 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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:opacity-60",
|
|
967
|
-
children: [(
|
|
968
|
-
}),
|
|
978
|
+
children: [(lt || ft) && !_t ? /* @__PURE__ */ _(d, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _(ze, { className: "h-4 w-4" }), m ? "Save changes" : "Save Draft"]
|
|
979
|
+
}), yn && /* @__PURE__ */ v("button", {
|
|
969
980
|
type: "button",
|
|
970
981
|
onClick: () => {
|
|
971
|
-
|
|
982
|
+
pn(!0);
|
|
972
983
|
},
|
|
973
|
-
disabled:
|
|
984
|
+
disabled: mn,
|
|
974
985
|
className: "inline-flex min-h-[44px] items-center gap-2 rounded-md bg-action-primary-bg px-5 py-2 text-sm font-medium text-action-primary-text shadow-pop transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:opacity-60",
|
|
975
|
-
children: [
|
|
986
|
+
children: [_t ? /* @__PURE__ */ _(d, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _(_n, { className: "h-4 w-4" }), mn ? "Saving…" : gn]
|
|
976
987
|
})]
|
|
977
988
|
})]
|
|
978
989
|
})
|
|
979
990
|
]
|
|
980
991
|
});
|
|
981
|
-
},
|
|
982
|
-
let { contentId: e } =
|
|
983
|
-
return /* @__PURE__ */
|
|
992
|
+
}, ct = () => {
|
|
993
|
+
let { contentId: e } = Ke();
|
|
994
|
+
return /* @__PURE__ */ _(S, {}, e ?? "edit");
|
|
984
995
|
};
|
|
985
|
-
export {
|
|
996
|
+
export { S as ContentCreationPage, ct as ContentEditPage };
|
|
986
997
|
|
|
987
998
|
//# sourceMappingURL=ContentCreationPage.js.map
|