@modelcontextprotocol/inspector 0.11.0 → 0.12.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.
@@ -9,10 +9,34 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
9
9
  const distPath = join(__dirname, "../dist");
10
10
 
11
11
  const server = http.createServer((request, response) => {
12
- return handler(request, response, {
12
+ const handlerOptions = {
13
13
  public: distPath,
14
14
  rewrites: [{ source: "/**", destination: "/index.html" }],
15
- });
15
+ headers: [
16
+ {
17
+ // Ensure index.html is never cached
18
+ source: "index.html",
19
+ headers: [
20
+ {
21
+ key: "Cache-Control",
22
+ value: "no-cache, no-store, max-age=0",
23
+ },
24
+ ],
25
+ },
26
+ {
27
+ // Allow long-term caching for hashed assets
28
+ source: "assets/**",
29
+ headers: [
30
+ {
31
+ key: "Cache-Control",
32
+ value: "public, max-age=31536000, immutable",
33
+ },
34
+ ],
35
+ },
36
+ ],
37
+ };
38
+
39
+ return handler(request, response, handlerOptions);
16
40
  });
17
41
 
18
42
  const port = process.env.PORT || 6274;
@@ -1,4 +1,4 @@
1
- import { u as useToast, r as reactExports, j as jsxRuntimeExports, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-DoxCWJPh.js";
1
+ import { u as useToast, r as reactExports, j as jsxRuntimeExports, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-CHwMp9hp.js";
2
2
  const parseOAuthCallbackParams = (location) => {
3
3
  const params = new URLSearchParams(location);
4
4
  const code = params.get("code");
@@ -7344,11 +7344,12 @@ var Slot$3 = /* @__PURE__ */ createSlot("Slot");
7344
7344
  function createSlotClone(ownerName) {
7345
7345
  const SlotClone = reactExports.forwardRef((props, forwardedRef) => {
7346
7346
  const { children, ...slotProps } = props;
7347
+ const childrenRef = reactExports.isValidElement(children) ? getElementRef$1(children) : void 0;
7348
+ const ref = useComposedRefs(childrenRef, forwardedRef);
7347
7349
  if (reactExports.isValidElement(children)) {
7348
- const childrenRef = getElementRef$1(children);
7349
7350
  const props2 = mergeProps(slotProps, children.props);
7350
7351
  if (children.type !== reactExports.Fragment) {
7351
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
7352
+ props2.ref = ref;
7352
7353
  }
7353
7354
  return reactExports.cloneElement(children, props2);
7354
7355
  }
@@ -7379,8 +7380,9 @@ function mergeProps(slotProps, childProps) {
7379
7380
  if (isHandler) {
7380
7381
  if (slotPropValue && childPropValue) {
7381
7382
  overrideProps[propName] = (...args) => {
7382
- childPropValue(...args);
7383
+ const result = childPropValue(...args);
7383
7384
  slotPropValue(...args);
7385
+ return result;
7384
7386
  };
7385
7387
  } else if (slotPropValue) {
7386
7388
  overrideProps[propName] = slotPropValue;
@@ -7727,7 +7729,7 @@ function handleAndDispatchCustomEvent$1(name, handler, detail, { discrete }) {
7727
7729
  target.dispatchEvent(event);
7728
7730
  }
7729
7731
  }
7730
- var Root$6 = DismissableLayer;
7732
+ var Root$5 = DismissableLayer;
7731
7733
  var Branch = DismissableLayerBranch;
7732
7734
  var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ? reactExports.useLayoutEffect : () => {
7733
7735
  };
@@ -7896,7 +7898,7 @@ function useControllableState({
7896
7898
  (nextValue) => {
7897
7899
  var _a;
7898
7900
  if (isControlled) {
7899
- const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
7901
+ const value2 = isFunction$1(nextValue) ? nextValue(prop) : nextValue;
7900
7902
  if (value2 !== prop) {
7901
7903
  (_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value2);
7902
7904
  }
@@ -7927,7 +7929,7 @@ function useUncontrolledState({
7927
7929
  }, [value, prevValueRef]);
7928
7930
  return [value, setValue, onChangeRef];
7929
7931
  }
7930
- function isFunction(value) {
7932
+ function isFunction$1(value) {
7931
7933
  return typeof value === "function";
7932
7934
  }
7933
7935
  var VISUALLY_HIDDEN_STYLES = Object.freeze({
@@ -7957,7 +7959,7 @@ var VisuallyHidden = reactExports.forwardRef(
7957
7959
  }
7958
7960
  );
7959
7961
  VisuallyHidden.displayName = NAME$2;
7960
- var Root$5 = VisuallyHidden;
7962
+ var Root$4 = VisuallyHidden;
7961
7963
  var PROVIDER_NAME$1 = "ToastProvider";
7962
7964
  var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection("Toast");
7963
7965
  var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope$2]);
@@ -8321,7 +8323,7 @@ var ToastImpl = reactExports.forwardRef(
8321
8323
  ),
8322
8324
  /* @__PURE__ */ jsxRuntimeExports.jsx(ToastInteractiveProvider, { scope: __scopeToast, onClose: handleClose, children: reactDomExports.createPortal(
8323
8325
  /* @__PURE__ */ jsxRuntimeExports.jsx(Collection$2.ItemSlot, { scope: __scopeToast, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
8324
- Root$6,
8326
+ Root$5,
8325
8327
  {
8326
8328
  asChild: true,
8327
8329
  onEscapeKeyDown: composeEventHandlers(onEscapeKeyDown, () => {
@@ -12226,13 +12228,14 @@ const base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z
12226
12228
  const dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
12227
12229
  const dateRegex = new RegExp(`^${dateRegexSource}$`);
12228
12230
  function timeRegexSource(args) {
12229
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
12231
+ let secondsRegexSource = `[0-5]\\d`;
12230
12232
  if (args.precision) {
12231
- regex = `${regex}\\.\\d{${args.precision}}`;
12233
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
12232
12234
  } else if (args.precision == null) {
12233
- regex = `${regex}(\\.\\d+)?`;
12235
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
12234
12236
  }
12235
- return regex;
12237
+ const secondsQuantifier = args.precision ? "+" : "?";
12238
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
12236
12239
  }
12237
12240
  function timeRegex(args) {
12238
12241
  return new RegExp(`^${timeRegexSource(args)}$`);
@@ -15441,21 +15444,23 @@ var z = /* @__PURE__ */ Object.freeze({
15441
15444
  quotelessJson,
15442
15445
  ZodError
15443
15446
  });
15444
- const LATEST_PROTOCOL_VERSION = "2024-11-05";
15447
+ const LATEST_PROTOCOL_VERSION = "2025-03-26";
15445
15448
  const SUPPORTED_PROTOCOL_VERSIONS = [
15446
15449
  LATEST_PROTOCOL_VERSION,
15450
+ "2024-11-05",
15447
15451
  "2024-10-07"
15448
15452
  ];
15449
15453
  const JSONRPC_VERSION = "2.0";
15450
15454
  const ProgressTokenSchema = z.union([z.string(), z.number().int()]);
15451
15455
  const CursorSchema = z.string();
15456
+ const RequestMetaSchema = z.object({
15457
+ /**
15458
+ * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
15459
+ */
15460
+ progressToken: z.optional(ProgressTokenSchema)
15461
+ }).passthrough();
15452
15462
  const BaseRequestParamsSchema = z.object({
15453
- _meta: z.optional(z.object({
15454
- /**
15455
- * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
15456
- */
15457
- progressToken: z.optional(ProgressTokenSchema)
15458
- }).passthrough())
15463
+ _meta: z.optional(RequestMetaSchema)
15459
15464
  }).passthrough();
15460
15465
  const RequestSchema = z.object({
15461
15466
  method: z.string(),
@@ -15898,6 +15903,45 @@ const GetPromptResultSchema = ResultSchema.extend({
15898
15903
  const PromptListChangedNotificationSchema = NotificationSchema.extend({
15899
15904
  method: z.literal("notifications/prompts/list_changed")
15900
15905
  });
15906
+ const ToolAnnotationsSchema = z.object({
15907
+ /**
15908
+ * A human-readable title for the tool.
15909
+ */
15910
+ title: z.optional(z.string()),
15911
+ /**
15912
+ * If true, the tool does not modify its environment.
15913
+ *
15914
+ * Default: false
15915
+ */
15916
+ readOnlyHint: z.optional(z.boolean()),
15917
+ /**
15918
+ * If true, the tool may perform destructive updates to its environment.
15919
+ * If false, the tool performs only additive updates.
15920
+ *
15921
+ * (This property is meaningful only when `readOnlyHint == false`)
15922
+ *
15923
+ * Default: true
15924
+ */
15925
+ destructiveHint: z.optional(z.boolean()),
15926
+ /**
15927
+ * If true, calling the tool repeatedly with the same arguments
15928
+ * will have no additional effect on the its environment.
15929
+ *
15930
+ * (This property is meaningful only when `readOnlyHint == false`)
15931
+ *
15932
+ * Default: false
15933
+ */
15934
+ idempotentHint: z.optional(z.boolean()),
15935
+ /**
15936
+ * If true, this tool may interact with an "open world" of external
15937
+ * entities. If false, the tool's domain of interaction is closed.
15938
+ * For example, the world of a web search tool is open, whereas that
15939
+ * of a memory tool is not.
15940
+ *
15941
+ * Default: true
15942
+ */
15943
+ openWorldHint: z.optional(z.boolean())
15944
+ }).passthrough();
15901
15945
  const ToolSchema = z.object({
15902
15946
  /**
15903
15947
  * The name of the tool.
@@ -15913,7 +15957,11 @@ const ToolSchema = z.object({
15913
15957
  inputSchema: z.object({
15914
15958
  type: z.literal("object"),
15915
15959
  properties: z.optional(z.object({}).passthrough())
15916
- }).passthrough()
15960
+ }).passthrough(),
15961
+ /**
15962
+ * Optional additional tool information.
15963
+ */
15964
+ annotations: z.optional(ToolAnnotationsSchema)
15917
15965
  }).passthrough();
15918
15966
  const ListToolsRequestSchema = PaginatedRequestSchema.extend({
15919
15967
  method: z.literal("tools/list")
@@ -16279,7 +16327,7 @@ class Protocol {
16279
16327
  Promise.resolve().then(() => handler(notification)).catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));
16280
16328
  }
16281
16329
  _onrequest(request, extra) {
16282
- var _a, _b, _c;
16330
+ var _a, _b, _c, _d;
16283
16331
  const handler = (_a = this._requestHandlers.get(request.method)) !== null && _a !== void 0 ? _a : this.fallbackRequestHandler;
16284
16332
  if (handler === void 0) {
16285
16333
  (_b = this._transport) === null || _b === void 0 ? void 0 : _b.send({
@@ -16297,9 +16345,11 @@ class Protocol {
16297
16345
  const fullExtra = {
16298
16346
  signal: abortController.signal,
16299
16347
  sessionId: (_c = this._transport) === null || _c === void 0 ? void 0 : _c.sessionId,
16348
+ _meta: (_d = request.params) === null || _d === void 0 ? void 0 : _d._meta,
16300
16349
  sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
16301
16350
  sendRequest: (r2, resultSchema, options) => this.request(r2, resultSchema, { ...options, relatedRequestId: request.id }),
16302
- authInfo: extra === null || extra === void 0 ? void 0 : extra.authInfo
16351
+ authInfo: extra === null || extra === void 0 ? void 0 : extra.authInfo,
16352
+ requestId: request.id
16303
16353
  };
16304
16354
  Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
16305
16355
  var _a2;
@@ -17210,7 +17260,8 @@ async function auth(provider, { serverUrl, authorizationCode }) {
17210
17260
  const { authorizationUrl, codeVerifier } = await startAuthorization(serverUrl, {
17211
17261
  metadata,
17212
17262
  clientInformation,
17213
- redirectUrl: provider.redirectUrl
17263
+ redirectUrl: provider.redirectUrl,
17264
+ scope: provider.clientMetadata.scope
17214
17265
  });
17215
17266
  await provider.saveCodeVerifier(codeVerifier);
17216
17267
  await provider.redirectToAuthorization(authorizationUrl);
@@ -17241,7 +17292,7 @@ async function discoverOAuthMetadata(serverUrl, opts) {
17241
17292
  }
17242
17293
  return OAuthMetadataSchema.parse(await response.json());
17243
17294
  }
17244
- async function startAuthorization(serverUrl, { metadata, clientInformation, redirectUrl }) {
17295
+ async function startAuthorization(serverUrl, { metadata, clientInformation, redirectUrl, scope }) {
17245
17296
  const responseType = "code";
17246
17297
  const codeChallengeMethod = "S256";
17247
17298
  let authorizationUrl;
@@ -17264,6 +17315,9 @@ async function startAuthorization(serverUrl, { metadata, clientInformation, redi
17264
17315
  authorizationUrl.searchParams.set("code_challenge", codeChallenge);
17265
17316
  authorizationUrl.searchParams.set("code_challenge_method", codeChallengeMethod);
17266
17317
  authorizationUrl.searchParams.set("redirect_uri", String(redirectUrl));
17318
+ if (scope) {
17319
+ authorizationUrl.searchParams.set("scope", scope);
17320
+ }
17267
17321
  return { authorizationUrl, codeVerifier };
17268
17322
  }
17269
17323
  async function exchangeAuthorization(serverUrl, { metadata, clientInformation, authorizationCode, codeVerifier, redirectUri }) {
@@ -17944,7 +17998,7 @@ class InspectorOAuthClientProvider {
17944
17998
  );
17945
17999
  }
17946
18000
  }
17947
- const version$1 = "0.11.0";
18001
+ const version$1 = "0.12.0";
17948
18002
  const packageJson = {
17949
18003
  version: version$1
17950
18004
  };
@@ -18138,27 +18192,6 @@ function useConnection({
18138
18192
  setConnectionStatus("error-connecting-to-proxy");
18139
18193
  return;
18140
18194
  }
18141
- let mcpProxyServerUrl;
18142
- switch (transportType) {
18143
- case "stdio":
18144
- mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/stdio`);
18145
- mcpProxyServerUrl.searchParams.append("command", command);
18146
- mcpProxyServerUrl.searchParams.append("args", args);
18147
- mcpProxyServerUrl.searchParams.append("env", JSON.stringify(env));
18148
- break;
18149
- case "sse":
18150
- mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/sse`);
18151
- mcpProxyServerUrl.searchParams.append("url", sseUrl);
18152
- break;
18153
- case "streamable-http":
18154
- mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/mcp`);
18155
- mcpProxyServerUrl.searchParams.append("url", sseUrl);
18156
- break;
18157
- }
18158
- mcpProxyServerUrl.searchParams.append(
18159
- "transportType",
18160
- transportType
18161
- );
18162
18195
  try {
18163
18196
  const headers = {};
18164
18197
  const serverAuthProvider = new InspectorOAuthClientProvider(sseUrl);
@@ -18167,16 +18200,65 @@ function useConnection({
18167
18200
  const authHeaderName = headerName || "Authorization";
18168
18201
  headers[authHeaderName] = `Bearer ${token}`;
18169
18202
  }
18170
- const transportOptions = {
18171
- eventSourceInit: {
18172
- fetch: (url, init) => fetch(url, { ...init, headers })
18173
- },
18174
- requestInit: {
18175
- headers
18176
- }
18177
- };
18203
+ let transportOptions;
18204
+ let mcpProxyServerUrl;
18205
+ switch (transportType) {
18206
+ case "stdio":
18207
+ mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/stdio`);
18208
+ mcpProxyServerUrl.searchParams.append("command", command);
18209
+ mcpProxyServerUrl.searchParams.append("args", args);
18210
+ mcpProxyServerUrl.searchParams.append("env", JSON.stringify(env));
18211
+ transportOptions = {
18212
+ authProvider: serverAuthProvider,
18213
+ eventSourceInit: {
18214
+ fetch: (url, init) => fetch(url, { ...init, headers })
18215
+ },
18216
+ requestInit: {
18217
+ headers
18218
+ }
18219
+ };
18220
+ break;
18221
+ case "sse":
18222
+ mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/sse`);
18223
+ mcpProxyServerUrl.searchParams.append("url", sseUrl);
18224
+ transportOptions = {
18225
+ authProvider: serverAuthProvider,
18226
+ eventSourceInit: {
18227
+ fetch: (url, init) => fetch(url, { ...init, headers })
18228
+ },
18229
+ requestInit: {
18230
+ headers
18231
+ }
18232
+ };
18233
+ break;
18234
+ case "streamable-http":
18235
+ mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/mcp`);
18236
+ mcpProxyServerUrl.searchParams.append("url", sseUrl);
18237
+ transportOptions = {
18238
+ authProvider: serverAuthProvider,
18239
+ eventSourceInit: {
18240
+ fetch: (url, init) => fetch(url, { ...init, headers })
18241
+ },
18242
+ requestInit: {
18243
+ headers
18244
+ },
18245
+ // TODO these should be configurable...
18246
+ reconnectionOptions: {
18247
+ maxReconnectionDelay: 3e4,
18248
+ initialReconnectionDelay: 1e3,
18249
+ reconnectionDelayGrowFactor: 1.5,
18250
+ maxRetries: 2
18251
+ }
18252
+ };
18253
+ break;
18254
+ }
18255
+ mcpProxyServerUrl.searchParams.append(
18256
+ "transportType",
18257
+ transportType
18258
+ );
18178
18259
  const clientTransport = transportType === "streamable-http" ? new StreamableHTTPClientTransport(mcpProxyServerUrl, {
18179
- sessionId: void 0
18260
+ sessionId: void 0,
18261
+ ...transportOptions
18180
18262
  }) : new SSEClientTransport(mcpProxyServerUrl, transportOptions);
18181
18263
  if (onNotification) {
18182
18264
  [
@@ -18536,7 +18618,7 @@ function focusFirst$1(candidates, preventScroll = false) {
18536
18618
  function wrapArray$1(array, startIndex) {
18537
18619
  return array.map((_, index2) => array[(startIndex + index2) % array.length]);
18538
18620
  }
18539
- var Root$4 = RovingFocusGroup;
18621
+ var Root$3 = RovingFocusGroup;
18540
18622
  var Item$1 = RovingFocusGroupItem;
18541
18623
  var TABS_NAME = "Tabs";
18542
18624
  var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
@@ -18594,7 +18676,7 @@ var TabsList$1 = reactExports.forwardRef(
18594
18676
  const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
18595
18677
  const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
18596
18678
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
18597
- Root$4,
18679
+ Root$3,
18598
18680
  {
18599
18681
  asChild: true,
18600
18682
  ...rovingFocusGroupScope,
@@ -18615,11 +18697,11 @@ var TabsList$1 = reactExports.forwardRef(
18615
18697
  }
18616
18698
  );
18617
18699
  TabsList$1.displayName = TAB_LIST_NAME;
18618
- var TRIGGER_NAME$4 = "TabsTrigger";
18700
+ var TRIGGER_NAME$5 = "TabsTrigger";
18619
18701
  var TabsTrigger$1 = reactExports.forwardRef(
18620
18702
  (props, forwardedRef) => {
18621
18703
  const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
18622
- const context = useTabsContext(TRIGGER_NAME$4, __scopeTabs);
18704
+ const context = useTabsContext(TRIGGER_NAME$5, __scopeTabs);
18623
18705
  const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
18624
18706
  const triggerId = makeTriggerId(context.baseId, value);
18625
18707
  const contentId = makeContentId(context.baseId, value);
@@ -18666,7 +18748,7 @@ var TabsTrigger$1 = reactExports.forwardRef(
18666
18748
  );
18667
18749
  }
18668
18750
  );
18669
- TabsTrigger$1.displayName = TRIGGER_NAME$4;
18751
+ TabsTrigger$1.displayName = TRIGGER_NAME$5;
18670
18752
  var CONTENT_NAME$5 = "TabsContent";
18671
18753
  var TabsContent$1 = reactExports.forwardRef(
18672
18754
  (props, forwardedRef) => {
@@ -20744,11 +20826,11 @@ var Dialog = (props) => {
20744
20826
  );
20745
20827
  };
20746
20828
  Dialog.displayName = DIALOG_NAME;
20747
- var TRIGGER_NAME$3 = "DialogTrigger";
20829
+ var TRIGGER_NAME$4 = "DialogTrigger";
20748
20830
  var DialogTrigger = reactExports.forwardRef(
20749
20831
  (props, forwardedRef) => {
20750
20832
  const { __scopeDialog, ...triggerProps } = props;
20751
- const context = useDialogContext(TRIGGER_NAME$3, __scopeDialog);
20833
+ const context = useDialogContext(TRIGGER_NAME$4, __scopeDialog);
20752
20834
  const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
20753
20835
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
20754
20836
  Primitive.button,
@@ -20765,7 +20847,7 @@ var DialogTrigger = reactExports.forwardRef(
20765
20847
  );
20766
20848
  }
20767
20849
  );
20768
- DialogTrigger.displayName = TRIGGER_NAME$3;
20850
+ DialogTrigger.displayName = TRIGGER_NAME$4;
20769
20851
  var PORTAL_NAME$3 = "DialogPortal";
20770
20852
  var [PortalProvider$2, usePortalContext$2] = createDialogContext(PORTAL_NAME$3, {
20771
20853
  forceMount: void 0
@@ -21004,7 +21086,7 @@ var DescriptionWarning = ({ contentRef, descriptionId }) => {
21004
21086
  }, [MESSAGE, contentRef, descriptionId]);
21005
21087
  return null;
21006
21088
  };
21007
- var Root$3 = Dialog;
21089
+ var Root$2 = Dialog;
21008
21090
  var Portal$2 = DialogPortal$1;
21009
21091
  var Overlay = DialogOverlay$1;
21010
21092
  var Content$1 = DialogContent$1;
@@ -21239,7 +21321,7 @@ var N = '[cmdk-group=""]', Y = '[cmdk-group-items=""]', be = '[cmdk-group-headin
21239
21321
  }, []), reactExports.createElement(Primitive.div, { ref: composeRefs(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B(r2, (m2) => reactExports.createElement("div", { ref: composeRefs(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
21240
21322
  }), xe = reactExports.forwardRef((r2, o) => {
21241
21323
  let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r2;
21242
- return reactExports.createElement(Root$3, { open: n, onOpenChange: u2 }, reactExports.createElement(Portal$2, { container: f }, reactExports.createElement(Overlay, { "cmdk-overlay": "", className: c }), reactExports.createElement(Content$1, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, reactExports.createElement(me, { ref: o, ...p2 }))));
21324
+ return reactExports.createElement(Root$2, { open: n, onOpenChange: u2 }, reactExports.createElement(Portal$2, { container: f }, reactExports.createElement(Overlay, { "cmdk-overlay": "", className: c }), reactExports.createElement(Content$1, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, reactExports.createElement(me, { ref: o, ...p2 }))));
21243
21325
  }), Ie = reactExports.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? reactExports.createElement(Primitive.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null), Pe = reactExports.forwardRef((r2, o) => {
21244
21326
  let { progress: n, children: u2, label: c = "Loading...", ...d } = r2;
21245
21327
  return reactExports.createElement(Primitive.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B(r2, (f) => reactExports.createElement("div", { "aria-hidden": true }, f)));
@@ -21880,15 +21962,20 @@ const flip$2 = function(options) {
21880
21962
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
21881
21963
  const nextPlacement = placements[nextIndex];
21882
21964
  if (nextPlacement) {
21883
- return {
21884
- data: {
21885
- index: nextIndex,
21886
- overflows: overflowsData
21887
- },
21888
- reset: {
21889
- placement: nextPlacement
21890
- }
21891
- };
21965
+ var _overflowsData$;
21966
+ const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
21967
+ const hasInitialMainAxisOverflow = ((_overflowsData$ = overflowsData[0]) == null ? void 0 : _overflowsData$.overflows[0]) > 0;
21968
+ if (!ignoreCrossAxisOverflow || hasInitialMainAxisOverflow) {
21969
+ return {
21970
+ data: {
21971
+ index: nextIndex,
21972
+ overflows: overflowsData
21973
+ },
21974
+ reset: {
21975
+ placement: nextPlacement
21976
+ }
21977
+ };
21978
+ }
21892
21979
  }
21893
21980
  let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
21894
21981
  if (!resetPlacement) {
@@ -22748,6 +22835,9 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
22748
22835
  scrollTop: 0
22749
22836
  };
22750
22837
  const offsets = createCoords(0);
22838
+ function setLeftRTLScrollbarOffset() {
22839
+ offsets.x = getWindowScrollBarX(documentElement);
22840
+ }
22751
22841
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
22752
22842
  if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
22753
22843
  scroll = getNodeScroll(offsetParent);
@@ -22757,9 +22847,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
22757
22847
  offsets.x = offsetRect.x + offsetParent.clientLeft;
22758
22848
  offsets.y = offsetRect.y + offsetParent.clientTop;
22759
22849
  } else if (documentElement) {
22760
- offsets.x = getWindowScrollBarX(documentElement);
22850
+ setLeftRTLScrollbarOffset();
22761
22851
  }
22762
22852
  }
22853
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
22854
+ setLeftRTLScrollbarOffset();
22855
+ }
22763
22856
  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
22764
22857
  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
22765
22858
  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
@@ -22908,7 +23001,7 @@ function observeMove(element, onMove) {
22908
23001
  // Handle <iframe>s
22909
23002
  root: root.ownerDocument
22910
23003
  });
22911
- } catch (e) {
23004
+ } catch (_e2) {
22912
23005
  io = new IntersectionObserver(handleObserve, options);
22913
23006
  }
22914
23007
  io.observe(element);
@@ -23299,7 +23392,7 @@ var Arrow$1 = reactExports.forwardRef((props, forwardedRef) => {
23299
23392
  );
23300
23393
  });
23301
23394
  Arrow$1.displayName = NAME$1;
23302
- var Root$2 = Arrow$1;
23395
+ var Root$1 = Arrow$1;
23303
23396
  function useSize(element) {
23304
23397
  const [size2, setSize] = reactExports.useState(void 0);
23305
23398
  useLayoutEffect2(() => {
@@ -23541,7 +23634,7 @@ var PopperArrow = reactExports.forwardRef(function PopperArrow2(props, forwarded
23541
23634
  visibility: contentContext.shouldHideArrow ? "hidden" : void 0
23542
23635
  },
23543
23636
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23544
- Root$2,
23637
+ Root$1,
23545
23638
  {
23546
23639
  ...arrowProps,
23547
23640
  ref: forwardedRef,
@@ -23657,11 +23750,11 @@ var PopoverAnchor = reactExports.forwardRef(
23657
23750
  }
23658
23751
  );
23659
23752
  PopoverAnchor.displayName = ANCHOR_NAME;
23660
- var TRIGGER_NAME$2 = "PopoverTrigger";
23753
+ var TRIGGER_NAME$3 = "PopoverTrigger";
23661
23754
  var PopoverTrigger$1 = reactExports.forwardRef(
23662
23755
  (props, forwardedRef) => {
23663
23756
  const { __scopePopover, ...triggerProps } = props;
23664
- const context = usePopoverContext(TRIGGER_NAME$2, __scopePopover);
23757
+ const context = usePopoverContext(TRIGGER_NAME$3, __scopePopover);
23665
23758
  const popperScope = usePopperScope$2(__scopePopover);
23666
23759
  const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
23667
23760
  const trigger = /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -23680,7 +23773,7 @@ var PopoverTrigger$1 = reactExports.forwardRef(
23680
23773
  return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor, { asChild: true, ...popperScope, children: trigger });
23681
23774
  }
23682
23775
  );
23683
- PopoverTrigger$1.displayName = TRIGGER_NAME$2;
23776
+ PopoverTrigger$1.displayName = TRIGGER_NAME$3;
23684
23777
  var PORTAL_NAME$2 = "PopoverPortal";
23685
23778
  var [PortalProvider$1, usePortalContext$1] = createPopoverContext(PORTAL_NAME$2, {
23686
23779
  forceMount: void 0
@@ -23986,19 +24079,19 @@ var Label$2 = reactExports.forwardRef((props, forwardedRef) => {
23986
24079
  );
23987
24080
  });
23988
24081
  Label$2.displayName = NAME;
23989
- var Root$1 = Label$2;
24082
+ var Root = Label$2;
23990
24083
  const labelVariants = cva(
23991
24084
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
23992
24085
  );
23993
24086
  const Label$1 = reactExports.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
23994
- Root$1,
24087
+ Root,
23995
24088
  {
23996
24089
  ref,
23997
24090
  className: cn(labelVariants(), className),
23998
24091
  ...props
23999
24092
  }
24000
24093
  ));
24001
- Label$1.displayName = Root$1.displayName;
24094
+ Label$1.displayName = Root.displayName;
24002
24095
  const ListPane = ({
24003
24096
  items,
24004
24097
  listItems,
@@ -26957,12 +27050,12 @@ var Select$1 = (props) => {
26957
27050
  ) });
26958
27051
  };
26959
27052
  Select$1.displayName = SELECT_NAME;
26960
- var TRIGGER_NAME$1 = "SelectTrigger";
27053
+ var TRIGGER_NAME$2 = "SelectTrigger";
26961
27054
  var SelectTrigger$1 = reactExports.forwardRef(
26962
27055
  (props, forwardedRef) => {
26963
27056
  const { __scopeSelect, disabled = false, ...triggerProps } = props;
26964
27057
  const popperScope = usePopperScope$1(__scopeSelect);
26965
- const context = useSelectContext(TRIGGER_NAME$1, __scopeSelect);
27058
+ const context = useSelectContext(TRIGGER_NAME$2, __scopeSelect);
26966
27059
  const isDisabled = context.disabled || disabled;
26967
27060
  const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
26968
27061
  const getItems = useCollection(__scopeSelect);
@@ -27034,7 +27127,7 @@ var SelectTrigger$1 = reactExports.forwardRef(
27034
27127
  ) });
27035
27128
  }
27036
27129
  );
27037
- SelectTrigger$1.displayName = TRIGGER_NAME$1;
27130
+ SelectTrigger$1.displayName = TRIGGER_NAME$2;
27038
27131
  var VALUE_NAME = "SelectValue";
27039
27132
  var SelectValue$1 = reactExports.forwardRef(
27040
27133
  (props, forwardedRef) => {
@@ -28133,7 +28226,7 @@ const useTheme = () => {
28133
28226
  [theme, setThemeWithSideEffect]
28134
28227
  );
28135
28228
  };
28136
- const version = "0.11.0";
28229
+ const version = "0.12.0";
28137
28230
  var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
28138
28231
  createPopperScope
28139
28232
  ]);
@@ -28277,12 +28370,12 @@ var Tooltip$1 = (props) => {
28277
28370
  ) });
28278
28371
  };
28279
28372
  Tooltip$1.displayName = TOOLTIP_NAME;
28280
- var TRIGGER_NAME = "TooltipTrigger";
28373
+ var TRIGGER_NAME$1 = "TooltipTrigger";
28281
28374
  var TooltipTrigger$1 = reactExports.forwardRef(
28282
28375
  (props, forwardedRef) => {
28283
28376
  const { __scopeTooltip, ...triggerProps } = props;
28284
- const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);
28285
- const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip);
28377
+ const context = useTooltipContext(TRIGGER_NAME$1, __scopeTooltip);
28378
+ const providerContext = useTooltipProviderContext(TRIGGER_NAME$1, __scopeTooltip);
28286
28379
  const popperScope = usePopperScope(__scopeTooltip);
28287
28380
  const ref = reactExports.useRef(null);
28288
28381
  const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);
@@ -28326,7 +28419,7 @@ var TooltipTrigger$1 = reactExports.forwardRef(
28326
28419
  ) });
28327
28420
  }
28328
28421
  );
28329
- TooltipTrigger$1.displayName = TRIGGER_NAME;
28422
+ TooltipTrigger$1.displayName = TRIGGER_NAME$1;
28330
28423
  var PORTAL_NAME = "TooltipPortal";
28331
28424
  var [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, {
28332
28425
  forceMount: void 0
@@ -28459,7 +28552,7 @@ var TooltipContentImpl = reactExports.forwardRef(
28459
28552
  },
28460
28553
  children: [
28461
28554
  /* @__PURE__ */ jsxRuntimeExports.jsx(Slottable, { children }),
28462
- /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root$5, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
28555
+ /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root$4, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
28463
28556
  ]
28464
28557
  }
28465
28558
  )
@@ -29148,82 +29241,157 @@ const Sidebar = ({
29148
29241
  };
29149
29242
  var CHECKBOX_NAME = "Checkbox";
29150
29243
  var [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);
29151
- var [CheckboxProvider, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
29244
+ var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
29245
+ function CheckboxProvider(props) {
29246
+ const {
29247
+ __scopeCheckbox,
29248
+ checked: checkedProp,
29249
+ children,
29250
+ defaultChecked,
29251
+ disabled,
29252
+ form,
29253
+ name,
29254
+ onCheckedChange,
29255
+ required,
29256
+ value = "on",
29257
+ // @ts-expect-error
29258
+ internal_do_not_use_render
29259
+ } = props;
29260
+ const [checked, setChecked] = useControllableState({
29261
+ prop: checkedProp,
29262
+ defaultProp: defaultChecked ?? false,
29263
+ onChange: onCheckedChange,
29264
+ caller: CHECKBOX_NAME
29265
+ });
29266
+ const [control, setControl] = reactExports.useState(null);
29267
+ const [bubbleInput, setBubbleInput] = reactExports.useState(null);
29268
+ const hasConsumerStoppedPropagationRef = reactExports.useRef(false);
29269
+ const isFormControl = control ? !!form || !!control.closest("form") : (
29270
+ // We set this to true by default so that events bubble to forms without JS (SSR)
29271
+ true
29272
+ );
29273
+ const context = {
29274
+ checked,
29275
+ disabled,
29276
+ setChecked,
29277
+ control,
29278
+ setControl,
29279
+ name,
29280
+ form,
29281
+ value,
29282
+ hasConsumerStoppedPropagationRef,
29283
+ required,
29284
+ defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,
29285
+ isFormControl,
29286
+ bubbleInput,
29287
+ setBubbleInput
29288
+ };
29289
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
29290
+ CheckboxProviderImpl,
29291
+ {
29292
+ scope: __scopeCheckbox,
29293
+ ...context,
29294
+ children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children
29295
+ }
29296
+ );
29297
+ }
29298
+ var TRIGGER_NAME = "CheckboxTrigger";
29299
+ var CheckboxTrigger = reactExports.forwardRef(
29300
+ ({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {
29301
+ const {
29302
+ control,
29303
+ value,
29304
+ disabled,
29305
+ checked,
29306
+ required,
29307
+ setControl,
29308
+ setChecked,
29309
+ hasConsumerStoppedPropagationRef,
29310
+ isFormControl,
29311
+ bubbleInput
29312
+ } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
29313
+ const composedRefs = useComposedRefs(forwardedRef, setControl);
29314
+ const initialCheckedStateRef = reactExports.useRef(checked);
29315
+ reactExports.useEffect(() => {
29316
+ const form = control == null ? void 0 : control.form;
29317
+ if (form) {
29318
+ const reset = () => setChecked(initialCheckedStateRef.current);
29319
+ form.addEventListener("reset", reset);
29320
+ return () => form.removeEventListener("reset", reset);
29321
+ }
29322
+ }, [control, setChecked]);
29323
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
29324
+ Primitive.button,
29325
+ {
29326
+ type: "button",
29327
+ role: "checkbox",
29328
+ "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
29329
+ "aria-required": required,
29330
+ "data-state": getState(checked),
29331
+ "data-disabled": disabled ? "" : void 0,
29332
+ disabled,
29333
+ value,
29334
+ ...checkboxProps,
29335
+ ref: composedRefs,
29336
+ onKeyDown: composeEventHandlers(onKeyDown, (event) => {
29337
+ if (event.key === "Enter") event.preventDefault();
29338
+ }),
29339
+ onClick: composeEventHandlers(onClick, (event) => {
29340
+ setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);
29341
+ if (bubbleInput && isFormControl) {
29342
+ hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
29343
+ if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
29344
+ }
29345
+ })
29346
+ }
29347
+ );
29348
+ }
29349
+ );
29350
+ CheckboxTrigger.displayName = TRIGGER_NAME;
29152
29351
  var Checkbox$1 = reactExports.forwardRef(
29153
29352
  (props, forwardedRef) => {
29154
29353
  const {
29155
29354
  __scopeCheckbox,
29156
29355
  name,
29157
- checked: checkedProp,
29356
+ checked,
29158
29357
  defaultChecked,
29159
29358
  required,
29160
29359
  disabled,
29161
- value = "on",
29360
+ value,
29162
29361
  onCheckedChange,
29163
29362
  form,
29164
29363
  ...checkboxProps
29165
29364
  } = props;
29166
- const [button, setButton] = reactExports.useState(null);
29167
- const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
29168
- const hasConsumerStoppedPropagationRef = reactExports.useRef(false);
29169
- const isFormControl = button ? form || !!button.closest("form") : true;
29170
- const [checked, setChecked] = useControllableState({
29171
- prop: checkedProp,
29172
- defaultProp: defaultChecked ?? false,
29173
- onChange: onCheckedChange,
29174
- caller: CHECKBOX_NAME
29175
- });
29176
- const initialCheckedStateRef = reactExports.useRef(checked);
29177
- reactExports.useEffect(() => {
29178
- const form2 = button == null ? void 0 : button.form;
29179
- if (form2) {
29180
- const reset = () => setChecked(initialCheckedStateRef.current);
29181
- form2.addEventListener("reset", reset);
29182
- return () => form2.removeEventListener("reset", reset);
29183
- }
29184
- }, [button, setChecked]);
29185
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(CheckboxProvider, { scope: __scopeCheckbox, state: checked, disabled, children: [
29186
- /* @__PURE__ */ jsxRuntimeExports.jsx(
29187
- Primitive.button,
29188
- {
29189
- type: "button",
29190
- role: "checkbox",
29191
- "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
29192
- "aria-required": required,
29193
- "data-state": getState(checked),
29194
- "data-disabled": disabled ? "" : void 0,
29195
- disabled,
29196
- value,
29197
- ...checkboxProps,
29198
- ref: composedRefs,
29199
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
29200
- if (event.key === "Enter") event.preventDefault();
29201
- }),
29202
- onClick: composeEventHandlers(props.onClick, (event) => {
29203
- setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);
29204
- if (isFormControl) {
29205
- hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
29206
- if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
29365
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
29366
+ CheckboxProvider,
29367
+ {
29368
+ __scopeCheckbox,
29369
+ checked,
29370
+ defaultChecked,
29371
+ disabled,
29372
+ required,
29373
+ onCheckedChange,
29374
+ name,
29375
+ form,
29376
+ value,
29377
+ internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
29378
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
29379
+ CheckboxTrigger,
29380
+ {
29381
+ ...checkboxProps,
29382
+ ref: forwardedRef,
29383
+ __scopeCheckbox
29207
29384
  }
29208
- })
29209
- }
29210
- ),
29211
- isFormControl && /* @__PURE__ */ jsxRuntimeExports.jsx(
29212
- CheckboxBubbleInput,
29213
- {
29214
- control: button,
29215
- bubbles: !hasConsumerStoppedPropagationRef.current,
29216
- name,
29217
- value,
29218
- checked,
29219
- required,
29220
- disabled,
29221
- form,
29222
- style: { transform: "translateX(-100%)" },
29223
- defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked
29224
- }
29225
- )
29226
- ] });
29385
+ ),
29386
+ isFormControl && /* @__PURE__ */ jsxRuntimeExports.jsx(
29387
+ CheckboxBubbleInput,
29388
+ {
29389
+ __scopeCheckbox
29390
+ }
29391
+ )
29392
+ ] })
29393
+ }
29394
+ );
29227
29395
  }
29228
29396
  );
29229
29397
  Checkbox$1.displayName = CHECKBOX_NAME;
@@ -29232,35 +29400,46 @@ var CheckboxIndicator = reactExports.forwardRef(
29232
29400
  (props, forwardedRef) => {
29233
29401
  const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
29234
29402
  const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
29235
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || isIndeterminate(context.state) || context.state === true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29236
- Primitive.span,
29403
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
29404
+ Presence,
29237
29405
  {
29238
- "data-state": getState(context.state),
29239
- "data-disabled": context.disabled ? "" : void 0,
29240
- ...indicatorProps,
29241
- ref: forwardedRef,
29242
- style: { pointerEvents: "none", ...props.style }
29406
+ present: forceMount || isIndeterminate(context.checked) || context.checked === true,
29407
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29408
+ Primitive.span,
29409
+ {
29410
+ "data-state": getState(context.checked),
29411
+ "data-disabled": context.disabled ? "" : void 0,
29412
+ ...indicatorProps,
29413
+ ref: forwardedRef,
29414
+ style: { pointerEvents: "none", ...props.style }
29415
+ }
29416
+ )
29243
29417
  }
29244
- ) });
29418
+ );
29245
29419
  }
29246
29420
  );
29247
29421
  CheckboxIndicator.displayName = INDICATOR_NAME;
29248
29422
  var BUBBLE_INPUT_NAME = "CheckboxBubbleInput";
29249
29423
  var CheckboxBubbleInput = reactExports.forwardRef(
29250
- ({
29251
- __scopeCheckbox,
29252
- control,
29253
- checked,
29254
- bubbles = true,
29255
- defaultChecked,
29256
- ...props
29257
- }, forwardedRef) => {
29258
- const ref = reactExports.useRef(null);
29259
- const composedRefs = useComposedRefs(ref, forwardedRef);
29424
+ ({ __scopeCheckbox, ...props }, forwardedRef) => {
29425
+ const {
29426
+ control,
29427
+ hasConsumerStoppedPropagationRef,
29428
+ checked,
29429
+ defaultChecked,
29430
+ required,
29431
+ disabled,
29432
+ name,
29433
+ value,
29434
+ form,
29435
+ bubbleInput,
29436
+ setBubbleInput
29437
+ } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);
29438
+ const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
29260
29439
  const prevChecked = usePrevious(checked);
29261
29440
  const controlSize = useSize(control);
29262
29441
  reactExports.useEffect(() => {
29263
- const input = ref.current;
29442
+ const input = bubbleInput;
29264
29443
  if (!input) return;
29265
29444
  const inputProto = window.HTMLInputElement.prototype;
29266
29445
  const descriptor = Object.getOwnPropertyDescriptor(
@@ -29268,13 +29447,14 @@ var CheckboxBubbleInput = reactExports.forwardRef(
29268
29447
  "checked"
29269
29448
  );
29270
29449
  const setChecked = descriptor.set;
29450
+ const bubbles = !hasConsumerStoppedPropagationRef.current;
29271
29451
  if (prevChecked !== checked && setChecked) {
29272
29452
  const event = new Event("click", { bubbles });
29273
29453
  input.indeterminate = isIndeterminate(checked);
29274
29454
  setChecked.call(input, isIndeterminate(checked) ? false : checked);
29275
29455
  input.dispatchEvent(event);
29276
29456
  }
29277
- }, [prevChecked, checked, bubbles]);
29457
+ }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
29278
29458
  const defaultCheckedRef = reactExports.useRef(isIndeterminate(checked) ? false : checked);
29279
29459
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
29280
29460
  Primitive.input,
@@ -29282,6 +29462,11 @@ var CheckboxBubbleInput = reactExports.forwardRef(
29282
29462
  type: "checkbox",
29283
29463
  "aria-hidden": true,
29284
29464
  defaultChecked: defaultChecked ?? defaultCheckedRef.current,
29465
+ required,
29466
+ disabled,
29467
+ name,
29468
+ value,
29469
+ form,
29285
29470
  ...props,
29286
29471
  tabIndex: -1,
29287
29472
  ref: composedRefs,
@@ -29291,23 +29476,28 @@ var CheckboxBubbleInput = reactExports.forwardRef(
29291
29476
  position: "absolute",
29292
29477
  pointerEvents: "none",
29293
29478
  opacity: 0,
29294
- margin: 0
29479
+ margin: 0,
29480
+ // We transform because the input is absolutely positioned but we have
29481
+ // rendered it **after** the button. This pulls it back to sit on top
29482
+ // of the button.
29483
+ transform: "translateX(-100%)"
29295
29484
  }
29296
29485
  }
29297
29486
  );
29298
29487
  }
29299
29488
  );
29300
29489
  CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;
29490
+ function isFunction(value) {
29491
+ return typeof value === "function";
29492
+ }
29301
29493
  function isIndeterminate(checked) {
29302
29494
  return checked === "indeterminate";
29303
29495
  }
29304
29496
  function getState(checked) {
29305
29497
  return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
29306
29498
  }
29307
- var Root = Checkbox$1;
29308
- var Indicator = CheckboxIndicator;
29309
29499
  const Checkbox = reactExports.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
29310
- Root,
29500
+ Checkbox$1,
29311
29501
  {
29312
29502
  ref,
29313
29503
  className: cn(
@@ -29316,7 +29506,7 @@ const Checkbox = reactExports.forwardRef(({ className, ...props }, ref) => /* @_
29316
29506
  ),
29317
29507
  ...props,
29318
29508
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29319
- Indicator,
29509
+ CheckboxIndicator,
29320
29510
  {
29321
29511
  className: cn("flex items-center justify-center text-current"),
29322
29512
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "h-4 w-4" })
@@ -29324,7 +29514,7 @@ const Checkbox = reactExports.forwardRef(({ className, ...props }, ref) => /* @_
29324
29514
  )
29325
29515
  }
29326
29516
  ));
29327
- Checkbox.displayName = Root.displayName;
29517
+ Checkbox.displayName = Checkbox$1.displayName;
29328
29518
  const Textarea = reactExports.forwardRef(
29329
29519
  ({ className, ...props }, ref) => {
29330
29520
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -29903,7 +30093,7 @@ const App = () => {
29903
30093
  };
29904
30094
  if (window.location.pathname === "/oauth/callback") {
29905
30095
  const OAuthCallback = React.lazy(
29906
- () => __vitePreload(() => import("./OAuthCallback-kYD-IoGw.js"), true ? [] : void 0)
30096
+ () => __vitePreload(() => import("./OAuthCallback-FfoeB75N.js"), true ? [] : void 0)
29907
30097
  );
29908
30098
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
29909
30099
  }
@@ -29995,7 +30185,22 @@ const App = () => {
29995
30185
  "Roots"
29996
30186
  ] })
29997
30187
  ] }),
29998
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full", children: !(serverCapabilities == null ? void 0 : serverCapabilities.resources) && !(serverCapabilities == null ? void 0 : serverCapabilities.prompts) && !(serverCapabilities == null ? void 0 : serverCapabilities.tools) ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-lg text-gray-500", children: "The connected server does not support any MCP capabilities" }) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
30188
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full", children: !(serverCapabilities == null ? void 0 : serverCapabilities.resources) && !(serverCapabilities == null ? void 0 : serverCapabilities.prompts) && !(serverCapabilities == null ? void 0 : serverCapabilities.tools) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
30189
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-lg text-gray-500", children: "The connected server does not support any MCP capabilities" }) }),
30190
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
30191
+ PingTab,
30192
+ {
30193
+ onPingClick: () => {
30194
+ void sendMCPRequest(
30195
+ {
30196
+ method: "ping"
30197
+ },
30198
+ EmptyResultSchema
30199
+ );
30200
+ }
30201
+ }
30202
+ )
30203
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
29999
30204
  /* @__PURE__ */ jsxRuntimeExports.jsx(
30000
30205
  ResourcesTab,
30001
30206
  {
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/mcp.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>MCP Inspector</title>
8
- <script type="module" crossorigin src="/assets/index-DoxCWJPh.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-CHwMp9hp.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-D5WIP3OH.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/inspector",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Model Context Protocol inspector",
5
5
  "license": "MIT",
6
6
  "author": "Anthropic, PBC (https://anthropic.com)",
@@ -26,6 +26,7 @@
26
26
  "build-server": "cd server && npm run build",
27
27
  "build-client": "cd client && npm run build",
28
28
  "build-cli": "cd cli && npm run build",
29
+ "clean": "rimraf ./node_modules ./client/node_modules ./cli/node_modules ./build ./client/dist ./server/build ./cli/build ./package-lock.json && npm install",
29
30
  "dev": "concurrently \"cd client && npm run dev\" \"cd server && npm run dev\"",
30
31
  "dev:windows": "concurrently \"cd client && npm run dev\" \"cd server && npm run dev:windows\"",
31
32
  "start": "node client/bin/start.js",
@@ -39,10 +40,10 @@
39
40
  "publish-all": "npm publish --workspaces --access public && npm publish --access public"
40
41
  },
41
42
  "dependencies": {
42
- "@modelcontextprotocol/inspector-cli": "^0.11.0",
43
- "@modelcontextprotocol/inspector-client": "^0.11.0",
44
- "@modelcontextprotocol/inspector-server": "^0.11.0",
45
- "@modelcontextprotocol/sdk": "^1.10.2",
43
+ "@modelcontextprotocol/inspector-cli": "^0.12.0",
44
+ "@modelcontextprotocol/inspector-client": "^0.12.0",
45
+ "@modelcontextprotocol/inspector-server": "^0.12.0",
46
+ "@modelcontextprotocol/sdk": "^1.11.0",
46
47
  "concurrently": "^9.0.1",
47
48
  "shell-quote": "^1.8.2",
48
49
  "spawn-rx": "^5.1.2",
@@ -55,6 +56,7 @@
55
56
  "@types/shell-quote": "^1.7.5",
56
57
  "jest-fixed-jsdom": "^0.0.9",
57
58
  "prettier": "3.3.3",
59
+ "rimraf": "^6.0.1",
58
60
  "typescript": "^5.4.2"
59
61
  }
60
62
  }