pxengine 0.1.12 → 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 +2 -4
- package/config/tailwind-preset.js +0 -106
- package/src/atoms/AccordionAtom.tsx +0 -44
- package/src/atoms/AlertAtom.tsx +0 -48
- package/src/atoms/AlertDialogAtom.tsx +0 -66
- package/src/atoms/AspectRatioAtom.tsx +0 -27
- package/src/atoms/AvatarAtom.tsx +0 -21
- package/src/atoms/BadgeAtom.tsx +0 -35
- package/src/atoms/BreadcrumbAtom.tsx +0 -36
- package/src/atoms/ButtonAtom.tsx +0 -65
- package/src/atoms/CalendarAtom.tsx +0 -24
- package/src/atoms/CardAtom.tsx +0 -66
- package/src/atoms/CarouselAtom.tsx +0 -40
- package/src/atoms/ChartAtom.tsx +0 -192
- package/src/atoms/CheckboxAtom.tsx +0 -33
- package/src/atoms/CollapsibleAtom.tsx +0 -44
- package/src/atoms/CommandAtom.tsx +0 -46
- package/src/atoms/ContextMenuAtom.tsx +0 -49
- package/src/atoms/DialogAtom.tsx +0 -68
- package/src/atoms/DrawerAtom.tsx +0 -49
- package/src/atoms/DropdownMenuAtom.tsx +0 -49
- package/src/atoms/FormInputAtom.tsx +0 -101
- package/src/atoms/FormSelectAtom.tsx +0 -110
- package/src/atoms/FormTextareaAtom.tsx +0 -93
- package/src/atoms/InputAtom.tsx +0 -216
- package/src/atoms/InputOTPAtom.tsx +0 -49
- package/src/atoms/KbdAtom.tsx +0 -25
- package/src/atoms/LabelAtom.tsx +0 -23
- package/src/atoms/LayoutAtom.tsx +0 -45
- package/src/atoms/PaginationAtom.tsx +0 -49
- package/src/atoms/PopoverAtom.tsx +0 -40
- package/src/atoms/ProgressAtom.tsx +0 -15
- package/src/atoms/RadioGroupAtom.tsx +0 -31
- package/src/atoms/RatingAtom.tsx +0 -37
- package/src/atoms/ResizableAtom.tsx +0 -51
- package/src/atoms/ScrollAreaAtom.tsx +0 -31
- package/src/atoms/SeparatorAtom.tsx +0 -16
- package/src/atoms/SheetAtom.tsx +0 -72
- package/src/atoms/SkeletonAtom.tsx +0 -22
- package/src/atoms/SliderAtom.tsx +0 -32
- package/src/atoms/SpinnerAtom.tsx +0 -26
- package/src/atoms/SwitchAtom.tsx +0 -32
- package/src/atoms/TableAtom.tsx +0 -60
- package/src/atoms/TabsAtom.tsx +0 -40
- package/src/atoms/TextAtom.tsx +0 -36
- package/src/atoms/TextareaAtom.tsx +0 -42
- package/src/atoms/TimelineAtom.tsx +0 -77
- package/src/atoms/ToggleAtom.tsx +0 -36
- package/src/atoms/TooltipAtom.tsx +0 -39
- package/src/atoms/VideoAtom.tsx +0 -34
- package/src/atoms/index.ts +0 -49
- package/src/components/index.ts +0 -178
- package/src/components/ui/accordion.tsx +0 -56
- package/src/components/ui/alert-dialog.tsx +0 -139
- package/src/components/ui/alert.tsx +0 -59
- package/src/components/ui/aspect-ratio.tsx +0 -5
- package/src/components/ui/avatar.tsx +0 -50
- package/src/components/ui/badge.tsx +0 -36
- package/src/components/ui/breadcrumb.tsx +0 -115
- package/src/components/ui/button-group.tsx +0 -83
- package/src/components/ui/button.tsx +0 -56
- package/src/components/ui/calendar.tsx +0 -213
- package/src/components/ui/card.tsx +0 -79
- package/src/components/ui/carousel.tsx +0 -260
- package/src/components/ui/chart.tsx +0 -367
- package/src/components/ui/checkbox.tsx +0 -28
- package/src/components/ui/collapsible.tsx +0 -11
- package/src/components/ui/command.tsx +0 -153
- package/src/components/ui/context-menu.tsx +0 -198
- package/src/components/ui/dialog.tsx +0 -122
- package/src/components/ui/drawer.tsx +0 -116
- package/src/components/ui/dropdown-menu.tsx +0 -200
- package/src/components/ui/empty.tsx +0 -104
- package/src/components/ui/field.tsx +0 -244
- package/src/components/ui/form.tsx +0 -176
- package/src/components/ui/hover-card.tsx +0 -27
- package/src/components/ui/index.ts +0 -54
- package/src/components/ui/input-group.tsx +0 -168
- package/src/components/ui/input-otp.tsx +0 -69
- package/src/components/ui/input.tsx +0 -22
- package/src/components/ui/item.tsx +0 -193
- package/src/components/ui/kbd.tsx +0 -28
- package/src/components/ui/label.tsx +0 -26
- package/src/components/ui/menubar.tsx +0 -254
- package/src/components/ui/navigation-menu.tsx +0 -128
- package/src/components/ui/pagination.tsx +0 -117
- package/src/components/ui/popover.tsx +0 -29
- package/src/components/ui/progress.tsx +0 -28
- package/src/components/ui/radio-group.tsx +0 -42
- package/src/components/ui/resizable.tsx +0 -44
- package/src/components/ui/scroll-area.tsx +0 -46
- package/src/components/ui/select.tsx +0 -160
- package/src/components/ui/separator.tsx +0 -29
- package/src/components/ui/sheet.tsx +0 -140
- package/src/components/ui/sidebar.tsx +0 -771
- package/src/components/ui/skeleton.tsx +0 -15
- package/src/components/ui/slider.tsx +0 -26
- package/src/components/ui/sonner.tsx +0 -45
- package/src/components/ui/spinner.tsx +0 -16
- package/src/components/ui/switch.tsx +0 -27
- package/src/components/ui/table.tsx +0 -117
- package/src/components/ui/tabs.tsx +0 -53
- package/src/components/ui/textarea.tsx +0 -22
- package/src/components/ui/toggle-group.tsx +0 -61
- package/src/components/ui/toggle.tsx +0 -43
- package/src/components/ui/tooltip.tsx +0 -30
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/index.ts +0 -24
- package/src/lib/countries.ts +0 -203
- package/src/lib/index.ts +0 -2
- package/src/lib/utils.ts +0 -15
- package/src/lib/validators/index.ts +0 -1
- package/src/lib/validators/theme.ts +0 -148
- package/src/molecules/creator-discovery/AudienceDemographicsCard/AudienceDemographicsCard.tsx +0 -44
- package/src/molecules/creator-discovery/AudienceDemographicsCard/index.ts +0 -1
- package/src/molecules/creator-discovery/AudienceMetricCard/AudienceMetricCard.tsx +0 -50
- package/src/molecules/creator-discovery/AudienceMetricCard/index.ts +0 -1
- package/src/molecules/creator-discovery/BrandAffinityGroup/BrandAffinityGroup.tsx +0 -36
- package/src/molecules/creator-discovery/BrandAffinityGroup/index.ts +0 -1
- package/src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx +0 -123
- package/src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.types.ts +0 -13
- package/src/molecules/creator-discovery/CampaignSeedCard/index.ts +0 -2
- package/src/molecules/creator-discovery/ContentPreviewGallery/ContentPreviewGallery.tsx +0 -41
- package/src/molecules/creator-discovery/ContentPreviewGallery/index.ts +0 -1
- package/src/molecules/creator-discovery/CreatorActionHeader/CreatorActionHeader.tsx +0 -77
- package/src/molecules/creator-discovery/CreatorActionHeader/index.ts +0 -1
- package/src/molecules/creator-discovery/CreatorGridCard/CreatorGridCard.tsx +0 -104
- package/src/molecules/creator-discovery/CreatorGridCard/index.ts +0 -1
- package/src/molecules/creator-discovery/CreatorProfileSummary/CreatorProfileSummary.tsx +0 -65
- package/src/molecules/creator-discovery/CreatorProfileSummary/index.ts +0 -1
- package/src/molecules/creator-discovery/GrowthChartCard/GrowthChartCard.tsx +0 -58
- package/src/molecules/creator-discovery/GrowthChartCard/index.ts +0 -1
- package/src/molecules/creator-discovery/MCQCard/MCQCard.tsx +0 -165
- package/src/molecules/creator-discovery/MCQCard/MCQCard.types.ts +0 -71
- package/src/molecules/creator-discovery/MCQCard/index.ts +0 -2
- package/src/molecules/creator-discovery/PlatformIconGroup/PlatformIconGroup.tsx +0 -72
- package/src/molecules/creator-discovery/PlatformIconGroup/index.ts +0 -1
- package/src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx +0 -334
- package/src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx +0 -111
- package/src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.types.ts +0 -18
- package/src/molecules/creator-discovery/SearchSpecCard/index.ts +0 -3
- package/src/molecules/creator-discovery/TopPostsGrid/TopPostsGrid.tsx +0 -49
- package/src/molecules/creator-discovery/TopPostsGrid/index.ts +0 -1
- package/src/molecules/creator-discovery/index.ts +0 -13
- package/src/molecules/generic/ActionButton/ActionButton.tsx +0 -137
- package/src/molecules/generic/ActionButton/ActionButton.types.ts +0 -68
- package/src/molecules/generic/ActionButton/index.ts +0 -2
- package/src/molecules/generic/DataGrid/DataGrid.tsx +0 -102
- package/src/molecules/generic/DataGrid/index.ts +0 -1
- package/src/molecules/generic/EditableField/EditableField.tsx +0 -229
- package/src/molecules/generic/EditableField/EditableField.types.ts +0 -73
- package/src/molecules/generic/EditableField/index.ts +0 -2
- package/src/molecules/generic/EmptyState/EmptyState.tsx +0 -61
- package/src/molecules/generic/EmptyState/index.ts +0 -1
- package/src/molecules/generic/FileUpload/FileUpload.tsx +0 -62
- package/src/molecules/generic/FileUpload/index.ts +0 -1
- package/src/molecules/generic/FilterBar/FilterBar.tsx +0 -54
- package/src/molecules/generic/FilterBar/index.ts +0 -1
- package/src/molecules/generic/FormCard/FormCard.tsx +0 -136
- package/src/molecules/generic/FormCard/FormCard.types.ts +0 -93
- package/src/molecules/generic/FormCard/index.ts +0 -2
- package/src/molecules/generic/LoadingOverlay/LoadingOverlay.tsx +0 -39
- package/src/molecules/generic/LoadingOverlay/index.ts +0 -1
- package/src/molecules/generic/NotificationList/NotificationList.tsx +0 -80
- package/src/molecules/generic/NotificationList/index.ts +0 -1
- package/src/molecules/generic/StatsGrid/StatsGrid.tsx +0 -80
- package/src/molecules/generic/StatsGrid/index.ts +0 -1
- package/src/molecules/generic/StepWizard/StepWizard.tsx +0 -67
- package/src/molecules/generic/StepWizard/index.ts +0 -1
- package/src/molecules/generic/TagCloud/TagCloud.tsx +0 -32
- package/src/molecules/generic/TagCloud/index.ts +0 -1
- package/src/molecules/generic/index.ts +0 -12
- package/src/molecules/index.ts +0 -2
- package/src/render/PXEngineRenderer.tsx +0 -458
- package/src/render/index.ts +0 -1
- package/src/styles/globals.css +0 -146
- package/src/types/atoms.ts +0 -450
- package/src/types/common.ts +0 -116
- package/src/types/index.ts +0 -3
- package/src/types/molecules.ts +0 -279
- package/src/types/schema.ts +0 -12
package/dist/index.cjs
CHANGED
|
@@ -70,7 +70,6 @@ __export(index_exports, {
|
|
|
70
70
|
BreadcrumbSeparator: () => BreadcrumbSeparator,
|
|
71
71
|
Button: () => Button,
|
|
72
72
|
ButtonAtom: () => ButtonAtom,
|
|
73
|
-
CAMPAIGN_SEED_FIELDS: () => CAMPAIGN_SEED_FIELDS,
|
|
74
73
|
Calendar: () => Calendar2,
|
|
75
74
|
CalendarAtom: () => CalendarAtom,
|
|
76
75
|
CampaignSeedCard: () => CampaignSeedCard,
|
|
@@ -224,7 +223,6 @@ __export(index_exports, {
|
|
|
224
223
|
ResizableAtom: () => ResizableAtom,
|
|
225
224
|
ResizablePanel: () => ResizablePanel,
|
|
226
225
|
ResizablePanelGroup: () => ResizablePanelGroup,
|
|
227
|
-
SEARCH_SPEC_FIELDS: () => SEARCH_SPEC_FIELDS,
|
|
228
226
|
ScrollArea: () => ScrollArea,
|
|
229
227
|
ScrollAreaAtom: () => ScrollAreaAtom,
|
|
230
228
|
ScrollBar: () => ScrollBar,
|
|
@@ -31846,7 +31844,7 @@ var ButtonAtom = ({
|
|
|
31846
31844
|
}
|
|
31847
31845
|
};
|
|
31848
31846
|
const variantMap = {
|
|
31849
|
-
purple: "bg-primary text-primary-foreground hover:
|
|
31847
|
+
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",
|
|
31850
31848
|
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"
|
|
31851
31849
|
};
|
|
31852
31850
|
const customClass = variantMap[variant] || "";
|
|
@@ -31880,8 +31878,8 @@ var LayoutAtom = ({
|
|
|
31880
31878
|
}) => {
|
|
31881
31879
|
const gapMap = {
|
|
31882
31880
|
none: "gap-0",
|
|
31883
|
-
sm: "gap-
|
|
31884
|
-
md: "gap-
|
|
31881
|
+
sm: "gap-4",
|
|
31882
|
+
md: "gap-6",
|
|
31885
31883
|
lg: "gap-8",
|
|
31886
31884
|
xl: "gap-12"
|
|
31887
31885
|
};
|
|
@@ -33673,7 +33671,6 @@ __export(molecules_exports, {
|
|
|
33673
33671
|
AudienceDemographicsCard: () => AudienceDemographicsCard,
|
|
33674
33672
|
AudienceMetricCard: () => AudienceMetricCard,
|
|
33675
33673
|
BrandAffinityGroup: () => BrandAffinityGroup,
|
|
33676
|
-
CAMPAIGN_SEED_FIELDS: () => CAMPAIGN_SEED_FIELDS,
|
|
33677
33674
|
CampaignSeedCard: () => CampaignSeedCard,
|
|
33678
33675
|
ContentPreviewGallery: () => ContentPreviewGallery,
|
|
33679
33676
|
CountrySelectDisplay: () => CountrySelectDisplay,
|
|
@@ -33694,7 +33691,6 @@ __export(molecules_exports, {
|
|
|
33694
33691
|
MCQCard: () => MCQCard,
|
|
33695
33692
|
NotificationList: () => NotificationList,
|
|
33696
33693
|
PlatformIconGroup: () => PlatformIconGroup,
|
|
33697
|
-
SEARCH_SPEC_FIELDS: () => SEARCH_SPEC_FIELDS,
|
|
33698
33694
|
SearchSpecCard: () => SearchSpecCard,
|
|
33699
33695
|
StatsGrid: () => StatsGrid,
|
|
33700
33696
|
StepWizard: () => StepWizard,
|
|
@@ -33828,22 +33824,21 @@ var EditableField = import_react53.default.memo(
|
|
|
33828
33824
|
if (type === "slider") {
|
|
33829
33825
|
return config.sliderConfig?.formatValue ? config.sliderConfig.formatValue(value) : `${value?.min} - ${value?.max}`;
|
|
33830
33826
|
}
|
|
33831
|
-
if (!value)
|
|
33832
|
-
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "text-muted-foreground italic", children: "Not set" });
|
|
33827
|
+
if (!value) return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "opacity-0", children: "-" });
|
|
33833
33828
|
return value.toString();
|
|
33834
33829
|
};
|
|
33835
|
-
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: cn("group flex flex-col gap-1
|
|
33830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: cn("group flex flex-col gap-1 py-1.5", className), children: [
|
|
33836
33831
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
33837
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Label, { className: "text-
|
|
33832
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Label, { className: "text-[13px] font-bold text-[var(--foreground)] opacity-80 uppercase tracking-wider", children: label }),
|
|
33838
33833
|
isChanged && !isEditingProp && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33839
33834
|
"div",
|
|
33840
33835
|
{
|
|
33841
|
-
className: "w-
|
|
33836
|
+
className: "w-2 h-2 rounded-full bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.6)]",
|
|
33842
33837
|
title: "Unsaved changes"
|
|
33843
33838
|
}
|
|
33844
33839
|
)
|
|
33845
33840
|
] }),
|
|
33846
|
-
isEditingProp ? /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-col gap-
|
|
33841
|
+
isEditingProp ? /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
33847
33842
|
renderInput(),
|
|
33848
33843
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-end gap-2", children: [
|
|
33849
33844
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
@@ -33851,20 +33846,20 @@ var EditableField = import_react53.default.memo(
|
|
|
33851
33846
|
{
|
|
33852
33847
|
size: "icon",
|
|
33853
33848
|
variant: "outline",
|
|
33854
|
-
className: "h-
|
|
33849
|
+
className: "h-9 w-9 text-destructive border-destructive/20 hover:bg-destructive/10 rounded-xl",
|
|
33855
33850
|
onClick: onCancel,
|
|
33856
33851
|
disabled: isSaving,
|
|
33857
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(X, { className: "h-
|
|
33852
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(X, { className: "h-5 w-5" })
|
|
33858
33853
|
}
|
|
33859
33854
|
),
|
|
33860
33855
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
33861
33856
|
Button,
|
|
33862
33857
|
{
|
|
33863
33858
|
size: "icon",
|
|
33864
|
-
className: "h-
|
|
33859
|
+
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",
|
|
33865
33860
|
onClick: handleSave,
|
|
33866
33861
|
disabled: isSaving,
|
|
33867
|
-
children: isSaving ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(LoaderCircle, { className: "h-
|
|
33862
|
+
children: isSaving ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(LoaderCircle, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Check, { className: "h-5 w-5" })
|
|
33868
33863
|
}
|
|
33869
33864
|
)
|
|
33870
33865
|
] })
|
|
@@ -33872,13 +33867,13 @@ var EditableField = import_react53.default.memo(
|
|
|
33872
33867
|
"div",
|
|
33873
33868
|
{
|
|
33874
33869
|
className: cn(
|
|
33875
|
-
"relative flex items-center justify-between rounded-
|
|
33876
|
-
"hover:bg-gray-100/
|
|
33870
|
+
"relative flex items-center justify-between rounded-xl px-2 py-1.5 transition-all duration-200",
|
|
33871
|
+
"hover:bg-gray-100/80 cursor-pointer border border-transparent hover:border-gray-200 group-hover:shadow-sm"
|
|
33877
33872
|
),
|
|
33878
33873
|
onClick: onEdit,
|
|
33879
33874
|
children: [
|
|
33880
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-
|
|
33881
|
-
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Pencil, { className: "h-
|
|
33875
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-[14px] text-gray-900 font-semibold truncate flex-1 leading-relaxed", children: formattedValue() }),
|
|
33876
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Pencil, { className: "h-4 w-4 text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
33882
33877
|
]
|
|
33883
33878
|
}
|
|
33884
33879
|
)
|
|
@@ -33938,8 +33933,8 @@ var ActionButton = import_react54.default.memo(
|
|
|
33938
33933
|
onClick: onProceed,
|
|
33939
33934
|
className: cn(
|
|
33940
33935
|
"relative min-w-[140px] overflow-hidden group transition-all duration-300",
|
|
33941
|
-
"bg-
|
|
33942
|
-
variant === "outline" && "bg-transparent border-
|
|
33936
|
+
"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%)]",
|
|
33937
|
+
variant === "outline" && "bg-transparent border-[var(--primary-color)] text-[var(--primary-color)] hover:bg-[var(--primary-color)]/5",
|
|
33943
33938
|
isLoading && "opacity-80"
|
|
33944
33939
|
),
|
|
33945
33940
|
children: [
|
|
@@ -33992,7 +33987,8 @@ var FormCard = import_react55.default.memo(
|
|
|
33992
33987
|
onFieldEdit,
|
|
33993
33988
|
onFieldSave,
|
|
33994
33989
|
onFieldCancel,
|
|
33995
|
-
showTimeline =
|
|
33990
|
+
showTimeline = false,
|
|
33991
|
+
// Default to false to remove "bullets"
|
|
33996
33992
|
proceedLabel,
|
|
33997
33993
|
countdown,
|
|
33998
33994
|
isPaused = false,
|
|
@@ -34011,52 +34007,62 @@ var FormCard = import_react55.default.memo(
|
|
|
34011
34007
|
Card,
|
|
34012
34008
|
{
|
|
34013
34009
|
className: cn(
|
|
34014
|
-
"w-full rounded-[24px] border border-
|
|
34010
|
+
"w-full rounded-[24px] border border-[var(--border-color)] bg-[var(--card-background)] shadow-lg overflow-hidden transition-all duration-300 hover:shadow-xl",
|
|
34015
34011
|
className
|
|
34016
34012
|
),
|
|
34017
34013
|
children: [
|
|
34018
|
-
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between pb-
|
|
34019
|
-
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CardTitle, { className: "text-lg font-bold text-
|
|
34014
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between pb-3 pt-4 px-6 space-y-0", children: [
|
|
34015
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CardTitle, { className: "text-lg font-bold text-[var(--foreground)] tracking-tight", children: title }),
|
|
34020
34016
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
34021
34017
|
"button",
|
|
34022
34018
|
{
|
|
34023
34019
|
onClick: handleCopyAll,
|
|
34024
|
-
className: "p-1.5 rounded-
|
|
34020
|
+
className: "p-1.5 rounded-xl hover:bg-gray-100/50 text-gray-400 hover:text-gray-600 transition-all active:scale-95",
|
|
34025
34021
|
title: "Copy all details",
|
|
34026
34022
|
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Copy, { className: "h-4 w-4" })
|
|
34027
34023
|
}
|
|
34028
34024
|
)
|
|
34029
34025
|
] }),
|
|
34030
|
-
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CardContent, { className: "pt-
|
|
34031
|
-
showTimeline && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "absolute left-[7px] top-2 bottom-6 w-0.5 border-l-2 border-dotted border-
|
|
34032
|
-
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "space-y-
|
|
34033
|
-
|
|
34034
|
-
|
|
34035
|
-
|
|
34036
|
-
|
|
34037
|
-
|
|
34038
|
-
|
|
34026
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CardContent, { className: "px-6 pt-1 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "relative", children: [
|
|
34027
|
+
showTimeline && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "absolute left-[7px] top-2 bottom-6 w-0.5 border-l-2 border-dotted border-gray-200 pointer-events-none" }),
|
|
34028
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "space-y-2.5", children: fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
34029
|
+
"div",
|
|
34030
|
+
{
|
|
34031
|
+
className: cn(
|
|
34032
|
+
"relative transition-all duration-300",
|
|
34033
|
+
showTimeline && "pl-8"
|
|
34034
|
+
),
|
|
34035
|
+
children: [
|
|
34036
|
+
showTimeline && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
34037
|
+
"div",
|
|
34038
|
+
{
|
|
34039
|
+
className: cn(
|
|
34040
|
+
"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",
|
|
34041
|
+
changedFields[field.key] ? "border-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]" : "border-gray-200 shadow-sm"
|
|
34042
|
+
)
|
|
34043
|
+
}
|
|
34044
|
+
),
|
|
34045
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
34046
|
+
EditableField,
|
|
34047
|
+
{
|
|
34048
|
+
label: field.label,
|
|
34049
|
+
value: data[field.key],
|
|
34050
|
+
type: field.type,
|
|
34051
|
+
config: field,
|
|
34052
|
+
isEditing: editingFields[field.key],
|
|
34053
|
+
isChanged: changedFields[field.key],
|
|
34054
|
+
isSaving: savingFields[field.key],
|
|
34055
|
+
onEdit: () => onFieldEdit?.(field.key),
|
|
34056
|
+
onSave: (val) => onFieldSave?.(field.key, val),
|
|
34057
|
+
onCancel: () => onFieldCancel?.(field.key)
|
|
34058
|
+
}
|
|
34039
34059
|
)
|
|
34040
|
-
|
|
34041
|
-
|
|
34042
|
-
|
|
34043
|
-
|
|
34044
|
-
{
|
|
34045
|
-
label: field.label,
|
|
34046
|
-
value: data[field.key],
|
|
34047
|
-
type: field.type,
|
|
34048
|
-
config: field,
|
|
34049
|
-
isEditing: editingFields[field.key],
|
|
34050
|
-
isChanged: changedFields[field.key],
|
|
34051
|
-
isSaving: savingFields[field.key],
|
|
34052
|
-
onEdit: () => onFieldEdit?.(field.key),
|
|
34053
|
-
onSave: (val) => onFieldSave?.(field.key, val),
|
|
34054
|
-
onCancel: () => onFieldCancel?.(field.key)
|
|
34055
|
-
}
|
|
34056
|
-
)
|
|
34057
|
-
] }, field.key)) })
|
|
34060
|
+
]
|
|
34061
|
+
},
|
|
34062
|
+
field.key
|
|
34063
|
+
)) })
|
|
34058
34064
|
] }) }),
|
|
34059
|
-
(onProceed || footer) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(CardFooter, { className: "flex flex-col gap-
|
|
34065
|
+
(onProceed || footer) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(CardFooter, { className: "flex flex-col gap-3 border-t border-[var(--border-color)] bg-black/5 p-6", children: [
|
|
34060
34066
|
onProceed && proceedLabel && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "w-full flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
34061
34067
|
ActionButton,
|
|
34062
34068
|
{
|
|
@@ -34080,8 +34086,10 @@ FormCard.displayName = "FormCard";
|
|
|
34080
34086
|
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
34081
34087
|
var StatsGrid = ({
|
|
34082
34088
|
items,
|
|
34089
|
+
stats,
|
|
34083
34090
|
className
|
|
34084
34091
|
}) => {
|
|
34092
|
+
const displayItems = items || stats || [];
|
|
34085
34093
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
34086
34094
|
"div",
|
|
34087
34095
|
{
|
|
@@ -34089,15 +34097,15 @@ var StatsGrid = ({
|
|
|
34089
34097
|
"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
34090
34098
|
className
|
|
34091
34099
|
),
|
|
34092
|
-
children:
|
|
34100
|
+
children: displayItems?.map((item, index) => {
|
|
34093
34101
|
const Icon3 = item.icon ? lucide_react_exports[item.icon] : null;
|
|
34094
|
-
const trendColor = item.trendDirection === "up" ? "text-
|
|
34102
|
+
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";
|
|
34095
34103
|
const TrendIcon = item.trendDirection === "up" ? ArrowUpRight : item.trendDirection === "down" ? ArrowDownRight : null;
|
|
34096
34104
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
34097
34105
|
Card,
|
|
34098
34106
|
{
|
|
34099
|
-
className: "bg-white
|
|
34100
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(CardContent, { className: "p-
|
|
34107
|
+
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",
|
|
34108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(CardContent, { className: "p-5 flex flex-col gap-1.5", children: [
|
|
34101
34109
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
34102
34110
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
34103
34111
|
TextAtom,
|
|
@@ -34106,12 +34114,12 @@ var StatsGrid = ({
|
|
|
34106
34114
|
type: "text",
|
|
34107
34115
|
content: item.label,
|
|
34108
34116
|
variant: "small",
|
|
34109
|
-
className: "text-muted-foreground font-medium"
|
|
34117
|
+
className: "text-muted-foreground font-medium tracking-wide uppercase text-[10px]"
|
|
34110
34118
|
}
|
|
34111
34119
|
),
|
|
34112
|
-
Icon3 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon3, { className: "w-4 h-4 text-purple
|
|
34120
|
+
Icon3 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon3, { className: "w-4 h-4 text-[var(--primary-color,theme(colors.purple.500))]" })
|
|
34113
34121
|
] }),
|
|
34114
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-baseline gap-
|
|
34122
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-baseline gap-3", children: [
|
|
34115
34123
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
34116
34124
|
TextAtom,
|
|
34117
34125
|
{
|
|
@@ -34119,15 +34127,19 @@ var StatsGrid = ({
|
|
|
34119
34127
|
type: "text",
|
|
34120
34128
|
content: String(item.value),
|
|
34121
34129
|
variant: "h3",
|
|
34122
|
-
className:
|
|
34130
|
+
className: cn(
|
|
34131
|
+
"font-bold text-[var(--foreground)] tracking-tight leading-tight",
|
|
34132
|
+
String(item.value).length > 20 ? "text-base" : String(item.value).length > 12 ? "text-lg" : "text-xl"
|
|
34133
|
+
)
|
|
34123
34134
|
}
|
|
34124
34135
|
),
|
|
34125
34136
|
item.trend && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
34126
34137
|
"div",
|
|
34127
34138
|
{
|
|
34128
34139
|
className: cn(
|
|
34129
|
-
"flex items-center text-xs font-bold",
|
|
34130
|
-
trendColor
|
|
34140
|
+
"flex items-center text-xs font-bold px-1.5 py-0.5 rounded-full bg-opacity-10",
|
|
34141
|
+
trendColor,
|
|
34142
|
+
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"
|
|
34131
34143
|
),
|
|
34132
34144
|
children: [
|
|
34133
34145
|
TrendIcon && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(TrendIcon, { className: "w-3 h-3 mr-0.5" }),
|
|
@@ -34334,16 +34346,19 @@ var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
|
|
|
34334
34346
|
|
|
34335
34347
|
// src/molecules/generic/TagCloud/TagCloud.tsx
|
|
34336
34348
|
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
34337
|
-
var TagCloud = ({ tags, className, onTagClick }) => {
|
|
34338
|
-
|
|
34349
|
+
var TagCloud = ({ tags = [], className, onTagClick }) => {
|
|
34350
|
+
const normalizedTags = tags.map(
|
|
34351
|
+
(t) => typeof t === "string" ? { label: t, value: t } : t
|
|
34352
|
+
);
|
|
34353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: cn("flex flex-wrap gap-3.5", className), children: normalizedTags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
34339
34354
|
Badge2,
|
|
34340
34355
|
{
|
|
34341
34356
|
variant: "secondary",
|
|
34342
|
-
className: "cursor-pointer bg-white border border-
|
|
34357
|
+
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",
|
|
34343
34358
|
onClick: () => onTagClick?.(tag.value),
|
|
34344
34359
|
children: [
|
|
34345
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: tag.label }),
|
|
34346
|
-
tag.count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "text-[10px] font-bold bg-
|
|
34360
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "font-medium", children: tag.label }),
|
|
34361
|
+
tag.count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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 })
|
|
34347
34362
|
]
|
|
34348
34363
|
},
|
|
34349
34364
|
tag.value
|
|
@@ -34527,88 +34542,67 @@ var NotificationList = ({
|
|
|
34527
34542
|
|
|
34528
34543
|
// src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
|
|
34529
34544
|
var import_react58 = __toESM(require("react"), 1);
|
|
34530
|
-
|
|
34531
|
-
|
|
34532
|
-
|
|
34533
|
-
|
|
34534
|
-
|
|
34535
|
-
|
|
34536
|
-
|
|
34537
|
-
|
|
34538
|
-
|
|
34539
|
-
|
|
34540
|
-
|
|
34541
|
-
|
|
34542
|
-
|
|
34543
|
-
|
|
34544
|
-
|
|
34545
|
-
|
|
34546
|
-
|
|
34547
|
-
|
|
34548
|
-
|
|
34549
|
-
|
|
34550
|
-
|
|
34551
|
-
|
|
34552
|
-
|
|
34553
|
-
|
|
34554
|
-
|
|
34555
|
-
|
|
34556
|
-
|
|
34557
|
-
|
|
34558
|
-
|
|
34559
|
-
|
|
34560
|
-
|
|
34561
|
-
|
|
34562
|
-
|
|
34563
|
-
|
|
34564
|
-
|
|
34565
|
-
normalized = {
|
|
34566
|
-
min: Number(minStr) || 0,
|
|
34567
|
-
max: Number(maxStr) || 1e5
|
|
34568
|
-
};
|
|
34569
|
-
} else {
|
|
34570
|
-
const val = Number(String(value).replace(/[^0-9.]/g, "")) || 0;
|
|
34571
|
-
normalized = val > 0 ? { min: val, max: val } : { min: 0, max: 1e5 };
|
|
34572
|
-
}
|
|
34573
|
-
if (normalized.min === normalized.max)
|
|
34574
|
-
return formatCurrency(normalized.min);
|
|
34575
|
-
return `${formatCurrency(normalized.min)} - ${formatCurrency(normalized.max)}`;
|
|
34576
|
-
}
|
|
34545
|
+
|
|
34546
|
+
// src/lib/field-utils.ts
|
|
34547
|
+
function normalizeLabel(key) {
|
|
34548
|
+
return key.split(/_|\s+/).map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
34549
|
+
}
|
|
34550
|
+
function inferFieldType(value) {
|
|
34551
|
+
if (typeof value === "boolean") return "checkbox";
|
|
34552
|
+
if (typeof value === "number") return "number";
|
|
34553
|
+
if (Array.isArray(value)) return "custom";
|
|
34554
|
+
if (typeof value === "object" && value !== null) {
|
|
34555
|
+
if ("min" in value && "max" in value) return "slider";
|
|
34556
|
+
return "custom";
|
|
34557
|
+
}
|
|
34558
|
+
if (typeof value === "string") {
|
|
34559
|
+
if (value.length > 100) return "textarea";
|
|
34560
|
+
return "text";
|
|
34561
|
+
}
|
|
34562
|
+
return "text";
|
|
34563
|
+
}
|
|
34564
|
+
function generateFieldsFromData(data) {
|
|
34565
|
+
if (!data || typeof data !== "object") return [];
|
|
34566
|
+
return Object.keys(data).map((key) => {
|
|
34567
|
+
const value = data[key];
|
|
34568
|
+
const type = inferFieldType(value);
|
|
34569
|
+
const config = {
|
|
34570
|
+
key,
|
|
34571
|
+
label: normalizeLabel(key),
|
|
34572
|
+
type
|
|
34573
|
+
};
|
|
34574
|
+
if (type === "slider" && typeof value === "object") {
|
|
34575
|
+
config.sliderConfig = {
|
|
34576
|
+
min: value.min ?? 0,
|
|
34577
|
+
max: value.max ?? 100,
|
|
34578
|
+
step: 1
|
|
34579
|
+
};
|
|
34577
34580
|
}
|
|
34578
|
-
|
|
34579
|
-
|
|
34580
|
-
|
|
34581
|
-
|
|
34582
|
-
|
|
34583
|
-
|
|
34584
|
-
},
|
|
34585
|
-
{
|
|
34586
|
-
key: "timeline_opt",
|
|
34587
|
-
label: "Timeline Option",
|
|
34588
|
-
type: "text",
|
|
34589
|
-
placeholder: "Not specified"
|
|
34590
|
-
},
|
|
34591
|
-
{
|
|
34592
|
-
key: "notes",
|
|
34593
|
-
label: "Notes",
|
|
34594
|
-
type: "textarea",
|
|
34595
|
-
placeholder: "No notes",
|
|
34596
|
-
rows: 4
|
|
34597
|
-
}
|
|
34598
|
-
];
|
|
34581
|
+
return config;
|
|
34582
|
+
});
|
|
34583
|
+
}
|
|
34584
|
+
|
|
34585
|
+
// src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
|
|
34586
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
34599
34587
|
var CampaignSeedCard = import_react58.default.memo(
|
|
34600
34588
|
({
|
|
34601
34589
|
selectionStatus,
|
|
34602
34590
|
isLatestMessage = true,
|
|
34603
34591
|
className,
|
|
34592
|
+
fields: providedFields,
|
|
34593
|
+
data,
|
|
34604
34594
|
...formCardProps
|
|
34605
34595
|
}) => {
|
|
34596
|
+
const fields = (0, import_react58.useMemo)(() => {
|
|
34597
|
+
return providedFields || generateFieldsFromData(data);
|
|
34598
|
+
}, [providedFields, data]);
|
|
34606
34599
|
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
34607
34600
|
FormCard,
|
|
34608
34601
|
{
|
|
34609
34602
|
...formCardProps,
|
|
34610
|
-
|
|
34611
|
-
|
|
34603
|
+
data,
|
|
34604
|
+
title: formCardProps.title || "Campaign Brief",
|
|
34605
|
+
fields,
|
|
34612
34606
|
className,
|
|
34613
34607
|
footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1", children: [
|
|
34614
34608
|
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(CircleCheck, { className: "h-4 w-4" }),
|
|
@@ -34621,10 +34615,40 @@ var CampaignSeedCard = import_react58.default.memo(
|
|
|
34621
34615
|
CampaignSeedCard.displayName = "CampaignSeedCard";
|
|
34622
34616
|
|
|
34623
34617
|
// src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
|
|
34624
|
-
var
|
|
34618
|
+
var import_react59 = __toESM(require("react"), 1);
|
|
34619
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
34620
|
+
var SearchSpecCard = import_react59.default.memo(
|
|
34621
|
+
({
|
|
34622
|
+
selectionStatus,
|
|
34623
|
+
isLatestMessage = true,
|
|
34624
|
+
className,
|
|
34625
|
+
fields: providedFields,
|
|
34626
|
+
data,
|
|
34627
|
+
...formCardProps
|
|
34628
|
+
}) => {
|
|
34629
|
+
const fields = (0, import_react59.useMemo)(() => {
|
|
34630
|
+
return providedFields || generateFieldsFromData(data);
|
|
34631
|
+
}, [providedFields, data]);
|
|
34632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
34633
|
+
FormCard,
|
|
34634
|
+
{
|
|
34635
|
+
...formCardProps,
|
|
34636
|
+
data,
|
|
34637
|
+
title: formCardProps.title || "Search Specification",
|
|
34638
|
+
fields,
|
|
34639
|
+
className,
|
|
34640
|
+
footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1", children: [
|
|
34641
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(CircleCheck, { className: "h-4 w-4" }),
|
|
34642
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
|
|
34643
|
+
] }) : formCardProps.footer
|
|
34644
|
+
}
|
|
34645
|
+
);
|
|
34646
|
+
}
|
|
34647
|
+
);
|
|
34648
|
+
SearchSpecCard.displayName = "SearchSpecCard";
|
|
34625
34649
|
|
|
34626
34650
|
// src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
|
|
34627
|
-
var
|
|
34651
|
+
var import_react60 = require("react");
|
|
34628
34652
|
|
|
34629
34653
|
// src/lib/countries.ts
|
|
34630
34654
|
var countries = [
|
|
@@ -34831,15 +34855,15 @@ var countriesWithFlags = Object.fromEntries(
|
|
|
34831
34855
|
);
|
|
34832
34856
|
|
|
34833
34857
|
// src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
|
|
34834
|
-
var
|
|
34858
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
34835
34859
|
var CountrySelectEdit = ({
|
|
34836
34860
|
value,
|
|
34837
34861
|
onChange
|
|
34838
34862
|
}) => {
|
|
34839
|
-
const [isDropdownOpen, setIsDropdownOpen] = (0,
|
|
34840
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
34841
|
-
const dropdownRef = (0,
|
|
34842
|
-
(0,
|
|
34863
|
+
const [isDropdownOpen, setIsDropdownOpen] = (0, import_react60.useState)(false);
|
|
34864
|
+
const [searchTerm, setSearchTerm] = (0, import_react60.useState)("");
|
|
34865
|
+
const dropdownRef = (0, import_react60.useRef)(null);
|
|
34866
|
+
(0, import_react60.useEffect)(() => {
|
|
34843
34867
|
const handleClickOutside = (event) => {
|
|
34844
34868
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
34845
34869
|
setIsDropdownOpen(false);
|
|
@@ -34849,16 +34873,16 @@ var CountrySelectEdit = ({
|
|
|
34849
34873
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
34850
34874
|
}, []);
|
|
34851
34875
|
const inputValue = Array.isArray(value) ? value : [];
|
|
34852
|
-
return /* @__PURE__ */ (0,
|
|
34853
|
-
/* @__PURE__ */ (0,
|
|
34854
|
-
/* @__PURE__ */ (0,
|
|
34876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "space-y-3", children: [
|
|
34877
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "relative", ref: dropdownRef, children: [
|
|
34878
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
34855
34879
|
"div",
|
|
34856
34880
|
{
|
|
34857
34881
|
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",
|
|
34858
34882
|
onClick: () => setIsDropdownOpen(!isDropdownOpen),
|
|
34859
34883
|
children: [
|
|
34860
|
-
/* @__PURE__ */ (0,
|
|
34861
|
-
/* @__PURE__ */ (0,
|
|
34884
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "text-gray-700", children: inputValue.length > 0 ? `${inputValue.length} ${inputValue.length === 1 ? "country" : "countries"} selected` : "Select countries..." }),
|
|
34885
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
34862
34886
|
ChevronDown,
|
|
34863
34887
|
{
|
|
34864
34888
|
className: cn(
|
|
@@ -34870,8 +34894,8 @@ var CountrySelectEdit = ({
|
|
|
34870
34894
|
]
|
|
34871
34895
|
}
|
|
34872
34896
|
),
|
|
34873
|
-
isDropdownOpen && /* @__PURE__ */ (0,
|
|
34874
|
-
/* @__PURE__ */ (0,
|
|
34897
|
+
isDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime105.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: [
|
|
34898
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "p-2 border-b border-gray-100", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
34875
34899
|
"input",
|
|
34876
34900
|
{
|
|
34877
34901
|
type: "text",
|
|
@@ -34882,9 +34906,9 @@ var CountrySelectEdit = ({
|
|
|
34882
34906
|
onClick: (e) => e.stopPropagation()
|
|
34883
34907
|
}
|
|
34884
34908
|
) }),
|
|
34885
|
-
/* @__PURE__ */ (0,
|
|
34909
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "max-h-40 overflow-y-auto p-1", children: countries.filter(
|
|
34886
34910
|
(country) => country.name.toLowerCase().includes(searchTerm.toLowerCase()) || country.code.toLowerCase().includes(searchTerm.toLowerCase())
|
|
34887
|
-
).map((country) => /* @__PURE__ */ (0,
|
|
34911
|
+
).map((country) => /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
34888
34912
|
"div",
|
|
34889
34913
|
{
|
|
34890
34914
|
className: cn(
|
|
@@ -34905,31 +34929,31 @@ var CountrySelectEdit = ({
|
|
|
34905
34929
|
}
|
|
34906
34930
|
},
|
|
34907
34931
|
children: [
|
|
34908
|
-
/* @__PURE__ */ (0,
|
|
34909
|
-
/* @__PURE__ */ (0,
|
|
34910
|
-
/* @__PURE__ */ (0,
|
|
34932
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
34933
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "text-sm text-gray-700", children: country.name }),
|
|
34934
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "text-xs text-gray-400 font-mono", children: country.code })
|
|
34911
34935
|
] }),
|
|
34912
|
-
inputValue.includes(country.code) && /* @__PURE__ */ (0,
|
|
34936
|
+
inputValue.includes(country.code) && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Check, { className: "h-4 w-4 text-purple500" })
|
|
34913
34937
|
]
|
|
34914
34938
|
},
|
|
34915
34939
|
country.code
|
|
34916
34940
|
)) })
|
|
34917
34941
|
] })
|
|
34918
34942
|
] }),
|
|
34919
|
-
inputValue.length > 0 && /* @__PURE__ */ (0,
|
|
34943
|
+
inputValue.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
34920
34944
|
Badge2,
|
|
34921
34945
|
{
|
|
34922
34946
|
variant: "secondary",
|
|
34923
34947
|
className: "bg-purple50 text-purple700 border-purple100 hover:bg-purple100 cursor-default flex items-center gap-1 pr-1",
|
|
34924
34948
|
children: [
|
|
34925
34949
|
countryCode,
|
|
34926
|
-
/* @__PURE__ */ (0,
|
|
34950
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
34927
34951
|
"button",
|
|
34928
34952
|
{
|
|
34929
34953
|
onClick: () => onChange(inputValue.filter((c) => c !== countryCode)),
|
|
34930
34954
|
className: "hover:bg-purple200 rounded-full p-0.5 transition-colors",
|
|
34931
34955
|
children: [
|
|
34932
|
-
/* @__PURE__ */ (0,
|
|
34956
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ChevronDown, { className: "h-3 w-3 rotate-45" }),
|
|
34933
34957
|
" "
|
|
34934
34958
|
]
|
|
34935
34959
|
}
|
|
@@ -34942,9 +34966,9 @@ var CountrySelectEdit = ({
|
|
|
34942
34966
|
};
|
|
34943
34967
|
var CountrySelectDisplay = ({ value }) => {
|
|
34944
34968
|
if (!value || !Array.isArray(value) || value.length === 0) {
|
|
34945
|
-
return /* @__PURE__ */ (0,
|
|
34969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "text-muted-foreground italic", children: "Not specified" });
|
|
34946
34970
|
}
|
|
34947
|
-
return /* @__PURE__ */ (0,
|
|
34971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "flex flex-wrap gap-1.5", children: value.map((countryCode) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
34948
34972
|
Badge2,
|
|
34949
34973
|
{
|
|
34950
34974
|
variant: "outline",
|
|
@@ -34966,22 +34990,22 @@ var KeywordBundlesEdit = ({
|
|
|
34966
34990
|
groups[p].push({ bundle: b, index: idx });
|
|
34967
34991
|
});
|
|
34968
34992
|
const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
|
|
34969
|
-
return /* @__PURE__ */ (0,
|
|
34970
|
-
/* @__PURE__ */ (0,
|
|
34971
|
-
/* @__PURE__ */ (0,
|
|
34993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "space-y-6 pt-2", children: sortedPriorities.map((priority) => /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "space-y-3", children: [
|
|
34994
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
34995
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(Badge2, { className: "bg-purple500 hover:bg-purple500", children: [
|
|
34972
34996
|
"Priority ",
|
|
34973
34997
|
priority
|
|
34974
34998
|
] }),
|
|
34975
|
-
/* @__PURE__ */ (0,
|
|
34999
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "h-px flex-1 bg-gray-100" })
|
|
34976
35000
|
] }),
|
|
34977
|
-
groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ (0,
|
|
35001
|
+
groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
34978
35002
|
"div",
|
|
34979
35003
|
{
|
|
34980
35004
|
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",
|
|
34981
|
-
children: /* @__PURE__ */ (0,
|
|
34982
|
-
/* @__PURE__ */ (0,
|
|
34983
|
-
/* @__PURE__ */ (0,
|
|
34984
|
-
/* @__PURE__ */ (0,
|
|
35005
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
35006
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Keywords" }),
|
|
35007
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "space-y-3", children: [
|
|
35008
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
34985
35009
|
Badge2,
|
|
34986
35010
|
{
|
|
34987
35011
|
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",
|
|
@@ -34997,12 +35021,12 @@ var KeywordBundlesEdit = ({
|
|
|
34997
35021
|
},
|
|
34998
35022
|
children: [
|
|
34999
35023
|
keyword,
|
|
35000
|
-
/* @__PURE__ */ (0,
|
|
35024
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "ml-1 opacity-0 group-hover:opacity-100 transition-opacity", children: "\xD7" })
|
|
35001
35025
|
]
|
|
35002
35026
|
},
|
|
35003
35027
|
kIndex
|
|
35004
35028
|
)) }),
|
|
35005
|
-
/* @__PURE__ */ (0,
|
|
35029
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "flex gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
35006
35030
|
"input",
|
|
35007
35031
|
{
|
|
35008
35032
|
type: "text",
|
|
@@ -35026,9 +35050,9 @@ var KeywordBundlesEdit = ({
|
|
|
35026
35050
|
}
|
|
35027
35051
|
) })
|
|
35028
35052
|
] }),
|
|
35029
|
-
/* @__PURE__ */ (0,
|
|
35030
|
-
/* @__PURE__ */ (0,
|
|
35031
|
-
/* @__PURE__ */ (0,
|
|
35053
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex flex-col gap-1.5 mt-1", children: [
|
|
35054
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Priority Level (1-5)" }),
|
|
35055
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
35032
35056
|
"input",
|
|
35033
35057
|
{
|
|
35034
35058
|
type: "number",
|
|
@@ -35056,7 +35080,7 @@ var KeywordBundlesEdit = ({
|
|
|
35056
35080
|
var KeywordBundlesDisplay = ({ value }) => {
|
|
35057
35081
|
const bundles = Array.isArray(value) ? value : [];
|
|
35058
35082
|
if (bundles.length === 0)
|
|
35059
|
-
return /* @__PURE__ */ (0,
|
|
35083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "text-muted-foreground italic", children: "Not specified" });
|
|
35060
35084
|
const groups = {};
|
|
35061
35085
|
bundles.forEach((b) => {
|
|
35062
35086
|
const p = Number(b?.priority) || 1;
|
|
@@ -35065,11 +35089,11 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
35065
35089
|
groups[p].push(...keywords);
|
|
35066
35090
|
});
|
|
35067
35091
|
const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
|
|
35068
|
-
return /* @__PURE__ */ (0,
|
|
35092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "space-y-4 pt-1", children: sortedPriorities.map((priority) => {
|
|
35069
35093
|
const deduped = Array.from(new Set(groups[priority]));
|
|
35070
|
-
return /* @__PURE__ */ (0,
|
|
35071
|
-
/* @__PURE__ */ (0,
|
|
35072
|
-
/* @__PURE__ */ (0,
|
|
35094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "space-y-2", children: [
|
|
35095
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
35096
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
35073
35097
|
Badge2,
|
|
35074
35098
|
{
|
|
35075
35099
|
variant: "outline",
|
|
@@ -35080,9 +35104,9 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
35080
35104
|
]
|
|
35081
35105
|
}
|
|
35082
35106
|
),
|
|
35083
|
-
/* @__PURE__ */ (0,
|
|
35107
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "h-px flex-1 bg-gray-100/50" })
|
|
35084
35108
|
] }),
|
|
35085
|
-
/* @__PURE__ */ (0,
|
|
35109
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "flex flex-wrap gap-1.5", children: deduped.map((keyword) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
35086
35110
|
Badge2,
|
|
35087
35111
|
{
|
|
35088
35112
|
variant: "secondary",
|
|
@@ -35095,85 +35119,6 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
35095
35119
|
}) });
|
|
35096
35120
|
};
|
|
35097
35121
|
|
|
35098
|
-
// src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
|
|
35099
|
-
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
35100
|
-
var SEARCH_SPEC_FIELDS = [
|
|
35101
|
-
{
|
|
35102
|
-
key: "platforms",
|
|
35103
|
-
label: "Platforms",
|
|
35104
|
-
type: "select",
|
|
35105
|
-
// Changed to select for simplicity in form, or custom if multi-select needed
|
|
35106
|
-
placeholder: "Select platforms",
|
|
35107
|
-
options: ["Instagram", "YouTube", "TikTok"]
|
|
35108
|
-
},
|
|
35109
|
-
{
|
|
35110
|
-
key: "follower_range",
|
|
35111
|
-
label: "Follower Range",
|
|
35112
|
-
type: "slider",
|
|
35113
|
-
placeholder: "Not specified",
|
|
35114
|
-
sliderConfig: {
|
|
35115
|
-
min: 0,
|
|
35116
|
-
max: 5e6,
|
|
35117
|
-
step: 1e4,
|
|
35118
|
-
formatValue: (value) => {
|
|
35119
|
-
if (!value || typeof value !== "object") return "0 - 2.5M followers";
|
|
35120
|
-
const formatNum = (n) => {
|
|
35121
|
-
if (n >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
|
|
35122
|
-
if (n >= 1e3) return `${(n / 1e3).toFixed(0)}K`;
|
|
35123
|
-
return n.toLocaleString();
|
|
35124
|
-
};
|
|
35125
|
-
return `${formatNum(value.min || 0)} - ${formatNum(value.max || 25e5)} followers`;
|
|
35126
|
-
}
|
|
35127
|
-
}
|
|
35128
|
-
},
|
|
35129
|
-
{
|
|
35130
|
-
key: "geography",
|
|
35131
|
-
label: "Geography",
|
|
35132
|
-
type: "custom",
|
|
35133
|
-
renderEdit: (value, onChange) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(CountrySelectEdit, { value, onChange }),
|
|
35134
|
-
renderDisplay: (value) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(CountrySelectDisplay, { value })
|
|
35135
|
-
},
|
|
35136
|
-
{
|
|
35137
|
-
key: "keyword_bundles",
|
|
35138
|
-
label: "Keyword Bundles",
|
|
35139
|
-
type: "custom",
|
|
35140
|
-
renderEdit: (value, onChange) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(KeywordBundlesEdit, { value, onChange }),
|
|
35141
|
-
renderDisplay: (value) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(KeywordBundlesDisplay, { value })
|
|
35142
|
-
},
|
|
35143
|
-
{
|
|
35144
|
-
key: "desired_candidate_count",
|
|
35145
|
-
label: "Initial Creators",
|
|
35146
|
-
type: "number",
|
|
35147
|
-
numberConfig: {
|
|
35148
|
-
min: 1,
|
|
35149
|
-
formatValue: (value) => `${value || 0} creators`
|
|
35150
|
-
}
|
|
35151
|
-
}
|
|
35152
|
-
];
|
|
35153
|
-
var SearchSpecCard = import_react60.default.memo(
|
|
35154
|
-
({
|
|
35155
|
-
selectionStatus,
|
|
35156
|
-
isLatestMessage = true,
|
|
35157
|
-
className,
|
|
35158
|
-
...formCardProps
|
|
35159
|
-
}) => {
|
|
35160
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
35161
|
-
FormCard,
|
|
35162
|
-
{
|
|
35163
|
-
...formCardProps,
|
|
35164
|
-
title: formCardProps.title || "Creator Search Settings",
|
|
35165
|
-
fields: SEARCH_SPEC_FIELDS,
|
|
35166
|
-
className,
|
|
35167
|
-
footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1", children: [
|
|
35168
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(CircleCheck, { className: "h-4 w-4" }),
|
|
35169
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
|
|
35170
|
-
] }) : formCardProps.footer
|
|
35171
|
-
}
|
|
35172
|
-
);
|
|
35173
|
-
}
|
|
35174
|
-
);
|
|
35175
|
-
SearchSpecCard.displayName = "SearchSpecCard";
|
|
35176
|
-
|
|
35177
35122
|
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
35178
35123
|
var import_react61 = __toESM(require("react"), 1);
|
|
35179
35124
|
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
@@ -35221,7 +35166,7 @@ var MCQCard = import_react61.default.memo(
|
|
|
35221
35166
|
onClick: () => handleOptionClick(key),
|
|
35222
35167
|
className: cn(
|
|
35223
35168
|
"group relative flex items-start gap-4 p-4 rounded-2xl border transition-all duration-200 cursor-pointer",
|
|
35224
|
-
isSelected ? "border-
|
|
35169
|
+
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",
|
|
35225
35170
|
isLoading && "opacity-50 cursor-not-allowed"
|
|
35226
35171
|
),
|
|
35227
35172
|
children: [
|
|
@@ -35230,7 +35175,7 @@ var MCQCard = import_react61.default.memo(
|
|
|
35230
35175
|
{
|
|
35231
35176
|
className: cn(
|
|
35232
35177
|
"mt-1 w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors",
|
|
35233
|
-
isSelected ? "border-
|
|
35178
|
+
isSelected ? "border-[var(--primary-color)] bg-[var(--primary-color)]" : "border-gray-300 bg-white group-hover:border-gray-400"
|
|
35234
35179
|
),
|
|
35235
35180
|
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "w-1.5 h-1.5 rounded-full bg-white" })
|
|
35236
35181
|
}
|
|
@@ -35241,7 +35186,7 @@ var MCQCard = import_react61.default.memo(
|
|
|
35241
35186
|
{
|
|
35242
35187
|
className: cn(
|
|
35243
35188
|
"text-sm font-semibold transition-colors",
|
|
35244
|
-
isSelected ? "text-
|
|
35189
|
+
isSelected ? "text-[var(--foreground)]" : "text-gray700"
|
|
35245
35190
|
),
|
|
35246
35191
|
children: label
|
|
35247
35192
|
}
|
|
@@ -35362,7 +35307,7 @@ var CreatorProfileSummary = ({
|
|
|
35362
35307
|
"div",
|
|
35363
35308
|
{
|
|
35364
35309
|
className: cn(
|
|
35365
|
-
"flex items-center gap-4 p-
|
|
35310
|
+
"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",
|
|
35366
35311
|
className
|
|
35367
35312
|
),
|
|
35368
35313
|
children: [
|
|
@@ -35414,7 +35359,7 @@ var AudienceMetricCard = ({
|
|
|
35414
35359
|
Card,
|
|
35415
35360
|
{
|
|
35416
35361
|
className: cn(
|
|
35417
|
-
"bg-white border-
|
|
35362
|
+
"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",
|
|
35418
35363
|
className
|
|
35419
35364
|
),
|
|
35420
35365
|
children: [
|
|
@@ -37553,21 +37498,6 @@ var renderContextDependentError = (componentName, normalizedName, key) => {
|
|
|
37553
37498
|
key
|
|
37554
37499
|
);
|
|
37555
37500
|
};
|
|
37556
|
-
var renderNotFoundError = (componentName, key) => {
|
|
37557
|
-
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
37558
|
-
"div",
|
|
37559
|
-
{
|
|
37560
|
-
className: "p-3 border border-dashed border-red-500/50 text-red-500 text-xs rounded bg-red-50/30 my-2",
|
|
37561
|
-
children: [
|
|
37562
|
-
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "font-semibold", children: "\u274C Unknown Component:" }),
|
|
37563
|
-
" ",
|
|
37564
|
-
componentName,
|
|
37565
|
-
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-[10px] text-red-400 mt-1", children: "Component not found in Atoms, Molecules, or UI Components registry." })
|
|
37566
|
-
]
|
|
37567
|
-
},
|
|
37568
|
-
key
|
|
37569
|
-
);
|
|
37570
|
-
};
|
|
37571
37501
|
var normalizeProps = (props) => {
|
|
37572
37502
|
const normalized = {};
|
|
37573
37503
|
const dynamicStyle = {};
|
|
@@ -37663,7 +37593,7 @@ var PXEngineRenderer = ({
|
|
|
37663
37593
|
const uniqueKey = id || `${componentName}-${index || Math.random().toString(36).substr(2, 9)}`;
|
|
37664
37594
|
const normalizedName = componentName.charAt(0).toUpperCase() + componentName.slice(1);
|
|
37665
37595
|
const resolveComponent = (identifier) => {
|
|
37666
|
-
const normalized = identifier.charAt(0).toUpperCase() +
|
|
37596
|
+
const normalized = identifier.split(/[-_]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
37667
37597
|
const atomName2 = normalized.endsWith("Atom") ? normalized : `${normalized}Atom`;
|
|
37668
37598
|
let Comp = atoms_exports[atomName2] || atoms_exports[normalized] || atoms_exports[identifier];
|
|
37669
37599
|
if (!Comp) {
|
|
@@ -37693,7 +37623,6 @@ var PXEngineRenderer = ({
|
|
|
37693
37623
|
console.warn(
|
|
37694
37624
|
`[PXEngineRenderer] Component not found: ${componentName}`
|
|
37695
37625
|
);
|
|
37696
|
-
return renderNotFoundError(componentName, uniqueKey);
|
|
37697
37626
|
}
|
|
37698
37627
|
}
|
|
37699
37628
|
const resolvedNormalized = resolvedIdentifier.charAt(0).toUpperCase() + resolvedIdentifier.slice(1);
|
|
@@ -37728,7 +37657,16 @@ var PXEngineRenderer = ({
|
|
|
37728
37657
|
uniqueKey
|
|
37729
37658
|
);
|
|
37730
37659
|
} else {
|
|
37731
|
-
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
37660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
37661
|
+
TargetComponent,
|
|
37662
|
+
{
|
|
37663
|
+
...finalProps,
|
|
37664
|
+
style: finalStyle,
|
|
37665
|
+
onAction,
|
|
37666
|
+
children: Array.isArray(children) ? children.map((child, idx) => renderRecursive(child, idx)) : children
|
|
37667
|
+
},
|
|
37668
|
+
uniqueKey
|
|
37669
|
+
);
|
|
37732
37670
|
}
|
|
37733
37671
|
};
|
|
37734
37672
|
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
|
|
@@ -37775,7 +37713,6 @@ var PXEngineRenderer = ({
|
|
|
37775
37713
|
BreadcrumbSeparator,
|
|
37776
37714
|
Button,
|
|
37777
37715
|
ButtonAtom,
|
|
37778
|
-
CAMPAIGN_SEED_FIELDS,
|
|
37779
37716
|
Calendar,
|
|
37780
37717
|
CalendarAtom,
|
|
37781
37718
|
CampaignSeedCard,
|
|
@@ -37929,7 +37866,6 @@ var PXEngineRenderer = ({
|
|
|
37929
37866
|
ResizableAtom,
|
|
37930
37867
|
ResizablePanel,
|
|
37931
37868
|
ResizablePanelGroup,
|
|
37932
|
-
SEARCH_SPEC_FIELDS,
|
|
37933
37869
|
ScrollArea,
|
|
37934
37870
|
ScrollAreaAtom,
|
|
37935
37871
|
ScrollBar,
|