@uipath/apollo-wind 0.13.0 → 0.14.0

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.
@@ -4,10 +4,24 @@ export interface FlowPanelNavItem {
4
4
  label: string;
5
5
  icon: React.ReactNode;
6
6
  }
7
+ export interface FlowPanelToolItem {
8
+ icon: 'search' | 'bot';
9
+ title: string;
10
+ description: string;
11
+ }
12
+ export interface FlowPanelToolCard {
13
+ title: string;
14
+ items: FlowPanelToolItem[];
15
+ }
7
16
  export interface FlowPanelChatMessage {
8
17
  id: string;
9
18
  role: 'user' | 'assistant';
10
- content: string;
19
+ /** Text content — user bubble or simple assistant text */
20
+ content?: string;
21
+ /** Collapsible reasoning trace label shown above tool card */
22
+ traceLabel?: string;
23
+ /** Expandable tool/agent card */
24
+ toolCard?: FlowPanelToolCard;
11
25
  }
12
26
  export interface FlowPanelProps {
13
27
  className?: string;
@@ -31,8 +45,8 @@ export interface FlowPanelProps {
31
45
  * chat panel.
32
46
  *
33
47
  * - **Collapsed**: 60px icon rail with logo, nav icons, and avatar
34
- * - **Expanded**: Icon rail + 420px chat panel with Flow/Autopilot tabs,
35
- * chat messages, and input field
48
+ * - **Expanded**: Icon rail + 420px chat panel with Flow title,
49
+ * chat messages, and composer input
36
50
  */
37
51
  export declare function FlowPanel({ className, open, onOpenChange, navItems, activeNavId, onNavChange, chatMessages, expandedContent, }: FlowPanelProps): import("react/jsx-runtime").JSX.Element;
38
52
  export declare const defaultFlowNavItems: FlowPanelNavItem[];
@@ -1,19 +1,42 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { CornerDownLeft, House, MessageCircle, PanelRightOpen, Plus, Workflow } from "lucide-react";
2
+ import { Bot, Brain, ChevronUp, Copy, House, MessageCircle, PanelRightOpen, RefreshCcw, Search, ThumbsDown, ThumbsUp, Workflow } from "lucide-react";
3
3
  import { useState } from "react";
4
4
  import { Avatar, AvatarFallback } from "../ui/avatar.js";
5
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../ui/collapsible.js";
5
6
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../ui/tooltip.js";
6
7
  import { cn } from "../../lib/index.js";
8
+ import { ChatComposer } from "./chat-composer.js";
7
9
  function UiPathLogo() {
8
10
  return /*#__PURE__*/ jsx("div", {
9
- className: "flex h-9 w-9 items-center justify-center rounded-lg bg-brand shadow-sm",
10
- children: /*#__PURE__*/ jsx("span", {
11
- className: "text-xs font-bold text-foreground-on-accent select-none",
12
- children: "Ui"
11
+ className: "flex h-9 w-9 items-center justify-center overflow-clip rounded-lg bg-[#0092b8] shadow-sm",
12
+ children: /*#__PURE__*/ jsxs("svg", {
13
+ viewBox: "0 0 24 24",
14
+ fill: "none",
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ className: "h-[22px] w-[22px]",
17
+ "aria-hidden": "true",
18
+ children: [
19
+ /*#__PURE__*/ jsx("path", {
20
+ d: "M18.57 11.4014H18.273C17.3139 11.4014 16.7183 12.002 16.7183 12.9686V22.4331C16.7183 23.3997 17.3139 24.0003 18.273 24.0003H18.57C19.5289 24.0003 20.1246 23.3997 20.1246 22.4331V12.9686C20.1246 12.002 19.5289 11.4014 18.57 11.4014Z",
21
+ fill: "white"
22
+ }),
23
+ /*#__PURE__*/ jsx("path", {
24
+ d: "M22.689 5.54073C20.5215 5.19295 18.8111 3.48437 18.463 1.31918C18.4564 1.27831 18.4034 1.27831 18.3968 1.31918C18.0487 3.48437 16.3383 5.19295 14.1708 5.54073C14.1299 5.54728 14.1299 5.60028 14.1708 5.60683C16.3383 5.95453 18.0487 7.66319 18.3968 9.82838C18.4034 9.86925 18.4564 9.86925 18.463 9.82838C18.8111 7.66319 20.5215 5.95453 22.689 5.60683C22.73 5.60028 22.73 5.54728 22.689 5.54073ZM20.5595 5.59031C19.4757 5.76416 18.6205 6.61848 18.4465 7.70108C18.4432 7.72151 18.4167 7.72151 18.4134 7.70108C18.2393 6.61848 17.3841 5.76416 16.3003 5.59031C16.2799 5.58703 16.2799 5.56053 16.3003 5.55725C17.3841 5.38337 18.2393 4.52907 18.4134 3.44648C18.4167 3.42604 18.4432 3.42604 18.4465 3.44648C18.6205 4.52907 19.4757 5.38337 20.5595 5.55725C20.5799 5.56053 20.5799 5.58703 20.5595 5.59031Z",
25
+ fill: "white"
26
+ }),
27
+ /*#__PURE__*/ jsx("path", {
28
+ d: "M23.9846 2.15915C22.9008 2.33301 22.0456 3.18733 21.8716 4.26993C21.8683 4.29036 21.8418 4.29036 21.8385 4.26993C21.6645 3.18733 20.8092 2.33301 19.7255 2.15915C19.705 2.15588 19.705 2.12938 19.7255 2.1261C20.8092 1.95221 21.6645 1.09792 21.8385 0.0153254C21.8418 -0.00510845 21.8683 -0.00510845 21.8716 0.0153254C22.0456 1.09792 22.9008 1.95221 23.9846 2.1261C24.0051 2.12938 24.0051 2.15588 23.9846 2.15915Z",
29
+ fill: "white"
30
+ }),
31
+ /*#__PURE__*/ jsx("path", {
32
+ d: "M12.7647 6.85913H12.4063C11.4704 6.85913 10.889 7.4373 10.889 8.36778V15.8529C10.889 19.4018 9.80316 20.8493 7.14102 20.8493C4.47888 20.8493 3.393 19.3952 3.393 15.8306V8.36778C3.393 7.4373 2.8116 6.85913 1.87582 6.85913H1.51723C0.581398 6.85913 0 7.4373 0 8.36778V15.8529C0 21.259 2.40265 24.0001 7.14102 24.0001C11.8794 24.0001 14.2819 21.259 14.2819 15.8529V8.36778C14.2819 7.4373 13.7005 6.85913 12.7647 6.85913Z",
33
+ fill: "white"
34
+ })
35
+ ]
13
36
  })
14
37
  });
15
38
  }
16
- function IconRail({ navItems, activeId, onNavClick, hasShadow }) {
39
+ function IconRail({ navItems, activeId, onNavClick, onLogoClick, hasShadow }) {
17
40
  return /*#__PURE__*/ jsxs("div", {
18
41
  className: cn('flex w-[60px] shrink-0 flex-col justify-between bg-surface-overlay', hasShadow && 'shadow-[0px_4px_16px_0px_rgba(0,0,0,0.25)]'),
19
42
  children: [
@@ -22,21 +45,41 @@ function IconRail({ navItems, activeId, onNavClick, hasShadow }) {
22
45
  children: [
23
46
  /*#__PURE__*/ jsx("div", {
24
47
  className: "flex h-[60px] w-[60px] shrink-0 items-center justify-center",
25
- children: /*#__PURE__*/ jsx(UiPathLogo, {})
48
+ children: /*#__PURE__*/ jsxs(Tooltip, {
49
+ children: [
50
+ /*#__PURE__*/ jsx(TooltipTrigger, {
51
+ asChild: true,
52
+ children: /*#__PURE__*/ jsx("button", {
53
+ type: "button",
54
+ onClick: onLogoClick,
55
+ "aria-label": "UiPath",
56
+ className: "rounded-lg transition-opacity hover:opacity-80",
57
+ children: /*#__PURE__*/ jsx(UiPathLogo, {})
58
+ })
59
+ }),
60
+ /*#__PURE__*/ jsx(TooltipContent, {
61
+ side: "right",
62
+ children: "UiPath"
63
+ })
64
+ ]
65
+ })
26
66
  }),
27
67
  /*#__PURE__*/ jsx("nav", {
28
- className: "flex flex-col items-center pt-[18px]",
68
+ className: "flex flex-col items-center gap-1 pt-[18px]",
29
69
  children: navItems.map((item)=>/*#__PURE__*/ jsxs(Tooltip, {
30
70
  children: [
31
71
  /*#__PURE__*/ jsx(TooltipTrigger, {
32
72
  asChild: true,
33
73
  children: /*#__PURE__*/ jsx("button", {
34
74
  type: "button",
35
- className: cn('flex h-12 w-full items-center justify-center text-foreground-muted transition-colors hover:text-foreground', activeId === item.id && 'text-brand-foreground'),
75
+ className: "group flex h-12 w-full items-center justify-center",
36
76
  onClick: ()=>onNavClick(item.id),
37
77
  children: /*#__PURE__*/ jsx("div", {
38
- className: cn('flex h-9 w-9 items-center justify-center rounded-lg transition-colors', activeId === item.id && 'bg-surface-hover'),
39
- children: item.icon
78
+ className: cn('flex h-9 w-9 items-center justify-center rounded-lg text-foreground-muted group-hover:bg-surface-hover group-hover:text-foreground-hover', activeId === item.id && 'bg-surface-hover text-foreground-hover'),
79
+ children: /*#__PURE__*/ jsx("div", {
80
+ className: "h-5 w-5 group-hover:scale-[1.2]",
81
+ children: item.icon
82
+ })
40
83
  })
41
84
  })
42
85
  }),
@@ -62,75 +105,180 @@ function IconRail({ navItems, activeId, onNavClick, hasShadow }) {
62
105
  ]
63
106
  });
64
107
  }
108
+ const toolIconMap = {
109
+ search: Search,
110
+ bot: Bot
111
+ };
112
+ function ToolCard({ card }) {
113
+ const [open, setOpen] = useState(true);
114
+ return /*#__PURE__*/ jsx(Collapsible, {
115
+ open: open,
116
+ onOpenChange: setOpen,
117
+ children: /*#__PURE__*/ jsxs("div", {
118
+ className: "overflow-hidden rounded-2xl border border-surface-hover",
119
+ children: [
120
+ /*#__PURE__*/ jsx(CollapsibleTrigger, {
121
+ asChild: true,
122
+ children: /*#__PURE__*/ jsxs("button", {
123
+ type: "button",
124
+ className: "flex w-full items-center justify-between border-b border-surface-hover p-4",
125
+ children: [
126
+ /*#__PURE__*/ jsx("span", {
127
+ className: "whitespace-nowrap text-sm font-normal leading-5 text-foreground",
128
+ children: card.title
129
+ }),
130
+ /*#__PURE__*/ jsx(ChevronUp, {
131
+ className: cn('h-4 w-4 shrink-0 text-foreground-muted transition-transform duration-200', !open && 'rotate-180')
132
+ })
133
+ ]
134
+ })
135
+ }),
136
+ /*#__PURE__*/ jsx(CollapsibleContent, {
137
+ className: "overflow-hidden data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up",
138
+ children: /*#__PURE__*/ jsxs("div", {
139
+ className: "flex flex-col gap-2 pb-4 pt-1",
140
+ children: [
141
+ /*#__PURE__*/ jsx("p", {
142
+ className: "px-4 py-[5px] text-xs text-foreground-muted",
143
+ children: "Agents and tools used"
144
+ }),
145
+ /*#__PURE__*/ jsx("div", {
146
+ className: "flex flex-col gap-3",
147
+ children: card.items.map((item, i)=>{
148
+ const Icon = toolIconMap[item.icon];
149
+ return /*#__PURE__*/ jsxs("div", {
150
+ className: "flex items-start gap-2.5 pl-4 pr-9",
151
+ children: [
152
+ /*#__PURE__*/ jsx("div", {
153
+ className: "flex h-5 w-5 shrink-0 items-center justify-center",
154
+ children: /*#__PURE__*/ jsx(Icon, {
155
+ className: "h-4 w-4 text-foreground-secondary"
156
+ })
157
+ }),
158
+ /*#__PURE__*/ jsxs("div", {
159
+ className: "flex flex-col gap-0.5",
160
+ children: [
161
+ /*#__PURE__*/ jsx("p", {
162
+ className: "text-sm font-normal leading-4 text-foreground",
163
+ children: item.title
164
+ }),
165
+ /*#__PURE__*/ jsx("p", {
166
+ className: "text-sm font-normal leading-5 text-foreground-muted",
167
+ children: item.description
168
+ })
169
+ ]
170
+ })
171
+ ]
172
+ }, i);
173
+ })
174
+ })
175
+ ]
176
+ })
177
+ })
178
+ ]
179
+ })
180
+ });
181
+ }
182
+ function MessageActions() {
183
+ return /*#__PURE__*/ jsx("div", {
184
+ className: "flex items-center gap-2",
185
+ children: [
186
+ {
187
+ icon: RefreshCcw,
188
+ label: 'Refresh'
189
+ },
190
+ {
191
+ icon: ThumbsUp,
192
+ label: 'Thumbs up'
193
+ },
194
+ {
195
+ icon: ThumbsDown,
196
+ label: 'Thumbs down'
197
+ },
198
+ {
199
+ icon: Copy,
200
+ label: 'Copy'
201
+ }
202
+ ].map(({ icon: Icon, label })=>/*#__PURE__*/ jsx("button", {
203
+ type: "button",
204
+ "aria-label": label,
205
+ className: "flex h-6 w-6 items-center justify-center overflow-hidden rounded text-foreground-muted hover:text-foreground",
206
+ children: /*#__PURE__*/ jsx(Icon, {
207
+ className: "h-4 w-4"
208
+ })
209
+ }, label))
210
+ });
211
+ }
65
212
  function DefaultChatContent({ chatMessages }) {
213
+ const [openTraces, setOpenTraces] = useState({});
214
+ const isTraceOpen = (id)=>openTraces[id] ?? true;
215
+ const toggleTrace = (id)=>{
216
+ setOpenTraces((prev)=>({
217
+ ...prev,
218
+ [id]: !isTraceOpen(id)
219
+ }));
220
+ };
66
221
  return /*#__PURE__*/ jsx("div", {
67
- className: "flex flex-1 flex-col justify-end gap-7 overflow-y-auto",
68
- children: chatMessages.map((msg)=>'user' === msg.role ? /*#__PURE__*/ jsx("div", {
69
- className: "flex flex-col items-end pr-6",
222
+ className: "flex flex-1 flex-col justify-end gap-7 overflow-y-auto py-2",
223
+ children: chatMessages.map((msg)=>{
224
+ if ('user' === msg.role) return /*#__PURE__*/ jsx("div", {
225
+ className: "flex flex-col items-end pl-4 w-full",
70
226
  children: /*#__PURE__*/ jsx("div", {
71
- className: "max-w-[360px] rounded-tl-2xl rounded-tr-2xl rounded-bl-2xl rounded-br-[4px] bg-surface-raised px-6 py-4",
227
+ className: "max-w-[360px] rounded-tl-2xl rounded-tr-2xl rounded-bl-2xl rounded-br-[4px] bg-surface-raised pl-6 pr-9 py-4",
72
228
  children: /*#__PURE__*/ jsx("p", {
73
- className: "text-base leading-6 tracking-[-0.4px] text-foreground",
229
+ className: "text-sm font-normal leading-6 text-foreground-secondary",
74
230
  children: msg.content
75
231
  })
76
232
  })
77
- }, msg.id) : /*#__PURE__*/ jsx("div", {
78
- className: "flex items-center gap-2",
79
- children: /*#__PURE__*/ jsx("p", {
80
- className: "text-base font-medium leading-5 text-foreground-muted",
81
- children: msg.content
82
- })
83
- }, msg.id))
84
- });
85
- }
86
- function ChatInput() {
87
- return /*#__PURE__*/ jsxs("div", {
88
- className: "flex flex-col gap-3",
89
- children: [
90
- /*#__PURE__*/ jsx("div", {
91
- className: "flex h-12 items-center rounded-2xl border border-border bg-surface-raised px-4",
92
- children: /*#__PURE__*/ jsx("input", {
93
- type: "text",
94
- placeholder: "Ask me to help build your Flow",
95
- className: "flex-1 bg-transparent text-sm text-foreground placeholder:text-foreground-subtle outline-none",
96
- readOnly: true
97
- })
98
- }),
99
- /*#__PURE__*/ jsxs("div", {
100
- className: "flex items-center justify-between",
233
+ }, msg.id);
234
+ const traceOpen = isTraceOpen(msg.id);
235
+ return /*#__PURE__*/ jsxs("div", {
236
+ className: "flex flex-col gap-4",
101
237
  children: [
102
- /*#__PURE__*/ jsxs("div", {
103
- className: "flex items-center gap-2",
238
+ msg.traceLabel && /*#__PURE__*/ jsxs(Collapsible, {
239
+ open: traceOpen,
240
+ onOpenChange: ()=>toggleTrace(msg.id),
104
241
  children: [
105
- /*#__PURE__*/ jsx("button", {
106
- type: "button",
107
- className: "flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted hover:text-foreground",
108
- "aria-label": "Add attachment",
109
- children: /*#__PURE__*/ jsx(Plus, {
110
- className: "h-5 w-5"
242
+ /*#__PURE__*/ jsx(CollapsibleTrigger, {
243
+ asChild: true,
244
+ children: /*#__PURE__*/ jsxs("button", {
245
+ type: "button",
246
+ className: "flex items-center gap-2 text-left",
247
+ children: [
248
+ /*#__PURE__*/ jsx(Brain, {
249
+ className: "h-4 w-4 shrink-0 text-foreground-muted"
250
+ }),
251
+ /*#__PURE__*/ jsx("span", {
252
+ className: "text-sm font-medium leading-5 text-foreground-muted",
253
+ children: msg.traceLabel
254
+ }),
255
+ /*#__PURE__*/ jsx(ChevronUp, {
256
+ className: cn('h-4 w-4 shrink-0 text-foreground-muted transition-transform duration-200', !traceOpen && 'rotate-180')
257
+ })
258
+ ]
111
259
  })
112
260
  }),
113
- /*#__PURE__*/ jsx("button", {
114
- type: "button",
115
- className: "flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted hover:text-foreground",
116
- "aria-label": "Add workflow",
117
- children: /*#__PURE__*/ jsx(Workflow, {
118
- className: "h-5 w-5"
261
+ msg.toolCard && /*#__PURE__*/ jsx(CollapsibleContent, {
262
+ className: "overflow-hidden data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up",
263
+ children: /*#__PURE__*/ jsxs("div", {
264
+ className: "flex flex-col gap-2 pt-4",
265
+ children: [
266
+ /*#__PURE__*/ jsx(ToolCard, {
267
+ card: msg.toolCard
268
+ }),
269
+ /*#__PURE__*/ jsx(MessageActions, {})
270
+ ]
119
271
  })
120
272
  })
121
273
  ]
122
274
  }),
123
- /*#__PURE__*/ jsx("button", {
124
- type: "button",
125
- className: "flex h-8 w-8 items-center justify-center rounded-full bg-brand text-foreground-on-accent",
126
- "aria-label": "Submit message",
127
- children: /*#__PURE__*/ jsx(CornerDownLeft, {
128
- className: "h-4 w-4"
129
- })
275
+ msg.content && /*#__PURE__*/ jsx("p", {
276
+ className: "text-sm font-normal leading-5 text-foreground-muted",
277
+ children: msg.content
130
278
  })
131
279
  ]
132
- })
133
- ]
280
+ }, msg.id);
281
+ })
134
282
  });
135
283
  }
136
284
  function ExpandedPanel({ chatMessages, expandedContent, onClose }) {
@@ -140,22 +288,13 @@ function ExpandedPanel({ chatMessages, expandedContent, onClose }) {
140
288
  /*#__PURE__*/ jsxs("div", {
141
289
  className: "flex items-center justify-between",
142
290
  children: [
143
- /*#__PURE__*/ jsxs("div", {
144
- className: "flex items-center gap-4 text-base tracking-[-0.6px] leading-9",
145
- children: [
146
- /*#__PURE__*/ jsx("span", {
147
- className: "font-bold text-foreground",
148
- children: "Flow"
149
- }),
150
- /*#__PURE__*/ jsx("span", {
151
- className: "font-medium text-foreground-subtle",
152
- children: "Autopilot"
153
- })
154
- ]
291
+ /*#__PURE__*/ jsx("span", {
292
+ className: "text-base font-bold leading-9 tracking-tight text-foreground",
293
+ children: "Flow"
155
294
  }),
156
295
  /*#__PURE__*/ jsx("button", {
157
296
  type: "button",
158
- className: "text-foreground-muted transition-colors hover:text-foreground",
297
+ className: "flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted transition-colors hover:bg-surface-hover hover:text-foreground",
159
298
  onClick: onClose,
160
299
  "aria-label": "Close panel",
161
300
  children: /*#__PURE__*/ jsx(PanelRightOpen, {
@@ -167,7 +306,12 @@ function ExpandedPanel({ chatMessages, expandedContent, onClose }) {
167
306
  expandedContent ?? /*#__PURE__*/ jsx(DefaultChatContent, {
168
307
  chatMessages: chatMessages
169
308
  }),
170
- /*#__PURE__*/ jsx(ChatInput, {})
309
+ /*#__PURE__*/ jsx("div", {
310
+ className: "pt-12",
311
+ children: /*#__PURE__*/ jsx(ChatComposer, {
312
+ placeholder: "Ask me to help build your Flow"
313
+ })
314
+ })
171
315
  ]
172
316
  });
173
317
  }
@@ -179,6 +323,9 @@ function FlowPanel({ className, open = false, onOpenChange, navItems = [], activ
179
323
  onNavChange?.(id);
180
324
  onOpenChange?.(true);
181
325
  };
326
+ const handleLogoClick = ()=>{
327
+ onOpenChange?.(!open);
328
+ };
182
329
  return /*#__PURE__*/ jsx(TooltipProvider, {
183
330
  delayDuration: 300,
184
331
  children: /*#__PURE__*/ jsxs("div", {
@@ -188,12 +335,20 @@ function FlowPanel({ className, open = false, onOpenChange, navItems = [], activ
188
335
  navItems: navItems,
189
336
  activeId: activeId,
190
337
  onNavClick: handleNavClick,
338
+ onLogoClick: handleLogoClick,
191
339
  hasShadow: open
192
340
  }),
193
- open && /*#__PURE__*/ jsx(ExpandedPanel, {
194
- chatMessages: chatMessages,
195
- expandedContent: expandedContent,
196
- onClose: ()=>onOpenChange?.(false)
341
+ /*#__PURE__*/ jsx("div", {
342
+ className: "overflow-hidden shrink-0",
343
+ style: {
344
+ width: open ? 420 : 0,
345
+ transition: 'width 300ms ease-out'
346
+ },
347
+ children: /*#__PURE__*/ jsx(ExpandedPanel, {
348
+ chatMessages: chatMessages,
349
+ expandedContent: expandedContent,
350
+ onClose: ()=>onOpenChange?.(false)
351
+ })
197
352
  })
198
353
  ]
199
354
  })
@@ -204,21 +359,21 @@ const defaultFlowNavItems = [
204
359
  id: 'chat',
205
360
  label: 'Chat',
206
361
  icon: /*#__PURE__*/ jsx(MessageCircle, {
207
- className: "h-5 w-5"
362
+ className: "h-full w-full"
208
363
  })
209
364
  },
210
365
  {
211
366
  id: 'home',
212
367
  label: 'Home',
213
368
  icon: /*#__PURE__*/ jsx(House, {
214
- className: "h-5 w-5"
369
+ className: "h-full w-full"
215
370
  })
216
371
  },
217
372
  {
218
373
  id: 'flows',
219
374
  label: 'Flows',
220
375
  icon: /*#__PURE__*/ jsx(Workflow, {
221
- className: "h-5 w-5"
376
+ className: "h-full w-full"
222
377
  })
223
378
  }
224
379
  ];
@@ -32,32 +32,34 @@ const external_lucide_react_namespaceObject = require("lucide-react");
32
32
  const index_cjs_namespaceObject = require("../../lib/index.cjs");
33
33
  function ToolbarSeparator() {
34
34
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
35
- className: "h-8 w-px bg-border-subtle"
35
+ className: "h-8 w-px bg-surface-overlay"
36
36
  });
37
37
  }
38
- function ToolbarButton({ icon, label, onClick }) {
38
+ function ToolbarButton({ icon: Icon, label, onClick }) {
39
39
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
40
40
  type: "button",
41
- className: "flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted transition-colors hover:text-foreground",
41
+ className: "group flex h-8 w-8 items-center justify-center rounded-lg text-foreground-muted hover:bg-surface-hover hover:text-foreground",
42
42
  onClick: onClick,
43
43
  "aria-label": label,
44
- children: icon
44
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Icon, {
45
+ className: "h-5 w-5 group-hover:h-6 group-hover:w-6"
46
+ })
45
47
  });
46
48
  }
47
49
  function FlowCanvasToolbar({ className, activeMode = 'build', onModeChange }) {
48
50
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
49
- className: (0, index_cjs_namespaceObject.cn)('flex h-[60px] items-center gap-2 rounded-3xl border border-border bg-surface-raised px-2.5', className),
51
+ className: (0, index_cjs_namespaceObject.cn)('flex h-[60px] items-center gap-2 rounded-[24px] border border-surface-overlay bg-surface-raised px-2.5', className),
50
52
  children: [
51
53
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
52
- className: "flex h-10 items-center rounded-xl border border-border-deep bg-surface-overlay p-1",
54
+ className: "flex h-10 items-center gap-1 rounded-xl border border-surface-overlay p-1",
53
55
  children: [
54
56
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
55
57
  type: "button",
56
- className: (0, index_cjs_namespaceObject.cn)('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5 transition-colors', 'build' === activeMode ? 'border border-border bg-surface text-foreground' : 'text-foreground-subtle hover:text-foreground-hover'),
58
+ className: (0, index_cjs_namespaceObject.cn)('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5', 'build' === activeMode ? 'border border-surface-hover bg-foreground-inverse text-foreground shadow-[0px_4px_4px_0px_rgba(0,0,0,0.05)] hover:border-transparent hover:bg-surface-hover hover:shadow-none' : 'text-foreground-muted hover:bg-surface-hover hover:text-foreground'),
57
59
  onClick: ()=>onModeChange?.('build'),
58
60
  children: [
59
61
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Workflow, {
60
- className: "h-5 w-5"
62
+ className: (0, index_cjs_namespaceObject.cn)('h-5 w-5', 'build' === activeMode ? 'text-foreground-accent' : '')
61
63
  }),
62
64
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
63
65
  children: "Build"
@@ -66,11 +68,11 @@ function FlowCanvasToolbar({ className, activeMode = 'build', onModeChange }) {
66
68
  }),
67
69
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
68
70
  type: "button",
69
- className: (0, index_cjs_namespaceObject.cn)('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5 transition-colors', 'evaluate' === activeMode ? 'border border-border bg-surface text-foreground' : 'text-foreground-subtle hover:text-foreground-hover'),
71
+ className: (0, index_cjs_namespaceObject.cn)('flex h-8 items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium leading-5', 'evaluate' === activeMode ? 'border border-surface-hover bg-foreground-inverse text-foreground shadow-[0px_4px_4px_0px_rgba(0,0,0,0.05)] hover:border-transparent hover:bg-surface-hover hover:shadow-none' : 'text-foreground-muted hover:bg-surface-hover hover:text-foreground'),
70
72
  onClick: ()=>onModeChange?.('evaluate'),
71
73
  children: [
72
74
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ListChecks, {
73
- className: "h-5 w-5"
75
+ className: (0, index_cjs_namespaceObject.cn)('h-5 w-5', 'evaluate' === activeMode ? 'text-foreground-accent' : '')
74
76
  }),
75
77
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
76
78
  children: "Evaluate"
@@ -81,35 +83,25 @@ function FlowCanvasToolbar({ className, activeMode = 'build', onModeChange }) {
81
83
  }),
82
84
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
83
85
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
84
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Undo2, {
85
- className: "h-5 w-5"
86
- }),
86
+ icon: external_lucide_react_namespaceObject.Undo2,
87
87
  label: "Undo"
88
88
  }),
89
89
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
90
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Redo2, {
91
- className: "h-5 w-5"
92
- }),
90
+ icon: external_lucide_react_namespaceObject.Redo2,
93
91
  label: "Redo"
94
92
  }),
95
93
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
96
94
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
97
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Play, {
98
- className: "h-5 w-5"
99
- }),
95
+ icon: external_lucide_react_namespaceObject.Play,
100
96
  label: "Run"
101
97
  }),
102
98
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarSeparator, {}),
103
99
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
104
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
105
- className: "h-5 w-5"
106
- }),
100
+ icon: external_lucide_react_namespaceObject.Plus,
107
101
  label: "Add node"
108
102
  }),
109
103
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToolbarButton, {
110
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.StickyNote, {
111
- className: "h-5 w-5"
112
- }),
104
+ icon: external_lucide_react_namespaceObject.StickyNote,
113
105
  label: "Add note"
114
106
  })
115
107
  ]