pxengine 0.1.101 → 0.1.103
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 +319 -246
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.mjs +319 -246
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -24692,7 +24692,7 @@ var LayoutAtom = ({
|
|
|
24692
24692
|
gapMap[gap],
|
|
24693
24693
|
className
|
|
24694
24694
|
);
|
|
24695
|
-
return /* @__PURE__ */ jsx5("div", { className: classes, children: children.map((child, index) => /* @__PURE__ */ jsx5(React2.Fragment, { children: renderComponent(child, index) }, child.id || `layout-item-${index}`)) });
|
|
24695
|
+
return /* @__PURE__ */ jsx5("div", { className: classes, children: (Array.isArray(children) ? children : []).map((child, index) => /* @__PURE__ */ jsx5(React2.Fragment, { children: renderComponent(child, index) }, child.id || `layout-item-${index}`)) });
|
|
24696
24696
|
};
|
|
24697
24697
|
|
|
24698
24698
|
// src/atoms/CardAtom.tsx
|
|
@@ -24789,8 +24789,8 @@ var CardAtom = ({
|
|
|
24789
24789
|
title && /* @__PURE__ */ jsx7(CardTitle, { className: "text-xl font-bold text-gray900", children: title }),
|
|
24790
24790
|
description && /* @__PURE__ */ jsx7(CardDescription, { children: description })
|
|
24791
24791
|
] }),
|
|
24792
|
-
/* @__PURE__ */ jsx7(CardContent, { className: "space-y-4", children: (children
|
|
24793
|
-
footer && footer.length > 0 && /* @__PURE__ */ jsx7(CardFooter, { className: "bg-gray50/50 border-t border-gray200 flex flex-wrap gap-2 pt-6", children: footer.map((footerChild, index) => /* @__PURE__ */ jsx7(React4.Fragment, { children: renderComponent(footerChild, index) }, footerChild.id || `card-footer-${index}`)) })
|
|
24792
|
+
/* @__PURE__ */ jsx7(CardContent, { className: "space-y-4", children: (Array.isArray(children) ? children : []).map((child, index) => /* @__PURE__ */ jsx7(React4.Fragment, { children: renderComponent(child, index) }, child.id || `card-content-${index}`)) }),
|
|
24793
|
+
Array.isArray(footer) && footer.length > 0 && /* @__PURE__ */ jsx7(CardFooter, { className: "bg-gray50/50 border-t border-gray200 flex flex-wrap gap-2 pt-6", children: footer.map((footerChild, index) => /* @__PURE__ */ jsx7(React4.Fragment, { children: renderComponent(footerChild, index) }, footerChild.id || `card-footer-${index}`)) })
|
|
24794
24794
|
]
|
|
24795
24795
|
}
|
|
24796
24796
|
);
|
|
@@ -25227,7 +25227,7 @@ var InputAtom = ({
|
|
|
25227
25227
|
children: /* @__PURE__ */ jsx17(SelectValue, { placeholder: placeholder || "Select option" })
|
|
25228
25228
|
}
|
|
25229
25229
|
),
|
|
25230
|
-
/* @__PURE__ */ jsx17(SelectContent, { className: "rounded-xl border-border shadow-xl", children: options
|
|
25230
|
+
/* @__PURE__ */ jsx17(SelectContent, { className: "rounded-xl border-border shadow-xl", children: (Array.isArray(options) ? options : []).map((opt) => /* @__PURE__ */ jsx17(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
25231
25231
|
]
|
|
25232
25232
|
}
|
|
25233
25233
|
);
|
|
@@ -25297,7 +25297,7 @@ var InputAtom = ({
|
|
|
25297
25297
|
className: cn("gap-2.5 bg-transparent", className),
|
|
25298
25298
|
style: remainingStyle,
|
|
25299
25299
|
onValueChange: isInteractive ? (val) => handleChange(val) : void 0,
|
|
25300
|
-
children: options
|
|
25300
|
+
children: (Array.isArray(options) ? options : []).map((opt) => /* @__PURE__ */ jsxs6("div", { className: "flex items-center space-x-3 bg-transparent", children: [
|
|
25301
25301
|
/* @__PURE__ */ jsx17(
|
|
25302
25302
|
RadioGroupItem,
|
|
25303
25303
|
{
|
|
@@ -25535,8 +25535,9 @@ var TabsAtom = ({
|
|
|
25535
25535
|
className,
|
|
25536
25536
|
renderComponent
|
|
25537
25537
|
}) => {
|
|
25538
|
+
const safeTabs = Array.isArray(tabs) ? tabs : [];
|
|
25538
25539
|
return /* @__PURE__ */ jsxs8(Tabs, { defaultValue, className: cn("w-full", className), children: [
|
|
25539
|
-
/* @__PURE__ */ jsx23(TabsList, { className: "bg-gray-100/50 p-1 rounded-xl", children:
|
|
25540
|
+
/* @__PURE__ */ jsx23(TabsList, { className: "bg-gray-100/50 p-1 rounded-xl", children: safeTabs.map((tab) => /* @__PURE__ */ jsx23(
|
|
25540
25541
|
TabsTrigger,
|
|
25541
25542
|
{
|
|
25542
25543
|
value: tab.value,
|
|
@@ -25545,7 +25546,7 @@ var TabsAtom = ({
|
|
|
25545
25546
|
},
|
|
25546
25547
|
tab.value
|
|
25547
25548
|
)) }),
|
|
25548
|
-
|
|
25549
|
+
safeTabs.map((tab) => /* @__PURE__ */ jsx23(TabsContent, { value: tab.value, className: "mt-4", children: (Array.isArray(tab.content) ? tab.content : []).map((child) => /* @__PURE__ */ jsx23(React17.Fragment, { children: renderComponent(child) }, child.id)) }, tab.value))
|
|
25549
25550
|
] });
|
|
25550
25551
|
};
|
|
25551
25552
|
|
|
@@ -25600,14 +25601,15 @@ var AccordionAtom = ({
|
|
|
25600
25601
|
className,
|
|
25601
25602
|
renderComponent
|
|
25602
25603
|
}) => {
|
|
25603
|
-
|
|
25604
|
+
const safeItems = Array.isArray(items) ? items : [];
|
|
25605
|
+
return /* @__PURE__ */ jsx25(Accordion, { type: "single", collapsible: true, className: cn("w-full", className), children: safeItems.map((item) => /* @__PURE__ */ jsxs10(
|
|
25604
25606
|
AccordionItem,
|
|
25605
25607
|
{
|
|
25606
25608
|
value: item.value,
|
|
25607
25609
|
className: "border-gray-100",
|
|
25608
25610
|
children: [
|
|
25609
25611
|
/* @__PURE__ */ jsx25(AccordionTrigger, { className: "text-sm font-semibold hover:no-underline hover:text-purple600 py-4", children: item.trigger }),
|
|
25610
|
-
/* @__PURE__ */ jsx25(AccordionContent, { children: /* @__PURE__ */ jsx25("div", { className: "pt-2 pb-4", children: item.content.map((child) => /* @__PURE__ */ jsx25(React19.Fragment, { children: renderComponent(child) }, child.id)) }) })
|
|
25612
|
+
/* @__PURE__ */ jsx25(AccordionContent, { children: /* @__PURE__ */ jsx25("div", { className: "pt-2 pb-4", children: (Array.isArray(item.content) ? item.content : []).map((child) => /* @__PURE__ */ jsx25(React19.Fragment, { children: renderComponent(child) }, child.id)) }) })
|
|
25611
25613
|
]
|
|
25612
25614
|
},
|
|
25613
25615
|
item.value
|
|
@@ -26042,7 +26044,7 @@ var ScrollAreaAtom = ({
|
|
|
26042
26044
|
className: cn("rounded-xl border", className),
|
|
26043
26045
|
style: { height: maxHeight },
|
|
26044
26046
|
children: [
|
|
26045
|
-
/* @__PURE__ */ jsx37("div", { className: "p-4", children: children.map((child) => /* @__PURE__ */ jsx37(React25.Fragment, { children: renderComponent(child) }, child.id)) }),
|
|
26047
|
+
/* @__PURE__ */ jsx37("div", { className: "p-4", children: (Array.isArray(children) ? children : []).map((child) => /* @__PURE__ */ jsx37(React25.Fragment, { children: renderComponent(child) }, child.id)) }),
|
|
26046
26048
|
/* @__PURE__ */ jsx37(ScrollBar, { orientation: "vertical" })
|
|
26047
26049
|
]
|
|
26048
26050
|
}
|
|
@@ -26245,8 +26247,9 @@ var CarouselAtom = ({
|
|
|
26245
26247
|
className,
|
|
26246
26248
|
renderComponent
|
|
26247
26249
|
}) => {
|
|
26250
|
+
const safeItems = Array.isArray(items) ? items : [];
|
|
26248
26251
|
return /* @__PURE__ */ jsxs16(Carousel, { className: cn("w-full max-w-xs mx-auto", className), children: [
|
|
26249
|
-
/* @__PURE__ */ jsx39(CarouselContent, { children:
|
|
26252
|
+
/* @__PURE__ */ jsx39(CarouselContent, { children: safeItems.map((slide, index) => /* @__PURE__ */ jsx39(CarouselItem, { children: /* @__PURE__ */ jsx39("div", { className: "p-1", children: (Array.isArray(slide) ? slide : []).map((child) => /* @__PURE__ */ jsx39(React27.Fragment, { children: renderComponent(child) }, child.id)) }) }, index)) }),
|
|
26250
26253
|
/* @__PURE__ */ jsx39(CarouselPrevious, {}),
|
|
26251
26254
|
/* @__PURE__ */ jsx39(CarouselNext, {})
|
|
26252
26255
|
] });
|
|
@@ -26267,7 +26270,7 @@ var AspectRatioAtom = ({
|
|
|
26267
26270
|
className,
|
|
26268
26271
|
renderComponent
|
|
26269
26272
|
}) => {
|
|
26270
|
-
return /* @__PURE__ */ jsx40("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx40(AspectRatio, { ratio, children: children.map((child) => /* @__PURE__ */ jsx40(React28.Fragment, { children: renderComponent(child) }, child.id)) }) });
|
|
26273
|
+
return /* @__PURE__ */ jsx40("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx40(AspectRatio, { ratio, children: (Array.isArray(children) ? children : []).map((child) => /* @__PURE__ */ jsx40(React28.Fragment, { children: renderComponent(child) }, child.id)) }) });
|
|
26271
26274
|
};
|
|
26272
26275
|
|
|
26273
26276
|
// src/atoms/CollapsibleAtom.tsx
|
|
@@ -26294,8 +26297,8 @@ var CollapsibleAtom = ({
|
|
|
26294
26297
|
defaultOpen,
|
|
26295
26298
|
className: cn("w-full space-y-2", className),
|
|
26296
26299
|
children: [
|
|
26297
|
-
/* @__PURE__ */ jsx41(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsx41("div", { className: "flex items-center justify-between space-x-4 px-4 py-2 bg-gray-50 rounded-lg cursor-pointer hover:bg-gray-100 transition-colors", children: trigger.map((child) => /* @__PURE__ */ jsx41(React29.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26298
|
-
/* @__PURE__ */ jsx41(CollapsibleContent2, { className: "space-y-2", children: content.map((child) => /* @__PURE__ */ jsx41(React29.Fragment, { children: renderComponent(child) }, child.id)) })
|
|
26300
|
+
/* @__PURE__ */ jsx41(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsx41("div", { className: "flex items-center justify-between space-x-4 px-4 py-2 bg-gray-50 rounded-lg cursor-pointer hover:bg-gray-100 transition-colors", children: (Array.isArray(trigger) ? trigger : []).map((child) => /* @__PURE__ */ jsx41(React29.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26301
|
+
/* @__PURE__ */ jsx41(CollapsibleContent2, { className: "space-y-2", children: (Array.isArray(content) ? content : []).map((child) => /* @__PURE__ */ jsx41(React29.Fragment, { children: renderComponent(child) }, child.id)) })
|
|
26299
26302
|
]
|
|
26300
26303
|
}
|
|
26301
26304
|
);
|
|
@@ -26334,7 +26337,7 @@ var TooltipAtom = ({
|
|
|
26334
26337
|
renderComponent
|
|
26335
26338
|
}) => {
|
|
26336
26339
|
return /* @__PURE__ */ jsx43(TooltipProvider, { children: /* @__PURE__ */ jsxs18(Tooltip, { children: [
|
|
26337
|
-
/* @__PURE__ */ jsx43(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx43("div", { className: cn("inline-block", className), children: children.map((child) => /* @__PURE__ */ jsx43(React31.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26340
|
+
/* @__PURE__ */ jsx43(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx43("div", { className: cn("inline-block", className), children: (Array.isArray(children) ? children : []).map((child) => /* @__PURE__ */ jsx43(React31.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26338
26341
|
/* @__PURE__ */ jsx43(TooltipContent, { className: "bg-gray-900 text-white border-none rounded-lg shadow-xl px-3 py-1.5 text-xs", children: content })
|
|
26339
26342
|
] }) });
|
|
26340
26343
|
};
|
|
@@ -26372,8 +26375,8 @@ var PopoverAtom = ({
|
|
|
26372
26375
|
renderComponent
|
|
26373
26376
|
}) => {
|
|
26374
26377
|
return /* @__PURE__ */ jsxs19(Popover, { children: [
|
|
26375
|
-
/* @__PURE__ */ jsx45(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx45("div", { className: cn("inline-block cursor-pointer", className), children: trigger.map((child) => /* @__PURE__ */ jsx45(React33.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26376
|
-
/* @__PURE__ */ jsx45(PopoverContent, { className: "w-80 rounded-2xl shadow-2xl border-gray-100 p-4 bg-white/95 backdrop-blur-sm", children: content.map((child) => /* @__PURE__ */ jsx45(React33.Fragment, { children: renderComponent(child) }, child.id)) })
|
|
26378
|
+
/* @__PURE__ */ jsx45(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx45("div", { className: cn("inline-block cursor-pointer", className), children: (Array.isArray(trigger) ? trigger : []).map((child) => /* @__PURE__ */ jsx45(React33.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26379
|
+
/* @__PURE__ */ jsx45(PopoverContent, { className: "w-80 rounded-2xl shadow-2xl border-gray-100 p-4 bg-white/95 backdrop-blur-sm", children: (Array.isArray(content) ? content : []).map((child) => /* @__PURE__ */ jsx45(React33.Fragment, { children: renderComponent(child) }, child.id)) })
|
|
26377
26380
|
] });
|
|
26378
26381
|
};
|
|
26379
26382
|
|
|
@@ -26484,14 +26487,14 @@ var DialogAtom = ({
|
|
|
26484
26487
|
renderComponent
|
|
26485
26488
|
}) => {
|
|
26486
26489
|
return /* @__PURE__ */ jsxs21(Dialog, { children: [
|
|
26487
|
-
/* @__PURE__ */ jsx47(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx47("div", { className: cn("inline-block cursor-pointer", className), children: trigger.map((child) => /* @__PURE__ */ jsx47(React35.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26490
|
+
/* @__PURE__ */ jsx47(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx47("div", { className: cn("inline-block cursor-pointer", className), children: (Array.isArray(trigger) ? trigger : []).map((child) => /* @__PURE__ */ jsx47(React35.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26488
26491
|
/* @__PURE__ */ jsxs21(DialogContent, { className: "sm:max-w-[425px] rounded-3xl p-6 bg-white/95 backdrop-blur-md shadow-3xl border-gray-100", children: [
|
|
26489
26492
|
/* @__PURE__ */ jsxs21(DialogHeader, { children: [
|
|
26490
26493
|
/* @__PURE__ */ jsx47(DialogTitle, { className: "text-xl font-bold bg-gradient-to-r from-purple600 to-indigo-600 bg-clip-text text-transparent", children: title }),
|
|
26491
26494
|
description && /* @__PURE__ */ jsx47(DialogDescription, { className: "text-gray-500 font-medium pt-1", children: description })
|
|
26492
26495
|
] }),
|
|
26493
|
-
/* @__PURE__ */ jsx47("div", { className: "py-4", children: children.map((child) => /* @__PURE__ */ jsx47(React35.Fragment, { children: renderComponent(child) }, child.id)) }),
|
|
26494
|
-
footer && /* @__PURE__ */ jsx47(DialogFooter, { className: "pt-2", children: footer.map((child) => /* @__PURE__ */ jsx47(React35.Fragment, { children: renderComponent(child) }, child.id)) })
|
|
26496
|
+
/* @__PURE__ */ jsx47("div", { className: "py-4", children: (Array.isArray(children) ? children : []).map((child) => /* @__PURE__ */ jsx47(React35.Fragment, { children: renderComponent(child) }, child.id)) }),
|
|
26497
|
+
footer && /* @__PURE__ */ jsx47(DialogFooter, { className: "pt-2", children: (Array.isArray(footer) ? footer : []).map((child) => /* @__PURE__ */ jsx47(React35.Fragment, { children: renderComponent(child) }, child.id)) })
|
|
26495
26498
|
] })
|
|
26496
26499
|
] });
|
|
26497
26500
|
};
|
|
@@ -26615,7 +26618,7 @@ var SheetAtom = ({
|
|
|
26615
26618
|
renderComponent
|
|
26616
26619
|
}) => {
|
|
26617
26620
|
return /* @__PURE__ */ jsxs23(Sheet2, { children: [
|
|
26618
|
-
/* @__PURE__ */ jsx49(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx49("div", { className: cn("inline-block cursor-pointer", className), children: trigger.map((child) => /* @__PURE__ */ jsx49(React37.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26621
|
+
/* @__PURE__ */ jsx49(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx49("div", { className: cn("inline-block cursor-pointer", className), children: (Array.isArray(trigger) ? trigger : []).map((child) => /* @__PURE__ */ jsx49(React37.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26619
26622
|
/* @__PURE__ */ jsxs23(
|
|
26620
26623
|
SheetContent,
|
|
26621
26624
|
{
|
|
@@ -26626,8 +26629,8 @@ var SheetAtom = ({
|
|
|
26626
26629
|
/* @__PURE__ */ jsx49(SheetTitle, { className: "text-xl font-bold text-gray-900", children: title }),
|
|
26627
26630
|
description && /* @__PURE__ */ jsx49(SheetDescription, { className: "text-gray-500 font-medium", children: description })
|
|
26628
26631
|
] }),
|
|
26629
|
-
/* @__PURE__ */ jsx49("div", { className: "py-8", children: children.map((child) => /* @__PURE__ */ jsx49(React37.Fragment, { children: renderComponent(child) }, child.id)) }),
|
|
26630
|
-
footer && /* @__PURE__ */ jsx49(SheetFooter, { className: "absolute bottom-6 left-6 right-6", children: footer.map((child) => /* @__PURE__ */ jsx49(React37.Fragment, { children: renderComponent(child) }, child.id)) })
|
|
26632
|
+
/* @__PURE__ */ jsx49("div", { className: "py-8", children: (Array.isArray(children) ? children : []).map((child) => /* @__PURE__ */ jsx49(React37.Fragment, { children: renderComponent(child) }, child.id)) }),
|
|
26633
|
+
footer && /* @__PURE__ */ jsx49(SheetFooter, { className: "absolute bottom-6 left-6 right-6", children: (Array.isArray(footer) ? footer : []).map((child) => /* @__PURE__ */ jsx49(React37.Fragment, { children: renderComponent(child) }, child.id)) })
|
|
26631
26634
|
]
|
|
26632
26635
|
}
|
|
26633
26636
|
)
|
|
@@ -26754,7 +26757,7 @@ var AlertDialogAtom = ({
|
|
|
26754
26757
|
renderComponent
|
|
26755
26758
|
}) => {
|
|
26756
26759
|
return /* @__PURE__ */ jsxs25(AlertDialog, { children: [
|
|
26757
|
-
/* @__PURE__ */ jsx51(AlertDialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx51("div", { className: cn("inline-block cursor-pointer", className), children: trigger.map((child) => /* @__PURE__ */ jsx51(React39.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26760
|
+
/* @__PURE__ */ jsx51(AlertDialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx51("div", { className: cn("inline-block cursor-pointer", className), children: (Array.isArray(trigger) ? trigger : []).map((child) => /* @__PURE__ */ jsx51(React39.Fragment, { children: renderComponent(child) }, child.id)) }) }),
|
|
26758
26761
|
/* @__PURE__ */ jsxs25(AlertDialogContent, { className: "rounded-3xl p-6 bg-white shadow-3xl border-gray-100", children: [
|
|
26759
26762
|
/* @__PURE__ */ jsxs25(AlertDialogHeader, { children: [
|
|
26760
26763
|
/* @__PURE__ */ jsx51(AlertDialogTitle, { className: "text-lg font-bold text-gray-900", children: title }),
|
|
@@ -26868,9 +26871,10 @@ var BreadcrumbAtom = ({
|
|
|
26868
26871
|
items,
|
|
26869
26872
|
className
|
|
26870
26873
|
}) => {
|
|
26871
|
-
|
|
26874
|
+
const safeItems = Array.isArray(items) ? items : [];
|
|
26875
|
+
return /* @__PURE__ */ jsx53(Breadcrumb, { className, children: /* @__PURE__ */ jsx53(BreadcrumbList, { children: safeItems.map((item, index) => /* @__PURE__ */ jsxs27(React41.Fragment, { children: [
|
|
26872
26876
|
/* @__PURE__ */ jsx53(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsx53(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx53(BreadcrumbLink, { href: item.href || "#", children: item.label }) }),
|
|
26873
|
-
index <
|
|
26877
|
+
index < safeItems.length - 1 && /* @__PURE__ */ jsx53(BreadcrumbSeparator, {})
|
|
26874
26878
|
] }, index)) }) });
|
|
26875
26879
|
};
|
|
26876
26880
|
|
|
@@ -31830,6 +31834,7 @@ var CommandAtom = ({
|
|
|
31830
31834
|
groups,
|
|
31831
31835
|
className
|
|
31832
31836
|
}) => {
|
|
31837
|
+
const safeGroups = Array.isArray(groups) ? groups : [];
|
|
31833
31838
|
return /* @__PURE__ */ jsx60(
|
|
31834
31839
|
"div",
|
|
31835
31840
|
{
|
|
@@ -31841,9 +31846,9 @@ var CommandAtom = ({
|
|
|
31841
31846
|
/* @__PURE__ */ jsx60(CommandInput, { placeholder }),
|
|
31842
31847
|
/* @__PURE__ */ jsxs31(CommandList, { children: [
|
|
31843
31848
|
/* @__PURE__ */ jsx60(CommandEmpty, { children: "No results found." }),
|
|
31844
|
-
|
|
31845
|
-
/* @__PURE__ */ jsx60(CommandGroup, { heading: group.heading, children: group.items.map((item, j) => /* @__PURE__ */ jsx60(CommandItem, { value: item.value, children: /* @__PURE__ */ jsx60("span", { children: item.label }) }, j)) }),
|
|
31846
|
-
i <
|
|
31849
|
+
safeGroups.map((group, i) => /* @__PURE__ */ jsxs31(React72.Fragment, { children: [
|
|
31850
|
+
/* @__PURE__ */ jsx60(CommandGroup, { heading: group.heading, children: (Array.isArray(group.items) ? group.items : []).map((item, j) => /* @__PURE__ */ jsx60(CommandItem, { value: item.value, children: /* @__PURE__ */ jsx60("span", { children: item.label }) }, j)) }),
|
|
31851
|
+
i < safeGroups.length - 1 && /* @__PURE__ */ jsx60(CommandSeparator, {})
|
|
31847
31852
|
] }, i))
|
|
31848
31853
|
] })
|
|
31849
31854
|
] })
|
|
@@ -32031,7 +32036,7 @@ var FormSelectAtom = ({
|
|
|
32031
32036
|
label && /* @__PURE__ */ jsx63(FormLabel, { children: label }),
|
|
32032
32037
|
/* @__PURE__ */ jsxs33(Select, { onValueChange: field.onChange, defaultValue: field.value, children: [
|
|
32033
32038
|
/* @__PURE__ */ jsx63(FormControl, { children: /* @__PURE__ */ jsx63(SelectTrigger, { id: id || `form-select-${fieldName}`, children: /* @__PURE__ */ jsx63(SelectValue, { placeholder }) }) }),
|
|
32034
|
-
/* @__PURE__ */ jsx63(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx63(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
32039
|
+
/* @__PURE__ */ jsx63(SelectContent, { children: (Array.isArray(options) ? options : []).map((option) => /* @__PURE__ */ jsx63(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
32035
32040
|
] }),
|
|
32036
32041
|
description && /* @__PURE__ */ jsx63(FormDescription, { children: description }),
|
|
32037
32042
|
/* @__PURE__ */ jsx63(FormMessage, {})
|
|
@@ -32326,6 +32331,7 @@ var SliderAtom = ({
|
|
|
32326
32331
|
import { jsx as jsx72, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
32327
32332
|
var RadioGroupAtom = ({ id, label, options, defaultValue, disabled, className, style, onValueChange }) => {
|
|
32328
32333
|
const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
|
|
32334
|
+
const safeOptions = Array.isArray(options) ? options : [];
|
|
32329
32335
|
return /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
32330
32336
|
label && /* @__PURE__ */ jsx72(
|
|
32331
32337
|
Label,
|
|
@@ -32345,7 +32351,7 @@ var RadioGroupAtom = ({ id, label, options, defaultValue, disabled, className, s
|
|
|
32345
32351
|
className: cn("grid gap-2", className),
|
|
32346
32352
|
style,
|
|
32347
32353
|
"data-px-styled": hasPxVars ? "" : void 0,
|
|
32348
|
-
children:
|
|
32354
|
+
children: safeOptions.map((option) => /* @__PURE__ */ jsxs39("div", { className: "flex items-center space-x-2", children: [
|
|
32349
32355
|
/* @__PURE__ */ jsx72(
|
|
32350
32356
|
RadioGroupItem,
|
|
32351
32357
|
{
|
|
@@ -32549,6 +32555,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
32549
32555
|
// src/atoms/DropdownMenuAtom.tsx
|
|
32550
32556
|
import { jsx as jsx75, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
32551
32557
|
var DropdownMenuAtom = ({ trigger, items, className, onAction }) => {
|
|
32558
|
+
const safeItems = Array.isArray(items) ? items : [];
|
|
32552
32559
|
return /* @__PURE__ */ jsxs42(DropdownMenu, { children: [
|
|
32553
32560
|
/* @__PURE__ */ jsx75(DropdownMenuTrigger, { asChild: true, children: trigger }),
|
|
32554
32561
|
/* @__PURE__ */ jsx75(
|
|
@@ -32558,7 +32565,7 @@ var DropdownMenuAtom = ({ trigger, items, className, onAction }) => {
|
|
|
32558
32565
|
"w-56 bg-white/80 backdrop-blur-md border-purple-100",
|
|
32559
32566
|
className
|
|
32560
32567
|
),
|
|
32561
|
-
children:
|
|
32568
|
+
children: safeItems.map((item) => {
|
|
32562
32569
|
const Icon3 = item.icon ? lucide_react_exports[item.icon] : null;
|
|
32563
32570
|
return /* @__PURE__ */ jsxs42(
|
|
32564
32571
|
DropdownMenuItem,
|
|
@@ -32721,6 +32728,7 @@ ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
|
32721
32728
|
// src/atoms/ContextMenuAtom.tsx
|
|
32722
32729
|
import { jsx as jsx77, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
32723
32730
|
var ContextMenuAtom = ({ trigger, items, className, onAction }) => {
|
|
32731
|
+
const safeItems = Array.isArray(items) ? items : [];
|
|
32724
32732
|
return /* @__PURE__ */ jsxs44(ContextMenu, { children: [
|
|
32725
32733
|
/* @__PURE__ */ jsx77(ContextMenuTrigger, { asChild: true, children: trigger }),
|
|
32726
32734
|
/* @__PURE__ */ jsx77(
|
|
@@ -32730,7 +32738,7 @@ var ContextMenuAtom = ({ trigger, items, className, onAction }) => {
|
|
|
32730
32738
|
"w-64 bg-white/80 backdrop-blur-md border-purple-100",
|
|
32731
32739
|
className
|
|
32732
32740
|
),
|
|
32733
|
-
children:
|
|
32741
|
+
children: safeItems.map((item) => {
|
|
32734
32742
|
const Icon3 = item.icon ? lucide_react_exports[item.icon] : null;
|
|
32735
32743
|
return /* @__PURE__ */ jsxs44(
|
|
32736
32744
|
ContextMenuItem,
|
|
@@ -32912,6 +32920,7 @@ var InputOTPAtom = ({ length, className, onChange }) => {
|
|
|
32912
32920
|
import React78 from "react";
|
|
32913
32921
|
import { jsx as jsx81, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
32914
32922
|
var KbdAtom = ({ keys, className }) => {
|
|
32923
|
+
const safeKeys = Array.isArray(keys) ? keys : [];
|
|
32915
32924
|
return /* @__PURE__ */ jsx81(
|
|
32916
32925
|
"kbd",
|
|
32917
32926
|
{
|
|
@@ -32919,9 +32928,9 @@ var KbdAtom = ({ keys, className }) => {
|
|
|
32919
32928
|
"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",
|
|
32920
32929
|
className
|
|
32921
32930
|
),
|
|
32922
|
-
children:
|
|
32931
|
+
children: safeKeys.map((key, i) => /* @__PURE__ */ jsxs48(React78.Fragment, { children: [
|
|
32923
32932
|
/* @__PURE__ */ jsx81("span", { className: "text-xs", children: key }),
|
|
32924
|
-
i <
|
|
32933
|
+
i < safeKeys.length - 1 && /* @__PURE__ */ jsx81("span", { children: "+" })
|
|
32925
32934
|
] }, i))
|
|
32926
32935
|
}
|
|
32927
32936
|
);
|
|
@@ -32969,6 +32978,7 @@ var ResizableAtom = ({
|
|
|
32969
32978
|
renderComponent
|
|
32970
32979
|
}) => {
|
|
32971
32980
|
const Group7 = ResizablePanelGroup;
|
|
32981
|
+
const safePanels = Array.isArray(panels) ? panels : [];
|
|
32972
32982
|
return /* @__PURE__ */ jsx83(
|
|
32973
32983
|
Group7,
|
|
32974
32984
|
{
|
|
@@ -32977,15 +32987,15 @@ var ResizableAtom = ({
|
|
|
32977
32987
|
"min-h-[200px] w-full rounded-lg border border-purple-100",
|
|
32978
32988
|
className
|
|
32979
32989
|
),
|
|
32980
|
-
children:
|
|
32981
|
-
/* @__PURE__ */ jsx83(ResizablePanel, { defaultSize: panel.defaultSize, className: "p-4", children: panel.children.map((child, childIdx) => /* @__PURE__ */ jsx83(
|
|
32990
|
+
children: safePanels.map((panel, i) => /* @__PURE__ */ jsxs49(React79.Fragment, { children: [
|
|
32991
|
+
/* @__PURE__ */ jsx83(ResizablePanel, { defaultSize: panel.defaultSize, className: "p-4", children: (Array.isArray(panel.children) ? panel.children : []).map((child, childIdx) => /* @__PURE__ */ jsx83(
|
|
32982
32992
|
React79.Fragment,
|
|
32983
32993
|
{
|
|
32984
32994
|
children: renderComponent(child)
|
|
32985
32995
|
},
|
|
32986
32996
|
child.id || `resizable-child-${i}-${childIdx}`
|
|
32987
32997
|
)) }),
|
|
32988
|
-
i <
|
|
32998
|
+
i < safePanels.length - 1 && /* @__PURE__ */ jsx83(ResizableHandle, { withHandle: true })
|
|
32989
32999
|
] }, i))
|
|
32990
33000
|
}
|
|
32991
33001
|
);
|
|
@@ -33526,6 +33536,7 @@ var TimelineAtom = ({
|
|
|
33526
33536
|
items,
|
|
33527
33537
|
className
|
|
33528
33538
|
}) => {
|
|
33539
|
+
const safeItems = Array.isArray(items) ? items : [];
|
|
33529
33540
|
return /* @__PURE__ */ jsx88(
|
|
33530
33541
|
"div",
|
|
33531
33542
|
{
|
|
@@ -33533,7 +33544,7 @@ var TimelineAtom = ({
|
|
|
33533
33544
|
"space-y-6 relative before:absolute before:inset-0 before:ml-5 before:-translate-x-px before:h-full before:w-0.5 before:bg-gradient-to-b before:from-purple-500 before:via-indigo-500 before:to-gray-200 before:pointer-events-none",
|
|
33534
33545
|
className
|
|
33535
33546
|
),
|
|
33536
|
-
children:
|
|
33547
|
+
children: safeItems.map((item, i) => {
|
|
33537
33548
|
const Icon3 = item.icon ? lucide_react_exports[item.icon] : null;
|
|
33538
33549
|
const isCompleted = item.status === "completed";
|
|
33539
33550
|
const isActive = item.status === "active";
|
|
@@ -34231,7 +34242,7 @@ var EditableField = React86.memo(
|
|
|
34231
34242
|
if (!value) {
|
|
34232
34243
|
return /* @__PURE__ */ jsx94("span", { className: "opacity-0", children: "-" });
|
|
34233
34244
|
}
|
|
34234
|
-
return value.
|
|
34245
|
+
return typeof value === "object" ? JSON.stringify(value) : String(value ?? "");
|
|
34235
34246
|
};
|
|
34236
34247
|
return /* @__PURE__ */ jsxs56(
|
|
34237
34248
|
"div",
|
|
@@ -34340,7 +34351,7 @@ var ActionButton = React87.memo(
|
|
|
34340
34351
|
setTimeLeft((prev) => {
|
|
34341
34352
|
if (prev <= 1) {
|
|
34342
34353
|
clearInterval(timer);
|
|
34343
|
-
onProceed();
|
|
34354
|
+
onProceed?.();
|
|
34344
34355
|
return 0;
|
|
34345
34356
|
}
|
|
34346
34357
|
return prev - 1;
|
|
@@ -34356,7 +34367,7 @@ var ActionButton = React87.memo(
|
|
|
34356
34367
|
variant,
|
|
34357
34368
|
size,
|
|
34358
34369
|
disabled: disabled || isLoading,
|
|
34359
|
-
onClick: onProceed,
|
|
34370
|
+
onClick: () => onProceed?.(),
|
|
34360
34371
|
className: cn(
|
|
34361
34372
|
"relative min-w-[140px] overflow-hidden group transition-all duration-300",
|
|
34362
34373
|
"bg-[var(--primary-color)] hover:opacity-90 text-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%)]",
|
|
@@ -34682,7 +34693,7 @@ var DynamicFormCard = React89.memo(
|
|
|
34682
34693
|
...rest
|
|
34683
34694
|
}) => {
|
|
34684
34695
|
const fields = useMemo4(
|
|
34685
|
-
() => providedFields
|
|
34696
|
+
() => Array.isArray(providedFields) ? providedFields : generateFieldsFromData(data),
|
|
34686
34697
|
[providedFields, data]
|
|
34687
34698
|
);
|
|
34688
34699
|
const handleProceed = () => {
|
|
@@ -34754,7 +34765,7 @@ var StatsGrid = ({
|
|
|
34754
34765
|
{
|
|
34755
34766
|
id: `stat-label-${index}`,
|
|
34756
34767
|
type: "text",
|
|
34757
|
-
content: item.label,
|
|
34768
|
+
content: typeof item.label === "object" ? JSON.stringify(item.label) : String(item.label ?? ""),
|
|
34758
34769
|
variant: "small",
|
|
34759
34770
|
className: cn(!hasPxVars && "text-muted-foreground", "font-medium tracking-wide uppercase text-[10px]"),
|
|
34760
34771
|
style: textColor ? { color: textColor } : void 0
|
|
@@ -34794,7 +34805,7 @@ var StatsGrid = ({
|
|
|
34794
34805
|
),
|
|
34795
34806
|
children: [
|
|
34796
34807
|
TrendIcon && /* @__PURE__ */ jsx98(TrendIcon, { className: "w-3 h-3 mr-0.5" }),
|
|
34797
|
-
item.trend
|
|
34808
|
+
typeof item.trend === "object" ? JSON.stringify(item.trend) : String(item.trend ?? "")
|
|
34798
34809
|
]
|
|
34799
34810
|
}
|
|
34800
34811
|
)
|
|
@@ -34906,6 +34917,7 @@ var LoadingOverlay = ({
|
|
|
34906
34917
|
// src/molecules/generic/FilterBar/FilterBar.tsx
|
|
34907
34918
|
import { jsx as jsx101, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
34908
34919
|
var FilterBar = ({ filters, showSearch = true, className, onFilterToggle, onSearch }) => {
|
|
34920
|
+
const safeFilters = Array.isArray(filters) ? filters : [];
|
|
34909
34921
|
return /* @__PURE__ */ jsxs62(
|
|
34910
34922
|
"div",
|
|
34911
34923
|
{
|
|
@@ -34925,7 +34937,7 @@ var FilterBar = ({ filters, showSearch = true, className, onFilterToggle, onSear
|
|
|
34925
34937
|
}
|
|
34926
34938
|
)
|
|
34927
34939
|
] }),
|
|
34928
|
-
/* @__PURE__ */ jsx101("div", { className: "flex flex-wrap gap-2", children:
|
|
34940
|
+
/* @__PURE__ */ jsx101("div", { className: "flex flex-wrap gap-2", children: safeFilters.map((filter) => /* @__PURE__ */ jsx101(
|
|
34929
34941
|
Badge2,
|
|
34930
34942
|
{
|
|
34931
34943
|
variant: filter.active ? "default" : "outline",
|
|
@@ -35025,7 +35037,8 @@ var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }
|
|
|
35025
35037
|
// src/molecules/generic/TagCloud/TagCloud.tsx
|
|
35026
35038
|
import { jsx as jsx103, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
35027
35039
|
var TagCloud = ({ tags = [], className, onTagClick }) => {
|
|
35028
|
-
const
|
|
35040
|
+
const safeTags = Array.isArray(tags) ? tags : [];
|
|
35041
|
+
const normalizedTags = safeTags.map(
|
|
35029
35042
|
(t) => typeof t === "string" ? { label: t, value: t } : t
|
|
35030
35043
|
);
|
|
35031
35044
|
return /* @__PURE__ */ jsx103("div", { className: cn("flex flex-wrap gap-3.5", className), children: normalizedTags.map((tag) => /* @__PURE__ */ jsxs64(
|
|
@@ -35051,6 +35064,8 @@ var DataGrid = ({
|
|
|
35051
35064
|
pageSize = 10,
|
|
35052
35065
|
className
|
|
35053
35066
|
}) => {
|
|
35067
|
+
const safeColumns = Array.isArray(columns) ? columns : [];
|
|
35068
|
+
const safeData = Array.isArray(data) ? data : [];
|
|
35054
35069
|
const renderCell = (item, column) => {
|
|
35055
35070
|
const value = item[column.accessorKey];
|
|
35056
35071
|
switch (column.type) {
|
|
@@ -35060,7 +35075,7 @@ var DataGrid = ({
|
|
|
35060
35075
|
{
|
|
35061
35076
|
variant: "secondary",
|
|
35062
35077
|
className: "bg-purple-50 text-purple-700 border-purple-100",
|
|
35063
|
-
children: value
|
|
35078
|
+
children: typeof value === "object" ? JSON.stringify(value) : String(value ?? "")
|
|
35064
35079
|
}
|
|
35065
35080
|
);
|
|
35066
35081
|
case "avatar":
|
|
@@ -35074,9 +35089,9 @@ var DataGrid = ({
|
|
|
35074
35089
|
case "date":
|
|
35075
35090
|
return /* @__PURE__ */ jsx104("span", { className: "text-muted-foreground", children: new Date(value).toLocaleDateString() });
|
|
35076
35091
|
case "number":
|
|
35077
|
-
return /* @__PURE__ */ jsx104("span", { className: "font-mono font-medium", children: value.toLocaleString() });
|
|
35092
|
+
return /* @__PURE__ */ jsx104("span", { className: "font-mono font-medium", children: Number(value ?? 0).toLocaleString() });
|
|
35078
35093
|
default:
|
|
35079
|
-
return /* @__PURE__ */ jsx104("span", { children: value });
|
|
35094
|
+
return /* @__PURE__ */ jsx104("span", { children: typeof value === "object" ? JSON.stringify(value) : String(value ?? "") });
|
|
35080
35095
|
}
|
|
35081
35096
|
};
|
|
35082
35097
|
return /* @__PURE__ */ jsx104(
|
|
@@ -35087,7 +35102,7 @@ var DataGrid = ({
|
|
|
35087
35102
|
className
|
|
35088
35103
|
),
|
|
35089
35104
|
children: /* @__PURE__ */ jsxs65(Table3, { children: [
|
|
35090
|
-
/* @__PURE__ */ jsx104(TableHeader, { className: "bg-gray-50/50", children: /* @__PURE__ */ jsx104(TableRow, { children:
|
|
35105
|
+
/* @__PURE__ */ jsx104(TableHeader, { className: "bg-gray-50/50", children: /* @__PURE__ */ jsx104(TableRow, { children: safeColumns.map((col) => /* @__PURE__ */ jsx104(
|
|
35091
35106
|
TableHead,
|
|
35092
35107
|
{
|
|
35093
35108
|
className: "font-bold text-gray-900 h-12",
|
|
@@ -35095,11 +35110,11 @@ var DataGrid = ({
|
|
|
35095
35110
|
},
|
|
35096
35111
|
col.accessorKey
|
|
35097
35112
|
)) }) }),
|
|
35098
|
-
/* @__PURE__ */ jsx104(TableBody, { children:
|
|
35113
|
+
/* @__PURE__ */ jsx104(TableBody, { children: safeData.slice(0, pageSize).map((item, idx) => /* @__PURE__ */ jsx104(
|
|
35099
35114
|
TableRow,
|
|
35100
35115
|
{
|
|
35101
35116
|
className: "hover:bg-purple-50/30 transition-colors border-gray-50",
|
|
35102
|
-
children:
|
|
35117
|
+
children: safeColumns.map((col) => /* @__PURE__ */ jsx104(TableCell, { className: "py-4", children: renderCell(item, col) }, col.accessorKey))
|
|
35103
35118
|
},
|
|
35104
35119
|
idx
|
|
35105
35120
|
)) })
|
|
@@ -35116,10 +35131,11 @@ var StepWizard = ({
|
|
|
35116
35131
|
currentStep,
|
|
35117
35132
|
className
|
|
35118
35133
|
}) => {
|
|
35119
|
-
|
|
35134
|
+
const safeSteps = Array.isArray(steps) ? steps : [];
|
|
35135
|
+
return /* @__PURE__ */ jsx105("div", { className: cn("flex items-center w-full", className), children: safeSteps.map((step, i) => {
|
|
35120
35136
|
const isCompleted = i < currentStep;
|
|
35121
35137
|
const isActive = i === currentStep;
|
|
35122
|
-
const isLast = i ===
|
|
35138
|
+
const isLast = i === safeSteps.length - 1;
|
|
35123
35139
|
return /* @__PURE__ */ jsxs66(React91.Fragment, { children: [
|
|
35124
35140
|
/* @__PURE__ */ jsxs66("div", { className: "flex flex-col items-center relative group", children: [
|
|
35125
35141
|
/* @__PURE__ */ jsx105(
|
|
@@ -35162,6 +35178,7 @@ var NotificationList = ({
|
|
|
35162
35178
|
notifications,
|
|
35163
35179
|
className
|
|
35164
35180
|
}) => {
|
|
35181
|
+
const safeNotifications = Array.isArray(notifications) ? notifications : [];
|
|
35165
35182
|
const getIcon = (type) => {
|
|
35166
35183
|
switch (type) {
|
|
35167
35184
|
case "success":
|
|
@@ -35186,7 +35203,7 @@ var NotificationList = ({
|
|
|
35186
35203
|
return "bg-blue-50";
|
|
35187
35204
|
}
|
|
35188
35205
|
};
|
|
35189
|
-
return /* @__PURE__ */ jsx106("div", { className: cn("flex flex-col gap-2", className), children:
|
|
35206
|
+
return /* @__PURE__ */ jsx106("div", { className: cn("flex flex-col gap-2", className), children: safeNotifications.map((n) => /* @__PURE__ */ jsxs67(
|
|
35190
35207
|
"div",
|
|
35191
35208
|
{
|
|
35192
35209
|
className: cn(
|
|
@@ -35249,15 +35266,16 @@ var PLATFORM_STYLES = {
|
|
|
35249
35266
|
};
|
|
35250
35267
|
var PlatformPost = ({ post, loading, className }) => {
|
|
35251
35268
|
const [copied, setCopied] = useState8(false);
|
|
35252
|
-
const [caption, setCaption] = useState8(post
|
|
35269
|
+
const [caption, setCaption] = useState8(post?.caption ?? "");
|
|
35270
|
+
const safeHashtags = Array.isArray(post.hashtags) ? post.hashtags : [];
|
|
35253
35271
|
const style = PLATFORM_STYLES[post.platform] || PLATFORM_STYLES.twitter;
|
|
35254
35272
|
const charCount = caption.length;
|
|
35255
35273
|
const isOverLimit = charCount > post.character_limit;
|
|
35256
35274
|
const isInstagram = post.platform === "instagram";
|
|
35257
35275
|
const handleCopy = async () => {
|
|
35258
|
-
const fullText = isInstagram ?
|
|
35276
|
+
const fullText = isInstagram ? safeHashtags.join(" ") : `${caption}
|
|
35259
35277
|
|
|
35260
|
-
${
|
|
35278
|
+
${safeHashtags.join(" ")}`;
|
|
35261
35279
|
try {
|
|
35262
35280
|
await navigator.clipboard.writeText(fullText);
|
|
35263
35281
|
setCopied(true);
|
|
@@ -35311,7 +35329,7 @@ ${post.hashtags.join(" ")}`;
|
|
|
35311
35329
|
}
|
|
35312
35330
|
) }),
|
|
35313
35331
|
/* @__PURE__ */ jsxs68("div", { className: "px-4 pt-3 pb-4 space-y-2.5", children: [
|
|
35314
|
-
loading ? /* @__PURE__ */ jsx107("div", { className: "h-3 w-[50%] rounded bg-[#27272a] animate-pulse" }) :
|
|
35332
|
+
loading ? /* @__PURE__ */ jsx107("div", { className: "h-3 w-[50%] rounded bg-[#27272a] animate-pulse" }) : safeHashtags.length > 0 ? /* @__PURE__ */ jsx107("p", { className: cn("text-xs font-medium leading-relaxed", style.hashtagColor), children: safeHashtags.join(" ") }) : null,
|
|
35315
35333
|
!isInstagram && (loading ? /* @__PURE__ */ jsx107("div", { className: "h-2.5 w-[30%] rounded bg-[#27272a] animate-pulse" }) : /* @__PURE__ */ jsxs68(
|
|
35316
35334
|
"p",
|
|
35317
35335
|
{
|
|
@@ -35516,6 +35534,7 @@ var hideScrollbar = {
|
|
|
35516
35534
|
var CIStatusSection = ({
|
|
35517
35535
|
branches
|
|
35518
35536
|
}) => {
|
|
35537
|
+
const safeBranches = Array.isArray(branches) ? branches : [];
|
|
35519
35538
|
return /* @__PURE__ */ jsxs71(
|
|
35520
35539
|
"div",
|
|
35521
35540
|
{
|
|
@@ -35536,7 +35555,7 @@ var CIStatusSection = ({
|
|
|
35536
35555
|
className: "space-y-1.5 max-h-[220px] overflow-y-auto slim-scrollbar",
|
|
35537
35556
|
style: hideScrollbar,
|
|
35538
35557
|
children: [
|
|
35539
|
-
|
|
35558
|
+
safeBranches.map((branch) => {
|
|
35540
35559
|
const cfg = STATUS_CONFIG[branch.status] || STATUS_CONFIG.none;
|
|
35541
35560
|
return /* @__PURE__ */ jsxs71(
|
|
35542
35561
|
"div",
|
|
@@ -35558,7 +35577,7 @@ var CIStatusSection = ({
|
|
|
35558
35577
|
branch.branch
|
|
35559
35578
|
);
|
|
35560
35579
|
}),
|
|
35561
|
-
|
|
35580
|
+
safeBranches.length === 0 && /* @__PURE__ */ jsx110("p", { className: "text-xs text-gray-500 italic py-2", children: "No branches found" })
|
|
35562
35581
|
]
|
|
35563
35582
|
}
|
|
35564
35583
|
)
|
|
@@ -35599,6 +35618,7 @@ var hideScrollbar2 = {
|
|
|
35599
35618
|
var PRListSection = ({
|
|
35600
35619
|
pullRequests
|
|
35601
35620
|
}) => {
|
|
35621
|
+
const safePullRequests = Array.isArray(pullRequests) ? pullRequests : [];
|
|
35602
35622
|
return /* @__PURE__ */ jsxs72(
|
|
35603
35623
|
"div",
|
|
35604
35624
|
{
|
|
@@ -35619,7 +35639,7 @@ var PRListSection = ({
|
|
|
35619
35639
|
className: "space-y-2 max-h-[220px] overflow-y-auto slim-scrollbar",
|
|
35620
35640
|
style: hideScrollbar2,
|
|
35621
35641
|
children: [
|
|
35622
|
-
|
|
35642
|
+
safePullRequests.map((pr) => {
|
|
35623
35643
|
const cfg = REVIEW_CONFIG[pr.review_status] || REVIEW_CONFIG.needs_review;
|
|
35624
35644
|
return /* @__PURE__ */ jsxs72(
|
|
35625
35645
|
"div",
|
|
@@ -35661,7 +35681,7 @@ var PRListSection = ({
|
|
|
35661
35681
|
pr.number
|
|
35662
35682
|
);
|
|
35663
35683
|
}),
|
|
35664
|
-
|
|
35684
|
+
safePullRequests.length === 0 && /* @__PURE__ */ jsx111("p", { className: "text-xs text-gray-500 italic py-2", children: "No open pull requests" })
|
|
35665
35685
|
]
|
|
35666
35686
|
}
|
|
35667
35687
|
)
|
|
@@ -35725,6 +35745,7 @@ var hideScrollbar3 = {
|
|
|
35725
35745
|
WebkitOverflowScrolling: "touch"
|
|
35726
35746
|
};
|
|
35727
35747
|
var StaleIssueList = ({ issues }) => {
|
|
35748
|
+
const safeIssues = Array.isArray(issues) ? issues : [];
|
|
35728
35749
|
return /* @__PURE__ */ jsxs74(
|
|
35729
35750
|
"div",
|
|
35730
35751
|
{
|
|
@@ -35745,14 +35766,14 @@ var StaleIssueList = ({ issues }) => {
|
|
|
35745
35766
|
className: "space-y-2 max-h-[220px] overflow-y-auto slim-scrollbar",
|
|
35746
35767
|
style: hideScrollbar3,
|
|
35747
35768
|
children: [
|
|
35748
|
-
|
|
35769
|
+
safeIssues.map((issue) => /* @__PURE__ */ jsxs74(
|
|
35749
35770
|
"div",
|
|
35750
35771
|
{
|
|
35751
35772
|
className: "flex items-center justify-between rounded-lg px-3 py-2.5",
|
|
35752
35773
|
style: { backgroundColor: "rgba(40, 40, 40, 0.7)" },
|
|
35753
35774
|
children: [
|
|
35754
35775
|
/* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [
|
|
35755
|
-
/* @__PURE__ */ jsx113("div", { className: "flex shrink-0 gap-1", children: issue.labels.slice(0, 2).map((label) => /* @__PURE__ */ jsx113(
|
|
35776
|
+
/* @__PURE__ */ jsx113("div", { className: "flex shrink-0 gap-1", children: (Array.isArray(issue.labels) ? issue.labels : []).slice(0, 2).map((label) => /* @__PURE__ */ jsx113(
|
|
35756
35777
|
"span",
|
|
35757
35778
|
{
|
|
35758
35779
|
className: cn(
|
|
@@ -35773,7 +35794,7 @@ var StaleIssueList = ({ issues }) => {
|
|
|
35773
35794
|
},
|
|
35774
35795
|
issue.number
|
|
35775
35796
|
)),
|
|
35776
|
-
|
|
35797
|
+
safeIssues.length === 0 && /* @__PURE__ */ jsx113("p", { className: "text-xs text-gray-500 italic py-2", children: "No stale issues" })
|
|
35777
35798
|
]
|
|
35778
35799
|
}
|
|
35779
35800
|
)
|
|
@@ -35833,7 +35854,7 @@ var GitHubIssueTrackerCard = ({ owner, repo, open_bugs, velocity_per_week, stale
|
|
|
35833
35854
|
}
|
|
35834
35855
|
)
|
|
35835
35856
|
] }),
|
|
35836
|
-
/* @__PURE__ */ jsx114(StaleIssueList, { issues: stale_issues })
|
|
35857
|
+
/* @__PURE__ */ jsx114(StaleIssueList, { issues: Array.isArray(stale_issues) ? stale_issues : [] })
|
|
35837
35858
|
] })
|
|
35838
35859
|
] });
|
|
35839
35860
|
};
|
|
@@ -35876,6 +35897,8 @@ var DataTable = ({
|
|
|
35876
35897
|
rows,
|
|
35877
35898
|
loading
|
|
35878
35899
|
}) => {
|
|
35900
|
+
const safeColumns = Array.isArray(columns) ? columns : [];
|
|
35901
|
+
const safeRows = Array.isArray(rows) ? rows : [];
|
|
35879
35902
|
return /* @__PURE__ */ jsxs76(
|
|
35880
35903
|
"div",
|
|
35881
35904
|
{
|
|
@@ -35894,7 +35917,7 @@ var DataTable = ({
|
|
|
35894
35917
|
}
|
|
35895
35918
|
) }),
|
|
35896
35919
|
/* @__PURE__ */ jsx115("div", { className: "px-3 pb-3 overflow-x-auto", style: hideScrollbar4, children: loading ? /* @__PURE__ */ jsx115("div", { className: "space-y-3 p-2", children: [...Array(3)].map((_, i) => /* @__PURE__ */ jsx115("div", { className: "h-8 rounded bg-[#27272a] animate-pulse" }, i)) }) : /* @__PURE__ */ jsxs76("table", { className: "w-full text-sm", children: [
|
|
35897
|
-
/* @__PURE__ */ jsx115("thead", { children: /* @__PURE__ */ jsx115("tr", { className: "border-b border-[#3f3f46]/40", children:
|
|
35920
|
+
/* @__PURE__ */ jsx115("thead", { children: /* @__PURE__ */ jsx115("tr", { className: "border-b border-[#3f3f46]/40", children: safeColumns.map((col) => /* @__PURE__ */ jsx115(
|
|
35898
35921
|
"th",
|
|
35899
35922
|
{
|
|
35900
35923
|
className: cn(
|
|
@@ -35906,14 +35929,14 @@ var DataTable = ({
|
|
|
35906
35929
|
col.key
|
|
35907
35930
|
)) }) }),
|
|
35908
35931
|
/* @__PURE__ */ jsxs76("tbody", { children: [
|
|
35909
|
-
|
|
35932
|
+
safeRows.map((row, rowIdx) => /* @__PURE__ */ jsx115(
|
|
35910
35933
|
"tr",
|
|
35911
35934
|
{
|
|
35912
35935
|
className: cn(
|
|
35913
35936
|
"transition-colors hover:bg-[#27272a]/40",
|
|
35914
|
-
rowIdx !==
|
|
35937
|
+
rowIdx !== safeRows.length - 1 && "border-b border-[#27272a]/50"
|
|
35915
35938
|
),
|
|
35916
|
-
children:
|
|
35939
|
+
children: safeColumns.map((col) => {
|
|
35917
35940
|
const cellColor = getCellColor(col.type, row[col.key]);
|
|
35918
35941
|
return /* @__PURE__ */ jsx115(
|
|
35919
35942
|
"td",
|
|
@@ -35932,10 +35955,10 @@ var DataTable = ({
|
|
|
35932
35955
|
},
|
|
35933
35956
|
rowIdx
|
|
35934
35957
|
)),
|
|
35935
|
-
|
|
35958
|
+
safeRows.length === 0 && /* @__PURE__ */ jsx115("tr", { children: /* @__PURE__ */ jsx115(
|
|
35936
35959
|
"td",
|
|
35937
35960
|
{
|
|
35938
|
-
colSpan:
|
|
35961
|
+
colSpan: safeColumns.length,
|
|
35939
35962
|
className: "px-3 py-6 text-center text-xs text-gray-500 italic",
|
|
35940
35963
|
children: "No data available"
|
|
35941
35964
|
}
|
|
@@ -35967,7 +35990,8 @@ var AutoChart = ({
|
|
|
35967
35990
|
type = "bar",
|
|
35968
35991
|
loading
|
|
35969
35992
|
}) => {
|
|
35970
|
-
const
|
|
35993
|
+
const safeData = Array.isArray(data) ? data : [];
|
|
35994
|
+
const maxValue = safeData.length ? Math.max(...safeData.map((d) => d.value), 1) : 1;
|
|
35971
35995
|
return /* @__PURE__ */ jsxs77(
|
|
35972
35996
|
"div",
|
|
35973
35997
|
{
|
|
@@ -35992,7 +36016,7 @@ var AutoChart = ({
|
|
|
35992
36016
|
style: { height: `${40 + i * 25}%` }
|
|
35993
36017
|
},
|
|
35994
36018
|
i
|
|
35995
|
-
)) }) : type === "bar" ? /* @__PURE__ */ jsx116("div", { className: "flex items-end gap-3 h-[140px] w-full justify-center", children:
|
|
36019
|
+
)) }) : type === "bar" ? /* @__PURE__ */ jsx116("div", { className: "flex items-end gap-3 h-[140px] w-full justify-center", children: safeData.map((point, idx) => {
|
|
35996
36020
|
const heightPercent = point.value / maxValue * 100;
|
|
35997
36021
|
const color = point.color || DEFAULT_COLORS[idx % DEFAULT_COLORS.length];
|
|
35998
36022
|
return /* @__PURE__ */ jsxs77(
|
|
@@ -36018,7 +36042,7 @@ var AutoChart = ({
|
|
|
36018
36042
|
);
|
|
36019
36043
|
}) }) : (
|
|
36020
36044
|
/* Horizontal bar chart */
|
|
36021
|
-
/* @__PURE__ */ jsx116("div", { className: "flex flex-col gap-2.5 w-full", children:
|
|
36045
|
+
/* @__PURE__ */ jsx116("div", { className: "flex flex-col gap-2.5 w-full", children: safeData.map((point, idx) => {
|
|
36022
36046
|
const widthPercent = point.value / maxValue * 100;
|
|
36023
36047
|
const color = point.color || DEFAULT_COLORS[idx % DEFAULT_COLORS.length];
|
|
36024
36048
|
return /* @__PURE__ */ jsxs77("div", { className: "space-y-1", children: [
|
|
@@ -36112,7 +36136,7 @@ var GoogleSheetsCard = ({
|
|
|
36112
36136
|
] });
|
|
36113
36137
|
};
|
|
36114
36138
|
function autoGenerateChart(columns, rows) {
|
|
36115
|
-
if (!rows.length || !columns.length) return null;
|
|
36139
|
+
if (!Array.isArray(rows) || !Array.isArray(columns) || !rows.length || !columns.length) return null;
|
|
36116
36140
|
const labelCol = columns.find(
|
|
36117
36141
|
(c) => c.type === "text" || c.type === void 0
|
|
36118
36142
|
);
|
|
@@ -36331,6 +36355,7 @@ var GitHubReposListCard = ({
|
|
|
36331
36355
|
className,
|
|
36332
36356
|
sendMessage
|
|
36333
36357
|
}) => {
|
|
36358
|
+
const safeRepos = Array.isArray(repos) ? repos : [];
|
|
36334
36359
|
const handleRepoClick = (repo) => {
|
|
36335
36360
|
sendMessage?.(`Use repo ${repo.full_name}`);
|
|
36336
36361
|
};
|
|
@@ -36350,7 +36375,7 @@ var GitHubReposListCard = ({
|
|
|
36350
36375
|
/* @__PURE__ */ jsx119("span", { className: "text-sm font-semibold text-white", children: "Your Repositories" }),
|
|
36351
36376
|
/* @__PURE__ */ jsxs80("span", { className: "text-xs text-gray-500", children: [
|
|
36352
36377
|
"(",
|
|
36353
|
-
|
|
36378
|
+
safeRepos.length,
|
|
36354
36379
|
")"
|
|
36355
36380
|
] })
|
|
36356
36381
|
] }),
|
|
@@ -36364,7 +36389,7 @@ var GitHubReposListCard = ({
|
|
|
36364
36389
|
maxHeight: 380,
|
|
36365
36390
|
overflowY: "auto"
|
|
36366
36391
|
},
|
|
36367
|
-
children:
|
|
36392
|
+
children: safeRepos.length === 0 ? /* @__PURE__ */ jsx119("div", { className: "px-4 py-8 text-center text-sm text-gray-500", children: "No repositories found." }) : /* @__PURE__ */ jsx119("div", { className: "divide-y divide-white/5 py-1", children: safeRepos.map((repo) => /* @__PURE__ */ jsx119(
|
|
36368
36393
|
RepoRow,
|
|
36369
36394
|
{
|
|
36370
36395
|
repo,
|
|
@@ -36422,6 +36447,7 @@ function timeAgo2(dateStr) {
|
|
|
36422
36447
|
return `${months}mo ago`;
|
|
36423
36448
|
}
|
|
36424
36449
|
var SpreadsheetRow = ({ spreadsheet, onClick }) => {
|
|
36450
|
+
const safeSheets = Array.isArray(spreadsheet.sheets) ? spreadsheet.sheets : [];
|
|
36425
36451
|
return /* @__PURE__ */ jsx120(
|
|
36426
36452
|
"button",
|
|
36427
36453
|
{
|
|
@@ -36441,7 +36467,7 @@ var SpreadsheetRow = ({ spreadsheet, onClick }) => {
|
|
|
36441
36467
|
timeAgo2(spreadsheet.modified_time)
|
|
36442
36468
|
] })
|
|
36443
36469
|
] }),
|
|
36444
|
-
|
|
36470
|
+
safeSheets.length > 0 && /* @__PURE__ */ jsx120("div", { className: "mt-1.5 flex flex-wrap gap-1", children: safeSheets.map((tab) => /* @__PURE__ */ jsx120(
|
|
36445
36471
|
"span",
|
|
36446
36472
|
{
|
|
36447
36473
|
className: "inline-block rounded px-1.5 py-0.5 text-[10px] font-medium",
|
|
@@ -36474,8 +36500,10 @@ var GoogleSheetsListCard = ({
|
|
|
36474
36500
|
className,
|
|
36475
36501
|
sendMessage
|
|
36476
36502
|
}) => {
|
|
36503
|
+
const safeSpreadsheets = Array.isArray(spreadsheets) ? spreadsheets : [];
|
|
36477
36504
|
const handleSheetClick = (spreadsheet) => {
|
|
36478
|
-
const
|
|
36505
|
+
const safeSheets = Array.isArray(spreadsheet.sheets) ? spreadsheet.sheets : [];
|
|
36506
|
+
const firstTab = safeSheets.length > 0 ? safeSheets[0].title : "Sheet1";
|
|
36479
36507
|
sendMessage?.(
|
|
36480
36508
|
`Read spreadsheet "${spreadsheet.name}" (ID: ${spreadsheet.id}), tab: ${firstTab}`
|
|
36481
36509
|
);
|
|
@@ -36486,7 +36514,7 @@ var GoogleSheetsListCard = ({
|
|
|
36486
36514
|
/* @__PURE__ */ jsx120("span", { className: "text-sm font-semibold text-white", children: "Your Spreadsheets" }),
|
|
36487
36515
|
/* @__PURE__ */ jsxs81("span", { className: "text-xs text-gray-500", children: [
|
|
36488
36516
|
"(",
|
|
36489
|
-
|
|
36517
|
+
safeSpreadsheets.length,
|
|
36490
36518
|
")"
|
|
36491
36519
|
] })
|
|
36492
36520
|
] }),
|
|
@@ -36500,7 +36528,7 @@ var GoogleSheetsListCard = ({
|
|
|
36500
36528
|
maxHeight: 380,
|
|
36501
36529
|
overflowY: "auto"
|
|
36502
36530
|
},
|
|
36503
|
-
children:
|
|
36531
|
+
children: safeSpreadsheets.length === 0 ? /* @__PURE__ */ jsx120("div", { className: "px-4 py-8 text-center text-sm text-gray-500", children: "No spreadsheets found." }) : /* @__PURE__ */ jsx120("div", { className: "divide-y divide-white/5 py-1", children: safeSpreadsheets.map((spreadsheet) => /* @__PURE__ */ jsx120(
|
|
36504
36532
|
SpreadsheetRow,
|
|
36505
36533
|
{
|
|
36506
36534
|
spreadsheet,
|
|
@@ -36886,9 +36914,10 @@ var InputWidget = ({
|
|
|
36886
36914
|
onAction,
|
|
36887
36915
|
isSubmitting = false
|
|
36888
36916
|
}) => {
|
|
36917
|
+
const safeFields = Array.isArray(fields) ? fields : [];
|
|
36889
36918
|
const [values, setValues] = React96.useState(() => {
|
|
36890
36919
|
const initial = {};
|
|
36891
|
-
for (const f of
|
|
36920
|
+
for (const f of safeFields) {
|
|
36892
36921
|
initial[f.key] = f.defaultValue ?? defaultForKind(f.kind);
|
|
36893
36922
|
}
|
|
36894
36923
|
return initial;
|
|
@@ -36896,7 +36925,7 @@ var InputWidget = ({
|
|
|
36896
36925
|
const update = (key, v) => {
|
|
36897
36926
|
setValues((prev) => ({ ...prev, [key]: v }));
|
|
36898
36927
|
};
|
|
36899
|
-
const buildElementsForSubmission = () =>
|
|
36928
|
+
const buildElementsForSubmission = () => safeFields.map((f) => ({
|
|
36900
36929
|
id: `${id}-${f.key}`,
|
|
36901
36930
|
atomName: kindToAtomName(f.kind),
|
|
36902
36931
|
props: {
|
|
@@ -36928,7 +36957,7 @@ var InputWidget = ({
|
|
|
36928
36957
|
}
|
|
36929
36958
|
if (action === "reset") {
|
|
36930
36959
|
const reset = {};
|
|
36931
|
-
for (const f of
|
|
36960
|
+
for (const f of safeFields) reset[f.key] = f.defaultValue ?? defaultForKind(f.kind);
|
|
36932
36961
|
setValues(reset);
|
|
36933
36962
|
}
|
|
36934
36963
|
onAction?.(action, payload);
|
|
@@ -36944,7 +36973,7 @@ var InputWidget = ({
|
|
|
36944
36973
|
title && /* @__PURE__ */ jsx123("h3", { className: "text-base font-semibold", style: { color: "var(--px-text-color, inherit)" }, children: title }),
|
|
36945
36974
|
description && /* @__PURE__ */ jsx123("p", { className: "text-sm opacity-80", style: { color: "var(--px-text-color, inherit)" }, children: description })
|
|
36946
36975
|
] }),
|
|
36947
|
-
/* @__PURE__ */ jsx123("div", { className: "flex flex-col gap-4", children:
|
|
36976
|
+
/* @__PURE__ */ jsx123("div", { className: "flex flex-col gap-4", children: safeFields.map((field) => /* @__PURE__ */ jsx123(
|
|
36948
36977
|
FieldRenderer,
|
|
36949
36978
|
{
|
|
36950
36979
|
field,
|
|
@@ -37162,7 +37191,7 @@ var TrendBadge = ({ item }) => {
|
|
|
37162
37191
|
var KPIStatsCard = React97.memo(
|
|
37163
37192
|
({ title, subtitle, stats, items, theme, className, onAction: _onAction }) => {
|
|
37164
37193
|
const s = th(theme);
|
|
37165
|
-
const displayStats = stats
|
|
37194
|
+
const displayStats = Array.isArray(stats) ? stats : Array.isArray(items) ? items : [];
|
|
37166
37195
|
return /* @__PURE__ */ jsxs85(
|
|
37167
37196
|
"div",
|
|
37168
37197
|
{
|
|
@@ -37264,7 +37293,7 @@ var ApprovalCard = React98.memo(
|
|
|
37264
37293
|
sendMessage?.(`${labels[next]}: ${title}`);
|
|
37265
37294
|
onAction?.({ type: "approval", value: next, title });
|
|
37266
37295
|
};
|
|
37267
|
-
const config = STATUS_CONFIG2[status];
|
|
37296
|
+
const config = STATUS_CONFIG2[status] ?? STATUS_CONFIG2.pending;
|
|
37268
37297
|
const StatusIcon = config.icon;
|
|
37269
37298
|
return /* @__PURE__ */ jsxs86(
|
|
37270
37299
|
"div",
|
|
@@ -37292,7 +37321,7 @@ var ApprovalCard = React98.memo(
|
|
|
37292
37321
|
style: i < details.length - 1 ? { borderBottomColor: theme?.border } : {},
|
|
37293
37322
|
children: [
|
|
37294
37323
|
/* @__PURE__ */ jsx125("span", { className: "text-cardText/50", style: s.muted, children: d.label }),
|
|
37295
|
-
/* @__PURE__ */ jsx125("span", { className: "font-medium text-cardText", style: s.text, children: d.value })
|
|
37324
|
+
/* @__PURE__ */ jsx125("span", { className: "font-medium text-cardText", style: s.text, children: typeof d.value === "object" ? JSON.stringify(d.value) : String(d.value ?? "") })
|
|
37296
37325
|
]
|
|
37297
37326
|
},
|
|
37298
37327
|
i
|
|
@@ -37356,7 +37385,7 @@ var StepDot = ({ step, accentColor }) => {
|
|
|
37356
37385
|
var TimelineCard = React99.memo(
|
|
37357
37386
|
({ title, steps, milestones, theme, className, onAction: _onAction }) => {
|
|
37358
37387
|
const s = th(theme);
|
|
37359
|
-
const displaySteps = steps
|
|
37388
|
+
const displaySteps = Array.isArray(steps) ? steps : Array.isArray(milestones) ? milestones : [];
|
|
37360
37389
|
return /* @__PURE__ */ jsxs87("div", { className: cn("w-full rounded-[16px] border border-gray400 bg-cardSurface p-4", className), style: s.root, children: [
|
|
37361
37390
|
title && /* @__PURE__ */ jsx126("h3", { className: "mb-4 text-sm font-semibold text-cardText", style: s.text, children: title }),
|
|
37362
37391
|
/* @__PURE__ */ jsx126("div", { className: "space-y-0", children: displaySteps.map((step, idx) => {
|
|
@@ -37514,31 +37543,41 @@ FeedbackRatingCard.displayName = "FeedbackRatingCard";
|
|
|
37514
37543
|
import React101 from "react";
|
|
37515
37544
|
import { jsx as jsx128, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
37516
37545
|
var DataTableCard = React101.memo(
|
|
37517
|
-
({ title, caption, columns, rows, highlight_column, theme, className, onAction: _onAction }) => {
|
|
37546
|
+
({ title, caption, columns, rows, highlight_column, highlightColumn, theme, className, onAction: _onAction }) => {
|
|
37518
37547
|
const s = th(theme);
|
|
37548
|
+
const cols = (Array.isArray(columns) ? columns : []).map((c, i) => {
|
|
37549
|
+
if (typeof c === "string") return { key: c, label: c };
|
|
37550
|
+
return {
|
|
37551
|
+
key: c?.key ?? c?.label ?? String(i),
|
|
37552
|
+
label: c?.label ?? c?.key ?? String(i)
|
|
37553
|
+
};
|
|
37554
|
+
});
|
|
37555
|
+
const safeRows = Array.isArray(rows) ? rows : [];
|
|
37556
|
+
const highlight = highlight_column ?? highlightColumn;
|
|
37519
37557
|
return /* @__PURE__ */ jsxs89("div", { className: cn("w-full rounded-[16px] border border-gray400 bg-cardSurface overflow-hidden", className), style: s.root, children: [
|
|
37520
37558
|
(title || caption) && /* @__PURE__ */ jsxs89("div", { className: "border-b border-gray400 px-4 py-3", style: { borderBottomColor: theme?.border }, children: [
|
|
37521
37559
|
title && /* @__PURE__ */ jsx128("h3", { className: "text-sm font-semibold text-cardText", style: s.text, children: title }),
|
|
37522
37560
|
caption && /* @__PURE__ */ jsx128("p", { className: "mt-0.5 text-[10px] text-cardText/40", style: s.muted, children: caption })
|
|
37523
37561
|
] }),
|
|
37524
37562
|
/* @__PURE__ */ jsx128("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs89("table", { className: "w-full min-w-full border-collapse text-xs", children: [
|
|
37525
|
-
/* @__PURE__ */ jsx128("thead", { children: /* @__PURE__ */ jsx128("tr", { className: "border-b border-gray400 bg-black/20", style: { borderBottomColor: theme?.border, ...s.surface }, children:
|
|
37563
|
+
/* @__PURE__ */ jsx128("thead", { children: /* @__PURE__ */ jsx128("tr", { className: "border-b border-gray400 bg-black/20", style: { borderBottomColor: theme?.border, ...s.surface }, children: cols.map((col, idx) => /* @__PURE__ */ jsx128(
|
|
37526
37564
|
"th",
|
|
37527
37565
|
{
|
|
37528
37566
|
className: "px-4 py-2.5 text-left font-semibold uppercase tracking-widest text-[10px] text-cardText/40",
|
|
37529
37567
|
style: s.muted,
|
|
37530
|
-
children: col
|
|
37568
|
+
children: col.label
|
|
37531
37569
|
},
|
|
37532
37570
|
idx
|
|
37533
37571
|
)) }) }),
|
|
37534
|
-
/* @__PURE__ */ jsx128("tbody", { children:
|
|
37572
|
+
/* @__PURE__ */ jsx128("tbody", { children: safeRows.map((row, rowIdx) => /* @__PURE__ */ jsx128(
|
|
37535
37573
|
"tr",
|
|
37536
37574
|
{
|
|
37537
|
-
className: cn("border-b border-gray400/40 transition-colors hover:bg-white/[0.02]", rowIdx ===
|
|
37575
|
+
className: cn("border-b border-gray400/40 transition-colors hover:bg-white/[0.02]", rowIdx === safeRows.length - 1 && "border-b-0"),
|
|
37538
37576
|
style: { borderBottomColor: theme?.border },
|
|
37539
|
-
children:
|
|
37540
|
-
const
|
|
37541
|
-
const
|
|
37577
|
+
children: cols.map((col, colIdx) => {
|
|
37578
|
+
const raw = row?.[col.key] ?? row?.[col.label];
|
|
37579
|
+
const cell = raw ?? "\u2014";
|
|
37580
|
+
const isHighlight = highlight != null && (col.key === highlight || col.label === highlight);
|
|
37542
37581
|
return /* @__PURE__ */ jsx128(
|
|
37543
37582
|
"td",
|
|
37544
37583
|
{
|
|
@@ -37547,7 +37586,7 @@ var DataTableCard = React101.memo(
|
|
|
37547
37586
|
isHighlight ? "font-semibold text-gold" : colIdx === 0 ? "font-medium text-cardText" : "text-cardText/60"
|
|
37548
37587
|
),
|
|
37549
37588
|
style: isHighlight ? s.accent : colIdx === 0 ? s.text : s.muted,
|
|
37550
|
-
children: String(cell)
|
|
37589
|
+
children: typeof cell === "object" ? JSON.stringify(cell) : String(cell)
|
|
37551
37590
|
},
|
|
37552
37591
|
colIdx
|
|
37553
37592
|
);
|
|
@@ -37556,7 +37595,7 @@ var DataTableCard = React101.memo(
|
|
|
37556
37595
|
rowIdx
|
|
37557
37596
|
)) })
|
|
37558
37597
|
] }) }),
|
|
37559
|
-
|
|
37598
|
+
safeRows.length === 0 && /* @__PURE__ */ jsx128("div", { className: "flex items-center justify-center py-10 text-xs text-cardText/30", style: s.muted, children: "No data available" })
|
|
37560
37599
|
] });
|
|
37561
37600
|
}
|
|
37562
37601
|
);
|
|
@@ -37581,7 +37620,7 @@ var ChecklistCard = React102.memo(
|
|
|
37581
37620
|
onAction
|
|
37582
37621
|
}) => {
|
|
37583
37622
|
const s = th(theme);
|
|
37584
|
-
const source = items
|
|
37623
|
+
const source = Array.isArray(items) ? items : Array.isArray(tasks) ? tasks : [];
|
|
37585
37624
|
const [checked, setChecked] = React102.useState(
|
|
37586
37625
|
() => new Set(source.filter((i) => i.checked).map((i) => i.id))
|
|
37587
37626
|
);
|
|
@@ -37716,7 +37755,7 @@ var PollCard = React103.memo(
|
|
|
37716
37755
|
onAction
|
|
37717
37756
|
}) => {
|
|
37718
37757
|
const s = th(theme);
|
|
37719
|
-
const source = options
|
|
37758
|
+
const source = Array.isArray(options) ? options : Array.isArray(choices) ? choices : [];
|
|
37720
37759
|
const [selected, setSelected] = React103.useState(/* @__PURE__ */ new Set());
|
|
37721
37760
|
const [hasVoted, setHasVoted] = React103.useState(false);
|
|
37722
37761
|
const [voteCounts, setVoteCounts] = React103.useState(
|
|
@@ -37763,7 +37802,9 @@ Selected: ${labels.join(", ")}`);
|
|
|
37763
37802
|
const isSelected = selected.has(opt.id);
|
|
37764
37803
|
const count = voteCounts[opt.id] ?? 0;
|
|
37765
37804
|
const pct = hasVoted && displayTotal > 0 ? Math.round(count / displayTotal * 100) : 0;
|
|
37766
|
-
const
|
|
37805
|
+
const voteCountValues = Object.values(voteCounts);
|
|
37806
|
+
const maxVotes = voteCountValues.length ? Math.max(...voteCountValues) : 0;
|
|
37807
|
+
const isWinner = hasVoted && count === maxVotes;
|
|
37767
37808
|
const accentSubtleBg = theme?.accent ? withAlpha(theme.accent, 0.1) : void 0;
|
|
37768
37809
|
return /* @__PURE__ */ jsxs91(
|
|
37769
37810
|
"div",
|
|
@@ -37867,8 +37908,8 @@ var STATUS_STYLES = {
|
|
|
37867
37908
|
cancelled: { label: "Cancelled", className: "text-rose-400 bg-rose-500/10 border-rose-500/20", dot: "bg-rose-400" }
|
|
37868
37909
|
};
|
|
37869
37910
|
function AvatarInitials({ name }) {
|
|
37870
|
-
const initials = name.split(" ").map((p) => p[0]).slice(0, 2).join("").toUpperCase();
|
|
37871
|
-
const hue = name.split("").reduce((acc, ch) => acc + ch.charCodeAt(0), 0) % 360;
|
|
37911
|
+
const initials = (name ?? "").split(" ").map((p) => p[0]).slice(0, 2).join("").toUpperCase();
|
|
37912
|
+
const hue = (name ?? "").split("").reduce((acc, ch) => acc + ch.charCodeAt(0), 0) % 360;
|
|
37872
37913
|
return /* @__PURE__ */ jsx131(
|
|
37873
37914
|
"div",
|
|
37874
37915
|
{
|
|
@@ -37895,17 +37936,18 @@ var CalendarEventCard = React104.memo(
|
|
|
37895
37936
|
onAction
|
|
37896
37937
|
}) => {
|
|
37897
37938
|
const s = th(theme);
|
|
37898
|
-
const cfg = STATUS_STYLES[status];
|
|
37939
|
+
const cfg = STATUS_STYLES[status] ?? STATUS_STYLES.upcoming;
|
|
37899
37940
|
const parsedDate = React104.useMemo(() => {
|
|
37900
37941
|
try {
|
|
37901
|
-
const
|
|
37942
|
+
const safeDate = date ?? "";
|
|
37943
|
+
const d = new Date(safeDate);
|
|
37902
37944
|
if (isNaN(d.getTime())) {
|
|
37903
|
-
const parts =
|
|
37904
|
-
return { day: parts[1] ||
|
|
37945
|
+
const parts = safeDate.split(/[\s,]+/);
|
|
37946
|
+
return { day: parts[1] || safeDate, month: parts[0] || "" };
|
|
37905
37947
|
}
|
|
37906
37948
|
return { day: d.getDate().toString(), month: d.toLocaleString("en", { month: "short" }) };
|
|
37907
37949
|
} catch {
|
|
37908
|
-
return { day: date, month: "" };
|
|
37950
|
+
return { day: date ?? "", month: "" };
|
|
37909
37951
|
}
|
|
37910
37952
|
}, [date]);
|
|
37911
37953
|
const handleJoin = (e) => {
|
|
@@ -38021,13 +38063,13 @@ var BudgetAllocCard = React105.memo(
|
|
|
38021
38063
|
onAction: _onAction
|
|
38022
38064
|
}) => {
|
|
38023
38065
|
const s = th(theme);
|
|
38024
|
-
const source = items
|
|
38025
|
-
const computedTotal = total ?? source.reduce((sum, i) => sum + i.amount, 0);
|
|
38066
|
+
const source = Array.isArray(items) ? items : Array.isArray(allocations) ? allocations : [];
|
|
38067
|
+
const computedTotal = total ?? source.reduce((sum, i) => sum + (Number(i.amount) || 0), 0);
|
|
38026
38068
|
const paletteWithAccent = [theme?.accent ?? PALETTE[0], ...PALETTE.slice(1)];
|
|
38027
38069
|
const segments = source.map((item, idx) => ({
|
|
38028
38070
|
...item,
|
|
38029
38071
|
color: item.color || paletteWithAccent[idx % paletteWithAccent.length],
|
|
38030
|
-
pct: computedTotal > 0 ? item.amount / computedTotal * 100 : 0
|
|
38072
|
+
pct: computedTotal > 0 ? (Number(item.amount) || 0) / computedTotal * 100 : 0
|
|
38031
38073
|
}));
|
|
38032
38074
|
return /* @__PURE__ */ jsxs93(
|
|
38033
38075
|
"div",
|
|
@@ -38148,6 +38190,8 @@ var ComparisonCard = React106.memo(
|
|
|
38148
38190
|
onAction
|
|
38149
38191
|
}) => {
|
|
38150
38192
|
const s = th(theme);
|
|
38193
|
+
const safeOptions = Array.isArray(options) ? options : [];
|
|
38194
|
+
const safeAttributeLabels = Array.isArray(attribute_labels) ? attribute_labels : [];
|
|
38151
38195
|
const [selected, setSelected] = React106.useState(null);
|
|
38152
38196
|
const [isSubmitted, setIsSubmitted] = React106.useState(false);
|
|
38153
38197
|
const isInteractive = isLatestMessage && !disabled && !isSubmitted;
|
|
@@ -38184,8 +38228,8 @@ var ComparisonCard = React106.memo(
|
|
|
38184
38228
|
"div",
|
|
38185
38229
|
{
|
|
38186
38230
|
className: "grid gap-3",
|
|
38187
|
-
style: { gridTemplateColumns: `repeat(${
|
|
38188
|
-
children:
|
|
38231
|
+
style: { gridTemplateColumns: `repeat(${safeOptions.length}, minmax(0, 1fr))` },
|
|
38232
|
+
children: safeOptions.map((opt) => {
|
|
38189
38233
|
const isChosen = selected === opt.id;
|
|
38190
38234
|
const isGoldBadge = !opt.badge_color || opt.badge_color === "gold";
|
|
38191
38235
|
const badgeColor = opt.badge_color ? BADGE_COLORS[opt.badge_color] : BADGE_COLORS.gold;
|
|
@@ -38230,8 +38274,8 @@ var ComparisonCard = React106.memo(
|
|
|
38230
38274
|
]
|
|
38231
38275
|
}
|
|
38232
38276
|
),
|
|
38233
|
-
/* @__PURE__ */ jsx133("div", { className: "flex flex-col divide-y divide-gray400/30 flex-1", children:
|
|
38234
|
-
const attr = opt.attributes[rowIdx];
|
|
38277
|
+
/* @__PURE__ */ jsx133("div", { className: "flex flex-col divide-y divide-gray400/30 flex-1", children: safeAttributeLabels.map((attrLabel, rowIdx) => {
|
|
38278
|
+
const attr = opt.attributes?.[rowIdx];
|
|
38235
38279
|
return /* @__PURE__ */ jsxs94(
|
|
38236
38280
|
"div",
|
|
38237
38281
|
{
|
|
@@ -38441,7 +38485,7 @@ var ResearchBriefCard = ({
|
|
|
38441
38485
|
item.label,
|
|
38442
38486
|
": "
|
|
38443
38487
|
] }),
|
|
38444
|
-
/* @__PURE__ */ jsx135("span", { className: "text-muted-foreground", children: item.value })
|
|
38488
|
+
/* @__PURE__ */ jsx135("span", { className: "text-muted-foreground", children: typeof item.value === "object" ? JSON.stringify(item.value) : String(item.value ?? "") })
|
|
38445
38489
|
] }, `${item.label}-${idx}`)) })
|
|
38446
38490
|
] })
|
|
38447
38491
|
]
|
|
@@ -38462,6 +38506,7 @@ var PriorityActionsCard = ({
|
|
|
38462
38506
|
actions,
|
|
38463
38507
|
className
|
|
38464
38508
|
}) => {
|
|
38509
|
+
const safeActions = Array.isArray(actions) ? actions : [];
|
|
38465
38510
|
return /* @__PURE__ */ jsxs97(
|
|
38466
38511
|
"div",
|
|
38467
38512
|
{
|
|
@@ -38472,7 +38517,7 @@ var PriorityActionsCard = ({
|
|
|
38472
38517
|
children: [
|
|
38473
38518
|
/* @__PURE__ */ jsx136("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38474
38519
|
summary ? /* @__PURE__ */ jsx136("p", { className: "mt-2 text-sm leading-relaxed text-muted-foreground", children: summary }) : null,
|
|
38475
|
-
/* @__PURE__ */ jsx136("div", { className: "mt-4 space-y-2.5", children:
|
|
38520
|
+
/* @__PURE__ */ jsx136("div", { className: "mt-4 space-y-2.5", children: safeActions.map((action, idx) => /* @__PURE__ */ jsxs97(
|
|
38476
38521
|
"div",
|
|
38477
38522
|
{
|
|
38478
38523
|
className: "rounded-xl border border-border/70 bg-background/50 p-3",
|
|
@@ -38535,7 +38580,7 @@ var CampaignBriefCard = ({
|
|
|
38535
38580
|
] }),
|
|
38536
38581
|
constraints.length > 0 ? /* @__PURE__ */ jsx137("ul", { className: "mt-4 space-y-1.5 text-sm text-foreground/90", children: constraints.map((item, i) => /* @__PURE__ */ jsxs98("li", { children: [
|
|
38537
38582
|
"- ",
|
|
38538
|
-
item
|
|
38583
|
+
typeof item === "object" ? JSON.stringify(item) : String(item ?? "")
|
|
38539
38584
|
] }, `${item}-${i}`)) }) : null
|
|
38540
38585
|
] });
|
|
38541
38586
|
};
|
|
@@ -38550,16 +38595,17 @@ var DataSourceChecklistCard = ({
|
|
|
38550
38595
|
className,
|
|
38551
38596
|
onAction
|
|
38552
38597
|
}) => {
|
|
38553
|
-
const
|
|
38598
|
+
const safeItems = Array.isArray(items) ? items : [];
|
|
38599
|
+
const connectedCount = safeItems.filter((i) => i.connected).length;
|
|
38554
38600
|
return /* @__PURE__ */ jsxs99("div", { className: cn("rounded-2xl border border-border bg-card/70 p-5 shadow-sm", className), children: [
|
|
38555
38601
|
/* @__PURE__ */ jsx138("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38556
38602
|
/* @__PURE__ */ jsxs99("p", { className: "mt-1 text-xs text-muted-foreground", children: [
|
|
38557
38603
|
connectedCount,
|
|
38558
38604
|
"/",
|
|
38559
|
-
|
|
38605
|
+
safeItems.length,
|
|
38560
38606
|
" connected"
|
|
38561
38607
|
] }),
|
|
38562
|
-
/* @__PURE__ */ jsx138("div", { className: "mt-3 space-y-2", children:
|
|
38608
|
+
/* @__PURE__ */ jsx138("div", { className: "mt-3 space-y-2", children: safeItems.map((item) => /* @__PURE__ */ jsxs99("div", { className: "rounded-xl border border-border/70 bg-background/60 p-3", children: [
|
|
38563
38609
|
/* @__PURE__ */ jsxs99("div", { className: "flex items-center justify-between gap-2", children: [
|
|
38564
38610
|
/* @__PURE__ */ jsx138("p", { className: "text-sm font-medium text-foreground", children: item.source }),
|
|
38565
38611
|
/* @__PURE__ */ jsx138("span", { className: cn("text-xs font-semibold", item.connected ? "text-emerald-600" : "text-amber-600"), children: item.connected ? "Connected" : "Pending" })
|
|
@@ -38592,7 +38638,7 @@ var GoalAlignmentCard = ({
|
|
|
38592
38638
|
className
|
|
38593
38639
|
}) => /* @__PURE__ */ jsxs100("div", { className: cn("rounded-2xl border border-border bg-card/70 p-5 shadow-sm", className), children: [
|
|
38594
38640
|
/* @__PURE__ */ jsx139("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38595
|
-
/* @__PURE__ */ jsx139("div", { className: "mt-3 space-y-2", children: goals.map((item, i) => /* @__PURE__ */ jsxs100("div", { className: "rounded-xl border border-border/70 bg-background/50 p-3", children: [
|
|
38641
|
+
/* @__PURE__ */ jsx139("div", { className: "mt-3 space-y-2", children: (Array.isArray(goals) ? goals : []).map((item, i) => /* @__PURE__ */ jsxs100("div", { className: "rounded-xl border border-border/70 bg-background/50 p-3", children: [
|
|
38596
38642
|
/* @__PURE__ */ jsxs100("div", { className: "flex items-center justify-between gap-2", children: [
|
|
38597
38643
|
/* @__PURE__ */ jsx139("p", { className: "text-sm font-medium text-foreground", children: item.goal }),
|
|
38598
38644
|
item.status ? /* @__PURE__ */ jsx139("span", { className: cn("text-xs font-semibold", statusColor[item.status]), children: item.status }) : null
|
|
@@ -38609,7 +38655,7 @@ var AudiencePersonaCard = ({
|
|
|
38609
38655
|
className
|
|
38610
38656
|
}) => /* @__PURE__ */ jsxs101("div", { className: cn("rounded-2xl border border-border bg-card/70 p-5 shadow-sm", className), children: [
|
|
38611
38657
|
/* @__PURE__ */ jsx140("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38612
|
-
/* @__PURE__ */ jsx140("div", { className: "mt-3 space-y-2", children: segments.map((segment, i) => /* @__PURE__ */ jsxs101("div", { className: "rounded-xl border border-border/70 bg-background/50 p-3", children: [
|
|
38658
|
+
/* @__PURE__ */ jsx140("div", { className: "mt-3 space-y-2", children: (Array.isArray(segments) ? segments : []).map((segment, i) => /* @__PURE__ */ jsxs101("div", { className: "rounded-xl border border-border/70 bg-background/50 p-3", children: [
|
|
38613
38659
|
/* @__PURE__ */ jsxs101("div", { className: "flex items-center justify-between gap-2", children: [
|
|
38614
38660
|
/* @__PURE__ */ jsx140("p", { className: "text-sm font-medium text-foreground", children: segment.name }),
|
|
38615
38661
|
segment.percentage !== void 0 ? /* @__PURE__ */ jsxs101("span", { className: "text-xs text-muted-foreground", children: [
|
|
@@ -38630,20 +38676,23 @@ var ChannelPlanCard = ({
|
|
|
38630
38676
|
title,
|
|
38631
38677
|
plans,
|
|
38632
38678
|
className
|
|
38633
|
-
}) =>
|
|
38634
|
-
|
|
38635
|
-
|
|
38636
|
-
/* @__PURE__ */ jsx141("
|
|
38637
|
-
plan
|
|
38638
|
-
"
|
|
38639
|
-
plan.objective
|
|
38640
|
-
|
|
38641
|
-
|
|
38642
|
-
|
|
38643
|
-
plan.cadence
|
|
38644
|
-
|
|
38645
|
-
|
|
38646
|
-
] })
|
|
38679
|
+
}) => {
|
|
38680
|
+
const safePlans = Array.isArray(plans) ? plans : [];
|
|
38681
|
+
return /* @__PURE__ */ jsxs102("div", { className: cn("rounded-2xl border border-border bg-card/70 p-5 shadow-sm", className), children: [
|
|
38682
|
+
/* @__PURE__ */ jsx141("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38683
|
+
/* @__PURE__ */ jsx141("div", { className: "mt-3 space-y-2", children: safePlans.map((plan, i) => /* @__PURE__ */ jsxs102("div", { className: "rounded-xl border border-border/70 bg-background/50 p-3", children: [
|
|
38684
|
+
/* @__PURE__ */ jsx141("p", { className: "text-sm font-medium text-foreground", children: plan.channel }),
|
|
38685
|
+
plan.objective ? /* @__PURE__ */ jsxs102("p", { className: "mt-1 text-xs text-muted-foreground", children: [
|
|
38686
|
+
"Objective: ",
|
|
38687
|
+
plan.objective
|
|
38688
|
+
] }) : null,
|
|
38689
|
+
plan.cadence ? /* @__PURE__ */ jsxs102("p", { className: "text-xs text-muted-foreground", children: [
|
|
38690
|
+
"Cadence: ",
|
|
38691
|
+
plan.cadence
|
|
38692
|
+
] }) : null
|
|
38693
|
+
] }, `${plan.channel}-${i}`)) })
|
|
38694
|
+
] });
|
|
38695
|
+
};
|
|
38647
38696
|
|
|
38648
38697
|
// src/molecules/generic/InsightDigestCard/InsightDigestCard.tsx
|
|
38649
38698
|
import { jsx as jsx142, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
@@ -38657,17 +38706,20 @@ var InsightDigestCard = ({
|
|
|
38657
38706
|
summary,
|
|
38658
38707
|
insights,
|
|
38659
38708
|
className
|
|
38660
|
-
}) =>
|
|
38661
|
-
|
|
38662
|
-
|
|
38663
|
-
|
|
38664
|
-
/* @__PURE__ */
|
|
38665
|
-
|
|
38666
|
-
|
|
38667
|
-
|
|
38668
|
-
|
|
38669
|
-
|
|
38670
|
-
|
|
38709
|
+
}) => {
|
|
38710
|
+
const safeInsights = Array.isArray(insights) ? insights : [];
|
|
38711
|
+
return /* @__PURE__ */ jsxs103("div", { className: cn("rounded-2xl border border-border bg-card/70 p-5 shadow-sm", className), children: [
|
|
38712
|
+
/* @__PURE__ */ jsx142("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38713
|
+
summary ? /* @__PURE__ */ jsx142("p", { className: "mt-2 text-sm text-muted-foreground", children: summary }) : null,
|
|
38714
|
+
/* @__PURE__ */ jsx142("div", { className: "mt-3 space-y-2", children: safeInsights.map((item, i) => /* @__PURE__ */ jsxs103("div", { className: "rounded-xl border border-border/70 bg-background/50 p-3", children: [
|
|
38715
|
+
/* @__PURE__ */ jsxs103("div", { className: "flex items-center justify-between gap-2", children: [
|
|
38716
|
+
/* @__PURE__ */ jsx142("p", { className: "text-sm font-medium text-foreground", children: item.label }),
|
|
38717
|
+
item.confidence ? /* @__PURE__ */ jsx142("span", { className: cn("text-xs font-semibold", confidenceColor[item.confidence]), children: item.confidence }) : null
|
|
38718
|
+
] }),
|
|
38719
|
+
/* @__PURE__ */ jsx142("p", { className: "mt-1 text-sm text-muted-foreground", children: item.detail })
|
|
38720
|
+
] }, `${item.label}-${i}`)) })
|
|
38721
|
+
] });
|
|
38722
|
+
};
|
|
38671
38723
|
|
|
38672
38724
|
// src/molecules/generic/ActionPriorityCard/ActionPriorityCard.tsx
|
|
38673
38725
|
import { jsx as jsx143, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
@@ -38680,20 +38732,23 @@ var ActionPriorityCard = ({
|
|
|
38680
38732
|
title,
|
|
38681
38733
|
actions,
|
|
38682
38734
|
className
|
|
38683
|
-
}) =>
|
|
38684
|
-
|
|
38685
|
-
|
|
38686
|
-
/* @__PURE__ */
|
|
38687
|
-
|
|
38688
|
-
|
|
38689
|
-
|
|
38690
|
-
|
|
38691
|
-
|
|
38692
|
-
action.owner
|
|
38693
|
-
|
|
38694
|
-
|
|
38695
|
-
|
|
38696
|
-
] })
|
|
38735
|
+
}) => {
|
|
38736
|
+
const safeActions = Array.isArray(actions) ? actions : [];
|
|
38737
|
+
return /* @__PURE__ */ jsxs104("div", { className: cn("rounded-2xl border border-border bg-card/70 p-5 shadow-sm", className), children: [
|
|
38738
|
+
/* @__PURE__ */ jsx143("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38739
|
+
/* @__PURE__ */ jsx143("div", { className: "mt-3 space-y-2", children: safeActions.map((action, i) => /* @__PURE__ */ jsxs104("div", { className: "rounded-xl border border-border/70 bg-background/50 p-3", children: [
|
|
38740
|
+
/* @__PURE__ */ jsxs104("div", { className: "flex items-center justify-between gap-2", children: [
|
|
38741
|
+
/* @__PURE__ */ jsx143("p", { className: "text-sm font-medium text-foreground", children: action.title }),
|
|
38742
|
+
action.priority ? /* @__PURE__ */ jsx143("span", { className: cn("rounded-full px-2.5 py-1 text-[11px] font-semibold", priorityBadge[action.priority]), children: action.priority }) : null
|
|
38743
|
+
] }),
|
|
38744
|
+
action.owner || action.timeline ? /* @__PURE__ */ jsxs104("p", { className: "mt-1 text-xs text-muted-foreground", children: [
|
|
38745
|
+
action.owner ? `Owner: ${action.owner}` : "",
|
|
38746
|
+
action.owner && action.timeline ? " \u2022 " : "",
|
|
38747
|
+
action.timeline ? `Timeline: ${action.timeline}` : ""
|
|
38748
|
+
] }) : null
|
|
38749
|
+
] }, `${action.title}-${i}`)) })
|
|
38750
|
+
] });
|
|
38751
|
+
};
|
|
38697
38752
|
|
|
38698
38753
|
// src/molecules/generic/RiskSignalCard/RiskSignalCard.tsx
|
|
38699
38754
|
import { jsx as jsx144, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
@@ -38706,19 +38761,22 @@ var RiskSignalCard = ({
|
|
|
38706
38761
|
title,
|
|
38707
38762
|
risks,
|
|
38708
38763
|
className
|
|
38709
|
-
}) =>
|
|
38710
|
-
|
|
38711
|
-
|
|
38712
|
-
/* @__PURE__ */
|
|
38713
|
-
|
|
38714
|
-
|
|
38715
|
-
|
|
38716
|
-
|
|
38717
|
-
|
|
38718
|
-
risk.impact
|
|
38719
|
-
|
|
38720
|
-
|
|
38721
|
-
] })
|
|
38764
|
+
}) => {
|
|
38765
|
+
const safeRisks = Array.isArray(risks) ? risks : [];
|
|
38766
|
+
return /* @__PURE__ */ jsxs105("div", { className: cn("rounded-2xl border border-border bg-card/70 p-5 shadow-sm", className), children: [
|
|
38767
|
+
/* @__PURE__ */ jsx144("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38768
|
+
/* @__PURE__ */ jsx144("div", { className: "mt-3 space-y-2", children: safeRisks.map((risk, i) => /* @__PURE__ */ jsxs105("div", { className: "rounded-xl border border-border/70 bg-background/50 p-3", children: [
|
|
38769
|
+
/* @__PURE__ */ jsxs105("div", { className: "flex items-center justify-between gap-2", children: [
|
|
38770
|
+
/* @__PURE__ */ jsx144("p", { className: "text-sm font-medium text-foreground", children: risk.signal }),
|
|
38771
|
+
risk.severity ? /* @__PURE__ */ jsx144("span", { className: cn("text-xs font-semibold", severityColor[risk.severity]), children: risk.severity }) : null
|
|
38772
|
+
] }),
|
|
38773
|
+
risk.impact ? /* @__PURE__ */ jsxs105("p", { className: "mt-1 text-xs text-muted-foreground", children: [
|
|
38774
|
+
"Impact: ",
|
|
38775
|
+
risk.impact
|
|
38776
|
+
] }) : null
|
|
38777
|
+
] }, `${risk.signal}-${i}`)) })
|
|
38778
|
+
] });
|
|
38779
|
+
};
|
|
38722
38780
|
|
|
38723
38781
|
// src/molecules/generic/ScoreBreakdownCard/ScoreBreakdownCard.tsx
|
|
38724
38782
|
import { jsx as jsx145, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
@@ -38728,24 +38786,27 @@ var ScoreBreakdownCard = ({
|
|
|
38728
38786
|
outOf = 100,
|
|
38729
38787
|
items,
|
|
38730
38788
|
className
|
|
38731
|
-
}) =>
|
|
38732
|
-
|
|
38733
|
-
|
|
38734
|
-
|
|
38735
|
-
|
|
38736
|
-
"
|
|
38737
|
-
|
|
38738
|
-
|
|
38739
|
-
|
|
38740
|
-
|
|
38741
|
-
|
|
38742
|
-
/* @__PURE__ */
|
|
38743
|
-
item.
|
|
38744
|
-
"
|
|
38745
|
-
|
|
38746
|
-
|
|
38747
|
-
|
|
38748
|
-
] })
|
|
38789
|
+
}) => {
|
|
38790
|
+
const safeItems = Array.isArray(items) ? items : [];
|
|
38791
|
+
return /* @__PURE__ */ jsxs106("div", { className: cn("rounded-2xl border border-border bg-card/70 p-5 shadow-sm", className), children: [
|
|
38792
|
+
/* @__PURE__ */ jsxs106("div", { className: "flex items-center justify-between gap-2", children: [
|
|
38793
|
+
/* @__PURE__ */ jsx145("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38794
|
+
totalScore !== void 0 ? /* @__PURE__ */ jsxs106("span", { className: "rounded-full border border-border px-2.5 py-1 text-xs text-muted-foreground", children: [
|
|
38795
|
+
totalScore,
|
|
38796
|
+
"/",
|
|
38797
|
+
outOf
|
|
38798
|
+
] }) : null
|
|
38799
|
+
] }),
|
|
38800
|
+
/* @__PURE__ */ jsx145("div", { className: "mt-3 space-y-2", children: safeItems.map((item, i) => /* @__PURE__ */ jsx145("div", { className: "rounded-xl border border-border/70 bg-background/50 p-3", children: /* @__PURE__ */ jsxs106("div", { className: "flex items-center justify-between gap-2 text-sm", children: [
|
|
38801
|
+
/* @__PURE__ */ jsx145("p", { className: "font-medium text-foreground", children: item.label }),
|
|
38802
|
+
/* @__PURE__ */ jsxs106("p", { className: "text-muted-foreground", children: [
|
|
38803
|
+
item.score,
|
|
38804
|
+
"/",
|
|
38805
|
+
item.outOf ?? outOf
|
|
38806
|
+
] })
|
|
38807
|
+
] }) }, `${item.label}-${i}`)) })
|
|
38808
|
+
] });
|
|
38809
|
+
};
|
|
38749
38810
|
|
|
38750
38811
|
// src/molecules/generic/NextStepCard/NextStepCard.tsx
|
|
38751
38812
|
import { jsx as jsx146, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
@@ -38755,26 +38816,29 @@ var NextStepCard = ({
|
|
|
38755
38816
|
ctaLabel = "Proceed",
|
|
38756
38817
|
className,
|
|
38757
38818
|
onAction
|
|
38758
|
-
}) =>
|
|
38759
|
-
|
|
38760
|
-
|
|
38761
|
-
/* @__PURE__ */ jsx146("
|
|
38762
|
-
|
|
38763
|
-
|
|
38764
|
-
item.owner
|
|
38765
|
-
|
|
38766
|
-
|
|
38767
|
-
|
|
38768
|
-
|
|
38769
|
-
|
|
38770
|
-
|
|
38771
|
-
|
|
38772
|
-
|
|
38773
|
-
|
|
38774
|
-
|
|
38775
|
-
|
|
38776
|
-
|
|
38777
|
-
|
|
38819
|
+
}) => {
|
|
38820
|
+
const safeSteps = Array.isArray(steps) ? steps : [];
|
|
38821
|
+
return /* @__PURE__ */ jsxs107("div", { className: cn("rounded-2xl border border-border bg-card/70 p-5 shadow-sm", className), children: [
|
|
38822
|
+
/* @__PURE__ */ jsx146("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
38823
|
+
/* @__PURE__ */ jsx146("div", { className: "mt-3 space-y-2", children: safeSteps.map((item, i) => /* @__PURE__ */ jsxs107("div", { className: "rounded-xl border border-border/70 bg-background/50 p-3 text-sm", children: [
|
|
38824
|
+
/* @__PURE__ */ jsx146("p", { className: "font-medium text-foreground", children: item.step }),
|
|
38825
|
+
item.owner || item.due ? /* @__PURE__ */ jsxs107("p", { className: "mt-1 text-xs text-muted-foreground", children: [
|
|
38826
|
+
item.owner ? `Owner: ${item.owner}` : "",
|
|
38827
|
+
item.owner && item.due ? " \u2022 " : "",
|
|
38828
|
+
item.due ? `Due: ${item.due}` : ""
|
|
38829
|
+
] }) : null
|
|
38830
|
+
] }, `${item.step}-${i}`)) }),
|
|
38831
|
+
/* @__PURE__ */ jsx146(
|
|
38832
|
+
"button",
|
|
38833
|
+
{
|
|
38834
|
+
type: "button",
|
|
38835
|
+
onClick: () => onAction?.({ type: "next_step_continue", stepsCount: safeSteps.length }),
|
|
38836
|
+
className: "mt-4 rounded-full border border-border px-4 py-2 text-sm text-foreground",
|
|
38837
|
+
children: ctaLabel
|
|
38838
|
+
}
|
|
38839
|
+
)
|
|
38840
|
+
] });
|
|
38841
|
+
};
|
|
38778
38842
|
|
|
38779
38843
|
// src/molecules/generic/PresentationJobCard/PresentationJobCard.tsx
|
|
38780
38844
|
import { useCallback as useCallback4, useEffect as useEffect6, useRef as useRef5, useState as useState10 } from "react";
|
|
@@ -38832,8 +38896,8 @@ var FORMATS = [
|
|
|
38832
38896
|
}
|
|
38833
38897
|
];
|
|
38834
38898
|
var ExportModal = ({ formats, title, onClose }) => {
|
|
38835
|
-
const available = FORMATS.filter((f) => formats[f.key]);
|
|
38836
|
-
const filename = title.replace(/[^a-z0-9]/gi, "-").toLowerCase();
|
|
38899
|
+
const available = FORMATS.filter((f) => (formats ?? {})[f.key]);
|
|
38900
|
+
const filename = (title ?? "").replace(/[^a-z0-9]/gi, "-").toLowerCase();
|
|
38837
38901
|
const [downloadingKey, setDownloadingKey] = useState10(null);
|
|
38838
38902
|
const handleDownload = async (fmtKey, url, ext) => {
|
|
38839
38903
|
if (downloadingKey) return;
|
|
@@ -39794,7 +39858,7 @@ var ResearchReportJobCard = (props) => {
|
|
|
39794
39858
|
}
|
|
39795
39859
|
const handleDownload = async () => {
|
|
39796
39860
|
if (!htmlUrl) return;
|
|
39797
|
-
const filename = `${title.replace(/[^a-z0-9]/gi, "-").toLowerCase()}.html`;
|
|
39861
|
+
const filename = `${(title ?? "").replace(/[^a-z0-9]/gi, "-").toLowerCase()}.html`;
|
|
39798
39862
|
const href = `/api/download?url=${encodeURIComponent(htmlUrl)}&filename=${encodeURIComponent(filename)}`;
|
|
39799
39863
|
try {
|
|
39800
39864
|
const response = await fetch(href);
|
|
@@ -40142,6 +40206,7 @@ var WebSearchJobCard = ({
|
|
|
40142
40206
|
] })
|
|
40143
40207
|
] }) }) });
|
|
40144
40208
|
}
|
|
40209
|
+
const safeResults = Array.isArray(results) ? results : [];
|
|
40145
40210
|
const displayQuery = query || initialTitle || "Web Search";
|
|
40146
40211
|
const statsText = [
|
|
40147
40212
|
resultCount > 0 && `${resultCount} result${resultCount !== 1 ? "s" : ""}`,
|
|
@@ -40164,7 +40229,7 @@ var WebSearchJobCard = ({
|
|
|
40164
40229
|
] })
|
|
40165
40230
|
] }),
|
|
40166
40231
|
summary && /* @__PURE__ */ jsx149("p", { className: "mt-3 text-xs text-zinc-400 leading-relaxed line-clamp-3", children: summary }),
|
|
40167
|
-
!compact &&
|
|
40232
|
+
!compact && safeResults.length > 0 && /* @__PURE__ */ jsx149("div", { className: "mt-4 space-y-2", children: safeResults.map((result, i) => /* @__PURE__ */ jsxs110(
|
|
40168
40233
|
"a",
|
|
40169
40234
|
{
|
|
40170
40235
|
href: result.url,
|
|
@@ -41531,6 +41596,7 @@ var PlatformIconGroup = ({
|
|
|
41531
41596
|
platforms,
|
|
41532
41597
|
className
|
|
41533
41598
|
}) => {
|
|
41599
|
+
const safePlatforms = Array.isArray(platforms) ? platforms : [];
|
|
41534
41600
|
const getIcon = (platform) => {
|
|
41535
41601
|
switch (platform) {
|
|
41536
41602
|
case "instagram":
|
|
@@ -41559,7 +41625,7 @@ var PlatformIconGroup = ({
|
|
|
41559
41625
|
return "text-gray-500 bg-gray-50 border-gray-100";
|
|
41560
41626
|
}
|
|
41561
41627
|
};
|
|
41562
|
-
return /* @__PURE__ */ jsx154("div", { className: cn("flex gap-2", className), children:
|
|
41628
|
+
return /* @__PURE__ */ jsx154("div", { className: cn("flex gap-2", className), children: safePlatforms.map((p, i) => {
|
|
41563
41629
|
const Icon3 = getIcon(p.platform);
|
|
41564
41630
|
if (!Icon3) return null;
|
|
41565
41631
|
return /* @__PURE__ */ jsx154(
|
|
@@ -41603,7 +41669,7 @@ var CreatorProfileSummary = ({
|
|
|
41603
41669
|
id: `avatar-${name}`,
|
|
41604
41670
|
type: "avatar",
|
|
41605
41671
|
src: avatarSrc,
|
|
41606
|
-
fallback: name.charAt(0),
|
|
41672
|
+
fallback: (name ?? "").charAt(0),
|
|
41607
41673
|
className: "w-12 h-12 ring-2 ring-purple-100"
|
|
41608
41674
|
}
|
|
41609
41675
|
),
|
|
@@ -41621,11 +41687,11 @@ var CreatorProfileSummary = ({
|
|
|
41621
41687
|
/* @__PURE__ */ jsxs115("div", { className: "flex gap-3 mt-1", children: [
|
|
41622
41688
|
followerCount && /* @__PURE__ */ jsxs115("div", { className: "flex flex-col", children: [
|
|
41623
41689
|
/* @__PURE__ */ jsx155("span", { className: "text-[10px] uppercase tracking-wider text-muted-foreground font-bold", children: "Followers" }),
|
|
41624
|
-
/* @__PURE__ */ jsx155("span", { className: "text-xs font-semibold text-purple-700", children: followerCount })
|
|
41690
|
+
/* @__PURE__ */ jsx155("span", { className: "text-xs font-semibold text-purple-700", children: String(followerCount ?? "") })
|
|
41625
41691
|
] }),
|
|
41626
41692
|
engagementRate && /* @__PURE__ */ jsxs115("div", { className: "flex flex-col border-l border-purple-100 pl-3", children: [
|
|
41627
41693
|
/* @__PURE__ */ jsx155("span", { className: "text-[10px] uppercase tracking-wider text-muted-foreground font-bold", children: "Engagement" }),
|
|
41628
|
-
/* @__PURE__ */ jsx155("span", { className: "text-xs font-semibold text-indigo-600", children: engagementRate })
|
|
41694
|
+
/* @__PURE__ */ jsx155("span", { className: "text-xs font-semibold text-indigo-600", children: String(engagementRate ?? "") })
|
|
41629
41695
|
] })
|
|
41630
41696
|
] })
|
|
41631
41697
|
] })
|
|
@@ -41641,6 +41707,7 @@ var AudienceMetricCard = ({
|
|
|
41641
41707
|
metrics,
|
|
41642
41708
|
className
|
|
41643
41709
|
}) => {
|
|
41710
|
+
const safeMetrics = Array.isArray(metrics) ? metrics : [];
|
|
41644
41711
|
return /* @__PURE__ */ jsxs116(
|
|
41645
41712
|
Card,
|
|
41646
41713
|
{
|
|
@@ -41650,10 +41717,10 @@ var AudienceMetricCard = ({
|
|
|
41650
41717
|
),
|
|
41651
41718
|
children: [
|
|
41652
41719
|
/* @__PURE__ */ jsx156(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsx156(CardTitle, { className: "text-lg font-bold text-gray-900", children: title }) }),
|
|
41653
|
-
/* @__PURE__ */ jsx156(CardContent, { className: "space-y-4", children:
|
|
41720
|
+
/* @__PURE__ */ jsx156(CardContent, { className: "space-y-4", children: safeMetrics.map((metric, i) => /* @__PURE__ */ jsxs116("div", { className: "space-y-1.5", children: [
|
|
41654
41721
|
/* @__PURE__ */ jsxs116("div", { className: "flex justify-between items-center text-sm", children: [
|
|
41655
|
-
/* @__PURE__ */ jsx156("span", { className: "font-medium text-gray-700", children: metric.label }),
|
|
41656
|
-
/* @__PURE__ */ jsx156("span", { className: "font-bold text-gray-900", children: metric.value })
|
|
41722
|
+
/* @__PURE__ */ jsx156("span", { className: "font-medium text-gray-700", children: String(metric.label ?? "") }),
|
|
41723
|
+
/* @__PURE__ */ jsx156("span", { className: "font-bold text-gray-900", children: String(metric.value ?? "") })
|
|
41657
41724
|
] }),
|
|
41658
41725
|
metric.percentage !== void 0 && /* @__PURE__ */ jsx156(
|
|
41659
41726
|
ProgressAtom,
|
|
@@ -41759,9 +41826,10 @@ var BrandAffinityGroup = ({
|
|
|
41759
41826
|
brands,
|
|
41760
41827
|
className
|
|
41761
41828
|
}) => {
|
|
41829
|
+
const safeBrands = Array.isArray(brands) ? brands : [];
|
|
41762
41830
|
return /* @__PURE__ */ jsxs118("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
41763
41831
|
/* @__PURE__ */ jsx158("h5", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: "Recent Collaborations" }),
|
|
41764
|
-
/* @__PURE__ */ jsx158("div", { className: "flex flex-wrap gap-4 items-center", children:
|
|
41832
|
+
/* @__PURE__ */ jsx158("div", { className: "flex flex-wrap gap-4 items-center", children: safeBrands.map((brand, i) => /* @__PURE__ */ jsxs118("div", { className: "group relative", children: [
|
|
41765
41833
|
/* @__PURE__ */ jsx158("div", { className: "h-10 w-10 overflow-hidden rounded-xl bg-white border border-gray-100 p-1.5 flex items-center justify-center grayscale hover:grayscale-0 transition-all duration-300 hover:scale-110 shadow-sm hover:shadow-md", children: /* @__PURE__ */ jsx158(
|
|
41766
41834
|
"img",
|
|
41767
41835
|
{
|
|
@@ -41770,7 +41838,7 @@ var BrandAffinityGroup = ({
|
|
|
41770
41838
|
className: "max-h-full max-w-full object-contain"
|
|
41771
41839
|
}
|
|
41772
41840
|
) }),
|
|
41773
|
-
/* @__PURE__ */ jsx158("div", { className: "absolute -bottom-6 left-1/2 -translate-x-1/2 px-2 py-0.5 bg-gray-900 text-white text-[10px] rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-50 pointer-events-none", children: brand.name })
|
|
41841
|
+
/* @__PURE__ */ jsx158("div", { className: "absolute -bottom-6 left-1/2 -translate-x-1/2 px-2 py-0.5 bg-gray-900 text-white text-[10px] rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-50 pointer-events-none", children: String(brand.name ?? "") })
|
|
41774
41842
|
] }, i)) })
|
|
41775
41843
|
] });
|
|
41776
41844
|
};
|
|
@@ -41781,7 +41849,8 @@ var ContentPreviewGallery = ({
|
|
|
41781
41849
|
items,
|
|
41782
41850
|
className
|
|
41783
41851
|
}) => {
|
|
41784
|
-
|
|
41852
|
+
const safeItems = Array.isArray(items) ? items : [];
|
|
41853
|
+
return /* @__PURE__ */ jsx159("div", { className: cn("grid grid-cols-2 gap-2", className), children: safeItems.map((item, i) => /* @__PURE__ */ jsxs119(
|
|
41785
41854
|
"a",
|
|
41786
41855
|
{
|
|
41787
41856
|
href: item.url || "#",
|
|
@@ -41891,6 +41960,7 @@ var TopPostsGrid = ({
|
|
|
41891
41960
|
posts,
|
|
41892
41961
|
className
|
|
41893
41962
|
}) => {
|
|
41963
|
+
const safePosts = Array.isArray(posts) ? posts : [];
|
|
41894
41964
|
return /* @__PURE__ */ jsx162(
|
|
41895
41965
|
"div",
|
|
41896
41966
|
{
|
|
@@ -41898,7 +41968,7 @@ var TopPostsGrid = ({
|
|
|
41898
41968
|
"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
41899
41969
|
className
|
|
41900
41970
|
),
|
|
41901
|
-
children:
|
|
41971
|
+
children: safePosts.map((post, i) => /* @__PURE__ */ jsxs122(
|
|
41902
41972
|
"div",
|
|
41903
41973
|
{
|
|
41904
41974
|
className: "group relative aspect-square overflow-hidden rounded-2xl bg-gray-100 border border-purple-50",
|
|
@@ -41916,20 +41986,20 @@ var TopPostsGrid = ({
|
|
|
41916
41986
|
/* @__PURE__ */ jsxs122("span", { className: "flex items-center gap-1", children: [
|
|
41917
41987
|
/* @__PURE__ */ jsx162(Heart, { className: "w-3 h-3 fill-white" }),
|
|
41918
41988
|
" ",
|
|
41919
|
-
post.likes
|
|
41989
|
+
String(post.likes ?? "")
|
|
41920
41990
|
] }),
|
|
41921
41991
|
/* @__PURE__ */ jsxs122("span", { className: "flex items-center gap-1", children: [
|
|
41922
41992
|
/* @__PURE__ */ jsx162(MessageCircle, { className: "w-3 h-3 fill-white" }),
|
|
41923
41993
|
" ",
|
|
41924
|
-
post.comments
|
|
41994
|
+
String(post.comments ?? "")
|
|
41925
41995
|
] }),
|
|
41926
41996
|
/* @__PURE__ */ jsxs122("span", { className: "flex items-center gap-1", children: [
|
|
41927
41997
|
/* @__PURE__ */ jsx162(ChartColumn, { className: "w-3 h-3" }),
|
|
41928
41998
|
" ",
|
|
41929
|
-
post.engagement
|
|
41999
|
+
String(post.engagement ?? "")
|
|
41930
42000
|
] })
|
|
41931
42001
|
] }),
|
|
41932
|
-
/* @__PURE__ */ jsx162("span", { className: "text-[10px] text-gray-300 mt-2", children: post.date })
|
|
42002
|
+
/* @__PURE__ */ jsx162("span", { className: "text-[10px] text-gray-300 mt-2", children: String(post.date ?? "") })
|
|
41933
42003
|
] })
|
|
41934
42004
|
]
|
|
41935
42005
|
},
|
|
@@ -41949,6 +42019,7 @@ var CreatorActionHeader = ({
|
|
|
41949
42019
|
actions,
|
|
41950
42020
|
className
|
|
41951
42021
|
}) => {
|
|
42022
|
+
const safeActions = Array.isArray(actions) ? actions : [];
|
|
41952
42023
|
return /* @__PURE__ */ jsxs123(
|
|
41953
42024
|
"div",
|
|
41954
42025
|
{
|
|
@@ -41972,17 +42043,17 @@ var CreatorActionHeader = ({
|
|
|
41972
42043
|
/* @__PURE__ */ jsxs123("div", { className: "flex flex-col md:flex-row items-start md:items-end gap-6", children: [
|
|
41973
42044
|
/* @__PURE__ */ jsx163("div", { className: "p-2 bg-white rounded-[32px] shadow-lg", children: /* @__PURE__ */ jsxs123(Avatar, { className: "h-32 w-32 rounded-[24px] border-4 border-white", children: [
|
|
41974
42045
|
/* @__PURE__ */ jsx163(AvatarImage, { src: avatarSrc, className: "rounded-[24px]" }),
|
|
41975
|
-
/* @__PURE__ */ jsx163(AvatarFallback, { className: "rounded-[24px] bg-purple-50 text-purple-600 text-3xl font-bold", children: name.charAt(0) })
|
|
42046
|
+
/* @__PURE__ */ jsx163(AvatarFallback, { className: "rounded-[24px] bg-purple-50 text-purple-600 text-3xl font-bold", children: (name ?? "").charAt(0) })
|
|
41976
42047
|
] }) }),
|
|
41977
42048
|
/* @__PURE__ */ jsxs123("div", { className: "mb-2", children: [
|
|
41978
|
-
/* @__PURE__ */ jsx163("h1", { className: "text-3xl font-bold text-gray-900 tracking-tight", children: name }),
|
|
42049
|
+
/* @__PURE__ */ jsx163("h1", { className: "text-3xl font-bold text-gray-900 tracking-tight", children: String(name ?? "") }),
|
|
41979
42050
|
/* @__PURE__ */ jsxs123("p", { className: "text-purple-600 font-medium tracking-wide", children: [
|
|
41980
42051
|
"@",
|
|
41981
|
-
handle
|
|
42052
|
+
String(handle ?? "")
|
|
41982
42053
|
] })
|
|
41983
42054
|
] })
|
|
41984
42055
|
] }),
|
|
41985
|
-
/* @__PURE__ */ jsx163("div", { className: "flex items-center gap-3 mb-2", children:
|
|
42056
|
+
/* @__PURE__ */ jsx163("div", { className: "flex items-center gap-3 mb-2", children: safeActions.map((action, i) => /* @__PURE__ */ jsx163(
|
|
41986
42057
|
Button,
|
|
41987
42058
|
{
|
|
41988
42059
|
variant: action.variant || "default",
|
|
@@ -41990,7 +42061,7 @@ var CreatorActionHeader = ({
|
|
|
41990
42061
|
"rounded-2xl px-6 h-11 font-bold transition-all",
|
|
41991
42062
|
action.variant === "default" && "bg-purple-600 hover:bg-purple-700 shadow-md hover:shadow-purple-200"
|
|
41992
42063
|
),
|
|
41993
|
-
children: action.label
|
|
42064
|
+
children: String(action.label ?? "")
|
|
41994
42065
|
},
|
|
41995
42066
|
i
|
|
41996
42067
|
)) })
|
|
@@ -42025,7 +42096,7 @@ var CreatorSearch = React113.memo(
|
|
|
42025
42096
|
{
|
|
42026
42097
|
id: `platform-${p}`,
|
|
42027
42098
|
type: "badge",
|
|
42028
|
-
label: p,
|
|
42099
|
+
label: String(p ?? ""),
|
|
42029
42100
|
variant: "outline",
|
|
42030
42101
|
className: "bg-background bg-gray200 border-gray400 text-white font-medium"
|
|
42031
42102
|
},
|
|
@@ -42622,6 +42693,7 @@ function CreatorCompactView({
|
|
|
42622
42693
|
timeDisplay,
|
|
42623
42694
|
isLoading
|
|
42624
42695
|
}) {
|
|
42696
|
+
const safeVersions = Array.isArray(versions) ? versions : [];
|
|
42625
42697
|
const isComplete = versionStatus === "completed" || versionStatus === "complete";
|
|
42626
42698
|
const statusTitle = isComplete ? "Creator Search Complete" : versionStatus === "failed" ? "Creator Search Failed" : "Creator Search Processing";
|
|
42627
42699
|
if (isLoading) {
|
|
@@ -42633,7 +42705,7 @@ function CreatorCompactView({
|
|
|
42633
42705
|
/* @__PURE__ */ jsx169("h4", { className: "w-fit rounded-md bg-purple200 px-2 py-[4px] text-xs font-medium text-purpleText", children: "VERIFIED CREATORS LIST" }),
|
|
42634
42706
|
/* @__PURE__ */ jsx169("h3", { className: "text-gray900 md:text-lg font-bold", children: statusTitle })
|
|
42635
42707
|
] }),
|
|
42636
|
-
|
|
42708
|
+
safeVersions.length > 1 && /* @__PURE__ */ jsx169("div", { className: "relative md:self-start", children: /* @__PURE__ */ jsxs129(DropdownMenu, { children: [
|
|
42637
42709
|
/* @__PURE__ */ jsxs129(
|
|
42638
42710
|
DropdownMenuTrigger,
|
|
42639
42711
|
{
|
|
@@ -42646,7 +42718,7 @@ function CreatorCompactView({
|
|
|
42646
42718
|
]
|
|
42647
42719
|
}
|
|
42648
42720
|
),
|
|
42649
|
-
/* @__PURE__ */ jsx169(DropdownMenuContent, { className: "bg-[var(--creator-dropdown-bg)] border-2 border-gray400 min-w-[120px] max-h-[150px] overflow-y-auto", children:
|
|
42721
|
+
/* @__PURE__ */ jsx169(DropdownMenuContent, { className: "bg-[var(--creator-dropdown-bg)] border-2 border-gray400 min-w-[120px] max-h-[150px] overflow-y-auto", children: safeVersions.map((v) => /* @__PURE__ */ jsxs129(
|
|
42650
42722
|
DropdownMenuItem,
|
|
42651
42723
|
{
|
|
42652
42724
|
onClick: () => onVersionSelect(v),
|
|
@@ -43335,8 +43407,9 @@ function filterPostsByPlatform(posts, platform) {
|
|
|
43335
43407
|
}
|
|
43336
43408
|
function PlatformMetricsBanner({
|
|
43337
43409
|
platform,
|
|
43338
|
-
metrics
|
|
43410
|
+
metrics: metricsProp
|
|
43339
43411
|
}) {
|
|
43412
|
+
const metrics = metricsProp ?? {};
|
|
43340
43413
|
const platformName = getPlatformName(platform);
|
|
43341
43414
|
const bgColor = getPlatformBgColor(platform);
|
|
43342
43415
|
const IconComponent = getPlatformIcon(platform);
|
|
@@ -43366,7 +43439,7 @@ function PlatformMetricsBanner({
|
|
|
43366
43439
|
] }),
|
|
43367
43440
|
/* @__PURE__ */ jsxs132("div", { className: "flex flex-col items-start md:min-w-0", children: [
|
|
43368
43441
|
/* @__PURE__ */ jsxs132("span", { className: "text-xs md:text-md font-semibold text-gray900", children: [
|
|
43369
|
-
(metrics
|
|
43442
|
+
((metrics?.engagementRate ?? 0) * 100).toFixed(2),
|
|
43370
43443
|
"%"
|
|
43371
43444
|
] }),
|
|
43372
43445
|
/* @__PURE__ */ jsx173("span", { className: "text-xs text-gray900 opacity-80", children: "Engagement Rate" })
|