@mastra/react 0.0.0-studio-deploy-20260403180827 → 0.0.0-studio-deploy-20260403231316
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/CHANGELOG.md +76 -4
- package/dist/index.cjs +19 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -6
- package/dist/index.js.map +1 -1
- package/dist/mastra-client-context.d.ts +6 -1
- package/dist/mastra-client-context.d.ts.map +1 -1
- package/dist/mastra-react-provider.d.ts +1 -1
- package/dist/mastra-react-provider.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,84 @@
|
|
|
1
1
|
# @mastra/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-studio-deploy-
|
|
3
|
+
## 0.0.0-studio-deploy-20260403231316
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- Updated dependencies [[`c55b527`](https://github.com/mastra-ai/mastra/commit/c55b52758a31368b2077b0dbbc3badfe4063f560)]:
|
|
8
|
-
- @mastra/core@0.0.0-studio-deploy-
|
|
9
|
-
- @mastra/client-js@0.0.0-studio-deploy-
|
|
7
|
+
- Updated dependencies [[`c55b527`](https://github.com/mastra-ai/mastra/commit/c55b52758a31368b2077b0dbbc3badfe4063f560), [`7eb2596`](https://github.com/mastra-ai/mastra/commit/7eb25960d607e07468c9a10c5437abd2deaf1e9a)]:
|
|
8
|
+
- @mastra/core@0.0.0-studio-deploy-20260403231316
|
|
9
|
+
- @mastra/client-js@0.0.0-studio-deploy-20260403231316
|
|
10
|
+
|
|
11
|
+
## 0.2.22
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`cb15509`](https://github.com/mastra-ai/mastra/commit/cb15509b58f6a83e11b765c945082afc027db972), [`81e4259`](https://github.com/mastra-ai/mastra/commit/81e425939b4ceeb4f586e9b6d89c3b1c1f2d2fe7), [`951b8a1`](https://github.com/mastra-ai/mastra/commit/951b8a1b5ef7e1474c59dc4f2b9fc1a8b1e508b6), [`80c5668`](https://github.com/mastra-ai/mastra/commit/80c5668e365470d3a96d3e953868fd7a643ff67c), [`3d478c1`](https://github.com/mastra-ai/mastra/commit/3d478c1e13f17b80f330ac49d7aa42ef929b93ff), [`2b4ea10`](https://github.com/mastra-ai/mastra/commit/2b4ea10b053e4ea1ab232d536933a4a3c4cba999), [`d87e6e6`](https://github.com/mastra-ai/mastra/commit/d87e6e61c42475a7b57768e71dfa12964326a632), [`c8c86aa`](https://github.com/mastra-ai/mastra/commit/c8c86aa1458017fbd1c0776fdc0c520d129df8a6), [`a0544f0`](https://github.com/mastra-ai/mastra/commit/a0544f0a1e6bd52ac12676228967c1938e43648d), [`6039f17`](https://github.com/mastra-ai/mastra/commit/6039f176f9c457304825ff1df8c83b8e457376c0), [`06b928d`](https://github.com/mastra-ai/mastra/commit/06b928dfc2f5630d023467476cc5919dfa858d0a), [`6a8d984`](https://github.com/mastra-ai/mastra/commit/6a8d9841f2933456ee1598099f488d742b600054), [`c8c86aa`](https://github.com/mastra-ai/mastra/commit/c8c86aa1458017fbd1c0776fdc0c520d129df8a6)]:
|
|
16
|
+
- @mastra/core@1.22.0
|
|
17
|
+
- @mastra/client-js@1.13.0
|
|
18
|
+
|
|
19
|
+
## 0.2.22-alpha.3
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`d87e6e6`](https://github.com/mastra-ai/mastra/commit/d87e6e61c42475a7b57768e71dfa12964326a632)]:
|
|
24
|
+
- @mastra/client-js@1.13.0-alpha.3
|
|
25
|
+
- @mastra/core@1.22.0-alpha.3
|
|
26
|
+
|
|
27
|
+
## 0.2.22-alpha.2
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`cb15509`](https://github.com/mastra-ai/mastra/commit/cb15509b58f6a83e11b765c945082afc027db972), [`80c5668`](https://github.com/mastra-ai/mastra/commit/80c5668e365470d3a96d3e953868fd7a643ff67c), [`3d478c1`](https://github.com/mastra-ai/mastra/commit/3d478c1e13f17b80f330ac49d7aa42ef929b93ff), [`6039f17`](https://github.com/mastra-ai/mastra/commit/6039f176f9c457304825ff1df8c83b8e457376c0), [`06b928d`](https://github.com/mastra-ai/mastra/commit/06b928dfc2f5630d023467476cc5919dfa858d0a), [`6a8d984`](https://github.com/mastra-ai/mastra/commit/6a8d9841f2933456ee1598099f488d742b600054)]:
|
|
32
|
+
- @mastra/core@1.22.0-alpha.2
|
|
33
|
+
- @mastra/client-js@1.13.0-alpha.2
|
|
34
|
+
|
|
35
|
+
## 0.2.22-alpha.1
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [[`81e4259`](https://github.com/mastra-ai/mastra/commit/81e425939b4ceeb4f586e9b6d89c3b1c1f2d2fe7), [`951b8a1`](https://github.com/mastra-ai/mastra/commit/951b8a1b5ef7e1474c59dc4f2b9fc1a8b1e508b6)]:
|
|
40
|
+
- @mastra/core@1.22.0-alpha.1
|
|
41
|
+
- @mastra/client-js@1.12.1-alpha.1
|
|
42
|
+
|
|
43
|
+
## 0.2.22-alpha.0
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [[`2b4ea10`](https://github.com/mastra-ai/mastra/commit/2b4ea10b053e4ea1ab232d536933a4a3c4cba999), [`c8c86aa`](https://github.com/mastra-ai/mastra/commit/c8c86aa1458017fbd1c0776fdc0c520d129df8a6), [`a0544f0`](https://github.com/mastra-ai/mastra/commit/a0544f0a1e6bd52ac12676228967c1938e43648d), [`c8c86aa`](https://github.com/mastra-ai/mastra/commit/c8c86aa1458017fbd1c0776fdc0c520d129df8a6)]:
|
|
48
|
+
- @mastra/core@1.22.0-alpha.0
|
|
49
|
+
- @mastra/client-js@1.12.1-alpha.0
|
|
50
|
+
|
|
51
|
+
## 0.2.21
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [[`9a43b47`](https://github.com/mastra-ai/mastra/commit/9a43b476465e86c9aca381c2831066b5c33c999a), [`ec5c319`](https://github.com/mastra-ai/mastra/commit/ec5c3197a50d034cb8e9cc494eebfddc684b5d81), [`6517789`](https://github.com/mastra-ai/mastra/commit/65177895b74b5471fe2245c7292f0176d9b3385d), [`13f4327`](https://github.com/mastra-ai/mastra/commit/13f4327f052faebe199cefbe906d33bf90238767), [`9ad6aa6`](https://github.com/mastra-ai/mastra/commit/9ad6aa6dfe858afc6955d1df5f3f78c40bb96b9c), [`2862127`](https://github.com/mastra-ai/mastra/commit/2862127d0a7cbd28523120ad64fea067a95838e6), [`3d16814`](https://github.com/mastra-ai/mastra/commit/3d16814c395931373543728994ff45ac98093074), [`7f498d0`](https://github.com/mastra-ai/mastra/commit/7f498d099eacef64fd43ee412e3bd6f87965a8a6), [`edf8f9d`](https://github.com/mastra-ai/mastra/commit/edf8f9d9cd671ffbc8533ac154da6c3386799b33), [`8cf8a67`](https://github.com/mastra-ai/mastra/commit/8cf8a67b061b737cb06d501fb8c1967a98bbf3cb), [`d7827e3`](https://github.com/mastra-ai/mastra/commit/d7827e393937c6cb0c7a744dde4d31538cb542b7)]:
|
|
56
|
+
- @mastra/core@1.21.0
|
|
57
|
+
- @mastra/client-js@1.12.0
|
|
58
|
+
|
|
59
|
+
## 0.2.21-alpha.2
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- Updated dependencies [[`ec5c319`](https://github.com/mastra-ai/mastra/commit/ec5c3197a50d034cb8e9cc494eebfddc684b5d81), [`6517789`](https://github.com/mastra-ai/mastra/commit/65177895b74b5471fe2245c7292f0176d9b3385d), [`9ad6aa6`](https://github.com/mastra-ai/mastra/commit/9ad6aa6dfe858afc6955d1df5f3f78c40bb96b9c), [`2862127`](https://github.com/mastra-ai/mastra/commit/2862127d0a7cbd28523120ad64fea067a95838e6), [`3d16814`](https://github.com/mastra-ai/mastra/commit/3d16814c395931373543728994ff45ac98093074), [`7f498d0`](https://github.com/mastra-ai/mastra/commit/7f498d099eacef64fd43ee412e3bd6f87965a8a6), [`8cf8a67`](https://github.com/mastra-ai/mastra/commit/8cf8a67b061b737cb06d501fb8c1967a98bbf3cb), [`d7827e3`](https://github.com/mastra-ai/mastra/commit/d7827e393937c6cb0c7a744dde4d31538cb542b7)]:
|
|
64
|
+
- @mastra/core@1.21.0-alpha.2
|
|
65
|
+
- @mastra/client-js@1.12.0-alpha.2
|
|
66
|
+
|
|
67
|
+
## 0.2.21-alpha.1
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Updated dependencies [[`13f4327`](https://github.com/mastra-ai/mastra/commit/13f4327f052faebe199cefbe906d33bf90238767)]:
|
|
72
|
+
- @mastra/core@1.21.0-alpha.1
|
|
73
|
+
- @mastra/client-js@1.12.0-alpha.1
|
|
74
|
+
|
|
75
|
+
## 0.2.21-alpha.0
|
|
76
|
+
|
|
77
|
+
### Patch Changes
|
|
78
|
+
|
|
79
|
+
- Updated dependencies [[`9a43b47`](https://github.com/mastra-ai/mastra/commit/9a43b476465e86c9aca381c2831066b5c33c999a), [`edf8f9d`](https://github.com/mastra-ai/mastra/commit/edf8f9d9cd671ffbc8533ac154da6c3386799b33)]:
|
|
80
|
+
- @mastra/core@1.21.0-alpha.0
|
|
81
|
+
- @mastra/client-js@1.12.0-alpha.0
|
|
10
82
|
|
|
11
83
|
## 0.2.20
|
|
12
84
|
|
package/dist/index.cjs
CHANGED
|
@@ -17,9 +17,10 @@ var MastraClientProvider = ({
|
|
|
17
17
|
baseUrl,
|
|
18
18
|
headers,
|
|
19
19
|
apiPrefix,
|
|
20
|
-
credentials = "include"
|
|
20
|
+
credentials = "include",
|
|
21
|
+
customFetch
|
|
21
22
|
}) => {
|
|
22
|
-
const client = createMastraClient(baseUrl, headers, apiPrefix, credentials);
|
|
23
|
+
const client = createMastraClient(baseUrl, headers, apiPrefix, credentials, customFetch);
|
|
23
24
|
return /* @__PURE__ */ jsxRuntime.jsx(MastraClientContext.Provider, { value: client, children });
|
|
24
25
|
};
|
|
25
26
|
var useMastraClient = () => react.useContext(MastraClientContext);
|
|
@@ -38,12 +39,13 @@ var isLocalUrl = (url) => {
|
|
|
38
39
|
return false;
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
|
-
var createMastraClient = (baseUrl, mastraClientHeaders = {}, apiPrefix, credentials = "include") => {
|
|
42
|
+
var createMastraClient = (baseUrl, mastraClientHeaders = {}, apiPrefix, credentials = "include", customFetch) => {
|
|
42
43
|
return new clientJs.MastraClient({
|
|
43
44
|
baseUrl: baseUrl || "",
|
|
44
45
|
headers: isLocalUrl(baseUrl) ? { ...mastraClientHeaders, "x-mastra-dev-playground": "true" } : mastraClientHeaders,
|
|
45
46
|
apiPrefix,
|
|
46
|
-
credentials
|
|
47
|
+
credentials,
|
|
48
|
+
fetch: customFetch
|
|
47
49
|
});
|
|
48
50
|
};
|
|
49
51
|
var MastraReactProvider = ({
|
|
@@ -51,9 +53,20 @@ var MastraReactProvider = ({
|
|
|
51
53
|
baseUrl,
|
|
52
54
|
headers,
|
|
53
55
|
apiPrefix,
|
|
54
|
-
credentials
|
|
56
|
+
credentials,
|
|
57
|
+
customFetch
|
|
55
58
|
}) => {
|
|
56
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
59
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
MastraClientProvider,
|
|
61
|
+
{
|
|
62
|
+
baseUrl,
|
|
63
|
+
headers,
|
|
64
|
+
apiPrefix,
|
|
65
|
+
credentials,
|
|
66
|
+
customFetch,
|
|
67
|
+
children
|
|
68
|
+
}
|
|
69
|
+
);
|
|
57
70
|
};
|
|
58
71
|
|
|
59
72
|
// src/lib/ai-sdk/utils/formatCompletionFeedback.ts
|