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