mcp-use 1.7.0-canary.3 → 1.7.0-canary.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/{chunk-BBEY6HHN.js → chunk-VTXOGI7C.js} +6 -18
- package/dist/index.cjs +6 -18
- package/dist/index.js +1 -1
- package/dist/src/react/McpUseProvider.d.ts.map +1 -1
- package/dist/src/react/index.cjs +6 -18
- package/dist/src/react/index.js +1 -1
- package/package.json +3 -3
|
@@ -1497,18 +1497,6 @@ import React5, {
|
|
|
1497
1497
|
useRef as useRef3,
|
|
1498
1498
|
useState as useState5
|
|
1499
1499
|
} from "react";
|
|
1500
|
-
var BrowserRouter = null;
|
|
1501
|
-
var routerError = null;
|
|
1502
|
-
(async () => {
|
|
1503
|
-
try {
|
|
1504
|
-
const routerModule = await import("react-router-dom");
|
|
1505
|
-
BrowserRouter = routerModule.BrowserRouter;
|
|
1506
|
-
} catch (error) {
|
|
1507
|
-
routerError = new Error(
|
|
1508
|
-
"\u274C react-router-dom not installed!\n\nTo use MCP widgets with McpUseProvider, you need to install:\n\n npm install react-router-dom\n # or\n pnpm add react-router-dom\n\nThis dependency is automatically included in projects created with 'create-mcp-use-app'."
|
|
1509
|
-
);
|
|
1510
|
-
}
|
|
1511
|
-
})();
|
|
1512
1500
|
function getBasename() {
|
|
1513
1501
|
if (typeof window === "undefined") return "/";
|
|
1514
1502
|
const path = window.location.pathname;
|
|
@@ -1532,8 +1520,8 @@ function McpUseProvider({
|
|
|
1532
1520
|
const lastHeightRef = useRef3(0);
|
|
1533
1521
|
const debounceTimeoutRef = useRef3(null);
|
|
1534
1522
|
const notificationInProgressRef = useRef3(false);
|
|
1535
|
-
const [
|
|
1536
|
-
const [
|
|
1523
|
+
const [BrowserRouter, setBrowserRouter] = useState5(null);
|
|
1524
|
+
const [routerError, setRouterError] = useState5(null);
|
|
1537
1525
|
const [isRouterLoading, setIsRouterLoading] = useState5(true);
|
|
1538
1526
|
useEffect5(() => {
|
|
1539
1527
|
let mounted = true;
|
|
@@ -1627,16 +1615,16 @@ function McpUseProvider({
|
|
|
1627
1615
|
if (isRouterLoading) {
|
|
1628
1616
|
return /* @__PURE__ */ React5.createElement(StrictMode, null, /* @__PURE__ */ React5.createElement(ThemeProvider, null, /* @__PURE__ */ React5.createElement("div", { style: { padding: "20px", textAlign: "center" } }, "Loading...")));
|
|
1629
1617
|
}
|
|
1630
|
-
if (
|
|
1631
|
-
throw
|
|
1618
|
+
if (routerError) {
|
|
1619
|
+
throw routerError;
|
|
1632
1620
|
}
|
|
1633
1621
|
let content = children;
|
|
1634
1622
|
content = /* @__PURE__ */ React5.createElement(ErrorBoundary, null, content);
|
|
1635
1623
|
if (enableDebugger || viewControls) {
|
|
1636
1624
|
content = /* @__PURE__ */ React5.createElement(WidgetControls, { debugger: enableDebugger, viewControls }, content);
|
|
1637
1625
|
}
|
|
1638
|
-
if (
|
|
1639
|
-
content = /* @__PURE__ */ React5.createElement(
|
|
1626
|
+
if (BrowserRouter) {
|
|
1627
|
+
content = /* @__PURE__ */ React5.createElement(BrowserRouter, { basename }, content);
|
|
1640
1628
|
}
|
|
1641
1629
|
content = /* @__PURE__ */ React5.createElement(ThemeProvider, null, content);
|
|
1642
1630
|
if (autoSize) {
|
package/dist/index.cjs
CHANGED
|
@@ -9529,18 +9529,6 @@ __name(WidgetControls, "WidgetControls");
|
|
|
9529
9529
|
|
|
9530
9530
|
// src/react/McpUseProvider.tsx
|
|
9531
9531
|
var import_react7 = __toESM(require("react"), 1);
|
|
9532
|
-
var BrowserRouter = null;
|
|
9533
|
-
var routerError = null;
|
|
9534
|
-
(async () => {
|
|
9535
|
-
try {
|
|
9536
|
-
const routerModule = await import("react-router-dom");
|
|
9537
|
-
BrowserRouter = routerModule.BrowserRouter;
|
|
9538
|
-
} catch (error) {
|
|
9539
|
-
routerError = new Error(
|
|
9540
|
-
"\u274C react-router-dom not installed!\n\nTo use MCP widgets with McpUseProvider, you need to install:\n\n npm install react-router-dom\n # or\n pnpm add react-router-dom\n\nThis dependency is automatically included in projects created with 'create-mcp-use-app'."
|
|
9541
|
-
);
|
|
9542
|
-
}
|
|
9543
|
-
})();
|
|
9544
9532
|
function getBasename() {
|
|
9545
9533
|
if (typeof window === "undefined") return "/";
|
|
9546
9534
|
const path4 = window.location.pathname;
|
|
@@ -9564,8 +9552,8 @@ function McpUseProvider({
|
|
|
9564
9552
|
const lastHeightRef = (0, import_react7.useRef)(0);
|
|
9565
9553
|
const debounceTimeoutRef = (0, import_react7.useRef)(null);
|
|
9566
9554
|
const notificationInProgressRef = (0, import_react7.useRef)(false);
|
|
9567
|
-
const [
|
|
9568
|
-
const [
|
|
9555
|
+
const [BrowserRouter, setBrowserRouter] = (0, import_react7.useState)(null);
|
|
9556
|
+
const [routerError, setRouterError] = (0, import_react7.useState)(null);
|
|
9569
9557
|
const [isRouterLoading, setIsRouterLoading] = (0, import_react7.useState)(true);
|
|
9570
9558
|
(0, import_react7.useEffect)(() => {
|
|
9571
9559
|
let mounted = true;
|
|
@@ -9659,16 +9647,16 @@ function McpUseProvider({
|
|
|
9659
9647
|
if (isRouterLoading) {
|
|
9660
9648
|
return /* @__PURE__ */ import_react7.default.createElement(import_react7.StrictMode, null, /* @__PURE__ */ import_react7.default.createElement(ThemeProvider, null, /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "20px", textAlign: "center" } }, "Loading...")));
|
|
9661
9649
|
}
|
|
9662
|
-
if (
|
|
9663
|
-
throw
|
|
9650
|
+
if (routerError) {
|
|
9651
|
+
throw routerError;
|
|
9664
9652
|
}
|
|
9665
9653
|
let content = children;
|
|
9666
9654
|
content = /* @__PURE__ */ import_react7.default.createElement(ErrorBoundary, null, content);
|
|
9667
9655
|
if (enableDebugger || viewControls) {
|
|
9668
9656
|
content = /* @__PURE__ */ import_react7.default.createElement(WidgetControls, { debugger: enableDebugger, viewControls }, content);
|
|
9669
9657
|
}
|
|
9670
|
-
if (
|
|
9671
|
-
content = /* @__PURE__ */ import_react7.default.createElement(
|
|
9658
|
+
if (BrowserRouter) {
|
|
9659
|
+
content = /* @__PURE__ */ import_react7.default.createElement(BrowserRouter, { basename }, content);
|
|
9672
9660
|
}
|
|
9673
9661
|
content = /* @__PURE__ */ import_react7.default.createElement(ThemeProvider, null, content);
|
|
9674
9662
|
if (autoSize) {
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpUseProvider.d.ts","sourceRoot":"","sources":["../../../src/react/McpUseProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"McpUseProvider.d.ts","sourceRoot":"","sources":["../../../src/react/McpUseProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAuBf,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,YAAY,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EAAE,cAAsB,EAChC,YAAoB,EACpB,QAAgB,GACjB,EAAE,mBAAmB,qBA0LrB"}
|
package/dist/src/react/index.cjs
CHANGED
|
@@ -3544,18 +3544,6 @@ __name(WidgetControls, "WidgetControls");
|
|
|
3544
3544
|
|
|
3545
3545
|
// src/react/McpUseProvider.tsx
|
|
3546
3546
|
var import_react7 = __toESM(require("react"), 1);
|
|
3547
|
-
var BrowserRouter = null;
|
|
3548
|
-
var routerError = null;
|
|
3549
|
-
(async () => {
|
|
3550
|
-
try {
|
|
3551
|
-
const routerModule = await import("react-router-dom");
|
|
3552
|
-
BrowserRouter = routerModule.BrowserRouter;
|
|
3553
|
-
} catch (error) {
|
|
3554
|
-
routerError = new Error(
|
|
3555
|
-
"\u274C react-router-dom not installed!\n\nTo use MCP widgets with McpUseProvider, you need to install:\n\n npm install react-router-dom\n # or\n pnpm add react-router-dom\n\nThis dependency is automatically included in projects created with 'create-mcp-use-app'."
|
|
3556
|
-
);
|
|
3557
|
-
}
|
|
3558
|
-
})();
|
|
3559
3547
|
function getBasename() {
|
|
3560
3548
|
if (typeof window === "undefined") return "/";
|
|
3561
3549
|
const path = window.location.pathname;
|
|
@@ -3579,8 +3567,8 @@ function McpUseProvider({
|
|
|
3579
3567
|
const lastHeightRef = (0, import_react7.useRef)(0);
|
|
3580
3568
|
const debounceTimeoutRef = (0, import_react7.useRef)(null);
|
|
3581
3569
|
const notificationInProgressRef = (0, import_react7.useRef)(false);
|
|
3582
|
-
const [
|
|
3583
|
-
const [
|
|
3570
|
+
const [BrowserRouter, setBrowserRouter] = (0, import_react7.useState)(null);
|
|
3571
|
+
const [routerError, setRouterError] = (0, import_react7.useState)(null);
|
|
3584
3572
|
const [isRouterLoading, setIsRouterLoading] = (0, import_react7.useState)(true);
|
|
3585
3573
|
(0, import_react7.useEffect)(() => {
|
|
3586
3574
|
let mounted = true;
|
|
@@ -3674,16 +3662,16 @@ function McpUseProvider({
|
|
|
3674
3662
|
if (isRouterLoading) {
|
|
3675
3663
|
return /* @__PURE__ */ import_react7.default.createElement(import_react7.StrictMode, null, /* @__PURE__ */ import_react7.default.createElement(ThemeProvider, null, /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "20px", textAlign: "center" } }, "Loading...")));
|
|
3676
3664
|
}
|
|
3677
|
-
if (
|
|
3678
|
-
throw
|
|
3665
|
+
if (routerError) {
|
|
3666
|
+
throw routerError;
|
|
3679
3667
|
}
|
|
3680
3668
|
let content = children;
|
|
3681
3669
|
content = /* @__PURE__ */ import_react7.default.createElement(ErrorBoundary, null, content);
|
|
3682
3670
|
if (enableDebugger || viewControls) {
|
|
3683
3671
|
content = /* @__PURE__ */ import_react7.default.createElement(WidgetControls, { debugger: enableDebugger, viewControls }, content);
|
|
3684
3672
|
}
|
|
3685
|
-
if (
|
|
3686
|
-
content = /* @__PURE__ */ import_react7.default.createElement(
|
|
3673
|
+
if (BrowserRouter) {
|
|
3674
|
+
content = /* @__PURE__ */ import_react7.default.createElement(BrowserRouter, { basename }, content);
|
|
3687
3675
|
}
|
|
3688
3676
|
content = /* @__PURE__ */ import_react7.default.createElement(ThemeProvider, null, content);
|
|
3689
3677
|
if (autoSize) {
|
package/dist/src/react/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-use",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.7.0-canary.
|
|
4
|
+
"version": "1.7.0-canary.5",
|
|
5
5
|
"description": "Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.",
|
|
6
6
|
"author": "mcp-use, Inc.",
|
|
7
7
|
"license": "MIT",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
"posthog-node": "^5.1.1",
|
|
110
110
|
"ws": "^8.18.2",
|
|
111
111
|
"zod": "^4.1.13",
|
|
112
|
-
"@mcp-use/cli": "2.4.3-canary.
|
|
113
|
-
"@mcp-use/inspector": "0.9.0-canary.
|
|
112
|
+
"@mcp-use/cli": "2.4.3-canary.5",
|
|
113
|
+
"@mcp-use/inspector": "0.9.0-canary.5"
|
|
114
114
|
},
|
|
115
115
|
"optionalDependencies": {
|
|
116
116
|
"chalk": "^5.6.2",
|