pxengine 0.1.59 → 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 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 import_react83 = __toESM(require("react"), 1);
321
+ var import_react78 = __toESM(require("react"), 1);
332
322
 
333
323
  // src/atoms/index.ts
334
324
  var atoms_exports = {};
@@ -33827,8 +33817,6 @@ ArrowToggleAtom.displayName = "ArrowToggleAtom";
33827
33817
  var molecules_exports = {};
33828
33818
  __export(molecules_exports, {
33829
33819
  ActionButton: () => ActionButton,
33830
- AgentCard: () => AgentCard,
33831
- AgentDataTable: () => AgentDataTable,
33832
33820
  AudienceDemographicsCard: () => AudienceDemographicsCard,
33833
33821
  AudienceMetricCard: () => AudienceMetricCard,
33834
33822
  BrandAffinityGroup: () => BrandAffinityGroup,
@@ -33862,14 +33850,10 @@ __export(molecules_exports, {
33862
33850
  GoogleSheetsConnectCard: () => GoogleSheetsConnectCard,
33863
33851
  GoogleSheetsListCard: () => GoogleSheetsListCard,
33864
33852
  GrowthChartCard: () => GrowthChartCard,
33865
- InstructionPreview: () => InstructionPreview,
33866
33853
  KeywordBundlesDisplay: () => KeywordBundlesDisplay,
33867
33854
  KeywordBundlesEdit: () => KeywordBundlesEdit,
33868
33855
  LoadingOverlay: () => LoadingOverlay,
33869
33856
  MCQCard: () => MCQCard,
33870
- MultiAgentCard: () => MultiAgentCard,
33871
- MultiAgentPlan: () => MultiAgentPlan,
33872
- MultiAgentUISelector: () => MultiAgentUISelector,
33873
33857
  NotificationList: () => NotificationList,
33874
33858
  PlatformIconGroup: () => PlatformIconGroup,
33875
33859
  PlatformSelectDisplay: () => PlatformSelectDisplay,
@@ -33877,14 +33861,10 @@ __export(molecules_exports, {
33877
33861
  RecommendationCard: () => RecommendationCard,
33878
33862
  SearchSpecCard: () => SearchSpecCard,
33879
33863
  SocialPostCard: () => SocialPostCard,
33880
- StageIndicator: () => StageIndicator,
33881
33864
  StatsGrid: () => StatsGrid,
33882
33865
  StepWizard: () => StepWizard,
33883
33866
  TagCloud: () => TagCloud,
33884
- ToolListCard: () => ToolListCard,
33885
33867
  TopPostsGrid: () => TopPostsGrid,
33886
- UIComponentSelector: () => UIComponentSelector,
33887
- WorkflowVisualizer: () => WorkflowVisualizer,
33888
33868
  defaultFetchSelections: () => defaultFetchSelections,
33889
33869
  defaultPersistSelection: () => defaultPersistSelection,
33890
33870
  useCreatorWidgetPolling: () => useCreatorWidgetPolling
@@ -41082,1307 +41062,6 @@ function CreatorWidgetInner({
41082
41062
  }
41083
41063
  var CreatorWidget = (0, import_react76.memo)(CreatorWidgetInner);
41084
41064
 
41085
- // src/molecules/workstream-builder/ToolListCard/ToolListCard.tsx
41086
- var import_jsx_runtime150 = require("react/jsx-runtime");
41087
- var FONT_STYLE = {
41088
- fontFamily: "Inter, system-ui, sans-serif"
41089
- };
41090
- var ICON_MAP = {
41091
- Search,
41092
- Database,
41093
- Globe,
41094
- FileText,
41095
- Zap,
41096
- Layout: PanelsTopLeft,
41097
- Wrench,
41098
- BookOpen,
41099
- BarChart3: ChartColumn,
41100
- Link,
41101
- MessageSquare,
41102
- Sparkles,
41103
- FolderOpen,
41104
- Code,
41105
- Shield,
41106
- Image,
41107
- Mail,
41108
- Calendar
41109
- };
41110
- var CATEGORY_FALLBACK = {
41111
- search: Search,
41112
- data: Database,
41113
- knowledge: BookOpen,
41114
- web: Globe,
41115
- content: FileText,
41116
- ui: PanelsTopLeft,
41117
- analytics: ChartColumn,
41118
- integration: Link,
41119
- communication: MessageSquare,
41120
- generation: Sparkles,
41121
- file: FolderOpen,
41122
- code: Code,
41123
- security: Shield,
41124
- general: Zap
41125
- };
41126
- var CATEGORY_HEADER_BG = {
41127
- search: "bg-blue-500/[0.04]",
41128
- data: "bg-emerald-500/[0.04]",
41129
- knowledge: "bg-purple-500/[0.04]",
41130
- web: "bg-cyan-500/[0.04]",
41131
- content: "bg-pink-500/[0.04]",
41132
- ui: "bg-violet-500/[0.04]",
41133
- analytics: "bg-orange-500/[0.04]",
41134
- integration: "bg-amber-500/[0.04]",
41135
- general: "bg-[var(--foreground)]/[0.02]"
41136
- };
41137
- function resolveIcon(tool) {
41138
- if (tool.icon && ICON_MAP[tool.icon]) return ICON_MAP[tool.icon];
41139
- if (tool.category && CATEGORY_FALLBACK[tool.category.toLowerCase()])
41140
- return CATEGORY_FALLBACK[tool.category.toLowerCase()];
41141
- return Wrench;
41142
- }
41143
- function resolveCategoryIcon(category) {
41144
- return CATEGORY_FALLBACK[category.toLowerCase()] || Wrench;
41145
- }
41146
- var ToolListCard = ({
41147
- tools,
41148
- className
41149
- }) => {
41150
- const grouped = {};
41151
- for (const tool of tools) {
41152
- const cat = tool.category || "General";
41153
- if (!grouped[cat]) grouped[cat] = [];
41154
- grouped[cat].push(tool);
41155
- }
41156
- const categories = Object.keys(grouped);
41157
- return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
41158
- "div",
41159
- {
41160
- className: cn(
41161
- "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",
41162
- className
41163
- ),
41164
- style: FONT_STYLE,
41165
- children: [
41166
- /* @__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: [
41167
- /* @__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" }) }),
41168
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Available Tools" }),
41169
- /* @__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 })
41170
- ] }),
41171
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
41172
- const CatIcon = resolveCategoryIcon(cat);
41173
- const headerBg = CATEGORY_HEADER_BG[cat.toLowerCase()] || CATEGORY_HEADER_BG.general;
41174
- return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "px-4 py-3", children: [
41175
- /* @__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: [
41176
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(CatIcon, { className: "w-3.5 h-3.5 text-interactive/70" }),
41177
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
41178
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
41179
- ] }),
41180
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", { className: "space-y-1.5", children: grouped[cat].map((tool) => {
41181
- const ToolIcon = resolveIcon(tool);
41182
- return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
41183
- "div",
41184
- {
41185
- className: "group flex items-start gap-3 px-3 py-2 rounded-lg hover:bg-[var(--foreground)]/[0.03] transition-colors",
41186
- children: [
41187
- /* @__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" }) }),
41188
- /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "flex-1 min-w-0", children: [
41189
- /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", { className: "flex items-center gap-2 flex-wrap", children: [
41190
- 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 }),
41191
- /* @__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 })
41192
- ] }),
41193
- 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 })
41194
- ] })
41195
- ]
41196
- },
41197
- tool.name
41198
- );
41199
- }) })
41200
- ] }, cat);
41201
- }) })
41202
- ]
41203
- }
41204
- );
41205
- };
41206
-
41207
- // src/molecules/workstream-builder/AgentCard/AgentCard.tsx
41208
- var import_react77 = require("react");
41209
- var import_jsx_runtime151 = require("react/jsx-runtime");
41210
- var FONT_STYLE2 = {
41211
- fontFamily: "Inter, system-ui, sans-serif"
41212
- };
41213
- var AgentCard = ({
41214
- agent,
41215
- editable = true,
41216
- compact = false,
41217
- onSave,
41218
- className
41219
- }) => {
41220
- const [isEditing, setIsEditing] = (0, import_react77.useState)(false);
41221
- const [isSaving, setIsSaving] = (0, import_react77.useState)(false);
41222
- const [editState, setEditState] = (0, import_react77.useState)({
41223
- display_name: agent.display_name,
41224
- description: agent.description,
41225
- image: agent.image || ""
41226
- });
41227
- const avatarUrl = agent.image || `https://api.dicebear.com/7.x/avataaars/svg?seed=${agent.name}`;
41228
- const handleEdit = (0, import_react77.useCallback)(() => {
41229
- setEditState({
41230
- display_name: agent.display_name,
41231
- description: agent.description,
41232
- image: agent.image || ""
41233
- });
41234
- setIsEditing(true);
41235
- }, [agent]);
41236
- const handleCancel = (0, import_react77.useCallback)(() => {
41237
- setIsEditing(false);
41238
- }, []);
41239
- const handleSave = (0, import_react77.useCallback)(async () => {
41240
- if (!onSave) return;
41241
- const updates = {};
41242
- if (editState.display_name !== agent.display_name)
41243
- updates.display_name = editState.display_name;
41244
- if (editState.description !== agent.description)
41245
- updates.description = editState.description;
41246
- if (editState.image !== (agent.image || ""))
41247
- updates.image = editState.image;
41248
- if (Object.keys(updates).length === 0) {
41249
- setIsEditing(false);
41250
- return;
41251
- }
41252
- setIsSaving(true);
41253
- try {
41254
- await onSave(agent, updates);
41255
- setIsEditing(false);
41256
- } catch (err) {
41257
- console.error("AgentCard save failed:", err);
41258
- } finally {
41259
- setIsSaving(false);
41260
- }
41261
- }, [onSave, agent, editState]);
41262
- if (compact) {
41263
- return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
41264
- "div",
41265
- {
41266
- className: cn(
41267
- "flex items-center gap-3 py-1",
41268
- className
41269
- ),
41270
- style: FONT_STYLE2,
41271
- children: [
41272
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(Avatar, { className: "h-8 w-8 shrink-0", children: [
41273
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
41274
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(AvatarFallback, { className: "bg-interactive/10 text-interactive text-xs font-bold", children: agent.display_name.charAt(0) })
41275
- ] }),
41276
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex-1 min-w-0", children: [
41277
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-center gap-2", children: [
41278
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
41279
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
41280
- "span",
41281
- {
41282
- className: cn(
41283
- "inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full font-medium",
41284
- agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
41285
- ),
41286
- children: [
41287
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: cn(
41288
- "w-1.5 h-1.5 rounded-full",
41289
- agent.enabled ? "bg-emerald-500" : "bg-red-500"
41290
- ) }),
41291
- agent.enabled ? "Active" : "Disabled"
41292
- ]
41293
- }
41294
- )
41295
- ] }),
41296
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-[var(--foreground)]/50 text-xs truncate", children: agent.description })
41297
- ] })
41298
- ]
41299
- }
41300
- );
41301
- }
41302
- return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
41303
- "div",
41304
- {
41305
- className: cn(
41306
- "text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
41307
- className
41308
- ),
41309
- style: FONT_STYLE2,
41310
- children: [
41311
- /* @__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: [
41312
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-interactive/20", children: [
41313
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
41314
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(AvatarFallback, { className: "bg-interactive/10 text-interactive text-lg font-bold", children: agent.display_name.charAt(0) })
41315
- ] }),
41316
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex-1 min-w-0", children: [
41317
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "flex items-center gap-2", children: [
41318
- isEditing ? /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
41319
- "input",
41320
- {
41321
- type: "text",
41322
- value: editState.display_name,
41323
- onChange: (e) => setEditState((s) => ({ ...s, display_name: e.target.value })),
41324
- disabled: isSaving,
41325
- className: "flex-1 bg-transparent border-b border-interactive/30 text-sm font-semibold text-foreground outline-none focus:border-interactive transition-all",
41326
- placeholder: "Agent name"
41327
- }
41328
- ) : /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
41329
- /* @__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 }),
41330
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
41331
- "span",
41332
- {
41333
- className: cn(
41334
- "inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-medium",
41335
- agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
41336
- ),
41337
- children: [
41338
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: cn(
41339
- "w-1.5 h-1.5 rounded-full",
41340
- agent.enabled ? "bg-emerald-500" : "bg-red-500"
41341
- ) }),
41342
- agent.enabled ? "Active" : "Disabled"
41343
- ]
41344
- }
41345
- )
41346
- ] }),
41347
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "mt-1", children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
41348
- "textarea",
41349
- {
41350
- value: editState.description,
41351
- onChange: (e) => setEditState((s) => ({ ...s, description: e.target.value })),
41352
- disabled: isSaving,
41353
- 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]",
41354
- rows: 2,
41355
- placeholder: "Describe this agent..."
41356
- }
41357
- ) : /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-normal", children: agent.description }) }),
41358
- isEditing && /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("div", { className: "mt-2 flex items-center gap-2", children: [
41359
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold", children: "Avatar:" }),
41360
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
41361
- "input",
41362
- {
41363
- type: "text",
41364
- value: editState.image,
41365
- onChange: (e) => setEditState((s) => ({ ...s, image: e.target.value })),
41366
- disabled: isSaving,
41367
- 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",
41368
- placeholder: "URL"
41369
- }
41370
- )
41371
- ] })
41372
- ] }),
41373
- 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: [
41374
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
41375
- "button",
41376
- {
41377
- onClick: handleCancel,
41378
- disabled: isSaving,
41379
- 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",
41380
- children: "Cancel"
41381
- }
41382
- ),
41383
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
41384
- "button",
41385
- {
41386
- onClick: handleSave,
41387
- disabled: isSaving,
41388
- 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",
41389
- children: isSaving ? "Saving..." : "Save"
41390
- }
41391
- )
41392
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
41393
- "button",
41394
- {
41395
- onClick: handleEdit,
41396
- 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",
41397
- children: "Edit"
41398
- }
41399
- ) })
41400
- ] }),
41401
- /* @__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: [
41402
- "Model:",
41403
- " ",
41404
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "font-mono text-[var(--foreground)]/70", children: agent.model })
41405
- ] }) }),
41406
- 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: [
41407
- /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-2", children: [
41408
- "Tools (",
41409
- agent.tools.length,
41410
- ")"
41411
- ] }),
41412
- /* @__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)(
41413
- "span",
41414
- {
41415
- className: "text-[11px] px-2 py-0.5 rounded-md bg-interactive/10 text-interactive font-mono border border-interactive/20",
41416
- children: tool
41417
- },
41418
- tool
41419
- )) })
41420
- ] })
41421
- ]
41422
- }
41423
- );
41424
- };
41425
-
41426
- // src/molecules/workstream-builder/AgentDataTable/AgentDataTable.tsx
41427
- var import_jsx_runtime152 = require("react/jsx-runtime");
41428
- var FONT_STYLE3 = {
41429
- fontFamily: "Inter, system-ui, sans-serif"
41430
- };
41431
- var AgentDataTable = ({
41432
- headers,
41433
- rows,
41434
- className
41435
- }) => {
41436
- const renderCell = (value) => {
41437
- if (typeof value === "boolean") {
41438
- return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
41439
- "span",
41440
- {
41441
- className: cn(
41442
- "inline-flex items-center gap-1.5 text-[11px] font-medium px-2 py-0.5 rounded-full",
41443
- value ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
41444
- ),
41445
- children: [
41446
- 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: [
41447
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
41448
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
41449
- ] }),
41450
- value ? "Yes" : "No"
41451
- ]
41452
- }
41453
- );
41454
- }
41455
- return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { className: "text-[var(--foreground)]", children: String(value) });
41456
- };
41457
- return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
41458
- "div",
41459
- {
41460
- className: cn(
41461
- "text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
41462
- className
41463
- ),
41464
- style: FONT_STYLE3,
41465
- 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: [
41466
- /* @__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)(
41467
- "th",
41468
- {
41469
- className: "text-left px-4 py-2.5 text-[11px] font-semibold text-[var(--foreground)]/60 uppercase tracking-wide whitespace-nowrap",
41470
- children: header
41471
- },
41472
- header
41473
- )) }) }),
41474
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
41475
- "tr",
41476
- {
41477
- className: cn(
41478
- "border-b border-[var(--border-color)] last:border-b-0 hover:bg-[var(--foreground)]/[0.03] transition-colors",
41479
- rowIdx % 2 === 1 && "bg-[var(--foreground)]/[0.015]"
41480
- ),
41481
- children: row.map((cell, cellIdx) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
41482
- "td",
41483
- {
41484
- className: "px-4 py-2.5 text-xs whitespace-nowrap",
41485
- children: renderCell(cell)
41486
- },
41487
- cellIdx
41488
- ))
41489
- },
41490
- rowIdx
41491
- )) })
41492
- ] }) })
41493
- }
41494
- );
41495
- };
41496
-
41497
- // src/molecules/workstream-builder/WorkflowVisualizer/WorkflowVisualizer.tsx
41498
- var import_react78 = require("react");
41499
- var import_jsx_runtime153 = require("react/jsx-runtime");
41500
- var FONT_STYLE4 = {
41501
- fontFamily: "Inter, system-ui, sans-serif"
41502
- };
41503
- var WorkflowVisualizer = ({
41504
- steps,
41505
- className
41506
- }) => {
41507
- const [expandedStep, setExpandedStep] = (0, import_react78.useState)(
41508
- steps[0]?.id || null
41509
- );
41510
- return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
41511
- "div",
41512
- {
41513
- className: cn(
41514
- "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",
41515
- className
41516
- ),
41517
- style: FONT_STYLE4,
41518
- children: [
41519
- /* @__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: [
41520
- /* @__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)(
41521
- "svg",
41522
- {
41523
- width: "14",
41524
- height: "14",
41525
- viewBox: "0 0 24 24",
41526
- fill: "none",
41527
- stroke: "currentColor",
41528
- strokeWidth: "2",
41529
- className: "text-interactive",
41530
- strokeLinecap: "round",
41531
- strokeLinejoin: "round",
41532
- children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })
41533
- }
41534
- ) }),
41535
- /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Workflow" }),
41536
- /* @__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: [
41537
- steps.length,
41538
- " steps"
41539
- ] })
41540
- ] }),
41541
- /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "px-4 py-3", children: steps.map((step, idx) => {
41542
- const isLast = idx === steps.length - 1;
41543
- const isExpanded = expandedStep === step.id;
41544
- return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex gap-3", children: [
41545
- /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex flex-col items-center shrink-0", children: [
41546
- /* @__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 }) }),
41547
- !isLast && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "w-0.5 flex-1 min-h-[16px] bg-interactive/15" })
41548
- ] }),
41549
- /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
41550
- "div",
41551
- {
41552
- className: cn(
41553
- "flex-1 mb-3 rounded-lg border border-[var(--border-color)] transition-all",
41554
- isExpanded ? "bg-[var(--foreground)]/[0.02] shadow-sm" : "hover:bg-[var(--foreground)]/[0.02] hover:shadow-sm hover:-translate-y-0.5"
41555
- ),
41556
- children: [
41557
- /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
41558
- "button",
41559
- {
41560
- onClick: () => setExpandedStep(isExpanded ? null : step.id),
41561
- className: "w-full text-left px-3 py-2.5 flex items-center gap-2 whitespace-normal",
41562
- children: [
41563
- /* @__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 }) }),
41564
- /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
41565
- "svg",
41566
- {
41567
- width: "12",
41568
- height: "12",
41569
- viewBox: "0 0 24 24",
41570
- fill: "none",
41571
- stroke: "currentColor",
41572
- strokeWidth: "2",
41573
- className: cn(
41574
- "shrink-0 text-[var(--foreground)]/30 transition-transform",
41575
- isExpanded && "rotate-180"
41576
- ),
41577
- children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("polyline", { points: "6 9 12 15 18 9" })
41578
- }
41579
- )
41580
- ]
41581
- }
41582
- ),
41583
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "px-3 pb-3 space-y-2.5", children: [
41584
- step.description && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed whitespace-normal", children: step.description }),
41585
- 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)(
41586
- "div",
41587
- {
41588
- className: "flex items-start gap-2 text-xs",
41589
- children: [
41590
- /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "shrink-0 mt-0.5 w-1.5 h-1.5 rounded-full bg-interactive/40" }),
41591
- /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "text-[var(--foreground)]/60", children: sub.action })
41592
- ]
41593
- },
41594
- sub.id
41595
- )) }),
41596
- step.tools && step.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
41597
- /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold tracking-wider", children: "Tools:" }),
41598
- step.tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
41599
- "span",
41600
- {
41601
- className: "text-[10px] font-mono px-1.5 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
41602
- children: tool
41603
- },
41604
- tool
41605
- ))
41606
- ] }),
41607
- 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: [
41608
- /* @__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:" }),
41609
- /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
41610
- ] })
41611
- ] })
41612
- ]
41613
- }
41614
- )
41615
- ] }, step.id);
41616
- }) })
41617
- ]
41618
- }
41619
- );
41620
- };
41621
-
41622
- // src/molecules/workstream-builder/InstructionPreview/InstructionPreview.tsx
41623
- var import_react79 = require("react");
41624
- var import_jsx_runtime154 = require("react/jsx-runtime");
41625
- var FONT_STYLE5 = {
41626
- fontFamily: "Inter, system-ui, sans-serif"
41627
- };
41628
- var InstructionPreview = ({
41629
- agent_name,
41630
- description,
41631
- instruction,
41632
- workflow_summary,
41633
- tools,
41634
- className
41635
- }) => {
41636
- const [isExpanded, setIsExpanded] = (0, import_react79.useState)(false);
41637
- const [copied, setCopied] = (0, import_react79.useState)(false);
41638
- const previewLength = 300;
41639
- const isLong = instruction.length > previewLength;
41640
- const displayText = isExpanded || !isLong ? instruction : instruction.slice(0, previewLength) + "...";
41641
- const handleCopy = (0, import_react79.useCallback)(async () => {
41642
- try {
41643
- await navigator.clipboard.writeText(instruction);
41644
- setCopied(true);
41645
- setTimeout(() => setCopied(false), 2e3);
41646
- } catch {
41647
- const textarea = document.createElement("textarea");
41648
- textarea.value = instruction;
41649
- textarea.style.position = "fixed";
41650
- textarea.style.opacity = "0";
41651
- document.body.appendChild(textarea);
41652
- textarea.select();
41653
- document.execCommand("copy");
41654
- document.body.removeChild(textarea);
41655
- setCopied(true);
41656
- setTimeout(() => setCopied(false), 2e3);
41657
- }
41658
- }, [instruction]);
41659
- return /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
41660
- "div",
41661
- {
41662
- className: cn(
41663
- "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",
41664
- className
41665
- ),
41666
- style: FONT_STYLE5,
41667
- children: [
41668
- /* @__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: [
41669
- /* @__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)(
41670
- "svg",
41671
- {
41672
- width: "14",
41673
- height: "14",
41674
- viewBox: "0 0 24 24",
41675
- fill: "none",
41676
- stroke: "currentColor",
41677
- strokeWidth: "2",
41678
- className: "text-interactive",
41679
- strokeLinecap: "round",
41680
- strokeLinejoin: "round",
41681
- children: [
41682
- /* @__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" }),
41683
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("polyline", { points: "14 2 14 8 20 8" }),
41684
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
41685
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
41686
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("polyline", { points: "10 9 9 9 8 9" })
41687
- ]
41688
- }
41689
- ) }),
41690
- /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { className: "flex-1 min-w-0", children: [
41691
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: agent_name }),
41692
- description && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5 whitespace-normal", children: description })
41693
- ] })
41694
- ] }) }),
41695
- /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { className: "px-4 py-3 space-y-3", children: [
41696
- /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { children: [
41697
- /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { className: "flex items-center justify-between mb-1.5", children: [
41698
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider", children: "Instruction" }),
41699
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
41700
- "button",
41701
- {
41702
- onClick: handleCopy,
41703
- className: "text-[10px] px-2 py-0.5 rounded-md text-interactive hover:bg-interactive/10 transition-colors font-medium",
41704
- children: copied ? "Copied!" : "Copy"
41705
- }
41706
- )
41707
- ] }),
41708
- /* @__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 }),
41709
- isLong && /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
41710
- "button",
41711
- {
41712
- onClick: () => setIsExpanded(!isExpanded),
41713
- className: "inline-flex items-center gap-1 text-[11px] text-interactive hover:underline mt-1",
41714
- children: [
41715
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
41716
- "svg",
41717
- {
41718
- width: "12",
41719
- height: "12",
41720
- viewBox: "0 0 24 24",
41721
- fill: "none",
41722
- stroke: "currentColor",
41723
- strokeWidth: "2",
41724
- className: cn("transition-transform", isExpanded && "rotate-180"),
41725
- children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("polyline", { points: "6 9 12 15 18 9" })
41726
- }
41727
- ),
41728
- isExpanded ? "Show less" : "Show full instruction"
41729
- ]
41730
- }
41731
- )
41732
- ] }),
41733
- workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { children: [
41734
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Workflow" }),
41735
- /* @__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: [
41736
- /* @__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 }),
41737
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("span", { className: "text-[var(--foreground)]/50 mt-0.5", children: step })
41738
- ] }, idx)) })
41739
- ] }),
41740
- tools && tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { children: [
41741
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Tools" }),
41742
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("div", { className: "flex flex-wrap gap-1.5", children: tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
41743
- "span",
41744
- {
41745
- className: "text-[10px] font-mono px-2 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
41746
- children: tool
41747
- },
41748
- tool
41749
- )) })
41750
- ] })
41751
- ] })
41752
- ]
41753
- }
41754
- );
41755
- };
41756
-
41757
- // src/molecules/workstream-builder/UIComponentSelector/UIComponentSelector.tsx
41758
- var import_react80 = require("react");
41759
- var import_jsx_runtime155 = require("react/jsx-runtime");
41760
- var FONT_STYLE6 = {
41761
- fontFamily: "Inter, system-ui, sans-serif"
41762
- };
41763
- function UIComponentSelector({
41764
- components,
41765
- onSelect,
41766
- onPreview,
41767
- className,
41768
- isLatestMessage = true
41769
- }) {
41770
- const [selected, setSelected] = (0, import_react80.useState)(() => {
41771
- const recommended = components.filter((c) => c.recommended).map((c) => c.name);
41772
- return new Set(recommended);
41773
- });
41774
- const [submitted, setSubmitted] = (0, import_react80.useState)(false);
41775
- const grouped = components.reduce(
41776
- (acc, comp) => {
41777
- const cat = comp.category || "Other";
41778
- if (!acc[cat]) acc[cat] = [];
41779
- acc[cat].push(comp);
41780
- return acc;
41781
- },
41782
- {}
41783
- );
41784
- const toggle = (name) => {
41785
- if (submitted || !isLatestMessage) return;
41786
- setSelected((prev) => {
41787
- const next = new Set(prev);
41788
- if (next.has(name)) next.delete(name);
41789
- else next.add(name);
41790
- return next;
41791
- });
41792
- };
41793
- const handleContinue = () => {
41794
- setSubmitted(true);
41795
- onSelect?.(Array.from(selected));
41796
- };
41797
- const categoryOrder = Object.keys(grouped).sort();
41798
- return /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(
41799
- "div",
41800
- {
41801
- className: cn(
41802
- "my-3 rounded-xl border border-border bg-card overflow-hidden shadow-sm",
41803
- className
41804
- ),
41805
- style: FONT_STYLE6,
41806
- children: [
41807
- /* @__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: [
41808
- /* @__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)(
41809
- "svg",
41810
- {
41811
- width: "12",
41812
- height: "12",
41813
- viewBox: "0 0 24 24",
41814
- fill: "none",
41815
- stroke: "currentColor",
41816
- strokeWidth: "2",
41817
- className: "text-interactive",
41818
- children: [
41819
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("rect", { x: "3", y: "3", width: "7", height: "7" }),
41820
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("rect", { x: "14", y: "3", width: "7", height: "7" }),
41821
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("rect", { x: "3", y: "14", width: "7", height: "7" }),
41822
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("rect", { x: "14", y: "14", width: "7", height: "7" })
41823
- ]
41824
- }
41825
- ) }),
41826
- /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { children: [
41827
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("h3", { className: "text-xs font-semibold text-foreground", children: "Select UI Components" }),
41828
- /* @__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." })
41829
- ] })
41830
- ] }) }),
41831
- /* @__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: [
41832
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("h4", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-2", children: category }),
41833
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(
41834
- "label",
41835
- {
41836
- className: cn(
41837
- "flex items-start gap-3 px-3 py-2 rounded-lg cursor-pointer transition-all",
41838
- submitted || !isLatestMessage ? "cursor-default opacity-60" : "hover:bg-muted/80",
41839
- selected.has(comp.name) && !submitted && "bg-interactive/5 border border-interactive/20",
41840
- selected.has(comp.name) && submitted && "bg-interactive/5"
41841
- ),
41842
- children: [
41843
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
41844
- "div",
41845
- {
41846
- className: cn(
41847
- "mt-0.5 w-4 h-4 rounded border flex items-center justify-center shrink-0 transition-colors",
41848
- selected.has(comp.name) ? "bg-interactive border-interactive" : "border-muted-foreground/30"
41849
- ),
41850
- onClick: (e) => {
41851
- e.preventDefault();
41852
- toggle(comp.name);
41853
- },
41854
- children: selected.has(comp.name) && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
41855
- "svg",
41856
- {
41857
- width: "10",
41858
- height: "10",
41859
- viewBox: "0 0 24 24",
41860
- fill: "none",
41861
- stroke: "white",
41862
- strokeWidth: "3",
41863
- children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("polyline", { points: "20 6 9 17 4 12" })
41864
- }
41865
- )
41866
- }
41867
- ),
41868
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
41869
- "input",
41870
- {
41871
- type: "checkbox",
41872
- checked: selected.has(comp.name),
41873
- onChange: () => toggle(comp.name),
41874
- disabled: submitted || !isLatestMessage,
41875
- className: "sr-only"
41876
- }
41877
- ),
41878
- /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { className: "flex-1 min-w-0", children: [
41879
- /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { className: "flex items-center gap-1", children: [
41880
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("span", { className: "text-sm font-medium text-foreground", children: comp.display_name }),
41881
- 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" }),
41882
- onPreview && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
41883
- "button",
41884
- {
41885
- type: "button",
41886
- onClick: (e) => {
41887
- e.preventDefault();
41888
- e.stopPropagation();
41889
- onPreview(comp.name);
41890
- },
41891
- className: "shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
41892
- title: `Preview ${comp.display_name}`,
41893
- children: /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(
41894
- "svg",
41895
- {
41896
- width: "14",
41897
- height: "14",
41898
- viewBox: "0 0 24 24",
41899
- fill: "none",
41900
- stroke: "currentColor",
41901
- strokeWidth: "2",
41902
- strokeLinecap: "round",
41903
- strokeLinejoin: "round",
41904
- className: "text-muted-foreground hover:text-interactive",
41905
- children: [
41906
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
41907
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
41908
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
41909
- ]
41910
- }
41911
- )
41912
- }
41913
- )
41914
- ] }),
41915
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("span", { className: "ml-0 text-xs text-muted-foreground", children: comp.description })
41916
- ] })
41917
- ]
41918
- },
41919
- comp.name
41920
- )) })
41921
- ] }, category)) }),
41922
- !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: [
41923
- /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
41924
- selected.size,
41925
- " selected"
41926
- ] }),
41927
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
41928
- "button",
41929
- {
41930
- onClick: handleContinue,
41931
- className: "px-4 py-1.5 text-sm font-medium rounded-lg bg-interactive text-white hover:bg-interactive/90 transition-colors",
41932
- children: "Continue"
41933
- }
41934
- )
41935
- ] }),
41936
- 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" }) })
41937
- ]
41938
- }
41939
- );
41940
- }
41941
-
41942
- // src/molecules/workstream-builder/MultiAgentCard/MultiAgentCard.tsx
41943
- var import_jsx_runtime156 = require("react/jsx-runtime");
41944
- var FONT_STYLE7 = {
41945
- fontFamily: "Inter, system-ui, sans-serif"
41946
- };
41947
- var MultiAgentCard = ({
41948
- name,
41949
- display_name,
41950
- description,
41951
- stages = [],
41952
- enabled = true,
41953
- className
41954
- }) => {
41955
- const avatarUrl = `https://api.dicebear.com/7.x/avataaars/svg?seed=${name}`;
41956
- return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
41957
- "div",
41958
- {
41959
- className: cn(
41960
- "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",
41961
- className
41962
- ),
41963
- style: FONT_STYLE7,
41964
- children: [
41965
- /* @__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: [
41966
- /* @__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" }) }),
41967
- /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex-1 min-w-0", children: [
41968
- /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex items-center gap-2", children: [
41969
- /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
41970
- /* @__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 }),
41971
- /* @__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" }),
41972
- /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
41973
- "span",
41974
- {
41975
- className: cn(
41976
- "inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-medium",
41977
- enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
41978
- ),
41979
- children: [
41980
- /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: cn(
41981
- "w-1.5 h-1.5 rounded-full",
41982
- enabled ? "bg-emerald-500" : "bg-red-500"
41983
- ) }),
41984
- enabled ? "Active" : "Disabled"
41985
- ]
41986
- }
41987
- )
41988
- ] }),
41989
- /* @__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 })
41990
- ] })
41991
- ] }),
41992
- stages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "border-t border-[var(--border-color)] px-5 py-4", children: [
41993
- /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-3", children: [
41994
- "Stages (",
41995
- stages.length,
41996
- ")"
41997
- ] }),
41998
- /* @__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: [
41999
- /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex flex-col items-center mr-3 w-5", children: [
42000
- /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
42001
- "div",
42002
- {
42003
- className: cn(
42004
- "w-5 h-5 rounded-full flex items-center justify-center text-[10px] font-bold shrink-0",
42005
- "bg-interactive/10 text-interactive border border-interactive/30"
42006
- ),
42007
- children: idx + 1
42008
- }
42009
- ),
42010
- 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" })
42011
- ] }),
42012
- /* @__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: [
42013
- /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex items-center gap-2", children: [
42014
- /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
42015
- /* @__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 })
42016
- ] }),
42017
- /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
42018
- stage.tools && stage.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("span", { children: [
42019
- stage.tools.length,
42020
- " tool",
42021
- stage.tools.length !== 1 ? "s" : ""
42022
- ] }),
42023
- stage.ui_components && stage.ui_components.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("span", { children: [
42024
- stage.ui_components.length,
42025
- " component",
42026
- stage.ui_components.length !== 1 ? "s" : ""
42027
- ] })
42028
- ] })
42029
- ] })
42030
- ] }, stage.agent_name || idx)) })
42031
- ] })
42032
- ]
42033
- }
42034
- );
42035
- };
42036
-
42037
- // src/molecules/workstream-builder/MultiAgentPlan/MultiAgentPlan.tsx
42038
- var import_jsx_runtime157 = require("react/jsx-runtime");
42039
- var FONT_STYLE8 = {
42040
- fontFamily: "Inter, system-ui, sans-serif"
42041
- };
42042
- var MultiAgentPlan = ({
42043
- stages = [],
42044
- className
42045
- }) => {
42046
- return /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(
42047
- "div",
42048
- {
42049
- className: cn(
42050
- "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",
42051
- className
42052
- ),
42053
- style: FONT_STYLE8,
42054
- children: [
42055
- /* @__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: [
42056
- /* @__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)(
42057
- "svg",
42058
- {
42059
- width: "10",
42060
- height: "10",
42061
- viewBox: "0 0 24 24",
42062
- fill: "none",
42063
- stroke: "currentColor",
42064
- strokeWidth: "2",
42065
- className: "text-violet-600",
42066
- children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("path", { d: "M16 3h5v5M4 20L21 3M21 16v5h-5M15 15l6 6M4 4l5 5" })
42067
- }
42068
- ) }),
42069
- /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "Proposed Multi-Agent Workflow" }),
42070
- /* @__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" })
42071
- ] }) }),
42072
- /* @__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: [
42073
- /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("div", { className: "flex flex-col items-center mr-3 w-6", children: [
42074
- /* @__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 }),
42075
- 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" })
42076
- ] }),
42077
- /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
42078
- /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
42079
- stage.description && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
42080
- "p",
42081
- {
42082
- className: "text-[11px] text-foreground/50 mt-0.5 whitespace-normal",
42083
- style: { textWrap: "auto" },
42084
- children: stage.description
42085
- }
42086
- ),
42087
- 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)(
42088
- "span",
42089
- {
42090
- className: "text-[10px] px-1.5 py-0.5 rounded bg-interactive/10 text-interactive font-mono",
42091
- children: tool
42092
- },
42093
- tool
42094
- )) })
42095
- ] })
42096
- ] }, stage.name || idx)) }) })
42097
- ]
42098
- }
42099
- );
42100
- };
42101
-
42102
- // src/molecules/workstream-builder/MultiAgentUISelector/MultiAgentUISelector.tsx
42103
- var import_react81 = require("react");
42104
- var import_jsx_runtime158 = require("react/jsx-runtime");
42105
- var FONT_STYLE9 = {
42106
- fontFamily: "Inter, system-ui, sans-serif"
42107
- };
42108
- var MultiAgentUISelector = ({
42109
- stages = [],
42110
- components = [],
42111
- onSelect,
42112
- onPreview,
42113
- className,
42114
- isLatestMessage = true
42115
- }) => {
42116
- const [activeStageId, setActiveStageId] = (0, import_react81.useState)(stages[0]?.id || "");
42117
- const [selections, setSelections] = (0, import_react81.useState)(
42118
- () => {
42119
- const init = {};
42120
- const recommendedNames = components.filter((c) => c.recommended).map((c) => c.name);
42121
- for (const stage of stages) {
42122
- const stageRecs = stage.recommended_components?.length ? stage.recommended_components : recommendedNames;
42123
- init[stage.id] = new Set(stageRecs);
42124
- }
42125
- return init;
42126
- }
42127
- );
42128
- const [submitted, setSubmitted] = (0, import_react81.useState)(false);
42129
- const grouped = components.reduce((acc, comp) => {
42130
- const cat = comp.category || "Other";
42131
- if (!acc[cat]) acc[cat] = [];
42132
- acc[cat].push(comp);
42133
- return acc;
42134
- }, {});
42135
- const toggleComponent = (0, import_react81.useCallback)(
42136
- (stageId, compName) => {
42137
- if (submitted || !isLatestMessage) return;
42138
- setSelections((prev) => {
42139
- const updated = { ...prev };
42140
- const set = new Set(updated[stageId] || []);
42141
- if (set.has(compName)) {
42142
- set.delete(compName);
42143
- } else {
42144
- set.add(compName);
42145
- }
42146
- updated[stageId] = set;
42147
- return updated;
42148
- });
42149
- },
42150
- [submitted]
42151
- );
42152
- const selectAll = (0, import_react81.useCallback)(
42153
- (stageId) => {
42154
- if (submitted || !isLatestMessage) return;
42155
- setSelections((prev) => {
42156
- const updated = { ...prev };
42157
- updated[stageId] = new Set(components.map((c) => c.name));
42158
- return updated;
42159
- });
42160
- },
42161
- [submitted, isLatestMessage, components]
42162
- );
42163
- const clearAll = (0, import_react81.useCallback)(
42164
- (stageId) => {
42165
- if (submitted || !isLatestMessage) return;
42166
- setSelections((prev) => {
42167
- const updated = { ...prev };
42168
- updated[stageId] = /* @__PURE__ */ new Set();
42169
- return updated;
42170
- });
42171
- },
42172
- [submitted, isLatestMessage]
42173
- );
42174
- const handleContinue = (0, import_react81.useCallback)(() => {
42175
- setSubmitted(true);
42176
- if (onSelect) {
42177
- const result = {};
42178
- for (const [stageId, set] of Object.entries(selections)) {
42179
- result[stageId] = Array.from(set);
42180
- }
42181
- onSelect(result);
42182
- }
42183
- }, [onSelect, selections]);
42184
- const activeStage = stages.find((s) => s.id === activeStageId);
42185
- return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
42186
- "div",
42187
- {
42188
- className: cn(
42189
- "my-3 rounded-xl border border-border bg-card overflow-hidden shadow-sm",
42190
- className
42191
- ),
42192
- style: FONT_STYLE9,
42193
- children: [
42194
- /* @__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: [
42195
- /* @__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)(
42196
- "svg",
42197
- {
42198
- width: "12",
42199
- height: "12",
42200
- viewBox: "0 0 24 24",
42201
- fill: "none",
42202
- stroke: "currentColor",
42203
- strokeWidth: "2",
42204
- className: "text-interactive",
42205
- children: [
42206
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("rect", { x: "3", y: "3", width: "7", height: "7" }),
42207
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("rect", { x: "14", y: "3", width: "7", height: "7" }),
42208
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("rect", { x: "3", y: "14", width: "7", height: "7" }),
42209
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("rect", { x: "14", y: "14", width: "7", height: "7" })
42210
- ]
42211
- }
42212
- ) }),
42213
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: "text-xs font-semibold text-foreground", children: "UI Components per Stage" })
42214
- ] }) }),
42215
- /* @__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)(
42216
- "button",
42217
- {
42218
- onClick: () => setActiveStageId(stage.id),
42219
- className: cn(
42220
- "px-3 py-1.5 text-[11px] font-medium rounded-full transition-colors",
42221
- activeStageId === stage.id ? "bg-interactive text-white" : "text-muted-foreground hover:text-foreground hover:bg-muted"
42222
- ),
42223
- children: stage.name
42224
- },
42225
- stage.id
42226
- )) }),
42227
- /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "px-4 py-3", children: [
42228
- activeStage && /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
42229
- /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("p", { className: "text-[10px] text-muted-foreground", children: [
42230
- "Select components for ",
42231
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("strong", { className: "text-foreground", children: activeStage.name }),
42232
- " (",
42233
- activeStage.agent_name,
42234
- ")"
42235
- ] }),
42236
- !submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "flex items-center gap-2", children: [
42237
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
42238
- "button",
42239
- {
42240
- onClick: () => selectAll(activeStageId),
42241
- className: "text-[10px] text-interactive hover:underline font-medium",
42242
- children: "Select All"
42243
- }
42244
- ),
42245
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: "text-muted-foreground/40", children: "|" }),
42246
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
42247
- "button",
42248
- {
42249
- onClick: () => clearAll(activeStageId),
42250
- className: "text-[10px] text-muted-foreground hover:text-foreground font-medium",
42251
- children: "Clear"
42252
- }
42253
- )
42254
- ] })
42255
- ] }),
42256
- Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "mb-3", children: [
42257
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("p", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wide mb-1.5", children: category }),
42258
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "grid grid-cols-2 gap-1.5", children: comps.map((comp) => {
42259
- const isSelected = selections[activeStageId]?.has(comp.name) || false;
42260
- return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
42261
- "div",
42262
- {
42263
- role: "button",
42264
- tabIndex: 0,
42265
- onClick: () => toggleComponent(activeStageId, comp.name),
42266
- onKeyDown: (e) => {
42267
- if (e.key === "Enter" || e.key === " ") {
42268
- e.preventDefault();
42269
- toggleComponent(activeStageId, comp.name);
42270
- }
42271
- },
42272
- className: cn(
42273
- "text-left p-2.5 rounded-lg border text-[11px] transition-all overflow-hidden cursor-pointer",
42274
- isSelected ? "border-interactive bg-interactive/5" : "border-border hover:border-interactive/50",
42275
- (submitted || !isLatestMessage) && "opacity-60 cursor-default"
42276
- ),
42277
- children: [
42278
- /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "flex items-center gap-1.5", children: [
42279
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
42280
- "div",
42281
- {
42282
- className: cn(
42283
- "w-3.5 h-3.5 rounded border flex items-center justify-center shrink-0",
42284
- isSelected ? "bg-interactive border-interactive" : "border-muted-foreground/30"
42285
- ),
42286
- children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
42287
- "svg",
42288
- {
42289
- width: "8",
42290
- height: "8",
42291
- viewBox: "0 0 24 24",
42292
- fill: "none",
42293
- stroke: "white",
42294
- strokeWidth: "3",
42295
- children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("polyline", { points: "20 6 9 17 4 12" })
42296
- }
42297
- )
42298
- }
42299
- ),
42300
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: "font-medium text-foreground", children: comp.display_name }),
42301
- 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" }),
42302
- onPreview && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
42303
- "button",
42304
- {
42305
- type: "button",
42306
- onClick: (e) => {
42307
- e.stopPropagation();
42308
- onPreview(comp.name);
42309
- },
42310
- className: "ml-auto shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
42311
- title: `Preview ${comp.display_name}`,
42312
- children: /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
42313
- "svg",
42314
- {
42315
- width: "14",
42316
- height: "14",
42317
- viewBox: "0 0 24 24",
42318
- fill: "none",
42319
- stroke: "currentColor",
42320
- strokeWidth: "2",
42321
- strokeLinecap: "round",
42322
- strokeLinejoin: "round",
42323
- className: "text-muted-foreground hover:text-primary",
42324
- children: [
42325
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
42326
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
42327
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
42328
- ]
42329
- }
42330
- )
42331
- }
42332
- )
42333
- ] }),
42334
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("p", { className: "text-[10px] text-muted-foreground mt-0.5 ml-5 whitespace-normal", children: comp.description })
42335
- ]
42336
- },
42337
- comp.name
42338
- );
42339
- }) })
42340
- ] }, category))
42341
- ] }),
42342
- !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)(
42343
- "button",
42344
- {
42345
- onClick: handleContinue,
42346
- className: "w-full py-2 rounded-lg bg-interactive text-white text-xs font-medium hover:opacity-90 transition-opacity",
42347
- children: "Continue"
42348
- }
42349
- ) }),
42350
- 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" }) })
42351
- ]
42352
- }
42353
- );
42354
- };
42355
-
42356
- // src/molecules/workstream-builder/StageIndicator/StageIndicator.tsx
42357
- var import_jsx_runtime159 = require("react/jsx-runtime");
42358
- var FONT_STYLE10 = {
42359
- fontFamily: "Inter, system-ui, sans-serif"
42360
- };
42361
- var StageIndicator = ({
42362
- stage_name,
42363
- agent_name,
42364
- className
42365
- }) => {
42366
- return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
42367
- "div",
42368
- {
42369
- className: cn(
42370
- "flex items-center gap-3 my-4",
42371
- className
42372
- ),
42373
- style: { ...FONT_STYLE10, animation: "fadeIn 0.3s ease-out" },
42374
- children: [
42375
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
42376
- /* @__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: [
42377
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "w-1.5 h-1.5 rounded-full bg-violet-500 animate-pulse" }),
42378
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("span", { className: "text-[10px] font-medium text-violet-600", children: stage_name || agent_name })
42379
- ] }),
42380
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "flex-1 h-px bg-[var(--border-color)]" })
42381
- ]
42382
- }
42383
- );
42384
- };
42385
-
42386
41065
  // src/components/ui/index.ts
42387
41066
  var ui_exports = {};
42388
41067
  __export(ui_exports, {
@@ -42675,7 +41354,7 @@ __export(ui_exports, {
42675
41354
  // src/components/ui/button-group.tsx
42676
41355
  var import_react_slot4 = require("@radix-ui/react-slot");
42677
41356
  var import_class_variance_authority8 = require("class-variance-authority");
42678
- var import_jsx_runtime160 = require("react/jsx-runtime");
41357
+ var import_jsx_runtime150 = require("react/jsx-runtime");
42679
41358
  var buttonGroupVariants = (0, import_class_variance_authority8.cva)(
42680
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",
42681
41360
  {
@@ -42695,7 +41374,7 @@ function ButtonGroup({
42695
41374
  orientation,
42696
41375
  ...props
42697
41376
  }) {
42698
- return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
41377
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
42699
41378
  "div",
42700
41379
  {
42701
41380
  role: "group",
@@ -42712,7 +41391,7 @@ function ButtonGroupText({
42712
41391
  ...props
42713
41392
  }) {
42714
41393
  const Comp = asChild ? import_react_slot4.Slot : "div";
42715
- return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
41394
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
42716
41395
  Comp,
42717
41396
  {
42718
41397
  className: cn(
@@ -42728,7 +41407,7 @@ function ButtonGroupSeparator({
42728
41407
  orientation = "vertical",
42729
41408
  ...props
42730
41409
  }) {
42731
- return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
41410
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
42732
41411
  Separator2,
42733
41412
  {
42734
41413
  "data-slot": "button-group-separator",
@@ -42744,9 +41423,9 @@ function ButtonGroupSeparator({
42744
41423
 
42745
41424
  // src/components/ui/empty.tsx
42746
41425
  var import_class_variance_authority9 = require("class-variance-authority");
42747
- var import_jsx_runtime161 = require("react/jsx-runtime");
41426
+ var import_jsx_runtime151 = require("react/jsx-runtime");
42748
41427
  function Empty({ className, ...props }) {
42749
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41428
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42750
41429
  "div",
42751
41430
  {
42752
41431
  "data-slot": "empty",
@@ -42759,7 +41438,7 @@ function Empty({ className, ...props }) {
42759
41438
  );
42760
41439
  }
42761
41440
  function EmptyHeader({ className, ...props }) {
42762
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41441
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42763
41442
  "div",
42764
41443
  {
42765
41444
  "data-slot": "empty-header",
@@ -42790,7 +41469,7 @@ function EmptyMedia({
42790
41469
  variant = "default",
42791
41470
  ...props
42792
41471
  }) {
42793
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41472
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42794
41473
  "div",
42795
41474
  {
42796
41475
  "data-slot": "empty-icon",
@@ -42801,7 +41480,7 @@ function EmptyMedia({
42801
41480
  );
42802
41481
  }
42803
41482
  function EmptyTitle({ className, ...props }) {
42804
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41483
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42805
41484
  "div",
42806
41485
  {
42807
41486
  "data-slot": "empty-title",
@@ -42811,7 +41490,7 @@ function EmptyTitle({ className, ...props }) {
42811
41490
  );
42812
41491
  }
42813
41492
  function EmptyDescription({ className, ...props }) {
42814
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41493
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42815
41494
  "div",
42816
41495
  {
42817
41496
  "data-slot": "empty-description",
@@ -42824,7 +41503,7 @@ function EmptyDescription({ className, ...props }) {
42824
41503
  );
42825
41504
  }
42826
41505
  function EmptyContent({ className, ...props }) {
42827
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41506
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42828
41507
  "div",
42829
41508
  {
42830
41509
  "data-slot": "empty-content",
@@ -42838,11 +41517,11 @@ function EmptyContent({ className, ...props }) {
42838
41517
  }
42839
41518
 
42840
41519
  // src/components/ui/field.tsx
42841
- var import_react82 = require("react");
41520
+ var import_react77 = require("react");
42842
41521
  var import_class_variance_authority10 = require("class-variance-authority");
42843
- var import_jsx_runtime162 = require("react/jsx-runtime");
41522
+ var import_jsx_runtime152 = require("react/jsx-runtime");
42844
41523
  function FieldSet({ className, ...props }) {
42845
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41524
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42846
41525
  "fieldset",
42847
41526
  {
42848
41527
  "data-slot": "field-set",
@@ -42860,7 +41539,7 @@ function FieldLegend({
42860
41539
  variant = "legend",
42861
41540
  ...props
42862
41541
  }) {
42863
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41542
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42864
41543
  "legend",
42865
41544
  {
42866
41545
  "data-slot": "field-legend",
@@ -42876,7 +41555,7 @@ function FieldLegend({
42876
41555
  );
42877
41556
  }
42878
41557
  function FieldGroup({ className, ...props }) {
42879
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41558
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42880
41559
  "div",
42881
41560
  {
42882
41561
  "data-slot": "field-group",
@@ -42916,7 +41595,7 @@ function Field({
42916
41595
  orientation = "vertical",
42917
41596
  ...props
42918
41597
  }) {
42919
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41598
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42920
41599
  "div",
42921
41600
  {
42922
41601
  role: "group",
@@ -42928,7 +41607,7 @@ function Field({
42928
41607
  );
42929
41608
  }
42930
41609
  function FieldContent({ className, ...props }) {
42931
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41610
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42932
41611
  "div",
42933
41612
  {
42934
41613
  "data-slot": "field-content",
@@ -42944,7 +41623,7 @@ function FieldLabel({
42944
41623
  className,
42945
41624
  ...props
42946
41625
  }) {
42947
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41626
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42948
41627
  Label,
42949
41628
  {
42950
41629
  "data-slot": "field-label",
@@ -42959,7 +41638,7 @@ function FieldLabel({
42959
41638
  );
42960
41639
  }
42961
41640
  function FieldTitle({ className, ...props }) {
42962
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41641
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42963
41642
  "div",
42964
41643
  {
42965
41644
  "data-slot": "field-label",
@@ -42972,7 +41651,7 @@ function FieldTitle({ className, ...props }) {
42972
41651
  );
42973
41652
  }
42974
41653
  function FieldDescription({ className, ...props }) {
42975
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41654
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42976
41655
  "p",
42977
41656
  {
42978
41657
  "data-slot": "field-description",
@@ -42991,7 +41670,7 @@ function FieldSeparator({
42991
41670
  className,
42992
41671
  ...props
42993
41672
  }) {
42994
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(
41673
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
42995
41674
  "div",
42996
41675
  {
42997
41676
  "data-slot": "field-separator",
@@ -43002,8 +41681,8 @@ function FieldSeparator({
43002
41681
  ),
43003
41682
  ...props,
43004
41683
  children: [
43005
- /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
43006
- children && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41684
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
41685
+ children && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
43007
41686
  "span",
43008
41687
  {
43009
41688
  className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
@@ -43021,7 +41700,7 @@ function FieldError({
43021
41700
  errors,
43022
41701
  ...props
43023
41702
  }) {
43024
- const content = (0, import_react82.useMemo)(() => {
41703
+ const content = (0, import_react77.useMemo)(() => {
43025
41704
  if (children) {
43026
41705
  return children;
43027
41706
  }
@@ -43031,14 +41710,14 @@ function FieldError({
43031
41710
  if (errors?.length === 1 && errors[0]?.message) {
43032
41711
  return errors[0].message;
43033
41712
  }
43034
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
43035
- (error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("li", { children: error.message }, index)
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)
43036
41715
  ) });
43037
41716
  }, [children, errors]);
43038
41717
  if (!content) {
43039
41718
  return null;
43040
41719
  }
43041
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41720
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
43042
41721
  "div",
43043
41722
  {
43044
41723
  role: "alert",
@@ -43052,9 +41731,9 @@ function FieldError({
43052
41731
 
43053
41732
  // src/components/ui/input-group.tsx
43054
41733
  var import_class_variance_authority11 = require("class-variance-authority");
43055
- var import_jsx_runtime163 = require("react/jsx-runtime");
41734
+ var import_jsx_runtime153 = require("react/jsx-runtime");
43056
41735
  function InputGroup({ className, ...props }) {
43057
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41736
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43058
41737
  "div",
43059
41738
  {
43060
41739
  "data-slot": "input-group",
@@ -43098,7 +41777,7 @@ function InputGroupAddon({
43098
41777
  align = "inline-start",
43099
41778
  ...props
43100
41779
  }) {
43101
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41780
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43102
41781
  "div",
43103
41782
  {
43104
41783
  role: "group",
@@ -43138,7 +41817,7 @@ function InputGroupButton({
43138
41817
  size = "xs",
43139
41818
  ...props
43140
41819
  }) {
43141
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41820
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43142
41821
  Button,
43143
41822
  {
43144
41823
  type,
@@ -43150,7 +41829,7 @@ function InputGroupButton({
43150
41829
  );
43151
41830
  }
43152
41831
  function InputGroupText({ className, ...props }) {
43153
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41832
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43154
41833
  "span",
43155
41834
  {
43156
41835
  className: cn(
@@ -43165,7 +41844,7 @@ function InputGroupInput({
43165
41844
  className,
43166
41845
  ...props
43167
41846
  }) {
43168
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41847
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43169
41848
  Input,
43170
41849
  {
43171
41850
  "data-slot": "input-group-control",
@@ -43181,7 +41860,7 @@ function InputGroupTextarea({
43181
41860
  className,
43182
41861
  ...props
43183
41862
  }) {
43184
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41863
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43185
41864
  Textarea,
43186
41865
  {
43187
41866
  "data-slot": "input-group-control",
@@ -43197,9 +41876,9 @@ function InputGroupTextarea({
43197
41876
  // src/components/ui/item.tsx
43198
41877
  var import_react_slot5 = require("@radix-ui/react-slot");
43199
41878
  var import_class_variance_authority12 = require("class-variance-authority");
43200
- var import_jsx_runtime164 = require("react/jsx-runtime");
41879
+ var import_jsx_runtime154 = require("react/jsx-runtime");
43201
41880
  function ItemGroup({ className, ...props }) {
43202
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41881
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43203
41882
  "div",
43204
41883
  {
43205
41884
  role: "list",
@@ -43213,7 +41892,7 @@ function ItemSeparator({
43213
41892
  className,
43214
41893
  ...props
43215
41894
  }) {
43216
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41895
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43217
41896
  Separator2,
43218
41897
  {
43219
41898
  "data-slot": "item-separator",
@@ -43251,7 +41930,7 @@ function Item8({
43251
41930
  ...props
43252
41931
  }) {
43253
41932
  const Comp = asChild ? import_react_slot5.Slot : "div";
43254
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41933
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43255
41934
  Comp,
43256
41935
  {
43257
41936
  "data-slot": "item",
@@ -43282,7 +41961,7 @@ function ItemMedia({
43282
41961
  variant = "default",
43283
41962
  ...props
43284
41963
  }) {
43285
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41964
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43286
41965
  "div",
43287
41966
  {
43288
41967
  "data-slot": "item-media",
@@ -43293,7 +41972,7 @@ function ItemMedia({
43293
41972
  );
43294
41973
  }
43295
41974
  function ItemContent({ className, ...props }) {
43296
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41975
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43297
41976
  "div",
43298
41977
  {
43299
41978
  "data-slot": "item-content",
@@ -43306,7 +41985,7 @@ function ItemContent({ className, ...props }) {
43306
41985
  );
43307
41986
  }
43308
41987
  function ItemTitle({ className, ...props }) {
43309
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41988
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43310
41989
  "div",
43311
41990
  {
43312
41991
  "data-slot": "item-title",
@@ -43319,7 +41998,7 @@ function ItemTitle({ className, ...props }) {
43319
41998
  );
43320
41999
  }
43321
42000
  function ItemDescription({ className, ...props }) {
43322
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
42001
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43323
42002
  "p",
43324
42003
  {
43325
42004
  "data-slot": "item-description",
@@ -43333,7 +42012,7 @@ function ItemDescription({ className, ...props }) {
43333
42012
  );
43334
42013
  }
43335
42014
  function ItemActions({ className, ...props }) {
43336
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
42015
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43337
42016
  "div",
43338
42017
  {
43339
42018
  "data-slot": "item-actions",
@@ -43343,7 +42022,7 @@ function ItemActions({ className, ...props }) {
43343
42022
  );
43344
42023
  }
43345
42024
  function ItemHeader({ className, ...props }) {
43346
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
42025
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43347
42026
  "div",
43348
42027
  {
43349
42028
  "data-slot": "item-header",
@@ -43356,7 +42035,7 @@ function ItemHeader({ className, ...props }) {
43356
42035
  );
43357
42036
  }
43358
42037
  function ItemFooter({ className, ...props }) {
43359
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
42038
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43360
42039
  "div",
43361
42040
  {
43362
42041
  "data-slot": "item-footer",
@@ -43370,9 +42049,9 @@ function ItemFooter({ className, ...props }) {
43370
42049
  }
43371
42050
 
43372
42051
  // src/components/ui/kbd.tsx
43373
- var import_jsx_runtime165 = require("react/jsx-runtime");
42052
+ var import_jsx_runtime155 = require("react/jsx-runtime");
43374
42053
  function Kbd({ className, ...props }) {
43375
- return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
42054
+ return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
43376
42055
  "kbd",
43377
42056
  {
43378
42057
  "data-slot": "kbd",
@@ -43387,7 +42066,7 @@ function Kbd({ className, ...props }) {
43387
42066
  );
43388
42067
  }
43389
42068
  function KbdGroup({ className, ...props }) {
43390
- return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
42069
+ return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
43391
42070
  "kbd",
43392
42071
  {
43393
42072
  "data-slot": "kbd-group",
@@ -43398,16 +42077,16 @@ function KbdGroup({ className, ...props }) {
43398
42077
  }
43399
42078
 
43400
42079
  // src/components/ui/sidebar.tsx
43401
- var React104 = __toESM(require("react"), 1);
42080
+ var React100 = __toESM(require("react"), 1);
43402
42081
  var import_react_slot6 = require("@radix-ui/react-slot");
43403
42082
  var import_class_variance_authority13 = require("class-variance-authority");
43404
42083
 
43405
42084
  // src/hooks/use-mobile.tsx
43406
- var React103 = __toESM(require("react"), 1);
42085
+ var React99 = __toESM(require("react"), 1);
43407
42086
  var MOBILE_BREAKPOINT = 768;
43408
42087
  function useIsMobile() {
43409
- const [isMobile, setIsMobile] = React103.useState(void 0);
43410
- React103.useEffect(() => {
42088
+ const [isMobile, setIsMobile] = React99.useState(void 0);
42089
+ React99.useEffect(() => {
43411
42090
  const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
43412
42091
  const onChange = () => {
43413
42092
  setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
@@ -43420,22 +42099,22 @@ function useIsMobile() {
43420
42099
  }
43421
42100
 
43422
42101
  // src/components/ui/sidebar.tsx
43423
- var import_jsx_runtime166 = require("react/jsx-runtime");
42102
+ var import_jsx_runtime156 = require("react/jsx-runtime");
43424
42103
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
43425
42104
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
43426
42105
  var SIDEBAR_WIDTH = "16rem";
43427
42106
  var SIDEBAR_WIDTH_MOBILE = "18rem";
43428
42107
  var SIDEBAR_WIDTH_ICON = "3rem";
43429
42108
  var SIDEBAR_KEYBOARD_SHORTCUT = "b";
43430
- var SidebarContext = React104.createContext(null);
42109
+ var SidebarContext = React100.createContext(null);
43431
42110
  function useSidebar() {
43432
- const context = React104.useContext(SidebarContext);
42111
+ const context = React100.useContext(SidebarContext);
43433
42112
  if (!context) {
43434
42113
  throw new Error("useSidebar must be used within a SidebarProvider.");
43435
42114
  }
43436
42115
  return context;
43437
42116
  }
43438
- var SidebarProvider = React104.forwardRef(
42117
+ var SidebarProvider = React100.forwardRef(
43439
42118
  ({
43440
42119
  defaultOpen = true,
43441
42120
  open: openProp,
@@ -43446,10 +42125,10 @@ var SidebarProvider = React104.forwardRef(
43446
42125
  ...props
43447
42126
  }, ref) => {
43448
42127
  const isMobile = useIsMobile();
43449
- const [openMobile, setOpenMobile] = React104.useState(false);
43450
- const [_open, _setOpen] = React104.useState(defaultOpen);
42128
+ const [openMobile, setOpenMobile] = React100.useState(false);
42129
+ const [_open, _setOpen] = React100.useState(defaultOpen);
43451
42130
  const open = openProp ?? _open;
43452
- const setOpen = React104.useCallback(
42131
+ const setOpen = React100.useCallback(
43453
42132
  (value) => {
43454
42133
  const openState = typeof value === "function" ? value(open) : value;
43455
42134
  if (setOpenProp) {
@@ -43461,10 +42140,10 @@ var SidebarProvider = React104.forwardRef(
43461
42140
  },
43462
42141
  [setOpenProp, open]
43463
42142
  );
43464
- const toggleSidebar = React104.useCallback(() => {
42143
+ const toggleSidebar = React100.useCallback(() => {
43465
42144
  return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
43466
42145
  }, [isMobile, setOpen, setOpenMobile]);
43467
- React104.useEffect(() => {
42146
+ React100.useEffect(() => {
43468
42147
  const handleKeyDown = (event) => {
43469
42148
  if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
43470
42149
  event.preventDefault();
@@ -43475,7 +42154,7 @@ var SidebarProvider = React104.forwardRef(
43475
42154
  return () => window.removeEventListener("keydown", handleKeyDown);
43476
42155
  }, [toggleSidebar]);
43477
42156
  const state = open ? "expanded" : "collapsed";
43478
- const contextValue = React104.useMemo(
42157
+ const contextValue = React100.useMemo(
43479
42158
  () => ({
43480
42159
  state,
43481
42160
  open,
@@ -43487,7 +42166,7 @@ var SidebarProvider = React104.forwardRef(
43487
42166
  }),
43488
42167
  [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
43489
42168
  );
43490
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
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)(
43491
42170
  "div",
43492
42171
  {
43493
42172
  style: {
@@ -43507,7 +42186,7 @@ var SidebarProvider = React104.forwardRef(
43507
42186
  }
43508
42187
  );
43509
42188
  SidebarProvider.displayName = "SidebarProvider";
43510
- var Sidebar = React104.forwardRef(
42189
+ var Sidebar = React100.forwardRef(
43511
42190
  ({
43512
42191
  side = "left",
43513
42192
  variant = "sidebar",
@@ -43518,7 +42197,7 @@ var Sidebar = React104.forwardRef(
43518
42197
  }, ref) => {
43519
42198
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
43520
42199
  if (collapsible === "none") {
43521
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42200
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43522
42201
  "div",
43523
42202
  {
43524
42203
  className: cn(
@@ -43532,7 +42211,7 @@ var Sidebar = React104.forwardRef(
43532
42211
  );
43533
42212
  }
43534
42213
  if (isMobile) {
43535
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
42214
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
43536
42215
  SheetContent,
43537
42216
  {
43538
42217
  "data-sidebar": "sidebar",
@@ -43543,16 +42222,16 @@ var Sidebar = React104.forwardRef(
43543
42222
  },
43544
42223
  side,
43545
42224
  children: [
43546
- /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(SheetHeader, { className: "sr-only", children: [
43547
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(SheetTitle, { children: "Sidebar" }),
43548
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
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." })
43549
42228
  ] }),
43550
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("div", { className: "flex h-full w-full flex-col", children })
42229
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: "flex h-full w-full flex-col", children })
43551
42230
  ]
43552
42231
  }
43553
42232
  ) });
43554
42233
  }
43555
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
42234
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
43556
42235
  "div",
43557
42236
  {
43558
42237
  ref,
@@ -43562,7 +42241,7 @@ var Sidebar = React104.forwardRef(
43562
42241
  "data-variant": variant,
43563
42242
  "data-side": side,
43564
42243
  children: [
43565
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42244
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43566
42245
  "div",
43567
42246
  {
43568
42247
  className: cn(
@@ -43573,7 +42252,7 @@ var Sidebar = React104.forwardRef(
43573
42252
  )
43574
42253
  }
43575
42254
  ),
43576
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42255
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43577
42256
  "div",
43578
42257
  {
43579
42258
  className: cn(
@@ -43584,7 +42263,7 @@ var Sidebar = React104.forwardRef(
43584
42263
  className
43585
42264
  ),
43586
42265
  ...props,
43587
- children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42266
+ children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43588
42267
  "div",
43589
42268
  {
43590
42269
  "data-sidebar": "sidebar",
@@ -43600,9 +42279,9 @@ var Sidebar = React104.forwardRef(
43600
42279
  }
43601
42280
  );
43602
42281
  Sidebar.displayName = "Sidebar";
43603
- var SidebarTrigger = React104.forwardRef(({ className, onClick, ...props }, ref) => {
42282
+ var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref) => {
43604
42283
  const { toggleSidebar } = useSidebar();
43605
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
42284
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
43606
42285
  Button,
43607
42286
  {
43608
42287
  ref,
@@ -43616,16 +42295,16 @@ var SidebarTrigger = React104.forwardRef(({ className, onClick, ...props }, ref)
43616
42295
  },
43617
42296
  ...props,
43618
42297
  children: [
43619
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(PanelLeft, {}),
43620
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
42298
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(PanelLeft, {}),
42299
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
43621
42300
  ]
43622
42301
  }
43623
42302
  );
43624
42303
  });
43625
42304
  SidebarTrigger.displayName = "SidebarTrigger";
43626
- var SidebarRail = React104.forwardRef(({ className, ...props }, ref) => {
42305
+ var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
43627
42306
  const { toggleSidebar } = useSidebar();
43628
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42307
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43629
42308
  "button",
43630
42309
  {
43631
42310
  ref,
@@ -43648,8 +42327,8 @@ var SidebarRail = React104.forwardRef(({ className, ...props }, ref) => {
43648
42327
  );
43649
42328
  });
43650
42329
  SidebarRail.displayName = "SidebarRail";
43651
- var SidebarInset = React104.forwardRef(({ className, ...props }, ref) => {
43652
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42330
+ var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
42331
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43653
42332
  "main",
43654
42333
  {
43655
42334
  ref,
@@ -43663,8 +42342,8 @@ var SidebarInset = React104.forwardRef(({ className, ...props }, ref) => {
43663
42342
  );
43664
42343
  });
43665
42344
  SidebarInset.displayName = "SidebarInset";
43666
- var SidebarInput = React104.forwardRef(({ className, ...props }, ref) => {
43667
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42345
+ var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
42346
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43668
42347
  Input,
43669
42348
  {
43670
42349
  ref,
@@ -43678,8 +42357,8 @@ var SidebarInput = React104.forwardRef(({ className, ...props }, ref) => {
43678
42357
  );
43679
42358
  });
43680
42359
  SidebarInput.displayName = "SidebarInput";
43681
- var SidebarHeader = React104.forwardRef(({ className, ...props }, ref) => {
43682
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42360
+ var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
42361
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43683
42362
  "div",
43684
42363
  {
43685
42364
  ref,
@@ -43690,8 +42369,8 @@ var SidebarHeader = React104.forwardRef(({ className, ...props }, ref) => {
43690
42369
  );
43691
42370
  });
43692
42371
  SidebarHeader.displayName = "SidebarHeader";
43693
- var SidebarFooter = React104.forwardRef(({ className, ...props }, ref) => {
43694
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42372
+ var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
42373
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43695
42374
  "div",
43696
42375
  {
43697
42376
  ref,
@@ -43702,8 +42381,8 @@ var SidebarFooter = React104.forwardRef(({ className, ...props }, ref) => {
43702
42381
  );
43703
42382
  });
43704
42383
  SidebarFooter.displayName = "SidebarFooter";
43705
- var SidebarSeparator = React104.forwardRef(({ className, ...props }, ref) => {
43706
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42384
+ var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
42385
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43707
42386
  Separator2,
43708
42387
  {
43709
42388
  ref,
@@ -43714,8 +42393,8 @@ var SidebarSeparator = React104.forwardRef(({ className, ...props }, ref) => {
43714
42393
  );
43715
42394
  });
43716
42395
  SidebarSeparator.displayName = "SidebarSeparator";
43717
- var SidebarContent = React104.forwardRef(({ className, ...props }, ref) => {
43718
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42396
+ var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
42397
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43719
42398
  "div",
43720
42399
  {
43721
42400
  ref,
@@ -43729,8 +42408,8 @@ var SidebarContent = React104.forwardRef(({ className, ...props }, ref) => {
43729
42408
  );
43730
42409
  });
43731
42410
  SidebarContent.displayName = "SidebarContent";
43732
- var SidebarGroup = React104.forwardRef(({ className, ...props }, ref) => {
43733
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42411
+ var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
42412
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43734
42413
  "div",
43735
42414
  {
43736
42415
  ref,
@@ -43741,9 +42420,9 @@ var SidebarGroup = React104.forwardRef(({ className, ...props }, ref) => {
43741
42420
  );
43742
42421
  });
43743
42422
  SidebarGroup.displayName = "SidebarGroup";
43744
- var SidebarGroupLabel = React104.forwardRef(({ className, asChild = false, ...props }, ref) => {
42423
+ var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
43745
42424
  const Comp = asChild ? import_react_slot6.Slot : "div";
43746
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42425
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43747
42426
  Comp,
43748
42427
  {
43749
42428
  ref,
@@ -43758,9 +42437,9 @@ var SidebarGroupLabel = React104.forwardRef(({ className, asChild = false, ...pr
43758
42437
  );
43759
42438
  });
43760
42439
  SidebarGroupLabel.displayName = "SidebarGroupLabel";
43761
- var SidebarGroupAction = React104.forwardRef(({ className, asChild = false, ...props }, ref) => {
42440
+ var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
43762
42441
  const Comp = asChild ? import_react_slot6.Slot : "button";
43763
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42442
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43764
42443
  Comp,
43765
42444
  {
43766
42445
  ref,
@@ -43777,7 +42456,7 @@ var SidebarGroupAction = React104.forwardRef(({ className, asChild = false, ...p
43777
42456
  );
43778
42457
  });
43779
42458
  SidebarGroupAction.displayName = "SidebarGroupAction";
43780
- var SidebarGroupContent = React104.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42459
+ var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43781
42460
  "div",
43782
42461
  {
43783
42462
  ref,
@@ -43787,7 +42466,7 @@ var SidebarGroupContent = React104.forwardRef(({ className, ...props }, ref) =>
43787
42466
  }
43788
42467
  ));
43789
42468
  SidebarGroupContent.displayName = "SidebarGroupContent";
43790
- var SidebarMenu = React104.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42469
+ var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43791
42470
  "ul",
43792
42471
  {
43793
42472
  ref,
@@ -43797,7 +42476,7 @@ var SidebarMenu = React104.forwardRef(({ className, ...props }, ref) => /* @__PU
43797
42476
  }
43798
42477
  ));
43799
42478
  SidebarMenu.displayName = "SidebarMenu";
43800
- var SidebarMenuItem = React104.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42479
+ var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43801
42480
  "li",
43802
42481
  {
43803
42482
  ref,
@@ -43827,7 +42506,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority13.cva)(
43827
42506
  }
43828
42507
  }
43829
42508
  );
43830
- var SidebarMenuButton = React104.forwardRef(
42509
+ var SidebarMenuButton = React100.forwardRef(
43831
42510
  ({
43832
42511
  asChild = false,
43833
42512
  isActive = false,
@@ -43839,7 +42518,7 @@ var SidebarMenuButton = React104.forwardRef(
43839
42518
  }, ref) => {
43840
42519
  const Comp = asChild ? import_react_slot6.Slot : "button";
43841
42520
  const { isMobile, state } = useSidebar();
43842
- const button = /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42521
+ const button = /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43843
42522
  Comp,
43844
42523
  {
43845
42524
  ref,
@@ -43858,9 +42537,9 @@ var SidebarMenuButton = React104.forwardRef(
43858
42537
  children: tooltip
43859
42538
  };
43860
42539
  }
43861
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(Tooltip, { children: [
43862
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(TooltipTrigger, { asChild: true, children: button }),
43863
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
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)(
43864
42543
  TooltipContent,
43865
42544
  {
43866
42545
  side: "right",
@@ -43873,9 +42552,9 @@ var SidebarMenuButton = React104.forwardRef(
43873
42552
  }
43874
42553
  );
43875
42554
  SidebarMenuButton.displayName = "SidebarMenuButton";
43876
- var SidebarMenuAction = React104.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
42555
+ var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
43877
42556
  const Comp = asChild ? import_react_slot6.Slot : "button";
43878
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42557
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43879
42558
  Comp,
43880
42559
  {
43881
42560
  ref,
@@ -43896,7 +42575,7 @@ var SidebarMenuAction = React104.forwardRef(({ className, asChild = false, showO
43896
42575
  );
43897
42576
  });
43898
42577
  SidebarMenuAction.displayName = "SidebarMenuAction";
43899
- var SidebarMenuBadge = React104.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42578
+ var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43900
42579
  "div",
43901
42580
  {
43902
42581
  ref,
@@ -43914,11 +42593,11 @@ var SidebarMenuBadge = React104.forwardRef(({ className, ...props }, ref) => /*
43914
42593
  }
43915
42594
  ));
43916
42595
  SidebarMenuBadge.displayName = "SidebarMenuBadge";
43917
- var SidebarMenuSkeleton = React104.forwardRef(({ className, showIcon = false, ...props }, ref) => {
43918
- const width = React104.useMemo(() => {
42596
+ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ...props }, ref) => {
42597
+ const width = React100.useMemo(() => {
43919
42598
  return `${Math.floor(Math.random() * 40) + 50}%`;
43920
42599
  }, []);
43921
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
42600
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
43922
42601
  "div",
43923
42602
  {
43924
42603
  ref,
@@ -43926,14 +42605,14 @@ var SidebarMenuSkeleton = React104.forwardRef(({ className, showIcon = false, ..
43926
42605
  className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
43927
42606
  ...props,
43928
42607
  children: [
43929
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42608
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43930
42609
  Skeleton,
43931
42610
  {
43932
42611
  className: "size-4 rounded-md",
43933
42612
  "data-sidebar": "menu-skeleton-icon"
43934
42613
  }
43935
42614
  ),
43936
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42615
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43937
42616
  Skeleton,
43938
42617
  {
43939
42618
  className: "h-4 max-w-[--skeleton-width] flex-1",
@@ -43948,7 +42627,7 @@ var SidebarMenuSkeleton = React104.forwardRef(({ className, showIcon = false, ..
43948
42627
  );
43949
42628
  });
43950
42629
  SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
43951
- var SidebarMenuSub = React104.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42630
+ var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43952
42631
  "ul",
43953
42632
  {
43954
42633
  ref,
@@ -43962,11 +42641,11 @@ var SidebarMenuSub = React104.forwardRef(({ className, ...props }, ref) => /* @_
43962
42641
  }
43963
42642
  ));
43964
42643
  SidebarMenuSub.displayName = "SidebarMenuSub";
43965
- var SidebarMenuSubItem = React104.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("li", { ref, ...props }));
42644
+ var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("li", { ref, ...props }));
43966
42645
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
43967
- var SidebarMenuSubButton = React104.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
42646
+ var SidebarMenuSubButton = React100.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
43968
42647
  const Comp = asChild ? import_react_slot6.Slot : "a";
43969
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42648
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43970
42649
  Comp,
43971
42650
  {
43972
42651
  ref,
@@ -43990,20 +42669,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
43990
42669
  // src/components/ui/sonner.tsx
43991
42670
  var import_next_themes = require("next-themes");
43992
42671
  var import_sonner = require("sonner");
43993
- var import_jsx_runtime167 = require("react/jsx-runtime");
42672
+ var import_jsx_runtime157 = require("react/jsx-runtime");
43994
42673
  var Toaster = ({ ...props }) => {
43995
42674
  const { theme = "system" } = (0, import_next_themes.useTheme)();
43996
- return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
42675
+ return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
43997
42676
  import_sonner.Toaster,
43998
42677
  {
43999
42678
  theme,
44000
42679
  className: "toaster group",
44001
42680
  icons: {
44002
- success: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(CircleCheck, { className: "h-4 w-4" }),
44003
- info: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(Info, { className: "h-4 w-4" }),
44004
- warning: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(TriangleAlert, { className: "h-4 w-4" }),
44005
- error: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(OctagonX, { className: "h-4 w-4" }),
44006
- loading: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(LoaderCircle, { className: "h-4 w-4 animate-spin" })
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" })
44007
42686
  },
44008
42687
  toastOptions: {
44009
42688
  classNames: {
@@ -44019,26 +42698,26 @@ var Toaster = ({ ...props }) => {
44019
42698
  };
44020
42699
 
44021
42700
  // src/components/ui/toggle-group.tsx
44022
- var React105 = __toESM(require("react"), 1);
42701
+ var React101 = __toESM(require("react"), 1);
44023
42702
  var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
44024
- var import_jsx_runtime168 = require("react/jsx-runtime");
44025
- var ToggleGroupContext = React105.createContext({
42703
+ var import_jsx_runtime158 = require("react/jsx-runtime");
42704
+ var ToggleGroupContext = React101.createContext({
44026
42705
  size: "default",
44027
42706
  variant: "default"
44028
42707
  });
44029
- var ToggleGroup = React105.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
42708
+ var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
44030
42709
  ToggleGroupPrimitive.Root,
44031
42710
  {
44032
42711
  ref,
44033
42712
  className: cn("flex items-center justify-center gap-1", className),
44034
42713
  ...props,
44035
- children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
42714
+ children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
44036
42715
  }
44037
42716
  ));
44038
42717
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
44039
- var ToggleGroupItem = React105.forwardRef(({ className, children, variant, size, ...props }, ref) => {
44040
- const context = React105.useContext(ToggleGroupContext);
44041
- return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
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)(
44042
42721
  ToggleGroupPrimitive.Item,
44043
42722
  {
44044
42723
  ref,
@@ -44057,7 +42736,7 @@ var ToggleGroupItem = React105.forwardRef(({ className, children, variant, size,
44057
42736
  ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
44058
42737
 
44059
42738
  // src/render/PXEngineRenderer.tsx
44060
- var import_jsx_runtime169 = require("react/jsx-runtime");
42739
+ var import_jsx_runtime159 = require("react/jsx-runtime");
44061
42740
  var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
44062
42741
  // Form components - require FormField + FormItem context
44063
42742
  "FormLabel",
@@ -44162,24 +42841,24 @@ var REGISTERED_COMPONENTS = /* @__PURE__ */ new Set([
44162
42841
  ]);
44163
42842
  var renderContextDependentError = (componentName, normalizedName, key) => {
44164
42843
  const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
44165
- return /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(
42844
+ return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
44166
42845
  "div",
44167
42846
  {
44168
42847
  className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
44169
42848
  children: [
44170
- /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("div", { className: "flex items-start gap-2", children: [
44171
- /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
44172
- /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("div", { className: "flex-1", children: [
44173
- /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("p", { className: "text-sm font-semibold text-amber-900", children: [
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: [
44174
42853
  "Invalid Component: ",
44175
42854
  componentName
44176
42855
  ] }),
44177
- /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
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." })
44178
42857
  ] })
44179
42858
  ] }),
44180
- /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
44181
- /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
44182
- /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
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 })
44183
42862
  ] })
44184
42863
  ]
44185
42864
  },
@@ -44257,12 +42936,12 @@ var PXEngineRenderer = ({
44257
42936
  const root = schema.root || schema;
44258
42937
  const renderRecursive = (component, index) => {
44259
42938
  if (Array.isArray(component)) {
44260
- return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(import_react83.default.Fragment, { children: component.map((child, idx) => renderRecursive(child, idx)) }, index !== void 0 ? `array-${index}` : "array-root");
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");
44261
42940
  }
44262
42941
  if (typeof component === "string" || typeof component === "number") {
44263
42942
  return component;
44264
42943
  }
44265
- if (import_react83.default.isValidElement(component)) {
42944
+ if (import_react78.default.isValidElement(component)) {
44266
42945
  return component;
44267
42946
  }
44268
42947
  if (!component || typeof component !== "object") return null;
@@ -44341,7 +43020,7 @@ var PXEngineRenderer = ({
44341
43020
  const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
44342
43021
  const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
44343
43022
  if (isAtomWithRenderProp) {
44344
- return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
43023
+ return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
44345
43024
  TargetComponent,
44346
43025
  {
44347
43026
  ...finalProps,
@@ -44353,7 +43032,7 @@ var PXEngineRenderer = ({
44353
43032
  uniqueKey
44354
43033
  );
44355
43034
  } else {
44356
- return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
43035
+ return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
44357
43036
  TargetComponent,
44358
43037
  {
44359
43038
  ...finalProps,
@@ -44365,7 +43044,7 @@ var PXEngineRenderer = ({
44365
43044
  );
44366
43045
  }
44367
43046
  };
44368
- return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
43047
+ return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
44369
43048
  };
44370
43049
  // Annotate the CommonJS export names for ESM import in node:
44371
43050
  0 && (module.exports = {
@@ -44375,8 +43054,6 @@ var PXEngineRenderer = ({
44375
43054
  AccordionItem,
44376
43055
  AccordionTrigger,
44377
43056
  ActionButton,
44378
- AgentCard,
44379
- AgentDataTable,
44380
43057
  Alert,
44381
43058
  AlertAtom,
44382
43059
  AlertDescription,
@@ -44535,7 +43212,6 @@ var PXEngineRenderer = ({
44535
43212
  InputOTPGroup,
44536
43213
  InputOTPSeparator,
44537
43214
  InputOTPSlot,
44538
- InstructionPreview,
44539
43215
  KbdAtom,
44540
43216
  KeywordBundlesDisplay,
44541
43217
  KeywordBundlesEdit,
@@ -44553,9 +43229,6 @@ var PXEngineRenderer = ({
44553
43229
  MenubarSeparator,
44554
43230
  MenubarShortcut,
44555
43231
  MenubarTrigger,
44556
- MultiAgentCard,
44557
- MultiAgentPlan,
44558
- MultiAgentUISelector,
44559
43232
  NavigationMenu,
44560
43233
  NavigationMenuContent,
44561
43234
  NavigationMenuItem,
@@ -44623,7 +43296,6 @@ var PXEngineRenderer = ({
44623
43296
  SocialPostCard,
44624
43297
  Spinner,
44625
43298
  SpinnerAtom,
44626
- StageIndicator,
44627
43299
  StatsGrid,
44628
43300
  StepWizard,
44629
43301
  Switch,
@@ -44647,16 +43319,13 @@ var PXEngineRenderer = ({
44647
43319
  TextareaAtom,
44648
43320
  TimelineAtom,
44649
43321
  ToggleAtom,
44650
- ToolListCard,
44651
43322
  Tooltip,
44652
43323
  TooltipAtom,
44653
43324
  TooltipContent,
44654
43325
  TooltipProvider,
44655
43326
  TooltipTrigger,
44656
43327
  TopPostsGrid,
44657
- UIComponentSelector,
44658
43328
  VideoAtom,
44659
- WorkflowVisualizer,
44660
43329
  cn,
44661
43330
  defaultFetchSelections,
44662
43331
  defaultPersistSelection,