@burdenoff/microfe-headshotmarketing 2026.801.3 → 2026.827.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.
Files changed (60) hide show
  1. package/dist/generated/wspace-operations.d.ts +44 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +30 -4
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/headshotmarketing/components/InfluencerModals.d.ts.map +1 -1
  6. package/dist/headshotmarketing/components/InfluencerModals.js +201 -214
  7. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
  8. package/dist/headshotmarketing/components/StatusBadge.d.ts.map +1 -1
  9. package/dist/headshotmarketing/components/StatusBadge.js +2 -0
  10. package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
  11. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +59 -29
  12. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  13. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.d.ts.map +1 -1
  14. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js +389 -215
  15. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js.map +1 -1
  16. package/dist/headshotmarketing/pages/content/AIExecutionLedger.d.ts +26 -0
  17. package/dist/headshotmarketing/pages/content/AIExecutionLedger.d.ts.map +1 -0
  18. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js +215 -0
  19. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js.map +1 -0
  20. package/dist/headshotmarketing/pages/content/AIToolsPage.d.ts.map +1 -1
  21. package/dist/headshotmarketing/pages/content/AIToolsPage.js +396 -379
  22. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  23. package/dist/headshotmarketing/pages/content/AssetLibraryPage.d.ts.map +1 -1
  24. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +436 -343
  25. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  26. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.d.ts.map +1 -1
  27. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js +233 -223
  28. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js.map +1 -1
  29. package/dist/headshotmarketing/pages/content/ContentPage.js +4 -4
  30. package/dist/headshotmarketing/pages/crm/ContactsPage.d.ts.map +1 -1
  31. package/dist/headshotmarketing/pages/crm/ContactsPage.js +339 -278
  32. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  33. package/dist/headshotmarketing/pages/crm/CrmPage.d.ts.map +1 -1
  34. package/dist/headshotmarketing/pages/crm/CrmPage.js +118 -112
  35. package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
  36. package/dist/headshotmarketing/pages/crm/CrmSubNav.d.ts +14 -0
  37. package/dist/headshotmarketing/pages/crm/CrmSubNav.d.ts.map +1 -0
  38. package/dist/headshotmarketing/pages/crm/CrmSubNav.js +51 -0
  39. package/dist/headshotmarketing/pages/crm/CrmSubNav.js.map +1 -0
  40. package/dist/headshotmarketing/pages/crm/LeadsPage.d.ts.map +1 -1
  41. package/dist/headshotmarketing/pages/crm/LeadsPage.js +122 -116
  42. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  43. package/dist/headshotmarketing/pages/crm/PipelinePage.d.ts.map +1 -1
  44. package/dist/headshotmarketing/pages/crm/PipelinePage.js +192 -183
  45. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  46. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.d.ts.map +1 -1
  47. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +184 -162
  48. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  49. package/dist/headshotmarketing/pages/influencers/InfluencersPage.d.ts.map +1 -1
  50. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +8 -14
  51. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  52. package/dist/headshotmarketing/types/index.d.ts +9 -4
  53. package/dist/headshotmarketing/types/index.d.ts.map +1 -1
  54. package/dist/headshotmarketing/utils/contentMapper.js +1 -1
  55. package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
  56. package/dist/headshotmarketing/utils/influencerMapper.d.ts +16 -2
  57. package/dist/headshotmarketing/utils/influencerMapper.d.ts.map +1 -1
  58. package/dist/headshotmarketing/utils/influencerMapper.js +56 -40
  59. package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
  60. package/package.json +2 -2
@@ -7,15 +7,17 @@ import { EmptyState as ee } from "../../components/EmptyState.js";
7
7
  import { QueryStateBoundary as te } from "../../components/QueryStateBoundary.js";
8
8
  import "../../components/index.js";
9
9
  import { useHeadshotmarketingBootstrap as ne } from "../../hooks/useHeadshotmarketingBootstrap.js";
10
- import { useEffect as re, useMemo as c, useState as l } from "react";
11
- import { Check as u, Clock as ie, Copy as ae, Cpu as oe, FilePlus2 as d, GitBranch as f, Image as p, Languages as m, Loader2 as h, Mail as g, Megaphone as _, MessageSquare as se, Mic as v, PenTool as y, ScanText as b, Search as x, Send as ce, Sparkles as S, Video as C, Wand2 as le, Zap as ue } from "lucide-react";
12
- import { useCopyToClipboard as de } from "@burdenoff/fe-libs/shared/hooks";
13
- import { gql as w } from "@apollo/client";
14
- import { useMutation as fe } from "@apollo/client/react";
15
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
16
- import { GlassCard as pe, PagePurpose as me, Select as he, SelectContent as ge, SelectItem as _e, SelectTrigger as ve, SelectValue as ye, Textarea as be } from "@burdenoff/fe-libs/ui";
10
+ import { AIExecutionLedger as re } from "./AIExecutionLedger.js";
11
+ import { ContentSubNav as ie } from "./ContentSubNav.js";
12
+ import { useEffect as ae, useMemo as c, useState as l } from "react";
13
+ import { Check as u, Clock as d, Copy as oe, Cpu as se, FilePlus2 as f, GitBranch as p, Image as m, Languages as h, Loader2 as g, Mail as _, Megaphone as v, MessageSquare as y, Mic as ce, PenTool as b, ScanText as x, Search as S, Send as le, Sparkles as C, Video as w, Wand2 as ue, Zap as de } from "lucide-react";
14
+ import { useCopyToClipboard as fe } from "@burdenoff/fe-libs/shared/hooks";
15
+ import { gql as T } from "@apollo/client";
16
+ import { useMutation as pe } from "@apollo/client/react";
17
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
18
+ import { GlassCard as me, PagePurpose as he, Select as ge, SelectContent as _e, SelectItem as ve, SelectTrigger as ye, SelectValue as be, Textarea as xe } from "@burdenoff/fe-libs/ui";
17
19
  //#region src/headshotmarketing/pages/content/AIToolsPage.tsx
18
- var xe = w`
20
+ var Se = T`
19
21
  mutation HeadshotmarketingExecuteAITool(
20
22
  $input: HeadshotmarketingExecuteAIToolInput!
21
23
  ) {
@@ -30,16 +32,16 @@ var xe = w`
30
32
  createdAt
31
33
  }
32
34
  }
33
- `, O = {
34
- [a.ContentGeneration]: y,
35
- [a.Copywriting]: _,
36
- [a.ImageGeneration]: p,
37
- [a.SeoOptimization]: x,
38
- [a.Summarization]: b,
39
- [a.Translation]: m,
40
- [a.VideoGeneration]: C,
41
- [a.Other]: S
42
- }, Se = {
35
+ `, k = {
36
+ [a.ContentGeneration]: b,
37
+ [a.Copywriting]: v,
38
+ [a.ImageGeneration]: m,
39
+ [a.SeoOptimization]: S,
40
+ [a.Summarization]: x,
41
+ [a.Translation]: h,
42
+ [a.VideoGeneration]: w,
43
+ [a.Other]: C
44
+ }, Ce = {
43
45
  [a.ContentGeneration]: "Content",
44
46
  [a.Copywriting]: "Copywriting",
45
47
  [a.ImageGeneration]: "Image",
@@ -49,11 +51,11 @@ var xe = w`
49
51
  [a.VideoGeneration]: "Video",
50
52
  [a.Other]: "AI"
51
53
  };
52
- function Ce(e, t) {
54
+ function we(e, t) {
53
55
  let n = e.toLowerCase();
54
- return n.includes("blog") ? y : n.includes("subject line") || n.includes("email") ? g : n.includes("caption") || n.includes("social") ? se : n.includes("ad copy") || n.includes("ad ") || n.includes("advert") ? _ : n.includes("seo") || n.includes("meta") || n.includes("keyword") ? x : n.includes("alt") || n.includes("image") || n.includes("photo") ? p : n.includes("repurpose") || n.includes("remix") ? f : n.includes("voice") || n.includes("tone") ? v : n.includes("translat") ? m : n.includes("summar") ? b : n.includes("video") || n.includes("script") ? C : O[t] ?? S;
56
+ return n.includes("blog") ? b : n.includes("subject line") || n.includes("email") ? _ : n.includes("caption") || n.includes("social") ? y : n.includes("ad copy") || n.includes("ad ") || n.includes("advert") ? v : n.includes("seo") || n.includes("meta") || n.includes("keyword") ? S : n.includes("alt") || n.includes("image") || n.includes("photo") ? m : n.includes("repurpose") || n.includes("remix") ? p : n.includes("voice") || n.includes("tone") ? ce : n.includes("translat") ? h : n.includes("summar") ? x : n.includes("video") || n.includes("script") ? w : k[t] ?? C;
55
57
  }
56
- function we(e, t) {
58
+ function Te(e, t) {
57
59
  let n = e.toLowerCase();
58
60
  if (n.includes("blog")) return o.BlogPost;
59
61
  if (n.includes("caption") || n.includes("social")) return o.SocialPost;
@@ -67,12 +69,12 @@ function we(e, t) {
67
69
  default: return o.Other;
68
70
  }
69
71
  }
70
- function k(e) {
72
+ function A(e) {
71
73
  return typeof e == "object" && !!e && !Array.isArray(e);
72
74
  }
73
- function A(e) {
75
+ function j(e) {
74
76
  if (typeof e == "string") return e;
75
- if (k(e)) for (let t of [
77
+ if (A(e)) for (let t of [
76
78
  "text",
77
79
  "content",
78
80
  "result",
@@ -83,11 +85,11 @@ function A(e) {
83
85
  }
84
86
  return JSON.stringify(e);
85
87
  }
86
- function j(e) {
88
+ function M(e) {
87
89
  if (e == null) return [];
88
90
  if (typeof e == "string") return e.trim() ? [e] : [];
89
- if (Array.isArray(e)) return e.map(A);
90
- if (k(e)) {
91
+ if (Array.isArray(e)) return e.map(j);
92
+ if (A(e)) {
91
93
  for (let t of [
92
94
  "variations",
93
95
  "results",
@@ -96,7 +98,7 @@ function j(e) {
96
98
  "suggestions"
97
99
  ]) {
98
100
  let n = e[t];
99
- if (Array.isArray(n)) return n.map(A);
101
+ if (Array.isArray(n)) return n.map(j);
100
102
  }
101
103
  for (let t of [
102
104
  "text",
@@ -115,23 +117,23 @@ function j(e) {
115
117
  }
116
118
  return [String(e)];
117
119
  }
118
- function Te(e, t) {
120
+ function Ee(e, t) {
119
121
  let n = e.split("\n").find((e) => e.trim())?.trim() ?? "";
120
122
  return (n.length > 64 ? `${n.slice(0, 61)}…` : n) || `${t} draft`;
121
123
  }
122
- var M = () => {
123
- let { data: f, loading: p, error: m, refetch: g } = ne(), { navigate: _, basePath: se } = t(), { copy: v } = de(), [y, { loading: b }] = fe(xe), [x] = e(), [C, w] = l(null), [O, k] = l(""), [A, M] = l(""), [N, P] = l([]), [F, I] = l(null), [Ee, L] = l(null), [R, De] = l(null), [z, B] = l(null), [V, H] = l(/* @__PURE__ */ new Set()), [U, W] = l(null), G = c(() => f?.headshotmarketingAITools.items ?? [], [f]), K = c(() => f?.headshotmarketingAIToolExecutions.items ?? [], [f]), q = c(() => {
124
+ var N = () => {
125
+ let { data: p, loading: m, error: h, refetch: _ } = ne(), { navigate: v, basePath: y } = t(), { copy: ce } = fe(), [b, { loading: x }] = pe(Se), [S] = e(), [w, T] = l(null), [k, A] = l(""), [j, N] = l(""), [P, F] = l([]), [I, L] = l(null), [De, R] = l(null), [z, Oe] = l(null), [B, ke] = l(null), [V, H] = l(/* @__PURE__ */ new Set()), [U, W] = l(null), G = c(() => p?.headshotmarketingAITools.items ?? [], [p]), K = c(() => p?.headshotmarketingAIToolExecutions.items ?? [], [p]), q = c(() => {
124
126
  let e = /* @__PURE__ */ new Date();
125
127
  return new Date(e.getFullYear(), e.getMonth(), 1).getTime();
126
- }, []), Oe = c(() => {
128
+ }, []), Ae = c(() => {
127
129
  let e = /* @__PURE__ */ new Map();
128
130
  for (let t of K) new Date(t.createdAt).getTime() >= q && e.set(t.toolId, (e.get(t.toolId) ?? 0) + 1);
129
131
  return e;
130
- }, [K, q]), ke = c(() => {
132
+ }, [K, q]), je = c(() => {
131
133
  let e = 0;
132
134
  for (let t of K) new Date(t.createdAt).getTime() >= q && (e += t.tokensUsed ?? 0);
133
135
  return e;
134
- }, [K, q]), Ae = c(() => K.filter((e) => new Date(e.createdAt).getTime() >= q).length, [K, q]), je = c(() => {
136
+ }, [K, q]), Me = c(() => K.filter((e) => new Date(e.createdAt).getTime() >= q).length, [K, q]), Ne = c(() => {
135
137
  let e = /* @__PURE__ */ new Map();
136
138
  for (let t of G) {
137
139
  if (!t.model) continue;
@@ -147,52 +149,52 @@ var M = () => {
147
149
  provider: e.provider,
148
150
  model: e.model ?? null,
149
151
  isAvailable: e.isEnabled,
150
- icon: Ce(e.name, e.category),
152
+ icon: we(e.name, e.category),
151
153
  inputType: e.category === a.SeoOptimization ? "url" : "text",
152
- contentType: we(e.name, e.category),
153
- monthlyUses: Oe.get(e.id) ?? 0
154
- })), [G, Oe]), Me = c(() => new Map(J.map((e) => [e.id, e])), [J]), Y = J.find((e) => e.id === C), Ne = J.filter((e) => e.isAvailable).length;
155
- re(() => {
156
- !C && J.length > 0 && w((J.find((e) => e.isAvailable) ?? J[0]).id);
157
- }, [C, J]);
154
+ contentType: Te(e.name, e.category),
155
+ monthlyUses: Ae.get(e.id) ?? 0
156
+ })), [G, Ae]), Pe = c(() => new Map(J.map((e) => [e.id, e])), [J]), Y = J.find((e) => e.id === w), Fe = J.filter((e) => e.isAvailable).length;
157
+ ae(() => {
158
+ !w && J.length > 0 && T((J.find((e) => e.isAvailable) ?? J[0]).id);
159
+ }, [w, J]);
158
160
  let X = c(() => {
159
161
  if (!Y) return [];
160
- let e = new Set(je.get(Y.provider) ?? []);
162
+ let e = new Set(Ne.get(Y.provider) ?? []);
161
163
  return Y.model && e.add(Y.model), Array.from(e);
162
- }, [Y, je]), Z = A || Y?.model || X[0] || "", Pe = (e) => {
163
- w(e), P([]), I(null), L(null), W(null), k(""), M(""), H(/* @__PURE__ */ new Set());
164
- }, Fe = async () => {
165
- if (!(!O.trim() || !Y || !Y.isAvailable)) {
166
- L(null), W(null), H(/* @__PURE__ */ new Set());
164
+ }, [Y, Ne]), Z = j || Y?.model || X[0] || "", Ie = (e) => {
165
+ T(e), F([]), L(null), R(null), W(null), A(""), N(""), H(/* @__PURE__ */ new Set());
166
+ }, Le = async () => {
167
+ if (!(!k.trim() || !Y || !Y.isAvailable)) {
168
+ R(null), W(null), H(/* @__PURE__ */ new Set());
167
169
  try {
168
- let e = (await y({ variables: { input: {
170
+ let e = (await b({ variables: { input: {
169
171
  toolId: Y.id,
170
- input: { prompt: O.trim() },
172
+ input: { prompt: k.trim() },
171
173
  metadata: Z ? {
172
174
  model: Z,
173
175
  provider: Y.provider
174
176
  } : { provider: Y.provider }
175
177
  } } })).data?.headshotmarketingExecuteAITool;
176
178
  if (!e) throw Error("No response from the tool.");
177
- e.status === "FAILED" ? (P([]), I(null), L(e.errorMessage ?? "The tool failed to generate a result. Please try again.")) : (P(j(e.output)), I({
179
+ e.status === "FAILED" ? (F([]), L(null), R(e.errorMessage ?? "The tool failed to generate a result. Please try again.")) : (F(M(e.output)), L({
178
180
  tokensUsed: e.tokensUsed,
179
181
  durationMs: e.durationMs
180
- })), await g();
182
+ })), await _();
181
183
  } catch (e) {
182
- L(e instanceof Error ? e.message : "Generation failed.");
184
+ R(e instanceof Error ? e.message : "Generation failed.");
183
185
  }
184
186
  }
185
187
  }, Q = async (e, t) => {
186
- await v(t), De(e), window.setTimeout(() => De((t) => t === e ? null : t), 1500);
188
+ await ce(t), Oe(e), window.setTimeout(() => Oe((t) => t === e ? null : t), 1500);
187
189
  }, $ = async (e, t, n) => {
188
190
  if (t.trim()) {
189
- W(null), B(e);
191
+ W(null), ke(e);
190
192
  try {
191
- await x({ variables: { input: {
192
- title: Te(t, n?.name ?? "AI"),
193
+ await S({ variables: { input: {
194
+ title: Ee(t, n?.name ?? "AI"),
193
195
  body: t,
194
196
  summary: t.replace(/\s+/g, " ").trim().slice(0, 180),
195
- type: n ? we(n.name, n.category) : o.Other,
197
+ type: n ? Te(n.name, n.category) : o.Other,
196
198
  tags: ["ai-generated"],
197
199
  metadata: {
198
200
  source: "ai-tools",
@@ -200,365 +202,380 @@ var M = () => {
200
202
  provider: n?.provider ?? null,
201
203
  model: Z || n?.model || null
202
204
  }
203
- } } }), H((t) => new Set(t).add(e)), g();
205
+ } } }), H((t) => new Set(t).add(e)), _();
204
206
  } catch (e) {
205
207
  W(e instanceof Error ? e.message : "Could not save draft.");
206
208
  } finally {
207
- B(null);
209
+ ke(null);
208
210
  }
209
211
  }
210
- }, Ie = N.join("\n\n"), Le = [
212
+ }, Re = P.join("\n\n"), ze = [
211
213
  {
212
214
  label: "Available tools",
213
- value: String(Ne),
214
- icon: le
215
+ value: String(Fe),
216
+ icon: ue
215
217
  },
216
218
  {
217
219
  label: "Generations this month",
218
- value: i(Ae),
219
- icon: S
220
+ value: i(Me),
221
+ icon: C
220
222
  },
221
223
  {
222
224
  label: "Tokens this month",
223
- value: i(ke),
224
- icon: ue
225
+ value: i(je),
226
+ icon: de
225
227
  }
226
228
  ];
227
- return /* @__PURE__ */ D(s, {
229
+ return /* @__PURE__ */ O(s, {
228
230
  title: "AI Tools",
229
231
  description: "AI-powered marketing content and optimization tools",
230
- children: [/* @__PURE__ */ E(me, { children: "Let AI do the heavy lifting on content. Generate copy, headlines and ideas, rewrite or optimize what you have, and turn a rough brief into a polished draft in seconds — then save it straight to your content library to refine it in your brand voice." }), /* @__PURE__ */ E(te, {
231
- loading: p,
232
- error: m,
233
- onRetry: () => void g(),
234
- hasData: !!f,
235
- children: J.length === 0 ? /* @__PURE__ */ E(ee, {
236
- illustration: "empty-generic",
237
- title: "No AI tools available",
238
- description: "AI tools will appear here once they're enabled for your workspace."
239
- }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", {
240
- className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
241
- children: Le.map((e) => {
242
- let t = e.icon;
243
- return /* @__PURE__ */ D(pe, {
244
- treatment: "metric",
245
- className: "flex items-center gap-3 p-4",
246
- children: [/* @__PURE__ */ E("span", {
247
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
248
- children: /* @__PURE__ */ E(t, { className: "h-5 w-5" })
249
- }), /* @__PURE__ */ D("span", {
250
- className: "min-w-0",
251
- children: [/* @__PURE__ */ E("span", {
252
- className: "block text-xl font-bold leading-none text-text-primary",
253
- children: e.value
254
- }), /* @__PURE__ */ E("span", {
255
- className: "mt-1 block truncate text-xs text-text-secondary",
256
- children: e.label
257
- })]
258
- })]
259
- }, e.label);
260
- })
261
- }), /* @__PURE__ */ D("div", {
262
- className: "grid grid-cols-1 gap-6 lg:grid-cols-[1fr_minmax(340px,380px)] xl:grid-cols-[1fr_400px]",
263
- children: [/* @__PURE__ */ D("div", {
264
- className: "min-w-0 space-y-6",
265
- children: [/* @__PURE__ */ D("section", { children: [/* @__PURE__ */ E("h3", {
266
- className: "mb-3 text-sm font-semibold text-text-primary",
267
- children: "Choose a tool"
268
- }), /* @__PURE__ */ E("div", {
269
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",
270
- children: J.map((e) => {
271
- let t = e.icon, r = C === e.id;
272
- return /* @__PURE__ */ D("button", {
273
- type: "button",
274
- onClick: () => Pe(e.id),
275
- disabled: !e.isAvailable,
276
- "aria-pressed": r,
277
- className: n("group relative flex min-h-[44px] flex-col items-start rounded-card border p-4 text-left transition-[box-shadow,border-color,background-color] duration-200", r ? "border-primary bg-accent-wash shadow-elevation-2" : e.isAvailable ? "border-border-subtle bg-bg-surface hover:border-border-strong hover:shadow-elevation-2" : "cursor-not-allowed border-border-subtle bg-bg-sunken opacity-60"),
278
- children: [
279
- /* @__PURE__ */ E(S, { className: n("absolute right-3 top-3 h-4 w-4 transition-opacity", r ? "text-primary opacity-90" : "text-primary opacity-30 group-hover:opacity-60") }),
280
- /* @__PURE__ */ E("span", {
281
- className: n("flex h-10 w-10 items-center justify-center rounded-lg transition-colors", r ? "bg-action-primary-bg text-action-primary-text" : "bg-action-primary-bg/10 text-primary"),
282
- children: /* @__PURE__ */ E(t, { className: "h-5 w-5" })
283
- }),
284
- /* @__PURE__ */ E("h4", {
285
- className: "mt-3 pr-5 text-sm font-semibold text-text-primary",
286
- children: e.name
287
- }),
288
- e.description && /* @__PURE__ */ E("p", {
289
- className: "mt-1 line-clamp-2 text-xs text-text-secondary",
290
- children: e.description
291
- }),
292
- /* @__PURE__ */ D("div", {
293
- className: "mt-3 flex w-full items-center justify-between gap-2 text-xs",
294
- children: [/* @__PURE__ */ E("span", {
295
- className: "rounded-full bg-bg-sunken px-2 py-0.5 font-medium text-text-secondary",
296
- children: Se[e.category]
297
- }), e.isAvailable ? /* @__PURE__ */ D("span", {
298
- className: "text-text-secondary",
299
- children: [
300
- e.monthlyUses,
301
- " ",
302
- e.monthlyUses === 1 ? "use" : "uses",
303
- " this month"
304
- ]
305
- }) : /* @__PURE__ */ E("span", {
306
- className: "font-medium text-status-warning-text",
307
- children: "Coming soon"
308
- })]
309
- })
310
- ]
311
- }, e.id);
232
+ children: [
233
+ /* @__PURE__ */ D(he, { children: "Let AI do the heavy lifting on content. Generate copy, headlines and ideas, rewrite or optimize what you have, and turn a rough brief into a polished draft in seconds — then save it straight to your content library to refine it in your brand voice." }),
234
+ /* @__PURE__ */ D(ie, {
235
+ active: "ai-tools",
236
+ basePath: y,
237
+ navigate: v
238
+ }),
239
+ /* @__PURE__ */ D(te, {
240
+ loading: m,
241
+ error: h,
242
+ onRetry: () => void _(),
243
+ hasData: !!p,
244
+ children: J.length === 0 ? /* @__PURE__ */ D(ee, {
245
+ illustration: "empty-generic",
246
+ title: "No AI tools available",
247
+ description: "AI tools will appear here once they're enabled for your workspace."
248
+ }) : /* @__PURE__ */ O(E, { children: [
249
+ /* @__PURE__ */ D("div", {
250
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
251
+ children: ze.map((e) => {
252
+ let t = e.icon;
253
+ return /* @__PURE__ */ O(me, {
254
+ treatment: "metric",
255
+ className: "flex items-center gap-3 p-4",
256
+ children: [/* @__PURE__ */ D("span", {
257
+ className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
258
+ children: /* @__PURE__ */ D(t, { className: "h-5 w-5" })
259
+ }), /* @__PURE__ */ O("span", {
260
+ className: "min-w-0",
261
+ children: [/* @__PURE__ */ D("span", {
262
+ className: "block text-xl font-bold leading-none text-text-primary",
263
+ children: e.value
264
+ }), /* @__PURE__ */ D("span", {
265
+ className: "mt-1 block truncate text-xs text-text-secondary",
266
+ children: e.label
267
+ })]
268
+ })]
269
+ }, e.label);
312
270
  })
313
- })] }), /* @__PURE__ */ D("section", { children: [/* @__PURE__ */ E("h3", {
314
- className: "mb-3 text-sm font-semibold text-text-primary",
315
- children: "Recent generations"
316
- }), K.length === 0 ? /* @__PURE__ */ E(ee, {
317
- illustration: "empty-generic",
318
- title: "No generations yet",
319
- description: "Run a tool and your recent AI generations will show up here."
320
- }) : /* @__PURE__ */ E("div", {
321
- className: "space-y-3",
322
- children: K.map((e) => {
323
- let t = Me.get(e.toolId), n = j(e.input)[0] ?? "—", i = j(e.output)[0] ?? "—", a = t?.icon ?? S, o = `gen-${e.id}`, s = V.has(o);
324
- return /* @__PURE__ */ D("div", {
325
- className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
271
+ }),
272
+ /* @__PURE__ */ O("div", {
273
+ className: "grid grid-cols-1 gap-6 lg:grid-cols-[1fr_minmax(340px,380px)] xl:grid-cols-[1fr_400px]",
274
+ children: [/* @__PURE__ */ O("div", {
275
+ className: "min-w-0 space-y-6",
276
+ children: [/* @__PURE__ */ O("section", { children: [/* @__PURE__ */ D("h3", {
277
+ className: "mb-3 text-sm font-semibold text-text-primary",
278
+ children: "Choose a tool"
279
+ }), /* @__PURE__ */ D("div", {
280
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",
281
+ children: J.map((e) => {
282
+ let t = e.icon, r = w === e.id;
283
+ return /* @__PURE__ */ O("button", {
284
+ type: "button",
285
+ onClick: () => Ie(e.id),
286
+ disabled: !e.isAvailable,
287
+ "aria-pressed": r,
288
+ className: n("group relative flex min-h-[44px] flex-col items-start rounded-card border p-4 text-left transition-[box-shadow,border-color,background-color] duration-200", r ? "border-primary bg-accent-wash shadow-elevation-2" : e.isAvailable ? "border-border-subtle bg-bg-surface hover:border-border-strong hover:shadow-elevation-2" : "cursor-not-allowed border-border-subtle bg-bg-sunken opacity-60"),
289
+ children: [
290
+ /* @__PURE__ */ D(C, { className: n("absolute right-3 top-3 h-4 w-4 transition-opacity", r ? "text-primary opacity-90" : "text-primary opacity-30 group-hover:opacity-60") }),
291
+ /* @__PURE__ */ D("span", {
292
+ className: n("flex h-10 w-10 items-center justify-center rounded-lg transition-colors", r ? "bg-action-primary-bg text-action-primary-text" : "bg-action-primary-bg/10 text-primary"),
293
+ children: /* @__PURE__ */ D(t, { className: "h-5 w-5" })
294
+ }),
295
+ /* @__PURE__ */ D("h4", {
296
+ className: "mt-3 pr-5 text-sm font-semibold text-text-primary",
297
+ children: e.name
298
+ }),
299
+ e.description && /* @__PURE__ */ D("p", {
300
+ className: "mt-1 line-clamp-2 text-xs text-text-secondary",
301
+ children: e.description
302
+ }),
303
+ /* @__PURE__ */ O("div", {
304
+ className: "mt-3 flex w-full items-center justify-between gap-2 text-xs",
305
+ children: [/* @__PURE__ */ D("span", {
306
+ className: "rounded-full bg-bg-sunken px-2 py-0.5 font-medium text-text-secondary",
307
+ children: Ce[e.category]
308
+ }), e.isAvailable ? /* @__PURE__ */ O("span", {
309
+ className: "text-text-secondary",
310
+ children: [
311
+ e.monthlyUses,
312
+ " ",
313
+ e.monthlyUses === 1 ? "use" : "uses",
314
+ " this month"
315
+ ]
316
+ }) : /* @__PURE__ */ D("span", {
317
+ className: "font-medium text-status-warning-text",
318
+ children: "Coming soon"
319
+ })]
320
+ })
321
+ ]
322
+ }, e.id);
323
+ })
324
+ })] }), /* @__PURE__ */ O("section", { children: [/* @__PURE__ */ D("h3", {
325
+ className: "mb-3 text-sm font-semibold text-text-primary",
326
+ children: "Recent generations"
327
+ }), K.length === 0 ? /* @__PURE__ */ D(ee, {
328
+ illustration: "empty-generic",
329
+ title: "No generations yet",
330
+ description: "Run a tool and your recent AI generations will show up here."
331
+ }) : /* @__PURE__ */ D("div", {
332
+ className: "space-y-3",
333
+ children: K.map((e) => {
334
+ let t = Pe.get(e.toolId), n = M(e.input)[0] ?? "—", i = M(e.output)[0] ?? "—", a = t?.icon ?? C, o = `gen-${e.id}`, s = V.has(o);
335
+ return /* @__PURE__ */ O("div", {
336
+ className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
337
+ children: [
338
+ /* @__PURE__ */ O("div", {
339
+ className: "mb-2 flex items-center justify-between gap-2",
340
+ children: [/* @__PURE__ */ O("div", {
341
+ className: "flex min-w-0 items-center gap-2",
342
+ children: [/* @__PURE__ */ D(a, { className: "h-3.5 w-3.5 shrink-0 text-primary" }), /* @__PURE__ */ D("span", {
343
+ className: "truncate text-xs font-medium text-text-primary",
344
+ children: t?.name ?? "AI Tool"
345
+ })]
346
+ }), /* @__PURE__ */ O("div", {
347
+ className: "flex shrink-0 items-center gap-1 text-xs text-text-secondary",
348
+ children: [/* @__PURE__ */ D(d, { className: "h-3 w-3" }), /* @__PURE__ */ D("span", { children: r(e.createdAt, "relative") })]
349
+ })]
350
+ }),
351
+ /* @__PURE__ */ O("p", {
352
+ className: "line-clamp-1 text-xs text-text-secondary",
353
+ children: ["Prompt: ", n]
354
+ }),
355
+ /* @__PURE__ */ D("p", {
356
+ className: "mt-1 line-clamp-3 whitespace-pre-wrap text-sm text-text-primary",
357
+ children: i
358
+ }),
359
+ i !== "—" && /* @__PURE__ */ O("div", {
360
+ className: "mt-2 flex items-center gap-3",
361
+ children: [/* @__PURE__ */ D("button", {
362
+ type: "button",
363
+ onClick: () => void Q(o, i),
364
+ className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
365
+ children: z === o ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(u, { className: "h-3 w-3" }), " Copied"] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(oe, { className: "h-3 w-3" }), " Copy"] })
366
+ }), /* @__PURE__ */ D("button", {
367
+ type: "button",
368
+ onClick: () => void $(o, i, t),
369
+ disabled: B === o || s,
370
+ className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline disabled:opacity-60",
371
+ children: B === o ? /* @__PURE__ */ O(E, { children: [
372
+ /* @__PURE__ */ D(g, { className: "h-3 w-3 animate-spin" }),
373
+ " ",
374
+ "Saving"
375
+ ] }) : s ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(u, { className: "h-3 w-3" }), " Saved"] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(f, { className: "h-3 w-3" }), " Save as draft"] })
376
+ })]
377
+ })
378
+ ]
379
+ }, e.id);
380
+ })
381
+ })] })]
382
+ }), /* @__PURE__ */ D("div", {
383
+ className: "lg:sticky lg:top-4 lg:self-start",
384
+ children: /* @__PURE__ */ O(me, {
385
+ treatment: "glass",
386
+ glow: !0,
387
+ className: "p-5",
326
388
  children: [
327
- /* @__PURE__ */ D("div", {
328
- className: "mb-2 flex items-center justify-between gap-2",
329
- children: [/* @__PURE__ */ D("div", {
330
- className: "flex min-w-0 items-center gap-2",
331
- children: [/* @__PURE__ */ E(a, { className: "h-3.5 w-3.5 shrink-0 text-primary" }), /* @__PURE__ */ E("span", {
332
- className: "truncate text-xs font-medium text-text-primary",
333
- children: t?.name ?? "AI Tool"
389
+ /* @__PURE__ */ O("div", {
390
+ className: "mb-4 flex items-center gap-2",
391
+ children: [/* @__PURE__ */ D("span", {
392
+ className: "flex h-8 w-8 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
393
+ children: /* @__PURE__ */ D(ue, { className: "h-4 w-4" })
394
+ }), /* @__PURE__ */ O("div", {
395
+ className: "min-w-0",
396
+ children: [/* @__PURE__ */ D("h3", {
397
+ className: "truncate text-sm font-semibold text-text-primary",
398
+ children: Y ? Y.name : "AI Console"
399
+ }), Y && /* @__PURE__ */ D("p", {
400
+ className: "truncate text-xs text-text-secondary",
401
+ children: Y.provider
334
402
  })]
335
- }), /* @__PURE__ */ D("div", {
336
- className: "flex shrink-0 items-center gap-1 text-xs text-text-secondary",
337
- children: [/* @__PURE__ */ E(ie, { className: "h-3 w-3" }), /* @__PURE__ */ E("span", { children: r(e.createdAt, "relative") })]
338
403
  })]
339
404
  }),
340
- /* @__PURE__ */ D("p", {
341
- className: "line-clamp-1 text-xs text-text-secondary",
342
- children: ["Prompt: ", n]
405
+ /* @__PURE__ */ D("label", {
406
+ className: "mb-1.5 block text-xs font-medium text-text-secondary",
407
+ children: Y?.inputType === "url" ? "Page URL" : "Your prompt"
343
408
  }),
344
- /* @__PURE__ */ E("p", {
345
- className: "mt-1 line-clamp-3 whitespace-pre-wrap text-sm text-text-primary",
346
- children: i
409
+ /* @__PURE__ */ D(xe, {
410
+ value: k,
411
+ onChange: (e) => A(e.target.value),
412
+ disabled: !Y?.isAvailable,
413
+ placeholder: Y?.inputType === "url" ? "https://your-website.com/page" : "Describe what you want to generate… (Enter to generate, Shift+Enter for a new line)",
414
+ rows: 4,
415
+ className: "min-h-[112px] resize-y",
416
+ onKeyDown: (e) => {
417
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Le());
418
+ }
347
419
  }),
348
- i !== "—" && /* @__PURE__ */ D("div", {
349
- className: "mt-2 flex items-center gap-3",
350
- children: [/* @__PURE__ */ E("button", {
351
- type: "button",
352
- onClick: () => void Q(o, i),
353
- className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
354
- children: R === o ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(u, { className: "h-3 w-3" }), " Copied"] }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(ae, { className: "h-3 w-3" }), " Copy"] })
355
- }), /* @__PURE__ */ E("button", {
356
- type: "button",
357
- onClick: () => void $(o, i, t),
358
- disabled: z === o || s,
359
- className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline disabled:opacity-60",
360
- children: z === o ? /* @__PURE__ */ D(T, { children: [
361
- /* @__PURE__ */ E(h, { className: "h-3 w-3 animate-spin" }),
362
- " ",
363
- "Saving"
364
- ] }) : s ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(u, { className: "h-3 w-3" }), " Saved"] }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(d, { className: "h-3 w-3" }), " Save as draft"] })
365
- })]
366
- })
367
- ]
368
- }, e.id);
369
- })
370
- })] })]
371
- }), /* @__PURE__ */ E("div", {
372
- className: "lg:sticky lg:top-4 lg:self-start",
373
- children: /* @__PURE__ */ D(pe, {
374
- treatment: "glass",
375
- glow: !0,
376
- className: "p-5",
377
- children: [
378
- /* @__PURE__ */ D("div", {
379
- className: "mb-4 flex items-center gap-2",
380
- children: [/* @__PURE__ */ E("span", {
381
- className: "flex h-8 w-8 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
382
- children: /* @__PURE__ */ E(le, { className: "h-4 w-4" })
383
- }), /* @__PURE__ */ D("div", {
384
- className: "min-w-0",
385
- children: [/* @__PURE__ */ E("h3", {
386
- className: "truncate text-sm font-semibold text-text-primary",
387
- children: Y ? Y.name : "AI Console"
388
- }), Y && /* @__PURE__ */ E("p", {
389
- className: "truncate text-xs text-text-secondary",
390
- children: Y.provider
391
- })]
392
- })]
393
- }),
394
- /* @__PURE__ */ E("label", {
395
- className: "mb-1.5 block text-xs font-medium text-text-secondary",
396
- children: Y?.inputType === "url" ? "Page URL" : "Your prompt"
397
- }),
398
- /* @__PURE__ */ E(be, {
399
- value: O,
400
- onChange: (e) => k(e.target.value),
401
- disabled: !Y?.isAvailable,
402
- placeholder: Y?.inputType === "url" ? "https://your-website.com/page" : "Describe what you want to generate… (Enter to generate, Shift+Enter for a new line)",
403
- rows: 4,
404
- className: "min-h-[112px] resize-y",
405
- onKeyDown: (e) => {
406
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Fe());
407
- }
408
- }),
409
- /* @__PURE__ */ D("div", {
410
- className: "mt-3 flex flex-col gap-2 sm:flex-row",
411
- children: [X.length > 0 ? /* @__PURE__ */ D(he, {
412
- value: Z,
413
- onValueChange: M,
414
- disabled: !Y?.isAvailable,
415
- children: [/* @__PURE__ */ E(ve, {
416
- "aria-label": "Model",
417
- className: "h-11 flex-1",
418
- children: /* @__PURE__ */ D("span", {
419
- className: "flex items-center gap-2 truncate",
420
- children: [/* @__PURE__ */ E(oe, { className: "h-4 w-4 shrink-0 text-text-muted" }), /* @__PURE__ */ E(ye, { placeholder: "Model" })]
421
- })
422
- }), /* @__PURE__ */ E(ge, { children: X.map((e) => /* @__PURE__ */ E(_e, {
423
- value: e,
424
- children: e
425
- }, e)) })]
426
- }) : /* @__PURE__ */ D("div", {
427
- className: "flex h-11 flex-1 items-center gap-2 rounded-input border border-border-default bg-bg-surface px-3 text-sm text-text-secondary",
428
- children: [/* @__PURE__ */ E(oe, { className: "h-4 w-4 text-text-muted" }), /* @__PURE__ */ E("span", {
429
- className: "truncate",
430
- children: Y?.provider ?? "Default model"
431
- })]
432
- }), /* @__PURE__ */ E("button", {
433
- type: "button",
434
- onClick: () => void Fe(),
435
- disabled: b || !O.trim() || !Y?.isAvailable,
436
- className: n("inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md px-5 text-sm font-semibold transition-colors sm:min-w-[132px]", b || !O.trim() || !Y?.isAvailable ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
437
- children: b ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(h, { className: "h-4 w-4 animate-spin" }), "Generating…"] }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(ce, { className: "h-4 w-4" }), "Generate"] })
438
- })]
439
- }),
440
- Ee && /* @__PURE__ */ E("div", {
441
- role: "alert",
442
- className: "mt-3 rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
443
- children: Ee
444
- }),
445
- /* @__PURE__ */ D("div", {
446
- className: "mt-4 overflow-hidden rounded-card border border-border-seam bg-bg-surface",
447
- children: [
448
- /* @__PURE__ */ D("div", {
449
- className: "flex items-center justify-between border-b border-border-subtle px-3 py-2",
450
- children: [/* @__PURE__ */ E("span", {
451
- className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
452
- children: "Generated"
453
- }), /* @__PURE__ */ D("div", {
454
- className: "flex items-center gap-1",
455
- children: [/* @__PURE__ */ E("button", {
456
- type: "button",
457
- onClick: () => void Q("out-all", Ie),
458
- disabled: N.length === 0,
459
- className: "inline-flex min-h-[32px] items-center gap-1 rounded px-2 text-xs font-medium text-primary transition-colors hover:bg-bg-sunken disabled:opacity-40",
460
- children: R === "out-all" ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(u, { className: "h-3.5 w-3.5" }), " Copied"] }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(ae, { className: "h-3.5 w-3.5" }), " Copy"] })
461
- }), /* @__PURE__ */ E("button", {
462
- type: "button",
463
- onClick: () => void $("out-all", Ie, Y),
464
- disabled: N.length === 0 || z === "out-all" || V.has("out-all"),
465
- className: "inline-flex min-h-[32px] items-center gap-1 rounded px-2 text-xs font-medium text-primary transition-colors hover:bg-bg-sunken disabled:opacity-40",
466
- children: z === "out-all" ? /* @__PURE__ */ D(T, { children: [
467
- /* @__PURE__ */ E(h, { className: "h-3.5 w-3.5 animate-spin" }),
468
- " ",
469
- "Saving"
470
- ] }) : V.has("out-all") ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(u, { className: "h-3.5 w-3.5" }), " Saved"] }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(d, { className: "h-3.5 w-3.5" }), " Insert"] })
420
+ /* @__PURE__ */ O("div", {
421
+ className: "mt-3 flex flex-col gap-2 sm:flex-row",
422
+ children: [X.length > 0 ? /* @__PURE__ */ O(ge, {
423
+ value: Z,
424
+ onValueChange: N,
425
+ disabled: !Y?.isAvailable,
426
+ children: [/* @__PURE__ */ D(ye, {
427
+ "aria-label": "Model",
428
+ className: "h-11 flex-1",
429
+ children: /* @__PURE__ */ O("span", {
430
+ className: "flex items-center gap-2 truncate",
431
+ children: [/* @__PURE__ */ D(se, { className: "h-4 w-4 shrink-0 text-text-muted" }), /* @__PURE__ */ D(be, { placeholder: "Model" })]
432
+ })
433
+ }), /* @__PURE__ */ D(_e, { children: X.map((e) => /* @__PURE__ */ D(ve, {
434
+ value: e,
435
+ children: e
436
+ }, e)) })]
437
+ }) : /* @__PURE__ */ O("div", {
438
+ className: "flex h-11 flex-1 items-center gap-2 rounded-input border border-border-default bg-bg-surface px-3 text-sm text-text-secondary",
439
+ children: [/* @__PURE__ */ D(se, { className: "h-4 w-4 text-text-muted" }), /* @__PURE__ */ D("span", {
440
+ className: "truncate",
441
+ children: Y?.provider ?? "Default model"
471
442
  })]
443
+ }), /* @__PURE__ */ D("button", {
444
+ type: "button",
445
+ onClick: () => void Le(),
446
+ disabled: x || !k.trim() || !Y?.isAvailable,
447
+ className: n("inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md px-5 text-sm font-semibold transition-colors sm:min-w-[132px]", x || !k.trim() || !Y?.isAvailable ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
448
+ children: x ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(g, { className: "h-4 w-4 animate-spin" }), "Generating…"] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(le, { className: "h-4 w-4" }), "Generate"] })
472
449
  })]
473
450
  }),
474
- /* @__PURE__ */ E("div", {
475
- className: "max-h-[340px] min-h-[148px] overflow-y-auto p-3",
476
- children: b ? /* @__PURE__ */ D("div", {
477
- className: "flex h-[124px] flex-col items-center justify-center gap-2 text-text-secondary",
478
- children: [/* @__PURE__ */ E(h, { className: "h-5 w-5 animate-spin" }), /* @__PURE__ */ E("span", {
479
- className: "text-xs",
480
- children: "Generating your content…"
481
- })]
482
- }) : N.length === 0 ? /* @__PURE__ */ D("div", {
483
- className: "flex h-[124px] flex-col items-center justify-center gap-2 text-center text-text-secondary",
484
- children: [/* @__PURE__ */ E(S, { className: "h-5 w-5 opacity-60" }), /* @__PURE__ */ E("span", {
485
- className: "text-xs",
486
- children: "Your generated content will appear here."
487
- })]
488
- }) : /* @__PURE__ */ E("div", {
489
- className: "space-y-3",
490
- children: N.map((e, t) => {
491
- let r = `out-${t}`;
492
- return /* @__PURE__ */ D("div", {
493
- className: n(N.length > 1 && "rounded-md border border-border-subtle bg-bg-sunken p-3"),
494
- children: [N.length > 1 && /* @__PURE__ */ D("div", {
495
- className: "mb-1.5 flex items-center justify-between",
496
- children: [/* @__PURE__ */ D("span", {
497
- className: "text-xs font-medium text-text-secondary",
498
- children: ["Variation ", t + 1]
499
- }), /* @__PURE__ */ D("div", {
500
- className: "flex items-center gap-2",
501
- children: [/* @__PURE__ */ E("button", {
502
- type: "button",
503
- onClick: () => void Q(r, e),
504
- className: "text-xs font-medium text-primary hover:underline",
505
- children: R === r ? "Copied" : "Copy"
506
- }), /* @__PURE__ */ E("button", {
507
- type: "button",
508
- onClick: () => void $(r, e, Y),
509
- disabled: z === r || V.has(r),
510
- className: "text-xs font-medium text-primary hover:underline disabled:opacity-60",
511
- children: z === r ? "Saving" : V.has(r) ? "Saved" : "Insert"
451
+ De && /* @__PURE__ */ D("div", {
452
+ role: "alert",
453
+ className: "mt-3 rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
454
+ children: De
455
+ }),
456
+ /* @__PURE__ */ O("div", {
457
+ className: "mt-4 overflow-hidden rounded-card border border-border-seam bg-bg-surface",
458
+ children: [
459
+ /* @__PURE__ */ O("div", {
460
+ className: "flex items-center justify-between border-b border-border-subtle px-3 py-2",
461
+ children: [/* @__PURE__ */ D("span", {
462
+ className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
463
+ children: "Generated"
464
+ }), /* @__PURE__ */ O("div", {
465
+ className: "flex items-center gap-1",
466
+ children: [/* @__PURE__ */ D("button", {
467
+ type: "button",
468
+ onClick: () => void Q("out-all", Re),
469
+ disabled: P.length === 0,
470
+ className: "inline-flex min-h-[32px] items-center gap-1 rounded px-2 text-xs font-medium text-primary transition-colors hover:bg-bg-sunken disabled:opacity-40",
471
+ children: z === "out-all" ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(u, { className: "h-3.5 w-3.5" }), " Copied"] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(oe, { className: "h-3.5 w-3.5" }), " Copy"] })
472
+ }), /* @__PURE__ */ D("button", {
473
+ type: "button",
474
+ onClick: () => void $("out-all", Re, Y),
475
+ disabled: P.length === 0 || B === "out-all" || V.has("out-all"),
476
+ className: "inline-flex min-h-[32px] items-center gap-1 rounded px-2 text-xs font-medium text-primary transition-colors hover:bg-bg-sunken disabled:opacity-40",
477
+ children: B === "out-all" ? /* @__PURE__ */ O(E, { children: [
478
+ /* @__PURE__ */ D(g, { className: "h-3.5 w-3.5 animate-spin" }),
479
+ " ",
480
+ "Saving"
481
+ ] }) : V.has("out-all") ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(u, { className: "h-3.5 w-3.5" }), " Saved"] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(f, { className: "h-3.5 w-3.5" }), " Insert"] })
482
+ })]
483
+ })]
484
+ }),
485
+ /* @__PURE__ */ D("div", {
486
+ className: "max-h-[340px] min-h-[148px] overflow-y-auto p-3",
487
+ children: x ? /* @__PURE__ */ O("div", {
488
+ className: "flex h-[124px] flex-col items-center justify-center gap-2 text-text-secondary",
489
+ children: [/* @__PURE__ */ D(g, { className: "h-5 w-5 animate-spin" }), /* @__PURE__ */ D("span", {
490
+ className: "text-xs",
491
+ children: "Generating your content…"
492
+ })]
493
+ }) : P.length === 0 ? /* @__PURE__ */ O("div", {
494
+ className: "flex h-[124px] flex-col items-center justify-center gap-2 text-center text-text-secondary",
495
+ children: [/* @__PURE__ */ D(C, { className: "h-5 w-5 opacity-60" }), /* @__PURE__ */ D("span", {
496
+ className: "text-xs",
497
+ children: "Your generated content will appear here."
498
+ })]
499
+ }) : /* @__PURE__ */ D("div", {
500
+ className: "space-y-3",
501
+ children: P.map((e, t) => {
502
+ let r = `out-${t}`;
503
+ return /* @__PURE__ */ O("div", {
504
+ className: n(P.length > 1 && "rounded-md border border-border-subtle bg-bg-sunken p-3"),
505
+ children: [P.length > 1 && /* @__PURE__ */ O("div", {
506
+ className: "mb-1.5 flex items-center justify-between",
507
+ children: [/* @__PURE__ */ O("span", {
508
+ className: "text-xs font-medium text-text-secondary",
509
+ children: ["Variation ", t + 1]
510
+ }), /* @__PURE__ */ O("div", {
511
+ className: "flex items-center gap-2",
512
+ children: [/* @__PURE__ */ D("button", {
513
+ type: "button",
514
+ onClick: () => void Q(r, e),
515
+ className: "text-xs font-medium text-primary hover:underline",
516
+ children: z === r ? "Copied" : "Copy"
517
+ }), /* @__PURE__ */ D("button", {
518
+ type: "button",
519
+ onClick: () => void $(r, e, Y),
520
+ disabled: B === r || V.has(r),
521
+ className: "text-xs font-medium text-primary hover:underline disabled:opacity-60",
522
+ children: B === r ? "Saving" : V.has(r) ? "Saved" : "Insert"
523
+ })]
524
+ })]
525
+ }), /* @__PURE__ */ D("p", {
526
+ className: "whitespace-pre-wrap text-sm text-text-primary",
527
+ children: e
512
528
  })]
513
- })]
514
- }), /* @__PURE__ */ E("p", {
515
- className: "whitespace-pre-wrap text-sm text-text-primary",
516
- children: e
529
+ }, r);
530
+ })
531
+ })
532
+ }),
533
+ (I || U) && /* @__PURE__ */ O("div", {
534
+ className: "flex items-center justify-between gap-2 border-t border-border-subtle px-3 py-2 text-xs",
535
+ children: [I ? /* @__PURE__ */ O("span", {
536
+ className: "flex items-center gap-3 text-text-secondary",
537
+ children: [I.durationMs != null && /* @__PURE__ */ O("span", {
538
+ className: "flex items-center gap-1",
539
+ children: [
540
+ /* @__PURE__ */ D(d, { className: "h-3 w-3" }),
541
+ (I.durationMs / 1e3).toFixed(1),
542
+ "s"
543
+ ]
544
+ }), I.tokensUsed != null && /* @__PURE__ */ O("span", {
545
+ className: "flex items-center gap-1",
546
+ children: [
547
+ /* @__PURE__ */ D(de, { className: "h-3 w-3" }),
548
+ i(I.tokensUsed),
549
+ " tokens"
550
+ ]
517
551
  })]
518
- }, r);
552
+ }) : /* @__PURE__ */ D("span", {}), U && /* @__PURE__ */ D("span", {
553
+ className: "text-status-error-text",
554
+ children: U
555
+ })]
519
556
  })
520
- })
557
+ ]
521
558
  }),
522
- (F || U) && /* @__PURE__ */ D("div", {
523
- className: "flex items-center justify-between gap-2 border-t border-border-subtle px-3 py-2 text-xs",
524
- children: [F ? /* @__PURE__ */ D("span", {
525
- className: "flex items-center gap-3 text-text-secondary",
526
- children: [F.durationMs != null && /* @__PURE__ */ D("span", {
527
- className: "flex items-center gap-1",
528
- children: [
529
- /* @__PURE__ */ E(ie, { className: "h-3 w-3" }),
530
- (F.durationMs / 1e3).toFixed(1),
531
- "s"
532
- ]
533
- }), F.tokensUsed != null && /* @__PURE__ */ D("span", {
534
- className: "flex items-center gap-1",
535
- children: [
536
- /* @__PURE__ */ E(ue, { className: "h-3 w-3" }),
537
- i(F.tokensUsed),
538
- " tokens"
539
- ]
540
- })]
541
- }) : /* @__PURE__ */ E("span", {}), U && /* @__PURE__ */ E("span", {
542
- className: "text-status-error-text",
543
- children: U
544
- })]
559
+ V.size > 0 && /* @__PURE__ */ O("button", {
560
+ type: "button",
561
+ onClick: () => v(y + "/content"),
562
+ className: "mt-3 inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
563
+ children: [/* @__PURE__ */ D(f, { className: "h-3.5 w-3.5" }), "View saved drafts in Content"]
545
564
  })
546
565
  ]
547
- }),
548
- V.size > 0 && /* @__PURE__ */ D("button", {
549
- type: "button",
550
- onClick: () => _(se + "/content"),
551
- className: "mt-3 inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
552
- children: [/* @__PURE__ */ E(d, { className: "h-3.5 w-3.5" }), "View saved drafts in Content"]
553
566
  })
554
- ]
567
+ })]
568
+ }),
569
+ /* @__PURE__ */ D(re, {
570
+ executions: K,
571
+ tools: G
555
572
  })
556
- })]
557
- })] })
558
- })]
573
+ ] })
574
+ })
575
+ ]
559
576
  });
560
577
  };
561
578
  //#endregion
562
- export { M as AIToolsPage };
579
+ export { N as AIToolsPage };
563
580
 
564
581
  //# sourceMappingURL=AIToolsPage.js.map