pxengine 0.1.58 → 0.1.60
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 +337 -1514
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -208
- package/dist/index.d.ts +7 -208
- package/dist/index.mjs +335 -1502
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +1 -394
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -36,8 +36,6 @@ __export(index_exports, {
|
|
|
36
36
|
AccordionItem: () => AccordionItem,
|
|
37
37
|
AccordionTrigger: () => AccordionTrigger,
|
|
38
38
|
ActionButton: () => ActionButton,
|
|
39
|
-
AgentCard: () => AgentCard,
|
|
40
|
-
AgentDataTable: () => AgentDataTable,
|
|
41
39
|
Alert: () => Alert,
|
|
42
40
|
AlertAtom: () => AlertAtom,
|
|
43
41
|
AlertDescription: () => AlertDescription,
|
|
@@ -196,7 +194,6 @@ __export(index_exports, {
|
|
|
196
194
|
InputOTPGroup: () => InputOTPGroup,
|
|
197
195
|
InputOTPSeparator: () => InputOTPSeparator,
|
|
198
196
|
InputOTPSlot: () => InputOTPSlot,
|
|
199
|
-
InstructionPreview: () => InstructionPreview,
|
|
200
197
|
KbdAtom: () => KbdAtom,
|
|
201
198
|
KeywordBundlesDisplay: () => KeywordBundlesDisplay,
|
|
202
199
|
KeywordBundlesEdit: () => KeywordBundlesEdit,
|
|
@@ -214,9 +211,6 @@ __export(index_exports, {
|
|
|
214
211
|
MenubarSeparator: () => MenubarSeparator,
|
|
215
212
|
MenubarShortcut: () => MenubarShortcut,
|
|
216
213
|
MenubarTrigger: () => MenubarTrigger,
|
|
217
|
-
MultiAgentCard: () => MultiAgentCard,
|
|
218
|
-
MultiAgentPlan: () => MultiAgentPlan,
|
|
219
|
-
MultiAgentUISelector: () => MultiAgentUISelector,
|
|
220
214
|
NavigationMenu: () => NavigationMenu,
|
|
221
215
|
NavigationMenuContent: () => NavigationMenuContent,
|
|
222
216
|
NavigationMenuItem: () => NavigationMenuItem,
|
|
@@ -284,7 +278,6 @@ __export(index_exports, {
|
|
|
284
278
|
SocialPostCard: () => SocialPostCard,
|
|
285
279
|
Spinner: () => Spinner,
|
|
286
280
|
SpinnerAtom: () => SpinnerAtom,
|
|
287
|
-
StageIndicator: () => StageIndicator,
|
|
288
281
|
StatsGrid: () => StatsGrid,
|
|
289
282
|
StepWizard: () => StepWizard,
|
|
290
283
|
Switch: () => Switch,
|
|
@@ -308,16 +301,13 @@ __export(index_exports, {
|
|
|
308
301
|
TextareaAtom: () => TextareaAtom,
|
|
309
302
|
TimelineAtom: () => TimelineAtom,
|
|
310
303
|
ToggleAtom: () => ToggleAtom,
|
|
311
|
-
ToolListCard: () => ToolListCard,
|
|
312
304
|
Tooltip: () => Tooltip,
|
|
313
305
|
TooltipAtom: () => TooltipAtom,
|
|
314
306
|
TooltipContent: () => TooltipContent,
|
|
315
307
|
TooltipProvider: () => TooltipProvider,
|
|
316
308
|
TooltipTrigger: () => TooltipTrigger,
|
|
317
309
|
TopPostsGrid: () => TopPostsGrid,
|
|
318
|
-
UIComponentSelector: () => UIComponentSelector,
|
|
319
310
|
VideoAtom: () => VideoAtom,
|
|
320
|
-
WorkflowVisualizer: () => WorkflowVisualizer,
|
|
321
311
|
cn: () => cn,
|
|
322
312
|
defaultFetchSelections: () => defaultFetchSelections,
|
|
323
313
|
defaultPersistSelection: () => defaultPersistSelection,
|
|
@@ -328,7 +318,7 @@ __export(index_exports, {
|
|
|
328
318
|
module.exports = __toCommonJS(index_exports);
|
|
329
319
|
|
|
330
320
|
// src/render/PXEngineRenderer.tsx
|
|
331
|
-
var
|
|
321
|
+
var import_react78 = __toESM(require("react"), 1);
|
|
332
322
|
|
|
333
323
|
// src/atoms/index.ts
|
|
334
324
|
var atoms_exports = {};
|
|
@@ -428,9 +418,11 @@ var TextAtom = ({
|
|
|
428
418
|
label: "var(--gray400)"
|
|
429
419
|
};
|
|
430
420
|
const Component2 = variant === "small" || variant === "muted" || variant === "label" ? "p" : variant;
|
|
421
|
+
const hasPxBg = style && "--px-bg-color" in style;
|
|
431
422
|
const wrapperStyles = {
|
|
432
423
|
color: `var(--px-text-color, ${defaultColors[variant] ?? "inherit"})`,
|
|
433
424
|
...backgroundColor && { backgroundColor },
|
|
425
|
+
...hasPxBg && { backgroundColor: "var(--px-bg-color, transparent)" },
|
|
434
426
|
...style
|
|
435
427
|
};
|
|
436
428
|
if (markdown) {
|
|
@@ -24893,14 +24885,20 @@ var IconAtom = ({
|
|
|
24893
24885
|
console.warn(`[IconAtom] Icon "${icon}" not found in lucide-react.`);
|
|
24894
24886
|
return null;
|
|
24895
24887
|
}
|
|
24888
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
24889
|
+
const resolvedColor = hasPxVars ? void 0 : color;
|
|
24890
|
+
const resolvedStyle = {
|
|
24891
|
+
...hasPxVars && { color: "var(--px-text-color, currentColor)" },
|
|
24892
|
+
...style
|
|
24893
|
+
};
|
|
24896
24894
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
24897
24895
|
IconComponent,
|
|
24898
24896
|
{
|
|
24899
24897
|
size,
|
|
24900
|
-
color,
|
|
24898
|
+
color: resolvedColor,
|
|
24901
24899
|
strokeWidth,
|
|
24902
|
-
className: cn("shrink-0", textColor, className),
|
|
24903
|
-
style
|
|
24900
|
+
className: cn("shrink-0", !hasPxVars && textColor, className),
|
|
24901
|
+
style: resolvedStyle
|
|
24904
24902
|
}
|
|
24905
24903
|
);
|
|
24906
24904
|
};
|
|
@@ -24935,6 +24933,14 @@ var ButtonAtom = ({
|
|
|
24935
24933
|
};
|
|
24936
24934
|
const customClass = variantMap[variant] || "";
|
|
24937
24935
|
const shadcnVariant = ["purple", "gradient"].includes(variant) ? "default" : variant;
|
|
24936
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
24937
|
+
const mergedStyle = {
|
|
24938
|
+
...style,
|
|
24939
|
+
...hasPxVars ? {
|
|
24940
|
+
backgroundColor: "var(--px-accent-color)",
|
|
24941
|
+
color: "var(--px-accent-fg)"
|
|
24942
|
+
} : {}
|
|
24943
|
+
};
|
|
24938
24944
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
24939
24945
|
Button,
|
|
24940
24946
|
{
|
|
@@ -24943,7 +24949,8 @@ var ButtonAtom = ({
|
|
|
24943
24949
|
disabled: disabled || isLoading,
|
|
24944
24950
|
onClick: handleClick,
|
|
24945
24951
|
className: cn("rounded-full font-semibold", customClass, className),
|
|
24946
|
-
style,
|
|
24952
|
+
style: mergedStyle,
|
|
24953
|
+
"data-px-styled": hasPxVars ? "" : void 0,
|
|
24947
24954
|
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
24948
24955
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
24949
24956
|
label
|
|
@@ -25072,6 +25079,15 @@ var CardAtom = ({
|
|
|
25072
25079
|
style,
|
|
25073
25080
|
renderComponent
|
|
25074
25081
|
}) => {
|
|
25082
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
25083
|
+
const mergedStyle = {
|
|
25084
|
+
...style,
|
|
25085
|
+
...hasPxVars ? {
|
|
25086
|
+
backgroundColor: "var(--px-bg-color)",
|
|
25087
|
+
borderColor: "var(--px-border-color)",
|
|
25088
|
+
color: "var(--px-text-color)"
|
|
25089
|
+
} : {}
|
|
25090
|
+
};
|
|
25075
25091
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
25076
25092
|
Card,
|
|
25077
25093
|
{
|
|
@@ -25079,13 +25095,14 @@ var CardAtom = ({
|
|
|
25079
25095
|
"rounded-[32px] border border-border/50 bg-card/80 text-card-foreground shadow-[0_8px_30px_rgb(0,0,0,0.04)] overflow-hidden backdrop-blur-xl ring-1 ring-border/5",
|
|
25080
25096
|
className
|
|
25081
25097
|
),
|
|
25082
|
-
style,
|
|
25098
|
+
style: mergedStyle,
|
|
25099
|
+
"data-px-styled": hasPxVars ? "" : void 0,
|
|
25083
25100
|
children: [
|
|
25084
25101
|
(title || description) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(CardHeader, { children: [
|
|
25085
25102
|
title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "text-xl font-bold text-gray900", children: title }),
|
|
25086
25103
|
description && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardDescription, { children: description })
|
|
25087
25104
|
] }),
|
|
25088
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardContent, { className: "space-y-4", children: children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.default.Fragment, { children: renderComponent(child, index) }, child.id || `card-content-${index}`)) }),
|
|
25105
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardContent, { className: "space-y-4", children: (children || []).map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.default.Fragment, { children: renderComponent(child, index) }, child.id || `card-content-${index}`)) }),
|
|
25089
25106
|
footer && footer.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardFooter, { className: "bg-gray50/50 border-t border-gray200 flex flex-wrap gap-2 pt-6", children: footer.map((footerChild, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.default.Fragment, { children: renderComponent(footerChild, index) }, footerChild.id || `card-footer-${index}`)) })
|
|
25090
25107
|
]
|
|
25091
25108
|
}
|
|
@@ -25434,8 +25451,9 @@ var InputAtom = ({
|
|
|
25434
25451
|
const alignmentClass = getAlignmentClass(style?.textAlign);
|
|
25435
25452
|
const alignedContainerClass = cn(containerClass, alignmentClass);
|
|
25436
25453
|
const { textAlign, ...remainingStyle } = style || {};
|
|
25454
|
+
const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
|
|
25437
25455
|
const labelBaseStyle = {
|
|
25438
|
-
color: labelColor,
|
|
25456
|
+
color: hasPxVars ? "var(--px-label-color, inherit)" : labelColor,
|
|
25439
25457
|
backgroundColor: "transparent",
|
|
25440
25458
|
background: "none"
|
|
25441
25459
|
};
|
|
@@ -25455,6 +25473,14 @@ var InputAtom = ({
|
|
|
25455
25473
|
);
|
|
25456
25474
|
};
|
|
25457
25475
|
const renderInput = () => {
|
|
25476
|
+
const inputStyle = {
|
|
25477
|
+
...hasPxVars && {
|
|
25478
|
+
color: "var(--px-text-color, inherit)",
|
|
25479
|
+
backgroundColor: "var(--px-bg-color, transparent)",
|
|
25480
|
+
borderColor: "var(--px-border-color, hsl(var(--border)))"
|
|
25481
|
+
},
|
|
25482
|
+
...remainingStyle
|
|
25483
|
+
};
|
|
25458
25484
|
const commonProps = {
|
|
25459
25485
|
placeholder,
|
|
25460
25486
|
value: defaultValue,
|
|
@@ -25465,7 +25491,7 @@ var InputAtom = ({
|
|
|
25465
25491
|
"rounded-xl border-border bg-transparent focus:ring-primary shadow-none",
|
|
25466
25492
|
className
|
|
25467
25493
|
),
|
|
25468
|
-
style:
|
|
25494
|
+
style: inputStyle
|
|
25469
25495
|
};
|
|
25470
25496
|
switch (inputType) {
|
|
25471
25497
|
case "textarea":
|
|
@@ -25585,7 +25611,6 @@ var InputAtom = ({
|
|
|
25585
25611
|
);
|
|
25586
25612
|
}
|
|
25587
25613
|
};
|
|
25588
|
-
const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
|
|
25589
25614
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: alignedContainerClass, style: remainingStyle, "data-px-styled": hasPxVars ? "" : void 0, children: [
|
|
25590
25615
|
inputType !== "checkbox" && inputType !== "switch" && renderLabel(),
|
|
25591
25616
|
renderInput()
|
|
@@ -25701,9 +25726,22 @@ var AvatarAtom = ({
|
|
|
25701
25726
|
className,
|
|
25702
25727
|
style
|
|
25703
25728
|
}) => {
|
|
25704
|
-
|
|
25729
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
25730
|
+
const fallbackStyle = hasPxVars ? {
|
|
25731
|
+
backgroundColor: "var(--px-bg-color, var(--purple50))",
|
|
25732
|
+
color: "var(--px-text-color, var(--purple100))",
|
|
25733
|
+
borderColor: "var(--px-border-color, transparent)"
|
|
25734
|
+
} : void 0;
|
|
25735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Avatar, { className: cn("h-10 w-10", className), style, "data-px-styled": hasPxVars ? "" : void 0, children: [
|
|
25705
25736
|
src && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AvatarImage, { src, alt }),
|
|
25706
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
25737
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
25738
|
+
AvatarFallback,
|
|
25739
|
+
{
|
|
25740
|
+
className: cn("font-bold uppercase", !hasPxVars && "bg-purple50 text-purple600"),
|
|
25741
|
+
style: fallbackStyle,
|
|
25742
|
+
children: fallback
|
|
25743
|
+
}
|
|
25744
|
+
)
|
|
25707
25745
|
] });
|
|
25708
25746
|
};
|
|
25709
25747
|
|
|
@@ -25871,7 +25909,20 @@ var ProgressAtom = ({
|
|
|
25871
25909
|
style
|
|
25872
25910
|
}) => {
|
|
25873
25911
|
const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
|
|
25874
|
-
|
|
25912
|
+
const progressStyle = hasPxVars ? {
|
|
25913
|
+
backgroundColor: "var(--px-track-color)"
|
|
25914
|
+
} : {};
|
|
25915
|
+
const wrapperStyle = {
|
|
25916
|
+
...style
|
|
25917
|
+
};
|
|
25918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: cn("w-full py-2", className), style: wrapperStyle, "data-px-styled": hasPxVars ? "" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
25919
|
+
Progress,
|
|
25920
|
+
{
|
|
25921
|
+
value,
|
|
25922
|
+
className: "h-2 bg-gray-100",
|
|
25923
|
+
style: progressStyle
|
|
25924
|
+
}
|
|
25925
|
+
) });
|
|
25875
25926
|
};
|
|
25876
25927
|
|
|
25877
25928
|
// src/components/ui/skeleton.tsx
|
|
@@ -25981,12 +26032,22 @@ var AlertAtom = ({
|
|
|
25981
26032
|
};
|
|
25982
26033
|
const customClass = variantMap[variant] || "";
|
|
25983
26034
|
const shadcnVariant = ["warning", "info", "success"].includes(variant) ? "default" : variant;
|
|
26035
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
26036
|
+
const mergedStyle = {
|
|
26037
|
+
...style,
|
|
26038
|
+
...hasPxVars ? {
|
|
26039
|
+
color: "var(--px-text-color)",
|
|
26040
|
+
backgroundColor: "var(--px-bg-color)",
|
|
26041
|
+
borderColor: "var(--px-border-color)"
|
|
26042
|
+
} : {}
|
|
26043
|
+
};
|
|
25984
26044
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
25985
26045
|
Alert,
|
|
25986
26046
|
{
|
|
25987
26047
|
variant: shadcnVariant,
|
|
25988
26048
|
className: cn("rounded-2xl", customClass, className),
|
|
25989
|
-
style,
|
|
26049
|
+
style: mergedStyle,
|
|
26050
|
+
"data-px-styled": hasPxVars ? "" : void 0,
|
|
25990
26051
|
children: [
|
|
25991
26052
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon3, { className: "h-4 w-4" }),
|
|
25992
26053
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AlertTitle, { className: "font-bold", children: title }),
|
|
@@ -26022,13 +26083,20 @@ Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
26022
26083
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
26023
26084
|
var SeparatorAtom = ({
|
|
26024
26085
|
orientation = "horizontal",
|
|
26025
|
-
className
|
|
26086
|
+
className,
|
|
26087
|
+
style
|
|
26026
26088
|
}) => {
|
|
26089
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
26090
|
+
const resolvedStyle = {
|
|
26091
|
+
...hasPxVars && { backgroundColor: "var(--px-bg-color)" },
|
|
26092
|
+
...style
|
|
26093
|
+
};
|
|
26027
26094
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
26028
26095
|
Separator2,
|
|
26029
26096
|
{
|
|
26030
26097
|
orientation,
|
|
26031
|
-
className: cn("bg-gray-100", className)
|
|
26098
|
+
className: cn("bg-gray-100", className),
|
|
26099
|
+
style: resolvedStyle
|
|
26032
26100
|
}
|
|
26033
26101
|
);
|
|
26034
26102
|
};
|
|
@@ -26149,11 +26217,11 @@ var TableAtom = ({
|
|
|
26149
26217
|
borderColor
|
|
26150
26218
|
},
|
|
26151
26219
|
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Table3, { children: [
|
|
26152
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableHeader, {
|
|
26220
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableRow, { style: { backgroundColor: headerBgColor }, children: safeHeaders.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
26153
26221
|
TableHead,
|
|
26154
26222
|
{
|
|
26155
26223
|
className: "text-xs font-bold uppercase tracking-widest px-6 py-4",
|
|
26156
|
-
style: { color: headerTextColor },
|
|
26224
|
+
style: { color: headerTextColor, backgroundColor: headerBgColor },
|
|
26157
26225
|
children: header
|
|
26158
26226
|
},
|
|
26159
26227
|
i
|
|
@@ -31774,16 +31842,28 @@ var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
|
31774
31842
|
var CalendarAtom = ({
|
|
31775
31843
|
mode = "single",
|
|
31776
31844
|
selectedDate,
|
|
31777
|
-
className
|
|
31845
|
+
className,
|
|
31846
|
+
style
|
|
31778
31847
|
}) => {
|
|
31779
31848
|
const date = selectedDate ? new Date(selectedDate) : void 0;
|
|
31849
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
31850
|
+
const wrapperStyle = {
|
|
31851
|
+
...hasPxVars && {
|
|
31852
|
+
backgroundColor: "var(--px-bg-color, transparent)",
|
|
31853
|
+
borderColor: "var(--px-border-color, hsl(var(--border) / 0.5))",
|
|
31854
|
+
color: "var(--px-text-color, inherit)"
|
|
31855
|
+
},
|
|
31856
|
+
...style
|
|
31857
|
+
};
|
|
31780
31858
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
31781
31859
|
"div",
|
|
31782
31860
|
{
|
|
31783
31861
|
className: cn(
|
|
31784
|
-
"p-4
|
|
31862
|
+
"p-4 backdrop-blur-xl rounded-[28px] border shadow-[0_20px_50px_rgba(0,0,0,0.1)] inline-block transition-all hover:shadow-[0_20px_60px_rgba(0,0,0,0.15)] ring-1 ring-border/5",
|
|
31863
|
+
!hasPxVars && "bg-background/80 border-border/50",
|
|
31785
31864
|
className
|
|
31786
31865
|
),
|
|
31866
|
+
style: wrapperStyle,
|
|
31787
31867
|
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Calendar2, { mode, selected: date, className: "rounded-xl" })
|
|
31788
31868
|
}
|
|
31789
31869
|
);
|
|
@@ -33558,12 +33638,25 @@ var ChartAtom = ({
|
|
|
33558
33638
|
return null;
|
|
33559
33639
|
}
|
|
33560
33640
|
};
|
|
33641
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
33642
|
+
const wrapperStyle = {
|
|
33643
|
+
...hasPxVars && {
|
|
33644
|
+
color: "var(--px-text-color, inherit)",
|
|
33645
|
+
backgroundColor: "var(--px-bg-color, transparent)",
|
|
33646
|
+
borderColor: "var(--px-border-color, transparent)",
|
|
33647
|
+
borderWidth: hasPxVars ? "1px" : void 0,
|
|
33648
|
+
borderStyle: hasPxVars ? "solid" : void 0,
|
|
33649
|
+
borderRadius: "1rem",
|
|
33650
|
+
padding: "0.75rem"
|
|
33651
|
+
},
|
|
33652
|
+
...style
|
|
33653
|
+
};
|
|
33561
33654
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
33562
33655
|
ChartContainer,
|
|
33563
33656
|
{
|
|
33564
33657
|
config: safeConfig,
|
|
33565
33658
|
className: cn("min-h-[200px] w-full", className),
|
|
33566
|
-
style,
|
|
33659
|
+
style: wrapperStyle,
|
|
33567
33660
|
children: renderChart()
|
|
33568
33661
|
}
|
|
33569
33662
|
);
|
|
@@ -33606,7 +33699,8 @@ var import_react52 = __toESM(require("react"), 1);
|
|
|
33606
33699
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
33607
33700
|
var RatingAtom = ({ value, max: max2 = 5, readonly = false, className, style, onChange }) => {
|
|
33608
33701
|
const [hoverValue, setHoverValue] = import_react52.default.useState(null);
|
|
33609
|
-
|
|
33702
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
33703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: cn("flex items-center gap-1", className), style, "data-px-styled": hasPxVars ? "" : void 0, children: Array.from({ length: max2 }, (_, i) => {
|
|
33610
33704
|
const starValue = i + 1;
|
|
33611
33705
|
const isActive = (hoverValue ?? value) >= starValue;
|
|
33612
33706
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
@@ -33614,9 +33708,13 @@ var RatingAtom = ({ value, max: max2 = 5, readonly = false, className, style, on
|
|
|
33614
33708
|
{
|
|
33615
33709
|
className: cn(
|
|
33616
33710
|
"h-5 w-5 transition-colors",
|
|
33617
|
-
isActive ? "fill-yellow-400 text-yellow-400" : "text-gray-300",
|
|
33711
|
+
!hasPxVars && (isActive ? "fill-yellow-400 text-yellow-400" : "text-gray-300"),
|
|
33618
33712
|
!readonly && "cursor-pointer hover:scale-110"
|
|
33619
33713
|
),
|
|
33714
|
+
style: hasPxVars ? {
|
|
33715
|
+
color: isActive ? "var(--px-accent-color, #facc15)" : "var(--px-track-color, #d1d5db)",
|
|
33716
|
+
fill: isActive ? "var(--px-accent-color, #facc15)" : "transparent"
|
|
33717
|
+
} : void 0,
|
|
33620
33718
|
onClick: () => !readonly && onChange?.(starValue),
|
|
33621
33719
|
onMouseEnter: () => !readonly && setHoverValue(starValue),
|
|
33622
33720
|
onMouseLeave: () => !readonly && setHoverValue(null)
|
|
@@ -33719,8 +33817,6 @@ ArrowToggleAtom.displayName = "ArrowToggleAtom";
|
|
|
33719
33817
|
var molecules_exports = {};
|
|
33720
33818
|
__export(molecules_exports, {
|
|
33721
33819
|
ActionButton: () => ActionButton,
|
|
33722
|
-
AgentCard: () => AgentCard,
|
|
33723
|
-
AgentDataTable: () => AgentDataTable,
|
|
33724
33820
|
AudienceDemographicsCard: () => AudienceDemographicsCard,
|
|
33725
33821
|
AudienceMetricCard: () => AudienceMetricCard,
|
|
33726
33822
|
BrandAffinityGroup: () => BrandAffinityGroup,
|
|
@@ -33754,14 +33850,10 @@ __export(molecules_exports, {
|
|
|
33754
33850
|
GoogleSheetsConnectCard: () => GoogleSheetsConnectCard,
|
|
33755
33851
|
GoogleSheetsListCard: () => GoogleSheetsListCard,
|
|
33756
33852
|
GrowthChartCard: () => GrowthChartCard,
|
|
33757
|
-
InstructionPreview: () => InstructionPreview,
|
|
33758
33853
|
KeywordBundlesDisplay: () => KeywordBundlesDisplay,
|
|
33759
33854
|
KeywordBundlesEdit: () => KeywordBundlesEdit,
|
|
33760
33855
|
LoadingOverlay: () => LoadingOverlay,
|
|
33761
33856
|
MCQCard: () => MCQCard,
|
|
33762
|
-
MultiAgentCard: () => MultiAgentCard,
|
|
33763
|
-
MultiAgentPlan: () => MultiAgentPlan,
|
|
33764
|
-
MultiAgentUISelector: () => MultiAgentUISelector,
|
|
33765
33857
|
NotificationList: () => NotificationList,
|
|
33766
33858
|
PlatformIconGroup: () => PlatformIconGroup,
|
|
33767
33859
|
PlatformSelectDisplay: () => PlatformSelectDisplay,
|
|
@@ -33769,14 +33861,10 @@ __export(molecules_exports, {
|
|
|
33769
33861
|
RecommendationCard: () => RecommendationCard,
|
|
33770
33862
|
SearchSpecCard: () => SearchSpecCard,
|
|
33771
33863
|
SocialPostCard: () => SocialPostCard,
|
|
33772
|
-
StageIndicator: () => StageIndicator,
|
|
33773
33864
|
StatsGrid: () => StatsGrid,
|
|
33774
33865
|
StepWizard: () => StepWizard,
|
|
33775
33866
|
TagCloud: () => TagCloud,
|
|
33776
|
-
ToolListCard: () => ToolListCard,
|
|
33777
33867
|
TopPostsGrid: () => TopPostsGrid,
|
|
33778
|
-
UIComponentSelector: () => UIComponentSelector,
|
|
33779
|
-
WorkflowVisualizer: () => WorkflowVisualizer,
|
|
33780
33868
|
defaultFetchSelections: () => defaultFetchSelections,
|
|
33781
33869
|
defaultPersistSelection: () => defaultPersistSelection,
|
|
33782
33870
|
useCreatorWidgetPolling: () => useCreatorWidgetPolling
|
|
@@ -34607,9 +34695,16 @@ var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
|
34607
34695
|
var StatsGrid = ({
|
|
34608
34696
|
items,
|
|
34609
34697
|
stats,
|
|
34610
|
-
className
|
|
34698
|
+
className,
|
|
34699
|
+
style
|
|
34611
34700
|
}) => {
|
|
34612
34701
|
const displayItems = items || stats || [];
|
|
34702
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
34703
|
+
const cardStyle = hasPxVars ? {
|
|
34704
|
+
backgroundColor: "var(--px-bg-color, var(--card-background, white))",
|
|
34705
|
+
borderColor: "var(--px-border-color, var(--border-color, #e5e7eb))"
|
|
34706
|
+
} : void 0;
|
|
34707
|
+
const textColor = hasPxVars ? "var(--px-text-color, inherit)" : void 0;
|
|
34613
34708
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
34614
34709
|
"div",
|
|
34615
34710
|
{
|
|
@@ -34617,6 +34712,7 @@ var StatsGrid = ({
|
|
|
34617
34712
|
"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
34618
34713
|
className
|
|
34619
34714
|
),
|
|
34715
|
+
style,
|
|
34620
34716
|
children: displayItems?.map((item, index) => {
|
|
34621
34717
|
const Icon3 = item.icon ? lucide_react_exports[item.icon] : null;
|
|
34622
34718
|
const trendColor = item.trendDirection === "up" ? "text-emerald-600 dark:text-emerald-400" : item.trendDirection === "down" ? "text-rose-600 dark:text-rose-400" : "text-muted-foreground";
|
|
@@ -34624,7 +34720,11 @@ var StatsGrid = ({
|
|
|
34624
34720
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
34625
34721
|
Card,
|
|
34626
34722
|
{
|
|
34627
|
-
className:
|
|
34723
|
+
className: cn(
|
|
34724
|
+
"backdrop-blur-sm shadow-sm hover:shadow-md transition-all duration-300 rounded-[24px] overflow-hidden",
|
|
34725
|
+
!hasPxVars && "bg-[var(--card-background,theme(colors.white))] dark:bg-[var(--card-background,theme(colors.zinc.900))] border-[var(--border-color,theme(colors.gray.200))]"
|
|
34726
|
+
),
|
|
34727
|
+
style: cardStyle,
|
|
34628
34728
|
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(CardContent, { className: "p-5 flex flex-col gap-1.5", children: [
|
|
34629
34729
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
34630
34730
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
@@ -34634,10 +34734,17 @@ var StatsGrid = ({
|
|
|
34634
34734
|
type: "text",
|
|
34635
34735
|
content: item.label,
|
|
34636
34736
|
variant: "small",
|
|
34637
|
-
className: "text-muted-foreground font-medium tracking-wide uppercase text-[10px]"
|
|
34737
|
+
className: cn(!hasPxVars && "text-muted-foreground", "font-medium tracking-wide uppercase text-[10px]"),
|
|
34738
|
+
style: textColor ? { color: textColor } : void 0
|
|
34638
34739
|
}
|
|
34639
34740
|
),
|
|
34640
|
-
Icon3 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
34741
|
+
Icon3 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
34742
|
+
Icon3,
|
|
34743
|
+
{
|
|
34744
|
+
className: cn("w-4 h-4", !hasPxVars && "text-[var(--primary-color,theme(colors.purple.500))]"),
|
|
34745
|
+
style: textColor ? { color: textColor } : void 0
|
|
34746
|
+
}
|
|
34747
|
+
)
|
|
34641
34748
|
] }),
|
|
34642
34749
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-baseline gap-3", children: [
|
|
34643
34750
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
@@ -34648,9 +34755,11 @@ var StatsGrid = ({
|
|
|
34648
34755
|
content: String(item.value),
|
|
34649
34756
|
variant: "h3",
|
|
34650
34757
|
className: cn(
|
|
34651
|
-
"font-bold
|
|
34758
|
+
"font-bold tracking-tight leading-tight",
|
|
34759
|
+
!hasPxVars && "text-[var(--foreground)]",
|
|
34652
34760
|
String(item.value).length > 20 ? "text-base" : String(item.value).length > 12 ? "text-lg" : "text-xl"
|
|
34653
|
-
)
|
|
34761
|
+
),
|
|
34762
|
+
style: textColor ? { color: textColor } : void 0
|
|
34654
34763
|
}
|
|
34655
34764
|
),
|
|
34656
34765
|
item.trend && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
@@ -34815,16 +34924,26 @@ var FilterBar = ({ filters, showSearch = true, className, onFilterToggle, onSear
|
|
|
34815
34924
|
// src/molecules/generic/FileUpload/FileUpload.tsx
|
|
34816
34925
|
var import_react57 = __toESM(require("react"), 1);
|
|
34817
34926
|
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
34818
|
-
var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
|
|
34927
|
+
var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }) => {
|
|
34819
34928
|
const [isDragging, setIsDragging] = import_react57.default.useState(false);
|
|
34929
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
34930
|
+
const wrapperStyle = {
|
|
34931
|
+
...hasPxVars && {
|
|
34932
|
+
borderColor: isDragging ? "var(--px-accent-color)" : "var(--px-border-color)",
|
|
34933
|
+
backgroundColor: isDragging ? void 0 : "var(--px-bg-color, transparent)"
|
|
34934
|
+
},
|
|
34935
|
+
...style
|
|
34936
|
+
};
|
|
34820
34937
|
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
34821
34938
|
"div",
|
|
34822
34939
|
{
|
|
34823
34940
|
className: cn(
|
|
34824
34941
|
"relative flex flex-col items-center justify-center p-8 border-2 border-dashed rounded-3xl transition-all",
|
|
34825
|
-
isDragging ? "border-purple-500 bg-purple-50" : "border-purple-100 bg-white",
|
|
34942
|
+
!hasPxVars && (isDragging ? "border-purple-500 bg-purple-50" : "border-purple-100 bg-white"),
|
|
34826
34943
|
className
|
|
34827
34944
|
),
|
|
34945
|
+
style: wrapperStyle,
|
|
34946
|
+
"data-px-styled": hasPxVars ? "" : void 0,
|
|
34828
34947
|
onDragOver: (e) => {
|
|
34829
34948
|
e.preventDefault();
|
|
34830
34949
|
setIsDragging(true);
|
|
@@ -34838,8 +34957,22 @@ var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
|
|
|
34838
34957
|
}
|
|
34839
34958
|
},
|
|
34840
34959
|
children: [
|
|
34841
|
-
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
34842
|
-
|
|
34960
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
34961
|
+
"div",
|
|
34962
|
+
{
|
|
34963
|
+
className: cn("w-12 h-12 rounded-2xl flex items-center justify-center mb-4", !hasPxVars && "bg-purple-100 text-purple-600"),
|
|
34964
|
+
style: hasPxVars ? { backgroundColor: "var(--px-accent-color)", color: "var(--px-accent-fg, white)", opacity: 0.15 } : void 0,
|
|
34965
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Upload, { className: "w-6 h-6", style: hasPxVars ? { color: "var(--px-accent-color)", opacity: 1 } : void 0 })
|
|
34966
|
+
}
|
|
34967
|
+
),
|
|
34968
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
34969
|
+
"h4",
|
|
34970
|
+
{
|
|
34971
|
+
className: cn("font-bold mb-1", !hasPxVars && "text-gray-900"),
|
|
34972
|
+
style: hasPxVars ? { color: "var(--px-text-color, inherit)" } : void 0,
|
|
34973
|
+
children: title
|
|
34974
|
+
}
|
|
34975
|
+
),
|
|
34843
34976
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "text-sm text-muted-foreground mb-6", children: "Drag and drop or click to browse" }),
|
|
34844
34977
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
34845
34978
|
"input",
|
|
@@ -34855,7 +34988,8 @@ var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
|
|
|
34855
34988
|
Button,
|
|
34856
34989
|
{
|
|
34857
34990
|
variant: "outline",
|
|
34858
|
-
className: "rounded-full border-purple-200 text-purple-700 hover:bg-purple-50",
|
|
34991
|
+
className: cn("rounded-full", !hasPxVars && "border-purple-200 text-purple-700 hover:bg-purple-50"),
|
|
34992
|
+
style: hasPxVars ? { borderColor: "var(--px-accent-color)", color: "var(--px-accent-color)" } : void 0,
|
|
34859
34993
|
children: "Select Files"
|
|
34860
34994
|
}
|
|
34861
34995
|
)
|
|
@@ -40928,1307 +41062,6 @@ function CreatorWidgetInner({
|
|
|
40928
41062
|
}
|
|
40929
41063
|
var CreatorWidget = (0, import_react76.memo)(CreatorWidgetInner);
|
|
40930
41064
|
|
|
40931
|
-
// src/molecules/workstream-builder/ToolListCard/ToolListCard.tsx
|
|
40932
|
-
var import_jsx_runtime150 = require("react/jsx-runtime");
|
|
40933
|
-
var FONT_STYLE = {
|
|
40934
|
-
fontFamily: "Inter, system-ui, sans-serif"
|
|
40935
|
-
};
|
|
40936
|
-
var ICON_MAP = {
|
|
40937
|
-
Search,
|
|
40938
|
-
Database,
|
|
40939
|
-
Globe,
|
|
40940
|
-
FileText,
|
|
40941
|
-
Zap,
|
|
40942
|
-
Layout: PanelsTopLeft,
|
|
40943
|
-
Wrench,
|
|
40944
|
-
BookOpen,
|
|
40945
|
-
BarChart3: ChartColumn,
|
|
40946
|
-
Link,
|
|
40947
|
-
MessageSquare,
|
|
40948
|
-
Sparkles,
|
|
40949
|
-
FolderOpen,
|
|
40950
|
-
Code,
|
|
40951
|
-
Shield,
|
|
40952
|
-
Image,
|
|
40953
|
-
Mail,
|
|
40954
|
-
Calendar
|
|
40955
|
-
};
|
|
40956
|
-
var CATEGORY_FALLBACK = {
|
|
40957
|
-
search: Search,
|
|
40958
|
-
data: Database,
|
|
40959
|
-
knowledge: BookOpen,
|
|
40960
|
-
web: Globe,
|
|
40961
|
-
content: FileText,
|
|
40962
|
-
ui: PanelsTopLeft,
|
|
40963
|
-
analytics: ChartColumn,
|
|
40964
|
-
integration: Link,
|
|
40965
|
-
communication: MessageSquare,
|
|
40966
|
-
generation: Sparkles,
|
|
40967
|
-
file: FolderOpen,
|
|
40968
|
-
code: Code,
|
|
40969
|
-
security: Shield,
|
|
40970
|
-
general: Zap
|
|
40971
|
-
};
|
|
40972
|
-
var CATEGORY_HEADER_BG = {
|
|
40973
|
-
search: "bg-blue-500/[0.04]",
|
|
40974
|
-
data: "bg-emerald-500/[0.04]",
|
|
40975
|
-
knowledge: "bg-purple-500/[0.04]",
|
|
40976
|
-
web: "bg-cyan-500/[0.04]",
|
|
40977
|
-
content: "bg-pink-500/[0.04]",
|
|
40978
|
-
ui: "bg-violet-500/[0.04]",
|
|
40979
|
-
analytics: "bg-orange-500/[0.04]",
|
|
40980
|
-
integration: "bg-amber-500/[0.04]",
|
|
40981
|
-
general: "bg-[var(--foreground)]/[0.02]"
|
|
40982
|
-
};
|
|
40983
|
-
function resolveIcon(tool) {
|
|
40984
|
-
if (tool.icon && ICON_MAP[tool.icon]) return ICON_MAP[tool.icon];
|
|
40985
|
-
if (tool.category && CATEGORY_FALLBACK[tool.category.toLowerCase()])
|
|
40986
|
-
return CATEGORY_FALLBACK[tool.category.toLowerCase()];
|
|
40987
|
-
return Wrench;
|
|
40988
|
-
}
|
|
40989
|
-
function resolveCategoryIcon(category) {
|
|
40990
|
-
return CATEGORY_FALLBACK[category.toLowerCase()] || Wrench;
|
|
40991
|
-
}
|
|
40992
|
-
var ToolListCard = ({
|
|
40993
|
-
tools,
|
|
40994
|
-
className
|
|
40995
|
-
}) => {
|
|
40996
|
-
const grouped = {};
|
|
40997
|
-
for (const tool of tools) {
|
|
40998
|
-
const cat = tool.category || "General";
|
|
40999
|
-
if (!grouped[cat]) grouped[cat] = [];
|
|
41000
|
-
grouped[cat].push(tool);
|
|
41001
|
-
}
|
|
41002
|
-
const categories = Object.keys(grouped);
|
|
41003
|
-
return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
|
|
41004
|
-
"div",
|
|
41005
|
-
{
|
|
41006
|
-
className: cn(
|
|
41007
|
-
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
41008
|
-
className
|
|
41009
|
-
),
|
|
41010
|
-
style: FONT_STYLE,
|
|
41011
|
-
children: [
|
|
41012
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
|
|
41013
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(Wrench, { className: "w-3.5 h-3.5 text-interactive" }) }),
|
|
41014
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Available Tools" }),
|
|
41015
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: tools.length })
|
|
41016
|
-
] }),
|
|
41017
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
|
|
41018
|
-
const CatIcon = resolveCategoryIcon(cat);
|
|
41019
|
-
const headerBg = CATEGORY_HEADER_BG[cat.toLowerCase()] || CATEGORY_HEADER_BG.general;
|
|
41020
|
-
return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "px-4 py-3", children: [
|
|
41021
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: cn("flex items-center gap-2 mb-2.5 -mx-4 px-4 py-1.5", headerBg), children: [
|
|
41022
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)(CatIcon, { className: "w-3.5 h-3.5 text-interactive/70" }),
|
|
41023
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
|
|
41024
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
|
|
41025
|
-
] }),
|
|
41026
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", { className: "space-y-1.5", children: grouped[cat].map((tool) => {
|
|
41027
|
-
const ToolIcon = resolveIcon(tool);
|
|
41028
|
-
return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
|
|
41029
|
-
"div",
|
|
41030
|
-
{
|
|
41031
|
-
className: "group flex items-start gap-3 px-3 py-2 rounded-lg hover:bg-[var(--foreground)]/[0.03] transition-colors",
|
|
41032
|
-
children: [
|
|
41033
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", { className: "shrink-0 mt-0.5 w-5 h-5 rounded flex items-center justify-center bg-interactive/[0.08]", children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(ToolIcon, { className: "w-3 h-3 text-interactive/60" }) }),
|
|
41034
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
41035
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
41036
|
-
tool.display_name && tool.display_name !== tool.name && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "text-[13px] font-medium text-[var(--foreground)] truncate max-w-full", children: tool.display_name }),
|
|
41037
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "text-[11px] font-mono px-1.5 py-0.5 rounded bg-[var(--foreground)]/[0.06] text-[var(--foreground)]/50 border border-[var(--foreground)]/[0.06] truncate", children: tool.name })
|
|
41038
|
-
] }),
|
|
41039
|
-
tool.description && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed mt-0.5 break-words whitespace-normal", children: tool.description })
|
|
41040
|
-
] })
|
|
41041
|
-
]
|
|
41042
|
-
},
|
|
41043
|
-
tool.name
|
|
41044
|
-
);
|
|
41045
|
-
}) })
|
|
41046
|
-
] }, cat);
|
|
41047
|
-
}) })
|
|
41048
|
-
]
|
|
41049
|
-
}
|
|
41050
|
-
);
|
|
41051
|
-
};
|
|
41052
|
-
|
|
41053
|
-
// src/molecules/workstream-builder/AgentCard/AgentCard.tsx
|
|
41054
|
-
var import_react77 = require("react");
|
|
41055
|
-
var import_jsx_runtime151 = require("react/jsx-runtime");
|
|
41056
|
-
var FONT_STYLE2 = {
|
|
41057
|
-
fontFamily: "Inter, system-ui, sans-serif"
|
|
41058
|
-
};
|
|
41059
|
-
var AgentCard = ({
|
|
41060
|
-
agent,
|
|
41061
|
-
editable = true,
|
|
41062
|
-
compact = false,
|
|
41063
|
-
onSave,
|
|
41064
|
-
className
|
|
41065
|
-
}) => {
|
|
41066
|
-
const [isEditing, setIsEditing] = (0, import_react77.useState)(false);
|
|
41067
|
-
const [isSaving, setIsSaving] = (0, import_react77.useState)(false);
|
|
41068
|
-
const [editState, setEditState] = (0, import_react77.useState)({
|
|
41069
|
-
display_name: agent.display_name,
|
|
41070
|
-
description: agent.description,
|
|
41071
|
-
image: agent.image || ""
|
|
41072
|
-
});
|
|
41073
|
-
const avatarUrl = agent.image || `https://api.dicebear.com/7.x/avataaars/svg?seed=${agent.name}`;
|
|
41074
|
-
const handleEdit = (0, import_react77.useCallback)(() => {
|
|
41075
|
-
setEditState({
|
|
41076
|
-
display_name: agent.display_name,
|
|
41077
|
-
description: agent.description,
|
|
41078
|
-
image: agent.image || ""
|
|
41079
|
-
});
|
|
41080
|
-
setIsEditing(true);
|
|
41081
|
-
}, [agent]);
|
|
41082
|
-
const handleCancel = (0, import_react77.useCallback)(() => {
|
|
41083
|
-
setIsEditing(false);
|
|
41084
|
-
}, []);
|
|
41085
|
-
const handleSave = (0, import_react77.useCallback)(async () => {
|
|
41086
|
-
if (!onSave) return;
|
|
41087
|
-
const updates = {};
|
|
41088
|
-
if (editState.display_name !== agent.display_name)
|
|
41089
|
-
updates.display_name = editState.display_name;
|
|
41090
|
-
if (editState.description !== agent.description)
|
|
41091
|
-
updates.description = editState.description;
|
|
41092
|
-
if (editState.image !== (agent.image || ""))
|
|
41093
|
-
updates.image = editState.image;
|
|
41094
|
-
if (Object.keys(updates).length === 0) {
|
|
41095
|
-
setIsEditing(false);
|
|
41096
|
-
return;
|
|
41097
|
-
}
|
|
41098
|
-
setIsSaving(true);
|
|
41099
|
-
try {
|
|
41100
|
-
await onSave(agent, updates);
|
|
41101
|
-
setIsEditing(false);
|
|
41102
|
-
} catch (err) {
|
|
41103
|
-
console.error("AgentCard save failed:", err);
|
|
41104
|
-
} finally {
|
|
41105
|
-
setIsSaving(false);
|
|
41106
|
-
}
|
|
41107
|
-
}, [onSave, agent, editState]);
|
|
41108
|
-
if (compact) {
|
|
41109
|
-
return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
|
|
41110
|
-
"div",
|
|
41111
|
-
{
|
|
41112
|
-
className: cn(
|
|
41113
|
-
"flex items-center gap-3 py-1",
|
|
41114
|
-
className
|
|
41115
|
-
),
|
|
41116
|
-
style: FONT_STYLE2,
|
|
41117
|
-
children: [
|
|
41118
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(Avatar, { className: "h-8 w-8 shrink-0", children: [
|
|
41119
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
|
|
41120
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(AvatarFallback, { className: "bg-interactive/10 text-interactive text-xs font-bold", children: agent.display_name.charAt(0) })
|
|
41121
|
-
] }),
|
|
41122
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
41123
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
41124
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
|
|
41125
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
|
|
41126
|
-
"span",
|
|
41127
|
-
{
|
|
41128
|
-
className: cn(
|
|
41129
|
-
"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full font-medium",
|
|
41130
|
-
agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
41131
|
-
),
|
|
41132
|
-
children: [
|
|
41133
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: cn(
|
|
41134
|
-
"w-1.5 h-1.5 rounded-full",
|
|
41135
|
-
agent.enabled ? "bg-emerald-500" : "bg-red-500"
|
|
41136
|
-
) }),
|
|
41137
|
-
agent.enabled ? "Active" : "Disabled"
|
|
41138
|
-
]
|
|
41139
|
-
}
|
|
41140
|
-
)
|
|
41141
|
-
] }),
|
|
41142
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-[var(--foreground)]/50 text-xs truncate", children: agent.description })
|
|
41143
|
-
] })
|
|
41144
|
-
]
|
|
41145
|
-
}
|
|
41146
|
-
);
|
|
41147
|
-
}
|
|
41148
|
-
return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
|
|
41149
|
-
"div",
|
|
41150
|
-
{
|
|
41151
|
-
className: cn(
|
|
41152
|
-
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
|
|
41153
|
-
className
|
|
41154
|
-
),
|
|
41155
|
-
style: FONT_STYLE2,
|
|
41156
|
-
children: [
|
|
41157
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
|
|
41158
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-interactive/20", children: [
|
|
41159
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
|
|
41160
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(AvatarFallback, { className: "bg-interactive/10 text-interactive text-lg font-bold", children: agent.display_name.charAt(0) })
|
|
41161
|
-
] }),
|
|
41162
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
41163
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
41164
|
-
isEditing ? /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
41165
|
-
"input",
|
|
41166
|
-
{
|
|
41167
|
-
type: "text",
|
|
41168
|
-
value: editState.display_name,
|
|
41169
|
-
onChange: (e) => setEditState((s) => ({ ...s, display_name: e.target.value })),
|
|
41170
|
-
disabled: isSaving,
|
|
41171
|
-
className: "flex-1 bg-transparent border-b border-interactive/30 text-sm font-semibold text-foreground outline-none focus:border-interactive transition-all",
|
|
41172
|
-
placeholder: "Agent name"
|
|
41173
|
-
}
|
|
41174
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
|
|
41175
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: agent.name }),
|
|
41176
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
|
|
41177
|
-
"span",
|
|
41178
|
-
{
|
|
41179
|
-
className: cn(
|
|
41180
|
-
"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-medium",
|
|
41181
|
-
agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
41182
|
-
),
|
|
41183
|
-
children: [
|
|
41184
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: cn(
|
|
41185
|
-
"w-1.5 h-1.5 rounded-full",
|
|
41186
|
-
agent.enabled ? "bg-emerald-500" : "bg-red-500"
|
|
41187
|
-
) }),
|
|
41188
|
-
agent.enabled ? "Active" : "Disabled"
|
|
41189
|
-
]
|
|
41190
|
-
}
|
|
41191
|
-
)
|
|
41192
|
-
] }),
|
|
41193
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "mt-1", children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
41194
|
-
"textarea",
|
|
41195
|
-
{
|
|
41196
|
-
value: editState.description,
|
|
41197
|
-
onChange: (e) => setEditState((s) => ({ ...s, description: e.target.value })),
|
|
41198
|
-
disabled: isSaving,
|
|
41199
|
-
className: "w-full bg-transparent border-b border-interactive/30 text-xs text-foreground/70 outline-none focus:border-interactive transition-all resize-none leading-relaxed min-h-[40px]",
|
|
41200
|
-
rows: 2,
|
|
41201
|
-
placeholder: "Describe this agent..."
|
|
41202
|
-
}
|
|
41203
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-normal", children: agent.description }) }),
|
|
41204
|
-
isEditing && /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
41205
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold", children: "Avatar:" }),
|
|
41206
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
41207
|
-
"input",
|
|
41208
|
-
{
|
|
41209
|
-
type: "text",
|
|
41210
|
-
value: editState.image,
|
|
41211
|
-
onChange: (e) => setEditState((s) => ({ ...s, image: e.target.value })),
|
|
41212
|
-
disabled: isSaving,
|
|
41213
|
-
className: "flex-1 bg-foreground/[0.03] border border-[var(--border-color)] rounded px-2 py-0.5 text-[10px] text-foreground/50 font-mono outline-none focus:border-interactive/50 transition-colors",
|
|
41214
|
-
placeholder: "URL"
|
|
41215
|
-
}
|
|
41216
|
-
)
|
|
41217
|
-
] })
|
|
41218
|
-
] }),
|
|
41219
|
-
editable && onSave && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "flex items-center gap-1.5 shrink-0", children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(import_jsx_runtime151.Fragment, { children: [
|
|
41220
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
41221
|
-
"button",
|
|
41222
|
-
{
|
|
41223
|
-
onClick: handleCancel,
|
|
41224
|
-
disabled: isSaving,
|
|
41225
|
-
className: "text-[11px] px-2.5 py-1 rounded-md border border-[var(--border-color)] text-[var(--foreground)]/60 hover:text-[var(--foreground)] transition-colors disabled:opacity-50",
|
|
41226
|
-
children: "Cancel"
|
|
41227
|
-
}
|
|
41228
|
-
),
|
|
41229
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
41230
|
-
"button",
|
|
41231
|
-
{
|
|
41232
|
-
onClick: handleSave,
|
|
41233
|
-
disabled: isSaving,
|
|
41234
|
-
className: "text-[11px] px-2.5 py-1 rounded-md bg-[var(--border-color)] text-foreground border border-[var(--border-color)] hover:opacity-90 transition-opacity disabled:opacity-50",
|
|
41235
|
-
children: isSaving ? "Saving..." : "Save"
|
|
41236
|
-
}
|
|
41237
|
-
)
|
|
41238
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
41239
|
-
"button",
|
|
41240
|
-
{
|
|
41241
|
-
onClick: handleEdit,
|
|
41242
|
-
className: "text-[11px] px-2.5 py-1 rounded-md border border-[var(--border-color)] text-foreground/50 hover:text-foreground hover:border-interactive/50 transition-colors",
|
|
41243
|
-
children: "Edit"
|
|
41244
|
-
}
|
|
41245
|
-
) })
|
|
41246
|
-
] }),
|
|
41247
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "flex flex-wrap items-center gap-3 px-5 pb-3 text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("span", { className: "text-[var(--foreground)]/40", children: [
|
|
41248
|
-
"Model:",
|
|
41249
|
-
" ",
|
|
41250
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "font-mono text-[var(--foreground)]/70", children: agent.model })
|
|
41251
|
-
] }) }),
|
|
41252
|
-
agent.tools && agent.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "border-t border-[var(--border-color)] px-5 py-3", children: [
|
|
41253
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-2", children: [
|
|
41254
|
-
"Tools (",
|
|
41255
|
-
agent.tools.length,
|
|
41256
|
-
")"
|
|
41257
|
-
] }),
|
|
41258
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "flex flex-wrap gap-1.5", children: agent.tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
41259
|
-
"span",
|
|
41260
|
-
{
|
|
41261
|
-
className: "text-[11px] px-2 py-0.5 rounded-md bg-interactive/10 text-interactive font-mono border border-interactive/20",
|
|
41262
|
-
children: tool
|
|
41263
|
-
},
|
|
41264
|
-
tool
|
|
41265
|
-
)) })
|
|
41266
|
-
] })
|
|
41267
|
-
]
|
|
41268
|
-
}
|
|
41269
|
-
);
|
|
41270
|
-
};
|
|
41271
|
-
|
|
41272
|
-
// src/molecules/workstream-builder/AgentDataTable/AgentDataTable.tsx
|
|
41273
|
-
var import_jsx_runtime152 = require("react/jsx-runtime");
|
|
41274
|
-
var FONT_STYLE3 = {
|
|
41275
|
-
fontFamily: "Inter, system-ui, sans-serif"
|
|
41276
|
-
};
|
|
41277
|
-
var AgentDataTable = ({
|
|
41278
|
-
headers,
|
|
41279
|
-
rows,
|
|
41280
|
-
className
|
|
41281
|
-
}) => {
|
|
41282
|
-
const renderCell = (value) => {
|
|
41283
|
-
if (typeof value === "boolean") {
|
|
41284
|
-
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
|
|
41285
|
-
"span",
|
|
41286
|
-
{
|
|
41287
|
-
className: cn(
|
|
41288
|
-
"inline-flex items-center gap-1.5 text-[11px] font-medium px-2 py-0.5 rounded-full",
|
|
41289
|
-
value ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
41290
|
-
),
|
|
41291
|
-
children: [
|
|
41292
|
-
value ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
41293
|
-
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
41294
|
-
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
41295
|
-
] }),
|
|
41296
|
-
value ? "Yes" : "No"
|
|
41297
|
-
]
|
|
41298
|
-
}
|
|
41299
|
-
);
|
|
41300
|
-
}
|
|
41301
|
-
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "text-[var(--foreground)]", children: String(value) });
|
|
41302
|
-
};
|
|
41303
|
-
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
41304
|
-
"div",
|
|
41305
|
-
{
|
|
41306
|
-
className: cn(
|
|
41307
|
-
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
|
|
41308
|
-
className
|
|
41309
|
-
),
|
|
41310
|
-
style: FONT_STYLE3,
|
|
41311
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("table", { className: "w-full text-xs", children: [
|
|
41312
|
-
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("tr", { className: "border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
41313
|
-
"th",
|
|
41314
|
-
{
|
|
41315
|
-
className: "text-left px-4 py-2.5 text-[11px] font-semibold text-[var(--foreground)]/60 uppercase tracking-wide whitespace-nowrap",
|
|
41316
|
-
children: header
|
|
41317
|
-
},
|
|
41318
|
-
header
|
|
41319
|
-
)) }) }),
|
|
41320
|
-
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
41321
|
-
"tr",
|
|
41322
|
-
{
|
|
41323
|
-
className: cn(
|
|
41324
|
-
"border-b border-[var(--border-color)] last:border-b-0 hover:bg-[var(--foreground)]/[0.03] transition-colors",
|
|
41325
|
-
rowIdx % 2 === 1 && "bg-[var(--foreground)]/[0.015]"
|
|
41326
|
-
),
|
|
41327
|
-
children: row.map((cell, cellIdx) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
41328
|
-
"td",
|
|
41329
|
-
{
|
|
41330
|
-
className: "px-4 py-2.5 text-xs whitespace-nowrap",
|
|
41331
|
-
children: renderCell(cell)
|
|
41332
|
-
},
|
|
41333
|
-
cellIdx
|
|
41334
|
-
))
|
|
41335
|
-
},
|
|
41336
|
-
rowIdx
|
|
41337
|
-
)) })
|
|
41338
|
-
] }) })
|
|
41339
|
-
}
|
|
41340
|
-
);
|
|
41341
|
-
};
|
|
41342
|
-
|
|
41343
|
-
// src/molecules/workstream-builder/WorkflowVisualizer/WorkflowVisualizer.tsx
|
|
41344
|
-
var import_react78 = require("react");
|
|
41345
|
-
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
41346
|
-
var FONT_STYLE4 = {
|
|
41347
|
-
fontFamily: "Inter, system-ui, sans-serif"
|
|
41348
|
-
};
|
|
41349
|
-
var WorkflowVisualizer = ({
|
|
41350
|
-
steps,
|
|
41351
|
-
className
|
|
41352
|
-
}) => {
|
|
41353
|
-
const [expandedStep, setExpandedStep] = (0, import_react78.useState)(
|
|
41354
|
-
steps[0]?.id || null
|
|
41355
|
-
);
|
|
41356
|
-
return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
41357
|
-
"div",
|
|
41358
|
-
{
|
|
41359
|
-
className: cn(
|
|
41360
|
-
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
41361
|
-
className
|
|
41362
|
-
),
|
|
41363
|
-
style: FONT_STYLE4,
|
|
41364
|
-
children: [
|
|
41365
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
|
|
41366
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
41367
|
-
"svg",
|
|
41368
|
-
{
|
|
41369
|
-
width: "14",
|
|
41370
|
-
height: "14",
|
|
41371
|
-
viewBox: "0 0 24 24",
|
|
41372
|
-
fill: "none",
|
|
41373
|
-
stroke: "currentColor",
|
|
41374
|
-
strokeWidth: "2",
|
|
41375
|
-
className: "text-interactive",
|
|
41376
|
-
strokeLinecap: "round",
|
|
41377
|
-
strokeLinejoin: "round",
|
|
41378
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })
|
|
41379
|
-
}
|
|
41380
|
-
) }),
|
|
41381
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Workflow" }),
|
|
41382
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: [
|
|
41383
|
-
steps.length,
|
|
41384
|
-
" steps"
|
|
41385
|
-
] })
|
|
41386
|
-
] }),
|
|
41387
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "px-4 py-3", children: steps.map((step, idx) => {
|
|
41388
|
-
const isLast = idx === steps.length - 1;
|
|
41389
|
-
const isExpanded = expandedStep === step.id;
|
|
41390
|
-
return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex gap-3", children: [
|
|
41391
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex flex-col items-center shrink-0", children: [
|
|
41392
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "w-7 h-7 rounded-full bg-interactive/10 border-2 border-interactive/30 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "text-[10px] font-bold text-interactive", children: idx + 1 }) }),
|
|
41393
|
-
!isLast && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "w-0.5 flex-1 min-h-[16px] bg-interactive/15" })
|
|
41394
|
-
] }),
|
|
41395
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
41396
|
-
"div",
|
|
41397
|
-
{
|
|
41398
|
-
className: cn(
|
|
41399
|
-
"flex-1 mb-3 rounded-lg border border-[var(--border-color)] transition-all",
|
|
41400
|
-
isExpanded ? "bg-[var(--foreground)]/[0.02] shadow-sm" : "hover:bg-[var(--foreground)]/[0.02] hover:shadow-sm hover:-translate-y-0.5"
|
|
41401
|
-
),
|
|
41402
|
-
children: [
|
|
41403
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
41404
|
-
"button",
|
|
41405
|
-
{
|
|
41406
|
-
onClick: () => setExpandedStep(isExpanded ? null : step.id),
|
|
41407
|
-
className: "w-full text-left px-3 py-2.5 flex items-center gap-2 whitespace-normal",
|
|
41408
|
-
children: [
|
|
41409
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "text-[13px] font-medium text-[var(--foreground)]", children: step.name }) }),
|
|
41410
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
41411
|
-
"svg",
|
|
41412
|
-
{
|
|
41413
|
-
width: "12",
|
|
41414
|
-
height: "12",
|
|
41415
|
-
viewBox: "0 0 24 24",
|
|
41416
|
-
fill: "none",
|
|
41417
|
-
stroke: "currentColor",
|
|
41418
|
-
strokeWidth: "2",
|
|
41419
|
-
className: cn(
|
|
41420
|
-
"shrink-0 text-[var(--foreground)]/30 transition-transform",
|
|
41421
|
-
isExpanded && "rotate-180"
|
|
41422
|
-
),
|
|
41423
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("polyline", { points: "6 9 12 15 18 9" })
|
|
41424
|
-
}
|
|
41425
|
-
)
|
|
41426
|
-
]
|
|
41427
|
-
}
|
|
41428
|
-
),
|
|
41429
|
-
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "px-3 pb-3 space-y-2.5", children: [
|
|
41430
|
-
step.description && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed whitespace-normal", children: step.description }),
|
|
41431
|
-
step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "space-y-1", children: step.sub_steps.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
41432
|
-
"div",
|
|
41433
|
-
{
|
|
41434
|
-
className: "flex items-start gap-2 text-xs",
|
|
41435
|
-
children: [
|
|
41436
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "shrink-0 mt-0.5 w-1.5 h-1.5 rounded-full bg-interactive/40" }),
|
|
41437
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "text-[var(--foreground)]/60", children: sub.action })
|
|
41438
|
-
]
|
|
41439
|
-
},
|
|
41440
|
-
sub.id
|
|
41441
|
-
)) }),
|
|
41442
|
-
step.tools && step.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
|
|
41443
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold tracking-wider", children: "Tools:" }),
|
|
41444
|
-
step.tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
41445
|
-
"span",
|
|
41446
|
-
{
|
|
41447
|
-
className: "text-[10px] font-mono px-1.5 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
|
|
41448
|
-
children: tool
|
|
41449
|
-
},
|
|
41450
|
-
tool
|
|
41451
|
-
))
|
|
41452
|
-
] }),
|
|
41453
|
-
step.on_failure && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex items-start gap-2 text-xs bg-[var(--redBackground,_#ef4444)]/[0.06] border border-[var(--redText,_#ef4444)]/10 rounded-md px-2.5 py-2 whitespace-normal", children: [
|
|
41454
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "shrink-0 text-[10px] font-semibold text-[var(--redText,_#ef4444)]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
|
|
41455
|
-
/* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
|
|
41456
|
-
] })
|
|
41457
|
-
] })
|
|
41458
|
-
]
|
|
41459
|
-
}
|
|
41460
|
-
)
|
|
41461
|
-
] }, step.id);
|
|
41462
|
-
}) })
|
|
41463
|
-
]
|
|
41464
|
-
}
|
|
41465
|
-
);
|
|
41466
|
-
};
|
|
41467
|
-
|
|
41468
|
-
// src/molecules/workstream-builder/InstructionPreview/InstructionPreview.tsx
|
|
41469
|
-
var import_react79 = require("react");
|
|
41470
|
-
var import_jsx_runtime154 = require("react/jsx-runtime");
|
|
41471
|
-
var FONT_STYLE5 = {
|
|
41472
|
-
fontFamily: "Inter, system-ui, sans-serif"
|
|
41473
|
-
};
|
|
41474
|
-
var InstructionPreview = ({
|
|
41475
|
-
agent_name,
|
|
41476
|
-
description,
|
|
41477
|
-
instruction,
|
|
41478
|
-
workflow_summary,
|
|
41479
|
-
tools,
|
|
41480
|
-
className
|
|
41481
|
-
}) => {
|
|
41482
|
-
const [isExpanded, setIsExpanded] = (0, import_react79.useState)(false);
|
|
41483
|
-
const [copied, setCopied] = (0, import_react79.useState)(false);
|
|
41484
|
-
const previewLength = 300;
|
|
41485
|
-
const isLong = instruction.length > previewLength;
|
|
41486
|
-
const displayText = isExpanded || !isLong ? instruction : instruction.slice(0, previewLength) + "...";
|
|
41487
|
-
const handleCopy = (0, import_react79.useCallback)(async () => {
|
|
41488
|
-
try {
|
|
41489
|
-
await navigator.clipboard.writeText(instruction);
|
|
41490
|
-
setCopied(true);
|
|
41491
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
41492
|
-
} catch {
|
|
41493
|
-
const textarea = document.createElement("textarea");
|
|
41494
|
-
textarea.value = instruction;
|
|
41495
|
-
textarea.style.position = "fixed";
|
|
41496
|
-
textarea.style.opacity = "0";
|
|
41497
|
-
document.body.appendChild(textarea);
|
|
41498
|
-
textarea.select();
|
|
41499
|
-
document.execCommand("copy");
|
|
41500
|
-
document.body.removeChild(textarea);
|
|
41501
|
-
setCopied(true);
|
|
41502
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
41503
|
-
}
|
|
41504
|
-
}, [instruction]);
|
|
41505
|
-
return /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
|
|
41506
|
-
"div",
|
|
41507
|
-
{
|
|
41508
|
-
className: cn(
|
|
41509
|
-
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
41510
|
-
className
|
|
41511
|
-
),
|
|
41512
|
-
style: FONT_STYLE5,
|
|
41513
|
-
children: [
|
|
41514
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
41515
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
|
|
41516
|
-
"svg",
|
|
41517
|
-
{
|
|
41518
|
-
width: "14",
|
|
41519
|
-
height: "14",
|
|
41520
|
-
viewBox: "0 0 24 24",
|
|
41521
|
-
fill: "none",
|
|
41522
|
-
stroke: "currentColor",
|
|
41523
|
-
strokeWidth: "2",
|
|
41524
|
-
className: "text-interactive",
|
|
41525
|
-
strokeLinecap: "round",
|
|
41526
|
-
strokeLinejoin: "round",
|
|
41527
|
-
children: [
|
|
41528
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
41529
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("polyline", { points: "14 2 14 8 20 8" }),
|
|
41530
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
|
|
41531
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
|
|
41532
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("polyline", { points: "10 9 9 9 8 9" })
|
|
41533
|
-
]
|
|
41534
|
-
}
|
|
41535
|
-
) }),
|
|
41536
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
41537
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: agent_name }),
|
|
41538
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5 whitespace-normal", children: description })
|
|
41539
|
-
] })
|
|
41540
|
-
] }) }),
|
|
41541
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { className: "px-4 py-3 space-y-3", children: [
|
|
41542
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { children: [
|
|
41543
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { className: "flex items-center justify-between mb-1.5", children: [
|
|
41544
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider", children: "Instruction" }),
|
|
41545
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
41546
|
-
"button",
|
|
41547
|
-
{
|
|
41548
|
-
onClick: handleCopy,
|
|
41549
|
-
className: "text-[10px] px-2 py-0.5 rounded-md text-interactive hover:bg-interactive/10 transition-colors font-medium",
|
|
41550
|
-
children: copied ? "Copied!" : "Copy"
|
|
41551
|
-
}
|
|
41552
|
-
)
|
|
41553
|
-
] }),
|
|
41554
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("div", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-pre-wrap font-mono bg-[var(--foreground)]/[0.02] border border-[var(--border-color)] rounded-lg p-3", children: displayText }),
|
|
41555
|
-
isLong && /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
|
|
41556
|
-
"button",
|
|
41557
|
-
{
|
|
41558
|
-
onClick: () => setIsExpanded(!isExpanded),
|
|
41559
|
-
className: "inline-flex items-center gap-1 text-[11px] text-interactive hover:underline mt-1",
|
|
41560
|
-
children: [
|
|
41561
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
41562
|
-
"svg",
|
|
41563
|
-
{
|
|
41564
|
-
width: "12",
|
|
41565
|
-
height: "12",
|
|
41566
|
-
viewBox: "0 0 24 24",
|
|
41567
|
-
fill: "none",
|
|
41568
|
-
stroke: "currentColor",
|
|
41569
|
-
strokeWidth: "2",
|
|
41570
|
-
className: cn("transition-transform", isExpanded && "rotate-180"),
|
|
41571
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("polyline", { points: "6 9 12 15 18 9" })
|
|
41572
|
-
}
|
|
41573
|
-
),
|
|
41574
|
-
isExpanded ? "Show less" : "Show full instruction"
|
|
41575
|
-
]
|
|
41576
|
-
}
|
|
41577
|
-
)
|
|
41578
|
-
] }),
|
|
41579
|
-
workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { children: [
|
|
41580
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Workflow" }),
|
|
41581
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("div", { className: "space-y-1", children: workflow_summary.map((step, idx) => /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { className: "flex items-start gap-2 text-xs", children: [
|
|
41582
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("span", { className: "shrink-0 w-5 h-5 rounded-full bg-interactive/10 flex items-center justify-center text-[10px] font-bold text-interactive", children: idx + 1 }),
|
|
41583
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("span", { className: "text-[var(--foreground)]/50 mt-0.5", children: step })
|
|
41584
|
-
] }, idx)) })
|
|
41585
|
-
] }),
|
|
41586
|
-
tools && tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { children: [
|
|
41587
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Tools" }),
|
|
41588
|
-
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)("div", { className: "flex flex-wrap gap-1.5", children: tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
41589
|
-
"span",
|
|
41590
|
-
{
|
|
41591
|
-
className: "text-[10px] font-mono px-2 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
|
|
41592
|
-
children: tool
|
|
41593
|
-
},
|
|
41594
|
-
tool
|
|
41595
|
-
)) })
|
|
41596
|
-
] })
|
|
41597
|
-
] })
|
|
41598
|
-
]
|
|
41599
|
-
}
|
|
41600
|
-
);
|
|
41601
|
-
};
|
|
41602
|
-
|
|
41603
|
-
// src/molecules/workstream-builder/UIComponentSelector/UIComponentSelector.tsx
|
|
41604
|
-
var import_react80 = require("react");
|
|
41605
|
-
var import_jsx_runtime155 = require("react/jsx-runtime");
|
|
41606
|
-
var FONT_STYLE6 = {
|
|
41607
|
-
fontFamily: "Inter, system-ui, sans-serif"
|
|
41608
|
-
};
|
|
41609
|
-
function UIComponentSelector({
|
|
41610
|
-
components,
|
|
41611
|
-
onSelect,
|
|
41612
|
-
onPreview,
|
|
41613
|
-
className,
|
|
41614
|
-
isLatestMessage = true
|
|
41615
|
-
}) {
|
|
41616
|
-
const [selected, setSelected] = (0, import_react80.useState)(() => {
|
|
41617
|
-
const recommended = components.filter((c) => c.recommended).map((c) => c.name);
|
|
41618
|
-
return new Set(recommended);
|
|
41619
|
-
});
|
|
41620
|
-
const [submitted, setSubmitted] = (0, import_react80.useState)(false);
|
|
41621
|
-
const grouped = components.reduce(
|
|
41622
|
-
(acc, comp) => {
|
|
41623
|
-
const cat = comp.category || "Other";
|
|
41624
|
-
if (!acc[cat]) acc[cat] = [];
|
|
41625
|
-
acc[cat].push(comp);
|
|
41626
|
-
return acc;
|
|
41627
|
-
},
|
|
41628
|
-
{}
|
|
41629
|
-
);
|
|
41630
|
-
const toggle = (name) => {
|
|
41631
|
-
if (submitted || !isLatestMessage) return;
|
|
41632
|
-
setSelected((prev) => {
|
|
41633
|
-
const next = new Set(prev);
|
|
41634
|
-
if (next.has(name)) next.delete(name);
|
|
41635
|
-
else next.add(name);
|
|
41636
|
-
return next;
|
|
41637
|
-
});
|
|
41638
|
-
};
|
|
41639
|
-
const handleContinue = () => {
|
|
41640
|
-
setSubmitted(true);
|
|
41641
|
-
onSelect?.(Array.from(selected));
|
|
41642
|
-
};
|
|
41643
|
-
const categoryOrder = Object.keys(grouped).sort();
|
|
41644
|
-
return /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(
|
|
41645
|
-
"div",
|
|
41646
|
-
{
|
|
41647
|
-
className: cn(
|
|
41648
|
-
"my-3 rounded-xl border border-border bg-card overflow-hidden shadow-sm",
|
|
41649
|
-
className
|
|
41650
|
-
),
|
|
41651
|
-
style: FONT_STYLE6,
|
|
41652
|
-
children: [
|
|
41653
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("div", { className: "px-4 py-3 border-b border-border/60 bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
41654
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("div", { className: "w-5 h-5 rounded-md bg-interactive/15 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(
|
|
41655
|
-
"svg",
|
|
41656
|
-
{
|
|
41657
|
-
width: "12",
|
|
41658
|
-
height: "12",
|
|
41659
|
-
viewBox: "0 0 24 24",
|
|
41660
|
-
fill: "none",
|
|
41661
|
-
stroke: "currentColor",
|
|
41662
|
-
strokeWidth: "2",
|
|
41663
|
-
className: "text-interactive",
|
|
41664
|
-
children: [
|
|
41665
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("rect", { x: "3", y: "3", width: "7", height: "7" }),
|
|
41666
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("rect", { x: "14", y: "3", width: "7", height: "7" }),
|
|
41667
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("rect", { x: "3", y: "14", width: "7", height: "7" }),
|
|
41668
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("rect", { x: "14", y: "14", width: "7", height: "7" })
|
|
41669
|
-
]
|
|
41670
|
-
}
|
|
41671
|
-
) }),
|
|
41672
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { children: [
|
|
41673
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("h3", { className: "text-xs font-semibold text-foreground", children: "Select UI Components" }),
|
|
41674
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: "Choose which visual components this agent can use in its responses." })
|
|
41675
|
-
] })
|
|
41676
|
-
] }) }),
|
|
41677
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("div", { className: "px-4 py-3 space-y-4", children: categoryOrder.map((category) => /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { children: [
|
|
41678
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("h4", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-2", children: category }),
|
|
41679
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(
|
|
41680
|
-
"label",
|
|
41681
|
-
{
|
|
41682
|
-
className: cn(
|
|
41683
|
-
"flex items-start gap-3 px-3 py-2 rounded-lg cursor-pointer transition-all",
|
|
41684
|
-
submitted || !isLatestMessage ? "cursor-default opacity-60" : "hover:bg-muted/80",
|
|
41685
|
-
selected.has(comp.name) && !submitted && "bg-interactive/5 border border-interactive/20",
|
|
41686
|
-
selected.has(comp.name) && submitted && "bg-interactive/5"
|
|
41687
|
-
),
|
|
41688
|
-
children: [
|
|
41689
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
41690
|
-
"div",
|
|
41691
|
-
{
|
|
41692
|
-
className: cn(
|
|
41693
|
-
"mt-0.5 w-4 h-4 rounded border flex items-center justify-center shrink-0 transition-colors",
|
|
41694
|
-
selected.has(comp.name) ? "bg-interactive border-interactive" : "border-muted-foreground/30"
|
|
41695
|
-
),
|
|
41696
|
-
onClick: (e) => {
|
|
41697
|
-
e.preventDefault();
|
|
41698
|
-
toggle(comp.name);
|
|
41699
|
-
},
|
|
41700
|
-
children: selected.has(comp.name) && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
41701
|
-
"svg",
|
|
41702
|
-
{
|
|
41703
|
-
width: "10",
|
|
41704
|
-
height: "10",
|
|
41705
|
-
viewBox: "0 0 24 24",
|
|
41706
|
-
fill: "none",
|
|
41707
|
-
stroke: "white",
|
|
41708
|
-
strokeWidth: "3",
|
|
41709
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
41710
|
-
}
|
|
41711
|
-
)
|
|
41712
|
-
}
|
|
41713
|
-
),
|
|
41714
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
41715
|
-
"input",
|
|
41716
|
-
{
|
|
41717
|
-
type: "checkbox",
|
|
41718
|
-
checked: selected.has(comp.name),
|
|
41719
|
-
onChange: () => toggle(comp.name),
|
|
41720
|
-
disabled: submitted || !isLatestMessage,
|
|
41721
|
-
className: "sr-only"
|
|
41722
|
-
}
|
|
41723
|
-
),
|
|
41724
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
41725
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
41726
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("span", { className: "text-sm font-medium text-foreground", children: comp.display_name }),
|
|
41727
|
-
comp.recommended && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("span", { className: "px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wider rounded-full bg-emerald-500/10 text-emerald-600 border border-emerald-500/20", children: "Recommended" }),
|
|
41728
|
-
onPreview && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
41729
|
-
"button",
|
|
41730
|
-
{
|
|
41731
|
-
type: "button",
|
|
41732
|
-
onClick: (e) => {
|
|
41733
|
-
e.preventDefault();
|
|
41734
|
-
e.stopPropagation();
|
|
41735
|
-
onPreview(comp.name);
|
|
41736
|
-
},
|
|
41737
|
-
className: "shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
|
|
41738
|
-
title: `Preview ${comp.display_name}`,
|
|
41739
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(
|
|
41740
|
-
"svg",
|
|
41741
|
-
{
|
|
41742
|
-
width: "14",
|
|
41743
|
-
height: "14",
|
|
41744
|
-
viewBox: "0 0 24 24",
|
|
41745
|
-
fill: "none",
|
|
41746
|
-
stroke: "currentColor",
|
|
41747
|
-
strokeWidth: "2",
|
|
41748
|
-
strokeLinecap: "round",
|
|
41749
|
-
strokeLinejoin: "round",
|
|
41750
|
-
className: "text-muted-foreground hover:text-interactive",
|
|
41751
|
-
children: [
|
|
41752
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
41753
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
41754
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
41755
|
-
]
|
|
41756
|
-
}
|
|
41757
|
-
)
|
|
41758
|
-
}
|
|
41759
|
-
)
|
|
41760
|
-
] }),
|
|
41761
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("span", { className: "ml-0 text-xs text-muted-foreground", children: comp.description })
|
|
41762
|
-
] })
|
|
41763
|
-
]
|
|
41764
|
-
},
|
|
41765
|
-
comp.name
|
|
41766
|
-
)) })
|
|
41767
|
-
] }, category)) }),
|
|
41768
|
-
!submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { className: "px-4 py-3 border-t border-border/60 flex items-center justify-between bg-muted/30", children: [
|
|
41769
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
41770
|
-
selected.size,
|
|
41771
|
-
" selected"
|
|
41772
|
-
] }),
|
|
41773
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
41774
|
-
"button",
|
|
41775
|
-
{
|
|
41776
|
-
onClick: handleContinue,
|
|
41777
|
-
className: "px-4 py-1.5 text-sm font-medium rounded-lg bg-interactive text-white hover:bg-interactive/90 transition-colors",
|
|
41778
|
-
children: "Continue"
|
|
41779
|
-
}
|
|
41780
|
-
)
|
|
41781
|
-
] }),
|
|
41782
|
-
submitted && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("div", { className: "px-4 pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("div", { className: "text-[10px] text-emerald-600 font-medium text-center py-1.5", children: "Selections confirmed" }) })
|
|
41783
|
-
]
|
|
41784
|
-
}
|
|
41785
|
-
);
|
|
41786
|
-
}
|
|
41787
|
-
|
|
41788
|
-
// src/molecules/workstream-builder/MultiAgentCard/MultiAgentCard.tsx
|
|
41789
|
-
var import_jsx_runtime156 = require("react/jsx-runtime");
|
|
41790
|
-
var FONT_STYLE7 = {
|
|
41791
|
-
fontFamily: "Inter, system-ui, sans-serif"
|
|
41792
|
-
};
|
|
41793
|
-
var MultiAgentCard = ({
|
|
41794
|
-
name,
|
|
41795
|
-
display_name,
|
|
41796
|
-
description,
|
|
41797
|
-
stages = [],
|
|
41798
|
-
enabled = true,
|
|
41799
|
-
className
|
|
41800
|
-
}) => {
|
|
41801
|
-
const avatarUrl = `https://api.dicebear.com/7.x/avataaars/svg?seed=${name}`;
|
|
41802
|
-
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
|
|
41803
|
-
"div",
|
|
41804
|
-
{
|
|
41805
|
-
className: cn(
|
|
41806
|
-
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
41807
|
-
className
|
|
41808
|
-
),
|
|
41809
|
-
style: FONT_STYLE7,
|
|
41810
|
-
children: [
|
|
41811
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
|
|
41812
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: "h-12 w-12 shrink-0 rounded-full border-2 border-interactive/20 overflow-hidden bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("img", { src: avatarUrl, alt: display_name, className: "h-full w-full" }) }),
|
|
41813
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
41814
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
41815
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
|
|
41816
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: name }),
|
|
41817
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "text-[10px] px-2 py-0.5 rounded-full font-medium bg-interactive/10 text-interactive", children: "Multi-Agent" }),
|
|
41818
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
|
|
41819
|
-
"span",
|
|
41820
|
-
{
|
|
41821
|
-
className: cn(
|
|
41822
|
-
"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-medium",
|
|
41823
|
-
enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
41824
|
-
),
|
|
41825
|
-
children: [
|
|
41826
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: cn(
|
|
41827
|
-
"w-1.5 h-1.5 rounded-full",
|
|
41828
|
-
enabled ? "bg-emerald-500" : "bg-red-500"
|
|
41829
|
-
) }),
|
|
41830
|
-
enabled ? "Active" : "Disabled"
|
|
41831
|
-
]
|
|
41832
|
-
}
|
|
41833
|
-
)
|
|
41834
|
-
] }),
|
|
41835
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed mt-1 whitespace-normal", style: { textWrap: "auto" }, children: description })
|
|
41836
|
-
] })
|
|
41837
|
-
] }),
|
|
41838
|
-
stages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "border-t border-[var(--border-color)] px-5 py-4", children: [
|
|
41839
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-3", children: [
|
|
41840
|
-
"Stages (",
|
|
41841
|
-
stages.length,
|
|
41842
|
-
")"
|
|
41843
|
-
] }),
|
|
41844
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex items-stretch", children: [
|
|
41845
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex flex-col items-center mr-3 w-5", children: [
|
|
41846
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
41847
|
-
"div",
|
|
41848
|
-
{
|
|
41849
|
-
className: cn(
|
|
41850
|
-
"w-5 h-5 rounded-full flex items-center justify-center text-[10px] font-bold shrink-0",
|
|
41851
|
-
"bg-interactive/10 text-interactive border border-interactive/30"
|
|
41852
|
-
),
|
|
41853
|
-
children: idx + 1
|
|
41854
|
-
}
|
|
41855
|
-
),
|
|
41856
|
-
idx < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: "w-px flex-1 min-h-[16px] border-l border-dashed border-interactive/30" })
|
|
41857
|
-
] }),
|
|
41858
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex-1 mb-2 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
|
|
41859
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
41860
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
|
|
41861
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "text-[10px] font-mono text-[var(--foreground)]/30 bg-[var(--foreground)]/[0.04] px-1.5 py-0.5 rounded", children: stage.agent_name })
|
|
41862
|
-
] }),
|
|
41863
|
-
/* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
|
|
41864
|
-
stage.tools && stage.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("span", { children: [
|
|
41865
|
-
stage.tools.length,
|
|
41866
|
-
" tool",
|
|
41867
|
-
stage.tools.length !== 1 ? "s" : ""
|
|
41868
|
-
] }),
|
|
41869
|
-
stage.ui_components && stage.ui_components.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("span", { children: [
|
|
41870
|
-
stage.ui_components.length,
|
|
41871
|
-
" component",
|
|
41872
|
-
stage.ui_components.length !== 1 ? "s" : ""
|
|
41873
|
-
] })
|
|
41874
|
-
] })
|
|
41875
|
-
] })
|
|
41876
|
-
] }, stage.agent_name || idx)) })
|
|
41877
|
-
] })
|
|
41878
|
-
]
|
|
41879
|
-
}
|
|
41880
|
-
);
|
|
41881
|
-
};
|
|
41882
|
-
|
|
41883
|
-
// src/molecules/workstream-builder/MultiAgentPlan/MultiAgentPlan.tsx
|
|
41884
|
-
var import_jsx_runtime157 = require("react/jsx-runtime");
|
|
41885
|
-
var FONT_STYLE8 = {
|
|
41886
|
-
fontFamily: "Inter, system-ui, sans-serif"
|
|
41887
|
-
};
|
|
41888
|
-
var MultiAgentPlan = ({
|
|
41889
|
-
stages = [],
|
|
41890
|
-
className
|
|
41891
|
-
}) => {
|
|
41892
|
-
return /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(
|
|
41893
|
-
"div",
|
|
41894
|
-
{
|
|
41895
|
-
className: cn(
|
|
41896
|
-
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
41897
|
-
className
|
|
41898
|
-
),
|
|
41899
|
-
style: FONT_STYLE8,
|
|
41900
|
-
children: [
|
|
41901
|
-
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
41902
|
-
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "w-4 h-4 rounded bg-violet-500/20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
41903
|
-
"svg",
|
|
41904
|
-
{
|
|
41905
|
-
width: "10",
|
|
41906
|
-
height: "10",
|
|
41907
|
-
viewBox: "0 0 24 24",
|
|
41908
|
-
fill: "none",
|
|
41909
|
-
stroke: "currentColor",
|
|
41910
|
-
strokeWidth: "2",
|
|
41911
|
-
className: "text-violet-600",
|
|
41912
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("path", { d: "M16 3h5v5M4 20L21 3M21 16v5h-5M15 15l6 6M4 4l5 5" })
|
|
41913
|
-
}
|
|
41914
|
-
) }),
|
|
41915
|
-
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "Proposed Multi-Agent Workflow" }),
|
|
41916
|
-
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-amber-500/10 text-amber-600 font-medium", children: "Draft" })
|
|
41917
|
-
] }) }),
|
|
41918
|
-
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("div", { className: "flex items-stretch min-w-0", children: [
|
|
41919
|
-
/* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("div", { className: "flex flex-col items-center mr-3 w-6", children: [
|
|
41920
|
-
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-bold shrink-0 bg-interactive/10 text-interactive border border-interactive/30", children: idx + 1 }),
|
|
41921
|
-
idx < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "w-px flex-1 min-h-[12px] border-l border-dashed border-interactive/30" })
|
|
41922
|
-
] }),
|
|
41923
|
-
/* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
|
|
41924
|
-
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
|
|
41925
|
-
stage.description && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
41926
|
-
"p",
|
|
41927
|
-
{
|
|
41928
|
-
className: "text-[11px] text-foreground/50 mt-0.5 whitespace-normal",
|
|
41929
|
-
style: { textWrap: "auto" },
|
|
41930
|
-
children: stage.description
|
|
41931
|
-
}
|
|
41932
|
-
),
|
|
41933
|
-
stage.proposed_tools && stage.proposed_tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "flex flex-wrap gap-1 mt-1.5", children: stage.proposed_tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
41934
|
-
"span",
|
|
41935
|
-
{
|
|
41936
|
-
className: "text-[10px] px-1.5 py-0.5 rounded bg-interactive/10 text-interactive font-mono",
|
|
41937
|
-
children: tool
|
|
41938
|
-
},
|
|
41939
|
-
tool
|
|
41940
|
-
)) })
|
|
41941
|
-
] })
|
|
41942
|
-
] }, stage.name || idx)) }) })
|
|
41943
|
-
]
|
|
41944
|
-
}
|
|
41945
|
-
);
|
|
41946
|
-
};
|
|
41947
|
-
|
|
41948
|
-
// src/molecules/workstream-builder/MultiAgentUISelector/MultiAgentUISelector.tsx
|
|
41949
|
-
var import_react81 = require("react");
|
|
41950
|
-
var import_jsx_runtime158 = require("react/jsx-runtime");
|
|
41951
|
-
var FONT_STYLE9 = {
|
|
41952
|
-
fontFamily: "Inter, system-ui, sans-serif"
|
|
41953
|
-
};
|
|
41954
|
-
var MultiAgentUISelector = ({
|
|
41955
|
-
stages = [],
|
|
41956
|
-
components = [],
|
|
41957
|
-
onSelect,
|
|
41958
|
-
onPreview,
|
|
41959
|
-
className,
|
|
41960
|
-
isLatestMessage = true
|
|
41961
|
-
}) => {
|
|
41962
|
-
const [activeStageId, setActiveStageId] = (0, import_react81.useState)(stages[0]?.id || "");
|
|
41963
|
-
const [selections, setSelections] = (0, import_react81.useState)(
|
|
41964
|
-
() => {
|
|
41965
|
-
const init = {};
|
|
41966
|
-
const recommendedNames = components.filter((c) => c.recommended).map((c) => c.name);
|
|
41967
|
-
for (const stage of stages) {
|
|
41968
|
-
const stageRecs = stage.recommended_components?.length ? stage.recommended_components : recommendedNames;
|
|
41969
|
-
init[stage.id] = new Set(stageRecs);
|
|
41970
|
-
}
|
|
41971
|
-
return init;
|
|
41972
|
-
}
|
|
41973
|
-
);
|
|
41974
|
-
const [submitted, setSubmitted] = (0, import_react81.useState)(false);
|
|
41975
|
-
const grouped = components.reduce((acc, comp) => {
|
|
41976
|
-
const cat = comp.category || "Other";
|
|
41977
|
-
if (!acc[cat]) acc[cat] = [];
|
|
41978
|
-
acc[cat].push(comp);
|
|
41979
|
-
return acc;
|
|
41980
|
-
}, {});
|
|
41981
|
-
const toggleComponent = (0, import_react81.useCallback)(
|
|
41982
|
-
(stageId, compName) => {
|
|
41983
|
-
if (submitted || !isLatestMessage) return;
|
|
41984
|
-
setSelections((prev) => {
|
|
41985
|
-
const updated = { ...prev };
|
|
41986
|
-
const set = new Set(updated[stageId] || []);
|
|
41987
|
-
if (set.has(compName)) {
|
|
41988
|
-
set.delete(compName);
|
|
41989
|
-
} else {
|
|
41990
|
-
set.add(compName);
|
|
41991
|
-
}
|
|
41992
|
-
updated[stageId] = set;
|
|
41993
|
-
return updated;
|
|
41994
|
-
});
|
|
41995
|
-
},
|
|
41996
|
-
[submitted]
|
|
41997
|
-
);
|
|
41998
|
-
const selectAll = (0, import_react81.useCallback)(
|
|
41999
|
-
(stageId) => {
|
|
42000
|
-
if (submitted || !isLatestMessage) return;
|
|
42001
|
-
setSelections((prev) => {
|
|
42002
|
-
const updated = { ...prev };
|
|
42003
|
-
updated[stageId] = new Set(components.map((c) => c.name));
|
|
42004
|
-
return updated;
|
|
42005
|
-
});
|
|
42006
|
-
},
|
|
42007
|
-
[submitted, isLatestMessage, components]
|
|
42008
|
-
);
|
|
42009
|
-
const clearAll = (0, import_react81.useCallback)(
|
|
42010
|
-
(stageId) => {
|
|
42011
|
-
if (submitted || !isLatestMessage) return;
|
|
42012
|
-
setSelections((prev) => {
|
|
42013
|
-
const updated = { ...prev };
|
|
42014
|
-
updated[stageId] = /* @__PURE__ */ new Set();
|
|
42015
|
-
return updated;
|
|
42016
|
-
});
|
|
42017
|
-
},
|
|
42018
|
-
[submitted, isLatestMessage]
|
|
42019
|
-
);
|
|
42020
|
-
const handleContinue = (0, import_react81.useCallback)(() => {
|
|
42021
|
-
setSubmitted(true);
|
|
42022
|
-
if (onSelect) {
|
|
42023
|
-
const result = {};
|
|
42024
|
-
for (const [stageId, set] of Object.entries(selections)) {
|
|
42025
|
-
result[stageId] = Array.from(set);
|
|
42026
|
-
}
|
|
42027
|
-
onSelect(result);
|
|
42028
|
-
}
|
|
42029
|
-
}, [onSelect, selections]);
|
|
42030
|
-
const activeStage = stages.find((s) => s.id === activeStageId);
|
|
42031
|
-
return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
|
|
42032
|
-
"div",
|
|
42033
|
-
{
|
|
42034
|
-
className: cn(
|
|
42035
|
-
"my-3 rounded-xl border border-border bg-card overflow-hidden shadow-sm",
|
|
42036
|
-
className
|
|
42037
|
-
),
|
|
42038
|
-
style: FONT_STYLE9,
|
|
42039
|
-
children: [
|
|
42040
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "px-4 py-3 border-b border-border/60 bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
42041
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "w-5 h-5 rounded-md bg-interactive/15 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
|
|
42042
|
-
"svg",
|
|
42043
|
-
{
|
|
42044
|
-
width: "12",
|
|
42045
|
-
height: "12",
|
|
42046
|
-
viewBox: "0 0 24 24",
|
|
42047
|
-
fill: "none",
|
|
42048
|
-
stroke: "currentColor",
|
|
42049
|
-
strokeWidth: "2",
|
|
42050
|
-
className: "text-interactive",
|
|
42051
|
-
children: [
|
|
42052
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("rect", { x: "3", y: "3", width: "7", height: "7" }),
|
|
42053
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("rect", { x: "14", y: "3", width: "7", height: "7" }),
|
|
42054
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("rect", { x: "3", y: "14", width: "7", height: "7" }),
|
|
42055
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("rect", { x: "14", y: "14", width: "7", height: "7" })
|
|
42056
|
-
]
|
|
42057
|
-
}
|
|
42058
|
-
) }),
|
|
42059
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: "text-xs font-semibold text-foreground", children: "UI Components per Stage" })
|
|
42060
|
-
] }) }),
|
|
42061
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "flex gap-1 border-b border-border/60 px-4 py-2 bg-muted/20", children: stages.map((stage) => /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
42062
|
-
"button",
|
|
42063
|
-
{
|
|
42064
|
-
onClick: () => setActiveStageId(stage.id),
|
|
42065
|
-
className: cn(
|
|
42066
|
-
"px-3 py-1.5 text-[11px] font-medium rounded-full transition-colors",
|
|
42067
|
-
activeStageId === stage.id ? "bg-interactive text-white" : "text-muted-foreground hover:text-foreground hover:bg-muted"
|
|
42068
|
-
),
|
|
42069
|
-
children: stage.name
|
|
42070
|
-
},
|
|
42071
|
-
stage.id
|
|
42072
|
-
)) }),
|
|
42073
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "px-4 py-3", children: [
|
|
42074
|
-
activeStage && /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
|
|
42075
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("p", { className: "text-[10px] text-muted-foreground", children: [
|
|
42076
|
-
"Select components for ",
|
|
42077
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("strong", { className: "text-foreground", children: activeStage.name }),
|
|
42078
|
-
" (",
|
|
42079
|
-
activeStage.agent_name,
|
|
42080
|
-
")"
|
|
42081
|
-
] }),
|
|
42082
|
-
!submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
42083
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
42084
|
-
"button",
|
|
42085
|
-
{
|
|
42086
|
-
onClick: () => selectAll(activeStageId),
|
|
42087
|
-
className: "text-[10px] text-interactive hover:underline font-medium",
|
|
42088
|
-
children: "Select All"
|
|
42089
|
-
}
|
|
42090
|
-
),
|
|
42091
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: "text-muted-foreground/40", children: "|" }),
|
|
42092
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
42093
|
-
"button",
|
|
42094
|
-
{
|
|
42095
|
-
onClick: () => clearAll(activeStageId),
|
|
42096
|
-
className: "text-[10px] text-muted-foreground hover:text-foreground font-medium",
|
|
42097
|
-
children: "Clear"
|
|
42098
|
-
}
|
|
42099
|
-
)
|
|
42100
|
-
] })
|
|
42101
|
-
] }),
|
|
42102
|
-
Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "mb-3", children: [
|
|
42103
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("p", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wide mb-1.5", children: category }),
|
|
42104
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "grid grid-cols-2 gap-1.5", children: comps.map((comp) => {
|
|
42105
|
-
const isSelected = selections[activeStageId]?.has(comp.name) || false;
|
|
42106
|
-
return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
|
|
42107
|
-
"div",
|
|
42108
|
-
{
|
|
42109
|
-
role: "button",
|
|
42110
|
-
tabIndex: 0,
|
|
42111
|
-
onClick: () => toggleComponent(activeStageId, comp.name),
|
|
42112
|
-
onKeyDown: (e) => {
|
|
42113
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
42114
|
-
e.preventDefault();
|
|
42115
|
-
toggleComponent(activeStageId, comp.name);
|
|
42116
|
-
}
|
|
42117
|
-
},
|
|
42118
|
-
className: cn(
|
|
42119
|
-
"text-left p-2.5 rounded-lg border text-[11px] transition-all overflow-hidden cursor-pointer",
|
|
42120
|
-
isSelected ? "border-interactive bg-interactive/5" : "border-border hover:border-interactive/50",
|
|
42121
|
-
(submitted || !isLatestMessage) && "opacity-60 cursor-default"
|
|
42122
|
-
),
|
|
42123
|
-
children: [
|
|
42124
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
42125
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
42126
|
-
"div",
|
|
42127
|
-
{
|
|
42128
|
-
className: cn(
|
|
42129
|
-
"w-3.5 h-3.5 rounded border flex items-center justify-center shrink-0",
|
|
42130
|
-
isSelected ? "bg-interactive border-interactive" : "border-muted-foreground/30"
|
|
42131
|
-
),
|
|
42132
|
-
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
42133
|
-
"svg",
|
|
42134
|
-
{
|
|
42135
|
-
width: "8",
|
|
42136
|
-
height: "8",
|
|
42137
|
-
viewBox: "0 0 24 24",
|
|
42138
|
-
fill: "none",
|
|
42139
|
-
stroke: "white",
|
|
42140
|
-
strokeWidth: "3",
|
|
42141
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
42142
|
-
}
|
|
42143
|
-
)
|
|
42144
|
-
}
|
|
42145
|
-
),
|
|
42146
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: "font-medium text-foreground", children: comp.display_name }),
|
|
42147
|
-
comp.recommended && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: "px-1 py-px text-[8px] font-semibold uppercase tracking-wider rounded-full bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 leading-tight", children: "Rec" }),
|
|
42148
|
-
onPreview && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
42149
|
-
"button",
|
|
42150
|
-
{
|
|
42151
|
-
type: "button",
|
|
42152
|
-
onClick: (e) => {
|
|
42153
|
-
e.stopPropagation();
|
|
42154
|
-
onPreview(comp.name);
|
|
42155
|
-
},
|
|
42156
|
-
className: "ml-auto shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
|
|
42157
|
-
title: `Preview ${comp.display_name}`,
|
|
42158
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
|
|
42159
|
-
"svg",
|
|
42160
|
-
{
|
|
42161
|
-
width: "14",
|
|
42162
|
-
height: "14",
|
|
42163
|
-
viewBox: "0 0 24 24",
|
|
42164
|
-
fill: "none",
|
|
42165
|
-
stroke: "currentColor",
|
|
42166
|
-
strokeWidth: "2",
|
|
42167
|
-
strokeLinecap: "round",
|
|
42168
|
-
strokeLinejoin: "round",
|
|
42169
|
-
className: "text-muted-foreground hover:text-primary",
|
|
42170
|
-
children: [
|
|
42171
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
42172
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
42173
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
42174
|
-
]
|
|
42175
|
-
}
|
|
42176
|
-
)
|
|
42177
|
-
}
|
|
42178
|
-
)
|
|
42179
|
-
] }),
|
|
42180
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)("p", { className: "text-[10px] text-muted-foreground mt-0.5 ml-5 whitespace-normal", children: comp.description })
|
|
42181
|
-
]
|
|
42182
|
-
},
|
|
42183
|
-
comp.name
|
|
42184
|
-
);
|
|
42185
|
-
}) })
|
|
42186
|
-
] }, category))
|
|
42187
|
-
] }),
|
|
42188
|
-
!submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "px-4 py-3 border-t border-border/60 bg-muted/30", children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
42189
|
-
"button",
|
|
42190
|
-
{
|
|
42191
|
-
onClick: handleContinue,
|
|
42192
|
-
className: "w-full py-2 rounded-lg bg-interactive text-white text-xs font-medium hover:opacity-90 transition-opacity",
|
|
42193
|
-
children: "Continue"
|
|
42194
|
-
}
|
|
42195
|
-
) }),
|
|
42196
|
-
submitted && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "px-4 pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "text-[10px] text-emerald-600 font-medium text-center py-1.5", children: "Selections confirmed" }) })
|
|
42197
|
-
]
|
|
42198
|
-
}
|
|
42199
|
-
);
|
|
42200
|
-
};
|
|
42201
|
-
|
|
42202
|
-
// src/molecules/workstream-builder/StageIndicator/StageIndicator.tsx
|
|
42203
|
-
var import_jsx_runtime159 = require("react/jsx-runtime");
|
|
42204
|
-
var FONT_STYLE10 = {
|
|
42205
|
-
fontFamily: "Inter, system-ui, sans-serif"
|
|
42206
|
-
};
|
|
42207
|
-
var StageIndicator = ({
|
|
42208
|
-
stage_name,
|
|
42209
|
-
agent_name,
|
|
42210
|
-
className
|
|
42211
|
-
}) => {
|
|
42212
|
-
return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
|
|
42213
|
-
"div",
|
|
42214
|
-
{
|
|
42215
|
-
className: cn(
|
|
42216
|
-
"flex items-center gap-3 my-4",
|
|
42217
|
-
className
|
|
42218
|
-
),
|
|
42219
|
-
style: { ...FONT_STYLE10, animation: "fadeIn 0.3s ease-out" },
|
|
42220
|
-
children: [
|
|
42221
|
-
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
|
|
42222
|
-
/* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "flex items-center gap-1.5 px-3 py-1 rounded-full bg-violet-500/10 border border-violet-500/20", children: [
|
|
42223
|
-
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "w-1.5 h-1.5 rounded-full bg-violet-500 animate-pulse" }),
|
|
42224
|
-
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("span", { className: "text-[10px] font-medium text-violet-600", children: stage_name || agent_name })
|
|
42225
|
-
] }),
|
|
42226
|
-
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "flex-1 h-px bg-[var(--border-color)]" })
|
|
42227
|
-
]
|
|
42228
|
-
}
|
|
42229
|
-
);
|
|
42230
|
-
};
|
|
42231
|
-
|
|
42232
41065
|
// src/components/ui/index.ts
|
|
42233
41066
|
var ui_exports = {};
|
|
42234
41067
|
__export(ui_exports, {
|
|
@@ -42521,7 +41354,7 @@ __export(ui_exports, {
|
|
|
42521
41354
|
// src/components/ui/button-group.tsx
|
|
42522
41355
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
42523
41356
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
42524
|
-
var
|
|
41357
|
+
var import_jsx_runtime150 = require("react/jsx-runtime");
|
|
42525
41358
|
var buttonGroupVariants = (0, import_class_variance_authority8.cva)(
|
|
42526
41359
|
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
42527
41360
|
{
|
|
@@ -42541,7 +41374,7 @@ function ButtonGroup({
|
|
|
42541
41374
|
orientation,
|
|
42542
41375
|
...props
|
|
42543
41376
|
}) {
|
|
42544
|
-
return /* @__PURE__ */ (0,
|
|
41377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
42545
41378
|
"div",
|
|
42546
41379
|
{
|
|
42547
41380
|
role: "group",
|
|
@@ -42558,7 +41391,7 @@ function ButtonGroupText({
|
|
|
42558
41391
|
...props
|
|
42559
41392
|
}) {
|
|
42560
41393
|
const Comp = asChild ? import_react_slot4.Slot : "div";
|
|
42561
|
-
return /* @__PURE__ */ (0,
|
|
41394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
42562
41395
|
Comp,
|
|
42563
41396
|
{
|
|
42564
41397
|
className: cn(
|
|
@@ -42574,7 +41407,7 @@ function ButtonGroupSeparator({
|
|
|
42574
41407
|
orientation = "vertical",
|
|
42575
41408
|
...props
|
|
42576
41409
|
}) {
|
|
42577
|
-
return /* @__PURE__ */ (0,
|
|
41410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
|
|
42578
41411
|
Separator2,
|
|
42579
41412
|
{
|
|
42580
41413
|
"data-slot": "button-group-separator",
|
|
@@ -42590,9 +41423,9 @@ function ButtonGroupSeparator({
|
|
|
42590
41423
|
|
|
42591
41424
|
// src/components/ui/empty.tsx
|
|
42592
41425
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
42593
|
-
var
|
|
41426
|
+
var import_jsx_runtime151 = require("react/jsx-runtime");
|
|
42594
41427
|
function Empty({ className, ...props }) {
|
|
42595
|
-
return /* @__PURE__ */ (0,
|
|
41428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
42596
41429
|
"div",
|
|
42597
41430
|
{
|
|
42598
41431
|
"data-slot": "empty",
|
|
@@ -42605,7 +41438,7 @@ function Empty({ className, ...props }) {
|
|
|
42605
41438
|
);
|
|
42606
41439
|
}
|
|
42607
41440
|
function EmptyHeader({ className, ...props }) {
|
|
42608
|
-
return /* @__PURE__ */ (0,
|
|
41441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
42609
41442
|
"div",
|
|
42610
41443
|
{
|
|
42611
41444
|
"data-slot": "empty-header",
|
|
@@ -42636,7 +41469,7 @@ function EmptyMedia({
|
|
|
42636
41469
|
variant = "default",
|
|
42637
41470
|
...props
|
|
42638
41471
|
}) {
|
|
42639
|
-
return /* @__PURE__ */ (0,
|
|
41472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
42640
41473
|
"div",
|
|
42641
41474
|
{
|
|
42642
41475
|
"data-slot": "empty-icon",
|
|
@@ -42647,7 +41480,7 @@ function EmptyMedia({
|
|
|
42647
41480
|
);
|
|
42648
41481
|
}
|
|
42649
41482
|
function EmptyTitle({ className, ...props }) {
|
|
42650
|
-
return /* @__PURE__ */ (0,
|
|
41483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
42651
41484
|
"div",
|
|
42652
41485
|
{
|
|
42653
41486
|
"data-slot": "empty-title",
|
|
@@ -42657,7 +41490,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
42657
41490
|
);
|
|
42658
41491
|
}
|
|
42659
41492
|
function EmptyDescription({ className, ...props }) {
|
|
42660
|
-
return /* @__PURE__ */ (0,
|
|
41493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
42661
41494
|
"div",
|
|
42662
41495
|
{
|
|
42663
41496
|
"data-slot": "empty-description",
|
|
@@ -42670,7 +41503,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
42670
41503
|
);
|
|
42671
41504
|
}
|
|
42672
41505
|
function EmptyContent({ className, ...props }) {
|
|
42673
|
-
return /* @__PURE__ */ (0,
|
|
41506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
42674
41507
|
"div",
|
|
42675
41508
|
{
|
|
42676
41509
|
"data-slot": "empty-content",
|
|
@@ -42684,11 +41517,11 @@ function EmptyContent({ className, ...props }) {
|
|
|
42684
41517
|
}
|
|
42685
41518
|
|
|
42686
41519
|
// src/components/ui/field.tsx
|
|
42687
|
-
var
|
|
41520
|
+
var import_react77 = require("react");
|
|
42688
41521
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
42689
|
-
var
|
|
41522
|
+
var import_jsx_runtime152 = require("react/jsx-runtime");
|
|
42690
41523
|
function FieldSet({ className, ...props }) {
|
|
42691
|
-
return /* @__PURE__ */ (0,
|
|
41524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
42692
41525
|
"fieldset",
|
|
42693
41526
|
{
|
|
42694
41527
|
"data-slot": "field-set",
|
|
@@ -42706,7 +41539,7 @@ function FieldLegend({
|
|
|
42706
41539
|
variant = "legend",
|
|
42707
41540
|
...props
|
|
42708
41541
|
}) {
|
|
42709
|
-
return /* @__PURE__ */ (0,
|
|
41542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
42710
41543
|
"legend",
|
|
42711
41544
|
{
|
|
42712
41545
|
"data-slot": "field-legend",
|
|
@@ -42722,7 +41555,7 @@ function FieldLegend({
|
|
|
42722
41555
|
);
|
|
42723
41556
|
}
|
|
42724
41557
|
function FieldGroup({ className, ...props }) {
|
|
42725
|
-
return /* @__PURE__ */ (0,
|
|
41558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
42726
41559
|
"div",
|
|
42727
41560
|
{
|
|
42728
41561
|
"data-slot": "field-group",
|
|
@@ -42762,7 +41595,7 @@ function Field({
|
|
|
42762
41595
|
orientation = "vertical",
|
|
42763
41596
|
...props
|
|
42764
41597
|
}) {
|
|
42765
|
-
return /* @__PURE__ */ (0,
|
|
41598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
42766
41599
|
"div",
|
|
42767
41600
|
{
|
|
42768
41601
|
role: "group",
|
|
@@ -42774,7 +41607,7 @@ function Field({
|
|
|
42774
41607
|
);
|
|
42775
41608
|
}
|
|
42776
41609
|
function FieldContent({ className, ...props }) {
|
|
42777
|
-
return /* @__PURE__ */ (0,
|
|
41610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
42778
41611
|
"div",
|
|
42779
41612
|
{
|
|
42780
41613
|
"data-slot": "field-content",
|
|
@@ -42790,7 +41623,7 @@ function FieldLabel({
|
|
|
42790
41623
|
className,
|
|
42791
41624
|
...props
|
|
42792
41625
|
}) {
|
|
42793
|
-
return /* @__PURE__ */ (0,
|
|
41626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
42794
41627
|
Label,
|
|
42795
41628
|
{
|
|
42796
41629
|
"data-slot": "field-label",
|
|
@@ -42805,7 +41638,7 @@ function FieldLabel({
|
|
|
42805
41638
|
);
|
|
42806
41639
|
}
|
|
42807
41640
|
function FieldTitle({ className, ...props }) {
|
|
42808
|
-
return /* @__PURE__ */ (0,
|
|
41641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
42809
41642
|
"div",
|
|
42810
41643
|
{
|
|
42811
41644
|
"data-slot": "field-label",
|
|
@@ -42818,7 +41651,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
42818
41651
|
);
|
|
42819
41652
|
}
|
|
42820
41653
|
function FieldDescription({ className, ...props }) {
|
|
42821
|
-
return /* @__PURE__ */ (0,
|
|
41654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
42822
41655
|
"p",
|
|
42823
41656
|
{
|
|
42824
41657
|
"data-slot": "field-description",
|
|
@@ -42837,7 +41670,7 @@ function FieldSeparator({
|
|
|
42837
41670
|
className,
|
|
42838
41671
|
...props
|
|
42839
41672
|
}) {
|
|
42840
|
-
return /* @__PURE__ */ (0,
|
|
41673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
|
|
42841
41674
|
"div",
|
|
42842
41675
|
{
|
|
42843
41676
|
"data-slot": "field-separator",
|
|
@@ -42848,8 +41681,8 @@ function FieldSeparator({
|
|
|
42848
41681
|
),
|
|
42849
41682
|
...props,
|
|
42850
41683
|
children: [
|
|
42851
|
-
/* @__PURE__ */ (0,
|
|
42852
|
-
children && /* @__PURE__ */ (0,
|
|
41684
|
+
/* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
41685
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
42853
41686
|
"span",
|
|
42854
41687
|
{
|
|
42855
41688
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -42867,7 +41700,7 @@ function FieldError({
|
|
|
42867
41700
|
errors,
|
|
42868
41701
|
...props
|
|
42869
41702
|
}) {
|
|
42870
|
-
const content = (0,
|
|
41703
|
+
const content = (0, import_react77.useMemo)(() => {
|
|
42871
41704
|
if (children) {
|
|
42872
41705
|
return children;
|
|
42873
41706
|
}
|
|
@@ -42877,14 +41710,14 @@ function FieldError({
|
|
|
42877
41710
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
42878
41711
|
return errors[0].message;
|
|
42879
41712
|
}
|
|
42880
|
-
return /* @__PURE__ */ (0,
|
|
42881
|
-
(error, index) => error?.message && /* @__PURE__ */ (0,
|
|
41713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
41714
|
+
(error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("li", { children: error.message }, index)
|
|
42882
41715
|
) });
|
|
42883
41716
|
}, [children, errors]);
|
|
42884
41717
|
if (!content) {
|
|
42885
41718
|
return null;
|
|
42886
41719
|
}
|
|
42887
|
-
return /* @__PURE__ */ (0,
|
|
41720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
42888
41721
|
"div",
|
|
42889
41722
|
{
|
|
42890
41723
|
role: "alert",
|
|
@@ -42898,9 +41731,9 @@ function FieldError({
|
|
|
42898
41731
|
|
|
42899
41732
|
// src/components/ui/input-group.tsx
|
|
42900
41733
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
42901
|
-
var
|
|
41734
|
+
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
42902
41735
|
function InputGroup({ className, ...props }) {
|
|
42903
|
-
return /* @__PURE__ */ (0,
|
|
41736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
42904
41737
|
"div",
|
|
42905
41738
|
{
|
|
42906
41739
|
"data-slot": "input-group",
|
|
@@ -42944,7 +41777,7 @@ function InputGroupAddon({
|
|
|
42944
41777
|
align = "inline-start",
|
|
42945
41778
|
...props
|
|
42946
41779
|
}) {
|
|
42947
|
-
return /* @__PURE__ */ (0,
|
|
41780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
42948
41781
|
"div",
|
|
42949
41782
|
{
|
|
42950
41783
|
role: "group",
|
|
@@ -42984,7 +41817,7 @@ function InputGroupButton({
|
|
|
42984
41817
|
size = "xs",
|
|
42985
41818
|
...props
|
|
42986
41819
|
}) {
|
|
42987
|
-
return /* @__PURE__ */ (0,
|
|
41820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
42988
41821
|
Button,
|
|
42989
41822
|
{
|
|
42990
41823
|
type,
|
|
@@ -42996,7 +41829,7 @@ function InputGroupButton({
|
|
|
42996
41829
|
);
|
|
42997
41830
|
}
|
|
42998
41831
|
function InputGroupText({ className, ...props }) {
|
|
42999
|
-
return /* @__PURE__ */ (0,
|
|
41832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
43000
41833
|
"span",
|
|
43001
41834
|
{
|
|
43002
41835
|
className: cn(
|
|
@@ -43011,7 +41844,7 @@ function InputGroupInput({
|
|
|
43011
41844
|
className,
|
|
43012
41845
|
...props
|
|
43013
41846
|
}) {
|
|
43014
|
-
return /* @__PURE__ */ (0,
|
|
41847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
43015
41848
|
Input,
|
|
43016
41849
|
{
|
|
43017
41850
|
"data-slot": "input-group-control",
|
|
@@ -43027,7 +41860,7 @@ function InputGroupTextarea({
|
|
|
43027
41860
|
className,
|
|
43028
41861
|
...props
|
|
43029
41862
|
}) {
|
|
43030
|
-
return /* @__PURE__ */ (0,
|
|
41863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
|
|
43031
41864
|
Textarea,
|
|
43032
41865
|
{
|
|
43033
41866
|
"data-slot": "input-group-control",
|
|
@@ -43043,9 +41876,9 @@ function InputGroupTextarea({
|
|
|
43043
41876
|
// src/components/ui/item.tsx
|
|
43044
41877
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
43045
41878
|
var import_class_variance_authority12 = require("class-variance-authority");
|
|
43046
|
-
var
|
|
41879
|
+
var import_jsx_runtime154 = require("react/jsx-runtime");
|
|
43047
41880
|
function ItemGroup({ className, ...props }) {
|
|
43048
|
-
return /* @__PURE__ */ (0,
|
|
41881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
43049
41882
|
"div",
|
|
43050
41883
|
{
|
|
43051
41884
|
role: "list",
|
|
@@ -43059,7 +41892,7 @@ function ItemSeparator({
|
|
|
43059
41892
|
className,
|
|
43060
41893
|
...props
|
|
43061
41894
|
}) {
|
|
43062
|
-
return /* @__PURE__ */ (0,
|
|
41895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
43063
41896
|
Separator2,
|
|
43064
41897
|
{
|
|
43065
41898
|
"data-slot": "item-separator",
|
|
@@ -43097,7 +41930,7 @@ function Item8({
|
|
|
43097
41930
|
...props
|
|
43098
41931
|
}) {
|
|
43099
41932
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
43100
|
-
return /* @__PURE__ */ (0,
|
|
41933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
43101
41934
|
Comp,
|
|
43102
41935
|
{
|
|
43103
41936
|
"data-slot": "item",
|
|
@@ -43128,7 +41961,7 @@ function ItemMedia({
|
|
|
43128
41961
|
variant = "default",
|
|
43129
41962
|
...props
|
|
43130
41963
|
}) {
|
|
43131
|
-
return /* @__PURE__ */ (0,
|
|
41964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
43132
41965
|
"div",
|
|
43133
41966
|
{
|
|
43134
41967
|
"data-slot": "item-media",
|
|
@@ -43139,7 +41972,7 @@ function ItemMedia({
|
|
|
43139
41972
|
);
|
|
43140
41973
|
}
|
|
43141
41974
|
function ItemContent({ className, ...props }) {
|
|
43142
|
-
return /* @__PURE__ */ (0,
|
|
41975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
43143
41976
|
"div",
|
|
43144
41977
|
{
|
|
43145
41978
|
"data-slot": "item-content",
|
|
@@ -43152,7 +41985,7 @@ function ItemContent({ className, ...props }) {
|
|
|
43152
41985
|
);
|
|
43153
41986
|
}
|
|
43154
41987
|
function ItemTitle({ className, ...props }) {
|
|
43155
|
-
return /* @__PURE__ */ (0,
|
|
41988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
43156
41989
|
"div",
|
|
43157
41990
|
{
|
|
43158
41991
|
"data-slot": "item-title",
|
|
@@ -43165,7 +41998,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
43165
41998
|
);
|
|
43166
41999
|
}
|
|
43167
42000
|
function ItemDescription({ className, ...props }) {
|
|
43168
|
-
return /* @__PURE__ */ (0,
|
|
42001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
43169
42002
|
"p",
|
|
43170
42003
|
{
|
|
43171
42004
|
"data-slot": "item-description",
|
|
@@ -43179,7 +42012,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
43179
42012
|
);
|
|
43180
42013
|
}
|
|
43181
42014
|
function ItemActions({ className, ...props }) {
|
|
43182
|
-
return /* @__PURE__ */ (0,
|
|
42015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
43183
42016
|
"div",
|
|
43184
42017
|
{
|
|
43185
42018
|
"data-slot": "item-actions",
|
|
@@ -43189,7 +42022,7 @@ function ItemActions({ className, ...props }) {
|
|
|
43189
42022
|
);
|
|
43190
42023
|
}
|
|
43191
42024
|
function ItemHeader({ className, ...props }) {
|
|
43192
|
-
return /* @__PURE__ */ (0,
|
|
42025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
43193
42026
|
"div",
|
|
43194
42027
|
{
|
|
43195
42028
|
"data-slot": "item-header",
|
|
@@ -43202,7 +42035,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
43202
42035
|
);
|
|
43203
42036
|
}
|
|
43204
42037
|
function ItemFooter({ className, ...props }) {
|
|
43205
|
-
return /* @__PURE__ */ (0,
|
|
42038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
43206
42039
|
"div",
|
|
43207
42040
|
{
|
|
43208
42041
|
"data-slot": "item-footer",
|
|
@@ -43216,9 +42049,9 @@ function ItemFooter({ className, ...props }) {
|
|
|
43216
42049
|
}
|
|
43217
42050
|
|
|
43218
42051
|
// src/components/ui/kbd.tsx
|
|
43219
|
-
var
|
|
42052
|
+
var import_jsx_runtime155 = require("react/jsx-runtime");
|
|
43220
42053
|
function Kbd({ className, ...props }) {
|
|
43221
|
-
return /* @__PURE__ */ (0,
|
|
42054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
43222
42055
|
"kbd",
|
|
43223
42056
|
{
|
|
43224
42057
|
"data-slot": "kbd",
|
|
@@ -43233,7 +42066,7 @@ function Kbd({ className, ...props }) {
|
|
|
43233
42066
|
);
|
|
43234
42067
|
}
|
|
43235
42068
|
function KbdGroup({ className, ...props }) {
|
|
43236
|
-
return /* @__PURE__ */ (0,
|
|
42069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
43237
42070
|
"kbd",
|
|
43238
42071
|
{
|
|
43239
42072
|
"data-slot": "kbd-group",
|
|
@@ -43244,16 +42077,16 @@ function KbdGroup({ className, ...props }) {
|
|
|
43244
42077
|
}
|
|
43245
42078
|
|
|
43246
42079
|
// src/components/ui/sidebar.tsx
|
|
43247
|
-
var
|
|
42080
|
+
var React100 = __toESM(require("react"), 1);
|
|
43248
42081
|
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
43249
42082
|
var import_class_variance_authority13 = require("class-variance-authority");
|
|
43250
42083
|
|
|
43251
42084
|
// src/hooks/use-mobile.tsx
|
|
43252
|
-
var
|
|
42085
|
+
var React99 = __toESM(require("react"), 1);
|
|
43253
42086
|
var MOBILE_BREAKPOINT = 768;
|
|
43254
42087
|
function useIsMobile() {
|
|
43255
|
-
const [isMobile, setIsMobile] =
|
|
43256
|
-
|
|
42088
|
+
const [isMobile, setIsMobile] = React99.useState(void 0);
|
|
42089
|
+
React99.useEffect(() => {
|
|
43257
42090
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
43258
42091
|
const onChange = () => {
|
|
43259
42092
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -43266,22 +42099,22 @@ function useIsMobile() {
|
|
|
43266
42099
|
}
|
|
43267
42100
|
|
|
43268
42101
|
// src/components/ui/sidebar.tsx
|
|
43269
|
-
var
|
|
42102
|
+
var import_jsx_runtime156 = require("react/jsx-runtime");
|
|
43270
42103
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
43271
42104
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
43272
42105
|
var SIDEBAR_WIDTH = "16rem";
|
|
43273
42106
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
43274
42107
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
43275
42108
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
43276
|
-
var SidebarContext =
|
|
42109
|
+
var SidebarContext = React100.createContext(null);
|
|
43277
42110
|
function useSidebar() {
|
|
43278
|
-
const context =
|
|
42111
|
+
const context = React100.useContext(SidebarContext);
|
|
43279
42112
|
if (!context) {
|
|
43280
42113
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
43281
42114
|
}
|
|
43282
42115
|
return context;
|
|
43283
42116
|
}
|
|
43284
|
-
var SidebarProvider =
|
|
42117
|
+
var SidebarProvider = React100.forwardRef(
|
|
43285
42118
|
({
|
|
43286
42119
|
defaultOpen = true,
|
|
43287
42120
|
open: openProp,
|
|
@@ -43292,10 +42125,10 @@ var SidebarProvider = React104.forwardRef(
|
|
|
43292
42125
|
...props
|
|
43293
42126
|
}, ref) => {
|
|
43294
42127
|
const isMobile = useIsMobile();
|
|
43295
|
-
const [openMobile, setOpenMobile] =
|
|
43296
|
-
const [_open, _setOpen] =
|
|
42128
|
+
const [openMobile, setOpenMobile] = React100.useState(false);
|
|
42129
|
+
const [_open, _setOpen] = React100.useState(defaultOpen);
|
|
43297
42130
|
const open = openProp ?? _open;
|
|
43298
|
-
const setOpen =
|
|
42131
|
+
const setOpen = React100.useCallback(
|
|
43299
42132
|
(value) => {
|
|
43300
42133
|
const openState = typeof value === "function" ? value(open) : value;
|
|
43301
42134
|
if (setOpenProp) {
|
|
@@ -43307,10 +42140,10 @@ var SidebarProvider = React104.forwardRef(
|
|
|
43307
42140
|
},
|
|
43308
42141
|
[setOpenProp, open]
|
|
43309
42142
|
);
|
|
43310
|
-
const toggleSidebar =
|
|
42143
|
+
const toggleSidebar = React100.useCallback(() => {
|
|
43311
42144
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
43312
42145
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
43313
|
-
|
|
42146
|
+
React100.useEffect(() => {
|
|
43314
42147
|
const handleKeyDown = (event) => {
|
|
43315
42148
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
43316
42149
|
event.preventDefault();
|
|
@@ -43321,7 +42154,7 @@ var SidebarProvider = React104.forwardRef(
|
|
|
43321
42154
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
43322
42155
|
}, [toggleSidebar]);
|
|
43323
42156
|
const state = open ? "expanded" : "collapsed";
|
|
43324
|
-
const contextValue =
|
|
42157
|
+
const contextValue = React100.useMemo(
|
|
43325
42158
|
() => ({
|
|
43326
42159
|
state,
|
|
43327
42160
|
open,
|
|
@@ -43333,7 +42166,7 @@ var SidebarProvider = React104.forwardRef(
|
|
|
43333
42166
|
}),
|
|
43334
42167
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
43335
42168
|
);
|
|
43336
|
-
return /* @__PURE__ */ (0,
|
|
42169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43337
42170
|
"div",
|
|
43338
42171
|
{
|
|
43339
42172
|
style: {
|
|
@@ -43353,7 +42186,7 @@ var SidebarProvider = React104.forwardRef(
|
|
|
43353
42186
|
}
|
|
43354
42187
|
);
|
|
43355
42188
|
SidebarProvider.displayName = "SidebarProvider";
|
|
43356
|
-
var Sidebar =
|
|
42189
|
+
var Sidebar = React100.forwardRef(
|
|
43357
42190
|
({
|
|
43358
42191
|
side = "left",
|
|
43359
42192
|
variant = "sidebar",
|
|
@@ -43364,7 +42197,7 @@ var Sidebar = React104.forwardRef(
|
|
|
43364
42197
|
}, ref) => {
|
|
43365
42198
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
43366
42199
|
if (collapsible === "none") {
|
|
43367
|
-
return /* @__PURE__ */ (0,
|
|
42200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43368
42201
|
"div",
|
|
43369
42202
|
{
|
|
43370
42203
|
className: cn(
|
|
@@ -43378,7 +42211,7 @@ var Sidebar = React104.forwardRef(
|
|
|
43378
42211
|
);
|
|
43379
42212
|
}
|
|
43380
42213
|
if (isMobile) {
|
|
43381
|
-
return /* @__PURE__ */ (0,
|
|
42214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
|
|
43382
42215
|
SheetContent,
|
|
43383
42216
|
{
|
|
43384
42217
|
"data-sidebar": "sidebar",
|
|
@@ -43389,16 +42222,16 @@ var Sidebar = React104.forwardRef(
|
|
|
43389
42222
|
},
|
|
43390
42223
|
side,
|
|
43391
42224
|
children: [
|
|
43392
|
-
/* @__PURE__ */ (0,
|
|
43393
|
-
/* @__PURE__ */ (0,
|
|
43394
|
-
/* @__PURE__ */ (0,
|
|
42225
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
42226
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
42227
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
43395
42228
|
] }),
|
|
43396
|
-
/* @__PURE__ */ (0,
|
|
42229
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
43397
42230
|
]
|
|
43398
42231
|
}
|
|
43399
42232
|
) });
|
|
43400
42233
|
}
|
|
43401
|
-
return /* @__PURE__ */ (0,
|
|
42234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
|
|
43402
42235
|
"div",
|
|
43403
42236
|
{
|
|
43404
42237
|
ref,
|
|
@@ -43408,7 +42241,7 @@ var Sidebar = React104.forwardRef(
|
|
|
43408
42241
|
"data-variant": variant,
|
|
43409
42242
|
"data-side": side,
|
|
43410
42243
|
children: [
|
|
43411
|
-
/* @__PURE__ */ (0,
|
|
42244
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43412
42245
|
"div",
|
|
43413
42246
|
{
|
|
43414
42247
|
className: cn(
|
|
@@ -43419,7 +42252,7 @@ var Sidebar = React104.forwardRef(
|
|
|
43419
42252
|
)
|
|
43420
42253
|
}
|
|
43421
42254
|
),
|
|
43422
|
-
/* @__PURE__ */ (0,
|
|
42255
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43423
42256
|
"div",
|
|
43424
42257
|
{
|
|
43425
42258
|
className: cn(
|
|
@@ -43430,7 +42263,7 @@ var Sidebar = React104.forwardRef(
|
|
|
43430
42263
|
className
|
|
43431
42264
|
),
|
|
43432
42265
|
...props,
|
|
43433
|
-
children: /* @__PURE__ */ (0,
|
|
42266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43434
42267
|
"div",
|
|
43435
42268
|
{
|
|
43436
42269
|
"data-sidebar": "sidebar",
|
|
@@ -43446,9 +42279,9 @@ var Sidebar = React104.forwardRef(
|
|
|
43446
42279
|
}
|
|
43447
42280
|
);
|
|
43448
42281
|
Sidebar.displayName = "Sidebar";
|
|
43449
|
-
var SidebarTrigger =
|
|
42282
|
+
var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
43450
42283
|
const { toggleSidebar } = useSidebar();
|
|
43451
|
-
return /* @__PURE__ */ (0,
|
|
42284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
|
|
43452
42285
|
Button,
|
|
43453
42286
|
{
|
|
43454
42287
|
ref,
|
|
@@ -43462,16 +42295,16 @@ var SidebarTrigger = React104.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
43462
42295
|
},
|
|
43463
42296
|
...props,
|
|
43464
42297
|
children: [
|
|
43465
|
-
/* @__PURE__ */ (0,
|
|
43466
|
-
/* @__PURE__ */ (0,
|
|
42298
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(PanelLeft, {}),
|
|
42299
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
43467
42300
|
]
|
|
43468
42301
|
}
|
|
43469
42302
|
);
|
|
43470
42303
|
});
|
|
43471
42304
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
43472
|
-
var SidebarRail =
|
|
42305
|
+
var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
|
|
43473
42306
|
const { toggleSidebar } = useSidebar();
|
|
43474
|
-
return /* @__PURE__ */ (0,
|
|
42307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43475
42308
|
"button",
|
|
43476
42309
|
{
|
|
43477
42310
|
ref,
|
|
@@ -43494,8 +42327,8 @@ var SidebarRail = React104.forwardRef(({ className, ...props }, ref) => {
|
|
|
43494
42327
|
);
|
|
43495
42328
|
});
|
|
43496
42329
|
SidebarRail.displayName = "SidebarRail";
|
|
43497
|
-
var SidebarInset =
|
|
43498
|
-
return /* @__PURE__ */ (0,
|
|
42330
|
+
var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
|
|
42331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43499
42332
|
"main",
|
|
43500
42333
|
{
|
|
43501
42334
|
ref,
|
|
@@ -43509,8 +42342,8 @@ var SidebarInset = React104.forwardRef(({ className, ...props }, ref) => {
|
|
|
43509
42342
|
);
|
|
43510
42343
|
});
|
|
43511
42344
|
SidebarInset.displayName = "SidebarInset";
|
|
43512
|
-
var SidebarInput =
|
|
43513
|
-
return /* @__PURE__ */ (0,
|
|
42345
|
+
var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
|
|
42346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43514
42347
|
Input,
|
|
43515
42348
|
{
|
|
43516
42349
|
ref,
|
|
@@ -43524,8 +42357,8 @@ var SidebarInput = React104.forwardRef(({ className, ...props }, ref) => {
|
|
|
43524
42357
|
);
|
|
43525
42358
|
});
|
|
43526
42359
|
SidebarInput.displayName = "SidebarInput";
|
|
43527
|
-
var SidebarHeader =
|
|
43528
|
-
return /* @__PURE__ */ (0,
|
|
42360
|
+
var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
|
|
42361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43529
42362
|
"div",
|
|
43530
42363
|
{
|
|
43531
42364
|
ref,
|
|
@@ -43536,8 +42369,8 @@ var SidebarHeader = React104.forwardRef(({ className, ...props }, ref) => {
|
|
|
43536
42369
|
);
|
|
43537
42370
|
});
|
|
43538
42371
|
SidebarHeader.displayName = "SidebarHeader";
|
|
43539
|
-
var SidebarFooter =
|
|
43540
|
-
return /* @__PURE__ */ (0,
|
|
42372
|
+
var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
|
|
42373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43541
42374
|
"div",
|
|
43542
42375
|
{
|
|
43543
42376
|
ref,
|
|
@@ -43548,8 +42381,8 @@ var SidebarFooter = React104.forwardRef(({ className, ...props }, ref) => {
|
|
|
43548
42381
|
);
|
|
43549
42382
|
});
|
|
43550
42383
|
SidebarFooter.displayName = "SidebarFooter";
|
|
43551
|
-
var SidebarSeparator =
|
|
43552
|
-
return /* @__PURE__ */ (0,
|
|
42384
|
+
var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
|
|
42385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43553
42386
|
Separator2,
|
|
43554
42387
|
{
|
|
43555
42388
|
ref,
|
|
@@ -43560,8 +42393,8 @@ var SidebarSeparator = React104.forwardRef(({ className, ...props }, ref) => {
|
|
|
43560
42393
|
);
|
|
43561
42394
|
});
|
|
43562
42395
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
43563
|
-
var SidebarContent =
|
|
43564
|
-
return /* @__PURE__ */ (0,
|
|
42396
|
+
var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
|
|
42397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43565
42398
|
"div",
|
|
43566
42399
|
{
|
|
43567
42400
|
ref,
|
|
@@ -43575,8 +42408,8 @@ var SidebarContent = React104.forwardRef(({ className, ...props }, ref) => {
|
|
|
43575
42408
|
);
|
|
43576
42409
|
});
|
|
43577
42410
|
SidebarContent.displayName = "SidebarContent";
|
|
43578
|
-
var SidebarGroup =
|
|
43579
|
-
return /* @__PURE__ */ (0,
|
|
42411
|
+
var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
|
|
42412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43580
42413
|
"div",
|
|
43581
42414
|
{
|
|
43582
42415
|
ref,
|
|
@@ -43587,9 +42420,9 @@ var SidebarGroup = React104.forwardRef(({ className, ...props }, ref) => {
|
|
|
43587
42420
|
);
|
|
43588
42421
|
});
|
|
43589
42422
|
SidebarGroup.displayName = "SidebarGroup";
|
|
43590
|
-
var SidebarGroupLabel =
|
|
42423
|
+
var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
43591
42424
|
const Comp = asChild ? import_react_slot6.Slot : "div";
|
|
43592
|
-
return /* @__PURE__ */ (0,
|
|
42425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43593
42426
|
Comp,
|
|
43594
42427
|
{
|
|
43595
42428
|
ref,
|
|
@@ -43604,9 +42437,9 @@ var SidebarGroupLabel = React104.forwardRef(({ className, asChild = false, ...pr
|
|
|
43604
42437
|
);
|
|
43605
42438
|
});
|
|
43606
42439
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
43607
|
-
var SidebarGroupAction =
|
|
42440
|
+
var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
43608
42441
|
const Comp = asChild ? import_react_slot6.Slot : "button";
|
|
43609
|
-
return /* @__PURE__ */ (0,
|
|
42442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43610
42443
|
Comp,
|
|
43611
42444
|
{
|
|
43612
42445
|
ref,
|
|
@@ -43623,7 +42456,7 @@ var SidebarGroupAction = React104.forwardRef(({ className, asChild = false, ...p
|
|
|
43623
42456
|
);
|
|
43624
42457
|
});
|
|
43625
42458
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
43626
|
-
var SidebarGroupContent =
|
|
42459
|
+
var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43627
42460
|
"div",
|
|
43628
42461
|
{
|
|
43629
42462
|
ref,
|
|
@@ -43633,7 +42466,7 @@ var SidebarGroupContent = React104.forwardRef(({ className, ...props }, ref) =>
|
|
|
43633
42466
|
}
|
|
43634
42467
|
));
|
|
43635
42468
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
43636
|
-
var SidebarMenu =
|
|
42469
|
+
var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43637
42470
|
"ul",
|
|
43638
42471
|
{
|
|
43639
42472
|
ref,
|
|
@@ -43643,7 +42476,7 @@ var SidebarMenu = React104.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
43643
42476
|
}
|
|
43644
42477
|
));
|
|
43645
42478
|
SidebarMenu.displayName = "SidebarMenu";
|
|
43646
|
-
var SidebarMenuItem =
|
|
42479
|
+
var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43647
42480
|
"li",
|
|
43648
42481
|
{
|
|
43649
42482
|
ref,
|
|
@@ -43673,7 +42506,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority13.cva)(
|
|
|
43673
42506
|
}
|
|
43674
42507
|
}
|
|
43675
42508
|
);
|
|
43676
|
-
var SidebarMenuButton =
|
|
42509
|
+
var SidebarMenuButton = React100.forwardRef(
|
|
43677
42510
|
({
|
|
43678
42511
|
asChild = false,
|
|
43679
42512
|
isActive = false,
|
|
@@ -43685,7 +42518,7 @@ var SidebarMenuButton = React104.forwardRef(
|
|
|
43685
42518
|
}, ref) => {
|
|
43686
42519
|
const Comp = asChild ? import_react_slot6.Slot : "button";
|
|
43687
42520
|
const { isMobile, state } = useSidebar();
|
|
43688
|
-
const button = /* @__PURE__ */ (0,
|
|
42521
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43689
42522
|
Comp,
|
|
43690
42523
|
{
|
|
43691
42524
|
ref,
|
|
@@ -43704,9 +42537,9 @@ var SidebarMenuButton = React104.forwardRef(
|
|
|
43704
42537
|
children: tooltip
|
|
43705
42538
|
};
|
|
43706
42539
|
}
|
|
43707
|
-
return /* @__PURE__ */ (0,
|
|
43708
|
-
/* @__PURE__ */ (0,
|
|
43709
|
-
/* @__PURE__ */ (0,
|
|
42540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(Tooltip, { children: [
|
|
42541
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(TooltipTrigger, { asChild: true, children: button }),
|
|
42542
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43710
42543
|
TooltipContent,
|
|
43711
42544
|
{
|
|
43712
42545
|
side: "right",
|
|
@@ -43719,9 +42552,9 @@ var SidebarMenuButton = React104.forwardRef(
|
|
|
43719
42552
|
}
|
|
43720
42553
|
);
|
|
43721
42554
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
43722
|
-
var SidebarMenuAction =
|
|
42555
|
+
var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
43723
42556
|
const Comp = asChild ? import_react_slot6.Slot : "button";
|
|
43724
|
-
return /* @__PURE__ */ (0,
|
|
42557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43725
42558
|
Comp,
|
|
43726
42559
|
{
|
|
43727
42560
|
ref,
|
|
@@ -43742,7 +42575,7 @@ var SidebarMenuAction = React104.forwardRef(({ className, asChild = false, showO
|
|
|
43742
42575
|
);
|
|
43743
42576
|
});
|
|
43744
42577
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
43745
|
-
var SidebarMenuBadge =
|
|
42578
|
+
var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43746
42579
|
"div",
|
|
43747
42580
|
{
|
|
43748
42581
|
ref,
|
|
@@ -43760,11 +42593,11 @@ var SidebarMenuBadge = React104.forwardRef(({ className, ...props }, ref) => /*
|
|
|
43760
42593
|
}
|
|
43761
42594
|
));
|
|
43762
42595
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
43763
|
-
var SidebarMenuSkeleton =
|
|
43764
|
-
const width =
|
|
42596
|
+
var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
42597
|
+
const width = React100.useMemo(() => {
|
|
43765
42598
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
43766
42599
|
}, []);
|
|
43767
|
-
return /* @__PURE__ */ (0,
|
|
42600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
|
|
43768
42601
|
"div",
|
|
43769
42602
|
{
|
|
43770
42603
|
ref,
|
|
@@ -43772,14 +42605,14 @@ var SidebarMenuSkeleton = React104.forwardRef(({ className, showIcon = false, ..
|
|
|
43772
42605
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
43773
42606
|
...props,
|
|
43774
42607
|
children: [
|
|
43775
|
-
showIcon && /* @__PURE__ */ (0,
|
|
42608
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43776
42609
|
Skeleton,
|
|
43777
42610
|
{
|
|
43778
42611
|
className: "size-4 rounded-md",
|
|
43779
42612
|
"data-sidebar": "menu-skeleton-icon"
|
|
43780
42613
|
}
|
|
43781
42614
|
),
|
|
43782
|
-
/* @__PURE__ */ (0,
|
|
42615
|
+
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43783
42616
|
Skeleton,
|
|
43784
42617
|
{
|
|
43785
42618
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -43794,7 +42627,7 @@ var SidebarMenuSkeleton = React104.forwardRef(({ className, showIcon = false, ..
|
|
|
43794
42627
|
);
|
|
43795
42628
|
});
|
|
43796
42629
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
43797
|
-
var SidebarMenuSub =
|
|
42630
|
+
var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43798
42631
|
"ul",
|
|
43799
42632
|
{
|
|
43800
42633
|
ref,
|
|
@@ -43808,11 +42641,11 @@ var SidebarMenuSub = React104.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
43808
42641
|
}
|
|
43809
42642
|
));
|
|
43810
42643
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
43811
|
-
var SidebarMenuSubItem =
|
|
42644
|
+
var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("li", { ref, ...props }));
|
|
43812
42645
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
43813
|
-
var SidebarMenuSubButton =
|
|
42646
|
+
var SidebarMenuSubButton = React100.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
43814
42647
|
const Comp = asChild ? import_react_slot6.Slot : "a";
|
|
43815
|
-
return /* @__PURE__ */ (0,
|
|
42648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
43816
42649
|
Comp,
|
|
43817
42650
|
{
|
|
43818
42651
|
ref,
|
|
@@ -43836,20 +42669,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
43836
42669
|
// src/components/ui/sonner.tsx
|
|
43837
42670
|
var import_next_themes = require("next-themes");
|
|
43838
42671
|
var import_sonner = require("sonner");
|
|
43839
|
-
var
|
|
42672
|
+
var import_jsx_runtime157 = require("react/jsx-runtime");
|
|
43840
42673
|
var Toaster = ({ ...props }) => {
|
|
43841
42674
|
const { theme = "system" } = (0, import_next_themes.useTheme)();
|
|
43842
|
-
return /* @__PURE__ */ (0,
|
|
42675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
43843
42676
|
import_sonner.Toaster,
|
|
43844
42677
|
{
|
|
43845
42678
|
theme,
|
|
43846
42679
|
className: "toaster group",
|
|
43847
42680
|
icons: {
|
|
43848
|
-
success: /* @__PURE__ */ (0,
|
|
43849
|
-
info: /* @__PURE__ */ (0,
|
|
43850
|
-
warning: /* @__PURE__ */ (0,
|
|
43851
|
-
error: /* @__PURE__ */ (0,
|
|
43852
|
-
loading: /* @__PURE__ */ (0,
|
|
42681
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(CircleCheck, { className: "h-4 w-4" }),
|
|
42682
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Info, { className: "h-4 w-4" }),
|
|
42683
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(TriangleAlert, { className: "h-4 w-4" }),
|
|
42684
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(OctagonX, { className: "h-4 w-4" }),
|
|
42685
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(LoaderCircle, { className: "h-4 w-4 animate-spin" })
|
|
43853
42686
|
},
|
|
43854
42687
|
toastOptions: {
|
|
43855
42688
|
classNames: {
|
|
@@ -43865,26 +42698,26 @@ var Toaster = ({ ...props }) => {
|
|
|
43865
42698
|
};
|
|
43866
42699
|
|
|
43867
42700
|
// src/components/ui/toggle-group.tsx
|
|
43868
|
-
var
|
|
42701
|
+
var React101 = __toESM(require("react"), 1);
|
|
43869
42702
|
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
43870
|
-
var
|
|
43871
|
-
var ToggleGroupContext =
|
|
42703
|
+
var import_jsx_runtime158 = require("react/jsx-runtime");
|
|
42704
|
+
var ToggleGroupContext = React101.createContext({
|
|
43872
42705
|
size: "default",
|
|
43873
42706
|
variant: "default"
|
|
43874
42707
|
});
|
|
43875
|
-
var ToggleGroup =
|
|
42708
|
+
var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
43876
42709
|
ToggleGroupPrimitive.Root,
|
|
43877
42710
|
{
|
|
43878
42711
|
ref,
|
|
43879
42712
|
className: cn("flex items-center justify-center gap-1", className),
|
|
43880
42713
|
...props,
|
|
43881
|
-
children: /* @__PURE__ */ (0,
|
|
42714
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
43882
42715
|
}
|
|
43883
42716
|
));
|
|
43884
42717
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
43885
|
-
var ToggleGroupItem =
|
|
43886
|
-
const context =
|
|
43887
|
-
return /* @__PURE__ */ (0,
|
|
42718
|
+
var ToggleGroupItem = React101.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
42719
|
+
const context = React101.useContext(ToggleGroupContext);
|
|
42720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
43888
42721
|
ToggleGroupPrimitive.Item,
|
|
43889
42722
|
{
|
|
43890
42723
|
ref,
|
|
@@ -43903,7 +42736,7 @@ var ToggleGroupItem = React105.forwardRef(({ className, children, variant, size,
|
|
|
43903
42736
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
43904
42737
|
|
|
43905
42738
|
// src/render/PXEngineRenderer.tsx
|
|
43906
|
-
var
|
|
42739
|
+
var import_jsx_runtime159 = require("react/jsx-runtime");
|
|
43907
42740
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
43908
42741
|
// Form components - require FormField + FormItem context
|
|
43909
42742
|
"FormLabel",
|
|
@@ -44008,24 +42841,24 @@ var REGISTERED_COMPONENTS = /* @__PURE__ */ new Set([
|
|
|
44008
42841
|
]);
|
|
44009
42842
|
var renderContextDependentError = (componentName, normalizedName, key) => {
|
|
44010
42843
|
const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
|
|
44011
|
-
return /* @__PURE__ */ (0,
|
|
42844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
|
|
44012
42845
|
"div",
|
|
44013
42846
|
{
|
|
44014
42847
|
className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
|
|
44015
42848
|
children: [
|
|
44016
|
-
/* @__PURE__ */ (0,
|
|
44017
|
-
/* @__PURE__ */ (0,
|
|
44018
|
-
/* @__PURE__ */ (0,
|
|
44019
|
-
/* @__PURE__ */ (0,
|
|
42849
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "flex items-start gap-2", children: [
|
|
42850
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
|
|
42851
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "flex-1", children: [
|
|
42852
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("p", { className: "text-sm font-semibold text-amber-900", children: [
|
|
44020
42853
|
"Invalid Component: ",
|
|
44021
42854
|
componentName
|
|
44022
42855
|
] }),
|
|
44023
|
-
/* @__PURE__ */ (0,
|
|
42856
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
|
|
44024
42857
|
] })
|
|
44025
42858
|
] }),
|
|
44026
|
-
/* @__PURE__ */ (0,
|
|
44027
|
-
/* @__PURE__ */ (0,
|
|
44028
|
-
/* @__PURE__ */ (0,
|
|
42859
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
|
|
42860
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
|
|
42861
|
+
/* @__PURE__ */ (0, import_jsx_runtime159.jsx)("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
|
|
44029
42862
|
] })
|
|
44030
42863
|
]
|
|
44031
42864
|
},
|
|
@@ -44103,12 +42936,12 @@ var PXEngineRenderer = ({
|
|
|
44103
42936
|
const root = schema.root || schema;
|
|
44104
42937
|
const renderRecursive = (component, index) => {
|
|
44105
42938
|
if (Array.isArray(component)) {
|
|
44106
|
-
return /* @__PURE__ */ (0,
|
|
42939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(import_react78.default.Fragment, { children: component.map((child, idx) => renderRecursive(child, idx)) }, index !== void 0 ? `array-${index}` : "array-root");
|
|
44107
42940
|
}
|
|
44108
42941
|
if (typeof component === "string" || typeof component === "number") {
|
|
44109
42942
|
return component;
|
|
44110
42943
|
}
|
|
44111
|
-
if (
|
|
42944
|
+
if (import_react78.default.isValidElement(component)) {
|
|
44112
42945
|
return component;
|
|
44113
42946
|
}
|
|
44114
42947
|
if (!component || typeof component !== "object") return null;
|
|
@@ -44187,7 +43020,7 @@ var PXEngineRenderer = ({
|
|
|
44187
43020
|
const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
|
|
44188
43021
|
const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
|
|
44189
43022
|
if (isAtomWithRenderProp) {
|
|
44190
|
-
return /* @__PURE__ */ (0,
|
|
43023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
|
|
44191
43024
|
TargetComponent,
|
|
44192
43025
|
{
|
|
44193
43026
|
...finalProps,
|
|
@@ -44199,7 +43032,7 @@ var PXEngineRenderer = ({
|
|
|
44199
43032
|
uniqueKey
|
|
44200
43033
|
);
|
|
44201
43034
|
} else {
|
|
44202
|
-
return /* @__PURE__ */ (0,
|
|
43035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
|
|
44203
43036
|
TargetComponent,
|
|
44204
43037
|
{
|
|
44205
43038
|
...finalProps,
|
|
@@ -44211,7 +43044,7 @@ var PXEngineRenderer = ({
|
|
|
44211
43044
|
);
|
|
44212
43045
|
}
|
|
44213
43046
|
};
|
|
44214
|
-
return /* @__PURE__ */ (0,
|
|
43047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
|
|
44215
43048
|
};
|
|
44216
43049
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44217
43050
|
0 && (module.exports = {
|
|
@@ -44221,8 +43054,6 @@ var PXEngineRenderer = ({
|
|
|
44221
43054
|
AccordionItem,
|
|
44222
43055
|
AccordionTrigger,
|
|
44223
43056
|
ActionButton,
|
|
44224
|
-
AgentCard,
|
|
44225
|
-
AgentDataTable,
|
|
44226
43057
|
Alert,
|
|
44227
43058
|
AlertAtom,
|
|
44228
43059
|
AlertDescription,
|
|
@@ -44381,7 +43212,6 @@ var PXEngineRenderer = ({
|
|
|
44381
43212
|
InputOTPGroup,
|
|
44382
43213
|
InputOTPSeparator,
|
|
44383
43214
|
InputOTPSlot,
|
|
44384
|
-
InstructionPreview,
|
|
44385
43215
|
KbdAtom,
|
|
44386
43216
|
KeywordBundlesDisplay,
|
|
44387
43217
|
KeywordBundlesEdit,
|
|
@@ -44399,9 +43229,6 @@ var PXEngineRenderer = ({
|
|
|
44399
43229
|
MenubarSeparator,
|
|
44400
43230
|
MenubarShortcut,
|
|
44401
43231
|
MenubarTrigger,
|
|
44402
|
-
MultiAgentCard,
|
|
44403
|
-
MultiAgentPlan,
|
|
44404
|
-
MultiAgentUISelector,
|
|
44405
43232
|
NavigationMenu,
|
|
44406
43233
|
NavigationMenuContent,
|
|
44407
43234
|
NavigationMenuItem,
|
|
@@ -44469,7 +43296,6 @@ var PXEngineRenderer = ({
|
|
|
44469
43296
|
SocialPostCard,
|
|
44470
43297
|
Spinner,
|
|
44471
43298
|
SpinnerAtom,
|
|
44472
|
-
StageIndicator,
|
|
44473
43299
|
StatsGrid,
|
|
44474
43300
|
StepWizard,
|
|
44475
43301
|
Switch,
|
|
@@ -44493,16 +43319,13 @@ var PXEngineRenderer = ({
|
|
|
44493
43319
|
TextareaAtom,
|
|
44494
43320
|
TimelineAtom,
|
|
44495
43321
|
ToggleAtom,
|
|
44496
|
-
ToolListCard,
|
|
44497
43322
|
Tooltip,
|
|
44498
43323
|
TooltipAtom,
|
|
44499
43324
|
TooltipContent,
|
|
44500
43325
|
TooltipProvider,
|
|
44501
43326
|
TooltipTrigger,
|
|
44502
43327
|
TopPostsGrid,
|
|
44503
|
-
UIComponentSelector,
|
|
44504
43328
|
VideoAtom,
|
|
44505
|
-
WorkflowVisualizer,
|
|
44506
43329
|
cn,
|
|
44507
43330
|
defaultFetchSelections,
|
|
44508
43331
|
defaultPersistSelection,
|