@assistant-ui/react-mcp 0.1.19 → 0.1.21
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/LICENSE +1 -1
- package/dist/auth/buildHeaders.d.ts +2 -4
- package/dist/auth/buildHeaders.d.ts.map +1 -1
- package/dist/auth/createOAuthProvider.d.ts +19 -20
- package/dist/auth/createOAuthProvider.d.ts.map +1 -1
- package/dist/auth/types.d.ts +12 -14
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/connector.d.ts +1 -3
- package/dist/connector.d.ts.map +1 -1
- package/dist/context/McpConnectorByIndexProvider.d.ts +2 -4
- package/dist/context/McpConnectorByIndexProvider.d.ts.map +1 -1
- package/dist/context/McpConnectorByIndexProvider.js +1 -1
- package/dist/context/McpConnectorByIndexProvider.js.map +1 -1
- package/dist/context/McpCustomServerByIndexProvider.d.ts +2 -4
- package/dist/context/McpCustomServerByIndexProvider.d.ts.map +1 -1
- package/dist/context/McpCustomServerByIndexProvider.js +1 -1
- package/dist/context/McpCustomServerByIndexProvider.js.map +1 -1
- package/dist/context/McpServerByIdProvider.d.ts +2 -4
- package/dist/context/McpServerByIdProvider.d.ts.map +1 -1
- package/dist/context/McpServerByIdProvider.js +1 -1
- package/dist/context/McpServerByIdProvider.js.map +1 -1
- package/dist/hooks/useMcpOAuthCallback.d.ts +9 -11
- package/dist/hooks/useMcpOAuthCallback.d.ts.map +1 -1
- package/dist/hooks/useMcpOAuthCallback.js +2 -2
- package/dist/hooks/useMcpOAuthCallback.js.map +1 -1
- package/dist/index.d.ts +19 -18
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -4
- package/dist/mcp-scope.d.ts +110 -112
- package/dist/mcp-scope.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthFields.d.ts +12 -14
- package/dist/primitives/addForm/McpAddFormAuthFields.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthFields.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts +3 -5
- package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthSelect.js +1 -1
- package/dist/primitives/addForm/McpAddFormAuthSelect.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormBearerTokenField.d.ts +3 -5
- package/dist/primitives/addForm/McpAddFormBearerTokenField.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormBearerTokenField.js +1 -1
- package/dist/primitives/addForm/McpAddFormBearerTokenField.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormCancel.d.ts +4 -6
- package/dist/primitives/addForm/McpAddFormCancel.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormCancel.js +1 -1
- package/dist/primitives/addForm/McpAddFormCancel.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormError.d.ts +4 -6
- package/dist/primitives/addForm/McpAddFormError.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormError.js +1 -1
- package/dist/primitives/addForm/McpAddFormError.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormNameField.d.ts +3 -5
- package/dist/primitives/addForm/McpAddFormNameField.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormNameField.js +1 -1
- package/dist/primitives/addForm/McpAddFormNameField.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormRoot.d.ts +9 -11
- package/dist/primitives/addForm/McpAddFormRoot.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormRoot.js +2 -2
- package/dist/primitives/addForm/McpAddFormScopesField.d.ts +3 -5
- package/dist/primitives/addForm/McpAddFormScopesField.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormScopesField.js +1 -1
- package/dist/primitives/addForm/McpAddFormScopesField.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormSubmit.d.ts +4 -6
- package/dist/primitives/addForm/McpAddFormSubmit.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormSubmit.js +1 -1
- package/dist/primitives/addForm/McpAddFormSubmit.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormUrlField.d.ts +3 -5
- package/dist/primitives/addForm/McpAddFormUrlField.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormUrlField.js +1 -1
- package/dist/primitives/addForm/McpAddFormUrlField.js.map +1 -1
- package/dist/primitives/addForm/context.d.ts +18 -20
- package/dist/primitives/addForm/context.d.ts.map +1 -1
- package/dist/primitives/addForm.d.ts +10 -15
- package/dist/primitives/addForm.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveAccept.d.ts +4 -6
- package/dist/primitives/elicitation/McpElicitationPrimitiveAccept.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveAccept.js +2 -2
- package/dist/primitives/elicitation/McpElicitationPrimitiveAccept.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveCancel.d.ts +4 -6
- package/dist/primitives/elicitation/McpElicitationPrimitiveCancel.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveCancel.js +2 -2
- package/dist/primitives/elicitation/McpElicitationPrimitiveCancel.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveDecline.d.ts +4 -6
- package/dist/primitives/elicitation/McpElicitationPrimitiveDecline.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveDecline.js +2 -2
- package/dist/primitives/elicitation/McpElicitationPrimitiveDecline.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveError.d.ts +4 -6
- package/dist/primitives/elicitation/McpElicitationPrimitiveError.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveError.js +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveError.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveFields.d.ts +6 -8
- package/dist/primitives/elicitation/McpElicitationPrimitiveFields.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveFields.js +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveFields.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveItems.d.ts +6 -9
- package/dist/primitives/elicitation/McpElicitationPrimitiveItems.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveItems.js +2 -2
- package/dist/primitives/elicitation/McpElicitationPrimitiveItems.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveMessage.d.ts +4 -6
- package/dist/primitives/elicitation/McpElicitationPrimitiveMessage.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveMessage.js +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveMessage.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveRoot.d.ts +4 -6
- package/dist/primitives/elicitation/McpElicitationPrimitiveRoot.d.ts.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveRoot.js +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveRoot.js.map +1 -1
- package/dist/primitives/elicitation/context.d.ts +8 -10
- package/dist/primitives/elicitation/context.d.ts.map +1 -1
- package/dist/primitives/elicitation/initialElicitationDraft.d.ts +0 -2
- package/dist/primitives/elicitation/initialElicitationDraft.d.ts.map +1 -1
- package/dist/primitives/elicitation/prepareElicitationContent.d.ts +3 -5
- package/dist/primitives/elicitation/prepareElicitationContent.d.ts.map +1 -1
- package/dist/primitives/elicitation.d.ts +8 -14
- package/dist/primitives/elicitation.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts +4 -6
- package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerAddCustomTrigger.js +1 -1
- package/dist/primitives/manager/McpManagerAddCustomTrigger.js.map +1 -1
- package/dist/primitives/manager/McpManagerConnectors.d.ts +12 -14
- package/dist/primitives/manager/McpManagerConnectors.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerConnectors.js +1 -1
- package/dist/primitives/manager/McpManagerCustomServers.d.ts +12 -14
- package/dist/primitives/manager/McpManagerCustomServers.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerCustomServers.js +1 -1
- package/dist/primitives/manager/McpManagerRoot.d.ts +4 -6
- package/dist/primitives/manager/McpManagerRoot.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerRoot.js +2 -2
- package/dist/primitives/manager/McpManagerRoot.js.map +1 -1
- package/dist/primitives/manager.d.ts +4 -9
- package/dist/primitives/manager.d.ts.map +1 -1
- package/dist/primitives/server/McpServerConnectButton.d.ts +4 -6
- package/dist/primitives/server/McpServerConnectButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerConnectButton.js +2 -2
- package/dist/primitives/server/McpServerConnectButton.js.map +1 -1
- package/dist/primitives/server/McpServerDisconnectButton.d.ts +4 -6
- package/dist/primitives/server/McpServerDisconnectButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerDisconnectButton.js +2 -2
- package/dist/primitives/server/McpServerDisconnectButton.js.map +1 -1
- package/dist/primitives/server/McpServerError.d.ts +4 -6
- package/dist/primitives/server/McpServerError.d.ts.map +1 -1
- package/dist/primitives/server/McpServerError.js +2 -2
- package/dist/primitives/server/McpServerError.js.map +1 -1
- package/dist/primitives/server/McpServerIcon.d.ts +11 -13
- package/dist/primitives/server/McpServerIcon.d.ts.map +1 -1
- package/dist/primitives/server/McpServerIcon.js +2 -2
- package/dist/primitives/server/McpServerIcon.js.map +1 -1
- package/dist/primitives/server/McpServerName.d.ts +4 -6
- package/dist/primitives/server/McpServerName.d.ts.map +1 -1
- package/dist/primitives/server/McpServerName.js +2 -2
- package/dist/primitives/server/McpServerName.js.map +1 -1
- package/dist/primitives/server/McpServerOAuthLink.d.ts +9 -11
- package/dist/primitives/server/McpServerOAuthLink.d.ts.map +1 -1
- package/dist/primitives/server/McpServerOAuthLink.js +2 -2
- package/dist/primitives/server/McpServerOAuthLink.js.map +1 -1
- package/dist/primitives/server/McpServerRemoveButton.d.ts +4 -6
- package/dist/primitives/server/McpServerRemoveButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerRemoveButton.js +2 -2
- package/dist/primitives/server/McpServerRemoveButton.js.map +1 -1
- package/dist/primitives/server/McpServerRoot.d.ts +4 -6
- package/dist/primitives/server/McpServerRoot.d.ts.map +1 -1
- package/dist/primitives/server/McpServerRoot.js +2 -2
- package/dist/primitives/server/McpServerRoot.js.map +1 -1
- package/dist/primitives/server/McpServerStatus.d.ts +4 -6
- package/dist/primitives/server/McpServerStatus.d.ts.map +1 -1
- package/dist/primitives/server/McpServerStatus.js +2 -2
- package/dist/primitives/server/McpServerStatus.js.map +1 -1
- package/dist/primitives/server/McpServerToolName.d.ts +4 -6
- package/dist/primitives/server/McpServerToolName.d.ts.map +1 -1
- package/dist/primitives/server/McpServerToolName.js +1 -1
- package/dist/primitives/server/McpServerToolName.js.map +1 -1
- package/dist/primitives/server/McpServerTools.d.ts +5 -7
- package/dist/primitives/server/McpServerTools.d.ts.map +1 -1
- package/dist/primitives/server/McpServerTools.js +2 -2
- package/dist/primitives/server/McpServerTools.js.map +1 -1
- package/dist/primitives/server.d.ts +11 -16
- package/dist/primitives/server.d.ts.map +1 -1
- package/dist/resources/McpManagerResource.d.ts +11 -13
- package/dist/resources/McpManagerResource.d.ts.map +1 -1
- package/dist/resources/McpManagerResource.js +2 -2
- package/dist/resources/McpManagerResource.js.map +1 -1
- package/dist/resources/McpServerRemovalFence.d.ts +1 -3
- package/dist/resources/McpServerRemovalFence.d.ts.map +1 -1
- package/dist/resources/McpServerResource.d.ts +18 -20
- package/dist/resources/McpServerResource.d.ts.map +1 -1
- package/dist/resources/McpServerResource.js +51 -43
- package/dist/resources/McpServerResource.js.map +1 -1
- package/dist/resources/storage/McpCustomStorage.d.ts +1 -3
- package/dist/resources/storage/McpCustomStorage.d.ts.map +1 -1
- package/dist/resources/storage/McpLocalStorage.d.ts +14 -16
- package/dist/resources/storage/McpLocalStorage.d.ts.map +1 -1
- package/dist/resources/storage/McpLocalStorage.js +1 -1
- package/dist/resources/storage/McpLocalStorage.js.map +1 -1
- package/dist/resources/storage/McpMemoryStorage.d.ts +1 -3
- package/dist/resources/storage/McpMemoryStorage.d.ts.map +1 -1
- package/dist/resources/storage/types.d.ts +22 -24
- package/dist/resources/storage/types.d.ts.map +1 -1
- package/dist/resources/validateElicitationContent.d.ts +3 -4
- package/dist/resources/validateElicitationContent.d.ts.map +1 -1
- package/dist/utils/createMcpId.d.ts +0 -2
- package/dist/utils/createMcpId.d.ts.map +1 -1
- package/dist/utils/invokeMcpCallback.d.ts +0 -2
- package/dist/utils/invokeMcpCallback.d.ts.map +1 -1
- package/dist/utils/serverId.d.ts +0 -2
- package/dist/utils/serverId.d.ts.map +1 -1
- package/dist/utils/serverUrl.d.ts +1 -3
- package/dist/utils/serverUrl.d.ts.map +1 -1
- package/package.json +12 -9
- package/src/resources/McpServerResource.test.ts +112 -0
- package/src/resources/McpServerResource.ts +22 -7
package/dist/mcp-scope.d.ts
CHANGED
|
@@ -1,149 +1,147 @@
|
|
|
1
1
|
import "@assistant-ui/store";
|
|
2
|
-
//#region src/mcp-scope.d.ts
|
|
3
2
|
export type MCPAuthConfig = {
|
|
4
|
-
|
|
3
|
+
type: "none";
|
|
5
4
|
} | {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
type: "bearer";
|
|
6
|
+
token?: string | undefined;
|
|
8
7
|
} | {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
type: "oauth";
|
|
9
|
+
scopes?: string[] | undefined;
|
|
10
|
+
authorizationEndpoint?: string | undefined;
|
|
11
|
+
tokenEndpoint?: string | undefined;
|
|
12
|
+
registrationEndpoint?: string | undefined;
|
|
13
|
+
clientId?: string | undefined;
|
|
14
|
+
clientSecret?: string | undefined;
|
|
16
15
|
};
|
|
17
16
|
export type MCPResponseCacheConfig = {
|
|
18
|
-
|
|
17
|
+
readonly defaultTtlMs?: number;
|
|
19
18
|
};
|
|
20
19
|
export type MCPConnector = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
url: string;
|
|
23
|
+
icon?: string | undefined;
|
|
24
|
+
auth: MCPAuthConfig;
|
|
25
|
+
connectionTimeout?: number | undefined;
|
|
26
|
+
readonly cache?: MCPResponseCacheConfig | undefined;
|
|
27
|
+
readonly elicitation?: boolean | undefined;
|
|
29
28
|
};
|
|
30
29
|
export type MCPCustomServerRecord = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
url: string;
|
|
33
|
+
auth: MCPAuthConfig;
|
|
34
|
+
connectionTimeout?: number | undefined;
|
|
35
|
+
readonly cache?: MCPResponseCacheConfig | undefined;
|
|
36
|
+
readonly elicitation?: boolean | undefined;
|
|
37
|
+
createdAt: number;
|
|
39
38
|
};
|
|
40
39
|
export type MCPServerKind = "connector" | "custom";
|
|
41
40
|
export type MCPConnectionState = "disconnected" | "authRequired" | "authPending" | "connecting" | "connected" | "error";
|
|
42
41
|
export type MCPToolInfo = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
name: string;
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
inputSchema: unknown;
|
|
46
45
|
};
|
|
47
46
|
export type MCPElicitation = {
|
|
48
|
-
|
|
49
|
-
readonly message: string;
|
|
50
|
-
readonly requestedSchema: unknown;
|
|
51
|
-
readonly error?: {
|
|
47
|
+
readonly id: string;
|
|
52
48
|
readonly message: string;
|
|
53
|
-
readonly
|
|
54
|
-
|
|
49
|
+
readonly requestedSchema: unknown;
|
|
50
|
+
readonly error?: {
|
|
51
|
+
readonly message: string;
|
|
52
|
+
readonly properties?: readonly string[] | undefined;
|
|
53
|
+
} | undefined;
|
|
55
54
|
};
|
|
56
55
|
export type MCPElicitationResponse = {
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
action: "accept";
|
|
57
|
+
content: Record<string, unknown>;
|
|
59
58
|
} | {
|
|
60
|
-
|
|
59
|
+
action: "decline";
|
|
61
60
|
} | {
|
|
62
|
-
|
|
61
|
+
action: "cancel";
|
|
63
62
|
};
|
|
64
63
|
export type MCPServerState = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
64
|
+
id: string;
|
|
65
|
+
kind: MCPServerKind;
|
|
66
|
+
name: string;
|
|
67
|
+
url: string;
|
|
68
|
+
icon?: string | undefined;
|
|
69
|
+
connectionState: MCPConnectionState;
|
|
70
|
+
lastError: {
|
|
71
|
+
message: string;
|
|
72
|
+
} | null;
|
|
73
|
+
tools: MCPToolInfo[];
|
|
74
|
+
authorizationUrl: string | null;
|
|
75
|
+
readonly pendingElicitations: readonly MCPElicitation[];
|
|
77
76
|
};
|
|
78
77
|
export type MCPManagerState = {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
servers: MCPServerState[];
|
|
79
|
+
connectors: MCPServerState[];
|
|
80
|
+
customServers: MCPServerState[];
|
|
81
|
+
isHydrated: boolean;
|
|
83
82
|
};
|
|
84
83
|
export type MCPServerMethods = {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
84
|
+
getState: () => MCPServerState;
|
|
85
|
+
connect: () => Promise<void>;
|
|
86
|
+
disconnect: () => Promise<void>;
|
|
87
|
+
remove: () => Promise<void>;
|
|
88
|
+
callTool: (name: string, args: unknown) => Promise<unknown>;
|
|
89
|
+
/** List resources exposed by the server. Returns the raw MCP `ListResourcesResult`. */
|
|
90
|
+
listResources: (params?: {
|
|
91
|
+
cursor?: string | undefined;
|
|
92
|
+
}) => Promise<unknown>;
|
|
93
|
+
/** Read a resource by URI. Returns the raw MCP `ReadResourceResult`. */
|
|
94
|
+
readResource: (uri: string) => Promise<unknown>;
|
|
95
|
+
/** OAuth only: pass full callback URL (e.g. window.location.href) */
|
|
96
|
+
completeAuth: (callbackUrl: string) => Promise<void>;
|
|
97
|
+
answerElicitation(id: string, response: MCPElicitationResponse): readonly {
|
|
98
|
+
property: string;
|
|
99
|
+
message: string;
|
|
100
|
+
}[] | undefined;
|
|
102
101
|
};
|
|
103
102
|
export type MCPServerQuery = {
|
|
104
|
-
|
|
103
|
+
id: string;
|
|
105
104
|
} | {
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
kind: "connector";
|
|
106
|
+
index: number;
|
|
108
107
|
} | {
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
kind: "custom";
|
|
109
|
+
index: number;
|
|
111
110
|
};
|
|
112
111
|
export type MCPManagerMethods = {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
112
|
+
getState: () => MCPManagerState;
|
|
113
|
+
/** Look up a server by id, or by index within its kind. */
|
|
114
|
+
server: (query: MCPServerQuery) => MCPServerMethods;
|
|
115
|
+
/** Convenience: equivalent to `server({ kind: "connector", index })`. */
|
|
116
|
+
connector: (query: {
|
|
117
|
+
index: number;
|
|
118
|
+
}) => MCPServerMethods;
|
|
119
|
+
/** Convenience: equivalent to `server({ kind: "custom", index })`. */
|
|
120
|
+
customServer: (query: {
|
|
121
|
+
index: number;
|
|
122
|
+
}) => MCPServerMethods;
|
|
123
|
+
addCustomServer: (input: {
|
|
124
|
+
name: string;
|
|
125
|
+
url: string;
|
|
126
|
+
auth: MCPAuthConfig;
|
|
127
|
+
connectionTimeout?: number | undefined;
|
|
128
|
+
readonly cache?: MCPResponseCacheConfig | undefined;
|
|
129
|
+
readonly elicitation?: boolean | undefined;
|
|
130
|
+
}) => Promise<string>;
|
|
131
|
+
removeServer: (id: string) => Promise<void>;
|
|
133
132
|
};
|
|
134
133
|
declare module "@assistant-ui/store" {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
134
|
+
interface ScopeRegistry {
|
|
135
|
+
mcp: {
|
|
136
|
+
methods: MCPManagerMethods;
|
|
137
|
+
};
|
|
138
|
+
mcpServer: {
|
|
139
|
+
methods: MCPServerMethods;
|
|
140
|
+
meta: {
|
|
141
|
+
source: "mcp";
|
|
142
|
+
query: MCPServerQuery;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
}
|
|
147
146
|
}
|
|
148
|
-
//#endregion
|
|
149
147
|
//# sourceMappingURL=mcp-scope.d.ts.map
|
package/dist/mcp-scope.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-scope.d.ts","
|
|
1
|
+
{"version":3,"file":"mcp-scope.d.ts","sourceRoot":"","sources":["../src/mcp-scope.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAA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D,CAAC;KACH;CACF"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/primitives/addForm/McpAddFormAuthFields.d.ts
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import { type AddFormAuthType } from "./context.js";
|
|
4
3
|
export declare namespace McpAddFormPrimitiveAuthFields {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
type Props = {
|
|
5
|
+
/**
|
|
6
|
+
* Optional render override. Receives the current auth type so apps can render
|
|
7
|
+
* fully custom inputs, bound to the form through `BearerTokenField` and
|
|
8
|
+
* `ScopesField`. Defaults to a minimal built-in for bearer / oauth.
|
|
9
|
+
*/
|
|
10
|
+
children?: FC<{
|
|
11
|
+
authType: AddFormAuthType;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
15
14
|
}
|
|
16
15
|
export declare const McpAddFormPrimitiveAuthFields: FC<McpAddFormPrimitiveAuthFields.Props>;
|
|
17
|
-
//#endregion
|
|
18
16
|
//# sourceMappingURL=McpAddFormAuthFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormAuthFields.d.ts","
|
|
1
|
+
{"version":3,"file":"McpAddFormAuthFields.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormAuthFields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAE,KAAK,eAAe,EAAc,qBAAkB;AAE7D,yBAAiB,6BAA6B,CAAC;IAC7C,KAAY,KAAK,GAAG;QAClB;;;;WAIG;QACH,QAAQ,CAAC,EAAE,EAAE,CAAC;YAAE,QAAQ,EAAE,eAAe,CAAA;SAAE,CAAC,CAAC;KAC9C,CAAC;CACH;AAED,eAAO,MAAM,6BAA6B,EAAE,EAAE,CAC5C,6BAA6B,CAAC,KAAK,CAyCpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormAuthFields.js","names":["FC","McpAddFormPrimitiveBearerTokenField","McpAddFormPrimitiveScopesField","AddFormAuthType","useAddForm","McpAddFormPrimitiveAuthFields","Props","children","authType","t0","$","_c","state","ids","Render","t1","bearerToken","scopes","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormAuthFields.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { McpAddFormPrimitiveBearerTokenField } from \"./McpAddFormBearerTokenField\";\nimport { McpAddFormPrimitiveScopesField } from \"./McpAddFormScopesField\";\nimport { type AddFormAuthType, useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveAuthFields {\n export type Props = {\n /**\n * Optional render override. Receives the current auth type so apps can render\n * fully custom inputs, bound to the form through `BearerTokenField` and\n * `ScopesField`. Defaults to a minimal built-in for bearer / oauth.\n */\n children?: FC<{ authType: AddFormAuthType }>;\n };\n}\n\nexport const McpAddFormPrimitiveAuthFields: FC<\n McpAddFormPrimitiveAuthFields.Props\n> = ({ children }) => {\n const { state, ids } = useAddForm();\n\n if (children) {\n const Render = children;\n return <Render authType={state.authType} />;\n }\n\n if (state.authType === \"bearer\") {\n return (\n <div>\n <label\n htmlFor={ids.bearerToken}\n data-mcp-auth-field-label=\"bearer-token\"\n >\n Bearer token\n </label>\n <McpAddFormPrimitiveBearerTokenField\n id={ids.bearerToken}\n data-mcp-auth-field=\"bearer-token\"\n />\n </div>\n );\n }\n\n if (state.authType === \"oauth\") {\n return (\n <div>\n <label htmlFor={ids.scopes} data-mcp-auth-field-label=\"oauth-scopes\">\n OAuth scopes\n </label>\n <McpAddFormPrimitiveScopesField\n id={ids.scopes}\n data-mcp-auth-field=\"oauth-scopes\"\n />\n </div>\n );\n }\n\n return null;\n};\n\nMcpAddFormPrimitiveAuthFields.displayName = \"McpAddFormPrimitive.AuthFields\";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Ba,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpAddFormAuthFields.js","names":["FC","McpAddFormPrimitiveBearerTokenField","McpAddFormPrimitiveScopesField","AddFormAuthType","useAddForm","McpAddFormPrimitiveAuthFields","Props","children","authType","t0","$","_c","state","ids","Render","t1","bearerToken","scopes","displayName","_c"],"sources":["../../../src/primitives/addForm/McpAddFormAuthFields.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { McpAddFormPrimitiveBearerTokenField } from \"./McpAddFormBearerTokenField\";\nimport { McpAddFormPrimitiveScopesField } from \"./McpAddFormScopesField\";\nimport { type AddFormAuthType, useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveAuthFields {\n export type Props = {\n /**\n * Optional render override. Receives the current auth type so apps can render\n * fully custom inputs, bound to the form through `BearerTokenField` and\n * `ScopesField`. Defaults to a minimal built-in for bearer / oauth.\n */\n children?: FC<{ authType: AddFormAuthType }>;\n };\n}\n\nexport const McpAddFormPrimitiveAuthFields: FC<\n McpAddFormPrimitiveAuthFields.Props\n> = ({ children }) => {\n const { state, ids } = useAddForm();\n\n if (children) {\n const Render = children;\n return <Render authType={state.authType} />;\n }\n\n if (state.authType === \"bearer\") {\n return (\n <div>\n <label\n htmlFor={ids.bearerToken}\n data-mcp-auth-field-label=\"bearer-token\"\n >\n Bearer token\n </label>\n <McpAddFormPrimitiveBearerTokenField\n id={ids.bearerToken}\n data-mcp-auth-field=\"bearer-token\"\n />\n </div>\n );\n }\n\n if (state.authType === \"oauth\") {\n return (\n <div>\n <label htmlFor={ids.scopes} data-mcp-auth-field-label=\"oauth-scopes\">\n OAuth scopes\n </label>\n <McpAddFormPrimitiveScopesField\n id={ids.scopes}\n data-mcp-auth-field=\"oauth-scopes\"\n />\n </div>\n );\n }\n\n return null;\n};\n\nMcpAddFormPrimitiveAuthFields.displayName = \"McpAddFormPrimitive.AuthFields\";\n"],"mappings":";;;;;;AAgBA,MAAaK,iCAETI,OAAA;CAAA,MAAAC,IAAAC,EA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ef, ComponentRef } from "react";
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
//#region src/primitives/addForm/McpAddFormAuthSelect.d.ts
|
|
4
3
|
export declare namespace McpAddFormPrimitiveAuthSelect {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.select>;
|
|
5
|
+
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.select>, "value" | "onChange">;
|
|
7
6
|
}
|
|
8
7
|
export declare const McpAddFormPrimitiveAuthSelect: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveAuthSelect.Props & import("react").RefAttributes<HTMLSelectElement>>;
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=McpAddFormAuthSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormAuthSelect.d.ts","
|
|
1
|
+
{"version":3,"file":"McpAddFormAuthSelect.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormAuthSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAetD,yBAAiB,6BAA6B,CAAC;IAC7C,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5D,KAAY,KAAK,GAAG,IAAI,CACtB,wBAAwB,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,EACjD,OAAO,GAAG,UAAU,CACrB,CAAC;CACH;AAED,eAAO,MAAM,6BAA6B,mIAwBxC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useAddForm } from "./context.js";
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
4
5
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/primitives/addForm/McpAddFormAuthSelect.tsx
|
|
7
7
|
const AUTH_TYPES = /* @__PURE__ */ new Set([
|
|
8
8
|
"none",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormAuthSelect.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","AddFormAuthType","AUTH_TYPES","ReadonlySet","Set","asAuthType","value","has","McpAddFormPrimitiveAuthSelect","Element","select","Props","Omit","props","ref","$","_c","state","setField","t0","e","next","target","t1","children","t2","authType","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormAuthSelect.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm, type AddFormAuthType } from \"./context\";\n\nconst AUTH_TYPES: ReadonlySet<AddFormAuthType> = new Set([\n \"none\",\n \"bearer\",\n \"oauth\",\n]);\n\nfunction asAuthType(value: string): AddFormAuthType | null {\n return (AUTH_TYPES as ReadonlySet<string>).has(value)\n ? (value as AddFormAuthType)\n : null;\n}\n\nexport namespace McpAddFormPrimitiveAuthSelect {\n export type Element = ComponentRef<typeof Primitive.select>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.select>,\n \"value\" | \"onChange\"\n >;\n}\n\nexport const McpAddFormPrimitiveAuthSelect = forwardRef<\n McpAddFormPrimitiveAuthSelect.Element,\n McpAddFormPrimitiveAuthSelect.Props\n>((props, ref) => {\n const { state, setField } = useAddForm();\n return (\n <Primitive.select\n {...props}\n ref={ref}\n value={state.authType}\n onChange={(e) => {\n const next = asAuthType(e.target.value);\n if (next) setField(\"authType\", next);\n }}\n >\n {props.children ?? (\n <>\n <option value=\"oauth\">OAuth</option>\n <option value=\"bearer\">Bearer token</option>\n <option value=\"none\">None</option>\n </>\n )}\n </Primitive.select>\n );\n});\n\nMcpAddFormPrimitiveAuthSelect.displayName = \"McpAddFormPrimitive.AuthSelect\";\n"],"mappings":";;;;;;AAQA,MAAMM,6BAA2C,IAAIE,IAAI;CACvD;CACA;CACA;AAAO,CACR;AAED,SAASC,WAAWC,OAAuC;CACzD,OAAQJ,WAAmCK,IAAID,KAAK,IAC/CA,QACD;AACN;AAUA,MAAaE,gCAAgCV,YAG3Ce,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,aAA4BlB,WAAW;CAAE,IAAAmB;CAAA,IAAAJ,EAAA,OAAAG,UAAA;EAM3BC,MAAAC,MAAA;GACR,MAAAC,OAAahB,WAAWe,EAACE,OAAOhB,KAAM;GACtC,IAAIe,MAAMH,SAAS,YAAYG,IAAI;EAAE;EACtCN,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAF,MAAAW,UAAA;EAEAD,KAAAV,MAAKW,YAAL,qBAAA,UAAA,EAAA,UAAA;GAEG,oBAAA,UAAA;IAAc,OAAA;IAAQ,UAAA;GAAc,CAAA;GACpC,oBAAA,UAAA;IAAc,OAAA;IAAS,UAAA;GAAqB,CAAA;GAC5C,oBAAA,UAAA;IAAc,OAAA;IAAO,UAAA;GAAa,CAAA;EAAA,EAAA,CAAA;EAErCT,EAAA,KAAAF,MAAAW;EAAAT,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAS,YAAAX,EAAA,OAAAI,MAAAJ,EAAA,OAAAQ,IAAA;EAfHE,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMZ;GACCC;GACE,OAAAG,MAAKS;GACF,UAAAP;GAKTI,UAAAA;EAOH,CAAA;EAAmBR,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE,MAAAS;EAAAX,EAAA,KAAAI;EAAAJ,EAAA,KAAAQ;EAAAR,EAAA,KAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OAhBnBU;AAgBmB,CAEtB;AAEDjB,8BAA8BmB,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpAddFormAuthSelect.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","AddFormAuthType","AUTH_TYPES","ReadonlySet","Set","asAuthType","value","has","McpAddFormPrimitiveAuthSelect","Element","select","Props","Omit","props","ref","$","_c","state","setField","t0","e","next","target","t1","children","t2","authType","displayName","_c"],"sources":["../../../src/primitives/addForm/McpAddFormAuthSelect.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm, type AddFormAuthType } from \"./context\";\n\nconst AUTH_TYPES: ReadonlySet<AddFormAuthType> = new Set([\n \"none\",\n \"bearer\",\n \"oauth\",\n]);\n\nfunction asAuthType(value: string): AddFormAuthType | null {\n return (AUTH_TYPES as ReadonlySet<string>).has(value)\n ? (value as AddFormAuthType)\n : null;\n}\n\nexport namespace McpAddFormPrimitiveAuthSelect {\n export type Element = ComponentRef<typeof Primitive.select>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.select>,\n \"value\" | \"onChange\"\n >;\n}\n\nexport const McpAddFormPrimitiveAuthSelect = forwardRef<\n McpAddFormPrimitiveAuthSelect.Element,\n McpAddFormPrimitiveAuthSelect.Props\n>((props, ref) => {\n const { state, setField } = useAddForm();\n return (\n <Primitive.select\n {...props}\n ref={ref}\n value={state.authType}\n onChange={(e) => {\n const next = asAuthType(e.target.value);\n if (next) setField(\"authType\", next);\n }}\n >\n {props.children ?? (\n <>\n <option value=\"oauth\">OAuth</option>\n <option value=\"bearer\">Bearer token</option>\n <option value=\"none\">None</option>\n </>\n )}\n </Primitive.select>\n );\n});\n\nMcpAddFormPrimitiveAuthSelect.displayName = \"McpAddFormPrimitive.AuthSelect\";\n"],"mappings":";;;;;;AAQA,MAAMM,6BAA2C,IAAIE,IAAI;CACvD;CACA;CACA;AAAO,CACR;AAED,SAASC,WAAWC,OAAuC;CACzD,OAAQJ,WAAmCK,IAAID,KAAK,IAC/CA,QACD;AACN;AAUA,MAAaE,gCAAgCV,YAG3Ce,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,aAA4BlB,WAAW;CAAE,IAAAmB;CAAA,IAAAJ,EAAA,OAAAG,UAAA;EAM3BC,MAAAC,MAAA;GACR,MAAAC,OAAahB,WAAWe,EAACE,OAAOhB,KAAM;GACtC,IAAIe,MAAMH,SAAS,YAAYG,IAAI;EAAE;EACtCN,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAF,MAAAW,UAAA;EAEAD,KAAAV,MAAKW,YAAL,qBAAA,UAAA,EAAA,UAAA;GAEG,oBAAA,UAAA;IAAc,OAAA;IAAQ,UAAA;GAAc,CAAA;GACpC,oBAAA,UAAA;IAAc,OAAA;IAAS,UAAA;GAAqB,CAAA;GAC5C,oBAAA,UAAA;IAAc,OAAA;IAAO,UAAA;GAAa,CAAA;EAAA,EAAA,CAAA;EAErCT,EAAA,KAAAF,MAAAW;EAAAT,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAS,YAAAX,EAAA,OAAAI,MAAAJ,EAAA,OAAAQ,IAAA;EAfHE,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMZ;GACCC;GACE,OAAAG,MAAKS;GACF,UAAAP;GAKTI,UAAAA;EAOH,CAAA;EAAmBR,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE,MAAAS;EAAAX,EAAA,KAAAI;EAAAJ,EAAA,KAAAQ;EAAAR,EAAA,KAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OAhBnBU;AAgBmB,CAEtB;AAEDjB,8BAA8BmB,cAAc"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
//#region src/primitives/addForm/McpAddFormBearerTokenField.d.ts
|
|
4
3
|
export declare namespace McpAddFormPrimitiveBearerTokenField {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.input>;
|
|
5
|
+
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.input>, "value" | "onChange" | "type">;
|
|
7
6
|
}
|
|
8
7
|
export declare const McpAddFormPrimitiveBearerTokenField: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveBearerTokenField.Props & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=McpAddFormBearerTokenField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormBearerTokenField.d.ts","
|
|
1
|
+
{"version":3,"file":"McpAddFormBearerTokenField.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormBearerTokenField.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,mCAAmC,CAAC;IACnD,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3D,KAAY,KAAK,GAAG,IAAI,CACtB,wBAAwB,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,EAChD,OAAO,GAAG,UAAU,GAAG,MAAM,CAC9B,CAAC;CACH;AAED,eAAO,MAAM,mCAAmC,wIA0B9C,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useAddForm } from "./context.js";
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
4
5
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/primitives/addForm/McpAddFormBearerTokenField.tsx
|
|
7
7
|
const McpAddFormPrimitiveBearerTokenField = forwardRef((props, ref) => {
|
|
8
8
|
const $ = c(13);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormBearerTokenField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveBearerTokenField","Element","input","Props","Omit","props","ref","$","_c","state","ids","setField","t0","errorField","undefined","t1","error","filter","Boolean","join","t2","e","target","value","t3","bearerToken","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormBearerTokenField.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveBearerTokenField {\n export type Element = ComponentRef<typeof Primitive.input>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.input>,\n \"value\" | \"onChange\" | \"type\"\n >;\n}\n\nexport const McpAddFormPrimitiveBearerTokenField = forwardRef<\n McpAddFormPrimitiveBearerTokenField.Element,\n McpAddFormPrimitiveBearerTokenField.Props\n>((props, ref) => {\n const { state, ids, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"password\"\n {...props}\n aria-invalid={\n props[\"aria-invalid\"] ??\n (state.errorField === \"bearerToken\" ? true : undefined)\n }\n aria-describedby={\n [\n props[\"aria-describedby\"],\n state.errorField === \"bearerToken\" ? ids.error : null,\n ]\n .filter(Boolean)\n .join(\" \") || undefined\n }\n ref={ref}\n value={state.bearerToken}\n onChange={(e) => setField(\"bearerToken\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveBearerTokenField.displayName =\n \"McpAddFormPrimitive.BearerTokenField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,sCAAsCH,YAGjDQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,KAAAC,aAAiCZ,WAAW;CAMtC,MAAAa,KAAAP,MAAM,oBACLI,MAAKI,eAAgB,gBAArB,OAAAC,KAAAA;CAAsD,IAAAC;CAAA,IAAAR,EAAA,OAAAG,OAAAH,EAAA,OAAAF,SAAAE,EAAA,OAAAE,MAAAI,YAAA;EAGvDE,KAAA,CACEV,MAAM,qBACNI,MAAKI,eAAgB,gBAAgBH,IAAGM,QAAxC,IAAqD,CACtD,CAAAC,OACSC,OAAO,CAAC,CAAAC,KACV,GAAgB,KALxBL,KAAAA;EAKyBP,EAAA,KAAAG;EAAAH,EAAA,KAAAF;EAAAE,EAAA,KAAAE,MAAAI;EAAAN,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAI,UAAA;EAIjBS,MAAAC,MAAOV,SAAS,eAAeU,EAACC,OAAOC,KAAM;EAAChB,EAAA,KAAAI;EAAAJ,EAAA,KAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,IAAAiB;CAAA,IAAAjB,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAgB,eAAAlB,EAAA,OAAAK,MAAAL,EAAA,QAAAQ,MAAAR,EAAA,QAAAa,IAAA;EAjB1DI,KAAA,oBAAA,UAAA,OAAA;GACO,MAAA;GAAU,GACXnB;GAEF,gBAAAO;GAIA,oBAAAG;GAOGT;GACE,OAAAG,MAAKgB;GACF,UAAAL;EAA8C,CAAA;EACxDb,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE,MAAAgB;EAAAlB,EAAA,KAAAK;EAAAL,EAAA,MAAAQ;EAAAR,EAAA,MAAAa;EAAAb,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OAlBFiB;AAkBE,CAEL;AAEDxB,oCAAoC0B,cAClC"}
|
|
1
|
+
{"version":3,"file":"McpAddFormBearerTokenField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveBearerTokenField","Element","input","Props","Omit","props","ref","$","_c","state","ids","setField","t0","errorField","undefined","t1","error","filter","Boolean","join","t2","e","target","value","t3","bearerToken","displayName","_c"],"sources":["../../../src/primitives/addForm/McpAddFormBearerTokenField.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveBearerTokenField {\n export type Element = ComponentRef<typeof Primitive.input>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.input>,\n \"value\" | \"onChange\" | \"type\"\n >;\n}\n\nexport const McpAddFormPrimitiveBearerTokenField = forwardRef<\n McpAddFormPrimitiveBearerTokenField.Element,\n McpAddFormPrimitiveBearerTokenField.Props\n>((props, ref) => {\n const { state, ids, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"password\"\n {...props}\n aria-invalid={\n props[\"aria-invalid\"] ??\n (state.errorField === \"bearerToken\" ? true : undefined)\n }\n aria-describedby={\n [\n props[\"aria-describedby\"],\n state.errorField === \"bearerToken\" ? ids.error : null,\n ]\n .filter(Boolean)\n .join(\" \") || undefined\n }\n ref={ref}\n value={state.bearerToken}\n onChange={(e) => setField(\"bearerToken\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveBearerTokenField.displayName =\n \"McpAddFormPrimitive.BearerTokenField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,sCAAsCH,YAGjDQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,KAAAC,aAAiCZ,WAAW;CAMtC,MAAAa,KAAAP,MAAM,oBACLI,MAAKI,eAAgB,gBAArB,OAAAC,KAAAA;CAAsD,IAAAC;CAAA,IAAAR,EAAA,OAAAG,OAAAH,EAAA,OAAAF,SAAAE,EAAA,OAAAE,MAAAI,YAAA;EAGvDE,KAAA,CACEV,MAAM,qBACNI,MAAKI,eAAgB,gBAAgBH,IAAGM,QAAxC,IAAqD,CACtD,CAAAC,OACSC,OAAO,CAAC,CAAAC,KACV,GAAgB,KALxBL,KAAAA;EAKyBP,EAAA,KAAAG;EAAAH,EAAA,KAAAF;EAAAE,EAAA,KAAAE,MAAAI;EAAAN,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAI,UAAA;EAIjBS,MAAAC,MAAOV,SAAS,eAAeU,EAACC,OAAOC,KAAM;EAAChB,EAAA,KAAAI;EAAAJ,EAAA,KAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,IAAAiB;CAAA,IAAAjB,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAgB,eAAAlB,EAAA,OAAAK,MAAAL,EAAA,QAAAQ,MAAAR,EAAA,QAAAa,IAAA;EAjB1DI,KAAA,oBAAA,UAAA,OAAA;GACO,MAAA;GAAU,GACXnB;GAEF,gBAAAO;GAIA,oBAAAG;GAOGT;GACE,OAAAG,MAAKgB;GACF,UAAAL;EAA8C,CAAA;EACxDb,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE,MAAAgB;EAAAlB,EAAA,KAAAK;EAAAL,EAAA,MAAAQ;EAAAR,EAAA,MAAAa;EAAAb,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OAlBFiB;AAkBE,CAEL;AAEDxB,oCAAoC0B,cAClC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
//#region src/primitives/addForm/McpAddFormCancel.d.ts
|
|
4
3
|
export declare namespace McpAddFormPrimitiveCancel {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.button>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
7
6
|
}
|
|
8
7
|
export declare const McpAddFormPrimitiveCancel: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
9
|
-
|
|
8
|
+
asChild?: boolean;
|
|
10
9
|
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
//#endregion
|
|
12
10
|
//# sourceMappingURL=McpAddFormCancel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormCancel.d.ts","
|
|
1
|
+
{"version":3,"file":"McpAddFormCancel.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormCancel.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,yBAAyB,CAAC;IACzC,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5D,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;CACvE;AAED,eAAO,MAAM,yBAAyB;;6DAiBpC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useAddForm } from "./context.js";
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
4
5
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/primitives/addForm/McpAddFormCancel.tsx
|
|
7
7
|
const McpAddFormPrimitiveCancel = forwardRef((props, ref) => {
|
|
8
8
|
const $ = c(7);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormCancel.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveCancel","Element","button","Props","props","ref","$","_c","cancel","t0","e","onClick","defaultPrevented","t1","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormCancel.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveCancel {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpAddFormPrimitiveCancel = forwardRef<\n McpAddFormPrimitiveCancel.Element,\n McpAddFormPrimitiveCancel.Props\n>((props, ref) => {\n const { cancel } = useAddForm();\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n onClick={(e) => {\n props.onClick?.(e);\n if (e.defaultPrevented) return;\n cancel();\n }}\n />\n );\n});\n\nMcpAddFormPrimitiveCancel.displayName = \"McpAddFormPrimitive.Cancel\";\n"],"mappings":";;;;;;AAaA,MAAaK,4BAA4BH,YAGvCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAA,EAAAC,WAAmBT,WAAW;CAAE,IAAAU;CAAA,IAAAH,EAAA,OAAAE,UAAAF,EAAA,OAAAF,OAAA;EAMnBK,MAAAC,MAAA;GACPN,MAAKO,UAAWD,CAAC;GACjB,IAAIA,EAACE,kBAAiB;GACtBJ,OAAO;EAAC;EACTF,EAAA,KAAAE;EAAAF,EAAA,KAAAF;EAAAE,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,IAAA;EARHI,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMT;GACC,MAAA;GACAC;GACI,SAAAI;EAIR,CAAA;EACDH,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OATFO;AASE,CAEL;AAEDb,0BAA0Bc,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpAddFormCancel.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveCancel","Element","button","Props","props","ref","$","_c","cancel","t0","e","onClick","defaultPrevented","t1","displayName","_c"],"sources":["../../../src/primitives/addForm/McpAddFormCancel.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveCancel {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpAddFormPrimitiveCancel = forwardRef<\n McpAddFormPrimitiveCancel.Element,\n McpAddFormPrimitiveCancel.Props\n>((props, ref) => {\n const { cancel } = useAddForm();\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n onClick={(e) => {\n props.onClick?.(e);\n if (e.defaultPrevented) return;\n cancel();\n }}\n />\n );\n});\n\nMcpAddFormPrimitiveCancel.displayName = \"McpAddFormPrimitive.Cancel\";\n"],"mappings":";;;;;;AAaA,MAAaK,4BAA4BH,YAGvCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAA,EAAAC,WAAmBT,WAAW;CAAE,IAAAU;CAAA,IAAAH,EAAA,OAAAE,UAAAF,EAAA,OAAAF,OAAA;EAMnBK,MAAAC,MAAA;GACPN,MAAKO,UAAWD,CAAC;GACjB,IAAIA,EAACE,kBAAiB;GACtBJ,OAAO;EAAC;EACTF,EAAA,KAAAE;EAAAF,EAAA,KAAAF;EAAAE,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,IAAA;EARHI,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMT;GACC,MAAA;GACAC;GACI,SAAAI;EAIR,CAAA;EACDH,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OATFO;AASE,CAEL;AAEDb,0BAA0Bc,cAAc"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
//#region src/primitives/addForm/McpAddFormError.d.ts
|
|
4
3
|
export declare namespace McpAddFormPrimitiveError {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.div>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
7
6
|
}
|
|
8
7
|
export declare const McpAddFormPrimitiveError: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
9
|
-
|
|
8
|
+
asChild?: boolean;
|
|
10
9
|
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
-
//#endregion
|
|
12
10
|
//# sourceMappingURL=McpAddFormError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormError.d.ts","
|
|
1
|
+
{"version":3,"file":"McpAddFormError.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormError.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAGlB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,wBAAwB,CAAC;IACxC,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACzD,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;CACpE;AAED,eAAO,MAAM,wBAAwB;;0DAwBnC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useAddForm } from "./context.js";
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { forwardRef, isValidElement } from "@assistant-ui/tap/react-shim";
|
|
4
5
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/primitives/addForm/McpAddFormError.tsx
|
|
7
7
|
const McpAddFormPrimitiveError = forwardRef((props, ref) => {
|
|
8
8
|
const $ = c(10);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormError.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","isValidElement","Primitive","useAddForm","McpAddFormPrimitiveError","Element","div","Props","props","ref","$","_c","state","ids","error","childId","asChild","children","id","undefined","customId","needsDescriptionWrapper","t0","t1","role","t2","t3","t4","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n isValidElement,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpAddFormPrimitiveError = forwardRef<\n McpAddFormPrimitiveError.Element,\n McpAddFormPrimitiveError.Props\n>((props, ref) => {\n const { state, ids } = useAddForm();\n if (!state.error) return null;\n const childId =\n props.asChild && isValidElement<{ id?: string }>(props.children)\n ? props.children.props.id\n : undefined;\n const customId = childId ?? props.id;\n const needsDescriptionWrapper =\n customId !== undefined && customId !== ids.error;\n const error = (\n <Primitive.div\n {...props}\n id={needsDescriptionWrapper ? props.id : ids.error}\n role={props.role ?? \"alert\"}\n ref={ref}\n >\n {props.children ?? state.error}\n </Primitive.div>\n );\n return needsDescriptionWrapper ? <div id={ids.error}>{error}</div> : error;\n});\n\nMcpAddFormPrimitiveError.displayName = \"McpAddFormPrimitive.Error\";\n"],"mappings":";;;;;;AAcA,MAAaM,2BAA2BJ,YAGtCQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,QAAuBV,WAAW;CAClC,IAAI,CAACS,MAAKE,OAAM,OAAS;CAKzB,MAAAM,YAHEZ,MAAKQ,WAAYf,eAAgCO,MAAKS,QAAS,IAC3DT,MAAKS,SAAST,MAAMU,KADxBC,KAAAA,MAG0BX,MAAKU;CACjC,MAAAG,0BACED,aAAaD,KAAAA,KAAaC,aAAaP,IAAGC;CAIpC,MAAAQ,KAAAD,0BAA0Bb,MAAKU,KAAML,IAAGC;CACtC,MAAAS,KAAAf,MAAKgB,QAAL;CAGL,MAAAC,KAAAjB,MAAKS,YAAaL,MAAKE;CAAM,IAAAY;CAAA,IAAAhB,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAY,MAAAZ,EAAA,OAAAa,MAAAb,EAAA,OAAAe,IAAA;EANhCC,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMlB;GACA,IAAAc;GACE,MAAAC;GACDd;GAEJgB,UAAAA;EACH,CAAA;EAAgBf,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAY;EAAAZ,EAAA,KAAAa;EAAAb,EAAA,KAAAe;EAAAf,EAAA,KAAAgB;CAAA,OAAAA,KAAAhB,EAAA;CARlB,MAAAI,QACEY;CAQA,IAAAC;CAAA,IAAAjB,EAAA,OAAAI,SAAAJ,EAAA,OAAAG,OAAAH,EAAA,OAAAW,yBAAA;EACKM,KAAAN,0BAA0B,oBAAA,OAAA;GAAS,IAAAR,IAAGC;GAASA,UAAAA;EAAY,CAAA,IAA3DA;EAAmEJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAG;EAAAH,EAAA,KAAAW;EAAAX,EAAA,KAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OAAnEiB;AAAmE,CAC3E;AAEDvB,yBAAyBwB,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpAddFormError.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","isValidElement","Primitive","useAddForm","McpAddFormPrimitiveError","Element","div","Props","props","ref","$","_c","state","ids","error","childId","asChild","children","id","undefined","customId","needsDescriptionWrapper","t0","t1","role","t2","t3","t4","displayName","_c"],"sources":["../../../src/primitives/addForm/McpAddFormError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n isValidElement,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpAddFormPrimitiveError = forwardRef<\n McpAddFormPrimitiveError.Element,\n McpAddFormPrimitiveError.Props\n>((props, ref) => {\n const { state, ids } = useAddForm();\n if (!state.error) return null;\n const childId =\n props.asChild && isValidElement<{ id?: string }>(props.children)\n ? props.children.props.id\n : undefined;\n const customId = childId ?? props.id;\n const needsDescriptionWrapper =\n customId !== undefined && customId !== ids.error;\n const error = (\n <Primitive.div\n {...props}\n id={needsDescriptionWrapper ? props.id : ids.error}\n role={props.role ?? \"alert\"}\n ref={ref}\n >\n {props.children ?? state.error}\n </Primitive.div>\n );\n return needsDescriptionWrapper ? <div id={ids.error}>{error}</div> : error;\n});\n\nMcpAddFormPrimitiveError.displayName = \"McpAddFormPrimitive.Error\";\n"],"mappings":";;;;;;AAcA,MAAaM,2BAA2BJ,YAGtCQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,QAAuBV,WAAW;CAClC,IAAI,CAACS,MAAKE,OAAM,OAAS;CAKzB,MAAAM,YAHEZ,MAAKQ,WAAYf,eAAgCO,MAAKS,QAAS,IAC3DT,MAAKS,SAAST,MAAMU,KADxBC,KAAAA,MAG0BX,MAAKU;CACjC,MAAAG,0BACED,aAAaD,KAAAA,KAAaC,aAAaP,IAAGC;CAIpC,MAAAQ,KAAAD,0BAA0Bb,MAAKU,KAAML,IAAGC;CACtC,MAAAS,KAAAf,MAAKgB,QAAL;CAGL,MAAAC,KAAAjB,MAAKS,YAAaL,MAAKE;CAAM,IAAAY;CAAA,IAAAhB,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAY,MAAAZ,EAAA,OAAAa,MAAAb,EAAA,OAAAe,IAAA;EANhCC,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMlB;GACA,IAAAc;GACE,MAAAC;GACDd;GAEJgB,UAAAA;EACH,CAAA;EAAgBf,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAY;EAAAZ,EAAA,KAAAa;EAAAb,EAAA,KAAAe;EAAAf,EAAA,KAAAgB;CAAA,OAAAA,KAAAhB,EAAA;CARlB,MAAAI,QACEY;CAQA,IAAAC;CAAA,IAAAjB,EAAA,OAAAI,SAAAJ,EAAA,OAAAG,OAAAH,EAAA,OAAAW,yBAAA;EACKM,KAAAN,0BAA0B,oBAAA,OAAA;GAAS,IAAAR,IAAGC;GAASA,UAAAA;EAAY,CAAA,IAA3DA;EAAmEJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAG;EAAAH,EAAA,KAAAW;EAAAX,EAAA,KAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OAAnEiB;AAAmE,CAC3E;AAEDvB,yBAAyBwB,cAAc"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
//#region src/primitives/addForm/McpAddFormNameField.d.ts
|
|
4
3
|
export declare namespace McpAddFormPrimitiveNameField {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.input>;
|
|
5
|
+
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.input>, "value" | "onChange" | "type">;
|
|
7
6
|
}
|
|
8
7
|
export declare const McpAddFormPrimitiveNameField: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveNameField.Props & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=McpAddFormNameField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormNameField.d.ts","
|
|
1
|
+
{"version":3,"file":"McpAddFormNameField.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormNameField.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,yBAAiB,4BAA4B,CAAC;IAC5C,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3D,KAAY,KAAK,GAAG,IAAI,CACtB,wBAAwB,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,EAChD,OAAO,GAAG,UAAU,GAAG,MAAM,CAC9B,CAAC;CACH;AAED,eAAO,MAAM,4BAA4B,iIA2BvC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useAddForm } from "./context.js";
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
4
5
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/primitives/addForm/McpAddFormNameField.tsx
|
|
7
7
|
const McpAddFormPrimitiveNameField = forwardRef((props, ref) => {
|
|
8
8
|
const $ = c(13);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormNameField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveNameField","Element","input","Props","Omit","props","ref","$","_c","state","ids","setField","t0","errorField","undefined","t1","error","filter","Boolean","join","t2","e","target","value","t3","name","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormNameField.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveNameField {\n export type Element = ComponentRef<typeof Primitive.input>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.input>,\n \"value\" | \"onChange\" | \"type\"\n >;\n}\n\nexport const McpAddFormPrimitiveNameField = forwardRef<\n McpAddFormPrimitiveNameField.Element,\n McpAddFormPrimitiveNameField.Props\n>((props, ref) => {\n const { state, ids, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"text\"\n placeholder=\"Name\"\n {...props}\n aria-invalid={\n props[\"aria-invalid\"] ??\n (state.errorField === \"name\" ? true : undefined)\n }\n aria-describedby={\n [\n props[\"aria-describedby\"],\n state.errorField === \"name\" ? ids.error : null,\n ]\n .filter(Boolean)\n .join(\" \") || undefined\n }\n ref={ref}\n value={state.name}\n onChange={(e) => setField(\"name\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveNameField.displayName = \"McpAddFormPrimitive.NameField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,+BAA+BH,YAG1CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,KAAAC,aAAiCZ,WAAW;CAOtC,MAAAa,KAAAP,MAAM,oBACLI,MAAKI,eAAgB,SAArB,OAAAC,KAAAA;CAA+C,IAAAC;CAAA,IAAAR,EAAA,OAAAG,OAAAH,EAAA,OAAAF,SAAAE,EAAA,OAAAE,MAAAI,YAAA;EAGhDE,KAAA,CACEV,MAAM,qBACNI,MAAKI,eAAgB,SAASH,IAAGM,QAAjC,IAA8C,CAC/C,CAAAC,OACSC,OAAO,CAAC,CAAAC,KACV,GAAgB,KALxBL,KAAAA;EAKyBP,EAAA,KAAAG;EAAAH,EAAA,KAAAF;EAAAE,EAAA,KAAAE,MAAAI;EAAAN,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAI,UAAA;EAIjBS,MAAAC,MAAOV,SAAS,QAAQU,EAACC,OAAOC,KAAM;EAAChB,EAAA,KAAAI;EAAAJ,EAAA,KAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,IAAAiB;CAAA,IAAAjB,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAgB,QAAAlB,EAAA,OAAAK,MAAAL,EAAA,QAAAQ,MAAAR,EAAA,QAAAa,IAAA;EAlBnDI,KAAA,oBAAA,UAAA,OAAA;GACO,MAAA;GACO,aAAA;GAAM,GACdnB;GAEF,gBAAAO;GAIA,oBAAAG;GAOGT;GACE,OAAAG,MAAKgB;GACF,UAAAL;EAAuC,CAAA;EACjDb,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE,MAAAgB;EAAAlB,EAAA,KAAAK;EAAAL,EAAA,MAAAQ;EAAAR,EAAA,MAAAa;EAAAb,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OAnBFiB;AAmBE,CAEL;AAEDxB,6BAA6B0B,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpAddFormNameField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveNameField","Element","input","Props","Omit","props","ref","$","_c","state","ids","setField","t0","errorField","undefined","t1","error","filter","Boolean","join","t2","e","target","value","t3","name","displayName","_c"],"sources":["../../../src/primitives/addForm/McpAddFormNameField.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveNameField {\n export type Element = ComponentRef<typeof Primitive.input>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.input>,\n \"value\" | \"onChange\" | \"type\"\n >;\n}\n\nexport const McpAddFormPrimitiveNameField = forwardRef<\n McpAddFormPrimitiveNameField.Element,\n McpAddFormPrimitiveNameField.Props\n>((props, ref) => {\n const { state, ids, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"text\"\n placeholder=\"Name\"\n {...props}\n aria-invalid={\n props[\"aria-invalid\"] ??\n (state.errorField === \"name\" ? true : undefined)\n }\n aria-describedby={\n [\n props[\"aria-describedby\"],\n state.errorField === \"name\" ? ids.error : null,\n ]\n .filter(Boolean)\n .join(\" \") || undefined\n }\n ref={ref}\n value={state.name}\n onChange={(e) => setField(\"name\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveNameField.displayName = \"McpAddFormPrimitive.NameField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,+BAA+BH,YAG1CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,KAAAC,aAAiCZ,WAAW;CAOtC,MAAAa,KAAAP,MAAM,oBACLI,MAAKI,eAAgB,SAArB,OAAAC,KAAAA;CAA+C,IAAAC;CAAA,IAAAR,EAAA,OAAAG,OAAAH,EAAA,OAAAF,SAAAE,EAAA,OAAAE,MAAAI,YAAA;EAGhDE,KAAA,CACEV,MAAM,qBACNI,MAAKI,eAAgB,SAASH,IAAGM,QAAjC,IAA8C,CAC/C,CAAAC,OACSC,OAAO,CAAC,CAAAC,KACV,GAAgB,KALxBL,KAAAA;EAKyBP,EAAA,KAAAG;EAAAH,EAAA,KAAAF;EAAAE,EAAA,KAAAE,MAAAI;EAAAN,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAI,UAAA;EAIjBS,MAAAC,MAAOV,SAAS,QAAQU,EAACC,OAAOC,KAAM;EAAChB,EAAA,KAAAI;EAAAJ,EAAA,KAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,I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