@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
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { ContentAIProvenance } from '../../types';
3
+
4
+ /** Short badge text for a provenance record. */
5
+ export declare function aiBadgeLabel(provenance: ContentAIProvenance): string;
6
+ /** Longer description used for the tooltip and screen readers. */
7
+ export declare function aiBadgeDescription(provenance: ContentAIProvenance): string;
8
+ export declare const AIGeneratedBadge: FC<{
9
+ provenance: ContentAIProvenance | null;
10
+ className?: string;
11
+ }>;
12
+ //# sourceMappingURL=AIGeneratedBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIGeneratedBadge.d.ts","sourceRoot":"","sources":["../../../../src/headshotmarketing/pages/content/AIGeneratedBadge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,gDAAgD;AAChD,wBAAgB,YAAY,CAAC,UAAU,EAAE,mBAAmB,GAAG,MAAM,CAKpE;AAED,kEAAkE;AAClE,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,mBAAmB,GAAG,MAAM,CAO1E;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC;IAChC,UAAU,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAkBA,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { cn as e } from "../../utils/helpers.js";
2
+ import { Sparkles as t } from "lucide-react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region src/headshotmarketing/pages/content/AIGeneratedBadge.tsx
5
+ function i(e) {
6
+ return e.digitalSourceType === "algorithmicMedia" ? "Auto-generated" : e.humanEdited ? "AI-assisted" : "AI-generated";
7
+ }
8
+ function a(e) {
9
+ let t = [e.provider, e.model].filter(Boolean).join(" / ");
10
+ return t ? `${e.disclosure} (${t})` : e.disclosure;
11
+ }
12
+ var o = ({ provenance: o, className: s }) => {
13
+ if (!o) return null;
14
+ let c = a(o);
15
+ return /* @__PURE__ */ r("span", {
16
+ "data-testid": "ai-generated-badge",
17
+ "data-digital-source-type": o.digitalSourceType,
18
+ title: c,
19
+ "aria-label": c,
20
+ className: e("inline-flex shrink-0 items-center gap-1 rounded-md border border-border-seam bg-[var(--color-accent-soft)] px-2 py-0.5 text-[11px] font-semibold text-action-primary-bg", s),
21
+ children: [/* @__PURE__ */ n(t, {
22
+ className: "h-3 w-3",
23
+ "aria-hidden": "true"
24
+ }), i(o)]
25
+ });
26
+ };
27
+ //#endregion
28
+ export { o as AIGeneratedBadge, a as aiBadgeDescription };
29
+
30
+ //# sourceMappingURL=AIGeneratedBadge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIGeneratedBadge.js","names":[],"sources":["../../../../src/headshotmarketing/pages/content/AIGeneratedBadge.tsx"],"sourcesContent":["/**\n * AIGeneratedBadge\n *\n * Visible disclosure for content an AI system generated (EU AI Act Art. 50).\n * Renders from the server-recorded `aiProvenance` of a content item, so the\n * label always matches the machine-readable marking (IPTC Digital Source\n * Type) the backend exposes and exports. Renders nothing for non-AI content.\n *\n * @module headshotmarketing/pages/content\n */\n\nimport type { FC } from \"react\";\nimport { Sparkles } from \"lucide-react\";\nimport { cn } from \"../../utils/helpers\";\nimport type { ContentAIProvenance } from \"../../types\";\n\n/** Short badge text for a provenance record. */\nexport function aiBadgeLabel(provenance: ContentAIProvenance): string {\n if (provenance.digitalSourceType === \"algorithmicMedia\") {\n return \"Auto-generated\";\n }\n return provenance.humanEdited ? \"AI-assisted\" : \"AI-generated\";\n}\n\n/** Longer description used for the tooltip and screen readers. */\nexport function aiBadgeDescription(provenance: ContentAIProvenance): string {\n const engine = [provenance.provider, provenance.model]\n .filter(Boolean)\n .join(\" / \");\n return engine\n ? `${provenance.disclosure} (${engine})`\n : provenance.disclosure;\n}\n\nexport const AIGeneratedBadge: FC<{\n provenance: ContentAIProvenance | null;\n className?: string;\n}> = ({ provenance, className }) => {\n if (!provenance) return null;\n const description = aiBadgeDescription(provenance);\n return (\n <span\n data-testid=\"ai-generated-badge\"\n data-digital-source-type={provenance.digitalSourceType}\n title={description}\n aria-label={description}\n className={cn(\n \"inline-flex shrink-0 items-center gap-1 rounded-md border border-border-seam bg-[var(--color-accent-soft)] px-2 py-0.5 text-[11px] font-semibold text-action-primary-bg\",\n className,\n )}\n >\n <Sparkles className=\"h-3 w-3\" aria-hidden=\"true\" />\n {aiBadgeLabel(provenance)}\n </span>\n );\n};\n"],"mappings":";;;;AAiBA,SAAgB,EAAa,GAAyC;AAIpE,QAHI,EAAW,sBAAsB,qBAC5B,mBAEF,EAAW,cAAc,gBAAgB;;AAIlD,SAAgB,EAAmB,GAAyC;CAC1E,IAAM,IAAS,CAAC,EAAW,UAAU,EAAW,MAAM,CACnD,OAAO,QAAQ,CACf,KAAK,MAAM;AACd,QAAO,IACH,GAAG,EAAW,WAAW,IAAI,EAAO,KACpC,EAAW;;AAGjB,IAAa,KAGP,EAAE,eAAY,mBAAgB;AAClC,KAAI,CAAC,EAAY,QAAO;CACxB,IAAM,IAAc,EAAmB,EAAW;AAClD,QACE,kBAAC,QAAD;EACE,eAAY;EACZ,4BAA0B,EAAW;EACrC,OAAO;EACP,cAAY;EACZ,WAAW,EACT,2KACA,EACD;YARH,CAUE,kBAAC,GAAD;GAAU,WAAU;GAAU,eAAY;GAAS,CAAA,EAClD,EAAa,EAAW,CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"AIToolsPage.d.ts","sourceRoot":"","sources":["../../../../src/headshotmarketing/pages/content/AIToolsPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAgC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAkM9D,eAAO,MAAM,WAAW,EAAE,EAgwBzB,CAAC"}
1
+ {"version":3,"file":"AIToolsPage.d.ts","sourceRoot":"","sources":["../../../../src/headshotmarketing/pages/content/AIToolsPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAgC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAkM9D,eAAO,MAAM,WAAW,EAAE,EAmxBzB,CAAC"}
@@ -56,7 +56,7 @@ function we(e, t) {
56
56
  let n = e.toLowerCase();
57
57
  return n.includes("blog") ? x : n.includes("subject line") || n.includes("email") ? v : n.includes("caption") || n.includes("social") ? b : n.includes("ad copy") || n.includes("ad ") || n.includes("advert") ? y : n.includes("seo") || n.includes("meta") || n.includes("keyword") ? C : n.includes("alt") || n.includes("image") || n.includes("photo") ? h : n.includes("repurpose") || n.includes("remix") ? m : n.includes("voice") || n.includes("tone") ? ce : n.includes("translat") ? g : n.includes("summar") ? S : n.includes("video") || n.includes("script") ? T : A[t] ?? w;
58
58
  }
59
- function j(e, t) {
59
+ function Te(e, t) {
60
60
  let n = e.toLowerCase();
61
61
  if (n.includes("blog")) return o.BlogPost;
62
62
  if (n.includes("caption") || n.includes("social")) return o.SocialPost;
@@ -70,23 +70,23 @@ function j(e, t) {
70
70
  default: return o.Other;
71
71
  }
72
72
  }
73
- function Te(e, t) {
73
+ function Ee(e, t) {
74
74
  let n = e.split("\n").find((e) => e.trim())?.trim() ?? "";
75
75
  return (n.length > 64 ? `${n.slice(0, 61)}…` : n) || `${t} draft`;
76
76
  }
77
- var M = () => {
78
- let { data: m, loading: h, error: g, refetch: v } = te(), { navigate: y, basePath: b } = t(), { copy: ce } = fe(), [x, { loading: S }] = pe(Se), [C] = e(), [T, E] = d(null), [A, M] = d(""), [Ee, De] = d(""), [N, P] = d([]), [F, I] = d(null), [Oe, L] = d(null), [R, ke] = d(null), [z, Ae] = d(null), [B, V] = d(/* @__PURE__ */ new Set()), [H, U] = d(null), W = u(() => m?.headshotmarketingAITools.items ?? [], [m]), G = u(() => m?.headshotmarketingAIToolExecutions.items ?? [], [m]), K = u(() => {
77
+ var j = () => {
78
+ let { data: m, loading: h, error: g, refetch: v } = te(), { navigate: y, basePath: b } = t(), { copy: ce } = fe(), [x, { loading: S }] = pe(Se), [C] = e(), [T, E] = d(null), [A, j] = d(""), [De, Oe] = d(""), [M, N] = d([]), [P, F] = d(null), [ke, I] = d(null), [Ae, L] = d(null), [R, je] = d(null), [z, Me] = d(null), [B, V] = d(/* @__PURE__ */ new Set()), [H, U] = d(null), W = u(() => m?.headshotmarketingAITools.items ?? [], [m]), G = u(() => m?.headshotmarketingAIToolExecutions.items ?? [], [m]), K = u(() => {
79
79
  let e = /* @__PURE__ */ new Date();
80
80
  return new Date(e.getFullYear(), e.getMonth(), 1).getTime();
81
- }, []), je = u(() => {
81
+ }, []), Ne = u(() => {
82
82
  let e = /* @__PURE__ */ new Map();
83
83
  for (let t of G) new Date(t.createdAt).getTime() >= K && e.set(t.toolId, (e.get(t.toolId) ?? 0) + 1);
84
84
  return e;
85
- }, [G, K]), Me = u(() => {
85
+ }, [G, K]), Pe = u(() => {
86
86
  let e = 0;
87
87
  for (let t of G) new Date(t.createdAt).getTime() >= K && (e += t.tokensUsed ?? 0);
88
88
  return e;
89
- }, [G, K]), Ne = u(() => G.filter((e) => new Date(e.createdAt).getTime() >= K).length, [G, K]), Pe = u(() => {
89
+ }, [G, K]), Fe = u(() => G.filter((e) => new Date(e.createdAt).getTime() >= K).length, [G, K]), Ie = u(() => {
90
90
  let e = /* @__PURE__ */ new Map();
91
91
  for (let t of W) {
92
92
  if (!t.model) continue;
@@ -104,19 +104,19 @@ var M = () => {
104
104
  isAvailable: e.isEnabled,
105
105
  icon: we(e.name, e.category),
106
106
  inputType: e.category === a.SeoOptimization ? "url" : "text",
107
- contentType: j(e.name, e.category),
108
- monthlyUses: je.get(e.id) ?? 0
109
- })), [W, je]), Fe = u(() => new Map(q.map((e) => [e.id, e])), [q]), J = q.find((e) => e.id === T), Ie = q.filter((e) => e.isAvailable).length;
107
+ contentType: Te(e.name, e.category),
108
+ monthlyUses: Ne.get(e.id) ?? 0
109
+ })), [W, Ne]), Le = u(() => new Map(q.map((e) => [e.id, e])), [q]), J = q.find((e) => e.id === T), Re = q.filter((e) => e.isAvailable).length;
110
110
  ie(() => {
111
111
  !T && q.length > 0 && E((q.find((e) => e.isAvailable) ?? q[0]).id);
112
112
  }, [T, q]);
113
113
  let Y = u(() => {
114
114
  if (!J) return [];
115
- let e = new Set(Pe.get(J.provider) ?? []);
115
+ let e = new Set(Ie.get(J.provider) ?? []);
116
116
  return J.model && e.add(J.model), Array.from(e);
117
- }, [J, Pe]), X = Ee || J?.model || Y[0] || "", Le = (e) => {
118
- E(e), P([]), I(null), L(null), U(null), M(""), De(""), V(/* @__PURE__ */ new Set());
119
- }, Re = async () => {
117
+ }, [J, Ie]), X = De || J?.model || Y[0] || "", ze = (e) => {
118
+ E(e), N([]), I(null), F(null), L(null), U(null), j(""), Oe(""), V(/* @__PURE__ */ new Set());
119
+ }, Be = async () => {
120
120
  if (!(!A.trim() || !J || !J.isAvailable)) {
121
121
  L(null), U(null), V(/* @__PURE__ */ new Set());
122
122
  try {
@@ -129,7 +129,7 @@ var M = () => {
129
129
  } : { provider: J.provider }
130
130
  } } })).data?.headshotmarketingExecuteAITool;
131
131
  if (!e) throw Error("No response from the tool.");
132
- e.status === "FAILED" ? (P([]), I(null), L(e.errorMessage ?? "The tool failed to generate a result. Please try again.")) : (P(l(e.output)), I({
132
+ e.status === "FAILED" ? (N([]), I(null), F(null), L(e.errorMessage ?? "The tool failed to generate a result. Please try again.")) : (N(l(e.output)), I(e.id), F({
133
133
  tokensUsed: e.tokensUsed,
134
134
  durationMs: e.durationMs
135
135
  })), await v();
@@ -138,17 +138,18 @@ var M = () => {
138
138
  }
139
139
  }
140
140
  }, Z = async (e, t) => {
141
- await ce(t), ke(e), window.setTimeout(() => ke((t) => t === e ? null : t), 1500);
142
- }, Q = async (e, t, n) => {
141
+ await ce(t), je(e), window.setTimeout(() => je((t) => t === e ? null : t), 1500);
142
+ }, Q = async (e, t, n, r) => {
143
143
  if (t.trim()) {
144
- U(null), Ae(e);
144
+ U(null), Me(e);
145
145
  try {
146
146
  await C({ variables: { input: {
147
- title: Te(t, n?.name ?? "AI"),
147
+ title: Ee(t, n?.name ?? "AI"),
148
148
  body: t,
149
149
  summary: t.replace(/\s+/g, " ").trim().slice(0, 180),
150
- type: n ? j(n.name, n.category) : o.Other,
150
+ type: n ? Te(n.name, n.category) : o.Other,
151
151
  tags: ["ai-generated"],
152
+ aiToolExecutionId: r,
152
153
  metadata: {
153
154
  source: "ai-tools",
154
155
  toolId: n?.id ?? null,
@@ -159,23 +160,23 @@ var M = () => {
159
160
  } catch (e) {
160
161
  U(e instanceof Error ? e.message : "Could not save draft.");
161
162
  } finally {
162
- Ae(null);
163
+ Me(null);
163
164
  }
164
165
  }
165
- }, $ = N.join("\n\n"), ze = [
166
+ }, $ = M.join("\n\n"), Ve = [
166
167
  {
167
168
  label: "Available tools",
168
- value: String(Ie),
169
+ value: String(Re),
169
170
  icon: ue
170
171
  },
171
172
  {
172
173
  label: "Generations this month",
173
- value: i(Ne),
174
+ value: i(Fe),
174
175
  icon: w
175
176
  },
176
177
  {
177
178
  label: "Tokens this month",
178
- value: i(Me),
179
+ value: i(Pe),
179
180
  icon: de
180
181
  }
181
182
  ];
@@ -201,7 +202,7 @@ var M = () => {
201
202
  }) : /* @__PURE__ */ k(D, { children: [
202
203
  /* @__PURE__ */ O("div", {
203
204
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
204
- children: ze.map((e) => {
205
+ children: Ve.map((e) => {
205
206
  let t = e.icon;
206
207
  return /* @__PURE__ */ k(me, {
207
208
  treatment: "metric",
@@ -235,7 +236,7 @@ var M = () => {
235
236
  let t = e.icon, r = T === e.id;
236
237
  return /* @__PURE__ */ k("button", {
237
238
  type: "button",
238
- onClick: () => Le(e.id),
239
+ onClick: () => ze(e.id),
239
240
  disabled: !e.isAvailable,
240
241
  "aria-pressed": r,
241
242
  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"),
@@ -284,7 +285,7 @@ var M = () => {
284
285
  }) : /* @__PURE__ */ O("div", {
285
286
  className: "space-y-3",
286
287
  children: G.map((e) => {
287
- let t = Fe.get(e.toolId), n = l(e.input)[0] ?? "—", i = l(e.output)[0] ?? "—", a = t?.icon ?? w, o = `gen-${e.id}`, s = B.has(o);
288
+ let t = Le.get(e.toolId), n = l(e.input)[0] ?? "—", i = l(e.output)[0] ?? "—", a = t?.icon ?? w, o = `gen-${e.id}`, s = B.has(o);
288
289
  return /* @__PURE__ */ k("div", {
289
290
  className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
290
291
  children: [
@@ -318,7 +319,7 @@ var M = () => {
318
319
  children: R === o ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(f, { className: "h-3 w-3" }), " Copied"] }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(oe, { className: "h-3 w-3" }), " Copy"] })
319
320
  }), /* @__PURE__ */ O("button", {
320
321
  type: "button",
321
- onClick: () => void Q(o, i, t),
322
+ onClick: () => void Q(o, i, t, e.id),
322
323
  disabled: z === o || s,
323
324
  className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline disabled:opacity-60",
324
325
  children: z === o ? /* @__PURE__ */ k(D, { children: [
@@ -361,20 +362,20 @@ var M = () => {
361
362
  }),
362
363
  /* @__PURE__ */ O(xe, {
363
364
  value: A,
364
- onChange: (e) => M(e.target.value),
365
+ onChange: (e) => j(e.target.value),
365
366
  disabled: !J?.isAvailable,
366
367
  placeholder: J?.inputType === "url" ? "https://your-website.com/page" : "Describe what you want to generate… (Enter to generate, Shift+Enter for a new line)",
367
368
  rows: 4,
368
369
  className: "min-h-[112px] resize-y",
369
370
  onKeyDown: (e) => {
370
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Re());
371
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Be());
371
372
  }
372
373
  }),
373
374
  /* @__PURE__ */ k("div", {
374
375
  className: "mt-3 flex flex-col gap-2 sm:flex-row",
375
376
  children: [Y.length > 0 ? /* @__PURE__ */ k(ge, {
376
377
  value: X,
377
- onValueChange: De,
378
+ onValueChange: Oe,
378
379
  disabled: !J?.isAvailable,
379
380
  children: [/* @__PURE__ */ O(ye, {
380
381
  "aria-label": "Model",
@@ -395,16 +396,16 @@ var M = () => {
395
396
  })]
396
397
  }), /* @__PURE__ */ O("button", {
397
398
  type: "button",
398
- onClick: () => void Re(),
399
+ onClick: () => void Be(),
399
400
  disabled: S || !A.trim() || !J?.isAvailable,
400
401
  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]", S || !A.trim() || !J?.isAvailable ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
401
402
  children: S ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(_, { className: "h-4 w-4 animate-spin" }), "Generating…"] }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(le, { className: "h-4 w-4" }), "Generate"] })
402
403
  })]
403
404
  }),
404
- Oe && /* @__PURE__ */ O("div", {
405
+ Ae && /* @__PURE__ */ O("div", {
405
406
  role: "alert",
406
407
  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",
407
- children: Oe
408
+ children: Ae
408
409
  }),
409
410
  /* @__PURE__ */ k("div", {
410
411
  className: "mt-4 overflow-hidden rounded-card border border-border-seam bg-bg-surface",
@@ -419,13 +420,13 @@ var M = () => {
419
420
  children: [/* @__PURE__ */ O("button", {
420
421
  type: "button",
421
422
  onClick: () => void Z("out-all", $),
422
- disabled: N.length === 0,
423
+ disabled: M.length === 0,
423
424
  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",
424
425
  children: R === "out-all" ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(f, { className: "h-3.5 w-3.5" }), " Copied"] }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(oe, { className: "h-3.5 w-3.5" }), " Copy"] })
425
426
  }), /* @__PURE__ */ O("button", {
426
427
  type: "button",
427
- onClick: () => void Q("out-all", $, J),
428
- disabled: N.length === 0 || z === "out-all" || B.has("out-all"),
428
+ onClick: () => void Q("out-all", $, J, ke),
429
+ disabled: M.length === 0 || z === "out-all" || B.has("out-all"),
429
430
  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",
430
431
  children: z === "out-all" ? /* @__PURE__ */ k(D, { children: [
431
432
  /* @__PURE__ */ O(_, { className: "h-3.5 w-3.5 animate-spin" }),
@@ -443,7 +444,7 @@ var M = () => {
443
444
  className: "text-xs",
444
445
  children: "Generating your content…"
445
446
  })]
446
- }) : N.length === 0 ? /* @__PURE__ */ k("div", {
447
+ }) : M.length === 0 ? /* @__PURE__ */ k("div", {
447
448
  className: "flex h-[124px] flex-col items-center justify-center gap-2 text-center text-text-secondary",
448
449
  children: [/* @__PURE__ */ O(w, { className: "h-5 w-5 opacity-60" }), /* @__PURE__ */ O("span", {
449
450
  className: "text-xs",
@@ -451,11 +452,11 @@ var M = () => {
451
452
  })]
452
453
  }) : /* @__PURE__ */ O("div", {
453
454
  className: "space-y-3",
454
- children: N.map((e, t) => {
455
+ children: M.map((e, t) => {
455
456
  let r = `out-${t}`;
456
457
  return /* @__PURE__ */ k("div", {
457
- className: n(N.length > 1 && "rounded-md border border-border-subtle bg-bg-sunken p-3"),
458
- children: [N.length > 1 && /* @__PURE__ */ k("div", {
458
+ className: n(M.length > 1 && "rounded-md border border-border-subtle bg-bg-sunken p-3"),
459
+ children: [M.length > 1 && /* @__PURE__ */ k("div", {
459
460
  className: "mb-1.5 flex items-center justify-between",
460
461
  children: [/* @__PURE__ */ k("span", {
461
462
  className: "text-xs font-medium text-text-secondary",
@@ -469,7 +470,7 @@ var M = () => {
469
470
  children: R === r ? "Copied" : "Copy"
470
471
  }), /* @__PURE__ */ O("button", {
471
472
  type: "button",
472
- onClick: () => void Q(r, e, J),
473
+ onClick: () => void Q(r, e, J, ke),
473
474
  disabled: z === r || B.has(r),
474
475
  className: "text-xs font-medium text-primary hover:underline disabled:opacity-60",
475
476
  children: z === r ? "Saving" : B.has(r) ? "Saved" : "Insert"
@@ -483,22 +484,22 @@ var M = () => {
483
484
  })
484
485
  })
485
486
  }),
486
- (F || H) && /* @__PURE__ */ k("div", {
487
+ (P || H) && /* @__PURE__ */ k("div", {
487
488
  className: "flex items-center justify-between gap-2 border-t border-border-subtle px-3 py-2 text-xs",
488
- children: [F ? /* @__PURE__ */ k("span", {
489
+ children: [P ? /* @__PURE__ */ k("span", {
489
490
  className: "flex items-center gap-3 text-text-secondary",
490
- children: [F.durationMs != null && /* @__PURE__ */ k("span", {
491
+ children: [P.durationMs != null && /* @__PURE__ */ k("span", {
491
492
  className: "flex items-center gap-1",
492
493
  children: [
493
494
  /* @__PURE__ */ O(ae, { className: "h-3 w-3" }),
494
- (F.durationMs / 1e3).toFixed(1),
495
+ (P.durationMs / 1e3).toFixed(1),
495
496
  "s"
496
497
  ]
497
- }), F.tokensUsed != null && /* @__PURE__ */ k("span", {
498
+ }), P.tokensUsed != null && /* @__PURE__ */ k("span", {
498
499
  className: "flex items-center gap-1",
499
500
  children: [
500
501
  /* @__PURE__ */ O(de, { className: "h-3 w-3" }),
501
- i(F.tokensUsed),
502
+ i(P.tokensUsed),
502
503
  " tokens"
503
504
  ]
504
505
  })]
@@ -529,6 +530,6 @@ var M = () => {
529
530
  });
530
531
  };
531
532
  //#endregion
532
- export { M as AIToolsPage };
533
+ export { j as AIToolsPage };
533
534
 
534
535
  //# sourceMappingURL=AIToolsPage.js.map