pxengine 0.1.22 → 0.1.24

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.d.cts CHANGED
@@ -1776,7 +1776,7 @@ interface CampaignSeedCardProps extends Omit<FormCardProps, "fields"> {
1776
1776
  *
1777
1777
  * A domain-specific molecule for the Creator Discovery workflow.
1778
1778
  * Encapsulates the specific brand info fields and selection status.
1779
- * Now dynamic: if no fields are provided, it generates them from the data object.
1779
+ * Uses smart field generation with proper renderers for all nested data types.
1780
1780
  */
1781
1781
  declare const CampaignSeedCard: React__default.NamedExoticComponent<CampaignSeedCardProps>;
1782
1782
 
package/dist/index.d.ts CHANGED
@@ -1776,7 +1776,7 @@ interface CampaignSeedCardProps extends Omit<FormCardProps, "fields"> {
1776
1776
  *
1777
1777
  * A domain-specific molecule for the Creator Discovery workflow.
1778
1778
  * Encapsulates the specific brand info fields and selection status.
1779
- * Now dynamic: if no fields are provided, it generates them from the data object.
1779
+ * Uses smart field generation with proper renderers for all nested data types.
1780
1780
  */
1781
1781
  declare const CampaignSeedCard: React__default.NamedExoticComponent<CampaignSeedCardProps>;
1782
1782
 
package/dist/index.mjs CHANGED
@@ -33772,7 +33772,7 @@ var EditableField = React85.memo(
33772
33772
  "div",
33773
33773
  {
33774
33774
  className: cn(
33775
- "relative z-10 group flex flex-col gap-2 p-3 bg-[#0A0A0A] rounded-md mb-8",
33775
+ "relative z-10 group flex flex-col gap-2 p-3 bg-background dark:bg-gray700 rounded-md mb-8",
33776
33776
  className
33777
33777
  ),
33778
33778
  children: [
@@ -33780,7 +33780,7 @@ var EditableField = React85.memo(
33780
33780
  /* @__PURE__ */ jsx94(
33781
33781
  "h4",
33782
33782
  {
33783
- className: "px-2 py-1 tracking-widest bg-purple200/50 dark:bg-purple-500/20 text-purpleText dark:text-purple-400 text-[10px] font-bold rounded uppercase",
33783
+ className: "px-2 py-1 tracking-widest bg-background bg-purple200 text-purpleText dark:text-purple-400 text-[10px] font-bold rounded uppercase",
33784
33784
  style: { fontFamily: "Noto Sans, sans-serif" },
33785
33785
  children: label
33786
33786
  }
@@ -33963,7 +33963,7 @@ var FormCard = React87.memo(
33963
33963
  "div",
33964
33964
  {
33965
33965
  className: cn(
33966
- "relative w-full rounded-[20px] bg-background dark:bg-gray50 border border-gray400 shadow-lg overflow-hidden mb-6",
33966
+ "relative w-full rounded-[20px] bg-background dark:bg-gray100 border border-gray400 shadow-lg overflow-hidden mb-6",
33967
33967
  className
33968
33968
  ),
33969
33969
  onMouseEnter: () => setShowCopyButton(true),
@@ -34548,53 +34548,6 @@ function generateFieldsFromData(data) {
34548
34548
  });
34549
34549
  }
34550
34550
 
34551
- // src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
34552
- import { jsx as jsx106, jsxs as jsxs66 } from "react/jsx-runtime";
34553
- var CampaignSeedCard = React90.memo(
34554
- ({
34555
- selectionStatus,
34556
- isLatestMessage = true,
34557
- className,
34558
- fields: providedFields,
34559
- data,
34560
- ...formCardProps
34561
- }) => {
34562
- const fields = useMemo4(() => {
34563
- return providedFields || generateFieldsFromData(data);
34564
- }, [providedFields, data]);
34565
- return /* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-2 mb-10", children: [
34566
- /* @__PURE__ */ jsx106(
34567
- FormCard,
34568
- {
34569
- ...formCardProps,
34570
- data,
34571
- title: formCardProps.title || "Campaign Brief",
34572
- fields,
34573
- className,
34574
- footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ jsxs66("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1 mb-6", children: [
34575
- /* @__PURE__ */ jsx106(CircleCheck, { className: "h-4 w-4" }),
34576
- /* @__PURE__ */ jsx106("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
34577
- ] }) : formCardProps.footer
34578
- }
34579
- ),
34580
- !isLatestMessage && selectionStatus && /* @__PURE__ */ jsx106("div", { className: "flex justify-center mt-4", children: /* @__PURE__ */ jsx106(
34581
- "button",
34582
- {
34583
- className: cn(
34584
- "flex items-center gap-2 px-6 py-2.5 border rounded-full text-sm transition-all active:scale-95",
34585
- "bg-purpleLight dark:bg-purple200 hover:bg-purpleText1 dark:hover:bg-purple100 text-purpleText2 dark:text-purpleText border-purpleText1 dark:border-purpleText dark:hover:text-white"
34586
- ),
34587
- children: "Continue"
34588
- }
34589
- ) })
34590
- ] });
34591
- }
34592
- );
34593
- CampaignSeedCard.displayName = "CampaignSeedCard";
34594
-
34595
- // src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
34596
- import React91, { useMemo as useMemo5 } from "react";
34597
-
34598
34551
  // src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
34599
34552
  import { useState as useState8, useRef as useRef5, useEffect as useEffect6 } from "react";
34600
34553
 
@@ -34803,7 +34756,7 @@ var countriesWithFlags = Object.fromEntries(
34803
34756
  );
34804
34757
 
34805
34758
  // src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
34806
- import { jsx as jsx107, jsxs as jsxs67 } from "react/jsx-runtime";
34759
+ import { jsx as jsx106, jsxs as jsxs66 } from "react/jsx-runtime";
34807
34760
  var CountrySelectEdit = ({
34808
34761
  value,
34809
34762
  onChange
@@ -34821,16 +34774,16 @@ var CountrySelectEdit = ({
34821
34774
  return () => document.removeEventListener("mousedown", handleClickOutside);
34822
34775
  }, []);
34823
34776
  const inputValue = Array.isArray(value) ? value : [];
34824
- return /* @__PURE__ */ jsxs67("div", { className: "space-y-3", children: [
34825
- /* @__PURE__ */ jsxs67("div", { className: "relative", ref: dropdownRef, children: [
34826
- /* @__PURE__ */ jsxs67(
34777
+ return /* @__PURE__ */ jsxs66("div", { className: "space-y-3", children: [
34778
+ /* @__PURE__ */ jsxs66("div", { className: "relative", ref: dropdownRef, children: [
34779
+ /* @__PURE__ */ jsxs66(
34827
34780
  "div",
34828
34781
  {
34829
34782
  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",
34830
34783
  onClick: () => setIsDropdownOpen(!isDropdownOpen),
34831
34784
  children: [
34832
- /* @__PURE__ */ jsx107("span", { className: "text-gray-700", children: inputValue.length > 0 ? `${inputValue.length} ${inputValue.length === 1 ? "country" : "countries"} selected` : "Select countries..." }),
34833
- /* @__PURE__ */ jsx107(
34785
+ /* @__PURE__ */ jsx106("span", { className: "text-gray-700", children: inputValue.length > 0 ? `${inputValue.length} ${inputValue.length === 1 ? "country" : "countries"} selected` : "Select countries..." }),
34786
+ /* @__PURE__ */ jsx106(
34834
34787
  ChevronDown,
34835
34788
  {
34836
34789
  className: cn(
@@ -34842,8 +34795,8 @@ var CountrySelectEdit = ({
34842
34795
  ]
34843
34796
  }
34844
34797
  ),
34845
- 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: [
34846
- /* @__PURE__ */ jsx107("div", { className: "p-2 border-b border-gray-100", children: /* @__PURE__ */ jsx107(
34798
+ 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: [
34799
+ /* @__PURE__ */ jsx106("div", { className: "p-2 border-b border-gray-100", children: /* @__PURE__ */ jsx106(
34847
34800
  "input",
34848
34801
  {
34849
34802
  type: "text",
@@ -34854,9 +34807,9 @@ var CountrySelectEdit = ({
34854
34807
  onClick: (e) => e.stopPropagation()
34855
34808
  }
34856
34809
  ) }),
34857
- /* @__PURE__ */ jsx107("div", { className: "max-h-40 overflow-y-auto p-1", children: countries.filter(
34810
+ /* @__PURE__ */ jsx106("div", { className: "max-h-40 overflow-y-auto p-1", children: countries.filter(
34858
34811
  (country) => country.name.toLowerCase().includes(searchTerm.toLowerCase()) || country.code.toLowerCase().includes(searchTerm.toLowerCase())
34859
- ).map((country) => /* @__PURE__ */ jsxs67(
34812
+ ).map((country) => /* @__PURE__ */ jsxs66(
34860
34813
  "div",
34861
34814
  {
34862
34815
  className: cn(
@@ -34877,31 +34830,31 @@ var CountrySelectEdit = ({
34877
34830
  }
34878
34831
  },
34879
34832
  children: [
34880
- /* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-2", children: [
34881
- /* @__PURE__ */ jsx107("span", { className: "text-sm text-gray-700", children: country.name }),
34882
- /* @__PURE__ */ jsx107("span", { className: "text-xs text-gray-400 font-mono", children: country.code })
34833
+ /* @__PURE__ */ jsxs66("div", { className: "flex items-center gap-2", children: [
34834
+ /* @__PURE__ */ jsx106("span", { className: "text-sm text-gray-700", children: country.name }),
34835
+ /* @__PURE__ */ jsx106("span", { className: "text-xs text-gray-400 font-mono", children: country.code })
34883
34836
  ] }),
34884
- inputValue.includes(country.code) && /* @__PURE__ */ jsx107(Check, { className: "h-4 w-4 text-purple500" })
34837
+ inputValue.includes(country.code) && /* @__PURE__ */ jsx106(Check, { className: "h-4 w-4 text-purple500" })
34885
34838
  ]
34886
34839
  },
34887
34840
  country.code
34888
34841
  )) })
34889
34842
  ] })
34890
34843
  ] }),
34891
- inputValue.length > 0 && /* @__PURE__ */ jsx107("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ jsxs67(
34844
+ inputValue.length > 0 && /* @__PURE__ */ jsx106("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ jsxs66(
34892
34845
  Badge2,
34893
34846
  {
34894
34847
  variant: "secondary",
34895
34848
  className: "bg-purple50 text-purple700 border-purple100 hover:bg-purple100 cursor-default flex items-center gap-1 pr-1",
34896
34849
  children: [
34897
34850
  countryCode,
34898
- /* @__PURE__ */ jsxs67(
34851
+ /* @__PURE__ */ jsxs66(
34899
34852
  "button",
34900
34853
  {
34901
34854
  onClick: () => onChange(inputValue.filter((c) => c !== countryCode)),
34902
34855
  className: "hover:bg-purple200 rounded-full p-0.5 transition-colors",
34903
34856
  children: [
34904
- /* @__PURE__ */ jsx107(ChevronDown, { className: "h-3 w-3 rotate-45" }),
34857
+ /* @__PURE__ */ jsx106(ChevronDown, { className: "h-3 w-3 rotate-45" }),
34905
34858
  " "
34906
34859
  ]
34907
34860
  }
@@ -34914,9 +34867,9 @@ var CountrySelectEdit = ({
34914
34867
  };
34915
34868
  var CountrySelectDisplay = ({ value }) => {
34916
34869
  if (!value || !Array.isArray(value) || value.length === 0) {
34917
- return /* @__PURE__ */ jsx107("span", { className: "text-muted-foreground italic", children: "Not specified" });
34870
+ return /* @__PURE__ */ jsx106("span", { className: "text-muted-foreground italic", children: "Not specified" });
34918
34871
  }
34919
- return /* @__PURE__ */ jsx107("div", { className: "flex flex-wrap gap-1.5", children: value.map((countryCode) => /* @__PURE__ */ jsx107(
34872
+ return /* @__PURE__ */ jsx106("div", { className: "flex flex-wrap gap-1.5", children: value.map((countryCode) => /* @__PURE__ */ jsx106(
34920
34873
  Badge2,
34921
34874
  {
34922
34875
  variant: "outline",
@@ -34938,22 +34891,22 @@ var KeywordBundlesEdit = ({
34938
34891
  groups[p].push({ bundle: b, index: idx });
34939
34892
  });
34940
34893
  const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
34941
- return /* @__PURE__ */ jsx107("div", { className: "space-y-6 pt-2", children: sortedPriorities.map((priority) => /* @__PURE__ */ jsxs67("div", { className: "space-y-3", children: [
34942
- /* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-2", children: [
34943
- /* @__PURE__ */ jsxs67(Badge2, { className: "bg-purple500 hover:bg-purple500", children: [
34894
+ return /* @__PURE__ */ jsx106("div", { className: "space-y-6 pt-2", children: sortedPriorities.map((priority) => /* @__PURE__ */ jsxs66("div", { className: "space-y-3", children: [
34895
+ /* @__PURE__ */ jsxs66("div", { className: "flex items-center gap-2", children: [
34896
+ /* @__PURE__ */ jsxs66(Badge2, { className: "bg-purple500 hover:bg-purple500", children: [
34944
34897
  "Priority ",
34945
34898
  priority
34946
34899
  ] }),
34947
- /* @__PURE__ */ jsx107("div", { className: "h-px flex-1 bg-gray-100" })
34900
+ /* @__PURE__ */ jsx106("div", { className: "h-px flex-1 bg-gray-100" })
34948
34901
  ] }),
34949
- groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ jsx107(
34902
+ groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ jsx106(
34950
34903
  "div",
34951
34904
  {
34952
34905
  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",
34953
- children: /* @__PURE__ */ jsxs67("div", { className: "flex flex-col gap-3", children: [
34954
- /* @__PURE__ */ jsx107("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Keywords" }),
34955
- /* @__PURE__ */ jsxs67("div", { className: "space-y-3", children: [
34956
- /* @__PURE__ */ jsx107("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ jsxs67(
34906
+ children: /* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-3", children: [
34907
+ /* @__PURE__ */ jsx106("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Keywords" }),
34908
+ /* @__PURE__ */ jsxs66("div", { className: "space-y-3", children: [
34909
+ /* @__PURE__ */ jsx106("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ jsxs66(
34957
34910
  Badge2,
34958
34911
  {
34959
34912
  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",
@@ -34969,12 +34922,12 @@ var KeywordBundlesEdit = ({
34969
34922
  },
34970
34923
  children: [
34971
34924
  keyword,
34972
- /* @__PURE__ */ jsx107("span", { className: "ml-1 opacity-0 group-hover:opacity-100 transition-opacity", children: "\xD7" })
34925
+ /* @__PURE__ */ jsx106("span", { className: "ml-1 opacity-0 group-hover:opacity-100 transition-opacity", children: "\xD7" })
34973
34926
  ]
34974
34927
  },
34975
34928
  kIndex
34976
34929
  )) }),
34977
- /* @__PURE__ */ jsx107("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx107(
34930
+ /* @__PURE__ */ jsx106("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx106(
34978
34931
  "input",
34979
34932
  {
34980
34933
  type: "text",
@@ -34998,9 +34951,9 @@ var KeywordBundlesEdit = ({
34998
34951
  }
34999
34952
  ) })
35000
34953
  ] }),
35001
- /* @__PURE__ */ jsxs67("div", { className: "flex flex-col gap-1.5 mt-1", children: [
35002
- /* @__PURE__ */ jsx107("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Priority Level (1-5)" }),
35003
- /* @__PURE__ */ jsx107(
34954
+ /* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-1.5 mt-1", children: [
34955
+ /* @__PURE__ */ jsx106("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Priority Level (1-5)" }),
34956
+ /* @__PURE__ */ jsx106(
35004
34957
  "input",
35005
34958
  {
35006
34959
  type: "number",
@@ -35028,7 +34981,7 @@ var KeywordBundlesEdit = ({
35028
34981
  var KeywordBundlesDisplay = ({ value }) => {
35029
34982
  const bundles = Array.isArray(value) ? value : [];
35030
34983
  if (bundles.length === 0)
35031
- return /* @__PURE__ */ jsx107("span", { className: "text-gray-500 italic text-sm", children: "Not specified" });
34984
+ return /* @__PURE__ */ jsx106("span", { className: "text-gray-500 italic text-sm", children: "Not specified" });
35032
34985
  const groups = {};
35033
34986
  bundles.forEach((b) => {
35034
34987
  const p = Number(b?.priority) || 1;
@@ -35037,20 +34990,20 @@ var KeywordBundlesDisplay = ({ value }) => {
35037
34990
  groups[p].push(...keywords);
35038
34991
  });
35039
34992
  const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
35040
- return /* @__PURE__ */ jsx107("div", { className: "space-y-4 pt-2", children: sortedPriorities.map((priority) => {
34993
+ return /* @__PURE__ */ jsx106("div", { className: "space-y-4 pt-2", children: sortedPriorities.map((priority) => {
35041
34994
  const deduped = Array.from(new Set(groups[priority]));
35042
- return /* @__PURE__ */ jsxs67("div", { className: "space-y-2", children: [
35043
- /* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-2", children: [
35044
- /* @__PURE__ */ jsxs67("span", { className: "text-[10px] uppercase tracking-widest text-purple-400 font-bold", children: [
34995
+ return /* @__PURE__ */ jsxs66("div", { className: "space-y-2", children: [
34996
+ /* @__PURE__ */ jsxs66("div", { className: "flex items-center gap-2", children: [
34997
+ /* @__PURE__ */ jsxs66("span", { className: "text-[10px] uppercase tracking-widest text-purple-400 font-bold", children: [
35045
34998
  "Priority ",
35046
34999
  priority
35047
35000
  ] }),
35048
- /* @__PURE__ */ jsx107("div", { className: "h-[1px] flex-1 bg-white/10" })
35001
+ /* @__PURE__ */ jsx106("div", { className: "h-[1px] flex-1 bg-white/10" })
35049
35002
  ] }),
35050
- /* @__PURE__ */ jsx107("div", { className: "flex flex-wrap gap-2", children: deduped.map((keyword) => /* @__PURE__ */ jsx107(
35003
+ /* @__PURE__ */ jsx106("div", { className: "flex flex-wrap gap-2", children: deduped.map((keyword) => /* @__PURE__ */ jsx106(
35051
35004
  "div",
35052
35005
  {
35053
- className: "px-2 py-1 rounded bg-[#1A1A1A] border border-white/10 text-gray-300 text-xs font-medium",
35006
+ className: "px-2 py-1 rounded bg-background bg-gray400 border border-white/10 text-gray-300 text-xs font-medium",
35054
35007
  children: keyword
35055
35008
  },
35056
35009
  keyword
@@ -35059,9 +35012,135 @@ var KeywordBundlesDisplay = ({ value }) => {
35059
35012
  }) });
35060
35013
  };
35061
35014
 
35015
+ // src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
35016
+ import { jsx as jsx107, jsxs as jsxs67 } from "react/jsx-runtime";
35017
+ var ObjectDisplay = ({ value }) => {
35018
+ if (!value || typeof value !== "object") return null;
35019
+ return /* @__PURE__ */ jsx107("div", { className: "space-y-1 pt-1", children: Object.entries(value).map(([k, v]) => /* @__PURE__ */ jsxs67("div", { className: "flex gap-2 text-sm", children: [
35020
+ /* @__PURE__ */ jsxs67("span", { className: "text-muted-foreground capitalize min-w-[120px]", children: [
35021
+ k.replace(/_/g, " "),
35022
+ ":"
35023
+ ] }),
35024
+ /* @__PURE__ */ jsx107("span", { className: "text-foreground font-medium", children: Array.isArray(v) ? v.join(", ") : String(v) })
35025
+ ] }, k)) });
35026
+ };
35027
+ var StringArrayDisplay = ({ value }) => {
35028
+ if (!Array.isArray(value) || value.length === 0)
35029
+ return /* @__PURE__ */ jsx107("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
35030
+ return /* @__PURE__ */ jsx107("div", { className: "flex flex-wrap gap-1.5 pt-1", children: value.map((item) => /* @__PURE__ */ jsx107(Badge2, { variant: "outline", className: "text-xs", children: item }, item)) });
35031
+ };
35032
+ function buildCampaignSeedFields(data) {
35033
+ if (!data || typeof data !== "object") return [];
35034
+ return Object.keys(data).map((key) => {
35035
+ const value = data[key];
35036
+ if (key === "keyword_bundles" || key === "keywordBundles") {
35037
+ return {
35038
+ key,
35039
+ label: "Keyword Bundles",
35040
+ type: "custom",
35041
+ renderDisplay: (v) => /* @__PURE__ */ jsx107(KeywordBundlesDisplay, { value: v })
35042
+ };
35043
+ }
35044
+ if (key === "geography") {
35045
+ return {
35046
+ key,
35047
+ label: "Geography",
35048
+ type: "custom",
35049
+ renderDisplay: (v) => /* @__PURE__ */ jsx107(CountrySelectDisplay, { value: v })
35050
+ };
35051
+ }
35052
+ if (key === "platforms" && Array.isArray(value)) {
35053
+ return {
35054
+ key,
35055
+ label: "Platforms",
35056
+ type: "custom",
35057
+ renderDisplay: (v) => {
35058
+ const platforms = Array.isArray(v) ? v : [v];
35059
+ return /* @__PURE__ */ jsx107("div", { className: "flex flex-wrap gap-2", children: platforms.map((p) => /* @__PURE__ */ jsx107(
35060
+ BadgeAtom,
35061
+ {
35062
+ id: `platform-${p}`,
35063
+ type: "badge",
35064
+ label: p,
35065
+ variant: "outline",
35066
+ className: "bg-background bg-purple200 border-gray400 text-white font-medium"
35067
+ },
35068
+ p
35069
+ )) });
35070
+ }
35071
+ };
35072
+ }
35073
+ if (Array.isArray(value) && value.every((v) => typeof v === "string")) {
35074
+ const label = key.split(/_|(?=[A-Z])/).map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join(" ");
35075
+ return {
35076
+ key,
35077
+ label,
35078
+ type: "custom",
35079
+ renderDisplay: (v) => /* @__PURE__ */ jsx107(StringArrayDisplay, { value: v })
35080
+ };
35081
+ }
35082
+ if (typeof value === "object" && value !== null && !Array.isArray(value) && "min" in value && "max" in value) {
35083
+ const label = key.split(/_|(?=[A-Z])/).map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join(" ");
35084
+ return {
35085
+ key,
35086
+ label,
35087
+ type: "custom",
35088
+ renderDisplay: (v) => {
35089
+ if (typeof v === "object" && v !== null) {
35090
+ return /* @__PURE__ */ jsx107("span", { className: "text-white font-medium", children: `${v.min?.toLocaleString()} - ${v.max?.toLocaleString()}` });
35091
+ }
35092
+ return /* @__PURE__ */ jsx107("span", { className: "text-white font-medium", children: v });
35093
+ }
35094
+ };
35095
+ }
35096
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
35097
+ const label = key.split(/_|(?=[A-Z])/).map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join(" ");
35098
+ return {
35099
+ key,
35100
+ label,
35101
+ type: "custom",
35102
+ renderDisplay: (v) => /* @__PURE__ */ jsx107(ObjectDisplay, { value: v })
35103
+ };
35104
+ }
35105
+ const [generated] = generateFieldsFromData({ [key]: value });
35106
+ return generated;
35107
+ });
35108
+ }
35109
+ var CampaignSeedCard = React90.memo(
35110
+ ({
35111
+ selectionStatus,
35112
+ isLatestMessage = true,
35113
+ className,
35114
+ fields: providedFields,
35115
+ data,
35116
+ ...formCardProps
35117
+ }) => {
35118
+ const fields = useMemo4(() => {
35119
+ return providedFields || buildCampaignSeedFields(data);
35120
+ }, [providedFields, data]);
35121
+ return /* @__PURE__ */ jsx107("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx107(
35122
+ FormCard,
35123
+ {
35124
+ ...formCardProps,
35125
+ data,
35126
+ title: formCardProps.title || "Campaign Brief",
35127
+ fields,
35128
+ showTimeline: true,
35129
+ className: cn("font-noto", className),
35130
+ footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ jsxs67("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-[10px] font-semibold py-4 pr-6", children: [
35131
+ /* @__PURE__ */ jsx107(CircleCheck, { className: "h-3.5 w-3.5" }),
35132
+ /* @__PURE__ */ jsx107("span", { children: selectionStatus === "agent" ? "Suggested by Agent" : "Selected by you" })
35133
+ ] }) : formCardProps.footer
35134
+ }
35135
+ ) });
35136
+ }
35137
+ );
35138
+ CampaignSeedCard.displayName = "CampaignSeedCard";
35139
+
35062
35140
  // src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
35141
+ import React91, { useMemo as useMemo5 } from "react";
35063
35142
  import { jsx as jsx108, jsxs as jsxs68 } from "react/jsx-runtime";
35064
- var ObjectDisplay = ({ value }) => {
35143
+ var ObjectDisplay2 = ({ value }) => {
35065
35144
  if (!value || typeof value !== "object") return null;
35066
35145
  return /* @__PURE__ */ jsx108("div", { className: "space-y-1 pt-1", children: Object.entries(value).map(([k, v]) => /* @__PURE__ */ jsxs68("div", { className: "flex gap-2 text-sm", children: [
35067
35146
  /* @__PURE__ */ jsxs68("span", { className: "text-muted-foreground capitalize min-w-[120px]", children: [
@@ -35071,7 +35150,7 @@ var ObjectDisplay = ({ value }) => {
35071
35150
  /* @__PURE__ */ jsx108("span", { className: "text-foreground font-medium", children: Array.isArray(v) ? v.join(", ") : String(v) })
35072
35151
  ] }, k)) });
35073
35152
  };
35074
- var StringArrayDisplay = ({ value }) => {
35153
+ var StringArrayDisplay2 = ({ value }) => {
35075
35154
  if (!Array.isArray(value) || value.length === 0)
35076
35155
  return /* @__PURE__ */ jsx108("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
35077
35156
  return /* @__PURE__ */ jsx108("div", { className: "flex flex-wrap gap-1.5 pt-1", children: value.map((item) => /* @__PURE__ */ jsx108(Badge2, { variant: "outline", className: "text-xs", children: item }, item)) });
@@ -35103,7 +35182,7 @@ function buildSearchSpecFields(data) {
35103
35182
  key,
35104
35183
  label: "Platforms",
35105
35184
  type: "custom",
35106
- renderDisplay: (v) => /* @__PURE__ */ jsx108(StringArrayDisplay, { value: v })
35185
+ renderDisplay: (v) => /* @__PURE__ */ jsx108(StringArrayDisplay2, { value: v })
35107
35186
  };
35108
35187
  }
35109
35188
  if (typeof value === "object" && value !== null && !Array.isArray(value) && !("min" in value && "max" in value)) {
@@ -35112,7 +35191,7 @@ function buildSearchSpecFields(data) {
35112
35191
  key,
35113
35192
  label,
35114
35193
  type: "custom",
35115
- renderDisplay: (v) => /* @__PURE__ */ jsx108(ObjectDisplay, { value: v })
35194
+ renderDisplay: (v) => /* @__PURE__ */ jsx108(ObjectDisplay2, { value: v })
35116
35195
  };
35117
35196
  }
35118
35197
  const [generated] = generateFieldsFromData({ [key]: value });
@@ -35782,7 +35861,7 @@ var CreatorSearch = React93.memo(
35782
35861
  type: "badge",
35783
35862
  label: p,
35784
35863
  variant: "outline",
35785
- className: "bg-[#1A1A1A] border-gray400 text-white font-medium"
35864
+ className: "bg-background bg-gray200 border-gray400 text-white font-medium"
35786
35865
  },
35787
35866
  p
35788
35867
  )) });
@@ -35885,9 +35964,9 @@ var CampaignConceptCard = React94.memo(
35885
35964
  idx + 1,
35886
35965
  "."
35887
35966
  ] }),
35888
- /* @__PURE__ */ jsx121("div", { className: "bg-[#1A1A1A] border border-white/10 px-2 py-0.5 rounded text-gray-300", children: item.label }),
35967
+ /* @__PURE__ */ jsx121("div", { className: "bg-background bg-gray400 border border-white/10 px-2 py-0.5 rounded text-gray-300", children: item.label }),
35889
35968
  /* @__PURE__ */ jsx121("span", { className: "text-gray-400", children: "=" }),
35890
- /* @__PURE__ */ jsx121("div", { className: "bg-[#1A1A1A] border border-white/10 px-2 py-0.5 rounded text-gray-300", children: item.value })
35969
+ /* @__PURE__ */ jsx121("div", { className: "bg-background bg-gray400 border border-white/10 px-2 py-0.5 rounded text-gray-300", children: item.value })
35891
35970
  ] }, idx)) });
35892
35971
  }
35893
35972
  };
@@ -35897,7 +35976,7 @@ var CampaignConceptCard = React94.memo(
35897
35976
  ...field,
35898
35977
  renderDisplay: (val) => {
35899
35978
  if (!Array.isArray(val)) return /* @__PURE__ */ jsx121("span", { className: "text-white font-medium", children: val });
35900
- return /* @__PURE__ */ jsx121("div", { className: "flex gap-2", children: val.map((v, idx) => /* @__PURE__ */ jsx121("div", { className: "bg-[#1A1A1A] border border-white/10 px-2 py-0.5 rounded text-white text-xs font-medium", children: v }, idx)) });
35979
+ return /* @__PURE__ */ jsx121("div", { className: "flex gap-2", children: val.map((v, idx) => /* @__PURE__ */ jsx121("div", { className: "bg-background bg-gray400 border border-white/10 px-2 py-0.5 rounded text-white text-xs font-medium", children: v }, idx)) });
35901
35980
  }
35902
35981
  };
35903
35982
  }