@burdenoff/microfe-headshotmarketing 2026.1030.13 → 2026.1030.14

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