@leanmcp/ui 0.2.1 → 0.3.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.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk3PV26V5F_js = require('./chunk-3PV26V5F.js');
4
- var React25 = require('react');
3
+ var chunk2HRO6CFU_js = require('./chunk-2HRO6CFU.js');
4
+ var React26 = require('react');
5
5
  var extApps = require('@modelcontextprotocol/ext-apps');
6
6
  var lucideReact = require('lucide-react');
7
7
  var nextThemes = require('next-themes');
@@ -49,7 +49,7 @@ function _interopNamespace(e) {
49
49
  return Object.freeze(n);
50
50
  }
51
51
 
52
- var React25__namespace = /*#__PURE__*/_interopNamespace(React25);
52
+ var React26__namespace = /*#__PURE__*/_interopNamespace(React26);
53
53
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
54
54
  var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
55
55
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
@@ -64,30 +64,33 @@ var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPr
64
64
  var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
65
65
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
66
66
 
67
- var McpAppContext = /* @__PURE__ */ React25.createContext(null);
67
+ var McpAppContext = /* @__PURE__ */ React26.createContext(null);
68
68
  function AppProvider({ appInfo, capabilities = {}, options = {
69
69
  autoResize: true
70
70
  }, onTeardown, children }) {
71
- const [app, setApp] = React25.useState(null);
72
- const [isConnected, setIsConnected] = React25.useState(false);
73
- const [error, setError] = React25.useState(null);
74
- const [hostContext, setHostContext] = React25.useState({});
75
- const [toolInput, setToolInput] = React25.useState(null);
76
- const [toolInputPartial, setToolInputPartial] = React25.useState(null);
77
- const [toolResult, setToolResult] = React25.useState(null);
78
- const [toolCancelled, setToolCancelled] = React25.useState({
71
+ const [app, setApp] = React26.useState(null);
72
+ const [isConnected, setIsConnected] = React26.useState(false);
73
+ const [error, setError] = React26.useState(null);
74
+ const [hostContext, setHostContext] = React26.useState({});
75
+ const [toolInput, setToolInput] = React26.useState(null);
76
+ const [toolInputPartial, setToolInputPartial] = React26.useState(null);
77
+ const [toolResult, setToolResult] = React26.useState(null);
78
+ const [toolCancelled, setToolCancelled] = React26.useState({
79
79
  cancelled: false
80
80
  });
81
- const stylesApplied = React25.useRef(false);
82
- const applyHostStyles = React25.useCallback((context) => {
81
+ const stylesApplied = React26.useRef(false);
82
+ const applyHostStyles = React26.useCallback((context) => {
83
83
  if (context.theme) {
84
84
  extApps.applyDocumentTheme(context.theme);
85
85
  }
86
86
  if (context.styles?.variables) {
87
87
  extApps.applyHostStyleVariables(context.styles.variables);
88
88
  }
89
+ if (context.styles?.css?.fonts) {
90
+ extApps.applyHostFonts(context.styles.css.fonts);
91
+ }
89
92
  }, []);
90
- React25.useEffect(() => {
93
+ React26.useEffect(() => {
91
94
  let mounted = true;
92
95
  let appInstance = null;
93
96
  async function connect() {
@@ -156,7 +159,7 @@ function AppProvider({ appInfo, capabilities = {}, options = {
156
159
  }
157
160
  }
158
161
  }
159
- chunk3PV26V5F_js.__name(connect, "connect");
162
+ chunk2HRO6CFU_js.__name(connect, "connect");
160
163
  connect();
161
164
  return () => {
162
165
  mounted = false;
@@ -170,7 +173,7 @@ function AppProvider({ appInfo, capabilities = {}, options = {
170
173
  applyHostStyles,
171
174
  onTeardown
172
175
  ]);
173
- const callTool = React25.useCallback(async (name, args = {}) => {
176
+ const callTool = React26.useCallback(async (name, args = {}) => {
174
177
  if (!app) {
175
178
  throw new Error("Not connected to host");
176
179
  }
@@ -186,7 +189,7 @@ function AppProvider({ appInfo, capabilities = {}, options = {
186
189
  }, [
187
190
  app
188
191
  ]);
189
- const sendMessage = React25.useCallback(async (text) => {
192
+ const sendMessage = React26.useCallback(async (text) => {
190
193
  if (!app) {
191
194
  console.warn("[AppProvider] Not connected - cannot send message");
192
195
  return;
@@ -203,7 +206,7 @@ function AppProvider({ appInfo, capabilities = {}, options = {
203
206
  }, [
204
207
  app
205
208
  ]);
206
- const sendLog = React25.useCallback(async (level, data) => {
209
+ const sendLog = React26.useCallback(async (level, data) => {
207
210
  if (!app) {
208
211
  console.log(`[MCP App] ${level}:`, data);
209
212
  return;
@@ -215,7 +218,7 @@ function AppProvider({ appInfo, capabilities = {}, options = {
215
218
  }, [
216
219
  app
217
220
  ]);
218
- const openLink = React25.useCallback(async (url) => {
221
+ const openLink = React26.useCallback(async (url) => {
219
222
  if (!app) {
220
223
  window.open(url, "_blank", "noopener,noreferrer");
221
224
  return;
@@ -226,7 +229,7 @@ function AppProvider({ appInfo, capabilities = {}, options = {
226
229
  }, [
227
230
  app
228
231
  ]);
229
- const requestDisplayMode = React25.useCallback(async (mode) => {
232
+ const requestDisplayMode = React26.useCallback(async (mode) => {
230
233
  if (!app) {
231
234
  console.warn("[AppProvider] Not connected - cannot request display mode");
232
235
  return "inline";
@@ -254,14 +257,14 @@ function AppProvider({ appInfo, capabilities = {}, options = {
254
257
  requestDisplayMode
255
258
  };
256
259
  const theme = hostContext.theme ?? "light";
257
- return /* @__PURE__ */ React25__namespace.default.createElement(McpAppContext.Provider, {
260
+ return /* @__PURE__ */ React26__namespace.default.createElement(McpAppContext.Provider, {
258
261
  value
259
- }, /* @__PURE__ */ React25__namespace.default.createElement("div", {
262
+ }, /* @__PURE__ */ React26__namespace.default.createElement("div", {
260
263
  className: "lui-root",
261
264
  "data-theme": theme
262
265
  }, children));
263
266
  }
264
- chunk3PV26V5F_js.__name(AppProvider, "AppProvider");
267
+ chunk2HRO6CFU_js.__name(AppProvider, "AppProvider");
265
268
  var ssrDefaultContext = {
266
269
  app: null,
267
270
  isConnected: false,
@@ -273,41 +276,158 @@ var ssrDefaultContext = {
273
276
  toolCancelled: {
274
277
  cancelled: false
275
278
  },
276
- callTool: /* @__PURE__ */ chunk3PV26V5F_js.__name(async () => {
279
+ callTool: /* @__PURE__ */ chunk2HRO6CFU_js.__name(async () => {
277
280
  throw new Error("callTool not available during SSR");
278
281
  }, "callTool"),
279
- sendMessage: /* @__PURE__ */ chunk3PV26V5F_js.__name(async () => {
282
+ sendMessage: /* @__PURE__ */ chunk2HRO6CFU_js.__name(async () => {
280
283
  console.warn("sendMessage not available during SSR");
281
284
  }, "sendMessage"),
282
- sendLog: /* @__PURE__ */ chunk3PV26V5F_js.__name(async () => {
285
+ sendLog: /* @__PURE__ */ chunk2HRO6CFU_js.__name(async () => {
283
286
  console.warn("sendLog not available during SSR");
284
287
  }, "sendLog"),
285
- openLink: /* @__PURE__ */ chunk3PV26V5F_js.__name(async () => {
288
+ openLink: /* @__PURE__ */ chunk2HRO6CFU_js.__name(async () => {
286
289
  console.warn("openLink not available during SSR");
287
290
  }, "openLink"),
288
- requestDisplayMode: /* @__PURE__ */ chunk3PV26V5F_js.__name(async () => {
291
+ requestDisplayMode: /* @__PURE__ */ chunk2HRO6CFU_js.__name(async () => {
289
292
  console.warn("requestDisplayMode not available during SSR");
290
293
  return "inline";
291
294
  }, "requestDisplayMode")
292
295
  };
293
296
  function useMcpApp() {
294
- const context = React25.useContext(McpAppContext);
297
+ const context = React26.useContext(McpAppContext);
295
298
  if (!context) {
296
299
  return ssrDefaultContext;
297
300
  }
298
301
  return context;
299
302
  }
300
- chunk3PV26V5F_js.__name(useMcpApp, "useMcpApp");
303
+ chunk2HRO6CFU_js.__name(useMcpApp, "useMcpApp");
304
+ var GptAppContext = /* @__PURE__ */ React26.createContext(null);
305
+ function GPTAppProvider({ appName, children }) {
306
+ const [isConnected, setIsConnected] = React26.useState(false);
307
+ const [error, setError] = React26.useState(null);
308
+ const [theme, setTheme] = React26.useState("light");
309
+ const [displayMode, setDisplayMode] = React26.useState("inline");
310
+ const [locale, setLocale] = React26.useState("en");
311
+ const [maxHeight, setMaxHeight] = React26.useState(600);
312
+ React26.useEffect(() => {
313
+ let mounted = true;
314
+ let checkAttempts = 0;
315
+ const maxAttempts = 50;
316
+ function checkConnection() {
317
+ if (!mounted) return;
318
+ if (window.openai) {
319
+ setIsConnected(true);
320
+ setError(null);
321
+ if (window.openai.theme) setTheme(window.openai.theme);
322
+ if (window.openai.displayMode) setDisplayMode(window.openai.displayMode);
323
+ if (window.openai.locale) setLocale(window.openai.locale);
324
+ if (window.openai.maxHeight) setMaxHeight(window.openai.maxHeight);
325
+ } else {
326
+ checkAttempts++;
327
+ if (checkAttempts < maxAttempts) {
328
+ setTimeout(checkConnection, 100);
329
+ } else {
330
+ setError(new Error("ChatGPT SDK not available"));
331
+ setIsConnected(false);
332
+ }
333
+ }
334
+ }
335
+ chunk2HRO6CFU_js.__name(checkConnection, "checkConnection");
336
+ checkConnection();
337
+ return () => {
338
+ mounted = false;
339
+ };
340
+ }, [
341
+ appName
342
+ ]);
343
+ const callTool = React26.useCallback(async (name, args = {}) => {
344
+ if (!window.openai?.callTool) {
345
+ throw new Error("ChatGPT SDK not available");
346
+ }
347
+ const result = await window.openai.callTool(name, args);
348
+ return result;
349
+ }, []);
350
+ const value = {
351
+ isConnected,
352
+ error,
353
+ theme,
354
+ displayMode,
355
+ locale,
356
+ maxHeight,
357
+ callTool
358
+ };
359
+ return /* @__PURE__ */ React26__namespace.default.createElement(GptAppContext.Provider, {
360
+ value
361
+ }, /* @__PURE__ */ React26__namespace.default.createElement("div", {
362
+ className: "lui-root",
363
+ "data-theme": theme
364
+ }, children));
365
+ }
366
+ chunk2HRO6CFU_js.__name(GPTAppProvider, "GPTAppProvider");
367
+ function useGptApp() {
368
+ const context = React26.useContext(GptAppContext);
369
+ if (!context) {
370
+ return {
371
+ isConnected: false,
372
+ error: new Error("GPTAppProvider not found"),
373
+ theme: "light",
374
+ displayMode: "inline",
375
+ locale: "en",
376
+ maxHeight: 600,
377
+ callTool: /* @__PURE__ */ chunk2HRO6CFU_js.__name(async () => {
378
+ throw new Error("Not connected to ChatGPT");
379
+ }, "callTool")
380
+ };
381
+ }
382
+ return context;
383
+ }
384
+ chunk2HRO6CFU_js.__name(useGptApp, "useGptApp");
385
+ function useGptTool(toolName) {
386
+ const { callTool, isConnected } = useGptApp();
387
+ const [result, setResult] = React26.useState(null);
388
+ const [loading, setLoading] = React26.useState(false);
389
+ const [error, setError] = React26.useState(null);
390
+ const call = React26.useCallback(async (args = {}) => {
391
+ if (!isConnected) {
392
+ setError(new Error("Not connected to ChatGPT"));
393
+ return;
394
+ }
395
+ setLoading(true);
396
+ setError(null);
397
+ try {
398
+ const res = await callTool(toolName, args);
399
+ setResult(res);
400
+ return res;
401
+ } catch (err) {
402
+ setError(err);
403
+ throw err;
404
+ } finally {
405
+ setLoading(false);
406
+ }
407
+ }, [
408
+ callTool,
409
+ isConnected,
410
+ toolName
411
+ ]);
412
+ return {
413
+ call,
414
+ result,
415
+ loading,
416
+ error,
417
+ isConnected
418
+ };
419
+ }
420
+ chunk2HRO6CFU_js.__name(useGptTool, "useGptTool");
301
421
  var DEFAULT_CONTEXT = {
302
422
  resultDisplay: {
303
423
  display: "none"
304
424
  },
305
425
  showLoading: true
306
426
  };
307
- var ToolContext = /* @__PURE__ */ React25.createContext(DEFAULT_CONTEXT);
427
+ var ToolContext = /* @__PURE__ */ React26.createContext(DEFAULT_CONTEXT);
308
428
  function ToolProvider({ defaults = {}, children }) {
309
- const parentContext = React25.useContext(ToolContext);
310
- const value = React25.useMemo(() => ({
429
+ const parentContext = React26.useContext(ToolContext);
430
+ const value = React26.useMemo(() => ({
311
431
  resultDisplay: defaults.resultDisplay ?? parentContext.resultDisplay,
312
432
  onError: defaults.onError ?? parentContext.onError,
313
433
  showLoading: defaults.showLoading ?? parentContext.showLoading
@@ -315,34 +435,34 @@ function ToolProvider({ defaults = {}, children }) {
315
435
  defaults,
316
436
  parentContext
317
437
  ]);
318
- return /* @__PURE__ */ React25__namespace.createElement(ToolContext.Provider, {
438
+ return /* @__PURE__ */ React26__namespace.createElement(ToolContext.Provider, {
319
439
  value
320
440
  }, children);
321
441
  }
322
- chunk3PV26V5F_js.__name(ToolProvider, "ToolProvider");
442
+ chunk2HRO6CFU_js.__name(ToolProvider, "ToolProvider");
323
443
  function useToolContext() {
324
- return React25.useContext(ToolContext);
444
+ return React26.useContext(ToolContext);
325
445
  }
326
- chunk3PV26V5F_js.__name(useToolContext, "useToolContext");
327
- var Toaster = /* @__PURE__ */ chunk3PV26V5F_js.__name(({ ...props }) => {
446
+ chunk2HRO6CFU_js.__name(useToolContext, "useToolContext");
447
+ var Toaster = /* @__PURE__ */ chunk2HRO6CFU_js.__name(({ ...props }) => {
328
448
  const { theme = "system" } = nextThemes.useTheme();
329
- return /* @__PURE__ */ React25__namespace.default.createElement(sonner.Toaster, {
449
+ return /* @__PURE__ */ React26__namespace.default.createElement(sonner.Toaster, {
330
450
  theme,
331
451
  className: "toaster group",
332
452
  icons: {
333
- success: /* @__PURE__ */ React25__namespace.default.createElement(lucideReact.CircleCheckIcon, {
453
+ success: /* @__PURE__ */ React26__namespace.default.createElement(lucideReact.CircleCheckIcon, {
334
454
  className: "size-4"
335
455
  }),
336
- info: /* @__PURE__ */ React25__namespace.default.createElement(lucideReact.InfoIcon, {
456
+ info: /* @__PURE__ */ React26__namespace.default.createElement(lucideReact.InfoIcon, {
337
457
  className: "size-4"
338
458
  }),
339
- warning: /* @__PURE__ */ React25__namespace.default.createElement(lucideReact.TriangleAlertIcon, {
459
+ warning: /* @__PURE__ */ React26__namespace.default.createElement(lucideReact.TriangleAlertIcon, {
340
460
  className: "size-4"
341
461
  }),
342
- error: /* @__PURE__ */ React25__namespace.default.createElement(lucideReact.OctagonXIcon, {
462
+ error: /* @__PURE__ */ React26__namespace.default.createElement(lucideReact.OctagonXIcon, {
343
463
  className: "size-4"
344
464
  }),
345
- loading: /* @__PURE__ */ React25__namespace.default.createElement(lucideReact.Loader2Icon, {
465
+ loading: /* @__PURE__ */ React26__namespace.default.createElement(lucideReact.Loader2Icon, {
346
466
  className: "size-4 animate-spin"
347
467
  })
348
468
  },
@@ -358,7 +478,7 @@ var Toaster = /* @__PURE__ */ chunk3PV26V5F_js.__name(({ ...props }) => {
358
478
  function cn(...inputs) {
359
479
  return tailwindMerge.twMerge(clsx.clsx(inputs));
360
480
  }
361
- chunk3PV26V5F_js.__name(cn, "cn");
481
+ chunk2HRO6CFU_js.__name(cn, "cn");
362
482
 
363
483
  // src/components/ui/button.tsx
364
484
  var buttonVariants = classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
@@ -387,7 +507,7 @@ var buttonVariants = classVarianceAuthority.cva("inline-flex items-center justif
387
507
  });
388
508
  function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
389
509
  const Comp = asChild ? reactSlot.Slot : "button";
390
- return /* @__PURE__ */ React25__namespace.createElement(Comp, {
510
+ return /* @__PURE__ */ React26__namespace.createElement(Comp, {
391
511
  "data-slot": "button",
392
512
  "data-variant": variant,
393
513
  "data-size": size,
@@ -399,90 +519,90 @@ function Button({ className, variant = "default", size = "default", asChild = fa
399
519
  ...props
400
520
  });
401
521
  }
402
- chunk3PV26V5F_js.__name(Button, "Button");
522
+ chunk2HRO6CFU_js.__name(Button, "Button");
403
523
  function Dialog({ ...props }) {
404
- return /* @__PURE__ */ React25__namespace.createElement(DialogPrimitive__namespace.Root, {
524
+ return /* @__PURE__ */ React26__namespace.createElement(DialogPrimitive__namespace.Root, {
405
525
  "data-slot": "dialog",
406
526
  ...props
407
527
  });
408
528
  }
409
- chunk3PV26V5F_js.__name(Dialog, "Dialog");
529
+ chunk2HRO6CFU_js.__name(Dialog, "Dialog");
410
530
  function DialogTrigger({ ...props }) {
411
- return /* @__PURE__ */ React25__namespace.createElement(DialogPrimitive__namespace.Trigger, {
531
+ return /* @__PURE__ */ React26__namespace.createElement(DialogPrimitive__namespace.Trigger, {
412
532
  "data-slot": "dialog-trigger",
413
533
  ...props
414
534
  });
415
535
  }
416
- chunk3PV26V5F_js.__name(DialogTrigger, "DialogTrigger");
536
+ chunk2HRO6CFU_js.__name(DialogTrigger, "DialogTrigger");
417
537
  function DialogPortal({ ...props }) {
418
- return /* @__PURE__ */ React25__namespace.createElement(DialogPrimitive__namespace.Portal, {
538
+ return /* @__PURE__ */ React26__namespace.createElement(DialogPrimitive__namespace.Portal, {
419
539
  "data-slot": "dialog-portal",
420
540
  ...props
421
541
  });
422
542
  }
423
- chunk3PV26V5F_js.__name(DialogPortal, "DialogPortal");
543
+ chunk2HRO6CFU_js.__name(DialogPortal, "DialogPortal");
424
544
  function DialogClose({ ...props }) {
425
- return /* @__PURE__ */ React25__namespace.createElement(DialogPrimitive__namespace.Close, {
545
+ return /* @__PURE__ */ React26__namespace.createElement(DialogPrimitive__namespace.Close, {
426
546
  "data-slot": "dialog-close",
427
547
  ...props
428
548
  });
429
549
  }
430
- chunk3PV26V5F_js.__name(DialogClose, "DialogClose");
550
+ chunk2HRO6CFU_js.__name(DialogClose, "DialogClose");
431
551
  function DialogOverlay({ className, ...props }) {
432
- return /* @__PURE__ */ React25__namespace.createElement(DialogPrimitive__namespace.Overlay, {
552
+ return /* @__PURE__ */ React26__namespace.createElement(DialogPrimitive__namespace.Overlay, {
433
553
  "data-slot": "dialog-overlay",
434
554
  className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
435
555
  ...props
436
556
  });
437
557
  }
438
- chunk3PV26V5F_js.__name(DialogOverlay, "DialogOverlay");
558
+ chunk2HRO6CFU_js.__name(DialogOverlay, "DialogOverlay");
439
559
  function DialogContent({ className, children, showCloseButton = true, ...props }) {
440
- return /* @__PURE__ */ React25__namespace.createElement(DialogPortal, {
560
+ return /* @__PURE__ */ React26__namespace.createElement(DialogPortal, {
441
561
  "data-slot": "dialog-portal"
442
- }, /* @__PURE__ */ React25__namespace.createElement(DialogOverlay, null), /* @__PURE__ */ React25__namespace.createElement(DialogPrimitive__namespace.Content, {
562
+ }, /* @__PURE__ */ React26__namespace.createElement(DialogOverlay, null), /* @__PURE__ */ React26__namespace.createElement(DialogPrimitive__namespace.Content, {
443
563
  "data-slot": "dialog-content",
444
564
  className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg", className),
445
565
  ...props
446
- }, children, showCloseButton && /* @__PURE__ */ React25__namespace.createElement(DialogPrimitive__namespace.Close, {
566
+ }, children, showCloseButton && /* @__PURE__ */ React26__namespace.createElement(DialogPrimitive__namespace.Close, {
447
567
  "data-slot": "dialog-close",
448
568
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
449
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.XIcon, null), /* @__PURE__ */ React25__namespace.createElement("span", {
569
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.XIcon, null), /* @__PURE__ */ React26__namespace.createElement("span", {
450
570
  className: "sr-only"
451
571
  }, "Close"))));
452
572
  }
453
- chunk3PV26V5F_js.__name(DialogContent, "DialogContent");
573
+ chunk2HRO6CFU_js.__name(DialogContent, "DialogContent");
454
574
  function DialogHeader({ className, ...props }) {
455
- return /* @__PURE__ */ React25__namespace.createElement("div", {
575
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
456
576
  "data-slot": "dialog-header",
457
577
  className: cn("flex flex-col gap-2 text-center sm:text-left", className),
458
578
  ...props
459
579
  });
460
580
  }
461
- chunk3PV26V5F_js.__name(DialogHeader, "DialogHeader");
581
+ chunk2HRO6CFU_js.__name(DialogHeader, "DialogHeader");
462
582
  function DialogFooter({ className, ...props }) {
463
- return /* @__PURE__ */ React25__namespace.createElement("div", {
583
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
464
584
  "data-slot": "dialog-footer",
465
585
  className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
466
586
  ...props
467
587
  });
468
588
  }
469
- chunk3PV26V5F_js.__name(DialogFooter, "DialogFooter");
589
+ chunk2HRO6CFU_js.__name(DialogFooter, "DialogFooter");
470
590
  function DialogTitle({ className, ...props }) {
471
- return /* @__PURE__ */ React25__namespace.createElement(DialogPrimitive__namespace.Title, {
591
+ return /* @__PURE__ */ React26__namespace.createElement(DialogPrimitive__namespace.Title, {
472
592
  "data-slot": "dialog-title",
473
593
  className: cn("text-lg leading-none font-semibold", className),
474
594
  ...props
475
595
  });
476
596
  }
477
- chunk3PV26V5F_js.__name(DialogTitle, "DialogTitle");
597
+ chunk2HRO6CFU_js.__name(DialogTitle, "DialogTitle");
478
598
  function DialogDescription({ className, ...props }) {
479
- return /* @__PURE__ */ React25__namespace.createElement(DialogPrimitive__namespace.Description, {
599
+ return /* @__PURE__ */ React26__namespace.createElement(DialogPrimitive__namespace.Description, {
480
600
  "data-slot": "dialog-description",
481
601
  className: cn("text-muted-foreground text-sm", className),
482
602
  ...props
483
603
  });
484
604
  }
485
- chunk3PV26V5F_js.__name(DialogDescription, "DialogDescription");
605
+ chunk2HRO6CFU_js.__name(DialogDescription, "DialogDescription");
486
606
  function extractResultData(result) {
487
607
  if ("structuredContent" in result && result.structuredContent) {
488
608
  return result.structuredContent;
@@ -506,15 +626,15 @@ function extractResultData(result) {
506
626
  }
507
627
  return result;
508
628
  }
509
- chunk3PV26V5F_js.__name(extractResultData, "extractResultData");
629
+ chunk2HRO6CFU_js.__name(extractResultData, "extractResultData");
510
630
  function useTool(toolName, options = {}) {
511
631
  const { callTool } = useMcpApp();
512
- const [state, setState] = React25.useState("idle");
513
- const [result, setResult] = React25.useState(null);
514
- const [error, setError] = React25.useState(null);
515
- const abortControllerRef = React25.useRef(null);
516
- const lastArgsRef = React25.useRef(void 0);
517
- const retryCountRef = React25.useRef(0);
632
+ const [state, setState] = React26.useState("idle");
633
+ const [result, setResult] = React26.useState(null);
634
+ const [error, setError] = React26.useState(null);
635
+ const abortControllerRef = React26.useRef(null);
636
+ const lastArgsRef = React26.useRef(void 0);
637
+ const retryCountRef = React26.useRef(0);
518
638
  const { defaultArgs, transform, retry, onStart, onSuccess, onError, onComplete } = options;
519
639
  const retryConfig = typeof retry === "number" ? {
520
640
  count: retry,
@@ -523,7 +643,7 @@ function useTool(toolName, options = {}) {
523
643
  count: 0,
524
644
  delay: 1e3
525
645
  };
526
- const executeCall = React25.useCallback(async (args) => {
646
+ const executeCall = React26.useCallback(async (args) => {
527
647
  const mergedArgs = {
528
648
  ...defaultArgs,
529
649
  ...args
@@ -575,25 +695,25 @@ function useTool(toolName, options = {}) {
575
695
  onError,
576
696
  onComplete
577
697
  ]);
578
- const call = React25.useCallback(async (args) => {
698
+ const call = React26.useCallback(async (args) => {
579
699
  retryCountRef.current = 0;
580
700
  return executeCall(args);
581
701
  }, [
582
702
  executeCall
583
703
  ]);
584
- const mutate = React25.useCallback(async (args) => {
704
+ const mutate = React26.useCallback(async (args) => {
585
705
  return call(args);
586
706
  }, [
587
707
  call
588
708
  ]);
589
- const reset = React25.useCallback(() => {
709
+ const reset = React26.useCallback(() => {
590
710
  setState("idle");
591
711
  setResult(null);
592
712
  setError(null);
593
713
  retryCountRef.current = 0;
594
714
  abortControllerRef.current?.abort();
595
715
  }, []);
596
- const retryCall = React25.useCallback(async () => {
716
+ const retryCall = React26.useCallback(async () => {
597
717
  if (lastArgsRef.current === void 0 && !defaultArgs) {
598
718
  return null;
599
719
  }
@@ -603,7 +723,7 @@ function useTool(toolName, options = {}) {
603
723
  executeCall,
604
724
  defaultArgs
605
725
  ]);
606
- const abort = React25.useCallback(() => {
726
+ const abort = React26.useCallback(() => {
607
727
  abortControllerRef.current?.abort();
608
728
  setState("idle");
609
729
  }, []);
@@ -619,7 +739,7 @@ function useTool(toolName, options = {}) {
619
739
  abort
620
740
  };
621
741
  }
622
- chunk3PV26V5F_js.__name(useTool, "useTool");
742
+ chunk2HRO6CFU_js.__name(useTool, "useTool");
623
743
  function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, resultDuration = 3e3, successMessage, errorMessage, onToolStart, onToolSuccess, onToolError, onToolComplete, loadingText, loadingIcon, disableWhileLoading = true, confirm, children, className, variant = "default", size = "default", disabled, asChild = false, ...props }) {
624
744
  const toolConfig = typeof tool === "string" ? {
625
745
  name: tool
@@ -636,8 +756,8 @@ function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, res
636
756
  onError: onToolError,
637
757
  onComplete: onToolComplete
638
758
  });
639
- const [showConfirm, setShowConfirm] = React25.useState(false);
640
- const [showResult, setShowResult] = React25.useState(false);
759
+ const [showConfirm, setShowConfirm] = React26.useState(false);
760
+ const [showResult, setShowResult] = React26.useState(false);
641
761
  const buttonState = {
642
762
  loading,
643
763
  state,
@@ -645,7 +765,7 @@ function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, res
645
765
  error,
646
766
  hasResult: result !== null || error !== null
647
767
  };
648
- const executeCall = React25.useCallback(async () => {
768
+ const executeCall = React26.useCallback(async () => {
649
769
  try {
650
770
  const res = await call();
651
771
  if (resultDisplay === "toast") {
@@ -671,7 +791,7 @@ function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, res
671
791
  errorMessage,
672
792
  resultDuration
673
793
  ]);
674
- const handleClick = React25.useCallback(() => {
794
+ const handleClick = React26.useCallback(() => {
675
795
  if (confirm) {
676
796
  setShowConfirm(true);
677
797
  } else {
@@ -681,7 +801,7 @@ function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, res
681
801
  confirm,
682
802
  executeCall
683
803
  ]);
684
- const handleConfirm = React25.useCallback(() => {
804
+ const handleConfirm = React26.useCallback(() => {
685
805
  setShowConfirm(false);
686
806
  executeCall();
687
807
  }, [
@@ -693,31 +813,31 @@ function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, res
693
813
  confirmText: "Confirm",
694
814
  cancelText: "Cancel"
695
815
  };
696
- const renderChildren = /* @__PURE__ */ chunk3PV26V5F_js.__name(() => {
816
+ const renderChildren = /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => {
697
817
  if (typeof children === "function") {
698
818
  return children(buttonState);
699
819
  }
700
820
  if (loading) {
701
- return /* @__PURE__ */ React25__namespace.createElement(React25__namespace.Fragment, null, loadingIcon ?? /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
821
+ return /* @__PURE__ */ React26__namespace.createElement(React26__namespace.Fragment, null, loadingIcon ?? /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
702
822
  className: "animate-spin"
703
- }), loadingText && /* @__PURE__ */ React25__namespace.createElement("span", null, loadingText), !loadingText && children);
823
+ }), loadingText && /* @__PURE__ */ React26__namespace.createElement("span", null, loadingText), !loadingText && children);
704
824
  }
705
825
  if (showResult && resultDisplay === "inline") {
706
826
  if (error) {
707
- return /* @__PURE__ */ React25__namespace.createElement(React25__namespace.Fragment, null, /* @__PURE__ */ React25__namespace.createElement(lucideReact.X, {
827
+ return /* @__PURE__ */ React26__namespace.createElement(React26__namespace.Fragment, null, /* @__PURE__ */ React26__namespace.createElement(lucideReact.X, {
708
828
  className: "text-destructive"
709
- }), /* @__PURE__ */ React25__namespace.createElement("span", null, error.message));
829
+ }), /* @__PURE__ */ React26__namespace.createElement("span", null, error.message));
710
830
  }
711
831
  if (renderResult) {
712
832
  return renderResult(result);
713
833
  }
714
- return /* @__PURE__ */ React25__namespace.createElement(React25__namespace.Fragment, null, /* @__PURE__ */ React25__namespace.createElement(lucideReact.Check, {
834
+ return /* @__PURE__ */ React26__namespace.createElement(React26__namespace.Fragment, null, /* @__PURE__ */ React26__namespace.createElement(lucideReact.Check, {
715
835
  className: "text-success"
716
- }), /* @__PURE__ */ React25__namespace.createElement("span", null, "Done"));
836
+ }), /* @__PURE__ */ React26__namespace.createElement("span", null, "Done"));
717
837
  }
718
838
  return children;
719
839
  }, "renderChildren");
720
- return /* @__PURE__ */ React25__namespace.createElement(React25__namespace.Fragment, null, /* @__PURE__ */ React25__namespace.createElement(Button, {
840
+ return /* @__PURE__ */ React26__namespace.createElement(React26__namespace.Fragment, null, /* @__PURE__ */ React26__namespace.createElement(Button, {
721
841
  type: "button",
722
842
  variant,
723
843
  size,
@@ -726,116 +846,116 @@ function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, res
726
846
  onClick: handleClick,
727
847
  asChild,
728
848
  ...props
729
- }, renderChildren()), confirm && /* @__PURE__ */ React25__namespace.createElement(Dialog, {
849
+ }, renderChildren()), confirm && /* @__PURE__ */ React26__namespace.createElement(Dialog, {
730
850
  open: showConfirm,
731
851
  onOpenChange: setShowConfirm
732
- }, /* @__PURE__ */ React25__namespace.createElement(DialogContent, null, /* @__PURE__ */ React25__namespace.createElement(DialogHeader, null, /* @__PURE__ */ React25__namespace.createElement(DialogTitle, null, confirmConfig.title), confirmConfig.description && /* @__PURE__ */ React25__namespace.createElement(DialogDescription, null, confirmConfig.description)), /* @__PURE__ */ React25__namespace.createElement(DialogFooter, null, /* @__PURE__ */ React25__namespace.createElement(Button, {
852
+ }, /* @__PURE__ */ React26__namespace.createElement(DialogContent, null, /* @__PURE__ */ React26__namespace.createElement(DialogHeader, null, /* @__PURE__ */ React26__namespace.createElement(DialogTitle, null, confirmConfig.title), confirmConfig.description && /* @__PURE__ */ React26__namespace.createElement(DialogDescription, null, confirmConfig.description)), /* @__PURE__ */ React26__namespace.createElement(DialogFooter, null, /* @__PURE__ */ React26__namespace.createElement(Button, {
733
853
  variant: "outline",
734
- onClick: /* @__PURE__ */ chunk3PV26V5F_js.__name(() => setShowConfirm(false), "onClick")
735
- }, confirmConfig.cancelText ?? "Cancel"), /* @__PURE__ */ React25__namespace.createElement(Button, {
854
+ onClick: /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => setShowConfirm(false), "onClick")
855
+ }, confirmConfig.cancelText ?? "Cancel"), /* @__PURE__ */ React26__namespace.createElement(Button, {
736
856
  variant: confirmConfig.confirmVariant ?? (variant === "destructive" ? "destructive" : "default"),
737
857
  onClick: handleConfirm
738
858
  }, confirmConfig.confirmText ?? "Confirm")))));
739
859
  }
740
- chunk3PV26V5F_js.__name(ToolButton, "ToolButton");
860
+ chunk2HRO6CFU_js.__name(ToolButton, "ToolButton");
741
861
  function Select({ ...props }) {
742
- return /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Root, {
862
+ return /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Root, {
743
863
  "data-slot": "select",
744
864
  ...props
745
865
  });
746
866
  }
747
- chunk3PV26V5F_js.__name(Select, "Select");
867
+ chunk2HRO6CFU_js.__name(Select, "Select");
748
868
  function SelectGroup({ ...props }) {
749
- return /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Group, {
869
+ return /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Group, {
750
870
  "data-slot": "select-group",
751
871
  ...props
752
872
  });
753
873
  }
754
- chunk3PV26V5F_js.__name(SelectGroup, "SelectGroup");
874
+ chunk2HRO6CFU_js.__name(SelectGroup, "SelectGroup");
755
875
  function SelectValue({ ...props }) {
756
- return /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Value, {
876
+ return /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Value, {
757
877
  "data-slot": "select-value",
758
878
  ...props
759
879
  });
760
880
  }
761
- chunk3PV26V5F_js.__name(SelectValue, "SelectValue");
881
+ chunk2HRO6CFU_js.__name(SelectValue, "SelectValue");
762
882
  function SelectTrigger({ className, size = "default", children, ...props }) {
763
- return /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Trigger, {
883
+ return /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Trigger, {
764
884
  "data-slot": "select-trigger",
765
885
  "data-size": size,
766
886
  className: cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
767
887
  ...props
768
- }, children, /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Icon, {
888
+ }, children, /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Icon, {
769
889
  asChild: true
770
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.ChevronDownIcon, {
890
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.ChevronDownIcon, {
771
891
  className: "size-4 opacity-50"
772
892
  })));
773
893
  }
774
- chunk3PV26V5F_js.__name(SelectTrigger, "SelectTrigger");
894
+ chunk2HRO6CFU_js.__name(SelectTrigger, "SelectTrigger");
775
895
  function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
776
- return /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Portal, null, /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Content, {
896
+ return /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Portal, null, /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Content, {
777
897
  "data-slot": "select-content",
778
898
  className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
779
899
  position,
780
900
  align,
781
901
  ...props
782
- }, /* @__PURE__ */ React25__namespace.createElement(SelectScrollUpButton, null), /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Viewport, {
902
+ }, /* @__PURE__ */ React26__namespace.createElement(SelectScrollUpButton, null), /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Viewport, {
783
903
  className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")
784
- }, children), /* @__PURE__ */ React25__namespace.createElement(SelectScrollDownButton, null)));
904
+ }, children), /* @__PURE__ */ React26__namespace.createElement(SelectScrollDownButton, null)));
785
905
  }
786
- chunk3PV26V5F_js.__name(SelectContent, "SelectContent");
906
+ chunk2HRO6CFU_js.__name(SelectContent, "SelectContent");
787
907
  function SelectLabel({ className, ...props }) {
788
- return /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Label, {
908
+ return /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Label, {
789
909
  "data-slot": "select-label",
790
910
  className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
791
911
  ...props
792
912
  });
793
913
  }
794
- chunk3PV26V5F_js.__name(SelectLabel, "SelectLabel");
914
+ chunk2HRO6CFU_js.__name(SelectLabel, "SelectLabel");
795
915
  function SelectItem({ className, children, ...props }) {
796
- return /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Item, {
916
+ return /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Item, {
797
917
  "data-slot": "select-item",
798
918
  className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
799
919
  ...props
800
- }, /* @__PURE__ */ React25__namespace.createElement("span", {
920
+ }, /* @__PURE__ */ React26__namespace.createElement("span", {
801
921
  "data-slot": "select-item-indicator",
802
922
  className: "absolute right-2 flex size-3.5 items-center justify-center"
803
- }, /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React25__namespace.createElement(lucideReact.CheckIcon, {
923
+ }, /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React26__namespace.createElement(lucideReact.CheckIcon, {
804
924
  className: "size-4"
805
- }))), /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.ItemText, null, children));
925
+ }))), /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.ItemText, null, children));
806
926
  }
807
- chunk3PV26V5F_js.__name(SelectItem, "SelectItem");
927
+ chunk2HRO6CFU_js.__name(SelectItem, "SelectItem");
808
928
  function SelectSeparator({ className, ...props }) {
809
- return /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.Separator, {
929
+ return /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.Separator, {
810
930
  "data-slot": "select-separator",
811
931
  className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
812
932
  ...props
813
933
  });
814
934
  }
815
- chunk3PV26V5F_js.__name(SelectSeparator, "SelectSeparator");
935
+ chunk2HRO6CFU_js.__name(SelectSeparator, "SelectSeparator");
816
936
  function SelectScrollUpButton({ className, ...props }) {
817
- return /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.ScrollUpButton, {
937
+ return /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.ScrollUpButton, {
818
938
  "data-slot": "select-scroll-up-button",
819
939
  className: cn("flex cursor-default items-center justify-center py-1", className),
820
940
  ...props
821
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.ChevronUpIcon, {
941
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.ChevronUpIcon, {
822
942
  className: "size-4"
823
943
  }));
824
944
  }
825
- chunk3PV26V5F_js.__name(SelectScrollUpButton, "SelectScrollUpButton");
945
+ chunk2HRO6CFU_js.__name(SelectScrollUpButton, "SelectScrollUpButton");
826
946
  function SelectScrollDownButton({ className, ...props }) {
827
- return /* @__PURE__ */ React25__namespace.createElement(SelectPrimitive__namespace.ScrollDownButton, {
947
+ return /* @__PURE__ */ React26__namespace.createElement(SelectPrimitive__namespace.ScrollDownButton, {
828
948
  "data-slot": "select-scroll-down-button",
829
949
  className: cn("flex cursor-default items-center justify-center py-1", className),
830
950
  ...props
831
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.ChevronDownIcon, {
951
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.ChevronDownIcon, {
832
952
  className: "size-4"
833
953
  }));
834
954
  }
835
- chunk3PV26V5F_js.__name(SelectScrollDownButton, "SelectScrollDownButton");
955
+ chunk2HRO6CFU_js.__name(SelectScrollDownButton, "SelectScrollDownButton");
836
956
  function ToolSelect({ onSelectTool, argName = "value", additionalArgs = {}, optionsTool, optionsArgs = {}, transformOptions, options: staticOptions = [], placeholder = "Select an option", loadingPlaceholder = "Loading...", emptyMessage = "No options available", value: controlledValue, defaultValue, onValueChange, onOptionsLoaded, onSelectionSuccess, onSelectionError, showSuccessToast = false, successMessage, className, disabled = false }) {
837
- const [fetchedOptions, setFetchedOptions] = React25.useState([]);
838
- const [internalValue, setInternalValue] = React25.useState(defaultValue ?? "");
957
+ const [fetchedOptions, setFetchedOptions] = React26.useState([]);
958
+ const [internalValue, setInternalValue] = React26.useState(defaultValue ?? "");
839
959
  const optionsToolConfig = optionsTool ? typeof optionsTool === "string" ? {
840
960
  name: optionsTool
841
961
  } : optionsTool : null;
@@ -849,7 +969,7 @@ function ToolSelect({ onSelectTool, argName = "value", additionalArgs = {}, opti
849
969
  }
850
970
  });
851
971
  const selectHook = useTool(selectToolConfig?.name ?? "", {
852
- onSuccess: /* @__PURE__ */ chunk3PV26V5F_js.__name((result) => {
972
+ onSuccess: /* @__PURE__ */ chunk2HRO6CFU_js.__name((result) => {
853
973
  onSelectionSuccess?.(result);
854
974
  if (showSuccessToast) {
855
975
  const message = typeof successMessage === "function" ? successMessage(result) : successMessage ?? "Selection saved";
@@ -858,7 +978,7 @@ function ToolSelect({ onSelectTool, argName = "value", additionalArgs = {}, opti
858
978
  }, "onSuccess"),
859
979
  onError: onSelectionError
860
980
  });
861
- React25.useEffect(() => {
981
+ React26.useEffect(() => {
862
982
  if (optionsToolConfig) {
863
983
  optionsHook.call().then((result) => {
864
984
  const options = transformOptions ? transformOptions(result) : result;
@@ -875,7 +995,7 @@ function ToolSelect({ onSelectTool, argName = "value", additionalArgs = {}, opti
875
995
  ...fetchedOptions
876
996
  ];
877
997
  const value = controlledValue ?? internalValue;
878
- const handleValueChange = React25.useCallback((newValue) => {
998
+ const handleValueChange = React26.useCallback((newValue) => {
879
999
  setInternalValue(newValue);
880
1000
  onValueChange?.(newValue);
881
1001
  if (selectToolConfig) {
@@ -893,138 +1013,138 @@ function ToolSelect({ onSelectTool, argName = "value", additionalArgs = {}, opti
893
1013
  ]);
894
1014
  const isLoading = optionsHook.loading || selectHook.loading;
895
1015
  const hasError = optionsHook.error || selectHook.error;
896
- return /* @__PURE__ */ React25__namespace.createElement(Select, {
1016
+ return /* @__PURE__ */ React26__namespace.createElement(Select, {
897
1017
  value,
898
1018
  onValueChange: handleValueChange,
899
1019
  disabled: disabled || isLoading
900
- }, /* @__PURE__ */ React25__namespace.createElement(SelectTrigger, {
1020
+ }, /* @__PURE__ */ React26__namespace.createElement(SelectTrigger, {
901
1021
  className: cn("w-full", className)
902
- }, isLoading ? /* @__PURE__ */ React25__namespace.createElement("div", {
1022
+ }, isLoading ? /* @__PURE__ */ React26__namespace.createElement("div", {
903
1023
  className: "flex items-center gap-2"
904
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
1024
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
905
1025
  className: "h-4 w-4 animate-spin"
906
- }), /* @__PURE__ */ React25__namespace.createElement("span", {
1026
+ }), /* @__PURE__ */ React26__namespace.createElement("span", {
907
1027
  className: "text-muted-foreground"
908
- }, optionsHook.loading ? loadingPlaceholder : "Saving...")) : /* @__PURE__ */ React25__namespace.createElement(SelectValue, {
1028
+ }, optionsHook.loading ? loadingPlaceholder : "Saving...")) : /* @__PURE__ */ React26__namespace.createElement(SelectValue, {
909
1029
  placeholder
910
- })), /* @__PURE__ */ React25__namespace.createElement(SelectContent, null, allOptions.length === 0 ? /* @__PURE__ */ React25__namespace.createElement("div", {
1030
+ })), /* @__PURE__ */ React26__namespace.createElement(SelectContent, null, allOptions.length === 0 ? /* @__PURE__ */ React26__namespace.createElement("div", {
911
1031
  className: "py-6 text-center text-sm text-muted-foreground"
912
- }, hasError ? "Error loading options" : emptyMessage) : allOptions.map((option) => /* @__PURE__ */ React25__namespace.createElement(SelectItem, {
1032
+ }, hasError ? "Error loading options" : emptyMessage) : allOptions.map((option) => /* @__PURE__ */ React26__namespace.createElement(SelectItem, {
913
1033
  key: option.value,
914
1034
  value: option.value,
915
1035
  disabled: option.disabled
916
- }, /* @__PURE__ */ React25__namespace.createElement("div", {
1036
+ }, /* @__PURE__ */ React26__namespace.createElement("div", {
917
1037
  className: "flex items-center gap-2"
918
- }, option.icon, /* @__PURE__ */ React25__namespace.createElement("div", null, /* @__PURE__ */ React25__namespace.createElement("div", null, option.label), option.description && /* @__PURE__ */ React25__namespace.createElement("div", {
1038
+ }, option.icon, /* @__PURE__ */ React26__namespace.createElement("div", null, /* @__PURE__ */ React26__namespace.createElement("div", null, option.label), option.description && /* @__PURE__ */ React26__namespace.createElement("div", {
919
1039
  className: "text-xs text-muted-foreground"
920
1040
  }, option.description)))))));
921
1041
  }
922
- chunk3PV26V5F_js.__name(ToolSelect, "ToolSelect");
1042
+ chunk2HRO6CFU_js.__name(ToolSelect, "ToolSelect");
923
1043
  function Input({ className, type, ...props }) {
924
- return /* @__PURE__ */ React25__namespace.createElement("input", {
1044
+ return /* @__PURE__ */ React26__namespace.createElement("input", {
925
1045
  type,
926
1046
  "data-slot": "input",
927
1047
  className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className),
928
1048
  ...props
929
1049
  });
930
1050
  }
931
- chunk3PV26V5F_js.__name(Input, "Input");
1051
+ chunk2HRO6CFU_js.__name(Input, "Input");
932
1052
  function Command({ className, ...props }) {
933
- return /* @__PURE__ */ React25__namespace.createElement(cmdk.Command, {
1053
+ return /* @__PURE__ */ React26__namespace.createElement(cmdk.Command, {
934
1054
  "data-slot": "command",
935
1055
  className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
936
1056
  ...props
937
1057
  });
938
1058
  }
939
- chunk3PV26V5F_js.__name(Command, "Command");
1059
+ chunk2HRO6CFU_js.__name(Command, "Command");
940
1060
  function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
941
- return /* @__PURE__ */ React25__namespace.createElement(Dialog, props, /* @__PURE__ */ React25__namespace.createElement(DialogHeader, {
1061
+ return /* @__PURE__ */ React26__namespace.createElement(Dialog, props, /* @__PURE__ */ React26__namespace.createElement(DialogHeader, {
942
1062
  className: "sr-only"
943
- }, /* @__PURE__ */ React25__namespace.createElement(DialogTitle, null, title), /* @__PURE__ */ React25__namespace.createElement(DialogDescription, null, description)), /* @__PURE__ */ React25__namespace.createElement(DialogContent, {
1063
+ }, /* @__PURE__ */ React26__namespace.createElement(DialogTitle, null, title), /* @__PURE__ */ React26__namespace.createElement(DialogDescription, null, description)), /* @__PURE__ */ React26__namespace.createElement(DialogContent, {
944
1064
  className: cn("overflow-hidden p-0", className),
945
1065
  showCloseButton
946
- }, /* @__PURE__ */ React25__namespace.createElement(Command, {
1066
+ }, /* @__PURE__ */ React26__namespace.createElement(Command, {
947
1067
  className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"
948
1068
  }, children)));
949
1069
  }
950
- chunk3PV26V5F_js.__name(CommandDialog, "CommandDialog");
1070
+ chunk2HRO6CFU_js.__name(CommandDialog, "CommandDialog");
951
1071
  function CommandInput({ className, ...props }) {
952
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1072
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
953
1073
  "data-slot": "command-input-wrapper",
954
1074
  className: "flex h-9 items-center gap-2 border-b px-3"
955
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.SearchIcon, {
1075
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.SearchIcon, {
956
1076
  className: "size-4 shrink-0 opacity-50"
957
- }), /* @__PURE__ */ React25__namespace.createElement(cmdk.Command.Input, {
1077
+ }), /* @__PURE__ */ React26__namespace.createElement(cmdk.Command.Input, {
958
1078
  "data-slot": "command-input",
959
1079
  className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
960
1080
  ...props
961
1081
  }));
962
1082
  }
963
- chunk3PV26V5F_js.__name(CommandInput, "CommandInput");
1083
+ chunk2HRO6CFU_js.__name(CommandInput, "CommandInput");
964
1084
  function CommandList({ className, ...props }) {
965
- return /* @__PURE__ */ React25__namespace.createElement(cmdk.Command.List, {
1085
+ return /* @__PURE__ */ React26__namespace.createElement(cmdk.Command.List, {
966
1086
  "data-slot": "command-list",
967
1087
  className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
968
1088
  ...props
969
1089
  });
970
1090
  }
971
- chunk3PV26V5F_js.__name(CommandList, "CommandList");
1091
+ chunk2HRO6CFU_js.__name(CommandList, "CommandList");
972
1092
  function CommandEmpty({ ...props }) {
973
- return /* @__PURE__ */ React25__namespace.createElement(cmdk.Command.Empty, {
1093
+ return /* @__PURE__ */ React26__namespace.createElement(cmdk.Command.Empty, {
974
1094
  "data-slot": "command-empty",
975
1095
  className: "py-6 text-center text-sm",
976
1096
  ...props
977
1097
  });
978
1098
  }
979
- chunk3PV26V5F_js.__name(CommandEmpty, "CommandEmpty");
1099
+ chunk2HRO6CFU_js.__name(CommandEmpty, "CommandEmpty");
980
1100
  function CommandGroup({ className, ...props }) {
981
- return /* @__PURE__ */ React25__namespace.createElement(cmdk.Command.Group, {
1101
+ return /* @__PURE__ */ React26__namespace.createElement(cmdk.Command.Group, {
982
1102
  "data-slot": "command-group",
983
1103
  className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className),
984
1104
  ...props
985
1105
  });
986
1106
  }
987
- chunk3PV26V5F_js.__name(CommandGroup, "CommandGroup");
1107
+ chunk2HRO6CFU_js.__name(CommandGroup, "CommandGroup");
988
1108
  function CommandSeparator({ className, ...props }) {
989
- return /* @__PURE__ */ React25__namespace.createElement(cmdk.Command.Separator, {
1109
+ return /* @__PURE__ */ React26__namespace.createElement(cmdk.Command.Separator, {
990
1110
  "data-slot": "command-separator",
991
1111
  className: cn("bg-border -mx-1 h-px", className),
992
1112
  ...props
993
1113
  });
994
1114
  }
995
- chunk3PV26V5F_js.__name(CommandSeparator, "CommandSeparator");
1115
+ chunk2HRO6CFU_js.__name(CommandSeparator, "CommandSeparator");
996
1116
  function CommandItem({ className, ...props }) {
997
- return /* @__PURE__ */ React25__namespace.createElement(cmdk.Command.Item, {
1117
+ return /* @__PURE__ */ React26__namespace.createElement(cmdk.Command.Item, {
998
1118
  "data-slot": "command-item",
999
1119
  className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
1000
1120
  ...props
1001
1121
  });
1002
1122
  }
1003
- chunk3PV26V5F_js.__name(CommandItem, "CommandItem");
1123
+ chunk2HRO6CFU_js.__name(CommandItem, "CommandItem");
1004
1124
  function CommandShortcut({ className, ...props }) {
1005
- return /* @__PURE__ */ React25__namespace.createElement("span", {
1125
+ return /* @__PURE__ */ React26__namespace.createElement("span", {
1006
1126
  "data-slot": "command-shortcut",
1007
1127
  className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1008
1128
  ...props
1009
1129
  });
1010
1130
  }
1011
- chunk3PV26V5F_js.__name(CommandShortcut, "CommandShortcut");
1131
+ chunk2HRO6CFU_js.__name(CommandShortcut, "CommandShortcut");
1012
1132
  function Popover({ ...props }) {
1013
- return /* @__PURE__ */ React25__namespace.createElement(PopoverPrimitive__namespace.Root, {
1133
+ return /* @__PURE__ */ React26__namespace.createElement(PopoverPrimitive__namespace.Root, {
1014
1134
  "data-slot": "popover",
1015
1135
  ...props
1016
1136
  });
1017
1137
  }
1018
- chunk3PV26V5F_js.__name(Popover, "Popover");
1138
+ chunk2HRO6CFU_js.__name(Popover, "Popover");
1019
1139
  function PopoverTrigger({ ...props }) {
1020
- return /* @__PURE__ */ React25__namespace.createElement(PopoverPrimitive__namespace.Trigger, {
1140
+ return /* @__PURE__ */ React26__namespace.createElement(PopoverPrimitive__namespace.Trigger, {
1021
1141
  "data-slot": "popover-trigger",
1022
1142
  ...props
1023
1143
  });
1024
1144
  }
1025
- chunk3PV26V5F_js.__name(PopoverTrigger, "PopoverTrigger");
1145
+ chunk2HRO6CFU_js.__name(PopoverTrigger, "PopoverTrigger");
1026
1146
  function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
1027
- return /* @__PURE__ */ React25__namespace.createElement(PopoverPrimitive__namespace.Portal, null, /* @__PURE__ */ React25__namespace.createElement(PopoverPrimitive__namespace.Content, {
1147
+ return /* @__PURE__ */ React26__namespace.createElement(PopoverPrimitive__namespace.Portal, null, /* @__PURE__ */ React26__namespace.createElement(PopoverPrimitive__namespace.Content, {
1028
1148
  "data-slot": "popover-content",
1029
1149
  align,
1030
1150
  sideOffset,
@@ -1032,22 +1152,22 @@ function PopoverContent({ className, align = "center", sideOffset = 4, ...props
1032
1152
  ...props
1033
1153
  }));
1034
1154
  }
1035
- chunk3PV26V5F_js.__name(PopoverContent, "PopoverContent");
1155
+ chunk2HRO6CFU_js.__name(PopoverContent, "PopoverContent");
1036
1156
  function PopoverAnchor({ ...props }) {
1037
- return /* @__PURE__ */ React25__namespace.createElement(PopoverPrimitive__namespace.Anchor, {
1157
+ return /* @__PURE__ */ React26__namespace.createElement(PopoverPrimitive__namespace.Anchor, {
1038
1158
  "data-slot": "popover-anchor",
1039
1159
  ...props
1040
1160
  });
1041
1161
  }
1042
- chunk3PV26V5F_js.__name(PopoverAnchor, "PopoverAnchor");
1162
+ chunk2HRO6CFU_js.__name(PopoverAnchor, "PopoverAnchor");
1043
1163
 
1044
1164
  // src/mcp/ToolInput.tsx
1045
1165
  function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query", additionalArgs = {}, autocomplete = false, transformSuggestions, onSuggestionSelect, emptyMessage = "No results found", value: controlledValue, onChange, onSearchResults, onSearchError, showSearchIcon = true, showClearButton = true, showLoadingIndicator = true, className, placeholder = "Search...", disabled, ...props }) {
1046
- const [internalValue, setInternalValue] = React25.useState("");
1047
- const [suggestions, setSuggestions] = React25.useState([]);
1048
- const [isOpen, setIsOpen] = React25.useState(false);
1049
- const debounceRef = React25.useRef(null);
1050
- const inputRef = React25.useRef(null);
1166
+ const [internalValue, setInternalValue] = React26.useState("");
1167
+ const [suggestions, setSuggestions] = React26.useState([]);
1168
+ const [isOpen, setIsOpen] = React26.useState(false);
1169
+ const debounceRef = React26.useRef(null);
1170
+ const inputRef = React26.useRef(null);
1051
1171
  const toolConfig = searchTool ? typeof searchTool === "string" ? {
1052
1172
  name: searchTool
1053
1173
  } : searchTool : null;
@@ -1056,7 +1176,7 @@ function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query"
1056
1176
  ...toolConfig?.args,
1057
1177
  ...additionalArgs
1058
1178
  },
1059
- onSuccess: /* @__PURE__ */ chunk3PV26V5F_js.__name((result) => {
1179
+ onSuccess: /* @__PURE__ */ chunk2HRO6CFU_js.__name((result) => {
1060
1180
  onSearchResults?.(result);
1061
1181
  if (autocomplete && transformSuggestions) {
1062
1182
  const suggestions2 = transformSuggestions(result);
@@ -1069,7 +1189,7 @@ function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query"
1069
1189
  onError: onSearchError
1070
1190
  });
1071
1191
  const value = controlledValue ?? internalValue;
1072
- const handleChange = React25.useCallback((e) => {
1192
+ const handleChange = React26.useCallback((e) => {
1073
1193
  const newValue = e.target.value;
1074
1194
  setInternalValue(newValue);
1075
1195
  onChange?.(newValue);
@@ -1096,7 +1216,7 @@ function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query"
1096
1216
  debounce,
1097
1217
  call
1098
1218
  ]);
1099
- const handleClear = React25.useCallback(() => {
1219
+ const handleClear = React26.useCallback(() => {
1100
1220
  setInternalValue("");
1101
1221
  onChange?.("");
1102
1222
  setSuggestions([]);
@@ -1107,7 +1227,7 @@ function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query"
1107
1227
  onChange,
1108
1228
  reset
1109
1229
  ]);
1110
- const handleSelect = React25.useCallback((suggestion) => {
1230
+ const handleSelect = React26.useCallback((suggestion) => {
1111
1231
  setInternalValue(suggestion.label);
1112
1232
  onChange?.(suggestion.label);
1113
1233
  setIsOpen(false);
@@ -1116,18 +1236,18 @@ function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query"
1116
1236
  onChange,
1117
1237
  onSuggestionSelect
1118
1238
  ]);
1119
- React25.useEffect(() => {
1239
+ React26.useEffect(() => {
1120
1240
  return () => {
1121
1241
  if (debounceRef.current) {
1122
1242
  clearTimeout(debounceRef.current);
1123
1243
  }
1124
1244
  };
1125
1245
  }, []);
1126
- const inputElement = /* @__PURE__ */ React25__namespace.createElement("div", {
1246
+ const inputElement = /* @__PURE__ */ React26__namespace.createElement("div", {
1127
1247
  className: cn("relative", className)
1128
- }, showSearchIcon && /* @__PURE__ */ React25__namespace.createElement(lucideReact.Search, {
1248
+ }, showSearchIcon && /* @__PURE__ */ React26__namespace.createElement(lucideReact.Search, {
1129
1249
  className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"
1130
- }), /* @__PURE__ */ React25__namespace.createElement(Input, {
1250
+ }), /* @__PURE__ */ React26__namespace.createElement(Input, {
1131
1251
  ref: inputRef,
1132
1252
  value,
1133
1253
  onChange: handleChange,
@@ -1135,71 +1255,71 @@ function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query"
1135
1255
  disabled,
1136
1256
  className: cn(showSearchIcon && "pl-9", (showClearButton || showLoadingIndicator) && "pr-9"),
1137
1257
  ...props
1138
- }), /* @__PURE__ */ React25__namespace.createElement("div", {
1258
+ }), /* @__PURE__ */ React26__namespace.createElement("div", {
1139
1259
  className: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1"
1140
- }, showLoadingIndicator && loading && /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
1260
+ }, showLoadingIndicator && loading && /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
1141
1261
  className: "h-4 w-4 animate-spin text-muted-foreground"
1142
- }), showClearButton && value && !loading && /* @__PURE__ */ React25__namespace.createElement("button", {
1262
+ }), showClearButton && value && !loading && /* @__PURE__ */ React26__namespace.createElement("button", {
1143
1263
  type: "button",
1144
1264
  onClick: handleClear,
1145
1265
  className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors"
1146
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.X, {
1266
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.X, {
1147
1267
  className: "h-4 w-4"
1148
1268
  }))));
1149
1269
  if (!autocomplete) {
1150
1270
  return inputElement;
1151
1271
  }
1152
- return /* @__PURE__ */ React25__namespace.createElement(Popover, {
1272
+ return /* @__PURE__ */ React26__namespace.createElement(Popover, {
1153
1273
  open: isOpen,
1154
1274
  onOpenChange: setIsOpen
1155
- }, /* @__PURE__ */ React25__namespace.createElement(PopoverTrigger, {
1275
+ }, /* @__PURE__ */ React26__namespace.createElement(PopoverTrigger, {
1156
1276
  asChild: true
1157
- }, inputElement), /* @__PURE__ */ React25__namespace.createElement(PopoverContent, {
1277
+ }, inputElement), /* @__PURE__ */ React26__namespace.createElement(PopoverContent, {
1158
1278
  className: "p-0 w-[var(--radix-popover-trigger-width)]",
1159
1279
  align: "start",
1160
- onOpenAutoFocus: /* @__PURE__ */ chunk3PV26V5F_js.__name((e) => e.preventDefault(), "onOpenAutoFocus")
1161
- }, /* @__PURE__ */ React25__namespace.createElement(Command, null, /* @__PURE__ */ React25__namespace.createElement(CommandList, null, /* @__PURE__ */ React25__namespace.createElement(CommandEmpty, null, emptyMessage), /* @__PURE__ */ React25__namespace.createElement(CommandGroup, null, suggestions.map((suggestion) => /* @__PURE__ */ React25__namespace.createElement(CommandItem, {
1280
+ onOpenAutoFocus: /* @__PURE__ */ chunk2HRO6CFU_js.__name((e) => e.preventDefault(), "onOpenAutoFocus")
1281
+ }, /* @__PURE__ */ React26__namespace.createElement(Command, null, /* @__PURE__ */ React26__namespace.createElement(CommandList, null, /* @__PURE__ */ React26__namespace.createElement(CommandEmpty, null, emptyMessage), /* @__PURE__ */ React26__namespace.createElement(CommandGroup, null, suggestions.map((suggestion) => /* @__PURE__ */ React26__namespace.createElement(CommandItem, {
1162
1282
  key: suggestion.value,
1163
1283
  value: suggestion.value,
1164
- onSelect: /* @__PURE__ */ chunk3PV26V5F_js.__name(() => handleSelect(suggestion), "onSelect")
1165
- }, /* @__PURE__ */ React25__namespace.createElement("div", {
1284
+ onSelect: /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => handleSelect(suggestion), "onSelect")
1285
+ }, /* @__PURE__ */ React26__namespace.createElement("div", {
1166
1286
  className: "flex items-center gap-2"
1167
- }, suggestion.icon, /* @__PURE__ */ React25__namespace.createElement("div", null, /* @__PURE__ */ React25__namespace.createElement("div", null, suggestion.label), suggestion.description && /* @__PURE__ */ React25__namespace.createElement("div", {
1287
+ }, suggestion.icon, /* @__PURE__ */ React26__namespace.createElement("div", null, /* @__PURE__ */ React26__namespace.createElement("div", null, suggestion.label), suggestion.description && /* @__PURE__ */ React26__namespace.createElement("div", {
1168
1288
  className: "text-xs text-muted-foreground"
1169
1289
  }, suggestion.description))))))))));
1170
1290
  }
1171
- chunk3PV26V5F_js.__name(ToolInput, "ToolInput");
1291
+ chunk2HRO6CFU_js.__name(ToolInput, "ToolInput");
1172
1292
  function Label2({ className, ...props }) {
1173
- return /* @__PURE__ */ React25__namespace.createElement(LabelPrimitive__namespace.Root, {
1293
+ return /* @__PURE__ */ React26__namespace.createElement(LabelPrimitive__namespace.Root, {
1174
1294
  "data-slot": "label",
1175
1295
  className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
1176
1296
  ...props
1177
1297
  });
1178
1298
  }
1179
- chunk3PV26V5F_js.__name(Label2, "Label");
1299
+ chunk2HRO6CFU_js.__name(Label2, "Label");
1180
1300
  function Textarea({ className, ...props }) {
1181
- return /* @__PURE__ */ React25__namespace.createElement("textarea", {
1301
+ return /* @__PURE__ */ React26__namespace.createElement("textarea", {
1182
1302
  "data-slot": "textarea",
1183
1303
  className: cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
1184
1304
  ...props
1185
1305
  });
1186
1306
  }
1187
- chunk3PV26V5F_js.__name(Textarea, "Textarea");
1307
+ chunk2HRO6CFU_js.__name(Textarea, "Textarea");
1188
1308
  function Checkbox({ className, ...props }) {
1189
- return /* @__PURE__ */ React25__namespace.createElement(CheckboxPrimitive__namespace.Root, {
1309
+ return /* @__PURE__ */ React26__namespace.createElement(CheckboxPrimitive__namespace.Root, {
1190
1310
  "data-slot": "checkbox",
1191
1311
  className: cn("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
1192
1312
  ...props
1193
- }, /* @__PURE__ */ React25__namespace.createElement(CheckboxPrimitive__namespace.Indicator, {
1313
+ }, /* @__PURE__ */ React26__namespace.createElement(CheckboxPrimitive__namespace.Indicator, {
1194
1314
  "data-slot": "checkbox-indicator",
1195
1315
  className: "grid place-content-center text-current transition-none"
1196
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.CheckIcon, {
1316
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.CheckIcon, {
1197
1317
  className: "size-3.5"
1198
1318
  })));
1199
1319
  }
1200
- chunk3PV26V5F_js.__name(Checkbox, "Checkbox");
1320
+ chunk2HRO6CFU_js.__name(Checkbox, "Checkbox");
1201
1321
  function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
1202
- const _values = React25__namespace.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [
1322
+ const _values = React26__namespace.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [
1203
1323
  min,
1204
1324
  max
1205
1325
  ], [
@@ -1208,7 +1328,7 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
1208
1328
  min,
1209
1329
  max
1210
1330
  ]);
1211
- return /* @__PURE__ */ React25__namespace.createElement(SliderPrimitive__namespace.Root, {
1331
+ return /* @__PURE__ */ React26__namespace.createElement(SliderPrimitive__namespace.Root, {
1212
1332
  "data-slot": "slider",
1213
1333
  defaultValue,
1214
1334
  value,
@@ -1216,32 +1336,32 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
1216
1336
  max,
1217
1337
  className: cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
1218
1338
  ...props
1219
- }, /* @__PURE__ */ React25__namespace.createElement(SliderPrimitive__namespace.Track, {
1339
+ }, /* @__PURE__ */ React26__namespace.createElement(SliderPrimitive__namespace.Track, {
1220
1340
  "data-slot": "slider-track",
1221
1341
  className: cn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")
1222
- }, /* @__PURE__ */ React25__namespace.createElement(SliderPrimitive__namespace.Range, {
1342
+ }, /* @__PURE__ */ React26__namespace.createElement(SliderPrimitive__namespace.Range, {
1223
1343
  "data-slot": "slider-range",
1224
1344
  className: cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
1225
1345
  })), Array.from({
1226
1346
  length: _values.length
1227
- }, (_, index) => /* @__PURE__ */ React25__namespace.createElement(SliderPrimitive__namespace.Thumb, {
1347
+ }, (_, index) => /* @__PURE__ */ React26__namespace.createElement(SliderPrimitive__namespace.Thumb, {
1228
1348
  "data-slot": "slider-thumb",
1229
1349
  key: index,
1230
1350
  className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
1231
1351
  })));
1232
1352
  }
1233
- chunk3PV26V5F_js.__name(Slider, "Slider");
1353
+ chunk2HRO6CFU_js.__name(Slider, "Slider");
1234
1354
  function Switch({ className, ...props }) {
1235
- return /* @__PURE__ */ React25__namespace.createElement(SwitchPrimitive__namespace.Root, {
1355
+ return /* @__PURE__ */ React26__namespace.createElement(SwitchPrimitive__namespace.Root, {
1236
1356
  "data-slot": "switch",
1237
1357
  className: cn("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
1238
1358
  ...props
1239
- }, /* @__PURE__ */ React25__namespace.createElement(SwitchPrimitive__namespace.Thumb, {
1359
+ }, /* @__PURE__ */ React26__namespace.createElement(SwitchPrimitive__namespace.Thumb, {
1240
1360
  "data-slot": "switch-thumb",
1241
1361
  className: cn("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")
1242
1362
  }));
1243
1363
  }
1244
- chunk3PV26V5F_js.__name(Switch, "Switch");
1364
+ chunk2HRO6CFU_js.__name(Switch, "Switch");
1245
1365
  var alertVariants = classVarianceAuthority.cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
1246
1366
  variants: {
1247
1367
  variant: {
@@ -1254,7 +1374,7 @@ var alertVariants = classVarianceAuthority.cva("relative w-full rounded-lg borde
1254
1374
  }
1255
1375
  });
1256
1376
  function Alert({ className, variant, ...props }) {
1257
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1377
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1258
1378
  "data-slot": "alert",
1259
1379
  role: "alert",
1260
1380
  className: cn(alertVariants({
@@ -1263,27 +1383,27 @@ function Alert({ className, variant, ...props }) {
1263
1383
  ...props
1264
1384
  });
1265
1385
  }
1266
- chunk3PV26V5F_js.__name(Alert, "Alert");
1386
+ chunk2HRO6CFU_js.__name(Alert, "Alert");
1267
1387
  function AlertTitle({ className, ...props }) {
1268
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1388
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1269
1389
  "data-slot": "alert-title",
1270
1390
  className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
1271
1391
  ...props
1272
1392
  });
1273
1393
  }
1274
- chunk3PV26V5F_js.__name(AlertTitle, "AlertTitle");
1394
+ chunk2HRO6CFU_js.__name(AlertTitle, "AlertTitle");
1275
1395
  function AlertDescription({ className, ...props }) {
1276
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1396
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1277
1397
  "data-slot": "alert-description",
1278
1398
  className: cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className),
1279
1399
  ...props
1280
1400
  });
1281
1401
  }
1282
- chunk3PV26V5F_js.__name(AlertDescription, "AlertDescription");
1402
+ chunk2HRO6CFU_js.__name(AlertDescription, "AlertDescription");
1283
1403
  function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitText = "Submit", loadingText, onSuccess, onError, showResult = false, showSuccessToast = false, successMessage, resetOnSuccess = false, className, layout = "vertical" }) {
1284
1404
  const { app, isConnected } = useMcpApp();
1285
1405
  const { call, loading, result, error, reset } = useTool(toolName, {
1286
- onSuccess: /* @__PURE__ */ chunk3PV26V5F_js.__name((result2) => {
1406
+ onSuccess: /* @__PURE__ */ chunk2HRO6CFU_js.__name((result2) => {
1287
1407
  onSuccess?.(result2);
1288
1408
  if (showSuccessToast) {
1289
1409
  const message = typeof successMessage === "function" ? successMessage(result2) : successMessage ?? "Form submitted successfully";
@@ -1295,10 +1415,10 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1295
1415
  }, "onSuccess"),
1296
1416
  onError
1297
1417
  });
1298
- const [fields, setFields] = React25.useState(manualFields ?? []);
1299
- const [schemaLoading, setSchemaLoading] = React25.useState(autoSchema);
1300
- const [formData, setFormData] = React25.useState({});
1301
- const initializeFormData = /* @__PURE__ */ chunk3PV26V5F_js.__name((fields2) => {
1418
+ const [fields, setFields] = React26.useState(manualFields ?? []);
1419
+ const [schemaLoading, setSchemaLoading] = React26.useState(autoSchema);
1420
+ const [formData, setFormData] = React26.useState({});
1421
+ const initializeFormData = /* @__PURE__ */ chunk2HRO6CFU_js.__name((fields2) => {
1302
1422
  const initial = {};
1303
1423
  fields2.forEach((field) => {
1304
1424
  if (field.defaultValue !== void 0) {
@@ -1313,14 +1433,14 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1313
1433
  });
1314
1434
  setFormData(initial);
1315
1435
  }, "initializeFormData");
1316
- const resetForm = /* @__PURE__ */ chunk3PV26V5F_js.__name(() => {
1436
+ const resetForm = /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => {
1317
1437
  initializeFormData(fields);
1318
1438
  reset();
1319
1439
  }, "resetForm");
1320
- React25.useEffect(() => {
1440
+ React26.useEffect(() => {
1321
1441
  if (autoSchema && app && isConnected) {
1322
1442
  setSchemaLoading(true);
1323
- const fetchSchema = /* @__PURE__ */ chunk3PV26V5F_js.__name(async () => {
1443
+ const fetchSchema = /* @__PURE__ */ chunk2HRO6CFU_js.__name(async () => {
1324
1444
  try {
1325
1445
  console.warn("[ToolForm] Auto-schema not fully implemented, use manual fields");
1326
1446
  if (manualFields) {
@@ -1345,7 +1465,7 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1345
1465
  manualFields,
1346
1466
  toolName
1347
1467
  ]);
1348
- const handleSubmit = /* @__PURE__ */ chunk3PV26V5F_js.__name(async (e) => {
1468
+ const handleSubmit = /* @__PURE__ */ chunk2HRO6CFU_js.__name(async (e) => {
1349
1469
  e.preventDefault();
1350
1470
  const args = {};
1351
1471
  fields.forEach((field) => {
@@ -1357,80 +1477,80 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1357
1477
  });
1358
1478
  await call(args);
1359
1479
  }, "handleSubmit");
1360
- const handleChange = /* @__PURE__ */ chunk3PV26V5F_js.__name((name, value) => {
1480
+ const handleChange = /* @__PURE__ */ chunk2HRO6CFU_js.__name((name, value) => {
1361
1481
  setFormData((prev) => ({
1362
1482
  ...prev,
1363
1483
  [name]: value
1364
1484
  }));
1365
1485
  }, "handleChange");
1366
- const renderField = /* @__PURE__ */ chunk3PV26V5F_js.__name((field) => {
1486
+ const renderField = /* @__PURE__ */ chunk2HRO6CFU_js.__name((field) => {
1367
1487
  const value = formData[field.name];
1368
1488
  switch (field.type) {
1369
1489
  case "textarea":
1370
- return /* @__PURE__ */ React25__namespace.createElement(Textarea, {
1490
+ return /* @__PURE__ */ React26__namespace.createElement(Textarea, {
1371
1491
  id: field.name,
1372
1492
  placeholder: field.placeholder,
1373
1493
  value: value ?? "",
1374
- onChange: /* @__PURE__ */ chunk3PV26V5F_js.__name((e) => handleChange(field.name, e.target.value), "onChange"),
1494
+ onChange: /* @__PURE__ */ chunk2HRO6CFU_js.__name((e) => handleChange(field.name, e.target.value), "onChange"),
1375
1495
  disabled: field.disabled || loading,
1376
1496
  required: field.required
1377
1497
  });
1378
1498
  case "select":
1379
- return /* @__PURE__ */ React25__namespace.createElement(Select, {
1499
+ return /* @__PURE__ */ React26__namespace.createElement(Select, {
1380
1500
  value: value ?? "",
1381
- onValueChange: /* @__PURE__ */ chunk3PV26V5F_js.__name((v) => handleChange(field.name, v), "onValueChange"),
1501
+ onValueChange: /* @__PURE__ */ chunk2HRO6CFU_js.__name((v) => handleChange(field.name, v), "onValueChange"),
1382
1502
  disabled: field.disabled || loading
1383
- }, /* @__PURE__ */ React25__namespace.createElement(SelectTrigger, null, /* @__PURE__ */ React25__namespace.createElement(SelectValue, {
1503
+ }, /* @__PURE__ */ React26__namespace.createElement(SelectTrigger, null, /* @__PURE__ */ React26__namespace.createElement(SelectValue, {
1384
1504
  placeholder: field.placeholder ?? "Select..."
1385
- })), /* @__PURE__ */ React25__namespace.createElement(SelectContent, null, field.options?.map((option) => /* @__PURE__ */ React25__namespace.createElement(SelectItem, {
1505
+ })), /* @__PURE__ */ React26__namespace.createElement(SelectContent, null, field.options?.map((option) => /* @__PURE__ */ React26__namespace.createElement(SelectItem, {
1386
1506
  key: option.value,
1387
1507
  value: option.value
1388
1508
  }, option.label))));
1389
1509
  case "checkbox":
1390
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1510
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1391
1511
  className: "flex items-center space-x-2"
1392
- }, /* @__PURE__ */ React25__namespace.createElement(Checkbox, {
1512
+ }, /* @__PURE__ */ React26__namespace.createElement(Checkbox, {
1393
1513
  id: field.name,
1394
1514
  checked: value ?? false,
1395
- onCheckedChange: /* @__PURE__ */ chunk3PV26V5F_js.__name((checked) => handleChange(field.name, checked), "onCheckedChange"),
1515
+ onCheckedChange: /* @__PURE__ */ chunk2HRO6CFU_js.__name((checked) => handleChange(field.name, checked), "onCheckedChange"),
1396
1516
  disabled: field.disabled || loading
1397
- }), /* @__PURE__ */ React25__namespace.createElement("label", {
1517
+ }), /* @__PURE__ */ React26__namespace.createElement("label", {
1398
1518
  htmlFor: field.name,
1399
1519
  className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1400
1520
  }, field.label));
1401
1521
  case "switch":
1402
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1522
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1403
1523
  className: "flex items-center space-x-2"
1404
- }, /* @__PURE__ */ React25__namespace.createElement(Switch, {
1524
+ }, /* @__PURE__ */ React26__namespace.createElement(Switch, {
1405
1525
  id: field.name,
1406
1526
  checked: value ?? false,
1407
- onCheckedChange: /* @__PURE__ */ chunk3PV26V5F_js.__name((checked) => handleChange(field.name, checked), "onCheckedChange"),
1527
+ onCheckedChange: /* @__PURE__ */ chunk2HRO6CFU_js.__name((checked) => handleChange(field.name, checked), "onCheckedChange"),
1408
1528
  disabled: field.disabled || loading
1409
- }), /* @__PURE__ */ React25__namespace.createElement(Label2, {
1529
+ }), /* @__PURE__ */ React26__namespace.createElement(Label2, {
1410
1530
  htmlFor: field.name
1411
1531
  }, field.label));
1412
1532
  case "slider":
1413
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1533
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1414
1534
  className: "space-y-2"
1415
- }, /* @__PURE__ */ React25__namespace.createElement("div", {
1535
+ }, /* @__PURE__ */ React26__namespace.createElement("div", {
1416
1536
  className: "flex justify-between text-sm"
1417
- }, /* @__PURE__ */ React25__namespace.createElement("span", null, field.min ?? 0), /* @__PURE__ */ React25__namespace.createElement("span", null, value ?? field.min ?? 0), /* @__PURE__ */ React25__namespace.createElement("span", null, field.max ?? 100)), /* @__PURE__ */ React25__namespace.createElement(Slider, {
1537
+ }, /* @__PURE__ */ React26__namespace.createElement("span", null, field.min ?? 0), /* @__PURE__ */ React26__namespace.createElement("span", null, value ?? field.min ?? 0), /* @__PURE__ */ React26__namespace.createElement("span", null, field.max ?? 100)), /* @__PURE__ */ React26__namespace.createElement(Slider, {
1418
1538
  value: [
1419
1539
  value ?? field.min ?? 0
1420
1540
  ],
1421
- onValueChange: /* @__PURE__ */ chunk3PV26V5F_js.__name(([v]) => handleChange(field.name, v), "onValueChange"),
1541
+ onValueChange: /* @__PURE__ */ chunk2HRO6CFU_js.__name(([v]) => handleChange(field.name, v), "onValueChange"),
1422
1542
  min: field.min ?? 0,
1423
1543
  max: field.max ?? 100,
1424
1544
  step: field.step ?? 1,
1425
1545
  disabled: field.disabled || loading
1426
1546
  }));
1427
1547
  case "number":
1428
- return /* @__PURE__ */ React25__namespace.createElement(Input, {
1548
+ return /* @__PURE__ */ React26__namespace.createElement(Input, {
1429
1549
  id: field.name,
1430
1550
  type: "number",
1431
1551
  placeholder: field.placeholder,
1432
1552
  value: value ?? "",
1433
- onChange: /* @__PURE__ */ chunk3PV26V5F_js.__name((e) => handleChange(field.name, e.target.value), "onChange"),
1553
+ onChange: /* @__PURE__ */ chunk2HRO6CFU_js.__name((e) => handleChange(field.name, e.target.value), "onChange"),
1434
1554
  min: field.min,
1435
1555
  max: field.max,
1436
1556
  step: field.step,
@@ -1438,64 +1558,64 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1438
1558
  required: field.required
1439
1559
  });
1440
1560
  default:
1441
- return /* @__PURE__ */ React25__namespace.createElement(Input, {
1561
+ return /* @__PURE__ */ React26__namespace.createElement(Input, {
1442
1562
  id: field.name,
1443
1563
  type: field.type ?? "text",
1444
1564
  placeholder: field.placeholder,
1445
1565
  value: value ?? "",
1446
- onChange: /* @__PURE__ */ chunk3PV26V5F_js.__name((e) => handleChange(field.name, e.target.value), "onChange"),
1566
+ onChange: /* @__PURE__ */ chunk2HRO6CFU_js.__name((e) => handleChange(field.name, e.target.value), "onChange"),
1447
1567
  disabled: field.disabled || loading,
1448
1568
  required: field.required
1449
1569
  });
1450
1570
  }
1451
1571
  }, "renderField");
1452
1572
  if (schemaLoading) {
1453
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1573
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1454
1574
  className: "flex items-center justify-center p-8"
1455
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
1575
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
1456
1576
  className: "h-6 w-6 animate-spin text-muted-foreground"
1457
1577
  }));
1458
1578
  }
1459
- return /* @__PURE__ */ React25__namespace.createElement("form", {
1579
+ return /* @__PURE__ */ React26__namespace.createElement("form", {
1460
1580
  className: cn("space-y-4", className),
1461
1581
  onSubmit: handleSubmit
1462
- }, /* @__PURE__ */ React25__namespace.createElement("div", {
1582
+ }, /* @__PURE__ */ React26__namespace.createElement("div", {
1463
1583
  className: cn("space-y-4", layout === "horizontal" && "grid grid-cols-2 gap-4")
1464
- }, fields.map((field) => /* @__PURE__ */ React25__namespace.createElement("div", {
1584
+ }, fields.map((field) => /* @__PURE__ */ React26__namespace.createElement("div", {
1465
1585
  key: field.name,
1466
1586
  className: "space-y-2"
1467
- }, field.type !== "checkbox" && field.type !== "switch" && /* @__PURE__ */ React25__namespace.createElement(Label2, {
1587
+ }, field.type !== "checkbox" && field.type !== "switch" && /* @__PURE__ */ React26__namespace.createElement(Label2, {
1468
1588
  htmlFor: field.name
1469
- }, field.label, field.required && /* @__PURE__ */ React25__namespace.createElement("span", {
1589
+ }, field.label, field.required && /* @__PURE__ */ React26__namespace.createElement("span", {
1470
1590
  className: "text-destructive ml-1"
1471
- }, "*")), renderField(field), field.description && /* @__PURE__ */ React25__namespace.createElement("p", {
1591
+ }, "*")), renderField(field), field.description && /* @__PURE__ */ React26__namespace.createElement("p", {
1472
1592
  className: "text-sm text-muted-foreground"
1473
- }, field.description)))), /* @__PURE__ */ React25__namespace.createElement("div", {
1593
+ }, field.description)))), /* @__PURE__ */ React26__namespace.createElement("div", {
1474
1594
  className: "flex items-center gap-2"
1475
- }, /* @__PURE__ */ React25__namespace.createElement(Button, {
1595
+ }, /* @__PURE__ */ React26__namespace.createElement(Button, {
1476
1596
  type: "submit",
1477
1597
  disabled: loading
1478
- }, loading ? /* @__PURE__ */ React25__namespace.createElement(React25__namespace.Fragment, null, /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
1598
+ }, loading ? /* @__PURE__ */ React26__namespace.createElement(React26__namespace.Fragment, null, /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
1479
1599
  className: "h-4 w-4 animate-spin mr-2"
1480
- }), loadingText ?? "Submitting...") : submitText)), error && /* @__PURE__ */ React25__namespace.createElement(Alert, {
1600
+ }), loadingText ?? "Submitting...") : submitText)), error && /* @__PURE__ */ React26__namespace.createElement(Alert, {
1481
1601
  variant: "destructive"
1482
- }, /* @__PURE__ */ React25__namespace.createElement(AlertDescription, null, error.message)), showResult && result !== null && /* @__PURE__ */ React25__namespace.createElement("div", {
1602
+ }, /* @__PURE__ */ React26__namespace.createElement(AlertDescription, null, error.message)), showResult && result !== null && /* @__PURE__ */ React26__namespace.createElement("div", {
1483
1603
  className: "rounded-md bg-muted p-4"
1484
- }, /* @__PURE__ */ React25__namespace.createElement("pre", {
1604
+ }, /* @__PURE__ */ React26__namespace.createElement("pre", {
1485
1605
  className: "text-sm overflow-auto"
1486
1606
  }, JSON.stringify(result, null, 2))));
1487
1607
  }
1488
- chunk3PV26V5F_js.__name(ToolForm, "ToolForm");
1608
+ chunk2HRO6CFU_js.__name(ToolForm, "ToolForm");
1489
1609
  function useResource(uri, options = {}) {
1490
1610
  const { app, isConnected } = useMcpApp();
1491
1611
  const { refreshInterval, subscribe = false, transform, skip = false } = options;
1492
- const [data, setData] = React25.useState(null);
1493
- const [loading, setLoading] = React25.useState(!skip);
1494
- const [error, setError] = React25.useState(null);
1495
- const [lastUpdated, setLastUpdated] = React25.useState(null);
1496
- const intervalRef = React25.useRef(null);
1497
- const mountedRef = React25.useRef(true);
1498
- const fetchResource = React25.useCallback(async () => {
1612
+ const [data, setData] = React26.useState(null);
1613
+ const [loading, setLoading] = React26.useState(!skip);
1614
+ const [error, setError] = React26.useState(null);
1615
+ const [lastUpdated, setLastUpdated] = React26.useState(null);
1616
+ const intervalRef = React26.useRef(null);
1617
+ const mountedRef = React26.useRef(true);
1618
+ const fetchResource = React26.useCallback(async () => {
1499
1619
  if (!app || !isConnected) {
1500
1620
  throw new Error("Not connected to MCP host");
1501
1621
  }
@@ -1548,12 +1668,12 @@ function useResource(uri, options = {}) {
1548
1668
  uri,
1549
1669
  transform
1550
1670
  ]);
1551
- const refresh = React25.useCallback(async () => {
1671
+ const refresh = React26.useCallback(async () => {
1552
1672
  return fetchResource();
1553
1673
  }, [
1554
1674
  fetchResource
1555
1675
  ]);
1556
- React25.useEffect(() => {
1676
+ React26.useEffect(() => {
1557
1677
  mountedRef.current = true;
1558
1678
  if (!skip && isConnected) {
1559
1679
  fetchResource().catch(() => {
@@ -1568,7 +1688,7 @@ function useResource(uri, options = {}) {
1568
1688
  skip,
1569
1689
  fetchResource
1570
1690
  ]);
1571
- React25.useEffect(() => {
1691
+ React26.useEffect(() => {
1572
1692
  if (refreshInterval && refreshInterval > 0 && isConnected && !skip) {
1573
1693
  intervalRef.current = setInterval(() => {
1574
1694
  fetchResource().catch(() => {
@@ -1587,7 +1707,7 @@ function useResource(uri, options = {}) {
1587
1707
  skip,
1588
1708
  fetchResource
1589
1709
  ]);
1590
- React25.useEffect(() => {
1710
+ React26.useEffect(() => {
1591
1711
  if (subscribe) {
1592
1712
  console.warn("[useResource] Subscription support not yet implemented");
1593
1713
  }
@@ -1602,46 +1722,46 @@ function useResource(uri, options = {}) {
1602
1722
  lastUpdated
1603
1723
  };
1604
1724
  }
1605
- chunk3PV26V5F_js.__name(useResource, "useResource");
1725
+ chunk2HRO6CFU_js.__name(useResource, "useResource");
1606
1726
  function Skeleton({ className, ...props }) {
1607
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
1727
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
1608
1728
  "data-slot": "skeleton",
1609
1729
  className: cn("bg-accent animate-pulse rounded-md", className),
1610
1730
  ...props
1611
1731
  });
1612
1732
  }
1613
- chunk3PV26V5F_js.__name(Skeleton, "Skeleton");
1733
+ chunk2HRO6CFU_js.__name(Skeleton, "Skeleton");
1614
1734
 
1615
1735
  // src/mcp/ResourceView.tsx
1616
1736
  function DefaultLoading() {
1617
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1737
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1618
1738
  className: "flex flex-col gap-3 p-4"
1619
- }, /* @__PURE__ */ React25__namespace.createElement(Skeleton, {
1739
+ }, /* @__PURE__ */ React26__namespace.createElement(Skeleton, {
1620
1740
  className: "h-4 w-3/4"
1621
- }), /* @__PURE__ */ React25__namespace.createElement(Skeleton, {
1741
+ }), /* @__PURE__ */ React26__namespace.createElement(Skeleton, {
1622
1742
  className: "h-4 w-1/2"
1623
- }), /* @__PURE__ */ React25__namespace.createElement(Skeleton, {
1743
+ }), /* @__PURE__ */ React26__namespace.createElement(Skeleton, {
1624
1744
  className: "h-20 w-full"
1625
1745
  }));
1626
1746
  }
1627
- chunk3PV26V5F_js.__name(DefaultLoading, "DefaultLoading");
1747
+ chunk2HRO6CFU_js.__name(DefaultLoading, "DefaultLoading");
1628
1748
  function DefaultError({ error, onRetry }) {
1629
- return /* @__PURE__ */ React25__namespace.createElement(Alert, {
1749
+ return /* @__PURE__ */ React26__namespace.createElement(Alert, {
1630
1750
  variant: "destructive"
1631
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.AlertCircle, {
1751
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.AlertCircle, {
1632
1752
  className: "h-4 w-4"
1633
- }), /* @__PURE__ */ React25__namespace.createElement(AlertTitle, null, "Error loading resource"), /* @__PURE__ */ React25__namespace.createElement(AlertDescription, {
1753
+ }), /* @__PURE__ */ React26__namespace.createElement(AlertTitle, null, "Error loading resource"), /* @__PURE__ */ React26__namespace.createElement(AlertDescription, {
1634
1754
  className: "flex flex-col gap-2"
1635
- }, /* @__PURE__ */ React25__namespace.createElement("span", null, error.message), /* @__PURE__ */ React25__namespace.createElement(Button, {
1755
+ }, /* @__PURE__ */ React26__namespace.createElement("span", null, error.message), /* @__PURE__ */ React26__namespace.createElement(Button, {
1636
1756
  variant: "outline",
1637
1757
  size: "sm",
1638
1758
  onClick: onRetry,
1639
1759
  className: "w-fit"
1640
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.RefreshCw, {
1760
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.RefreshCw, {
1641
1761
  className: "h-4 w-4 mr-2"
1642
1762
  }), "Retry")));
1643
1763
  }
1644
- chunk3PV26V5F_js.__name(DefaultError, "DefaultError");
1764
+ chunk2HRO6CFU_js.__name(DefaultError, "DefaultError");
1645
1765
  function ResourceView({ uri, refreshInterval, subscribe, transform, loading: loadingContent, error: errorContent, children, className, skip = false }) {
1646
1766
  const { data, loading, error, refresh, lastUpdated } = useResource(uri, {
1647
1767
  refreshInterval,
@@ -1657,52 +1777,52 @@ function ResourceView({ uri, refreshInterval, subscribe, transform, loading: loa
1657
1777
  };
1658
1778
  if (loading && data === null) {
1659
1779
  if (loadingContent) {
1660
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1780
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1661
1781
  className
1662
1782
  }, loadingContent);
1663
1783
  }
1664
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1784
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1665
1785
  className: cn("flex items-center justify-center p-8", className)
1666
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
1786
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
1667
1787
  className: "h-8 w-8 animate-spin text-muted-foreground"
1668
1788
  }));
1669
1789
  }
1670
1790
  if (error && data === null) {
1671
1791
  if (errorContent) {
1672
1792
  if (typeof errorContent === "function") {
1673
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1793
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1674
1794
  className
1675
1795
  }, errorContent(error, refresh));
1676
1796
  }
1677
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1797
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1678
1798
  className
1679
1799
  }, errorContent);
1680
1800
  }
1681
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1801
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1682
1802
  className
1683
- }, /* @__PURE__ */ React25__namespace.createElement(DefaultError, {
1803
+ }, /* @__PURE__ */ React26__namespace.createElement(DefaultError, {
1684
1804
  error,
1685
1805
  onRetry: refresh
1686
1806
  }));
1687
1807
  }
1688
1808
  if (data !== null) {
1689
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1809
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1690
1810
  className
1691
1811
  }, children(data, meta));
1692
1812
  }
1693
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1813
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1694
1814
  className
1695
- }, loadingContent ?? /* @__PURE__ */ React25__namespace.createElement(DefaultLoading, null));
1815
+ }, loadingContent ?? /* @__PURE__ */ React26__namespace.createElement(DefaultLoading, null));
1696
1816
  }
1697
- chunk3PV26V5F_js.__name(ResourceView, "ResourceView");
1817
+ chunk2HRO6CFU_js.__name(ResourceView, "ResourceView");
1698
1818
  function useToolStream(options = {}) {
1699
1819
  const { toolInputPartial, toolInput, toolResult } = useMcpApp();
1700
1820
  const { onPartial, onComplete } = options;
1701
- const [partial, setPartial] = React25.useState(null);
1702
- const [complete, setComplete] = React25.useState(null);
1703
- const [isStreaming, setIsStreaming] = React25.useState(false);
1704
- const [isComplete, setIsComplete] = React25.useState(false);
1705
- React25.useEffect(() => {
1821
+ const [partial, setPartial] = React26.useState(null);
1822
+ const [complete, setComplete] = React26.useState(null);
1823
+ const [isStreaming, setIsStreaming] = React26.useState(false);
1824
+ const [isComplete, setIsComplete] = React26.useState(false);
1825
+ React26.useEffect(() => {
1706
1826
  if (toolInputPartial) {
1707
1827
  setPartial(toolInputPartial);
1708
1828
  setIsStreaming(true);
@@ -1713,7 +1833,7 @@ function useToolStream(options = {}) {
1713
1833
  toolInputPartial,
1714
1834
  onPartial
1715
1835
  ]);
1716
- React25.useEffect(() => {
1836
+ React26.useEffect(() => {
1717
1837
  if (toolInput) {
1718
1838
  setComplete(toolInput);
1719
1839
  setIsStreaming(false);
@@ -1724,7 +1844,7 @@ function useToolStream(options = {}) {
1724
1844
  toolInput,
1725
1845
  onComplete
1726
1846
  ]);
1727
- React25.useEffect(() => {
1847
+ React26.useEffect(() => {
1728
1848
  if (toolResult && !toolResult.isError) {
1729
1849
  setIsStreaming(false);
1730
1850
  setIsComplete(true);
@@ -1739,13 +1859,13 @@ function useToolStream(options = {}) {
1739
1859
  isComplete
1740
1860
  };
1741
1861
  }
1742
- chunk3PV26V5F_js.__name(useToolStream, "useToolStream");
1862
+ chunk2HRO6CFU_js.__name(useToolStream, "useToolStream");
1743
1863
  function Progress({ className, value, ...props }) {
1744
- return /* @__PURE__ */ React25__namespace.createElement(ProgressPrimitive__namespace.Root, {
1864
+ return /* @__PURE__ */ React26__namespace.createElement(ProgressPrimitive__namespace.Root, {
1745
1865
  "data-slot": "progress",
1746
1866
  className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
1747
1867
  ...props
1748
- }, /* @__PURE__ */ React25__namespace.createElement(ProgressPrimitive__namespace.Indicator, {
1868
+ }, /* @__PURE__ */ React26__namespace.createElement(ProgressPrimitive__namespace.Indicator, {
1749
1869
  "data-slot": "progress-indicator",
1750
1870
  className: "bg-primary h-full w-full flex-1 transition-all",
1751
1871
  style: {
@@ -1753,7 +1873,7 @@ function Progress({ className, value, ...props }) {
1753
1873
  }
1754
1874
  }));
1755
1875
  }
1756
- chunk3PV26V5F_js.__name(Progress, "Progress");
1876
+ chunk2HRO6CFU_js.__name(Progress, "Progress");
1757
1877
 
1758
1878
  // src/mcp/StreamingContent.tsx
1759
1879
  function StreamingContent({ fallback, showProgress = false, progress: externalProgress, onPartial, onComplete, children, className, streamingStyle = "opacity" }) {
@@ -1764,106 +1884,106 @@ function StreamingContent({ fallback, showProgress = false, progress: externalPr
1764
1884
  const data = complete ?? partial;
1765
1885
  if (!data) {
1766
1886
  if (fallback) {
1767
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1887
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1768
1888
  className
1769
1889
  }, fallback);
1770
1890
  }
1771
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1891
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1772
1892
  className: cn("flex items-center justify-center p-8", className)
1773
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
1893
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
1774
1894
  className: "h-6 w-6 animate-spin text-muted-foreground"
1775
1895
  }));
1776
1896
  }
1777
1897
  const streamingClasses = cn(streamingStyle === "opacity" && isStreaming && "opacity-70", streamingStyle === "blur" && isStreaming && "blur-[1px]");
1778
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1898
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1779
1899
  className: cn("relative", className)
1780
- }, showProgress && isStreaming && /* @__PURE__ */ React25__namespace.createElement("div", {
1900
+ }, showProgress && isStreaming && /* @__PURE__ */ React26__namespace.createElement("div", {
1781
1901
  className: "absolute top-0 left-0 right-0 z-10"
1782
- }, externalProgress !== void 0 ? /* @__PURE__ */ React25__namespace.createElement(Progress, {
1902
+ }, externalProgress !== void 0 ? /* @__PURE__ */ React26__namespace.createElement(Progress, {
1783
1903
  value: externalProgress,
1784
1904
  className: "h-1"
1785
- }) : /* @__PURE__ */ React25__namespace.createElement("div", {
1905
+ }) : /* @__PURE__ */ React26__namespace.createElement("div", {
1786
1906
  className: "h-1 bg-primary/20 overflow-hidden"
1787
- }, /* @__PURE__ */ React25__namespace.createElement("div", {
1907
+ }, /* @__PURE__ */ React26__namespace.createElement("div", {
1788
1908
  className: "h-full w-1/3 bg-primary animate-[shimmer_1s_infinite]"
1789
- }))), isStreaming && /* @__PURE__ */ React25__namespace.createElement("div", {
1909
+ }))), isStreaming && /* @__PURE__ */ React26__namespace.createElement("div", {
1790
1910
  className: "absolute top-2 right-2 z-10"
1791
- }, /* @__PURE__ */ React25__namespace.createElement("div", {
1911
+ }, /* @__PURE__ */ React26__namespace.createElement("div", {
1792
1912
  className: "flex items-center gap-1 px-2 py-1 rounded-full bg-muted text-muted-foreground text-xs"
1793
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
1913
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
1794
1914
  className: "h-3 w-3 animate-spin"
1795
- }), /* @__PURE__ */ React25__namespace.createElement("span", null, "Streaming..."))), /* @__PURE__ */ React25__namespace.createElement("div", {
1915
+ }), /* @__PURE__ */ React26__namespace.createElement("span", null, "Streaming..."))), /* @__PURE__ */ React26__namespace.createElement("div", {
1796
1916
  className: cn("transition-all duration-200", streamingClasses)
1797
1917
  }, children(data, isComplete)));
1798
1918
  }
1799
- chunk3PV26V5F_js.__name(StreamingContent, "StreamingContent");
1919
+ chunk2HRO6CFU_js.__name(StreamingContent, "StreamingContent");
1800
1920
  function Table({ className, ...props }) {
1801
- return /* @__PURE__ */ React25__namespace.createElement("div", {
1921
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1802
1922
  "data-slot": "table-container",
1803
1923
  className: "relative w-full overflow-x-auto"
1804
- }, /* @__PURE__ */ React25__namespace.createElement("table", {
1924
+ }, /* @__PURE__ */ React26__namespace.createElement("table", {
1805
1925
  "data-slot": "table",
1806
1926
  className: cn("w-full caption-bottom text-sm", className),
1807
1927
  ...props
1808
1928
  }));
1809
1929
  }
1810
- chunk3PV26V5F_js.__name(Table, "Table");
1930
+ chunk2HRO6CFU_js.__name(Table, "Table");
1811
1931
  function TableHeader({ className, ...props }) {
1812
- return /* @__PURE__ */ React25__namespace.createElement("thead", {
1932
+ return /* @__PURE__ */ React26__namespace.createElement("thead", {
1813
1933
  "data-slot": "table-header",
1814
1934
  className: cn("[&_tr]:border-b", className),
1815
1935
  ...props
1816
1936
  });
1817
1937
  }
1818
- chunk3PV26V5F_js.__name(TableHeader, "TableHeader");
1938
+ chunk2HRO6CFU_js.__name(TableHeader, "TableHeader");
1819
1939
  function TableBody({ className, ...props }) {
1820
- return /* @__PURE__ */ React25__namespace.createElement("tbody", {
1940
+ return /* @__PURE__ */ React26__namespace.createElement("tbody", {
1821
1941
  "data-slot": "table-body",
1822
1942
  className: cn("[&_tr:last-child]:border-0", className),
1823
1943
  ...props
1824
1944
  });
1825
1945
  }
1826
- chunk3PV26V5F_js.__name(TableBody, "TableBody");
1946
+ chunk2HRO6CFU_js.__name(TableBody, "TableBody");
1827
1947
  function TableFooter({ className, ...props }) {
1828
- return /* @__PURE__ */ React25__namespace.createElement("tfoot", {
1948
+ return /* @__PURE__ */ React26__namespace.createElement("tfoot", {
1829
1949
  "data-slot": "table-footer",
1830
1950
  className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
1831
1951
  ...props
1832
1952
  });
1833
1953
  }
1834
- chunk3PV26V5F_js.__name(TableFooter, "TableFooter");
1954
+ chunk2HRO6CFU_js.__name(TableFooter, "TableFooter");
1835
1955
  function TableRow({ className, ...props }) {
1836
- return /* @__PURE__ */ React25__namespace.createElement("tr", {
1956
+ return /* @__PURE__ */ React26__namespace.createElement("tr", {
1837
1957
  "data-slot": "table-row",
1838
1958
  className: cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className),
1839
1959
  ...props
1840
1960
  });
1841
1961
  }
1842
- chunk3PV26V5F_js.__name(TableRow, "TableRow");
1962
+ chunk2HRO6CFU_js.__name(TableRow, "TableRow");
1843
1963
  function TableHead({ className, ...props }) {
1844
- return /* @__PURE__ */ React25__namespace.createElement("th", {
1964
+ return /* @__PURE__ */ React26__namespace.createElement("th", {
1845
1965
  "data-slot": "table-head",
1846
1966
  className: cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
1847
1967
  ...props
1848
1968
  });
1849
1969
  }
1850
- chunk3PV26V5F_js.__name(TableHead, "TableHead");
1970
+ chunk2HRO6CFU_js.__name(TableHead, "TableHead");
1851
1971
  function TableCell({ className, ...props }) {
1852
- return /* @__PURE__ */ React25__namespace.createElement("td", {
1972
+ return /* @__PURE__ */ React26__namespace.createElement("td", {
1853
1973
  "data-slot": "table-cell",
1854
1974
  className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
1855
1975
  ...props
1856
1976
  });
1857
1977
  }
1858
- chunk3PV26V5F_js.__name(TableCell, "TableCell");
1978
+ chunk2HRO6CFU_js.__name(TableCell, "TableCell");
1859
1979
  function TableCaption({ className, ...props }) {
1860
- return /* @__PURE__ */ React25__namespace.createElement("caption", {
1980
+ return /* @__PURE__ */ React26__namespace.createElement("caption", {
1861
1981
  "data-slot": "table-caption",
1862
1982
  className: cn("text-muted-foreground mt-4 text-sm", className),
1863
1983
  ...props
1864
1984
  });
1865
1985
  }
1866
- chunk3PV26V5F_js.__name(TableCaption, "TableCaption");
1986
+ chunk2HRO6CFU_js.__name(TableCaption, "TableCaption");
1867
1987
  function getNestedValue(obj, path) {
1868
1988
  return path.split(".").reduce((current, key) => {
1869
1989
  if (current && typeof current === "object" && key in current) {
@@ -1872,7 +1992,7 @@ function getNestedValue(obj, path) {
1872
1992
  return void 0;
1873
1993
  }, obj);
1874
1994
  }
1875
- chunk3PV26V5F_js.__name(getNestedValue, "getNestedValue");
1995
+ chunk2HRO6CFU_js.__name(getNestedValue, "getNestedValue");
1876
1996
  function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagination = true, pageSizes = [
1877
1997
  10,
1878
1998
  25,
@@ -1885,28 +2005,28 @@ function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagin
1885
2005
  const toolConfig = typeof dataTool === "string" ? {
1886
2006
  name: dataTool
1887
2007
  } : dataTool;
1888
- const [data, setData] = React25.useState({
2008
+ const [data, setData] = React26.useState({
1889
2009
  rows: [],
1890
2010
  total: 0
1891
2011
  });
1892
- const [paginationState, setPaginationState] = React25.useState({
2012
+ const [paginationState, setPaginationState] = React26.useState({
1893
2013
  page: 1,
1894
2014
  pageSize: defaultPageSize
1895
2015
  });
1896
- const [sortState, setSortState] = React25.useState(defaultSort ?? {
2016
+ const [sortState, setSortState] = React26.useState(defaultSort ?? {
1897
2017
  column: null,
1898
2018
  direction: "asc"
1899
2019
  });
1900
2020
  const { call, loading, error } = useTool(toolConfig.name, {
1901
2021
  defaultArgs: toolConfig.args,
1902
- onSuccess: /* @__PURE__ */ chunk3PV26V5F_js.__name((result) => {
2022
+ onSuccess: /* @__PURE__ */ chunk2HRO6CFU_js.__name((result) => {
1903
2023
  const gridData = transformData ? transformData(result) : result;
1904
2024
  setData(gridData);
1905
2025
  onDataLoaded?.(gridData);
1906
2026
  }, "onSuccess"),
1907
2027
  onError
1908
2028
  });
1909
- const fetchData = React25.useCallback(() => {
2029
+ const fetchData = React26.useCallback(() => {
1910
2030
  const args = {};
1911
2031
  if (pagination) {
1912
2032
  args.page = paginationState.page;
@@ -1926,12 +2046,12 @@ function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagin
1926
2046
  paginationState,
1927
2047
  sortState
1928
2048
  ]);
1929
- const initialFetchDone = React25__namespace.useRef(false);
1930
- const prevStateRef = React25__namespace.useRef({
2049
+ const initialFetchDone = React26__namespace.useRef(false);
2050
+ const prevStateRef = React26__namespace.useRef({
1931
2051
  pagination: paginationState,
1932
2052
  sort: sortState
1933
2053
  });
1934
- React25.useEffect(() => {
2054
+ React26.useEffect(() => {
1935
2055
  if (!initialFetchDone.current) {
1936
2056
  initialFetchDone.current = true;
1937
2057
  fetchData();
@@ -1951,7 +2071,7 @@ function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagin
1951
2071
  paginationState,
1952
2072
  sortState
1953
2073
  ]);
1954
- React25.useEffect(() => {
2074
+ React26.useEffect(() => {
1955
2075
  if (refreshInterval && refreshInterval > 0) {
1956
2076
  const interval = setInterval(fetchData, refreshInterval);
1957
2077
  return () => clearInterval(interval);
@@ -1960,19 +2080,19 @@ function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagin
1960
2080
  refreshInterval,
1961
2081
  fetchData
1962
2082
  ]);
1963
- const handleSort = React25.useCallback((column) => {
2083
+ const handleSort = React26.useCallback((column) => {
1964
2084
  setSortState((prev) => ({
1965
2085
  column,
1966
2086
  direction: prev.column === column && prev.direction === "asc" ? "desc" : "asc"
1967
2087
  }));
1968
2088
  }, []);
1969
- const handlePageChange = React25.useCallback((page) => {
2089
+ const handlePageChange = React26.useCallback((page) => {
1970
2090
  setPaginationState((prev) => ({
1971
2091
  ...prev,
1972
2092
  page
1973
2093
  }));
1974
2094
  }, []);
1975
- const handlePageSizeChange = React25.useCallback((pageSize) => {
2095
+ const handlePageSizeChange = React26.useCallback((pageSize) => {
1976
2096
  setPaginationState({
1977
2097
  page: 1,
1978
2098
  pageSize: parseInt(pageSize, 10)
@@ -1981,135 +2101,135 @@ function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagin
1981
2101
  const totalPages = Math.ceil(data.total / paginationState.pageSize);
1982
2102
  const canPreviousPage = paginationState.page > 1;
1983
2103
  const canNextPage = paginationState.page < totalPages;
1984
- const getSortIcon = /* @__PURE__ */ chunk3PV26V5F_js.__name((column) => {
2104
+ const getSortIcon = /* @__PURE__ */ chunk2HRO6CFU_js.__name((column) => {
1985
2105
  if (sortState.column !== column) {
1986
- return /* @__PURE__ */ React25__namespace.createElement(lucideReact.ArrowUpDown, {
2106
+ return /* @__PURE__ */ React26__namespace.createElement(lucideReact.ArrowUpDown, {
1987
2107
  className: "h-4 w-4"
1988
2108
  });
1989
2109
  }
1990
- return sortState.direction === "asc" ? /* @__PURE__ */ React25__namespace.createElement(lucideReact.ArrowUp, {
2110
+ return sortState.direction === "asc" ? /* @__PURE__ */ React26__namespace.createElement(lucideReact.ArrowUp, {
1991
2111
  className: "h-4 w-4"
1992
- }) : /* @__PURE__ */ React25__namespace.createElement(lucideReact.ArrowDown, {
2112
+ }) : /* @__PURE__ */ React26__namespace.createElement(lucideReact.ArrowDown, {
1993
2113
  className: "h-4 w-4"
1994
2114
  });
1995
2115
  }, "getSortIcon");
1996
- const renderLoading = /* @__PURE__ */ chunk3PV26V5F_js.__name(() => {
2116
+ const renderLoading = /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => {
1997
2117
  if (loadingContent) return loadingContent;
1998
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2118
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
1999
2119
  className: "space-y-2"
2000
2120
  }, Array.from({
2001
2121
  length: 5
2002
- }).map((_, i) => /* @__PURE__ */ React25__namespace.createElement(Skeleton, {
2122
+ }).map((_, i) => /* @__PURE__ */ React26__namespace.createElement(Skeleton, {
2003
2123
  key: i,
2004
2124
  className: "h-12 w-full"
2005
2125
  })));
2006
2126
  }, "renderLoading");
2007
- const renderEmpty = /* @__PURE__ */ chunk3PV26V5F_js.__name(() => {
2127
+ const renderEmpty = /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => {
2008
2128
  if (emptyContent) return emptyContent;
2009
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2129
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2010
2130
  className: "flex flex-col items-center justify-center py-12 text-muted-foreground"
2011
- }, /* @__PURE__ */ React25__namespace.createElement("p", {
2131
+ }, /* @__PURE__ */ React26__namespace.createElement("p", {
2012
2132
  className: "text-lg"
2013
- }, "No data found"), /* @__PURE__ */ React25__namespace.createElement(Button, {
2133
+ }, "No data found"), /* @__PURE__ */ React26__namespace.createElement(Button, {
2014
2134
  variant: "ghost",
2015
2135
  size: "sm",
2016
2136
  onClick: fetchData,
2017
2137
  className: "mt-2"
2018
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.RefreshCw, {
2138
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.RefreshCw, {
2019
2139
  className: "h-4 w-4 mr-2"
2020
2140
  }), "Refresh"));
2021
2141
  }, "renderEmpty");
2022
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2142
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2023
2143
  className: cn("space-y-4", className)
2024
- }, showRefresh && /* @__PURE__ */ React25__namespace.createElement("div", {
2144
+ }, showRefresh && /* @__PURE__ */ React26__namespace.createElement("div", {
2025
2145
  className: "flex items-center justify-end gap-2"
2026
- }, /* @__PURE__ */ React25__namespace.createElement(Button, {
2146
+ }, /* @__PURE__ */ React26__namespace.createElement(Button, {
2027
2147
  variant: "outline",
2028
2148
  size: "sm",
2029
2149
  onClick: fetchData,
2030
2150
  disabled: loading
2031
- }, loading ? /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
2151
+ }, loading ? /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
2032
2152
  className: "h-4 w-4 animate-spin"
2033
- }) : /* @__PURE__ */ React25__namespace.createElement(lucideReact.RefreshCw, {
2153
+ }) : /* @__PURE__ */ React26__namespace.createElement(lucideReact.RefreshCw, {
2034
2154
  className: "h-4 w-4"
2035
- }), /* @__PURE__ */ React25__namespace.createElement("span", {
2155
+ }), /* @__PURE__ */ React26__namespace.createElement("span", {
2036
2156
  className: "ml-2"
2037
- }, "Refresh"))), /* @__PURE__ */ React25__namespace.createElement("div", {
2157
+ }, "Refresh"))), /* @__PURE__ */ React26__namespace.createElement("div", {
2038
2158
  className: "rounded-md border"
2039
- }, loading && data.rows.length === 0 ? /* @__PURE__ */ React25__namespace.createElement("div", {
2159
+ }, loading && data.rows.length === 0 ? /* @__PURE__ */ React26__namespace.createElement("div", {
2040
2160
  className: "p-4"
2041
- }, renderLoading()) : data.rows.length === 0 ? renderEmpty() : /* @__PURE__ */ React25__namespace.createElement(Table, null, /* @__PURE__ */ React25__namespace.createElement(TableHeader, null, /* @__PURE__ */ React25__namespace.createElement(TableRow, null, columns.map((column) => /* @__PURE__ */ React25__namespace.createElement(TableHead, {
2161
+ }, renderLoading()) : data.rows.length === 0 ? renderEmpty() : /* @__PURE__ */ React26__namespace.createElement(Table, null, /* @__PURE__ */ React26__namespace.createElement(TableHeader, null, /* @__PURE__ */ React26__namespace.createElement(TableRow, null, columns.map((column) => /* @__PURE__ */ React26__namespace.createElement(TableHead, {
2042
2162
  key: column.key,
2043
2163
  style: {
2044
2164
  width: column.width
2045
2165
  },
2046
2166
  className: cn(column.align === "center" && "text-center", column.align === "right" && "text-right", column.hideMobile && "hidden md:table-cell")
2047
- }, column.sortable ? /* @__PURE__ */ React25__namespace.createElement(Button, {
2167
+ }, column.sortable ? /* @__PURE__ */ React26__namespace.createElement(Button, {
2048
2168
  variant: "ghost",
2049
2169
  size: "sm",
2050
- onClick: /* @__PURE__ */ chunk3PV26V5F_js.__name(() => handleSort(column.key), "onClick"),
2170
+ onClick: /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => handleSort(column.key), "onClick"),
2051
2171
  className: "-ml-3"
2052
- }, column.header, getSortIcon(column.key)) : column.header)), rowActions.length > 0 && /* @__PURE__ */ React25__namespace.createElement(TableHead, {
2172
+ }, column.header, getSortIcon(column.key)) : column.header)), rowActions.length > 0 && /* @__PURE__ */ React26__namespace.createElement(TableHead, {
2053
2173
  className: "w-[100px]"
2054
- }, "Actions"))), /* @__PURE__ */ React25__namespace.createElement(TableBody, null, data.rows.map((row, index) => {
2174
+ }, "Actions"))), /* @__PURE__ */ React26__namespace.createElement(TableBody, null, data.rows.map((row, index) => {
2055
2175
  const key = getRowKey?.(row, index) ?? String(index);
2056
- return /* @__PURE__ */ React25__namespace.createElement(TableRow, {
2176
+ return /* @__PURE__ */ React26__namespace.createElement(TableRow, {
2057
2177
  key,
2058
- onClick: /* @__PURE__ */ chunk3PV26V5F_js.__name(() => onRowClick?.(row, index), "onClick"),
2178
+ onClick: /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => onRowClick?.(row, index), "onClick"),
2059
2179
  className: onRowClick ? "cursor-pointer" : void 0
2060
2180
  }, columns.map((column) => {
2061
2181
  const value = getNestedValue(row, column.key);
2062
- return /* @__PURE__ */ React25__namespace.createElement(TableCell, {
2182
+ return /* @__PURE__ */ React26__namespace.createElement(TableCell, {
2063
2183
  key: column.key,
2064
2184
  className: cn(column.align === "center" && "text-center", column.align === "right" && "text-right", column.hideMobile && "hidden md:table-cell")
2065
2185
  }, column.render ? column.render(value, row, index) : String(value ?? ""));
2066
- }), rowActions.length > 0 && /* @__PURE__ */ React25__namespace.createElement(TableCell, null, /* @__PURE__ */ React25__namespace.createElement("div", {
2186
+ }), rowActions.length > 0 && /* @__PURE__ */ React26__namespace.createElement(TableCell, null, /* @__PURE__ */ React26__namespace.createElement("div", {
2067
2187
  className: "flex items-center gap-1"
2068
- }, rowActions.filter((action) => !action.hidden?.(row)).map((action, actionIndex) => /* @__PURE__ */ React25__namespace.createElement(RowActionButton, {
2188
+ }, rowActions.filter((action) => !action.hidden?.(row)).map((action, actionIndex) => /* @__PURE__ */ React26__namespace.createElement(RowActionButton, {
2069
2189
  key: actionIndex,
2070
2190
  action,
2071
2191
  row,
2072
2192
  onRefresh: fetchData
2073
2193
  })))));
2074
- })))), pagination && data.total > 0 && /* @__PURE__ */ React25__namespace.createElement("div", {
2194
+ })))), pagination && data.total > 0 && /* @__PURE__ */ React26__namespace.createElement("div", {
2075
2195
  className: "flex items-center justify-between"
2076
- }, /* @__PURE__ */ React25__namespace.createElement("div", {
2196
+ }, /* @__PURE__ */ React26__namespace.createElement("div", {
2077
2197
  className: "text-sm text-muted-foreground"
2078
- }, "Showing ", (paginationState.page - 1) * paginationState.pageSize + 1, " to", " ", Math.min(paginationState.page * paginationState.pageSize, data.total), " of", " ", data.total, " results"), /* @__PURE__ */ React25__namespace.createElement("div", {
2198
+ }, "Showing ", (paginationState.page - 1) * paginationState.pageSize + 1, " to", " ", Math.min(paginationState.page * paginationState.pageSize, data.total), " of", " ", data.total, " results"), /* @__PURE__ */ React26__namespace.createElement("div", {
2079
2199
  className: "flex items-center gap-4"
2080
- }, /* @__PURE__ */ React25__namespace.createElement("div", {
2200
+ }, /* @__PURE__ */ React26__namespace.createElement("div", {
2081
2201
  className: "flex items-center gap-2"
2082
- }, /* @__PURE__ */ React25__namespace.createElement("span", {
2202
+ }, /* @__PURE__ */ React26__namespace.createElement("span", {
2083
2203
  className: "text-sm text-muted-foreground"
2084
- }, "Rows per page"), /* @__PURE__ */ React25__namespace.createElement(Select, {
2204
+ }, "Rows per page"), /* @__PURE__ */ React26__namespace.createElement(Select, {
2085
2205
  value: String(paginationState.pageSize),
2086
2206
  onValueChange: handlePageSizeChange
2087
- }, /* @__PURE__ */ React25__namespace.createElement(SelectTrigger, {
2207
+ }, /* @__PURE__ */ React26__namespace.createElement(SelectTrigger, {
2088
2208
  className: "w-[70px]"
2089
- }, /* @__PURE__ */ React25__namespace.createElement(SelectValue, null)), /* @__PURE__ */ React25__namespace.createElement(SelectContent, null, pageSizes.map((size) => /* @__PURE__ */ React25__namespace.createElement(SelectItem, {
2209
+ }, /* @__PURE__ */ React26__namespace.createElement(SelectValue, null)), /* @__PURE__ */ React26__namespace.createElement(SelectContent, null, pageSizes.map((size) => /* @__PURE__ */ React26__namespace.createElement(SelectItem, {
2090
2210
  key: size,
2091
2211
  value: String(size)
2092
- }, size))))), /* @__PURE__ */ React25__namespace.createElement("div", {
2212
+ }, size))))), /* @__PURE__ */ React26__namespace.createElement("div", {
2093
2213
  className: "flex items-center gap-2"
2094
- }, /* @__PURE__ */ React25__namespace.createElement(Button, {
2214
+ }, /* @__PURE__ */ React26__namespace.createElement(Button, {
2095
2215
  variant: "outline",
2096
2216
  size: "sm",
2097
- onClick: /* @__PURE__ */ chunk3PV26V5F_js.__name(() => handlePageChange(paginationState.page - 1), "onClick"),
2217
+ onClick: /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => handlePageChange(paginationState.page - 1), "onClick"),
2098
2218
  disabled: !canPreviousPage || loading
2099
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.ChevronLeft, {
2219
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.ChevronLeft, {
2100
2220
  className: "h-4 w-4"
2101
- })), /* @__PURE__ */ React25__namespace.createElement("span", {
2221
+ })), /* @__PURE__ */ React26__namespace.createElement("span", {
2102
2222
  className: "text-sm"
2103
- }, "Page ", paginationState.page, " of ", totalPages), /* @__PURE__ */ React25__namespace.createElement(Button, {
2223
+ }, "Page ", paginationState.page, " of ", totalPages), /* @__PURE__ */ React26__namespace.createElement(Button, {
2104
2224
  variant: "outline",
2105
2225
  size: "sm",
2106
- onClick: /* @__PURE__ */ chunk3PV26V5F_js.__name(() => handlePageChange(paginationState.page + 1), "onClick"),
2226
+ onClick: /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => handlePageChange(paginationState.page + 1), "onClick"),
2107
2227
  disabled: !canNextPage || loading
2108
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.ChevronRight, {
2228
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.ChevronRight, {
2109
2229
  className: "h-4 w-4"
2110
2230
  }))))));
2111
2231
  }
2112
- chunk3PV26V5F_js.__name(ToolDataGrid, "ToolDataGrid");
2232
+ chunk2HRO6CFU_js.__name(ToolDataGrid, "ToolDataGrid");
2113
2233
  function RowActionButton({ action, row, onRefresh }) {
2114
2234
  if (!action.tool) {
2115
2235
  throw new Error("ToolDataGrid: rowAction.tool is required");
@@ -2121,49 +2241,49 @@ function RowActionButton({ action, row, onRefresh }) {
2121
2241
  id: row.id
2122
2242
  };
2123
2243
  const { call, loading } = useTool(toolConfig.name, {
2124
- onSuccess: /* @__PURE__ */ chunk3PV26V5F_js.__name((result) => {
2244
+ onSuccess: /* @__PURE__ */ chunk2HRO6CFU_js.__name((result) => {
2125
2245
  action.onSuccess?.(result, row);
2126
2246
  sonner.toast.success("Action completed");
2127
2247
  onRefresh();
2128
2248
  }, "onSuccess"),
2129
- onError: /* @__PURE__ */ chunk3PV26V5F_js.__name((error) => {
2249
+ onError: /* @__PURE__ */ chunk2HRO6CFU_js.__name((error) => {
2130
2250
  sonner.toast.error(error.message);
2131
2251
  }, "onError")
2132
2252
  });
2133
- const handleClick = React25.useCallback((e) => {
2253
+ const handleClick = React26.useCallback((e) => {
2134
2254
  e.stopPropagation();
2135
2255
  call(args);
2136
2256
  }, [
2137
2257
  call,
2138
2258
  args
2139
2259
  ]);
2140
- return /* @__PURE__ */ React25__namespace.createElement(Button, {
2260
+ return /* @__PURE__ */ React26__namespace.createElement(Button, {
2141
2261
  variant: action.variant ?? "ghost",
2142
2262
  size: "sm",
2143
2263
  onClick: handleClick,
2144
2264
  disabled: loading
2145
- }, loading ? /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
2265
+ }, loading ? /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
2146
2266
  className: "h-3 w-3 animate-spin"
2147
- }) : /* @__PURE__ */ React25__namespace.createElement(React25__namespace.Fragment, null, action.icon, /* @__PURE__ */ React25__namespace.createElement("span", {
2267
+ }) : /* @__PURE__ */ React26__namespace.createElement(React26__namespace.Fragment, null, action.icon, /* @__PURE__ */ React26__namespace.createElement("span", {
2148
2268
  className: action.icon ? "ml-1" : ""
2149
2269
  }, action.label)));
2150
2270
  }
2151
- chunk3PV26V5F_js.__name(RowActionButton, "RowActionButton");
2152
- var Button2 = /* @__PURE__ */ React25.forwardRef(({ className, variant = "primary", size = "md", loading = false, disabled, asChild = false, leftIcon, rightIcon, children, ...props }, ref) => {
2271
+ chunk2HRO6CFU_js.__name(RowActionButton, "RowActionButton");
2272
+ var Button2 = /* @__PURE__ */ React26.forwardRef(({ className, variant = "primary", size = "md", loading = false, disabled, asChild = false, leftIcon, rightIcon, children, ...props }, ref) => {
2153
2273
  const Comp = asChild ? reactSlot.Slot : "button";
2154
- return /* @__PURE__ */ React25__namespace.default.createElement(Comp, {
2274
+ return /* @__PURE__ */ React26__namespace.default.createElement(Comp, {
2155
2275
  ref,
2156
2276
  className: clsx.clsx("lui-button", `lui-button--${variant}`, `lui-button--${size}`, loading && "lui-button--loading", className),
2157
2277
  disabled: disabled || loading,
2158
2278
  ...props
2159
- }, loading && /* @__PURE__ */ React25__namespace.default.createElement("span", {
2279
+ }, loading && /* @__PURE__ */ React26__namespace.default.createElement("span", {
2160
2280
  className: "lui-button__spinner",
2161
2281
  "aria-hidden": "true"
2162
- }, /* @__PURE__ */ React25__namespace.default.createElement("svg", {
2282
+ }, /* @__PURE__ */ React26__namespace.default.createElement("svg", {
2163
2283
  viewBox: "0 0 24 24",
2164
2284
  fill: "none",
2165
2285
  className: "lui-spinner-icon"
2166
- }, /* @__PURE__ */ React25__namespace.default.createElement("circle", {
2286
+ }, /* @__PURE__ */ React26__namespace.default.createElement("circle", {
2167
2287
  cx: "12",
2168
2288
  cy: "12",
2169
2289
  r: "10",
@@ -2172,11 +2292,11 @@ var Button2 = /* @__PURE__ */ React25.forwardRef(({ className, variant = "primar
2172
2292
  strokeLinecap: "round",
2173
2293
  strokeDasharray: "32",
2174
2294
  strokeDashoffset: "12"
2175
- }))), leftIcon && !loading && /* @__PURE__ */ React25__namespace.default.createElement("span", {
2295
+ }))), leftIcon && !loading && /* @__PURE__ */ React26__namespace.default.createElement("span", {
2176
2296
  className: "lui-button__icon"
2177
- }, leftIcon), /* @__PURE__ */ React25__namespace.default.createElement("span", {
2297
+ }, leftIcon), /* @__PURE__ */ React26__namespace.default.createElement("span", {
2178
2298
  className: "lui-button__content"
2179
- }, children), rightIcon && /* @__PURE__ */ React25__namespace.default.createElement("span", {
2299
+ }, children), rightIcon && /* @__PURE__ */ React26__namespace.default.createElement("span", {
2180
2300
  className: "lui-button__icon"
2181
2301
  }, rightIcon));
2182
2302
  });
@@ -2185,8 +2305,8 @@ Button2.displayName = "Button";
2185
2305
  // src/mcp/ActionButton.tsx
2186
2306
  function ActionButton({ toolName, toolArgs = {}, onToolSuccess, onToolError, showResult = false, renderResult, children, ...buttonProps }) {
2187
2307
  const { call, loading, result, error } = useTool(toolName);
2188
- const [hasResult, setHasResult] = React25.useState(false);
2189
- const handleClick = /* @__PURE__ */ chunk3PV26V5F_js.__name(async () => {
2308
+ const [hasResult, setHasResult] = React26.useState(false);
2309
+ const handleClick = /* @__PURE__ */ chunk2HRO6CFU_js.__name(async () => {
2190
2310
  try {
2191
2311
  const res = await call(toolArgs);
2192
2312
  setHasResult(true);
@@ -2195,110 +2315,119 @@ function ActionButton({ toolName, toolArgs = {}, onToolSuccess, onToolError, sho
2195
2315
  onToolError?.(err instanceof Error ? err : new Error(String(err)));
2196
2316
  }
2197
2317
  }, "handleClick");
2198
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
2318
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
2199
2319
  className: "lui-action-button-wrapper"
2200
- }, /* @__PURE__ */ React25__namespace.default.createElement(Button2, {
2320
+ }, /* @__PURE__ */ React26__namespace.default.createElement(Button2, {
2201
2321
  ...buttonProps,
2202
2322
  loading,
2203
2323
  onClick: handleClick
2204
- }, children), showResult && hasResult && result !== null && /* @__PURE__ */ React25__namespace.default.createElement("div", {
2324
+ }, children), showResult && hasResult && result !== null && /* @__PURE__ */ React26__namespace.default.createElement("div", {
2205
2325
  className: "lui-action-button-result"
2206
- }, renderResult ? renderResult(result) : /* @__PURE__ */ React25__namespace.default.createElement("pre", null, JSON.stringify(result, null, 2))), error && /* @__PURE__ */ React25__namespace.default.createElement("div", {
2326
+ }, renderResult ? renderResult(result) : /* @__PURE__ */ React26__namespace.default.createElement("pre", null, JSON.stringify(result, null, 2))), error && /* @__PURE__ */ React26__namespace.default.createElement("div", {
2207
2327
  className: "lui-action-button-error"
2208
2328
  }, error.message));
2209
2329
  }
2210
- chunk3PV26V5F_js.__name(ActionButton, "ActionButton");
2330
+ chunk2HRO6CFU_js.__name(ActionButton, "ActionButton");
2211
2331
  function DefaultLoading2() {
2212
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2332
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2213
2333
  className: "flex items-center justify-center p-8"
2214
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.Loader2, {
2334
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.Loader2, {
2215
2335
  className: "h-6 w-6 animate-spin text-muted-foreground"
2216
2336
  }));
2217
2337
  }
2218
- chunk3PV26V5F_js.__name(DefaultLoading2, "DefaultLoading");
2338
+ chunk2HRO6CFU_js.__name(DefaultLoading2, "DefaultLoading");
2219
2339
  function DefaultDisconnected() {
2220
- return /* @__PURE__ */ React25__namespace.createElement(Alert, null, /* @__PURE__ */ React25__namespace.createElement(lucideReact.WifiOff, {
2340
+ return /* @__PURE__ */ React26__namespace.createElement(Alert, null, /* @__PURE__ */ React26__namespace.createElement(lucideReact.WifiOff, {
2221
2341
  className: "h-4 w-4"
2222
- }), /* @__PURE__ */ React25__namespace.createElement(AlertDescription, null, "Waiting for connection to MCP host..."));
2342
+ }), /* @__PURE__ */ React26__namespace.createElement(AlertDescription, null, "Waiting for connection to MCP host..."));
2223
2343
  }
2224
- chunk3PV26V5F_js.__name(DefaultDisconnected, "DefaultDisconnected");
2344
+ chunk2HRO6CFU_js.__name(DefaultDisconnected, "DefaultDisconnected");
2225
2345
  function DefaultError2({ error }) {
2226
- return /* @__PURE__ */ React25__namespace.createElement(Alert, {
2346
+ return /* @__PURE__ */ React26__namespace.createElement(Alert, {
2227
2347
  variant: "destructive"
2228
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.AlertCircle, {
2348
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.AlertCircle, {
2229
2349
  className: "h-4 w-4"
2230
- }), /* @__PURE__ */ React25__namespace.createElement(AlertDescription, null, "Connection error: ", error.message));
2350
+ }), /* @__PURE__ */ React26__namespace.createElement(AlertDescription, null, "Connection error: ", error.message));
2231
2351
  }
2232
- chunk3PV26V5F_js.__name(DefaultError2, "DefaultError");
2352
+ chunk2HRO6CFU_js.__name(DefaultError2, "DefaultError");
2233
2353
  function RequireConnection({ loading: loadingContent, error: errorContent, disconnected: disconnectedContent, children, className }) {
2234
2354
  const { isConnected, error, app } = useMcpApp();
2355
+ console.log("[RequireConnection] State:", {
2356
+ hasApp: !!app,
2357
+ isConnected,
2358
+ hasError: !!error
2359
+ });
2235
2360
  if (!app && !error && !isConnected) {
2361
+ console.log("[RequireConnection] Rendering: Initial Loading");
2236
2362
  if (loadingContent) {
2237
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2363
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2238
2364
  className
2239
2365
  }, loadingContent);
2240
2366
  }
2241
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2367
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2242
2368
  className
2243
- }, /* @__PURE__ */ React25__namespace.createElement(DefaultLoading2, null));
2369
+ }, /* @__PURE__ */ React26__namespace.createElement(DefaultLoading2, null));
2244
2370
  }
2245
2371
  if (error) {
2372
+ console.log("[RequireConnection] Rendering: Error");
2246
2373
  if (errorContent) {
2247
2374
  if (typeof errorContent === "function") {
2248
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2375
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2249
2376
  className
2250
2377
  }, errorContent(error));
2251
2378
  }
2252
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2379
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2253
2380
  className
2254
2381
  }, errorContent);
2255
2382
  }
2256
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2383
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2257
2384
  className
2258
- }, /* @__PURE__ */ React25__namespace.createElement(DefaultError2, {
2385
+ }, /* @__PURE__ */ React26__namespace.createElement(DefaultError2, {
2259
2386
  error
2260
2387
  }));
2261
2388
  }
2262
2389
  if (!isConnected) {
2390
+ console.log("[RequireConnection] Rendering: Disconnected/Loading");
2263
2391
  if (disconnectedContent) {
2264
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2392
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2265
2393
  className
2266
2394
  }, disconnectedContent);
2267
2395
  }
2268
2396
  if (loadingContent) {
2269
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2397
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2270
2398
  className
2271
2399
  }, loadingContent);
2272
2400
  }
2273
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2401
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2274
2402
  className
2275
- }, /* @__PURE__ */ React25__namespace.createElement(DefaultDisconnected, null));
2403
+ }, /* @__PURE__ */ React26__namespace.createElement(DefaultDisconnected, null));
2276
2404
  }
2277
- return /* @__PURE__ */ React25__namespace.createElement(React25__namespace.Fragment, null, children);
2405
+ console.log("[RequireConnection] Rendering: Children (Connected)");
2406
+ return /* @__PURE__ */ React26__namespace.createElement(React26__namespace.Fragment, null, children);
2278
2407
  }
2279
- chunk3PV26V5F_js.__name(RequireConnection, "RequireConnection");
2408
+ chunk2HRO6CFU_js.__name(RequireConnection, "RequireConnection");
2280
2409
  function DefaultFallback({ error, onRetry }) {
2281
- return /* @__PURE__ */ React25__namespace.createElement(Alert, {
2410
+ return /* @__PURE__ */ React26__namespace.createElement(Alert, {
2282
2411
  variant: "destructive"
2283
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.AlertCircle, {
2412
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.AlertCircle, {
2284
2413
  className: "h-4 w-4"
2285
- }), /* @__PURE__ */ React25__namespace.createElement(AlertTitle, null, "Something went wrong"), /* @__PURE__ */ React25__namespace.createElement(AlertDescription, {
2414
+ }), /* @__PURE__ */ React26__namespace.createElement(AlertTitle, null, "Something went wrong"), /* @__PURE__ */ React26__namespace.createElement(AlertDescription, {
2286
2415
  className: "flex flex-col gap-3"
2287
- }, /* @__PURE__ */ React25__namespace.createElement("p", {
2416
+ }, /* @__PURE__ */ React26__namespace.createElement("p", {
2288
2417
  className: "text-sm"
2289
- }, error.message), /* @__PURE__ */ React25__namespace.createElement(Button, {
2418
+ }, error.message), /* @__PURE__ */ React26__namespace.createElement(Button, {
2290
2419
  variant: "outline",
2291
2420
  size: "sm",
2292
2421
  onClick: onRetry,
2293
2422
  className: "w-fit"
2294
- }, /* @__PURE__ */ React25__namespace.createElement(lucideReact.RefreshCw, {
2423
+ }, /* @__PURE__ */ React26__namespace.createElement(lucideReact.RefreshCw, {
2295
2424
  className: "h-4 w-4 mr-2"
2296
2425
  }), "Try Again")));
2297
2426
  }
2298
- chunk3PV26V5F_js.__name(DefaultFallback, "DefaultFallback");
2299
- var ToolErrorBoundary = class extends React25.Component {
2427
+ chunk2HRO6CFU_js.__name(DefaultFallback, "DefaultFallback");
2428
+ var ToolErrorBoundary = class extends React26.Component {
2300
2429
  static {
2301
- chunk3PV26V5F_js.__name(this, "ToolErrorBoundary");
2430
+ chunk2HRO6CFU_js.__name(this, "ToolErrorBoundary");
2302
2431
  }
2303
2432
  constructor(props) {
2304
2433
  super(props);
@@ -2321,7 +2450,7 @@ var ToolErrorBoundary = class extends React25.Component {
2321
2450
  this.reset();
2322
2451
  }
2323
2452
  }
2324
- reset = /* @__PURE__ */ chunk3PV26V5F_js.__name(() => {
2453
+ reset = /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => {
2325
2454
  this.setState({
2326
2455
  hasError: false,
2327
2456
  error: null
@@ -2337,7 +2466,7 @@ var ToolErrorBoundary = class extends React25.Component {
2337
2466
  }
2338
2467
  return fallback;
2339
2468
  }
2340
- return /* @__PURE__ */ React25__namespace.createElement(DefaultFallback, {
2469
+ return /* @__PURE__ */ React26__namespace.createElement(DefaultFallback, {
2341
2470
  error,
2342
2471
  onRetry: this.reset
2343
2472
  });
@@ -2347,9 +2476,9 @@ var ToolErrorBoundary = class extends React25.Component {
2347
2476
  };
2348
2477
  function useMessage() {
2349
2478
  const { sendMessage: appSendMessage, isConnected } = useMcpApp();
2350
- const [sending, setSending] = React25.useState(false);
2351
- const [error, setError] = React25.useState(null);
2352
- const send = React25.useCallback(async (text) => {
2479
+ const [sending, setSending] = React26.useState(false);
2480
+ const [error, setError] = React26.useState(null);
2481
+ const send = React26.useCallback(async (text) => {
2353
2482
  if (!isConnected) {
2354
2483
  console.warn("[useMessage] Not connected to host");
2355
2484
  return;
@@ -2369,7 +2498,7 @@ function useMessage() {
2369
2498
  appSendMessage,
2370
2499
  isConnected
2371
2500
  ]);
2372
- const sendContent = React25.useCallback(async (content) => {
2501
+ const sendContent = React26.useCallback(async (content) => {
2373
2502
  if (!isConnected) {
2374
2503
  console.warn("[useMessage] Not connected to host");
2375
2504
  return;
@@ -2390,7 +2519,7 @@ function useMessage() {
2390
2519
  appSendMessage,
2391
2520
  isConnected
2392
2521
  ]);
2393
- const requestTool = React25.useCallback(async (toolName, args) => {
2522
+ const requestTool = React26.useCallback(async (toolName, args) => {
2394
2523
  let message = `Please call the "${toolName}" tool`;
2395
2524
  if (args && Object.keys(args).length > 0) {
2396
2525
  message += ` with arguments: ${JSON.stringify(args)}`;
@@ -2407,7 +2536,7 @@ function useMessage() {
2407
2536
  error
2408
2537
  };
2409
2538
  }
2410
- chunk3PV26V5F_js.__name(useMessage, "useMessage");
2539
+ chunk2HRO6CFU_js.__name(useMessage, "useMessage");
2411
2540
 
2412
2541
  // src/mcp/useHostContext.ts
2413
2542
  function useHostContext() {
@@ -2427,7 +2556,7 @@ function useHostContext() {
2427
2556
  rawContext: hostContext
2428
2557
  };
2429
2558
  }
2430
- chunk3PV26V5F_js.__name(useHostContext, "useHostContext");
2559
+ chunk2HRO6CFU_js.__name(useHostContext, "useHostContext");
2431
2560
 
2432
2561
  // src/mcp/useToolResult.ts
2433
2562
  function useToolResult() {
@@ -2456,7 +2585,7 @@ function useToolResult() {
2456
2585
  textContent
2457
2586
  };
2458
2587
  }
2459
- chunk3PV26V5F_js.__name(useToolResult, "useToolResult");
2588
+ chunk2HRO6CFU_js.__name(useToolResult, "useToolResult");
2460
2589
 
2461
2590
  // src/mcp/useToolInput.ts
2462
2591
  function useToolInput() {
@@ -2466,7 +2595,7 @@ function useToolInput() {
2466
2595
  hasInput: toolInput !== null
2467
2596
  };
2468
2597
  }
2469
- chunk3PV26V5F_js.__name(useToolInput, "useToolInput");
2598
+ chunk2HRO6CFU_js.__name(useToolInput, "useToolInput");
2470
2599
 
2471
2600
  // src/mcp/useToolInputPartial.ts
2472
2601
  function useToolInputPartial() {
@@ -2476,20 +2605,20 @@ function useToolInputPartial() {
2476
2605
  isStreaming: toolInputPartial !== null
2477
2606
  };
2478
2607
  }
2479
- chunk3PV26V5F_js.__name(useToolInputPartial, "useToolInputPartial");
2608
+ chunk2HRO6CFU_js.__name(useToolInputPartial, "useToolInputPartial");
2480
2609
  function useToolSubscription(toolName, options = {}) {
2481
2610
  const { interval = 1e4, enabled = true, args = {} } = options;
2482
2611
  const toolHook = useTool(toolName);
2483
- const intervalRef = React25.useRef(null);
2484
- const [isPolling, setIsPolling] = React25.useState(false);
2485
- const stop = React25.useCallback(() => {
2612
+ const intervalRef = React26.useRef(null);
2613
+ const [isPolling, setIsPolling] = React26.useState(false);
2614
+ const stop = React26.useCallback(() => {
2486
2615
  if (intervalRef.current) {
2487
2616
  clearInterval(intervalRef.current);
2488
2617
  intervalRef.current = null;
2489
2618
  }
2490
2619
  setIsPolling(false);
2491
2620
  }, []);
2492
- const start = React25.useCallback(() => {
2621
+ const start = React26.useCallback(() => {
2493
2622
  stop();
2494
2623
  setIsPolling(true);
2495
2624
  toolHook.call(args).catch(() => {
@@ -2504,13 +2633,13 @@ function useToolSubscription(toolName, options = {}) {
2504
2633
  interval,
2505
2634
  stop
2506
2635
  ]);
2507
- const refresh = React25.useCallback(async () => {
2636
+ const refresh = React26.useCallback(async () => {
2508
2637
  return toolHook.call(args);
2509
2638
  }, [
2510
2639
  toolHook.call,
2511
2640
  args
2512
2641
  ]);
2513
- React25.useEffect(() => {
2642
+ React26.useEffect(() => {
2514
2643
  if (enabled) {
2515
2644
  start();
2516
2645
  }
@@ -2530,7 +2659,7 @@ function useToolSubscription(toolName, options = {}) {
2530
2659
  refresh
2531
2660
  };
2532
2661
  }
2533
- chunk3PV26V5F_js.__name(useToolSubscription, "useToolSubscription");
2662
+ chunk2HRO6CFU_js.__name(useToolSubscription, "useToolSubscription");
2534
2663
 
2535
2664
  // src/types/mcp-types.ts
2536
2665
  function normalizeToolBinding(tool) {
@@ -2541,7 +2670,7 @@ function normalizeToolBinding(tool) {
2541
2670
  }
2542
2671
  return tool;
2543
2672
  }
2544
- chunk3PV26V5F_js.__name(normalizeToolBinding, "normalizeToolBinding");
2673
+ chunk2HRO6CFU_js.__name(normalizeToolBinding, "normalizeToolBinding");
2545
2674
  var DEFAULT_RESULT_CONFIG = {
2546
2675
  display: "none",
2547
2676
  autoDismiss: 5e3
@@ -2554,33 +2683,33 @@ var INITIAL_TOOL_STATE = {
2554
2683
  hasResult: false
2555
2684
  };
2556
2685
  function CardTitle({ className, ...props }) {
2557
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2686
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2558
2687
  "data-slot": "card-title",
2559
2688
  className: cn("leading-none font-semibold", className),
2560
2689
  ...props
2561
2690
  });
2562
2691
  }
2563
- chunk3PV26V5F_js.__name(CardTitle, "CardTitle");
2692
+ chunk2HRO6CFU_js.__name(CardTitle, "CardTitle");
2564
2693
  function CardDescription({ className, ...props }) {
2565
- return /* @__PURE__ */ React25__namespace.createElement("div", {
2694
+ return /* @__PURE__ */ React26__namespace.createElement("div", {
2566
2695
  "data-slot": "card-description",
2567
2696
  className: cn("text-muted-foreground text-sm", className),
2568
2697
  ...props
2569
2698
  });
2570
2699
  }
2571
- chunk3PV26V5F_js.__name(CardDescription, "CardDescription");
2700
+ chunk2HRO6CFU_js.__name(CardDescription, "CardDescription");
2572
2701
  var Form = reactHookForm.FormProvider;
2573
- var FormFieldContext = /* @__PURE__ */ React25__namespace.createContext({});
2574
- var FormField = /* @__PURE__ */ chunk3PV26V5F_js.__name(({ ...props }) => {
2575
- return /* @__PURE__ */ React25__namespace.createElement(FormFieldContext.Provider, {
2702
+ var FormFieldContext = /* @__PURE__ */ React26__namespace.createContext({});
2703
+ var FormField = /* @__PURE__ */ chunk2HRO6CFU_js.__name(({ ...props }) => {
2704
+ return /* @__PURE__ */ React26__namespace.createElement(FormFieldContext.Provider, {
2576
2705
  value: {
2577
2706
  name: props.name
2578
2707
  }
2579
- }, /* @__PURE__ */ React25__namespace.createElement(reactHookForm.Controller, props));
2708
+ }, /* @__PURE__ */ React26__namespace.createElement(reactHookForm.Controller, props));
2580
2709
  }, "FormField");
2581
- var useFormField = /* @__PURE__ */ chunk3PV26V5F_js.__name(() => {
2582
- const fieldContext = React25__namespace.useContext(FormFieldContext);
2583
- const itemContext = React25__namespace.useContext(FormItemContext);
2710
+ var useFormField = /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => {
2711
+ const fieldContext = React26__namespace.useContext(FormFieldContext);
2712
+ const itemContext = React26__namespace.useContext(FormItemContext);
2584
2713
  const { getFieldState } = reactHookForm.useFormContext();
2585
2714
  const formState = reactHookForm.useFormState({
2586
2715
  name: fieldContext.name
@@ -2599,23 +2728,23 @@ var useFormField = /* @__PURE__ */ chunk3PV26V5F_js.__name(() => {
2599
2728
  ...fieldState
2600
2729
  };
2601
2730
  }, "useFormField");
2602
- var FormItemContext = /* @__PURE__ */ React25__namespace.createContext({});
2731
+ var FormItemContext = /* @__PURE__ */ React26__namespace.createContext({});
2603
2732
  function FormItem({ className, ...props }) {
2604
- const id = React25__namespace.useId();
2605
- return /* @__PURE__ */ React25__namespace.createElement(FormItemContext.Provider, {
2733
+ const id = React26__namespace.useId();
2734
+ return /* @__PURE__ */ React26__namespace.createElement(FormItemContext.Provider, {
2606
2735
  value: {
2607
2736
  id
2608
2737
  }
2609
- }, /* @__PURE__ */ React25__namespace.createElement("div", {
2738
+ }, /* @__PURE__ */ React26__namespace.createElement("div", {
2610
2739
  "data-slot": "form-item",
2611
2740
  className: cn("grid gap-2", className),
2612
2741
  ...props
2613
2742
  }));
2614
2743
  }
2615
- chunk3PV26V5F_js.__name(FormItem, "FormItem");
2744
+ chunk2HRO6CFU_js.__name(FormItem, "FormItem");
2616
2745
  function FormLabel({ className, ...props }) {
2617
2746
  const { error, formItemId } = useFormField();
2618
- return /* @__PURE__ */ React25__namespace.createElement(Label2, {
2747
+ return /* @__PURE__ */ React26__namespace.createElement(Label2, {
2619
2748
  "data-slot": "form-label",
2620
2749
  "data-error": !!error,
2621
2750
  className: cn("data-[error=true]:text-destructive", className),
@@ -2623,10 +2752,10 @@ function FormLabel({ className, ...props }) {
2623
2752
  ...props
2624
2753
  });
2625
2754
  }
2626
- chunk3PV26V5F_js.__name(FormLabel, "FormLabel");
2755
+ chunk2HRO6CFU_js.__name(FormLabel, "FormLabel");
2627
2756
  function FormControl({ ...props }) {
2628
2757
  const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
2629
- return /* @__PURE__ */ React25__namespace.createElement(reactSlot.Slot, {
2758
+ return /* @__PURE__ */ React26__namespace.createElement(reactSlot.Slot, {
2630
2759
  "data-slot": "form-control",
2631
2760
  id: formItemId,
2632
2761
  "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
@@ -2634,31 +2763,31 @@ function FormControl({ ...props }) {
2634
2763
  ...props
2635
2764
  });
2636
2765
  }
2637
- chunk3PV26V5F_js.__name(FormControl, "FormControl");
2766
+ chunk2HRO6CFU_js.__name(FormControl, "FormControl");
2638
2767
  function FormDescription({ className, ...props }) {
2639
2768
  const { formDescriptionId } = useFormField();
2640
- return /* @__PURE__ */ React25__namespace.createElement("p", {
2769
+ return /* @__PURE__ */ React26__namespace.createElement("p", {
2641
2770
  "data-slot": "form-description",
2642
2771
  id: formDescriptionId,
2643
2772
  className: cn("text-muted-foreground text-sm", className),
2644
2773
  ...props
2645
2774
  });
2646
2775
  }
2647
- chunk3PV26V5F_js.__name(FormDescription, "FormDescription");
2776
+ chunk2HRO6CFU_js.__name(FormDescription, "FormDescription");
2648
2777
  function FormMessage({ className, ...props }) {
2649
2778
  const { error, formMessageId } = useFormField();
2650
2779
  const body = error ? String(error?.message ?? "") : props.children;
2651
2780
  if (!body) {
2652
2781
  return null;
2653
2782
  }
2654
- return /* @__PURE__ */ React25__namespace.createElement("p", {
2783
+ return /* @__PURE__ */ React26__namespace.createElement("p", {
2655
2784
  "data-slot": "form-message",
2656
2785
  id: formMessageId,
2657
2786
  className: cn("text-destructive text-sm", className),
2658
2787
  ...props
2659
2788
  }, body);
2660
2789
  }
2661
- chunk3PV26V5F_js.__name(FormMessage, "FormMessage");
2790
+ chunk2HRO6CFU_js.__name(FormMessage, "FormMessage");
2662
2791
  var badgeVariants = classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
2663
2792
  variants: {
2664
2793
  variant: {
@@ -2674,7 +2803,7 @@ var badgeVariants = classVarianceAuthority.cva("inline-flex items-center justify
2674
2803
  });
2675
2804
  function Badge({ className, variant, asChild = false, ...props }) {
2676
2805
  const Comp = asChild ? reactSlot.Slot : "span";
2677
- return /* @__PURE__ */ React25__namespace.createElement(Comp, {
2806
+ return /* @__PURE__ */ React26__namespace.createElement(Comp, {
2678
2807
  "data-slot": "badge",
2679
2808
  className: cn(badgeVariants({
2680
2809
  variant
@@ -2682,33 +2811,33 @@ function Badge({ className, variant, asChild = false, ...props }) {
2682
2811
  ...props
2683
2812
  });
2684
2813
  }
2685
- chunk3PV26V5F_js.__name(Badge, "Badge");
2814
+ chunk2HRO6CFU_js.__name(Badge, "Badge");
2686
2815
  function TabsList({ className, ...props }) {
2687
- return /* @__PURE__ */ React25__namespace.createElement(TabsPrimitive2__namespace.List, {
2816
+ return /* @__PURE__ */ React26__namespace.createElement(TabsPrimitive2__namespace.List, {
2688
2817
  "data-slot": "tabs-list",
2689
2818
  className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className),
2690
2819
  ...props
2691
2820
  });
2692
2821
  }
2693
- chunk3PV26V5F_js.__name(TabsList, "TabsList");
2822
+ chunk2HRO6CFU_js.__name(TabsList, "TabsList");
2694
2823
  function TabsTrigger({ className, ...props }) {
2695
- return /* @__PURE__ */ React25__namespace.createElement(TabsPrimitive2__namespace.Trigger, {
2824
+ return /* @__PURE__ */ React26__namespace.createElement(TabsPrimitive2__namespace.Trigger, {
2696
2825
  "data-slot": "tabs-trigger",
2697
2826
  className: cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2698
2827
  ...props
2699
2828
  });
2700
2829
  }
2701
- chunk3PV26V5F_js.__name(TabsTrigger, "TabsTrigger");
2830
+ chunk2HRO6CFU_js.__name(TabsTrigger, "TabsTrigger");
2702
2831
  function TabsContent({ className, ...props }) {
2703
- return /* @__PURE__ */ React25__namespace.createElement(TabsPrimitive2__namespace.Content, {
2832
+ return /* @__PURE__ */ React26__namespace.createElement(TabsPrimitive2__namespace.Content, {
2704
2833
  "data-slot": "tabs-content",
2705
2834
  className: cn("flex-1 outline-none", className),
2706
2835
  ...props
2707
2836
  });
2708
2837
  }
2709
- chunk3PV26V5F_js.__name(TabsContent, "TabsContent");
2838
+ chunk2HRO6CFU_js.__name(TabsContent, "TabsContent");
2710
2839
  function Separator2({ className, orientation = "horizontal", decorative = true, ...props }) {
2711
- return /* @__PURE__ */ React25__namespace.createElement(SeparatorPrimitive__namespace.Root, {
2840
+ return /* @__PURE__ */ React26__namespace.createElement(SeparatorPrimitive__namespace.Root, {
2712
2841
  "data-slot": "separator",
2713
2842
  decorative,
2714
2843
  orientation,
@@ -2716,69 +2845,69 @@ function Separator2({ className, orientation = "horizontal", decorative = true,
2716
2845
  ...props
2717
2846
  });
2718
2847
  }
2719
- chunk3PV26V5F_js.__name(Separator2, "Separator");
2848
+ chunk2HRO6CFU_js.__name(Separator2, "Separator");
2720
2849
  function ScrollArea({ className, children, ...props }) {
2721
- return /* @__PURE__ */ React25__namespace.createElement(ScrollAreaPrimitive__namespace.Root, {
2850
+ return /* @__PURE__ */ React26__namespace.createElement(ScrollAreaPrimitive__namespace.Root, {
2722
2851
  "data-slot": "scroll-area",
2723
2852
  className: cn("relative", className),
2724
2853
  ...props
2725
- }, /* @__PURE__ */ React25__namespace.createElement(ScrollAreaPrimitive__namespace.Viewport, {
2854
+ }, /* @__PURE__ */ React26__namespace.createElement(ScrollAreaPrimitive__namespace.Viewport, {
2726
2855
  "data-slot": "scroll-area-viewport",
2727
2856
  className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
2728
- }, children), /* @__PURE__ */ React25__namespace.createElement(ScrollBar, null), /* @__PURE__ */ React25__namespace.createElement(ScrollAreaPrimitive__namespace.Corner, null));
2857
+ }, children), /* @__PURE__ */ React26__namespace.createElement(ScrollBar, null), /* @__PURE__ */ React26__namespace.createElement(ScrollAreaPrimitive__namespace.Corner, null));
2729
2858
  }
2730
- chunk3PV26V5F_js.__name(ScrollArea, "ScrollArea");
2859
+ chunk2HRO6CFU_js.__name(ScrollArea, "ScrollArea");
2731
2860
  function ScrollBar({ className, orientation = "vertical", ...props }) {
2732
- return /* @__PURE__ */ React25__namespace.createElement(ScrollAreaPrimitive__namespace.ScrollAreaScrollbar, {
2861
+ return /* @__PURE__ */ React26__namespace.createElement(ScrollAreaPrimitive__namespace.ScrollAreaScrollbar, {
2733
2862
  "data-slot": "scroll-area-scrollbar",
2734
2863
  orientation,
2735
2864
  className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className),
2736
2865
  ...props
2737
- }, /* @__PURE__ */ React25__namespace.createElement(ScrollAreaPrimitive__namespace.ScrollAreaThumb, {
2866
+ }, /* @__PURE__ */ React26__namespace.createElement(ScrollAreaPrimitive__namespace.ScrollAreaThumb, {
2738
2867
  "data-slot": "scroll-area-thumb",
2739
2868
  className: "bg-border relative flex-1 rounded-full"
2740
2869
  }));
2741
2870
  }
2742
- chunk3PV26V5F_js.__name(ScrollBar, "ScrollBar");
2871
+ chunk2HRO6CFU_js.__name(ScrollBar, "ScrollBar");
2743
2872
  function DropdownMenu({ ...props }) {
2744
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.Root, {
2873
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.Root, {
2745
2874
  "data-slot": "dropdown-menu",
2746
2875
  ...props
2747
2876
  });
2748
2877
  }
2749
- chunk3PV26V5F_js.__name(DropdownMenu, "DropdownMenu");
2878
+ chunk2HRO6CFU_js.__name(DropdownMenu, "DropdownMenu");
2750
2879
  function DropdownMenuPortal({ ...props }) {
2751
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, {
2880
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, {
2752
2881
  "data-slot": "dropdown-menu-portal",
2753
2882
  ...props
2754
2883
  });
2755
2884
  }
2756
- chunk3PV26V5F_js.__name(DropdownMenuPortal, "DropdownMenuPortal");
2885
+ chunk2HRO6CFU_js.__name(DropdownMenuPortal, "DropdownMenuPortal");
2757
2886
  function DropdownMenuTrigger({ ...props }) {
2758
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.Trigger, {
2887
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.Trigger, {
2759
2888
  "data-slot": "dropdown-menu-trigger",
2760
2889
  ...props
2761
2890
  });
2762
2891
  }
2763
- chunk3PV26V5F_js.__name(DropdownMenuTrigger, "DropdownMenuTrigger");
2892
+ chunk2HRO6CFU_js.__name(DropdownMenuTrigger, "DropdownMenuTrigger");
2764
2893
  function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
2765
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, null, /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.Content, {
2894
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, null, /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.Content, {
2766
2895
  "data-slot": "dropdown-menu-content",
2767
2896
  sideOffset,
2768
2897
  className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className),
2769
2898
  ...props
2770
2899
  }));
2771
2900
  }
2772
- chunk3PV26V5F_js.__name(DropdownMenuContent, "DropdownMenuContent");
2901
+ chunk2HRO6CFU_js.__name(DropdownMenuContent, "DropdownMenuContent");
2773
2902
  function DropdownMenuGroup({ ...props }) {
2774
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.Group, {
2903
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.Group, {
2775
2904
  "data-slot": "dropdown-menu-group",
2776
2905
  ...props
2777
2906
  });
2778
2907
  }
2779
- chunk3PV26V5F_js.__name(DropdownMenuGroup, "DropdownMenuGroup");
2908
+ chunk2HRO6CFU_js.__name(DropdownMenuGroup, "DropdownMenuGroup");
2780
2909
  function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
2781
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.Item, {
2910
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.Item, {
2782
2911
  "data-slot": "dropdown-menu-item",
2783
2912
  "data-inset": inset,
2784
2913
  "data-variant": variant,
@@ -2786,127 +2915,127 @@ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
2786
2915
  ...props
2787
2916
  });
2788
2917
  }
2789
- chunk3PV26V5F_js.__name(DropdownMenuItem, "DropdownMenuItem");
2918
+ chunk2HRO6CFU_js.__name(DropdownMenuItem, "DropdownMenuItem");
2790
2919
  function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
2791
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.CheckboxItem, {
2920
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.CheckboxItem, {
2792
2921
  "data-slot": "dropdown-menu-checkbox-item",
2793
2922
  className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2794
2923
  checked,
2795
2924
  ...props
2796
- }, /* @__PURE__ */ React25__namespace.createElement("span", {
2925
+ }, /* @__PURE__ */ React26__namespace.createElement("span", {
2797
2926
  className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
2798
- }, /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React25__namespace.createElement(lucideReact.CheckIcon, {
2927
+ }, /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React26__namespace.createElement(lucideReact.CheckIcon, {
2799
2928
  className: "size-4"
2800
2929
  }))), children);
2801
2930
  }
2802
- chunk3PV26V5F_js.__name(DropdownMenuCheckboxItem, "DropdownMenuCheckboxItem");
2931
+ chunk2HRO6CFU_js.__name(DropdownMenuCheckboxItem, "DropdownMenuCheckboxItem");
2803
2932
  function DropdownMenuRadioGroup({ ...props }) {
2804
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.RadioGroup, {
2933
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.RadioGroup, {
2805
2934
  "data-slot": "dropdown-menu-radio-group",
2806
2935
  ...props
2807
2936
  });
2808
2937
  }
2809
- chunk3PV26V5F_js.__name(DropdownMenuRadioGroup, "DropdownMenuRadioGroup");
2938
+ chunk2HRO6CFU_js.__name(DropdownMenuRadioGroup, "DropdownMenuRadioGroup");
2810
2939
  function DropdownMenuRadioItem({ className, children, ...props }) {
2811
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.RadioItem, {
2940
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.RadioItem, {
2812
2941
  "data-slot": "dropdown-menu-radio-item",
2813
2942
  className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2814
2943
  ...props
2815
- }, /* @__PURE__ */ React25__namespace.createElement("span", {
2944
+ }, /* @__PURE__ */ React26__namespace.createElement("span", {
2816
2945
  className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
2817
- }, /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React25__namespace.createElement(lucideReact.CircleIcon, {
2946
+ }, /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React26__namespace.createElement(lucideReact.CircleIcon, {
2818
2947
  className: "size-2 fill-current"
2819
2948
  }))), children);
2820
2949
  }
2821
- chunk3PV26V5F_js.__name(DropdownMenuRadioItem, "DropdownMenuRadioItem");
2950
+ chunk2HRO6CFU_js.__name(DropdownMenuRadioItem, "DropdownMenuRadioItem");
2822
2951
  function DropdownMenuLabel({ className, inset, ...props }) {
2823
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.Label, {
2952
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.Label, {
2824
2953
  "data-slot": "dropdown-menu-label",
2825
2954
  "data-inset": inset,
2826
2955
  className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
2827
2956
  ...props
2828
2957
  });
2829
2958
  }
2830
- chunk3PV26V5F_js.__name(DropdownMenuLabel, "DropdownMenuLabel");
2959
+ chunk2HRO6CFU_js.__name(DropdownMenuLabel, "DropdownMenuLabel");
2831
2960
  function DropdownMenuSeparator({ className, ...props }) {
2832
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.Separator, {
2961
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.Separator, {
2833
2962
  "data-slot": "dropdown-menu-separator",
2834
2963
  className: cn("bg-border -mx-1 my-1 h-px", className),
2835
2964
  ...props
2836
2965
  });
2837
2966
  }
2838
- chunk3PV26V5F_js.__name(DropdownMenuSeparator, "DropdownMenuSeparator");
2967
+ chunk2HRO6CFU_js.__name(DropdownMenuSeparator, "DropdownMenuSeparator");
2839
2968
  function DropdownMenuShortcut({ className, ...props }) {
2840
- return /* @__PURE__ */ React25__namespace.createElement("span", {
2969
+ return /* @__PURE__ */ React26__namespace.createElement("span", {
2841
2970
  "data-slot": "dropdown-menu-shortcut",
2842
2971
  className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
2843
2972
  ...props
2844
2973
  });
2845
2974
  }
2846
- chunk3PV26V5F_js.__name(DropdownMenuShortcut, "DropdownMenuShortcut");
2975
+ chunk2HRO6CFU_js.__name(DropdownMenuShortcut, "DropdownMenuShortcut");
2847
2976
  function DropdownMenuSub({ ...props }) {
2848
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.Sub, {
2977
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.Sub, {
2849
2978
  "data-slot": "dropdown-menu-sub",
2850
2979
  ...props
2851
2980
  });
2852
2981
  }
2853
- chunk3PV26V5F_js.__name(DropdownMenuSub, "DropdownMenuSub");
2982
+ chunk2HRO6CFU_js.__name(DropdownMenuSub, "DropdownMenuSub");
2854
2983
  function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
2855
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.SubTrigger, {
2984
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.SubTrigger, {
2856
2985
  "data-slot": "dropdown-menu-sub-trigger",
2857
2986
  "data-inset": inset,
2858
2987
  className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2859
2988
  ...props
2860
- }, children, /* @__PURE__ */ React25__namespace.createElement(lucideReact.ChevronRightIcon, {
2989
+ }, children, /* @__PURE__ */ React26__namespace.createElement(lucideReact.ChevronRightIcon, {
2861
2990
  className: "ml-auto size-4"
2862
2991
  }));
2863
2992
  }
2864
- chunk3PV26V5F_js.__name(DropdownMenuSubTrigger, "DropdownMenuSubTrigger");
2993
+ chunk2HRO6CFU_js.__name(DropdownMenuSubTrigger, "DropdownMenuSubTrigger");
2865
2994
  function DropdownMenuSubContent({ className, ...props }) {
2866
- return /* @__PURE__ */ React25__namespace.createElement(DropdownMenuPrimitive__namespace.SubContent, {
2995
+ return /* @__PURE__ */ React26__namespace.createElement(DropdownMenuPrimitive__namespace.SubContent, {
2867
2996
  "data-slot": "dropdown-menu-sub-content",
2868
2997
  className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
2869
2998
  ...props
2870
2999
  });
2871
3000
  }
2872
- chunk3PV26V5F_js.__name(DropdownMenuSubContent, "DropdownMenuSubContent");
3001
+ chunk2HRO6CFU_js.__name(DropdownMenuSubContent, "DropdownMenuSubContent");
2873
3002
  function TooltipProvider({ delayDuration = 0, ...props }) {
2874
- return /* @__PURE__ */ React25__namespace.createElement(TooltipPrimitive__namespace.Provider, {
3003
+ return /* @__PURE__ */ React26__namespace.createElement(TooltipPrimitive__namespace.Provider, {
2875
3004
  "data-slot": "tooltip-provider",
2876
3005
  delayDuration,
2877
3006
  ...props
2878
3007
  });
2879
3008
  }
2880
- chunk3PV26V5F_js.__name(TooltipProvider, "TooltipProvider");
3009
+ chunk2HRO6CFU_js.__name(TooltipProvider, "TooltipProvider");
2881
3010
  function Tooltip({ ...props }) {
2882
- return /* @__PURE__ */ React25__namespace.createElement(TooltipProvider, null, /* @__PURE__ */ React25__namespace.createElement(TooltipPrimitive__namespace.Root, {
3011
+ return /* @__PURE__ */ React26__namespace.createElement(TooltipProvider, null, /* @__PURE__ */ React26__namespace.createElement(TooltipPrimitive__namespace.Root, {
2883
3012
  "data-slot": "tooltip",
2884
3013
  ...props
2885
3014
  }));
2886
3015
  }
2887
- chunk3PV26V5F_js.__name(Tooltip, "Tooltip");
3016
+ chunk2HRO6CFU_js.__name(Tooltip, "Tooltip");
2888
3017
  function TooltipTrigger({ ...props }) {
2889
- return /* @__PURE__ */ React25__namespace.createElement(TooltipPrimitive__namespace.Trigger, {
3018
+ return /* @__PURE__ */ React26__namespace.createElement(TooltipPrimitive__namespace.Trigger, {
2890
3019
  "data-slot": "tooltip-trigger",
2891
3020
  ...props
2892
3021
  });
2893
3022
  }
2894
- chunk3PV26V5F_js.__name(TooltipTrigger, "TooltipTrigger");
3023
+ chunk2HRO6CFU_js.__name(TooltipTrigger, "TooltipTrigger");
2895
3024
  function TooltipContent({ className, sideOffset = 0, children, ...props }) {
2896
- return /* @__PURE__ */ React25__namespace.createElement(TooltipPrimitive__namespace.Portal, null, /* @__PURE__ */ React25__namespace.createElement(TooltipPrimitive__namespace.Content, {
3025
+ return /* @__PURE__ */ React26__namespace.createElement(TooltipPrimitive__namespace.Portal, null, /* @__PURE__ */ React26__namespace.createElement(TooltipPrimitive__namespace.Content, {
2897
3026
  "data-slot": "tooltip-content",
2898
3027
  sideOffset,
2899
3028
  className: cn("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", className),
2900
3029
  ...props
2901
- }, children, /* @__PURE__ */ React25__namespace.createElement(TooltipPrimitive__namespace.Arrow, {
3030
+ }, children, /* @__PURE__ */ React26__namespace.createElement(TooltipPrimitive__namespace.Arrow, {
2902
3031
  className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"
2903
3032
  })));
2904
3033
  }
2905
- chunk3PV26V5F_js.__name(TooltipContent, "TooltipContent");
3034
+ chunk2HRO6CFU_js.__name(TooltipContent, "TooltipContent");
2906
3035
  function DataGrid({ data, columns, searchable = false, searchPlaceholder = "Search...", onRowClick, loading = false, emptyMessage = "No data", className }) {
2907
- const [sorting, setSorting] = React25.useState([]);
2908
- const [globalFilter, setGlobalFilter] = React25.useState("");
2909
- const tableColumns = React25.useMemo(() => columns.map((col) => ({
3036
+ const [sorting, setSorting] = React26.useState([]);
3037
+ const [globalFilter, setGlobalFilter] = React26.useState("");
3038
+ const tableColumns = React26.useMemo(() => columns.map((col) => ({
2910
3039
  id: String(col.key),
2911
3040
  accessorKey: col.key,
2912
3041
  header: col.header,
@@ -2929,49 +3058,49 @@ function DataGrid({ data, columns, searchable = false, searchPlaceholder = "Sear
2929
3058
  getSortedRowModel: reactTable.getSortedRowModel(),
2930
3059
  getFilteredRowModel: reactTable.getFilteredRowModel()
2931
3060
  });
2932
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
3061
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
2933
3062
  className: clsx.clsx("lui-datagrid", className)
2934
- }, searchable && /* @__PURE__ */ React25__namespace.default.createElement("div", {
3063
+ }, searchable && /* @__PURE__ */ React26__namespace.default.createElement("div", {
2935
3064
  className: "lui-datagrid-search"
2936
- }, /* @__PURE__ */ React25__namespace.default.createElement("input", {
3065
+ }, /* @__PURE__ */ React26__namespace.default.createElement("input", {
2937
3066
  type: "text",
2938
3067
  value: globalFilter,
2939
- onChange: /* @__PURE__ */ chunk3PV26V5F_js.__name((e) => setGlobalFilter(e.target.value), "onChange"),
3068
+ onChange: /* @__PURE__ */ chunk2HRO6CFU_js.__name((e) => setGlobalFilter(e.target.value), "onChange"),
2940
3069
  placeholder: searchPlaceholder,
2941
3070
  className: "lui-datagrid-search-input"
2942
- })), /* @__PURE__ */ React25__namespace.default.createElement("div", {
3071
+ })), /* @__PURE__ */ React26__namespace.default.createElement("div", {
2943
3072
  className: "lui-datagrid-container"
2944
- }, /* @__PURE__ */ React25__namespace.default.createElement("table", {
3073
+ }, /* @__PURE__ */ React26__namespace.default.createElement("table", {
2945
3074
  className: "lui-datagrid-table"
2946
- }, /* @__PURE__ */ React25__namespace.default.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React25__namespace.default.createElement("tr", {
3075
+ }, /* @__PURE__ */ React26__namespace.default.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React26__namespace.default.createElement("tr", {
2947
3076
  key: headerGroup.id
2948
- }, headerGroup.headers.map((header) => /* @__PURE__ */ React25__namespace.default.createElement("th", {
3077
+ }, headerGroup.headers.map((header) => /* @__PURE__ */ React26__namespace.default.createElement("th", {
2949
3078
  key: header.id,
2950
3079
  className: clsx.clsx("lui-datagrid-th", header.column.getCanSort() && "lui-datagrid-th--sortable"),
2951
3080
  onClick: header.column.getToggleSortingHandler(),
2952
3081
  style: {
2953
3082
  width: header.column.getSize()
2954
3083
  }
2955
- }, /* @__PURE__ */ React25__namespace.default.createElement("div", {
3084
+ }, /* @__PURE__ */ React26__namespace.default.createElement("div", {
2956
3085
  className: "lui-datagrid-th-content"
2957
- }, reactTable.flexRender(header.column.columnDef.header, header.getContext()), header.column.getIsSorted() && /* @__PURE__ */ React25__namespace.default.createElement("span", {
3086
+ }, reactTable.flexRender(header.column.columnDef.header, header.getContext()), header.column.getIsSorted() && /* @__PURE__ */ React26__namespace.default.createElement("span", {
2958
3087
  className: "lui-datagrid-sort-icon"
2959
- }, header.column.getIsSorted() === "asc" ? "\u2191" : "\u2193"))))))), /* @__PURE__ */ React25__namespace.default.createElement("tbody", null, loading ? /* @__PURE__ */ React25__namespace.default.createElement("tr", null, /* @__PURE__ */ React25__namespace.default.createElement("td", {
3088
+ }, header.column.getIsSorted() === "asc" ? "\u2191" : "\u2193"))))))), /* @__PURE__ */ React26__namespace.default.createElement("tbody", null, loading ? /* @__PURE__ */ React26__namespace.default.createElement("tr", null, /* @__PURE__ */ React26__namespace.default.createElement("td", {
2960
3089
  colSpan: columns.length,
2961
3090
  className: "lui-datagrid-loading"
2962
- }, "Loading...")) : table.getRowModel().rows.length === 0 ? /* @__PURE__ */ React25__namespace.default.createElement("tr", null, /* @__PURE__ */ React25__namespace.default.createElement("td", {
3091
+ }, "Loading...")) : table.getRowModel().rows.length === 0 ? /* @__PURE__ */ React26__namespace.default.createElement("tr", null, /* @__PURE__ */ React26__namespace.default.createElement("td", {
2963
3092
  colSpan: columns.length,
2964
3093
  className: "lui-datagrid-empty"
2965
- }, emptyMessage)) : table.getRowModel().rows.map((row) => /* @__PURE__ */ React25__namespace.default.createElement("tr", {
3094
+ }, emptyMessage)) : table.getRowModel().rows.map((row) => /* @__PURE__ */ React26__namespace.default.createElement("tr", {
2966
3095
  key: row.id,
2967
3096
  className: clsx.clsx("lui-datagrid-row", onRowClick && "lui-datagrid-row--clickable"),
2968
- onClick: /* @__PURE__ */ chunk3PV26V5F_js.__name(() => onRowClick?.(row.original), "onClick")
2969
- }, row.getVisibleCells().map((cell) => /* @__PURE__ */ React25__namespace.default.createElement("td", {
3097
+ onClick: /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => onRowClick?.(row.original), "onClick")
3098
+ }, row.getVisibleCells().map((cell) => /* @__PURE__ */ React26__namespace.default.createElement("td", {
2970
3099
  key: cell.id,
2971
3100
  className: "lui-datagrid-td"
2972
3101
  }, reactTable.flexRender(cell.column.columnDef.cell, cell.getContext())))))))));
2973
3102
  }
2974
- chunk3PV26V5F_js.__name(DataGrid, "DataGrid");
3103
+ chunk2HRO6CFU_js.__name(DataGrid, "DataGrid");
2975
3104
  chart_js.Chart.register(chart_js.CategoryScale, chart_js.LinearScale, chart_js.PointElement, chart_js.LineElement, chart_js.BarElement, chart_js.ArcElement, chart_js.Title, chart_js.Tooltip, chart_js.Legend);
2976
3105
  function Chart({ type, data, options, height = 300, width = "100%", className }) {
2977
3106
  const defaultOptions = {
@@ -3025,29 +3154,29 @@ function Chart({ type, data, options, height = 300, width = "100%", className })
3025
3154
  ...options?.plugins
3026
3155
  }
3027
3156
  };
3028
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
3157
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
3029
3158
  className: clsx.clsx("lui-chart", className),
3030
3159
  style: {
3031
3160
  height,
3032
3161
  width
3033
3162
  }
3034
- }, /* @__PURE__ */ React25__namespace.default.createElement(reactChartjs2.Chart, {
3163
+ }, /* @__PURE__ */ React26__namespace.default.createElement(reactChartjs2.Chart, {
3035
3164
  type,
3036
3165
  data,
3037
3166
  options: mergedOptions
3038
3167
  }));
3039
3168
  }
3040
- chunk3PV26V5F_js.__name(Chart, "Chart");
3169
+ chunk2HRO6CFU_js.__name(Chart, "Chart");
3041
3170
  function AppShell({ header, sidebar, footer, sidebarPosition = "left", sidebarWidth = 240, autoResize = true, padding = "md", className, children, ...props }) {
3042
- const containerRef = React25.useRef(null);
3171
+ const containerRef = React26.useRef(null);
3043
3172
  const { app } = useMcpApp();
3044
- React25.useEffect(() => {
3173
+ React26.useEffect(() => {
3045
3174
  if (!autoResize || !containerRef.current) return;
3046
3175
  if (!app) return;
3047
3176
  let lastWidth = 0;
3048
3177
  let lastHeight = 0;
3049
3178
  let scheduled = false;
3050
- const sendSizeChanged = /* @__PURE__ */ chunk3PV26V5F_js.__name(() => {
3179
+ const sendSizeChanged = /* @__PURE__ */ chunk2HRO6CFU_js.__name(() => {
3051
3180
  if (scheduled) return;
3052
3181
  scheduled = true;
3053
3182
  requestAnimationFrame(() => {
@@ -3080,222 +3209,234 @@ function AppShell({ header, sidebar, footer, sidebarPosition = "left", sidebarWi
3080
3209
  width: typeof sidebarWidth === "number" ? `${sidebarWidth}px` : sidebarWidth,
3081
3210
  flexShrink: 0
3082
3211
  };
3083
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
3212
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
3084
3213
  ref: containerRef,
3085
3214
  className: clsx.clsx("lui-app-shell", `lui-app-shell--padding-${padding}`, className),
3086
3215
  ...props
3087
- }, header && /* @__PURE__ */ React25__namespace.default.createElement("header", {
3216
+ }, header && /* @__PURE__ */ React26__namespace.default.createElement("header", {
3088
3217
  className: "lui-app-shell-header"
3089
- }, header), /* @__PURE__ */ React25__namespace.default.createElement("div", {
3218
+ }, header), /* @__PURE__ */ React26__namespace.default.createElement("div", {
3090
3219
  className: "lui-app-shell-body"
3091
- }, sidebar && sidebarPosition === "left" && /* @__PURE__ */ React25__namespace.default.createElement("aside", {
3220
+ }, sidebar && sidebarPosition === "left" && /* @__PURE__ */ React26__namespace.default.createElement("aside", {
3092
3221
  className: "lui-app-shell-sidebar",
3093
3222
  style: sidebarStyle
3094
- }, sidebar), /* @__PURE__ */ React25__namespace.default.createElement("main", {
3223
+ }, sidebar), /* @__PURE__ */ React26__namespace.default.createElement("main", {
3095
3224
  className: "lui-app-shell-main"
3096
- }, children), sidebar && sidebarPosition === "right" && /* @__PURE__ */ React25__namespace.default.createElement("aside", {
3225
+ }, children), sidebar && sidebarPosition === "right" && /* @__PURE__ */ React26__namespace.default.createElement("aside", {
3097
3226
  className: "lui-app-shell-sidebar",
3098
3227
  style: sidebarStyle
3099
- }, sidebar)), footer && /* @__PURE__ */ React25__namespace.default.createElement("footer", {
3228
+ }, sidebar)), footer && /* @__PURE__ */ React26__namespace.default.createElement("footer", {
3100
3229
  className: "lui-app-shell-footer"
3101
3230
  }, footer));
3102
3231
  }
3103
- chunk3PV26V5F_js.__name(AppShell, "AppShell");
3232
+ chunk2HRO6CFU_js.__name(AppShell, "AppShell");
3104
3233
  function Tabs2({ tabs, defaultValue, value, onValueChange, children, className }) {
3105
3234
  const defaultTab = defaultValue || tabs[0]?.value;
3106
- return /* @__PURE__ */ React25__namespace.default.createElement(TabsPrimitive2__namespace.Root, {
3235
+ return /* @__PURE__ */ React26__namespace.default.createElement(TabsPrimitive2__namespace.Root, {
3107
3236
  className: clsx.clsx("lui-tabs", className),
3108
3237
  defaultValue: defaultTab,
3109
3238
  value,
3110
3239
  onValueChange
3111
- }, /* @__PURE__ */ React25__namespace.default.createElement(TabsPrimitive2__namespace.List, {
3240
+ }, /* @__PURE__ */ React26__namespace.default.createElement(TabsPrimitive2__namespace.List, {
3112
3241
  className: "lui-tabs-list"
3113
- }, tabs.map((tab) => /* @__PURE__ */ React25__namespace.default.createElement(TabsPrimitive2__namespace.Trigger, {
3242
+ }, tabs.map((tab) => /* @__PURE__ */ React26__namespace.default.createElement(TabsPrimitive2__namespace.Trigger, {
3114
3243
  key: tab.value,
3115
3244
  value: tab.value,
3116
3245
  disabled: tab.disabled,
3117
3246
  className: "lui-tabs-trigger"
3118
3247
  }, tab.label))), children);
3119
3248
  }
3120
- chunk3PV26V5F_js.__name(Tabs2, "Tabs");
3249
+ chunk2HRO6CFU_js.__name(Tabs2, "Tabs");
3121
3250
  function TabContent({ value, children, className }) {
3122
- return /* @__PURE__ */ React25__namespace.default.createElement(TabsPrimitive2__namespace.Content, {
3251
+ return /* @__PURE__ */ React26__namespace.default.createElement(TabsPrimitive2__namespace.Content, {
3123
3252
  value,
3124
3253
  className: clsx.clsx("lui-tabs-content", className)
3125
3254
  }, children);
3126
3255
  }
3127
- chunk3PV26V5F_js.__name(TabContent, "TabContent");
3256
+ chunk2HRO6CFU_js.__name(TabContent, "TabContent");
3128
3257
  function Modal({ open, defaultOpen, onOpenChange, title, description, children, className, trigger }) {
3129
- return /* @__PURE__ */ React25__namespace.default.createElement(DialogPrimitive__namespace.Root, {
3258
+ return /* @__PURE__ */ React26__namespace.default.createElement(DialogPrimitive__namespace.Root, {
3130
3259
  open,
3131
3260
  defaultOpen,
3132
3261
  onOpenChange
3133
- }, trigger && /* @__PURE__ */ React25__namespace.default.createElement(DialogPrimitive__namespace.Trigger, {
3262
+ }, trigger && /* @__PURE__ */ React26__namespace.default.createElement(DialogPrimitive__namespace.Trigger, {
3134
3263
  asChild: true
3135
- }, trigger), /* @__PURE__ */ React25__namespace.default.createElement(DialogPrimitive__namespace.Portal, null, /* @__PURE__ */ React25__namespace.default.createElement(DialogPrimitive__namespace.Overlay, {
3264
+ }, trigger), /* @__PURE__ */ React26__namespace.default.createElement(DialogPrimitive__namespace.Portal, null, /* @__PURE__ */ React26__namespace.default.createElement(DialogPrimitive__namespace.Overlay, {
3136
3265
  className: "lui-modal-overlay"
3137
- }), /* @__PURE__ */ React25__namespace.default.createElement(DialogPrimitive__namespace.Content, {
3266
+ }), /* @__PURE__ */ React26__namespace.default.createElement(DialogPrimitive__namespace.Content, {
3138
3267
  className: clsx.clsx("lui-modal-content", className)
3139
- }, title && /* @__PURE__ */ React25__namespace.default.createElement(DialogPrimitive__namespace.Title, {
3268
+ }, title && /* @__PURE__ */ React26__namespace.default.createElement(DialogPrimitive__namespace.Title, {
3140
3269
  className: "lui-modal-title"
3141
- }, title), description && /* @__PURE__ */ React25__namespace.default.createElement(DialogPrimitive__namespace.Description, {
3270
+ }, title), description && /* @__PURE__ */ React26__namespace.default.createElement(DialogPrimitive__namespace.Description, {
3142
3271
  className: "lui-modal-description"
3143
- }, description), children, /* @__PURE__ */ React25__namespace.default.createElement(DialogPrimitive__namespace.Close, {
3272
+ }, description), children, /* @__PURE__ */ React26__namespace.default.createElement(DialogPrimitive__namespace.Close, {
3144
3273
  className: "lui-modal-close",
3145
3274
  "aria-label": "Close"
3146
- }, /* @__PURE__ */ React25__namespace.default.createElement(CloseIcon, null)))));
3275
+ }, /* @__PURE__ */ React26__namespace.default.createElement(CloseIcon, null)))));
3147
3276
  }
3148
- chunk3PV26V5F_js.__name(Modal, "Modal");
3277
+ chunk2HRO6CFU_js.__name(Modal, "Modal");
3149
3278
  function CloseIcon() {
3150
- return /* @__PURE__ */ React25__namespace.default.createElement("svg", {
3279
+ return /* @__PURE__ */ React26__namespace.default.createElement("svg", {
3151
3280
  width: "14",
3152
3281
  height: "14",
3153
3282
  viewBox: "0 0 14 14",
3154
3283
  fill: "none"
3155
- }, /* @__PURE__ */ React25__namespace.default.createElement("path", {
3284
+ }, /* @__PURE__ */ React26__namespace.default.createElement("path", {
3156
3285
  d: "M3.5 3.5L10.5 10.5M10.5 3.5L3.5 10.5",
3157
3286
  stroke: "currentColor",
3158
3287
  strokeWidth: "1.5",
3159
3288
  strokeLinecap: "round"
3160
3289
  }));
3161
3290
  }
3162
- chunk3PV26V5F_js.__name(CloseIcon, "CloseIcon");
3291
+ chunk2HRO6CFU_js.__name(CloseIcon, "CloseIcon");
3163
3292
  function CodeBlock({ code, language = "text", showLineNumbers = false, copyable = true, className }) {
3164
- const [copied, setCopied] = React25__namespace.default.useState(false);
3165
- const handleCopy = /* @__PURE__ */ chunk3PV26V5F_js.__name(async () => {
3293
+ const [copied, setCopied] = React26__namespace.default.useState(false);
3294
+ const handleCopy = /* @__PURE__ */ chunk2HRO6CFU_js.__name(async () => {
3166
3295
  await navigator.clipboard.writeText(code);
3167
3296
  setCopied(true);
3168
3297
  setTimeout(() => setCopied(false), 2e3);
3169
3298
  }, "handleCopy");
3170
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
3299
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
3171
3300
  className: clsx.clsx("lui-code-block", className)
3172
- }, copyable && /* @__PURE__ */ React25__namespace.default.createElement("button", {
3301
+ }, copyable && /* @__PURE__ */ React26__namespace.default.createElement("button", {
3173
3302
  type: "button",
3174
3303
  className: "lui-code-block-copy",
3175
3304
  onClick: handleCopy,
3176
3305
  "aria-label": copied ? "Copied!" : "Copy code"
3177
- }, copied ? /* @__PURE__ */ React25__namespace.default.createElement("svg", {
3306
+ }, copied ? /* @__PURE__ */ React26__namespace.default.createElement("svg", {
3178
3307
  viewBox: "0 0 24 24",
3179
3308
  fill: "none",
3180
3309
  stroke: "currentColor",
3181
3310
  strokeWidth: "2"
3182
- }, /* @__PURE__ */ React25__namespace.default.createElement("polyline", {
3311
+ }, /* @__PURE__ */ React26__namespace.default.createElement("polyline", {
3183
3312
  points: "20,6 9,17 4,12"
3184
- })) : /* @__PURE__ */ React25__namespace.default.createElement("svg", {
3313
+ })) : /* @__PURE__ */ React26__namespace.default.createElement("svg", {
3185
3314
  viewBox: "0 0 24 24",
3186
3315
  fill: "none",
3187
3316
  stroke: "currentColor",
3188
3317
  strokeWidth: "2"
3189
- }, /* @__PURE__ */ React25__namespace.default.createElement("rect", {
3318
+ }, /* @__PURE__ */ React26__namespace.default.createElement("rect", {
3190
3319
  x: "9",
3191
3320
  y: "9",
3192
3321
  width: "13",
3193
3322
  height: "13",
3194
3323
  rx: "2",
3195
3324
  ry: "2"
3196
- }), /* @__PURE__ */ React25__namespace.default.createElement("path", {
3325
+ }), /* @__PURE__ */ React26__namespace.default.createElement("path", {
3197
3326
  d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
3198
- }))), /* @__PURE__ */ React25__namespace.default.createElement(prismReactRenderer.Highlight, {
3327
+ }))), /* @__PURE__ */ React26__namespace.default.createElement(prismReactRenderer.Highlight, {
3199
3328
  theme: prismReactRenderer.themes.nightOwl,
3200
3329
  code: code.trim(),
3201
3330
  language
3202
- }, ({ className: hlClassName, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React25__namespace.default.createElement("pre", {
3331
+ }, ({ className: hlClassName, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React26__namespace.default.createElement("pre", {
3203
3332
  className: clsx.clsx("lui-code-block-pre", hlClassName),
3204
3333
  style
3205
- }, tokens.map((line, i) => /* @__PURE__ */ React25__namespace.default.createElement("div", {
3334
+ }, tokens.map((line, i) => /* @__PURE__ */ React26__namespace.default.createElement("div", {
3206
3335
  key: i,
3207
3336
  ...getLineProps({
3208
3337
  line
3209
3338
  })
3210
- }, showLineNumbers && /* @__PURE__ */ React25__namespace.default.createElement("span", {
3339
+ }, showLineNumbers && /* @__PURE__ */ React26__namespace.default.createElement("span", {
3211
3340
  className: "lui-code-block-line-number"
3212
- }, i + 1), line.map((token, key) => /* @__PURE__ */ React25__namespace.default.createElement("span", {
3341
+ }, i + 1), line.map((token, key) => /* @__PURE__ */ React26__namespace.default.createElement("span", {
3213
3342
  key,
3214
3343
  ...getTokenProps({
3215
3344
  token
3216
3345
  })
3217
3346
  })))))));
3218
3347
  }
3219
- chunk3PV26V5F_js.__name(CodeBlock, "CodeBlock");
3220
- var Card2 = /* @__PURE__ */ React25.forwardRef(({ className, variant = "default", padding = "md", interactive = false, children, ...props }, ref) => {
3221
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
3348
+ chunk2HRO6CFU_js.__name(CodeBlock, "CodeBlock");
3349
+ var Card2 = /* @__PURE__ */ React26.forwardRef(({ className, variant = "default", padding = "md", interactive = false, children, ...props }, ref) => {
3350
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
3222
3351
  ref,
3223
3352
  className: clsx.clsx("lui-card", `lui-card--${variant}`, `lui-card--padding-${padding}`, interactive && "lui-card--interactive", className),
3224
3353
  ...props
3225
3354
  }, children);
3226
3355
  });
3227
3356
  Card2.displayName = "Card";
3228
- var CardHeader2 = /* @__PURE__ */ React25.forwardRef(({ className, title, description, action, children, ...props }, ref) => {
3229
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
3357
+ var CardHeader2 = /* @__PURE__ */ React26.forwardRef(({ className, title, description, action, children, ...props }, ref) => {
3358
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
3230
3359
  ref,
3231
3360
  className: clsx.clsx("lui-card-header", className),
3232
3361
  ...props
3233
- }, (title || description) && /* @__PURE__ */ React25__namespace.default.createElement("div", {
3362
+ }, (title || description) && /* @__PURE__ */ React26__namespace.default.createElement("div", {
3234
3363
  className: "lui-card-header__text"
3235
- }, title && /* @__PURE__ */ React25__namespace.default.createElement("h3", {
3364
+ }, title && /* @__PURE__ */ React26__namespace.default.createElement("h3", {
3236
3365
  className: "lui-card-header__title"
3237
- }, title), description && /* @__PURE__ */ React25__namespace.default.createElement("p", {
3366
+ }, title), description && /* @__PURE__ */ React26__namespace.default.createElement("p", {
3238
3367
  className: "lui-card-header__description"
3239
- }, description)), action && /* @__PURE__ */ React25__namespace.default.createElement("div", {
3368
+ }, description)), action && /* @__PURE__ */ React26__namespace.default.createElement("div", {
3240
3369
  className: "lui-card-header__action"
3241
3370
  }, action), children);
3242
3371
  });
3243
3372
  CardHeader2.displayName = "CardHeader";
3244
- var CardContent2 = /* @__PURE__ */ React25.forwardRef(({ className, children, ...props }, ref) => {
3245
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
3373
+ var CardContent2 = /* @__PURE__ */ React26.forwardRef(({ className, children, ...props }, ref) => {
3374
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
3246
3375
  ref,
3247
3376
  className: clsx.clsx("lui-card-content", className),
3248
3377
  ...props
3249
3378
  }, children);
3250
3379
  });
3251
3380
  CardContent2.displayName = "CardContent";
3252
- var CardFooter2 = /* @__PURE__ */ React25.forwardRef(({ className, children, ...props }, ref) => {
3253
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
3381
+ var CardFooter2 = /* @__PURE__ */ React26.forwardRef(({ className, children, ...props }, ref) => {
3382
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
3254
3383
  ref,
3255
3384
  className: clsx.clsx("lui-card-footer", className),
3256
3385
  ...props
3257
3386
  }, children);
3258
3387
  });
3259
3388
  CardFooter2.displayName = "CardFooter";
3260
- var Input2 = /* @__PURE__ */ React25.forwardRef(({ className, label, helperText, error, size = "md", leftElement, rightElement, fullWidth = false, id, ...props }, ref) => {
3389
+ var Input2 = /* @__PURE__ */ React26.forwardRef(({ className, label, helperText, error, size = "md", leftElement, rightElement, fullWidth = false, id, ...props }, ref) => {
3261
3390
  const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
3262
3391
  const hasError = Boolean(error);
3263
- return /* @__PURE__ */ React25__namespace.default.createElement("div", {
3392
+ return /* @__PURE__ */ React26__namespace.default.createElement("div", {
3264
3393
  className: clsx.clsx("lui-input-wrapper", fullWidth && "lui-input-wrapper--full-width", className)
3265
- }, label && /* @__PURE__ */ React25__namespace.default.createElement("label", {
3394
+ }, label && /* @__PURE__ */ React26__namespace.default.createElement("label", {
3266
3395
  htmlFor: inputId,
3267
3396
  className: "lui-input-label"
3268
- }, label), /* @__PURE__ */ React25__namespace.default.createElement("div", {
3397
+ }, label), /* @__PURE__ */ React26__namespace.default.createElement("div", {
3269
3398
  className: clsx.clsx("lui-input-container", `lui-input-container--${size}`, hasError && "lui-input-container--error", leftElement && "lui-input-container--has-left", rightElement && "lui-input-container--has-right")
3270
- }, leftElement && /* @__PURE__ */ React25__namespace.default.createElement("span", {
3399
+ }, leftElement && /* @__PURE__ */ React26__namespace.default.createElement("span", {
3271
3400
  className: "lui-input-element lui-input-element--left"
3272
- }, leftElement), /* @__PURE__ */ React25__namespace.default.createElement("input", {
3401
+ }, leftElement), /* @__PURE__ */ React26__namespace.default.createElement("input", {
3273
3402
  ref,
3274
3403
  id: inputId,
3275
3404
  className: "lui-input",
3276
3405
  "aria-invalid": hasError,
3277
3406
  "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : void 0,
3278
3407
  ...props
3279
- }), rightElement && /* @__PURE__ */ React25__namespace.default.createElement("span", {
3408
+ }), rightElement && /* @__PURE__ */ React26__namespace.default.createElement("span", {
3280
3409
  className: "lui-input-element lui-input-element--right"
3281
- }, rightElement)), (error || helperText) && /* @__PURE__ */ React25__namespace.default.createElement("p", {
3410
+ }, rightElement)), (error || helperText) && /* @__PURE__ */ React26__namespace.default.createElement("p", {
3282
3411
  id: error ? `${inputId}-error` : `${inputId}-helper`,
3283
3412
  className: clsx.clsx("lui-input-message", error && "lui-input-message--error")
3284
3413
  }, error || helperText));
3285
3414
  });
3286
3415
  Input2.displayName = "Input";
3287
3416
 
3417
+ Object.defineProperty(exports, "GPTApp", {
3418
+ enumerable: true,
3419
+ get: function () { return chunk2HRO6CFU_js.GPTApp; }
3420
+ });
3288
3421
  Object.defineProperty(exports, "UIApp", {
3289
3422
  enumerable: true,
3290
- get: function () { return chunk3PV26V5F_js.UIApp; }
3423
+ get: function () { return chunk2HRO6CFU_js.UIApp; }
3424
+ });
3425
+ Object.defineProperty(exports, "getGPTAppMetadata", {
3426
+ enumerable: true,
3427
+ get: function () { return chunk2HRO6CFU_js.getGPTAppMetadata; }
3428
+ });
3429
+ Object.defineProperty(exports, "getGPTAppUri", {
3430
+ enumerable: true,
3431
+ get: function () { return chunk2HRO6CFU_js.getGPTAppUri; }
3291
3432
  });
3292
3433
  Object.defineProperty(exports, "getUIAppMetadata", {
3293
3434
  enumerable: true,
3294
- get: function () { return chunk3PV26V5F_js.getUIAppMetadata; }
3435
+ get: function () { return chunk2HRO6CFU_js.getUIAppMetadata; }
3295
3436
  });
3296
3437
  Object.defineProperty(exports, "getUIAppUri", {
3297
3438
  enumerable: true,
3298
- get: function () { return chunk3PV26V5F_js.getUIAppUri; }
3439
+ get: function () { return chunk2HRO6CFU_js.getUIAppUri; }
3299
3440
  });
3300
3441
  Object.defineProperty(exports, "App", {
3301
3442
  enumerable: true,
@@ -3305,6 +3446,30 @@ Object.defineProperty(exports, "PostMessageTransport", {
3305
3446
  enumerable: true,
3306
3447
  get: function () { return extApps.PostMessageTransport; }
3307
3448
  });
3449
+ Object.defineProperty(exports, "RESOURCE_MIME_TYPE", {
3450
+ enumerable: true,
3451
+ get: function () { return extApps.RESOURCE_MIME_TYPE; }
3452
+ });
3453
+ Object.defineProperty(exports, "RESOURCE_URI_META_KEY", {
3454
+ enumerable: true,
3455
+ get: function () { return extApps.RESOURCE_URI_META_KEY; }
3456
+ });
3457
+ Object.defineProperty(exports, "applyDocumentTheme", {
3458
+ enumerable: true,
3459
+ get: function () { return extApps.applyDocumentTheme; }
3460
+ });
3461
+ Object.defineProperty(exports, "applyHostFonts", {
3462
+ enumerable: true,
3463
+ get: function () { return extApps.applyHostFonts; }
3464
+ });
3465
+ Object.defineProperty(exports, "applyHostStyleVariables", {
3466
+ enumerable: true,
3467
+ get: function () { return extApps.applyHostStyleVariables; }
3468
+ });
3469
+ Object.defineProperty(exports, "getDocumentTheme", {
3470
+ enumerable: true,
3471
+ get: function () { return extApps.getDocumentTheme; }
3472
+ });
3308
3473
  Object.defineProperty(exports, "AppBridge", {
3309
3474
  enumerable: true,
3310
3475
  get: function () { return appBridge.AppBridge; }
@@ -3369,6 +3534,7 @@ exports.FormField = FormField;
3369
3534
  exports.FormItem = FormItem;
3370
3535
  exports.FormLabel = FormLabel;
3371
3536
  exports.FormMessage = FormMessage;
3537
+ exports.GPTAppProvider = GPTAppProvider;
3372
3538
  exports.INITIAL_TOOL_STATE = INITIAL_TOOL_STATE;
3373
3539
  exports.Input = Input2;
3374
3540
  exports.Label = Label2;
@@ -3428,6 +3594,8 @@ exports.buttonVariants = buttonVariants;
3428
3594
  exports.cn = cn;
3429
3595
  exports.normalizeToolBinding = normalizeToolBinding;
3430
3596
  exports.useFormField = useFormField;
3597
+ exports.useGptApp = useGptApp;
3598
+ exports.useGptTool = useGptTool;
3431
3599
  exports.useHostContext = useHostContext;
3432
3600
  exports.useMcpApp = useMcpApp;
3433
3601
  exports.useMessage = useMessage;