@leanmcp/ui 0.1.0 → 0.2.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.
- package/README.md +160 -0
- package/dist/chunk-3PV26V5F.js +50 -0
- package/dist/chunk-3PV26V5F.js.map +1 -0
- package/dist/chunk-WORZ46KI.mjs +42 -0
- package/dist/chunk-WORZ46KI.mjs.map +1 -0
- package/dist/index.css +312 -230
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1210 -290
- package/dist/index.d.ts +1210 -290
- package/dist/index.js +3045 -404
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2843 -360
- package/dist/index.mjs.map +1 -1
- package/dist/server.d.mts +65 -0
- package/dist/server.d.ts +65 -0
- package/dist/server.js +32 -0
- package/dist/server.js.map +1 -0
- package/dist/server.mjs +3 -0
- package/dist/server.mjs.map +1 -0
- package/package.json +40 -14
package/dist/index.d.mts
CHANGED
|
@@ -1,64 +1,33 @@
|
|
|
1
|
-
import React, { ReactNode, ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import {
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default, { ReactNode, ButtonHTMLAttributes, Component, ErrorInfo, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
4
|
+
import { McpUiAppCapabilities, App, McpUiHostContext, McpUiDisplayMode, McpUiHostStyles } from '@modelcontextprotocol/ext-apps';
|
|
5
|
+
export { App, McpUiAppCapabilities, McpUiDisplayMode, McpUiHostContext, McpUiHostStyles, McpUiStyles, McpUiToolCancelledNotification, McpUiToolInputNotification, McpUiToolInputPartialNotification, McpUiToolResultNotification, PostMessageTransport } from '@modelcontextprotocol/ext-apps';
|
|
6
|
+
import { CallToolResult, ContentBlock } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { ToasterProps } from 'sonner';
|
|
8
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
9
|
+
import { VariantProps } from 'class-variance-authority';
|
|
10
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
11
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
12
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
13
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
14
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
15
|
+
import * as react_hook_form from 'react-hook-form';
|
|
16
|
+
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
17
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
18
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
19
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
20
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
21
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
22
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
23
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
24
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
25
|
+
import { Command as Command$1 } from 'cmdk';
|
|
26
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
27
|
+
import { ClassValue } from 'clsx';
|
|
28
|
+
export { UIApp, UIAppOptions, getUIAppMetadata, getUIAppUri } from './server.mjs';
|
|
6
29
|
import { ChartData, ChartType as ChartType$1, ChartOptions } from 'chart.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @UIApp Decorator
|
|
10
|
-
*
|
|
11
|
-
* Links an MCP tool to a React UI component.
|
|
12
|
-
* When applied to a tool method, it:
|
|
13
|
-
* 1. Adds _meta.ui/resourceUri to the tool definition
|
|
14
|
-
* 2. Auto-registers a resource that renders the component to HTML
|
|
15
|
-
*
|
|
16
|
-
* This decorator is designed to work with @leanmcp/core decorators.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Options for @UIApp decorator
|
|
21
|
-
*/
|
|
22
|
-
interface UIAppOptions {
|
|
23
|
-
/** React component to render for this tool's UI */
|
|
24
|
-
component: React.ComponentType<any>;
|
|
25
|
-
/** Custom resource URI (auto-generated if not provided) */
|
|
26
|
-
uri?: string;
|
|
27
|
-
/** HTML document title */
|
|
28
|
-
title?: string;
|
|
29
|
-
/** Additional CSS styles */
|
|
30
|
-
styles?: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Decorator that links a tool to a UI component.
|
|
34
|
-
*
|
|
35
|
-
* When the tool is called, the host will fetch the UI resource
|
|
36
|
-
* which returns the component rendered as HTML.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```typescript
|
|
40
|
-
* import { Tool } from '@leanmcp/core';
|
|
41
|
-
* import { UIApp } from '@leanmcp/ui';
|
|
42
|
-
* import { WeatherCard } from './WeatherCard';
|
|
43
|
-
*
|
|
44
|
-
* class WeatherService {
|
|
45
|
-
* @Tool({ description: 'Get weather for a city' })
|
|
46
|
-
* @UIApp({ component: WeatherCard })
|
|
47
|
-
* async getWeather(args: { city: string }) {
|
|
48
|
-
* return { city: args.city, temp: 22 };
|
|
49
|
-
* }
|
|
50
|
-
* }
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
declare function UIApp(options: UIAppOptions): MethodDecorator;
|
|
54
|
-
/**
|
|
55
|
-
* Helper to get UIApp metadata from a method
|
|
56
|
-
*/
|
|
57
|
-
declare function getUIAppMetadata(target: Function): UIAppOptions | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Helper to get the resource URI from a method
|
|
60
|
-
*/
|
|
61
|
-
declare function getUIAppUri(target: Function): string | undefined;
|
|
30
|
+
export { AppBridge } from '@modelcontextprotocol/ext-apps/app-bridge';
|
|
62
31
|
|
|
63
32
|
/**
|
|
64
33
|
* App information (same as ext-apps Implementation)
|
|
@@ -95,6 +64,11 @@ interface McpAppContextValue {
|
|
|
95
64
|
toolInputPartial: Record<string, unknown> | null;
|
|
96
65
|
/** Tool result received from host */
|
|
97
66
|
toolResult: CallToolResult | null;
|
|
67
|
+
/** Whether the tool was cancelled by host */
|
|
68
|
+
toolCancelled: {
|
|
69
|
+
cancelled: boolean;
|
|
70
|
+
reason?: string;
|
|
71
|
+
};
|
|
98
72
|
/** Call a server tool */
|
|
99
73
|
callTool: (name: string, args?: Record<string, unknown>) => Promise<CallToolResult>;
|
|
100
74
|
/** Send a message to the host chat */
|
|
@@ -103,6 +77,8 @@ interface McpAppContextValue {
|
|
|
103
77
|
sendLog: (level: 'debug' | 'info' | 'warning' | 'error', data: unknown) => Promise<void>;
|
|
104
78
|
/** Open a link in the host */
|
|
105
79
|
openLink: (url: string) => Promise<void>;
|
|
80
|
+
/** Request a display mode change */
|
|
81
|
+
requestDisplayMode: (mode: McpUiDisplayMode) => Promise<McpUiDisplayMode>;
|
|
106
82
|
}
|
|
107
83
|
interface AppProviderProps {
|
|
108
84
|
/** App name and version */
|
|
@@ -111,6 +87,8 @@ interface AppProviderProps {
|
|
|
111
87
|
capabilities?: McpUiAppCapabilities;
|
|
112
88
|
/** App options (autoResize, etc.) */
|
|
113
89
|
options?: AppOptions;
|
|
90
|
+
/** Callback when host requests teardown */
|
|
91
|
+
onTeardown?: () => void | Promise<void>;
|
|
114
92
|
/** React children */
|
|
115
93
|
children: ReactNode;
|
|
116
94
|
}
|
|
@@ -128,6 +106,7 @@ interface AppProviderProps {
|
|
|
128
106
|
* appInfo={{ name: "MyApp", version: "1.0.0" }}
|
|
129
107
|
* capabilities={{ tools: { listChanged: true } }}
|
|
130
108
|
* options={{ autoResize: true }}
|
|
109
|
+
* onTeardown={() => console.log('Cleaning up...')}
|
|
131
110
|
* >
|
|
132
111
|
* <MyContent />
|
|
133
112
|
* </AppProvider>
|
|
@@ -135,127 +114,835 @@ interface AppProviderProps {
|
|
|
135
114
|
* }
|
|
136
115
|
* ```
|
|
137
116
|
*/
|
|
138
|
-
declare function AppProvider({ appInfo, capabilities, options, children }: AppProviderProps): react_jsx_runtime.JSX.Element;
|
|
117
|
+
declare function AppProvider({ appInfo, capabilities, options, onTeardown, children }: AppProviderProps): react_jsx_runtime.JSX.Element;
|
|
139
118
|
/**
|
|
140
119
|
* Hook to access the MCP App context
|
|
141
120
|
* Returns SSR-safe defaults when no provider is available (during server rendering)
|
|
142
121
|
*/
|
|
143
122
|
declare function useMcpApp(): McpAppContextValue;
|
|
144
123
|
|
|
145
|
-
interface UseToolResult<T = unknown> {
|
|
146
|
-
/** Call the tool with arguments */
|
|
147
|
-
call: (args?: Record<string, unknown>) => Promise<T>;
|
|
148
|
-
/** Whether the tool is currently being called */
|
|
149
|
-
loading: boolean;
|
|
150
|
-
/** The result of the last tool call */
|
|
151
|
-
result: T | null;
|
|
152
|
-
/** Error from the last tool call */
|
|
153
|
-
error: Error | null;
|
|
154
|
-
/** Reset the result and error state */
|
|
155
|
-
reset: () => void;
|
|
156
|
-
}
|
|
157
124
|
/**
|
|
158
|
-
*
|
|
125
|
+
* MCP-Native UI SDK - Core Types
|
|
126
|
+
*
|
|
127
|
+
* Type definitions for MCP-native component patterns. These types enable
|
|
128
|
+
* declarative tool binding, result handling, and resource integration.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Configuration for binding a UI component to an MCP tool
|
|
159
133
|
*
|
|
160
134
|
* @example
|
|
161
135
|
* ```tsx
|
|
162
|
-
*
|
|
163
|
-
*
|
|
136
|
+
* // Simple string binding
|
|
137
|
+
* <ToolButton tool="refresh-data" />
|
|
164
138
|
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
* {error && <div>Error: {error.message}</div>}
|
|
172
|
-
* </div>
|
|
173
|
-
* );
|
|
174
|
-
* }
|
|
139
|
+
* // Full configuration
|
|
140
|
+
* <ToolButton tool={{
|
|
141
|
+
* name: "create-item",
|
|
142
|
+
* args: { type: "note" },
|
|
143
|
+
* transform: (r) => r.item
|
|
144
|
+
* }} />
|
|
175
145
|
* ```
|
|
176
146
|
*/
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
/**
|
|
147
|
+
interface ToolBinding<TArgs = Record<string, unknown>, TResult = unknown> {
|
|
148
|
+
/** Tool name to call */
|
|
149
|
+
name: string;
|
|
150
|
+
/** Static arguments (merged with dynamic args) */
|
|
151
|
+
args?: Partial<TArgs>;
|
|
152
|
+
/** Transform result before passing to handlers */
|
|
153
|
+
transform?: (result: CallToolResult) => TResult;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Normalized tool binding - always an object, never a string
|
|
157
|
+
*/
|
|
158
|
+
type NormalizedToolBinding<TArgs = Record<string, unknown>, TResult = unknown> = ToolBinding<TArgs, TResult>;
|
|
159
|
+
/**
|
|
160
|
+
* Helper to normalize string or ToolBinding to ToolBinding
|
|
161
|
+
*/
|
|
162
|
+
declare function normalizeToolBinding<TArgs = Record<string, unknown>, TResult = unknown>(tool: string | ToolBinding<TArgs, TResult>): NormalizedToolBinding<TArgs, TResult>;
|
|
163
|
+
/**
|
|
164
|
+
* Shared props for components that can trigger MCP tool calls
|
|
165
|
+
*/
|
|
166
|
+
interface McpActionProps<TResult = unknown> {
|
|
167
|
+
/** Tool to call on action */
|
|
168
|
+
tool?: string | ToolBinding<Record<string, unknown>, TResult>;
|
|
169
|
+
/** Called when tool execution starts */
|
|
170
|
+
onToolStart?: () => void;
|
|
171
|
+
/** Called on successful tool result */
|
|
172
|
+
onToolSuccess?: (result: TResult) => void;
|
|
173
|
+
/** Called on tool error */
|
|
174
|
+
onToolError?: (error: Error) => void;
|
|
175
|
+
/** Called after tool completes (success or error) */
|
|
176
|
+
onToolComplete?: () => void;
|
|
177
|
+
/** Disable component during tool execution (default: true) */
|
|
178
|
+
disableWhileLoading?: boolean;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Configuration for how to display tool results
|
|
182
|
+
*/
|
|
183
|
+
interface ToolResultConfig {
|
|
184
|
+
/** How to display the result */
|
|
185
|
+
display: 'inline' | 'toast' | 'modal' | 'none';
|
|
186
|
+
/** Custom result renderer */
|
|
187
|
+
renderResult?: (result: unknown) => ReactNode;
|
|
188
|
+
/** Auto-dismiss after ms (for toast) */
|
|
189
|
+
autoDismiss?: number;
|
|
190
|
+
/** Success message template */
|
|
191
|
+
successMessage?: string | ((result: unknown) => string);
|
|
192
|
+
/** Error message template */
|
|
193
|
+
errorMessage?: string | ((error: Error) => string);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Default result display config
|
|
197
|
+
*/
|
|
198
|
+
declare const DEFAULT_RESULT_CONFIG: ToolResultConfig;
|
|
199
|
+
/**
|
|
200
|
+
* Configuration for confirmation dialog before tool execution
|
|
201
|
+
*/
|
|
202
|
+
interface ConfirmConfig {
|
|
203
|
+
/** Dialog title */
|
|
204
|
+
title?: string;
|
|
205
|
+
/** Dialog description */
|
|
206
|
+
description?: string;
|
|
207
|
+
/** Confirm button text */
|
|
208
|
+
confirmText?: string;
|
|
209
|
+
/** Cancel button text */
|
|
210
|
+
cancelText?: string;
|
|
211
|
+
/** Confirm button variant */
|
|
212
|
+
confirmVariant?: 'default' | 'destructive';
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Configuration for binding a component to an MCP resource
|
|
216
|
+
*/
|
|
217
|
+
interface ResourceBinding {
|
|
218
|
+
/** Resource URI */
|
|
219
|
+
uri: string;
|
|
220
|
+
/** Refresh interval in ms */
|
|
221
|
+
refreshInterval?: number;
|
|
222
|
+
/** Subscribe to resource changes */
|
|
223
|
+
subscribe?: boolean;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* States a tool call can be in
|
|
227
|
+
*/
|
|
228
|
+
type ToolState = 'idle' | 'loading' | 'success' | 'error';
|
|
229
|
+
/**
|
|
230
|
+
* Full tool call state with data
|
|
231
|
+
*/
|
|
232
|
+
interface ToolCallState<T = unknown> {
|
|
233
|
+
/** Current state */
|
|
234
|
+
state: ToolState;
|
|
235
|
+
/** Whether currently loading */
|
|
236
|
+
loading: boolean;
|
|
237
|
+
/** Last successful result */
|
|
181
238
|
result: T | null;
|
|
182
|
-
/**
|
|
183
|
-
|
|
184
|
-
/** Whether a result
|
|
239
|
+
/** Last error */
|
|
240
|
+
error: Error | null;
|
|
241
|
+
/** Whether we have a result (success or error) */
|
|
185
242
|
hasResult: boolean;
|
|
186
|
-
/** Extract text content from result */
|
|
187
|
-
textContent: string | null;
|
|
188
243
|
}
|
|
189
244
|
/**
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* @example
|
|
193
|
-
* ```tsx
|
|
194
|
-
* function WeatherCard() {
|
|
195
|
-
* const { result } = useToolResult<{ city: string; temp: number }>();
|
|
196
|
-
*
|
|
197
|
-
* if (!result) return <div>Loading...</div>;
|
|
198
|
-
*
|
|
199
|
-
* return <div>{result.city}: {result.temp}°C</div>;
|
|
200
|
-
* }
|
|
201
|
-
* ```
|
|
245
|
+
* Initial tool call state
|
|
202
246
|
*/
|
|
203
|
-
declare
|
|
247
|
+
declare const INITIAL_TOOL_STATE: ToolCallState;
|
|
248
|
+
/**
|
|
249
|
+
* Options for useTool hook
|
|
250
|
+
*/
|
|
251
|
+
interface UseToolOptions<TArgs = Record<string, unknown>, TResult = unknown> {
|
|
252
|
+
/** Static arguments merged with each call */
|
|
253
|
+
defaultArgs?: Partial<TArgs>;
|
|
254
|
+
/** Transform result before returning */
|
|
255
|
+
transform?: (result: CallToolResult) => TResult;
|
|
256
|
+
/** Retry configuration */
|
|
257
|
+
retry?: number | {
|
|
258
|
+
count: number;
|
|
259
|
+
delay: number;
|
|
260
|
+
};
|
|
261
|
+
/** Callbacks */
|
|
262
|
+
onStart?: () => void;
|
|
263
|
+
onSuccess?: (result: TResult) => void;
|
|
264
|
+
onError?: (error: Error) => void;
|
|
265
|
+
onComplete?: () => void;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Return type for useTool hook
|
|
269
|
+
*/
|
|
270
|
+
interface UseToolReturn<TArgs = Record<string, unknown>, TResult = unknown> {
|
|
271
|
+
/** Call the tool with arguments */
|
|
272
|
+
call: (args?: TArgs) => Promise<TResult>;
|
|
273
|
+
/** Mutate and call (convenience for forms) */
|
|
274
|
+
mutate: (args: TArgs) => Promise<TResult>;
|
|
275
|
+
/** Current state */
|
|
276
|
+
state: ToolState;
|
|
277
|
+
/** Loading indicator */
|
|
278
|
+
loading: boolean;
|
|
279
|
+
/** Last successful result */
|
|
280
|
+
result: TResult | null;
|
|
281
|
+
/** Last error */
|
|
282
|
+
error: Error | null;
|
|
283
|
+
/** Reset to initial state */
|
|
284
|
+
reset: () => void;
|
|
285
|
+
/** Retry last call */
|
|
286
|
+
retry: () => Promise<TResult | null>;
|
|
287
|
+
/** Abort ongoing call */
|
|
288
|
+
abort: () => void;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Options for useResource hook
|
|
292
|
+
*/
|
|
293
|
+
interface UseResourceOptions<T = unknown> {
|
|
294
|
+
/** Auto-refresh interval in ms */
|
|
295
|
+
refreshInterval?: number;
|
|
296
|
+
/** Subscribe to resource changes */
|
|
297
|
+
subscribe?: boolean;
|
|
298
|
+
/** Transform resource data */
|
|
299
|
+
transform?: (data: unknown) => T;
|
|
300
|
+
/** Skip initial fetch */
|
|
301
|
+
skip?: boolean;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Return type for useResource hook
|
|
305
|
+
*/
|
|
306
|
+
interface UseResourceReturn<T = unknown> {
|
|
307
|
+
/** Resource data */
|
|
308
|
+
data: T | null;
|
|
309
|
+
/** Loading state */
|
|
310
|
+
loading: boolean;
|
|
311
|
+
/** Error if any */
|
|
312
|
+
error: Error | null;
|
|
313
|
+
/** Refresh resource */
|
|
314
|
+
refresh: () => Promise<T>;
|
|
315
|
+
/** Last updated timestamp */
|
|
316
|
+
lastUpdated: Date | null;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Options for useToolStream hook
|
|
320
|
+
*/
|
|
321
|
+
interface UseToolStreamOptions<T = unknown> {
|
|
322
|
+
/** Called with each partial update */
|
|
323
|
+
onPartial?: (data: Partial<T>) => void;
|
|
324
|
+
/** Called when streaming completes */
|
|
325
|
+
onComplete?: (data: T) => void;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Return type for useToolStream hook
|
|
329
|
+
*/
|
|
330
|
+
interface UseToolStreamReturn<T = unknown> {
|
|
331
|
+
/** Current partial data */
|
|
332
|
+
partial: Partial<T> | null;
|
|
333
|
+
/** Final complete data */
|
|
334
|
+
complete: T | null;
|
|
335
|
+
/** Whether receiving partial data */
|
|
336
|
+
isStreaming: boolean;
|
|
337
|
+
/** Whether fully complete */
|
|
338
|
+
isComplete: boolean;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Tool provider configuration for scoped defaults
|
|
342
|
+
*/
|
|
343
|
+
interface ToolProviderConfig {
|
|
344
|
+
/** Default result display */
|
|
345
|
+
resultDisplay?: ToolResultConfig;
|
|
346
|
+
/** Default error handler */
|
|
347
|
+
onError?: (error: Error) => void;
|
|
348
|
+
/** Show loading states globally */
|
|
349
|
+
showLoading?: boolean;
|
|
350
|
+
}
|
|
204
351
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
352
|
+
/**
|
|
353
|
+
* ToolContext value
|
|
354
|
+
*/
|
|
355
|
+
interface ToolContextValue {
|
|
356
|
+
/** Default result display configuration */
|
|
357
|
+
resultDisplay: ToolResultConfig;
|
|
358
|
+
/** Default error handler */
|
|
359
|
+
onError?: (error: Error) => void;
|
|
360
|
+
/** Show loading states globally */
|
|
361
|
+
showLoading: boolean;
|
|
210
362
|
}
|
|
211
363
|
/**
|
|
212
|
-
*
|
|
364
|
+
* ToolProvider props
|
|
365
|
+
*/
|
|
366
|
+
interface ToolProviderProps {
|
|
367
|
+
/** Default configuration for all tool components */
|
|
368
|
+
defaults?: ToolProviderConfig;
|
|
369
|
+
/** Children */
|
|
370
|
+
children: ReactNode;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* ToolProvider component
|
|
374
|
+
*/
|
|
375
|
+
declare function ToolProvider({ defaults, children, }: ToolProviderProps): react_jsx_runtime.JSX.Element;
|
|
376
|
+
/**
|
|
377
|
+
* Hook to access tool context
|
|
378
|
+
*/
|
|
379
|
+
declare function useToolContext(): ToolContextValue;
|
|
380
|
+
|
|
381
|
+
declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
|
|
382
|
+
|
|
383
|
+
declare const buttonVariants: (props?: ({
|
|
384
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
385
|
+
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
386
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* State exposed to render props
|
|
390
|
+
*/
|
|
391
|
+
interface ToolButtonState {
|
|
392
|
+
/** Whether tool is currently executing */
|
|
393
|
+
loading: boolean;
|
|
394
|
+
/** Current tool state */
|
|
395
|
+
state: ToolState;
|
|
396
|
+
/** Result from last successful call */
|
|
397
|
+
result: unknown | null;
|
|
398
|
+
/** Error from last failed call */
|
|
399
|
+
error: Error | null;
|
|
400
|
+
/** Whether we have any result */
|
|
401
|
+
hasResult: boolean;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* ToolButton props
|
|
405
|
+
*/
|
|
406
|
+
interface ToolButtonProps extends Omit<React.ComponentProps<'button'>, 'children'>, VariantProps<typeof buttonVariants> {
|
|
407
|
+
/** Tool to call on click - string or full config */
|
|
408
|
+
tool: string | ToolBinding;
|
|
409
|
+
/** Tool arguments */
|
|
410
|
+
args?: Record<string, unknown>;
|
|
411
|
+
/** How to display result: 'inline' | 'toast' | 'modal' | 'none' */
|
|
412
|
+
resultDisplay?: 'inline' | 'toast' | 'modal' | 'none';
|
|
413
|
+
/** Custom result renderer */
|
|
414
|
+
renderResult?: (result: unknown) => React.ReactNode;
|
|
415
|
+
/** Duration to show result (for inline/toast) in ms */
|
|
416
|
+
resultDuration?: number;
|
|
417
|
+
/** Success message for toast */
|
|
418
|
+
successMessage?: string | ((result: unknown) => string);
|
|
419
|
+
/** Error message for toast */
|
|
420
|
+
errorMessage?: string | ((error: Error) => string);
|
|
421
|
+
/** Called when tool starts executing */
|
|
422
|
+
onToolStart?: () => void;
|
|
423
|
+
/** Called on successful result */
|
|
424
|
+
onToolSuccess?: (result: unknown) => void;
|
|
425
|
+
/** Called on error */
|
|
426
|
+
onToolError?: (error: Error) => void;
|
|
427
|
+
/** Called after completion (success or error) */
|
|
428
|
+
onToolComplete?: () => void;
|
|
429
|
+
/** Text to show while loading */
|
|
430
|
+
loadingText?: string;
|
|
431
|
+
/** Custom loading icon */
|
|
432
|
+
loadingIcon?: React.ReactNode;
|
|
433
|
+
/** Disable button while loading (default: true) */
|
|
434
|
+
disableWhileLoading?: boolean;
|
|
435
|
+
/** Require confirmation before calling */
|
|
436
|
+
confirm?: boolean | ConfirmConfig;
|
|
437
|
+
/** Button content - can be ReactNode or render function */
|
|
438
|
+
children?: React.ReactNode | ((state: ToolButtonState) => React.ReactNode);
|
|
439
|
+
/** Use Radix Slot for composition */
|
|
440
|
+
asChild?: boolean;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* ToolButton component
|
|
444
|
+
*/
|
|
445
|
+
declare function ToolButton({ tool, args, resultDisplay, renderResult, resultDuration, successMessage, errorMessage, onToolStart, onToolSuccess, onToolError, onToolComplete, loadingText, loadingIcon, disableWhileLoading, confirm, children, className, variant, size, disabled, asChild, ...props }: ToolButtonProps): react_jsx_runtime.JSX.Element;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Option type for ToolSelect
|
|
449
|
+
*/
|
|
450
|
+
interface ToolSelectOption {
|
|
451
|
+
value: string;
|
|
452
|
+
label: string;
|
|
453
|
+
disabled?: boolean;
|
|
454
|
+
icon?: React.ReactNode;
|
|
455
|
+
description?: string;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* ToolSelect props
|
|
459
|
+
*/
|
|
460
|
+
interface ToolSelectProps {
|
|
461
|
+
/** Tool to call when option selected */
|
|
462
|
+
onSelectTool?: string | ToolBinding;
|
|
463
|
+
/** Field name to pass selection value as */
|
|
464
|
+
argName?: string;
|
|
465
|
+
/** Additional args to pass with selection */
|
|
466
|
+
additionalArgs?: Record<string, unknown>;
|
|
467
|
+
/** Tool to fetch options from */
|
|
468
|
+
optionsTool?: string | ToolBinding;
|
|
469
|
+
/** Args for options tool */
|
|
470
|
+
optionsArgs?: Record<string, unknown>;
|
|
471
|
+
/** Transform tool result to options */
|
|
472
|
+
transformOptions?: (result: unknown) => ToolSelectOption[];
|
|
473
|
+
/** Static options (combined with tool options) */
|
|
474
|
+
options?: ToolSelectOption[];
|
|
475
|
+
/** Placeholder text */
|
|
476
|
+
placeholder?: string;
|
|
477
|
+
/** Placeholder while loading options */
|
|
478
|
+
loadingPlaceholder?: string;
|
|
479
|
+
/** Empty state message */
|
|
480
|
+
emptyMessage?: string;
|
|
481
|
+
/** Controlled value */
|
|
482
|
+
value?: string;
|
|
483
|
+
/** Default value */
|
|
484
|
+
defaultValue?: string;
|
|
485
|
+
/** Called when value changes */
|
|
486
|
+
onValueChange?: (value: string) => void;
|
|
487
|
+
/** Called when options are loaded */
|
|
488
|
+
onOptionsLoaded?: (options: ToolSelectOption[]) => void;
|
|
489
|
+
/** Called when selection tool succeeds */
|
|
490
|
+
onSelectionSuccess?: (result: unknown) => void;
|
|
491
|
+
/** Called when selection tool fails */
|
|
492
|
+
onSelectionError?: (error: Error) => void;
|
|
493
|
+
/** Show toast on selection success */
|
|
494
|
+
showSuccessToast?: boolean;
|
|
495
|
+
/** Success message */
|
|
496
|
+
successMessage?: string | ((result: unknown) => string);
|
|
497
|
+
className?: string;
|
|
498
|
+
disabled?: boolean;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* ToolSelect component
|
|
502
|
+
*/
|
|
503
|
+
declare function ToolSelect({ onSelectTool, argName, additionalArgs, optionsTool, optionsArgs, transformOptions, options: staticOptions, placeholder, loadingPlaceholder, emptyMessage, value: controlledValue, defaultValue, onValueChange, onOptionsLoaded, onSelectionSuccess, onSelectionError, showSuccessToast, successMessage, className, disabled, }: ToolSelectProps): react_jsx_runtime.JSX.Element;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Suggestion type for autocomplete
|
|
507
|
+
*/
|
|
508
|
+
interface ToolInputSuggestion {
|
|
509
|
+
value: string;
|
|
510
|
+
label: string;
|
|
511
|
+
icon?: React.ReactNode;
|
|
512
|
+
description?: string;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* ToolInput props
|
|
516
|
+
*/
|
|
517
|
+
interface ToolInputProps extends Omit<React.ComponentProps<'input'>, 'onChange'> {
|
|
518
|
+
/** Tool to call on input change (debounced) */
|
|
519
|
+
searchTool?: string | ToolBinding;
|
|
520
|
+
/** Debounce delay in ms */
|
|
521
|
+
debounce?: number;
|
|
522
|
+
/** Minimum characters before calling tool */
|
|
523
|
+
minChars?: number;
|
|
524
|
+
/** Field name for the input value */
|
|
525
|
+
argName?: string;
|
|
526
|
+
/** Additional args to pass with search */
|
|
527
|
+
additionalArgs?: Record<string, unknown>;
|
|
528
|
+
/** Enable autocomplete dropdown */
|
|
529
|
+
autocomplete?: boolean;
|
|
530
|
+
/** Transform search results to suggestions */
|
|
531
|
+
transformSuggestions?: (result: unknown) => ToolInputSuggestion[];
|
|
532
|
+
/** Called when suggestion is selected */
|
|
533
|
+
onSuggestionSelect?: (suggestion: ToolInputSuggestion) => void;
|
|
534
|
+
/** Empty state message */
|
|
535
|
+
emptyMessage?: string;
|
|
536
|
+
value?: string;
|
|
537
|
+
onChange?: (value: string) => void;
|
|
538
|
+
/** Called with search results */
|
|
539
|
+
onSearchResults?: (results: unknown) => void;
|
|
540
|
+
/** Called on search error */
|
|
541
|
+
onSearchError?: (error: Error) => void;
|
|
542
|
+
/** Show search icon */
|
|
543
|
+
showSearchIcon?: boolean;
|
|
544
|
+
/** Show clear button */
|
|
545
|
+
showClearButton?: boolean;
|
|
546
|
+
/** Show loading indicator */
|
|
547
|
+
showLoadingIndicator?: boolean;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* ToolInput component
|
|
551
|
+
*/
|
|
552
|
+
declare function ToolInput({ searchTool, debounce, minChars, argName, additionalArgs, autocomplete, transformSuggestions, onSuggestionSelect, emptyMessage, value: controlledValue, onChange, onSearchResults, onSearchError, showSearchIcon, showClearButton, showLoadingIndicator, className, placeholder, disabled, ...props }: ToolInputProps): react_jsx_runtime.JSX.Element;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Form field definition
|
|
556
|
+
*/
|
|
557
|
+
interface ToolFormField {
|
|
558
|
+
/** Field name (matches tool input schema) */
|
|
559
|
+
name: string;
|
|
560
|
+
/** Display label */
|
|
561
|
+
label: string;
|
|
562
|
+
/** Input type */
|
|
563
|
+
type?: 'text' | 'number' | 'email' | 'password' | 'textarea' | 'select' | 'checkbox' | 'switch' | 'slider';
|
|
564
|
+
/** Placeholder text */
|
|
565
|
+
placeholder?: string;
|
|
566
|
+
/** Default value */
|
|
567
|
+
defaultValue?: string | number | boolean;
|
|
568
|
+
/** Required field */
|
|
569
|
+
required?: boolean;
|
|
570
|
+
/** Helper text */
|
|
571
|
+
description?: string;
|
|
572
|
+
/** Options for select type */
|
|
573
|
+
options?: Array<{
|
|
574
|
+
value: string;
|
|
575
|
+
label: string;
|
|
576
|
+
}>;
|
|
577
|
+
/** Min value for number/slider */
|
|
578
|
+
min?: number;
|
|
579
|
+
/** Max value for number/slider */
|
|
580
|
+
max?: number;
|
|
581
|
+
/** Step for number/slider */
|
|
582
|
+
step?: number;
|
|
583
|
+
/** Disable field */
|
|
584
|
+
disabled?: boolean;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* ToolForm props
|
|
588
|
+
*/
|
|
589
|
+
interface ToolFormProps {
|
|
590
|
+
/** Tool name to call on submit */
|
|
591
|
+
toolName: string;
|
|
592
|
+
/** Form fields (optional if autoSchema) */
|
|
593
|
+
fields?: ToolFormField[];
|
|
594
|
+
/** Auto-generate form from tool schema */
|
|
595
|
+
autoSchema?: boolean;
|
|
596
|
+
/** Submit button text */
|
|
597
|
+
submitText?: string;
|
|
598
|
+
/** Loading text */
|
|
599
|
+
loadingText?: string;
|
|
600
|
+
/** Callback when tool call succeeds */
|
|
601
|
+
onSuccess?: (result: unknown) => void;
|
|
602
|
+
/** Callback when tool call fails */
|
|
603
|
+
onError?: (error: Error) => void;
|
|
604
|
+
/** Show result after success */
|
|
605
|
+
showResult?: boolean;
|
|
606
|
+
/** Show toast on success */
|
|
607
|
+
showSuccessToast?: boolean;
|
|
608
|
+
/** Success message */
|
|
609
|
+
successMessage?: string | ((result: unknown) => string);
|
|
610
|
+
/** Reset form on success */
|
|
611
|
+
resetOnSuccess?: boolean;
|
|
612
|
+
/** Additional class name */
|
|
613
|
+
className?: string;
|
|
614
|
+
/** Layout - vertical or horizontal */
|
|
615
|
+
layout?: 'vertical' | 'horizontal';
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* ToolForm component
|
|
619
|
+
*/
|
|
620
|
+
declare function ToolForm({ toolName, fields: manualFields, autoSchema, submitText, loadingText, onSuccess, onError, showResult, showSuccessToast, successMessage, resetOnSuccess, className, layout, }: ToolFormProps): react_jsx_runtime.JSX.Element;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Resource metadata passed to children
|
|
624
|
+
*/
|
|
625
|
+
interface ResourceMeta {
|
|
626
|
+
/** Resource URI */
|
|
627
|
+
uri: string;
|
|
628
|
+
/** Refresh the resource */
|
|
629
|
+
refresh: () => Promise<unknown>;
|
|
630
|
+
/** Last updated timestamp */
|
|
631
|
+
lastUpdated: Date | null;
|
|
632
|
+
/** Whether currently refreshing */
|
|
633
|
+
isRefreshing: boolean;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* ResourceView props
|
|
637
|
+
*/
|
|
638
|
+
interface ResourceViewProps<T = unknown> {
|
|
639
|
+
/** Resource URI */
|
|
640
|
+
uri: string;
|
|
641
|
+
/** Refresh interval in ms */
|
|
642
|
+
refreshInterval?: number;
|
|
643
|
+
/** Subscribe to updates (when supported) */
|
|
644
|
+
subscribe?: boolean;
|
|
645
|
+
/** Transform resource data */
|
|
646
|
+
transform?: (data: unknown) => T;
|
|
647
|
+
/** Loading placeholder */
|
|
648
|
+
loading?: React.ReactNode;
|
|
649
|
+
/** Error display */
|
|
650
|
+
error?: React.ReactNode | ((error: Error, retry: () => void) => React.ReactNode);
|
|
651
|
+
/** Render function for resource data */
|
|
652
|
+
children: (data: T, meta: ResourceMeta) => React.ReactNode;
|
|
653
|
+
/** Additional className */
|
|
654
|
+
className?: string;
|
|
655
|
+
/** Skip initial fetch */
|
|
656
|
+
skip?: boolean;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* ResourceView component
|
|
660
|
+
*/
|
|
661
|
+
declare function ResourceView<T = unknown>({ uri, refreshInterval, subscribe, transform, loading: loadingContent, error: errorContent, children, className, skip, }: ResourceViewProps<T>): react_jsx_runtime.JSX.Element;
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* StreamingContent props
|
|
665
|
+
*/
|
|
666
|
+
interface StreamingContentProps<T = unknown> {
|
|
667
|
+
/** Fallback while no data available */
|
|
668
|
+
fallback?: React.ReactNode;
|
|
669
|
+
/** Show streaming progress indicator */
|
|
670
|
+
showProgress?: boolean;
|
|
671
|
+
/** Progress value (0-100) if known */
|
|
672
|
+
progress?: number;
|
|
673
|
+
/** Called with partial data updates */
|
|
674
|
+
onPartial?: (data: Partial<T>) => void;
|
|
675
|
+
/** Called when data is complete */
|
|
676
|
+
onComplete?: (data: T) => void;
|
|
677
|
+
/** Render function for data */
|
|
678
|
+
children: (data: T | Partial<T>, isComplete: boolean) => React.ReactNode;
|
|
679
|
+
/** Additional className */
|
|
680
|
+
className?: string;
|
|
681
|
+
/** Style to apply while streaming (e.g., opacity) */
|
|
682
|
+
streamingStyle?: 'opacity' | 'blur' | 'none';
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* StreamingContent component
|
|
686
|
+
*/
|
|
687
|
+
declare function StreamingContent<T = unknown>({ fallback, showProgress, progress: externalProgress, onPartial, onComplete, children, className, streamingStyle, }: StreamingContentProps<T>): react_jsx_runtime.JSX.Element;
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* Column definition for ToolDataGrid
|
|
691
|
+
*/
|
|
692
|
+
interface ToolDataGridColumn<T = Record<string, unknown>> {
|
|
693
|
+
/** Unique key for this column (dot notation supported) */
|
|
694
|
+
key: string;
|
|
695
|
+
/** Column header */
|
|
696
|
+
header: string;
|
|
697
|
+
/** Enable sorting for this column */
|
|
698
|
+
sortable?: boolean;
|
|
699
|
+
/** Custom cell renderer */
|
|
700
|
+
render?: (value: unknown, row: T, index: number) => React.ReactNode;
|
|
701
|
+
/** Column width (CSS value) */
|
|
702
|
+
width?: string;
|
|
703
|
+
/** Align content */
|
|
704
|
+
align?: 'left' | 'center' | 'right';
|
|
705
|
+
/** Hide column on small screens */
|
|
706
|
+
hideMobile?: boolean;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Row action definition
|
|
710
|
+
*/
|
|
711
|
+
interface ToolDataGridRowAction<T = Record<string, unknown>> {
|
|
712
|
+
/** Action button label */
|
|
713
|
+
label: string;
|
|
714
|
+
/** Icon to show */
|
|
715
|
+
icon?: React.ReactNode;
|
|
716
|
+
/** Tool to call */
|
|
717
|
+
tool: string | ToolBinding;
|
|
718
|
+
/** Get args from row data */
|
|
719
|
+
getArgs?: (row: T) => Record<string, unknown>;
|
|
720
|
+
/** Button variant */
|
|
721
|
+
variant?: 'default' | 'outline' | 'ghost' | 'destructive';
|
|
722
|
+
/** Require confirmation */
|
|
723
|
+
confirm?: boolean | ConfirmConfig;
|
|
724
|
+
/** Hide for certain rows */
|
|
725
|
+
hidden?: (row: T) => boolean;
|
|
726
|
+
/** Called on success */
|
|
727
|
+
onSuccess?: (result: unknown, row: T) => void;
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Sort state
|
|
731
|
+
*/
|
|
732
|
+
interface SortState {
|
|
733
|
+
column: string | null;
|
|
734
|
+
direction: 'asc' | 'desc';
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* Data result from transform function
|
|
738
|
+
*/
|
|
739
|
+
interface ToolDataGridData<T = Record<string, unknown>> {
|
|
740
|
+
rows: T[];
|
|
741
|
+
total: number;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* ToolDataGrid props
|
|
745
|
+
*/
|
|
746
|
+
interface ToolDataGridProps<T = Record<string, unknown>> {
|
|
747
|
+
/** Tool to fetch data from */
|
|
748
|
+
dataTool: string | ToolBinding;
|
|
749
|
+
/** Column definitions */
|
|
750
|
+
columns: ToolDataGridColumn<T>[];
|
|
751
|
+
/** Transform tool result to grid data */
|
|
752
|
+
transformData?: (result: unknown) => ToolDataGridData<T>;
|
|
753
|
+
/** Actions to show for each row */
|
|
754
|
+
rowActions?: ToolDataGridRowAction<T>[];
|
|
755
|
+
/** Enable pagination */
|
|
756
|
+
pagination?: boolean;
|
|
757
|
+
/** Page sizes to offer */
|
|
758
|
+
pageSizes?: number[];
|
|
759
|
+
/** Default page size */
|
|
760
|
+
defaultPageSize?: number;
|
|
761
|
+
/** Default sort */
|
|
762
|
+
defaultSort?: SortState;
|
|
763
|
+
/** Auto-refresh interval in ms */
|
|
764
|
+
refreshInterval?: number;
|
|
765
|
+
/** Show refresh button */
|
|
766
|
+
showRefresh?: boolean;
|
|
767
|
+
/** Called when data is loaded */
|
|
768
|
+
onDataLoaded?: (data: ToolDataGridData<T>) => void;
|
|
769
|
+
/** Called on error */
|
|
770
|
+
onError?: (error: Error) => void;
|
|
771
|
+
/** Called when row is clicked */
|
|
772
|
+
onRowClick?: (row: T, index: number) => void;
|
|
773
|
+
/** Key extractor for rows */
|
|
774
|
+
getRowKey?: (row: T, index: number) => string;
|
|
775
|
+
/** Empty state content */
|
|
776
|
+
emptyContent?: React.ReactNode;
|
|
777
|
+
/** Loading content */
|
|
778
|
+
loadingContent?: React.ReactNode;
|
|
779
|
+
className?: string;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* ToolDataGrid component
|
|
783
|
+
*/
|
|
784
|
+
declare function ToolDataGrid<T = Record<string, unknown>>({ dataTool, columns, transformData, rowActions, pagination, pageSizes, defaultPageSize, defaultSort, refreshInterval, showRefresh, onDataLoaded, onError, onRowClick, getRowKey, emptyContent, loadingContent, className, }: ToolDataGridProps<T>): react_jsx_runtime.JSX.Element;
|
|
785
|
+
|
|
786
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
787
|
+
/** Button variant */
|
|
788
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'destructive' | 'outline';
|
|
789
|
+
/** Button size */
|
|
790
|
+
size?: 'sm' | 'md' | 'lg' | 'icon';
|
|
791
|
+
/** Loading state */
|
|
792
|
+
loading?: boolean;
|
|
793
|
+
/** Render as child component (Radix Slot) */
|
|
794
|
+
asChild?: boolean;
|
|
795
|
+
/** Left icon */
|
|
796
|
+
leftIcon?: ReactNode;
|
|
797
|
+
/** Right icon */
|
|
798
|
+
rightIcon?: ReactNode;
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Button component with multiple variants and loading state
|
|
213
802
|
*
|
|
214
803
|
* @example
|
|
215
804
|
* ```tsx
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* if (!input) return <div>Loading...</div>;
|
|
805
|
+
* <Button variant="primary" onClick={handleClick}>
|
|
806
|
+
* Click Me
|
|
807
|
+
* </Button>
|
|
220
808
|
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
809
|
+
* <Button variant="ghost" loading>
|
|
810
|
+
* Loading...
|
|
811
|
+
* </Button>
|
|
223
812
|
* ```
|
|
224
813
|
*/
|
|
225
|
-
declare
|
|
814
|
+
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
226
815
|
|
|
227
|
-
interface
|
|
228
|
-
/**
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
|
|
816
|
+
interface ActionButtonProps extends Omit<ButtonProps, 'onClick' | 'loading' | 'onError'> {
|
|
817
|
+
/** Tool name to call */
|
|
818
|
+
toolName: string;
|
|
819
|
+
/** Arguments to pass to the tool */
|
|
820
|
+
toolArgs?: Record<string, unknown>;
|
|
821
|
+
/** Callback when tool call succeeds */
|
|
822
|
+
onToolSuccess?: (result: unknown) => void;
|
|
823
|
+
/** Callback when tool call fails */
|
|
824
|
+
onToolError?: (error: Error) => void;
|
|
825
|
+
/** Show result inline after success */
|
|
826
|
+
showResult?: boolean;
|
|
827
|
+
/** Custom result renderer */
|
|
828
|
+
renderResult?: (result: unknown) => ReactNode;
|
|
232
829
|
}
|
|
233
830
|
/**
|
|
234
|
-
*
|
|
831
|
+
* ActionButton - Button that calls an MCP tool with loading state
|
|
235
832
|
*
|
|
236
833
|
* @example
|
|
237
834
|
* ```tsx
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* }
|
|
835
|
+
* <ActionButton
|
|
836
|
+
* toolName="get-weather"
|
|
837
|
+
* toolArgs={{ city: 'London' }}
|
|
838
|
+
* onToolSuccess={(data) => console.log(data)}
|
|
839
|
+
* >
|
|
840
|
+
* Get Weather
|
|
841
|
+
* </ActionButton>
|
|
246
842
|
* ```
|
|
247
843
|
*/
|
|
248
|
-
declare function
|
|
844
|
+
declare function ActionButton({ toolName, toolArgs, onToolSuccess, onToolError, showResult, renderResult, children, ...buttonProps }: ActionButtonProps): react_jsx_runtime.JSX.Element;
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* RequireConnection props
|
|
848
|
+
*/
|
|
849
|
+
interface RequireConnectionProps {
|
|
850
|
+
/** Loading fallback */
|
|
851
|
+
loading?: React.ReactNode;
|
|
852
|
+
/** Error fallback */
|
|
853
|
+
error?: React.ReactNode | ((error: Error) => React.ReactNode);
|
|
854
|
+
/** Disconnected fallback (different from error) */
|
|
855
|
+
disconnected?: React.ReactNode;
|
|
856
|
+
/** Content to render when connected */
|
|
857
|
+
children: React.ReactNode;
|
|
858
|
+
/** Additional className for wrapper */
|
|
859
|
+
className?: string;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* RequireConnection component
|
|
863
|
+
*/
|
|
864
|
+
declare function RequireConnection({ loading: loadingContent, error: errorContent, disconnected: disconnectedContent, children, className, }: RequireConnectionProps): react_jsx_runtime.JSX.Element;
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* ToolErrorBoundary props
|
|
868
|
+
*/
|
|
869
|
+
interface ToolErrorBoundaryProps {
|
|
870
|
+
/** Fallback UI on error */
|
|
871
|
+
fallback?: ReactNode | ((error: Error, retry: () => void) => ReactNode);
|
|
872
|
+
/** Called on error */
|
|
873
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
874
|
+
/** Reset error on these props changing */
|
|
875
|
+
resetKeys?: unknown[];
|
|
876
|
+
/** Children to render */
|
|
877
|
+
children: ReactNode;
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* ToolErrorBoundary state
|
|
881
|
+
*/
|
|
882
|
+
interface State {
|
|
883
|
+
hasError: boolean;
|
|
884
|
+
error: Error | null;
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* ToolErrorBoundary component
|
|
888
|
+
*/
|
|
889
|
+
declare class ToolErrorBoundary extends Component<ToolErrorBoundaryProps, State> {
|
|
890
|
+
constructor(props: ToolErrorBoundaryProps);
|
|
891
|
+
static getDerivedStateFromError(error: Error): State;
|
|
892
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
893
|
+
componentDidUpdate(prevProps: ToolErrorBoundaryProps): void;
|
|
894
|
+
reset: () => void;
|
|
895
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* useTool hook for calling MCP tools with full state management
|
|
900
|
+
*/
|
|
901
|
+
declare function useTool<TArgs extends Record<string, unknown> = Record<string, unknown>, TResult = unknown>(toolName: string, options?: UseToolOptions<TArgs, TResult>): UseToolReturn<TArgs, TResult>;
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Hook for receiving streaming/partial tool input from the host
|
|
905
|
+
*/
|
|
906
|
+
declare function useToolStream<T = unknown>(options?: UseToolStreamOptions<T>): UseToolStreamReturn<T>;
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* Hook for reading and managing MCP server resources
|
|
910
|
+
*/
|
|
911
|
+
declare function useResource<T = unknown>(uri: string, options?: UseResourceOptions<T>): UseResourceReturn<T>;
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Result returned by useMessage hook
|
|
915
|
+
*/
|
|
916
|
+
interface UseMessageReturn {
|
|
917
|
+
/** Send a text message to the host chat */
|
|
918
|
+
send: (text: string) => Promise<void>;
|
|
919
|
+
/** Send structured content blocks */
|
|
920
|
+
sendContent: (content: ContentBlock[]) => Promise<void>;
|
|
921
|
+
/** Request the agent to call a specific tool */
|
|
922
|
+
requestTool: (toolName: string, args?: Record<string, unknown>) => Promise<void>;
|
|
923
|
+
/** Whether currently sending a message */
|
|
924
|
+
sending: boolean;
|
|
925
|
+
/** Last error if any */
|
|
926
|
+
error: Error | null;
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* Hook for sending messages to the MCP host chat
|
|
930
|
+
*/
|
|
931
|
+
declare function useMessage(): UseMessageReturn;
|
|
249
932
|
|
|
250
933
|
interface UseHostContextReturn {
|
|
251
934
|
/** Current theme: 'light' or 'dark' */
|
|
252
935
|
theme: 'light' | 'dark';
|
|
253
936
|
/** Display mode: 'inline', 'fullscreen', 'pip' */
|
|
254
937
|
displayMode: 'inline' | 'fullscreen' | 'pip';
|
|
938
|
+
/** Available display modes supported by the host */
|
|
939
|
+
availableDisplayModes: string[];
|
|
255
940
|
/** Viewport dimensions */
|
|
256
941
|
viewport: {
|
|
257
942
|
width: number;
|
|
258
943
|
height: number;
|
|
944
|
+
maxWidth?: number;
|
|
945
|
+
maxHeight?: number;
|
|
259
946
|
} | null;
|
|
260
947
|
/** User locale (e.g., 'en-US') */
|
|
261
948
|
locale: string | null;
|
|
@@ -263,195 +950,318 @@ interface UseHostContextReturn {
|
|
|
263
950
|
timeZone: string | null;
|
|
264
951
|
/** Platform type */
|
|
265
952
|
platform: 'web' | 'desktop' | 'mobile' | null;
|
|
953
|
+
/** Host application identifier */
|
|
954
|
+
userAgent: string | null;
|
|
955
|
+
/** Device input capabilities */
|
|
956
|
+
deviceCapabilities: {
|
|
957
|
+
touch?: boolean;
|
|
958
|
+
hover?: boolean;
|
|
959
|
+
} | null;
|
|
960
|
+
/** Mobile safe area insets */
|
|
961
|
+
safeAreaInsets: {
|
|
962
|
+
top: number;
|
|
963
|
+
right: number;
|
|
964
|
+
bottom: number;
|
|
965
|
+
left: number;
|
|
966
|
+
} | null;
|
|
967
|
+
/** Host-provided style configuration */
|
|
968
|
+
styles: McpUiHostStyles | null;
|
|
266
969
|
/** Full raw context */
|
|
267
970
|
rawContext: McpUiHostContext;
|
|
268
971
|
}
|
|
269
972
|
/**
|
|
270
|
-
* Hook to access host context
|
|
973
|
+
* Hook to access host context
|
|
974
|
+
*
|
|
975
|
+
* FIX #8: Now exposes all fields from McpUiHostContext including:
|
|
976
|
+
* - styles (CSS variables and fonts)
|
|
977
|
+
* - availableDisplayModes
|
|
978
|
+
* - userAgent
|
|
979
|
+
* - deviceCapabilities
|
|
980
|
+
* - safeAreaInsets
|
|
981
|
+
*
|
|
982
|
+
* @example
|
|
983
|
+
* ```tsx
|
|
984
|
+
* function ThemedCard() {
|
|
985
|
+
* const { theme, locale, deviceCapabilities, styles } = useHostContext();
|
|
986
|
+
*
|
|
987
|
+
* return (
|
|
988
|
+
* <div className={theme === 'dark' ? 'dark-mode' : 'light-mode'}>
|
|
989
|
+
* <p>Locale: {locale}</p>
|
|
990
|
+
* <p>Touch: {deviceCapabilities?.touch ? 'Yes' : 'No'}</p>
|
|
991
|
+
* </div>
|
|
992
|
+
* );
|
|
993
|
+
* }
|
|
994
|
+
* ```
|
|
995
|
+
*/
|
|
996
|
+
declare function useHostContext(): UseHostContextReturn;
|
|
997
|
+
|
|
998
|
+
interface UseToolResultReturn<T = unknown> {
|
|
999
|
+
/** The tool result, typed as T */
|
|
1000
|
+
result: T | null;
|
|
1001
|
+
/** Raw CallToolResult from MCP */
|
|
1002
|
+
rawResult: CallToolResult | null;
|
|
1003
|
+
/** Whether a result has been received */
|
|
1004
|
+
hasResult: boolean;
|
|
1005
|
+
/** Extract text content from result */
|
|
1006
|
+
textContent: string | null;
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* Hook to access tool result from host
|
|
1010
|
+
*
|
|
1011
|
+
* @example
|
|
1012
|
+
* ```tsx
|
|
1013
|
+
* function WeatherCard() {
|
|
1014
|
+
* const { result } = useToolResult<{ city: string; temp: number }>();
|
|
1015
|
+
*
|
|
1016
|
+
* if (!result) return <div>Loading...</div>;
|
|
1017
|
+
*
|
|
1018
|
+
* return <div>{result.city}: {result.temp}°C</div>;
|
|
1019
|
+
* }
|
|
1020
|
+
* ```
|
|
1021
|
+
*/
|
|
1022
|
+
declare function useToolResult<T = unknown>(): UseToolResultReturn<T>;
|
|
1023
|
+
|
|
1024
|
+
interface UseToolInputReturn<T = Record<string, unknown>> {
|
|
1025
|
+
/** The tool input arguments, typed as T */
|
|
1026
|
+
input: T | null;
|
|
1027
|
+
/** Whether input has been received */
|
|
1028
|
+
hasInput: boolean;
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Hook to access tool input arguments from host
|
|
271
1032
|
*
|
|
272
1033
|
* @example
|
|
273
1034
|
* ```tsx
|
|
274
|
-
* function
|
|
275
|
-
* const {
|
|
1035
|
+
* function WeatherCard() {
|
|
1036
|
+
* const { input } = useToolInput<{ city: string }>();
|
|
276
1037
|
*
|
|
277
|
-
* return
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
* </div>
|
|
281
|
-
* );
|
|
1038
|
+
* if (!input) return <div>Loading...</div>;
|
|
1039
|
+
*
|
|
1040
|
+
* return <div>Weather for: {input.city}</div>;
|
|
282
1041
|
* }
|
|
283
1042
|
* ```
|
|
284
1043
|
*/
|
|
285
|
-
declare function
|
|
1044
|
+
declare function useToolInput<T = Record<string, unknown>>(): UseToolInputReturn<T>;
|
|
286
1045
|
|
|
287
|
-
interface
|
|
288
|
-
/**
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
|
|
292
|
-
/** Loading state */
|
|
293
|
-
loading?: boolean;
|
|
294
|
-
/** Render as child component (Radix Slot) */
|
|
295
|
-
asChild?: boolean;
|
|
296
|
-
/** Left icon */
|
|
297
|
-
leftIcon?: ReactNode;
|
|
298
|
-
/** Right icon */
|
|
299
|
-
rightIcon?: ReactNode;
|
|
1046
|
+
interface UseToolInputPartialReturn {
|
|
1047
|
+
/** Partial arguments currently available */
|
|
1048
|
+
partialArgs: Record<string, unknown> | null;
|
|
1049
|
+
/** Whether partial args are being received */
|
|
1050
|
+
isStreaming: boolean;
|
|
300
1051
|
}
|
|
301
1052
|
/**
|
|
302
|
-
*
|
|
1053
|
+
* Hook to access streaming partial tool input
|
|
303
1054
|
*
|
|
304
1055
|
* @example
|
|
305
1056
|
* ```tsx
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
* </Button>
|
|
1057
|
+
* function MyComponent() {
|
|
1058
|
+
* const { partialArgs, isStreaming } = useToolInputPartial();
|
|
309
1059
|
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
1060
|
+
* if (isStreaming) {
|
|
1061
|
+
* return <div>Receiving: {JSON.stringify(partialArgs)}</div>;
|
|
1062
|
+
* }
|
|
1063
|
+
* return <div>Ready for input</div>;
|
|
1064
|
+
* }
|
|
313
1065
|
* ```
|
|
314
1066
|
*/
|
|
315
|
-
declare
|
|
1067
|
+
declare function useToolInputPartial(): UseToolInputPartialReturn;
|
|
316
1068
|
|
|
317
|
-
interface
|
|
318
|
-
/**
|
|
319
|
-
|
|
1069
|
+
interface UseToolSubscriptionOptions {
|
|
1070
|
+
/** Polling interval in milliseconds */
|
|
1071
|
+
interval?: number;
|
|
1072
|
+
/** Whether to start polling immediately */
|
|
1073
|
+
enabled?: boolean;
|
|
320
1074
|
/** Arguments to pass to the tool */
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
|
|
1075
|
+
args?: Record<string, unknown>;
|
|
1076
|
+
}
|
|
1077
|
+
interface UseToolSubscriptionResult<T = unknown> {
|
|
1078
|
+
/** Tool call result data */
|
|
1079
|
+
result: T | null;
|
|
1080
|
+
/** Loading state */
|
|
1081
|
+
loading: boolean;
|
|
1082
|
+
/** Error if any */
|
|
1083
|
+
error: Error | null;
|
|
1084
|
+
/** Start polling */
|
|
1085
|
+
start: () => void;
|
|
1086
|
+
/** Stop polling */
|
|
1087
|
+
stop: () => void;
|
|
1088
|
+
/** Whether polling is active */
|
|
1089
|
+
isPolling: boolean;
|
|
1090
|
+
/** Manually refresh (call tool immediately) */
|
|
1091
|
+
refresh: () => Promise<T>;
|
|
330
1092
|
}
|
|
331
1093
|
/**
|
|
332
|
-
*
|
|
1094
|
+
* Hook for subscribing to tool updates with automatic polling
|
|
333
1095
|
*
|
|
334
1096
|
* @example
|
|
335
1097
|
* ```tsx
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
*
|
|
1098
|
+
* function StockTicker() {
|
|
1099
|
+
* const { result, isPolling, start, stop } = useToolSubscription<StockData>(
|
|
1100
|
+
* 'get-stock-price',
|
|
1101
|
+
* { interval: 5000, args: { symbol: 'AAPL' } }
|
|
1102
|
+
* );
|
|
1103
|
+
*
|
|
1104
|
+
* return (
|
|
1105
|
+
* <div>
|
|
1106
|
+
* <div>Price: ${result?.price}</div>
|
|
1107
|
+
* <button onClick={isPolling ? stop : start}>
|
|
1108
|
+
* {isPolling ? 'Stop' : 'Start'} Updates
|
|
1109
|
+
* </button>
|
|
1110
|
+
* </div>
|
|
1111
|
+
* );
|
|
1112
|
+
* }
|
|
343
1113
|
* ```
|
|
344
1114
|
*/
|
|
345
|
-
declare function
|
|
1115
|
+
declare function useToolSubscription<T = unknown>(toolName: string, options?: UseToolSubscriptionOptions): UseToolSubscriptionResult<T>;
|
|
346
1116
|
|
|
347
|
-
|
|
348
|
-
|
|
1117
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1118
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1119
|
+
|
|
1120
|
+
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1121
|
+
|
|
1122
|
+
declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): react_jsx_runtime.JSX.Element;
|
|
1123
|
+
|
|
1124
|
+
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1125
|
+
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
1126
|
+
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): react_jsx_runtime.JSX.Element;
|
|
1127
|
+
declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
1128
|
+
size?: "sm" | "default";
|
|
1129
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1130
|
+
declare function SelectContent({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1131
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): react_jsx_runtime.JSX.Element;
|
|
1132
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
1133
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
1134
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): react_jsx_runtime.JSX.Element;
|
|
1135
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): react_jsx_runtime.JSX.Element;
|
|
1136
|
+
|
|
1137
|
+
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1138
|
+
|
|
1139
|
+
declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1140
|
+
|
|
1141
|
+
declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1142
|
+
|
|
1143
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
1144
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
|
|
1145
|
+
declare const useFormField: () => {
|
|
1146
|
+
invalid: boolean;
|
|
1147
|
+
isDirty: boolean;
|
|
1148
|
+
isTouched: boolean;
|
|
1149
|
+
isValidating: boolean;
|
|
1150
|
+
error?: react_hook_form.FieldError;
|
|
1151
|
+
id: string;
|
|
349
1152
|
name: string;
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
1153
|
+
formItemId: string;
|
|
1154
|
+
formDescriptionId: string;
|
|
1155
|
+
formMessageId: string;
|
|
1156
|
+
};
|
|
1157
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1158
|
+
declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1159
|
+
declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): react_jsx_runtime.JSX.Element;
|
|
1160
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
|
|
1161
|
+
declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element | null;
|
|
1162
|
+
|
|
1163
|
+
declare const alertVariants: (props?: ({
|
|
1164
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
1165
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1166
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): react_jsx_runtime.JSX.Element;
|
|
1167
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1168
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1169
|
+
|
|
1170
|
+
declare const badgeVariants: (props?: ({
|
|
1171
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
1172
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1173
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
1174
|
+
asChild?: boolean;
|
|
1175
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1176
|
+
|
|
1177
|
+
declare function Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1178
|
+
|
|
1179
|
+
declare function Skeleton({ className, ...props }: React__default.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1180
|
+
|
|
1181
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1182
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1183
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
1184
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
1185
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
|
|
1186
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
1187
|
+
showCloseButton?: boolean;
|
|
1188
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1189
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1190
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1191
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
1192
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
1193
|
+
|
|
1194
|
+
declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
|
|
1195
|
+
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1196
|
+
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1197
|
+
|
|
1198
|
+
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1199
|
+
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1200
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1201
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): react_jsx_runtime.JSX.Element;
|
|
1202
|
+
|
|
1203
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1204
|
+
|
|
1205
|
+
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1206
|
+
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
|
|
1207
|
+
|
|
1208
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1209
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
1210
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1211
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
1212
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
1213
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
1214
|
+
inset?: boolean;
|
|
1215
|
+
variant?: "default" | "destructive";
|
|
1216
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1217
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
1218
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
1219
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
1220
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
1221
|
+
inset?: boolean;
|
|
1222
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1223
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
1224
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
1225
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
1226
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
1227
|
+
inset?: boolean;
|
|
1228
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1229
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
1230
|
+
|
|
1231
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
|
|
1232
|
+
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
1233
|
+
title?: string;
|
|
1234
|
+
description?: string;
|
|
377
1235
|
className?: string;
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
* { name: 'name', label: 'Name', required: true },
|
|
388
|
-
* { name: 'email', label: 'Email', type: 'email', required: true },
|
|
389
|
-
* ]}
|
|
390
|
-
* submitText="Create User"
|
|
391
|
-
* onSuccess={(user) => console.log('Created:', user)}
|
|
392
|
-
* />
|
|
393
|
-
* ```
|
|
394
|
-
*/
|
|
395
|
-
declare function ToolForm({ toolName, fields, submitText, onSuccess, onError, showResult, className, }: ToolFormProps): react_jsx_runtime.JSX.Element;
|
|
1236
|
+
showCloseButton?: boolean;
|
|
1237
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1238
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
|
|
1239
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
|
|
1240
|
+
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
|
|
1241
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
|
|
1242
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
1243
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
|
|
1244
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
396
1245
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
declare
|
|
409
|
-
|
|
410
|
-
/** Header title */
|
|
411
|
-
title?: ReactNode;
|
|
412
|
-
/** Header description */
|
|
413
|
-
description?: ReactNode;
|
|
414
|
-
/** Right-side action */
|
|
415
|
-
action?: ReactNode;
|
|
416
|
-
}
|
|
417
|
-
declare const CardHeader: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
418
|
-
interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
419
|
-
}
|
|
420
|
-
declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
421
|
-
interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
422
|
-
}
|
|
423
|
-
declare const CardFooter: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
1246
|
+
declare function Table({ className, ...props }: React.ComponentProps<"table">): react_jsx_runtime.JSX.Element;
|
|
1247
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): react_jsx_runtime.JSX.Element;
|
|
1248
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): react_jsx_runtime.JSX.Element;
|
|
1249
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): react_jsx_runtime.JSX.Element;
|
|
1250
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): react_jsx_runtime.JSX.Element;
|
|
1251
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): react_jsx_runtime.JSX.Element;
|
|
1252
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): react_jsx_runtime.JSX.Element;
|
|
1253
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): react_jsx_runtime.JSX.Element;
|
|
1254
|
+
|
|
1255
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime.JSX.Element;
|
|
1256
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1257
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
1258
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
424
1259
|
|
|
425
|
-
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
426
|
-
/** Input label */
|
|
427
|
-
label?: string;
|
|
428
|
-
/** Helper text */
|
|
429
|
-
helperText?: string;
|
|
430
|
-
/** Error message */
|
|
431
|
-
error?: string;
|
|
432
|
-
/** Input size */
|
|
433
|
-
size?: 'sm' | 'md' | 'lg';
|
|
434
|
-
/** Left icon or element */
|
|
435
|
-
leftElement?: ReactNode;
|
|
436
|
-
/** Right icon or element */
|
|
437
|
-
rightElement?: ReactNode;
|
|
438
|
-
/** Full width */
|
|
439
|
-
fullWidth?: boolean;
|
|
440
|
-
}
|
|
441
1260
|
/**
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
* @example
|
|
445
|
-
* ```tsx
|
|
446
|
-
* <Input
|
|
447
|
-
* label="Email"
|
|
448
|
-
* type="email"
|
|
449
|
-
* placeholder="Enter your email"
|
|
450
|
-
* error={errors.email}
|
|
451
|
-
* />
|
|
452
|
-
* ```
|
|
1261
|
+
* Utility function for merging Tailwind CSS classes
|
|
1262
|
+
* Uses clsx for conditional classes and tailwind-merge to handle conflicts
|
|
453
1263
|
*/
|
|
454
|
-
declare
|
|
1264
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
455
1265
|
|
|
456
1266
|
interface DataGridColumn<T> {
|
|
457
1267
|
/** Column key (accessor) */
|
|
@@ -552,7 +1362,7 @@ interface AppShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
552
1362
|
sidebarPosition?: 'left' | 'right';
|
|
553
1363
|
/** Sidebar width */
|
|
554
1364
|
sidebarWidth?: number | string;
|
|
555
|
-
/** Enable auto-resize to content */
|
|
1365
|
+
/** Enable auto-resize to content (uses ext-apps sendSizeChanged) */
|
|
556
1366
|
autoResize?: boolean;
|
|
557
1367
|
/** Padding */
|
|
558
1368
|
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
@@ -561,6 +1371,7 @@ interface AppShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
561
1371
|
* AppShell - Root layout container for MCP Apps
|
|
562
1372
|
*
|
|
563
1373
|
* Provides header, sidebar, main content, and footer areas with auto-resize support.
|
|
1374
|
+
* Uses the ext-apps protocol for proper size change notifications.
|
|
564
1375
|
*
|
|
565
1376
|
* @example
|
|
566
1377
|
* ```tsx
|
|
@@ -575,6 +1386,56 @@ interface AppShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
575
1386
|
*/
|
|
576
1387
|
declare function AppShell({ header, sidebar, footer, sidebarPosition, sidebarWidth, autoResize, padding, className, children, ...props }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
577
1388
|
|
|
1389
|
+
interface TabItem {
|
|
1390
|
+
value: string;
|
|
1391
|
+
label: string;
|
|
1392
|
+
disabled?: boolean;
|
|
1393
|
+
}
|
|
1394
|
+
interface TabsProps {
|
|
1395
|
+
/** Tab items */
|
|
1396
|
+
tabs: TabItem[];
|
|
1397
|
+
/** Default active tab (uncontrolled) */
|
|
1398
|
+
defaultValue?: string;
|
|
1399
|
+
/** Active tab value (controlled) */
|
|
1400
|
+
value?: string;
|
|
1401
|
+
/** Change handler */
|
|
1402
|
+
onValueChange?: (value: string) => void;
|
|
1403
|
+
/** Children (tab content) */
|
|
1404
|
+
children?: React__default.ReactNode;
|
|
1405
|
+
/** Additional class name */
|
|
1406
|
+
className?: string;
|
|
1407
|
+
}
|
|
1408
|
+
interface TabContentProps {
|
|
1409
|
+
/** Tab value this content belongs to */
|
|
1410
|
+
value: string;
|
|
1411
|
+
/** Children */
|
|
1412
|
+
children: React__default.ReactNode;
|
|
1413
|
+
/** Additional class name */
|
|
1414
|
+
className?: string;
|
|
1415
|
+
}
|
|
1416
|
+
declare function Tabs({ tabs, defaultValue, value, onValueChange, children, className, }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
1417
|
+
declare function TabContent({ value, children, className }: TabContentProps): react_jsx_runtime.JSX.Element;
|
|
1418
|
+
|
|
1419
|
+
interface ModalProps {
|
|
1420
|
+
/** Open state */
|
|
1421
|
+
open?: boolean;
|
|
1422
|
+
/** Default open (uncontrolled) */
|
|
1423
|
+
defaultOpen?: boolean;
|
|
1424
|
+
/** Change handler */
|
|
1425
|
+
onOpenChange?: (open: boolean) => void;
|
|
1426
|
+
/** Modal title */
|
|
1427
|
+
title?: string;
|
|
1428
|
+
/** Modal description */
|
|
1429
|
+
description?: string;
|
|
1430
|
+
/** Children content */
|
|
1431
|
+
children?: ReactNode;
|
|
1432
|
+
/** Additional class name */
|
|
1433
|
+
className?: string;
|
|
1434
|
+
/** Trigger element */
|
|
1435
|
+
trigger?: ReactNode;
|
|
1436
|
+
}
|
|
1437
|
+
declare function Modal({ open, defaultOpen, onOpenChange, title, description, children, className, trigger, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
1438
|
+
|
|
578
1439
|
interface CodeBlockProps {
|
|
579
1440
|
/** Code content */
|
|
580
1441
|
code: string;
|
|
@@ -601,4 +1462,63 @@ interface CodeBlockProps {
|
|
|
601
1462
|
*/
|
|
602
1463
|
declare function CodeBlock({ code, language, showLineNumbers, copyable, className, }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
603
1464
|
|
|
604
|
-
|
|
1465
|
+
interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
1466
|
+
/** Card variant */
|
|
1467
|
+
variant?: 'default' | 'outline' | 'elevated';
|
|
1468
|
+
/** Padding size */
|
|
1469
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
1470
|
+
/** Make card interactive (hover effects) */
|
|
1471
|
+
interactive?: boolean;
|
|
1472
|
+
}
|
|
1473
|
+
/**
|
|
1474
|
+
* Card container component
|
|
1475
|
+
*/
|
|
1476
|
+
declare const Card: React__default.ForwardRefExoticComponent<CardProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1477
|
+
interface CardHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
1478
|
+
/** Header title */
|
|
1479
|
+
title?: ReactNode;
|
|
1480
|
+
/** Header description */
|
|
1481
|
+
description?: ReactNode;
|
|
1482
|
+
/** Right-side action */
|
|
1483
|
+
action?: ReactNode;
|
|
1484
|
+
}
|
|
1485
|
+
declare const CardHeader: React__default.ForwardRefExoticComponent<CardHeaderProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1486
|
+
interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
1487
|
+
}
|
|
1488
|
+
declare const CardContent: React__default.ForwardRefExoticComponent<CardContentProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1489
|
+
interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
1490
|
+
}
|
|
1491
|
+
declare const CardFooter: React__default.ForwardRefExoticComponent<CardFooterProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1492
|
+
|
|
1493
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
1494
|
+
/** Input label */
|
|
1495
|
+
label?: string;
|
|
1496
|
+
/** Helper text */
|
|
1497
|
+
helperText?: string;
|
|
1498
|
+
/** Error message */
|
|
1499
|
+
error?: string;
|
|
1500
|
+
/** Input size */
|
|
1501
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1502
|
+
/** Left icon or element */
|
|
1503
|
+
leftElement?: ReactNode;
|
|
1504
|
+
/** Right icon or element */
|
|
1505
|
+
rightElement?: ReactNode;
|
|
1506
|
+
/** Full width */
|
|
1507
|
+
fullWidth?: boolean;
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Input component with label, validation, and icon support
|
|
1511
|
+
*
|
|
1512
|
+
* @example
|
|
1513
|
+
* ```tsx
|
|
1514
|
+
* <Input
|
|
1515
|
+
* label="Email"
|
|
1516
|
+
* type="email"
|
|
1517
|
+
* placeholder="Enter your email"
|
|
1518
|
+
* error={errors.email}
|
|
1519
|
+
* />
|
|
1520
|
+
* ```
|
|
1521
|
+
*/
|
|
1522
|
+
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1523
|
+
|
|
1524
|
+
export { ActionButton, type ActionButtonProps, Alert, AlertDescription, AlertTitle, type AppInfo, type AppOptions, AppProvider, type AppProviderProps, AppShell, type AppShellProps, Badge, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, Chart, type ChartProps, type ChartType, Checkbox, CodeBlock, type CodeBlockProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ConfirmConfig, DEFAULT_RESULT_CONFIG, DataGrid, type DataGridColumn, type DataGridProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, INITIAL_TOOL_STATE, Input, type InputProps, Label, type McpActionProps, type McpAppContextValue, Modal, type ModalProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RequireConnection, type RequireConnectionProps, type ResourceBinding, type ResourceMeta, ResourceView, type ResourceViewProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, Slider, StreamingContent, type StreamingContentProps, Switch, TabContent, type TabContentProps, type TabItem, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, type TabsProps, TabsTrigger, Textarea, Toaster, type ToolBinding, ToolButton, type ToolButtonProps, type ToolButtonState, type ToolCallState, type ToolContextValue, ToolDataGrid, type ToolDataGridColumn, type ToolDataGridProps, type ToolDataGridRowAction, ToolErrorBoundary, type ToolErrorBoundaryProps, ToolForm, type ToolFormField, type ToolFormProps, ToolInput, type ToolInputProps, type ToolInputSuggestion, ToolProvider, type ToolProviderProps, type ToolResultConfig, ToolSelect, type ToolSelectOption, type ToolSelectProps, type ToolState, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseHostContextReturn, type UseMessageReturn, type UseResourceOptions, type UseResourceReturn, type UseToolInputPartialReturn, type UseToolInputReturn, type UseToolOptions, type UseToolResultReturn, type UseToolReturn, type UseToolStreamOptions, type UseToolStreamReturn, badgeVariants, buttonVariants, cn, normalizeToolBinding, useFormField, useHostContext, useMcpApp, useMessage, useResource, useTool, useToolContext, useToolInput, useToolInputPartial, useToolResult, useToolStream, useToolSubscription };
|