pxengine 0.1.33 → 0.1.35
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 +752 -150
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -2
- package/dist/index.d.ts +104 -2
- package/dist/index.mjs +745 -148
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +223 -11
- package/package.json +5 -4
package/dist/index.cjs
CHANGED
|
@@ -36,6 +36,8 @@ __export(index_exports, {
|
|
|
36
36
|
AccordionItem: () => AccordionItem,
|
|
37
37
|
AccordionTrigger: () => AccordionTrigger,
|
|
38
38
|
ActionButton: () => ActionButton,
|
|
39
|
+
AgentCard: () => AgentCard,
|
|
40
|
+
AgentDataTable: () => AgentDataTable,
|
|
39
41
|
Alert: () => Alert,
|
|
40
42
|
AlertAtom: () => AlertAtom,
|
|
41
43
|
AlertDescription: () => AlertDescription,
|
|
@@ -180,6 +182,7 @@ __export(index_exports, {
|
|
|
180
182
|
InputOTPGroup: () => InputOTPGroup,
|
|
181
183
|
InputOTPSeparator: () => InputOTPSeparator,
|
|
182
184
|
InputOTPSlot: () => InputOTPSlot,
|
|
185
|
+
InstructionPreview: () => InstructionPreview,
|
|
183
186
|
KbdAtom: () => KbdAtom,
|
|
184
187
|
KeywordBundlesDisplay: () => KeywordBundlesDisplay,
|
|
185
188
|
KeywordBundlesEdit: () => KeywordBundlesEdit,
|
|
@@ -284,6 +287,7 @@ __export(index_exports, {
|
|
|
284
287
|
TextareaAtom: () => TextareaAtom,
|
|
285
288
|
TimelineAtom: () => TimelineAtom,
|
|
286
289
|
ToggleAtom: () => ToggleAtom,
|
|
290
|
+
ToolListCard: () => ToolListCard,
|
|
287
291
|
Tooltip: () => Tooltip,
|
|
288
292
|
TooltipAtom: () => TooltipAtom,
|
|
289
293
|
TooltipContent: () => TooltipContent,
|
|
@@ -291,12 +295,13 @@ __export(index_exports, {
|
|
|
291
295
|
TooltipTrigger: () => TooltipTrigger,
|
|
292
296
|
TopPostsGrid: () => TopPostsGrid,
|
|
293
297
|
VideoAtom: () => VideoAtom,
|
|
298
|
+
WorkflowVisualizer: () => WorkflowVisualizer,
|
|
294
299
|
cn: () => cn
|
|
295
300
|
});
|
|
296
301
|
module.exports = __toCommonJS(index_exports);
|
|
297
302
|
|
|
298
303
|
// src/render/PXEngineRenderer.tsx
|
|
299
|
-
var
|
|
304
|
+
var import_react69 = __toESM(require("react"), 1);
|
|
300
305
|
|
|
301
306
|
// src/atoms/index.ts
|
|
302
307
|
var atoms_exports = {};
|
|
@@ -33568,6 +33573,8 @@ ArrowToggleAtom.displayName = "ArrowToggleAtom";
|
|
|
33568
33573
|
var molecules_exports = {};
|
|
33569
33574
|
__export(molecules_exports, {
|
|
33570
33575
|
ActionButton: () => ActionButton,
|
|
33576
|
+
AgentCard: () => AgentCard,
|
|
33577
|
+
AgentDataTable: () => AgentDataTable,
|
|
33571
33578
|
AudienceDemographicsCard: () => AudienceDemographicsCard,
|
|
33572
33579
|
AudienceMetricCard: () => AudienceMetricCard,
|
|
33573
33580
|
BrandAffinityGroup: () => BrandAffinityGroup,
|
|
@@ -33587,6 +33594,7 @@ __export(molecules_exports, {
|
|
|
33587
33594
|
FilterBar: () => FilterBar,
|
|
33588
33595
|
FormCard: () => FormCard,
|
|
33589
33596
|
GrowthChartCard: () => GrowthChartCard,
|
|
33597
|
+
InstructionPreview: () => InstructionPreview,
|
|
33590
33598
|
KeywordBundlesDisplay: () => KeywordBundlesDisplay,
|
|
33591
33599
|
KeywordBundlesEdit: () => KeywordBundlesEdit,
|
|
33592
33600
|
LoadingOverlay: () => LoadingOverlay,
|
|
@@ -33599,7 +33607,9 @@ __export(molecules_exports, {
|
|
|
33599
33607
|
StatsGrid: () => StatsGrid,
|
|
33600
33608
|
StepWizard: () => StepWizard,
|
|
33601
33609
|
TagCloud: () => TagCloud,
|
|
33602
|
-
|
|
33610
|
+
ToolListCard: () => ToolListCard,
|
|
33611
|
+
TopPostsGrid: () => TopPostsGrid,
|
|
33612
|
+
WorkflowVisualizer: () => WorkflowVisualizer
|
|
33603
33613
|
});
|
|
33604
33614
|
|
|
33605
33615
|
// src/molecules/generic/EditableField/EditableField.tsx
|
|
@@ -36878,6 +36888,593 @@ var CampaignConceptCard = import_react64.default.memo(
|
|
|
36878
36888
|
);
|
|
36879
36889
|
CampaignConceptCard.displayName = "CampaignConceptCard";
|
|
36880
36890
|
|
|
36891
|
+
// src/molecules/agent-builder/ToolListCard/ToolListCard.tsx
|
|
36892
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
36893
|
+
var ICON_MAP = {
|
|
36894
|
+
Search,
|
|
36895
|
+
Database,
|
|
36896
|
+
Globe,
|
|
36897
|
+
FileText,
|
|
36898
|
+
Zap,
|
|
36899
|
+
Layout: PanelsTopLeft,
|
|
36900
|
+
Wrench,
|
|
36901
|
+
BookOpen,
|
|
36902
|
+
BarChart3: ChartColumn,
|
|
36903
|
+
Link,
|
|
36904
|
+
MessageSquare,
|
|
36905
|
+
Sparkles,
|
|
36906
|
+
FolderOpen,
|
|
36907
|
+
Code,
|
|
36908
|
+
Shield,
|
|
36909
|
+
Image,
|
|
36910
|
+
Mail,
|
|
36911
|
+
Calendar
|
|
36912
|
+
};
|
|
36913
|
+
var CATEGORY_FALLBACK = {
|
|
36914
|
+
search: Search,
|
|
36915
|
+
data: Database,
|
|
36916
|
+
knowledge: BookOpen,
|
|
36917
|
+
web: Globe,
|
|
36918
|
+
content: FileText,
|
|
36919
|
+
ui: PanelsTopLeft,
|
|
36920
|
+
analytics: ChartColumn,
|
|
36921
|
+
integration: Link,
|
|
36922
|
+
communication: MessageSquare,
|
|
36923
|
+
generation: Sparkles,
|
|
36924
|
+
file: FolderOpen,
|
|
36925
|
+
code: Code,
|
|
36926
|
+
security: Shield,
|
|
36927
|
+
general: Zap
|
|
36928
|
+
};
|
|
36929
|
+
function resolveIcon(tool) {
|
|
36930
|
+
if (tool.icon && ICON_MAP[tool.icon]) return ICON_MAP[tool.icon];
|
|
36931
|
+
if (tool.category && CATEGORY_FALLBACK[tool.category.toLowerCase()])
|
|
36932
|
+
return CATEGORY_FALLBACK[tool.category.toLowerCase()];
|
|
36933
|
+
return Wrench;
|
|
36934
|
+
}
|
|
36935
|
+
function resolveCategoryIcon(category) {
|
|
36936
|
+
return CATEGORY_FALLBACK[category.toLowerCase()] || Wrench;
|
|
36937
|
+
}
|
|
36938
|
+
var ToolListCard = ({
|
|
36939
|
+
tools,
|
|
36940
|
+
className
|
|
36941
|
+
}) => {
|
|
36942
|
+
const grouped = {};
|
|
36943
|
+
for (const tool of tools) {
|
|
36944
|
+
const cat = tool.category || "General";
|
|
36945
|
+
if (!grouped[cat]) grouped[cat] = [];
|
|
36946
|
+
grouped[cat].push(tool);
|
|
36947
|
+
}
|
|
36948
|
+
const categories = Object.keys(grouped);
|
|
36949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
36950
|
+
"div",
|
|
36951
|
+
{
|
|
36952
|
+
className: cn(
|
|
36953
|
+
"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",
|
|
36954
|
+
className
|
|
36955
|
+
),
|
|
36956
|
+
children: [
|
|
36957
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.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: [
|
|
36958
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "w-6 h-6 rounded-md bg-[var(--primary-color)]/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Wrench, { className: "w-3.5 h-3.5 text-[var(--primary-color)]" }) }),
|
|
36959
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Available Tools" }),
|
|
36960
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.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 })
|
|
36961
|
+
] }),
|
|
36962
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
|
|
36963
|
+
const CatIcon = resolveCategoryIcon(cat);
|
|
36964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: "px-4 py-3", children: [
|
|
36965
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: "flex items-center gap-2 mb-2.5", children: [
|
|
36966
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(CatIcon, { className: "w-3.5 h-3.5 text-[var(--primary-color)]/70" }),
|
|
36967
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
|
|
36968
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
|
|
36969
|
+
] }),
|
|
36970
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "space-y-1.5", children: grouped[cat].map((tool) => {
|
|
36971
|
+
const ToolIcon = resolveIcon(tool);
|
|
36972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
36973
|
+
"div",
|
|
36974
|
+
{
|
|
36975
|
+
className: "group flex items-start gap-3 px-3 py-2 rounded-lg hover:bg-[var(--foreground)]/[0.03] transition-colors",
|
|
36976
|
+
children: [
|
|
36977
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "shrink-0 mt-0.5 w-5 h-5 rounded flex items-center justify-center bg-[var(--primary-color)]/[0.08]", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ToolIcon, { className: "w-3 h-3 text-[var(--primary-color)]/60" }) }),
|
|
36978
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
36979
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
36980
|
+
tool.display_name && tool.display_name !== tool.name && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("span", { className: "text-[13px] font-medium text-[var(--foreground)] truncate max-w-full", children: tool.display_name }),
|
|
36981
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.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 })
|
|
36982
|
+
] }),
|
|
36983
|
+
tool.description && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed mt-0.5 break-words whitespace-normal", children: tool.description })
|
|
36984
|
+
] })
|
|
36985
|
+
]
|
|
36986
|
+
},
|
|
36987
|
+
tool.name
|
|
36988
|
+
);
|
|
36989
|
+
}) })
|
|
36990
|
+
] }, cat);
|
|
36991
|
+
}) })
|
|
36992
|
+
]
|
|
36993
|
+
}
|
|
36994
|
+
);
|
|
36995
|
+
};
|
|
36996
|
+
|
|
36997
|
+
// src/molecules/agent-builder/AgentCard/AgentCard.tsx
|
|
36998
|
+
var import_react65 = require("react");
|
|
36999
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
37000
|
+
var AgentCard = ({
|
|
37001
|
+
agent,
|
|
37002
|
+
editable = true,
|
|
37003
|
+
compact = false,
|
|
37004
|
+
onSave,
|
|
37005
|
+
className
|
|
37006
|
+
}) => {
|
|
37007
|
+
const [isEditing, setIsEditing] = (0, import_react65.useState)(false);
|
|
37008
|
+
const [isSaving, setIsSaving] = (0, import_react65.useState)(false);
|
|
37009
|
+
const [editState, setEditState] = (0, import_react65.useState)({
|
|
37010
|
+
display_name: agent.display_name,
|
|
37011
|
+
description: agent.description,
|
|
37012
|
+
image: agent.image || ""
|
|
37013
|
+
});
|
|
37014
|
+
const avatarUrl = agent.image || `https://api.dicebear.com/7.x/avataaars/svg?seed=${agent.name}`;
|
|
37015
|
+
const handleEdit = (0, import_react65.useCallback)(() => {
|
|
37016
|
+
setEditState({
|
|
37017
|
+
display_name: agent.display_name,
|
|
37018
|
+
description: agent.description,
|
|
37019
|
+
image: agent.image || ""
|
|
37020
|
+
});
|
|
37021
|
+
setIsEditing(true);
|
|
37022
|
+
}, [agent]);
|
|
37023
|
+
const handleCancel = (0, import_react65.useCallback)(() => {
|
|
37024
|
+
setIsEditing(false);
|
|
37025
|
+
}, []);
|
|
37026
|
+
const handleSave = (0, import_react65.useCallback)(async () => {
|
|
37027
|
+
if (!onSave) return;
|
|
37028
|
+
const updates = {};
|
|
37029
|
+
if (editState.display_name !== agent.display_name)
|
|
37030
|
+
updates.display_name = editState.display_name;
|
|
37031
|
+
if (editState.description !== agent.description)
|
|
37032
|
+
updates.description = editState.description;
|
|
37033
|
+
if (editState.image !== (agent.image || ""))
|
|
37034
|
+
updates.image = editState.image;
|
|
37035
|
+
if (Object.keys(updates).length === 0) {
|
|
37036
|
+
setIsEditing(false);
|
|
37037
|
+
return;
|
|
37038
|
+
}
|
|
37039
|
+
setIsSaving(true);
|
|
37040
|
+
try {
|
|
37041
|
+
await onSave(agent, updates);
|
|
37042
|
+
setIsEditing(false);
|
|
37043
|
+
} catch (err) {
|
|
37044
|
+
console.error("AgentCard save failed:", err);
|
|
37045
|
+
} finally {
|
|
37046
|
+
setIsSaving(false);
|
|
37047
|
+
}
|
|
37048
|
+
}, [onSave, agent, editState]);
|
|
37049
|
+
if (compact) {
|
|
37050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
37051
|
+
"div",
|
|
37052
|
+
{
|
|
37053
|
+
className: cn(
|
|
37054
|
+
"flex items-center gap-3 py-1",
|
|
37055
|
+
className
|
|
37056
|
+
),
|
|
37057
|
+
children: [
|
|
37058
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Avatar, { className: "h-8 w-8 shrink-0", children: [
|
|
37059
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
|
|
37060
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(AvatarFallback, { className: "bg-[var(--primary-color)]/10 text-[var(--primary-color)] text-xs font-bold", children: agent.display_name.charAt(0) })
|
|
37061
|
+
] }),
|
|
37062
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
37063
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
37064
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
|
|
37065
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
37066
|
+
"span",
|
|
37067
|
+
{
|
|
37068
|
+
className: cn(
|
|
37069
|
+
"text-[10px] px-1.5 py-0.5 rounded-full font-medium",
|
|
37070
|
+
agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37071
|
+
),
|
|
37072
|
+
children: agent.enabled ? "Active" : "Disabled"
|
|
37073
|
+
}
|
|
37074
|
+
)
|
|
37075
|
+
] }),
|
|
37076
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("p", { className: "text-[var(--foreground)]/50 text-xs truncate", children: agent.description })
|
|
37077
|
+
] })
|
|
37078
|
+
]
|
|
37079
|
+
}
|
|
37080
|
+
);
|
|
37081
|
+
}
|
|
37082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
37083
|
+
"div",
|
|
37084
|
+
{
|
|
37085
|
+
className: cn(
|
|
37086
|
+
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
|
|
37087
|
+
className
|
|
37088
|
+
),
|
|
37089
|
+
children: [
|
|
37090
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4", children: [
|
|
37091
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-[var(--primary-color)]/20", children: [
|
|
37092
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
|
|
37093
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(AvatarFallback, { className: "bg-[var(--primary-color)]/10 text-[var(--primary-color)] text-lg font-bold", children: agent.display_name.charAt(0) })
|
|
37094
|
+
] }),
|
|
37095
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
37096
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
37097
|
+
isEditing ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
37098
|
+
"input",
|
|
37099
|
+
{
|
|
37100
|
+
type: "text",
|
|
37101
|
+
value: editState.display_name,
|
|
37102
|
+
onChange: (e) => setEditState((s) => ({ ...s, display_name: e.target.value })),
|
|
37103
|
+
disabled: isSaving,
|
|
37104
|
+
className: "flex-1 bg-transparent border-b border-[var(--primary-color)]/30 text-sm font-semibold text-[var(--foreground)] outline-none focus:border-[var(--primary-color)] transition-all",
|
|
37105
|
+
placeholder: "Agent name"
|
|
37106
|
+
}
|
|
37107
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
|
|
37108
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.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 }),
|
|
37109
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
37110
|
+
"span",
|
|
37111
|
+
{
|
|
37112
|
+
className: cn(
|
|
37113
|
+
"text-[10px] px-1.5 py-0.5 rounded-full font-medium",
|
|
37114
|
+
agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37115
|
+
),
|
|
37116
|
+
children: agent.enabled ? "Active" : "Disabled"
|
|
37117
|
+
}
|
|
37118
|
+
)
|
|
37119
|
+
] }),
|
|
37120
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "mt-1", children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
37121
|
+
"textarea",
|
|
37122
|
+
{
|
|
37123
|
+
value: editState.description,
|
|
37124
|
+
onChange: (e) => setEditState((s) => ({ ...s, description: e.target.value })),
|
|
37125
|
+
disabled: isSaving,
|
|
37126
|
+
className: "w-full bg-transparent border-b border-[var(--primary-color)]/30 text-xs text-[var(--foreground)]/70 outline-none focus:border-[var(--primary-color)] transition-all resize-none leading-relaxed min-h-[40px]",
|
|
37127
|
+
rows: 2,
|
|
37128
|
+
placeholder: "Describe this agent..."
|
|
37129
|
+
}
|
|
37130
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed", children: agent.description }) }),
|
|
37131
|
+
isEditing && /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
37132
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold", children: "Avatar:" }),
|
|
37133
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
37134
|
+
"input",
|
|
37135
|
+
{
|
|
37136
|
+
type: "text",
|
|
37137
|
+
value: editState.image,
|
|
37138
|
+
onChange: (e) => setEditState((s) => ({ ...s, image: e.target.value })),
|
|
37139
|
+
disabled: isSaving,
|
|
37140
|
+
className: "flex-1 bg-[var(--foreground)]/[0.03] border border-[var(--border-color)] rounded px-2 py-0.5 text-[10px] text-[var(--foreground)]/50 font-mono outline-none focus:border-[var(--primary-color)]/50 transition-colors",
|
|
37141
|
+
placeholder: "URL"
|
|
37142
|
+
}
|
|
37143
|
+
)
|
|
37144
|
+
] })
|
|
37145
|
+
] }),
|
|
37146
|
+
editable && onSave && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "flex items-center gap-1.5 shrink-0", children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
|
|
37147
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
37148
|
+
"button",
|
|
37149
|
+
{
|
|
37150
|
+
onClick: handleCancel,
|
|
37151
|
+
disabled: isSaving,
|
|
37152
|
+
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",
|
|
37153
|
+
children: "Cancel"
|
|
37154
|
+
}
|
|
37155
|
+
),
|
|
37156
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
37157
|
+
"button",
|
|
37158
|
+
{
|
|
37159
|
+
onClick: handleSave,
|
|
37160
|
+
disabled: isSaving,
|
|
37161
|
+
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",
|
|
37162
|
+
children: isSaving ? "Saving..." : "Save"
|
|
37163
|
+
}
|
|
37164
|
+
)
|
|
37165
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
37166
|
+
"button",
|
|
37167
|
+
{
|
|
37168
|
+
onClick: handleEdit,
|
|
37169
|
+
className: "text-[11px] px-2.5 py-1 rounded-md border border-[var(--border-color)] text-[var(--foreground)]/50 hover:text-[var(--foreground)] hover:border-[var(--primary-color)]/50 transition-colors",
|
|
37170
|
+
children: "Edit"
|
|
37171
|
+
}
|
|
37172
|
+
) })
|
|
37173
|
+
] }),
|
|
37174
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "flex flex-wrap items-center gap-3 px-5 pb-3 text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("span", { className: "text-[var(--foreground)]/40", children: [
|
|
37175
|
+
"Model:",
|
|
37176
|
+
" ",
|
|
37177
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { className: "font-mono text-[var(--foreground)]/70", children: agent.model })
|
|
37178
|
+
] }) }),
|
|
37179
|
+
agent.tools && agent.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "border-t border-[var(--border-color)] px-5 py-3", children: [
|
|
37180
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-2", children: [
|
|
37181
|
+
"Tools (",
|
|
37182
|
+
agent.tools.length,
|
|
37183
|
+
")"
|
|
37184
|
+
] }),
|
|
37185
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "flex flex-wrap gap-1.5", children: agent.tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
37186
|
+
"span",
|
|
37187
|
+
{
|
|
37188
|
+
className: "text-[11px] px-2 py-0.5 rounded-md bg-[var(--primary-color)]/10 text-[var(--primary-color)] font-mono border border-[var(--primary-color)]/20",
|
|
37189
|
+
children: tool
|
|
37190
|
+
},
|
|
37191
|
+
tool
|
|
37192
|
+
)) })
|
|
37193
|
+
] })
|
|
37194
|
+
]
|
|
37195
|
+
}
|
|
37196
|
+
);
|
|
37197
|
+
};
|
|
37198
|
+
|
|
37199
|
+
// src/molecules/agent-builder/AgentDataTable/AgentDataTable.tsx
|
|
37200
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
37201
|
+
var AgentDataTable = ({
|
|
37202
|
+
headers,
|
|
37203
|
+
rows,
|
|
37204
|
+
className
|
|
37205
|
+
}) => {
|
|
37206
|
+
const renderCell = (value) => {
|
|
37207
|
+
if (typeof value === "boolean") {
|
|
37208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
37209
|
+
"span",
|
|
37210
|
+
{
|
|
37211
|
+
className: cn(
|
|
37212
|
+
"inline-flex items-center gap-1 text-[11px] font-medium px-2 py-0.5 rounded-full",
|
|
37213
|
+
value ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37214
|
+
),
|
|
37215
|
+
children: [
|
|
37216
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
37217
|
+
"span",
|
|
37218
|
+
{
|
|
37219
|
+
className: cn(
|
|
37220
|
+
"w-1.5 h-1.5 rounded-full",
|
|
37221
|
+
value ? "bg-emerald-500" : "bg-red-500"
|
|
37222
|
+
)
|
|
37223
|
+
}
|
|
37224
|
+
),
|
|
37225
|
+
value ? "Yes" : "No"
|
|
37226
|
+
]
|
|
37227
|
+
}
|
|
37228
|
+
);
|
|
37229
|
+
}
|
|
37230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "text-[var(--foreground)]", children: String(value) });
|
|
37231
|
+
};
|
|
37232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
37233
|
+
"div",
|
|
37234
|
+
{
|
|
37235
|
+
className: cn(
|
|
37236
|
+
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
|
|
37237
|
+
className
|
|
37238
|
+
),
|
|
37239
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("table", { className: "w-full text-xs", children: [
|
|
37240
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("tr", { className: "border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
37241
|
+
"th",
|
|
37242
|
+
{
|
|
37243
|
+
className: "text-left px-4 py-2.5 text-[11px] font-semibold text-[var(--foreground)]/60 uppercase tracking-wide whitespace-nowrap",
|
|
37244
|
+
children: header
|
|
37245
|
+
},
|
|
37246
|
+
header
|
|
37247
|
+
)) }) }),
|
|
37248
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
37249
|
+
"tr",
|
|
37250
|
+
{
|
|
37251
|
+
className: "border-b border-[var(--border-color)] last:border-b-0 hover:bg-[var(--foreground)]/[0.02] transition-colors",
|
|
37252
|
+
children: row.map((cell, cellIdx) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
37253
|
+
"td",
|
|
37254
|
+
{
|
|
37255
|
+
className: "px-4 py-2.5 text-xs whitespace-nowrap",
|
|
37256
|
+
children: renderCell(cell)
|
|
37257
|
+
},
|
|
37258
|
+
cellIdx
|
|
37259
|
+
))
|
|
37260
|
+
},
|
|
37261
|
+
rowIdx
|
|
37262
|
+
)) })
|
|
37263
|
+
] }) })
|
|
37264
|
+
}
|
|
37265
|
+
);
|
|
37266
|
+
};
|
|
37267
|
+
|
|
37268
|
+
// src/molecules/agent-builder/WorkflowVisualizer/WorkflowVisualizer.tsx
|
|
37269
|
+
var import_react66 = require("react");
|
|
37270
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
37271
|
+
var WorkflowVisualizer = ({
|
|
37272
|
+
steps,
|
|
37273
|
+
className
|
|
37274
|
+
}) => {
|
|
37275
|
+
const [expandedStep, setExpandedStep] = (0, import_react66.useState)(null);
|
|
37276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
37277
|
+
"div",
|
|
37278
|
+
{
|
|
37279
|
+
className: cn(
|
|
37280
|
+
"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",
|
|
37281
|
+
className
|
|
37282
|
+
),
|
|
37283
|
+
children: [
|
|
37284
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.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: [
|
|
37285
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "w-6 h-6 rounded-md bg-[var(--primary-color)]/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
37286
|
+
"svg",
|
|
37287
|
+
{
|
|
37288
|
+
width: "14",
|
|
37289
|
+
height: "14",
|
|
37290
|
+
viewBox: "0 0 24 24",
|
|
37291
|
+
fill: "none",
|
|
37292
|
+
stroke: "var(--primary-color)",
|
|
37293
|
+
strokeWidth: "2",
|
|
37294
|
+
strokeLinecap: "round",
|
|
37295
|
+
strokeLinejoin: "round",
|
|
37296
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })
|
|
37297
|
+
}
|
|
37298
|
+
) }),
|
|
37299
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Workflow" }),
|
|
37300
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.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: [
|
|
37301
|
+
steps.length,
|
|
37302
|
+
" steps"
|
|
37303
|
+
] })
|
|
37304
|
+
] }),
|
|
37305
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "px-4 py-3", children: steps.map((step, idx) => {
|
|
37306
|
+
const isLast = idx === steps.length - 1;
|
|
37307
|
+
const isExpanded = expandedStep === step.id;
|
|
37308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex gap-3", children: [
|
|
37309
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex flex-col items-center shrink-0", children: [
|
|
37310
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "w-7 h-7 rounded-full bg-[var(--primary-color)]/10 border-2 border-[var(--primary-color)]/30 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "text-[10px] font-bold text-[var(--primary-color)]", children: idx + 1 }) }),
|
|
37311
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "w-0.5 flex-1 min-h-[16px] bg-[var(--primary-color)]/15" })
|
|
37312
|
+
] }),
|
|
37313
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
37314
|
+
"div",
|
|
37315
|
+
{
|
|
37316
|
+
className: cn(
|
|
37317
|
+
"flex-1 mb-3 rounded-lg border border-[var(--border-color)] transition-colors",
|
|
37318
|
+
isExpanded ? "bg-[var(--foreground)]/[0.02]" : "hover:bg-[var(--foreground)]/[0.02]"
|
|
37319
|
+
),
|
|
37320
|
+
children: [
|
|
37321
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
37322
|
+
"button",
|
|
37323
|
+
{
|
|
37324
|
+
onClick: () => setExpandedStep(isExpanded ? null : step.id),
|
|
37325
|
+
className: "w-full text-left px-3 py-2.5 flex items-center gap-2",
|
|
37326
|
+
children: [
|
|
37327
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
37328
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "text-[13px] font-medium text-[var(--foreground)]", children: step.name }),
|
|
37329
|
+
step.description && !isExpanded && /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("span", { className: "text-xs text-[var(--foreground)]/40 ml-2", children: [
|
|
37330
|
+
"\u2014 ",
|
|
37331
|
+
step.description
|
|
37332
|
+
] })
|
|
37333
|
+
] }),
|
|
37334
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
37335
|
+
"svg",
|
|
37336
|
+
{
|
|
37337
|
+
width: "12",
|
|
37338
|
+
height: "12",
|
|
37339
|
+
viewBox: "0 0 24 24",
|
|
37340
|
+
fill: "none",
|
|
37341
|
+
stroke: "currentColor",
|
|
37342
|
+
strokeWidth: "2",
|
|
37343
|
+
className: cn(
|
|
37344
|
+
"shrink-0 text-[var(--foreground)]/30 transition-transform",
|
|
37345
|
+
isExpanded && "rotate-180"
|
|
37346
|
+
),
|
|
37347
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("polyline", { points: "6 9 12 15 18 9" })
|
|
37348
|
+
}
|
|
37349
|
+
)
|
|
37350
|
+
]
|
|
37351
|
+
}
|
|
37352
|
+
),
|
|
37353
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "px-3 pb-3 space-y-2.5", children: [
|
|
37354
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed", children: step.description }),
|
|
37355
|
+
step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "space-y-1", children: step.sub_steps.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
37356
|
+
"div",
|
|
37357
|
+
{
|
|
37358
|
+
className: "flex items-start gap-2 text-xs",
|
|
37359
|
+
children: [
|
|
37360
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "shrink-0 mt-0.5 w-1.5 h-1.5 rounded-full bg-[var(--primary-color)]/40" }),
|
|
37361
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "text-[var(--foreground)]/60", children: sub.action })
|
|
37362
|
+
]
|
|
37363
|
+
},
|
|
37364
|
+
sub.id
|
|
37365
|
+
)) }),
|
|
37366
|
+
step.tools && step.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
|
|
37367
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold tracking-wider", children: "Tools:" }),
|
|
37368
|
+
step.tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
37369
|
+
"span",
|
|
37370
|
+
{
|
|
37371
|
+
className: "text-[10px] font-mono px-1.5 py-0.5 rounded bg-[var(--primary-color)]/[0.08] text-[var(--primary-color)]/70 border border-[var(--primary-color)]/10",
|
|
37372
|
+
children: tool
|
|
37373
|
+
},
|
|
37374
|
+
tool
|
|
37375
|
+
))
|
|
37376
|
+
] }),
|
|
37377
|
+
step.on_failure && /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex items-start gap-2 text-xs bg-[#ef4444]/[0.06] border border-[#ef4444]/10 rounded-md px-2.5 py-2", children: [
|
|
37378
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "shrink-0 text-[10px] font-semibold text-[#ef4444]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
|
|
37379
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
|
|
37380
|
+
] })
|
|
37381
|
+
] })
|
|
37382
|
+
]
|
|
37383
|
+
}
|
|
37384
|
+
)
|
|
37385
|
+
] }, step.id);
|
|
37386
|
+
}) })
|
|
37387
|
+
]
|
|
37388
|
+
}
|
|
37389
|
+
);
|
|
37390
|
+
};
|
|
37391
|
+
|
|
37392
|
+
// src/molecules/agent-builder/InstructionPreview/InstructionPreview.tsx
|
|
37393
|
+
var import_react67 = require("react");
|
|
37394
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
37395
|
+
var InstructionPreview = ({
|
|
37396
|
+
agent_name,
|
|
37397
|
+
description,
|
|
37398
|
+
instruction,
|
|
37399
|
+
workflow_summary,
|
|
37400
|
+
tools,
|
|
37401
|
+
className
|
|
37402
|
+
}) => {
|
|
37403
|
+
const [isExpanded, setIsExpanded] = (0, import_react67.useState)(false);
|
|
37404
|
+
const previewLength = 300;
|
|
37405
|
+
const isLong = instruction.length > previewLength;
|
|
37406
|
+
const displayText = isExpanded || !isLong ? instruction : instruction.slice(0, previewLength) + "...";
|
|
37407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
37408
|
+
"div",
|
|
37409
|
+
{
|
|
37410
|
+
className: cn(
|
|
37411
|
+
"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",
|
|
37412
|
+
className
|
|
37413
|
+
),
|
|
37414
|
+
children: [
|
|
37415
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
37416
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "w-6 h-6 rounded-md bg-[var(--primary-color)]/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
37417
|
+
"svg",
|
|
37418
|
+
{
|
|
37419
|
+
width: "14",
|
|
37420
|
+
height: "14",
|
|
37421
|
+
viewBox: "0 0 24 24",
|
|
37422
|
+
fill: "none",
|
|
37423
|
+
stroke: "var(--primary-color)",
|
|
37424
|
+
strokeWidth: "2",
|
|
37425
|
+
strokeLinecap: "round",
|
|
37426
|
+
strokeLinejoin: "round",
|
|
37427
|
+
children: [
|
|
37428
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
37429
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("polyline", { points: "14 2 14 8 20 8" }),
|
|
37430
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
|
|
37431
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
|
|
37432
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("polyline", { points: "10 9 9 9 8 9" })
|
|
37433
|
+
]
|
|
37434
|
+
}
|
|
37435
|
+
) }),
|
|
37436
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
37437
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: agent_name }),
|
|
37438
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5", children: description })
|
|
37439
|
+
] })
|
|
37440
|
+
] }) }),
|
|
37441
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "px-4 py-3 space-y-3", children: [
|
|
37442
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { children: [
|
|
37443
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Instruction" }),
|
|
37444
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.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 }),
|
|
37445
|
+
isLong && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
37446
|
+
"button",
|
|
37447
|
+
{
|
|
37448
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
37449
|
+
className: "text-[11px] text-[var(--primary-color)] hover:underline mt-1",
|
|
37450
|
+
children: isExpanded ? "Show less" : "Show full instruction"
|
|
37451
|
+
}
|
|
37452
|
+
)
|
|
37453
|
+
] }),
|
|
37454
|
+
workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { children: [
|
|
37455
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Workflow" }),
|
|
37456
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "space-y-1", children: workflow_summary.map((step, idx) => /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex items-start gap-2 text-xs", children: [
|
|
37457
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "shrink-0 w-5 h-5 rounded-full bg-[var(--primary-color)]/10 flex items-center justify-center text-[10px] font-bold text-[var(--primary-color)]", children: idx + 1 }),
|
|
37458
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "text-[var(--foreground)]/50 mt-0.5", children: step })
|
|
37459
|
+
] }, idx)) })
|
|
37460
|
+
] }),
|
|
37461
|
+
tools && tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { children: [
|
|
37462
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Tools" }),
|
|
37463
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex flex-wrap gap-1.5", children: tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
37464
|
+
"span",
|
|
37465
|
+
{
|
|
37466
|
+
className: "text-[10px] font-mono px-2 py-0.5 rounded bg-[var(--primary-color)]/[0.08] text-[var(--primary-color)]/70 border border-[var(--primary-color)]/10",
|
|
37467
|
+
children: tool
|
|
37468
|
+
},
|
|
37469
|
+
tool
|
|
37470
|
+
)) })
|
|
37471
|
+
] })
|
|
37472
|
+
] })
|
|
37473
|
+
]
|
|
37474
|
+
}
|
|
37475
|
+
);
|
|
37476
|
+
};
|
|
37477
|
+
|
|
36881
37478
|
// src/components/ui/index.ts
|
|
36882
37479
|
var ui_exports = {};
|
|
36883
37480
|
__export(ui_exports, {
|
|
@@ -37170,7 +37767,7 @@ __export(ui_exports, {
|
|
|
37170
37767
|
// src/components/ui/button-group.tsx
|
|
37171
37768
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
37172
37769
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
37173
|
-
var
|
|
37770
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
37174
37771
|
var buttonGroupVariants = (0, import_class_variance_authority8.cva)(
|
|
37175
37772
|
"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",
|
|
37176
37773
|
{
|
|
@@ -37190,7 +37787,7 @@ function ButtonGroup({
|
|
|
37190
37787
|
orientation,
|
|
37191
37788
|
...props
|
|
37192
37789
|
}) {
|
|
37193
|
-
return /* @__PURE__ */ (0,
|
|
37790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
37194
37791
|
"div",
|
|
37195
37792
|
{
|
|
37196
37793
|
role: "group",
|
|
@@ -37207,7 +37804,7 @@ function ButtonGroupText({
|
|
|
37207
37804
|
...props
|
|
37208
37805
|
}) {
|
|
37209
37806
|
const Comp = asChild ? import_react_slot4.Slot : "div";
|
|
37210
|
-
return /* @__PURE__ */ (0,
|
|
37807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
37211
37808
|
Comp,
|
|
37212
37809
|
{
|
|
37213
37810
|
className: cn(
|
|
@@ -37223,7 +37820,7 @@ function ButtonGroupSeparator({
|
|
|
37223
37820
|
orientation = "vertical",
|
|
37224
37821
|
...props
|
|
37225
37822
|
}) {
|
|
37226
|
-
return /* @__PURE__ */ (0,
|
|
37823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
37227
37824
|
Separator2,
|
|
37228
37825
|
{
|
|
37229
37826
|
"data-slot": "button-group-separator",
|
|
@@ -37239,9 +37836,9 @@ function ButtonGroupSeparator({
|
|
|
37239
37836
|
|
|
37240
37837
|
// src/components/ui/empty.tsx
|
|
37241
37838
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
37242
|
-
var
|
|
37839
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
37243
37840
|
function Empty({ className, ...props }) {
|
|
37244
|
-
return /* @__PURE__ */ (0,
|
|
37841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
37245
37842
|
"div",
|
|
37246
37843
|
{
|
|
37247
37844
|
"data-slot": "empty",
|
|
@@ -37254,7 +37851,7 @@ function Empty({ className, ...props }) {
|
|
|
37254
37851
|
);
|
|
37255
37852
|
}
|
|
37256
37853
|
function EmptyHeader({ className, ...props }) {
|
|
37257
|
-
return /* @__PURE__ */ (0,
|
|
37854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
37258
37855
|
"div",
|
|
37259
37856
|
{
|
|
37260
37857
|
"data-slot": "empty-header",
|
|
@@ -37285,7 +37882,7 @@ function EmptyMedia({
|
|
|
37285
37882
|
variant = "default",
|
|
37286
37883
|
...props
|
|
37287
37884
|
}) {
|
|
37288
|
-
return /* @__PURE__ */ (0,
|
|
37885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
37289
37886
|
"div",
|
|
37290
37887
|
{
|
|
37291
37888
|
"data-slot": "empty-icon",
|
|
@@ -37296,7 +37893,7 @@ function EmptyMedia({
|
|
|
37296
37893
|
);
|
|
37297
37894
|
}
|
|
37298
37895
|
function EmptyTitle({ className, ...props }) {
|
|
37299
|
-
return /* @__PURE__ */ (0,
|
|
37896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
37300
37897
|
"div",
|
|
37301
37898
|
{
|
|
37302
37899
|
"data-slot": "empty-title",
|
|
@@ -37306,7 +37903,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
37306
37903
|
);
|
|
37307
37904
|
}
|
|
37308
37905
|
function EmptyDescription({ className, ...props }) {
|
|
37309
|
-
return /* @__PURE__ */ (0,
|
|
37906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
37310
37907
|
"div",
|
|
37311
37908
|
{
|
|
37312
37909
|
"data-slot": "empty-description",
|
|
@@ -37319,7 +37916,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
37319
37916
|
);
|
|
37320
37917
|
}
|
|
37321
37918
|
function EmptyContent({ className, ...props }) {
|
|
37322
|
-
return /* @__PURE__ */ (0,
|
|
37919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
37323
37920
|
"div",
|
|
37324
37921
|
{
|
|
37325
37922
|
"data-slot": "empty-content",
|
|
@@ -37333,11 +37930,11 @@ function EmptyContent({ className, ...props }) {
|
|
|
37333
37930
|
}
|
|
37334
37931
|
|
|
37335
37932
|
// src/components/ui/field.tsx
|
|
37336
|
-
var
|
|
37933
|
+
var import_react68 = require("react");
|
|
37337
37934
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
37338
|
-
var
|
|
37935
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
37339
37936
|
function FieldSet({ className, ...props }) {
|
|
37340
|
-
return /* @__PURE__ */ (0,
|
|
37937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
37341
37938
|
"fieldset",
|
|
37342
37939
|
{
|
|
37343
37940
|
"data-slot": "field-set",
|
|
@@ -37355,7 +37952,7 @@ function FieldLegend({
|
|
|
37355
37952
|
variant = "legend",
|
|
37356
37953
|
...props
|
|
37357
37954
|
}) {
|
|
37358
|
-
return /* @__PURE__ */ (0,
|
|
37955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
37359
37956
|
"legend",
|
|
37360
37957
|
{
|
|
37361
37958
|
"data-slot": "field-legend",
|
|
@@ -37371,7 +37968,7 @@ function FieldLegend({
|
|
|
37371
37968
|
);
|
|
37372
37969
|
}
|
|
37373
37970
|
function FieldGroup({ className, ...props }) {
|
|
37374
|
-
return /* @__PURE__ */ (0,
|
|
37971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
37375
37972
|
"div",
|
|
37376
37973
|
{
|
|
37377
37974
|
"data-slot": "field-group",
|
|
@@ -37411,7 +38008,7 @@ function Field({
|
|
|
37411
38008
|
orientation = "vertical",
|
|
37412
38009
|
...props
|
|
37413
38010
|
}) {
|
|
37414
|
-
return /* @__PURE__ */ (0,
|
|
38011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
37415
38012
|
"div",
|
|
37416
38013
|
{
|
|
37417
38014
|
role: "group",
|
|
@@ -37423,7 +38020,7 @@ function Field({
|
|
|
37423
38020
|
);
|
|
37424
38021
|
}
|
|
37425
38022
|
function FieldContent({ className, ...props }) {
|
|
37426
|
-
return /* @__PURE__ */ (0,
|
|
38023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
37427
38024
|
"div",
|
|
37428
38025
|
{
|
|
37429
38026
|
"data-slot": "field-content",
|
|
@@ -37439,7 +38036,7 @@ function FieldLabel({
|
|
|
37439
38036
|
className,
|
|
37440
38037
|
...props
|
|
37441
38038
|
}) {
|
|
37442
|
-
return /* @__PURE__ */ (0,
|
|
38039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
37443
38040
|
Label,
|
|
37444
38041
|
{
|
|
37445
38042
|
"data-slot": "field-label",
|
|
@@ -37454,7 +38051,7 @@ function FieldLabel({
|
|
|
37454
38051
|
);
|
|
37455
38052
|
}
|
|
37456
38053
|
function FieldTitle({ className, ...props }) {
|
|
37457
|
-
return /* @__PURE__ */ (0,
|
|
38054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
37458
38055
|
"div",
|
|
37459
38056
|
{
|
|
37460
38057
|
"data-slot": "field-label",
|
|
@@ -37467,7 +38064,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
37467
38064
|
);
|
|
37468
38065
|
}
|
|
37469
38066
|
function FieldDescription({ className, ...props }) {
|
|
37470
|
-
return /* @__PURE__ */ (0,
|
|
38067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
37471
38068
|
"p",
|
|
37472
38069
|
{
|
|
37473
38070
|
"data-slot": "field-description",
|
|
@@ -37486,7 +38083,7 @@ function FieldSeparator({
|
|
|
37486
38083
|
className,
|
|
37487
38084
|
...props
|
|
37488
38085
|
}) {
|
|
37489
|
-
return /* @__PURE__ */ (0,
|
|
38086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
37490
38087
|
"div",
|
|
37491
38088
|
{
|
|
37492
38089
|
"data-slot": "field-separator",
|
|
@@ -37497,8 +38094,8 @@ function FieldSeparator({
|
|
|
37497
38094
|
),
|
|
37498
38095
|
...props,
|
|
37499
38096
|
children: [
|
|
37500
|
-
/* @__PURE__ */ (0,
|
|
37501
|
-
children && /* @__PURE__ */ (0,
|
|
38097
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
38098
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
37502
38099
|
"span",
|
|
37503
38100
|
{
|
|
37504
38101
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -37516,7 +38113,7 @@ function FieldError({
|
|
|
37516
38113
|
errors,
|
|
37517
38114
|
...props
|
|
37518
38115
|
}) {
|
|
37519
|
-
const content = (0,
|
|
38116
|
+
const content = (0, import_react68.useMemo)(() => {
|
|
37520
38117
|
if (children) {
|
|
37521
38118
|
return children;
|
|
37522
38119
|
}
|
|
@@ -37526,14 +38123,14 @@ function FieldError({
|
|
|
37526
38123
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
37527
38124
|
return errors[0].message;
|
|
37528
38125
|
}
|
|
37529
|
-
return /* @__PURE__ */ (0,
|
|
37530
|
-
(error, index) => error?.message && /* @__PURE__ */ (0,
|
|
38126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
38127
|
+
(error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("li", { children: error.message }, index)
|
|
37531
38128
|
) });
|
|
37532
38129
|
}, [children, errors]);
|
|
37533
38130
|
if (!content) {
|
|
37534
38131
|
return null;
|
|
37535
38132
|
}
|
|
37536
|
-
return /* @__PURE__ */ (0,
|
|
38133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
37537
38134
|
"div",
|
|
37538
38135
|
{
|
|
37539
38136
|
role: "alert",
|
|
@@ -37547,9 +38144,9 @@ function FieldError({
|
|
|
37547
38144
|
|
|
37548
38145
|
// src/components/ui/input-group.tsx
|
|
37549
38146
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
37550
|
-
var
|
|
38147
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
37551
38148
|
function InputGroup({ className, ...props }) {
|
|
37552
|
-
return /* @__PURE__ */ (0,
|
|
38149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
37553
38150
|
"div",
|
|
37554
38151
|
{
|
|
37555
38152
|
"data-slot": "input-group",
|
|
@@ -37593,7 +38190,7 @@ function InputGroupAddon({
|
|
|
37593
38190
|
align = "inline-start",
|
|
37594
38191
|
...props
|
|
37595
38192
|
}) {
|
|
37596
|
-
return /* @__PURE__ */ (0,
|
|
38193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
37597
38194
|
"div",
|
|
37598
38195
|
{
|
|
37599
38196
|
role: "group",
|
|
@@ -37633,7 +38230,7 @@ function InputGroupButton({
|
|
|
37633
38230
|
size = "xs",
|
|
37634
38231
|
...props
|
|
37635
38232
|
}) {
|
|
37636
|
-
return /* @__PURE__ */ (0,
|
|
38233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
37637
38234
|
Button,
|
|
37638
38235
|
{
|
|
37639
38236
|
type,
|
|
@@ -37645,7 +38242,7 @@ function InputGroupButton({
|
|
|
37645
38242
|
);
|
|
37646
38243
|
}
|
|
37647
38244
|
function InputGroupText({ className, ...props }) {
|
|
37648
|
-
return /* @__PURE__ */ (0,
|
|
38245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
37649
38246
|
"span",
|
|
37650
38247
|
{
|
|
37651
38248
|
className: cn(
|
|
@@ -37660,7 +38257,7 @@ function InputGroupInput({
|
|
|
37660
38257
|
className,
|
|
37661
38258
|
...props
|
|
37662
38259
|
}) {
|
|
37663
|
-
return /* @__PURE__ */ (0,
|
|
38260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
37664
38261
|
Input,
|
|
37665
38262
|
{
|
|
37666
38263
|
"data-slot": "input-group-control",
|
|
@@ -37676,7 +38273,7 @@ function InputGroupTextarea({
|
|
|
37676
38273
|
className,
|
|
37677
38274
|
...props
|
|
37678
38275
|
}) {
|
|
37679
|
-
return /* @__PURE__ */ (0,
|
|
38276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
37680
38277
|
Textarea,
|
|
37681
38278
|
{
|
|
37682
38279
|
"data-slot": "input-group-control",
|
|
@@ -37692,9 +38289,9 @@ function InputGroupTextarea({
|
|
|
37692
38289
|
// src/components/ui/item.tsx
|
|
37693
38290
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
37694
38291
|
var import_class_variance_authority12 = require("class-variance-authority");
|
|
37695
|
-
var
|
|
38292
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
37696
38293
|
function ItemGroup({ className, ...props }) {
|
|
37697
|
-
return /* @__PURE__ */ (0,
|
|
38294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
37698
38295
|
"div",
|
|
37699
38296
|
{
|
|
37700
38297
|
role: "list",
|
|
@@ -37708,7 +38305,7 @@ function ItemSeparator({
|
|
|
37708
38305
|
className,
|
|
37709
38306
|
...props
|
|
37710
38307
|
}) {
|
|
37711
|
-
return /* @__PURE__ */ (0,
|
|
38308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
37712
38309
|
Separator2,
|
|
37713
38310
|
{
|
|
37714
38311
|
"data-slot": "item-separator",
|
|
@@ -37746,7 +38343,7 @@ function Item8({
|
|
|
37746
38343
|
...props
|
|
37747
38344
|
}) {
|
|
37748
38345
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
37749
|
-
return /* @__PURE__ */ (0,
|
|
38346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
37750
38347
|
Comp,
|
|
37751
38348
|
{
|
|
37752
38349
|
"data-slot": "item",
|
|
@@ -37777,7 +38374,7 @@ function ItemMedia({
|
|
|
37777
38374
|
variant = "default",
|
|
37778
38375
|
...props
|
|
37779
38376
|
}) {
|
|
37780
|
-
return /* @__PURE__ */ (0,
|
|
38377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
37781
38378
|
"div",
|
|
37782
38379
|
{
|
|
37783
38380
|
"data-slot": "item-media",
|
|
@@ -37788,7 +38385,7 @@ function ItemMedia({
|
|
|
37788
38385
|
);
|
|
37789
38386
|
}
|
|
37790
38387
|
function ItemContent({ className, ...props }) {
|
|
37791
|
-
return /* @__PURE__ */ (0,
|
|
38388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
37792
38389
|
"div",
|
|
37793
38390
|
{
|
|
37794
38391
|
"data-slot": "item-content",
|
|
@@ -37801,7 +38398,7 @@ function ItemContent({ className, ...props }) {
|
|
|
37801
38398
|
);
|
|
37802
38399
|
}
|
|
37803
38400
|
function ItemTitle({ className, ...props }) {
|
|
37804
|
-
return /* @__PURE__ */ (0,
|
|
38401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
37805
38402
|
"div",
|
|
37806
38403
|
{
|
|
37807
38404
|
"data-slot": "item-title",
|
|
@@ -37814,7 +38411,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
37814
38411
|
);
|
|
37815
38412
|
}
|
|
37816
38413
|
function ItemDescription({ className, ...props }) {
|
|
37817
|
-
return /* @__PURE__ */ (0,
|
|
38414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
37818
38415
|
"p",
|
|
37819
38416
|
{
|
|
37820
38417
|
"data-slot": "item-description",
|
|
@@ -37828,7 +38425,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
37828
38425
|
);
|
|
37829
38426
|
}
|
|
37830
38427
|
function ItemActions({ className, ...props }) {
|
|
37831
|
-
return /* @__PURE__ */ (0,
|
|
38428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
37832
38429
|
"div",
|
|
37833
38430
|
{
|
|
37834
38431
|
"data-slot": "item-actions",
|
|
@@ -37838,7 +38435,7 @@ function ItemActions({ className, ...props }) {
|
|
|
37838
38435
|
);
|
|
37839
38436
|
}
|
|
37840
38437
|
function ItemHeader({ className, ...props }) {
|
|
37841
|
-
return /* @__PURE__ */ (0,
|
|
38438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
37842
38439
|
"div",
|
|
37843
38440
|
{
|
|
37844
38441
|
"data-slot": "item-header",
|
|
@@ -37851,7 +38448,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
37851
38448
|
);
|
|
37852
38449
|
}
|
|
37853
38450
|
function ItemFooter({ className, ...props }) {
|
|
37854
|
-
return /* @__PURE__ */ (0,
|
|
38451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
37855
38452
|
"div",
|
|
37856
38453
|
{
|
|
37857
38454
|
"data-slot": "item-footer",
|
|
@@ -37865,9 +38462,9 @@ function ItemFooter({ className, ...props }) {
|
|
|
37865
38462
|
}
|
|
37866
38463
|
|
|
37867
38464
|
// src/components/ui/kbd.tsx
|
|
37868
|
-
var
|
|
38465
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
37869
38466
|
function Kbd({ className, ...props }) {
|
|
37870
|
-
return /* @__PURE__ */ (0,
|
|
38467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
37871
38468
|
"kbd",
|
|
37872
38469
|
{
|
|
37873
38470
|
"data-slot": "kbd",
|
|
@@ -37882,7 +38479,7 @@ function Kbd({ className, ...props }) {
|
|
|
37882
38479
|
);
|
|
37883
38480
|
}
|
|
37884
38481
|
function KbdGroup({ className, ...props }) {
|
|
37885
|
-
return /* @__PURE__ */ (0,
|
|
38482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
37886
38483
|
"kbd",
|
|
37887
38484
|
{
|
|
37888
38485
|
"data-slot": "kbd-group",
|
|
@@ -37893,16 +38490,16 @@ function KbdGroup({ className, ...props }) {
|
|
|
37893
38490
|
}
|
|
37894
38491
|
|
|
37895
38492
|
// src/components/ui/sidebar.tsx
|
|
37896
|
-
var
|
|
38493
|
+
var React99 = __toESM(require("react"), 1);
|
|
37897
38494
|
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
37898
38495
|
var import_class_variance_authority13 = require("class-variance-authority");
|
|
37899
38496
|
|
|
37900
38497
|
// src/hooks/use-mobile.tsx
|
|
37901
|
-
var
|
|
38498
|
+
var React98 = __toESM(require("react"), 1);
|
|
37902
38499
|
var MOBILE_BREAKPOINT = 768;
|
|
37903
38500
|
function useIsMobile() {
|
|
37904
|
-
const [isMobile, setIsMobile] =
|
|
37905
|
-
|
|
38501
|
+
const [isMobile, setIsMobile] = React98.useState(void 0);
|
|
38502
|
+
React98.useEffect(() => {
|
|
37906
38503
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
37907
38504
|
const onChange = () => {
|
|
37908
38505
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -37915,22 +38512,22 @@ function useIsMobile() {
|
|
|
37915
38512
|
}
|
|
37916
38513
|
|
|
37917
38514
|
// src/components/ui/sidebar.tsx
|
|
37918
|
-
var
|
|
38515
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
37919
38516
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
37920
38517
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
37921
38518
|
var SIDEBAR_WIDTH = "16rem";
|
|
37922
38519
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
37923
38520
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
37924
38521
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
37925
|
-
var SidebarContext =
|
|
38522
|
+
var SidebarContext = React99.createContext(null);
|
|
37926
38523
|
function useSidebar() {
|
|
37927
|
-
const context =
|
|
38524
|
+
const context = React99.useContext(SidebarContext);
|
|
37928
38525
|
if (!context) {
|
|
37929
38526
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
37930
38527
|
}
|
|
37931
38528
|
return context;
|
|
37932
38529
|
}
|
|
37933
|
-
var SidebarProvider =
|
|
38530
|
+
var SidebarProvider = React99.forwardRef(
|
|
37934
38531
|
({
|
|
37935
38532
|
defaultOpen = true,
|
|
37936
38533
|
open: openProp,
|
|
@@ -37941,10 +38538,10 @@ var SidebarProvider = React96.forwardRef(
|
|
|
37941
38538
|
...props
|
|
37942
38539
|
}, ref) => {
|
|
37943
38540
|
const isMobile = useIsMobile();
|
|
37944
|
-
const [openMobile, setOpenMobile] =
|
|
37945
|
-
const [_open, _setOpen] =
|
|
38541
|
+
const [openMobile, setOpenMobile] = React99.useState(false);
|
|
38542
|
+
const [_open, _setOpen] = React99.useState(defaultOpen);
|
|
37946
38543
|
const open = openProp ?? _open;
|
|
37947
|
-
const setOpen =
|
|
38544
|
+
const setOpen = React99.useCallback(
|
|
37948
38545
|
(value) => {
|
|
37949
38546
|
const openState = typeof value === "function" ? value(open) : value;
|
|
37950
38547
|
if (setOpenProp) {
|
|
@@ -37956,10 +38553,10 @@ var SidebarProvider = React96.forwardRef(
|
|
|
37956
38553
|
},
|
|
37957
38554
|
[setOpenProp, open]
|
|
37958
38555
|
);
|
|
37959
|
-
const toggleSidebar =
|
|
38556
|
+
const toggleSidebar = React99.useCallback(() => {
|
|
37960
38557
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
37961
38558
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
37962
|
-
|
|
38559
|
+
React99.useEffect(() => {
|
|
37963
38560
|
const handleKeyDown = (event) => {
|
|
37964
38561
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
37965
38562
|
event.preventDefault();
|
|
@@ -37970,7 +38567,7 @@ var SidebarProvider = React96.forwardRef(
|
|
|
37970
38567
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
37971
38568
|
}, [toggleSidebar]);
|
|
37972
38569
|
const state = open ? "expanded" : "collapsed";
|
|
37973
|
-
const contextValue =
|
|
38570
|
+
const contextValue = React99.useMemo(
|
|
37974
38571
|
() => ({
|
|
37975
38572
|
state,
|
|
37976
38573
|
open,
|
|
@@ -37982,7 +38579,7 @@ var SidebarProvider = React96.forwardRef(
|
|
|
37982
38579
|
}),
|
|
37983
38580
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
37984
38581
|
);
|
|
37985
|
-
return /* @__PURE__ */ (0,
|
|
38582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
37986
38583
|
"div",
|
|
37987
38584
|
{
|
|
37988
38585
|
style: {
|
|
@@ -38002,7 +38599,7 @@ var SidebarProvider = React96.forwardRef(
|
|
|
38002
38599
|
}
|
|
38003
38600
|
);
|
|
38004
38601
|
SidebarProvider.displayName = "SidebarProvider";
|
|
38005
|
-
var Sidebar =
|
|
38602
|
+
var Sidebar = React99.forwardRef(
|
|
38006
38603
|
({
|
|
38007
38604
|
side = "left",
|
|
38008
38605
|
variant = "sidebar",
|
|
@@ -38013,7 +38610,7 @@ var Sidebar = React96.forwardRef(
|
|
|
38013
38610
|
}, ref) => {
|
|
38014
38611
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
38015
38612
|
if (collapsible === "none") {
|
|
38016
|
-
return /* @__PURE__ */ (0,
|
|
38613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38017
38614
|
"div",
|
|
38018
38615
|
{
|
|
38019
38616
|
className: cn(
|
|
@@ -38027,7 +38624,7 @@ var Sidebar = React96.forwardRef(
|
|
|
38027
38624
|
);
|
|
38028
38625
|
}
|
|
38029
38626
|
if (isMobile) {
|
|
38030
|
-
return /* @__PURE__ */ (0,
|
|
38627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
38031
38628
|
SheetContent,
|
|
38032
38629
|
{
|
|
38033
38630
|
"data-sidebar": "sidebar",
|
|
@@ -38038,16 +38635,16 @@ var Sidebar = React96.forwardRef(
|
|
|
38038
38635
|
},
|
|
38039
38636
|
side,
|
|
38040
38637
|
children: [
|
|
38041
|
-
/* @__PURE__ */ (0,
|
|
38042
|
-
/* @__PURE__ */ (0,
|
|
38043
|
-
/* @__PURE__ */ (0,
|
|
38638
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
38639
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
38640
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
38044
38641
|
] }),
|
|
38045
|
-
/* @__PURE__ */ (0,
|
|
38642
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
38046
38643
|
]
|
|
38047
38644
|
}
|
|
38048
38645
|
) });
|
|
38049
38646
|
}
|
|
38050
|
-
return /* @__PURE__ */ (0,
|
|
38647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
38051
38648
|
"div",
|
|
38052
38649
|
{
|
|
38053
38650
|
ref,
|
|
@@ -38057,7 +38654,7 @@ var Sidebar = React96.forwardRef(
|
|
|
38057
38654
|
"data-variant": variant,
|
|
38058
38655
|
"data-side": side,
|
|
38059
38656
|
children: [
|
|
38060
|
-
/* @__PURE__ */ (0,
|
|
38657
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38061
38658
|
"div",
|
|
38062
38659
|
{
|
|
38063
38660
|
className: cn(
|
|
@@ -38068,7 +38665,7 @@ var Sidebar = React96.forwardRef(
|
|
|
38068
38665
|
)
|
|
38069
38666
|
}
|
|
38070
38667
|
),
|
|
38071
|
-
/* @__PURE__ */ (0,
|
|
38668
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38072
38669
|
"div",
|
|
38073
38670
|
{
|
|
38074
38671
|
className: cn(
|
|
@@ -38079,7 +38676,7 @@ var Sidebar = React96.forwardRef(
|
|
|
38079
38676
|
className
|
|
38080
38677
|
),
|
|
38081
38678
|
...props,
|
|
38082
|
-
children: /* @__PURE__ */ (0,
|
|
38679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38083
38680
|
"div",
|
|
38084
38681
|
{
|
|
38085
38682
|
"data-sidebar": "sidebar",
|
|
@@ -38095,9 +38692,9 @@ var Sidebar = React96.forwardRef(
|
|
|
38095
38692
|
}
|
|
38096
38693
|
);
|
|
38097
38694
|
Sidebar.displayName = "Sidebar";
|
|
38098
|
-
var SidebarTrigger =
|
|
38695
|
+
var SidebarTrigger = React99.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
38099
38696
|
const { toggleSidebar } = useSidebar();
|
|
38100
|
-
return /* @__PURE__ */ (0,
|
|
38697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
38101
38698
|
Button,
|
|
38102
38699
|
{
|
|
38103
38700
|
ref,
|
|
@@ -38111,16 +38708,16 @@ var SidebarTrigger = React96.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
38111
38708
|
},
|
|
38112
38709
|
...props,
|
|
38113
38710
|
children: [
|
|
38114
|
-
/* @__PURE__ */ (0,
|
|
38115
|
-
/* @__PURE__ */ (0,
|
|
38711
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(PanelLeft, {}),
|
|
38712
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
38116
38713
|
]
|
|
38117
38714
|
}
|
|
38118
38715
|
);
|
|
38119
38716
|
});
|
|
38120
38717
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
38121
|
-
var SidebarRail =
|
|
38718
|
+
var SidebarRail = React99.forwardRef(({ className, ...props }, ref) => {
|
|
38122
38719
|
const { toggleSidebar } = useSidebar();
|
|
38123
|
-
return /* @__PURE__ */ (0,
|
|
38720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38124
38721
|
"button",
|
|
38125
38722
|
{
|
|
38126
38723
|
ref,
|
|
@@ -38143,8 +38740,8 @@ var SidebarRail = React96.forwardRef(({ className, ...props }, ref) => {
|
|
|
38143
38740
|
);
|
|
38144
38741
|
});
|
|
38145
38742
|
SidebarRail.displayName = "SidebarRail";
|
|
38146
|
-
var SidebarInset =
|
|
38147
|
-
return /* @__PURE__ */ (0,
|
|
38743
|
+
var SidebarInset = React99.forwardRef(({ className, ...props }, ref) => {
|
|
38744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38148
38745
|
"main",
|
|
38149
38746
|
{
|
|
38150
38747
|
ref,
|
|
@@ -38158,8 +38755,8 @@ var SidebarInset = React96.forwardRef(({ className, ...props }, ref) => {
|
|
|
38158
38755
|
);
|
|
38159
38756
|
});
|
|
38160
38757
|
SidebarInset.displayName = "SidebarInset";
|
|
38161
|
-
var SidebarInput =
|
|
38162
|
-
return /* @__PURE__ */ (0,
|
|
38758
|
+
var SidebarInput = React99.forwardRef(({ className, ...props }, ref) => {
|
|
38759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38163
38760
|
Input,
|
|
38164
38761
|
{
|
|
38165
38762
|
ref,
|
|
@@ -38173,8 +38770,8 @@ var SidebarInput = React96.forwardRef(({ className, ...props }, ref) => {
|
|
|
38173
38770
|
);
|
|
38174
38771
|
});
|
|
38175
38772
|
SidebarInput.displayName = "SidebarInput";
|
|
38176
|
-
var SidebarHeader =
|
|
38177
|
-
return /* @__PURE__ */ (0,
|
|
38773
|
+
var SidebarHeader = React99.forwardRef(({ className, ...props }, ref) => {
|
|
38774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38178
38775
|
"div",
|
|
38179
38776
|
{
|
|
38180
38777
|
ref,
|
|
@@ -38185,8 +38782,8 @@ var SidebarHeader = React96.forwardRef(({ className, ...props }, ref) => {
|
|
|
38185
38782
|
);
|
|
38186
38783
|
});
|
|
38187
38784
|
SidebarHeader.displayName = "SidebarHeader";
|
|
38188
|
-
var SidebarFooter =
|
|
38189
|
-
return /* @__PURE__ */ (0,
|
|
38785
|
+
var SidebarFooter = React99.forwardRef(({ className, ...props }, ref) => {
|
|
38786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38190
38787
|
"div",
|
|
38191
38788
|
{
|
|
38192
38789
|
ref,
|
|
@@ -38197,8 +38794,8 @@ var SidebarFooter = React96.forwardRef(({ className, ...props }, ref) => {
|
|
|
38197
38794
|
);
|
|
38198
38795
|
});
|
|
38199
38796
|
SidebarFooter.displayName = "SidebarFooter";
|
|
38200
|
-
var SidebarSeparator =
|
|
38201
|
-
return /* @__PURE__ */ (0,
|
|
38797
|
+
var SidebarSeparator = React99.forwardRef(({ className, ...props }, ref) => {
|
|
38798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38202
38799
|
Separator2,
|
|
38203
38800
|
{
|
|
38204
38801
|
ref,
|
|
@@ -38209,8 +38806,8 @@ var SidebarSeparator = React96.forwardRef(({ className, ...props }, ref) => {
|
|
|
38209
38806
|
);
|
|
38210
38807
|
});
|
|
38211
38808
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
38212
|
-
var SidebarContent =
|
|
38213
|
-
return /* @__PURE__ */ (0,
|
|
38809
|
+
var SidebarContent = React99.forwardRef(({ className, ...props }, ref) => {
|
|
38810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38214
38811
|
"div",
|
|
38215
38812
|
{
|
|
38216
38813
|
ref,
|
|
@@ -38224,8 +38821,8 @@ var SidebarContent = React96.forwardRef(({ className, ...props }, ref) => {
|
|
|
38224
38821
|
);
|
|
38225
38822
|
});
|
|
38226
38823
|
SidebarContent.displayName = "SidebarContent";
|
|
38227
|
-
var SidebarGroup =
|
|
38228
|
-
return /* @__PURE__ */ (0,
|
|
38824
|
+
var SidebarGroup = React99.forwardRef(({ className, ...props }, ref) => {
|
|
38825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38229
38826
|
"div",
|
|
38230
38827
|
{
|
|
38231
38828
|
ref,
|
|
@@ -38236,9 +38833,9 @@ var SidebarGroup = React96.forwardRef(({ className, ...props }, ref) => {
|
|
|
38236
38833
|
);
|
|
38237
38834
|
});
|
|
38238
38835
|
SidebarGroup.displayName = "SidebarGroup";
|
|
38239
|
-
var SidebarGroupLabel =
|
|
38836
|
+
var SidebarGroupLabel = React99.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
38240
38837
|
const Comp = asChild ? import_react_slot6.Slot : "div";
|
|
38241
|
-
return /* @__PURE__ */ (0,
|
|
38838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38242
38839
|
Comp,
|
|
38243
38840
|
{
|
|
38244
38841
|
ref,
|
|
@@ -38253,9 +38850,9 @@ var SidebarGroupLabel = React96.forwardRef(({ className, asChild = false, ...pro
|
|
|
38253
38850
|
);
|
|
38254
38851
|
});
|
|
38255
38852
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
38256
|
-
var SidebarGroupAction =
|
|
38853
|
+
var SidebarGroupAction = React99.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
38257
38854
|
const Comp = asChild ? import_react_slot6.Slot : "button";
|
|
38258
|
-
return /* @__PURE__ */ (0,
|
|
38855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38259
38856
|
Comp,
|
|
38260
38857
|
{
|
|
38261
38858
|
ref,
|
|
@@ -38272,7 +38869,7 @@ var SidebarGroupAction = React96.forwardRef(({ className, asChild = false, ...pr
|
|
|
38272
38869
|
);
|
|
38273
38870
|
});
|
|
38274
38871
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
38275
|
-
var SidebarGroupContent =
|
|
38872
|
+
var SidebarGroupContent = React99.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38276
38873
|
"div",
|
|
38277
38874
|
{
|
|
38278
38875
|
ref,
|
|
@@ -38282,7 +38879,7 @@ var SidebarGroupContent = React96.forwardRef(({ className, ...props }, ref) => /
|
|
|
38282
38879
|
}
|
|
38283
38880
|
));
|
|
38284
38881
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
38285
|
-
var SidebarMenu =
|
|
38882
|
+
var SidebarMenu = React99.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38286
38883
|
"ul",
|
|
38287
38884
|
{
|
|
38288
38885
|
ref,
|
|
@@ -38292,7 +38889,7 @@ var SidebarMenu = React96.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
38292
38889
|
}
|
|
38293
38890
|
));
|
|
38294
38891
|
SidebarMenu.displayName = "SidebarMenu";
|
|
38295
|
-
var SidebarMenuItem =
|
|
38892
|
+
var SidebarMenuItem = React99.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38296
38893
|
"li",
|
|
38297
38894
|
{
|
|
38298
38895
|
ref,
|
|
@@ -38322,7 +38919,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority13.cva)(
|
|
|
38322
38919
|
}
|
|
38323
38920
|
}
|
|
38324
38921
|
);
|
|
38325
|
-
var SidebarMenuButton =
|
|
38922
|
+
var SidebarMenuButton = React99.forwardRef(
|
|
38326
38923
|
({
|
|
38327
38924
|
asChild = false,
|
|
38328
38925
|
isActive = false,
|
|
@@ -38334,7 +38931,7 @@ var SidebarMenuButton = React96.forwardRef(
|
|
|
38334
38931
|
}, ref) => {
|
|
38335
38932
|
const Comp = asChild ? import_react_slot6.Slot : "button";
|
|
38336
38933
|
const { isMobile, state } = useSidebar();
|
|
38337
|
-
const button = /* @__PURE__ */ (0,
|
|
38934
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38338
38935
|
Comp,
|
|
38339
38936
|
{
|
|
38340
38937
|
ref,
|
|
@@ -38353,9 +38950,9 @@ var SidebarMenuButton = React96.forwardRef(
|
|
|
38353
38950
|
children: tooltip
|
|
38354
38951
|
};
|
|
38355
38952
|
}
|
|
38356
|
-
return /* @__PURE__ */ (0,
|
|
38357
|
-
/* @__PURE__ */ (0,
|
|
38358
|
-
/* @__PURE__ */ (0,
|
|
38953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(Tooltip, { children: [
|
|
38954
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(TooltipTrigger, { asChild: true, children: button }),
|
|
38955
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38359
38956
|
TooltipContent,
|
|
38360
38957
|
{
|
|
38361
38958
|
side: "right",
|
|
@@ -38368,9 +38965,9 @@ var SidebarMenuButton = React96.forwardRef(
|
|
|
38368
38965
|
}
|
|
38369
38966
|
);
|
|
38370
38967
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
38371
|
-
var SidebarMenuAction =
|
|
38968
|
+
var SidebarMenuAction = React99.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
38372
38969
|
const Comp = asChild ? import_react_slot6.Slot : "button";
|
|
38373
|
-
return /* @__PURE__ */ (0,
|
|
38970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38374
38971
|
Comp,
|
|
38375
38972
|
{
|
|
38376
38973
|
ref,
|
|
@@ -38391,7 +38988,7 @@ var SidebarMenuAction = React96.forwardRef(({ className, asChild = false, showOn
|
|
|
38391
38988
|
);
|
|
38392
38989
|
});
|
|
38393
38990
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
38394
|
-
var SidebarMenuBadge =
|
|
38991
|
+
var SidebarMenuBadge = React99.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38395
38992
|
"div",
|
|
38396
38993
|
{
|
|
38397
38994
|
ref,
|
|
@@ -38409,11 +39006,11 @@ var SidebarMenuBadge = React96.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
38409
39006
|
}
|
|
38410
39007
|
));
|
|
38411
39008
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
38412
|
-
var SidebarMenuSkeleton =
|
|
38413
|
-
const width =
|
|
39009
|
+
var SidebarMenuSkeleton = React99.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
39010
|
+
const width = React99.useMemo(() => {
|
|
38414
39011
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
38415
39012
|
}, []);
|
|
38416
|
-
return /* @__PURE__ */ (0,
|
|
39013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
38417
39014
|
"div",
|
|
38418
39015
|
{
|
|
38419
39016
|
ref,
|
|
@@ -38421,14 +39018,14 @@ var SidebarMenuSkeleton = React96.forwardRef(({ className, showIcon = false, ...
|
|
|
38421
39018
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
38422
39019
|
...props,
|
|
38423
39020
|
children: [
|
|
38424
|
-
showIcon && /* @__PURE__ */ (0,
|
|
39021
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38425
39022
|
Skeleton,
|
|
38426
39023
|
{
|
|
38427
39024
|
className: "size-4 rounded-md",
|
|
38428
39025
|
"data-sidebar": "menu-skeleton-icon"
|
|
38429
39026
|
}
|
|
38430
39027
|
),
|
|
38431
|
-
/* @__PURE__ */ (0,
|
|
39028
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38432
39029
|
Skeleton,
|
|
38433
39030
|
{
|
|
38434
39031
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -38443,7 +39040,7 @@ var SidebarMenuSkeleton = React96.forwardRef(({ className, showIcon = false, ...
|
|
|
38443
39040
|
);
|
|
38444
39041
|
});
|
|
38445
39042
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
38446
|
-
var SidebarMenuSub =
|
|
39043
|
+
var SidebarMenuSub = React99.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38447
39044
|
"ul",
|
|
38448
39045
|
{
|
|
38449
39046
|
ref,
|
|
@@ -38457,11 +39054,11 @@ var SidebarMenuSub = React96.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
38457
39054
|
}
|
|
38458
39055
|
));
|
|
38459
39056
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
38460
|
-
var SidebarMenuSubItem =
|
|
39057
|
+
var SidebarMenuSubItem = React99.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("li", { ref, ...props }));
|
|
38461
39058
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
38462
|
-
var SidebarMenuSubButton =
|
|
39059
|
+
var SidebarMenuSubButton = React99.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
38463
39060
|
const Comp = asChild ? import_react_slot6.Slot : "a";
|
|
38464
|
-
return /* @__PURE__ */ (0,
|
|
39061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
38465
39062
|
Comp,
|
|
38466
39063
|
{
|
|
38467
39064
|
ref,
|
|
@@ -38485,20 +39082,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
38485
39082
|
// src/components/ui/sonner.tsx
|
|
38486
39083
|
var import_next_themes = require("next-themes");
|
|
38487
39084
|
var import_sonner = require("sonner");
|
|
38488
|
-
var
|
|
39085
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
38489
39086
|
var Toaster = ({ ...props }) => {
|
|
38490
39087
|
const { theme = "system" } = (0, import_next_themes.useTheme)();
|
|
38491
|
-
return /* @__PURE__ */ (0,
|
|
39088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
38492
39089
|
import_sonner.Toaster,
|
|
38493
39090
|
{
|
|
38494
39091
|
theme,
|
|
38495
39092
|
className: "toaster group",
|
|
38496
39093
|
icons: {
|
|
38497
|
-
success: /* @__PURE__ */ (0,
|
|
38498
|
-
info: /* @__PURE__ */ (0,
|
|
38499
|
-
warning: /* @__PURE__ */ (0,
|
|
38500
|
-
error: /* @__PURE__ */ (0,
|
|
38501
|
-
loading: /* @__PURE__ */ (0,
|
|
39094
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(CircleCheck, { className: "h-4 w-4" }),
|
|
39095
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Info, { className: "h-4 w-4" }),
|
|
39096
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TriangleAlert, { className: "h-4 w-4" }),
|
|
39097
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(OctagonX, { className: "h-4 w-4" }),
|
|
39098
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(LoaderCircle, { className: "h-4 w-4 animate-spin" })
|
|
38502
39099
|
},
|
|
38503
39100
|
toastOptions: {
|
|
38504
39101
|
classNames: {
|
|
@@ -38514,26 +39111,26 @@ var Toaster = ({ ...props }) => {
|
|
|
38514
39111
|
};
|
|
38515
39112
|
|
|
38516
39113
|
// src/components/ui/toggle-group.tsx
|
|
38517
|
-
var
|
|
39114
|
+
var React100 = __toESM(require("react"), 1);
|
|
38518
39115
|
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
38519
|
-
var
|
|
38520
|
-
var ToggleGroupContext =
|
|
39116
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
39117
|
+
var ToggleGroupContext = React100.createContext({
|
|
38521
39118
|
size: "default",
|
|
38522
39119
|
variant: "default"
|
|
38523
39120
|
});
|
|
38524
|
-
var ToggleGroup =
|
|
39121
|
+
var ToggleGroup = React100.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
38525
39122
|
ToggleGroupPrimitive.Root,
|
|
38526
39123
|
{
|
|
38527
39124
|
ref,
|
|
38528
39125
|
className: cn("flex items-center justify-center gap-1", className),
|
|
38529
39126
|
...props,
|
|
38530
|
-
children: /* @__PURE__ */ (0,
|
|
39127
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
38531
39128
|
}
|
|
38532
39129
|
));
|
|
38533
39130
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
38534
|
-
var ToggleGroupItem =
|
|
38535
|
-
const context =
|
|
38536
|
-
return /* @__PURE__ */ (0,
|
|
39131
|
+
var ToggleGroupItem = React100.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
39132
|
+
const context = React100.useContext(ToggleGroupContext);
|
|
39133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
38537
39134
|
ToggleGroupPrimitive.Item,
|
|
38538
39135
|
{
|
|
38539
39136
|
ref,
|
|
@@ -38552,7 +39149,7 @@ var ToggleGroupItem = React97.forwardRef(({ className, children, variant, size,
|
|
|
38552
39149
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
38553
39150
|
|
|
38554
39151
|
// src/render/PXEngineRenderer.tsx
|
|
38555
|
-
var
|
|
39152
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
38556
39153
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
38557
39154
|
// Form components - require FormField + FormItem context
|
|
38558
39155
|
"FormLabel",
|
|
@@ -38644,24 +39241,24 @@ var COMPONENT_SUGGESTIONS = {
|
|
|
38644
39241
|
};
|
|
38645
39242
|
var renderContextDependentError = (componentName, normalizedName, key) => {
|
|
38646
39243
|
const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
|
|
38647
|
-
return /* @__PURE__ */ (0,
|
|
39244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
38648
39245
|
"div",
|
|
38649
39246
|
{
|
|
38650
39247
|
className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
|
|
38651
39248
|
children: [
|
|
38652
|
-
/* @__PURE__ */ (0,
|
|
38653
|
-
/* @__PURE__ */ (0,
|
|
38654
|
-
/* @__PURE__ */ (0,
|
|
38655
|
-
/* @__PURE__ */ (0,
|
|
39249
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex items-start gap-2", children: [
|
|
39250
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
|
|
39251
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex-1", children: [
|
|
39252
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("p", { className: "text-sm font-semibold text-amber-900", children: [
|
|
38656
39253
|
"Invalid Component: ",
|
|
38657
39254
|
componentName
|
|
38658
39255
|
] }),
|
|
38659
|
-
/* @__PURE__ */ (0,
|
|
39256
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
|
|
38660
39257
|
] })
|
|
38661
39258
|
] }),
|
|
38662
|
-
/* @__PURE__ */ (0,
|
|
38663
|
-
/* @__PURE__ */ (0,
|
|
38664
|
-
/* @__PURE__ */ (0,
|
|
39259
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
|
|
39260
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
|
|
39261
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
|
|
38665
39262
|
] })
|
|
38666
39263
|
]
|
|
38667
39264
|
},
|
|
@@ -38741,7 +39338,7 @@ var PXEngineRenderer = ({
|
|
|
38741
39338
|
if (typeof component === "string" || typeof component === "number") {
|
|
38742
39339
|
return component;
|
|
38743
39340
|
}
|
|
38744
|
-
if (
|
|
39341
|
+
if (import_react69.default.isValidElement(component)) {
|
|
38745
39342
|
return component;
|
|
38746
39343
|
}
|
|
38747
39344
|
if (!component || typeof component !== "object") return null;
|
|
@@ -38819,7 +39416,7 @@ var PXEngineRenderer = ({
|
|
|
38819
39416
|
const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
|
|
38820
39417
|
const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
|
|
38821
39418
|
if (isAtomWithRenderProp) {
|
|
38822
|
-
return /* @__PURE__ */ (0,
|
|
39419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
38823
39420
|
TargetComponent,
|
|
38824
39421
|
{
|
|
38825
39422
|
...finalProps,
|
|
@@ -38831,7 +39428,7 @@ var PXEngineRenderer = ({
|
|
|
38831
39428
|
uniqueKey
|
|
38832
39429
|
);
|
|
38833
39430
|
} else {
|
|
38834
|
-
return /* @__PURE__ */ (0,
|
|
39431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
38835
39432
|
TargetComponent,
|
|
38836
39433
|
{
|
|
38837
39434
|
...finalProps,
|
|
@@ -38843,7 +39440,7 @@ var PXEngineRenderer = ({
|
|
|
38843
39440
|
);
|
|
38844
39441
|
}
|
|
38845
39442
|
};
|
|
38846
|
-
return /* @__PURE__ */ (0,
|
|
39443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
|
|
38847
39444
|
};
|
|
38848
39445
|
// Annotate the CommonJS export names for ESM import in node:
|
|
38849
39446
|
0 && (module.exports = {
|
|
@@ -38853,6 +39450,8 @@ var PXEngineRenderer = ({
|
|
|
38853
39450
|
AccordionItem,
|
|
38854
39451
|
AccordionTrigger,
|
|
38855
39452
|
ActionButton,
|
|
39453
|
+
AgentCard,
|
|
39454
|
+
AgentDataTable,
|
|
38856
39455
|
Alert,
|
|
38857
39456
|
AlertAtom,
|
|
38858
39457
|
AlertDescription,
|
|
@@ -38997,6 +39596,7 @@ var PXEngineRenderer = ({
|
|
|
38997
39596
|
InputOTPGroup,
|
|
38998
39597
|
InputOTPSeparator,
|
|
38999
39598
|
InputOTPSlot,
|
|
39599
|
+
InstructionPreview,
|
|
39000
39600
|
KbdAtom,
|
|
39001
39601
|
KeywordBundlesDisplay,
|
|
39002
39602
|
KeywordBundlesEdit,
|
|
@@ -39101,6 +39701,7 @@ var PXEngineRenderer = ({
|
|
|
39101
39701
|
TextareaAtom,
|
|
39102
39702
|
TimelineAtom,
|
|
39103
39703
|
ToggleAtom,
|
|
39704
|
+
ToolListCard,
|
|
39104
39705
|
Tooltip,
|
|
39105
39706
|
TooltipAtom,
|
|
39106
39707
|
TooltipContent,
|
|
@@ -39108,6 +39709,7 @@ var PXEngineRenderer = ({
|
|
|
39108
39709
|
TooltipTrigger,
|
|
39109
39710
|
TopPostsGrid,
|
|
39110
39711
|
VideoAtom,
|
|
39712
|
+
WorkflowVisualizer,
|
|
39111
39713
|
cn
|
|
39112
39714
|
});
|
|
39113
39715
|
/*! Bundled license information:
|