@leanmcp/ui 0.2.0 → 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.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { __name } from './chunk-WORZ46KI.mjs';
2
- export { UIApp, getUIAppMetadata, getUIAppUri } from './chunk-WORZ46KI.mjs';
3
- import * as React25 from 'react';
4
- import React25__default, { forwardRef, Component, useState, useRef, useCallback, useEffect, createContext, useContext, useMemo } from 'react';
5
- import { applyDocumentTheme, applyHostStyleVariables, PostMessageTransport, App } from '@modelcontextprotocol/ext-apps';
6
- export { App, PostMessageTransport } from '@modelcontextprotocol/ext-apps';
1
+ import { __name } from './chunk-KX75VCMM.mjs';
2
+ export { GPTApp, UIApp, getGPTAppMetadata, getGPTAppUri, getUIAppMetadata, getUIAppUri } from './chunk-KX75VCMM.mjs';
3
+ import * as React26 from 'react';
4
+ import React26__default, { forwardRef, Component, useState, useRef, useCallback, useEffect, createContext, useContext, useMemo } from 'react';
5
+ import { applyDocumentTheme, applyHostStyleVariables, applyHostFonts, PostMessageTransport, App } from '@modelcontextprotocol/ext-apps';
6
+ export { App, PostMessageTransport, RESOURCE_MIME_TYPE, RESOURCE_URI_META_KEY, applyDocumentTheme, applyHostFonts, applyHostStyleVariables, getDocumentTheme } from '@modelcontextprotocol/ext-apps';
7
7
  import { XIcon, ChevronDownIcon, CheckIcon, ChevronUpIcon, Loader2, SearchIcon, Search, X, AlertCircle, RefreshCw, ChevronLeft, ChevronRight, WifiOff, CircleIcon, ChevronRightIcon, Check, ArrowUpDown, ArrowUp, ArrowDown, Loader2Icon, OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon } from 'lucide-react';
8
8
  import { useTheme } from 'next-themes';
9
9
  import { toast, Toaster as Toaster$1 } from 'sonner';
@@ -54,6 +54,9 @@ function AppProvider({ appInfo, capabilities = {}, options = {
54
54
  if (context.styles?.variables) {
55
55
  applyHostStyleVariables(context.styles.variables);
56
56
  }
57
+ if (context.styles?.css?.fonts) {
58
+ applyHostFonts(context.styles.css.fonts);
59
+ }
57
60
  }, []);
58
61
  useEffect(() => {
59
62
  let mounted = true;
@@ -222,9 +225,9 @@ function AppProvider({ appInfo, capabilities = {}, options = {
222
225
  requestDisplayMode
223
226
  };
224
227
  const theme = hostContext.theme ?? "light";
225
- return /* @__PURE__ */ React25__default.createElement(McpAppContext.Provider, {
228
+ return /* @__PURE__ */ React26__default.createElement(McpAppContext.Provider, {
226
229
  value
227
- }, /* @__PURE__ */ React25__default.createElement("div", {
230
+ }, /* @__PURE__ */ React26__default.createElement("div", {
228
231
  className: "lui-root",
229
232
  "data-theme": theme
230
233
  }, children));
@@ -266,6 +269,123 @@ function useMcpApp() {
266
269
  return context;
267
270
  }
268
271
  __name(useMcpApp, "useMcpApp");
272
+ var GptAppContext = /* @__PURE__ */ createContext(null);
273
+ function GPTAppProvider({ appName, children }) {
274
+ const [isConnected, setIsConnected] = useState(false);
275
+ const [error, setError] = useState(null);
276
+ const [theme, setTheme] = useState("light");
277
+ const [displayMode, setDisplayMode] = useState("inline");
278
+ const [locale, setLocale] = useState("en");
279
+ const [maxHeight, setMaxHeight] = useState(600);
280
+ useEffect(() => {
281
+ let mounted = true;
282
+ let checkAttempts = 0;
283
+ const maxAttempts = 50;
284
+ function checkConnection() {
285
+ if (!mounted) return;
286
+ if (window.openai) {
287
+ setIsConnected(true);
288
+ setError(null);
289
+ if (window.openai.theme) setTheme(window.openai.theme);
290
+ if (window.openai.displayMode) setDisplayMode(window.openai.displayMode);
291
+ if (window.openai.locale) setLocale(window.openai.locale);
292
+ if (window.openai.maxHeight) setMaxHeight(window.openai.maxHeight);
293
+ } else {
294
+ checkAttempts++;
295
+ if (checkAttempts < maxAttempts) {
296
+ setTimeout(checkConnection, 100);
297
+ } else {
298
+ setError(new Error("ChatGPT SDK not available"));
299
+ setIsConnected(false);
300
+ }
301
+ }
302
+ }
303
+ __name(checkConnection, "checkConnection");
304
+ checkConnection();
305
+ return () => {
306
+ mounted = false;
307
+ };
308
+ }, [
309
+ appName
310
+ ]);
311
+ const callTool = useCallback(async (name, args = {}) => {
312
+ if (!window.openai?.callTool) {
313
+ throw new Error("ChatGPT SDK not available");
314
+ }
315
+ const result = await window.openai.callTool(name, args);
316
+ return result;
317
+ }, []);
318
+ const value = {
319
+ isConnected,
320
+ error,
321
+ theme,
322
+ displayMode,
323
+ locale,
324
+ maxHeight,
325
+ callTool
326
+ };
327
+ return /* @__PURE__ */ React26__default.createElement(GptAppContext.Provider, {
328
+ value
329
+ }, /* @__PURE__ */ React26__default.createElement("div", {
330
+ className: "lui-root",
331
+ "data-theme": theme
332
+ }, children));
333
+ }
334
+ __name(GPTAppProvider, "GPTAppProvider");
335
+ function useGptApp() {
336
+ const context = useContext(GptAppContext);
337
+ if (!context) {
338
+ return {
339
+ isConnected: false,
340
+ error: new Error("GPTAppProvider not found"),
341
+ theme: "light",
342
+ displayMode: "inline",
343
+ locale: "en",
344
+ maxHeight: 600,
345
+ callTool: /* @__PURE__ */ __name(async () => {
346
+ throw new Error("Not connected to ChatGPT");
347
+ }, "callTool")
348
+ };
349
+ }
350
+ return context;
351
+ }
352
+ __name(useGptApp, "useGptApp");
353
+ function useGptTool(toolName) {
354
+ const { callTool, isConnected } = useGptApp();
355
+ const [result, setResult] = useState(null);
356
+ const [loading, setLoading] = useState(false);
357
+ const [error, setError] = useState(null);
358
+ const call = useCallback(async (args = {}) => {
359
+ if (!isConnected) {
360
+ setError(new Error("Not connected to ChatGPT"));
361
+ return;
362
+ }
363
+ setLoading(true);
364
+ setError(null);
365
+ try {
366
+ const res = await callTool(toolName, args);
367
+ setResult(res);
368
+ return res;
369
+ } catch (err) {
370
+ setError(err);
371
+ throw err;
372
+ } finally {
373
+ setLoading(false);
374
+ }
375
+ }, [
376
+ callTool,
377
+ isConnected,
378
+ toolName
379
+ ]);
380
+ return {
381
+ call,
382
+ result,
383
+ loading,
384
+ error,
385
+ isConnected
386
+ };
387
+ }
388
+ __name(useGptTool, "useGptTool");
269
389
  var DEFAULT_CONTEXT = {
270
390
  resultDisplay: {
271
391
  display: "none"
@@ -283,7 +403,7 @@ function ToolProvider({ defaults = {}, children }) {
283
403
  defaults,
284
404
  parentContext
285
405
  ]);
286
- return /* @__PURE__ */ React25.createElement(ToolContext.Provider, {
406
+ return /* @__PURE__ */ React26.createElement(ToolContext.Provider, {
287
407
  value
288
408
  }, children);
289
409
  }
@@ -294,23 +414,23 @@ function useToolContext() {
294
414
  __name(useToolContext, "useToolContext");
295
415
  var Toaster = /* @__PURE__ */ __name(({ ...props }) => {
296
416
  const { theme = "system" } = useTheme();
297
- return /* @__PURE__ */ React25__default.createElement(Toaster$1, {
417
+ return /* @__PURE__ */ React26__default.createElement(Toaster$1, {
298
418
  theme,
299
419
  className: "toaster group",
300
420
  icons: {
301
- success: /* @__PURE__ */ React25__default.createElement(CircleCheckIcon, {
421
+ success: /* @__PURE__ */ React26__default.createElement(CircleCheckIcon, {
302
422
  className: "size-4"
303
423
  }),
304
- info: /* @__PURE__ */ React25__default.createElement(InfoIcon, {
424
+ info: /* @__PURE__ */ React26__default.createElement(InfoIcon, {
305
425
  className: "size-4"
306
426
  }),
307
- warning: /* @__PURE__ */ React25__default.createElement(TriangleAlertIcon, {
427
+ warning: /* @__PURE__ */ React26__default.createElement(TriangleAlertIcon, {
308
428
  className: "size-4"
309
429
  }),
310
- error: /* @__PURE__ */ React25__default.createElement(OctagonXIcon, {
430
+ error: /* @__PURE__ */ React26__default.createElement(OctagonXIcon, {
311
431
  className: "size-4"
312
432
  }),
313
- loading: /* @__PURE__ */ React25__default.createElement(Loader2Icon, {
433
+ loading: /* @__PURE__ */ React26__default.createElement(Loader2Icon, {
314
434
  className: "size-4 animate-spin"
315
435
  })
316
436
  },
@@ -355,7 +475,7 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
355
475
  });
356
476
  function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
357
477
  const Comp = asChild ? Slot : "button";
358
- return /* @__PURE__ */ React25.createElement(Comp, {
478
+ return /* @__PURE__ */ React26.createElement(Comp, {
359
479
  "data-slot": "button",
360
480
  "data-variant": variant,
361
481
  "data-size": size,
@@ -369,35 +489,35 @@ function Button({ className, variant = "default", size = "default", asChild = fa
369
489
  }
370
490
  __name(Button, "Button");
371
491
  function Dialog({ ...props }) {
372
- return /* @__PURE__ */ React25.createElement(DialogPrimitive.Root, {
492
+ return /* @__PURE__ */ React26.createElement(DialogPrimitive.Root, {
373
493
  "data-slot": "dialog",
374
494
  ...props
375
495
  });
376
496
  }
377
497
  __name(Dialog, "Dialog");
378
498
  function DialogTrigger({ ...props }) {
379
- return /* @__PURE__ */ React25.createElement(DialogPrimitive.Trigger, {
499
+ return /* @__PURE__ */ React26.createElement(DialogPrimitive.Trigger, {
380
500
  "data-slot": "dialog-trigger",
381
501
  ...props
382
502
  });
383
503
  }
384
504
  __name(DialogTrigger, "DialogTrigger");
385
505
  function DialogPortal({ ...props }) {
386
- return /* @__PURE__ */ React25.createElement(DialogPrimitive.Portal, {
506
+ return /* @__PURE__ */ React26.createElement(DialogPrimitive.Portal, {
387
507
  "data-slot": "dialog-portal",
388
508
  ...props
389
509
  });
390
510
  }
391
511
  __name(DialogPortal, "DialogPortal");
392
512
  function DialogClose({ ...props }) {
393
- return /* @__PURE__ */ React25.createElement(DialogPrimitive.Close, {
513
+ return /* @__PURE__ */ React26.createElement(DialogPrimitive.Close, {
394
514
  "data-slot": "dialog-close",
395
515
  ...props
396
516
  });
397
517
  }
398
518
  __name(DialogClose, "DialogClose");
399
519
  function DialogOverlay({ className, ...props }) {
400
- return /* @__PURE__ */ React25.createElement(DialogPrimitive.Overlay, {
520
+ return /* @__PURE__ */ React26.createElement(DialogPrimitive.Overlay, {
401
521
  "data-slot": "dialog-overlay",
402
522
  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),
403
523
  ...props
@@ -405,22 +525,22 @@ function DialogOverlay({ className, ...props }) {
405
525
  }
406
526
  __name(DialogOverlay, "DialogOverlay");
407
527
  function DialogContent({ className, children, showCloseButton = true, ...props }) {
408
- return /* @__PURE__ */ React25.createElement(DialogPortal, {
528
+ return /* @__PURE__ */ React26.createElement(DialogPortal, {
409
529
  "data-slot": "dialog-portal"
410
- }, /* @__PURE__ */ React25.createElement(DialogOverlay, null), /* @__PURE__ */ React25.createElement(DialogPrimitive.Content, {
530
+ }, /* @__PURE__ */ React26.createElement(DialogOverlay, null), /* @__PURE__ */ React26.createElement(DialogPrimitive.Content, {
411
531
  "data-slot": "dialog-content",
412
532
  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),
413
533
  ...props
414
- }, children, showCloseButton && /* @__PURE__ */ React25.createElement(DialogPrimitive.Close, {
534
+ }, children, showCloseButton && /* @__PURE__ */ React26.createElement(DialogPrimitive.Close, {
415
535
  "data-slot": "dialog-close",
416
536
  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"
417
- }, /* @__PURE__ */ React25.createElement(XIcon, null), /* @__PURE__ */ React25.createElement("span", {
537
+ }, /* @__PURE__ */ React26.createElement(XIcon, null), /* @__PURE__ */ React26.createElement("span", {
418
538
  className: "sr-only"
419
539
  }, "Close"))));
420
540
  }
421
541
  __name(DialogContent, "DialogContent");
422
542
  function DialogHeader({ className, ...props }) {
423
- return /* @__PURE__ */ React25.createElement("div", {
543
+ return /* @__PURE__ */ React26.createElement("div", {
424
544
  "data-slot": "dialog-header",
425
545
  className: cn("flex flex-col gap-2 text-center sm:text-left", className),
426
546
  ...props
@@ -428,7 +548,7 @@ function DialogHeader({ className, ...props }) {
428
548
  }
429
549
  __name(DialogHeader, "DialogHeader");
430
550
  function DialogFooter({ className, ...props }) {
431
- return /* @__PURE__ */ React25.createElement("div", {
551
+ return /* @__PURE__ */ React26.createElement("div", {
432
552
  "data-slot": "dialog-footer",
433
553
  className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
434
554
  ...props
@@ -436,7 +556,7 @@ function DialogFooter({ className, ...props }) {
436
556
  }
437
557
  __name(DialogFooter, "DialogFooter");
438
558
  function DialogTitle({ className, ...props }) {
439
- return /* @__PURE__ */ React25.createElement(DialogPrimitive.Title, {
559
+ return /* @__PURE__ */ React26.createElement(DialogPrimitive.Title, {
440
560
  "data-slot": "dialog-title",
441
561
  className: cn("text-lg leading-none font-semibold", className),
442
562
  ...props
@@ -444,7 +564,7 @@ function DialogTitle({ className, ...props }) {
444
564
  }
445
565
  __name(DialogTitle, "DialogTitle");
446
566
  function DialogDescription({ className, ...props }) {
447
- return /* @__PURE__ */ React25.createElement(DialogPrimitive.Description, {
567
+ return /* @__PURE__ */ React26.createElement(DialogPrimitive.Description, {
448
568
  "data-slot": "dialog-description",
449
569
  className: cn("text-muted-foreground text-sm", className),
450
570
  ...props
@@ -459,7 +579,14 @@ function extractResultData(result) {
459
579
  const textContent = result.content.filter((c) => c.type === "text").map((c) => c.text).join("");
460
580
  if (textContent) {
461
581
  try {
462
- return JSON.parse(textContent);
582
+ const parsed = JSON.parse(textContent);
583
+ if (parsed && typeof parsed === "object" && "content" in parsed && Array.isArray(parsed.content)) {
584
+ const nested = extractResultData(parsed);
585
+ if (nested !== null) {
586
+ return nested;
587
+ }
588
+ }
589
+ return parsed;
463
590
  } catch {
464
591
  return textContent;
465
592
  }
@@ -659,26 +786,26 @@ function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, res
659
786
  return children(buttonState);
660
787
  }
661
788
  if (loading) {
662
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, loadingIcon ?? /* @__PURE__ */ React25.createElement(Loader2, {
789
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, loadingIcon ?? /* @__PURE__ */ React26.createElement(Loader2, {
663
790
  className: "animate-spin"
664
- }), loadingText && /* @__PURE__ */ React25.createElement("span", null, loadingText), !loadingText && children);
791
+ }), loadingText && /* @__PURE__ */ React26.createElement("span", null, loadingText), !loadingText && children);
665
792
  }
666
793
  if (showResult && resultDisplay === "inline") {
667
794
  if (error) {
668
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(X, {
795
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(X, {
669
796
  className: "text-destructive"
670
- }), /* @__PURE__ */ React25.createElement("span", null, error.message));
797
+ }), /* @__PURE__ */ React26.createElement("span", null, error.message));
671
798
  }
672
799
  if (renderResult) {
673
800
  return renderResult(result);
674
801
  }
675
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Check, {
802
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(Check, {
676
803
  className: "text-success"
677
- }), /* @__PURE__ */ React25.createElement("span", null, "Done"));
804
+ }), /* @__PURE__ */ React26.createElement("span", null, "Done"));
678
805
  }
679
806
  return children;
680
807
  }, "renderChildren");
681
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Button, {
808
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(Button, {
682
809
  type: "button",
683
810
  variant,
684
811
  size,
@@ -687,66 +814,66 @@ function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, res
687
814
  onClick: handleClick,
688
815
  asChild,
689
816
  ...props
690
- }, renderChildren()), confirm && /* @__PURE__ */ React25.createElement(Dialog, {
817
+ }, renderChildren()), confirm && /* @__PURE__ */ React26.createElement(Dialog, {
691
818
  open: showConfirm,
692
819
  onOpenChange: setShowConfirm
693
- }, /* @__PURE__ */ React25.createElement(DialogContent, null, /* @__PURE__ */ React25.createElement(DialogHeader, null, /* @__PURE__ */ React25.createElement(DialogTitle, null, confirmConfig.title), confirmConfig.description && /* @__PURE__ */ React25.createElement(DialogDescription, null, confirmConfig.description)), /* @__PURE__ */ React25.createElement(DialogFooter, null, /* @__PURE__ */ React25.createElement(Button, {
820
+ }, /* @__PURE__ */ React26.createElement(DialogContent, null, /* @__PURE__ */ React26.createElement(DialogHeader, null, /* @__PURE__ */ React26.createElement(DialogTitle, null, confirmConfig.title), confirmConfig.description && /* @__PURE__ */ React26.createElement(DialogDescription, null, confirmConfig.description)), /* @__PURE__ */ React26.createElement(DialogFooter, null, /* @__PURE__ */ React26.createElement(Button, {
694
821
  variant: "outline",
695
822
  onClick: /* @__PURE__ */ __name(() => setShowConfirm(false), "onClick")
696
- }, confirmConfig.cancelText ?? "Cancel"), /* @__PURE__ */ React25.createElement(Button, {
823
+ }, confirmConfig.cancelText ?? "Cancel"), /* @__PURE__ */ React26.createElement(Button, {
697
824
  variant: confirmConfig.confirmVariant ?? (variant === "destructive" ? "destructive" : "default"),
698
825
  onClick: handleConfirm
699
826
  }, confirmConfig.confirmText ?? "Confirm")))));
700
827
  }
701
828
  __name(ToolButton, "ToolButton");
702
829
  function Select({ ...props }) {
703
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Root, {
830
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Root, {
704
831
  "data-slot": "select",
705
832
  ...props
706
833
  });
707
834
  }
708
835
  __name(Select, "Select");
709
836
  function SelectGroup({ ...props }) {
710
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Group, {
837
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Group, {
711
838
  "data-slot": "select-group",
712
839
  ...props
713
840
  });
714
841
  }
715
842
  __name(SelectGroup, "SelectGroup");
716
843
  function SelectValue({ ...props }) {
717
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Value, {
844
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Value, {
718
845
  "data-slot": "select-value",
719
846
  ...props
720
847
  });
721
848
  }
722
849
  __name(SelectValue, "SelectValue");
723
850
  function SelectTrigger({ className, size = "default", children, ...props }) {
724
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Trigger, {
851
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Trigger, {
725
852
  "data-slot": "select-trigger",
726
853
  "data-size": size,
727
854
  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),
728
855
  ...props
729
- }, children, /* @__PURE__ */ React25.createElement(SelectPrimitive.Icon, {
856
+ }, children, /* @__PURE__ */ React26.createElement(SelectPrimitive.Icon, {
730
857
  asChild: true
731
- }, /* @__PURE__ */ React25.createElement(ChevronDownIcon, {
858
+ }, /* @__PURE__ */ React26.createElement(ChevronDownIcon, {
732
859
  className: "size-4 opacity-50"
733
860
  })));
734
861
  }
735
862
  __name(SelectTrigger, "SelectTrigger");
736
863
  function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
737
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Portal, null, /* @__PURE__ */ React25.createElement(SelectPrimitive.Content, {
864
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Portal, null, /* @__PURE__ */ React26.createElement(SelectPrimitive.Content, {
738
865
  "data-slot": "select-content",
739
866
  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),
740
867
  position,
741
868
  align,
742
869
  ...props
743
- }, /* @__PURE__ */ React25.createElement(SelectScrollUpButton, null), /* @__PURE__ */ React25.createElement(SelectPrimitive.Viewport, {
870
+ }, /* @__PURE__ */ React26.createElement(SelectScrollUpButton, null), /* @__PURE__ */ React26.createElement(SelectPrimitive.Viewport, {
744
871
  className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")
745
- }, children), /* @__PURE__ */ React25.createElement(SelectScrollDownButton, null)));
872
+ }, children), /* @__PURE__ */ React26.createElement(SelectScrollDownButton, null)));
746
873
  }
747
874
  __name(SelectContent, "SelectContent");
748
875
  function SelectLabel({ className, ...props }) {
749
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Label, {
876
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Label, {
750
877
  "data-slot": "select-label",
751
878
  className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
752
879
  ...props
@@ -754,20 +881,20 @@ function SelectLabel({ className, ...props }) {
754
881
  }
755
882
  __name(SelectLabel, "SelectLabel");
756
883
  function SelectItem({ className, children, ...props }) {
757
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Item, {
884
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Item, {
758
885
  "data-slot": "select-item",
759
886
  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),
760
887
  ...props
761
- }, /* @__PURE__ */ React25.createElement("span", {
888
+ }, /* @__PURE__ */ React26.createElement("span", {
762
889
  "data-slot": "select-item-indicator",
763
890
  className: "absolute right-2 flex size-3.5 items-center justify-center"
764
- }, /* @__PURE__ */ React25.createElement(SelectPrimitive.ItemIndicator, null, /* @__PURE__ */ React25.createElement(CheckIcon, {
891
+ }, /* @__PURE__ */ React26.createElement(SelectPrimitive.ItemIndicator, null, /* @__PURE__ */ React26.createElement(CheckIcon, {
765
892
  className: "size-4"
766
- }))), /* @__PURE__ */ React25.createElement(SelectPrimitive.ItemText, null, children));
893
+ }))), /* @__PURE__ */ React26.createElement(SelectPrimitive.ItemText, null, children));
767
894
  }
768
895
  __name(SelectItem, "SelectItem");
769
896
  function SelectSeparator({ className, ...props }) {
770
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Separator, {
897
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Separator, {
771
898
  "data-slot": "select-separator",
772
899
  className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
773
900
  ...props
@@ -775,21 +902,21 @@ function SelectSeparator({ className, ...props }) {
775
902
  }
776
903
  __name(SelectSeparator, "SelectSeparator");
777
904
  function SelectScrollUpButton({ className, ...props }) {
778
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.ScrollUpButton, {
905
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.ScrollUpButton, {
779
906
  "data-slot": "select-scroll-up-button",
780
907
  className: cn("flex cursor-default items-center justify-center py-1", className),
781
908
  ...props
782
- }, /* @__PURE__ */ React25.createElement(ChevronUpIcon, {
909
+ }, /* @__PURE__ */ React26.createElement(ChevronUpIcon, {
783
910
  className: "size-4"
784
911
  }));
785
912
  }
786
913
  __name(SelectScrollUpButton, "SelectScrollUpButton");
787
914
  function SelectScrollDownButton({ className, ...props }) {
788
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.ScrollDownButton, {
915
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.ScrollDownButton, {
789
916
  "data-slot": "select-scroll-down-button",
790
917
  className: cn("flex cursor-default items-center justify-center py-1", className),
791
918
  ...props
792
- }, /* @__PURE__ */ React25.createElement(ChevronDownIcon, {
919
+ }, /* @__PURE__ */ React26.createElement(ChevronDownIcon, {
793
920
  className: "size-4"
794
921
  }));
795
922
  }
@@ -854,35 +981,35 @@ function ToolSelect({ onSelectTool, argName = "value", additionalArgs = {}, opti
854
981
  ]);
855
982
  const isLoading = optionsHook.loading || selectHook.loading;
856
983
  const hasError = optionsHook.error || selectHook.error;
857
- return /* @__PURE__ */ React25.createElement(Select, {
984
+ return /* @__PURE__ */ React26.createElement(Select, {
858
985
  value,
859
986
  onValueChange: handleValueChange,
860
987
  disabled: disabled || isLoading
861
- }, /* @__PURE__ */ React25.createElement(SelectTrigger, {
988
+ }, /* @__PURE__ */ React26.createElement(SelectTrigger, {
862
989
  className: cn("w-full", className)
863
- }, isLoading ? /* @__PURE__ */ React25.createElement("div", {
990
+ }, isLoading ? /* @__PURE__ */ React26.createElement("div", {
864
991
  className: "flex items-center gap-2"
865
- }, /* @__PURE__ */ React25.createElement(Loader2, {
992
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
866
993
  className: "h-4 w-4 animate-spin"
867
- }), /* @__PURE__ */ React25.createElement("span", {
994
+ }), /* @__PURE__ */ React26.createElement("span", {
868
995
  className: "text-muted-foreground"
869
- }, optionsHook.loading ? loadingPlaceholder : "Saving...")) : /* @__PURE__ */ React25.createElement(SelectValue, {
996
+ }, optionsHook.loading ? loadingPlaceholder : "Saving...")) : /* @__PURE__ */ React26.createElement(SelectValue, {
870
997
  placeholder
871
- })), /* @__PURE__ */ React25.createElement(SelectContent, null, allOptions.length === 0 ? /* @__PURE__ */ React25.createElement("div", {
998
+ })), /* @__PURE__ */ React26.createElement(SelectContent, null, allOptions.length === 0 ? /* @__PURE__ */ React26.createElement("div", {
872
999
  className: "py-6 text-center text-sm text-muted-foreground"
873
- }, hasError ? "Error loading options" : emptyMessage) : allOptions.map((option) => /* @__PURE__ */ React25.createElement(SelectItem, {
1000
+ }, hasError ? "Error loading options" : emptyMessage) : allOptions.map((option) => /* @__PURE__ */ React26.createElement(SelectItem, {
874
1001
  key: option.value,
875
1002
  value: option.value,
876
1003
  disabled: option.disabled
877
- }, /* @__PURE__ */ React25.createElement("div", {
1004
+ }, /* @__PURE__ */ React26.createElement("div", {
878
1005
  className: "flex items-center gap-2"
879
- }, option.icon, /* @__PURE__ */ React25.createElement("div", null, /* @__PURE__ */ React25.createElement("div", null, option.label), option.description && /* @__PURE__ */ React25.createElement("div", {
1006
+ }, option.icon, /* @__PURE__ */ React26.createElement("div", null, /* @__PURE__ */ React26.createElement("div", null, option.label), option.description && /* @__PURE__ */ React26.createElement("div", {
880
1007
  className: "text-xs text-muted-foreground"
881
1008
  }, option.description)))))));
882
1009
  }
883
1010
  __name(ToolSelect, "ToolSelect");
884
1011
  function Input({ className, type, ...props }) {
885
- return /* @__PURE__ */ React25.createElement("input", {
1012
+ return /* @__PURE__ */ React26.createElement("input", {
886
1013
  type,
887
1014
  "data-slot": "input",
888
1015
  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),
@@ -891,7 +1018,7 @@ function Input({ className, type, ...props }) {
891
1018
  }
892
1019
  __name(Input, "Input");
893
1020
  function Command({ className, ...props }) {
894
- return /* @__PURE__ */ React25.createElement(Command$1, {
1021
+ return /* @__PURE__ */ React26.createElement(Command$1, {
895
1022
  "data-slot": "command",
896
1023
  className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
897
1024
  ...props
@@ -899,23 +1026,23 @@ function Command({ className, ...props }) {
899
1026
  }
900
1027
  __name(Command, "Command");
901
1028
  function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
902
- return /* @__PURE__ */ React25.createElement(Dialog, props, /* @__PURE__ */ React25.createElement(DialogHeader, {
1029
+ return /* @__PURE__ */ React26.createElement(Dialog, props, /* @__PURE__ */ React26.createElement(DialogHeader, {
903
1030
  className: "sr-only"
904
- }, /* @__PURE__ */ React25.createElement(DialogTitle, null, title), /* @__PURE__ */ React25.createElement(DialogDescription, null, description)), /* @__PURE__ */ React25.createElement(DialogContent, {
1031
+ }, /* @__PURE__ */ React26.createElement(DialogTitle, null, title), /* @__PURE__ */ React26.createElement(DialogDescription, null, description)), /* @__PURE__ */ React26.createElement(DialogContent, {
905
1032
  className: cn("overflow-hidden p-0", className),
906
1033
  showCloseButton
907
- }, /* @__PURE__ */ React25.createElement(Command, {
1034
+ }, /* @__PURE__ */ React26.createElement(Command, {
908
1035
  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"
909
1036
  }, children)));
910
1037
  }
911
1038
  __name(CommandDialog, "CommandDialog");
912
1039
  function CommandInput({ className, ...props }) {
913
- return /* @__PURE__ */ React25.createElement("div", {
1040
+ return /* @__PURE__ */ React26.createElement("div", {
914
1041
  "data-slot": "command-input-wrapper",
915
1042
  className: "flex h-9 items-center gap-2 border-b px-3"
916
- }, /* @__PURE__ */ React25.createElement(SearchIcon, {
1043
+ }, /* @__PURE__ */ React26.createElement(SearchIcon, {
917
1044
  className: "size-4 shrink-0 opacity-50"
918
- }), /* @__PURE__ */ React25.createElement(Command$1.Input, {
1045
+ }), /* @__PURE__ */ React26.createElement(Command$1.Input, {
919
1046
  "data-slot": "command-input",
920
1047
  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),
921
1048
  ...props
@@ -923,7 +1050,7 @@ function CommandInput({ className, ...props }) {
923
1050
  }
924
1051
  __name(CommandInput, "CommandInput");
925
1052
  function CommandList({ className, ...props }) {
926
- return /* @__PURE__ */ React25.createElement(Command$1.List, {
1053
+ return /* @__PURE__ */ React26.createElement(Command$1.List, {
927
1054
  "data-slot": "command-list",
928
1055
  className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
929
1056
  ...props
@@ -931,7 +1058,7 @@ function CommandList({ className, ...props }) {
931
1058
  }
932
1059
  __name(CommandList, "CommandList");
933
1060
  function CommandEmpty({ ...props }) {
934
- return /* @__PURE__ */ React25.createElement(Command$1.Empty, {
1061
+ return /* @__PURE__ */ React26.createElement(Command$1.Empty, {
935
1062
  "data-slot": "command-empty",
936
1063
  className: "py-6 text-center text-sm",
937
1064
  ...props
@@ -939,7 +1066,7 @@ function CommandEmpty({ ...props }) {
939
1066
  }
940
1067
  __name(CommandEmpty, "CommandEmpty");
941
1068
  function CommandGroup({ className, ...props }) {
942
- return /* @__PURE__ */ React25.createElement(Command$1.Group, {
1069
+ return /* @__PURE__ */ React26.createElement(Command$1.Group, {
943
1070
  "data-slot": "command-group",
944
1071
  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),
945
1072
  ...props
@@ -947,7 +1074,7 @@ function CommandGroup({ className, ...props }) {
947
1074
  }
948
1075
  __name(CommandGroup, "CommandGroup");
949
1076
  function CommandSeparator({ className, ...props }) {
950
- return /* @__PURE__ */ React25.createElement(Command$1.Separator, {
1077
+ return /* @__PURE__ */ React26.createElement(Command$1.Separator, {
951
1078
  "data-slot": "command-separator",
952
1079
  className: cn("bg-border -mx-1 h-px", className),
953
1080
  ...props
@@ -955,7 +1082,7 @@ function CommandSeparator({ className, ...props }) {
955
1082
  }
956
1083
  __name(CommandSeparator, "CommandSeparator");
957
1084
  function CommandItem({ className, ...props }) {
958
- return /* @__PURE__ */ React25.createElement(Command$1.Item, {
1085
+ return /* @__PURE__ */ React26.createElement(Command$1.Item, {
959
1086
  "data-slot": "command-item",
960
1087
  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),
961
1088
  ...props
@@ -963,7 +1090,7 @@ function CommandItem({ className, ...props }) {
963
1090
  }
964
1091
  __name(CommandItem, "CommandItem");
965
1092
  function CommandShortcut({ className, ...props }) {
966
- return /* @__PURE__ */ React25.createElement("span", {
1093
+ return /* @__PURE__ */ React26.createElement("span", {
967
1094
  "data-slot": "command-shortcut",
968
1095
  className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
969
1096
  ...props
@@ -971,21 +1098,21 @@ function CommandShortcut({ className, ...props }) {
971
1098
  }
972
1099
  __name(CommandShortcut, "CommandShortcut");
973
1100
  function Popover({ ...props }) {
974
- return /* @__PURE__ */ React25.createElement(PopoverPrimitive.Root, {
1101
+ return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Root, {
975
1102
  "data-slot": "popover",
976
1103
  ...props
977
1104
  });
978
1105
  }
979
1106
  __name(Popover, "Popover");
980
1107
  function PopoverTrigger({ ...props }) {
981
- return /* @__PURE__ */ React25.createElement(PopoverPrimitive.Trigger, {
1108
+ return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Trigger, {
982
1109
  "data-slot": "popover-trigger",
983
1110
  ...props
984
1111
  });
985
1112
  }
986
1113
  __name(PopoverTrigger, "PopoverTrigger");
987
1114
  function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
988
- return /* @__PURE__ */ React25.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React25.createElement(PopoverPrimitive.Content, {
1115
+ return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React26.createElement(PopoverPrimitive.Content, {
989
1116
  "data-slot": "popover-content",
990
1117
  align,
991
1118
  sideOffset,
@@ -995,7 +1122,7 @@ function PopoverContent({ className, align = "center", sideOffset = 4, ...props
995
1122
  }
996
1123
  __name(PopoverContent, "PopoverContent");
997
1124
  function PopoverAnchor({ ...props }) {
998
- return /* @__PURE__ */ React25.createElement(PopoverPrimitive.Anchor, {
1125
+ return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Anchor, {
999
1126
  "data-slot": "popover-anchor",
1000
1127
  ...props
1001
1128
  });
@@ -1084,11 +1211,11 @@ function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query"
1084
1211
  }
1085
1212
  };
1086
1213
  }, []);
1087
- const inputElement = /* @__PURE__ */ React25.createElement("div", {
1214
+ const inputElement = /* @__PURE__ */ React26.createElement("div", {
1088
1215
  className: cn("relative", className)
1089
- }, showSearchIcon && /* @__PURE__ */ React25.createElement(Search, {
1216
+ }, showSearchIcon && /* @__PURE__ */ React26.createElement(Search, {
1090
1217
  className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"
1091
- }), /* @__PURE__ */ React25.createElement(Input, {
1218
+ }), /* @__PURE__ */ React26.createElement(Input, {
1092
1219
  ref: inputRef,
1093
1220
  value,
1094
1221
  onChange: handleChange,
@@ -1096,42 +1223,42 @@ function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query"
1096
1223
  disabled,
1097
1224
  className: cn(showSearchIcon && "pl-9", (showClearButton || showLoadingIndicator) && "pr-9"),
1098
1225
  ...props
1099
- }), /* @__PURE__ */ React25.createElement("div", {
1226
+ }), /* @__PURE__ */ React26.createElement("div", {
1100
1227
  className: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1"
1101
- }, showLoadingIndicator && loading && /* @__PURE__ */ React25.createElement(Loader2, {
1228
+ }, showLoadingIndicator && loading && /* @__PURE__ */ React26.createElement(Loader2, {
1102
1229
  className: "h-4 w-4 animate-spin text-muted-foreground"
1103
- }), showClearButton && value && !loading && /* @__PURE__ */ React25.createElement("button", {
1230
+ }), showClearButton && value && !loading && /* @__PURE__ */ React26.createElement("button", {
1104
1231
  type: "button",
1105
1232
  onClick: handleClear,
1106
1233
  className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors"
1107
- }, /* @__PURE__ */ React25.createElement(X, {
1234
+ }, /* @__PURE__ */ React26.createElement(X, {
1108
1235
  className: "h-4 w-4"
1109
1236
  }))));
1110
1237
  if (!autocomplete) {
1111
1238
  return inputElement;
1112
1239
  }
1113
- return /* @__PURE__ */ React25.createElement(Popover, {
1240
+ return /* @__PURE__ */ React26.createElement(Popover, {
1114
1241
  open: isOpen,
1115
1242
  onOpenChange: setIsOpen
1116
- }, /* @__PURE__ */ React25.createElement(PopoverTrigger, {
1243
+ }, /* @__PURE__ */ React26.createElement(PopoverTrigger, {
1117
1244
  asChild: true
1118
- }, inputElement), /* @__PURE__ */ React25.createElement(PopoverContent, {
1245
+ }, inputElement), /* @__PURE__ */ React26.createElement(PopoverContent, {
1119
1246
  className: "p-0 w-[var(--radix-popover-trigger-width)]",
1120
1247
  align: "start",
1121
1248
  onOpenAutoFocus: /* @__PURE__ */ __name((e) => e.preventDefault(), "onOpenAutoFocus")
1122
- }, /* @__PURE__ */ React25.createElement(Command, null, /* @__PURE__ */ React25.createElement(CommandList, null, /* @__PURE__ */ React25.createElement(CommandEmpty, null, emptyMessage), /* @__PURE__ */ React25.createElement(CommandGroup, null, suggestions.map((suggestion) => /* @__PURE__ */ React25.createElement(CommandItem, {
1249
+ }, /* @__PURE__ */ React26.createElement(Command, null, /* @__PURE__ */ React26.createElement(CommandList, null, /* @__PURE__ */ React26.createElement(CommandEmpty, null, emptyMessage), /* @__PURE__ */ React26.createElement(CommandGroup, null, suggestions.map((suggestion) => /* @__PURE__ */ React26.createElement(CommandItem, {
1123
1250
  key: suggestion.value,
1124
1251
  value: suggestion.value,
1125
1252
  onSelect: /* @__PURE__ */ __name(() => handleSelect(suggestion), "onSelect")
1126
- }, /* @__PURE__ */ React25.createElement("div", {
1253
+ }, /* @__PURE__ */ React26.createElement("div", {
1127
1254
  className: "flex items-center gap-2"
1128
- }, suggestion.icon, /* @__PURE__ */ React25.createElement("div", null, /* @__PURE__ */ React25.createElement("div", null, suggestion.label), suggestion.description && /* @__PURE__ */ React25.createElement("div", {
1255
+ }, suggestion.icon, /* @__PURE__ */ React26.createElement("div", null, /* @__PURE__ */ React26.createElement("div", null, suggestion.label), suggestion.description && /* @__PURE__ */ React26.createElement("div", {
1129
1256
  className: "text-xs text-muted-foreground"
1130
1257
  }, suggestion.description))))))))));
1131
1258
  }
1132
1259
  __name(ToolInput, "ToolInput");
1133
1260
  function Label2({ className, ...props }) {
1134
- return /* @__PURE__ */ React25.createElement(LabelPrimitive.Root, {
1261
+ return /* @__PURE__ */ React26.createElement(LabelPrimitive.Root, {
1135
1262
  "data-slot": "label",
1136
1263
  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),
1137
1264
  ...props
@@ -1139,7 +1266,7 @@ function Label2({ className, ...props }) {
1139
1266
  }
1140
1267
  __name(Label2, "Label");
1141
1268
  function Textarea({ className, ...props }) {
1142
- return /* @__PURE__ */ React25.createElement("textarea", {
1269
+ return /* @__PURE__ */ React26.createElement("textarea", {
1143
1270
  "data-slot": "textarea",
1144
1271
  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),
1145
1272
  ...props
@@ -1147,20 +1274,20 @@ function Textarea({ className, ...props }) {
1147
1274
  }
1148
1275
  __name(Textarea, "Textarea");
1149
1276
  function Checkbox({ className, ...props }) {
1150
- return /* @__PURE__ */ React25.createElement(CheckboxPrimitive.Root, {
1277
+ return /* @__PURE__ */ React26.createElement(CheckboxPrimitive.Root, {
1151
1278
  "data-slot": "checkbox",
1152
1279
  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),
1153
1280
  ...props
1154
- }, /* @__PURE__ */ React25.createElement(CheckboxPrimitive.Indicator, {
1281
+ }, /* @__PURE__ */ React26.createElement(CheckboxPrimitive.Indicator, {
1155
1282
  "data-slot": "checkbox-indicator",
1156
1283
  className: "grid place-content-center text-current transition-none"
1157
- }, /* @__PURE__ */ React25.createElement(CheckIcon, {
1284
+ }, /* @__PURE__ */ React26.createElement(CheckIcon, {
1158
1285
  className: "size-3.5"
1159
1286
  })));
1160
1287
  }
1161
1288
  __name(Checkbox, "Checkbox");
1162
1289
  function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
1163
- const _values = React25.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [
1290
+ const _values = React26.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [
1164
1291
  min,
1165
1292
  max
1166
1293
  ], [
@@ -1169,7 +1296,7 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
1169
1296
  min,
1170
1297
  max
1171
1298
  ]);
1172
- return /* @__PURE__ */ React25.createElement(SliderPrimitive.Root, {
1299
+ return /* @__PURE__ */ React26.createElement(SliderPrimitive.Root, {
1173
1300
  "data-slot": "slider",
1174
1301
  defaultValue,
1175
1302
  value,
@@ -1177,15 +1304,15 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
1177
1304
  max,
1178
1305
  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),
1179
1306
  ...props
1180
- }, /* @__PURE__ */ React25.createElement(SliderPrimitive.Track, {
1307
+ }, /* @__PURE__ */ React26.createElement(SliderPrimitive.Track, {
1181
1308
  "data-slot": "slider-track",
1182
1309
  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")
1183
- }, /* @__PURE__ */ React25.createElement(SliderPrimitive.Range, {
1310
+ }, /* @__PURE__ */ React26.createElement(SliderPrimitive.Range, {
1184
1311
  "data-slot": "slider-range",
1185
1312
  className: cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
1186
1313
  })), Array.from({
1187
1314
  length: _values.length
1188
- }, (_, index) => /* @__PURE__ */ React25.createElement(SliderPrimitive.Thumb, {
1315
+ }, (_, index) => /* @__PURE__ */ React26.createElement(SliderPrimitive.Thumb, {
1189
1316
  "data-slot": "slider-thumb",
1190
1317
  key: index,
1191
1318
  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"
@@ -1193,11 +1320,11 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
1193
1320
  }
1194
1321
  __name(Slider, "Slider");
1195
1322
  function Switch({ className, ...props }) {
1196
- return /* @__PURE__ */ React25.createElement(SwitchPrimitive.Root, {
1323
+ return /* @__PURE__ */ React26.createElement(SwitchPrimitive.Root, {
1197
1324
  "data-slot": "switch",
1198
1325
  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),
1199
1326
  ...props
1200
- }, /* @__PURE__ */ React25.createElement(SwitchPrimitive.Thumb, {
1327
+ }, /* @__PURE__ */ React26.createElement(SwitchPrimitive.Thumb, {
1201
1328
  "data-slot": "switch-thumb",
1202
1329
  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")
1203
1330
  }));
@@ -1215,7 +1342,7 @@ var alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm gri
1215
1342
  }
1216
1343
  });
1217
1344
  function Alert({ className, variant, ...props }) {
1218
- return /* @__PURE__ */ React25.createElement("div", {
1345
+ return /* @__PURE__ */ React26.createElement("div", {
1219
1346
  "data-slot": "alert",
1220
1347
  role: "alert",
1221
1348
  className: cn(alertVariants({
@@ -1226,7 +1353,7 @@ function Alert({ className, variant, ...props }) {
1226
1353
  }
1227
1354
  __name(Alert, "Alert");
1228
1355
  function AlertTitle({ className, ...props }) {
1229
- return /* @__PURE__ */ React25.createElement("div", {
1356
+ return /* @__PURE__ */ React26.createElement("div", {
1230
1357
  "data-slot": "alert-title",
1231
1358
  className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
1232
1359
  ...props
@@ -1234,7 +1361,7 @@ function AlertTitle({ className, ...props }) {
1234
1361
  }
1235
1362
  __name(AlertTitle, "AlertTitle");
1236
1363
  function AlertDescription({ className, ...props }) {
1237
- return /* @__PURE__ */ React25.createElement("div", {
1364
+ return /* @__PURE__ */ React26.createElement("div", {
1238
1365
  "data-slot": "alert-description",
1239
1366
  className: cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className),
1240
1367
  ...props
@@ -1328,7 +1455,7 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1328
1455
  const value = formData[field.name];
1329
1456
  switch (field.type) {
1330
1457
  case "textarea":
1331
- return /* @__PURE__ */ React25.createElement(Textarea, {
1458
+ return /* @__PURE__ */ React26.createElement(Textarea, {
1332
1459
  id: field.name,
1333
1460
  placeholder: field.placeholder,
1334
1461
  value: value ?? "",
@@ -1337,45 +1464,45 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1337
1464
  required: field.required
1338
1465
  });
1339
1466
  case "select":
1340
- return /* @__PURE__ */ React25.createElement(Select, {
1467
+ return /* @__PURE__ */ React26.createElement(Select, {
1341
1468
  value: value ?? "",
1342
1469
  onValueChange: /* @__PURE__ */ __name((v) => handleChange(field.name, v), "onValueChange"),
1343
1470
  disabled: field.disabled || loading
1344
- }, /* @__PURE__ */ React25.createElement(SelectTrigger, null, /* @__PURE__ */ React25.createElement(SelectValue, {
1471
+ }, /* @__PURE__ */ React26.createElement(SelectTrigger, null, /* @__PURE__ */ React26.createElement(SelectValue, {
1345
1472
  placeholder: field.placeholder ?? "Select..."
1346
- })), /* @__PURE__ */ React25.createElement(SelectContent, null, field.options?.map((option) => /* @__PURE__ */ React25.createElement(SelectItem, {
1473
+ })), /* @__PURE__ */ React26.createElement(SelectContent, null, field.options?.map((option) => /* @__PURE__ */ React26.createElement(SelectItem, {
1347
1474
  key: option.value,
1348
1475
  value: option.value
1349
1476
  }, option.label))));
1350
1477
  case "checkbox":
1351
- return /* @__PURE__ */ React25.createElement("div", {
1478
+ return /* @__PURE__ */ React26.createElement("div", {
1352
1479
  className: "flex items-center space-x-2"
1353
- }, /* @__PURE__ */ React25.createElement(Checkbox, {
1480
+ }, /* @__PURE__ */ React26.createElement(Checkbox, {
1354
1481
  id: field.name,
1355
1482
  checked: value ?? false,
1356
1483
  onCheckedChange: /* @__PURE__ */ __name((checked) => handleChange(field.name, checked), "onCheckedChange"),
1357
1484
  disabled: field.disabled || loading
1358
- }), /* @__PURE__ */ React25.createElement("label", {
1485
+ }), /* @__PURE__ */ React26.createElement("label", {
1359
1486
  htmlFor: field.name,
1360
1487
  className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1361
1488
  }, field.label));
1362
1489
  case "switch":
1363
- return /* @__PURE__ */ React25.createElement("div", {
1490
+ return /* @__PURE__ */ React26.createElement("div", {
1364
1491
  className: "flex items-center space-x-2"
1365
- }, /* @__PURE__ */ React25.createElement(Switch, {
1492
+ }, /* @__PURE__ */ React26.createElement(Switch, {
1366
1493
  id: field.name,
1367
1494
  checked: value ?? false,
1368
1495
  onCheckedChange: /* @__PURE__ */ __name((checked) => handleChange(field.name, checked), "onCheckedChange"),
1369
1496
  disabled: field.disabled || loading
1370
- }), /* @__PURE__ */ React25.createElement(Label2, {
1497
+ }), /* @__PURE__ */ React26.createElement(Label2, {
1371
1498
  htmlFor: field.name
1372
1499
  }, field.label));
1373
1500
  case "slider":
1374
- return /* @__PURE__ */ React25.createElement("div", {
1501
+ return /* @__PURE__ */ React26.createElement("div", {
1375
1502
  className: "space-y-2"
1376
- }, /* @__PURE__ */ React25.createElement("div", {
1503
+ }, /* @__PURE__ */ React26.createElement("div", {
1377
1504
  className: "flex justify-between text-sm"
1378
- }, /* @__PURE__ */ React25.createElement("span", null, field.min ?? 0), /* @__PURE__ */ React25.createElement("span", null, value ?? field.min ?? 0), /* @__PURE__ */ React25.createElement("span", null, field.max ?? 100)), /* @__PURE__ */ React25.createElement(Slider, {
1505
+ }, /* @__PURE__ */ React26.createElement("span", null, field.min ?? 0), /* @__PURE__ */ React26.createElement("span", null, value ?? field.min ?? 0), /* @__PURE__ */ React26.createElement("span", null, field.max ?? 100)), /* @__PURE__ */ React26.createElement(Slider, {
1379
1506
  value: [
1380
1507
  value ?? field.min ?? 0
1381
1508
  ],
@@ -1386,7 +1513,7 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1386
1513
  disabled: field.disabled || loading
1387
1514
  }));
1388
1515
  case "number":
1389
- return /* @__PURE__ */ React25.createElement(Input, {
1516
+ return /* @__PURE__ */ React26.createElement(Input, {
1390
1517
  id: field.name,
1391
1518
  type: "number",
1392
1519
  placeholder: field.placeholder,
@@ -1399,7 +1526,7 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1399
1526
  required: field.required
1400
1527
  });
1401
1528
  default:
1402
- return /* @__PURE__ */ React25.createElement(Input, {
1529
+ return /* @__PURE__ */ React26.createElement(Input, {
1403
1530
  id: field.name,
1404
1531
  type: field.type ?? "text",
1405
1532
  placeholder: field.placeholder,
@@ -1411,38 +1538,38 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1411
1538
  }
1412
1539
  }, "renderField");
1413
1540
  if (schemaLoading) {
1414
- return /* @__PURE__ */ React25.createElement("div", {
1541
+ return /* @__PURE__ */ React26.createElement("div", {
1415
1542
  className: "flex items-center justify-center p-8"
1416
- }, /* @__PURE__ */ React25.createElement(Loader2, {
1543
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
1417
1544
  className: "h-6 w-6 animate-spin text-muted-foreground"
1418
1545
  }));
1419
1546
  }
1420
- return /* @__PURE__ */ React25.createElement("form", {
1547
+ return /* @__PURE__ */ React26.createElement("form", {
1421
1548
  className: cn("space-y-4", className),
1422
1549
  onSubmit: handleSubmit
1423
- }, /* @__PURE__ */ React25.createElement("div", {
1550
+ }, /* @__PURE__ */ React26.createElement("div", {
1424
1551
  className: cn("space-y-4", layout === "horizontal" && "grid grid-cols-2 gap-4")
1425
- }, fields.map((field) => /* @__PURE__ */ React25.createElement("div", {
1552
+ }, fields.map((field) => /* @__PURE__ */ React26.createElement("div", {
1426
1553
  key: field.name,
1427
1554
  className: "space-y-2"
1428
- }, field.type !== "checkbox" && field.type !== "switch" && /* @__PURE__ */ React25.createElement(Label2, {
1555
+ }, field.type !== "checkbox" && field.type !== "switch" && /* @__PURE__ */ React26.createElement(Label2, {
1429
1556
  htmlFor: field.name
1430
- }, field.label, field.required && /* @__PURE__ */ React25.createElement("span", {
1557
+ }, field.label, field.required && /* @__PURE__ */ React26.createElement("span", {
1431
1558
  className: "text-destructive ml-1"
1432
- }, "*")), renderField(field), field.description && /* @__PURE__ */ React25.createElement("p", {
1559
+ }, "*")), renderField(field), field.description && /* @__PURE__ */ React26.createElement("p", {
1433
1560
  className: "text-sm text-muted-foreground"
1434
- }, field.description)))), /* @__PURE__ */ React25.createElement("div", {
1561
+ }, field.description)))), /* @__PURE__ */ React26.createElement("div", {
1435
1562
  className: "flex items-center gap-2"
1436
- }, /* @__PURE__ */ React25.createElement(Button, {
1563
+ }, /* @__PURE__ */ React26.createElement(Button, {
1437
1564
  type: "submit",
1438
1565
  disabled: loading
1439
- }, loading ? /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Loader2, {
1566
+ }, loading ? /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(Loader2, {
1440
1567
  className: "h-4 w-4 animate-spin mr-2"
1441
- }), loadingText ?? "Submitting...") : submitText)), error && /* @__PURE__ */ React25.createElement(Alert, {
1568
+ }), loadingText ?? "Submitting...") : submitText)), error && /* @__PURE__ */ React26.createElement(Alert, {
1442
1569
  variant: "destructive"
1443
- }, /* @__PURE__ */ React25.createElement(AlertDescription, null, error.message)), showResult && result !== null && /* @__PURE__ */ React25.createElement("div", {
1570
+ }, /* @__PURE__ */ React26.createElement(AlertDescription, null, error.message)), showResult && result !== null && /* @__PURE__ */ React26.createElement("div", {
1444
1571
  className: "rounded-md bg-muted p-4"
1445
- }, /* @__PURE__ */ React25.createElement("pre", {
1572
+ }, /* @__PURE__ */ React26.createElement("pre", {
1446
1573
  className: "text-sm overflow-auto"
1447
1574
  }, JSON.stringify(result, null, 2))));
1448
1575
  }
@@ -1565,7 +1692,7 @@ function useResource(uri, options = {}) {
1565
1692
  }
1566
1693
  __name(useResource, "useResource");
1567
1694
  function Skeleton({ className, ...props }) {
1568
- return /* @__PURE__ */ React25__default.createElement("div", {
1695
+ return /* @__PURE__ */ React26__default.createElement("div", {
1569
1696
  "data-slot": "skeleton",
1570
1697
  className: cn("bg-accent animate-pulse rounded-md", className),
1571
1698
  ...props
@@ -1575,30 +1702,30 @@ __name(Skeleton, "Skeleton");
1575
1702
 
1576
1703
  // src/mcp/ResourceView.tsx
1577
1704
  function DefaultLoading() {
1578
- return /* @__PURE__ */ React25.createElement("div", {
1705
+ return /* @__PURE__ */ React26.createElement("div", {
1579
1706
  className: "flex flex-col gap-3 p-4"
1580
- }, /* @__PURE__ */ React25.createElement(Skeleton, {
1707
+ }, /* @__PURE__ */ React26.createElement(Skeleton, {
1581
1708
  className: "h-4 w-3/4"
1582
- }), /* @__PURE__ */ React25.createElement(Skeleton, {
1709
+ }), /* @__PURE__ */ React26.createElement(Skeleton, {
1583
1710
  className: "h-4 w-1/2"
1584
- }), /* @__PURE__ */ React25.createElement(Skeleton, {
1711
+ }), /* @__PURE__ */ React26.createElement(Skeleton, {
1585
1712
  className: "h-20 w-full"
1586
1713
  }));
1587
1714
  }
1588
1715
  __name(DefaultLoading, "DefaultLoading");
1589
1716
  function DefaultError({ error, onRetry }) {
1590
- return /* @__PURE__ */ React25.createElement(Alert, {
1717
+ return /* @__PURE__ */ React26.createElement(Alert, {
1591
1718
  variant: "destructive"
1592
- }, /* @__PURE__ */ React25.createElement(AlertCircle, {
1719
+ }, /* @__PURE__ */ React26.createElement(AlertCircle, {
1593
1720
  className: "h-4 w-4"
1594
- }), /* @__PURE__ */ React25.createElement(AlertTitle, null, "Error loading resource"), /* @__PURE__ */ React25.createElement(AlertDescription, {
1721
+ }), /* @__PURE__ */ React26.createElement(AlertTitle, null, "Error loading resource"), /* @__PURE__ */ React26.createElement(AlertDescription, {
1595
1722
  className: "flex flex-col gap-2"
1596
- }, /* @__PURE__ */ React25.createElement("span", null, error.message), /* @__PURE__ */ React25.createElement(Button, {
1723
+ }, /* @__PURE__ */ React26.createElement("span", null, error.message), /* @__PURE__ */ React26.createElement(Button, {
1597
1724
  variant: "outline",
1598
1725
  size: "sm",
1599
1726
  onClick: onRetry,
1600
1727
  className: "w-fit"
1601
- }, /* @__PURE__ */ React25.createElement(RefreshCw, {
1728
+ }, /* @__PURE__ */ React26.createElement(RefreshCw, {
1602
1729
  className: "h-4 w-4 mr-2"
1603
1730
  }), "Retry")));
1604
1731
  }
@@ -1618,42 +1745,42 @@ function ResourceView({ uri, refreshInterval, subscribe, transform, loading: loa
1618
1745
  };
1619
1746
  if (loading && data === null) {
1620
1747
  if (loadingContent) {
1621
- return /* @__PURE__ */ React25.createElement("div", {
1748
+ return /* @__PURE__ */ React26.createElement("div", {
1622
1749
  className
1623
1750
  }, loadingContent);
1624
1751
  }
1625
- return /* @__PURE__ */ React25.createElement("div", {
1752
+ return /* @__PURE__ */ React26.createElement("div", {
1626
1753
  className: cn("flex items-center justify-center p-8", className)
1627
- }, /* @__PURE__ */ React25.createElement(Loader2, {
1754
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
1628
1755
  className: "h-8 w-8 animate-spin text-muted-foreground"
1629
1756
  }));
1630
1757
  }
1631
1758
  if (error && data === null) {
1632
1759
  if (errorContent) {
1633
1760
  if (typeof errorContent === "function") {
1634
- return /* @__PURE__ */ React25.createElement("div", {
1761
+ return /* @__PURE__ */ React26.createElement("div", {
1635
1762
  className
1636
1763
  }, errorContent(error, refresh));
1637
1764
  }
1638
- return /* @__PURE__ */ React25.createElement("div", {
1765
+ return /* @__PURE__ */ React26.createElement("div", {
1639
1766
  className
1640
1767
  }, errorContent);
1641
1768
  }
1642
- return /* @__PURE__ */ React25.createElement("div", {
1769
+ return /* @__PURE__ */ React26.createElement("div", {
1643
1770
  className
1644
- }, /* @__PURE__ */ React25.createElement(DefaultError, {
1771
+ }, /* @__PURE__ */ React26.createElement(DefaultError, {
1645
1772
  error,
1646
1773
  onRetry: refresh
1647
1774
  }));
1648
1775
  }
1649
1776
  if (data !== null) {
1650
- return /* @__PURE__ */ React25.createElement("div", {
1777
+ return /* @__PURE__ */ React26.createElement("div", {
1651
1778
  className
1652
1779
  }, children(data, meta));
1653
1780
  }
1654
- return /* @__PURE__ */ React25.createElement("div", {
1781
+ return /* @__PURE__ */ React26.createElement("div", {
1655
1782
  className
1656
- }, loadingContent ?? /* @__PURE__ */ React25.createElement(DefaultLoading, null));
1783
+ }, loadingContent ?? /* @__PURE__ */ React26.createElement(DefaultLoading, null));
1657
1784
  }
1658
1785
  __name(ResourceView, "ResourceView");
1659
1786
  function useToolStream(options = {}) {
@@ -1702,11 +1829,11 @@ function useToolStream(options = {}) {
1702
1829
  }
1703
1830
  __name(useToolStream, "useToolStream");
1704
1831
  function Progress({ className, value, ...props }) {
1705
- return /* @__PURE__ */ React25.createElement(ProgressPrimitive.Root, {
1832
+ return /* @__PURE__ */ React26.createElement(ProgressPrimitive.Root, {
1706
1833
  "data-slot": "progress",
1707
1834
  className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
1708
1835
  ...props
1709
- }, /* @__PURE__ */ React25.createElement(ProgressPrimitive.Indicator, {
1836
+ }, /* @__PURE__ */ React26.createElement(ProgressPrimitive.Indicator, {
1710
1837
  "data-slot": "progress-indicator",
1711
1838
  className: "bg-primary h-full w-full flex-1 transition-all",
1712
1839
  style: {
@@ -1725,44 +1852,44 @@ function StreamingContent({ fallback, showProgress = false, progress: externalPr
1725
1852
  const data = complete ?? partial;
1726
1853
  if (!data) {
1727
1854
  if (fallback) {
1728
- return /* @__PURE__ */ React25.createElement("div", {
1855
+ return /* @__PURE__ */ React26.createElement("div", {
1729
1856
  className
1730
1857
  }, fallback);
1731
1858
  }
1732
- return /* @__PURE__ */ React25.createElement("div", {
1859
+ return /* @__PURE__ */ React26.createElement("div", {
1733
1860
  className: cn("flex items-center justify-center p-8", className)
1734
- }, /* @__PURE__ */ React25.createElement(Loader2, {
1861
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
1735
1862
  className: "h-6 w-6 animate-spin text-muted-foreground"
1736
1863
  }));
1737
1864
  }
1738
1865
  const streamingClasses = cn(streamingStyle === "opacity" && isStreaming && "opacity-70", streamingStyle === "blur" && isStreaming && "blur-[1px]");
1739
- return /* @__PURE__ */ React25.createElement("div", {
1866
+ return /* @__PURE__ */ React26.createElement("div", {
1740
1867
  className: cn("relative", className)
1741
- }, showProgress && isStreaming && /* @__PURE__ */ React25.createElement("div", {
1868
+ }, showProgress && isStreaming && /* @__PURE__ */ React26.createElement("div", {
1742
1869
  className: "absolute top-0 left-0 right-0 z-10"
1743
- }, externalProgress !== void 0 ? /* @__PURE__ */ React25.createElement(Progress, {
1870
+ }, externalProgress !== void 0 ? /* @__PURE__ */ React26.createElement(Progress, {
1744
1871
  value: externalProgress,
1745
1872
  className: "h-1"
1746
- }) : /* @__PURE__ */ React25.createElement("div", {
1873
+ }) : /* @__PURE__ */ React26.createElement("div", {
1747
1874
  className: "h-1 bg-primary/20 overflow-hidden"
1748
- }, /* @__PURE__ */ React25.createElement("div", {
1875
+ }, /* @__PURE__ */ React26.createElement("div", {
1749
1876
  className: "h-full w-1/3 bg-primary animate-[shimmer_1s_infinite]"
1750
- }))), isStreaming && /* @__PURE__ */ React25.createElement("div", {
1877
+ }))), isStreaming && /* @__PURE__ */ React26.createElement("div", {
1751
1878
  className: "absolute top-2 right-2 z-10"
1752
- }, /* @__PURE__ */ React25.createElement("div", {
1879
+ }, /* @__PURE__ */ React26.createElement("div", {
1753
1880
  className: "flex items-center gap-1 px-2 py-1 rounded-full bg-muted text-muted-foreground text-xs"
1754
- }, /* @__PURE__ */ React25.createElement(Loader2, {
1881
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
1755
1882
  className: "h-3 w-3 animate-spin"
1756
- }), /* @__PURE__ */ React25.createElement("span", null, "Streaming..."))), /* @__PURE__ */ React25.createElement("div", {
1883
+ }), /* @__PURE__ */ React26.createElement("span", null, "Streaming..."))), /* @__PURE__ */ React26.createElement("div", {
1757
1884
  className: cn("transition-all duration-200", streamingClasses)
1758
1885
  }, children(data, isComplete)));
1759
1886
  }
1760
1887
  __name(StreamingContent, "StreamingContent");
1761
1888
  function Table({ className, ...props }) {
1762
- return /* @__PURE__ */ React25.createElement("div", {
1889
+ return /* @__PURE__ */ React26.createElement("div", {
1763
1890
  "data-slot": "table-container",
1764
1891
  className: "relative w-full overflow-x-auto"
1765
- }, /* @__PURE__ */ React25.createElement("table", {
1892
+ }, /* @__PURE__ */ React26.createElement("table", {
1766
1893
  "data-slot": "table",
1767
1894
  className: cn("w-full caption-bottom text-sm", className),
1768
1895
  ...props
@@ -1770,7 +1897,7 @@ function Table({ className, ...props }) {
1770
1897
  }
1771
1898
  __name(Table, "Table");
1772
1899
  function TableHeader({ className, ...props }) {
1773
- return /* @__PURE__ */ React25.createElement("thead", {
1900
+ return /* @__PURE__ */ React26.createElement("thead", {
1774
1901
  "data-slot": "table-header",
1775
1902
  className: cn("[&_tr]:border-b", className),
1776
1903
  ...props
@@ -1778,7 +1905,7 @@ function TableHeader({ className, ...props }) {
1778
1905
  }
1779
1906
  __name(TableHeader, "TableHeader");
1780
1907
  function TableBody({ className, ...props }) {
1781
- return /* @__PURE__ */ React25.createElement("tbody", {
1908
+ return /* @__PURE__ */ React26.createElement("tbody", {
1782
1909
  "data-slot": "table-body",
1783
1910
  className: cn("[&_tr:last-child]:border-0", className),
1784
1911
  ...props
@@ -1786,7 +1913,7 @@ function TableBody({ className, ...props }) {
1786
1913
  }
1787
1914
  __name(TableBody, "TableBody");
1788
1915
  function TableFooter({ className, ...props }) {
1789
- return /* @__PURE__ */ React25.createElement("tfoot", {
1916
+ return /* @__PURE__ */ React26.createElement("tfoot", {
1790
1917
  "data-slot": "table-footer",
1791
1918
  className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
1792
1919
  ...props
@@ -1794,7 +1921,7 @@ function TableFooter({ className, ...props }) {
1794
1921
  }
1795
1922
  __name(TableFooter, "TableFooter");
1796
1923
  function TableRow({ className, ...props }) {
1797
- return /* @__PURE__ */ React25.createElement("tr", {
1924
+ return /* @__PURE__ */ React26.createElement("tr", {
1798
1925
  "data-slot": "table-row",
1799
1926
  className: cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className),
1800
1927
  ...props
@@ -1802,7 +1929,7 @@ function TableRow({ className, ...props }) {
1802
1929
  }
1803
1930
  __name(TableRow, "TableRow");
1804
1931
  function TableHead({ className, ...props }) {
1805
- return /* @__PURE__ */ React25.createElement("th", {
1932
+ return /* @__PURE__ */ React26.createElement("th", {
1806
1933
  "data-slot": "table-head",
1807
1934
  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),
1808
1935
  ...props
@@ -1810,7 +1937,7 @@ function TableHead({ className, ...props }) {
1810
1937
  }
1811
1938
  __name(TableHead, "TableHead");
1812
1939
  function TableCell({ className, ...props }) {
1813
- return /* @__PURE__ */ React25.createElement("td", {
1940
+ return /* @__PURE__ */ React26.createElement("td", {
1814
1941
  "data-slot": "table-cell",
1815
1942
  className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
1816
1943
  ...props
@@ -1818,7 +1945,7 @@ function TableCell({ className, ...props }) {
1818
1945
  }
1819
1946
  __name(TableCell, "TableCell");
1820
1947
  function TableCaption({ className, ...props }) {
1821
- return /* @__PURE__ */ React25.createElement("caption", {
1948
+ return /* @__PURE__ */ React26.createElement("caption", {
1822
1949
  "data-slot": "table-caption",
1823
1950
  className: cn("text-muted-foreground mt-4 text-sm", className),
1824
1951
  ...props
@@ -1840,6 +1967,9 @@ function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagin
1840
1967
  50,
1841
1968
  100
1842
1969
  ], defaultPageSize = 10, defaultSort, refreshInterval, showRefresh = true, onDataLoaded, onError, onRowClick, getRowKey, emptyContent, loadingContent, className }) {
1970
+ if (!dataTool) {
1971
+ throw new Error("ToolDataGrid: dataTool prop is required");
1972
+ }
1843
1973
  const toolConfig = typeof dataTool === "string" ? {
1844
1974
  name: dataTool
1845
1975
  } : dataTool;
@@ -1884,8 +2014,8 @@ function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagin
1884
2014
  paginationState,
1885
2015
  sortState
1886
2016
  ]);
1887
- const initialFetchDone = React25.useRef(false);
1888
- const prevStateRef = React25.useRef({
2017
+ const initialFetchDone = React26.useRef(false);
2018
+ const prevStateRef = React26.useRef({
1889
2019
  pagination: paginationState,
1890
2020
  sort: sortState
1891
2021
  });
@@ -1941,134 +2071,137 @@ function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagin
1941
2071
  const canNextPage = paginationState.page < totalPages;
1942
2072
  const getSortIcon = /* @__PURE__ */ __name((column) => {
1943
2073
  if (sortState.column !== column) {
1944
- return /* @__PURE__ */ React25.createElement(ArrowUpDown, {
2074
+ return /* @__PURE__ */ React26.createElement(ArrowUpDown, {
1945
2075
  className: "h-4 w-4"
1946
2076
  });
1947
2077
  }
1948
- return sortState.direction === "asc" ? /* @__PURE__ */ React25.createElement(ArrowUp, {
2078
+ return sortState.direction === "asc" ? /* @__PURE__ */ React26.createElement(ArrowUp, {
1949
2079
  className: "h-4 w-4"
1950
- }) : /* @__PURE__ */ React25.createElement(ArrowDown, {
2080
+ }) : /* @__PURE__ */ React26.createElement(ArrowDown, {
1951
2081
  className: "h-4 w-4"
1952
2082
  });
1953
2083
  }, "getSortIcon");
1954
2084
  const renderLoading = /* @__PURE__ */ __name(() => {
1955
2085
  if (loadingContent) return loadingContent;
1956
- return /* @__PURE__ */ React25.createElement("div", {
2086
+ return /* @__PURE__ */ React26.createElement("div", {
1957
2087
  className: "space-y-2"
1958
2088
  }, Array.from({
1959
2089
  length: 5
1960
- }).map((_, i) => /* @__PURE__ */ React25.createElement(Skeleton, {
2090
+ }).map((_, i) => /* @__PURE__ */ React26.createElement(Skeleton, {
1961
2091
  key: i,
1962
2092
  className: "h-12 w-full"
1963
2093
  })));
1964
2094
  }, "renderLoading");
1965
2095
  const renderEmpty = /* @__PURE__ */ __name(() => {
1966
2096
  if (emptyContent) return emptyContent;
1967
- return /* @__PURE__ */ React25.createElement("div", {
2097
+ return /* @__PURE__ */ React26.createElement("div", {
1968
2098
  className: "flex flex-col items-center justify-center py-12 text-muted-foreground"
1969
- }, /* @__PURE__ */ React25.createElement("p", {
2099
+ }, /* @__PURE__ */ React26.createElement("p", {
1970
2100
  className: "text-lg"
1971
- }, "No data found"), /* @__PURE__ */ React25.createElement(Button, {
2101
+ }, "No data found"), /* @__PURE__ */ React26.createElement(Button, {
1972
2102
  variant: "ghost",
1973
2103
  size: "sm",
1974
2104
  onClick: fetchData,
1975
2105
  className: "mt-2"
1976
- }, /* @__PURE__ */ React25.createElement(RefreshCw, {
2106
+ }, /* @__PURE__ */ React26.createElement(RefreshCw, {
1977
2107
  className: "h-4 w-4 mr-2"
1978
2108
  }), "Refresh"));
1979
2109
  }, "renderEmpty");
1980
- return /* @__PURE__ */ React25.createElement("div", {
2110
+ return /* @__PURE__ */ React26.createElement("div", {
1981
2111
  className: cn("space-y-4", className)
1982
- }, showRefresh && /* @__PURE__ */ React25.createElement("div", {
2112
+ }, showRefresh && /* @__PURE__ */ React26.createElement("div", {
1983
2113
  className: "flex items-center justify-end gap-2"
1984
- }, /* @__PURE__ */ React25.createElement(Button, {
2114
+ }, /* @__PURE__ */ React26.createElement(Button, {
1985
2115
  variant: "outline",
1986
2116
  size: "sm",
1987
2117
  onClick: fetchData,
1988
2118
  disabled: loading
1989
- }, loading ? /* @__PURE__ */ React25.createElement(Loader2, {
2119
+ }, loading ? /* @__PURE__ */ React26.createElement(Loader2, {
1990
2120
  className: "h-4 w-4 animate-spin"
1991
- }) : /* @__PURE__ */ React25.createElement(RefreshCw, {
2121
+ }) : /* @__PURE__ */ React26.createElement(RefreshCw, {
1992
2122
  className: "h-4 w-4"
1993
- }), /* @__PURE__ */ React25.createElement("span", {
2123
+ }), /* @__PURE__ */ React26.createElement("span", {
1994
2124
  className: "ml-2"
1995
- }, "Refresh"))), /* @__PURE__ */ React25.createElement("div", {
2125
+ }, "Refresh"))), /* @__PURE__ */ React26.createElement("div", {
1996
2126
  className: "rounded-md border"
1997
- }, loading && data.rows.length === 0 ? /* @__PURE__ */ React25.createElement("div", {
2127
+ }, loading && data.rows.length === 0 ? /* @__PURE__ */ React26.createElement("div", {
1998
2128
  className: "p-4"
1999
- }, renderLoading()) : data.rows.length === 0 ? renderEmpty() : /* @__PURE__ */ React25.createElement(Table, null, /* @__PURE__ */ React25.createElement(TableHeader, null, /* @__PURE__ */ React25.createElement(TableRow, null, columns.map((column) => /* @__PURE__ */ React25.createElement(TableHead, {
2129
+ }, renderLoading()) : data.rows.length === 0 ? renderEmpty() : /* @__PURE__ */ React26.createElement(Table, null, /* @__PURE__ */ React26.createElement(TableHeader, null, /* @__PURE__ */ React26.createElement(TableRow, null, columns.map((column) => /* @__PURE__ */ React26.createElement(TableHead, {
2000
2130
  key: column.key,
2001
2131
  style: {
2002
2132
  width: column.width
2003
2133
  },
2004
2134
  className: cn(column.align === "center" && "text-center", column.align === "right" && "text-right", column.hideMobile && "hidden md:table-cell")
2005
- }, column.sortable ? /* @__PURE__ */ React25.createElement(Button, {
2135
+ }, column.sortable ? /* @__PURE__ */ React26.createElement(Button, {
2006
2136
  variant: "ghost",
2007
2137
  size: "sm",
2008
2138
  onClick: /* @__PURE__ */ __name(() => handleSort(column.key), "onClick"),
2009
2139
  className: "-ml-3"
2010
- }, column.header, getSortIcon(column.key)) : column.header)), rowActions.length > 0 && /* @__PURE__ */ React25.createElement(TableHead, {
2140
+ }, column.header, getSortIcon(column.key)) : column.header)), rowActions.length > 0 && /* @__PURE__ */ React26.createElement(TableHead, {
2011
2141
  className: "w-[100px]"
2012
- }, "Actions"))), /* @__PURE__ */ React25.createElement(TableBody, null, data.rows.map((row, index) => {
2142
+ }, "Actions"))), /* @__PURE__ */ React26.createElement(TableBody, null, data.rows.map((row, index) => {
2013
2143
  const key = getRowKey?.(row, index) ?? String(index);
2014
- return /* @__PURE__ */ React25.createElement(TableRow, {
2144
+ return /* @__PURE__ */ React26.createElement(TableRow, {
2015
2145
  key,
2016
2146
  onClick: /* @__PURE__ */ __name(() => onRowClick?.(row, index), "onClick"),
2017
2147
  className: onRowClick ? "cursor-pointer" : void 0
2018
2148
  }, columns.map((column) => {
2019
2149
  const value = getNestedValue(row, column.key);
2020
- return /* @__PURE__ */ React25.createElement(TableCell, {
2150
+ return /* @__PURE__ */ React26.createElement(TableCell, {
2021
2151
  key: column.key,
2022
2152
  className: cn(column.align === "center" && "text-center", column.align === "right" && "text-right", column.hideMobile && "hidden md:table-cell")
2023
2153
  }, column.render ? column.render(value, row, index) : String(value ?? ""));
2024
- }), rowActions.length > 0 && /* @__PURE__ */ React25.createElement(TableCell, null, /* @__PURE__ */ React25.createElement("div", {
2154
+ }), rowActions.length > 0 && /* @__PURE__ */ React26.createElement(TableCell, null, /* @__PURE__ */ React26.createElement("div", {
2025
2155
  className: "flex items-center gap-1"
2026
- }, rowActions.filter((action) => !action.hidden?.(row)).map((action, actionIndex) => /* @__PURE__ */ React25.createElement(RowActionButton, {
2156
+ }, rowActions.filter((action) => !action.hidden?.(row)).map((action, actionIndex) => /* @__PURE__ */ React26.createElement(RowActionButton, {
2027
2157
  key: actionIndex,
2028
2158
  action,
2029
2159
  row,
2030
2160
  onRefresh: fetchData
2031
2161
  })))));
2032
- })))), pagination && data.total > 0 && /* @__PURE__ */ React25.createElement("div", {
2162
+ })))), pagination && data.total > 0 && /* @__PURE__ */ React26.createElement("div", {
2033
2163
  className: "flex items-center justify-between"
2034
- }, /* @__PURE__ */ React25.createElement("div", {
2164
+ }, /* @__PURE__ */ React26.createElement("div", {
2035
2165
  className: "text-sm text-muted-foreground"
2036
- }, "Showing ", (paginationState.page - 1) * paginationState.pageSize + 1, " to", " ", Math.min(paginationState.page * paginationState.pageSize, data.total), " of", " ", data.total, " results"), /* @__PURE__ */ React25.createElement("div", {
2166
+ }, "Showing ", (paginationState.page - 1) * paginationState.pageSize + 1, " to", " ", Math.min(paginationState.page * paginationState.pageSize, data.total), " of", " ", data.total, " results"), /* @__PURE__ */ React26.createElement("div", {
2037
2167
  className: "flex items-center gap-4"
2038
- }, /* @__PURE__ */ React25.createElement("div", {
2168
+ }, /* @__PURE__ */ React26.createElement("div", {
2039
2169
  className: "flex items-center gap-2"
2040
- }, /* @__PURE__ */ React25.createElement("span", {
2170
+ }, /* @__PURE__ */ React26.createElement("span", {
2041
2171
  className: "text-sm text-muted-foreground"
2042
- }, "Rows per page"), /* @__PURE__ */ React25.createElement(Select, {
2172
+ }, "Rows per page"), /* @__PURE__ */ React26.createElement(Select, {
2043
2173
  value: String(paginationState.pageSize),
2044
2174
  onValueChange: handlePageSizeChange
2045
- }, /* @__PURE__ */ React25.createElement(SelectTrigger, {
2175
+ }, /* @__PURE__ */ React26.createElement(SelectTrigger, {
2046
2176
  className: "w-[70px]"
2047
- }, /* @__PURE__ */ React25.createElement(SelectValue, null)), /* @__PURE__ */ React25.createElement(SelectContent, null, pageSizes.map((size) => /* @__PURE__ */ React25.createElement(SelectItem, {
2177
+ }, /* @__PURE__ */ React26.createElement(SelectValue, null)), /* @__PURE__ */ React26.createElement(SelectContent, null, pageSizes.map((size) => /* @__PURE__ */ React26.createElement(SelectItem, {
2048
2178
  key: size,
2049
2179
  value: String(size)
2050
- }, size))))), /* @__PURE__ */ React25.createElement("div", {
2180
+ }, size))))), /* @__PURE__ */ React26.createElement("div", {
2051
2181
  className: "flex items-center gap-2"
2052
- }, /* @__PURE__ */ React25.createElement(Button, {
2182
+ }, /* @__PURE__ */ React26.createElement(Button, {
2053
2183
  variant: "outline",
2054
2184
  size: "sm",
2055
2185
  onClick: /* @__PURE__ */ __name(() => handlePageChange(paginationState.page - 1), "onClick"),
2056
2186
  disabled: !canPreviousPage || loading
2057
- }, /* @__PURE__ */ React25.createElement(ChevronLeft, {
2187
+ }, /* @__PURE__ */ React26.createElement(ChevronLeft, {
2058
2188
  className: "h-4 w-4"
2059
- })), /* @__PURE__ */ React25.createElement("span", {
2189
+ })), /* @__PURE__ */ React26.createElement("span", {
2060
2190
  className: "text-sm"
2061
- }, "Page ", paginationState.page, " of ", totalPages), /* @__PURE__ */ React25.createElement(Button, {
2191
+ }, "Page ", paginationState.page, " of ", totalPages), /* @__PURE__ */ React26.createElement(Button, {
2062
2192
  variant: "outline",
2063
2193
  size: "sm",
2064
2194
  onClick: /* @__PURE__ */ __name(() => handlePageChange(paginationState.page + 1), "onClick"),
2065
2195
  disabled: !canNextPage || loading
2066
- }, /* @__PURE__ */ React25.createElement(ChevronRight, {
2196
+ }, /* @__PURE__ */ React26.createElement(ChevronRight, {
2067
2197
  className: "h-4 w-4"
2068
2198
  }))))));
2069
2199
  }
2070
2200
  __name(ToolDataGrid, "ToolDataGrid");
2071
2201
  function RowActionButton({ action, row, onRefresh }) {
2202
+ if (!action.tool) {
2203
+ throw new Error("ToolDataGrid: rowAction.tool is required");
2204
+ }
2072
2205
  const toolConfig = typeof action.tool === "string" ? {
2073
2206
  name: action.tool
2074
2207
  } : action.tool;
@@ -2092,33 +2225,33 @@ function RowActionButton({ action, row, onRefresh }) {
2092
2225
  call,
2093
2226
  args
2094
2227
  ]);
2095
- return /* @__PURE__ */ React25.createElement(Button, {
2228
+ return /* @__PURE__ */ React26.createElement(Button, {
2096
2229
  variant: action.variant ?? "ghost",
2097
2230
  size: "sm",
2098
2231
  onClick: handleClick,
2099
2232
  disabled: loading
2100
- }, loading ? /* @__PURE__ */ React25.createElement(Loader2, {
2233
+ }, loading ? /* @__PURE__ */ React26.createElement(Loader2, {
2101
2234
  className: "h-3 w-3 animate-spin"
2102
- }) : /* @__PURE__ */ React25.createElement(React25.Fragment, null, action.icon, /* @__PURE__ */ React25.createElement("span", {
2235
+ }) : /* @__PURE__ */ React26.createElement(React26.Fragment, null, action.icon, /* @__PURE__ */ React26.createElement("span", {
2103
2236
  className: action.icon ? "ml-1" : ""
2104
2237
  }, action.label)));
2105
2238
  }
2106
2239
  __name(RowActionButton, "RowActionButton");
2107
2240
  var Button2 = /* @__PURE__ */ forwardRef(({ className, variant = "primary", size = "md", loading = false, disabled, asChild = false, leftIcon, rightIcon, children, ...props }, ref) => {
2108
2241
  const Comp = asChild ? Slot : "button";
2109
- return /* @__PURE__ */ React25__default.createElement(Comp, {
2242
+ return /* @__PURE__ */ React26__default.createElement(Comp, {
2110
2243
  ref,
2111
2244
  className: clsx("lui-button", `lui-button--${variant}`, `lui-button--${size}`, loading && "lui-button--loading", className),
2112
2245
  disabled: disabled || loading,
2113
2246
  ...props
2114
- }, loading && /* @__PURE__ */ React25__default.createElement("span", {
2247
+ }, loading && /* @__PURE__ */ React26__default.createElement("span", {
2115
2248
  className: "lui-button__spinner",
2116
2249
  "aria-hidden": "true"
2117
- }, /* @__PURE__ */ React25__default.createElement("svg", {
2250
+ }, /* @__PURE__ */ React26__default.createElement("svg", {
2118
2251
  viewBox: "0 0 24 24",
2119
2252
  fill: "none",
2120
2253
  className: "lui-spinner-icon"
2121
- }, /* @__PURE__ */ React25__default.createElement("circle", {
2254
+ }, /* @__PURE__ */ React26__default.createElement("circle", {
2122
2255
  cx: "12",
2123
2256
  cy: "12",
2124
2257
  r: "10",
@@ -2127,11 +2260,11 @@ var Button2 = /* @__PURE__ */ forwardRef(({ className, variant = "primary", size
2127
2260
  strokeLinecap: "round",
2128
2261
  strokeDasharray: "32",
2129
2262
  strokeDashoffset: "12"
2130
- }))), leftIcon && !loading && /* @__PURE__ */ React25__default.createElement("span", {
2263
+ }))), leftIcon && !loading && /* @__PURE__ */ React26__default.createElement("span", {
2131
2264
  className: "lui-button__icon"
2132
- }, leftIcon), /* @__PURE__ */ React25__default.createElement("span", {
2265
+ }, leftIcon), /* @__PURE__ */ React26__default.createElement("span", {
2133
2266
  className: "lui-button__content"
2134
- }, children), rightIcon && /* @__PURE__ */ React25__default.createElement("span", {
2267
+ }, children), rightIcon && /* @__PURE__ */ React26__default.createElement("span", {
2135
2268
  className: "lui-button__icon"
2136
2269
  }, rightIcon));
2137
2270
  });
@@ -2150,103 +2283,112 @@ function ActionButton({ toolName, toolArgs = {}, onToolSuccess, onToolError, sho
2150
2283
  onToolError?.(err instanceof Error ? err : new Error(String(err)));
2151
2284
  }
2152
2285
  }, "handleClick");
2153
- return /* @__PURE__ */ React25__default.createElement("div", {
2286
+ return /* @__PURE__ */ React26__default.createElement("div", {
2154
2287
  className: "lui-action-button-wrapper"
2155
- }, /* @__PURE__ */ React25__default.createElement(Button2, {
2288
+ }, /* @__PURE__ */ React26__default.createElement(Button2, {
2156
2289
  ...buttonProps,
2157
2290
  loading,
2158
2291
  onClick: handleClick
2159
- }, children), showResult && hasResult && result !== null && /* @__PURE__ */ React25__default.createElement("div", {
2292
+ }, children), showResult && hasResult && result !== null && /* @__PURE__ */ React26__default.createElement("div", {
2160
2293
  className: "lui-action-button-result"
2161
- }, renderResult ? renderResult(result) : /* @__PURE__ */ React25__default.createElement("pre", null, JSON.stringify(result, null, 2))), error && /* @__PURE__ */ React25__default.createElement("div", {
2294
+ }, renderResult ? renderResult(result) : /* @__PURE__ */ React26__default.createElement("pre", null, JSON.stringify(result, null, 2))), error && /* @__PURE__ */ React26__default.createElement("div", {
2162
2295
  className: "lui-action-button-error"
2163
2296
  }, error.message));
2164
2297
  }
2165
2298
  __name(ActionButton, "ActionButton");
2166
2299
  function DefaultLoading2() {
2167
- return /* @__PURE__ */ React25.createElement("div", {
2300
+ return /* @__PURE__ */ React26.createElement("div", {
2168
2301
  className: "flex items-center justify-center p-8"
2169
- }, /* @__PURE__ */ React25.createElement(Loader2, {
2302
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
2170
2303
  className: "h-6 w-6 animate-spin text-muted-foreground"
2171
2304
  }));
2172
2305
  }
2173
2306
  __name(DefaultLoading2, "DefaultLoading");
2174
2307
  function DefaultDisconnected() {
2175
- return /* @__PURE__ */ React25.createElement(Alert, null, /* @__PURE__ */ React25.createElement(WifiOff, {
2308
+ return /* @__PURE__ */ React26.createElement(Alert, null, /* @__PURE__ */ React26.createElement(WifiOff, {
2176
2309
  className: "h-4 w-4"
2177
- }), /* @__PURE__ */ React25.createElement(AlertDescription, null, "Waiting for connection to MCP host..."));
2310
+ }), /* @__PURE__ */ React26.createElement(AlertDescription, null, "Waiting for connection to MCP host..."));
2178
2311
  }
2179
2312
  __name(DefaultDisconnected, "DefaultDisconnected");
2180
2313
  function DefaultError2({ error }) {
2181
- return /* @__PURE__ */ React25.createElement(Alert, {
2314
+ return /* @__PURE__ */ React26.createElement(Alert, {
2182
2315
  variant: "destructive"
2183
- }, /* @__PURE__ */ React25.createElement(AlertCircle, {
2316
+ }, /* @__PURE__ */ React26.createElement(AlertCircle, {
2184
2317
  className: "h-4 w-4"
2185
- }), /* @__PURE__ */ React25.createElement(AlertDescription, null, "Connection error: ", error.message));
2318
+ }), /* @__PURE__ */ React26.createElement(AlertDescription, null, "Connection error: ", error.message));
2186
2319
  }
2187
2320
  __name(DefaultError2, "DefaultError");
2188
2321
  function RequireConnection({ loading: loadingContent, error: errorContent, disconnected: disconnectedContent, children, className }) {
2189
2322
  const { isConnected, error, app } = useMcpApp();
2323
+ console.log("[RequireConnection] State:", {
2324
+ hasApp: !!app,
2325
+ isConnected,
2326
+ hasError: !!error
2327
+ });
2190
2328
  if (!app && !error && !isConnected) {
2329
+ console.log("[RequireConnection] Rendering: Initial Loading");
2191
2330
  if (loadingContent) {
2192
- return /* @__PURE__ */ React25.createElement("div", {
2331
+ return /* @__PURE__ */ React26.createElement("div", {
2193
2332
  className
2194
2333
  }, loadingContent);
2195
2334
  }
2196
- return /* @__PURE__ */ React25.createElement("div", {
2335
+ return /* @__PURE__ */ React26.createElement("div", {
2197
2336
  className
2198
- }, /* @__PURE__ */ React25.createElement(DefaultLoading2, null));
2337
+ }, /* @__PURE__ */ React26.createElement(DefaultLoading2, null));
2199
2338
  }
2200
2339
  if (error) {
2340
+ console.log("[RequireConnection] Rendering: Error");
2201
2341
  if (errorContent) {
2202
2342
  if (typeof errorContent === "function") {
2203
- return /* @__PURE__ */ React25.createElement("div", {
2343
+ return /* @__PURE__ */ React26.createElement("div", {
2204
2344
  className
2205
2345
  }, errorContent(error));
2206
2346
  }
2207
- return /* @__PURE__ */ React25.createElement("div", {
2347
+ return /* @__PURE__ */ React26.createElement("div", {
2208
2348
  className
2209
2349
  }, errorContent);
2210
2350
  }
2211
- return /* @__PURE__ */ React25.createElement("div", {
2351
+ return /* @__PURE__ */ React26.createElement("div", {
2212
2352
  className
2213
- }, /* @__PURE__ */ React25.createElement(DefaultError2, {
2353
+ }, /* @__PURE__ */ React26.createElement(DefaultError2, {
2214
2354
  error
2215
2355
  }));
2216
2356
  }
2217
2357
  if (!isConnected) {
2358
+ console.log("[RequireConnection] Rendering: Disconnected/Loading");
2218
2359
  if (disconnectedContent) {
2219
- return /* @__PURE__ */ React25.createElement("div", {
2360
+ return /* @__PURE__ */ React26.createElement("div", {
2220
2361
  className
2221
2362
  }, disconnectedContent);
2222
2363
  }
2223
2364
  if (loadingContent) {
2224
- return /* @__PURE__ */ React25.createElement("div", {
2365
+ return /* @__PURE__ */ React26.createElement("div", {
2225
2366
  className
2226
2367
  }, loadingContent);
2227
2368
  }
2228
- return /* @__PURE__ */ React25.createElement("div", {
2369
+ return /* @__PURE__ */ React26.createElement("div", {
2229
2370
  className
2230
- }, /* @__PURE__ */ React25.createElement(DefaultDisconnected, null));
2371
+ }, /* @__PURE__ */ React26.createElement(DefaultDisconnected, null));
2231
2372
  }
2232
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, children);
2373
+ console.log("[RequireConnection] Rendering: Children (Connected)");
2374
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, children);
2233
2375
  }
2234
2376
  __name(RequireConnection, "RequireConnection");
2235
2377
  function DefaultFallback({ error, onRetry }) {
2236
- return /* @__PURE__ */ React25.createElement(Alert, {
2378
+ return /* @__PURE__ */ React26.createElement(Alert, {
2237
2379
  variant: "destructive"
2238
- }, /* @__PURE__ */ React25.createElement(AlertCircle, {
2380
+ }, /* @__PURE__ */ React26.createElement(AlertCircle, {
2239
2381
  className: "h-4 w-4"
2240
- }), /* @__PURE__ */ React25.createElement(AlertTitle, null, "Something went wrong"), /* @__PURE__ */ React25.createElement(AlertDescription, {
2382
+ }), /* @__PURE__ */ React26.createElement(AlertTitle, null, "Something went wrong"), /* @__PURE__ */ React26.createElement(AlertDescription, {
2241
2383
  className: "flex flex-col gap-3"
2242
- }, /* @__PURE__ */ React25.createElement("p", {
2384
+ }, /* @__PURE__ */ React26.createElement("p", {
2243
2385
  className: "text-sm"
2244
- }, error.message), /* @__PURE__ */ React25.createElement(Button, {
2386
+ }, error.message), /* @__PURE__ */ React26.createElement(Button, {
2245
2387
  variant: "outline",
2246
2388
  size: "sm",
2247
2389
  onClick: onRetry,
2248
2390
  className: "w-fit"
2249
- }, /* @__PURE__ */ React25.createElement(RefreshCw, {
2391
+ }, /* @__PURE__ */ React26.createElement(RefreshCw, {
2250
2392
  className: "h-4 w-4 mr-2"
2251
2393
  }), "Try Again")));
2252
2394
  }
@@ -2292,7 +2434,7 @@ var ToolErrorBoundary = class extends Component {
2292
2434
  }
2293
2435
  return fallback;
2294
2436
  }
2295
- return /* @__PURE__ */ React25.createElement(DefaultFallback, {
2437
+ return /* @__PURE__ */ React26.createElement(DefaultFallback, {
2296
2438
  error,
2297
2439
  onRetry: this.reset
2298
2440
  });
@@ -2509,7 +2651,7 @@ var INITIAL_TOOL_STATE = {
2509
2651
  hasResult: false
2510
2652
  };
2511
2653
  function CardTitle({ className, ...props }) {
2512
- return /* @__PURE__ */ React25.createElement("div", {
2654
+ return /* @__PURE__ */ React26.createElement("div", {
2513
2655
  "data-slot": "card-title",
2514
2656
  className: cn("leading-none font-semibold", className),
2515
2657
  ...props
@@ -2517,7 +2659,7 @@ function CardTitle({ className, ...props }) {
2517
2659
  }
2518
2660
  __name(CardTitle, "CardTitle");
2519
2661
  function CardDescription({ className, ...props }) {
2520
- return /* @__PURE__ */ React25.createElement("div", {
2662
+ return /* @__PURE__ */ React26.createElement("div", {
2521
2663
  "data-slot": "card-description",
2522
2664
  className: cn("text-muted-foreground text-sm", className),
2523
2665
  ...props
@@ -2525,17 +2667,17 @@ function CardDescription({ className, ...props }) {
2525
2667
  }
2526
2668
  __name(CardDescription, "CardDescription");
2527
2669
  var Form = FormProvider;
2528
- var FormFieldContext = /* @__PURE__ */ React25.createContext({});
2670
+ var FormFieldContext = /* @__PURE__ */ React26.createContext({});
2529
2671
  var FormField = /* @__PURE__ */ __name(({ ...props }) => {
2530
- return /* @__PURE__ */ React25.createElement(FormFieldContext.Provider, {
2672
+ return /* @__PURE__ */ React26.createElement(FormFieldContext.Provider, {
2531
2673
  value: {
2532
2674
  name: props.name
2533
2675
  }
2534
- }, /* @__PURE__ */ React25.createElement(Controller, props));
2676
+ }, /* @__PURE__ */ React26.createElement(Controller, props));
2535
2677
  }, "FormField");
2536
2678
  var useFormField = /* @__PURE__ */ __name(() => {
2537
- const fieldContext = React25.useContext(FormFieldContext);
2538
- const itemContext = React25.useContext(FormItemContext);
2679
+ const fieldContext = React26.useContext(FormFieldContext);
2680
+ const itemContext = React26.useContext(FormItemContext);
2539
2681
  const { getFieldState } = useFormContext();
2540
2682
  const formState = useFormState({
2541
2683
  name: fieldContext.name
@@ -2554,14 +2696,14 @@ var useFormField = /* @__PURE__ */ __name(() => {
2554
2696
  ...fieldState
2555
2697
  };
2556
2698
  }, "useFormField");
2557
- var FormItemContext = /* @__PURE__ */ React25.createContext({});
2699
+ var FormItemContext = /* @__PURE__ */ React26.createContext({});
2558
2700
  function FormItem({ className, ...props }) {
2559
- const id = React25.useId();
2560
- return /* @__PURE__ */ React25.createElement(FormItemContext.Provider, {
2701
+ const id = React26.useId();
2702
+ return /* @__PURE__ */ React26.createElement(FormItemContext.Provider, {
2561
2703
  value: {
2562
2704
  id
2563
2705
  }
2564
- }, /* @__PURE__ */ React25.createElement("div", {
2706
+ }, /* @__PURE__ */ React26.createElement("div", {
2565
2707
  "data-slot": "form-item",
2566
2708
  className: cn("grid gap-2", className),
2567
2709
  ...props
@@ -2570,7 +2712,7 @@ function FormItem({ className, ...props }) {
2570
2712
  __name(FormItem, "FormItem");
2571
2713
  function FormLabel({ className, ...props }) {
2572
2714
  const { error, formItemId } = useFormField();
2573
- return /* @__PURE__ */ React25.createElement(Label2, {
2715
+ return /* @__PURE__ */ React26.createElement(Label2, {
2574
2716
  "data-slot": "form-label",
2575
2717
  "data-error": !!error,
2576
2718
  className: cn("data-[error=true]:text-destructive", className),
@@ -2581,7 +2723,7 @@ function FormLabel({ className, ...props }) {
2581
2723
  __name(FormLabel, "FormLabel");
2582
2724
  function FormControl({ ...props }) {
2583
2725
  const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
2584
- return /* @__PURE__ */ React25.createElement(Slot, {
2726
+ return /* @__PURE__ */ React26.createElement(Slot, {
2585
2727
  "data-slot": "form-control",
2586
2728
  id: formItemId,
2587
2729
  "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
@@ -2592,7 +2734,7 @@ function FormControl({ ...props }) {
2592
2734
  __name(FormControl, "FormControl");
2593
2735
  function FormDescription({ className, ...props }) {
2594
2736
  const { formDescriptionId } = useFormField();
2595
- return /* @__PURE__ */ React25.createElement("p", {
2737
+ return /* @__PURE__ */ React26.createElement("p", {
2596
2738
  "data-slot": "form-description",
2597
2739
  id: formDescriptionId,
2598
2740
  className: cn("text-muted-foreground text-sm", className),
@@ -2606,7 +2748,7 @@ function FormMessage({ className, ...props }) {
2606
2748
  if (!body) {
2607
2749
  return null;
2608
2750
  }
2609
- return /* @__PURE__ */ React25.createElement("p", {
2751
+ return /* @__PURE__ */ React26.createElement("p", {
2610
2752
  "data-slot": "form-message",
2611
2753
  id: formMessageId,
2612
2754
  className: cn("text-destructive text-sm", className),
@@ -2629,7 +2771,7 @@ var badgeVariants = cva("inline-flex items-center justify-center rounded-full bo
2629
2771
  });
2630
2772
  function Badge({ className, variant, asChild = false, ...props }) {
2631
2773
  const Comp = asChild ? Slot : "span";
2632
- return /* @__PURE__ */ React25.createElement(Comp, {
2774
+ return /* @__PURE__ */ React26.createElement(Comp, {
2633
2775
  "data-slot": "badge",
2634
2776
  className: cn(badgeVariants({
2635
2777
  variant
@@ -2639,7 +2781,7 @@ function Badge({ className, variant, asChild = false, ...props }) {
2639
2781
  }
2640
2782
  __name(Badge, "Badge");
2641
2783
  function TabsList({ className, ...props }) {
2642
- return /* @__PURE__ */ React25.createElement(TabsPrimitive2.List, {
2784
+ return /* @__PURE__ */ React26.createElement(TabsPrimitive2.List, {
2643
2785
  "data-slot": "tabs-list",
2644
2786
  className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className),
2645
2787
  ...props
@@ -2647,7 +2789,7 @@ function TabsList({ className, ...props }) {
2647
2789
  }
2648
2790
  __name(TabsList, "TabsList");
2649
2791
  function TabsTrigger({ className, ...props }) {
2650
- return /* @__PURE__ */ React25.createElement(TabsPrimitive2.Trigger, {
2792
+ return /* @__PURE__ */ React26.createElement(TabsPrimitive2.Trigger, {
2651
2793
  "data-slot": "tabs-trigger",
2652
2794
  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),
2653
2795
  ...props
@@ -2655,7 +2797,7 @@ function TabsTrigger({ className, ...props }) {
2655
2797
  }
2656
2798
  __name(TabsTrigger, "TabsTrigger");
2657
2799
  function TabsContent({ className, ...props }) {
2658
- return /* @__PURE__ */ React25.createElement(TabsPrimitive2.Content, {
2800
+ return /* @__PURE__ */ React26.createElement(TabsPrimitive2.Content, {
2659
2801
  "data-slot": "tabs-content",
2660
2802
  className: cn("flex-1 outline-none", className),
2661
2803
  ...props
@@ -2663,7 +2805,7 @@ function TabsContent({ className, ...props }) {
2663
2805
  }
2664
2806
  __name(TabsContent, "TabsContent");
2665
2807
  function Separator2({ className, orientation = "horizontal", decorative = true, ...props }) {
2666
- return /* @__PURE__ */ React25.createElement(SeparatorPrimitive.Root, {
2808
+ return /* @__PURE__ */ React26.createElement(SeparatorPrimitive.Root, {
2667
2809
  "data-slot": "separator",
2668
2810
  decorative,
2669
2811
  orientation,
@@ -2673,51 +2815,51 @@ function Separator2({ className, orientation = "horizontal", decorative = true,
2673
2815
  }
2674
2816
  __name(Separator2, "Separator");
2675
2817
  function ScrollArea({ className, children, ...props }) {
2676
- return /* @__PURE__ */ React25.createElement(ScrollAreaPrimitive.Root, {
2818
+ return /* @__PURE__ */ React26.createElement(ScrollAreaPrimitive.Root, {
2677
2819
  "data-slot": "scroll-area",
2678
2820
  className: cn("relative", className),
2679
2821
  ...props
2680
- }, /* @__PURE__ */ React25.createElement(ScrollAreaPrimitive.Viewport, {
2822
+ }, /* @__PURE__ */ React26.createElement(ScrollAreaPrimitive.Viewport, {
2681
2823
  "data-slot": "scroll-area-viewport",
2682
2824
  className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
2683
- }, children), /* @__PURE__ */ React25.createElement(ScrollBar, null), /* @__PURE__ */ React25.createElement(ScrollAreaPrimitive.Corner, null));
2825
+ }, children), /* @__PURE__ */ React26.createElement(ScrollBar, null), /* @__PURE__ */ React26.createElement(ScrollAreaPrimitive.Corner, null));
2684
2826
  }
2685
2827
  __name(ScrollArea, "ScrollArea");
2686
2828
  function ScrollBar({ className, orientation = "vertical", ...props }) {
2687
- return /* @__PURE__ */ React25.createElement(ScrollAreaPrimitive.ScrollAreaScrollbar, {
2829
+ return /* @__PURE__ */ React26.createElement(ScrollAreaPrimitive.ScrollAreaScrollbar, {
2688
2830
  "data-slot": "scroll-area-scrollbar",
2689
2831
  orientation,
2690
2832
  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),
2691
2833
  ...props
2692
- }, /* @__PURE__ */ React25.createElement(ScrollAreaPrimitive.ScrollAreaThumb, {
2834
+ }, /* @__PURE__ */ React26.createElement(ScrollAreaPrimitive.ScrollAreaThumb, {
2693
2835
  "data-slot": "scroll-area-thumb",
2694
2836
  className: "bg-border relative flex-1 rounded-full"
2695
2837
  }));
2696
2838
  }
2697
2839
  __name(ScrollBar, "ScrollBar");
2698
2840
  function DropdownMenu({ ...props }) {
2699
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Root, {
2841
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Root, {
2700
2842
  "data-slot": "dropdown-menu",
2701
2843
  ...props
2702
2844
  });
2703
2845
  }
2704
2846
  __name(DropdownMenu, "DropdownMenu");
2705
2847
  function DropdownMenuPortal({ ...props }) {
2706
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Portal, {
2848
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Portal, {
2707
2849
  "data-slot": "dropdown-menu-portal",
2708
2850
  ...props
2709
2851
  });
2710
2852
  }
2711
2853
  __name(DropdownMenuPortal, "DropdownMenuPortal");
2712
2854
  function DropdownMenuTrigger({ ...props }) {
2713
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Trigger, {
2855
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Trigger, {
2714
2856
  "data-slot": "dropdown-menu-trigger",
2715
2857
  ...props
2716
2858
  });
2717
2859
  }
2718
2860
  __name(DropdownMenuTrigger, "DropdownMenuTrigger");
2719
2861
  function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
2720
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Content, {
2862
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Content, {
2721
2863
  "data-slot": "dropdown-menu-content",
2722
2864
  sideOffset,
2723
2865
  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),
@@ -2726,14 +2868,14 @@ function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
2726
2868
  }
2727
2869
  __name(DropdownMenuContent, "DropdownMenuContent");
2728
2870
  function DropdownMenuGroup({ ...props }) {
2729
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Group, {
2871
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Group, {
2730
2872
  "data-slot": "dropdown-menu-group",
2731
2873
  ...props
2732
2874
  });
2733
2875
  }
2734
2876
  __name(DropdownMenuGroup, "DropdownMenuGroup");
2735
2877
  function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
2736
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Item, {
2878
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Item, {
2737
2879
  "data-slot": "dropdown-menu-item",
2738
2880
  "data-inset": inset,
2739
2881
  "data-variant": variant,
@@ -2743,39 +2885,39 @@ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
2743
2885
  }
2744
2886
  __name(DropdownMenuItem, "DropdownMenuItem");
2745
2887
  function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
2746
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.CheckboxItem, {
2888
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.CheckboxItem, {
2747
2889
  "data-slot": "dropdown-menu-checkbox-item",
2748
2890
  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),
2749
2891
  checked,
2750
2892
  ...props
2751
- }, /* @__PURE__ */ React25.createElement("span", {
2893
+ }, /* @__PURE__ */ React26.createElement("span", {
2752
2894
  className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
2753
- }, /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React25.createElement(CheckIcon, {
2895
+ }, /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React26.createElement(CheckIcon, {
2754
2896
  className: "size-4"
2755
2897
  }))), children);
2756
2898
  }
2757
2899
  __name(DropdownMenuCheckboxItem, "DropdownMenuCheckboxItem");
2758
2900
  function DropdownMenuRadioGroup({ ...props }) {
2759
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.RadioGroup, {
2901
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.RadioGroup, {
2760
2902
  "data-slot": "dropdown-menu-radio-group",
2761
2903
  ...props
2762
2904
  });
2763
2905
  }
2764
2906
  __name(DropdownMenuRadioGroup, "DropdownMenuRadioGroup");
2765
2907
  function DropdownMenuRadioItem({ className, children, ...props }) {
2766
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.RadioItem, {
2908
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.RadioItem, {
2767
2909
  "data-slot": "dropdown-menu-radio-item",
2768
2910
  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),
2769
2911
  ...props
2770
- }, /* @__PURE__ */ React25.createElement("span", {
2912
+ }, /* @__PURE__ */ React26.createElement("span", {
2771
2913
  className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
2772
- }, /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React25.createElement(CircleIcon, {
2914
+ }, /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React26.createElement(CircleIcon, {
2773
2915
  className: "size-2 fill-current"
2774
2916
  }))), children);
2775
2917
  }
2776
2918
  __name(DropdownMenuRadioItem, "DropdownMenuRadioItem");
2777
2919
  function DropdownMenuLabel({ className, inset, ...props }) {
2778
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Label, {
2920
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Label, {
2779
2921
  "data-slot": "dropdown-menu-label",
2780
2922
  "data-inset": inset,
2781
2923
  className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
@@ -2784,7 +2926,7 @@ function DropdownMenuLabel({ className, inset, ...props }) {
2784
2926
  }
2785
2927
  __name(DropdownMenuLabel, "DropdownMenuLabel");
2786
2928
  function DropdownMenuSeparator({ className, ...props }) {
2787
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Separator, {
2929
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Separator, {
2788
2930
  "data-slot": "dropdown-menu-separator",
2789
2931
  className: cn("bg-border -mx-1 my-1 h-px", className),
2790
2932
  ...props
@@ -2792,7 +2934,7 @@ function DropdownMenuSeparator({ className, ...props }) {
2792
2934
  }
2793
2935
  __name(DropdownMenuSeparator, "DropdownMenuSeparator");
2794
2936
  function DropdownMenuShortcut({ className, ...props }) {
2795
- return /* @__PURE__ */ React25.createElement("span", {
2937
+ return /* @__PURE__ */ React26.createElement("span", {
2796
2938
  "data-slot": "dropdown-menu-shortcut",
2797
2939
  className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
2798
2940
  ...props
@@ -2800,25 +2942,25 @@ function DropdownMenuShortcut({ className, ...props }) {
2800
2942
  }
2801
2943
  __name(DropdownMenuShortcut, "DropdownMenuShortcut");
2802
2944
  function DropdownMenuSub({ ...props }) {
2803
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Sub, {
2945
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Sub, {
2804
2946
  "data-slot": "dropdown-menu-sub",
2805
2947
  ...props
2806
2948
  });
2807
2949
  }
2808
2950
  __name(DropdownMenuSub, "DropdownMenuSub");
2809
2951
  function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
2810
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.SubTrigger, {
2952
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.SubTrigger, {
2811
2953
  "data-slot": "dropdown-menu-sub-trigger",
2812
2954
  "data-inset": inset,
2813
2955
  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),
2814
2956
  ...props
2815
- }, children, /* @__PURE__ */ React25.createElement(ChevronRightIcon, {
2957
+ }, children, /* @__PURE__ */ React26.createElement(ChevronRightIcon, {
2816
2958
  className: "ml-auto size-4"
2817
2959
  }));
2818
2960
  }
2819
2961
  __name(DropdownMenuSubTrigger, "DropdownMenuSubTrigger");
2820
2962
  function DropdownMenuSubContent({ className, ...props }) {
2821
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.SubContent, {
2963
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.SubContent, {
2822
2964
  "data-slot": "dropdown-menu-sub-content",
2823
2965
  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),
2824
2966
  ...props
@@ -2826,7 +2968,7 @@ function DropdownMenuSubContent({ className, ...props }) {
2826
2968
  }
2827
2969
  __name(DropdownMenuSubContent, "DropdownMenuSubContent");
2828
2970
  function TooltipProvider({ delayDuration = 0, ...props }) {
2829
- return /* @__PURE__ */ React25.createElement(TooltipPrimitive.Provider, {
2971
+ return /* @__PURE__ */ React26.createElement(TooltipPrimitive.Provider, {
2830
2972
  "data-slot": "tooltip-provider",
2831
2973
  delayDuration,
2832
2974
  ...props
@@ -2834,26 +2976,26 @@ function TooltipProvider({ delayDuration = 0, ...props }) {
2834
2976
  }
2835
2977
  __name(TooltipProvider, "TooltipProvider");
2836
2978
  function Tooltip({ ...props }) {
2837
- return /* @__PURE__ */ React25.createElement(TooltipProvider, null, /* @__PURE__ */ React25.createElement(TooltipPrimitive.Root, {
2979
+ return /* @__PURE__ */ React26.createElement(TooltipProvider, null, /* @__PURE__ */ React26.createElement(TooltipPrimitive.Root, {
2838
2980
  "data-slot": "tooltip",
2839
2981
  ...props
2840
2982
  }));
2841
2983
  }
2842
2984
  __name(Tooltip, "Tooltip");
2843
2985
  function TooltipTrigger({ ...props }) {
2844
- return /* @__PURE__ */ React25.createElement(TooltipPrimitive.Trigger, {
2986
+ return /* @__PURE__ */ React26.createElement(TooltipPrimitive.Trigger, {
2845
2987
  "data-slot": "tooltip-trigger",
2846
2988
  ...props
2847
2989
  });
2848
2990
  }
2849
2991
  __name(TooltipTrigger, "TooltipTrigger");
2850
2992
  function TooltipContent({ className, sideOffset = 0, children, ...props }) {
2851
- return /* @__PURE__ */ React25.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React25.createElement(TooltipPrimitive.Content, {
2993
+ return /* @__PURE__ */ React26.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React26.createElement(TooltipPrimitive.Content, {
2852
2994
  "data-slot": "tooltip-content",
2853
2995
  sideOffset,
2854
2996
  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),
2855
2997
  ...props
2856
- }, children, /* @__PURE__ */ React25.createElement(TooltipPrimitive.Arrow, {
2998
+ }, children, /* @__PURE__ */ React26.createElement(TooltipPrimitive.Arrow, {
2857
2999
  className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"
2858
3000
  })));
2859
3001
  }
@@ -2884,44 +3026,44 @@ function DataGrid({ data, columns, searchable = false, searchPlaceholder = "Sear
2884
3026
  getSortedRowModel: getSortedRowModel(),
2885
3027
  getFilteredRowModel: getFilteredRowModel()
2886
3028
  });
2887
- return /* @__PURE__ */ React25__default.createElement("div", {
3029
+ return /* @__PURE__ */ React26__default.createElement("div", {
2888
3030
  className: clsx("lui-datagrid", className)
2889
- }, searchable && /* @__PURE__ */ React25__default.createElement("div", {
3031
+ }, searchable && /* @__PURE__ */ React26__default.createElement("div", {
2890
3032
  className: "lui-datagrid-search"
2891
- }, /* @__PURE__ */ React25__default.createElement("input", {
3033
+ }, /* @__PURE__ */ React26__default.createElement("input", {
2892
3034
  type: "text",
2893
3035
  value: globalFilter,
2894
3036
  onChange: /* @__PURE__ */ __name((e) => setGlobalFilter(e.target.value), "onChange"),
2895
3037
  placeholder: searchPlaceholder,
2896
3038
  className: "lui-datagrid-search-input"
2897
- })), /* @__PURE__ */ React25__default.createElement("div", {
3039
+ })), /* @__PURE__ */ React26__default.createElement("div", {
2898
3040
  className: "lui-datagrid-container"
2899
- }, /* @__PURE__ */ React25__default.createElement("table", {
3041
+ }, /* @__PURE__ */ React26__default.createElement("table", {
2900
3042
  className: "lui-datagrid-table"
2901
- }, /* @__PURE__ */ React25__default.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React25__default.createElement("tr", {
3043
+ }, /* @__PURE__ */ React26__default.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React26__default.createElement("tr", {
2902
3044
  key: headerGroup.id
2903
- }, headerGroup.headers.map((header) => /* @__PURE__ */ React25__default.createElement("th", {
3045
+ }, headerGroup.headers.map((header) => /* @__PURE__ */ React26__default.createElement("th", {
2904
3046
  key: header.id,
2905
3047
  className: clsx("lui-datagrid-th", header.column.getCanSort() && "lui-datagrid-th--sortable"),
2906
3048
  onClick: header.column.getToggleSortingHandler(),
2907
3049
  style: {
2908
3050
  width: header.column.getSize()
2909
3051
  }
2910
- }, /* @__PURE__ */ React25__default.createElement("div", {
3052
+ }, /* @__PURE__ */ React26__default.createElement("div", {
2911
3053
  className: "lui-datagrid-th-content"
2912
- }, flexRender(header.column.columnDef.header, header.getContext()), header.column.getIsSorted() && /* @__PURE__ */ React25__default.createElement("span", {
3054
+ }, flexRender(header.column.columnDef.header, header.getContext()), header.column.getIsSorted() && /* @__PURE__ */ React26__default.createElement("span", {
2913
3055
  className: "lui-datagrid-sort-icon"
2914
- }, header.column.getIsSorted() === "asc" ? "\u2191" : "\u2193"))))))), /* @__PURE__ */ React25__default.createElement("tbody", null, loading ? /* @__PURE__ */ React25__default.createElement("tr", null, /* @__PURE__ */ React25__default.createElement("td", {
3056
+ }, header.column.getIsSorted() === "asc" ? "\u2191" : "\u2193"))))))), /* @__PURE__ */ React26__default.createElement("tbody", null, loading ? /* @__PURE__ */ React26__default.createElement("tr", null, /* @__PURE__ */ React26__default.createElement("td", {
2915
3057
  colSpan: columns.length,
2916
3058
  className: "lui-datagrid-loading"
2917
- }, "Loading...")) : table.getRowModel().rows.length === 0 ? /* @__PURE__ */ React25__default.createElement("tr", null, /* @__PURE__ */ React25__default.createElement("td", {
3059
+ }, "Loading...")) : table.getRowModel().rows.length === 0 ? /* @__PURE__ */ React26__default.createElement("tr", null, /* @__PURE__ */ React26__default.createElement("td", {
2918
3060
  colSpan: columns.length,
2919
3061
  className: "lui-datagrid-empty"
2920
- }, emptyMessage)) : table.getRowModel().rows.map((row) => /* @__PURE__ */ React25__default.createElement("tr", {
3062
+ }, emptyMessage)) : table.getRowModel().rows.map((row) => /* @__PURE__ */ React26__default.createElement("tr", {
2921
3063
  key: row.id,
2922
3064
  className: clsx("lui-datagrid-row", onRowClick && "lui-datagrid-row--clickable"),
2923
3065
  onClick: /* @__PURE__ */ __name(() => onRowClick?.(row.original), "onClick")
2924
- }, row.getVisibleCells().map((cell) => /* @__PURE__ */ React25__default.createElement("td", {
3066
+ }, row.getVisibleCells().map((cell) => /* @__PURE__ */ React26__default.createElement("td", {
2925
3067
  key: cell.id,
2926
3068
  className: "lui-datagrid-td"
2927
3069
  }, flexRender(cell.column.columnDef.cell, cell.getContext())))))))));
@@ -2980,13 +3122,13 @@ function Chart({ type, data, options, height = 300, width = "100%", className })
2980
3122
  ...options?.plugins
2981
3123
  }
2982
3124
  };
2983
- return /* @__PURE__ */ React25__default.createElement("div", {
3125
+ return /* @__PURE__ */ React26__default.createElement("div", {
2984
3126
  className: clsx("lui-chart", className),
2985
3127
  style: {
2986
3128
  height,
2987
3129
  width
2988
3130
  }
2989
- }, /* @__PURE__ */ React25__default.createElement(Chart$2, {
3131
+ }, /* @__PURE__ */ React26__default.createElement(Chart$2, {
2990
3132
  type,
2991
3133
  data,
2992
3134
  options: mergedOptions
@@ -3035,37 +3177,37 @@ function AppShell({ header, sidebar, footer, sidebarPosition = "left", sidebarWi
3035
3177
  width: typeof sidebarWidth === "number" ? `${sidebarWidth}px` : sidebarWidth,
3036
3178
  flexShrink: 0
3037
3179
  };
3038
- return /* @__PURE__ */ React25__default.createElement("div", {
3180
+ return /* @__PURE__ */ React26__default.createElement("div", {
3039
3181
  ref: containerRef,
3040
3182
  className: clsx("lui-app-shell", `lui-app-shell--padding-${padding}`, className),
3041
3183
  ...props
3042
- }, header && /* @__PURE__ */ React25__default.createElement("header", {
3184
+ }, header && /* @__PURE__ */ React26__default.createElement("header", {
3043
3185
  className: "lui-app-shell-header"
3044
- }, header), /* @__PURE__ */ React25__default.createElement("div", {
3186
+ }, header), /* @__PURE__ */ React26__default.createElement("div", {
3045
3187
  className: "lui-app-shell-body"
3046
- }, sidebar && sidebarPosition === "left" && /* @__PURE__ */ React25__default.createElement("aside", {
3188
+ }, sidebar && sidebarPosition === "left" && /* @__PURE__ */ React26__default.createElement("aside", {
3047
3189
  className: "lui-app-shell-sidebar",
3048
3190
  style: sidebarStyle
3049
- }, sidebar), /* @__PURE__ */ React25__default.createElement("main", {
3191
+ }, sidebar), /* @__PURE__ */ React26__default.createElement("main", {
3050
3192
  className: "lui-app-shell-main"
3051
- }, children), sidebar && sidebarPosition === "right" && /* @__PURE__ */ React25__default.createElement("aside", {
3193
+ }, children), sidebar && sidebarPosition === "right" && /* @__PURE__ */ React26__default.createElement("aside", {
3052
3194
  className: "lui-app-shell-sidebar",
3053
3195
  style: sidebarStyle
3054
- }, sidebar)), footer && /* @__PURE__ */ React25__default.createElement("footer", {
3196
+ }, sidebar)), footer && /* @__PURE__ */ React26__default.createElement("footer", {
3055
3197
  className: "lui-app-shell-footer"
3056
3198
  }, footer));
3057
3199
  }
3058
3200
  __name(AppShell, "AppShell");
3059
3201
  function Tabs2({ tabs, defaultValue, value, onValueChange, children, className }) {
3060
3202
  const defaultTab = defaultValue || tabs[0]?.value;
3061
- return /* @__PURE__ */ React25__default.createElement(TabsPrimitive2.Root, {
3203
+ return /* @__PURE__ */ React26__default.createElement(TabsPrimitive2.Root, {
3062
3204
  className: clsx("lui-tabs", className),
3063
3205
  defaultValue: defaultTab,
3064
3206
  value,
3065
3207
  onValueChange
3066
- }, /* @__PURE__ */ React25__default.createElement(TabsPrimitive2.List, {
3208
+ }, /* @__PURE__ */ React26__default.createElement(TabsPrimitive2.List, {
3067
3209
  className: "lui-tabs-list"
3068
- }, tabs.map((tab) => /* @__PURE__ */ React25__default.createElement(TabsPrimitive2.Trigger, {
3210
+ }, tabs.map((tab) => /* @__PURE__ */ React26__default.createElement(TabsPrimitive2.Trigger, {
3069
3211
  key: tab.value,
3070
3212
  value: tab.value,
3071
3213
  disabled: tab.disabled,
@@ -3074,40 +3216,40 @@ function Tabs2({ tabs, defaultValue, value, onValueChange, children, className }
3074
3216
  }
3075
3217
  __name(Tabs2, "Tabs");
3076
3218
  function TabContent({ value, children, className }) {
3077
- return /* @__PURE__ */ React25__default.createElement(TabsPrimitive2.Content, {
3219
+ return /* @__PURE__ */ React26__default.createElement(TabsPrimitive2.Content, {
3078
3220
  value,
3079
3221
  className: clsx("lui-tabs-content", className)
3080
3222
  }, children);
3081
3223
  }
3082
3224
  __name(TabContent, "TabContent");
3083
3225
  function Modal({ open, defaultOpen, onOpenChange, title, description, children, className, trigger }) {
3084
- return /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Root, {
3226
+ return /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Root, {
3085
3227
  open,
3086
3228
  defaultOpen,
3087
3229
  onOpenChange
3088
- }, trigger && /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Trigger, {
3230
+ }, trigger && /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Trigger, {
3089
3231
  asChild: true
3090
- }, trigger), /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Portal, null, /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Overlay, {
3232
+ }, trigger), /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Portal, null, /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Overlay, {
3091
3233
  className: "lui-modal-overlay"
3092
- }), /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Content, {
3234
+ }), /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Content, {
3093
3235
  className: clsx("lui-modal-content", className)
3094
- }, title && /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Title, {
3236
+ }, title && /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Title, {
3095
3237
  className: "lui-modal-title"
3096
- }, title), description && /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Description, {
3238
+ }, title), description && /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Description, {
3097
3239
  className: "lui-modal-description"
3098
- }, description), children, /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Close, {
3240
+ }, description), children, /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Close, {
3099
3241
  className: "lui-modal-close",
3100
3242
  "aria-label": "Close"
3101
- }, /* @__PURE__ */ React25__default.createElement(CloseIcon, null)))));
3243
+ }, /* @__PURE__ */ React26__default.createElement(CloseIcon, null)))));
3102
3244
  }
3103
3245
  __name(Modal, "Modal");
3104
3246
  function CloseIcon() {
3105
- return /* @__PURE__ */ React25__default.createElement("svg", {
3247
+ return /* @__PURE__ */ React26__default.createElement("svg", {
3106
3248
  width: "14",
3107
3249
  height: "14",
3108
3250
  viewBox: "0 0 14 14",
3109
3251
  fill: "none"
3110
- }, /* @__PURE__ */ React25__default.createElement("path", {
3252
+ }, /* @__PURE__ */ React26__default.createElement("path", {
3111
3253
  d: "M3.5 3.5L10.5 10.5M10.5 3.5L3.5 10.5",
3112
3254
  stroke: "currentColor",
3113
3255
  strokeWidth: "1.5",
@@ -3116,55 +3258,55 @@ function CloseIcon() {
3116
3258
  }
3117
3259
  __name(CloseIcon, "CloseIcon");
3118
3260
  function CodeBlock({ code, language = "text", showLineNumbers = false, copyable = true, className }) {
3119
- const [copied, setCopied] = React25__default.useState(false);
3261
+ const [copied, setCopied] = React26__default.useState(false);
3120
3262
  const handleCopy = /* @__PURE__ */ __name(async () => {
3121
3263
  await navigator.clipboard.writeText(code);
3122
3264
  setCopied(true);
3123
3265
  setTimeout(() => setCopied(false), 2e3);
3124
3266
  }, "handleCopy");
3125
- return /* @__PURE__ */ React25__default.createElement("div", {
3267
+ return /* @__PURE__ */ React26__default.createElement("div", {
3126
3268
  className: clsx("lui-code-block", className)
3127
- }, copyable && /* @__PURE__ */ React25__default.createElement("button", {
3269
+ }, copyable && /* @__PURE__ */ React26__default.createElement("button", {
3128
3270
  type: "button",
3129
3271
  className: "lui-code-block-copy",
3130
3272
  onClick: handleCopy,
3131
3273
  "aria-label": copied ? "Copied!" : "Copy code"
3132
- }, copied ? /* @__PURE__ */ React25__default.createElement("svg", {
3274
+ }, copied ? /* @__PURE__ */ React26__default.createElement("svg", {
3133
3275
  viewBox: "0 0 24 24",
3134
3276
  fill: "none",
3135
3277
  stroke: "currentColor",
3136
3278
  strokeWidth: "2"
3137
- }, /* @__PURE__ */ React25__default.createElement("polyline", {
3279
+ }, /* @__PURE__ */ React26__default.createElement("polyline", {
3138
3280
  points: "20,6 9,17 4,12"
3139
- })) : /* @__PURE__ */ React25__default.createElement("svg", {
3281
+ })) : /* @__PURE__ */ React26__default.createElement("svg", {
3140
3282
  viewBox: "0 0 24 24",
3141
3283
  fill: "none",
3142
3284
  stroke: "currentColor",
3143
3285
  strokeWidth: "2"
3144
- }, /* @__PURE__ */ React25__default.createElement("rect", {
3286
+ }, /* @__PURE__ */ React26__default.createElement("rect", {
3145
3287
  x: "9",
3146
3288
  y: "9",
3147
3289
  width: "13",
3148
3290
  height: "13",
3149
3291
  rx: "2",
3150
3292
  ry: "2"
3151
- }), /* @__PURE__ */ React25__default.createElement("path", {
3293
+ }), /* @__PURE__ */ React26__default.createElement("path", {
3152
3294
  d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
3153
- }))), /* @__PURE__ */ React25__default.createElement(Highlight, {
3295
+ }))), /* @__PURE__ */ React26__default.createElement(Highlight, {
3154
3296
  theme: themes.nightOwl,
3155
3297
  code: code.trim(),
3156
3298
  language
3157
- }, ({ className: hlClassName, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React25__default.createElement("pre", {
3299
+ }, ({ className: hlClassName, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React26__default.createElement("pre", {
3158
3300
  className: clsx("lui-code-block-pre", hlClassName),
3159
3301
  style
3160
- }, tokens.map((line, i) => /* @__PURE__ */ React25__default.createElement("div", {
3302
+ }, tokens.map((line, i) => /* @__PURE__ */ React26__default.createElement("div", {
3161
3303
  key: i,
3162
3304
  ...getLineProps({
3163
3305
  line
3164
3306
  })
3165
- }, showLineNumbers && /* @__PURE__ */ React25__default.createElement("span", {
3307
+ }, showLineNumbers && /* @__PURE__ */ React26__default.createElement("span", {
3166
3308
  className: "lui-code-block-line-number"
3167
- }, i + 1), line.map((token, key) => /* @__PURE__ */ React25__default.createElement("span", {
3309
+ }, i + 1), line.map((token, key) => /* @__PURE__ */ React26__default.createElement("span", {
3168
3310
  key,
3169
3311
  ...getTokenProps({
3170
3312
  token
@@ -3173,7 +3315,7 @@ function CodeBlock({ code, language = "text", showLineNumbers = false, copyable
3173
3315
  }
3174
3316
  __name(CodeBlock, "CodeBlock");
3175
3317
  var Card2 = /* @__PURE__ */ forwardRef(({ className, variant = "default", padding = "md", interactive = false, children, ...props }, ref) => {
3176
- return /* @__PURE__ */ React25__default.createElement("div", {
3318
+ return /* @__PURE__ */ React26__default.createElement("div", {
3177
3319
  ref,
3178
3320
  className: clsx("lui-card", `lui-card--${variant}`, `lui-card--padding-${padding}`, interactive && "lui-card--interactive", className),
3179
3321
  ...props
@@ -3181,23 +3323,23 @@ var Card2 = /* @__PURE__ */ forwardRef(({ className, variant = "default", paddin
3181
3323
  });
3182
3324
  Card2.displayName = "Card";
3183
3325
  var CardHeader2 = /* @__PURE__ */ forwardRef(({ className, title, description, action, children, ...props }, ref) => {
3184
- return /* @__PURE__ */ React25__default.createElement("div", {
3326
+ return /* @__PURE__ */ React26__default.createElement("div", {
3185
3327
  ref,
3186
3328
  className: clsx("lui-card-header", className),
3187
3329
  ...props
3188
- }, (title || description) && /* @__PURE__ */ React25__default.createElement("div", {
3330
+ }, (title || description) && /* @__PURE__ */ React26__default.createElement("div", {
3189
3331
  className: "lui-card-header__text"
3190
- }, title && /* @__PURE__ */ React25__default.createElement("h3", {
3332
+ }, title && /* @__PURE__ */ React26__default.createElement("h3", {
3191
3333
  className: "lui-card-header__title"
3192
- }, title), description && /* @__PURE__ */ React25__default.createElement("p", {
3334
+ }, title), description && /* @__PURE__ */ React26__default.createElement("p", {
3193
3335
  className: "lui-card-header__description"
3194
- }, description)), action && /* @__PURE__ */ React25__default.createElement("div", {
3336
+ }, description)), action && /* @__PURE__ */ React26__default.createElement("div", {
3195
3337
  className: "lui-card-header__action"
3196
3338
  }, action), children);
3197
3339
  });
3198
3340
  CardHeader2.displayName = "CardHeader";
3199
3341
  var CardContent2 = /* @__PURE__ */ forwardRef(({ className, children, ...props }, ref) => {
3200
- return /* @__PURE__ */ React25__default.createElement("div", {
3342
+ return /* @__PURE__ */ React26__default.createElement("div", {
3201
3343
  ref,
3202
3344
  className: clsx("lui-card-content", className),
3203
3345
  ...props
@@ -3205,7 +3347,7 @@ var CardContent2 = /* @__PURE__ */ forwardRef(({ className, children, ...props }
3205
3347
  });
3206
3348
  CardContent2.displayName = "CardContent";
3207
3349
  var CardFooter2 = /* @__PURE__ */ forwardRef(({ className, children, ...props }, ref) => {
3208
- return /* @__PURE__ */ React25__default.createElement("div", {
3350
+ return /* @__PURE__ */ React26__default.createElement("div", {
3209
3351
  ref,
3210
3352
  className: clsx("lui-card-footer", className),
3211
3353
  ...props
@@ -3215,31 +3357,31 @@ CardFooter2.displayName = "CardFooter";
3215
3357
  var Input2 = /* @__PURE__ */ forwardRef(({ className, label, helperText, error, size = "md", leftElement, rightElement, fullWidth = false, id, ...props }, ref) => {
3216
3358
  const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
3217
3359
  const hasError = Boolean(error);
3218
- return /* @__PURE__ */ React25__default.createElement("div", {
3360
+ return /* @__PURE__ */ React26__default.createElement("div", {
3219
3361
  className: clsx("lui-input-wrapper", fullWidth && "lui-input-wrapper--full-width", className)
3220
- }, label && /* @__PURE__ */ React25__default.createElement("label", {
3362
+ }, label && /* @__PURE__ */ React26__default.createElement("label", {
3221
3363
  htmlFor: inputId,
3222
3364
  className: "lui-input-label"
3223
- }, label), /* @__PURE__ */ React25__default.createElement("div", {
3365
+ }, label), /* @__PURE__ */ React26__default.createElement("div", {
3224
3366
  className: 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")
3225
- }, leftElement && /* @__PURE__ */ React25__default.createElement("span", {
3367
+ }, leftElement && /* @__PURE__ */ React26__default.createElement("span", {
3226
3368
  className: "lui-input-element lui-input-element--left"
3227
- }, leftElement), /* @__PURE__ */ React25__default.createElement("input", {
3369
+ }, leftElement), /* @__PURE__ */ React26__default.createElement("input", {
3228
3370
  ref,
3229
3371
  id: inputId,
3230
3372
  className: "lui-input",
3231
3373
  "aria-invalid": hasError,
3232
3374
  "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : void 0,
3233
3375
  ...props
3234
- }), rightElement && /* @__PURE__ */ React25__default.createElement("span", {
3376
+ }), rightElement && /* @__PURE__ */ React26__default.createElement("span", {
3235
3377
  className: "lui-input-element lui-input-element--right"
3236
- }, rightElement)), (error || helperText) && /* @__PURE__ */ React25__default.createElement("p", {
3378
+ }, rightElement)), (error || helperText) && /* @__PURE__ */ React26__default.createElement("p", {
3237
3379
  id: error ? `${inputId}-error` : `${inputId}-helper`,
3238
3380
  className: clsx("lui-input-message", error && "lui-input-message--error")
3239
3381
  }, error || helperText));
3240
3382
  });
3241
3383
  Input2.displayName = "Input";
3242
3384
 
3243
- export { ActionButton, Alert, AlertDescription, AlertTitle, AppProvider, AppShell, Badge, Button2 as Button, Card2 as Card, CardContent2 as CardContent, CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle, Chart, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_RESULT_CONFIG, DataGrid, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, INITIAL_TOOL_STATE, Input2 as Input, Label2 as Label, Modal, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RequireConnection, ResourceView, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Skeleton, Slider, StreamingContent, Switch, TabContent, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs2 as Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, ToolButton, ToolDataGrid, ToolErrorBoundary, ToolForm, ToolInput, ToolProvider, ToolSelect, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, normalizeToolBinding, useFormField, useHostContext, useMcpApp, useMessage, useResource, useTool, useToolContext, useToolInput, useToolInputPartial, useToolResult, useToolStream, useToolSubscription };
3385
+ export { ActionButton, Alert, AlertDescription, AlertTitle, AppProvider, AppShell, Badge, Button2 as Button, Card2 as Card, CardContent2 as CardContent, CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle, Chart, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_RESULT_CONFIG, DataGrid, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GPTAppProvider, INITIAL_TOOL_STATE, Input2 as Input, Label2 as Label, Modal, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RequireConnection, ResourceView, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Skeleton, Slider, StreamingContent, Switch, TabContent, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs2 as Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, ToolButton, ToolDataGrid, ToolErrorBoundary, ToolForm, ToolInput, ToolProvider, ToolSelect, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, normalizeToolBinding, useFormField, useGptApp, useGptTool, useHostContext, useMcpApp, useMessage, useResource, useTool, useToolContext, useToolInput, useToolInputPartial, useToolResult, useToolStream, useToolSubscription };
3244
3386
  //# sourceMappingURL=index.mjs.map
3245
3387
  //# sourceMappingURL=index.mjs.map