pxengine 0.1.13 → 0.1.15

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.js CHANGED
@@ -31564,7 +31564,7 @@ var ButtonAtom = ({
31564
31564
  }
31565
31565
  };
31566
31566
  const variantMap = {
31567
- purple: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-[0_4px_14px_0_hsl(var(--primary)/30%)] transition-all active:scale-95 font-bold",
31567
+ purple: "bg-[var(--primary-color)] text-[var(--primary-foreground,white)] hover:opacity-90 shadow-[0_4px_14px_0_hsl(var(--primary)/30%)] transition-all active:scale-95 font-bold",
31568
31568
  gradient: "bg-gradient-to-r from-primary via-purple-500 to-indigo-600 text-primary-foreground hover:opacity-95 shadow-[0_4px_14px_0_hsl(var(--primary)/40%)] active:scale-95 font-bold"
31569
31569
  };
31570
31570
  const customClass = variantMap[variant] || "";
@@ -31598,8 +31598,8 @@ var LayoutAtom = ({
31598
31598
  }) => {
31599
31599
  const gapMap = {
31600
31600
  none: "gap-0",
31601
- sm: "gap-2",
31602
- md: "gap-4",
31601
+ sm: "gap-4",
31602
+ md: "gap-6",
31603
31603
  lg: "gap-8",
31604
31604
  xl: "gap-12"
31605
31605
  };
@@ -33408,7 +33408,6 @@ __export(molecules_exports, {
33408
33408
  AudienceDemographicsCard: () => AudienceDemographicsCard,
33409
33409
  AudienceMetricCard: () => AudienceMetricCard,
33410
33410
  BrandAffinityGroup: () => BrandAffinityGroup,
33411
- CAMPAIGN_SEED_FIELDS: () => CAMPAIGN_SEED_FIELDS,
33412
33411
  CampaignSeedCard: () => CampaignSeedCard,
33413
33412
  ContentPreviewGallery: () => ContentPreviewGallery,
33414
33413
  CountrySelectDisplay: () => CountrySelectDisplay,
@@ -33429,7 +33428,6 @@ __export(molecules_exports, {
33429
33428
  MCQCard: () => MCQCard,
33430
33429
  NotificationList: () => NotificationList,
33431
33430
  PlatformIconGroup: () => PlatformIconGroup,
33432
- SEARCH_SPEC_FIELDS: () => SEARCH_SPEC_FIELDS,
33433
33431
  SearchSpecCard: () => SearchSpecCard,
33434
33432
  StatsGrid: () => StatsGrid,
33435
33433
  StepWizard: () => StepWizard,
@@ -33563,22 +33561,21 @@ var EditableField = React84.memo(
33563
33561
  if (type === "slider") {
33564
33562
  return config.sliderConfig?.formatValue ? config.sliderConfig.formatValue(value) : `${value?.min} - ${value?.max}`;
33565
33563
  }
33566
- if (!value)
33567
- return /* @__PURE__ */ jsx91("span", { className: "text-muted-foreground italic", children: "Not set" });
33564
+ if (!value) return /* @__PURE__ */ jsx91("span", { className: "opacity-0", children: "-" });
33568
33565
  return value.toString();
33569
33566
  };
33570
- return /* @__PURE__ */ jsxs53("div", { className: cn("group flex flex-col gap-1.5 py-2", className), children: [
33567
+ return /* @__PURE__ */ jsxs53("div", { className: cn("group flex flex-col gap-1 py-1.5", className), children: [
33571
33568
  /* @__PURE__ */ jsxs53("div", { className: "flex items-center justify-between", children: [
33572
- /* @__PURE__ */ jsx91(Label, { className: "text-xs font-medium text-gray500 uppercase tracking-tight", children: label }),
33569
+ /* @__PURE__ */ jsx91(Label, { className: "text-[13px] font-bold text-[var(--foreground)] opacity-80 uppercase tracking-wider", children: label }),
33573
33570
  isChanged && !isEditingProp && /* @__PURE__ */ jsx91(
33574
33571
  "div",
33575
33572
  {
33576
- className: "w-1.5 h-1.5 rounded-full bg-amber-500",
33573
+ className: "w-2 h-2 rounded-full bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.6)]",
33577
33574
  title: "Unsaved changes"
33578
33575
  }
33579
33576
  )
33580
33577
  ] }),
33581
- isEditingProp ? /* @__PURE__ */ jsxs53("div", { className: "flex flex-col gap-2", children: [
33578
+ isEditingProp ? /* @__PURE__ */ jsxs53("div", { className: "flex flex-col gap-3", children: [
33582
33579
  renderInput(),
33583
33580
  /* @__PURE__ */ jsxs53("div", { className: "flex items-center justify-end gap-2", children: [
33584
33581
  /* @__PURE__ */ jsx91(
@@ -33586,20 +33583,20 @@ var EditableField = React84.memo(
33586
33583
  {
33587
33584
  size: "icon",
33588
33585
  variant: "outline",
33589
- className: "h-8 w-8 text-destructive border-destructive/20 hover:bg-destructive/10",
33586
+ className: "h-9 w-9 text-destructive border-destructive/20 hover:bg-destructive/10 rounded-xl",
33590
33587
  onClick: onCancel,
33591
33588
  disabled: isSaving,
33592
- children: /* @__PURE__ */ jsx91(X, { className: "h-4 w-4" })
33589
+ children: /* @__PURE__ */ jsx91(X, { className: "h-5 w-5" })
33593
33590
  }
33594
33591
  ),
33595
33592
  /* @__PURE__ */ jsx91(
33596
33593
  Button,
33597
33594
  {
33598
33595
  size: "icon",
33599
- className: "h-8 w-8 bg-purple500 hover:bg-purple600 text-white",
33596
+ className: "h-9 w-9 bg-[var(--primary-color)] hover:opacity-90 text-[var(--primary-foreground,white)] rounded-xl shadow-lg shadow-[var(--primary-color)]/20",
33600
33597
  onClick: handleSave,
33601
33598
  disabled: isSaving,
33602
- children: isSaving ? /* @__PURE__ */ jsx91(LoaderCircle, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx91(Check, { className: "h-4 w-4" })
33599
+ children: isSaving ? /* @__PURE__ */ jsx91(LoaderCircle, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ jsx91(Check, { className: "h-5 w-5" })
33603
33600
  }
33604
33601
  )
33605
33602
  ] })
@@ -33607,13 +33604,13 @@ var EditableField = React84.memo(
33607
33604
  "div",
33608
33605
  {
33609
33606
  className: cn(
33610
- "relative flex items-center justify-between rounded-md px-2 py-1.5 transition-all",
33611
- "hover:bg-gray-100/50 cursor-pointer border border-transparent hover:border-gray-200"
33607
+ "relative flex items-center justify-between rounded-xl px-2 py-1.5 transition-all duration-200",
33608
+ "hover:bg-gray-100/80 cursor-pointer border border-transparent hover:border-gray-200 group-hover:shadow-sm"
33612
33609
  ),
33613
33610
  onClick: onEdit,
33614
33611
  children: [
33615
- /* @__PURE__ */ jsx91("div", { className: "text-sm text-gray-900 font-medium truncate flex-1 leading-relaxed", children: formattedValue() }),
33616
- /* @__PURE__ */ jsx91(Pencil, { className: "h-3.5 w-3.5 text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity" })
33612
+ /* @__PURE__ */ jsx91("div", { className: "text-[14px] text-gray-900 font-semibold truncate flex-1 leading-relaxed", children: formattedValue() }),
33613
+ /* @__PURE__ */ jsx91(Pencil, { className: "h-4 w-4 text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity" })
33617
33614
  ]
33618
33615
  }
33619
33616
  )
@@ -33673,8 +33670,8 @@ var ActionButton = React85.memo(
33673
33670
  onClick: onProceed,
33674
33671
  className: cn(
33675
33672
  "relative min-w-[140px] overflow-hidden group transition-all duration-300",
33676
- "bg-purple500 hover:bg-purple600 text-white font-semibold rounded-full px-6 py-2.5 shadow-md hover:shadow-lg",
33677
- variant === "outline" && "bg-transparent border-purple500 text-purple500 hover:bg-purple50",
33673
+ "bg-[var(--primary-color)] hover:opacity-90 text-white font-bold rounded-full px-5 py-2.5 shadow-[0_4px_14px_0_hsl(var(--primary)/30%)] hover:shadow-[0_6px_20px_0_hsl(var(--primary)/40%)]",
33674
+ variant === "outline" && "bg-transparent border-[var(--primary-color)] text-[var(--primary-color)] hover:bg-[var(--primary-color)]/5",
33678
33675
  isLoading && "opacity-80"
33679
33676
  ),
33680
33677
  children: [
@@ -33702,12 +33699,12 @@ var ActionButton = React85.memo(
33702
33699
  variant: "ghost",
33703
33700
  size: "icon",
33704
33701
  onClick: onPause,
33705
- className: "h-10 w-10 rounded-full hover:bg-gray200 text-gray600",
33702
+ className: "h-10 w-10 rounded-full hover:bg-[var(--foreground)]/5 text-[var(--foreground)]/60",
33706
33703
  title: isPaused ? "Resume auto-proceed" : "Pause auto-proceed",
33707
33704
  children: isPaused ? /* @__PURE__ */ jsx92(Play, { className: "h-4 w-4 fill-current" }) : /* @__PURE__ */ jsx92(Pause, { className: "h-4 w-4 fill-current" })
33708
33705
  }
33709
33706
  ),
33710
- secondaryLabel && /* @__PURE__ */ jsx92("span", { className: "text-sm text-gray-500 font-medium italic", children: secondaryLabel })
33707
+ secondaryLabel && /* @__PURE__ */ jsx92("span", { className: "text-sm text-[var(--foreground)]/50 font-medium italic", children: secondaryLabel })
33711
33708
  ] });
33712
33709
  }
33713
33710
  );
@@ -33727,7 +33724,8 @@ var FormCard = React86.memo(
33727
33724
  onFieldEdit,
33728
33725
  onFieldSave,
33729
33726
  onFieldCancel,
33730
- showTimeline = true,
33727
+ showTimeline = false,
33728
+ // Default to false to remove "bullets"
33731
33729
  proceedLabel,
33732
33730
  countdown,
33733
33731
  isPaused = false,
@@ -33746,52 +33744,62 @@ var FormCard = React86.memo(
33746
33744
  Card,
33747
33745
  {
33748
33746
  className: cn(
33749
- "w-full rounded-[24px] border border-gray200 bg-white shadow-sm overflow-hidden",
33747
+ "w-full rounded-[24px] border border-[var(--border-color)] bg-[var(--card-background)] shadow-lg overflow-hidden transition-all duration-300 hover:shadow-xl",
33750
33748
  className
33751
33749
  ),
33752
33750
  children: [
33753
- /* @__PURE__ */ jsxs55(CardHeader, { className: "flex flex-row items-center justify-between pb-2 space-y-0", children: [
33754
- /* @__PURE__ */ jsx93(CardTitle, { className: "text-lg font-bold text-gray-900 tracking-tight", children: title }),
33751
+ /* @__PURE__ */ jsxs55(CardHeader, { className: "flex flex-row items-center justify-between pb-3 pt-4 px-6 space-y-0", children: [
33752
+ /* @__PURE__ */ jsx93(CardTitle, { className: "text-lg font-bold text-[var(--foreground)] tracking-tight", children: title }),
33755
33753
  /* @__PURE__ */ jsx93(
33756
33754
  "button",
33757
33755
  {
33758
33756
  onClick: handleCopyAll,
33759
- className: "p-1.5 rounded-md hover:bg-gray-100 text-gray-400 hover:text-gray-600 transition-colors",
33757
+ className: "p-1.5 rounded-xl hover:bg-[var(--foreground)]/5 text-[var(--foreground)]/40 hover:text-[var(--foreground)]/60 transition-all active:scale-95",
33760
33758
  title: "Copy all details",
33761
33759
  children: /* @__PURE__ */ jsx93(Copy, { className: "h-4 w-4" })
33762
33760
  }
33763
33761
  )
33764
33762
  ] }),
33765
- /* @__PURE__ */ jsx93(CardContent, { className: "pt-2 pb-6", children: /* @__PURE__ */ jsxs55("div", { className: "relative", children: [
33766
- showTimeline && /* @__PURE__ */ jsx93("div", { className: "absolute left-[7px] top-2 bottom-6 w-0.5 border-l-2 border-dotted border-gray200 pointer-events-none" }),
33767
- /* @__PURE__ */ jsx93("div", { className: "space-y-4", children: fields.map((field) => /* @__PURE__ */ jsxs55("div", { className: "relative pl-6", children: [
33768
- showTimeline && /* @__PURE__ */ jsx93(
33769
- "div",
33770
- {
33771
- className: cn(
33772
- "absolute left-0 top-[18px] w-[14px] h-[14px] -translate-x-1/2 rounded-full border-2 bg-white z-10",
33773
- changedFields[field.key] ? "border-amber-500" : "border-gray-200"
33763
+ /* @__PURE__ */ jsx93(CardContent, { className: "px-6 pt-1 pb-4", children: /* @__PURE__ */ jsxs55("div", { className: "relative", children: [
33764
+ showTimeline && /* @__PURE__ */ jsx93("div", { className: "absolute left-[7px] top-2 bottom-6 w-0.5 border-l-2 border-dotted border-[var(--border-color)] pointer-events-none" }),
33765
+ /* @__PURE__ */ jsx93("div", { className: "space-y-2.5", children: fields.map((field) => /* @__PURE__ */ jsxs55(
33766
+ "div",
33767
+ {
33768
+ className: cn(
33769
+ "relative transition-all duration-300",
33770
+ showTimeline && "pl-8"
33771
+ ),
33772
+ children: [
33773
+ showTimeline && /* @__PURE__ */ jsx93(
33774
+ "div",
33775
+ {
33776
+ className: cn(
33777
+ "absolute left-0 top-[18px] w-[14px] h-[14px] -translate-x-1/2 rounded-full border-2 bg-[var(--background)] z-10 transition-all duration-300",
33778
+ changedFields[field.key] ? "border-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]" : "border-[var(--border-color)] shadow-sm"
33779
+ )
33780
+ }
33781
+ ),
33782
+ /* @__PURE__ */ jsx93(
33783
+ EditableField,
33784
+ {
33785
+ label: field.label,
33786
+ value: data[field.key],
33787
+ type: field.type,
33788
+ config: field,
33789
+ isEditing: editingFields[field.key],
33790
+ isChanged: changedFields[field.key],
33791
+ isSaving: savingFields[field.key],
33792
+ onEdit: () => onFieldEdit?.(field.key),
33793
+ onSave: (val) => onFieldSave?.(field.key, val),
33794
+ onCancel: () => onFieldCancel?.(field.key)
33795
+ }
33774
33796
  )
33775
- }
33776
- ),
33777
- /* @__PURE__ */ jsx93(
33778
- EditableField,
33779
- {
33780
- label: field.label,
33781
- value: data[field.key],
33782
- type: field.type,
33783
- config: field,
33784
- isEditing: editingFields[field.key],
33785
- isChanged: changedFields[field.key],
33786
- isSaving: savingFields[field.key],
33787
- onEdit: () => onFieldEdit?.(field.key),
33788
- onSave: (val) => onFieldSave?.(field.key, val),
33789
- onCancel: () => onFieldCancel?.(field.key)
33790
- }
33791
- )
33792
- ] }, field.key)) })
33797
+ ]
33798
+ },
33799
+ field.key
33800
+ )) })
33793
33801
  ] }) }),
33794
- (onProceed || footer) && /* @__PURE__ */ jsxs55(CardFooter, { className: "flex flex-col gap-4 pt-0 border-t border-gray-100/50 bg-gray-50/30 p-6", children: [
33802
+ (onProceed || footer) && /* @__PURE__ */ jsxs55(CardFooter, { className: "flex flex-col gap-3 border-t border-[var(--border-color)] bg-[var(--foreground)]/[0.03] p-6", children: [
33795
33803
  onProceed && proceedLabel && /* @__PURE__ */ jsx93("div", { className: "w-full flex justify-center", children: /* @__PURE__ */ jsx93(
33796
33804
  ActionButton,
33797
33805
  {
@@ -33815,8 +33823,10 @@ FormCard.displayName = "FormCard";
33815
33823
  import { jsx as jsx94, jsxs as jsxs56 } from "react/jsx-runtime";
33816
33824
  var StatsGrid = ({
33817
33825
  items,
33826
+ stats,
33818
33827
  className
33819
33828
  }) => {
33829
+ const displayItems = items || stats || [];
33820
33830
  return /* @__PURE__ */ jsx94(
33821
33831
  "div",
33822
33832
  {
@@ -33824,15 +33834,15 @@ var StatsGrid = ({
33824
33834
  "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",
33825
33835
  className
33826
33836
  ),
33827
- children: items.map((item, index) => {
33837
+ children: displayItems?.map((item, index) => {
33828
33838
  const Icon3 = item.icon ? lucide_react_exports[item.icon] : null;
33829
- const trendColor = item.trendDirection === "up" ? "text-green-600" : item.trendDirection === "down" ? "text-red-600" : "text-gray-500";
33839
+ const trendColor = item.trendDirection === "up" ? "text-emerald-600 dark:text-emerald-400" : item.trendDirection === "down" ? "text-rose-600 dark:text-rose-400" : "text-muted-foreground";
33830
33840
  const TrendIcon = item.trendDirection === "up" ? ArrowUpRight : item.trendDirection === "down" ? ArrowDownRight : null;
33831
33841
  return /* @__PURE__ */ jsx94(
33832
33842
  Card,
33833
33843
  {
33834
- className: "bg-white/60 backdrop-blur-sm border-purple-50 hover:shadow-md transition-all rounded-2xl overflow-hidden",
33835
- children: /* @__PURE__ */ jsxs56(CardContent, { className: "p-4 flex flex-col gap-2", children: [
33844
+ className: "bg-[var(--card-background,theme(colors.white))] dark:bg-[var(--card-background,theme(colors.zinc.900))] border-[var(--border-color,theme(colors.gray.200))] backdrop-blur-sm shadow-sm hover:shadow-md transition-all duration-300 rounded-[24px] overflow-hidden",
33845
+ children: /* @__PURE__ */ jsxs56(CardContent, { className: "p-5 flex flex-col gap-1.5", children: [
33836
33846
  /* @__PURE__ */ jsxs56("div", { className: "flex items-center justify-between", children: [
33837
33847
  /* @__PURE__ */ jsx94(
33838
33848
  TextAtom,
@@ -33841,12 +33851,12 @@ var StatsGrid = ({
33841
33851
  type: "text",
33842
33852
  content: item.label,
33843
33853
  variant: "small",
33844
- className: "text-muted-foreground font-medium"
33854
+ className: "text-muted-foreground font-medium tracking-wide uppercase text-[10px]"
33845
33855
  }
33846
33856
  ),
33847
- Icon3 && /* @__PURE__ */ jsx94(Icon3, { className: "w-4 h-4 text-purple-500" })
33857
+ Icon3 && /* @__PURE__ */ jsx94(Icon3, { className: "w-4 h-4 text-[var(--primary-color,theme(colors.purple.500))]" })
33848
33858
  ] }),
33849
- /* @__PURE__ */ jsxs56("div", { className: "flex items-baseline gap-2", children: [
33859
+ /* @__PURE__ */ jsxs56("div", { className: "flex items-baseline gap-3", children: [
33850
33860
  /* @__PURE__ */ jsx94(
33851
33861
  TextAtom,
33852
33862
  {
@@ -33854,15 +33864,19 @@ var StatsGrid = ({
33854
33864
  type: "text",
33855
33865
  content: String(item.value),
33856
33866
  variant: "h3",
33857
- className: "font-bold text-gray-900"
33867
+ className: cn(
33868
+ "font-bold text-[var(--foreground)] tracking-tight leading-tight",
33869
+ String(item.value).length > 20 ? "text-base" : String(item.value).length > 12 ? "text-lg" : "text-xl"
33870
+ )
33858
33871
  }
33859
33872
  ),
33860
33873
  item.trend && /* @__PURE__ */ jsxs56(
33861
33874
  "div",
33862
33875
  {
33863
33876
  className: cn(
33864
- "flex items-center text-xs font-bold",
33865
- trendColor
33877
+ "flex items-center text-xs font-bold px-1.5 py-0.5 rounded-full bg-opacity-10",
33878
+ trendColor,
33879
+ item.trendDirection === "up" ? "bg-emerald-100 dark:bg-emerald-900/30" : item.trendDirection === "down" ? "bg-rose-100 dark:bg-rose-900/30" : "bg-gray-100 dark:bg-gray-800"
33866
33880
  ),
33867
33881
  children: [
33868
33882
  TrendIcon && /* @__PURE__ */ jsx94(TrendIcon, { className: "w-3 h-3 mr-0.5" }),
@@ -34069,16 +34083,19 @@ var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
34069
34083
 
34070
34084
  // src/molecules/generic/TagCloud/TagCloud.tsx
34071
34085
  import { jsx as jsx99, jsxs as jsxs61 } from "react/jsx-runtime";
34072
- var TagCloud = ({ tags, className, onTagClick }) => {
34073
- return /* @__PURE__ */ jsx99("div", { className: cn("flex flex-wrap gap-2", className), children: tags.map((tag) => /* @__PURE__ */ jsxs61(
34086
+ var TagCloud = ({ tags = [], className, onTagClick }) => {
34087
+ const normalizedTags = tags.map(
34088
+ (t) => typeof t === "string" ? { label: t, value: t } : t
34089
+ );
34090
+ return /* @__PURE__ */ jsx99("div", { className: cn("flex flex-wrap gap-3.5", className), children: normalizedTags.map((tag) => /* @__PURE__ */ jsxs61(
34074
34091
  Badge2,
34075
34092
  {
34076
34093
  variant: "secondary",
34077
- className: "cursor-pointer bg-white border border-purple-50 hover:bg-purple-50 hover:border-purple-200 text-gray-700 rounded-lg px-3 py-1.5 transition-all flex items-center gap-2 shadow-sm",
34094
+ className: "cursor-pointer bg-[var(--card-background,theme(colors.white))] dark:bg-[var(--card-background,theme(colors.zinc.900))] border border-[var(--border-color,theme(colors.gray.200))] text-[var(--foreground)] hover:bg-[var(--primary-color)] hover:text-white hover:border-[var(--primary-color)] rounded-full px-3 py-1 transition-all duration-300 flex items-center gap-2 shadow-sm",
34078
34095
  onClick: () => onTagClick?.(tag.value),
34079
34096
  children: [
34080
- /* @__PURE__ */ jsx99("span", { children: tag.label }),
34081
- tag.count !== void 0 && /* @__PURE__ */ jsx99("span", { className: "text-[10px] font-bold bg-purple-100 text-purple-700 px-1.5 rounded-full", children: tag.count })
34097
+ /* @__PURE__ */ jsx99("span", { className: "font-medium", children: tag.label }),
34098
+ tag.count !== void 0 && /* @__PURE__ */ jsx99("span", { className: "text-[10px] font-bold bg-black/5 dark:bg-white/10 px-1.5 py-0.5 rounded-full min-w-[20px] text-center", children: tag.count })
34082
34099
  ]
34083
34100
  },
34084
34101
  tag.value
@@ -34261,89 +34278,68 @@ var NotificationList = ({
34261
34278
  };
34262
34279
 
34263
34280
  // src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
34264
- import React89 from "react";
34265
- import { jsx as jsx103, jsxs as jsxs65 } from "react/jsx-runtime";
34266
- var CAMPAIGN_SEED_FIELDS = [
34267
- {
34268
- key: "brand",
34269
- label: "Brand / Campaign",
34270
- type: "text",
34271
- placeholder: "Not specified"
34272
- },
34273
- {
34274
- key: "objective",
34275
- label: "Objective",
34276
- type: "text",
34277
- placeholder: "Not specified"
34278
- },
34279
- {
34280
- key: "budget_hint",
34281
- label: "Budget Hint",
34282
- type: "slider",
34283
- placeholder: "Not specified",
34284
- sliderConfig: {
34285
- min: 0,
34286
- max: 1e6,
34287
- step: 1e3,
34288
- formatValue: (value) => {
34289
- if (!value) return "$0 - $100K";
34290
- const formatCurrency = (amount) => {
34291
- if (amount >= 1e6) return `$${(amount / 1e6).toFixed(1)}M`;
34292
- if (amount >= 1e3) return `$${(amount / 1e3).toFixed(0)}K`;
34293
- return `$${amount.toLocaleString()}`;
34294
- };
34295
- let normalized;
34296
- if (typeof value === "object" && value?.min !== void 0) {
34297
- normalized = value;
34298
- } else if (typeof value === "string" && value.includes("-")) {
34299
- const [minStr, maxStr] = value.split("-");
34300
- normalized = {
34301
- min: Number(minStr) || 0,
34302
- max: Number(maxStr) || 1e5
34303
- };
34304
- } else {
34305
- const val = Number(String(value).replace(/[^0-9.]/g, "")) || 0;
34306
- normalized = val > 0 ? { min: val, max: val } : { min: 0, max: 1e5 };
34307
- }
34308
- if (normalized.min === normalized.max)
34309
- return formatCurrency(normalized.min);
34310
- return `${formatCurrency(normalized.min)} - ${formatCurrency(normalized.max)}`;
34311
- }
34281
+ import React89, { useMemo as useMemo4 } from "react";
34282
+
34283
+ // src/lib/field-utils.ts
34284
+ function normalizeLabel(key) {
34285
+ return key.split(/_|\s+/).map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
34286
+ }
34287
+ function inferFieldType(value) {
34288
+ if (typeof value === "boolean") return "checkbox";
34289
+ if (typeof value === "number") return "number";
34290
+ if (Array.isArray(value)) return "custom";
34291
+ if (typeof value === "object" && value !== null) {
34292
+ if ("min" in value && "max" in value) return "slider";
34293
+ return "custom";
34294
+ }
34295
+ if (typeof value === "string") {
34296
+ if (value.length > 100) return "textarea";
34297
+ return "text";
34298
+ }
34299
+ return "text";
34300
+ }
34301
+ function generateFieldsFromData(data) {
34302
+ if (!data || typeof data !== "object") return [];
34303
+ return Object.keys(data).map((key) => {
34304
+ const value = data[key];
34305
+ const type = inferFieldType(value);
34306
+ const config = {
34307
+ key,
34308
+ label: normalizeLabel(key),
34309
+ type
34310
+ };
34311
+ if (type === "slider" && typeof value === "object") {
34312
+ config.sliderConfig = {
34313
+ min: value.min ?? 0,
34314
+ max: value.max ?? 100,
34315
+ step: 1
34316
+ };
34312
34317
  }
34313
- },
34314
- {
34315
- key: "geo_or_audience",
34316
- label: "Geography or Audience",
34317
- type: "text",
34318
- placeholder: "Not specified"
34319
- },
34320
- {
34321
- key: "timeline_opt",
34322
- label: "Timeline Option",
34323
- type: "text",
34324
- placeholder: "Not specified"
34325
- },
34326
- {
34327
- key: "notes",
34328
- label: "Notes",
34329
- type: "textarea",
34330
- placeholder: "No notes",
34331
- rows: 4
34332
- }
34333
- ];
34318
+ return config;
34319
+ });
34320
+ }
34321
+
34322
+ // src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
34323
+ import { jsx as jsx103, jsxs as jsxs65 } from "react/jsx-runtime";
34334
34324
  var CampaignSeedCard = React89.memo(
34335
34325
  ({
34336
34326
  selectionStatus,
34337
34327
  isLatestMessage = true,
34338
34328
  className,
34329
+ fields: providedFields,
34330
+ data,
34339
34331
  ...formCardProps
34340
34332
  }) => {
34333
+ const fields = useMemo4(() => {
34334
+ return providedFields || generateFieldsFromData(data);
34335
+ }, [providedFields, data]);
34341
34336
  return /* @__PURE__ */ jsx103("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx103(
34342
34337
  FormCard,
34343
34338
  {
34344
34339
  ...formCardProps,
34345
- title: formCardProps.title || "Brand Information",
34346
- fields: CAMPAIGN_SEED_FIELDS,
34340
+ data,
34341
+ title: formCardProps.title || "Campaign Brief",
34342
+ fields,
34347
34343
  className,
34348
34344
  footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ jsxs65("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1", children: [
34349
34345
  /* @__PURE__ */ jsx103(CircleCheck, { className: "h-4 w-4" }),
@@ -34356,7 +34352,37 @@ var CampaignSeedCard = React89.memo(
34356
34352
  CampaignSeedCard.displayName = "CampaignSeedCard";
34357
34353
 
34358
34354
  // src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
34359
- import React90 from "react";
34355
+ import React90, { useMemo as useMemo5 } from "react";
34356
+ import { jsx as jsx104, jsxs as jsxs66 } from "react/jsx-runtime";
34357
+ var SearchSpecCard = React90.memo(
34358
+ ({
34359
+ selectionStatus,
34360
+ isLatestMessage = true,
34361
+ className,
34362
+ fields: providedFields,
34363
+ data,
34364
+ ...formCardProps
34365
+ }) => {
34366
+ const fields = useMemo5(() => {
34367
+ return providedFields || generateFieldsFromData(data);
34368
+ }, [providedFields, data]);
34369
+ return /* @__PURE__ */ jsx104(
34370
+ FormCard,
34371
+ {
34372
+ ...formCardProps,
34373
+ data,
34374
+ title: formCardProps.title || "Search Specification",
34375
+ fields,
34376
+ className,
34377
+ footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ jsxs66("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1", children: [
34378
+ /* @__PURE__ */ jsx104(CircleCheck, { className: "h-4 w-4" }),
34379
+ /* @__PURE__ */ jsx104("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
34380
+ ] }) : formCardProps.footer
34381
+ }
34382
+ );
34383
+ }
34384
+ );
34385
+ SearchSpecCard.displayName = "SearchSpecCard";
34360
34386
 
34361
34387
  // src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
34362
34388
  import { useState as useState6, useRef as useRef5, useEffect as useEffect6 } from "react";
@@ -34566,7 +34592,7 @@ var countriesWithFlags = Object.fromEntries(
34566
34592
  );
34567
34593
 
34568
34594
  // src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
34569
- import { jsx as jsx104, jsxs as jsxs66 } from "react/jsx-runtime";
34595
+ import { jsx as jsx105, jsxs as jsxs67 } from "react/jsx-runtime";
34570
34596
  var CountrySelectEdit = ({
34571
34597
  value,
34572
34598
  onChange
@@ -34584,16 +34610,16 @@ var CountrySelectEdit = ({
34584
34610
  return () => document.removeEventListener("mousedown", handleClickOutside);
34585
34611
  }, []);
34586
34612
  const inputValue = Array.isArray(value) ? value : [];
34587
- return /* @__PURE__ */ jsxs66("div", { className: "space-y-3", children: [
34588
- /* @__PURE__ */ jsxs66("div", { className: "relative", ref: dropdownRef, children: [
34589
- /* @__PURE__ */ jsxs66(
34613
+ return /* @__PURE__ */ jsxs67("div", { className: "space-y-3", children: [
34614
+ /* @__PURE__ */ jsxs67("div", { className: "relative", ref: dropdownRef, children: [
34615
+ /* @__PURE__ */ jsxs67(
34590
34616
  "div",
34591
34617
  {
34592
34618
  className: "flex-1 bg-white border border-gray200 rounded-md px-3 py-2 text-sm cursor-pointer flex items-center justify-between font-medium hover:border-purple500 transition-colors",
34593
34619
  onClick: () => setIsDropdownOpen(!isDropdownOpen),
34594
34620
  children: [
34595
- /* @__PURE__ */ jsx104("span", { className: "text-gray-700", children: inputValue.length > 0 ? `${inputValue.length} ${inputValue.length === 1 ? "country" : "countries"} selected` : "Select countries..." }),
34596
- /* @__PURE__ */ jsx104(
34621
+ /* @__PURE__ */ jsx105("span", { className: "text-gray-700", children: inputValue.length > 0 ? `${inputValue.length} ${inputValue.length === 1 ? "country" : "countries"} selected` : "Select countries..." }),
34622
+ /* @__PURE__ */ jsx105(
34597
34623
  ChevronDown,
34598
34624
  {
34599
34625
  className: cn(
@@ -34605,8 +34631,8 @@ var CountrySelectEdit = ({
34605
34631
  ]
34606
34632
  }
34607
34633
  ),
34608
- isDropdownOpen && /* @__PURE__ */ jsxs66("div", { className: "absolute top-full left-0 right-0 mt-1 bg-white border border-gray200 rounded-lg shadow-xl z-50 max-h-60 overflow-hidden animate-in fade-in slide-in-from-top-1", children: [
34609
- /* @__PURE__ */ jsx104("div", { className: "p-2 border-b border-gray-100", children: /* @__PURE__ */ jsx104(
34634
+ isDropdownOpen && /* @__PURE__ */ jsxs67("div", { className: "absolute top-full left-0 right-0 mt-1 bg-white border border-gray200 rounded-lg shadow-xl z-50 max-h-60 overflow-hidden animate-in fade-in slide-in-from-top-1", children: [
34635
+ /* @__PURE__ */ jsx105("div", { className: "p-2 border-b border-gray-100", children: /* @__PURE__ */ jsx105(
34610
34636
  "input",
34611
34637
  {
34612
34638
  type: "text",
@@ -34617,9 +34643,9 @@ var CountrySelectEdit = ({
34617
34643
  onClick: (e) => e.stopPropagation()
34618
34644
  }
34619
34645
  ) }),
34620
- /* @__PURE__ */ jsx104("div", { className: "max-h-40 overflow-y-auto p-1", children: countries.filter(
34646
+ /* @__PURE__ */ jsx105("div", { className: "max-h-40 overflow-y-auto p-1", children: countries.filter(
34621
34647
  (country) => country.name.toLowerCase().includes(searchTerm.toLowerCase()) || country.code.toLowerCase().includes(searchTerm.toLowerCase())
34622
- ).map((country) => /* @__PURE__ */ jsxs66(
34648
+ ).map((country) => /* @__PURE__ */ jsxs67(
34623
34649
  "div",
34624
34650
  {
34625
34651
  className: cn(
@@ -34640,31 +34666,31 @@ var CountrySelectEdit = ({
34640
34666
  }
34641
34667
  },
34642
34668
  children: [
34643
- /* @__PURE__ */ jsxs66("div", { className: "flex items-center gap-2", children: [
34644
- /* @__PURE__ */ jsx104("span", { className: "text-sm text-gray-700", children: country.name }),
34645
- /* @__PURE__ */ jsx104("span", { className: "text-xs text-gray-400 font-mono", children: country.code })
34669
+ /* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-2", children: [
34670
+ /* @__PURE__ */ jsx105("span", { className: "text-sm text-gray-700", children: country.name }),
34671
+ /* @__PURE__ */ jsx105("span", { className: "text-xs text-gray-400 font-mono", children: country.code })
34646
34672
  ] }),
34647
- inputValue.includes(country.code) && /* @__PURE__ */ jsx104(Check, { className: "h-4 w-4 text-purple500" })
34673
+ inputValue.includes(country.code) && /* @__PURE__ */ jsx105(Check, { className: "h-4 w-4 text-purple500" })
34648
34674
  ]
34649
34675
  },
34650
34676
  country.code
34651
34677
  )) })
34652
34678
  ] })
34653
34679
  ] }),
34654
- inputValue.length > 0 && /* @__PURE__ */ jsx104("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ jsxs66(
34680
+ inputValue.length > 0 && /* @__PURE__ */ jsx105("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ jsxs67(
34655
34681
  Badge2,
34656
34682
  {
34657
34683
  variant: "secondary",
34658
34684
  className: "bg-purple50 text-purple700 border-purple100 hover:bg-purple100 cursor-default flex items-center gap-1 pr-1",
34659
34685
  children: [
34660
34686
  countryCode,
34661
- /* @__PURE__ */ jsxs66(
34687
+ /* @__PURE__ */ jsxs67(
34662
34688
  "button",
34663
34689
  {
34664
34690
  onClick: () => onChange(inputValue.filter((c) => c !== countryCode)),
34665
34691
  className: "hover:bg-purple200 rounded-full p-0.5 transition-colors",
34666
34692
  children: [
34667
- /* @__PURE__ */ jsx104(ChevronDown, { className: "h-3 w-3 rotate-45" }),
34693
+ /* @__PURE__ */ jsx105(ChevronDown, { className: "h-3 w-3 rotate-45" }),
34668
34694
  " "
34669
34695
  ]
34670
34696
  }
@@ -34677,9 +34703,9 @@ var CountrySelectEdit = ({
34677
34703
  };
34678
34704
  var CountrySelectDisplay = ({ value }) => {
34679
34705
  if (!value || !Array.isArray(value) || value.length === 0) {
34680
- return /* @__PURE__ */ jsx104("span", { className: "text-muted-foreground italic", children: "Not specified" });
34706
+ return /* @__PURE__ */ jsx105("span", { className: "text-muted-foreground italic", children: "Not specified" });
34681
34707
  }
34682
- return /* @__PURE__ */ jsx104("div", { className: "flex flex-wrap gap-1.5", children: value.map((countryCode) => /* @__PURE__ */ jsx104(
34708
+ return /* @__PURE__ */ jsx105("div", { className: "flex flex-wrap gap-1.5", children: value.map((countryCode) => /* @__PURE__ */ jsx105(
34683
34709
  Badge2,
34684
34710
  {
34685
34711
  variant: "outline",
@@ -34701,22 +34727,22 @@ var KeywordBundlesEdit = ({
34701
34727
  groups[p].push({ bundle: b, index: idx });
34702
34728
  });
34703
34729
  const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
34704
- return /* @__PURE__ */ jsx104("div", { className: "space-y-6 pt-2", children: sortedPriorities.map((priority) => /* @__PURE__ */ jsxs66("div", { className: "space-y-3", children: [
34705
- /* @__PURE__ */ jsxs66("div", { className: "flex items-center gap-2", children: [
34706
- /* @__PURE__ */ jsxs66(Badge2, { className: "bg-purple500 hover:bg-purple500", children: [
34730
+ return /* @__PURE__ */ jsx105("div", { className: "space-y-6 pt-2", children: sortedPriorities.map((priority) => /* @__PURE__ */ jsxs67("div", { className: "space-y-3", children: [
34731
+ /* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-2", children: [
34732
+ /* @__PURE__ */ jsxs67(Badge2, { className: "bg-purple500 hover:bg-purple500", children: [
34707
34733
  "Priority ",
34708
34734
  priority
34709
34735
  ] }),
34710
- /* @__PURE__ */ jsx104("div", { className: "h-px flex-1 bg-gray-100" })
34736
+ /* @__PURE__ */ jsx105("div", { className: "h-px flex-1 bg-gray-100" })
34711
34737
  ] }),
34712
- groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ jsx104(
34738
+ groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ jsx105(
34713
34739
  "div",
34714
34740
  {
34715
34741
  className: "bg-gray-50/50 border border-gray-100 rounded-xl p-4 transition-all hover:bg-gray-50 hover:border-gray-200 shadow-sm",
34716
- children: /* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-3", children: [
34717
- /* @__PURE__ */ jsx104("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Keywords" }),
34718
- /* @__PURE__ */ jsxs66("div", { className: "space-y-3", children: [
34719
- /* @__PURE__ */ jsx104("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ jsxs66(
34742
+ children: /* @__PURE__ */ jsxs67("div", { className: "flex flex-col gap-3", children: [
34743
+ /* @__PURE__ */ jsx105("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Keywords" }),
34744
+ /* @__PURE__ */ jsxs67("div", { className: "space-y-3", children: [
34745
+ /* @__PURE__ */ jsx105("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ jsxs67(
34720
34746
  Badge2,
34721
34747
  {
34722
34748
  className: "bg-white border-gray-200 text-gray-700 hover:bg-red-50 hover:text-red-600 hover:border-red-100 transition-all cursor-pointer group",
@@ -34732,12 +34758,12 @@ var KeywordBundlesEdit = ({
34732
34758
  },
34733
34759
  children: [
34734
34760
  keyword,
34735
- /* @__PURE__ */ jsx104("span", { className: "ml-1 opacity-0 group-hover:opacity-100 transition-opacity", children: "\xD7" })
34761
+ /* @__PURE__ */ jsx105("span", { className: "ml-1 opacity-0 group-hover:opacity-100 transition-opacity", children: "\xD7" })
34736
34762
  ]
34737
34763
  },
34738
34764
  kIndex
34739
34765
  )) }),
34740
- /* @__PURE__ */ jsx104("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx104(
34766
+ /* @__PURE__ */ jsx105("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx105(
34741
34767
  "input",
34742
34768
  {
34743
34769
  type: "text",
@@ -34761,9 +34787,9 @@ var KeywordBundlesEdit = ({
34761
34787
  }
34762
34788
  ) })
34763
34789
  ] }),
34764
- /* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-1.5 mt-1", children: [
34765
- /* @__PURE__ */ jsx104("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Priority Level (1-5)" }),
34766
- /* @__PURE__ */ jsx104(
34790
+ /* @__PURE__ */ jsxs67("div", { className: "flex flex-col gap-1.5 mt-1", children: [
34791
+ /* @__PURE__ */ jsx105("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Priority Level (1-5)" }),
34792
+ /* @__PURE__ */ jsx105(
34767
34793
  "input",
34768
34794
  {
34769
34795
  type: "number",
@@ -34791,7 +34817,7 @@ var KeywordBundlesEdit = ({
34791
34817
  var KeywordBundlesDisplay = ({ value }) => {
34792
34818
  const bundles = Array.isArray(value) ? value : [];
34793
34819
  if (bundles.length === 0)
34794
- return /* @__PURE__ */ jsx104("span", { className: "text-muted-foreground italic", children: "Not specified" });
34820
+ return /* @__PURE__ */ jsx105("span", { className: "text-muted-foreground italic", children: "Not specified" });
34795
34821
  const groups = {};
34796
34822
  bundles.forEach((b) => {
34797
34823
  const p = Number(b?.priority) || 1;
@@ -34800,11 +34826,11 @@ var KeywordBundlesDisplay = ({ value }) => {
34800
34826
  groups[p].push(...keywords);
34801
34827
  });
34802
34828
  const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
34803
- return /* @__PURE__ */ jsx104("div", { className: "space-y-4 pt-1", children: sortedPriorities.map((priority) => {
34829
+ return /* @__PURE__ */ jsx105("div", { className: "space-y-4 pt-1", children: sortedPriorities.map((priority) => {
34804
34830
  const deduped = Array.from(new Set(groups[priority]));
34805
- return /* @__PURE__ */ jsxs66("div", { className: "space-y-2", children: [
34806
- /* @__PURE__ */ jsxs66("div", { className: "flex items-center gap-2", children: [
34807
- /* @__PURE__ */ jsxs66(
34831
+ return /* @__PURE__ */ jsxs67("div", { className: "space-y-2", children: [
34832
+ /* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-2", children: [
34833
+ /* @__PURE__ */ jsxs67(
34808
34834
  Badge2,
34809
34835
  {
34810
34836
  variant: "outline",
@@ -34815,9 +34841,9 @@ var KeywordBundlesDisplay = ({ value }) => {
34815
34841
  ]
34816
34842
  }
34817
34843
  ),
34818
- /* @__PURE__ */ jsx104("div", { className: "h-px flex-1 bg-gray-100/50" })
34844
+ /* @__PURE__ */ jsx105("div", { className: "h-px flex-1 bg-gray-100/50" })
34819
34845
  ] }),
34820
- /* @__PURE__ */ jsx104("div", { className: "flex flex-wrap gap-1.5", children: deduped.map((keyword) => /* @__PURE__ */ jsx104(
34846
+ /* @__PURE__ */ jsx105("div", { className: "flex flex-wrap gap-1.5", children: deduped.map((keyword) => /* @__PURE__ */ jsx105(
34821
34847
  Badge2,
34822
34848
  {
34823
34849
  variant: "secondary",
@@ -34830,87 +34856,8 @@ var KeywordBundlesDisplay = ({ value }) => {
34830
34856
  }) });
34831
34857
  };
34832
34858
 
34833
- // src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
34834
- import { jsx as jsx105, jsxs as jsxs67 } from "react/jsx-runtime";
34835
- var SEARCH_SPEC_FIELDS = [
34836
- {
34837
- key: "platforms",
34838
- label: "Platforms",
34839
- type: "select",
34840
- // Changed to select for simplicity in form, or custom if multi-select needed
34841
- placeholder: "Select platforms",
34842
- options: ["Instagram", "YouTube", "TikTok"]
34843
- },
34844
- {
34845
- key: "follower_range",
34846
- label: "Follower Range",
34847
- type: "slider",
34848
- placeholder: "Not specified",
34849
- sliderConfig: {
34850
- min: 0,
34851
- max: 5e6,
34852
- step: 1e4,
34853
- formatValue: (value) => {
34854
- if (!value || typeof value !== "object") return "0 - 2.5M followers";
34855
- const formatNum = (n) => {
34856
- if (n >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
34857
- if (n >= 1e3) return `${(n / 1e3).toFixed(0)}K`;
34858
- return n.toLocaleString();
34859
- };
34860
- return `${formatNum(value.min || 0)} - ${formatNum(value.max || 25e5)} followers`;
34861
- }
34862
- }
34863
- },
34864
- {
34865
- key: "geography",
34866
- label: "Geography",
34867
- type: "custom",
34868
- renderEdit: (value, onChange) => /* @__PURE__ */ jsx105(CountrySelectEdit, { value, onChange }),
34869
- renderDisplay: (value) => /* @__PURE__ */ jsx105(CountrySelectDisplay, { value })
34870
- },
34871
- {
34872
- key: "keyword_bundles",
34873
- label: "Keyword Bundles",
34874
- type: "custom",
34875
- renderEdit: (value, onChange) => /* @__PURE__ */ jsx105(KeywordBundlesEdit, { value, onChange }),
34876
- renderDisplay: (value) => /* @__PURE__ */ jsx105(KeywordBundlesDisplay, { value })
34877
- },
34878
- {
34879
- key: "desired_candidate_count",
34880
- label: "Initial Creators",
34881
- type: "number",
34882
- numberConfig: {
34883
- min: 1,
34884
- formatValue: (value) => `${value || 0} creators`
34885
- }
34886
- }
34887
- ];
34888
- var SearchSpecCard = React90.memo(
34889
- ({
34890
- selectionStatus,
34891
- isLatestMessage = true,
34892
- className,
34893
- ...formCardProps
34894
- }) => {
34895
- return /* @__PURE__ */ jsx105(
34896
- FormCard,
34897
- {
34898
- ...formCardProps,
34899
- title: formCardProps.title || "Creator Search Settings",
34900
- fields: SEARCH_SPEC_FIELDS,
34901
- className,
34902
- footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ jsxs67("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1", children: [
34903
- /* @__PURE__ */ jsx105(CircleCheck, { className: "h-4 w-4" }),
34904
- /* @__PURE__ */ jsx105("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
34905
- ] }) : formCardProps.footer
34906
- }
34907
- );
34908
- }
34909
- );
34910
- SearchSpecCard.displayName = "SearchSpecCard";
34911
-
34912
34859
  // src/molecules/creator-discovery/MCQCard/MCQCard.tsx
34913
- import React91 from "react";
34860
+ import React91, { useState as useState7 } from "react";
34914
34861
  import { jsx as jsx106, jsxs as jsxs68 } from "react/jsx-runtime";
34915
34862
  var MCQCard = React91.memo(
34916
34863
  ({
@@ -34919,7 +34866,7 @@ var MCQCard = React91.memo(
34919
34866
  recommended,
34920
34867
  selectedOption,
34921
34868
  onSelect,
34922
- onProceed,
34869
+ onAction,
34923
34870
  isLatestMessage = true,
34924
34871
  countdown,
34925
34872
  isPaused = false,
@@ -34928,27 +34875,33 @@ var MCQCard = React91.memo(
34928
34875
  className,
34929
34876
  selectionStatus
34930
34877
  }) => {
34878
+ const [localSelected, setLocalSelected] = useState7(null);
34879
+ const effectiveSelected = selectedOption ?? localSelected;
34931
34880
  const handleOptionClick = (key) => {
34932
- if (isLatestMessage && !isLoading) {
34881
+ if (!isLoading) {
34882
+ setLocalSelected(key);
34933
34883
  onSelect?.(key);
34934
34884
  }
34935
34885
  };
34936
34886
  const handleProceed = () => {
34937
- if (selectedOption || recommended) {
34938
- onProceed?.(selectedOption || recommended || "");
34887
+ const value = effectiveSelected || recommended || "";
34888
+ if (value) {
34889
+ if (onAction) {
34890
+ onAction(value);
34891
+ }
34939
34892
  }
34940
34893
  };
34941
34894
  return /* @__PURE__ */ jsxs68(
34942
34895
  Card,
34943
34896
  {
34944
34897
  className: cn(
34945
- "w-full rounded-[24px] border border-gray200 bg-white shadow-sm overflow-hidden",
34898
+ "w-full rounded-[24px] border border-[var(--border-color)] bg-[var(--card-background)] shadow-sm overflow-hidden",
34946
34899
  className
34947
34900
  ),
34948
34901
  children: [
34949
- /* @__PURE__ */ jsx106(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsx106(CardTitle, { className: "text-lg font-bold text-gray-900 tracking-tight leading-snug", children: question }) }),
34902
+ /* @__PURE__ */ jsx106(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsx106(CardTitle, { className: "text-lg font-bold text-[var(--foreground)] tracking-tight leading-snug", children: question }) }),
34950
34903
  /* @__PURE__ */ jsx106(CardContent, { className: "space-y-3 pb-6", children: Object.entries(options).map(([key, label]) => {
34951
- const isSelected = selectedOption === key;
34904
+ const isSelected = effectiveSelected === key;
34952
34905
  const isRecommended = key === recommended;
34953
34906
  return /* @__PURE__ */ jsxs68(
34954
34907
  "div",
@@ -34956,7 +34909,7 @@ var MCQCard = React91.memo(
34956
34909
  onClick: () => handleOptionClick(key),
34957
34910
  className: cn(
34958
34911
  "group relative flex items-start gap-4 p-4 rounded-2xl border transition-all duration-200 cursor-pointer",
34959
- isSelected ? "border-purple500 bg-purple50/30" : "border-gray-100 bg-gray-50/30 hover:border-gray-300 hover:bg-gray-50",
34912
+ isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]/5 shadow-[0_0_0_1px_var(--primary-color)]" : "border-[var(--border-color)] bg-[var(--background)]/30 hover:border-gray-300 hover:bg-[var(--background)]/50",
34960
34913
  isLoading && "opacity-50 cursor-not-allowed"
34961
34914
  ),
34962
34915
  children: [
@@ -34965,7 +34918,7 @@ var MCQCard = React91.memo(
34965
34918
  {
34966
34919
  className: cn(
34967
34920
  "mt-1 w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors",
34968
- isSelected ? "border-purple500 bg-purple500" : "border-gray-300 bg-white group-hover:border-gray-400"
34921
+ isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]" : "border-[var(--border-color)] bg-[var(--background)] group-hover:border-gray-400"
34969
34922
  ),
34970
34923
  children: isSelected && /* @__PURE__ */ jsx106("div", { className: "w-1.5 h-1.5 rounded-full bg-white" })
34971
34924
  }
@@ -34976,7 +34929,7 @@ var MCQCard = React91.memo(
34976
34929
  {
34977
34930
  className: cn(
34978
34931
  "text-sm font-semibold transition-colors",
34979
- isSelected ? "text-purple900" : "text-gray700"
34932
+ isSelected ? "text-[var(--foreground)]" : "text-[var(--foreground)]/80"
34980
34933
  ),
34981
34934
  children: label
34982
34935
  }
@@ -34985,18 +34938,18 @@ var MCQCard = React91.memo(
34985
34938
  Badge2,
34986
34939
  {
34987
34940
  variant: "outline",
34988
- className: "bg-green-50 text-green-700 border-green-100 flex items-center gap-1 text-[10px] py-0 h-5",
34941
+ className: "bg-green-500/10 text-green-500 border-green-500/20 flex items-center gap-1 text-[10px] py-0 h-5",
34989
34942
  children: [
34990
34943
  /* @__PURE__ */ jsx106(Sparkles, { className: "h-3 w-3" }),
34991
34944
  "Recommended"
34992
34945
  ]
34993
34946
  }
34994
34947
  ),
34995
- isSelected && !isLatestMessage && /* @__PURE__ */ jsx106(
34948
+ isSelected && /* @__PURE__ */ jsx106(
34996
34949
  Badge2,
34997
34950
  {
34998
34951
  variant: "outline",
34999
- className: "bg-purple-50 text-purple-700 border-purple-100 text-[10px] py-0 h-5",
34952
+ className: "bg-[var(--primary-color)]/10 text-[var(--primary-color)] border-[var(--primary-color)]/20 text-[10px] py-0 h-5",
35000
34953
  children: "Selected"
35001
34954
  }
35002
34955
  )
@@ -35006,18 +34959,18 @@ var MCQCard = React91.memo(
35006
34959
  key
35007
34960
  );
35008
34961
  }) }),
35009
- /* @__PURE__ */ jsx106(CardFooter, { className: "flex flex-col gap-4 pt-0 border-t border-gray-100/50 bg-gray-50/30 p-6", children: isLatestMessage ? /* @__PURE__ */ jsx106("div", { className: "w-full flex justify-center", children: /* @__PURE__ */ jsx106(
34962
+ /* @__PURE__ */ jsx106(CardFooter, { className: "flex flex-col gap-4 pt-0 border-t border-[var(--border-color)] bg-black/5 p-6", children: isLatestMessage ? /* @__PURE__ */ jsx106("div", { className: "w-full flex justify-center", children: /* @__PURE__ */ jsx106(
35010
34963
  ActionButton,
35011
34964
  {
35012
- label: selectedOption ? "Continue" : "Proceed with Recommendation",
34965
+ label: effectiveSelected ? "Continue" : "Proceed with Recommendation",
35013
34966
  countdown,
35014
34967
  isPaused,
35015
34968
  onPause,
35016
34969
  onProceed: handleProceed,
35017
34970
  isLoading,
35018
- disabled: !selectedOption && !recommended
34971
+ disabled: !effectiveSelected && !recommended
35019
34972
  }
35020
- ) }) : /* @__PURE__ */ jsxs68("div", { className: "w-full flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold", children: [
34973
+ ) }) : /* @__PURE__ */ jsxs68("div", { className: "w-full flex justify-end items-center gap-1.5 text-green-500 text-xs font-semibold", children: [
35021
34974
  /* @__PURE__ */ jsx106(CircleCheck, { className: "h-4 w-4" }),
35022
34975
  /* @__PURE__ */ jsx106("span", { children: selectionStatus === "agent" ? "Suggested by Agent, Approved by You" : "Selected by You" })
35023
34976
  ] }) })
@@ -35097,7 +35050,7 @@ var CreatorProfileSummary = ({
35097
35050
  "div",
35098
35051
  {
35099
35052
  className: cn(
35100
- "flex items-center gap-4 p-3 rounded-2xl bg-white/40 border border-purple-50 shadow-sm",
35053
+ "flex items-center gap-4 p-4 rounded-2xl bg-[var(--card-background,theme(colors.white))] dark:bg-[var(--card-background,theme(colors.zinc.950))] border border-[var(--border-color,theme(colors.gray.200))] shadow-sm transition-all duration-300 hover:shadow-md",
35101
35054
  className
35102
35055
  ),
35103
35056
  children: [
@@ -35149,7 +35102,7 @@ var AudienceMetricCard = ({
35149
35102
  Card,
35150
35103
  {
35151
35104
  className: cn(
35152
- "bg-white border-purple-50 rounded-3xl overflow-hidden",
35105
+ "bg-[var(--card-background,theme(colors.white))] dark:bg-[var(--card-background,theme(colors.zinc.900))] border-[var(--border-color,theme(colors.gray.200))] rounded-[32px] shadow-xl overflow-hidden transition-all duration-300 hover:shadow-2xl",
35153
35106
  className
35154
35107
  ),
35155
35108
  children: [
@@ -35205,7 +35158,7 @@ var CreatorGridCard = ({
35205
35158
  Card,
35206
35159
  {
35207
35160
  className: cn(
35208
- "group overflow-hidden rounded-[32px] border-none bg-white shadow-sm hover:shadow-xl transition-all duration-300",
35161
+ "group overflow-hidden rounded-[32px] border border-[var(--border-color)] bg-[var(--card-background)] shadow-sm hover:shadow-xl transition-all duration-300",
35209
35162
  className
35210
35163
  ),
35211
35164
  children: [
@@ -35221,13 +35174,13 @@ var CreatorGridCard = ({
35221
35174
  /* @__PURE__ */ jsx110("div", { className: "absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-t from-black/20 to-transparent" })
35222
35175
  ] }),
35223
35176
  /* @__PURE__ */ jsxs71(CardContent, { className: "relative pt-0 px-5 pb-6", children: [
35224
- /* @__PURE__ */ jsx110("div", { className: "absolute -top-10 left-5", children: /* @__PURE__ */ jsxs71(Avatar, { className: "h-20 w-20 border-4 border-white shadow-lg ring-2 ring-purple-100", children: [
35177
+ /* @__PURE__ */ jsx110("div", { className: "absolute -top-10 left-5", children: /* @__PURE__ */ jsxs71(Avatar, { className: "h-20 w-20 border-4 border-[var(--card-background)] shadow-lg ring-2 ring-purple-100/20", children: [
35225
35178
  /* @__PURE__ */ jsx110(AvatarImage, { src: avatarSrc, alt: name }),
35226
- /* @__PURE__ */ jsx110(AvatarFallback, { className: "bg-purple-50 text-purple-700 font-bold text-xl", children: name.charAt(0) })
35179
+ /* @__PURE__ */ jsx110(AvatarFallback, { className: "bg-purple-500/10 text-purple-500 font-bold text-xl", children: name.charAt(0) })
35227
35180
  ] }) }),
35228
35181
  /* @__PURE__ */ jsxs71("div", { className: "mt-12 flex flex-col gap-1", children: [
35229
- /* @__PURE__ */ jsx110("h3", { className: "text-xl font-bold text-gray-900 truncate", children: name }),
35230
- /* @__PURE__ */ jsxs71("p", { className: "text-sm text-muted-foreground font-medium", children: [
35182
+ /* @__PURE__ */ jsx110("h3", { className: "text-xl font-bold text-[var(--foreground)] truncate", children: name }),
35183
+ /* @__PURE__ */ jsxs71("p", { className: "text-sm text-[var(--foreground)]/60 font-medium", children: [
35231
35184
  "@",
35232
35185
  handle
35233
35186
  ] })
@@ -35237,15 +35190,15 @@ var CreatorGridCard = ({
35237
35190
  return Icon3 ? /* @__PURE__ */ jsx110(
35238
35191
  "div",
35239
35192
  {
35240
- className: "p-1.5 rounded-lg bg-gray-50 text-gray-600 hover:text-purple-600 hover:bg-purple-50 transition-colors",
35193
+ className: "p-1.5 rounded-lg bg-[var(--foreground)]/5 text-[var(--foreground)]/60 hover:text-purple-500 hover:bg-purple-500/10 transition-colors",
35241
35194
  children: /* @__PURE__ */ jsx110(Icon3, { className: "h-4 w-4" })
35242
35195
  },
35243
35196
  p
35244
35197
  ) : null;
35245
35198
  }) }),
35246
- /* @__PURE__ */ jsx110("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-gray-50 pt-4", children: metrics.map((m, i) => /* @__PURE__ */ jsxs71("div", { className: "flex flex-col", children: [
35247
- /* @__PURE__ */ jsx110("span", { className: "text-[10px] font-bold uppercase tracking-wider text-muted-foreground", children: m.label }),
35248
- /* @__PURE__ */ jsx110("span", { className: "text-sm font-bold text-purple-700", children: m.value })
35199
+ /* @__PURE__ */ jsx110("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-[var(--border-color)] pt-4", children: metrics.map((m, i) => /* @__PURE__ */ jsxs71("div", { className: "flex flex-col", children: [
35200
+ /* @__PURE__ */ jsx110("span", { className: "text-[10px] font-bold uppercase tracking-wider text-[var(--foreground)]/40", children: m.label }),
35201
+ /* @__PURE__ */ jsx110("span", { className: "text-sm font-bold text-[var(--primary-color)]", children: m.value })
35249
35202
  ] }, i)) })
35250
35203
  ] })
35251
35204
  ]
@@ -35955,7 +35908,7 @@ function EmptyContent({ className, ...props }) {
35955
35908
  }
35956
35909
 
35957
35910
  // src/components/ui/field.tsx
35958
- import { useMemo as useMemo4 } from "react";
35911
+ import { useMemo as useMemo6 } from "react";
35959
35912
  import { cva as cva10 } from "class-variance-authority";
35960
35913
  import { jsx as jsx119, jsxs as jsxs78 } from "react/jsx-runtime";
35961
35914
  function FieldSet({ className, ...props }) {
@@ -36138,7 +36091,7 @@ function FieldError({
36138
36091
  errors,
36139
36092
  ...props
36140
36093
  }) {
36141
- const content = useMemo4(() => {
36094
+ const content = useMemo6(() => {
36142
36095
  if (children) {
36143
36096
  return children;
36144
36097
  }
@@ -37288,21 +37241,6 @@ var renderContextDependentError = (componentName, normalizedName, key) => {
37288
37241
  key
37289
37242
  );
37290
37243
  };
37291
- var renderNotFoundError = (componentName, key) => {
37292
- return /* @__PURE__ */ jsxs80(
37293
- "div",
37294
- {
37295
- className: "p-3 border border-dashed border-red-500/50 text-red-500 text-xs rounded bg-red-50/30 my-2",
37296
- children: [
37297
- /* @__PURE__ */ jsx126("span", { className: "font-semibold", children: "\u274C Unknown Component:" }),
37298
- " ",
37299
- componentName,
37300
- /* @__PURE__ */ jsx126("p", { className: "text-[10px] text-red-400 mt-1", children: "Component not found in Atoms, Molecules, or UI Components registry." })
37301
- ]
37302
- },
37303
- key
37304
- );
37305
- };
37306
37244
  var normalizeProps = (props) => {
37307
37245
  const normalized = {};
37308
37246
  const dynamicStyle = {};
@@ -37398,7 +37336,7 @@ var PXEngineRenderer = ({
37398
37336
  const uniqueKey = id || `${componentName}-${index || Math.random().toString(36).substr(2, 9)}`;
37399
37337
  const normalizedName = componentName.charAt(0).toUpperCase() + componentName.slice(1);
37400
37338
  const resolveComponent = (identifier) => {
37401
- const normalized = identifier.charAt(0).toUpperCase() + identifier.slice(1);
37339
+ const normalized = identifier.split(/[-_]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
37402
37340
  const atomName2 = normalized.endsWith("Atom") ? normalized : `${normalized}Atom`;
37403
37341
  let Comp = atoms_exports[atomName2] || atoms_exports[normalized] || atoms_exports[identifier];
37404
37342
  if (!Comp) {
@@ -37428,7 +37366,6 @@ var PXEngineRenderer = ({
37428
37366
  console.warn(
37429
37367
  `[PXEngineRenderer] Component not found: ${componentName}`
37430
37368
  );
37431
- return renderNotFoundError(componentName, uniqueKey);
37432
37369
  }
37433
37370
  }
37434
37371
  const resolvedNormalized = resolvedIdentifier.charAt(0).toUpperCase() + resolvedIdentifier.slice(1);
@@ -37463,7 +37400,16 @@ var PXEngineRenderer = ({
37463
37400
  uniqueKey
37464
37401
  );
37465
37402
  } else {
37466
- return /* @__PURE__ */ jsx126(TargetComponent, { ...finalProps, style: finalStyle, children: Array.isArray(children) ? children.map((child, idx) => renderRecursive(child, idx)) : children }, uniqueKey);
37403
+ return /* @__PURE__ */ jsx126(
37404
+ TargetComponent,
37405
+ {
37406
+ ...finalProps,
37407
+ style: finalStyle,
37408
+ onAction,
37409
+ children: Array.isArray(children) ? children.map((child, idx) => renderRecursive(child, idx)) : children
37410
+ },
37411
+ uniqueKey
37412
+ );
37467
37413
  }
37468
37414
  };
37469
37415
  return /* @__PURE__ */ jsx126("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
@@ -37509,7 +37455,6 @@ export {
37509
37455
  BreadcrumbSeparator,
37510
37456
  Button,
37511
37457
  ButtonAtom,
37512
- CAMPAIGN_SEED_FIELDS,
37513
37458
  Calendar2 as Calendar,
37514
37459
  CalendarAtom,
37515
37460
  CampaignSeedCard,
@@ -37663,7 +37608,6 @@ export {
37663
37608
  ResizableAtom,
37664
37609
  ResizablePanel,
37665
37610
  ResizablePanelGroup,
37666
- SEARCH_SPEC_FIELDS,
37667
37611
  ScrollArea,
37668
37612
  ScrollAreaAtom,
37669
37613
  ScrollBar,