@mcp-use/inspector 2.1.0-canary.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5177,7 +5177,7 @@ var init_module = __esm({
5177
5177
  }
5178
5178
  });
5179
5179
 
5180
- // ../mcp-use/dist/chunk-AGEVMNKQ.js
5180
+ // ../mcp-use/dist/chunk-MOAF7545.js
5181
5181
  import { RESOURCE_MIME_TYPE } from "@modelcontextprotocol/ext-apps";
5182
5182
  import {
5183
5183
  CreateMessageRequestSchema,
@@ -5345,12 +5345,12 @@ function setTelemetrySource(source) {
5345
5345
  Tel.getInstance().setSource(source);
5346
5346
  }
5347
5347
  var VERSION, _a3, BaseTelemetryEvent, _a4, MCPAgentExecutionEvent, _a5, ServerRunEvent, _a6, ServerInitializeEvent, _a7, ServerToolCallEvent, _a8, ServerResourceCallEvent, _a9, ServerPromptCallEvent, _a10, ServerContextEvent, _a11, MCPClientInitEvent, _a12, ConnectorInitEvent, _a13, ClientAddServerEvent, _a14, ClientRemoveServerEvent, USER_ID_STORAGE_KEY, cachedEnvironment, _a15, Telemetry2, Tel, _a16, BaseConnector, _a17, ConnectionManager;
5348
- var init_chunk_AGEVMNKQ = __esm({
5349
- "../mcp-use/dist/chunk-AGEVMNKQ.js"() {
5348
+ var init_chunk_MOAF7545 = __esm({
5349
+ "../mcp-use/dist/chunk-MOAF7545.js"() {
5350
5350
  "use strict";
5351
5351
  init_chunk_QWQYAQCK();
5352
5352
  init_chunk_3GQAWCBQ();
5353
- VERSION = "1.24.1-canary.2";
5353
+ VERSION = "1.24.1";
5354
5354
  __name(getPackageVersion2, "getPackageVersion");
5355
5355
  BaseTelemetryEvent = (_a3 = class {
5356
5356
  }, __name(_a3, "BaseTelemetryEvent"), _a3);
@@ -6620,7 +6620,7 @@ var init_chunk_AGEVMNKQ = __esm({
6620
6620
  }
6621
6621
  });
6622
6622
 
6623
- // ../mcp-use/dist/chunk-SQFWZZPB.js
6623
+ // ../mcp-use/dist/chunk-WRL45O5E.js
6624
6624
  import {
6625
6625
  Client
6626
6626
  } from "@modelcontextprotocol/sdk/client/index.js";
@@ -6685,10 +6685,10 @@ function createConnectorFromConfig(serverConfig, connectorOptions) {
6685
6685
  throw new Error("Cannot determine connector type from config");
6686
6686
  }
6687
6687
  var _a18, SseConnectionManager, _a19, HttpConnector, _a20, MCPSession, _a21, BaseMCPClient;
6688
- var init_chunk_SQFWZZPB = __esm({
6689
- "../mcp-use/dist/chunk-SQFWZZPB.js"() {
6688
+ var init_chunk_WRL45O5E = __esm({
6689
+ "../mcp-use/dist/chunk-WRL45O5E.js"() {
6690
6690
  "use strict";
6691
- init_chunk_AGEVMNKQ();
6691
+ init_chunk_MOAF7545();
6692
6692
  init_chunk_QWQYAQCK();
6693
6693
  init_chunk_3GQAWCBQ();
6694
6694
  SseConnectionManager = (_a18 = class extends ConnectionManager {
@@ -7947,7 +7947,7 @@ var init_chunk_SQFWZZPB = __esm({
7947
7947
  }
7948
7948
  });
7949
7949
 
7950
- // ../mcp-use/dist/chunk-Y73WX6WU.js
7950
+ // ../mcp-use/dist/chunk-FDNVT4RA.js
7951
7951
  import {
7952
7952
  discoverOAuthProtectedResourceMetadata,
7953
7953
  discoverAuthorizationServerMetadata,
@@ -8257,11 +8257,11 @@ async function onMcpAuthorization() {
8257
8257
  }
8258
8258
  }
8259
8259
  var _a22, BrowserMCPClient, _a23, BrowserOAuthClientProvider;
8260
- var init_chunk_Y73WX6WU = __esm({
8261
- "../mcp-use/dist/chunk-Y73WX6WU.js"() {
8260
+ var init_chunk_FDNVT4RA = __esm({
8261
+ "../mcp-use/dist/chunk-FDNVT4RA.js"() {
8262
8262
  "use strict";
8263
- init_chunk_SQFWZZPB();
8264
- init_chunk_AGEVMNKQ();
8263
+ init_chunk_WRL45O5E();
8264
+ init_chunk_MOAF7545();
8265
8265
  init_chunk_QWQYAQCK();
8266
8266
  init_chunk_3GQAWCBQ();
8267
8267
  __name(trackBrowserClientInit, "trackBrowserClientInit");
@@ -27978,18 +27978,18 @@ var init_stdio_transport = __esm({
27978
27978
  }
27979
27979
  });
27980
27980
 
27981
- // ../mcp-use/dist/stdio-3ARCVLF2.js
27982
- var stdio_3ARCVLF2_exports = {};
27983
- __export(stdio_3ARCVLF2_exports, {
27981
+ // ../mcp-use/dist/stdio-MZVPQHDD.js
27982
+ var stdio_MZVPQHDD_exports = {};
27983
+ __export(stdio_MZVPQHDD_exports, {
27984
27984
  StdioConnector: () => StdioConnector
27985
27985
  });
27986
27986
  import { Client as Client2 } from "@modelcontextprotocol/sdk/client/index.js";
27987
27987
  import process2 from "process";
27988
27988
  var _a38, StdioConnectionManager, _a39, StdioConnector;
27989
- var init_stdio_3ARCVLF2 = __esm({
27990
- "../mcp-use/dist/stdio-3ARCVLF2.js"() {
27989
+ var init_stdio_MZVPQHDD = __esm({
27990
+ "../mcp-use/dist/stdio-MZVPQHDD.js"() {
27991
27991
  "use strict";
27992
- init_chunk_AGEVMNKQ();
27992
+ init_chunk_MOAF7545();
27993
27993
  init_chunk_QWQYAQCK();
27994
27994
  init_chunk_3GQAWCBQ();
27995
27995
  init_stdio_transport();
@@ -28133,9 +28133,9 @@ var init_stdio_3ARCVLF2 = __esm({
28133
28133
  }
28134
28134
  });
28135
28135
 
28136
- // ../mcp-use/dist/client-3AZJMEZD.js
28137
- var client_3AZJMEZD_exports = {};
28138
- __export(client_3AZJMEZD_exports, {
28136
+ // ../mcp-use/dist/client-W7K33MEL.js
28137
+ var client_W7K33MEL_exports = {};
28138
+ __export(client_W7K33MEL_exports, {
28139
28139
  BaseCodeExecutor: () => BaseCodeExecutor,
28140
28140
  E2BCodeExecutor: () => E2BCodeExecutor,
28141
28141
  MCPClient: () => MCPClient,
@@ -28275,12 +28275,12 @@ function trackNodeClientInit(config, codeMode, callbacks) {
28275
28275
  }).catch((e2) => logger.debug(`Failed to track MCPClient init: ${e2}`));
28276
28276
  }
28277
28277
  var _a40, BaseCodeExecutor, _a41, E2BCodeExecutor, vm, vmCheckAttempted, _a42, VMCodeExecutor, _a43, CodeModeConnector, _a44, MCPClient;
28278
- var init_client_3AZJMEZD = __esm({
28279
- "../mcp-use/dist/client-3AZJMEZD.js"() {
28278
+ var init_client_W7K33MEL = __esm({
28279
+ "../mcp-use/dist/client-W7K33MEL.js"() {
28280
28280
  "use strict";
28281
28281
  init_chunk_LG5NSHEL();
28282
- init_chunk_SQFWZZPB();
28283
- init_chunk_AGEVMNKQ();
28282
+ init_chunk_WRL45O5E();
28283
+ init_chunk_MOAF7545();
28284
28284
  init_chunk_QWQYAQCK();
28285
28285
  init_chunk_3GQAWCBQ();
28286
28286
  init_fs();
@@ -29217,7 +29217,7 @@ ${shim}
29217
29217
  clientInfo: serverConfig.clientInfo ?? this.config.clientInfo
29218
29218
  };
29219
29219
  if ("command" in merged && "args" in merged) {
29220
- const { StdioConnector: StdioConnector2 } = await Promise.resolve().then(() => (init_stdio_3ARCVLF2(), stdio_3ARCVLF2_exports));
29220
+ const { StdioConnector: StdioConnector2 } = await Promise.resolve().then(() => (init_stdio_MZVPQHDD(), stdio_MZVPQHDD_exports));
29221
29221
  const stdioConfig = merged;
29222
29222
  return new StdioConnector2({
29223
29223
  command: stdioConfig.command,
@@ -74896,11 +74896,11 @@ var _a45, BaseAdapter, _a46, LangChainAdapter, _a47, MCPServerTool, PresentActiv
74896
74896
  var init_browser = __esm({
74897
74897
  "../mcp-use/dist/src/browser.js"() {
74898
74898
  "use strict";
74899
- init_chunk_Y73WX6WU();
74899
+ init_chunk_FDNVT4RA();
74900
74900
  init_chunk_UJPHRNQP();
74901
74901
  init_chunk_LG5NSHEL();
74902
- init_chunk_SQFWZZPB();
74903
- init_chunk_AGEVMNKQ();
74902
+ init_chunk_WRL45O5E();
74903
+ init_chunk_MOAF7545();
74904
74904
  init_chunk_QWQYAQCK();
74905
74905
  init_chunk_3GQAWCBQ();
74906
74906
  init_dist3();
@@ -76247,7 +76247,7 @@ Raw error: ${result}`
76247
76247
  logger.debug(
76248
76248
  `Creating MCPClient with ${Object.keys(this.mcpServersConfig).length} server(s)...`
76249
76249
  );
76250
- const { MCPClient: MCPClient2 } = await Promise.resolve().then(() => (init_client_3AZJMEZD(), client_3AZJMEZD_exports));
76250
+ const { MCPClient: MCPClient2 } = await Promise.resolve().then(() => (init_client_W7K33MEL(), client_W7K33MEL_exports));
76251
76251
  this.client = new MCPClient2({ mcpServers: this.mcpServersConfig });
76252
76252
  logger.debug("\u2705 MCPClient created successfully");
76253
76253
  }
@@ -80030,6 +80030,7 @@ import {
80030
80030
  Copy as Copy3,
80031
80031
  Maximize2,
80032
80032
  Monitor,
80033
+ Moon,
80033
80034
  MousePointer2,
80034
80035
  PictureInPicture,
80035
80036
  Pointer,
@@ -80038,6 +80039,7 @@ import {
80038
80039
  ShieldOff,
80039
80040
  Smartphone,
80040
80041
  SquareDashedMousePointer,
80042
+ Sun,
80041
80043
  Tablet,
80042
80044
  Trash2 as Trash22
80043
80045
  } from "lucide-react";
@@ -80194,6 +80196,71 @@ function useResourceProps(resourceUri) {
80194
80196
  };
80195
80197
  }
80196
80198
 
80199
+ // src/client/context/ThemeContext.tsx
80200
+ import { createContext as createContext2, use as use3, useEffect as useEffect2, useState as useState4 } from "react";
80201
+ import { jsx as jsx14 } from "react/jsx-runtime";
80202
+ var ThemeContext = createContext2(void 0);
80203
+ function useTheme() {
80204
+ const context2 = use3(ThemeContext);
80205
+ if (context2 === void 0) {
80206
+ throw new Error("useTheme must be used within a ThemeProvider");
80207
+ }
80208
+ return context2;
80209
+ }
80210
+ function ThemeProvider({
80211
+ children,
80212
+ defaultTheme = "system",
80213
+ storageKey = "theme",
80214
+ forcedTheme
80215
+ }) {
80216
+ const [theme, setTheme] = useState4(forcedTheme || defaultTheme);
80217
+ const [mounted, setMounted] = useState4(false);
80218
+ const getSystemTheme = () => {
80219
+ if (typeof window === "undefined") return "light";
80220
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
80221
+ };
80222
+ const resolvedTheme = theme === "system" ? getSystemTheme() : theme;
80223
+ const applyTheme = (newTheme) => {
80224
+ const root = document.documentElement;
80225
+ const actualTheme = newTheme === "system" ? getSystemTheme() : newTheme;
80226
+ root.classList.remove("light", "dark");
80227
+ root.classList.add(actualTheme);
80228
+ if (!forcedTheme) {
80229
+ localStorage.setItem(storageKey, newTheme);
80230
+ }
80231
+ };
80232
+ useEffect2(() => {
80233
+ setMounted(true);
80234
+ const storedTheme = localStorage.getItem(storageKey);
80235
+ const initialTheme = forcedTheme || storedTheme || defaultTheme;
80236
+ setTheme(initialTheme);
80237
+ applyTheme(initialTheme);
80238
+ }, [defaultTheme, storageKey, forcedTheme]);
80239
+ useEffect2(() => {
80240
+ if (theme !== "system") return;
80241
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
80242
+ const handleChange = () => {
80243
+ applyTheme("system");
80244
+ };
80245
+ mediaQuery.addEventListener("change", handleChange);
80246
+ return () => mediaQuery.removeEventListener("change", handleChange);
80247
+ }, [theme]);
80248
+ useEffect2(() => {
80249
+ if (!mounted) return;
80250
+ applyTheme(theme);
80251
+ }, [theme, mounted]);
80252
+ const handleSetTheme = (newTheme) => {
80253
+ if (forcedTheme) {
80254
+ console.warn(
80255
+ "[ThemeProvider] Theme is forced via URL parameter, ignoring setTheme call"
80256
+ );
80257
+ return;
80258
+ }
80259
+ setTheme(newTheme);
80260
+ };
80261
+ return /* @__PURE__ */ jsx14(ThemeContext, { value: { theme, setTheme: handleSetTheme, resolvedTheme }, children });
80262
+ }
80263
+
80197
80264
  // src/client/components/IframeConsole.tsx
80198
80265
  import {
80199
80266
  ChevronDown as ChevronDown2,
@@ -80204,11 +80271,11 @@ import {
80204
80271
  TrashIcon,
80205
80272
  X
80206
80273
  } from "lucide-react";
80207
- import { useCallback as useCallback5, useEffect as useEffect3, useMemo as useMemo2, useRef as useRef3, useState as useState5 } from "react";
80274
+ import { useCallback as useCallback5, useEffect as useEffect4, useMemo as useMemo2, useRef as useRef3, useState as useState6 } from "react";
80208
80275
  import { toast } from "sonner";
80209
80276
 
80210
80277
  // src/client/hooks/useIframeConsole.ts
80211
- import { useCallback as useCallback4, useEffect as useEffect2, useRef as useRef2, useState as useState4 } from "react";
80278
+ import { useCallback as useCallback4, useEffect as useEffect3, useRef as useRef2, useState as useState5 } from "react";
80212
80279
 
80213
80280
  // src/client/console-log-bus.ts
80214
80281
  var ConsoleLogBus = class {
@@ -80245,8 +80312,8 @@ function useIframeConsole(options = {}) {
80245
80312
  maxLogs = 1e3,
80246
80313
  proxyToPageConsole = false
80247
80314
  } = options;
80248
- const [logs, setLogs] = useState4([]);
80249
- const [isOpen, setIsOpen] = useState4(false);
80315
+ const [logs, setLogs] = useState5([]);
80316
+ const [isOpen, setIsOpen] = useState5(false);
80250
80317
  const logIdCounterRef = useRef2(0);
80251
80318
  const addLog = useCallback4(
80252
80319
  (entry) => {
@@ -80298,7 +80365,7 @@ function useIframeConsole(options = {}) {
80298
80365
  setLogs([]);
80299
80366
  logIdCounterRef.current = 0;
80300
80367
  }, []);
80301
- useEffect2(() => {
80368
+ useEffect3(() => {
80302
80369
  if (!enabled) return;
80303
80370
  const handleMessage = (event) => {
80304
80371
  if (event.data && event.data.type === "iframe-console-log" && event.data.level && Array.isArray(event.data.args)) {
@@ -80315,7 +80382,7 @@ function useIframeConsole(options = {}) {
80315
80382
  window.removeEventListener("message", handleMessage);
80316
80383
  };
80317
80384
  }, [enabled, addLog]);
80318
- useEffect2(() => {
80385
+ useEffect3(() => {
80319
80386
  if (!enabled) return;
80320
80387
  return consoleLogBus.subscribe(addLog);
80321
80388
  }, [enabled, addLog]);
@@ -80331,25 +80398,25 @@ function useIframeConsole(options = {}) {
80331
80398
  // src/client/components/ui/sheet.tsx
80332
80399
  import * as SheetPrimitive from "@radix-ui/react-dialog";
80333
80400
  import { XIcon as XIcon2 } from "lucide-react";
80334
- import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
80401
+ import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
80335
80402
  function Sheet({ ...props }) {
80336
- return /* @__PURE__ */ jsx14(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
80403
+ return /* @__PURE__ */ jsx15(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
80337
80404
  }
80338
80405
  function SheetTrigger({
80339
80406
  ...props
80340
80407
  }) {
80341
- return /* @__PURE__ */ jsx14(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
80408
+ return /* @__PURE__ */ jsx15(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
80342
80409
  }
80343
80410
  function SheetPortal({
80344
80411
  ...props
80345
80412
  }) {
80346
- return /* @__PURE__ */ jsx14(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
80413
+ return /* @__PURE__ */ jsx15(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
80347
80414
  }
80348
80415
  function SheetOverlay({
80349
80416
  className,
80350
80417
  ...props
80351
80418
  }) {
80352
- return /* @__PURE__ */ jsx14(
80419
+ return /* @__PURE__ */ jsx15(
80353
80420
  SheetPrimitive.Overlay,
80354
80421
  {
80355
80422
  "data-slot": "sheet-overlay",
@@ -80368,7 +80435,7 @@ function SheetContent({
80368
80435
  ...props
80369
80436
  }) {
80370
80437
  return /* @__PURE__ */ jsxs6(SheetPortal, { children: [
80371
- /* @__PURE__ */ jsx14(SheetOverlay, {}),
80438
+ /* @__PURE__ */ jsx15(SheetOverlay, {}),
80372
80439
  /* @__PURE__ */ jsxs6(
80373
80440
  SheetPrimitive.Content,
80374
80441
  {
@@ -80385,8 +80452,8 @@ function SheetContent({
80385
80452
  children: [
80386
80453
  children,
80387
80454
  /* @__PURE__ */ jsxs6(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary 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", children: [
80388
- /* @__PURE__ */ jsx14(XIcon2, { className: "size-4" }),
80389
- /* @__PURE__ */ jsx14("span", { className: "sr-only", children: "Close" })
80455
+ /* @__PURE__ */ jsx15(XIcon2, { className: "size-4" }),
80456
+ /* @__PURE__ */ jsx15("span", { className: "sr-only", children: "Close" })
80390
80457
  ] })
80391
80458
  ]
80392
80459
  }
@@ -80394,7 +80461,7 @@ function SheetContent({
80394
80461
  ] });
80395
80462
  }
80396
80463
  function SheetHeader({ className, ...props }) {
80397
- return /* @__PURE__ */ jsx14(
80464
+ return /* @__PURE__ */ jsx15(
80398
80465
  "div",
80399
80466
  {
80400
80467
  "data-slot": "sheet-header",
@@ -80407,7 +80474,7 @@ function SheetTitle({
80407
80474
  className,
80408
80475
  ...props
80409
80476
  }) {
80410
- return /* @__PURE__ */ jsx14(
80477
+ return /* @__PURE__ */ jsx15(
80411
80478
  SheetPrimitive.Title,
80412
80479
  {
80413
80480
  "data-slot": "sheet-title",
@@ -80420,7 +80487,7 @@ function SheetDescription({
80420
80487
  className,
80421
80488
  ...props
80422
80489
  }) {
80423
- return /* @__PURE__ */ jsx14(
80490
+ return /* @__PURE__ */ jsx15(
80424
80491
  SheetPrimitive.Description,
80425
80492
  {
80426
80493
  "data-slot": "sheet-description",
@@ -80432,12 +80499,12 @@ function SheetDescription({
80432
80499
 
80433
80500
  // src/client/components/ui/tooltip.tsx
80434
80501
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
80435
- import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
80502
+ import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
80436
80503
  function TooltipProvider({
80437
80504
  delayDuration = 0,
80438
80505
  ...props
80439
80506
  }) {
80440
- return /* @__PURE__ */ jsx15(
80507
+ return /* @__PURE__ */ jsx16(
80441
80508
  TooltipPrimitive.Provider,
80442
80509
  {
80443
80510
  "data-slot": "tooltip-provider",
@@ -80449,12 +80516,12 @@ function TooltipProvider({
80449
80516
  function Tooltip({
80450
80517
  ...props
80451
80518
  }) {
80452
- return /* @__PURE__ */ jsx15(TooltipProvider, { children: /* @__PURE__ */ jsx15(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
80519
+ return /* @__PURE__ */ jsx16(TooltipProvider, { children: /* @__PURE__ */ jsx16(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
80453
80520
  }
80454
80521
  function TooltipTrigger({
80455
80522
  ...props
80456
80523
  }) {
80457
- return /* @__PURE__ */ jsx15(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
80524
+ return /* @__PURE__ */ jsx16(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
80458
80525
  }
80459
80526
  function TooltipContent({
80460
80527
  className,
@@ -80462,7 +80529,7 @@ function TooltipContent({
80462
80529
  children,
80463
80530
  ...props
80464
80531
  }) {
80465
- return /* @__PURE__ */ jsx15(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs7(
80532
+ return /* @__PURE__ */ jsx16(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs7(
80466
80533
  TooltipPrimitive.Content,
80467
80534
  {
80468
80535
  "data-slot": "tooltip-content",
@@ -80474,14 +80541,14 @@ function TooltipContent({
80474
80541
  ...props,
80475
80542
  children: [
80476
80543
  children,
80477
- /* @__PURE__ */ jsx15(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
80544
+ /* @__PURE__ */ jsx16(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
80478
80545
  ]
80479
80546
  }
80480
80547
  ) });
80481
80548
  }
80482
80549
 
80483
80550
  // src/client/components/IframeConsole.tsx
80484
- import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
80551
+ import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
80485
80552
  var MIN_HEIGHT = 200;
80486
80553
  var MAX_HEIGHT_RATIO = 0.9;
80487
80554
  function formatArg(arg) {
@@ -80506,7 +80573,7 @@ function LogLevelBadge({ level }) {
80506
80573
  debug: "bg-purple-500",
80507
80574
  trace: "bg-gray-500"
80508
80575
  };
80509
- return /* @__PURE__ */ jsx16(
80576
+ return /* @__PURE__ */ jsx17(
80510
80577
  "span",
80511
80578
  {
80512
80579
  className: cn(
@@ -80518,7 +80585,7 @@ function LogLevelBadge({ level }) {
80518
80585
  );
80519
80586
  }
80520
80587
  function LogEntry({ log }) {
80521
- const [expanded, setExpanded] = useState5(false);
80588
+ const [expanded, setExpanded] = useState6(false);
80522
80589
  const formattedTime = useMemo2(() => {
80523
80590
  try {
80524
80591
  const date = new Date(log.timestamp);
@@ -80563,10 +80630,10 @@ function LogEntry({ log }) {
80563
80630
  className: cn("flex items-center gap-2 px-2 py-1.5", headerHover),
80564
80631
  onClick: () => setExpanded((v2) => !v2),
80565
80632
  children: [
80566
- /* @__PURE__ */ jsx16("span", { className: "text-zinc-400 dark:text-zinc-500 shrink-0", children: expanded ? /* @__PURE__ */ jsx16(ChevronDown2, { className: "size-3" }) : /* @__PURE__ */ jsx16(ChevronRight, { className: "size-3" }) }),
80567
- /* @__PURE__ */ jsx16(LogLevelBadge, { level: log.level }),
80568
- /* @__PURE__ */ jsx16("span", { className: "text-zinc-500 dark:text-zinc-400 text-[10px] shrink-0", children: formattedTime }),
80569
- !expanded && /* @__PURE__ */ jsx16(
80633
+ /* @__PURE__ */ jsx17("span", { className: "text-zinc-400 dark:text-zinc-500 shrink-0", children: expanded ? /* @__PURE__ */ jsx17(ChevronDown2, { className: "size-3" }) : /* @__PURE__ */ jsx17(ChevronRight, { className: "size-3" }) }),
80634
+ /* @__PURE__ */ jsx17(LogLevelBadge, { level: log.level }),
80635
+ /* @__PURE__ */ jsx17("span", { className: "text-zinc-500 dark:text-zinc-400 text-[10px] shrink-0", children: formattedTime }),
80636
+ !expanded && /* @__PURE__ */ jsx17(
80570
80637
  "span",
80571
80638
  {
80572
80639
  className: cn(
@@ -80578,26 +80645,26 @@ function LogEntry({ log }) {
80578
80645
  children: inlinePreview
80579
80646
  }
80580
80647
  ),
80581
- expanded && log.url && /* @__PURE__ */ jsx16("span", { className: "text-zinc-400 dark:text-zinc-500 text-[10px] truncate flex-1", children: (() => {
80648
+ expanded && log.url && /* @__PURE__ */ jsx17("span", { className: "text-zinc-400 dark:text-zinc-500 text-[10px] truncate flex-1", children: (() => {
80582
80649
  try {
80583
80650
  return new URL(log.url).pathname;
80584
80651
  } catch {
80585
80652
  return log.url;
80586
80653
  }
80587
80654
  })() }),
80588
- expanded && /* @__PURE__ */ jsx16(
80655
+ expanded && /* @__PURE__ */ jsx17(
80589
80656
  "button",
80590
80657
  {
80591
80658
  onClick: copyLog,
80592
80659
  "aria-label": "Copy log",
80593
80660
  className: "ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity p-0.5 rounded text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200",
80594
- children: /* @__PURE__ */ jsx16(Copy2, { className: "size-3" })
80661
+ children: /* @__PURE__ */ jsx17(Copy2, { className: "size-3" })
80595
80662
  }
80596
80663
  )
80597
80664
  ]
80598
80665
  }
80599
80666
  ),
80600
- expanded && /* @__PURE__ */ jsx16("div", { className: "pl-8 pr-2 pb-2 select-text", children: log.args.map((arg, idx) => /* @__PURE__ */ jsx16(
80667
+ expanded && /* @__PURE__ */ jsx17("div", { className: "pl-8 pr-2 pb-2 select-text", children: log.args.map((arg, idx) => /* @__PURE__ */ jsx17(
80601
80668
  "pre",
80602
80669
  {
80603
80670
  className: cn(
@@ -80634,7 +80701,7 @@ function IframeConsole({
80634
80701
  iframeId,
80635
80702
  enabled = true
80636
80703
  }) {
80637
- const [proxyToPageConsole, setProxyToPageConsole] = useState5(() => {
80704
+ const [proxyToPageConsole, setProxyToPageConsole] = useState6(() => {
80638
80705
  if (typeof window === "undefined") return true;
80639
80706
  try {
80640
80707
  const stored = localStorage.getItem(PROXY_TOGGLE_KEY);
@@ -80643,7 +80710,7 @@ function IframeConsole({
80643
80710
  return true;
80644
80711
  }
80645
80712
  });
80646
- const [height, setHeight] = useState5(() => {
80713
+ const [height, setHeight] = useState6(() => {
80647
80714
  if (typeof window === "undefined") return 400;
80648
80715
  try {
80649
80716
  const stored = localStorage.getItem(CONSOLE_HEIGHT_KEY);
@@ -80673,20 +80740,20 @@ function IframeConsole({
80673
80740
  window.addEventListener("mousemove", onMouseMove);
80674
80741
  window.addEventListener("mouseup", onMouseUp);
80675
80742
  }, []);
80676
- useEffect3(() => {
80743
+ useEffect4(() => {
80677
80744
  try {
80678
80745
  localStorage.setItem(CONSOLE_HEIGHT_KEY, String(height));
80679
80746
  } catch {
80680
80747
  }
80681
80748
  }, [height]);
80682
- const [activeFilter, setActiveFilter] = useState5("all");
80683
- const [searchQuery, setSearchQuery] = useState5("");
80749
+ const [activeFilter, setActiveFilter] = useState6("all");
80750
+ const [searchQuery, setSearchQuery] = useState6("");
80684
80751
  const { logs, clearLogs, isOpen, setIsOpen } = useIframeConsole({
80685
80752
  enabled,
80686
80753
  proxyToPageConsole
80687
80754
  });
80688
80755
  const scrollContainerRef = useRef3(null);
80689
- useEffect3(() => {
80756
+ useEffect4(() => {
80690
80757
  try {
80691
80758
  localStorage.setItem(PROXY_TOGGLE_KEY, String(proxyToPageConsole));
80692
80759
  } catch {
@@ -80726,7 +80793,7 @@ function IframeConsole({
80726
80793
  }
80727
80794
  return result;
80728
80795
  }, [logs, activeFilter, searchQuery]);
80729
- useEffect3(() => {
80796
+ useEffect4(() => {
80730
80797
  if (isOpen && !searchQuery && scrollContainerRef.current) {
80731
80798
  scrollContainerRef.current.scrollTop = scrollContainerRef.current.scrollHeight;
80732
80799
  }
@@ -80748,8 +80815,8 @@ ${args}`;
80748
80815
  }
80749
80816
  };
80750
80817
  return /* @__PURE__ */ jsxs8(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: [
80751
- /* @__PURE__ */ jsx16(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(Tooltip, { children: [
80752
- /* @__PURE__ */ jsx16(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(
80818
+ /* @__PURE__ */ jsx17(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(Tooltip, { children: [
80819
+ /* @__PURE__ */ jsx17(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(
80753
80820
  Button,
80754
80821
  {
80755
80822
  variant: "outline",
@@ -80757,8 +80824,8 @@ ${args}`;
80757
80824
  className: "relative bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm shadow-sm hover:bg-white dark:hover:bg-zinc-900",
80758
80825
  onClick: () => setIsOpen(true),
80759
80826
  children: [
80760
- /* @__PURE__ */ jsx16(TerminalIcon, { className: "size-4" }),
80761
- totalCount > 0 && /* @__PURE__ */ jsx16(
80827
+ /* @__PURE__ */ jsx17(TerminalIcon, { className: "size-4" }),
80828
+ totalCount > 0 && /* @__PURE__ */ jsx17(
80762
80829
  "span",
80763
80830
  {
80764
80831
  className: cn(
@@ -80771,7 +80838,7 @@ ${args}`;
80771
80838
  ]
80772
80839
  }
80773
80840
  ) }),
80774
- /* @__PURE__ */ jsx16(TooltipContent, { children: /* @__PURE__ */ jsxs8("div", { className: "text-xs space-y-1", children: [
80841
+ /* @__PURE__ */ jsx17(TooltipContent, { children: /* @__PURE__ */ jsxs8("div", { className: "text-xs space-y-1", children: [
80775
80842
  /* @__PURE__ */ jsxs8("p", { className: "font-semibold", children: [
80776
80843
  totalCount,
80777
80844
  " console ",
@@ -80800,7 +80867,7 @@ ${args}`;
80800
80867
  className: "flex flex-col p-0 transition-none m-0 gap-0",
80801
80868
  style: { height },
80802
80869
  children: [
80803
- /* @__PURE__ */ jsx16(
80870
+ /* @__PURE__ */ jsx17(
80804
80871
  "div",
80805
80872
  {
80806
80873
  className: "h-1.5 w-full shrink-0 cursor-ns-resize bg-zinc-200 dark:bg-zinc-700 hover:bg-zinc-300 dark:hover:bg-zinc-600 transition-colors",
@@ -80810,7 +80877,7 @@ ${args}`;
80810
80877
  /* @__PURE__ */ jsxs8(SheetHeader, { className: "px-4 py-4 m-0 border-b border-zinc-200 dark:border-zinc-800 shrink-0", children: [
80811
80878
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between", children: [
80812
80879
  /* @__PURE__ */ jsxs8(SheetTitle, { className: "flex items-center gap-2", children: [
80813
- /* @__PURE__ */ jsx16(TerminalIcon, { className: "size-4" }),
80880
+ /* @__PURE__ */ jsx17(TerminalIcon, { className: "size-4" }),
80814
80881
  "Widget Console Logs",
80815
80882
  logs.length > 0 && /* @__PURE__ */ jsxs8("span", { className: "text-sm font-normal text-zinc-500 dark:text-zinc-400", children: [
80816
80883
  "(",
@@ -80822,7 +80889,7 @@ ${args}`;
80822
80889
  ] }),
80823
80890
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-4 pr-4", children: [
80824
80891
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
80825
- /* @__PURE__ */ jsx16(
80892
+ /* @__PURE__ */ jsx17(
80826
80893
  Switch,
80827
80894
  {
80828
80895
  id: "proxy-console-toggle",
@@ -80830,7 +80897,7 @@ ${args}`;
80830
80897
  onCheckedChange: setProxyToPageConsole
80831
80898
  }
80832
80899
  ),
80833
- /* @__PURE__ */ jsx16(
80900
+ /* @__PURE__ */ jsx17(
80834
80901
  Label2,
80835
80902
  {
80836
80903
  htmlFor: "proxy-console-toggle",
@@ -80848,7 +80915,7 @@ ${args}`;
80848
80915
  onClick: copyAllLogs,
80849
80916
  className: "-my-2",
80850
80917
  children: [
80851
- /* @__PURE__ */ jsx16(Copy2, { className: "size-4 mr-1" }),
80918
+ /* @__PURE__ */ jsx17(Copy2, { className: "size-4 mr-1" }),
80852
80919
  "Copy All"
80853
80920
  ]
80854
80921
  }
@@ -80861,7 +80928,7 @@ ${args}`;
80861
80928
  onClick: clearLogs,
80862
80929
  className: "-my-2",
80863
80930
  children: [
80864
- /* @__PURE__ */ jsx16(TrashIcon, { className: "size-4 mr-1" }),
80931
+ /* @__PURE__ */ jsx17(TrashIcon, { className: "size-4 mr-1" }),
80865
80932
  "Clear"
80866
80933
  ]
80867
80934
  }
@@ -80880,7 +80947,7 @@ ${args}`;
80880
80947
  ),
80881
80948
  children: [
80882
80949
  "All",
80883
- totalCount > 0 && /* @__PURE__ */ jsx16("span", { className: "ml-1 text-[10px] opacity-70", children: totalCount })
80950
+ totalCount > 0 && /* @__PURE__ */ jsx17("span", { className: "ml-1 text-[10px] opacity-70", children: totalCount })
80884
80951
  ]
80885
80952
  }
80886
80953
  ),
@@ -80895,8 +80962,8 @@ ${args}`;
80895
80962
  activeFilter === level ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-900 dark:text-zinc-100" : "text-zinc-500 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800"
80896
80963
  ),
80897
80964
  children: [
80898
- /* @__PURE__ */ jsx16("span", { className: cn(count > 0 && levelFilterColors[level]), children: level.charAt(0).toUpperCase() + level.slice(1) }),
80899
- count > 0 && /* @__PURE__ */ jsx16(
80965
+ /* @__PURE__ */ jsx17("span", { className: cn(count > 0 && levelFilterColors[level]), children: level.charAt(0).toUpperCase() + level.slice(1) }),
80966
+ count > 0 && /* @__PURE__ */ jsx17(
80900
80967
  "span",
80901
80968
  {
80902
80969
  className: cn(
@@ -80912,8 +80979,8 @@ ${args}`;
80912
80979
  );
80913
80980
  }),
80914
80981
  /* @__PURE__ */ jsxs8("div", { className: "ml-auto flex items-center gap-1 relative", children: [
80915
- /* @__PURE__ */ jsx16(Search, { className: "absolute left-2 size-3 text-zinc-400 dark:text-zinc-500 pointer-events-none" }),
80916
- /* @__PURE__ */ jsx16(
80982
+ /* @__PURE__ */ jsx17(Search, { className: "absolute left-2 size-3 text-zinc-400 dark:text-zinc-500 pointer-events-none" }),
80983
+ /* @__PURE__ */ jsx17(
80917
80984
  "input",
80918
80985
  {
80919
80986
  type: "text",
@@ -80923,28 +80990,28 @@ ${args}`;
80923
80990
  className: "pl-6 pr-6 py-0.5 text-xs rounded border border-zinc-200 dark:border-zinc-700 bg-white dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 dark:placeholder-zinc-500 focus:outline-none focus:ring-1 focus:ring-zinc-400 dark:focus:ring-zinc-500 w-44"
80924
80991
  }
80925
80992
  ),
80926
- searchQuery && /* @__PURE__ */ jsx16(
80993
+ searchQuery && /* @__PURE__ */ jsx17(
80927
80994
  "button",
80928
80995
  {
80929
80996
  onClick: () => setSearchQuery(""),
80930
80997
  "aria-label": "Clear search",
80931
80998
  className: "absolute right-1.5 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300",
80932
- children: /* @__PURE__ */ jsx16(X, { className: "size-3" })
80999
+ children: /* @__PURE__ */ jsx17(X, { className: "size-3" })
80933
81000
  }
80934
81001
  )
80935
81002
  ] })
80936
81003
  ] })
80937
81004
  ] }),
80938
- /* @__PURE__ */ jsx16(
81005
+ /* @__PURE__ */ jsx17(
80939
81006
  "div",
80940
81007
  {
80941
81008
  ref: scrollContainerRef,
80942
81009
  className: "flex-1 overflow-auto bg-zinc-50 dark:bg-zinc-950",
80943
- children: filteredLogs.length === 0 ? /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center h-full text-zinc-500 dark:text-zinc-400", children: /* @__PURE__ */ jsxs8("div", { className: "text-center", children: [
80944
- /* @__PURE__ */ jsx16(TerminalIcon, { className: "size-8 mx-auto mb-2 opacity-50" }),
80945
- /* @__PURE__ */ jsx16("p", { className: "text-sm", children: logs.length === 0 ? "No console logs yet" : searchQuery ? `No logs match "${searchQuery}"` : "No logs match the current filter" }),
80946
- /* @__PURE__ */ jsx16("p", { className: "text-xs mt-1", children: logs.length === 0 ? "Logs from iframes will appear here" : `${logs.length} log${logs.length !== 1 ? "s" : ""} hidden by filter` })
80947
- ] }) }) : /* @__PURE__ */ jsx16("div", { children: filteredLogs.map((log) => /* @__PURE__ */ jsx16(LogEntry, { log }, log.id)) })
81010
+ children: filteredLogs.length === 0 ? /* @__PURE__ */ jsx17("div", { className: "flex items-center justify-center h-full text-zinc-500 dark:text-zinc-400", children: /* @__PURE__ */ jsxs8("div", { className: "text-center", children: [
81011
+ /* @__PURE__ */ jsx17(TerminalIcon, { className: "size-8 mx-auto mb-2 opacity-50" }),
81012
+ /* @__PURE__ */ jsx17("p", { className: "text-sm", children: logs.length === 0 ? "No console logs yet" : searchQuery ? `No logs match "${searchQuery}"` : "No logs match the current filter" }),
81013
+ /* @__PURE__ */ jsx17("p", { className: "text-xs mt-1", children: logs.length === 0 ? "Logs from iframes will appear here" : `${logs.length} log${logs.length !== 1 ? "s" : ""} hidden by filter` })
81014
+ ] }) }) : /* @__PURE__ */ jsx17("div", { children: filteredLogs.map((log) => /* @__PURE__ */ jsx17(LogEntry, { log }, log.id)) })
80948
81015
  }
80949
81016
  )
80950
81017
  ]
@@ -81159,11 +81226,11 @@ Based on this information, suggest 3-5 common customizable properties like theme
81159
81226
 
81160
81227
  // src/client/components/resources/PropsConfigDialog.tsx
81161
81228
  import { Loader2, Plus as Plus2, Sparkles, Trash2 } from "lucide-react";
81162
- import { useEffect as useEffect4, useMemo as useMemo3, useState as useState6 } from "react";
81229
+ import { useEffect as useEffect5, useMemo as useMemo3, useState as useState7 } from "react";
81163
81230
  import { toast as toast2 } from "sonner";
81164
81231
 
81165
81232
  // src/client/components/shared/SchemaFormField.tsx
81166
- import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
81233
+ import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
81167
81234
  function resolveRef2(schema, rootSchema) {
81168
81235
  if (!schema?.$ref) return schema;
81169
81236
  const ref = schema.$ref;
@@ -81221,9 +81288,9 @@ function SchemaFormField({
81221
81288
  return /* @__PURE__ */ jsxs9("div", { className: "space-y-2", children: [
81222
81289
  /* @__PURE__ */ jsxs9(Label2, { htmlFor: name, className: "text-sm font-medium", children: [
81223
81290
  name,
81224
- required && /* @__PURE__ */ jsx17("span", { className: "text-red-500 ml-1", children: "*" })
81291
+ required && /* @__PURE__ */ jsx18("span", { className: "text-red-500 ml-1", children: "*" })
81225
81292
  ] }),
81226
- /* @__PURE__ */ jsx17(
81293
+ /* @__PURE__ */ jsx18(
81227
81294
  Textarea,
81228
81295
  {
81229
81296
  id: name,
@@ -81234,14 +81301,14 @@ function SchemaFormField({
81234
81301
  disabled
81235
81302
  }
81236
81303
  ),
81237
- typedProp?.description && /* @__PURE__ */ jsx17("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: typedProp.description })
81304
+ typedProp?.description && /* @__PURE__ */ jsx18("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: typedProp.description })
81238
81305
  ] });
81239
81306
  }
81240
81307
  if (isEnum && enumValues) {
81241
81308
  return /* @__PURE__ */ jsxs9("div", { className: "space-y-2", children: [
81242
81309
  /* @__PURE__ */ jsxs9(Label2, { htmlFor: name, className: "text-sm font-medium", children: [
81243
81310
  name,
81244
- required && /* @__PURE__ */ jsx17("span", { className: "text-red-500 ml-1", children: "*" })
81311
+ required && /* @__PURE__ */ jsx18("span", { className: "text-red-500 ml-1", children: "*" })
81245
81312
  ] }),
81246
81313
  /* @__PURE__ */ jsxs9(
81247
81314
  Select,
@@ -81250,25 +81317,25 @@ function SchemaFormField({
81250
81317
  onValueChange: onChange,
81251
81318
  disabled,
81252
81319
  children: [
81253
- /* @__PURE__ */ jsx17(SelectTrigger, { id: name, className: "w-full", children: /* @__PURE__ */ jsx17(
81320
+ /* @__PURE__ */ jsx18(SelectTrigger, { id: name, className: "w-full", children: /* @__PURE__ */ jsx18(
81254
81321
  SelectValue,
81255
81322
  {
81256
81323
  placeholder: typedProp.description || "Select an option"
81257
81324
  }
81258
81325
  ) }),
81259
- /* @__PURE__ */ jsx17(SelectContent, { children: enumValues.map((option, index) => /* @__PURE__ */ jsx17(SelectItem, { value: option, children: typedProp.enumNames?.[index] || option }, option)) })
81326
+ /* @__PURE__ */ jsx18(SelectContent, { children: enumValues.map((option, index) => /* @__PURE__ */ jsx18(SelectItem, { value: option, children: typedProp.enumNames?.[index] || option }, option)) })
81260
81327
  ]
81261
81328
  }
81262
81329
  ),
81263
- typedProp.description && /* @__PURE__ */ jsx17("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: typedProp.description })
81330
+ typedProp.description && /* @__PURE__ */ jsx18("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: typedProp.description })
81264
81331
  ] });
81265
81332
  }
81266
81333
  return /* @__PURE__ */ jsxs9("div", { className: "space-y-2", children: [
81267
81334
  /* @__PURE__ */ jsxs9(Label2, { htmlFor: name, className: "text-sm font-medium", children: [
81268
81335
  name,
81269
- required && /* @__PURE__ */ jsx17("span", { className: "text-red-500 ml-1", children: "*" })
81336
+ required && /* @__PURE__ */ jsx18("span", { className: "text-red-500 ml-1", children: "*" })
81270
81337
  ] }),
81271
- /* @__PURE__ */ jsx17(
81338
+ /* @__PURE__ */ jsx18(
81272
81339
  Input,
81273
81340
  {
81274
81341
  id: name,
@@ -81279,12 +81346,12 @@ function SchemaFormField({
81279
81346
  disabled
81280
81347
  }
81281
81348
  ),
81282
- typedProp?.description && /* @__PURE__ */ jsx17("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: typedProp.description })
81349
+ typedProp?.description && /* @__PURE__ */ jsx18("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: typedProp.description })
81283
81350
  ] });
81284
81351
  }
81285
81352
 
81286
81353
  // src/client/components/resources/PropsConfigDialog.tsx
81287
- import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
81354
+ import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
81288
81355
  function PropsConfigDialog({
81289
81356
  open,
81290
81357
  onOpenChange,
@@ -81389,15 +81456,15 @@ function PropsConfigDialog({
81389
81456
  return null;
81390
81457
  }, [resourceAnnotations, resource.annotations, resource.uri, resource.name]);
81391
81458
  const hasSchema = !!propsSchema;
81392
- const [presetName, setPresetName] = useState6("");
81393
- const [schemaValues, setSchemaValues] = useState6({});
81394
- const [propPairs, setPropPairs] = useState6([
81459
+ const [presetName, setPresetName] = useState7("");
81460
+ const [schemaValues, setSchemaValues] = useState7({});
81461
+ const [propPairs, setPropPairs] = useState7([
81395
81462
  { id: crypto.randomUUID(), key: "", value: "" }
81396
81463
  ]);
81397
- const [isGenerating, setIsGenerating] = useState6(false);
81398
- const [generationError, setGenerationError] = useState6(null);
81464
+ const [isGenerating, setIsGenerating] = useState7(false);
81465
+ const [generationError, setGenerationError] = useState7(null);
81399
81466
  const { generateProps, isAvailable } = usePropsLLM({ llmConfig });
81400
- useEffect4(() => {
81467
+ useEffect5(() => {
81401
81468
  if (open) {
81402
81469
  if (editingPreset) {
81403
81470
  setPresetName(editingPreset.name);
@@ -81533,14 +81600,14 @@ function PropsConfigDialog({
81533
81600
  description: `Preset "${preset.name}" saved successfully.`
81534
81601
  });
81535
81602
  };
81536
- return /* @__PURE__ */ jsx18(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs10(
81603
+ return /* @__PURE__ */ jsx19(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs10(
81537
81604
  DialogContent,
81538
81605
  {
81539
81606
  className: "sm:max-w-[600px] max-h-[80vh] flex flex-col",
81540
81607
  "data-testid": "props-config-dialog",
81541
81608
  children: [
81542
81609
  /* @__PURE__ */ jsxs10(DialogHeader, { children: [
81543
- /* @__PURE__ */ jsx18(DialogTitle, { children: editingPreset ? "Edit Preset" : "Create Props Preset" }),
81610
+ /* @__PURE__ */ jsx19(DialogTitle, { children: editingPreset ? "Edit Preset" : "Create Props Preset" }),
81544
81611
  /* @__PURE__ */ jsxs10(DialogDescription, { children: [
81545
81612
  "Configure props for ",
81546
81613
  resource.name || resource.uri,
@@ -81549,8 +81616,8 @@ function PropsConfigDialog({
81549
81616
  ] }),
81550
81617
  /* @__PURE__ */ jsxs10("div", { className: "flex-1 overflow-y-auto space-y-4 py-4", children: [
81551
81618
  /* @__PURE__ */ jsxs10("div", { className: "space-y-2", children: [
81552
- /* @__PURE__ */ jsx18(Label2, { htmlFor: "preset-name", children: "Preset Name" }),
81553
- /* @__PURE__ */ jsx18(
81619
+ /* @__PURE__ */ jsx19(Label2, { htmlFor: "preset-name", children: "Preset Name" }),
81620
+ /* @__PURE__ */ jsx19(
81554
81621
  Input,
81555
81622
  {
81556
81623
  id: "preset-name",
@@ -81564,7 +81631,7 @@ function PropsConfigDialog({
81564
81631
  ] }),
81565
81632
  /* @__PURE__ */ jsxs10("div", { className: "space-y-2 p-3 bg-muted rounded-lg", children: [
81566
81633
  /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between", children: [
81567
- /* @__PURE__ */ jsx18(Label2, { className: "text-sm font-medium", children: "Generate with AI" }),
81634
+ /* @__PURE__ */ jsx19(Label2, { className: "text-sm font-medium", children: "Generate with AI" }),
81568
81635
  isAvailable && /* @__PURE__ */ jsxs10("span", { className: "text-xs text-muted-foreground", children: [
81569
81636
  "Using ",
81570
81637
  llmConfig?.provider,
@@ -81573,7 +81640,7 @@ function PropsConfigDialog({
81573
81640
  ")"
81574
81641
  ] })
81575
81642
  ] }),
81576
- isAvailable ? /* @__PURE__ */ jsx18(
81643
+ isAvailable ? /* @__PURE__ */ jsx19(
81577
81644
  Button,
81578
81645
  {
81579
81646
  onClick: handleGenerateWithLLM,
@@ -81588,17 +81655,17 @@ function PropsConfigDialog({
81588
81655
  "data-testid": "props-config-generating",
81589
81656
  className: "flex items-center gap-2",
81590
81657
  children: [
81591
- /* @__PURE__ */ jsx18(Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
81658
+ /* @__PURE__ */ jsx19(Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
81592
81659
  "Generating..."
81593
81660
  ]
81594
81661
  }
81595
81662
  ) : /* @__PURE__ */ jsxs10(Fragment5, { children: [
81596
- /* @__PURE__ */ jsx18(Sparkles, { className: "h-4 w-4 mr-2" }),
81663
+ /* @__PURE__ */ jsx19(Sparkles, { className: "h-4 w-4 mr-2" }),
81597
81664
  "Generate Props with LLM"
81598
81665
  ] })
81599
81666
  }
81600
- ) : /* @__PURE__ */ jsx18("p", { className: "text-xs text-muted-foreground", children: "LLM not configured. Please configure LLM in the Chat tab to use this feature." }),
81601
- generationError && /* @__PURE__ */ jsx18(
81667
+ ) : /* @__PURE__ */ jsx19("p", { className: "text-xs text-muted-foreground", children: "LLM not configured. Please configure LLM in the Chat tab to use this feature." }),
81668
+ generationError && /* @__PURE__ */ jsx19(
81602
81669
  "p",
81603
81670
  {
81604
81671
  className: "text-xs text-destructive",
@@ -81608,11 +81675,11 @@ function PropsConfigDialog({
81608
81675
  )
81609
81676
  ] }),
81610
81677
  /* @__PURE__ */ jsxs10("div", { className: "space-y-3", children: [
81611
- /* @__PURE__ */ jsx18(Label2, { className: "text-sm font-medium", children: "Props" }),
81678
+ /* @__PURE__ */ jsx19(Label2, { className: "text-sm font-medium", children: "Props" }),
81612
81679
  hasSchema ? (
81613
81680
  // Schema-based form
81614
- /* @__PURE__ */ jsx18("div", { className: "space-y-4", children: Object.entries(propsSchema.properties || {}).map(
81615
- ([key, propDef]) => /* @__PURE__ */ jsx18(
81681
+ /* @__PURE__ */ jsx19("div", { className: "space-y-4", children: Object.entries(propsSchema.properties || {}).map(
81682
+ ([key, propDef]) => /* @__PURE__ */ jsx19(
81616
81683
  SchemaFormField,
81617
81684
  {
81618
81685
  name: key,
@@ -81629,7 +81696,7 @@ function PropsConfigDialog({
81629
81696
  ) : (
81630
81697
  // Generic key-value form
81631
81698
  /* @__PURE__ */ jsxs10(Fragment5, { children: [
81632
- /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxs10(
81699
+ /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxs10(
81633
81700
  Button,
81634
81701
  {
81635
81702
  onClick: handleAddPair,
@@ -81638,14 +81705,14 @@ function PropsConfigDialog({
81638
81705
  disabled: isGenerating,
81639
81706
  "data-testid": "props-config-add-prop",
81640
81707
  children: [
81641
- /* @__PURE__ */ jsx18(Plus2, { className: "h-4 w-4 mr-1" }),
81708
+ /* @__PURE__ */ jsx19(Plus2, { className: "h-4 w-4 mr-1" }),
81642
81709
  "Add Prop"
81643
81710
  ]
81644
81711
  }
81645
81712
  ) }),
81646
81713
  propPairs.map((pair, index) => /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2", children: [
81647
81714
  /* @__PURE__ */ jsxs10("div", { className: "flex-1 grid grid-cols-2 gap-2", children: [
81648
- /* @__PURE__ */ jsx18(
81715
+ /* @__PURE__ */ jsx19(
81649
81716
  Input,
81650
81717
  {
81651
81718
  placeholder: "Key",
@@ -81655,7 +81722,7 @@ function PropsConfigDialog({
81655
81722
  "data-testid": `props-config-key-${index}`
81656
81723
  }
81657
81724
  ),
81658
- /* @__PURE__ */ jsx18(
81725
+ /* @__PURE__ */ jsx19(
81659
81726
  Input,
81660
81727
  {
81661
81728
  placeholder: "Value",
@@ -81666,7 +81733,7 @@ function PropsConfigDialog({
81666
81733
  }
81667
81734
  )
81668
81735
  ] }),
81669
- /* @__PURE__ */ jsx18(
81736
+ /* @__PURE__ */ jsx19(
81670
81737
  Button,
81671
81738
  {
81672
81739
  variant: "ghost",
@@ -81675,7 +81742,7 @@ function PropsConfigDialog({
81675
81742
  disabled: propPairs.length === 1 || isGenerating,
81676
81743
  className: "h-9 w-9 p-0",
81677
81744
  "data-testid": `props-config-remove-${index}`,
81678
- children: /* @__PURE__ */ jsx18(Trash2, { className: "h-4 w-4 text-muted-foreground" })
81745
+ children: /* @__PURE__ */ jsx19(Trash2, { className: "h-4 w-4 text-muted-foreground" })
81679
81746
  }
81680
81747
  )
81681
81748
  ] }, pair.id))
@@ -81684,7 +81751,7 @@ function PropsConfigDialog({
81684
81751
  ] })
81685
81752
  ] }),
81686
81753
  /* @__PURE__ */ jsxs10(DialogFooter, { children: [
81687
- /* @__PURE__ */ jsx18(
81754
+ /* @__PURE__ */ jsx19(
81688
81755
  Button,
81689
81756
  {
81690
81757
  variant: "outline",
@@ -81712,71 +81779,6 @@ function PropsConfigDialog({
81712
81779
  ) });
81713
81780
  }
81714
81781
 
81715
- // src/client/context/ThemeContext.tsx
81716
- import { createContext as createContext2, use as use3, useEffect as useEffect5, useState as useState7 } from "react";
81717
- import { jsx as jsx19 } from "react/jsx-runtime";
81718
- var ThemeContext = createContext2(void 0);
81719
- function useTheme() {
81720
- const context2 = use3(ThemeContext);
81721
- if (context2 === void 0) {
81722
- throw new Error("useTheme must be used within a ThemeProvider");
81723
- }
81724
- return context2;
81725
- }
81726
- function ThemeProvider({
81727
- children,
81728
- defaultTheme = "system",
81729
- storageKey = "theme",
81730
- forcedTheme
81731
- }) {
81732
- const [theme, setTheme] = useState7(forcedTheme || defaultTheme);
81733
- const [mounted, setMounted] = useState7(false);
81734
- const getSystemTheme = () => {
81735
- if (typeof window === "undefined") return "light";
81736
- return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
81737
- };
81738
- const resolvedTheme = theme === "system" ? getSystemTheme() : theme;
81739
- const applyTheme = (newTheme) => {
81740
- const root = document.documentElement;
81741
- const actualTheme = newTheme === "system" ? getSystemTheme() : newTheme;
81742
- root.classList.remove("light", "dark");
81743
- root.classList.add(actualTheme);
81744
- if (!forcedTheme) {
81745
- localStorage.setItem(storageKey, newTheme);
81746
- }
81747
- };
81748
- useEffect5(() => {
81749
- setMounted(true);
81750
- const storedTheme = localStorage.getItem(storageKey);
81751
- const initialTheme = forcedTheme || storedTheme || defaultTheme;
81752
- setTheme(initialTheme);
81753
- applyTheme(initialTheme);
81754
- }, [defaultTheme, storageKey, forcedTheme]);
81755
- useEffect5(() => {
81756
- if (theme !== "system") return;
81757
- const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
81758
- const handleChange = () => {
81759
- applyTheme("system");
81760
- };
81761
- mediaQuery.addEventListener("change", handleChange);
81762
- return () => mediaQuery.removeEventListener("change", handleChange);
81763
- }, [theme]);
81764
- useEffect5(() => {
81765
- if (!mounted) return;
81766
- applyTheme(theme);
81767
- }, [theme, mounted]);
81768
- const handleSetTheme = (newTheme) => {
81769
- if (forcedTheme) {
81770
- console.warn(
81771
- "[ThemeProvider] Theme is forced via URL parameter, ignoring setTheme call"
81772
- );
81773
- return;
81774
- }
81775
- setTheme(newTheme);
81776
- };
81777
- return /* @__PURE__ */ jsx19(ThemeContext, { value: { theme, setTheme: handleSetTheme, resolvedTheme }, children });
81778
- }
81779
-
81780
81782
  // src/client/hooks/usePrismTheme.ts
81781
81783
  import { githubGist } from "react-syntax-highlighter/dist/cjs/styles/hljs";
81782
81784
  var githubGistDark = {
@@ -82319,6 +82321,7 @@ function MCPAppsDebugControls({
82319
82321
  protocol = "mcp-apps",
82320
82322
  onUpdateGlobals
82321
82323
  }) {
82324
+ const { resolvedTheme, setTheme } = useTheme();
82322
82325
  const { playground, updatePlaygroundSettings, widgets, clearCspViolations } = useWidgetDebug();
82323
82326
  const widget = widgets.get(toolCallId);
82324
82327
  const cspViolations = widget?.cspViolations ?? [];
@@ -82519,6 +82522,29 @@ function MCPAppsDebugControls({
82519
82522
  }
82520
82523
  )
82521
82524
  ] }),
82525
+ /* @__PURE__ */ jsxs13(Tooltip, { children: [
82526
+ /* @__PURE__ */ jsx24(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx24(
82527
+ Button,
82528
+ {
82529
+ "data-testid": "debugger-theme-button",
82530
+ variant: "outline",
82531
+ size: "sm",
82532
+ className: "h-8 w-8 p-0 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-sm shadow-sm hover:bg-white dark:hover:bg-zinc-900",
82533
+ onClick: () => {
82534
+ const newTheme = resolvedTheme === "dark" ? "light" : "dark";
82535
+ setTheme(newTheme);
82536
+ if (onUpdateGlobals) {
82537
+ onUpdateGlobals({ theme: newTheme });
82538
+ }
82539
+ },
82540
+ children: resolvedTheme === "dark" ? /* @__PURE__ */ jsx24(Moon, { className: "size-3.5" }) : /* @__PURE__ */ jsx24(Sun, { className: "size-3.5" })
82541
+ }
82542
+ ) }),
82543
+ /* @__PURE__ */ jsxs13(TooltipContent, { children: [
82544
+ "Theme: ",
82545
+ resolvedTheme === "dark" ? "Dark" : "Light"
82546
+ ] })
82547
+ ] }),
82522
82548
  /* @__PURE__ */ jsxs13(Dialog, { open: localeDialogOpen, onOpenChange: setLocaleDialogOpen, children: [
82523
82549
  /* @__PURE__ */ jsxs13(Tooltip, { children: [
82524
82550
  /* @__PURE__ */ jsx24(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx24(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx24(