pxengine 0.1.27 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -34202,7 +34202,7 @@ var import_react56 = __toESM(require("react"), 1);
34202
34202
  var import_jsx_runtime96 = require("react/jsx-runtime");
34203
34203
  var FormCard = import_react56.default.memo(
34204
34204
  ({
34205
- title,
34205
+ // title,
34206
34206
  fields,
34207
34207
  data,
34208
34208
  editingFields = {},
@@ -34218,7 +34218,6 @@ var FormCard = import_react56.default.memo(
34218
34218
  className,
34219
34219
  footer
34220
34220
  }) => {
34221
- const [showCopyButton, setShowCopyButton] = (0, import_react56.useState)(false);
34222
34221
  const handleCopyAll = () => {
34223
34222
  const text = fields.map((field) => {
34224
34223
  const value = data[field.key];
@@ -34233,10 +34232,8 @@ var FormCard = import_react56.default.memo(
34233
34232
  "relative w-full rounded-[20px] bg-background dark:bg-gray100 border border-gray400 shadow-lg overflow-hidden mb-6 font-noto",
34234
34233
  className
34235
34234
  ),
34236
- onMouseEnter: () => setShowCopyButton(true),
34237
- onMouseLeave: () => setShowCopyButton(false),
34238
34235
  children: [
34239
- showCopyButton && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
34236
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
34240
34237
  "button",
34241
34238
  {
34242
34239
  onClick: handleCopyAll,
@@ -34246,13 +34243,6 @@ var FormCard = import_react56.default.memo(
34246
34243
  }
34247
34244
  ),
34248
34245
  /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "p-6 relative", children: [
34249
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
34250
- "h3",
34251
- {
34252
- className: "text-gray900 mb-12",
34253
- children: title
34254
- }
34255
- ),
34256
34246
  showTimeline && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
34257
34247
  "div",
34258
34248
  {
@@ -36241,6 +36231,7 @@ var CampaignConceptCard = import_react64.default.memo(
36241
36231
  ...formCardProps
36242
36232
  }) => {
36243
36233
  const [internalIsOpen, setInternalIsOpen] = (0, import_react64.useState)(false);
36234
+ const [copied, setCopied] = (0, import_react64.useState)(false);
36244
36235
  const isOpen = controlledIsOpen !== void 0 ? controlledIsOpen : internalIsOpen;
36245
36236
  const handleToggle = () => {
36246
36237
  if (onToggle) {
@@ -36250,55 +36241,109 @@ var CampaignConceptCard = import_react64.default.memo(
36250
36241
  }
36251
36242
  };
36252
36243
  const cardTitle = propsTitle || data.title || data.name || data.concept_name || data.conceptName || "Campaign Concept";
36244
+ const isSelected = selectionStatus != null;
36245
+ const flattenValue = (val) => {
36246
+ if (val === null || val === void 0) return "-";
36247
+ if (Array.isArray(val)) {
36248
+ return val.map((item) => {
36249
+ if (typeof item === "object" && item !== null) {
36250
+ return item.label || item.value || item.name || JSON.stringify(item);
36251
+ }
36252
+ return String(item);
36253
+ }).join(", ");
36254
+ }
36255
+ if (typeof val === "object") {
36256
+ return Object.entries(val).map(([k, v]) => `${k.replace(/_/g, " ")}: ${v}`).join(", ");
36257
+ }
36258
+ return String(val);
36259
+ };
36260
+ const handleCopyAll = (e) => {
36261
+ e.preventDefault();
36262
+ e.stopPropagation();
36263
+ const allFields = providedFields || generateFieldsFromData(data);
36264
+ const lines = [
36265
+ typeof cardTitle === "string" ? cardTitle : JSON.stringify(cardTitle),
36266
+ "",
36267
+ ...allFields.map((f) => `${f.label}: ${flattenValue(data[f.key])}`)
36268
+ ];
36269
+ navigator.clipboard.writeText(lines.join("\n")).then(() => {
36270
+ setCopied(true);
36271
+ setTimeout(() => setCopied(false), 2e3);
36272
+ });
36273
+ };
36253
36274
  const handleProceed = () => {
36254
36275
  onAction?.({
36255
36276
  type: "concept_selection",
36256
- value: typeof cardTitle === "string" ? cardTitle : JSON.stringify(cardTitle),
36277
+ value: data.title || data.name || data.concept_name || data.conceptName,
36257
36278
  data
36258
36279
  });
36259
36280
  };
36260
36281
  const effectiveIsLatest = isLatestMessage && !hasUserResponded;
36261
36282
  const fields = (0, import_react64.useMemo)(() => {
36262
36283
  const baseFields = providedFields || generateFieldsFromData(data);
36263
- return baseFields.map((field) => {
36284
+ const FIELD_ORDER = [
36285
+ "description",
36286
+ "creator_strategy",
36287
+ "primary_kpi",
36288
+ "secondary_kpis",
36289
+ "budget_allocation",
36290
+ "budgetAllocation",
36291
+ "estimated_creators",
36292
+ "estimatedCreators",
36293
+ "platforms",
36294
+ "target_platforms",
36295
+ "targetPlatforms"
36296
+ ];
36297
+ const sorted = [...baseFields].sort((a, b) => {
36298
+ const ai = FIELD_ORDER.indexOf(a.key);
36299
+ const bi = FIELD_ORDER.indexOf(b.key);
36300
+ if (ai !== -1 && bi !== -1) return ai - bi;
36301
+ if (ai !== -1) return -1;
36302
+ if (bi !== -1) return 1;
36303
+ return 0;
36304
+ });
36305
+ return sorted.map((field) => {
36264
36306
  if (field.key === "budgetAllocation" || field.key === "budget_allocation") {
36307
+ const formatKey = (k) => k.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase());
36308
+ const formatVal = (v) => {
36309
+ const n = Number(v);
36310
+ if (!isNaN(n) && String(v).trim() !== "") return `${n}%`;
36311
+ return String(v);
36312
+ };
36265
36313
  return {
36266
36314
  ...field,
36267
36315
  label: "Budget Allocation",
36268
36316
  renderDisplay: (val) => {
36269
- if (val && typeof val === "object" && !Array.isArray(val)) {
36270
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "flex flex-wrap gap-2 pt-1", children: Object.entries(val).map(([k, v]) => /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
36271
- "div",
36272
- {
36273
- className: "flex items-center gap-1.5 bg-background bg-gray400 border border-white/10 px-2 py-1 rounded shadow-sm",
36274
- children: [
36275
- /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("span", { className: "text-[10px] text-gray-400 font-bold uppercase tracking-tight", children: [
36276
- k.replace(/_/g, " "),
36277
- ":"
36278
- ] }),
36279
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-xs text-white font-medium", children: String(v) })
36280
- ]
36281
- },
36282
- k
36283
- )) });
36284
- }
36317
+ if (!val) return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-muted-foreground text-sm", children: "-" });
36285
36318
  if (Array.isArray(val)) {
36286
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "flex flex-wrap gap-2 pt-1", children: val.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
36287
- "div",
36288
- {
36289
- className: "flex items-center gap-1.5 bg-background bg-gray400 border border-white/10 px-2 py-1 rounded shadow-sm",
36290
- children: [
36291
- item.label && /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("span", { className: "text-[10px] text-gray-400 font-bold uppercase tracking-tight", children: [
36292
- item.label,
36293
- ":"
36294
- ] }),
36295
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-xs text-white font-medium", children: String(item.value || item) })
36296
- ]
36297
- },
36298
- idx
36299
- )) });
36319
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "space-y-2", children: val.map((item, idx) => {
36320
+ const label = item?.label ?? item?.key ?? `Item ${idx + 1}`;
36321
+ const value = item?.value ?? item;
36322
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "flex items-center gap-2", children: [
36323
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("span", { className: "text-muted-foreground font-medium", children: [
36324
+ idx + 1,
36325
+ "."
36326
+ ] }),
36327
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "inline-flex items-center bg-[#85888f] dark:bg-grayPill px-2 py-1 text-white dark:text-foreground text-sm font-medium rounded-md border border-[#85888f] dark:border-gray900 font-grotesk", children: String(label) }),
36328
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-foreground", children: "=" }),
36329
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "inline-flex items-center bg-[#85888f] dark:bg-grayPill px-2 py-1 text-white dark:text-foreground text-sm rounded-md border border-[#85888f] dark:border-gray900 font-grotesk font-medium", children: formatVal(value) })
36330
+ ] }, idx);
36331
+ }) });
36332
+ }
36333
+ if (typeof val === "object") {
36334
+ const entries = Object.entries(val);
36335
+ if (entries.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-muted-foreground text-sm", children: "-" });
36336
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "space-y-2", children: entries.map(([k, v], idx) => /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "flex items-center gap-2", children: [
36337
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("span", { className: "text-muted-foreground font-medium", children: [
36338
+ idx + 1,
36339
+ "."
36340
+ ] }),
36341
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "inline-flex items-center bg-[#85888f] dark:bg-grayPill px-2 py-1 text-white dark:text-foreground text-sm font-medium rounded-md border border-[#85888f] dark:border-gray900 font-grotesk", children: formatKey(k) }),
36342
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-foreground", children: "=" }),
36343
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "inline-flex items-center bg-[#85888f] dark:bg-grayPill px-2 py-1 text-white dark:text-foreground text-sm rounded-md border border-[#85888f] dark:border-gray900 font-grotesk font-medium", children: formatVal(v) })
36344
+ ] }, k)) });
36300
36345
  }
36301
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-gray-300 text-sm", children: val ? String(val) : "-" });
36346
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-muted-foreground text-sm", children: String(val) });
36302
36347
  }
36303
36348
  };
36304
36349
  }
@@ -36307,32 +36352,64 @@ var CampaignConceptCard = import_react64.default.memo(
36307
36352
  ...field,
36308
36353
  label: "Estimated Creators",
36309
36354
  renderDisplay: (val) => {
36355
+ if (!val) return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-muted-foreground text-sm", children: "-" });
36356
+ if (typeof val === "object" && !Array.isArray(val)) {
36357
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "flex items-center gap-2", children: [
36358
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "inline-flex items-center px-2 py-1 bg-[#85888f] dark:bg-grayPill text-white dark:text-foreground text-sm font-medium rounded-md border font-grotesk", children: val.min ?? 0 }),
36359
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-foreground", children: "-" }),
36360
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "inline-flex items-center px-2 py-1 bg-[#85888f] dark:bg-grayPill text-white dark:text-foreground text-sm font-medium rounded-md border font-grotesk", children: val.max ?? 0 })
36361
+ ] });
36362
+ }
36363
+ if (typeof val === "string" && val.includes("-")) {
36364
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "flex items-center gap-2", children: val.split("-").map((part, idx, arr) => /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_react64.default.Fragment, { children: [
36365
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "inline-flex items-center px-2 py-1 bg-[#85888f] dark:bg-grayPill text-white dark:text-foreground text-sm font-medium rounded-md border font-grotesk", children: part.trim() }),
36366
+ idx < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-foreground", children: "-" })
36367
+ ] }, idx)) });
36368
+ }
36310
36369
  if (Array.isArray(val)) {
36311
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "flex gap-2 pt-1", children: val.map((v, idx) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36312
- "div",
36370
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "flex items-center gap-2", children: val.map((v, idx) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36371
+ "span",
36313
36372
  {
36314
- className: "bg-background bg-purple200 border border-purple100/20 px-2 py-0.5 rounded text-white text-xs font-medium",
36373
+ className: "inline-flex items-center px-2 py-1 bg-[#85888f] dark:bg-grayPill text-white dark:text-foreground text-sm font-medium rounded-md border font-grotesk",
36315
36374
  children: String(v)
36316
36375
  },
36317
36376
  idx
36318
36377
  )) });
36319
36378
  }
36320
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-white font-medium", children: val ? String(val) : "-" });
36379
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-txtColor font-medium", children: String(val) });
36321
36380
  }
36322
36381
  };
36323
36382
  }
36324
- if (field.key === "platforms") {
36383
+ if (field.key === "primary_kpi" || field.key === "primaryKpi") {
36384
+ return {
36385
+ ...field,
36386
+ label: field.label || "Primary KPI",
36387
+ renderDisplay: (val) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-foreground text-sm", children: val ? String(val) : "-" })
36388
+ };
36389
+ }
36390
+ if (field.key === "secondary_kpis" || field.key === "secondaryKpis") {
36325
36391
  return {
36326
36392
  ...field,
36393
+ label: field.label || "Secondary KPIs",
36327
36394
  renderDisplay: (val) => {
36328
- const platforms = Array.isArray(val) ? val : typeof val === "string" ? val.split(/,\s*/) : [val];
36329
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "flex flex-wrap gap-1.5 pt-1", children: platforms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36330
- "div",
36395
+ const display = Array.isArray(val) ? val.map(String).join(", ") : val ? String(val) : "-";
36396
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-foreground text-sm", children: display });
36397
+ }
36398
+ };
36399
+ }
36400
+ if (field.key === "platforms" || field.key === "target_platforms" || field.key === "targetPlatforms") {
36401
+ return {
36402
+ ...field,
36403
+ renderDisplay: (val) => {
36404
+ const platforms = Array.isArray(val) ? val.map(String) : typeof val === "string" ? val.split(/,\s*/).map((s) => s.trim()).filter(Boolean) : val ? [String(val)] : [];
36405
+ if (platforms.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-muted-foreground text-sm", children: "-" });
36406
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "flex flex-wrap gap-2 pt-1", children: platforms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36407
+ "span",
36331
36408
  {
36332
- className: "px-2 py-0.5 rounded-full bg-blue-500/10 border border-blue-500/20 text-blue-400 text-[10px] font-bold uppercase",
36333
- children: String(p)
36409
+ className: "inline-flex items-center bg-[#85888f] dark:bg-grayPill px-2 py-1 text-white dark:text-foreground text-sm font-medium rounded-md border border-[#85888f] dark:border-gray900 font-grotesk",
36410
+ children: p
36334
36411
  },
36335
- String(p)
36412
+ p
36336
36413
  )) });
36337
36414
  }
36338
36415
  };
@@ -36340,10 +36417,24 @@ var CampaignConceptCard = import_react64.default.memo(
36340
36417
  return {
36341
36418
  ...field,
36342
36419
  renderDisplay: (val) => {
36420
+ if (Array.isArray(val)) {
36421
+ if (val.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-muted-foreground text-sm", children: "-" });
36422
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "flex flex-wrap gap-1.5 pt-1", children: val.map((item, idx) => {
36423
+ const label = typeof item === "object" && item !== null ? item.label || item.value || item.name || JSON.stringify(item) : String(item);
36424
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36425
+ "span",
36426
+ {
36427
+ className: "inline-block bg-paperBackground border border-gray400 text-txtColor text-xs px-2 py-0.5 rounded-full",
36428
+ children: label
36429
+ },
36430
+ idx
36431
+ );
36432
+ }) });
36433
+ }
36343
36434
  if (typeof val === "object" && val !== null) {
36344
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "text-gray-300 text-xs font-mono bg-black/20 p-2 rounded border border-white/5 mt-1 overflow-auto max-h-24", children: JSON.stringify(val, null, 2) });
36435
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "text-muted-foreground text-xs font-mono bg-paperBackground p-2 rounded border border-gray400 mt-1 overflow-auto max-h-24", children: Object.entries(val).map(([k, v]) => `${k.replace(/_/g, " ")}: ${v}`).join("\n") });
36345
36436
  }
36346
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-gray-300 text-sm", children: String(val) });
36437
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-txtColor text-sm", children: val !== void 0 && val !== null ? String(val) : "-" });
36347
36438
  }
36348
36439
  };
36349
36440
  });
@@ -36352,34 +36443,55 @@ var CampaignConceptCard = import_react64.default.memo(
36352
36443
  "div",
36353
36444
  {
36354
36445
  className: cn(
36355
- "w-full rounded-[20px] transition-all duration-300 bg-background dark:bg-gray50",
36356
- isOpen ? "border border-green-500/50 shadow-[0_0_15px_rgba(34,197,94,0.1)]" : "border border-gray400",
36446
+ "w-full rounded-xl border bg-background dark:bg-gray100 relative transition-all duration-300",
36447
+ isSelected || isRecommended ? "border-2 border-green500" : "border-gray400",
36357
36448
  className
36358
36449
  ),
36359
36450
  children: [
36360
36451
  /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
36361
36452
  "div",
36362
36453
  {
36363
- className: "flex items-center justify-between p-6 cursor-pointer select-none",
36454
+ className: "p-6 relative flex items-start justify-between cursor-pointer select-none",
36364
36455
  onClick: handleToggle,
36365
36456
  children: [
36366
- /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "flex flex-col gap-2", children: [
36367
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("h3", { className: "text-lg font-semibold text-white tracking-wide", children: typeof cardTitle === "object" ? JSON.stringify(cardTitle) : String(cardTitle) }),
36457
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "flex-1", children: [
36458
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("h2", { className: "mb-1 py-1 text-txtColor font-bold", children: typeof cardTitle === "object" ? JSON.stringify(cardTitle) : String(cardTitle) }),
36368
36459
  /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "flex flex-wrap gap-2", children: [
36369
36460
  isRecommended && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "inline-flex text-[10px] font-bold uppercase tracking-widest text-[#22C55E]", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "bg-[#22C55E]/10 px-2 py-0.5 rounded border border-[#22C55E]/20", children: "Recommended" }) }),
36370
- hasUserResponded && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "inline-flex text-[10px] font-bold uppercase tracking-widest text-[#3B82F6]", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "bg-[#3B82F6]/10 px-2 py-0.5 rounded border border-[#3B82F6]/20", children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" }) })
36461
+ !effectiveIsLatest && (selectionStatus || hasUserResponded) && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "inline-flex text-[10px] font-bold uppercase tracking-widest text-[#3B82F6]", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "bg-[#3B82F6]/10 px-2 py-0.5 rounded border border-[#3B82F6]/20", children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" }) })
36371
36462
  ] })
36372
36463
  ] }),
36373
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36374
- "div",
36375
- {
36376
- className: cn(
36377
- "p-2 rounded-lg bg-white/5 border border-white/10 text-gray-400 transition-transform duration-300",
36378
- isOpen && "rotate-180"
36379
- ),
36380
- children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ChevronDown, { className: "h-4 w-4" })
36381
- }
36382
- )
36464
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "flex items-center gap-2 ml-3", onClick: (e) => e.stopPropagation(), children: [
36465
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36466
+ "button",
36467
+ {
36468
+ onClick: handleCopyAll,
36469
+ title: "Copy all details",
36470
+ className: "p-2 bg-background hover:bg-gray200 dark:hover:bg-gray200 text-foreground rounded-lg shadow-lg transition-all active:scale-95",
36471
+ "aria-label": "Copy all details",
36472
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Check, { className: "h-4 w-4 text-green-500" }) : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Copy, { className: "h-4 w-4" })
36473
+ }
36474
+ ),
36475
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36476
+ "button",
36477
+ {
36478
+ onClick: (e) => {
36479
+ e.preventDefault();
36480
+ e.stopPropagation();
36481
+ handleToggle();
36482
+ },
36483
+ className: "p-2 bg-background hover:bg-gray200 dark:hover:bg-gray200 text-foreground rounded-lg shadow-lg",
36484
+ "aria-label": isOpen ? "Collapse" : "Expand",
36485
+ title: isOpen ? "Collapse" : "Expand",
36486
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36487
+ ChevronDown,
36488
+ {
36489
+ className: `h-4 w-4 transition-transform ${isOpen ? "rotate-0" : "-rotate-90"}`
36490
+ }
36491
+ )
36492
+ }
36493
+ )
36494
+ ] })
36383
36495
  ]
36384
36496
  }
36385
36497
  ),
@@ -36389,27 +36501,39 @@ var CampaignConceptCard = import_react64.default.memo(
36389
36501
  initial: { height: 0, opacity: 0 },
36390
36502
  animate: { height: "auto", opacity: 1 },
36391
36503
  exit: { height: 0, opacity: 0 },
36392
- transition: { duration: 0.3, ease: "easeInOut" },
36504
+ transition: { duration: 0.2, ease: "easeIn" },
36393
36505
  className: "overflow-hidden",
36394
- children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "px-6 pb-6 pt-0 border-t border-white/5", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36395
- FormCard,
36396
- {
36397
- ...formCardProps,
36398
- title: typeof cardTitle === "object" ? JSON.stringify(cardTitle) : String(cardTitle),
36399
- data,
36400
- fields,
36401
- showTimeline: true,
36402
- proceedLabel: "Continue with this concept",
36403
- onProceed: handleProceed,
36404
- isLatestMessage: effectiveIsLatest,
36405
- className: "bg-transparent border-none shadow-none mb-0 p-0",
36406
- footer: !effectiveIsLatest && (selectionStatus || hasUserResponded) ? /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-[10px] font-semibold py-4 pr-6", children: [
36407
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(CircleCheck, { className: "h-3.5 w-3.5" }),
36408
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
36409
- ] }) : formCardProps.footer
36410
- }
36411
- ) })
36412
- }
36506
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "p-6 w-full overflow-hidden relative", children: [
36507
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36508
+ "div",
36509
+ {
36510
+ className: "absolute left-[60px] top-[100px] bottom-[60px] w-[3px]",
36511
+ style: {
36512
+ background: `radial-gradient(circle closest-side, #3C3D3E 98%, transparent) 50%/2px 5px repeat-y, linear-gradient(#3C3D3E 50%, transparent 0) 50%/2px 10px repeat-y`
36513
+ }
36514
+ }
36515
+ ),
36516
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
36517
+ FormCard,
36518
+ {
36519
+ ...formCardProps,
36520
+ title: typeof cardTitle === "object" ? JSON.stringify(cardTitle) : String(cardTitle),
36521
+ data,
36522
+ fields,
36523
+ showTimeline: true,
36524
+ proceedLabel: "Continue with this concept",
36525
+ onProceed: handleProceed,
36526
+ isLatestMessage: effectiveIsLatest,
36527
+ className: "bg-transparent border-none shadow-none mb-0 p-0",
36528
+ footer: !effectiveIsLatest && (selectionStatus || hasUserResponded) ? /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-[10px] font-semibold py-4 pr-6", children: [
36529
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(CircleCheck, { className: "h-3.5 w-3.5" }),
36530
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
36531
+ ] }) : formCardProps.footer
36532
+ }
36533
+ )
36534
+ ] })
36535
+ },
36536
+ "expanded-content"
36413
36537
  ) })
36414
36538
  ]
36415
36539
  }