@frontmcp/react 1.11.2 → 1.11.3
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/ai/createToolHandler.d.ts +1 -1
- package/ai/createToolHandler.d.ts.map +1 -1
- package/ai/types.d.ts +2 -2
- package/ai/types.d.ts.map +1 -1
- package/ai/useAITools.d.ts +1 -1
- package/ai/useAITools.d.ts.map +1 -1
- package/ai/useTools.d.ts +1 -1
- package/ai/useTools.d.ts.map +1 -1
- package/components/AgentContent.d.ts +1 -2
- package/components/AgentContent.d.ts.map +1 -1
- package/components/AgentSearch.d.ts +1 -2
- package/components/AgentSearch.d.ts.map +1 -1
- package/components/DynamicRenderer.d.ts.map +1 -1
- package/components/PromptForm.d.ts +1 -1
- package/components/PromptForm.d.ts.map +1 -1
- package/esm/ai/index.mjs +5 -3
- package/esm/index.mjs +6 -6
- package/esm/package.json +6 -6
- package/esm/router/index.mjs +1 -1
- package/hooks/useCallTool.d.ts.map +1 -1
- package/hooks/useComponentTree.d.ts +1 -1
- package/hooks/useComponentTree.d.ts.map +1 -1
- package/hooks/useGetPrompt.d.ts.map +1 -1
- package/hooks/useReadResource.d.ts.map +1 -1
- package/hooks/useResolvedServer.d.ts +1 -1
- package/hooks/useResolvedServer.d.ts.map +1 -1
- package/package.json +6 -6
- package/router/current-route.resource.d.ts.map +1 -1
- package/state/useStoreRegistration.d.ts.map +1 -1
- package/state/useValtioResource.d.ts.map +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* createToolCallHandler — non-React utility for vanilla JS usage.
|
|
3
3
|
*/
|
|
4
|
-
import type
|
|
4
|
+
import { type DirectMcpServer, type LLMPlatform } from '@frontmcp/sdk';
|
|
5
5
|
import type { CallToolFn } from '@frontmcp/utils';
|
|
6
6
|
export interface ToolCallHandler {
|
|
7
7
|
callTool: CallToolFn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createToolHandler.d.ts","sourceRoot":"","sources":["../../src/ai/createToolHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"createToolHandler.d.ts","sourceRoot":"","sources":["../../src/ai/createToolHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAA2B,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,UAAU,CAAC;CACtB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,WAAW,GAAG,eAAe,CAOrG"}
|
package/ai/types.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Platform-specific tool call types are re-exported from @frontmcp/utils.
|
|
5
5
|
* SDK-dependent types (tool shapes, hook return types) remain here.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
7
|
+
import type { CallToolResult, ClaudeTool, LangChainTool, LLMPlatform, OpenAITool, VercelAITools } from '@frontmcp/sdk';
|
|
8
|
+
import type { ClaudeToolUseBlock as _ClaudeToolUseBlock, OpenAIToolCallItem as _OpenAIToolCallItem, VercelToolCallInfo as _VercelToolCallInfo } from '@frontmcp/utils';
|
|
9
9
|
export type OpenAIToolCallItem = _OpenAIToolCallItem;
|
|
10
10
|
export type ClaudeToolUseBlock = _ClaudeToolUseBlock;
|
|
11
11
|
export type VercelToolCallInfo = _VercelToolCallInfo;
|
package/ai/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ai/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ai/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACvH,OAAO,KAAK,EACV,kBAAkB,IAAI,mBAAmB,EACzC,kBAAkB,IAAI,mBAAmB,EACzC,kBAAkB,IAAI,mBAAmB,EAC1C,MAAM,iBAAiB,CAAC;AAGzB,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AACrD,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AACrD,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GACrC,cAAc,CAAC,SAAS,CAAC,GACzB;IAAE,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,GACtF;IAAE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC;AAM5E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAMD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,WAAW,EAAE,aAAa,CAAC;IAC3B,GAAG,EAAE,WAAW,EAAE,CAAC;CACpB,CAAC;AAMF,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,WAAW;IACrD,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACzF,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB"}
|
package/ai/useAITools.d.ts
CHANGED
package/ai/useAITools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAITools.d.ts","sourceRoot":"","sources":["../../src/ai/useAITools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"useAITools.d.ts","sourceRoot":"","sources":["../../src/ai/useAITools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAmD,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAGlG,OAAO,KAAK,EAAsD,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEpG,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,WAAW,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,gBAAgB,CAAC,CAAC,CAAC,CA0D5G"}
|
package/ai/useTools.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Delegates tool call processing to `processPlatformToolCalls` from
|
|
5
5
|
* `@frontmcp/utils`, making the logic reusable in Node.js backends.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import { type PlatformToolCallsInput, type PlatformToolCallsOutput, type SupportedPlatform } from '@frontmcp/utils';
|
|
8
8
|
import type { PlatformToolsMap } from './types';
|
|
9
9
|
export interface UseToolsResult<P extends SupportedPlatform> {
|
|
10
10
|
tools: PlatformToolsMap[P] | null;
|
package/ai/useTools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTools.d.ts","sourceRoot":"","sources":["../../src/ai/useTools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useTools.d.ts","sourceRoot":"","sources":["../../src/ai/useTools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,iBAAiB;IACzD,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5F,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAcD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,iBAAiB,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc,CAAC,CAAC,CAAC,CAS5G"}
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* @deprecated Use `mcpComponent()` instead for type-safe schemas and
|
|
9
9
|
* a cleaner component-wrapping API.
|
|
10
10
|
*/
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import type { ReactNode } from 'react';
|
|
11
|
+
import React, { type ReactNode } from 'react';
|
|
13
12
|
/** @deprecated Use `mcpComponent()` instead. */
|
|
14
13
|
export interface AgentContentProps {
|
|
15
14
|
/** MCP tool name that agents will call to push data. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentContent.d.ts","sourceRoot":"","sources":["../../src/components/AgentContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"AgentContent.d.ts","sourceRoot":"","sources":["../../src/components/AgentContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMrE,gDAAgD;AAChD,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,0DAA0D;IAC1D,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,SAAS,CAAC;IACrD,iDAAiD;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gDAAgD;AAChD,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,WAAW,EACX,WAAgC,EAChC,MAAM,EACN,QAAe,EACf,MAAM,GACP,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAgBxC"}
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* @deprecated Use `mcpComponent()` with `columns` option for table-based
|
|
9
9
|
* search result rendering.
|
|
10
10
|
*/
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import type { ReactNode } from 'react';
|
|
11
|
+
import React, { type ReactNode } from 'react';
|
|
13
12
|
export interface SearchInputRenderProps {
|
|
14
13
|
value: string;
|
|
15
14
|
onChange: (value: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentSearch.d.ts","sourceRoot":"","sources":["../../src/components/AgentSearch.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"AgentSearch.d.ts","sourceRoot":"","sources":["../../src/components/AgentSearch.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOrE,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,+EAA+E;IAC/E,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,SAAS,CAAC;IAC3D,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,WAAW,EACX,WAAW,EACX,SAAS,EACT,WAAW,EACX,MAAM,GACP,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CA4DvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicRenderer.d.ts","sourceRoot":"","sources":["../../src/components/DynamicRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DynamicRenderer.d.ts","sourceRoot":"","sources":["../../src/components/DynamicRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzD;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAEtG"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* PromptForm — headless form generator from prompt.arguments.
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import type {
|
|
5
|
+
import type { FieldRenderProps, PromptInfo } from '../types';
|
|
6
6
|
export interface PromptFormProps {
|
|
7
7
|
prompt: PromptInfo;
|
|
8
8
|
onSubmit: (args: Record<string, string>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptForm.d.ts","sourceRoot":"","sources":["../../src/components/PromptForm.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAgC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PromptForm.d.ts","sourceRoot":"","sources":["../../src/components/PromptForm.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,QAAQ,EACR,WAAW,EACX,WAA0B,GAC3B,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CA+DtC"}
|
package/esm/ai/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// libs/react/src/ai/useAITools.ts
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useCallback as useCallback2, useEffect, useState } from "react";
|
|
3
|
+
import { formatResultForPlatform, formatToolsForPlatform } from "@frontmcp/sdk";
|
|
4
4
|
|
|
5
5
|
// libs/react/src/hooks/useResolvedServer.ts
|
|
6
6
|
import { useContext as useContext2 } from "react";
|
|
@@ -452,7 +452,9 @@ function useAITools(platform, options) {
|
|
|
452
452
|
|
|
453
453
|
// libs/react/src/ai/useTools.ts
|
|
454
454
|
import { useCallback as useCallback3 } from "react";
|
|
455
|
-
import {
|
|
455
|
+
import {
|
|
456
|
+
processPlatformToolCalls
|
|
457
|
+
} from "@frontmcp/utils";
|
|
456
458
|
function useTools(platform, options) {
|
|
457
459
|
const { tools, callTool, loading, error } = useAITools(platform, options);
|
|
458
460
|
const processToolCalls = useCallback3(
|
package/esm/index.mjs
CHANGED
|
@@ -969,7 +969,7 @@ function useFrontMcp(name) {
|
|
|
969
969
|
}
|
|
970
970
|
|
|
971
971
|
// libs/react/src/hooks/useCallTool.ts
|
|
972
|
-
import {
|
|
972
|
+
import { useCallback as useCallback3, useEffect as useEffect4, useState } from "react";
|
|
973
973
|
function useCallTool(toolName, options = {}) {
|
|
974
974
|
const { onSuccess, onError, resetOnToolChange = true, server: serverName } = options;
|
|
975
975
|
const { entry } = useResolvedServer(serverName);
|
|
@@ -1017,7 +1017,7 @@ function useCallTool(toolName, options = {}) {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
1019
|
// libs/react/src/hooks/useReadResource.ts
|
|
1020
|
-
import {
|
|
1020
|
+
import { useCallback as useCallback4, useEffect as useEffect5, useState as useState2 } from "react";
|
|
1021
1021
|
function useReadResource(uriOrOptions, maybeOptions) {
|
|
1022
1022
|
const uri = typeof uriOrOptions === "string" ? uriOrOptions : void 0;
|
|
1023
1023
|
const options = typeof uriOrOptions === "object" ? uriOrOptions : maybeOptions;
|
|
@@ -1067,7 +1067,7 @@ function useReadResource(uriOrOptions, maybeOptions) {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
|
|
1069
1069
|
// libs/react/src/hooks/useGetPrompt.ts
|
|
1070
|
-
import {
|
|
1070
|
+
import { useCallback as useCallback5, useState as useState3 } from "react";
|
|
1071
1071
|
function useGetPrompt(promptName, options) {
|
|
1072
1072
|
const { entry } = useResolvedServer(options?.server);
|
|
1073
1073
|
const client = entry?.client ?? null;
|
|
@@ -1570,7 +1570,7 @@ function getFieldType(prop) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
|
|
1572
1572
|
// libs/react/src/components/PromptForm.tsx
|
|
1573
|
-
import React4, {
|
|
1573
|
+
import React4, { useCallback as useCallback9, useState as useState6 } from "react";
|
|
1574
1574
|
function PromptForm({
|
|
1575
1575
|
prompt: prompt2,
|
|
1576
1576
|
onSubmit,
|
|
@@ -1707,7 +1707,7 @@ function OutputDisplay({ data, loading, error }) {
|
|
|
1707
1707
|
}
|
|
1708
1708
|
|
|
1709
1709
|
// libs/react/src/components/AgentContent.tsx
|
|
1710
|
-
import React7, {
|
|
1710
|
+
import React7, { useCallback as useCallback10, useState as useState7 } from "react";
|
|
1711
1711
|
function AgentContent({
|
|
1712
1712
|
name,
|
|
1713
1713
|
description,
|
|
@@ -1731,7 +1731,7 @@ function AgentContent({
|
|
|
1731
1731
|
}
|
|
1732
1732
|
|
|
1733
1733
|
// libs/react/src/components/AgentSearch.tsx
|
|
1734
|
-
import React8, {
|
|
1734
|
+
import React8, { useCallback as useCallback11, useState as useState8 } from "react";
|
|
1735
1735
|
function AgentSearch({
|
|
1736
1736
|
toolName,
|
|
1737
1737
|
description,
|
package/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/react",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.3",
|
|
4
4
|
"description": "Run a FrontMCP server inside a React app: provider, hooks, components and AI SDK integration",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"homepage": "https://frontmcp.dev/reference/react",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"node": ">=24.0.0"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
|
-
"@frontmcp/lazy-zod": "1.11.
|
|
93
|
-
"@frontmcp/sdk": "1.11.
|
|
94
|
-
"@frontmcp/utils": "1.11.
|
|
92
|
+
"@frontmcp/lazy-zod": "1.11.3",
|
|
93
|
+
"@frontmcp/sdk": "1.11.3",
|
|
94
|
+
"@frontmcp/utils": "1.11.3",
|
|
95
95
|
"react": "^18.0.0 || ^19.0.0",
|
|
96
96
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
97
97
|
"react-router-dom": "^7.0.0"
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"@frontmcp/sdk": "1.11.
|
|
109
|
-
"@frontmcp/utils": "1.11.
|
|
108
|
+
"@frontmcp/sdk": "1.11.3",
|
|
109
|
+
"@frontmcp/utils": "1.11.3"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
112
|
"typescript": "^5.9.3"
|
package/esm/router/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// libs/react/src/router/useRouterBridge.ts
|
|
2
2
|
import { useEffect } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { useLocation, useNavigate } from "react-router-dom";
|
|
4
4
|
|
|
5
5
|
// libs/react/src/router/router-bridge.ts
|
|
6
6
|
var currentNavigate = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCallTool.d.ts","sourceRoot":"","sources":["../../src/hooks/useCallTool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"useCallTool.d.ts","sourceRoot":"","sources":["../../src/hooks/useCallTool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAa,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGjF,wBAAgB,WAAW,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAC5F,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAoDpC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Falls back to tag names for unattributed elements.
|
|
6
6
|
* Returns a JSON tree structure representing the component hierarchy.
|
|
7
7
|
*/
|
|
8
|
-
import type
|
|
8
|
+
import { type RefObject } from 'react';
|
|
9
9
|
export interface UseComponentTreeOptions {
|
|
10
10
|
rootRef: RefObject<HTMLElement | null>;
|
|
11
11
|
/** Resource URI (defaults to 'react://component-tree'). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComponentTree.d.ts","sourceRoot":"","sources":["../../src/hooks/useComponentTree.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"useComponentTree.d.ts","sourceRoot":"","sources":["../../src/hooks/useComponentTree.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASpD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACvC,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA2CD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,IAAI,CA6BvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetPrompt.d.ts","sourceRoot":"","sources":["../../src/hooks/useGetPrompt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"useGetPrompt.d.ts","sourceRoot":"","sources":["../../src/hooks/useGetPrompt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC;AAEpG,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,kBAAkB,CAmC/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReadResource.d.ts","sourceRoot":"","sources":["../../src/hooks/useReadResource.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"useReadResource.d.ts","sourceRoot":"","sources":["../../src/hooks/useReadResource.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,KAAK,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAChD,KAAK,UAAU,GAAG,CAAC,MAAM,EAAE,aAAa,GAAG;IAAE,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AACpE,KAAK,UAAU,GAAG,aAAa,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAE1D,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,UAAU,CAAC;AAC3E,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,UAAU,CAAC"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Without args: resolves the provider's server name from context.
|
|
5
5
|
* With a name: resolves the named server from the ServerRegistry.
|
|
6
6
|
*/
|
|
7
|
-
import type { ServerEntry } from '../registry/ServerRegistry';
|
|
8
7
|
import type { ComponentRegistry } from '../components/ComponentRegistry';
|
|
8
|
+
import type { ServerEntry } from '../registry/ServerRegistry';
|
|
9
9
|
export interface ResolvedServerEntry {
|
|
10
10
|
entry: ServerEntry | undefined;
|
|
11
11
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResolvedServer.d.ts","sourceRoot":"","sources":["../../src/hooks/useResolvedServer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"useResolvedServer.d.ts","sourceRoot":"","sources":["../../src/hooks/useResolvedServer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG9D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,wBAAgB,iBAAiB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAK1E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/react",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.3",
|
|
4
4
|
"description": "Run a FrontMCP server inside a React app: provider, hooks, components and AI SDK integration",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"homepage": "https://frontmcp.dev/reference/react",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"node": ">=24.0.0"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
|
-
"@frontmcp/lazy-zod": "1.11.
|
|
93
|
-
"@frontmcp/sdk": "1.11.
|
|
94
|
-
"@frontmcp/utils": "1.11.
|
|
92
|
+
"@frontmcp/lazy-zod": "1.11.3",
|
|
93
|
+
"@frontmcp/sdk": "1.11.3",
|
|
94
|
+
"@frontmcp/utils": "1.11.3",
|
|
95
95
|
"react": "^18.0.0 || ^19.0.0",
|
|
96
96
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
97
97
|
"react-router-dom": "^7.0.0"
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"@frontmcp/sdk": "1.11.
|
|
109
|
-
"@frontmcp/utils": "1.11.
|
|
108
|
+
"@frontmcp/sdk": "1.11.3",
|
|
109
|
+
"@frontmcp/utils": "1.11.3"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
112
|
"typescript": "^5.9.3"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"current-route.resource.d.ts","sourceRoot":"","sources":["../../src/router/current-route.resource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"current-route.resource.d.ts","sourceRoot":"","sources":["../../src/router/current-route.resource.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAIxD,qBAAa,oBAAoB;IAC/B,MAAM,CAAC,QAAQ,CAAC,GAAG,qBAAqB;IACxC,MAAM,CAAC,QAAQ,CAAC,YAAY,mBAAmB;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,wDAAwD;IAEnF,MAAM,CAAC,IAAI,IAAI,kBAAkB;CA+BlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStoreRegistration.d.ts","sourceRoot":"","sources":["../../src/state/useStoreRegistration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"useStoreRegistration.d.ts","sourceRoot":"","sources":["../../src/state/useStoreRegistration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAU7C,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,eAAe,EAAE,eAAe,GAAG,IAAI,CAkHnG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValtioResource.d.ts","sourceRoot":"","sources":["../../src/state/useValtioResource.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useValtioResource.d.ts","sourceRoot":"","sources":["../../src/state/useValtioResource.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAa3D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAqCtE"}
|