pxengine 0.1.116 → 0.1.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -132
- package/config/tailwind-preset.js +159 -159
- package/dist/index.cjs +260 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.mjs +260 -132
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +151 -141
- package/package.json +124 -124
package/dist/index.cjs
CHANGED
|
@@ -16129,6 +16129,10 @@ var RefreshIcon = () => /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("svg", {
|
|
|
16129
16129
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("polyline", { points: "23 4 23 10 17 10" }),
|
|
16130
16130
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })
|
|
16131
16131
|
] });
|
|
16132
|
+
var EditIcon = () => /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
16133
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
16134
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
|
|
16135
|
+
] });
|
|
16132
16136
|
var SlideTypeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
16133
16137
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("rect", { x: "3", y: "4", width: "18", height: "14", rx: "2" }),
|
|
16134
16138
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
|
@@ -16166,7 +16170,7 @@ var FORMATS = [
|
|
|
16166
16170
|
ext: ".html",
|
|
16167
16171
|
emoji: "\u{1F310}",
|
|
16168
16172
|
desc: "Interactive web presentation \u2014 download and open in browser",
|
|
16169
|
-
accent: { text: "text-
|
|
16173
|
+
accent: { text: "text-sky-400", bg: "bg-sky-500/10 border-sky-500/20" }
|
|
16170
16174
|
}
|
|
16171
16175
|
];
|
|
16172
16176
|
var ExportModal = ({ formats, title, onClose }) => {
|
|
@@ -16283,7 +16287,7 @@ var FullscreenModal = ({ url, title, slideCount, initialSlide = 1, onClose }) =>
|
|
|
16283
16287
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { className: "fixed inset-0 z-50 bg-black flex flex-col", children: [
|
|
16284
16288
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center justify-between gap-4 px-4 h-11 bg-zinc-950/90 border-b border-zinc-800/60 flex-shrink-0", children: [
|
|
16285
16289
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
16286
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "text-
|
|
16290
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "text-[#DCC99B] flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(SlidesIcon, {}) }),
|
|
16287
16291
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "text-sm font-medium text-zinc-300 truncate", children: title }),
|
|
16288
16292
|
slideCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("span", { className: "text-xs text-zinc-600 flex-shrink-0", children: [
|
|
16289
16293
|
currentSlide,
|
|
@@ -16297,7 +16301,7 @@ var FullscreenModal = ({ url, title, slideCount, initialSlide = 1, onClose }) =>
|
|
|
16297
16301
|
{
|
|
16298
16302
|
onClick: () => sendSlideCommand("prevSlide"),
|
|
16299
16303
|
disabled: !iframeReady,
|
|
16300
|
-
className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-
|
|
16304
|
+
className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-[#C0AE82] hover:text-[#DCC99B] text-zinc-400 flex items-center justify-center transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
|
|
16301
16305
|
"aria-label": "Previous slide",
|
|
16302
16306
|
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ChevronLeft2, {})
|
|
16303
16307
|
}
|
|
@@ -16307,7 +16311,7 @@ var FullscreenModal = ({ url, title, slideCount, initialSlide = 1, onClose }) =>
|
|
|
16307
16311
|
{
|
|
16308
16312
|
onClick: () => sendSlideCommand("nextSlide"),
|
|
16309
16313
|
disabled: !iframeReady,
|
|
16310
|
-
className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-
|
|
16314
|
+
className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-[#C0AE82] hover:text-[#DCC99B] text-zinc-400 flex items-center justify-center transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
|
|
16311
16315
|
"aria-label": "Next slide",
|
|
16312
16316
|
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ChevronRight2, {})
|
|
16313
16317
|
}
|
|
@@ -16362,6 +16366,8 @@ var PresentationJobCard = ({
|
|
|
16362
16366
|
approveOutlineUrl,
|
|
16363
16367
|
reorderSlidesUrl,
|
|
16364
16368
|
approveSlideUrl,
|
|
16369
|
+
setSlideTemplateUrl,
|
|
16370
|
+
templatesUrl,
|
|
16365
16371
|
regenerateUrl,
|
|
16366
16372
|
hideApproval = false,
|
|
16367
16373
|
className,
|
|
@@ -16384,6 +16390,7 @@ var PresentationJobCard = ({
|
|
|
16384
16390
|
const [, setTemplateVersionId] = (0, import_react78.useState)(initialTemplateVersionId || "");
|
|
16385
16391
|
const [reviewStatus, setReviewStatus] = (0, import_react78.useState)(initialReviewStatus || "");
|
|
16386
16392
|
const [outline, setOutline] = (0, import_react78.useState)(initialOutline);
|
|
16393
|
+
const [slideTemplateOptions, setSlideTemplateOptions] = (0, import_react78.useState)(null);
|
|
16387
16394
|
const [showExport, setShowExport] = (0, import_react78.useState)(false);
|
|
16388
16395
|
const [showFullscreen, setShowFullscreen] = (0, import_react78.useState)(false);
|
|
16389
16396
|
const [copied, setCopied] = (0, import_react78.useState)(false);
|
|
@@ -16438,6 +16445,33 @@ var PresentationJobCard = ({
|
|
|
16438
16445
|
(0, import_react78.useEffect)(() => {
|
|
16439
16446
|
if (initialOutline) setOutline(initialOutline);
|
|
16440
16447
|
}, [initialOutlineSlideCount]);
|
|
16448
|
+
(0, import_react78.useEffect)(() => {
|
|
16449
|
+
if (reviewStatus !== "pending_outline_approval" || slideTemplateOptions !== null) return;
|
|
16450
|
+
let cancelled = false;
|
|
16451
|
+
(async () => {
|
|
16452
|
+
try {
|
|
16453
|
+
const endpoint = templatesUrl || "/api/presentations/templates";
|
|
16454
|
+
const headers = {};
|
|
16455
|
+
if (authToken) headers.Authorization = `Bearer ${authToken}`;
|
|
16456
|
+
const res = await fetch(endpoint, { headers });
|
|
16457
|
+
if (!res.ok) throw new Error(`Templates fetch failed (${res.status})`);
|
|
16458
|
+
const list = await res.json();
|
|
16459
|
+
if (!cancelled && Array.isArray(list)) {
|
|
16460
|
+
setSlideTemplateOptions(
|
|
16461
|
+
list.map((t2) => ({
|
|
16462
|
+
id: t2.template_id || t2.id || "",
|
|
16463
|
+
name: t2.name || t2.template_id || t2.id || ""
|
|
16464
|
+
}))
|
|
16465
|
+
);
|
|
16466
|
+
}
|
|
16467
|
+
} catch {
|
|
16468
|
+
if (!cancelled) setSlideTemplateOptions([]);
|
|
16469
|
+
}
|
|
16470
|
+
})();
|
|
16471
|
+
return () => {
|
|
16472
|
+
cancelled = true;
|
|
16473
|
+
};
|
|
16474
|
+
}, [reviewStatus, slideTemplateOptions, templatesUrl, authToken]);
|
|
16441
16475
|
const updateScale = (0, import_react78.useCallback)(() => {
|
|
16442
16476
|
if (previewRef.current) setPreviewScale(previewRef.current.offsetWidth / 1280);
|
|
16443
16477
|
}, []);
|
|
@@ -16697,6 +16731,41 @@ var PresentationJobCard = ({
|
|
|
16697
16731
|
setRowBusyIndex(null);
|
|
16698
16732
|
}
|
|
16699
16733
|
};
|
|
16734
|
+
const setSlideTemplate = async (index, templateId2) => {
|
|
16735
|
+
if (!outline || !Array.isArray(outline.slides) || rowBusyIndex !== null) return;
|
|
16736
|
+
const slides = outline.slides;
|
|
16737
|
+
const previousOutline = outline;
|
|
16738
|
+
const updated = slides.map((s, i) => {
|
|
16739
|
+
if (i !== index) return s;
|
|
16740
|
+
if (!templateId2) {
|
|
16741
|
+
const { template_id: _drop, ...rest } = s;
|
|
16742
|
+
return rest;
|
|
16743
|
+
}
|
|
16744
|
+
return { ...s, template_id: templateId2 };
|
|
16745
|
+
});
|
|
16746
|
+
setOutline({ ...outline, slides: updated });
|
|
16747
|
+
setRowBusyIndex(index);
|
|
16748
|
+
setRowError(null);
|
|
16749
|
+
try {
|
|
16750
|
+
const endpoint = setSlideTemplateUrl || `/api/presentations/${_job_id}/outline/set-slide-template`;
|
|
16751
|
+
const headers = { "Content-Type": "application/json" };
|
|
16752
|
+
if (authToken) headers.Authorization = `Bearer ${authToken}`;
|
|
16753
|
+
const res = await fetch(endpoint, {
|
|
16754
|
+
method: "POST",
|
|
16755
|
+
headers,
|
|
16756
|
+
body: JSON.stringify({ slide_index: index, template_id: templateId2 || null })
|
|
16757
|
+
});
|
|
16758
|
+
if (!res.ok) {
|
|
16759
|
+
const err = await res.json().catch(() => ({}));
|
|
16760
|
+
throw new Error(err.detail || err.error || `Template update failed (${res.status})`);
|
|
16761
|
+
}
|
|
16762
|
+
} catch (e) {
|
|
16763
|
+
setOutline(previousOutline);
|
|
16764
|
+
setRowError(e instanceof Error ? e.message : "Could not update slide's template");
|
|
16765
|
+
} finally {
|
|
16766
|
+
setRowBusyIndex(null);
|
|
16767
|
+
}
|
|
16768
|
+
};
|
|
16700
16769
|
const handleApproveOutline = async () => {
|
|
16701
16770
|
if (!_job_id || approvingOutline) return;
|
|
16702
16771
|
const endpoint = approveOutlineUrl || `/api/presentations/${_job_id}/approve-outline`;
|
|
@@ -16818,11 +16887,11 @@ var PresentationJobCard = ({
|
|
|
16818
16887
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
16819
16888
|
"div",
|
|
16820
16889
|
{
|
|
16821
|
-
className: "h-[3px]
|
|
16890
|
+
className: "h-[3px]",
|
|
16822
16891
|
style: {
|
|
16892
|
+
backgroundImage: accentGradient || "linear-gradient(90deg, #8B7D5E, #C0AE82, #DCC99B, #C0AE82, #8B7D5E)",
|
|
16823
16893
|
backgroundSize: "200% 100%",
|
|
16824
|
-
animation: "gradient-shift 2s ease-in-out infinite"
|
|
16825
|
-
...accentGradient ? { backgroundImage: accentGradient } : {}
|
|
16894
|
+
animation: "gradient-shift 2s ease-in-out infinite"
|
|
16826
16895
|
}
|
|
16827
16896
|
}
|
|
16828
16897
|
),
|
|
@@ -16831,7 +16900,7 @@ var PresentationJobCard = ({
|
|
|
16831
16900
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
16832
16901
|
"div",
|
|
16833
16902
|
{
|
|
16834
|
-
className: "w-10 h-10 rounded-xl bg-
|
|
16903
|
+
className: "w-10 h-10 rounded-xl bg-[#C0AE82]/10 border border-[#C0AE82]/25 flex items-center justify-center flex-shrink-0",
|
|
16835
16904
|
style: { ...t.accentSubtle(0.1), ...t.accentBorder },
|
|
16836
16905
|
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "text-lg", children: getPhaseIcon() })
|
|
16837
16906
|
}
|
|
@@ -16849,10 +16918,11 @@ var PresentationJobCard = ({
|
|
|
16849
16918
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", { className: "h-2 bg-zinc-800 rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
16850
16919
|
"div",
|
|
16851
16920
|
{
|
|
16852
|
-
className: "h-full
|
|
16921
|
+
className: "h-full rounded-full transition-all duration-500 ease-out",
|
|
16853
16922
|
style: {
|
|
16854
16923
|
width: `${Math.max(pct, 2)}%`,
|
|
16855
|
-
|
|
16924
|
+
backgroundImage: accentGradient || "linear-gradient(90deg, #8B7D5E, #C0AE82, #DCC99B)",
|
|
16925
|
+
...!accentGradient ? t.accentBg : {}
|
|
16856
16926
|
}
|
|
16857
16927
|
}
|
|
16858
16928
|
) }),
|
|
@@ -16862,7 +16932,7 @@ var PresentationJobCard = ({
|
|
|
16862
16932
|
] })
|
|
16863
16933
|
] }),
|
|
16864
16934
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
16865
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", { className: "w-2 h-2 rounded-full bg-
|
|
16935
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", { className: "w-2 h-2 rounded-full bg-[#C0AE82] animate-pulse", style: t.accentBg }),
|
|
16866
16936
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "text-xs text-zinc-400", children: step })
|
|
16867
16937
|
] }),
|
|
16868
16938
|
phase === "ai_generation" && slidesTotal > 0 && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center gap-2 pt-1", children: [
|
|
@@ -16871,7 +16941,7 @@ var PresentationJobCard = ({
|
|
|
16871
16941
|
{
|
|
16872
16942
|
className: cn(
|
|
16873
16943
|
"w-6 h-1.5 rounded-full transition-all duration-300",
|
|
16874
|
-
i < slidesCompleted ? "bg-
|
|
16944
|
+
i < slidesCompleted ? "bg-[#C0AE82]" : i === slidesCompleted ? "bg-[#C0AE82]/50 animate-pulse" : "bg-zinc-700"
|
|
16875
16945
|
)
|
|
16876
16946
|
},
|
|
16877
16947
|
i
|
|
@@ -16919,7 +16989,7 @@ var PresentationJobCard = ({
|
|
|
16919
16989
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
16920
16990
|
"div",
|
|
16921
16991
|
{
|
|
16922
|
-
className: "w-10 h-10 rounded-xl bg-
|
|
16992
|
+
className: "w-10 h-10 rounded-xl bg-[#C0AE82]/10 border border-[#C0AE82]/25 flex items-center justify-center flex-shrink-0 text-[#DCC99B]",
|
|
16923
16993
|
style: { ...t.accentSubtle(0.1), ...t.accentBorder, ...t.accent },
|
|
16924
16994
|
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(SlidesIcon, {})
|
|
16925
16995
|
}
|
|
@@ -16949,13 +17019,27 @@ var PresentationJobCard = ({
|
|
|
16949
17019
|
]
|
|
16950
17020
|
}
|
|
16951
17021
|
),
|
|
17022
|
+
slideTemplateOptions && slideTemplateOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
17023
|
+
"select",
|
|
17024
|
+
{
|
|
17025
|
+
value: s.template_id || "",
|
|
17026
|
+
onChange: (e) => setSlideTemplate(i, e.target.value),
|
|
17027
|
+
disabled: rowBusy,
|
|
17028
|
+
title: "Design template for this slide only (default: deck's template)",
|
|
17029
|
+
className: "w-24 flex-shrink-0 bg-zinc-800/60 border border-zinc-700 rounded-lg px-1.5 h-8 text-[10px] text-zinc-300 focus:border-[#C0AE82] outline-none disabled:opacity-60",
|
|
17030
|
+
children: [
|
|
17031
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("option", { value: "", children: "Deck default" }),
|
|
17032
|
+
slideTemplateOptions.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("option", { value: opt.id, children: opt.name }, opt.id))
|
|
17033
|
+
]
|
|
17034
|
+
}
|
|
17035
|
+
),
|
|
16952
17036
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
16953
17037
|
"input",
|
|
16954
17038
|
{
|
|
16955
17039
|
value: messageEdits[i] ?? s.message ?? "",
|
|
16956
17040
|
onChange: (e) => setMessageEdits((prev) => ({ ...prev, [i]: e.target.value })),
|
|
16957
17041
|
disabled: building,
|
|
16958
|
-
className: "flex-1 min-w-0 bg-zinc-800/60 border border-zinc-700 rounded-lg px-3 h-8 text-xs text-zinc-200 focus:border-
|
|
17042
|
+
className: "flex-1 min-w-0 bg-zinc-800/60 border border-zinc-700 rounded-lg px-3 h-8 text-xs text-zinc-200 focus:border-[#C0AE82] outline-none disabled:opacity-60"
|
|
16959
17043
|
}
|
|
16960
17044
|
),
|
|
16961
17045
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
@@ -17030,7 +17114,7 @@ var PresentationJobCard = ({
|
|
|
17030
17114
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
17031
17115
|
"div",
|
|
17032
17116
|
{
|
|
17033
|
-
className: "w-10 h-10 rounded-xl bg-
|
|
17117
|
+
className: "w-10 h-10 rounded-xl bg-[#C0AE82]/10 border border-[#C0AE82]/25 flex items-center justify-center flex-shrink-0 text-[#DCC99B]",
|
|
17034
17118
|
style: { ...t.accentSubtle(0.1), ...t.accentBorder, ...t.accent },
|
|
17035
17119
|
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(SlidesIcon, {})
|
|
17036
17120
|
}
|
|
@@ -17045,19 +17129,63 @@ var PresentationJobCard = ({
|
|
|
17045
17129
|
generationMode === "template" && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("p", { className: "text-xs mt-1", children: isApproved ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "text-emerald-400/90", children: "Approved \u2014 future decks use this format" }) : reviewStatus === "pending_review" ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "text-amber-400/90", children: "Review this deck, then approve to lock the format" }) : null })
|
|
17046
17130
|
] }),
|
|
17047
17131
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center gap-1.5 flex-shrink-0 flex-wrap justify-end", children: [
|
|
17048
|
-
|
|
17049
|
-
|
|
17050
|
-
|
|
17051
|
-
|
|
17052
|
-
|
|
17053
|
-
|
|
17054
|
-
|
|
17055
|
-
|
|
17056
|
-
|
|
17057
|
-
|
|
17058
|
-
|
|
17059
|
-
|
|
17060
|
-
|
|
17132
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center rounded-lg border border-zinc-700 bg-zinc-800 overflow-hidden divide-x divide-zinc-700", children: [
|
|
17133
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
17134
|
+
"a",
|
|
17135
|
+
{
|
|
17136
|
+
href: hasHtml ? `/presentations/${_job_id}/edit` : void 0,
|
|
17137
|
+
"aria-disabled": !hasHtml,
|
|
17138
|
+
title: "Edit presentation content",
|
|
17139
|
+
className: cn(
|
|
17140
|
+
"flex items-center gap-1.5 px-2.5 h-7 text-xs font-medium text-zinc-300 hover:text-zinc-100 hover:bg-zinc-700/60 transition-colors",
|
|
17141
|
+
!hasHtml && "pointer-events-none opacity-40"
|
|
17142
|
+
),
|
|
17143
|
+
children: [
|
|
17144
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(EditIcon, {}),
|
|
17145
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { children: "Edit" })
|
|
17146
|
+
]
|
|
17147
|
+
}
|
|
17148
|
+
),
|
|
17149
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
17150
|
+
"button",
|
|
17151
|
+
{
|
|
17152
|
+
onClick: () => setShowFullscreen(true),
|
|
17153
|
+
disabled: !hasHtml,
|
|
17154
|
+
title: "Open fullscreen preview",
|
|
17155
|
+
className: "flex items-center gap-1.5 px-2.5 h-7 text-xs font-medium text-zinc-300 hover:text-zinc-100 hover:bg-zinc-700/60 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
17156
|
+
children: [
|
|
17157
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ExpandIcon, {}),
|
|
17158
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { children: "Preview" })
|
|
17159
|
+
]
|
|
17160
|
+
}
|
|
17161
|
+
),
|
|
17162
|
+
canRegenerate && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
17163
|
+
"button",
|
|
17164
|
+
{
|
|
17165
|
+
onClick: handleRegenerate,
|
|
17166
|
+
disabled: regenerating || approving,
|
|
17167
|
+
title: "Try another design template with the same content",
|
|
17168
|
+
className: "flex items-center gap-1.5 px-2.5 h-7 text-xs font-medium text-zinc-300 hover:text-zinc-100 hover:bg-zinc-700/60 transition-colors disabled:opacity-40",
|
|
17169
|
+
children: [
|
|
17170
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(RefreshIcon, {}),
|
|
17171
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { children: regenerating ? "Switching\u2026" : "Regenerate" })
|
|
17172
|
+
]
|
|
17173
|
+
}
|
|
17174
|
+
),
|
|
17175
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
17176
|
+
"button",
|
|
17177
|
+
{
|
|
17178
|
+
onClick: handleShare,
|
|
17179
|
+
disabled: !hasHtml,
|
|
17180
|
+
title: copied ? "Copied!" : "Copy shareable link",
|
|
17181
|
+
className: cn(
|
|
17182
|
+
"flex items-center justify-center w-7 h-7 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
|
|
17183
|
+
copied ? "text-green-400" : "text-zinc-300 hover:text-zinc-100 hover:bg-zinc-700/60"
|
|
17184
|
+
),
|
|
17185
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ShareIcon, {})
|
|
17186
|
+
}
|
|
17187
|
+
)
|
|
17188
|
+
] }),
|
|
17061
17189
|
canApprove && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
17062
17190
|
"button",
|
|
17063
17191
|
{
|
|
@@ -17072,39 +17200,16 @@ var PresentationJobCard = ({
|
|
|
17072
17200
|
}
|
|
17073
17201
|
),
|
|
17074
17202
|
isApproved && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "flex items-center justify-center w-7 h-7 rounded-lg border border-emerald-500/40 bg-emerald-500/10 text-emerald-400", title: "Format saved", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(CheckIcon, {}) }),
|
|
17075
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
17076
|
-
"button",
|
|
17077
|
-
{
|
|
17078
|
-
onClick: handleShare,
|
|
17079
|
-
disabled: !hasHtml,
|
|
17080
|
-
title: copied ? "Copied!" : "Copy shareable link",
|
|
17081
|
-
className: cn(
|
|
17082
|
-
"w-7 h-7 rounded-lg border flex items-center justify-center transition-all",
|
|
17083
|
-
copied ? "border-green-500/40 bg-green-500/10 text-green-400" : "border-zinc-700 bg-zinc-800 text-zinc-400 hover:border-zinc-500 hover:text-zinc-200",
|
|
17084
|
-
"disabled:opacity-30 disabled:cursor-not-allowed"
|
|
17085
|
-
),
|
|
17086
|
-
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ShareIcon, {})
|
|
17087
|
-
}
|
|
17088
|
-
),
|
|
17089
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
17090
|
-
"button",
|
|
17091
|
-
{
|
|
17092
|
-
onClick: () => setShowFullscreen(true),
|
|
17093
|
-
disabled: !hasHtml,
|
|
17094
|
-
title: "Open fullscreen preview",
|
|
17095
|
-
className: "flex items-center gap-1.5 px-2.5 h-7 rounded-lg border border-zinc-700 bg-zinc-800 hover:border-zinc-500 text-zinc-400 hover:text-zinc-200 text-xs font-medium transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
|
|
17096
|
-
children: [
|
|
17097
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ExpandIcon, {}),
|
|
17098
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { children: "Preview" })
|
|
17099
|
-
]
|
|
17100
|
-
}
|
|
17101
|
-
),
|
|
17102
17203
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
17103
17204
|
"button",
|
|
17104
17205
|
{
|
|
17105
17206
|
onClick: () => setShowExport(true),
|
|
17106
|
-
className: "flex items-center gap-1.5 px-
|
|
17107
|
-
style: {
|
|
17207
|
+
className: "flex items-center gap-1.5 px-3 h-7 text-xs font-semibold rounded-lg transition-colors",
|
|
17208
|
+
style: {
|
|
17209
|
+
backgroundImage: accentGradient || "linear-gradient(90deg, #8B7D5E, #C0AE82, #DCC99B)",
|
|
17210
|
+
color: "#0A0A0A",
|
|
17211
|
+
...accentGradient ? t.accentText : {}
|
|
17212
|
+
},
|
|
17108
17213
|
children: [
|
|
17109
17214
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(DownloadIcon, {}),
|
|
17110
17215
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { children: "Export" })
|
|
@@ -17159,7 +17264,7 @@ var PresentationJobCard = ({
|
|
|
17159
17264
|
sendSlideCommand("prevSlide");
|
|
17160
17265
|
},
|
|
17161
17266
|
disabled: !hasHtml || !iframeReady,
|
|
17162
|
-
className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-
|
|
17267
|
+
className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-[#C0AE82] hover:text-[#DCC99B] text-zinc-400 flex items-center justify-center transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
|
|
17163
17268
|
"aria-label": "Previous slide",
|
|
17164
17269
|
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ChevronLeft2, {})
|
|
17165
17270
|
}
|
|
@@ -17177,7 +17282,7 @@ var PresentationJobCard = ({
|
|
|
17177
17282
|
sendSlideCommand("nextSlide");
|
|
17178
17283
|
},
|
|
17179
17284
|
disabled: !hasHtml || !iframeReady,
|
|
17180
|
-
className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-
|
|
17285
|
+
className: "w-7 h-7 rounded-full border border-zinc-700 bg-zinc-800 hover:border-[#C0AE82] hover:text-[#DCC99B] text-zinc-400 flex items-center justify-center transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
|
|
17181
17286
|
"aria-label": "Next slide",
|
|
17182
17287
|
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ChevronRight2, {})
|
|
17183
17288
|
}
|
|
@@ -17204,10 +17309,11 @@ var PresentationJobCard = ({
|
|
|
17204
17309
|
var import_react79 = require("react");
|
|
17205
17310
|
var import_jsx_runtime148 = require("react/jsx-runtime");
|
|
17206
17311
|
var DEFAULT_THEME = {
|
|
17207
|
-
primary: "#
|
|
17208
|
-
secondary: "#
|
|
17209
|
-
accent: "#
|
|
17312
|
+
primary: "#C0AE82",
|
|
17313
|
+
secondary: "#C4AD7C",
|
|
17314
|
+
accent: "#DCC99B"
|
|
17210
17315
|
};
|
|
17316
|
+
var GOLD_GRADIENT = "linear-gradient(90deg, #8B7D5E, #C0AE82, #DCC99B)";
|
|
17211
17317
|
function readableOn(bg) {
|
|
17212
17318
|
if (!bg || typeof bg !== "string") return "#ffffff";
|
|
17213
17319
|
const hex = bg.replace("#", "");
|
|
@@ -17254,6 +17360,10 @@ var RefreshIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("svg",
|
|
|
17254
17360
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("polyline", { points: "23 4 23 10 17 10" }),
|
|
17255
17361
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })
|
|
17256
17362
|
] });
|
|
17363
|
+
var EditIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
17364
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
17365
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
|
|
17366
|
+
] });
|
|
17257
17367
|
function formatTemplateLabel2(templateId) {
|
|
17258
17368
|
if (!templateId) return null;
|
|
17259
17369
|
return templateId.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
|
|
@@ -17275,7 +17385,7 @@ var FullscreenPreviewModal = ({ url, title, onClose }) => {
|
|
|
17275
17385
|
return /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "fixed inset-0 z-50 bg-black flex flex-col", children: [
|
|
17276
17386
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "flex items-center justify-between gap-4 px-4 h-11 bg-zinc-950/90 border-b border-zinc-800/60 flex-shrink-0", children: [
|
|
17277
17387
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
17278
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { className: "text-
|
|
17388
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { className: "text-[#DCC99B] flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(DocumentIcon, {}) }),
|
|
17279
17389
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { className: "text-sm font-medium text-zinc-300 truncate", children: title })
|
|
17280
17390
|
] }),
|
|
17281
17391
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
@@ -17756,8 +17866,9 @@ var ResearchReportJobCard = (props) => {
|
|
|
17756
17866
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
17757
17867
|
"div",
|
|
17758
17868
|
{
|
|
17759
|
-
className: "h-[3px]
|
|
17869
|
+
className: "h-[3px]",
|
|
17760
17870
|
style: {
|
|
17871
|
+
backgroundImage: "linear-gradient(90deg, #8B7D5E, #C0AE82, #DCC99B, #C0AE82, #8B7D5E)",
|
|
17761
17872
|
backgroundSize: "200% 100%",
|
|
17762
17873
|
animation: "gradient-shift 2s ease-in-out infinite"
|
|
17763
17874
|
}
|
|
@@ -17765,7 +17876,7 @@ var ResearchReportJobCard = (props) => {
|
|
|
17765
17876
|
),
|
|
17766
17877
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "p-5", children: [
|
|
17767
17878
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
17768
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "w-10 h-10 rounded-xl bg-
|
|
17879
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "w-10 h-10 rounded-xl bg-[#C0AE82]/10 border border-[#C0AE82]/25 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { className: "text-lg", children: getPhaseIcon() }) }),
|
|
17769
17880
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
17770
17881
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("h3", { className: "text-sm font-semibold text-zinc-100 truncate leading-tight", children: title || "Generating Research Report" }),
|
|
17771
17882
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("p", { className: "text-xs text-zinc-500 mt-0.5", children: [
|
|
@@ -17780,8 +17891,8 @@ var ResearchReportJobCard = (props) => {
|
|
|
17780
17891
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "h-2 bg-zinc-800 rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
17781
17892
|
"div",
|
|
17782
17893
|
{
|
|
17783
|
-
className: "h-full
|
|
17784
|
-
style: { width: `${Math.max(pct, 2)}
|
|
17894
|
+
className: "h-full rounded-full transition-all duration-500 ease-out",
|
|
17895
|
+
style: { width: `${Math.max(pct, 2)}%`, backgroundImage: GOLD_GRADIENT }
|
|
17785
17896
|
}
|
|
17786
17897
|
) }),
|
|
17787
17898
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("span", { className: "absolute right-0 -top-5 text-xs text-zinc-500 font-medium tabular-nums", children: [
|
|
@@ -17790,7 +17901,7 @@ var ResearchReportJobCard = (props) => {
|
|
|
17790
17901
|
] })
|
|
17791
17902
|
] }),
|
|
17792
17903
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
17793
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "w-2 h-2 rounded-full bg-
|
|
17904
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "w-2 h-2 rounded-full bg-[#C0AE82] animate-pulse" }),
|
|
17794
17905
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { className: "text-xs text-zinc-400", children: step })
|
|
17795
17906
|
] }),
|
|
17796
17907
|
phase === "ai_generation" && searchesTotal > 0 && /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "pt-1", children: [
|
|
@@ -17807,7 +17918,7 @@ var ResearchReportJobCard = (props) => {
|
|
|
17807
17918
|
{
|
|
17808
17919
|
className: cn(
|
|
17809
17920
|
"flex-1 h-1 rounded-full transition-all duration-300",
|
|
17810
|
-
i < searchesCompleted ? "bg-
|
|
17921
|
+
i < searchesCompleted ? "bg-[#C0AE82]" : i === searchesCompleted ? "bg-[#C0AE82]/50 animate-pulse" : "bg-zinc-700"
|
|
17811
17922
|
)
|
|
17812
17923
|
},
|
|
17813
17924
|
i
|
|
@@ -17841,12 +17952,12 @@ var ResearchReportJobCard = (props) => {
|
|
|
17841
17952
|
"div",
|
|
17842
17953
|
{
|
|
17843
17954
|
className: "h-[3px]",
|
|
17844
|
-
style: {
|
|
17955
|
+
style: { backgroundImage: GOLD_GRADIENT }
|
|
17845
17956
|
}
|
|
17846
17957
|
),
|
|
17847
17958
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "p-5", children: [
|
|
17848
17959
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
17849
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "w-10 h-10 rounded-xl bg-
|
|
17960
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "w-10 h-10 rounded-xl bg-[#C0AE82]/10 border border-[#C0AE82]/25 flex items-center justify-center flex-shrink-0 text-[#DCC99B]", children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(DocumentIcon, {}) }),
|
|
17850
17961
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
17851
17962
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("h3", { className: "text-sm font-semibold text-zinc-100 truncate leading-tight", children: title || "Report outline" }),
|
|
17852
17963
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("p", { className: "text-xs text-amber-400/90 mt-0.5", children: [
|
|
@@ -17867,7 +17978,7 @@ var ResearchReportJobCard = (props) => {
|
|
|
17867
17978
|
value: headingEdits[i] ?? s.heading ?? "",
|
|
17868
17979
|
onChange: (e) => setHeadingEdits((prev) => ({ ...prev, [i]: e.target.value })),
|
|
17869
17980
|
disabled: building,
|
|
17870
|
-
className: "flex-1 min-w-0 bg-zinc-800/60 border border-zinc-700 rounded-lg px-3 h-8 text-xs text-zinc-200 focus:border-
|
|
17981
|
+
className: "flex-1 min-w-0 bg-zinc-800/60 border border-zinc-700 rounded-lg px-3 h-8 text-xs text-zinc-200 focus:border-[#C0AE82] outline-none disabled:opacity-60"
|
|
17871
17982
|
}
|
|
17872
17983
|
),
|
|
17873
17984
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
@@ -18129,19 +18240,75 @@ var ResearchReportJobCard = (props) => {
|
|
|
18129
18240
|
generationMode === "template" && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("p", { className: "text-xs mt-1", children: isApproved ? /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { className: "text-emerald-400/90", children: "Approved \u2014 future reports use this format" }) : reviewStatus === "pending_review" ? /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { className: "text-amber-400/90", children: "Review this report, then approve to lock the layout" }) : null })
|
|
18130
18241
|
] }),
|
|
18131
18242
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "flex items-center gap-1.5 flex-shrink-0 flex-wrap justify-end", children: [
|
|
18132
|
-
|
|
18133
|
-
|
|
18134
|
-
|
|
18135
|
-
|
|
18136
|
-
|
|
18137
|
-
|
|
18138
|
-
|
|
18139
|
-
|
|
18140
|
-
|
|
18141
|
-
|
|
18142
|
-
|
|
18143
|
-
|
|
18144
|
-
|
|
18243
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "flex items-center rounded-lg border border-zinc-700 bg-zinc-800 overflow-hidden divide-x divide-zinc-700", children: [
|
|
18244
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
18245
|
+
"a",
|
|
18246
|
+
{
|
|
18247
|
+
href: htmlUrl ? `/reports/${job_id}/edit` : void 0,
|
|
18248
|
+
"aria-disabled": !htmlUrl,
|
|
18249
|
+
title: "Edit report content",
|
|
18250
|
+
className: cn(
|
|
18251
|
+
"flex items-center gap-1.5 px-2.5 h-7 text-xs font-medium text-zinc-300 hover:text-zinc-100 hover:bg-zinc-700/60 transition-colors",
|
|
18252
|
+
!htmlUrl && "pointer-events-none opacity-40"
|
|
18253
|
+
),
|
|
18254
|
+
children: [
|
|
18255
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(EditIcon2, {}),
|
|
18256
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { children: "Edit" })
|
|
18257
|
+
]
|
|
18258
|
+
}
|
|
18259
|
+
),
|
|
18260
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
18261
|
+
"button",
|
|
18262
|
+
{
|
|
18263
|
+
onClick: () => setShowPreview(true),
|
|
18264
|
+
disabled: !hasHTML,
|
|
18265
|
+
title: "Preview report",
|
|
18266
|
+
className: "flex items-center gap-1.5 px-2.5 h-7 text-xs font-medium text-zinc-300 hover:text-zinc-100 hover:bg-zinc-700/60 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
18267
|
+
children: [
|
|
18268
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ExpandIcon2, {}),
|
|
18269
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { children: "Preview" })
|
|
18270
|
+
]
|
|
18271
|
+
}
|
|
18272
|
+
),
|
|
18273
|
+
canRegenerate && /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
18274
|
+
"button",
|
|
18275
|
+
{
|
|
18276
|
+
onClick: handleRegenerate,
|
|
18277
|
+
disabled: regenerating || approving,
|
|
18278
|
+
title: "Try another report template with the same data",
|
|
18279
|
+
className: "flex items-center gap-1.5 px-2.5 h-7 text-xs font-medium text-zinc-300 hover:text-zinc-100 hover:bg-zinc-700/60 transition-colors disabled:opacity-40",
|
|
18280
|
+
children: [
|
|
18281
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(RefreshIcon2, {}),
|
|
18282
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { children: regenerating ? "Switching\u2026" : "Regenerate" })
|
|
18283
|
+
]
|
|
18284
|
+
}
|
|
18285
|
+
),
|
|
18286
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
18287
|
+
"button",
|
|
18288
|
+
{
|
|
18289
|
+
onClick: handleShare,
|
|
18290
|
+
disabled: !canShare,
|
|
18291
|
+
title: !canShare && reviewStatus === "pending_review" ? "Approve the report to enable sharing" : copied ? "Copied!" : "Copy shareable link",
|
|
18292
|
+
className: cn(
|
|
18293
|
+
"flex items-center justify-center w-7 h-7 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
|
|
18294
|
+
copied ? "text-green-400" : "text-zinc-300 hover:text-zinc-100 hover:bg-zinc-700/60"
|
|
18295
|
+
),
|
|
18296
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(CheckIcon2, {}) : /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ShareIcon2, {})
|
|
18297
|
+
}
|
|
18298
|
+
),
|
|
18299
|
+
pdfUrl && /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
18300
|
+
"button",
|
|
18301
|
+
{
|
|
18302
|
+
onClick: handleDownloadPdf,
|
|
18303
|
+
title: "Download PDF",
|
|
18304
|
+
className: "flex items-center gap-1.5 px-2.5 h-7 text-xs font-medium text-zinc-300 hover:text-zinc-100 hover:bg-zinc-700/60 transition-colors",
|
|
18305
|
+
children: [
|
|
18306
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(DownloadIcon2, {}),
|
|
18307
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { children: "PDF" })
|
|
18308
|
+
]
|
|
18309
|
+
}
|
|
18310
|
+
)
|
|
18311
|
+
] }),
|
|
18145
18312
|
canApprove && /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
18146
18313
|
"button",
|
|
18147
18314
|
{
|
|
@@ -18156,53 +18323,14 @@ var ResearchReportJobCard = (props) => {
|
|
|
18156
18323
|
}
|
|
18157
18324
|
),
|
|
18158
18325
|
isApproved && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { className: "flex items-center justify-center w-7 h-7 rounded-lg border border-emerald-500/40 bg-emerald-500/10 text-emerald-400", title: "Format saved", children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(CheckIcon2, {}) }),
|
|
18159
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
|
|
18160
|
-
"button",
|
|
18161
|
-
{
|
|
18162
|
-
onClick: handleShare,
|
|
18163
|
-
disabled: !canShare,
|
|
18164
|
-
title: !canShare && reviewStatus === "pending_review" ? "Approve the report to enable sharing" : copied ? "Copied!" : "Copy shareable link",
|
|
18165
|
-
className: cn(
|
|
18166
|
-
"w-7 h-7 rounded-lg border flex items-center justify-center transition-all",
|
|
18167
|
-
copied ? "border-green-500/40 bg-green-500/10 text-green-400" : "border-zinc-700 bg-zinc-800 text-zinc-400 hover:border-zinc-500 hover:text-zinc-200",
|
|
18168
|
-
"disabled:opacity-30 disabled:cursor-not-allowed"
|
|
18169
|
-
),
|
|
18170
|
-
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(CheckIcon2, {}) : /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ShareIcon2, {})
|
|
18171
|
-
}
|
|
18172
|
-
),
|
|
18173
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
18174
|
-
"button",
|
|
18175
|
-
{
|
|
18176
|
-
onClick: () => setShowPreview(true),
|
|
18177
|
-
disabled: !hasHTML,
|
|
18178
|
-
title: "Preview report",
|
|
18179
|
-
className: "flex items-center gap-1.5 px-2.5 h-7 rounded-lg border border-zinc-700 bg-zinc-800 hover:border-zinc-500 text-zinc-400 hover:text-zinc-200 text-xs font-medium transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
|
|
18180
|
-
children: [
|
|
18181
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ExpandIcon2, {}),
|
|
18182
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { children: "Preview" })
|
|
18183
|
-
]
|
|
18184
|
-
}
|
|
18185
|
-
),
|
|
18186
|
-
pdfUrl && /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
18187
|
-
"button",
|
|
18188
|
-
{
|
|
18189
|
-
onClick: handleDownloadPdf,
|
|
18190
|
-
title: "Download PDF",
|
|
18191
|
-
className: "flex items-center gap-1.5 px-2.5 h-7 rounded-lg border border-zinc-700 bg-zinc-800 hover:border-zinc-500 text-zinc-400 hover:text-zinc-200 text-xs font-medium transition-colors",
|
|
18192
|
-
children: [
|
|
18193
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(DownloadIcon2, {}),
|
|
18194
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { children: "PDF" })
|
|
18195
|
-
]
|
|
18196
|
-
}
|
|
18197
|
-
),
|
|
18198
18326
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
18199
18327
|
"button",
|
|
18200
18328
|
{
|
|
18201
18329
|
onClick: handleDownload,
|
|
18202
18330
|
disabled: !hasHTML,
|
|
18203
|
-
className: "flex items-center gap-1.5 px-
|
|
18204
|
-
style: {
|
|
18205
|
-
onMouseEnter: (e) => e.currentTarget.style.filter = "brightness(1.
|
|
18331
|
+
className: "flex items-center gap-1.5 px-3 h-7 text-xs font-semibold rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
18332
|
+
style: { backgroundImage: GOLD_GRADIENT, color: readableOn(primaryColor) },
|
|
18333
|
+
onMouseEnter: (e) => e.currentTarget.style.filter = "brightness(1.1)",
|
|
18206
18334
|
onMouseLeave: (e) => e.currentTarget.style.filter = "brightness(1)",
|
|
18207
18335
|
children: [
|
|
18208
18336
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(DownloadIcon2, {}),
|
|
@@ -18400,7 +18528,7 @@ var WebSearchJobCard = ({
|
|
|
18400
18528
|
{
|
|
18401
18529
|
className: "h-[3px]",
|
|
18402
18530
|
style: {
|
|
18403
|
-
|
|
18531
|
+
backgroundImage: "linear-gradient(90deg, #8B7D5E, #C0AE82, #DCC99B, #C0AE82, #8B7D5E)",
|
|
18404
18532
|
backgroundSize: "200% 100%",
|
|
18405
18533
|
animation: "gradient-shift 2s ease-in-out infinite"
|
|
18406
18534
|
}
|
|
@@ -18422,7 +18550,7 @@ var WebSearchJobCard = ({
|
|
|
18422
18550
|
className: "h-full rounded-full transition-all duration-500 ease-out",
|
|
18423
18551
|
style: {
|
|
18424
18552
|
width: `${Math.max(pct, 2)}%`,
|
|
18425
|
-
|
|
18553
|
+
backgroundImage: "linear-gradient(90deg, #8B7D5E, #C0AE82, #DCC99B)"
|
|
18426
18554
|
}
|
|
18427
18555
|
}
|
|
18428
18556
|
) }),
|
|
@@ -18432,7 +18560,7 @@ var WebSearchJobCard = ({
|
|
|
18432
18560
|
] })
|
|
18433
18561
|
] }),
|
|
18434
18562
|
/* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
18435
|
-
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", { className: "w-2 h-2 rounded-full bg-
|
|
18563
|
+
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", { className: "w-2 h-2 rounded-full bg-[#C0AE82] animate-pulse flex-shrink-0" }),
|
|
18436
18564
|
/* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", { className: "text-xs text-zinc-400", children: step })
|
|
18437
18565
|
] }),
|
|
18438
18566
|
searchesTotal > 0 && /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", { className: "pt-1", children: [
|
|
@@ -18449,7 +18577,7 @@ var WebSearchJobCard = ({
|
|
|
18449
18577
|
{
|
|
18450
18578
|
className: cn(
|
|
18451
18579
|
"flex-1 h-1 rounded-full transition-all duration-300",
|
|
18452
|
-
i < searchesCompleted ? "bg-
|
|
18580
|
+
i < searchesCompleted ? "bg-[#C0AE82]" : phase === "ai_generation" && i === searchesCompleted ? "bg-[#C0AE82]/50 animate-pulse" : "bg-zinc-700"
|
|
18453
18581
|
)
|
|
18454
18582
|
},
|
|
18455
18583
|
i
|
|
@@ -21689,7 +21817,7 @@ function PlatformMetricsBanner({
|
|
|
21689
21817
|
return /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(
|
|
21690
21818
|
"div",
|
|
21691
21819
|
{
|
|
21692
|
-
className: "\
|
|
21820
|
+
className: "\n grid grid-cols-1 gap-3 rounded-xl py-4 px-4 shadow-sm\n md:flex md:overflow-x-auto md:gap-6 md:rounded-l-xl md:py-4 md:px-4 md:items-center md:gap-0 md:px-0 md:ml-8\n ",
|
|
21693
21821
|
style: { backgroundColor: bgColor },
|
|
21694
21822
|
children: [
|
|
21695
21823
|
/* @__PURE__ */ (0, import_jsx_runtime173.jsxs)("div", { className: "flex flex-col items-center md:min-w-0", children: [
|