@leanmcp/ui 0.2.1 → 0.3.1

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
@@ -666,26 +786,26 @@ function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, res
666
786
  return children(buttonState);
667
787
  }
668
788
  if (loading) {
669
- 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, {
670
790
  className: "animate-spin"
671
- }), loadingText && /* @__PURE__ */ React25.createElement("span", null, loadingText), !loadingText && children);
791
+ }), loadingText && /* @__PURE__ */ React26.createElement("span", null, loadingText), !loadingText && children);
672
792
  }
673
793
  if (showResult && resultDisplay === "inline") {
674
794
  if (error) {
675
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(X, {
795
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(X, {
676
796
  className: "text-destructive"
677
- }), /* @__PURE__ */ React25.createElement("span", null, error.message));
797
+ }), /* @__PURE__ */ React26.createElement("span", null, error.message));
678
798
  }
679
799
  if (renderResult) {
680
800
  return renderResult(result);
681
801
  }
682
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Check, {
802
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(Check, {
683
803
  className: "text-success"
684
- }), /* @__PURE__ */ React25.createElement("span", null, "Done"));
804
+ }), /* @__PURE__ */ React26.createElement("span", null, "Done"));
685
805
  }
686
806
  return children;
687
807
  }, "renderChildren");
688
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Button, {
808
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(Button, {
689
809
  type: "button",
690
810
  variant,
691
811
  size,
@@ -694,66 +814,66 @@ function ToolButton({ tool, args = {}, resultDisplay = "none", renderResult, res
694
814
  onClick: handleClick,
695
815
  asChild,
696
816
  ...props
697
- }, renderChildren()), confirm && /* @__PURE__ */ React25.createElement(Dialog, {
817
+ }, renderChildren()), confirm && /* @__PURE__ */ React26.createElement(Dialog, {
698
818
  open: showConfirm,
699
819
  onOpenChange: setShowConfirm
700
- }, /* @__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, {
701
821
  variant: "outline",
702
822
  onClick: /* @__PURE__ */ __name(() => setShowConfirm(false), "onClick")
703
- }, confirmConfig.cancelText ?? "Cancel"), /* @__PURE__ */ React25.createElement(Button, {
823
+ }, confirmConfig.cancelText ?? "Cancel"), /* @__PURE__ */ React26.createElement(Button, {
704
824
  variant: confirmConfig.confirmVariant ?? (variant === "destructive" ? "destructive" : "default"),
705
825
  onClick: handleConfirm
706
826
  }, confirmConfig.confirmText ?? "Confirm")))));
707
827
  }
708
828
  __name(ToolButton, "ToolButton");
709
829
  function Select({ ...props }) {
710
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Root, {
830
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Root, {
711
831
  "data-slot": "select",
712
832
  ...props
713
833
  });
714
834
  }
715
835
  __name(Select, "Select");
716
836
  function SelectGroup({ ...props }) {
717
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Group, {
837
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Group, {
718
838
  "data-slot": "select-group",
719
839
  ...props
720
840
  });
721
841
  }
722
842
  __name(SelectGroup, "SelectGroup");
723
843
  function SelectValue({ ...props }) {
724
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Value, {
844
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Value, {
725
845
  "data-slot": "select-value",
726
846
  ...props
727
847
  });
728
848
  }
729
849
  __name(SelectValue, "SelectValue");
730
850
  function SelectTrigger({ className, size = "default", children, ...props }) {
731
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Trigger, {
851
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Trigger, {
732
852
  "data-slot": "select-trigger",
733
853
  "data-size": size,
734
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),
735
855
  ...props
736
- }, children, /* @__PURE__ */ React25.createElement(SelectPrimitive.Icon, {
856
+ }, children, /* @__PURE__ */ React26.createElement(SelectPrimitive.Icon, {
737
857
  asChild: true
738
- }, /* @__PURE__ */ React25.createElement(ChevronDownIcon, {
858
+ }, /* @__PURE__ */ React26.createElement(ChevronDownIcon, {
739
859
  className: "size-4 opacity-50"
740
860
  })));
741
861
  }
742
862
  __name(SelectTrigger, "SelectTrigger");
743
863
  function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
744
- 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, {
745
865
  "data-slot": "select-content",
746
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),
747
867
  position,
748
868
  align,
749
869
  ...props
750
- }, /* @__PURE__ */ React25.createElement(SelectScrollUpButton, null), /* @__PURE__ */ React25.createElement(SelectPrimitive.Viewport, {
870
+ }, /* @__PURE__ */ React26.createElement(SelectScrollUpButton, null), /* @__PURE__ */ React26.createElement(SelectPrimitive.Viewport, {
751
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")
752
- }, children), /* @__PURE__ */ React25.createElement(SelectScrollDownButton, null)));
872
+ }, children), /* @__PURE__ */ React26.createElement(SelectScrollDownButton, null)));
753
873
  }
754
874
  __name(SelectContent, "SelectContent");
755
875
  function SelectLabel({ className, ...props }) {
756
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Label, {
876
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Label, {
757
877
  "data-slot": "select-label",
758
878
  className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
759
879
  ...props
@@ -761,20 +881,20 @@ function SelectLabel({ className, ...props }) {
761
881
  }
762
882
  __name(SelectLabel, "SelectLabel");
763
883
  function SelectItem({ className, children, ...props }) {
764
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Item, {
884
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Item, {
765
885
  "data-slot": "select-item",
766
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),
767
887
  ...props
768
- }, /* @__PURE__ */ React25.createElement("span", {
888
+ }, /* @__PURE__ */ React26.createElement("span", {
769
889
  "data-slot": "select-item-indicator",
770
890
  className: "absolute right-2 flex size-3.5 items-center justify-center"
771
- }, /* @__PURE__ */ React25.createElement(SelectPrimitive.ItemIndicator, null, /* @__PURE__ */ React25.createElement(CheckIcon, {
891
+ }, /* @__PURE__ */ React26.createElement(SelectPrimitive.ItemIndicator, null, /* @__PURE__ */ React26.createElement(CheckIcon, {
772
892
  className: "size-4"
773
- }))), /* @__PURE__ */ React25.createElement(SelectPrimitive.ItemText, null, children));
893
+ }))), /* @__PURE__ */ React26.createElement(SelectPrimitive.ItemText, null, children));
774
894
  }
775
895
  __name(SelectItem, "SelectItem");
776
896
  function SelectSeparator({ className, ...props }) {
777
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.Separator, {
897
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.Separator, {
778
898
  "data-slot": "select-separator",
779
899
  className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
780
900
  ...props
@@ -782,21 +902,21 @@ function SelectSeparator({ className, ...props }) {
782
902
  }
783
903
  __name(SelectSeparator, "SelectSeparator");
784
904
  function SelectScrollUpButton({ className, ...props }) {
785
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.ScrollUpButton, {
905
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.ScrollUpButton, {
786
906
  "data-slot": "select-scroll-up-button",
787
907
  className: cn("flex cursor-default items-center justify-center py-1", className),
788
908
  ...props
789
- }, /* @__PURE__ */ React25.createElement(ChevronUpIcon, {
909
+ }, /* @__PURE__ */ React26.createElement(ChevronUpIcon, {
790
910
  className: "size-4"
791
911
  }));
792
912
  }
793
913
  __name(SelectScrollUpButton, "SelectScrollUpButton");
794
914
  function SelectScrollDownButton({ className, ...props }) {
795
- return /* @__PURE__ */ React25.createElement(SelectPrimitive.ScrollDownButton, {
915
+ return /* @__PURE__ */ React26.createElement(SelectPrimitive.ScrollDownButton, {
796
916
  "data-slot": "select-scroll-down-button",
797
917
  className: cn("flex cursor-default items-center justify-center py-1", className),
798
918
  ...props
799
- }, /* @__PURE__ */ React25.createElement(ChevronDownIcon, {
919
+ }, /* @__PURE__ */ React26.createElement(ChevronDownIcon, {
800
920
  className: "size-4"
801
921
  }));
802
922
  }
@@ -861,35 +981,35 @@ function ToolSelect({ onSelectTool, argName = "value", additionalArgs = {}, opti
861
981
  ]);
862
982
  const isLoading = optionsHook.loading || selectHook.loading;
863
983
  const hasError = optionsHook.error || selectHook.error;
864
- return /* @__PURE__ */ React25.createElement(Select, {
984
+ return /* @__PURE__ */ React26.createElement(Select, {
865
985
  value,
866
986
  onValueChange: handleValueChange,
867
987
  disabled: disabled || isLoading
868
- }, /* @__PURE__ */ React25.createElement(SelectTrigger, {
988
+ }, /* @__PURE__ */ React26.createElement(SelectTrigger, {
869
989
  className: cn("w-full", className)
870
- }, isLoading ? /* @__PURE__ */ React25.createElement("div", {
990
+ }, isLoading ? /* @__PURE__ */ React26.createElement("div", {
871
991
  className: "flex items-center gap-2"
872
- }, /* @__PURE__ */ React25.createElement(Loader2, {
992
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
873
993
  className: "h-4 w-4 animate-spin"
874
- }), /* @__PURE__ */ React25.createElement("span", {
994
+ }), /* @__PURE__ */ React26.createElement("span", {
875
995
  className: "text-muted-foreground"
876
- }, optionsHook.loading ? loadingPlaceholder : "Saving...")) : /* @__PURE__ */ React25.createElement(SelectValue, {
996
+ }, optionsHook.loading ? loadingPlaceholder : "Saving...")) : /* @__PURE__ */ React26.createElement(SelectValue, {
877
997
  placeholder
878
- })), /* @__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", {
879
999
  className: "py-6 text-center text-sm text-muted-foreground"
880
- }, 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, {
881
1001
  key: option.value,
882
1002
  value: option.value,
883
1003
  disabled: option.disabled
884
- }, /* @__PURE__ */ React25.createElement("div", {
1004
+ }, /* @__PURE__ */ React26.createElement("div", {
885
1005
  className: "flex items-center gap-2"
886
- }, 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", {
887
1007
  className: "text-xs text-muted-foreground"
888
1008
  }, option.description)))))));
889
1009
  }
890
1010
  __name(ToolSelect, "ToolSelect");
891
1011
  function Input({ className, type, ...props }) {
892
- return /* @__PURE__ */ React25.createElement("input", {
1012
+ return /* @__PURE__ */ React26.createElement("input", {
893
1013
  type,
894
1014
  "data-slot": "input",
895
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),
@@ -898,7 +1018,7 @@ function Input({ className, type, ...props }) {
898
1018
  }
899
1019
  __name(Input, "Input");
900
1020
  function Command({ className, ...props }) {
901
- return /* @__PURE__ */ React25.createElement(Command$1, {
1021
+ return /* @__PURE__ */ React26.createElement(Command$1, {
902
1022
  "data-slot": "command",
903
1023
  className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
904
1024
  ...props
@@ -906,23 +1026,23 @@ function Command({ className, ...props }) {
906
1026
  }
907
1027
  __name(Command, "Command");
908
1028
  function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
909
- return /* @__PURE__ */ React25.createElement(Dialog, props, /* @__PURE__ */ React25.createElement(DialogHeader, {
1029
+ return /* @__PURE__ */ React26.createElement(Dialog, props, /* @__PURE__ */ React26.createElement(DialogHeader, {
910
1030
  className: "sr-only"
911
- }, /* @__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, {
912
1032
  className: cn("overflow-hidden p-0", className),
913
1033
  showCloseButton
914
- }, /* @__PURE__ */ React25.createElement(Command, {
1034
+ }, /* @__PURE__ */ React26.createElement(Command, {
915
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"
916
1036
  }, children)));
917
1037
  }
918
1038
  __name(CommandDialog, "CommandDialog");
919
1039
  function CommandInput({ className, ...props }) {
920
- return /* @__PURE__ */ React25.createElement("div", {
1040
+ return /* @__PURE__ */ React26.createElement("div", {
921
1041
  "data-slot": "command-input-wrapper",
922
1042
  className: "flex h-9 items-center gap-2 border-b px-3"
923
- }, /* @__PURE__ */ React25.createElement(SearchIcon, {
1043
+ }, /* @__PURE__ */ React26.createElement(SearchIcon, {
924
1044
  className: "size-4 shrink-0 opacity-50"
925
- }), /* @__PURE__ */ React25.createElement(Command$1.Input, {
1045
+ }), /* @__PURE__ */ React26.createElement(Command$1.Input, {
926
1046
  "data-slot": "command-input",
927
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),
928
1048
  ...props
@@ -930,7 +1050,7 @@ function CommandInput({ className, ...props }) {
930
1050
  }
931
1051
  __name(CommandInput, "CommandInput");
932
1052
  function CommandList({ className, ...props }) {
933
- return /* @__PURE__ */ React25.createElement(Command$1.List, {
1053
+ return /* @__PURE__ */ React26.createElement(Command$1.List, {
934
1054
  "data-slot": "command-list",
935
1055
  className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
936
1056
  ...props
@@ -938,7 +1058,7 @@ function CommandList({ className, ...props }) {
938
1058
  }
939
1059
  __name(CommandList, "CommandList");
940
1060
  function CommandEmpty({ ...props }) {
941
- return /* @__PURE__ */ React25.createElement(Command$1.Empty, {
1061
+ return /* @__PURE__ */ React26.createElement(Command$1.Empty, {
942
1062
  "data-slot": "command-empty",
943
1063
  className: "py-6 text-center text-sm",
944
1064
  ...props
@@ -946,7 +1066,7 @@ function CommandEmpty({ ...props }) {
946
1066
  }
947
1067
  __name(CommandEmpty, "CommandEmpty");
948
1068
  function CommandGroup({ className, ...props }) {
949
- return /* @__PURE__ */ React25.createElement(Command$1.Group, {
1069
+ return /* @__PURE__ */ React26.createElement(Command$1.Group, {
950
1070
  "data-slot": "command-group",
951
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),
952
1072
  ...props
@@ -954,7 +1074,7 @@ function CommandGroup({ className, ...props }) {
954
1074
  }
955
1075
  __name(CommandGroup, "CommandGroup");
956
1076
  function CommandSeparator({ className, ...props }) {
957
- return /* @__PURE__ */ React25.createElement(Command$1.Separator, {
1077
+ return /* @__PURE__ */ React26.createElement(Command$1.Separator, {
958
1078
  "data-slot": "command-separator",
959
1079
  className: cn("bg-border -mx-1 h-px", className),
960
1080
  ...props
@@ -962,7 +1082,7 @@ function CommandSeparator({ className, ...props }) {
962
1082
  }
963
1083
  __name(CommandSeparator, "CommandSeparator");
964
1084
  function CommandItem({ className, ...props }) {
965
- return /* @__PURE__ */ React25.createElement(Command$1.Item, {
1085
+ return /* @__PURE__ */ React26.createElement(Command$1.Item, {
966
1086
  "data-slot": "command-item",
967
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),
968
1088
  ...props
@@ -970,7 +1090,7 @@ function CommandItem({ className, ...props }) {
970
1090
  }
971
1091
  __name(CommandItem, "CommandItem");
972
1092
  function CommandShortcut({ className, ...props }) {
973
- return /* @__PURE__ */ React25.createElement("span", {
1093
+ return /* @__PURE__ */ React26.createElement("span", {
974
1094
  "data-slot": "command-shortcut",
975
1095
  className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
976
1096
  ...props
@@ -978,21 +1098,21 @@ function CommandShortcut({ className, ...props }) {
978
1098
  }
979
1099
  __name(CommandShortcut, "CommandShortcut");
980
1100
  function Popover({ ...props }) {
981
- return /* @__PURE__ */ React25.createElement(PopoverPrimitive.Root, {
1101
+ return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Root, {
982
1102
  "data-slot": "popover",
983
1103
  ...props
984
1104
  });
985
1105
  }
986
1106
  __name(Popover, "Popover");
987
1107
  function PopoverTrigger({ ...props }) {
988
- return /* @__PURE__ */ React25.createElement(PopoverPrimitive.Trigger, {
1108
+ return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Trigger, {
989
1109
  "data-slot": "popover-trigger",
990
1110
  ...props
991
1111
  });
992
1112
  }
993
1113
  __name(PopoverTrigger, "PopoverTrigger");
994
1114
  function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
995
- 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, {
996
1116
  "data-slot": "popover-content",
997
1117
  align,
998
1118
  sideOffset,
@@ -1002,7 +1122,7 @@ function PopoverContent({ className, align = "center", sideOffset = 4, ...props
1002
1122
  }
1003
1123
  __name(PopoverContent, "PopoverContent");
1004
1124
  function PopoverAnchor({ ...props }) {
1005
- return /* @__PURE__ */ React25.createElement(PopoverPrimitive.Anchor, {
1125
+ return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Anchor, {
1006
1126
  "data-slot": "popover-anchor",
1007
1127
  ...props
1008
1128
  });
@@ -1091,11 +1211,11 @@ function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query"
1091
1211
  }
1092
1212
  };
1093
1213
  }, []);
1094
- const inputElement = /* @__PURE__ */ React25.createElement("div", {
1214
+ const inputElement = /* @__PURE__ */ React26.createElement("div", {
1095
1215
  className: cn("relative", className)
1096
- }, showSearchIcon && /* @__PURE__ */ React25.createElement(Search, {
1216
+ }, showSearchIcon && /* @__PURE__ */ React26.createElement(Search, {
1097
1217
  className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"
1098
- }), /* @__PURE__ */ React25.createElement(Input, {
1218
+ }), /* @__PURE__ */ React26.createElement(Input, {
1099
1219
  ref: inputRef,
1100
1220
  value,
1101
1221
  onChange: handleChange,
@@ -1103,42 +1223,42 @@ function ToolInput({ searchTool, debounce = 300, minChars = 1, argName = "query"
1103
1223
  disabled,
1104
1224
  className: cn(showSearchIcon && "pl-9", (showClearButton || showLoadingIndicator) && "pr-9"),
1105
1225
  ...props
1106
- }), /* @__PURE__ */ React25.createElement("div", {
1226
+ }), /* @__PURE__ */ React26.createElement("div", {
1107
1227
  className: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1"
1108
- }, showLoadingIndicator && loading && /* @__PURE__ */ React25.createElement(Loader2, {
1228
+ }, showLoadingIndicator && loading && /* @__PURE__ */ React26.createElement(Loader2, {
1109
1229
  className: "h-4 w-4 animate-spin text-muted-foreground"
1110
- }), showClearButton && value && !loading && /* @__PURE__ */ React25.createElement("button", {
1230
+ }), showClearButton && value && !loading && /* @__PURE__ */ React26.createElement("button", {
1111
1231
  type: "button",
1112
1232
  onClick: handleClear,
1113
1233
  className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors"
1114
- }, /* @__PURE__ */ React25.createElement(X, {
1234
+ }, /* @__PURE__ */ React26.createElement(X, {
1115
1235
  className: "h-4 w-4"
1116
1236
  }))));
1117
1237
  if (!autocomplete) {
1118
1238
  return inputElement;
1119
1239
  }
1120
- return /* @__PURE__ */ React25.createElement(Popover, {
1240
+ return /* @__PURE__ */ React26.createElement(Popover, {
1121
1241
  open: isOpen,
1122
1242
  onOpenChange: setIsOpen
1123
- }, /* @__PURE__ */ React25.createElement(PopoverTrigger, {
1243
+ }, /* @__PURE__ */ React26.createElement(PopoverTrigger, {
1124
1244
  asChild: true
1125
- }, inputElement), /* @__PURE__ */ React25.createElement(PopoverContent, {
1245
+ }, inputElement), /* @__PURE__ */ React26.createElement(PopoverContent, {
1126
1246
  className: "p-0 w-[var(--radix-popover-trigger-width)]",
1127
1247
  align: "start",
1128
1248
  onOpenAutoFocus: /* @__PURE__ */ __name((e) => e.preventDefault(), "onOpenAutoFocus")
1129
- }, /* @__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, {
1130
1250
  key: suggestion.value,
1131
1251
  value: suggestion.value,
1132
1252
  onSelect: /* @__PURE__ */ __name(() => handleSelect(suggestion), "onSelect")
1133
- }, /* @__PURE__ */ React25.createElement("div", {
1253
+ }, /* @__PURE__ */ React26.createElement("div", {
1134
1254
  className: "flex items-center gap-2"
1135
- }, 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", {
1136
1256
  className: "text-xs text-muted-foreground"
1137
1257
  }, suggestion.description))))))))));
1138
1258
  }
1139
1259
  __name(ToolInput, "ToolInput");
1140
1260
  function Label2({ className, ...props }) {
1141
- return /* @__PURE__ */ React25.createElement(LabelPrimitive.Root, {
1261
+ return /* @__PURE__ */ React26.createElement(LabelPrimitive.Root, {
1142
1262
  "data-slot": "label",
1143
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),
1144
1264
  ...props
@@ -1146,7 +1266,7 @@ function Label2({ className, ...props }) {
1146
1266
  }
1147
1267
  __name(Label2, "Label");
1148
1268
  function Textarea({ className, ...props }) {
1149
- return /* @__PURE__ */ React25.createElement("textarea", {
1269
+ return /* @__PURE__ */ React26.createElement("textarea", {
1150
1270
  "data-slot": "textarea",
1151
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),
1152
1272
  ...props
@@ -1154,20 +1274,20 @@ function Textarea({ className, ...props }) {
1154
1274
  }
1155
1275
  __name(Textarea, "Textarea");
1156
1276
  function Checkbox({ className, ...props }) {
1157
- return /* @__PURE__ */ React25.createElement(CheckboxPrimitive.Root, {
1277
+ return /* @__PURE__ */ React26.createElement(CheckboxPrimitive.Root, {
1158
1278
  "data-slot": "checkbox",
1159
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),
1160
1280
  ...props
1161
- }, /* @__PURE__ */ React25.createElement(CheckboxPrimitive.Indicator, {
1281
+ }, /* @__PURE__ */ React26.createElement(CheckboxPrimitive.Indicator, {
1162
1282
  "data-slot": "checkbox-indicator",
1163
1283
  className: "grid place-content-center text-current transition-none"
1164
- }, /* @__PURE__ */ React25.createElement(CheckIcon, {
1284
+ }, /* @__PURE__ */ React26.createElement(CheckIcon, {
1165
1285
  className: "size-3.5"
1166
1286
  })));
1167
1287
  }
1168
1288
  __name(Checkbox, "Checkbox");
1169
1289
  function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
1170
- 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 : [
1171
1291
  min,
1172
1292
  max
1173
1293
  ], [
@@ -1176,7 +1296,7 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
1176
1296
  min,
1177
1297
  max
1178
1298
  ]);
1179
- return /* @__PURE__ */ React25.createElement(SliderPrimitive.Root, {
1299
+ return /* @__PURE__ */ React26.createElement(SliderPrimitive.Root, {
1180
1300
  "data-slot": "slider",
1181
1301
  defaultValue,
1182
1302
  value,
@@ -1184,15 +1304,15 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
1184
1304
  max,
1185
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),
1186
1306
  ...props
1187
- }, /* @__PURE__ */ React25.createElement(SliderPrimitive.Track, {
1307
+ }, /* @__PURE__ */ React26.createElement(SliderPrimitive.Track, {
1188
1308
  "data-slot": "slider-track",
1189
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")
1190
- }, /* @__PURE__ */ React25.createElement(SliderPrimitive.Range, {
1310
+ }, /* @__PURE__ */ React26.createElement(SliderPrimitive.Range, {
1191
1311
  "data-slot": "slider-range",
1192
1312
  className: cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
1193
1313
  })), Array.from({
1194
1314
  length: _values.length
1195
- }, (_, index) => /* @__PURE__ */ React25.createElement(SliderPrimitive.Thumb, {
1315
+ }, (_, index) => /* @__PURE__ */ React26.createElement(SliderPrimitive.Thumb, {
1196
1316
  "data-slot": "slider-thumb",
1197
1317
  key: index,
1198
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"
@@ -1200,11 +1320,11 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
1200
1320
  }
1201
1321
  __name(Slider, "Slider");
1202
1322
  function Switch({ className, ...props }) {
1203
- return /* @__PURE__ */ React25.createElement(SwitchPrimitive.Root, {
1323
+ return /* @__PURE__ */ React26.createElement(SwitchPrimitive.Root, {
1204
1324
  "data-slot": "switch",
1205
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),
1206
1326
  ...props
1207
- }, /* @__PURE__ */ React25.createElement(SwitchPrimitive.Thumb, {
1327
+ }, /* @__PURE__ */ React26.createElement(SwitchPrimitive.Thumb, {
1208
1328
  "data-slot": "switch-thumb",
1209
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")
1210
1330
  }));
@@ -1222,7 +1342,7 @@ var alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm gri
1222
1342
  }
1223
1343
  });
1224
1344
  function Alert({ className, variant, ...props }) {
1225
- return /* @__PURE__ */ React25.createElement("div", {
1345
+ return /* @__PURE__ */ React26.createElement("div", {
1226
1346
  "data-slot": "alert",
1227
1347
  role: "alert",
1228
1348
  className: cn(alertVariants({
@@ -1233,7 +1353,7 @@ function Alert({ className, variant, ...props }) {
1233
1353
  }
1234
1354
  __name(Alert, "Alert");
1235
1355
  function AlertTitle({ className, ...props }) {
1236
- return /* @__PURE__ */ React25.createElement("div", {
1356
+ return /* @__PURE__ */ React26.createElement("div", {
1237
1357
  "data-slot": "alert-title",
1238
1358
  className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
1239
1359
  ...props
@@ -1241,7 +1361,7 @@ function AlertTitle({ className, ...props }) {
1241
1361
  }
1242
1362
  __name(AlertTitle, "AlertTitle");
1243
1363
  function AlertDescription({ className, ...props }) {
1244
- return /* @__PURE__ */ React25.createElement("div", {
1364
+ return /* @__PURE__ */ React26.createElement("div", {
1245
1365
  "data-slot": "alert-description",
1246
1366
  className: cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className),
1247
1367
  ...props
@@ -1335,7 +1455,7 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1335
1455
  const value = formData[field.name];
1336
1456
  switch (field.type) {
1337
1457
  case "textarea":
1338
- return /* @__PURE__ */ React25.createElement(Textarea, {
1458
+ return /* @__PURE__ */ React26.createElement(Textarea, {
1339
1459
  id: field.name,
1340
1460
  placeholder: field.placeholder,
1341
1461
  value: value ?? "",
@@ -1344,45 +1464,45 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1344
1464
  required: field.required
1345
1465
  });
1346
1466
  case "select":
1347
- return /* @__PURE__ */ React25.createElement(Select, {
1467
+ return /* @__PURE__ */ React26.createElement(Select, {
1348
1468
  value: value ?? "",
1349
1469
  onValueChange: /* @__PURE__ */ __name((v) => handleChange(field.name, v), "onValueChange"),
1350
1470
  disabled: field.disabled || loading
1351
- }, /* @__PURE__ */ React25.createElement(SelectTrigger, null, /* @__PURE__ */ React25.createElement(SelectValue, {
1471
+ }, /* @__PURE__ */ React26.createElement(SelectTrigger, null, /* @__PURE__ */ React26.createElement(SelectValue, {
1352
1472
  placeholder: field.placeholder ?? "Select..."
1353
- })), /* @__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, {
1354
1474
  key: option.value,
1355
1475
  value: option.value
1356
1476
  }, option.label))));
1357
1477
  case "checkbox":
1358
- return /* @__PURE__ */ React25.createElement("div", {
1478
+ return /* @__PURE__ */ React26.createElement("div", {
1359
1479
  className: "flex items-center space-x-2"
1360
- }, /* @__PURE__ */ React25.createElement(Checkbox, {
1480
+ }, /* @__PURE__ */ React26.createElement(Checkbox, {
1361
1481
  id: field.name,
1362
1482
  checked: value ?? false,
1363
1483
  onCheckedChange: /* @__PURE__ */ __name((checked) => handleChange(field.name, checked), "onCheckedChange"),
1364
1484
  disabled: field.disabled || loading
1365
- }), /* @__PURE__ */ React25.createElement("label", {
1485
+ }), /* @__PURE__ */ React26.createElement("label", {
1366
1486
  htmlFor: field.name,
1367
1487
  className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1368
1488
  }, field.label));
1369
1489
  case "switch":
1370
- return /* @__PURE__ */ React25.createElement("div", {
1490
+ return /* @__PURE__ */ React26.createElement("div", {
1371
1491
  className: "flex items-center space-x-2"
1372
- }, /* @__PURE__ */ React25.createElement(Switch, {
1492
+ }, /* @__PURE__ */ React26.createElement(Switch, {
1373
1493
  id: field.name,
1374
1494
  checked: value ?? false,
1375
1495
  onCheckedChange: /* @__PURE__ */ __name((checked) => handleChange(field.name, checked), "onCheckedChange"),
1376
1496
  disabled: field.disabled || loading
1377
- }), /* @__PURE__ */ React25.createElement(Label2, {
1497
+ }), /* @__PURE__ */ React26.createElement(Label2, {
1378
1498
  htmlFor: field.name
1379
1499
  }, field.label));
1380
1500
  case "slider":
1381
- return /* @__PURE__ */ React25.createElement("div", {
1501
+ return /* @__PURE__ */ React26.createElement("div", {
1382
1502
  className: "space-y-2"
1383
- }, /* @__PURE__ */ React25.createElement("div", {
1503
+ }, /* @__PURE__ */ React26.createElement("div", {
1384
1504
  className: "flex justify-between text-sm"
1385
- }, /* @__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, {
1386
1506
  value: [
1387
1507
  value ?? field.min ?? 0
1388
1508
  ],
@@ -1393,7 +1513,7 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1393
1513
  disabled: field.disabled || loading
1394
1514
  }));
1395
1515
  case "number":
1396
- return /* @__PURE__ */ React25.createElement(Input, {
1516
+ return /* @__PURE__ */ React26.createElement(Input, {
1397
1517
  id: field.name,
1398
1518
  type: "number",
1399
1519
  placeholder: field.placeholder,
@@ -1406,7 +1526,7 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1406
1526
  required: field.required
1407
1527
  });
1408
1528
  default:
1409
- return /* @__PURE__ */ React25.createElement(Input, {
1529
+ return /* @__PURE__ */ React26.createElement(Input, {
1410
1530
  id: field.name,
1411
1531
  type: field.type ?? "text",
1412
1532
  placeholder: field.placeholder,
@@ -1418,38 +1538,38 @@ function ToolForm({ toolName, fields: manualFields, autoSchema = false, submitTe
1418
1538
  }
1419
1539
  }, "renderField");
1420
1540
  if (schemaLoading) {
1421
- return /* @__PURE__ */ React25.createElement("div", {
1541
+ return /* @__PURE__ */ React26.createElement("div", {
1422
1542
  className: "flex items-center justify-center p-8"
1423
- }, /* @__PURE__ */ React25.createElement(Loader2, {
1543
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
1424
1544
  className: "h-6 w-6 animate-spin text-muted-foreground"
1425
1545
  }));
1426
1546
  }
1427
- return /* @__PURE__ */ React25.createElement("form", {
1547
+ return /* @__PURE__ */ React26.createElement("form", {
1428
1548
  className: cn("space-y-4", className),
1429
1549
  onSubmit: handleSubmit
1430
- }, /* @__PURE__ */ React25.createElement("div", {
1550
+ }, /* @__PURE__ */ React26.createElement("div", {
1431
1551
  className: cn("space-y-4", layout === "horizontal" && "grid grid-cols-2 gap-4")
1432
- }, fields.map((field) => /* @__PURE__ */ React25.createElement("div", {
1552
+ }, fields.map((field) => /* @__PURE__ */ React26.createElement("div", {
1433
1553
  key: field.name,
1434
1554
  className: "space-y-2"
1435
- }, field.type !== "checkbox" && field.type !== "switch" && /* @__PURE__ */ React25.createElement(Label2, {
1555
+ }, field.type !== "checkbox" && field.type !== "switch" && /* @__PURE__ */ React26.createElement(Label2, {
1436
1556
  htmlFor: field.name
1437
- }, field.label, field.required && /* @__PURE__ */ React25.createElement("span", {
1557
+ }, field.label, field.required && /* @__PURE__ */ React26.createElement("span", {
1438
1558
  className: "text-destructive ml-1"
1439
- }, "*")), renderField(field), field.description && /* @__PURE__ */ React25.createElement("p", {
1559
+ }, "*")), renderField(field), field.description && /* @__PURE__ */ React26.createElement("p", {
1440
1560
  className: "text-sm text-muted-foreground"
1441
- }, field.description)))), /* @__PURE__ */ React25.createElement("div", {
1561
+ }, field.description)))), /* @__PURE__ */ React26.createElement("div", {
1442
1562
  className: "flex items-center gap-2"
1443
- }, /* @__PURE__ */ React25.createElement(Button, {
1563
+ }, /* @__PURE__ */ React26.createElement(Button, {
1444
1564
  type: "submit",
1445
1565
  disabled: loading
1446
- }, loading ? /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Loader2, {
1566
+ }, loading ? /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(Loader2, {
1447
1567
  className: "h-4 w-4 animate-spin mr-2"
1448
- }), loadingText ?? "Submitting...") : submitText)), error && /* @__PURE__ */ React25.createElement(Alert, {
1568
+ }), loadingText ?? "Submitting...") : submitText)), error && /* @__PURE__ */ React26.createElement(Alert, {
1449
1569
  variant: "destructive"
1450
- }, /* @__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", {
1451
1571
  className: "rounded-md bg-muted p-4"
1452
- }, /* @__PURE__ */ React25.createElement("pre", {
1572
+ }, /* @__PURE__ */ React26.createElement("pre", {
1453
1573
  className: "text-sm overflow-auto"
1454
1574
  }, JSON.stringify(result, null, 2))));
1455
1575
  }
@@ -1537,6 +1657,10 @@ function useResource(uri, options = {}) {
1537
1657
  fetchResource
1538
1658
  ]);
1539
1659
  useEffect(() => {
1660
+ if (intervalRef.current) {
1661
+ clearInterval(intervalRef.current);
1662
+ intervalRef.current = null;
1663
+ }
1540
1664
  if (refreshInterval && refreshInterval > 0 && isConnected && !skip) {
1541
1665
  intervalRef.current = setInterval(() => {
1542
1666
  fetchResource().catch(() => {
@@ -1572,7 +1696,7 @@ function useResource(uri, options = {}) {
1572
1696
  }
1573
1697
  __name(useResource, "useResource");
1574
1698
  function Skeleton({ className, ...props }) {
1575
- return /* @__PURE__ */ React25__default.createElement("div", {
1699
+ return /* @__PURE__ */ React26__default.createElement("div", {
1576
1700
  "data-slot": "skeleton",
1577
1701
  className: cn("bg-accent animate-pulse rounded-md", className),
1578
1702
  ...props
@@ -1582,30 +1706,30 @@ __name(Skeleton, "Skeleton");
1582
1706
 
1583
1707
  // src/mcp/ResourceView.tsx
1584
1708
  function DefaultLoading() {
1585
- return /* @__PURE__ */ React25.createElement("div", {
1709
+ return /* @__PURE__ */ React26.createElement("div", {
1586
1710
  className: "flex flex-col gap-3 p-4"
1587
- }, /* @__PURE__ */ React25.createElement(Skeleton, {
1711
+ }, /* @__PURE__ */ React26.createElement(Skeleton, {
1588
1712
  className: "h-4 w-3/4"
1589
- }), /* @__PURE__ */ React25.createElement(Skeleton, {
1713
+ }), /* @__PURE__ */ React26.createElement(Skeleton, {
1590
1714
  className: "h-4 w-1/2"
1591
- }), /* @__PURE__ */ React25.createElement(Skeleton, {
1715
+ }), /* @__PURE__ */ React26.createElement(Skeleton, {
1592
1716
  className: "h-20 w-full"
1593
1717
  }));
1594
1718
  }
1595
1719
  __name(DefaultLoading, "DefaultLoading");
1596
1720
  function DefaultError({ error, onRetry }) {
1597
- return /* @__PURE__ */ React25.createElement(Alert, {
1721
+ return /* @__PURE__ */ React26.createElement(Alert, {
1598
1722
  variant: "destructive"
1599
- }, /* @__PURE__ */ React25.createElement(AlertCircle, {
1723
+ }, /* @__PURE__ */ React26.createElement(AlertCircle, {
1600
1724
  className: "h-4 w-4"
1601
- }), /* @__PURE__ */ React25.createElement(AlertTitle, null, "Error loading resource"), /* @__PURE__ */ React25.createElement(AlertDescription, {
1725
+ }), /* @__PURE__ */ React26.createElement(AlertTitle, null, "Error loading resource"), /* @__PURE__ */ React26.createElement(AlertDescription, {
1602
1726
  className: "flex flex-col gap-2"
1603
- }, /* @__PURE__ */ React25.createElement("span", null, error.message), /* @__PURE__ */ React25.createElement(Button, {
1727
+ }, /* @__PURE__ */ React26.createElement("span", null, error.message), /* @__PURE__ */ React26.createElement(Button, {
1604
1728
  variant: "outline",
1605
1729
  size: "sm",
1606
1730
  onClick: onRetry,
1607
1731
  className: "w-fit"
1608
- }, /* @__PURE__ */ React25.createElement(RefreshCw, {
1732
+ }, /* @__PURE__ */ React26.createElement(RefreshCw, {
1609
1733
  className: "h-4 w-4 mr-2"
1610
1734
  }), "Retry")));
1611
1735
  }
@@ -1625,42 +1749,42 @@ function ResourceView({ uri, refreshInterval, subscribe, transform, loading: loa
1625
1749
  };
1626
1750
  if (loading && data === null) {
1627
1751
  if (loadingContent) {
1628
- return /* @__PURE__ */ React25.createElement("div", {
1752
+ return /* @__PURE__ */ React26.createElement("div", {
1629
1753
  className
1630
1754
  }, loadingContent);
1631
1755
  }
1632
- return /* @__PURE__ */ React25.createElement("div", {
1756
+ return /* @__PURE__ */ React26.createElement("div", {
1633
1757
  className: cn("flex items-center justify-center p-8", className)
1634
- }, /* @__PURE__ */ React25.createElement(Loader2, {
1758
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
1635
1759
  className: "h-8 w-8 animate-spin text-muted-foreground"
1636
1760
  }));
1637
1761
  }
1638
1762
  if (error && data === null) {
1639
1763
  if (errorContent) {
1640
1764
  if (typeof errorContent === "function") {
1641
- return /* @__PURE__ */ React25.createElement("div", {
1765
+ return /* @__PURE__ */ React26.createElement("div", {
1642
1766
  className
1643
1767
  }, errorContent(error, refresh));
1644
1768
  }
1645
- return /* @__PURE__ */ React25.createElement("div", {
1769
+ return /* @__PURE__ */ React26.createElement("div", {
1646
1770
  className
1647
1771
  }, errorContent);
1648
1772
  }
1649
- return /* @__PURE__ */ React25.createElement("div", {
1773
+ return /* @__PURE__ */ React26.createElement("div", {
1650
1774
  className
1651
- }, /* @__PURE__ */ React25.createElement(DefaultError, {
1775
+ }, /* @__PURE__ */ React26.createElement(DefaultError, {
1652
1776
  error,
1653
1777
  onRetry: refresh
1654
1778
  }));
1655
1779
  }
1656
1780
  if (data !== null) {
1657
- return /* @__PURE__ */ React25.createElement("div", {
1781
+ return /* @__PURE__ */ React26.createElement("div", {
1658
1782
  className
1659
1783
  }, children(data, meta));
1660
1784
  }
1661
- return /* @__PURE__ */ React25.createElement("div", {
1785
+ return /* @__PURE__ */ React26.createElement("div", {
1662
1786
  className
1663
- }, loadingContent ?? /* @__PURE__ */ React25.createElement(DefaultLoading, null));
1787
+ }, loadingContent ?? /* @__PURE__ */ React26.createElement(DefaultLoading, null));
1664
1788
  }
1665
1789
  __name(ResourceView, "ResourceView");
1666
1790
  function useToolStream(options = {}) {
@@ -1709,11 +1833,11 @@ function useToolStream(options = {}) {
1709
1833
  }
1710
1834
  __name(useToolStream, "useToolStream");
1711
1835
  function Progress({ className, value, ...props }) {
1712
- return /* @__PURE__ */ React25.createElement(ProgressPrimitive.Root, {
1836
+ return /* @__PURE__ */ React26.createElement(ProgressPrimitive.Root, {
1713
1837
  "data-slot": "progress",
1714
1838
  className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
1715
1839
  ...props
1716
- }, /* @__PURE__ */ React25.createElement(ProgressPrimitive.Indicator, {
1840
+ }, /* @__PURE__ */ React26.createElement(ProgressPrimitive.Indicator, {
1717
1841
  "data-slot": "progress-indicator",
1718
1842
  className: "bg-primary h-full w-full flex-1 transition-all",
1719
1843
  style: {
@@ -1732,44 +1856,44 @@ function StreamingContent({ fallback, showProgress = false, progress: externalPr
1732
1856
  const data = complete ?? partial;
1733
1857
  if (!data) {
1734
1858
  if (fallback) {
1735
- return /* @__PURE__ */ React25.createElement("div", {
1859
+ return /* @__PURE__ */ React26.createElement("div", {
1736
1860
  className
1737
1861
  }, fallback);
1738
1862
  }
1739
- return /* @__PURE__ */ React25.createElement("div", {
1863
+ return /* @__PURE__ */ React26.createElement("div", {
1740
1864
  className: cn("flex items-center justify-center p-8", className)
1741
- }, /* @__PURE__ */ React25.createElement(Loader2, {
1865
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
1742
1866
  className: "h-6 w-6 animate-spin text-muted-foreground"
1743
1867
  }));
1744
1868
  }
1745
1869
  const streamingClasses = cn(streamingStyle === "opacity" && isStreaming && "opacity-70", streamingStyle === "blur" && isStreaming && "blur-[1px]");
1746
- return /* @__PURE__ */ React25.createElement("div", {
1870
+ return /* @__PURE__ */ React26.createElement("div", {
1747
1871
  className: cn("relative", className)
1748
- }, showProgress && isStreaming && /* @__PURE__ */ React25.createElement("div", {
1872
+ }, showProgress && isStreaming && /* @__PURE__ */ React26.createElement("div", {
1749
1873
  className: "absolute top-0 left-0 right-0 z-10"
1750
- }, externalProgress !== void 0 ? /* @__PURE__ */ React25.createElement(Progress, {
1874
+ }, externalProgress !== void 0 ? /* @__PURE__ */ React26.createElement(Progress, {
1751
1875
  value: externalProgress,
1752
1876
  className: "h-1"
1753
- }) : /* @__PURE__ */ React25.createElement("div", {
1877
+ }) : /* @__PURE__ */ React26.createElement("div", {
1754
1878
  className: "h-1 bg-primary/20 overflow-hidden"
1755
- }, /* @__PURE__ */ React25.createElement("div", {
1879
+ }, /* @__PURE__ */ React26.createElement("div", {
1756
1880
  className: "h-full w-1/3 bg-primary animate-[shimmer_1s_infinite]"
1757
- }))), isStreaming && /* @__PURE__ */ React25.createElement("div", {
1881
+ }))), isStreaming && /* @__PURE__ */ React26.createElement("div", {
1758
1882
  className: "absolute top-2 right-2 z-10"
1759
- }, /* @__PURE__ */ React25.createElement("div", {
1883
+ }, /* @__PURE__ */ React26.createElement("div", {
1760
1884
  className: "flex items-center gap-1 px-2 py-1 rounded-full bg-muted text-muted-foreground text-xs"
1761
- }, /* @__PURE__ */ React25.createElement(Loader2, {
1885
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
1762
1886
  className: "h-3 w-3 animate-spin"
1763
- }), /* @__PURE__ */ React25.createElement("span", null, "Streaming..."))), /* @__PURE__ */ React25.createElement("div", {
1887
+ }), /* @__PURE__ */ React26.createElement("span", null, "Streaming..."))), /* @__PURE__ */ React26.createElement("div", {
1764
1888
  className: cn("transition-all duration-200", streamingClasses)
1765
1889
  }, children(data, isComplete)));
1766
1890
  }
1767
1891
  __name(StreamingContent, "StreamingContent");
1768
1892
  function Table({ className, ...props }) {
1769
- return /* @__PURE__ */ React25.createElement("div", {
1893
+ return /* @__PURE__ */ React26.createElement("div", {
1770
1894
  "data-slot": "table-container",
1771
1895
  className: "relative w-full overflow-x-auto"
1772
- }, /* @__PURE__ */ React25.createElement("table", {
1896
+ }, /* @__PURE__ */ React26.createElement("table", {
1773
1897
  "data-slot": "table",
1774
1898
  className: cn("w-full caption-bottom text-sm", className),
1775
1899
  ...props
@@ -1777,7 +1901,7 @@ function Table({ className, ...props }) {
1777
1901
  }
1778
1902
  __name(Table, "Table");
1779
1903
  function TableHeader({ className, ...props }) {
1780
- return /* @__PURE__ */ React25.createElement("thead", {
1904
+ return /* @__PURE__ */ React26.createElement("thead", {
1781
1905
  "data-slot": "table-header",
1782
1906
  className: cn("[&_tr]:border-b", className),
1783
1907
  ...props
@@ -1785,7 +1909,7 @@ function TableHeader({ className, ...props }) {
1785
1909
  }
1786
1910
  __name(TableHeader, "TableHeader");
1787
1911
  function TableBody({ className, ...props }) {
1788
- return /* @__PURE__ */ React25.createElement("tbody", {
1912
+ return /* @__PURE__ */ React26.createElement("tbody", {
1789
1913
  "data-slot": "table-body",
1790
1914
  className: cn("[&_tr:last-child]:border-0", className),
1791
1915
  ...props
@@ -1793,7 +1917,7 @@ function TableBody({ className, ...props }) {
1793
1917
  }
1794
1918
  __name(TableBody, "TableBody");
1795
1919
  function TableFooter({ className, ...props }) {
1796
- return /* @__PURE__ */ React25.createElement("tfoot", {
1920
+ return /* @__PURE__ */ React26.createElement("tfoot", {
1797
1921
  "data-slot": "table-footer",
1798
1922
  className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
1799
1923
  ...props
@@ -1801,7 +1925,7 @@ function TableFooter({ className, ...props }) {
1801
1925
  }
1802
1926
  __name(TableFooter, "TableFooter");
1803
1927
  function TableRow({ className, ...props }) {
1804
- return /* @__PURE__ */ React25.createElement("tr", {
1928
+ return /* @__PURE__ */ React26.createElement("tr", {
1805
1929
  "data-slot": "table-row",
1806
1930
  className: cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className),
1807
1931
  ...props
@@ -1809,7 +1933,7 @@ function TableRow({ className, ...props }) {
1809
1933
  }
1810
1934
  __name(TableRow, "TableRow");
1811
1935
  function TableHead({ className, ...props }) {
1812
- return /* @__PURE__ */ React25.createElement("th", {
1936
+ return /* @__PURE__ */ React26.createElement("th", {
1813
1937
  "data-slot": "table-head",
1814
1938
  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),
1815
1939
  ...props
@@ -1817,7 +1941,7 @@ function TableHead({ className, ...props }) {
1817
1941
  }
1818
1942
  __name(TableHead, "TableHead");
1819
1943
  function TableCell({ className, ...props }) {
1820
- return /* @__PURE__ */ React25.createElement("td", {
1944
+ return /* @__PURE__ */ React26.createElement("td", {
1821
1945
  "data-slot": "table-cell",
1822
1946
  className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
1823
1947
  ...props
@@ -1825,7 +1949,7 @@ function TableCell({ className, ...props }) {
1825
1949
  }
1826
1950
  __name(TableCell, "TableCell");
1827
1951
  function TableCaption({ className, ...props }) {
1828
- return /* @__PURE__ */ React25.createElement("caption", {
1952
+ return /* @__PURE__ */ React26.createElement("caption", {
1829
1953
  "data-slot": "table-caption",
1830
1954
  className: cn("text-muted-foreground mt-4 text-sm", className),
1831
1955
  ...props
@@ -1894,8 +2018,8 @@ function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagin
1894
2018
  paginationState,
1895
2019
  sortState
1896
2020
  ]);
1897
- const initialFetchDone = React25.useRef(false);
1898
- const prevStateRef = React25.useRef({
2021
+ const initialFetchDone = React26.useRef(false);
2022
+ const prevStateRef = React26.useRef({
1899
2023
  pagination: paginationState,
1900
2024
  sort: sortState
1901
2025
  });
@@ -1951,129 +2075,129 @@ function ToolDataGrid({ dataTool, columns, transformData, rowActions = [], pagin
1951
2075
  const canNextPage = paginationState.page < totalPages;
1952
2076
  const getSortIcon = /* @__PURE__ */ __name((column) => {
1953
2077
  if (sortState.column !== column) {
1954
- return /* @__PURE__ */ React25.createElement(ArrowUpDown, {
2078
+ return /* @__PURE__ */ React26.createElement(ArrowUpDown, {
1955
2079
  className: "h-4 w-4"
1956
2080
  });
1957
2081
  }
1958
- return sortState.direction === "asc" ? /* @__PURE__ */ React25.createElement(ArrowUp, {
2082
+ return sortState.direction === "asc" ? /* @__PURE__ */ React26.createElement(ArrowUp, {
1959
2083
  className: "h-4 w-4"
1960
- }) : /* @__PURE__ */ React25.createElement(ArrowDown, {
2084
+ }) : /* @__PURE__ */ React26.createElement(ArrowDown, {
1961
2085
  className: "h-4 w-4"
1962
2086
  });
1963
2087
  }, "getSortIcon");
1964
2088
  const renderLoading = /* @__PURE__ */ __name(() => {
1965
2089
  if (loadingContent) return loadingContent;
1966
- return /* @__PURE__ */ React25.createElement("div", {
2090
+ return /* @__PURE__ */ React26.createElement("div", {
1967
2091
  className: "space-y-2"
1968
2092
  }, Array.from({
1969
2093
  length: 5
1970
- }).map((_, i) => /* @__PURE__ */ React25.createElement(Skeleton, {
2094
+ }).map((_, i) => /* @__PURE__ */ React26.createElement(Skeleton, {
1971
2095
  key: i,
1972
2096
  className: "h-12 w-full"
1973
2097
  })));
1974
2098
  }, "renderLoading");
1975
2099
  const renderEmpty = /* @__PURE__ */ __name(() => {
1976
2100
  if (emptyContent) return emptyContent;
1977
- return /* @__PURE__ */ React25.createElement("div", {
2101
+ return /* @__PURE__ */ React26.createElement("div", {
1978
2102
  className: "flex flex-col items-center justify-center py-12 text-muted-foreground"
1979
- }, /* @__PURE__ */ React25.createElement("p", {
2103
+ }, /* @__PURE__ */ React26.createElement("p", {
1980
2104
  className: "text-lg"
1981
- }, "No data found"), /* @__PURE__ */ React25.createElement(Button, {
2105
+ }, "No data found"), /* @__PURE__ */ React26.createElement(Button, {
1982
2106
  variant: "ghost",
1983
2107
  size: "sm",
1984
2108
  onClick: fetchData,
1985
2109
  className: "mt-2"
1986
- }, /* @__PURE__ */ React25.createElement(RefreshCw, {
2110
+ }, /* @__PURE__ */ React26.createElement(RefreshCw, {
1987
2111
  className: "h-4 w-4 mr-2"
1988
2112
  }), "Refresh"));
1989
2113
  }, "renderEmpty");
1990
- return /* @__PURE__ */ React25.createElement("div", {
2114
+ return /* @__PURE__ */ React26.createElement("div", {
1991
2115
  className: cn("space-y-4", className)
1992
- }, showRefresh && /* @__PURE__ */ React25.createElement("div", {
2116
+ }, showRefresh && /* @__PURE__ */ React26.createElement("div", {
1993
2117
  className: "flex items-center justify-end gap-2"
1994
- }, /* @__PURE__ */ React25.createElement(Button, {
2118
+ }, /* @__PURE__ */ React26.createElement(Button, {
1995
2119
  variant: "outline",
1996
2120
  size: "sm",
1997
2121
  onClick: fetchData,
1998
2122
  disabled: loading
1999
- }, loading ? /* @__PURE__ */ React25.createElement(Loader2, {
2123
+ }, loading ? /* @__PURE__ */ React26.createElement(Loader2, {
2000
2124
  className: "h-4 w-4 animate-spin"
2001
- }) : /* @__PURE__ */ React25.createElement(RefreshCw, {
2125
+ }) : /* @__PURE__ */ React26.createElement(RefreshCw, {
2002
2126
  className: "h-4 w-4"
2003
- }), /* @__PURE__ */ React25.createElement("span", {
2127
+ }), /* @__PURE__ */ React26.createElement("span", {
2004
2128
  className: "ml-2"
2005
- }, "Refresh"))), /* @__PURE__ */ React25.createElement("div", {
2129
+ }, "Refresh"))), /* @__PURE__ */ React26.createElement("div", {
2006
2130
  className: "rounded-md border"
2007
- }, loading && data.rows.length === 0 ? /* @__PURE__ */ React25.createElement("div", {
2131
+ }, loading && data.rows.length === 0 ? /* @__PURE__ */ React26.createElement("div", {
2008
2132
  className: "p-4"
2009
- }, 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, {
2133
+ }, 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, {
2010
2134
  key: column.key,
2011
2135
  style: {
2012
2136
  width: column.width
2013
2137
  },
2014
2138
  className: cn(column.align === "center" && "text-center", column.align === "right" && "text-right", column.hideMobile && "hidden md:table-cell")
2015
- }, column.sortable ? /* @__PURE__ */ React25.createElement(Button, {
2139
+ }, column.sortable ? /* @__PURE__ */ React26.createElement(Button, {
2016
2140
  variant: "ghost",
2017
2141
  size: "sm",
2018
2142
  onClick: /* @__PURE__ */ __name(() => handleSort(column.key), "onClick"),
2019
2143
  className: "-ml-3"
2020
- }, column.header, getSortIcon(column.key)) : column.header)), rowActions.length > 0 && /* @__PURE__ */ React25.createElement(TableHead, {
2144
+ }, column.header, getSortIcon(column.key)) : column.header)), rowActions.length > 0 && /* @__PURE__ */ React26.createElement(TableHead, {
2021
2145
  className: "w-[100px]"
2022
- }, "Actions"))), /* @__PURE__ */ React25.createElement(TableBody, null, data.rows.map((row, index) => {
2146
+ }, "Actions"))), /* @__PURE__ */ React26.createElement(TableBody, null, data.rows.map((row, index) => {
2023
2147
  const key = getRowKey?.(row, index) ?? String(index);
2024
- return /* @__PURE__ */ React25.createElement(TableRow, {
2148
+ return /* @__PURE__ */ React26.createElement(TableRow, {
2025
2149
  key,
2026
2150
  onClick: /* @__PURE__ */ __name(() => onRowClick?.(row, index), "onClick"),
2027
2151
  className: onRowClick ? "cursor-pointer" : void 0
2028
2152
  }, columns.map((column) => {
2029
2153
  const value = getNestedValue(row, column.key);
2030
- return /* @__PURE__ */ React25.createElement(TableCell, {
2154
+ return /* @__PURE__ */ React26.createElement(TableCell, {
2031
2155
  key: column.key,
2032
2156
  className: cn(column.align === "center" && "text-center", column.align === "right" && "text-right", column.hideMobile && "hidden md:table-cell")
2033
2157
  }, column.render ? column.render(value, row, index) : String(value ?? ""));
2034
- }), rowActions.length > 0 && /* @__PURE__ */ React25.createElement(TableCell, null, /* @__PURE__ */ React25.createElement("div", {
2158
+ }), rowActions.length > 0 && /* @__PURE__ */ React26.createElement(TableCell, null, /* @__PURE__ */ React26.createElement("div", {
2035
2159
  className: "flex items-center gap-1"
2036
- }, rowActions.filter((action) => !action.hidden?.(row)).map((action, actionIndex) => /* @__PURE__ */ React25.createElement(RowActionButton, {
2160
+ }, rowActions.filter((action) => !action.hidden?.(row)).map((action, actionIndex) => /* @__PURE__ */ React26.createElement(RowActionButton, {
2037
2161
  key: actionIndex,
2038
2162
  action,
2039
2163
  row,
2040
2164
  onRefresh: fetchData
2041
2165
  })))));
2042
- })))), pagination && data.total > 0 && /* @__PURE__ */ React25.createElement("div", {
2166
+ })))), pagination && data.total > 0 && /* @__PURE__ */ React26.createElement("div", {
2043
2167
  className: "flex items-center justify-between"
2044
- }, /* @__PURE__ */ React25.createElement("div", {
2168
+ }, /* @__PURE__ */ React26.createElement("div", {
2045
2169
  className: "text-sm text-muted-foreground"
2046
- }, "Showing ", (paginationState.page - 1) * paginationState.pageSize + 1, " to", " ", Math.min(paginationState.page * paginationState.pageSize, data.total), " of", " ", data.total, " results"), /* @__PURE__ */ React25.createElement("div", {
2170
+ }, "Showing ", (paginationState.page - 1) * paginationState.pageSize + 1, " to", " ", Math.min(paginationState.page * paginationState.pageSize, data.total), " of", " ", data.total, " results"), /* @__PURE__ */ React26.createElement("div", {
2047
2171
  className: "flex items-center gap-4"
2048
- }, /* @__PURE__ */ React25.createElement("div", {
2172
+ }, /* @__PURE__ */ React26.createElement("div", {
2049
2173
  className: "flex items-center gap-2"
2050
- }, /* @__PURE__ */ React25.createElement("span", {
2174
+ }, /* @__PURE__ */ React26.createElement("span", {
2051
2175
  className: "text-sm text-muted-foreground"
2052
- }, "Rows per page"), /* @__PURE__ */ React25.createElement(Select, {
2176
+ }, "Rows per page"), /* @__PURE__ */ React26.createElement(Select, {
2053
2177
  value: String(paginationState.pageSize),
2054
2178
  onValueChange: handlePageSizeChange
2055
- }, /* @__PURE__ */ React25.createElement(SelectTrigger, {
2179
+ }, /* @__PURE__ */ React26.createElement(SelectTrigger, {
2056
2180
  className: "w-[70px]"
2057
- }, /* @__PURE__ */ React25.createElement(SelectValue, null)), /* @__PURE__ */ React25.createElement(SelectContent, null, pageSizes.map((size) => /* @__PURE__ */ React25.createElement(SelectItem, {
2181
+ }, /* @__PURE__ */ React26.createElement(SelectValue, null)), /* @__PURE__ */ React26.createElement(SelectContent, null, pageSizes.map((size) => /* @__PURE__ */ React26.createElement(SelectItem, {
2058
2182
  key: size,
2059
2183
  value: String(size)
2060
- }, size))))), /* @__PURE__ */ React25.createElement("div", {
2184
+ }, size))))), /* @__PURE__ */ React26.createElement("div", {
2061
2185
  className: "flex items-center gap-2"
2062
- }, /* @__PURE__ */ React25.createElement(Button, {
2186
+ }, /* @__PURE__ */ React26.createElement(Button, {
2063
2187
  variant: "outline",
2064
2188
  size: "sm",
2065
2189
  onClick: /* @__PURE__ */ __name(() => handlePageChange(paginationState.page - 1), "onClick"),
2066
2190
  disabled: !canPreviousPage || loading
2067
- }, /* @__PURE__ */ React25.createElement(ChevronLeft, {
2191
+ }, /* @__PURE__ */ React26.createElement(ChevronLeft, {
2068
2192
  className: "h-4 w-4"
2069
- })), /* @__PURE__ */ React25.createElement("span", {
2193
+ })), /* @__PURE__ */ React26.createElement("span", {
2070
2194
  className: "text-sm"
2071
- }, "Page ", paginationState.page, " of ", totalPages), /* @__PURE__ */ React25.createElement(Button, {
2195
+ }, "Page ", paginationState.page, " of ", totalPages), /* @__PURE__ */ React26.createElement(Button, {
2072
2196
  variant: "outline",
2073
2197
  size: "sm",
2074
2198
  onClick: /* @__PURE__ */ __name(() => handlePageChange(paginationState.page + 1), "onClick"),
2075
2199
  disabled: !canNextPage || loading
2076
- }, /* @__PURE__ */ React25.createElement(ChevronRight, {
2200
+ }, /* @__PURE__ */ React26.createElement(ChevronRight, {
2077
2201
  className: "h-4 w-4"
2078
2202
  }))))));
2079
2203
  }
@@ -2105,33 +2229,33 @@ function RowActionButton({ action, row, onRefresh }) {
2105
2229
  call,
2106
2230
  args
2107
2231
  ]);
2108
- return /* @__PURE__ */ React25.createElement(Button, {
2232
+ return /* @__PURE__ */ React26.createElement(Button, {
2109
2233
  variant: action.variant ?? "ghost",
2110
2234
  size: "sm",
2111
2235
  onClick: handleClick,
2112
2236
  disabled: loading
2113
- }, loading ? /* @__PURE__ */ React25.createElement(Loader2, {
2237
+ }, loading ? /* @__PURE__ */ React26.createElement(Loader2, {
2114
2238
  className: "h-3 w-3 animate-spin"
2115
- }) : /* @__PURE__ */ React25.createElement(React25.Fragment, null, action.icon, /* @__PURE__ */ React25.createElement("span", {
2239
+ }) : /* @__PURE__ */ React26.createElement(React26.Fragment, null, action.icon, /* @__PURE__ */ React26.createElement("span", {
2116
2240
  className: action.icon ? "ml-1" : ""
2117
2241
  }, action.label)));
2118
2242
  }
2119
2243
  __name(RowActionButton, "RowActionButton");
2120
2244
  var Button2 = /* @__PURE__ */ forwardRef(({ className, variant = "primary", size = "md", loading = false, disabled, asChild = false, leftIcon, rightIcon, children, ...props }, ref) => {
2121
2245
  const Comp = asChild ? Slot : "button";
2122
- return /* @__PURE__ */ React25__default.createElement(Comp, {
2246
+ return /* @__PURE__ */ React26__default.createElement(Comp, {
2123
2247
  ref,
2124
2248
  className: clsx("lui-button", `lui-button--${variant}`, `lui-button--${size}`, loading && "lui-button--loading", className),
2125
2249
  disabled: disabled || loading,
2126
2250
  ...props
2127
- }, loading && /* @__PURE__ */ React25__default.createElement("span", {
2251
+ }, loading && /* @__PURE__ */ React26__default.createElement("span", {
2128
2252
  className: "lui-button__spinner",
2129
2253
  "aria-hidden": "true"
2130
- }, /* @__PURE__ */ React25__default.createElement("svg", {
2254
+ }, /* @__PURE__ */ React26__default.createElement("svg", {
2131
2255
  viewBox: "0 0 24 24",
2132
2256
  fill: "none",
2133
2257
  className: "lui-spinner-icon"
2134
- }, /* @__PURE__ */ React25__default.createElement("circle", {
2258
+ }, /* @__PURE__ */ React26__default.createElement("circle", {
2135
2259
  cx: "12",
2136
2260
  cy: "12",
2137
2261
  r: "10",
@@ -2140,11 +2264,11 @@ var Button2 = /* @__PURE__ */ forwardRef(({ className, variant = "primary", size
2140
2264
  strokeLinecap: "round",
2141
2265
  strokeDasharray: "32",
2142
2266
  strokeDashoffset: "12"
2143
- }))), leftIcon && !loading && /* @__PURE__ */ React25__default.createElement("span", {
2267
+ }))), leftIcon && !loading && /* @__PURE__ */ React26__default.createElement("span", {
2144
2268
  className: "lui-button__icon"
2145
- }, leftIcon), /* @__PURE__ */ React25__default.createElement("span", {
2269
+ }, leftIcon), /* @__PURE__ */ React26__default.createElement("span", {
2146
2270
  className: "lui-button__content"
2147
- }, children), rightIcon && /* @__PURE__ */ React25__default.createElement("span", {
2271
+ }, children), rightIcon && /* @__PURE__ */ React26__default.createElement("span", {
2148
2272
  className: "lui-button__icon"
2149
2273
  }, rightIcon));
2150
2274
  });
@@ -2163,103 +2287,112 @@ function ActionButton({ toolName, toolArgs = {}, onToolSuccess, onToolError, sho
2163
2287
  onToolError?.(err instanceof Error ? err : new Error(String(err)));
2164
2288
  }
2165
2289
  }, "handleClick");
2166
- return /* @__PURE__ */ React25__default.createElement("div", {
2290
+ return /* @__PURE__ */ React26__default.createElement("div", {
2167
2291
  className: "lui-action-button-wrapper"
2168
- }, /* @__PURE__ */ React25__default.createElement(Button2, {
2292
+ }, /* @__PURE__ */ React26__default.createElement(Button2, {
2169
2293
  ...buttonProps,
2170
2294
  loading,
2171
2295
  onClick: handleClick
2172
- }, children), showResult && hasResult && result !== null && /* @__PURE__ */ React25__default.createElement("div", {
2296
+ }, children), showResult && hasResult && result !== null && /* @__PURE__ */ React26__default.createElement("div", {
2173
2297
  className: "lui-action-button-result"
2174
- }, renderResult ? renderResult(result) : /* @__PURE__ */ React25__default.createElement("pre", null, JSON.stringify(result, null, 2))), error && /* @__PURE__ */ React25__default.createElement("div", {
2298
+ }, renderResult ? renderResult(result) : /* @__PURE__ */ React26__default.createElement("pre", null, JSON.stringify(result, null, 2))), error && /* @__PURE__ */ React26__default.createElement("div", {
2175
2299
  className: "lui-action-button-error"
2176
2300
  }, error.message));
2177
2301
  }
2178
2302
  __name(ActionButton, "ActionButton");
2179
2303
  function DefaultLoading2() {
2180
- return /* @__PURE__ */ React25.createElement("div", {
2304
+ return /* @__PURE__ */ React26.createElement("div", {
2181
2305
  className: "flex items-center justify-center p-8"
2182
- }, /* @__PURE__ */ React25.createElement(Loader2, {
2306
+ }, /* @__PURE__ */ React26.createElement(Loader2, {
2183
2307
  className: "h-6 w-6 animate-spin text-muted-foreground"
2184
2308
  }));
2185
2309
  }
2186
2310
  __name(DefaultLoading2, "DefaultLoading");
2187
2311
  function DefaultDisconnected() {
2188
- return /* @__PURE__ */ React25.createElement(Alert, null, /* @__PURE__ */ React25.createElement(WifiOff, {
2312
+ return /* @__PURE__ */ React26.createElement(Alert, null, /* @__PURE__ */ React26.createElement(WifiOff, {
2189
2313
  className: "h-4 w-4"
2190
- }), /* @__PURE__ */ React25.createElement(AlertDescription, null, "Waiting for connection to MCP host..."));
2314
+ }), /* @__PURE__ */ React26.createElement(AlertDescription, null, "Waiting for connection to MCP host..."));
2191
2315
  }
2192
2316
  __name(DefaultDisconnected, "DefaultDisconnected");
2193
2317
  function DefaultError2({ error }) {
2194
- return /* @__PURE__ */ React25.createElement(Alert, {
2318
+ return /* @__PURE__ */ React26.createElement(Alert, {
2195
2319
  variant: "destructive"
2196
- }, /* @__PURE__ */ React25.createElement(AlertCircle, {
2320
+ }, /* @__PURE__ */ React26.createElement(AlertCircle, {
2197
2321
  className: "h-4 w-4"
2198
- }), /* @__PURE__ */ React25.createElement(AlertDescription, null, "Connection error: ", error.message));
2322
+ }), /* @__PURE__ */ React26.createElement(AlertDescription, null, "Connection error: ", error.message));
2199
2323
  }
2200
2324
  __name(DefaultError2, "DefaultError");
2201
2325
  function RequireConnection({ loading: loadingContent, error: errorContent, disconnected: disconnectedContent, children, className }) {
2202
2326
  const { isConnected, error, app } = useMcpApp();
2327
+ console.log("[RequireConnection] State:", {
2328
+ hasApp: !!app,
2329
+ isConnected,
2330
+ hasError: !!error
2331
+ });
2203
2332
  if (!app && !error && !isConnected) {
2333
+ console.log("[RequireConnection] Rendering: Initial Loading");
2204
2334
  if (loadingContent) {
2205
- return /* @__PURE__ */ React25.createElement("div", {
2335
+ return /* @__PURE__ */ React26.createElement("div", {
2206
2336
  className
2207
2337
  }, loadingContent);
2208
2338
  }
2209
- return /* @__PURE__ */ React25.createElement("div", {
2339
+ return /* @__PURE__ */ React26.createElement("div", {
2210
2340
  className
2211
- }, /* @__PURE__ */ React25.createElement(DefaultLoading2, null));
2341
+ }, /* @__PURE__ */ React26.createElement(DefaultLoading2, null));
2212
2342
  }
2213
2343
  if (error) {
2344
+ console.log("[RequireConnection] Rendering: Error");
2214
2345
  if (errorContent) {
2215
2346
  if (typeof errorContent === "function") {
2216
- return /* @__PURE__ */ React25.createElement("div", {
2347
+ return /* @__PURE__ */ React26.createElement("div", {
2217
2348
  className
2218
2349
  }, errorContent(error));
2219
2350
  }
2220
- return /* @__PURE__ */ React25.createElement("div", {
2351
+ return /* @__PURE__ */ React26.createElement("div", {
2221
2352
  className
2222
2353
  }, errorContent);
2223
2354
  }
2224
- return /* @__PURE__ */ React25.createElement("div", {
2355
+ return /* @__PURE__ */ React26.createElement("div", {
2225
2356
  className
2226
- }, /* @__PURE__ */ React25.createElement(DefaultError2, {
2357
+ }, /* @__PURE__ */ React26.createElement(DefaultError2, {
2227
2358
  error
2228
2359
  }));
2229
2360
  }
2230
2361
  if (!isConnected) {
2362
+ console.log("[RequireConnection] Rendering: Disconnected/Loading");
2231
2363
  if (disconnectedContent) {
2232
- return /* @__PURE__ */ React25.createElement("div", {
2364
+ return /* @__PURE__ */ React26.createElement("div", {
2233
2365
  className
2234
2366
  }, disconnectedContent);
2235
2367
  }
2236
2368
  if (loadingContent) {
2237
- return /* @__PURE__ */ React25.createElement("div", {
2369
+ return /* @__PURE__ */ React26.createElement("div", {
2238
2370
  className
2239
2371
  }, loadingContent);
2240
2372
  }
2241
- return /* @__PURE__ */ React25.createElement("div", {
2373
+ return /* @__PURE__ */ React26.createElement("div", {
2242
2374
  className
2243
- }, /* @__PURE__ */ React25.createElement(DefaultDisconnected, null));
2375
+ }, /* @__PURE__ */ React26.createElement(DefaultDisconnected, null));
2244
2376
  }
2245
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, children);
2377
+ console.log("[RequireConnection] Rendering: Children (Connected)");
2378
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, children);
2246
2379
  }
2247
2380
  __name(RequireConnection, "RequireConnection");
2248
2381
  function DefaultFallback({ error, onRetry }) {
2249
- return /* @__PURE__ */ React25.createElement(Alert, {
2382
+ return /* @__PURE__ */ React26.createElement(Alert, {
2250
2383
  variant: "destructive"
2251
- }, /* @__PURE__ */ React25.createElement(AlertCircle, {
2384
+ }, /* @__PURE__ */ React26.createElement(AlertCircle, {
2252
2385
  className: "h-4 w-4"
2253
- }), /* @__PURE__ */ React25.createElement(AlertTitle, null, "Something went wrong"), /* @__PURE__ */ React25.createElement(AlertDescription, {
2386
+ }), /* @__PURE__ */ React26.createElement(AlertTitle, null, "Something went wrong"), /* @__PURE__ */ React26.createElement(AlertDescription, {
2254
2387
  className: "flex flex-col gap-3"
2255
- }, /* @__PURE__ */ React25.createElement("p", {
2388
+ }, /* @__PURE__ */ React26.createElement("p", {
2256
2389
  className: "text-sm"
2257
- }, error.message), /* @__PURE__ */ React25.createElement(Button, {
2390
+ }, error.message), /* @__PURE__ */ React26.createElement(Button, {
2258
2391
  variant: "outline",
2259
2392
  size: "sm",
2260
2393
  onClick: onRetry,
2261
2394
  className: "w-fit"
2262
- }, /* @__PURE__ */ React25.createElement(RefreshCw, {
2395
+ }, /* @__PURE__ */ React26.createElement(RefreshCw, {
2263
2396
  className: "h-4 w-4 mr-2"
2264
2397
  }), "Try Again")));
2265
2398
  }
@@ -2305,7 +2438,7 @@ var ToolErrorBoundary = class extends Component {
2305
2438
  }
2306
2439
  return fallback;
2307
2440
  }
2308
- return /* @__PURE__ */ React25.createElement(DefaultFallback, {
2441
+ return /* @__PURE__ */ React26.createElement(DefaultFallback, {
2309
2442
  error,
2310
2443
  onRetry: this.reset
2311
2444
  });
@@ -2458,7 +2591,10 @@ function useToolSubscription(toolName, options = {}) {
2458
2591
  setIsPolling(false);
2459
2592
  }, []);
2460
2593
  const start = useCallback(() => {
2461
- stop();
2594
+ if (intervalRef.current) {
2595
+ clearInterval(intervalRef.current);
2596
+ intervalRef.current = null;
2597
+ }
2462
2598
  setIsPolling(true);
2463
2599
  toolHook.call(args).catch(() => {
2464
2600
  });
@@ -2469,8 +2605,7 @@ function useToolSubscription(toolName, options = {}) {
2469
2605
  }, [
2470
2606
  toolHook.call,
2471
2607
  args,
2472
- interval,
2473
- stop
2608
+ interval
2474
2609
  ]);
2475
2610
  const refresh = useCallback(async () => {
2476
2611
  return toolHook.call(args);
@@ -2522,7 +2657,7 @@ var INITIAL_TOOL_STATE = {
2522
2657
  hasResult: false
2523
2658
  };
2524
2659
  function CardTitle({ className, ...props }) {
2525
- return /* @__PURE__ */ React25.createElement("div", {
2660
+ return /* @__PURE__ */ React26.createElement("div", {
2526
2661
  "data-slot": "card-title",
2527
2662
  className: cn("leading-none font-semibold", className),
2528
2663
  ...props
@@ -2530,7 +2665,7 @@ function CardTitle({ className, ...props }) {
2530
2665
  }
2531
2666
  __name(CardTitle, "CardTitle");
2532
2667
  function CardDescription({ className, ...props }) {
2533
- return /* @__PURE__ */ React25.createElement("div", {
2668
+ return /* @__PURE__ */ React26.createElement("div", {
2534
2669
  "data-slot": "card-description",
2535
2670
  className: cn("text-muted-foreground text-sm", className),
2536
2671
  ...props
@@ -2538,17 +2673,17 @@ function CardDescription({ className, ...props }) {
2538
2673
  }
2539
2674
  __name(CardDescription, "CardDescription");
2540
2675
  var Form = FormProvider;
2541
- var FormFieldContext = /* @__PURE__ */ React25.createContext({});
2676
+ var FormFieldContext = /* @__PURE__ */ React26.createContext({});
2542
2677
  var FormField = /* @__PURE__ */ __name(({ ...props }) => {
2543
- return /* @__PURE__ */ React25.createElement(FormFieldContext.Provider, {
2678
+ return /* @__PURE__ */ React26.createElement(FormFieldContext.Provider, {
2544
2679
  value: {
2545
2680
  name: props.name
2546
2681
  }
2547
- }, /* @__PURE__ */ React25.createElement(Controller, props));
2682
+ }, /* @__PURE__ */ React26.createElement(Controller, props));
2548
2683
  }, "FormField");
2549
2684
  var useFormField = /* @__PURE__ */ __name(() => {
2550
- const fieldContext = React25.useContext(FormFieldContext);
2551
- const itemContext = React25.useContext(FormItemContext);
2685
+ const fieldContext = React26.useContext(FormFieldContext);
2686
+ const itemContext = React26.useContext(FormItemContext);
2552
2687
  const { getFieldState } = useFormContext();
2553
2688
  const formState = useFormState({
2554
2689
  name: fieldContext.name
@@ -2567,14 +2702,14 @@ var useFormField = /* @__PURE__ */ __name(() => {
2567
2702
  ...fieldState
2568
2703
  };
2569
2704
  }, "useFormField");
2570
- var FormItemContext = /* @__PURE__ */ React25.createContext({});
2705
+ var FormItemContext = /* @__PURE__ */ React26.createContext({});
2571
2706
  function FormItem({ className, ...props }) {
2572
- const id = React25.useId();
2573
- return /* @__PURE__ */ React25.createElement(FormItemContext.Provider, {
2707
+ const id = React26.useId();
2708
+ return /* @__PURE__ */ React26.createElement(FormItemContext.Provider, {
2574
2709
  value: {
2575
2710
  id
2576
2711
  }
2577
- }, /* @__PURE__ */ React25.createElement("div", {
2712
+ }, /* @__PURE__ */ React26.createElement("div", {
2578
2713
  "data-slot": "form-item",
2579
2714
  className: cn("grid gap-2", className),
2580
2715
  ...props
@@ -2583,7 +2718,7 @@ function FormItem({ className, ...props }) {
2583
2718
  __name(FormItem, "FormItem");
2584
2719
  function FormLabel({ className, ...props }) {
2585
2720
  const { error, formItemId } = useFormField();
2586
- return /* @__PURE__ */ React25.createElement(Label2, {
2721
+ return /* @__PURE__ */ React26.createElement(Label2, {
2587
2722
  "data-slot": "form-label",
2588
2723
  "data-error": !!error,
2589
2724
  className: cn("data-[error=true]:text-destructive", className),
@@ -2594,7 +2729,7 @@ function FormLabel({ className, ...props }) {
2594
2729
  __name(FormLabel, "FormLabel");
2595
2730
  function FormControl({ ...props }) {
2596
2731
  const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
2597
- return /* @__PURE__ */ React25.createElement(Slot, {
2732
+ return /* @__PURE__ */ React26.createElement(Slot, {
2598
2733
  "data-slot": "form-control",
2599
2734
  id: formItemId,
2600
2735
  "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
@@ -2605,7 +2740,7 @@ function FormControl({ ...props }) {
2605
2740
  __name(FormControl, "FormControl");
2606
2741
  function FormDescription({ className, ...props }) {
2607
2742
  const { formDescriptionId } = useFormField();
2608
- return /* @__PURE__ */ React25.createElement("p", {
2743
+ return /* @__PURE__ */ React26.createElement("p", {
2609
2744
  "data-slot": "form-description",
2610
2745
  id: formDescriptionId,
2611
2746
  className: cn("text-muted-foreground text-sm", className),
@@ -2619,7 +2754,7 @@ function FormMessage({ className, ...props }) {
2619
2754
  if (!body) {
2620
2755
  return null;
2621
2756
  }
2622
- return /* @__PURE__ */ React25.createElement("p", {
2757
+ return /* @__PURE__ */ React26.createElement("p", {
2623
2758
  "data-slot": "form-message",
2624
2759
  id: formMessageId,
2625
2760
  className: cn("text-destructive text-sm", className),
@@ -2642,7 +2777,7 @@ var badgeVariants = cva("inline-flex items-center justify-center rounded-full bo
2642
2777
  });
2643
2778
  function Badge({ className, variant, asChild = false, ...props }) {
2644
2779
  const Comp = asChild ? Slot : "span";
2645
- return /* @__PURE__ */ React25.createElement(Comp, {
2780
+ return /* @__PURE__ */ React26.createElement(Comp, {
2646
2781
  "data-slot": "badge",
2647
2782
  className: cn(badgeVariants({
2648
2783
  variant
@@ -2652,7 +2787,7 @@ function Badge({ className, variant, asChild = false, ...props }) {
2652
2787
  }
2653
2788
  __name(Badge, "Badge");
2654
2789
  function TabsList({ className, ...props }) {
2655
- return /* @__PURE__ */ React25.createElement(TabsPrimitive2.List, {
2790
+ return /* @__PURE__ */ React26.createElement(TabsPrimitive2.List, {
2656
2791
  "data-slot": "tabs-list",
2657
2792
  className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className),
2658
2793
  ...props
@@ -2660,7 +2795,7 @@ function TabsList({ className, ...props }) {
2660
2795
  }
2661
2796
  __name(TabsList, "TabsList");
2662
2797
  function TabsTrigger({ className, ...props }) {
2663
- return /* @__PURE__ */ React25.createElement(TabsPrimitive2.Trigger, {
2798
+ return /* @__PURE__ */ React26.createElement(TabsPrimitive2.Trigger, {
2664
2799
  "data-slot": "tabs-trigger",
2665
2800
  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),
2666
2801
  ...props
@@ -2668,7 +2803,7 @@ function TabsTrigger({ className, ...props }) {
2668
2803
  }
2669
2804
  __name(TabsTrigger, "TabsTrigger");
2670
2805
  function TabsContent({ className, ...props }) {
2671
- return /* @__PURE__ */ React25.createElement(TabsPrimitive2.Content, {
2806
+ return /* @__PURE__ */ React26.createElement(TabsPrimitive2.Content, {
2672
2807
  "data-slot": "tabs-content",
2673
2808
  className: cn("flex-1 outline-none", className),
2674
2809
  ...props
@@ -2676,7 +2811,7 @@ function TabsContent({ className, ...props }) {
2676
2811
  }
2677
2812
  __name(TabsContent, "TabsContent");
2678
2813
  function Separator2({ className, orientation = "horizontal", decorative = true, ...props }) {
2679
- return /* @__PURE__ */ React25.createElement(SeparatorPrimitive.Root, {
2814
+ return /* @__PURE__ */ React26.createElement(SeparatorPrimitive.Root, {
2680
2815
  "data-slot": "separator",
2681
2816
  decorative,
2682
2817
  orientation,
@@ -2686,51 +2821,51 @@ function Separator2({ className, orientation = "horizontal", decorative = true,
2686
2821
  }
2687
2822
  __name(Separator2, "Separator");
2688
2823
  function ScrollArea({ className, children, ...props }) {
2689
- return /* @__PURE__ */ React25.createElement(ScrollAreaPrimitive.Root, {
2824
+ return /* @__PURE__ */ React26.createElement(ScrollAreaPrimitive.Root, {
2690
2825
  "data-slot": "scroll-area",
2691
2826
  className: cn("relative", className),
2692
2827
  ...props
2693
- }, /* @__PURE__ */ React25.createElement(ScrollAreaPrimitive.Viewport, {
2828
+ }, /* @__PURE__ */ React26.createElement(ScrollAreaPrimitive.Viewport, {
2694
2829
  "data-slot": "scroll-area-viewport",
2695
2830
  className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
2696
- }, children), /* @__PURE__ */ React25.createElement(ScrollBar, null), /* @__PURE__ */ React25.createElement(ScrollAreaPrimitive.Corner, null));
2831
+ }, children), /* @__PURE__ */ React26.createElement(ScrollBar, null), /* @__PURE__ */ React26.createElement(ScrollAreaPrimitive.Corner, null));
2697
2832
  }
2698
2833
  __name(ScrollArea, "ScrollArea");
2699
2834
  function ScrollBar({ className, orientation = "vertical", ...props }) {
2700
- return /* @__PURE__ */ React25.createElement(ScrollAreaPrimitive.ScrollAreaScrollbar, {
2835
+ return /* @__PURE__ */ React26.createElement(ScrollAreaPrimitive.ScrollAreaScrollbar, {
2701
2836
  "data-slot": "scroll-area-scrollbar",
2702
2837
  orientation,
2703
2838
  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),
2704
2839
  ...props
2705
- }, /* @__PURE__ */ React25.createElement(ScrollAreaPrimitive.ScrollAreaThumb, {
2840
+ }, /* @__PURE__ */ React26.createElement(ScrollAreaPrimitive.ScrollAreaThumb, {
2706
2841
  "data-slot": "scroll-area-thumb",
2707
2842
  className: "bg-border relative flex-1 rounded-full"
2708
2843
  }));
2709
2844
  }
2710
2845
  __name(ScrollBar, "ScrollBar");
2711
2846
  function DropdownMenu({ ...props }) {
2712
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Root, {
2847
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Root, {
2713
2848
  "data-slot": "dropdown-menu",
2714
2849
  ...props
2715
2850
  });
2716
2851
  }
2717
2852
  __name(DropdownMenu, "DropdownMenu");
2718
2853
  function DropdownMenuPortal({ ...props }) {
2719
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Portal, {
2854
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Portal, {
2720
2855
  "data-slot": "dropdown-menu-portal",
2721
2856
  ...props
2722
2857
  });
2723
2858
  }
2724
2859
  __name(DropdownMenuPortal, "DropdownMenuPortal");
2725
2860
  function DropdownMenuTrigger({ ...props }) {
2726
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Trigger, {
2861
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Trigger, {
2727
2862
  "data-slot": "dropdown-menu-trigger",
2728
2863
  ...props
2729
2864
  });
2730
2865
  }
2731
2866
  __name(DropdownMenuTrigger, "DropdownMenuTrigger");
2732
2867
  function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
2733
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Content, {
2868
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Content, {
2734
2869
  "data-slot": "dropdown-menu-content",
2735
2870
  sideOffset,
2736
2871
  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),
@@ -2739,14 +2874,14 @@ function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
2739
2874
  }
2740
2875
  __name(DropdownMenuContent, "DropdownMenuContent");
2741
2876
  function DropdownMenuGroup({ ...props }) {
2742
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Group, {
2877
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Group, {
2743
2878
  "data-slot": "dropdown-menu-group",
2744
2879
  ...props
2745
2880
  });
2746
2881
  }
2747
2882
  __name(DropdownMenuGroup, "DropdownMenuGroup");
2748
2883
  function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
2749
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Item, {
2884
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Item, {
2750
2885
  "data-slot": "dropdown-menu-item",
2751
2886
  "data-inset": inset,
2752
2887
  "data-variant": variant,
@@ -2756,39 +2891,39 @@ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
2756
2891
  }
2757
2892
  __name(DropdownMenuItem, "DropdownMenuItem");
2758
2893
  function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
2759
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.CheckboxItem, {
2894
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.CheckboxItem, {
2760
2895
  "data-slot": "dropdown-menu-checkbox-item",
2761
2896
  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),
2762
2897
  checked,
2763
2898
  ...props
2764
- }, /* @__PURE__ */ React25.createElement("span", {
2899
+ }, /* @__PURE__ */ React26.createElement("span", {
2765
2900
  className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
2766
- }, /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React25.createElement(CheckIcon, {
2901
+ }, /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React26.createElement(CheckIcon, {
2767
2902
  className: "size-4"
2768
2903
  }))), children);
2769
2904
  }
2770
2905
  __name(DropdownMenuCheckboxItem, "DropdownMenuCheckboxItem");
2771
2906
  function DropdownMenuRadioGroup({ ...props }) {
2772
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.RadioGroup, {
2907
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.RadioGroup, {
2773
2908
  "data-slot": "dropdown-menu-radio-group",
2774
2909
  ...props
2775
2910
  });
2776
2911
  }
2777
2912
  __name(DropdownMenuRadioGroup, "DropdownMenuRadioGroup");
2778
2913
  function DropdownMenuRadioItem({ className, children, ...props }) {
2779
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.RadioItem, {
2914
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.RadioItem, {
2780
2915
  "data-slot": "dropdown-menu-radio-item",
2781
2916
  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),
2782
2917
  ...props
2783
- }, /* @__PURE__ */ React25.createElement("span", {
2918
+ }, /* @__PURE__ */ React26.createElement("span", {
2784
2919
  className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
2785
- }, /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React25.createElement(CircleIcon, {
2920
+ }, /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React26.createElement(CircleIcon, {
2786
2921
  className: "size-2 fill-current"
2787
2922
  }))), children);
2788
2923
  }
2789
2924
  __name(DropdownMenuRadioItem, "DropdownMenuRadioItem");
2790
2925
  function DropdownMenuLabel({ className, inset, ...props }) {
2791
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Label, {
2926
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Label, {
2792
2927
  "data-slot": "dropdown-menu-label",
2793
2928
  "data-inset": inset,
2794
2929
  className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
@@ -2797,7 +2932,7 @@ function DropdownMenuLabel({ className, inset, ...props }) {
2797
2932
  }
2798
2933
  __name(DropdownMenuLabel, "DropdownMenuLabel");
2799
2934
  function DropdownMenuSeparator({ className, ...props }) {
2800
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Separator, {
2935
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Separator, {
2801
2936
  "data-slot": "dropdown-menu-separator",
2802
2937
  className: cn("bg-border -mx-1 my-1 h-px", className),
2803
2938
  ...props
@@ -2805,7 +2940,7 @@ function DropdownMenuSeparator({ className, ...props }) {
2805
2940
  }
2806
2941
  __name(DropdownMenuSeparator, "DropdownMenuSeparator");
2807
2942
  function DropdownMenuShortcut({ className, ...props }) {
2808
- return /* @__PURE__ */ React25.createElement("span", {
2943
+ return /* @__PURE__ */ React26.createElement("span", {
2809
2944
  "data-slot": "dropdown-menu-shortcut",
2810
2945
  className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
2811
2946
  ...props
@@ -2813,25 +2948,25 @@ function DropdownMenuShortcut({ className, ...props }) {
2813
2948
  }
2814
2949
  __name(DropdownMenuShortcut, "DropdownMenuShortcut");
2815
2950
  function DropdownMenuSub({ ...props }) {
2816
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.Sub, {
2951
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.Sub, {
2817
2952
  "data-slot": "dropdown-menu-sub",
2818
2953
  ...props
2819
2954
  });
2820
2955
  }
2821
2956
  __name(DropdownMenuSub, "DropdownMenuSub");
2822
2957
  function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
2823
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.SubTrigger, {
2958
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.SubTrigger, {
2824
2959
  "data-slot": "dropdown-menu-sub-trigger",
2825
2960
  "data-inset": inset,
2826
2961
  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),
2827
2962
  ...props
2828
- }, children, /* @__PURE__ */ React25.createElement(ChevronRightIcon, {
2963
+ }, children, /* @__PURE__ */ React26.createElement(ChevronRightIcon, {
2829
2964
  className: "ml-auto size-4"
2830
2965
  }));
2831
2966
  }
2832
2967
  __name(DropdownMenuSubTrigger, "DropdownMenuSubTrigger");
2833
2968
  function DropdownMenuSubContent({ className, ...props }) {
2834
- return /* @__PURE__ */ React25.createElement(DropdownMenuPrimitive.SubContent, {
2969
+ return /* @__PURE__ */ React26.createElement(DropdownMenuPrimitive.SubContent, {
2835
2970
  "data-slot": "dropdown-menu-sub-content",
2836
2971
  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),
2837
2972
  ...props
@@ -2839,7 +2974,7 @@ function DropdownMenuSubContent({ className, ...props }) {
2839
2974
  }
2840
2975
  __name(DropdownMenuSubContent, "DropdownMenuSubContent");
2841
2976
  function TooltipProvider({ delayDuration = 0, ...props }) {
2842
- return /* @__PURE__ */ React25.createElement(TooltipPrimitive.Provider, {
2977
+ return /* @__PURE__ */ React26.createElement(TooltipPrimitive.Provider, {
2843
2978
  "data-slot": "tooltip-provider",
2844
2979
  delayDuration,
2845
2980
  ...props
@@ -2847,26 +2982,26 @@ function TooltipProvider({ delayDuration = 0, ...props }) {
2847
2982
  }
2848
2983
  __name(TooltipProvider, "TooltipProvider");
2849
2984
  function Tooltip({ ...props }) {
2850
- return /* @__PURE__ */ React25.createElement(TooltipProvider, null, /* @__PURE__ */ React25.createElement(TooltipPrimitive.Root, {
2985
+ return /* @__PURE__ */ React26.createElement(TooltipProvider, null, /* @__PURE__ */ React26.createElement(TooltipPrimitive.Root, {
2851
2986
  "data-slot": "tooltip",
2852
2987
  ...props
2853
2988
  }));
2854
2989
  }
2855
2990
  __name(Tooltip, "Tooltip");
2856
2991
  function TooltipTrigger({ ...props }) {
2857
- return /* @__PURE__ */ React25.createElement(TooltipPrimitive.Trigger, {
2992
+ return /* @__PURE__ */ React26.createElement(TooltipPrimitive.Trigger, {
2858
2993
  "data-slot": "tooltip-trigger",
2859
2994
  ...props
2860
2995
  });
2861
2996
  }
2862
2997
  __name(TooltipTrigger, "TooltipTrigger");
2863
2998
  function TooltipContent({ className, sideOffset = 0, children, ...props }) {
2864
- return /* @__PURE__ */ React25.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React25.createElement(TooltipPrimitive.Content, {
2999
+ return /* @__PURE__ */ React26.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React26.createElement(TooltipPrimitive.Content, {
2865
3000
  "data-slot": "tooltip-content",
2866
3001
  sideOffset,
2867
3002
  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),
2868
3003
  ...props
2869
- }, children, /* @__PURE__ */ React25.createElement(TooltipPrimitive.Arrow, {
3004
+ }, children, /* @__PURE__ */ React26.createElement(TooltipPrimitive.Arrow, {
2870
3005
  className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"
2871
3006
  })));
2872
3007
  }
@@ -2897,44 +3032,44 @@ function DataGrid({ data, columns, searchable = false, searchPlaceholder = "Sear
2897
3032
  getSortedRowModel: getSortedRowModel(),
2898
3033
  getFilteredRowModel: getFilteredRowModel()
2899
3034
  });
2900
- return /* @__PURE__ */ React25__default.createElement("div", {
3035
+ return /* @__PURE__ */ React26__default.createElement("div", {
2901
3036
  className: clsx("lui-datagrid", className)
2902
- }, searchable && /* @__PURE__ */ React25__default.createElement("div", {
3037
+ }, searchable && /* @__PURE__ */ React26__default.createElement("div", {
2903
3038
  className: "lui-datagrid-search"
2904
- }, /* @__PURE__ */ React25__default.createElement("input", {
3039
+ }, /* @__PURE__ */ React26__default.createElement("input", {
2905
3040
  type: "text",
2906
3041
  value: globalFilter,
2907
3042
  onChange: /* @__PURE__ */ __name((e) => setGlobalFilter(e.target.value), "onChange"),
2908
3043
  placeholder: searchPlaceholder,
2909
3044
  className: "lui-datagrid-search-input"
2910
- })), /* @__PURE__ */ React25__default.createElement("div", {
3045
+ })), /* @__PURE__ */ React26__default.createElement("div", {
2911
3046
  className: "lui-datagrid-container"
2912
- }, /* @__PURE__ */ React25__default.createElement("table", {
3047
+ }, /* @__PURE__ */ React26__default.createElement("table", {
2913
3048
  className: "lui-datagrid-table"
2914
- }, /* @__PURE__ */ React25__default.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React25__default.createElement("tr", {
3049
+ }, /* @__PURE__ */ React26__default.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React26__default.createElement("tr", {
2915
3050
  key: headerGroup.id
2916
- }, headerGroup.headers.map((header) => /* @__PURE__ */ React25__default.createElement("th", {
3051
+ }, headerGroup.headers.map((header) => /* @__PURE__ */ React26__default.createElement("th", {
2917
3052
  key: header.id,
2918
3053
  className: clsx("lui-datagrid-th", header.column.getCanSort() && "lui-datagrid-th--sortable"),
2919
3054
  onClick: header.column.getToggleSortingHandler(),
2920
3055
  style: {
2921
3056
  width: header.column.getSize()
2922
3057
  }
2923
- }, /* @__PURE__ */ React25__default.createElement("div", {
3058
+ }, /* @__PURE__ */ React26__default.createElement("div", {
2924
3059
  className: "lui-datagrid-th-content"
2925
- }, flexRender(header.column.columnDef.header, header.getContext()), header.column.getIsSorted() && /* @__PURE__ */ React25__default.createElement("span", {
3060
+ }, flexRender(header.column.columnDef.header, header.getContext()), header.column.getIsSorted() && /* @__PURE__ */ React26__default.createElement("span", {
2926
3061
  className: "lui-datagrid-sort-icon"
2927
- }, header.column.getIsSorted() === "asc" ? "\u2191" : "\u2193"))))))), /* @__PURE__ */ React25__default.createElement("tbody", null, loading ? /* @__PURE__ */ React25__default.createElement("tr", null, /* @__PURE__ */ React25__default.createElement("td", {
3062
+ }, header.column.getIsSorted() === "asc" ? "\u2191" : "\u2193"))))))), /* @__PURE__ */ React26__default.createElement("tbody", null, loading ? /* @__PURE__ */ React26__default.createElement("tr", null, /* @__PURE__ */ React26__default.createElement("td", {
2928
3063
  colSpan: columns.length,
2929
3064
  className: "lui-datagrid-loading"
2930
- }, "Loading...")) : table.getRowModel().rows.length === 0 ? /* @__PURE__ */ React25__default.createElement("tr", null, /* @__PURE__ */ React25__default.createElement("td", {
3065
+ }, "Loading...")) : table.getRowModel().rows.length === 0 ? /* @__PURE__ */ React26__default.createElement("tr", null, /* @__PURE__ */ React26__default.createElement("td", {
2931
3066
  colSpan: columns.length,
2932
3067
  className: "lui-datagrid-empty"
2933
- }, emptyMessage)) : table.getRowModel().rows.map((row) => /* @__PURE__ */ React25__default.createElement("tr", {
3068
+ }, emptyMessage)) : table.getRowModel().rows.map((row) => /* @__PURE__ */ React26__default.createElement("tr", {
2934
3069
  key: row.id,
2935
3070
  className: clsx("lui-datagrid-row", onRowClick && "lui-datagrid-row--clickable"),
2936
3071
  onClick: /* @__PURE__ */ __name(() => onRowClick?.(row.original), "onClick")
2937
- }, row.getVisibleCells().map((cell) => /* @__PURE__ */ React25__default.createElement("td", {
3072
+ }, row.getVisibleCells().map((cell) => /* @__PURE__ */ React26__default.createElement("td", {
2938
3073
  key: cell.id,
2939
3074
  className: "lui-datagrid-td"
2940
3075
  }, flexRender(cell.column.columnDef.cell, cell.getContext())))))))));
@@ -2993,13 +3128,13 @@ function Chart({ type, data, options, height = 300, width = "100%", className })
2993
3128
  ...options?.plugins
2994
3129
  }
2995
3130
  };
2996
- return /* @__PURE__ */ React25__default.createElement("div", {
3131
+ return /* @__PURE__ */ React26__default.createElement("div", {
2997
3132
  className: clsx("lui-chart", className),
2998
3133
  style: {
2999
3134
  height,
3000
3135
  width
3001
3136
  }
3002
- }, /* @__PURE__ */ React25__default.createElement(Chart$2, {
3137
+ }, /* @__PURE__ */ React26__default.createElement(Chart$2, {
3003
3138
  type,
3004
3139
  data,
3005
3140
  options: mergedOptions
@@ -3048,37 +3183,37 @@ function AppShell({ header, sidebar, footer, sidebarPosition = "left", sidebarWi
3048
3183
  width: typeof sidebarWidth === "number" ? `${sidebarWidth}px` : sidebarWidth,
3049
3184
  flexShrink: 0
3050
3185
  };
3051
- return /* @__PURE__ */ React25__default.createElement("div", {
3186
+ return /* @__PURE__ */ React26__default.createElement("div", {
3052
3187
  ref: containerRef,
3053
3188
  className: clsx("lui-app-shell", `lui-app-shell--padding-${padding}`, className),
3054
3189
  ...props
3055
- }, header && /* @__PURE__ */ React25__default.createElement("header", {
3190
+ }, header && /* @__PURE__ */ React26__default.createElement("header", {
3056
3191
  className: "lui-app-shell-header"
3057
- }, header), /* @__PURE__ */ React25__default.createElement("div", {
3192
+ }, header), /* @__PURE__ */ React26__default.createElement("div", {
3058
3193
  className: "lui-app-shell-body"
3059
- }, sidebar && sidebarPosition === "left" && /* @__PURE__ */ React25__default.createElement("aside", {
3194
+ }, sidebar && sidebarPosition === "left" && /* @__PURE__ */ React26__default.createElement("aside", {
3060
3195
  className: "lui-app-shell-sidebar",
3061
3196
  style: sidebarStyle
3062
- }, sidebar), /* @__PURE__ */ React25__default.createElement("main", {
3197
+ }, sidebar), /* @__PURE__ */ React26__default.createElement("main", {
3063
3198
  className: "lui-app-shell-main"
3064
- }, children), sidebar && sidebarPosition === "right" && /* @__PURE__ */ React25__default.createElement("aside", {
3199
+ }, children), sidebar && sidebarPosition === "right" && /* @__PURE__ */ React26__default.createElement("aside", {
3065
3200
  className: "lui-app-shell-sidebar",
3066
3201
  style: sidebarStyle
3067
- }, sidebar)), footer && /* @__PURE__ */ React25__default.createElement("footer", {
3202
+ }, sidebar)), footer && /* @__PURE__ */ React26__default.createElement("footer", {
3068
3203
  className: "lui-app-shell-footer"
3069
3204
  }, footer));
3070
3205
  }
3071
3206
  __name(AppShell, "AppShell");
3072
3207
  function Tabs2({ tabs, defaultValue, value, onValueChange, children, className }) {
3073
3208
  const defaultTab = defaultValue || tabs[0]?.value;
3074
- return /* @__PURE__ */ React25__default.createElement(TabsPrimitive2.Root, {
3209
+ return /* @__PURE__ */ React26__default.createElement(TabsPrimitive2.Root, {
3075
3210
  className: clsx("lui-tabs", className),
3076
3211
  defaultValue: defaultTab,
3077
3212
  value,
3078
3213
  onValueChange
3079
- }, /* @__PURE__ */ React25__default.createElement(TabsPrimitive2.List, {
3214
+ }, /* @__PURE__ */ React26__default.createElement(TabsPrimitive2.List, {
3080
3215
  className: "lui-tabs-list"
3081
- }, tabs.map((tab) => /* @__PURE__ */ React25__default.createElement(TabsPrimitive2.Trigger, {
3216
+ }, tabs.map((tab) => /* @__PURE__ */ React26__default.createElement(TabsPrimitive2.Trigger, {
3082
3217
  key: tab.value,
3083
3218
  value: tab.value,
3084
3219
  disabled: tab.disabled,
@@ -3087,40 +3222,40 @@ function Tabs2({ tabs, defaultValue, value, onValueChange, children, className }
3087
3222
  }
3088
3223
  __name(Tabs2, "Tabs");
3089
3224
  function TabContent({ value, children, className }) {
3090
- return /* @__PURE__ */ React25__default.createElement(TabsPrimitive2.Content, {
3225
+ return /* @__PURE__ */ React26__default.createElement(TabsPrimitive2.Content, {
3091
3226
  value,
3092
3227
  className: clsx("lui-tabs-content", className)
3093
3228
  }, children);
3094
3229
  }
3095
3230
  __name(TabContent, "TabContent");
3096
3231
  function Modal({ open, defaultOpen, onOpenChange, title, description, children, className, trigger }) {
3097
- return /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Root, {
3232
+ return /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Root, {
3098
3233
  open,
3099
3234
  defaultOpen,
3100
3235
  onOpenChange
3101
- }, trigger && /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Trigger, {
3236
+ }, trigger && /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Trigger, {
3102
3237
  asChild: true
3103
- }, trigger), /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Portal, null, /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Overlay, {
3238
+ }, trigger), /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Portal, null, /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Overlay, {
3104
3239
  className: "lui-modal-overlay"
3105
- }), /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Content, {
3240
+ }), /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Content, {
3106
3241
  className: clsx("lui-modal-content", className)
3107
- }, title && /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Title, {
3242
+ }, title && /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Title, {
3108
3243
  className: "lui-modal-title"
3109
- }, title), description && /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Description, {
3244
+ }, title), description && /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Description, {
3110
3245
  className: "lui-modal-description"
3111
- }, description), children, /* @__PURE__ */ React25__default.createElement(DialogPrimitive.Close, {
3246
+ }, description), children, /* @__PURE__ */ React26__default.createElement(DialogPrimitive.Close, {
3112
3247
  className: "lui-modal-close",
3113
3248
  "aria-label": "Close"
3114
- }, /* @__PURE__ */ React25__default.createElement(CloseIcon, null)))));
3249
+ }, /* @__PURE__ */ React26__default.createElement(CloseIcon, null)))));
3115
3250
  }
3116
3251
  __name(Modal, "Modal");
3117
3252
  function CloseIcon() {
3118
- return /* @__PURE__ */ React25__default.createElement("svg", {
3253
+ return /* @__PURE__ */ React26__default.createElement("svg", {
3119
3254
  width: "14",
3120
3255
  height: "14",
3121
3256
  viewBox: "0 0 14 14",
3122
3257
  fill: "none"
3123
- }, /* @__PURE__ */ React25__default.createElement("path", {
3258
+ }, /* @__PURE__ */ React26__default.createElement("path", {
3124
3259
  d: "M3.5 3.5L10.5 10.5M10.5 3.5L3.5 10.5",
3125
3260
  stroke: "currentColor",
3126
3261
  strokeWidth: "1.5",
@@ -3129,55 +3264,55 @@ function CloseIcon() {
3129
3264
  }
3130
3265
  __name(CloseIcon, "CloseIcon");
3131
3266
  function CodeBlock({ code, language = "text", showLineNumbers = false, copyable = true, className }) {
3132
- const [copied, setCopied] = React25__default.useState(false);
3267
+ const [copied, setCopied] = React26__default.useState(false);
3133
3268
  const handleCopy = /* @__PURE__ */ __name(async () => {
3134
3269
  await navigator.clipboard.writeText(code);
3135
3270
  setCopied(true);
3136
3271
  setTimeout(() => setCopied(false), 2e3);
3137
3272
  }, "handleCopy");
3138
- return /* @__PURE__ */ React25__default.createElement("div", {
3273
+ return /* @__PURE__ */ React26__default.createElement("div", {
3139
3274
  className: clsx("lui-code-block", className)
3140
- }, copyable && /* @__PURE__ */ React25__default.createElement("button", {
3275
+ }, copyable && /* @__PURE__ */ React26__default.createElement("button", {
3141
3276
  type: "button",
3142
3277
  className: "lui-code-block-copy",
3143
3278
  onClick: handleCopy,
3144
3279
  "aria-label": copied ? "Copied!" : "Copy code"
3145
- }, copied ? /* @__PURE__ */ React25__default.createElement("svg", {
3280
+ }, copied ? /* @__PURE__ */ React26__default.createElement("svg", {
3146
3281
  viewBox: "0 0 24 24",
3147
3282
  fill: "none",
3148
3283
  stroke: "currentColor",
3149
3284
  strokeWidth: "2"
3150
- }, /* @__PURE__ */ React25__default.createElement("polyline", {
3285
+ }, /* @__PURE__ */ React26__default.createElement("polyline", {
3151
3286
  points: "20,6 9,17 4,12"
3152
- })) : /* @__PURE__ */ React25__default.createElement("svg", {
3287
+ })) : /* @__PURE__ */ React26__default.createElement("svg", {
3153
3288
  viewBox: "0 0 24 24",
3154
3289
  fill: "none",
3155
3290
  stroke: "currentColor",
3156
3291
  strokeWidth: "2"
3157
- }, /* @__PURE__ */ React25__default.createElement("rect", {
3292
+ }, /* @__PURE__ */ React26__default.createElement("rect", {
3158
3293
  x: "9",
3159
3294
  y: "9",
3160
3295
  width: "13",
3161
3296
  height: "13",
3162
3297
  rx: "2",
3163
3298
  ry: "2"
3164
- }), /* @__PURE__ */ React25__default.createElement("path", {
3299
+ }), /* @__PURE__ */ React26__default.createElement("path", {
3165
3300
  d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
3166
- }))), /* @__PURE__ */ React25__default.createElement(Highlight, {
3301
+ }))), /* @__PURE__ */ React26__default.createElement(Highlight, {
3167
3302
  theme: themes.nightOwl,
3168
3303
  code: code.trim(),
3169
3304
  language
3170
- }, ({ className: hlClassName, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React25__default.createElement("pre", {
3305
+ }, ({ className: hlClassName, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React26__default.createElement("pre", {
3171
3306
  className: clsx("lui-code-block-pre", hlClassName),
3172
3307
  style
3173
- }, tokens.map((line, i) => /* @__PURE__ */ React25__default.createElement("div", {
3308
+ }, tokens.map((line, i) => /* @__PURE__ */ React26__default.createElement("div", {
3174
3309
  key: i,
3175
3310
  ...getLineProps({
3176
3311
  line
3177
3312
  })
3178
- }, showLineNumbers && /* @__PURE__ */ React25__default.createElement("span", {
3313
+ }, showLineNumbers && /* @__PURE__ */ React26__default.createElement("span", {
3179
3314
  className: "lui-code-block-line-number"
3180
- }, i + 1), line.map((token, key) => /* @__PURE__ */ React25__default.createElement("span", {
3315
+ }, i + 1), line.map((token, key) => /* @__PURE__ */ React26__default.createElement("span", {
3181
3316
  key,
3182
3317
  ...getTokenProps({
3183
3318
  token
@@ -3186,7 +3321,7 @@ function CodeBlock({ code, language = "text", showLineNumbers = false, copyable
3186
3321
  }
3187
3322
  __name(CodeBlock, "CodeBlock");
3188
3323
  var Card2 = /* @__PURE__ */ forwardRef(({ className, variant = "default", padding = "md", interactive = false, children, ...props }, ref) => {
3189
- return /* @__PURE__ */ React25__default.createElement("div", {
3324
+ return /* @__PURE__ */ React26__default.createElement("div", {
3190
3325
  ref,
3191
3326
  className: clsx("lui-card", `lui-card--${variant}`, `lui-card--padding-${padding}`, interactive && "lui-card--interactive", className),
3192
3327
  ...props
@@ -3194,23 +3329,23 @@ var Card2 = /* @__PURE__ */ forwardRef(({ className, variant = "default", paddin
3194
3329
  });
3195
3330
  Card2.displayName = "Card";
3196
3331
  var CardHeader2 = /* @__PURE__ */ forwardRef(({ className, title, description, action, children, ...props }, ref) => {
3197
- return /* @__PURE__ */ React25__default.createElement("div", {
3332
+ return /* @__PURE__ */ React26__default.createElement("div", {
3198
3333
  ref,
3199
3334
  className: clsx("lui-card-header", className),
3200
3335
  ...props
3201
- }, (title || description) && /* @__PURE__ */ React25__default.createElement("div", {
3336
+ }, (title || description) && /* @__PURE__ */ React26__default.createElement("div", {
3202
3337
  className: "lui-card-header__text"
3203
- }, title && /* @__PURE__ */ React25__default.createElement("h3", {
3338
+ }, title && /* @__PURE__ */ React26__default.createElement("h3", {
3204
3339
  className: "lui-card-header__title"
3205
- }, title), description && /* @__PURE__ */ React25__default.createElement("p", {
3340
+ }, title), description && /* @__PURE__ */ React26__default.createElement("p", {
3206
3341
  className: "lui-card-header__description"
3207
- }, description)), action && /* @__PURE__ */ React25__default.createElement("div", {
3342
+ }, description)), action && /* @__PURE__ */ React26__default.createElement("div", {
3208
3343
  className: "lui-card-header__action"
3209
3344
  }, action), children);
3210
3345
  });
3211
3346
  CardHeader2.displayName = "CardHeader";
3212
3347
  var CardContent2 = /* @__PURE__ */ forwardRef(({ className, children, ...props }, ref) => {
3213
- return /* @__PURE__ */ React25__default.createElement("div", {
3348
+ return /* @__PURE__ */ React26__default.createElement("div", {
3214
3349
  ref,
3215
3350
  className: clsx("lui-card-content", className),
3216
3351
  ...props
@@ -3218,7 +3353,7 @@ var CardContent2 = /* @__PURE__ */ forwardRef(({ className, children, ...props }
3218
3353
  });
3219
3354
  CardContent2.displayName = "CardContent";
3220
3355
  var CardFooter2 = /* @__PURE__ */ forwardRef(({ className, children, ...props }, ref) => {
3221
- return /* @__PURE__ */ React25__default.createElement("div", {
3356
+ return /* @__PURE__ */ React26__default.createElement("div", {
3222
3357
  ref,
3223
3358
  className: clsx("lui-card-footer", className),
3224
3359
  ...props
@@ -3228,31 +3363,31 @@ CardFooter2.displayName = "CardFooter";
3228
3363
  var Input2 = /* @__PURE__ */ forwardRef(({ className, label, helperText, error, size = "md", leftElement, rightElement, fullWidth = false, id, ...props }, ref) => {
3229
3364
  const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
3230
3365
  const hasError = Boolean(error);
3231
- return /* @__PURE__ */ React25__default.createElement("div", {
3366
+ return /* @__PURE__ */ React26__default.createElement("div", {
3232
3367
  className: clsx("lui-input-wrapper", fullWidth && "lui-input-wrapper--full-width", className)
3233
- }, label && /* @__PURE__ */ React25__default.createElement("label", {
3368
+ }, label && /* @__PURE__ */ React26__default.createElement("label", {
3234
3369
  htmlFor: inputId,
3235
3370
  className: "lui-input-label"
3236
- }, label), /* @__PURE__ */ React25__default.createElement("div", {
3371
+ }, label), /* @__PURE__ */ React26__default.createElement("div", {
3237
3372
  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")
3238
- }, leftElement && /* @__PURE__ */ React25__default.createElement("span", {
3373
+ }, leftElement && /* @__PURE__ */ React26__default.createElement("span", {
3239
3374
  className: "lui-input-element lui-input-element--left"
3240
- }, leftElement), /* @__PURE__ */ React25__default.createElement("input", {
3375
+ }, leftElement), /* @__PURE__ */ React26__default.createElement("input", {
3241
3376
  ref,
3242
3377
  id: inputId,
3243
3378
  className: "lui-input",
3244
3379
  "aria-invalid": hasError,
3245
3380
  "aria-describedby": error ? `${inputId}-error` : helperText ? `${inputId}-helper` : void 0,
3246
3381
  ...props
3247
- }), rightElement && /* @__PURE__ */ React25__default.createElement("span", {
3382
+ }), rightElement && /* @__PURE__ */ React26__default.createElement("span", {
3248
3383
  className: "lui-input-element lui-input-element--right"
3249
- }, rightElement)), (error || helperText) && /* @__PURE__ */ React25__default.createElement("p", {
3384
+ }, rightElement)), (error || helperText) && /* @__PURE__ */ React26__default.createElement("p", {
3250
3385
  id: error ? `${inputId}-error` : `${inputId}-helper`,
3251
3386
  className: clsx("lui-input-message", error && "lui-input-message--error")
3252
3387
  }, error || helperText));
3253
3388
  });
3254
3389
  Input2.displayName = "Input";
3255
3390
 
3256
- 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 };
3391
+ 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 };
3257
3392
  //# sourceMappingURL=index.mjs.map
3258
3393
  //# sourceMappingURL=index.mjs.map