pxengine 0.1.22 → 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 +184 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +178 -99
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +2 -2
- package/package.json +1 -1
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-
|
|
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-
|
|
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-
|
|
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
|
|
34778
|
+
var import_react60 = __toESM(require("react"), 1);
|
|
34779
34779
|
|
|
34780
34780
|
// src/lib/field-utils.ts
|
|
34781
34781
|
function normalizeLabel(key) {
|
|
@@ -34816,55 +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_react61 = __toESM(require("react"), 1);
|
|
34865
|
-
|
|
34866
34819
|
// src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
|
|
34867
|
-
var
|
|
34820
|
+
var import_react59 = require("react");
|
|
34868
34821
|
|
|
34869
34822
|
// src/lib/countries.ts
|
|
34870
34823
|
var countries = [
|
|
@@ -35071,15 +35024,15 @@ var countriesWithFlags = Object.fromEntries(
|
|
|
35071
35024
|
);
|
|
35072
35025
|
|
|
35073
35026
|
// src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
|
|
35074
|
-
var
|
|
35027
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
35075
35028
|
var CountrySelectEdit = ({
|
|
35076
35029
|
value,
|
|
35077
35030
|
onChange
|
|
35078
35031
|
}) => {
|
|
35079
|
-
const [isDropdownOpen, setIsDropdownOpen] = (0,
|
|
35080
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
35081
|
-
const dropdownRef = (0,
|
|
35082
|
-
(0,
|
|
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)(() => {
|
|
35083
35036
|
const handleClickOutside = (event) => {
|
|
35084
35037
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
35085
35038
|
setIsDropdownOpen(false);
|
|
@@ -35089,16 +35042,16 @@ var CountrySelectEdit = ({
|
|
|
35089
35042
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
35090
35043
|
}, []);
|
|
35091
35044
|
const inputValue = Array.isArray(value) ? value : [];
|
|
35092
|
-
return /* @__PURE__ */ (0,
|
|
35093
|
-
/* @__PURE__ */ (0,
|
|
35094
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
35095
35048
|
"div",
|
|
35096
35049
|
{
|
|
35097
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",
|
|
35098
35051
|
onClick: () => setIsDropdownOpen(!isDropdownOpen),
|
|
35099
35052
|
children: [
|
|
35100
|
-
/* @__PURE__ */ (0,
|
|
35101
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
35102
35055
|
ChevronDown,
|
|
35103
35056
|
{
|
|
35104
35057
|
className: cn(
|
|
@@ -35110,8 +35063,8 @@ var CountrySelectEdit = ({
|
|
|
35110
35063
|
]
|
|
35111
35064
|
}
|
|
35112
35065
|
),
|
|
35113
|
-
isDropdownOpen && /* @__PURE__ */ (0,
|
|
35114
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
35115
35068
|
"input",
|
|
35116
35069
|
{
|
|
35117
35070
|
type: "text",
|
|
@@ -35122,9 +35075,9 @@ var CountrySelectEdit = ({
|
|
|
35122
35075
|
onClick: (e) => e.stopPropagation()
|
|
35123
35076
|
}
|
|
35124
35077
|
) }),
|
|
35125
|
-
/* @__PURE__ */ (0,
|
|
35078
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "max-h-40 overflow-y-auto p-1", children: countries.filter(
|
|
35126
35079
|
(country) => country.name.toLowerCase().includes(searchTerm.toLowerCase()) || country.code.toLowerCase().includes(searchTerm.toLowerCase())
|
|
35127
|
-
).map((country) => /* @__PURE__ */ (0,
|
|
35080
|
+
).map((country) => /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
35128
35081
|
"div",
|
|
35129
35082
|
{
|
|
35130
35083
|
className: cn(
|
|
@@ -35145,31 +35098,31 @@ var CountrySelectEdit = ({
|
|
|
35145
35098
|
}
|
|
35146
35099
|
},
|
|
35147
35100
|
children: [
|
|
35148
|
-
/* @__PURE__ */ (0,
|
|
35149
|
-
/* @__PURE__ */ (0,
|
|
35150
|
-
/* @__PURE__ */ (0,
|
|
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 })
|
|
35151
35104
|
] }),
|
|
35152
|
-
inputValue.includes(country.code) && /* @__PURE__ */ (0,
|
|
35105
|
+
inputValue.includes(country.code) && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Check, { className: "h-4 w-4 text-purple500" })
|
|
35153
35106
|
]
|
|
35154
35107
|
},
|
|
35155
35108
|
country.code
|
|
35156
35109
|
)) })
|
|
35157
35110
|
] })
|
|
35158
35111
|
] }),
|
|
35159
|
-
inputValue.length > 0 && /* @__PURE__ */ (0,
|
|
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)(
|
|
35160
35113
|
Badge2,
|
|
35161
35114
|
{
|
|
35162
35115
|
variant: "secondary",
|
|
35163
35116
|
className: "bg-purple50 text-purple700 border-purple100 hover:bg-purple100 cursor-default flex items-center gap-1 pr-1",
|
|
35164
35117
|
children: [
|
|
35165
35118
|
countryCode,
|
|
35166
|
-
/* @__PURE__ */ (0,
|
|
35119
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
35167
35120
|
"button",
|
|
35168
35121
|
{
|
|
35169
35122
|
onClick: () => onChange(inputValue.filter((c) => c !== countryCode)),
|
|
35170
35123
|
className: "hover:bg-purple200 rounded-full p-0.5 transition-colors",
|
|
35171
35124
|
children: [
|
|
35172
|
-
/* @__PURE__ */ (0,
|
|
35125
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ChevronDown, { className: "h-3 w-3 rotate-45" }),
|
|
35173
35126
|
" "
|
|
35174
35127
|
]
|
|
35175
35128
|
}
|
|
@@ -35182,9 +35135,9 @@ var CountrySelectEdit = ({
|
|
|
35182
35135
|
};
|
|
35183
35136
|
var CountrySelectDisplay = ({ value }) => {
|
|
35184
35137
|
if (!value || !Array.isArray(value) || value.length === 0) {
|
|
35185
|
-
return /* @__PURE__ */ (0,
|
|
35138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-muted-foreground italic", children: "Not specified" });
|
|
35186
35139
|
}
|
|
35187
|
-
return /* @__PURE__ */ (0,
|
|
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)(
|
|
35188
35141
|
Badge2,
|
|
35189
35142
|
{
|
|
35190
35143
|
variant: "outline",
|
|
@@ -35206,22 +35159,22 @@ var KeywordBundlesEdit = ({
|
|
|
35206
35159
|
groups[p].push({ bundle: b, index: idx });
|
|
35207
35160
|
});
|
|
35208
35161
|
const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
|
|
35209
|
-
return /* @__PURE__ */ (0,
|
|
35210
|
-
/* @__PURE__ */ (0,
|
|
35211
|
-
/* @__PURE__ */ (0,
|
|
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: [
|
|
35212
35165
|
"Priority ",
|
|
35213
35166
|
priority
|
|
35214
35167
|
] }),
|
|
35215
|
-
/* @__PURE__ */ (0,
|
|
35168
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "h-px flex-1 bg-gray-100" })
|
|
35216
35169
|
] }),
|
|
35217
|
-
groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ (0,
|
|
35170
|
+
groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
35218
35171
|
"div",
|
|
35219
35172
|
{
|
|
35220
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",
|
|
35221
|
-
children: /* @__PURE__ */ (0,
|
|
35222
|
-
/* @__PURE__ */ (0,
|
|
35223
|
-
/* @__PURE__ */ (0,
|
|
35224
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
35225
35178
|
Badge2,
|
|
35226
35179
|
{
|
|
35227
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",
|
|
@@ -35237,12 +35190,12 @@ var KeywordBundlesEdit = ({
|
|
|
35237
35190
|
},
|
|
35238
35191
|
children: [
|
|
35239
35192
|
keyword,
|
|
35240
|
-
/* @__PURE__ */ (0,
|
|
35193
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "ml-1 opacity-0 group-hover:opacity-100 transition-opacity", children: "\xD7" })
|
|
35241
35194
|
]
|
|
35242
35195
|
},
|
|
35243
35196
|
kIndex
|
|
35244
35197
|
)) }),
|
|
35245
|
-
/* @__PURE__ */ (0,
|
|
35198
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
35246
35199
|
"input",
|
|
35247
35200
|
{
|
|
35248
35201
|
type: "text",
|
|
@@ -35266,9 +35219,9 @@ var KeywordBundlesEdit = ({
|
|
|
35266
35219
|
}
|
|
35267
35220
|
) })
|
|
35268
35221
|
] }),
|
|
35269
|
-
/* @__PURE__ */ (0,
|
|
35270
|
-
/* @__PURE__ */ (0,
|
|
35271
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
35272
35225
|
"input",
|
|
35273
35226
|
{
|
|
35274
35227
|
type: "number",
|
|
@@ -35296,7 +35249,7 @@ var KeywordBundlesEdit = ({
|
|
|
35296
35249
|
var KeywordBundlesDisplay = ({ value }) => {
|
|
35297
35250
|
const bundles = Array.isArray(value) ? value : [];
|
|
35298
35251
|
if (bundles.length === 0)
|
|
35299
|
-
return /* @__PURE__ */ (0,
|
|
35252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-gray-500 italic text-sm", children: "Not specified" });
|
|
35300
35253
|
const groups = {};
|
|
35301
35254
|
bundles.forEach((b) => {
|
|
35302
35255
|
const p = Number(b?.priority) || 1;
|
|
@@ -35305,20 +35258,20 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
35305
35258
|
groups[p].push(...keywords);
|
|
35306
35259
|
});
|
|
35307
35260
|
const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
|
|
35308
|
-
return /* @__PURE__ */ (0,
|
|
35261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "space-y-4 pt-2", children: sortedPriorities.map((priority) => {
|
|
35309
35262
|
const deduped = Array.from(new Set(groups[priority]));
|
|
35310
|
-
return /* @__PURE__ */ (0,
|
|
35311
|
-
/* @__PURE__ */ (0,
|
|
35312
|
-
/* @__PURE__ */ (0,
|
|
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: [
|
|
35313
35266
|
"Priority ",
|
|
35314
35267
|
priority
|
|
35315
35268
|
] }),
|
|
35316
|
-
/* @__PURE__ */ (0,
|
|
35269
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "h-[1px] flex-1 bg-white/10" })
|
|
35317
35270
|
] }),
|
|
35318
|
-
/* @__PURE__ */ (0,
|
|
35271
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex flex-wrap gap-2", children: deduped.map((keyword) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
35319
35272
|
"div",
|
|
35320
35273
|
{
|
|
35321
|
-
className: "px-2 py-1 rounded bg-
|
|
35274
|
+
className: "px-2 py-1 rounded bg-background bg-gray400 border border-white/10 text-gray-300 text-xs font-medium",
|
|
35322
35275
|
children: keyword
|
|
35323
35276
|
},
|
|
35324
35277
|
keyword
|
|
@@ -35327,9 +35280,135 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
35327
35280
|
}) });
|
|
35328
35281
|
};
|
|
35329
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
|
+
|
|
35330
35408
|
// src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
|
|
35409
|
+
var import_react61 = __toESM(require("react"), 1);
|
|
35331
35410
|
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
35332
|
-
var
|
|
35411
|
+
var ObjectDisplay2 = ({ value }) => {
|
|
35333
35412
|
if (!value || typeof value !== "object") return null;
|
|
35334
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: [
|
|
35335
35414
|
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("span", { className: "text-muted-foreground capitalize min-w-[120px]", children: [
|
|
@@ -35339,7 +35418,7 @@ var ObjectDisplay = ({ value }) => {
|
|
|
35339
35418
|
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-foreground font-medium", children: Array.isArray(v) ? v.join(", ") : String(v) })
|
|
35340
35419
|
] }, k)) });
|
|
35341
35420
|
};
|
|
35342
|
-
var
|
|
35421
|
+
var StringArrayDisplay2 = ({ value }) => {
|
|
35343
35422
|
if (!Array.isArray(value) || value.length === 0)
|
|
35344
35423
|
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
|
|
35345
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)) });
|
|
@@ -35371,7 +35450,7 @@ function buildSearchSpecFields(data) {
|
|
|
35371
35450
|
key,
|
|
35372
35451
|
label: "Platforms",
|
|
35373
35452
|
type: "custom",
|
|
35374
|
-
renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
35453
|
+
renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(StringArrayDisplay2, { value: v })
|
|
35375
35454
|
};
|
|
35376
35455
|
}
|
|
35377
35456
|
if (typeof value === "object" && value !== null && !Array.isArray(value) && !("min" in value && "max" in value)) {
|
|
@@ -35380,7 +35459,7 @@ function buildSearchSpecFields(data) {
|
|
|
35380
35459
|
key,
|
|
35381
35460
|
label,
|
|
35382
35461
|
type: "custom",
|
|
35383
|
-
renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
35462
|
+
renderDisplay: (v) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(ObjectDisplay2, { value: v })
|
|
35384
35463
|
};
|
|
35385
35464
|
}
|
|
35386
35465
|
const [generated] = generateFieldsFromData({ [key]: value });
|
|
@@ -36050,7 +36129,7 @@ var CreatorSearch = import_react63.default.memo(
|
|
|
36050
36129
|
type: "badge",
|
|
36051
36130
|
label: p,
|
|
36052
36131
|
variant: "outline",
|
|
36053
|
-
className: "bg-
|
|
36132
|
+
className: "bg-background bg-gray200 border-gray400 text-white font-medium"
|
|
36054
36133
|
},
|
|
36055
36134
|
p
|
|
36056
36135
|
)) });
|
|
@@ -36153,9 +36232,9 @@ var CampaignConceptCard = import_react64.default.memo(
|
|
|
36153
36232
|
idx + 1,
|
|
36154
36233
|
"."
|
|
36155
36234
|
] }),
|
|
36156
|
-
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "bg-
|
|
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 }),
|
|
36157
36236
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-gray-400", children: "=" }),
|
|
36158
|
-
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "bg-
|
|
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 })
|
|
36159
36238
|
] }, idx)) });
|
|
36160
36239
|
}
|
|
36161
36240
|
};
|
|
@@ -36165,7 +36244,7 @@ var CampaignConceptCard = import_react64.default.memo(
|
|
|
36165
36244
|
...field,
|
|
36166
36245
|
renderDisplay: (val) => {
|
|
36167
36246
|
if (!Array.isArray(val)) return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-white font-medium", children: val });
|
|
36168
|
-
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-
|
|
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)) });
|
|
36169
36248
|
}
|
|
36170
36249
|
};
|
|
36171
36250
|
}
|