pxengine 0.1.59 → 0.1.61

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
@@ -34350,19 +34330,19 @@ var EditableField = import_react54.default.memo(
34350
34330
  "div",
34351
34331
  {
34352
34332
  className: cn(
34353
- "relative z-10 group flex flex-col gap-2 p-3 bg-paperBackground rounded-md mb-8",
34333
+ "relative z-10 group flex flex-col gap-1.5 p-2.5 bg-black border border-cardBorder rounded-lg mb-4",
34354
34334
  className
34355
34335
  ),
34356
34336
  children: [
34357
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex justify-between items-start mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "w-full flex justify-between items-center flex-wrap gap-2", children: [
34337
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex justify-between items-start mb-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "w-full flex justify-between items-center flex-wrap gap-1.5", children: [
34358
34338
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
34359
34339
  "h4",
34360
34340
  {
34361
- className: "px-[6px] py-[2px] tracking-widest bg-purple200 hover:bg-purple200 text-purpleText text-xs font-normal rounded-[4px]",
34341
+ className: "px-1.5 py-px tracking-widest border border-cardBorder text-gold text-[9px] font-medium uppercase rounded-[3px]",
34362
34342
  children: label
34363
34343
  }
34364
34344
  ),
34365
- isEditingProp ? /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-3", children: [
34345
+ isEditingProp ? /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-2", children: [
34366
34346
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
34367
34347
  "button",
34368
34348
  {
@@ -34373,7 +34353,7 @@ var EditableField = import_react54.default.memo(
34373
34353
  className: "text-gray-500 hover:text-gray-700 transition-colors",
34374
34354
  disabled: isSaving,
34375
34355
  title: "Cancel",
34376
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(X, { className: "h-5 w-5" })
34356
+ children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(X, { className: "h-4 w-4" })
34377
34357
  }
34378
34358
  ),
34379
34359
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
@@ -34386,37 +34366,31 @@ var EditableField = import_react54.default.memo(
34386
34366
  className: "text-gray600 hover:text-gray600 transition-colors",
34387
34367
  disabled: isSaving,
34388
34368
  title: "Save",
34389
- children: isSaving ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(LoaderCircle, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Save, { className: "h-5 w-5" })
34369
+ children: isSaving ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(LoaderCircle, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Save, { className: "h-4 w-4" })
34390
34370
  }
34391
34371
  )
34392
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { className: cn(
34393
- "inline-flex items-center gap-1.5 text-[0.75rem] font-medium px-2 py-0.5 rounded-full",
34394
- isChanged ? "bg-yellow100 text-warningcolor" : "text-green-600 dark:text-green-500 bg-green-500/5"
34395
- ), children: [
34396
- isChanged ? "Changed by you" : "Suggested by an Agent",
34397
- isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
34398
- "span",
34399
- {
34400
- className: "flex items-center gap-1 cursor-pointer text-foreground hover:text-green-700 transition-colors ml-1 pl-1.5 ",
34401
- onClick: (e) => {
34402
- if (shouldStopPropagation !== false) {
34403
- e.stopPropagation();
34404
- }
34405
- onEdit?.();
34406
- },
34407
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(SquarePen, { className: "h-5 w-5" })
34408
- }
34409
- )
34410
- ] })
34372
+ ] }) : isLatestMessage ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
34373
+ "button",
34374
+ {
34375
+ className: "p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-gray300 transition-colors",
34376
+ onClick: (e) => {
34377
+ if (shouldStopPropagation !== false) {
34378
+ e.stopPropagation();
34379
+ }
34380
+ onEdit?.();
34381
+ },
34382
+ title: "Edit",
34383
+ children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(SquarePen, { className: "h-3.5 w-3.5" })
34384
+ }
34385
+ ) : null
34411
34386
  ] }) }),
34412
34387
  isEditingProp ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex flex-col gap-3", children: renderInput() }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
34413
34388
  "div",
34414
34389
  {
34415
34390
  className: cn(
34416
- "relative flex items-start justify-between rounded-lg px-3 py-2",
34417
- "text-base text-foreground/90 font-medium leading-relaxed"
34391
+ "relative flex items-start justify-between rounded-md px-2 py-1.5",
34392
+ "text-sm text-cardText font-medium leading-relaxed"
34418
34393
  ),
34419
- style: { fontFamily: "Noto Sans, sans-serif" },
34420
34394
  children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex-1", children: formattedValue() })
34421
34395
  }
34422
34396
  )
@@ -34627,7 +34601,7 @@ var FormCard = import_react56.default.memo(
34627
34601
  "div",
34628
34602
  {
34629
34603
  className: cn(
34630
- "relative w-full rounded-[20px] bg-paperBackground dark:bg-gray100 border border-gray400 shadow-lg overflow-hidden mb-6 font-noto",
34604
+ "relative w-full rounded-lg bg-cardSurface border border-gray400 shadow-sm overflow-hidden mb-4",
34631
34605
  className
34632
34606
  ),
34633
34607
  children: [
@@ -34640,18 +34614,18 @@ var FormCard = import_react56.default.memo(
34640
34614
  children: copied ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Check, { className: "h-4 w-4 text-green-500" }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Copy, { className: "h-4 w-4" })
34641
34615
  }
34642
34616
  ),
34643
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "p-6 relative", children: [
34617
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "p-4 relative", children: [
34644
34618
  !hideTitle && title && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
34645
34619
  "h3",
34646
34620
  {
34647
- className: "text-gray900 dark:text-white mb-12 text-[1rem] font-bold",
34621
+ className: "text-cardText mb-6 text-sm font-semibold",
34648
34622
  children: title
34649
34623
  }
34650
34624
  ),
34651
34625
  showTimeline && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
34652
34626
  "div",
34653
34627
  {
34654
- className: "absolute z-0 left-[60px] top-[100px] bottom-[60px] w-[3px]",
34628
+ className: "absolute z-0 left-[48px] top-[70px] bottom-[40px] w-[2px]",
34655
34629
  style: {
34656
34630
  background: `
34657
34631
  radial-gradient(circle closest-side, #3C3D3E 98%, transparent) 50%/2px 5px repeat-y,
@@ -34684,7 +34658,7 @@ var FormCard = import_react56.default.memo(
34684
34658
  field.key
34685
34659
  ))
34686
34660
  ] }),
34687
- isLatestMessage && onProceed && proceedLabel ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "my-6 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
34661
+ isLatestMessage && onProceed && proceedLabel ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "my-4 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
34688
34662
  "button",
34689
34663
  {
34690
34664
  onClick: () => {
@@ -34693,14 +34667,10 @@ var FormCard = import_react56.default.memo(
34693
34667
  }
34694
34668
  },
34695
34669
  className: cn(
34696
- "px-6 py-2.5 border rounded-full transition-colors text-sm font-medium flex items-center gap-2",
34697
- "bg-purpleLight dark:bg-purple200 text-purpleText2 dark:text-purpleText border-purpleText1 dark:border-purple100",
34698
- "hover:bg-purpleText1 dark:hover:bg-purple100 dark:hover:text-white"
34670
+ "px-4 py-1.5 border rounded-lg transition-colors text-xs font-medium",
34671
+ "bg-cardSurface hover:bg-cardSurface/80 text-gold border-cardBorder"
34699
34672
  ),
34700
- children: [
34701
- proceedLabel,
34702
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ChevronRight, { className: "w-4 h-4" })
34703
- ]
34673
+ children: proceedLabel
34704
34674
  }
34705
34675
  ) }) : !isLatestMessage && footer ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex justify-end items-center pb-4 pr-4 gap-1 text-green-600 text-sm font-medium", children: footer }) : null
34706
34676
  ]
@@ -37139,7 +37109,7 @@ var CountrySelectEdit = ({
37139
37109
  inputValue.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
37140
37110
  Badge2,
37141
37111
  {
37142
- className: "flex items-center gap-1 px-2 py-1 bg-grayPill border border-foreground rounded-md text-white text-sm font-grotesk font-medium",
37112
+ className: "flex items-center gap-1 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium",
37143
37113
  children: [
37144
37114
  countryCode,
37145
37115
  /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
@@ -37175,7 +37145,7 @@ var CountrySelectDisplay = ({ value }) => {
37175
37145
  return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
37176
37146
  "div",
37177
37147
  {
37178
- className: "flex items-center gap-2 px-3 py-1 bg-grayPill border border-foreground rounded-md text-foreground text-sm font-grotesk font-medium",
37148
+ className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
37179
37149
  children: country ? country.name : item
37180
37150
  },
37181
37151
  item
@@ -37224,7 +37194,7 @@ var KeywordBundlesEdit = ({
37224
37194
  /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
37225
37195
  "div",
37226
37196
  {
37227
- className: "flex items-center gap-2 px-3 py-1 bg-grayPill border border-white rounded-md text-white text-sm font-medium hover:bg-red-900/40 hover:border-red-500 transition-all cursor-pointer group",
37197
+ className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium hover:bg-red-900/40 hover:border-red-500 transition-all cursor-pointer group",
37228
37198
  onClick: () => {
37229
37199
  const updatedBundles = [...bundles];
37230
37200
  const currentKeywords = parseKeywords(updatedBundles[bundleIndex].keywords);
@@ -37323,7 +37293,7 @@ var KeywordBundlesDisplay = ({ value }) => {
37323
37293
  /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "flex flex-wrap gap-2 pt-1", children: deduped.map((keyword) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
37324
37294
  "div",
37325
37295
  {
37326
- className: "flex items-center gap-2 px-3 py-1 bg-grayPill border border-white rounded-md text-white text-sm font-medium",
37296
+ className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium",
37327
37297
  children: keyword
37328
37298
  },
37329
37299
  keyword
@@ -37394,7 +37364,7 @@ var PlatformSelectDisplay = ({ value }) => {
37394
37364
  return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "flex flex-wrap gap-2 pt-1", children: displayValues.map((platform) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
37395
37365
  "div",
37396
37366
  {
37397
- className: "flex items-center gap-2 px-3 py-1 bg-grayPill border border-foreground rounded-md text-foreground text-sm font-grotesk font-medium",
37367
+ className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
37398
37368
  children: platform
37399
37369
  },
37400
37370
  platform
@@ -37419,7 +37389,7 @@ var StringArrayDisplay = ({ value }) => {
37419
37389
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "flex flex-wrap gap-2 pt-1", children: value.map((item) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
37420
37390
  "div",
37421
37391
  {
37422
- className: "flex items-center gap-2 px-3 py-1 bg-grayPill border border-foreground rounded-md text-foreground text-sm font-grotesk font-medium",
37392
+ className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
37423
37393
  children: item
37424
37394
  },
37425
37395
  item
@@ -37578,9 +37548,9 @@ var CampaignSeedCard = import_react64.default.memo(
37578
37548
  onProceed: handleProceed,
37579
37549
  showTimeline: true,
37580
37550
  isLatestMessage: effectiveIsLatest,
37581
- className: cn("font-noto", className),
37582
- footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-[10px] font-semibold py-4 pr-6", children: [
37583
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CircleCheck, { className: "h-3.5 w-3.5" }),
37551
+ className,
37552
+ footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-2 pr-4", children: [
37553
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CircleCheck, { className: "h-3 w-3" }),
37584
37554
  /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { children: selectionStatus === "agent" ? "Suggested by Agent" : "Selected by you" })
37585
37555
  ] }) : formCardProps.footer
37586
37556
  }
@@ -37745,8 +37715,8 @@ var SearchSpecCard = import_react65.default.memo(
37745
37715
  onProceed: handleProceed,
37746
37716
  isLatestMessage: effectiveIsLatest,
37747
37717
  className,
37748
- footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1", children: [
37749
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(CircleCheck, { className: "h-4 w-4" }),
37718
+ footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-1", children: [
37719
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(CircleCheck, { className: "h-3 w-3" }),
37750
37720
  /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
37751
37721
  ] }) : formCardProps.footer
37752
37722
  }
@@ -37904,75 +37874,61 @@ var MCQCard = import_react66.default.memo(
37904
37874
  "div",
37905
37875
  {
37906
37876
  className: cn(
37907
- "p-6 rounded-[20px] border border-gray400 bg-background dark:bg-gray200 font-noto w-full",
37877
+ "p-4 rounded-lg border border-gray400 bg-cardSurface w-full",
37908
37878
  className
37909
37879
  ),
37910
37880
  children: [
37911
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("h4", { className: "font-medium text-foreground px-3 py-1 rounded-md inline-block mb-2", children: question }) }),
37912
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "mb-6", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "space-y-4", children: optionsEntries.map(([key, label]) => {
37881
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("p", { className: "text-sm text-cardText", children: question }) }),
37882
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "space-y-2.5 mb-4", children: optionsEntries.map(([key, label]) => {
37913
37883
  const isSelected = selectedOption === key;
37914
37884
  const isRecommended = key === recommended;
37915
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
37885
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
37916
37886
  "div",
37917
37887
  {
37918
37888
  onClick: (e) => handleOptionClick(key, e),
37919
37889
  className: cn(
37920
- "cursor-pointer rounded-xl p-3 transition-colors relative",
37921
- "border border-transparent bg-paperBackground",
37890
+ "cursor-pointer rounded-lg p-3 transition-colors",
37891
+ "border bg-black",
37892
+ isSelected ? "border-cardBorder" : "border-gray400",
37922
37893
  !selectedOption && !isOptionsDisabled && "hover:border-gray500",
37923
37894
  (isLoading || isOptionsDisabled) && "opacity-50 cursor-not-allowed"
37924
37895
  ),
37925
- children: [
37926
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "absolute top-1/2 left-4 transform -translate-y-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
37896
+ children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex items-start gap-3", children: [
37897
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "mt-0.5 flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
37927
37898
  "div",
37928
37899
  {
37929
37900
  className: cn(
37930
- "w-5 h-5 rounded-full border flex items-center justify-center transition-colors",
37931
- isSelected ? "border-purple100 bg-gray300" : cn(
37932
- "border-gray300 bg-background",
37933
- !selectedOption && !isOptionsDisabled && "hover:border-purple100"
37901
+ "w-4 h-4 rounded-full border-2 flex items-center justify-center transition-colors",
37902
+ isSelected ? "border-gold" : cn(
37903
+ "border-gray500",
37904
+ !selectedOption && !isOptionsDisabled && "hover:border-gold"
37934
37905
  )
37935
37906
  ),
37936
- children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "w-2.5 h-2.5 rounded-full bg-purple100" })
37907
+ children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "w-2 h-2 rounded-full bg-gold" })
37937
37908
  }
37938
37909
  ) }),
37939
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "pl-12", children: [
37940
- (isRecommended || isSelected) && /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex gap-2 mb-2 flex-wrap", children: [
37941
- isRecommended && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "flex text-xs font-semibold", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("p", { className: "bg-greenBackground text-greenText px-2 py-1 rounded-[20px]", children: "Recommended" }) }),
37942
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "flex text-xs font-semibold", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
37943
- "p",
37944
- {
37945
- className: cn(
37946
- "px-2 py-1 rounded-[20px]",
37947
- selectedOption === recommended ? "bg-purpleLight text-purpleText2 dark:bg-primary/20 dark:text-primary" : "bg-paperBackground text-primaryDark2 dark:bg-primary/20 dark:text-primary"
37948
- ),
37949
- children: "Selected by you"
37950
- }
37951
- ) })
37952
- ] }),
37953
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "text-base font-medium text-txtColor", children: label })
37910
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex-1 min-w-0", children: [
37911
+ isRecommended && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("p", { className: "text-xs font-semibold text-gold mb-1", children: "Recommended" }),
37912
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("p", { className: "text-sm text-cardText", children: label })
37954
37913
  ] })
37955
- ]
37914
+ ] })
37956
37915
  },
37957
37916
  key
37958
37917
  );
37959
- }) }) }),
37960
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex justify-between items-center", children: [
37961
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "flex-1" }),
37962
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
37963
- "button",
37964
- {
37965
- onClick: handleProceed,
37966
- disabled: isContinueDisabled || isLoading || !selectedOption && !recommended,
37967
- className: cn(
37968
- "flex-3 px-4 py-2 border rounded-full text-sm disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
37969
- "bg-purpleLight dark:bg-purple200 hover:bg-purpleText1 dark:hover:bg-purple100 text-purpleText2 dark:text-purpleText border-purpleText1 dark:border-purple-border dark:hover:text-white"
37970
- ),
37971
- children: isLoading ? "Sending..." : "Continue"
37972
- }
37973
- ),
37974
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "flex-1" })
37975
- ] })
37918
+ }) }),
37919
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
37920
+ "button",
37921
+ {
37922
+ onClick: handleProceed,
37923
+ disabled: isContinueDisabled || isLoading || !selectedOption && !recommended,
37924
+ className: cn(
37925
+ "px-4 py-1.5 border rounded-lg text-xs font-medium transition-colors",
37926
+ "disabled:opacity-50 disabled:cursor-not-allowed",
37927
+ "bg-cardSurface hover:bg-cardSurface/80 text-gold border-cardBorder"
37928
+ ),
37929
+ children: isLoading ? "Sending..." : "Continue"
37930
+ }
37931
+ ) })
37976
37932
  ]
37977
37933
  }
37978
37934
  );
@@ -38633,9 +38589,9 @@ var CampaignConceptCard = import_react68.default.memo(
38633
38589
  idx + 1,
38634
38590
  "."
38635
38591
  ] }),
38636
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "inline-flex items-center bg-grayPill border border-foreground px-2 py-1 text-foreground text-sm font-grotesk font-medium rounded-md", children: String(label) }),
38637
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-foreground", children: "=" }),
38638
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "inline-flex items-center bg-grayPill border border-foreground px-2 py-1 text-foreground text-sm rounded-md font-grotesk font-medium", children: formatVal(value) })
38592
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md", children: String(label) }),
38593
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-cardText", children: "=" }),
38594
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-1 text-cardText text-sm rounded-md font-grotesk font-medium", children: formatVal(value) })
38639
38595
  ] }, idx);
38640
38596
  }) });
38641
38597
  }
@@ -38648,9 +38604,9 @@ var CampaignConceptCard = import_react68.default.memo(
38648
38604
  idx + 1,
38649
38605
  "."
38650
38606
  ] }),
38651
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "inline-flex items-center bg-grayPill border border-foreground px-2 py-1 text-foreground text-sm font-grotesk font-medium rounded-md", children: formatKey(k) }),
38652
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-foreground", children: "=" }),
38653
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "inline-flex items-center bg-grayPill border border-foreground px-2 py-1 text-foreground text-sm rounded-md font-grotesk font-medium", children: formatVal(v) })
38607
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md", children: formatKey(k) }),
38608
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-cardText", children: "=" }),
38609
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-1 text-cardText text-sm rounded-md font-grotesk font-medium", children: formatVal(v) })
38654
38610
  ] }, k)) });
38655
38611
  }
38656
38612
  return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-muted-foreground text-sm", children: String(val) });
@@ -38692,7 +38648,7 @@ var CampaignConceptCard = import_react68.default.memo(
38692
38648
  if (!val)
38693
38649
  return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-muted-foreground text-sm", children: "-" });
38694
38650
  const displayValue = typeof val === "object" && !Array.isArray(val) ? `${val.min ?? 0}-${val.max ?? 0}` : String(val);
38695
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-foreground text-sm", children: displayValue });
38651
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-cardText text-sm", children: displayValue });
38696
38652
  },
38697
38653
  renderEdit: (v, onChange) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
38698
38654
  Input,
@@ -38717,7 +38673,7 @@ var CampaignConceptCard = import_react68.default.memo(
38717
38673
  return {
38718
38674
  ...field,
38719
38675
  label: field.label || "Primary KPI",
38720
- renderDisplay: (val) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-foreground text-sm", children: val ? String(val) : "-" }),
38676
+ renderDisplay: (val) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-cardText text-sm", children: val ? String(val) : "-" }),
38721
38677
  renderEdit: (v, onChange) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
38722
38678
  Input,
38723
38679
  {
@@ -38735,7 +38691,7 @@ var CampaignConceptCard = import_react68.default.memo(
38735
38691
  label: field.label || "Secondary KPIs",
38736
38692
  renderDisplay: (val) => {
38737
38693
  const display = Array.isArray(val) ? val.map(String).join(", ") : val ? String(val) : "-";
38738
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-foreground text-sm", children: display });
38694
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-cardText text-sm", children: display });
38739
38695
  },
38740
38696
  renderEdit: (v, onChange) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
38741
38697
  Textarea,
@@ -38762,7 +38718,7 @@ var CampaignConceptCard = import_react68.default.memo(
38762
38718
  return {
38763
38719
  ...field,
38764
38720
  type: "textarea",
38765
- renderDisplay: (val) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-foreground text-sm leading-relaxed", children: val ? String(val) : "-" })
38721
+ renderDisplay: (val) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-cardText text-sm leading-relaxed", children: val ? String(val) : "-" })
38766
38722
  };
38767
38723
  }
38768
38724
  return {
@@ -38776,7 +38732,7 @@ var CampaignConceptCard = import_react68.default.memo(
38776
38732
  return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
38777
38733
  "span",
38778
38734
  {
38779
- className: "inline-flex items-center bg-grayPill border border-foreground px-3 py-1 text-foreground text-sm font-grotesk font-medium rounded-md",
38735
+ className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md",
38780
38736
  children: label
38781
38737
  },
38782
38738
  idx
@@ -38786,7 +38742,7 @@ var CampaignConceptCard = import_react68.default.memo(
38786
38742
  if (typeof val === "object" && val !== null) {
38787
38743
  return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "text-muted-foreground text-xs font-mono bg-paperBackground p-2 rounded mt-1 overflow-auto max-h-24", children: Object.entries(val).map(([k, v]) => `${k.replace(/_/g, " ")}: ${v}`).join("\n") });
38788
38744
  }
38789
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-foreground text-sm", children: val !== void 0 && val !== null ? String(val) : "-" });
38745
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-cardText text-sm", children: val !== void 0 && val !== null ? String(val) : "-" });
38790
38746
  }
38791
38747
  };
38792
38748
  });
@@ -38795,19 +38751,19 @@ var CampaignConceptCard = import_react68.default.memo(
38795
38751
  "div",
38796
38752
  {
38797
38753
  className: cn(
38798
- "w-full rounded-xl border bg-background dark:bg-gray100 relative transition-all duration-300",
38799
- isSelected || isRecommended ? "border-2 border-green500" : "border-gray400",
38754
+ "w-full rounded-lg border bg-cardSurface relative transition-all duration-300",
38755
+ isSelected || isRecommended ? "border-2 border-cardBorder" : "border-gray400",
38800
38756
  className
38801
38757
  ),
38802
38758
  children: [
38803
38759
  /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
38804
38760
  "div",
38805
38761
  {
38806
- className: "px-5 py-4 relative flex items-start justify-between cursor-pointer select-none",
38762
+ className: "px-4 py-2.5 relative flex items-center justify-between cursor-pointer select-none",
38807
38763
  onClick: handleToggle,
38808
38764
  children: [
38809
38765
  /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex-1", children: [
38810
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("h3", { className: "mb-1 py-1 text-txtColor font-bold text-lg", children: [
38766
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("h3", { className: "text-cardText font-semibold text-sm", children: [
38811
38767
  "Concept ",
38812
38768
  index !== void 0 ? index : "",
38813
38769
  " :",
@@ -38815,8 +38771,8 @@ var CampaignConceptCard = import_react68.default.memo(
38815
38771
  typeof cardTitle === "object" ? JSON.stringify(cardTitle) : String(cardTitle)
38816
38772
  ] }),
38817
38773
  /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-wrap gap-2", children: [
38818
- isRecommended && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "inline-flex text-[10px] font-bold uppercase tracking-widest", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "bg-green-600/20 text-green-600 px-2 py-1 rounded-[20px]", children: "Recommended" }) }),
38819
- !effectiveIsLatest && selectionStatus && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "inline-flex text-[10px] font-bold uppercase tracking-widest text-[#3B82F6]", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "bg-[#3B82F6]/10 px-2 py-0.5 rounded border border-[#3B82F6]/20", children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" }) })
38774
+ isRecommended && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-gold", children: "Recommended" }),
38775
+ !effectiveIsLatest && selectionStatus && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-gold", children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
38820
38776
  ] })
38821
38777
  ] }),
38822
38778
  /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
@@ -38832,7 +38788,7 @@ var CampaignConceptCard = import_react68.default.memo(
38832
38788
  e.stopPropagation();
38833
38789
  handleToggle();
38834
38790
  },
38835
- className: "p-2 bg-background hover:bg-gray200 dark:hover:bg-gray200 text-foreground rounded-lg shadow-lg",
38791
+ className: "p-2 bg-cardSurface hover:bg-gray200 text-cardText rounded-lg",
38836
38792
  "aria-label": isOpen ? "Collapse" : "Expand",
38837
38793
  title: isOpen ? "Collapse" : "Expand",
38838
38794
  children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
@@ -38856,11 +38812,11 @@ var CampaignConceptCard = import_react68.default.memo(
38856
38812
  exit: { height: 0, opacity: 0 },
38857
38813
  transition: { duration: 0.2, ease: "easeIn" },
38858
38814
  className: "overflow-hidden",
38859
- children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "px-4 py-3 w-full relative", children: [
38815
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "px-3 py-2 w-full relative", children: [
38860
38816
  /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
38861
38817
  "div",
38862
38818
  {
38863
- className: "absolute left-[60px] top-[100px] bottom-[60px] w-[3px]",
38819
+ className: "absolute left-[48px] top-[70px] bottom-[40px] w-[2px]",
38864
38820
  style: {
38865
38821
  background: `radial-gradient(circle closest-side, #3C3D3E 98%, transparent) 50%/2px 5px repeat-y, linear-gradient(#3C3D3E 50%, transparent 0) 50%/2px 10px repeat-y`
38866
38822
  }
@@ -38880,7 +38836,7 @@ var CampaignConceptCard = import_react68.default.memo(
38880
38836
  hideTitle: true,
38881
38837
  hideCopyButton: true,
38882
38838
  className: "bg-transparent border-none shadow-none mb-0 p-0",
38883
- footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-[10px] font-semibold py-4 pr-6", children: [
38839
+ footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-2 pr-4", children: [
38884
38840
  /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(CircleCheck, { className: "h-3.5 w-3.5" }),
38885
38841
  /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
38886
38842
  ] }) : formCardProps.footer
@@ -41082,1307 +41038,6 @@ function CreatorWidgetInner({
41082
41038
  }
41083
41039
  var CreatorWidget = (0, import_react76.memo)(CreatorWidgetInner);
41084
41040
 
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
41041
  // src/components/ui/index.ts
42387
41042
  var ui_exports = {};
42388
41043
  __export(ui_exports, {
@@ -42675,7 +41330,7 @@ __export(ui_exports, {
42675
41330
  // src/components/ui/button-group.tsx
42676
41331
  var import_react_slot4 = require("@radix-ui/react-slot");
42677
41332
  var import_class_variance_authority8 = require("class-variance-authority");
42678
- var import_jsx_runtime160 = require("react/jsx-runtime");
41333
+ var import_jsx_runtime150 = require("react/jsx-runtime");
42679
41334
  var buttonGroupVariants = (0, import_class_variance_authority8.cva)(
42680
41335
  "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
41336
  {
@@ -42695,7 +41350,7 @@ function ButtonGroup({
42695
41350
  orientation,
42696
41351
  ...props
42697
41352
  }) {
42698
- return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
41353
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
42699
41354
  "div",
42700
41355
  {
42701
41356
  role: "group",
@@ -42712,7 +41367,7 @@ function ButtonGroupText({
42712
41367
  ...props
42713
41368
  }) {
42714
41369
  const Comp = asChild ? import_react_slot4.Slot : "div";
42715
- return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
41370
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
42716
41371
  Comp,
42717
41372
  {
42718
41373
  className: cn(
@@ -42728,7 +41383,7 @@ function ButtonGroupSeparator({
42728
41383
  orientation = "vertical",
42729
41384
  ...props
42730
41385
  }) {
42731
- return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
41386
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
42732
41387
  Separator2,
42733
41388
  {
42734
41389
  "data-slot": "button-group-separator",
@@ -42744,9 +41399,9 @@ function ButtonGroupSeparator({
42744
41399
 
42745
41400
  // src/components/ui/empty.tsx
42746
41401
  var import_class_variance_authority9 = require("class-variance-authority");
42747
- var import_jsx_runtime161 = require("react/jsx-runtime");
41402
+ var import_jsx_runtime151 = require("react/jsx-runtime");
42748
41403
  function Empty({ className, ...props }) {
42749
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41404
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42750
41405
  "div",
42751
41406
  {
42752
41407
  "data-slot": "empty",
@@ -42759,7 +41414,7 @@ function Empty({ className, ...props }) {
42759
41414
  );
42760
41415
  }
42761
41416
  function EmptyHeader({ className, ...props }) {
42762
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41417
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42763
41418
  "div",
42764
41419
  {
42765
41420
  "data-slot": "empty-header",
@@ -42790,7 +41445,7 @@ function EmptyMedia({
42790
41445
  variant = "default",
42791
41446
  ...props
42792
41447
  }) {
42793
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41448
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42794
41449
  "div",
42795
41450
  {
42796
41451
  "data-slot": "empty-icon",
@@ -42801,7 +41456,7 @@ function EmptyMedia({
42801
41456
  );
42802
41457
  }
42803
41458
  function EmptyTitle({ className, ...props }) {
42804
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41459
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42805
41460
  "div",
42806
41461
  {
42807
41462
  "data-slot": "empty-title",
@@ -42811,7 +41466,7 @@ function EmptyTitle({ className, ...props }) {
42811
41466
  );
42812
41467
  }
42813
41468
  function EmptyDescription({ className, ...props }) {
42814
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41469
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42815
41470
  "div",
42816
41471
  {
42817
41472
  "data-slot": "empty-description",
@@ -42824,7 +41479,7 @@ function EmptyDescription({ className, ...props }) {
42824
41479
  );
42825
41480
  }
42826
41481
  function EmptyContent({ className, ...props }) {
42827
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
41482
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
42828
41483
  "div",
42829
41484
  {
42830
41485
  "data-slot": "empty-content",
@@ -42838,11 +41493,11 @@ function EmptyContent({ className, ...props }) {
42838
41493
  }
42839
41494
 
42840
41495
  // src/components/ui/field.tsx
42841
- var import_react82 = require("react");
41496
+ var import_react77 = require("react");
42842
41497
  var import_class_variance_authority10 = require("class-variance-authority");
42843
- var import_jsx_runtime162 = require("react/jsx-runtime");
41498
+ var import_jsx_runtime152 = require("react/jsx-runtime");
42844
41499
  function FieldSet({ className, ...props }) {
42845
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41500
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42846
41501
  "fieldset",
42847
41502
  {
42848
41503
  "data-slot": "field-set",
@@ -42860,7 +41515,7 @@ function FieldLegend({
42860
41515
  variant = "legend",
42861
41516
  ...props
42862
41517
  }) {
42863
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41518
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42864
41519
  "legend",
42865
41520
  {
42866
41521
  "data-slot": "field-legend",
@@ -42876,7 +41531,7 @@ function FieldLegend({
42876
41531
  );
42877
41532
  }
42878
41533
  function FieldGroup({ className, ...props }) {
42879
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41534
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42880
41535
  "div",
42881
41536
  {
42882
41537
  "data-slot": "field-group",
@@ -42916,7 +41571,7 @@ function Field({
42916
41571
  orientation = "vertical",
42917
41572
  ...props
42918
41573
  }) {
42919
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41574
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42920
41575
  "div",
42921
41576
  {
42922
41577
  role: "group",
@@ -42928,7 +41583,7 @@ function Field({
42928
41583
  );
42929
41584
  }
42930
41585
  function FieldContent({ className, ...props }) {
42931
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41586
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42932
41587
  "div",
42933
41588
  {
42934
41589
  "data-slot": "field-content",
@@ -42944,7 +41599,7 @@ function FieldLabel({
42944
41599
  className,
42945
41600
  ...props
42946
41601
  }) {
42947
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41602
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42948
41603
  Label,
42949
41604
  {
42950
41605
  "data-slot": "field-label",
@@ -42959,7 +41614,7 @@ function FieldLabel({
42959
41614
  );
42960
41615
  }
42961
41616
  function FieldTitle({ className, ...props }) {
42962
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41617
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42963
41618
  "div",
42964
41619
  {
42965
41620
  "data-slot": "field-label",
@@ -42972,7 +41627,7 @@ function FieldTitle({ className, ...props }) {
42972
41627
  );
42973
41628
  }
42974
41629
  function FieldDescription({ className, ...props }) {
42975
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41630
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
42976
41631
  "p",
42977
41632
  {
42978
41633
  "data-slot": "field-description",
@@ -42991,7 +41646,7 @@ function FieldSeparator({
42991
41646
  className,
42992
41647
  ...props
42993
41648
  }) {
42994
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(
41649
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
42995
41650
  "div",
42996
41651
  {
42997
41652
  "data-slot": "field-separator",
@@ -43002,8 +41657,8 @@ function FieldSeparator({
43002
41657
  ),
43003
41658
  ...props,
43004
41659
  children: [
43005
- /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
43006
- children && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41660
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
41661
+ children && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
43007
41662
  "span",
43008
41663
  {
43009
41664
  className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
@@ -43021,7 +41676,7 @@ function FieldError({
43021
41676
  errors,
43022
41677
  ...props
43023
41678
  }) {
43024
- const content = (0, import_react82.useMemo)(() => {
41679
+ const content = (0, import_react77.useMemo)(() => {
43025
41680
  if (children) {
43026
41681
  return children;
43027
41682
  }
@@ -43031,14 +41686,14 @@ function FieldError({
43031
41686
  if (errors?.length === 1 && errors[0]?.message) {
43032
41687
  return errors[0].message;
43033
41688
  }
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)
41689
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
41690
+ (error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("li", { children: error.message }, index)
43036
41691
  ) });
43037
41692
  }, [children, errors]);
43038
41693
  if (!content) {
43039
41694
  return null;
43040
41695
  }
43041
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
41696
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
43042
41697
  "div",
43043
41698
  {
43044
41699
  role: "alert",
@@ -43052,9 +41707,9 @@ function FieldError({
43052
41707
 
43053
41708
  // src/components/ui/input-group.tsx
43054
41709
  var import_class_variance_authority11 = require("class-variance-authority");
43055
- var import_jsx_runtime163 = require("react/jsx-runtime");
41710
+ var import_jsx_runtime153 = require("react/jsx-runtime");
43056
41711
  function InputGroup({ className, ...props }) {
43057
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41712
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43058
41713
  "div",
43059
41714
  {
43060
41715
  "data-slot": "input-group",
@@ -43098,7 +41753,7 @@ function InputGroupAddon({
43098
41753
  align = "inline-start",
43099
41754
  ...props
43100
41755
  }) {
43101
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41756
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43102
41757
  "div",
43103
41758
  {
43104
41759
  role: "group",
@@ -43138,7 +41793,7 @@ function InputGroupButton({
43138
41793
  size = "xs",
43139
41794
  ...props
43140
41795
  }) {
43141
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41796
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43142
41797
  Button,
43143
41798
  {
43144
41799
  type,
@@ -43150,7 +41805,7 @@ function InputGroupButton({
43150
41805
  );
43151
41806
  }
43152
41807
  function InputGroupText({ className, ...props }) {
43153
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41808
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43154
41809
  "span",
43155
41810
  {
43156
41811
  className: cn(
@@ -43165,7 +41820,7 @@ function InputGroupInput({
43165
41820
  className,
43166
41821
  ...props
43167
41822
  }) {
43168
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41823
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43169
41824
  Input,
43170
41825
  {
43171
41826
  "data-slot": "input-group-control",
@@ -43181,7 +41836,7 @@ function InputGroupTextarea({
43181
41836
  className,
43182
41837
  ...props
43183
41838
  }) {
43184
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
41839
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
43185
41840
  Textarea,
43186
41841
  {
43187
41842
  "data-slot": "input-group-control",
@@ -43197,9 +41852,9 @@ function InputGroupTextarea({
43197
41852
  // src/components/ui/item.tsx
43198
41853
  var import_react_slot5 = require("@radix-ui/react-slot");
43199
41854
  var import_class_variance_authority12 = require("class-variance-authority");
43200
- var import_jsx_runtime164 = require("react/jsx-runtime");
41855
+ var import_jsx_runtime154 = require("react/jsx-runtime");
43201
41856
  function ItemGroup({ className, ...props }) {
43202
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41857
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43203
41858
  "div",
43204
41859
  {
43205
41860
  role: "list",
@@ -43213,7 +41868,7 @@ function ItemSeparator({
43213
41868
  className,
43214
41869
  ...props
43215
41870
  }) {
43216
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41871
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43217
41872
  Separator2,
43218
41873
  {
43219
41874
  "data-slot": "item-separator",
@@ -43251,7 +41906,7 @@ function Item8({
43251
41906
  ...props
43252
41907
  }) {
43253
41908
  const Comp = asChild ? import_react_slot5.Slot : "div";
43254
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41909
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43255
41910
  Comp,
43256
41911
  {
43257
41912
  "data-slot": "item",
@@ -43282,7 +41937,7 @@ function ItemMedia({
43282
41937
  variant = "default",
43283
41938
  ...props
43284
41939
  }) {
43285
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41940
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43286
41941
  "div",
43287
41942
  {
43288
41943
  "data-slot": "item-media",
@@ -43293,7 +41948,7 @@ function ItemMedia({
43293
41948
  );
43294
41949
  }
43295
41950
  function ItemContent({ className, ...props }) {
43296
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41951
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43297
41952
  "div",
43298
41953
  {
43299
41954
  "data-slot": "item-content",
@@ -43306,7 +41961,7 @@ function ItemContent({ className, ...props }) {
43306
41961
  );
43307
41962
  }
43308
41963
  function ItemTitle({ className, ...props }) {
43309
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41964
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43310
41965
  "div",
43311
41966
  {
43312
41967
  "data-slot": "item-title",
@@ -43319,7 +41974,7 @@ function ItemTitle({ className, ...props }) {
43319
41974
  );
43320
41975
  }
43321
41976
  function ItemDescription({ className, ...props }) {
43322
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41977
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43323
41978
  "p",
43324
41979
  {
43325
41980
  "data-slot": "item-description",
@@ -43333,7 +41988,7 @@ function ItemDescription({ className, ...props }) {
43333
41988
  );
43334
41989
  }
43335
41990
  function ItemActions({ className, ...props }) {
43336
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
41991
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43337
41992
  "div",
43338
41993
  {
43339
41994
  "data-slot": "item-actions",
@@ -43343,7 +41998,7 @@ function ItemActions({ className, ...props }) {
43343
41998
  );
43344
41999
  }
43345
42000
  function ItemHeader({ className, ...props }) {
43346
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
42001
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43347
42002
  "div",
43348
42003
  {
43349
42004
  "data-slot": "item-header",
@@ -43356,7 +42011,7 @@ function ItemHeader({ className, ...props }) {
43356
42011
  );
43357
42012
  }
43358
42013
  function ItemFooter({ className, ...props }) {
43359
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
42014
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
43360
42015
  "div",
43361
42016
  {
43362
42017
  "data-slot": "item-footer",
@@ -43370,9 +42025,9 @@ function ItemFooter({ className, ...props }) {
43370
42025
  }
43371
42026
 
43372
42027
  // src/components/ui/kbd.tsx
43373
- var import_jsx_runtime165 = require("react/jsx-runtime");
42028
+ var import_jsx_runtime155 = require("react/jsx-runtime");
43374
42029
  function Kbd({ className, ...props }) {
43375
- return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
42030
+ return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
43376
42031
  "kbd",
43377
42032
  {
43378
42033
  "data-slot": "kbd",
@@ -43387,7 +42042,7 @@ function Kbd({ className, ...props }) {
43387
42042
  );
43388
42043
  }
43389
42044
  function KbdGroup({ className, ...props }) {
43390
- return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
42045
+ return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
43391
42046
  "kbd",
43392
42047
  {
43393
42048
  "data-slot": "kbd-group",
@@ -43398,16 +42053,16 @@ function KbdGroup({ className, ...props }) {
43398
42053
  }
43399
42054
 
43400
42055
  // src/components/ui/sidebar.tsx
43401
- var React104 = __toESM(require("react"), 1);
42056
+ var React100 = __toESM(require("react"), 1);
43402
42057
  var import_react_slot6 = require("@radix-ui/react-slot");
43403
42058
  var import_class_variance_authority13 = require("class-variance-authority");
43404
42059
 
43405
42060
  // src/hooks/use-mobile.tsx
43406
- var React103 = __toESM(require("react"), 1);
42061
+ var React99 = __toESM(require("react"), 1);
43407
42062
  var MOBILE_BREAKPOINT = 768;
43408
42063
  function useIsMobile() {
43409
- const [isMobile, setIsMobile] = React103.useState(void 0);
43410
- React103.useEffect(() => {
42064
+ const [isMobile, setIsMobile] = React99.useState(void 0);
42065
+ React99.useEffect(() => {
43411
42066
  const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
43412
42067
  const onChange = () => {
43413
42068
  setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
@@ -43420,22 +42075,22 @@ function useIsMobile() {
43420
42075
  }
43421
42076
 
43422
42077
  // src/components/ui/sidebar.tsx
43423
- var import_jsx_runtime166 = require("react/jsx-runtime");
42078
+ var import_jsx_runtime156 = require("react/jsx-runtime");
43424
42079
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
43425
42080
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
43426
42081
  var SIDEBAR_WIDTH = "16rem";
43427
42082
  var SIDEBAR_WIDTH_MOBILE = "18rem";
43428
42083
  var SIDEBAR_WIDTH_ICON = "3rem";
43429
42084
  var SIDEBAR_KEYBOARD_SHORTCUT = "b";
43430
- var SidebarContext = React104.createContext(null);
42085
+ var SidebarContext = React100.createContext(null);
43431
42086
  function useSidebar() {
43432
- const context = React104.useContext(SidebarContext);
42087
+ const context = React100.useContext(SidebarContext);
43433
42088
  if (!context) {
43434
42089
  throw new Error("useSidebar must be used within a SidebarProvider.");
43435
42090
  }
43436
42091
  return context;
43437
42092
  }
43438
- var SidebarProvider = React104.forwardRef(
42093
+ var SidebarProvider = React100.forwardRef(
43439
42094
  ({
43440
42095
  defaultOpen = true,
43441
42096
  open: openProp,
@@ -43446,10 +42101,10 @@ var SidebarProvider = React104.forwardRef(
43446
42101
  ...props
43447
42102
  }, ref) => {
43448
42103
  const isMobile = useIsMobile();
43449
- const [openMobile, setOpenMobile] = React104.useState(false);
43450
- const [_open, _setOpen] = React104.useState(defaultOpen);
42104
+ const [openMobile, setOpenMobile] = React100.useState(false);
42105
+ const [_open, _setOpen] = React100.useState(defaultOpen);
43451
42106
  const open = openProp ?? _open;
43452
- const setOpen = React104.useCallback(
42107
+ const setOpen = React100.useCallback(
43453
42108
  (value) => {
43454
42109
  const openState = typeof value === "function" ? value(open) : value;
43455
42110
  if (setOpenProp) {
@@ -43461,10 +42116,10 @@ var SidebarProvider = React104.forwardRef(
43461
42116
  },
43462
42117
  [setOpenProp, open]
43463
42118
  );
43464
- const toggleSidebar = React104.useCallback(() => {
42119
+ const toggleSidebar = React100.useCallback(() => {
43465
42120
  return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
43466
42121
  }, [isMobile, setOpen, setOpenMobile]);
43467
- React104.useEffect(() => {
42122
+ React100.useEffect(() => {
43468
42123
  const handleKeyDown = (event) => {
43469
42124
  if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
43470
42125
  event.preventDefault();
@@ -43475,7 +42130,7 @@ var SidebarProvider = React104.forwardRef(
43475
42130
  return () => window.removeEventListener("keydown", handleKeyDown);
43476
42131
  }, [toggleSidebar]);
43477
42132
  const state = open ? "expanded" : "collapsed";
43478
- const contextValue = React104.useMemo(
42133
+ const contextValue = React100.useMemo(
43479
42134
  () => ({
43480
42135
  state,
43481
42136
  open,
@@ -43487,7 +42142,7 @@ var SidebarProvider = React104.forwardRef(
43487
42142
  }),
43488
42143
  [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
43489
42144
  );
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)(
42145
+ 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
42146
  "div",
43492
42147
  {
43493
42148
  style: {
@@ -43507,7 +42162,7 @@ var SidebarProvider = React104.forwardRef(
43507
42162
  }
43508
42163
  );
43509
42164
  SidebarProvider.displayName = "SidebarProvider";
43510
- var Sidebar = React104.forwardRef(
42165
+ var Sidebar = React100.forwardRef(
43511
42166
  ({
43512
42167
  side = "left",
43513
42168
  variant = "sidebar",
@@ -43518,7 +42173,7 @@ var Sidebar = React104.forwardRef(
43518
42173
  }, ref) => {
43519
42174
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
43520
42175
  if (collapsible === "none") {
43521
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42176
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43522
42177
  "div",
43523
42178
  {
43524
42179
  className: cn(
@@ -43532,7 +42187,7 @@ var Sidebar = React104.forwardRef(
43532
42187
  );
43533
42188
  }
43534
42189
  if (isMobile) {
43535
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
42190
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
43536
42191
  SheetContent,
43537
42192
  {
43538
42193
  "data-sidebar": "sidebar",
@@ -43543,16 +42198,16 @@ var Sidebar = React104.forwardRef(
43543
42198
  },
43544
42199
  side,
43545
42200
  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." })
42201
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(SheetHeader, { className: "sr-only", children: [
42202
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(SheetTitle, { children: "Sidebar" }),
42203
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
43549
42204
  ] }),
43550
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("div", { className: "flex h-full w-full flex-col", children })
42205
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: "flex h-full w-full flex-col", children })
43551
42206
  ]
43552
42207
  }
43553
42208
  ) });
43554
42209
  }
43555
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
42210
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
43556
42211
  "div",
43557
42212
  {
43558
42213
  ref,
@@ -43562,7 +42217,7 @@ var Sidebar = React104.forwardRef(
43562
42217
  "data-variant": variant,
43563
42218
  "data-side": side,
43564
42219
  children: [
43565
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42220
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43566
42221
  "div",
43567
42222
  {
43568
42223
  className: cn(
@@ -43573,7 +42228,7 @@ var Sidebar = React104.forwardRef(
43573
42228
  )
43574
42229
  }
43575
42230
  ),
43576
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42231
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43577
42232
  "div",
43578
42233
  {
43579
42234
  className: cn(
@@ -43584,7 +42239,7 @@ var Sidebar = React104.forwardRef(
43584
42239
  className
43585
42240
  ),
43586
42241
  ...props,
43587
- children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42242
+ children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43588
42243
  "div",
43589
42244
  {
43590
42245
  "data-sidebar": "sidebar",
@@ -43600,9 +42255,9 @@ var Sidebar = React104.forwardRef(
43600
42255
  }
43601
42256
  );
43602
42257
  Sidebar.displayName = "Sidebar";
43603
- var SidebarTrigger = React104.forwardRef(({ className, onClick, ...props }, ref) => {
42258
+ var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref) => {
43604
42259
  const { toggleSidebar } = useSidebar();
43605
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
42260
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
43606
42261
  Button,
43607
42262
  {
43608
42263
  ref,
@@ -43616,16 +42271,16 @@ var SidebarTrigger = React104.forwardRef(({ className, onClick, ...props }, ref)
43616
42271
  },
43617
42272
  ...props,
43618
42273
  children: [
43619
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(PanelLeft, {}),
43620
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
42274
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(PanelLeft, {}),
42275
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
43621
42276
  ]
43622
42277
  }
43623
42278
  );
43624
42279
  });
43625
42280
  SidebarTrigger.displayName = "SidebarTrigger";
43626
- var SidebarRail = React104.forwardRef(({ className, ...props }, ref) => {
42281
+ var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
43627
42282
  const { toggleSidebar } = useSidebar();
43628
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42283
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43629
42284
  "button",
43630
42285
  {
43631
42286
  ref,
@@ -43648,8 +42303,8 @@ var SidebarRail = React104.forwardRef(({ className, ...props }, ref) => {
43648
42303
  );
43649
42304
  });
43650
42305
  SidebarRail.displayName = "SidebarRail";
43651
- var SidebarInset = React104.forwardRef(({ className, ...props }, ref) => {
43652
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42306
+ var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
42307
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43653
42308
  "main",
43654
42309
  {
43655
42310
  ref,
@@ -43663,8 +42318,8 @@ var SidebarInset = React104.forwardRef(({ className, ...props }, ref) => {
43663
42318
  );
43664
42319
  });
43665
42320
  SidebarInset.displayName = "SidebarInset";
43666
- var SidebarInput = React104.forwardRef(({ className, ...props }, ref) => {
43667
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42321
+ var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
42322
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43668
42323
  Input,
43669
42324
  {
43670
42325
  ref,
@@ -43678,8 +42333,8 @@ var SidebarInput = React104.forwardRef(({ className, ...props }, ref) => {
43678
42333
  );
43679
42334
  });
43680
42335
  SidebarInput.displayName = "SidebarInput";
43681
- var SidebarHeader = React104.forwardRef(({ className, ...props }, ref) => {
43682
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42336
+ var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
42337
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43683
42338
  "div",
43684
42339
  {
43685
42340
  ref,
@@ -43690,8 +42345,8 @@ var SidebarHeader = React104.forwardRef(({ className, ...props }, ref) => {
43690
42345
  );
43691
42346
  });
43692
42347
  SidebarHeader.displayName = "SidebarHeader";
43693
- var SidebarFooter = React104.forwardRef(({ className, ...props }, ref) => {
43694
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42348
+ var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
42349
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43695
42350
  "div",
43696
42351
  {
43697
42352
  ref,
@@ -43702,8 +42357,8 @@ var SidebarFooter = React104.forwardRef(({ className, ...props }, ref) => {
43702
42357
  );
43703
42358
  });
43704
42359
  SidebarFooter.displayName = "SidebarFooter";
43705
- var SidebarSeparator = React104.forwardRef(({ className, ...props }, ref) => {
43706
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42360
+ var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
42361
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43707
42362
  Separator2,
43708
42363
  {
43709
42364
  ref,
@@ -43714,8 +42369,8 @@ var SidebarSeparator = React104.forwardRef(({ className, ...props }, ref) => {
43714
42369
  );
43715
42370
  });
43716
42371
  SidebarSeparator.displayName = "SidebarSeparator";
43717
- var SidebarContent = React104.forwardRef(({ className, ...props }, ref) => {
43718
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42372
+ var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
42373
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43719
42374
  "div",
43720
42375
  {
43721
42376
  ref,
@@ -43729,8 +42384,8 @@ var SidebarContent = React104.forwardRef(({ className, ...props }, ref) => {
43729
42384
  );
43730
42385
  });
43731
42386
  SidebarContent.displayName = "SidebarContent";
43732
- var SidebarGroup = React104.forwardRef(({ className, ...props }, ref) => {
43733
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42387
+ var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
42388
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43734
42389
  "div",
43735
42390
  {
43736
42391
  ref,
@@ -43741,9 +42396,9 @@ var SidebarGroup = React104.forwardRef(({ className, ...props }, ref) => {
43741
42396
  );
43742
42397
  });
43743
42398
  SidebarGroup.displayName = "SidebarGroup";
43744
- var SidebarGroupLabel = React104.forwardRef(({ className, asChild = false, ...props }, ref) => {
42399
+ var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
43745
42400
  const Comp = asChild ? import_react_slot6.Slot : "div";
43746
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42401
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43747
42402
  Comp,
43748
42403
  {
43749
42404
  ref,
@@ -43758,9 +42413,9 @@ var SidebarGroupLabel = React104.forwardRef(({ className, asChild = false, ...pr
43758
42413
  );
43759
42414
  });
43760
42415
  SidebarGroupLabel.displayName = "SidebarGroupLabel";
43761
- var SidebarGroupAction = React104.forwardRef(({ className, asChild = false, ...props }, ref) => {
42416
+ var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
43762
42417
  const Comp = asChild ? import_react_slot6.Slot : "button";
43763
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42418
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43764
42419
  Comp,
43765
42420
  {
43766
42421
  ref,
@@ -43777,7 +42432,7 @@ var SidebarGroupAction = React104.forwardRef(({ className, asChild = false, ...p
43777
42432
  );
43778
42433
  });
43779
42434
  SidebarGroupAction.displayName = "SidebarGroupAction";
43780
- var SidebarGroupContent = React104.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42435
+ var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43781
42436
  "div",
43782
42437
  {
43783
42438
  ref,
@@ -43787,7 +42442,7 @@ var SidebarGroupContent = React104.forwardRef(({ className, ...props }, ref) =>
43787
42442
  }
43788
42443
  ));
43789
42444
  SidebarGroupContent.displayName = "SidebarGroupContent";
43790
- var SidebarMenu = React104.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42445
+ var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43791
42446
  "ul",
43792
42447
  {
43793
42448
  ref,
@@ -43797,7 +42452,7 @@ var SidebarMenu = React104.forwardRef(({ className, ...props }, ref) => /* @__PU
43797
42452
  }
43798
42453
  ));
43799
42454
  SidebarMenu.displayName = "SidebarMenu";
43800
- var SidebarMenuItem = React104.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42455
+ var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43801
42456
  "li",
43802
42457
  {
43803
42458
  ref,
@@ -43827,7 +42482,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority13.cva)(
43827
42482
  }
43828
42483
  }
43829
42484
  );
43830
- var SidebarMenuButton = React104.forwardRef(
42485
+ var SidebarMenuButton = React100.forwardRef(
43831
42486
  ({
43832
42487
  asChild = false,
43833
42488
  isActive = false,
@@ -43839,7 +42494,7 @@ var SidebarMenuButton = React104.forwardRef(
43839
42494
  }, ref) => {
43840
42495
  const Comp = asChild ? import_react_slot6.Slot : "button";
43841
42496
  const { isMobile, state } = useSidebar();
43842
- const button = /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42497
+ const button = /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43843
42498
  Comp,
43844
42499
  {
43845
42500
  ref,
@@ -43858,9 +42513,9 @@ var SidebarMenuButton = React104.forwardRef(
43858
42513
  children: tooltip
43859
42514
  };
43860
42515
  }
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)(
42516
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(Tooltip, { children: [
42517
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(TooltipTrigger, { asChild: true, children: button }),
42518
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43864
42519
  TooltipContent,
43865
42520
  {
43866
42521
  side: "right",
@@ -43873,9 +42528,9 @@ var SidebarMenuButton = React104.forwardRef(
43873
42528
  }
43874
42529
  );
43875
42530
  SidebarMenuButton.displayName = "SidebarMenuButton";
43876
- var SidebarMenuAction = React104.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
42531
+ var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
43877
42532
  const Comp = asChild ? import_react_slot6.Slot : "button";
43878
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42533
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43879
42534
  Comp,
43880
42535
  {
43881
42536
  ref,
@@ -43896,7 +42551,7 @@ var SidebarMenuAction = React104.forwardRef(({ className, asChild = false, showO
43896
42551
  );
43897
42552
  });
43898
42553
  SidebarMenuAction.displayName = "SidebarMenuAction";
43899
- var SidebarMenuBadge = React104.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42554
+ var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43900
42555
  "div",
43901
42556
  {
43902
42557
  ref,
@@ -43914,11 +42569,11 @@ var SidebarMenuBadge = React104.forwardRef(({ className, ...props }, ref) => /*
43914
42569
  }
43915
42570
  ));
43916
42571
  SidebarMenuBadge.displayName = "SidebarMenuBadge";
43917
- var SidebarMenuSkeleton = React104.forwardRef(({ className, showIcon = false, ...props }, ref) => {
43918
- const width = React104.useMemo(() => {
42572
+ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ...props }, ref) => {
42573
+ const width = React100.useMemo(() => {
43919
42574
  return `${Math.floor(Math.random() * 40) + 50}%`;
43920
42575
  }, []);
43921
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
42576
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
43922
42577
  "div",
43923
42578
  {
43924
42579
  ref,
@@ -43926,14 +42581,14 @@ var SidebarMenuSkeleton = React104.forwardRef(({ className, showIcon = false, ..
43926
42581
  className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
43927
42582
  ...props,
43928
42583
  children: [
43929
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42584
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43930
42585
  Skeleton,
43931
42586
  {
43932
42587
  className: "size-4 rounded-md",
43933
42588
  "data-sidebar": "menu-skeleton-icon"
43934
42589
  }
43935
42590
  ),
43936
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42591
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43937
42592
  Skeleton,
43938
42593
  {
43939
42594
  className: "h-4 max-w-[--skeleton-width] flex-1",
@@ -43948,7 +42603,7 @@ var SidebarMenuSkeleton = React104.forwardRef(({ className, showIcon = false, ..
43948
42603
  );
43949
42604
  });
43950
42605
  SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
43951
- var SidebarMenuSub = React104.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42606
+ var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43952
42607
  "ul",
43953
42608
  {
43954
42609
  ref,
@@ -43962,11 +42617,11 @@ var SidebarMenuSub = React104.forwardRef(({ className, ...props }, ref) => /* @_
43962
42617
  }
43963
42618
  ));
43964
42619
  SidebarMenuSub.displayName = "SidebarMenuSub";
43965
- var SidebarMenuSubItem = React104.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("li", { ref, ...props }));
42620
+ var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("li", { ref, ...props }));
43966
42621
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
43967
- var SidebarMenuSubButton = React104.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
42622
+ var SidebarMenuSubButton = React100.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
43968
42623
  const Comp = asChild ? import_react_slot6.Slot : "a";
43969
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
42624
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
43970
42625
  Comp,
43971
42626
  {
43972
42627
  ref,
@@ -43990,20 +42645,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
43990
42645
  // src/components/ui/sonner.tsx
43991
42646
  var import_next_themes = require("next-themes");
43992
42647
  var import_sonner = require("sonner");
43993
- var import_jsx_runtime167 = require("react/jsx-runtime");
42648
+ var import_jsx_runtime157 = require("react/jsx-runtime");
43994
42649
  var Toaster = ({ ...props }) => {
43995
42650
  const { theme = "system" } = (0, import_next_themes.useTheme)();
43996
- return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
42651
+ return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
43997
42652
  import_sonner.Toaster,
43998
42653
  {
43999
42654
  theme,
44000
42655
  className: "toaster group",
44001
42656
  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" })
42657
+ success: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(CircleCheck, { className: "h-4 w-4" }),
42658
+ info: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Info, { className: "h-4 w-4" }),
42659
+ warning: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(TriangleAlert, { className: "h-4 w-4" }),
42660
+ error: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(OctagonX, { className: "h-4 w-4" }),
42661
+ loading: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(LoaderCircle, { className: "h-4 w-4 animate-spin" })
44007
42662
  },
44008
42663
  toastOptions: {
44009
42664
  classNames: {
@@ -44019,26 +42674,26 @@ var Toaster = ({ ...props }) => {
44019
42674
  };
44020
42675
 
44021
42676
  // src/components/ui/toggle-group.tsx
44022
- var React105 = __toESM(require("react"), 1);
42677
+ var React101 = __toESM(require("react"), 1);
44023
42678
  var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
44024
- var import_jsx_runtime168 = require("react/jsx-runtime");
44025
- var ToggleGroupContext = React105.createContext({
42679
+ var import_jsx_runtime158 = require("react/jsx-runtime");
42680
+ var ToggleGroupContext = React101.createContext({
44026
42681
  size: "default",
44027
42682
  variant: "default"
44028
42683
  });
44029
- var ToggleGroup = React105.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
42684
+ var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
44030
42685
  ToggleGroupPrimitive.Root,
44031
42686
  {
44032
42687
  ref,
44033
42688
  className: cn("flex items-center justify-center gap-1", className),
44034
42689
  ...props,
44035
- children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
42690
+ children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
44036
42691
  }
44037
42692
  ));
44038
42693
  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)(
42694
+ var ToggleGroupItem = React101.forwardRef(({ className, children, variant, size, ...props }, ref) => {
42695
+ const context = React101.useContext(ToggleGroupContext);
42696
+ return /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
44042
42697
  ToggleGroupPrimitive.Item,
44043
42698
  {
44044
42699
  ref,
@@ -44057,7 +42712,7 @@ var ToggleGroupItem = React105.forwardRef(({ className, children, variant, size,
44057
42712
  ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
44058
42713
 
44059
42714
  // src/render/PXEngineRenderer.tsx
44060
- var import_jsx_runtime169 = require("react/jsx-runtime");
42715
+ var import_jsx_runtime159 = require("react/jsx-runtime");
44061
42716
  var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
44062
42717
  // Form components - require FormField + FormItem context
44063
42718
  "FormLabel",
@@ -44162,24 +42817,24 @@ var REGISTERED_COMPONENTS = /* @__PURE__ */ new Set([
44162
42817
  ]);
44163
42818
  var renderContextDependentError = (componentName, normalizedName, key) => {
44164
42819
  const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
44165
- return /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(
42820
+ return /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
44166
42821
  "div",
44167
42822
  {
44168
42823
  className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
44169
42824
  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: [
42825
+ /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "flex items-start gap-2", children: [
42826
+ /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
42827
+ /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "flex-1", children: [
42828
+ /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("p", { className: "text-sm font-semibold text-amber-900", children: [
44174
42829
  "Invalid Component: ",
44175
42830
  componentName
44176
42831
  ] }),
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." })
42832
+ /* @__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
42833
  ] })
44179
42834
  ] }),
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 })
42835
+ /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
42836
+ /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
42837
+ /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
44183
42838
  ] })
44184
42839
  ]
44185
42840
  },
@@ -44257,12 +42912,12 @@ var PXEngineRenderer = ({
44257
42912
  const root = schema.root || schema;
44258
42913
  const renderRecursive = (component, index) => {
44259
42914
  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");
42915
+ 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
42916
  }
44262
42917
  if (typeof component === "string" || typeof component === "number") {
44263
42918
  return component;
44264
42919
  }
44265
- if (import_react83.default.isValidElement(component)) {
42920
+ if (import_react78.default.isValidElement(component)) {
44266
42921
  return component;
44267
42922
  }
44268
42923
  if (!component || typeof component !== "object") return null;
@@ -44341,7 +42996,7 @@ var PXEngineRenderer = ({
44341
42996
  const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
44342
42997
  const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
44343
42998
  if (isAtomWithRenderProp) {
44344
- return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
42999
+ return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
44345
43000
  TargetComponent,
44346
43001
  {
44347
43002
  ...finalProps,
@@ -44353,7 +43008,7 @@ var PXEngineRenderer = ({
44353
43008
  uniqueKey
44354
43009
  );
44355
43010
  } else {
44356
- return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
43011
+ return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
44357
43012
  TargetComponent,
44358
43013
  {
44359
43014
  ...finalProps,
@@ -44365,7 +43020,7 @@ var PXEngineRenderer = ({
44365
43020
  );
44366
43021
  }
44367
43022
  };
44368
- return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
43023
+ return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
44369
43024
  };
44370
43025
  // Annotate the CommonJS export names for ESM import in node:
44371
43026
  0 && (module.exports = {
@@ -44375,8 +43030,6 @@ var PXEngineRenderer = ({
44375
43030
  AccordionItem,
44376
43031
  AccordionTrigger,
44377
43032
  ActionButton,
44378
- AgentCard,
44379
- AgentDataTable,
44380
43033
  Alert,
44381
43034
  AlertAtom,
44382
43035
  AlertDescription,
@@ -44535,7 +43188,6 @@ var PXEngineRenderer = ({
44535
43188
  InputOTPGroup,
44536
43189
  InputOTPSeparator,
44537
43190
  InputOTPSlot,
44538
- InstructionPreview,
44539
43191
  KbdAtom,
44540
43192
  KeywordBundlesDisplay,
44541
43193
  KeywordBundlesEdit,
@@ -44553,9 +43205,6 @@ var PXEngineRenderer = ({
44553
43205
  MenubarSeparator,
44554
43206
  MenubarShortcut,
44555
43207
  MenubarTrigger,
44556
- MultiAgentCard,
44557
- MultiAgentPlan,
44558
- MultiAgentUISelector,
44559
43208
  NavigationMenu,
44560
43209
  NavigationMenuContent,
44561
43210
  NavigationMenuItem,
@@ -44623,7 +43272,6 @@ var PXEngineRenderer = ({
44623
43272
  SocialPostCard,
44624
43273
  Spinner,
44625
43274
  SpinnerAtom,
44626
- StageIndicator,
44627
43275
  StatsGrid,
44628
43276
  StepWizard,
44629
43277
  Switch,
@@ -44647,16 +43295,13 @@ var PXEngineRenderer = ({
44647
43295
  TextareaAtom,
44648
43296
  TimelineAtom,
44649
43297
  ToggleAtom,
44650
- ToolListCard,
44651
43298
  Tooltip,
44652
43299
  TooltipAtom,
44653
43300
  TooltipContent,
44654
43301
  TooltipProvider,
44655
43302
  TooltipTrigger,
44656
43303
  TopPostsGrid,
44657
- UIComponentSelector,
44658
43304
  VideoAtom,
44659
- WorkflowVisualizer,
44660
43305
  cn,
44661
43306
  defaultFetchSelections,
44662
43307
  defaultPersistSelection,