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