pxengine 0.1.21 → 0.1.23

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
@@ -34040,7 +34040,7 @@ var EditableField = import_react54.default.memo(
34040
34040
  "div",
34041
34041
  {
34042
34042
  className: cn(
34043
- "relative z-10 group flex flex-col gap-2 p-3 bg-[#0A0A0A] rounded-md mb-8",
34043
+ "relative z-10 group flex flex-col gap-2 p-3 bg-background dark:bg-gray700 rounded-md mb-8",
34044
34044
  className
34045
34045
  ),
34046
34046
  children: [
@@ -34048,7 +34048,7 @@ var EditableField = import_react54.default.memo(
34048
34048
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
34049
34049
  "h4",
34050
34050
  {
34051
- 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",
34051
+ className: "px-2 py-1 tracking-widest bg-background bg-purple200 text-purpleText dark:text-purple-400 text-[10px] font-bold rounded uppercase",
34052
34052
  style: { fontFamily: "Noto Sans, sans-serif" },
34053
34053
  children: label
34054
34054
  }
@@ -34231,7 +34231,7 @@ var FormCard = import_react56.default.memo(
34231
34231
  "div",
34232
34232
  {
34233
34233
  className: cn(
34234
- "relative w-full rounded-[20px] bg-background dark:bg-gray50 border border-gray400 shadow-lg overflow-hidden mb-6",
34234
+ "relative w-full rounded-[20px] bg-background dark:bg-gray100 border border-gray400 shadow-lg overflow-hidden mb-6",
34235
34235
  className
34236
34236
  ),
34237
34237
  onMouseEnter: () => setShowCopyButton(true),
@@ -34775,7 +34775,7 @@ var NotificationList = ({
34775
34775
  };
34776
34776
 
34777
34777
  // src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
34778
- var import_react59 = __toESM(require("react"), 1);
34778
+ var import_react60 = __toESM(require("react"), 1);
34779
34779
 
34780
34780
  // src/lib/field-utils.ts
34781
34781
  function normalizeLabel(key) {
@@ -34816,85 +34816,8 @@ function generateFieldsFromData(data) {
34816
34816
  });
34817
34817
  }
34818
34818
 
34819
- // src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
34820
- var import_jsx_runtime106 = require("react/jsx-runtime");
34821
- var CampaignSeedCard = import_react59.default.memo(
34822
- ({
34823
- selectionStatus,
34824
- isLatestMessage = true,
34825
- className,
34826
- fields: providedFields,
34827
- data,
34828
- ...formCardProps
34829
- }) => {
34830
- const fields = (0, import_react59.useMemo)(() => {
34831
- return providedFields || generateFieldsFromData(data);
34832
- }, [providedFields, data]);
34833
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex flex-col gap-2 mb-10", children: [
34834
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
34835
- FormCard,
34836
- {
34837
- ...formCardProps,
34838
- data,
34839
- title: formCardProps.title || "Campaign Brief",
34840
- fields,
34841
- className,
34842
- footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1 mb-6", children: [
34843
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CircleCheck, { className: "h-4 w-4" }),
34844
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
34845
- ] }) : formCardProps.footer
34846
- }
34847
- ),
34848
- !isLatestMessage && selectionStatus && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex justify-center mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
34849
- "button",
34850
- {
34851
- className: cn(
34852
- "flex items-center gap-2 px-6 py-2.5 border rounded-full text-sm transition-all active:scale-95",
34853
- "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"
34854
- ),
34855
- children: "Continue"
34856
- }
34857
- ) })
34858
- ] });
34859
- }
34860
- );
34861
- CampaignSeedCard.displayName = "CampaignSeedCard";
34862
-
34863
- // src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
34864
- var import_react60 = __toESM(require("react"), 1);
34865
- var import_jsx_runtime107 = require("react/jsx-runtime");
34866
- var SearchSpecCard = import_react60.default.memo(
34867
- ({
34868
- selectionStatus,
34869
- isLatestMessage = true,
34870
- className,
34871
- fields: providedFields,
34872
- data,
34873
- ...formCardProps
34874
- }) => {
34875
- const fields = (0, import_react60.useMemo)(() => {
34876
- return providedFields || generateFieldsFromData(data);
34877
- }, [providedFields, data]);
34878
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
34879
- FormCard,
34880
- {
34881
- ...formCardProps,
34882
- data,
34883
- title: formCardProps.title || "Search Specification",
34884
- fields,
34885
- className,
34886
- footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1", children: [
34887
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(CircleCheck, { className: "h-4 w-4" }),
34888
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
34889
- ] }) : formCardProps.footer
34890
- }
34891
- );
34892
- }
34893
- );
34894
- SearchSpecCard.displayName = "SearchSpecCard";
34895
-
34896
34819
  // src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
34897
- var import_react61 = require("react");
34820
+ var import_react59 = require("react");
34898
34821
 
34899
34822
  // src/lib/countries.ts
34900
34823
  var countries = [
@@ -35101,15 +35024,15 @@ var countriesWithFlags = Object.fromEntries(
35101
35024
  );
35102
35025
 
35103
35026
  // src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
35104
- var import_jsx_runtime108 = require("react/jsx-runtime");
35027
+ var import_jsx_runtime106 = require("react/jsx-runtime");
35105
35028
  var CountrySelectEdit = ({
35106
35029
  value,
35107
35030
  onChange
35108
35031
  }) => {
35109
- const [isDropdownOpen, setIsDropdownOpen] = (0, import_react61.useState)(false);
35110
- const [searchTerm, setSearchTerm] = (0, import_react61.useState)("");
35111
- const dropdownRef = (0, import_react61.useRef)(null);
35112
- (0, import_react61.useEffect)(() => {
35032
+ const [isDropdownOpen, setIsDropdownOpen] = (0, import_react59.useState)(false);
35033
+ const [searchTerm, setSearchTerm] = (0, import_react59.useState)("");
35034
+ const dropdownRef = (0, import_react59.useRef)(null);
35035
+ (0, import_react59.useEffect)(() => {
35113
35036
  const handleClickOutside = (event) => {
35114
35037
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
35115
35038
  setIsDropdownOpen(false);
@@ -35119,16 +35042,16 @@ var CountrySelectEdit = ({
35119
35042
  return () => document.removeEventListener("mousedown", handleClickOutside);
35120
35043
  }, []);
35121
35044
  const inputValue = Array.isArray(value) ? value : [];
35122
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "space-y-3", children: [
35123
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "relative", ref: dropdownRef, children: [
35124
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
35045
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "space-y-3", children: [
35046
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "relative", ref: dropdownRef, children: [
35047
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
35125
35048
  "div",
35126
35049
  {
35127
35050
  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",
35128
35051
  onClick: () => setIsDropdownOpen(!isDropdownOpen),
35129
35052
  children: [
35130
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-gray-700", children: inputValue.length > 0 ? `${inputValue.length} ${inputValue.length === 1 ? "country" : "countries"} selected` : "Select countries..." }),
35131
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
35053
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-gray-700", children: inputValue.length > 0 ? `${inputValue.length} ${inputValue.length === 1 ? "country" : "countries"} selected` : "Select countries..." }),
35054
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
35132
35055
  ChevronDown,
35133
35056
  {
35134
35057
  className: cn(
@@ -35140,8 +35063,8 @@ var CountrySelectEdit = ({
35140
35063
  ]
35141
35064
  }
35142
35065
  ),
35143
- isDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("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: [
35144
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "p-2 border-b border-gray-100", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
35066
+ isDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("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: [
35067
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "p-2 border-b border-gray-100", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
35145
35068
  "input",
35146
35069
  {
35147
35070
  type: "text",
@@ -35152,9 +35075,9 @@ var CountrySelectEdit = ({
35152
35075
  onClick: (e) => e.stopPropagation()
35153
35076
  }
35154
35077
  ) }),
35155
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "max-h-40 overflow-y-auto p-1", children: countries.filter(
35078
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "max-h-40 overflow-y-auto p-1", children: countries.filter(
35156
35079
  (country) => country.name.toLowerCase().includes(searchTerm.toLowerCase()) || country.code.toLowerCase().includes(searchTerm.toLowerCase())
35157
- ).map((country) => /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
35080
+ ).map((country) => /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
35158
35081
  "div",
35159
35082
  {
35160
35083
  className: cn(
@@ -35175,31 +35098,31 @@ var CountrySelectEdit = ({
35175
35098
  }
35176
35099
  },
35177
35100
  children: [
35178
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex items-center gap-2", children: [
35179
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-sm text-gray-700", children: country.name }),
35180
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-xs text-gray-400 font-mono", children: country.code })
35101
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center gap-2", children: [
35102
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-sm text-gray-700", children: country.name }),
35103
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-xs text-gray-400 font-mono", children: country.code })
35181
35104
  ] }),
35182
- inputValue.includes(country.code) && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Check, { className: "h-4 w-4 text-purple500" })
35105
+ inputValue.includes(country.code) && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Check, { className: "h-4 w-4 text-purple500" })
35183
35106
  ]
35184
35107
  },
35185
35108
  country.code
35186
35109
  )) })
35187
35110
  ] })
35188
35111
  ] }),
35189
- inputValue.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
35112
+ inputValue.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
35190
35113
  Badge2,
35191
35114
  {
35192
35115
  variant: "secondary",
35193
35116
  className: "bg-purple50 text-purple700 border-purple100 hover:bg-purple100 cursor-default flex items-center gap-1 pr-1",
35194
35117
  children: [
35195
35118
  countryCode,
35196
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
35119
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
35197
35120
  "button",
35198
35121
  {
35199
35122
  onClick: () => onChange(inputValue.filter((c) => c !== countryCode)),
35200
35123
  className: "hover:bg-purple200 rounded-full p-0.5 transition-colors",
35201
35124
  children: [
35202
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(ChevronDown, { className: "h-3 w-3 rotate-45" }),
35125
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ChevronDown, { className: "h-3 w-3 rotate-45" }),
35203
35126
  " "
35204
35127
  ]
35205
35128
  }
@@ -35212,9 +35135,9 @@ var CountrySelectEdit = ({
35212
35135
  };
35213
35136
  var CountrySelectDisplay = ({ value }) => {
35214
35137
  if (!value || !Array.isArray(value) || value.length === 0) {
35215
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-muted-foreground italic", children: "Not specified" });
35138
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-muted-foreground italic", children: "Not specified" });
35216
35139
  }
35217
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "flex flex-wrap gap-1.5", children: value.map((countryCode) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
35140
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex flex-wrap gap-1.5", children: value.map((countryCode) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
35218
35141
  Badge2,
35219
35142
  {
35220
35143
  variant: "outline",
@@ -35236,22 +35159,22 @@ var KeywordBundlesEdit = ({
35236
35159
  groups[p].push({ bundle: b, index: idx });
35237
35160
  });
35238
35161
  const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
35239
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "space-y-6 pt-2", children: sortedPriorities.map((priority) => /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "space-y-3", children: [
35240
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex items-center gap-2", children: [
35241
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Badge2, { className: "bg-purple500 hover:bg-purple500", children: [
35162
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "space-y-6 pt-2", children: sortedPriorities.map((priority) => /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "space-y-3", children: [
35163
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center gap-2", children: [
35164
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Badge2, { className: "bg-purple500 hover:bg-purple500", children: [
35242
35165
  "Priority ",
35243
35166
  priority
35244
35167
  ] }),
35245
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "h-px flex-1 bg-gray-100" })
35168
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "h-px flex-1 bg-gray-100" })
35246
35169
  ] }),
35247
- groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
35170
+ groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
35248
35171
  "div",
35249
35172
  {
35250
35173
  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",
35251
- children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex flex-col gap-3", children: [
35252
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Keywords" }),
35253
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "space-y-3", children: [
35254
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
35174
+ children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex flex-col gap-3", children: [
35175
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Keywords" }),
35176
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "space-y-3", children: [
35177
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
35255
35178
  Badge2,
35256
35179
  {
35257
35180
  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",
@@ -35267,12 +35190,12 @@ var KeywordBundlesEdit = ({
35267
35190
  },
35268
35191
  children: [
35269
35192
  keyword,
35270
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "ml-1 opacity-0 group-hover:opacity-100 transition-opacity", children: "\xD7" })
35193
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "ml-1 opacity-0 group-hover:opacity-100 transition-opacity", children: "\xD7" })
35271
35194
  ]
35272
35195
  },
35273
35196
  kIndex
35274
35197
  )) }),
35275
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "flex gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
35198
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
35276
35199
  "input",
35277
35200
  {
35278
35201
  type: "text",
@@ -35296,9 +35219,9 @@ var KeywordBundlesEdit = ({
35296
35219
  }
35297
35220
  ) })
35298
35221
  ] }),
35299
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex flex-col gap-1.5 mt-1", children: [
35300
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Priority Level (1-5)" }),
35301
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
35222
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex flex-col gap-1.5 mt-1", children: [
35223
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Priority Level (1-5)" }),
35224
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
35302
35225
  "input",
35303
35226
  {
35304
35227
  type: "number",
@@ -35326,7 +35249,7 @@ var KeywordBundlesEdit = ({
35326
35249
  var KeywordBundlesDisplay = ({ value }) => {
35327
35250
  const bundles = Array.isArray(value) ? value : [];
35328
35251
  if (bundles.length === 0)
35329
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-gray-500 italic text-sm", children: "Not specified" });
35252
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-gray-500 italic text-sm", children: "Not specified" });
35330
35253
  const groups = {};
35331
35254
  bundles.forEach((b) => {
35332
35255
  const p = Number(b?.priority) || 1;
@@ -35335,20 +35258,20 @@ var KeywordBundlesDisplay = ({ value }) => {
35335
35258
  groups[p].push(...keywords);
35336
35259
  });
35337
35260
  const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
35338
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "space-y-4 pt-2", children: sortedPriorities.map((priority) => {
35261
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "space-y-4 pt-2", children: sortedPriorities.map((priority) => {
35339
35262
  const deduped = Array.from(new Set(groups[priority]));
35340
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "space-y-2", children: [
35341
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex items-center gap-2", children: [
35342
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("span", { className: "text-[10px] uppercase tracking-widest text-purple-400 font-bold", children: [
35263
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "space-y-2", children: [
35264
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center gap-2", children: [
35265
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("span", { className: "text-[10px] uppercase tracking-widest text-purple-400 font-bold", children: [
35343
35266
  "Priority ",
35344
35267
  priority
35345
35268
  ] }),
35346
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "h-[1px] flex-1 bg-white/10" })
35269
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "h-[1px] flex-1 bg-white/10" })
35347
35270
  ] }),
35348
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "flex flex-wrap gap-2", children: deduped.map((keyword) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
35271
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex flex-wrap gap-2", children: deduped.map((keyword) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
35349
35272
  "div",
35350
35273
  {
35351
- className: "px-2 py-1 rounded bg-[#1A1A1A] border border-white/10 text-gray-300 text-xs font-medium",
35274
+ className: "px-2 py-1 rounded bg-background bg-gray400 border border-white/10 text-gray-300 text-xs font-medium",
35352
35275
  children: keyword
35353
35276
  },
35354
35277
  keyword
@@ -35357,6 +35280,224 @@ var KeywordBundlesDisplay = ({ value }) => {
35357
35280
  }) });
35358
35281
  };
35359
35282
 
35283
+ // src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
35284
+ var import_jsx_runtime107 = require("react/jsx-runtime");
35285
+ var ObjectDisplay = ({ value }) => {
35286
+ if (!value || typeof value !== "object") return null;
35287
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "space-y-1 pt-1", children: Object.entries(value).map(([k, v]) => /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex gap-2 text-sm", children: [
35288
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("span", { className: "text-muted-foreground capitalize min-w-[120px]", children: [
35289
+ k.replace(/_/g, " "),
35290
+ ":"
35291
+ ] }),
35292
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "text-foreground font-medium", children: Array.isArray(v) ? v.join(", ") : String(v) })
35293
+ ] }, k)) });
35294
+ };
35295
+ var StringArrayDisplay = ({ value }) => {
35296
+ if (!Array.isArray(value) || value.length === 0)
35297
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
35298
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "flex flex-wrap gap-1.5 pt-1", children: value.map((item) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Badge2, { variant: "outline", className: "text-xs", children: item }, item)) });
35299
+ };
35300
+ function buildCampaignSeedFields(data) {
35301
+ if (!data || typeof data !== "object") return [];
35302
+ return Object.keys(data).map((key) => {
35303
+ const value = data[key];
35304
+ if (key === "keyword_bundles" || key === "keywordBundles") {
35305
+ return {
35306
+ key,
35307
+ label: "Keyword Bundles",
35308
+ type: "custom",
35309
+ renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(KeywordBundlesDisplay, { value: v })
35310
+ };
35311
+ }
35312
+ if (key === "geography") {
35313
+ return {
35314
+ key,
35315
+ label: "Geography",
35316
+ type: "custom",
35317
+ renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(CountrySelectDisplay, { value: v })
35318
+ };
35319
+ }
35320
+ if (key === "platforms" && Array.isArray(value)) {
35321
+ return {
35322
+ key,
35323
+ label: "Platforms",
35324
+ type: "custom",
35325
+ renderDisplay: (v) => {
35326
+ const platforms = Array.isArray(v) ? v : [v];
35327
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "flex flex-wrap gap-2", children: platforms.map((p) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
35328
+ BadgeAtom,
35329
+ {
35330
+ id: `platform-${p}`,
35331
+ type: "badge",
35332
+ label: p,
35333
+ variant: "outline",
35334
+ className: "bg-background bg-purple200 border-gray400 text-white font-medium"
35335
+ },
35336
+ p
35337
+ )) });
35338
+ }
35339
+ };
35340
+ }
35341
+ if (Array.isArray(value) && value.every((v) => typeof v === "string")) {
35342
+ const label = key.split(/_|(?=[A-Z])/).map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join(" ");
35343
+ return {
35344
+ key,
35345
+ label,
35346
+ type: "custom",
35347
+ renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(StringArrayDisplay, { value: v })
35348
+ };
35349
+ }
35350
+ if (typeof value === "object" && value !== null && !Array.isArray(value) && "min" in value && "max" in value) {
35351
+ const label = key.split(/_|(?=[A-Z])/).map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join(" ");
35352
+ return {
35353
+ key,
35354
+ label,
35355
+ type: "custom",
35356
+ renderDisplay: (v) => {
35357
+ if (typeof v === "object" && v !== null) {
35358
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "text-white font-medium", children: `${v.min?.toLocaleString()} - ${v.max?.toLocaleString()}` });
35359
+ }
35360
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "text-white font-medium", children: v });
35361
+ }
35362
+ };
35363
+ }
35364
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
35365
+ const label = key.split(/_|(?=[A-Z])/).map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join(" ");
35366
+ return {
35367
+ key,
35368
+ label,
35369
+ type: "custom",
35370
+ renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ObjectDisplay, { value: v })
35371
+ };
35372
+ }
35373
+ const [generated] = generateFieldsFromData({ [key]: value });
35374
+ return generated;
35375
+ });
35376
+ }
35377
+ var CampaignSeedCard = import_react60.default.memo(
35378
+ ({
35379
+ selectionStatus,
35380
+ isLatestMessage = true,
35381
+ className,
35382
+ fields: providedFields,
35383
+ data,
35384
+ ...formCardProps
35385
+ }) => {
35386
+ const fields = (0, import_react60.useMemo)(() => {
35387
+ return providedFields || buildCampaignSeedFields(data);
35388
+ }, [providedFields, data]);
35389
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
35390
+ FormCard,
35391
+ {
35392
+ ...formCardProps,
35393
+ data,
35394
+ title: formCardProps.title || "Campaign Brief",
35395
+ fields,
35396
+ showTimeline: true,
35397
+ className: cn("font-noto", className),
35398
+ footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-[10px] font-semibold py-4 pr-6", children: [
35399
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(CircleCheck, { className: "h-3.5 w-3.5" }),
35400
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: selectionStatus === "agent" ? "Suggested by Agent" : "Selected by you" })
35401
+ ] }) : formCardProps.footer
35402
+ }
35403
+ ) });
35404
+ }
35405
+ );
35406
+ CampaignSeedCard.displayName = "CampaignSeedCard";
35407
+
35408
+ // src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
35409
+ var import_react61 = __toESM(require("react"), 1);
35410
+ var import_jsx_runtime108 = require("react/jsx-runtime");
35411
+ var ObjectDisplay2 = ({ value }) => {
35412
+ if (!value || typeof value !== "object") return null;
35413
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "space-y-1 pt-1", children: Object.entries(value).map(([k, v]) => /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex gap-2 text-sm", children: [
35414
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("span", { className: "text-muted-foreground capitalize min-w-[120px]", children: [
35415
+ k.replace(/_/g, " "),
35416
+ ":"
35417
+ ] }),
35418
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-foreground font-medium", children: Array.isArray(v) ? v.join(", ") : String(v) })
35419
+ ] }, k)) });
35420
+ };
35421
+ var StringArrayDisplay2 = ({ value }) => {
35422
+ if (!Array.isArray(value) || value.length === 0)
35423
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
35424
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "flex flex-wrap gap-1.5 pt-1", children: value.map((item) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Badge2, { variant: "outline", className: "text-xs", children: item }, item)) });
35425
+ };
35426
+ function buildSearchSpecFields(data) {
35427
+ if (!data || typeof data !== "object") return [];
35428
+ return Object.keys(data).map((key) => {
35429
+ const value = data[key];
35430
+ if (key === "keyword_bundles") {
35431
+ return {
35432
+ key,
35433
+ label: "Keyword Bundles",
35434
+ type: "custom",
35435
+ renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(KeywordBundlesDisplay, { value: v }),
35436
+ renderEdit: (v, onChange) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(KeywordBundlesEdit, { value: v, onChange })
35437
+ };
35438
+ }
35439
+ if (key === "geography") {
35440
+ return {
35441
+ key,
35442
+ label: "Geography",
35443
+ type: "custom",
35444
+ renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(CountrySelectDisplay, { value: v }),
35445
+ renderEdit: (v, onChange) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(CountrySelectEdit, { value: v, onChange })
35446
+ };
35447
+ }
35448
+ if (key === "platforms" && Array.isArray(value)) {
35449
+ return {
35450
+ key,
35451
+ label: "Platforms",
35452
+ type: "custom",
35453
+ renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(StringArrayDisplay2, { value: v })
35454
+ };
35455
+ }
35456
+ if (typeof value === "object" && value !== null && !Array.isArray(value) && !("min" in value && "max" in value)) {
35457
+ const label = key.split("_").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
35458
+ return {
35459
+ key,
35460
+ label,
35461
+ type: "custom",
35462
+ renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(ObjectDisplay2, { value: v })
35463
+ };
35464
+ }
35465
+ const [generated] = generateFieldsFromData({ [key]: value });
35466
+ return generated;
35467
+ });
35468
+ }
35469
+ var SearchSpecCard = import_react61.default.memo(
35470
+ ({
35471
+ selectionStatus,
35472
+ isLatestMessage = true,
35473
+ className,
35474
+ fields: providedFields,
35475
+ data,
35476
+ specData,
35477
+ ...formCardProps
35478
+ }) => {
35479
+ const resolvedData = data || specData;
35480
+ const fields = (0, import_react61.useMemo)(() => {
35481
+ return providedFields || buildSearchSpecFields(resolvedData ?? {});
35482
+ }, [providedFields, resolvedData]);
35483
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
35484
+ FormCard,
35485
+ {
35486
+ ...formCardProps,
35487
+ data: resolvedData ?? {},
35488
+ title: formCardProps.title || "Search Specification",
35489
+ fields,
35490
+ className,
35491
+ footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1", children: [
35492
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(CircleCheck, { className: "h-4 w-4" }),
35493
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
35494
+ ] }) : formCardProps.footer
35495
+ }
35496
+ );
35497
+ }
35498
+ );
35499
+ SearchSpecCard.displayName = "SearchSpecCard";
35500
+
35360
35501
  // src/molecules/creator-discovery/MCQCard/MCQCard.tsx
35361
35502
  var import_react62 = __toESM(require("react"), 1);
35362
35503
  var import_jsx_runtime109 = require("react/jsx-runtime");
@@ -35376,15 +35517,17 @@ var MCQCard = import_react62.default.memo(
35376
35517
  disabled = false
35377
35518
  }) => {
35378
35519
  const [selectedOption, setSelectedOption] = import_react62.default.useState(propsSelectedOption);
35520
+ const [isProceeded, setIsProceeded] = import_react62.default.useState(false);
35379
35521
  import_react62.default.useEffect(() => {
35380
35522
  if (propsSelectedOption) {
35381
35523
  setSelectedOption(propsSelectedOption);
35524
+ setIsProceeded(true);
35382
35525
  }
35383
35526
  }, [propsSelectedOption]);
35384
35527
  const handleOptionClick = (key, e) => {
35385
35528
  e.preventDefault();
35386
35529
  e.stopPropagation();
35387
- if (isLatestMessage && !isLoading && !disabled) {
35530
+ if (isLatestMessage && !isLoading && !disabled && !isProceeded) {
35388
35531
  setSelectedOption(key);
35389
35532
  onSelect?.(key);
35390
35533
  }
@@ -35392,8 +35535,9 @@ var MCQCard = import_react62.default.memo(
35392
35535
  const handleProceed = (e) => {
35393
35536
  e.preventDefault();
35394
35537
  e.stopPropagation();
35395
- if ((selectedOption || recommended) && !disabled) {
35538
+ if ((selectedOption || recommended) && !disabled && !isProceeded) {
35396
35539
  const result = selectedOption || recommended || "";
35540
+ setIsProceeded(true);
35397
35541
  onProceed?.(result);
35398
35542
  onAction?.({
35399
35543
  type: "mcq_selection",
@@ -35402,7 +35546,7 @@ var MCQCard = import_react62.default.memo(
35402
35546
  });
35403
35547
  }
35404
35548
  };
35405
- const isInteractionDisabled = disabled || !isLatestMessage;
35549
+ const isInteractionDisabled = disabled || !isLatestMessage || isProceeded;
35406
35550
  return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
35407
35551
  "div",
35408
35552
  {
@@ -35985,7 +36129,7 @@ var CreatorSearch = import_react63.default.memo(
35985
36129
  type: "badge",
35986
36130
  label: p,
35987
36131
  variant: "outline",
35988
- className: "bg-[#1A1A1A] border-gray400 text-white font-medium"
36132
+ className: "bg-background bg-gray200 border-gray400 text-white font-medium"
35989
36133
  },
35990
36134
  p
35991
36135
  )) });
@@ -36088,9 +36232,9 @@ var CampaignConceptCard = import_react64.default.memo(
36088
36232
  idx + 1,
36089
36233
  "."
36090
36234
  ] }),
36091
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "bg-[#1A1A1A] border border-white/10 px-2 py-0.5 rounded text-gray-300", children: item.label }),
36235
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "bg-background bg-gray400 border border-white/10 px-2 py-0.5 rounded text-gray-300", children: item.label }),
36092
36236
  /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-gray-400", children: "=" }),
36093
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "bg-[#1A1A1A] border border-white/10 px-2 py-0.5 rounded text-gray-300", children: item.value })
36237
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "bg-background bg-gray400 border border-white/10 px-2 py-0.5 rounded text-gray-300", children: item.value })
36094
36238
  ] }, idx)) });
36095
36239
  }
36096
36240
  };
@@ -36100,7 +36244,7 @@ var CampaignConceptCard = import_react64.default.memo(
36100
36244
  ...field,
36101
36245
  renderDisplay: (val) => {
36102
36246
  if (!Array.isArray(val)) return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-white font-medium", children: val });
36103
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "flex gap-2", children: val.map((v, idx) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "bg-[#1A1A1A] border border-white/10 px-2 py-0.5 rounded text-white text-xs font-medium", children: v }, idx)) });
36247
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "flex gap-2", children: val.map((v, idx) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("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)) });
36104
36248
  }
36105
36249
  };
36106
36250
  }