@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
|
@@ -1,18 +1,16 @@
|
|
|
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/McpAddFormRoot.d.ts
|
|
4
3
|
export declare namespace McpAddFormPrimitiveRoot {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.form>;
|
|
5
|
+
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.form>, "onSubmit"> & {
|
|
6
|
+
onSubmitted?: (id: string) => void;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
};
|
|
10
9
|
}
|
|
11
10
|
export declare const McpAddFormPrimitiveRoot: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLFormElement> & import("react").FormHTMLAttributes<HTMLFormElement> & {
|
|
12
|
-
|
|
11
|
+
asChild?: boolean;
|
|
13
12
|
}, "ref">, "onSubmit"> & {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
onSubmitted?: (id: string) => void;
|
|
14
|
+
onCancel?: () => void;
|
|
16
15
|
} & import("react").RefAttributes<HTMLFormElement>>;
|
|
17
|
-
//#endregion
|
|
18
16
|
//# sourceMappingURL=McpAddFormRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormRoot.d.ts","
|
|
1
|
+
{"version":3,"file":"McpAddFormRoot.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAOlB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAoCtD,yBAAiB,uBAAuB,CAAC;IACvC,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;IAC1D,KAAY,KAAK,GAAG,IAAI,CACtB,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,EAC/C,UAAU,CACX,GAAG;QACF,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;QACnC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;KACvB,CAAC;CACH;AAED,eAAO,MAAM,uBAAuB;;;kBALlB,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;eACvB,MAAM,IAAI;mDAiIvB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AddFormContext } from "./context.js";
|
|
2
1
|
import { invokeMcpCallback } from "../../utils/invokeMcpCallback.js";
|
|
2
|
+
import { AddFormContext } from "./context.js";
|
|
3
3
|
import { useAui } from "@assistant-ui/store";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { forwardRef, useCallback, useId, useMemo, useState } from "@assistant-ui/tap/react-shim";
|
|
5
6
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/primitives/addForm/McpAddFormRoot.tsx
|
|
8
8
|
const INITIAL = {
|
|
9
9
|
name: "",
|
|
@@ -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/McpAddFormScopesField.d.ts
|
|
4
3
|
export declare namespace McpAddFormPrimitiveScopesField {
|
|
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 McpAddFormPrimitiveScopesField: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveScopesField.Props & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=McpAddFormScopesField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormScopesField.d.ts","
|
|
1
|
+
{"version":3,"file":"McpAddFormScopesField.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormScopesField.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,8BAA8B,CAAC;IAC9C,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,8BAA8B,mIAezC,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/McpAddFormScopesField.tsx
|
|
7
7
|
const McpAddFormPrimitiveScopesField = forwardRef((props, ref) => {
|
|
8
8
|
const $ = c(7);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormScopesField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveScopesField","Element","input","Props","Omit","props","ref","$","_c","state","setField","t0","e","target","value","t1","scopes","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormScopesField.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 McpAddFormPrimitiveScopesField {\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 McpAddFormPrimitiveScopesField = forwardRef<\n McpAddFormPrimitiveScopesField.Element,\n McpAddFormPrimitiveScopesField.Props\n>((props, ref) => {\n const { state, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"text\"\n placeholder=\"Scopes (space-separated, optional)\"\n {...props}\n ref={ref}\n value={state.scopes}\n onChange={(e) => setField(\"scopes\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveScopesField.displayName = \"McpAddFormPrimitive.ScopesField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,iCAAiCH,YAG5CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAA,EAAAC,OAAAC,aAA4BX,WAAW;CAAE,IAAAY;CAAA,IAAAJ,EAAA,OAAAG,UAAA;EAQ3BC,MAAAC,MAAOF,SAAS,UAAUE,EAACC,OAAOC,KAAM;EAACP,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAO,UAAAT,EAAA,OAAAI,IAAA;EANrDI,KAAA,oBAAA,UAAA,OAAA;GACO,MAAA;GACO,aAAA;GAAoC,GAC5CV;GACCC;GACE,OAAAG,MAAKO;GACF,UAAAL;EAAyC,CAAA;EACnDJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE,MAAAO;EAAAT,EAAA,KAAAI;EAAAJ,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OAPFQ;AAOE,CAEL;AAEDf,+BAA+BiB,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpAddFormScopesField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveScopesField","Element","input","Props","Omit","props","ref","$","_c","state","setField","t0","e","target","value","t1","scopes","displayName","_c"],"sources":["../../../src/primitives/addForm/McpAddFormScopesField.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 McpAddFormPrimitiveScopesField {\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 McpAddFormPrimitiveScopesField = forwardRef<\n McpAddFormPrimitiveScopesField.Element,\n McpAddFormPrimitiveScopesField.Props\n>((props, ref) => {\n const { state, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"text\"\n placeholder=\"Scopes (space-separated, optional)\"\n {...props}\n ref={ref}\n value={state.scopes}\n onChange={(e) => setField(\"scopes\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveScopesField.displayName = \"McpAddFormPrimitive.ScopesField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,iCAAiCH,YAG5CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAA,EAAAC,OAAAC,aAA4BX,WAAW;CAAE,IAAAY;CAAA,IAAAJ,EAAA,OAAAG,UAAA;EAQ3BC,MAAAC,MAAOF,SAAS,UAAUE,EAACC,OAAOC,KAAM;EAACP,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAO,UAAAT,EAAA,OAAAI,IAAA;EANrDI,KAAA,oBAAA,UAAA,OAAA;GACO,MAAA;GACO,aAAA;GAAoC,GAC5CV;GACCC;GACE,OAAAG,MAAKO;GACF,UAAAL;EAAyC,CAAA;EACnDJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE,MAAAO;EAAAT,EAAA,KAAAI;EAAAJ,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OAPFQ;AAOE,CAEL;AAEDf,+BAA+BiB,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/McpAddFormSubmit.d.ts
|
|
4
3
|
export declare namespace McpAddFormPrimitiveSubmit {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.button>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
7
6
|
}
|
|
8
7
|
export declare const McpAddFormPrimitiveSubmit: 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=McpAddFormSubmit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormSubmit.d.ts","
|
|
1
|
+
{"version":3,"file":"McpAddFormSubmit.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormSubmit.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;;6DAcpC,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/McpAddFormSubmit.tsx
|
|
7
7
|
const McpAddFormPrimitiveSubmit = forwardRef((props, ref) => {
|
|
8
8
|
const $ = c(5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormSubmit.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveSubmit","Element","button","Props","props","ref","$","_c","state","t0","disabled","submitting","t1","undefined","t2","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormSubmit.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 McpAddFormPrimitiveSubmit {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpAddFormPrimitiveSubmit = forwardRef<\n McpAddFormPrimitiveSubmit.Element,\n McpAddFormPrimitiveSubmit.Props\n>((props, ref) => {\n const { state } = useAddForm();\n return (\n <Primitive.button\n type=\"submit\"\n {...props}\n ref={ref}\n disabled={props.disabled || state.submitting}\n data-submitting={state.submitting || undefined}\n />\n );\n});\n\nMcpAddFormPrimitiveSubmit.displayName = \"McpAddFormPrimitive.Submit\";\n"],"mappings":";;;;;;AAaA,MAAaK,4BAA4BH,YAGvCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAA,EAAAC,UAAkBT,WAAW;CAMf,MAAAU,KAAAL,MAAKM,YAAaF,MAAKG;CAChB,MAAAC,KAAAJ,MAAKG,cAALE,KAAAA;CAA6B,IAAAC;CAAA,IAAAR,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAM,IAAA;EALhDE,KAAA,oBAAA,UAAA,QAAA;GACO,MAAA;GAAQ,GACTV;GACCC;GACK,UAAAI;GACO,mBAAAG;EAA6B,CAAA;EAC9CN,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANFQ;AAME,CAEL;AAEDd,0BAA0Be,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpAddFormSubmit.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveSubmit","Element","button","Props","props","ref","$","_c","state","t0","disabled","submitting","t1","undefined","t2","displayName","_c"],"sources":["../../../src/primitives/addForm/McpAddFormSubmit.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 McpAddFormPrimitiveSubmit {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpAddFormPrimitiveSubmit = forwardRef<\n McpAddFormPrimitiveSubmit.Element,\n McpAddFormPrimitiveSubmit.Props\n>((props, ref) => {\n const { state } = useAddForm();\n return (\n <Primitive.button\n type=\"submit\"\n {...props}\n ref={ref}\n disabled={props.disabled || state.submitting}\n data-submitting={state.submitting || undefined}\n />\n );\n});\n\nMcpAddFormPrimitiveSubmit.displayName = \"McpAddFormPrimitive.Submit\";\n"],"mappings":";;;;;;AAaA,MAAaK,4BAA4BH,YAGvCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAA,EAAAC,UAAkBT,WAAW;CAMf,MAAAU,KAAAL,MAAKM,YAAaF,MAAKG;CAChB,MAAAC,KAAAJ,MAAKG,cAALE,KAAAA;CAA6B,IAAAC;CAAA,IAAAR,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAM,IAAA;EALhDE,KAAA,oBAAA,UAAA,QAAA;GACO,MAAA;GAAQ,GACTV;GACCC;GACK,UAAAI;GACO,mBAAAG;EAA6B,CAAA;EAC9CN,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANFQ;AAME,CAEL;AAEDd,0BAA0Be,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/McpAddFormUrlField.d.ts
|
|
4
3
|
export declare namespace McpAddFormPrimitiveUrlField {
|
|
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 McpAddFormPrimitiveUrlField: import("react").ForwardRefExoticComponent<McpAddFormPrimitiveUrlField.Props & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=McpAddFormUrlField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormUrlField.d.ts","
|
|
1
|
+
{"version":3,"file":"McpAddFormUrlField.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/McpAddFormUrlField.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,2BAA2B,CAAC;IAC3C,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,2BAA2B,gIA2BtC,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/McpAddFormUrlField.tsx
|
|
7
7
|
const McpAddFormPrimitiveUrlField = forwardRef((props, ref) => {
|
|
8
8
|
const $ = c(13);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpAddFormUrlField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveUrlField","Element","input","Props","Omit","props","ref","$","_c","state","ids","setField","t0","errorField","undefined","t1","error","filter","Boolean","join","t2","e","target","value","t3","url","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormUrlField.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 McpAddFormPrimitiveUrlField {\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 McpAddFormPrimitiveUrlField = forwardRef<\n McpAddFormPrimitiveUrlField.Element,\n McpAddFormPrimitiveUrlField.Props\n>((props, ref) => {\n const { state, ids, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"url\"\n inputMode=\"url\"\n placeholder=\"https://example.com/mcp\"\n {...props}\n aria-invalid={\n props[\"aria-invalid\"] ?? (state.errorField === \"url\" ? true : undefined)\n }\n aria-describedby={\n [\n props[\"aria-describedby\"],\n state.errorField === \"url\" ? ids.error : null,\n ]\n .filter(Boolean)\n .join(\" \") || undefined\n }\n ref={ref}\n value={state.url}\n onChange={(e) => setField(\"url\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveUrlField.displayName = \"McpAddFormPrimitive.UrlField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,8BAA8BH,YAGzCQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,KAAAC,aAAiCZ,WAAW;CAQtC,MAAAa,KAAAP,MAAM,oBAAoBI,MAAKI,eAAgB,QAArB,OAAAC,KAAAA;CAA8C,IAAAC;CAAA,IAAAR,EAAA,OAAAG,OAAAH,EAAA,OAAAF,SAAAE,EAAA,OAAAE,MAAAI,YAAA;EAGxEE,KAAA,CACEV,MAAM,qBACNI,MAAKI,eAAgB,QAAQH,IAAGM,QAAhC,IAA6C,CAC9C,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,OAAOU,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,OAAAlB,EAAA,OAAAK,MAAAL,EAAA,QAAAQ,MAAAR,EAAA,QAAAa,IAAA;EAlBlDI,KAAA,oBAAA,UAAA,OAAA;GACO,MAAA;GACK,WAAA;GACE,aAAA;GAAyB,GACjCnB;GAEF,gBAAAO;GAGA,oBAAAG;GAOGT;GACE,OAAAG,MAAKgB;GACF,UAAAL;EAAsC,CAAA;EAChDb,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,4BAA4B0B,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpAddFormUrlField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveUrlField","Element","input","Props","Omit","props","ref","$","_c","state","ids","setField","t0","errorField","undefined","t1","error","filter","Boolean","join","t2","e","target","value","t3","url","displayName","_c"],"sources":["../../../src/primitives/addForm/McpAddFormUrlField.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 McpAddFormPrimitiveUrlField {\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 McpAddFormPrimitiveUrlField = forwardRef<\n McpAddFormPrimitiveUrlField.Element,\n McpAddFormPrimitiveUrlField.Props\n>((props, ref) => {\n const { state, ids, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"url\"\n inputMode=\"url\"\n placeholder=\"https://example.com/mcp\"\n {...props}\n aria-invalid={\n props[\"aria-invalid\"] ?? (state.errorField === \"url\" ? true : undefined)\n }\n aria-describedby={\n [\n props[\"aria-describedby\"],\n state.errorField === \"url\" ? ids.error : null,\n ]\n .filter(Boolean)\n .join(\" \") || undefined\n }\n ref={ref}\n value={state.url}\n onChange={(e) => setField(\"url\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveUrlField.displayName = \"McpAddFormPrimitive.UrlField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,8BAA8BH,YAGzCQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,OAAAC,KAAAC,aAAiCZ,WAAW;CAQtC,MAAAa,KAAAP,MAAM,oBAAoBI,MAAKI,eAAgB,QAArB,OAAAC,KAAAA;CAA8C,IAAAC;CAAA,IAAAR,EAAA,OAAAG,OAAAH,EAAA,OAAAF,SAAAE,EAAA,OAAAE,MAAAI,YAAA;EAGxEE,KAAA,CACEV,MAAM,qBACNI,MAAKI,eAAgB,QAAQH,IAAGM,QAAhC,IAA6C,CAC9C,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,OAAOU,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,OAAAlB,EAAA,OAAAK,MAAAL,EAAA,QAAAQ,MAAAR,EAAA,QAAAa,IAAA;EAlBlDI,KAAA,oBAAA,UAAA,OAAA;GACO,MAAA;GACK,WAAA;GACE,aAAA;GAAyB,GACjCnB;GAEF,gBAAAO;GAGA,oBAAAG;GAOGT;GACE,OAAAG,MAAKgB;GACF,UAAAL;EAAsC,CAAA;EAChDb,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,4BAA4B0B,cAAc"}
|
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
import { MCPAuthConfig } from "../../mcp-scope.js";
|
|
2
|
-
//#region src/primitives/addForm/context.d.ts
|
|
1
|
+
import type { MCPAuthConfig } from "../../mcp-scope.js";
|
|
3
2
|
export type AddFormAuthType = MCPAuthConfig["type"];
|
|
4
3
|
export type AddFormErrorField = "name" | "url" | "bearerToken" | "form" | null;
|
|
5
4
|
export type AddFormFieldIds = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
bearerToken: string;
|
|
6
|
+
scopes: string;
|
|
7
|
+
error: string;
|
|
9
8
|
};
|
|
10
9
|
export type AddFormState = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
name: string;
|
|
11
|
+
url: string;
|
|
12
|
+
authType: AddFormAuthType;
|
|
13
|
+
bearerToken: string;
|
|
14
|
+
scopes: string;
|
|
15
|
+
submitting: boolean;
|
|
16
|
+
error: string | null;
|
|
17
|
+
errorField: AddFormErrorField;
|
|
19
18
|
};
|
|
20
19
|
export type AddFormContextValue = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
state: AddFormState;
|
|
21
|
+
ids: AddFormFieldIds;
|
|
22
|
+
setField: <K extends keyof AddFormState>(key: K, value: AddFormState[K]) => void;
|
|
23
|
+
reset: () => void;
|
|
24
|
+
submit: () => Promise<void>;
|
|
25
|
+
cancel: () => void;
|
|
27
26
|
};
|
|
28
27
|
export declare const AddFormContext: import("react").Context<AddFormContextValue | null>;
|
|
29
28
|
export declare const useAddForm: () => AddFormContextValue;
|
|
30
|
-
//#endregion
|
|
31
29
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/primitives/addForm/context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,2BAAwB;AAErD,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,KAAK,GAAG,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC;AAE/E,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,iBAAiB,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,YAAY,CAAC;IACpB,GAAG,EAAE,eAAe,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,SAAS,MAAM,YAAY,EACrC,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,KACnB,IAAI,CAAC;IACV,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,cAAc,qDAAkD,CAAC;AAE9E,eAAO,MAAM,UAAU,QAAO,mBAQ7B,CAAC"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
declare namespace addForm_d_exports {
|
|
12
|
-
export { McpAddFormPrimitiveAuthFields as AuthFields, McpAddFormPrimitiveAuthSelect as AuthSelect, McpAddFormPrimitiveBearerTokenField as BearerTokenField, McpAddFormPrimitiveCancel as Cancel, McpAddFormPrimitiveError as Error, McpAddFormPrimitiveNameField as NameField, McpAddFormPrimitiveRoot as Root, McpAddFormPrimitiveScopesField as ScopesField, McpAddFormPrimitiveSubmit as Submit, McpAddFormPrimitiveUrlField as UrlField };
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { McpAddFormPrimitiveAuthFields as AuthFields, McpAddFormPrimitiveAuthSelect as AuthSelect, McpAddFormPrimitiveBearerTokenField as BearerTokenField, McpAddFormPrimitiveCancel as Cancel, McpAddFormPrimitiveError as Error, McpAddFormPrimitiveNameField as NameField, McpAddFormPrimitiveRoot as Root, McpAddFormPrimitiveScopesField as ScopesField, McpAddFormPrimitiveSubmit as Submit, McpAddFormPrimitiveUrlField as UrlField, addForm_d_exports };
|
|
1
|
+
export { McpAddFormPrimitiveRoot as Root } from "./addForm/McpAddFormRoot.js";
|
|
2
|
+
export { McpAddFormPrimitiveNameField as NameField } from "./addForm/McpAddFormNameField.js";
|
|
3
|
+
export { McpAddFormPrimitiveUrlField as UrlField } from "./addForm/McpAddFormUrlField.js";
|
|
4
|
+
export { McpAddFormPrimitiveAuthSelect as AuthSelect } from "./addForm/McpAddFormAuthSelect.js";
|
|
5
|
+
export { McpAddFormPrimitiveAuthFields as AuthFields } from "./addForm/McpAddFormAuthFields.js";
|
|
6
|
+
export { McpAddFormPrimitiveBearerTokenField as BearerTokenField } from "./addForm/McpAddFormBearerTokenField.js";
|
|
7
|
+
export { McpAddFormPrimitiveScopesField as ScopesField } from "./addForm/McpAddFormScopesField.js";
|
|
8
|
+
export { McpAddFormPrimitiveSubmit as Submit } from "./addForm/McpAddFormSubmit.js";
|
|
9
|
+
export { McpAddFormPrimitiveCancel as Cancel } from "./addForm/McpAddFormCancel.js";
|
|
10
|
+
export { McpAddFormPrimitiveError as Error } from "./addForm/McpAddFormError.js";
|
|
16
11
|
//# sourceMappingURL=addForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addForm.d.ts","
|
|
1
|
+
{"version":3,"file":"addForm.d.ts","sourceRoot":"","sources":["../../src/primitives/addForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,IAAI,IAAI,EAAE,oCAAiC;AAC3E,OAAO,EAAE,4BAA4B,IAAI,SAAS,EAAE,yCAAsC;AAC1F,OAAO,EAAE,2BAA2B,IAAI,QAAQ,EAAE,wCAAqC;AACvF,OAAO,EAAE,6BAA6B,IAAI,UAAU,EAAE,0CAAuC;AAC7F,OAAO,EAAE,6BAA6B,IAAI,UAAU,EAAE,0CAAuC;AAC7F,OAAO,EAAE,mCAAmC,IAAI,gBAAgB,EAAE,gDAA6C;AAC/G,OAAO,EAAE,8BAA8B,IAAI,WAAW,EAAE,2CAAwC;AAChG,OAAO,EAAE,yBAAyB,IAAI,MAAM,EAAE,sCAAmC;AACjF,OAAO,EAAE,yBAAyB,IAAI,MAAM,EAAE,sCAAmC;AACjF,OAAO,EAAE,wBAAwB,IAAI,KAAK,EAAE,qCAAkC"}
|
|
@@ -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/elicitation/McpElicitationPrimitiveAccept.d.ts
|
|
4
3
|
export declare namespace McpElicitationPrimitiveAccept {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.button>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
7
6
|
}
|
|
8
7
|
export declare const McpElicitationPrimitiveAccept: 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=McpElicitationPrimitiveAccept.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveAccept.d.ts","
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveAccept.d.ts","sourceRoot":"","sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveAccept.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAKtD,yBAAiB,6BAA6B,CAAC;IAC7C,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,6BAA6B;;6DA8BxC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useElicitationContext } from "./context.js";
|
|
2
2
|
import { prepareElicitationContent } from "./prepareElicitationContent.js";
|
|
3
|
-
import { useAui } from "@assistant-ui/store";
|
|
4
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
|
+
import { useAui } from "@assistant-ui/store";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
6
7
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/primitives/elicitation/McpElicitationPrimitiveAccept.tsx
|
|
9
9
|
const McpElicitationPrimitiveAccept = forwardRef((props, ref) => {
|
|
10
10
|
const $ = c(30);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveAccept.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useElicitationContext","prepareElicitationContent","McpElicitationPrimitiveAccept","Element","button","Props","props","ref","$","_c","elicitation","draft","aui","T0","content","hasInvalid","hasMissingRequired","t0","t1","t2","t3","t4","t5","requestedSchema","t6","missingRequired","invalid","length","disabled","undefined","join","id","event","onClick","defaultPrevented","mcpServer","answerElicitation","action","t7","displayName"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveAccept.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { useElicitationContext } from \"./context\";\nimport { prepareElicitationContent } from \"./prepareElicitationContent\";\n\nexport namespace McpElicitationPrimitiveAccept {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpElicitationPrimitiveAccept = forwardRef<\n McpElicitationPrimitiveAccept.Element,\n McpElicitationPrimitiveAccept.Props\n>((props, ref) => {\n const { elicitation, draft } = useElicitationContext();\n const aui = useAui();\n const { content, missingRequired, invalid } = prepareElicitationContent(\n elicitation.requestedSchema,\n draft,\n );\n const hasMissingRequired = missingRequired.length > 0;\n const hasInvalid = invalid.length > 0;\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n disabled={props.disabled || hasMissingRequired || hasInvalid}\n data-missing-required={hasMissingRequired ? \"\" : undefined}\n data-invalid={hasInvalid ? invalid.join(\",\") : undefined}\n onClick={(event) => {\n props.onClick?.(event);\n if (event.defaultPrevented || hasMissingRequired || hasInvalid) return;\n aui.mcpServer.answerElicitation(elicitation.id, {\n action: \"accept\",\n content,\n });\n }}\n />\n );\n});\n\nMcpElicitationPrimitiveAccept.displayName = \"McpElicitationPrimitive.Accept\";\n"],"mappings":";;;;;;;;AAeA,MAAaO,gCAAgCL,YAG3CS,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,aAAAC,UAA+BX,sBAAsB;CACrD,MAAAY,MAAYb,OAAO;CAAE,IAAAc;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAd,EAAA,OAAAG,SAAAH,EAAA,OAAAE,YAAAa,mBAAAf,EAAA,OAAAF,SAAAE,EAAA,OAAAD,KAAA;EACrB,MAAA,EAAAO,SAAAU,IAAAC,iBAAAC,YAA8CzB,0BAC5CS,YAAWa,iBACXZ,KACF;EAHAG,UAAAU;EAIAR,qBAA2BS,gBAAeE,SAAU;EACpDZ,aAAmBW,QAAOC,SAAU;EAEjCd,KAAAf,UAASM;EACJE,KAAAA;EACCY,KAAA;EACAX,KAAAA;EACKa,KAAAd,MAAKsB,YAALZ,sBAAAD;EACaM,KAAAL,qBAAA,KAAAa,KAAAA;EACTP,KAAAP,aAAaW,QAAOI,KAAM,GAAe,IAAzCD,KAAAA;EAA0CrB,EAAA,KAAAG;EAAAH,EAAA,KAAAE,YAAAa;EAAAf,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;EAAAR,EAAA,KAAAS;EAAAT,EAAA,KAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAY;EAAAZ,EAAA,MAAAa;EAAAb,EAAA,MAAAc;CAAA,OAAA;EAAAT,KAAAL,EAAA;EAAAM,UAAAN,EAAA;EAAAO,aAAAP,EAAA;EAAAQ,qBAAAR,EAAA;EAAAS,KAAAT,EAAA;EAAAU,KAAAV,EAAA;EAAAW,KAAAX,EAAA;EAAAY,KAAAZ,EAAA;EAAAa,KAAAb,EAAA;EAAAc,KAAAd,EAAA;CAAA;CAAA,IAAAgB;CAAA,IAAAhB,EAAA,QAAAI,OAAAJ,EAAA,QAAAM,WAAAN,EAAA,QAAAE,YAAAqB,MAAAvB,EAAA,QAAAO,cAAAP,EAAA,QAAAQ,sBAAAR,EAAA,QAAAF,OAAA;EAC/CkB,MAAAQ,UAAA;GACP1B,MAAK2B,UAAWD,KAAK;GACrB,IAAIA,MAAKE,oBAALlB,sBAAAD,YAA0D;GAC9DH,IAAGuB,UAAUC,kBAAmB1B,YAAWqB,IAAK;IAAAM,QACtC;IAAQvB;GAElB,CAAC;EAAC;EACHN,EAAA,MAAAI;EAAAJ,EAAA,MAAAM;EAAAN,EAAA,MAAAE,YAAAqB;EAAAvB,EAAA,MAAAO;EAAAP,EAAA,MAAAQ;EAAAR,EAAA,MAAAF;EAAAE,EAAA,MAAAgB;CAAA,OAAAA,KAAAhB,EAAA;CAAA,IAAA8B;CAAA,IAAA9B,EAAA,QAAAK,MAAAL,EAAA,QAAAS,MAAAT,EAAA,QAAAU,MAAAV,EAAA,QAAAW,MAAAX,EAAA,QAAAY,MAAAZ,EAAA,QAAAa,MAAAb,EAAA,QAAAc,MAAAd,EAAA,QAAAgB,IAAA;EAdHc,KAAA,oBAAC,IAAD;GAAiB,GACXhC;GACC,MAAAY;GACAX,KAAAA;GACK,UAAAa;GACa,yBAAAC;GACT,gBAAAC;GACL,SAAAE;EAOR,CAAA;EACDhB,EAAA,MAAAK;EAAAL,EAAA,MAAAS;EAAAT,EAAA,MAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAY;EAAAZ,EAAA,MAAAa;EAAAb,EAAA,MAAAc;EAAAd,EAAA,MAAAgB;EAAAhB,EAAA,MAAA8B;CAAA,OAAAA,KAAA9B,EAAA;CAAA,OAfF8B;AAeE,CAEL;AAEDpC,8BAA8BqC,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveAccept.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useElicitationContext","prepareElicitationContent","McpElicitationPrimitiveAccept","Element","button","Props","props","ref","$","_c","elicitation","draft","aui","T0","content","hasInvalid","hasMissingRequired","t0","t1","t2","t3","t4","t5","requestedSchema","t6","missingRequired","invalid","length","disabled","undefined","join","id","event","onClick","defaultPrevented","mcpServer","answerElicitation","action","t7","displayName","_c"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveAccept.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { useElicitationContext } from \"./context\";\nimport { prepareElicitationContent } from \"./prepareElicitationContent\";\n\nexport namespace McpElicitationPrimitiveAccept {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpElicitationPrimitiveAccept = forwardRef<\n McpElicitationPrimitiveAccept.Element,\n McpElicitationPrimitiveAccept.Props\n>((props, ref) => {\n const { elicitation, draft } = useElicitationContext();\n const aui = useAui();\n const { content, missingRequired, invalid } = prepareElicitationContent(\n elicitation.requestedSchema,\n draft,\n );\n const hasMissingRequired = missingRequired.length > 0;\n const hasInvalid = invalid.length > 0;\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n disabled={props.disabled || hasMissingRequired || hasInvalid}\n data-missing-required={hasMissingRequired ? \"\" : undefined}\n data-invalid={hasInvalid ? invalid.join(\",\") : undefined}\n onClick={(event) => {\n props.onClick?.(event);\n if (event.defaultPrevented || hasMissingRequired || hasInvalid) return;\n aui.mcpServer.answerElicitation(elicitation.id, {\n action: \"accept\",\n content,\n });\n }}\n />\n );\n});\n\nMcpElicitationPrimitiveAccept.displayName = \"McpElicitationPrimitive.Accept\";\n"],"mappings":";;;;;;;;AAeA,MAAaO,gCAAgCL,YAG3CS,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACA,MAAA,EAAAC,aAAAC,UAA+BX,sBAAsB;CACrD,MAAAY,MAAYb,OAAO;CAAE,IAAAc;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAd,EAAA,OAAAG,SAAAH,EAAA,OAAAE,YAAAa,mBAAAf,EAAA,OAAAF,SAAAE,EAAA,OAAAD,KAAA;EACrB,MAAA,EAAAO,SAAAU,IAAAC,iBAAAC,YAA8CzB,0BAC5CS,YAAWa,iBACXZ,KACF;EAHAG,UAAAU;EAIAR,qBAA2BS,gBAAeE,SAAU;EACpDZ,aAAmBW,QAAOC,SAAU;EAEjCd,KAAAf,UAASM;EACJE,KAAAA;EACCY,KAAA;EACAX,KAAAA;EACKa,KAAAd,MAAKsB,YAALZ,sBAAAD;EACaM,KAAAL,qBAAA,KAAAa,KAAAA;EACTP,KAAAP,aAAaW,QAAOI,KAAM,GAAe,IAAzCD,KAAAA;EAA0CrB,EAAA,KAAAG;EAAAH,EAAA,KAAAE,YAAAa;EAAAf,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;EAAAR,EAAA,KAAAS;EAAAT,EAAA,KAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAY;EAAAZ,EAAA,MAAAa;EAAAb,EAAA,MAAAc;CAAA,OAAA;EAAAT,KAAAL,EAAA;EAAAM,UAAAN,EAAA;EAAAO,aAAAP,EAAA;EAAAQ,qBAAAR,EAAA;EAAAS,KAAAT,EAAA;EAAAU,KAAAV,EAAA;EAAAW,KAAAX,EAAA;EAAAY,KAAAZ,EAAA;EAAAa,KAAAb,EAAA;EAAAc,KAAAd,EAAA;CAAA;CAAA,IAAAgB;CAAA,IAAAhB,EAAA,QAAAI,OAAAJ,EAAA,QAAAM,WAAAN,EAAA,QAAAE,YAAAqB,MAAAvB,EAAA,QAAAO,cAAAP,EAAA,QAAAQ,sBAAAR,EAAA,QAAAF,OAAA;EAC/CkB,MAAAQ,UAAA;GACP1B,MAAK2B,UAAWD,KAAK;GACrB,IAAIA,MAAKE,oBAALlB,sBAAAD,YAA0D;GAC9DH,IAAGuB,UAAUC,kBAAmB1B,YAAWqB,IAAK;IAAAM,QACtC;IAAQvB;GAElB,CAAC;EAAC;EACHN,EAAA,MAAAI;EAAAJ,EAAA,MAAAM;EAAAN,EAAA,MAAAE,YAAAqB;EAAAvB,EAAA,MAAAO;EAAAP,EAAA,MAAAQ;EAAAR,EAAA,MAAAF;EAAAE,EAAA,MAAAgB;CAAA,OAAAA,KAAAhB,EAAA;CAAA,IAAA8B;CAAA,IAAA9B,EAAA,QAAAK,MAAAL,EAAA,QAAAS,MAAAT,EAAA,QAAAU,MAAAV,EAAA,QAAAW,MAAAX,EAAA,QAAAY,MAAAZ,EAAA,QAAAa,MAAAb,EAAA,QAAAc,MAAAd,EAAA,QAAAgB,IAAA;EAdHc,KAAA,oBAAC,IAAD;GAAiB,GACXhC;GACC,MAAAY;GACAX,KAAAA;GACK,UAAAa;GACa,yBAAAC;GACT,gBAAAC;GACL,SAAAE;EAOR,CAAA;EACDhB,EAAA,MAAAK;EAAAL,EAAA,MAAAS;EAAAT,EAAA,MAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAY;EAAAZ,EAAA,MAAAa;EAAAb,EAAA,MAAAc;EAAAd,EAAA,MAAAgB;EAAAhB,EAAA,MAAA8B;CAAA,OAAAA,KAAA9B,EAAA;CAAA,OAfF8B;AAeE,CAEL;AAEDpC,8BAA8BqC,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/elicitation/McpElicitationPrimitiveCancel.d.ts
|
|
4
3
|
export declare namespace McpElicitationPrimitiveCancel {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.button>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
7
6
|
}
|
|
8
7
|
export declare const McpElicitationPrimitiveCancel: 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=McpElicitationPrimitiveCancel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveCancel.d.ts","
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveCancel.d.ts","sourceRoot":"","sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveCancel.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAItD,yBAAiB,6BAA6B,CAAC;IAC7C,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,6BAA6B;;6DAoBxC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMcpElicitation } from "./context.js";
|
|
2
|
-
import { useAui } from "@assistant-ui/store";
|
|
3
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
5
6
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/primitives/elicitation/McpElicitationPrimitiveCancel.tsx
|
|
8
8
|
const McpElicitationPrimitiveCancel = forwardRef((props, ref) => {
|
|
9
9
|
const $ = c(8);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveCancel.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useMcpElicitation","McpElicitationPrimitiveCancel","Element","button","Props","props","ref","$","_c","elicitation","aui","t0","event","onClick","defaultPrevented","mcpServer","answerElicitation","id","action","t1","displayName"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveCancel.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveCancel {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpElicitationPrimitiveCancel = forwardRef<\n McpElicitationPrimitiveCancel.Element,\n McpElicitationPrimitiveCancel.Props\n>((props, ref) => {\n const elicitation = useMcpElicitation();\n const aui = useAui();\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n onClick={(event) => {\n props.onClick?.(event);\n if (event.defaultPrevented) return;\n aui.mcpServer.answerElicitation(elicitation.id, {\n action: \"cancel\",\n });\n }}\n />\n );\n});\n\nMcpElicitationPrimitiveCancel.displayName = \"McpElicitationPrimitive.Cancel\";\n"],"mappings":";;;;;;;AAcA,MAAaM,gCAAgCJ,YAG3CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,cAAoBT,kBAAkB;CACtC,MAAAU,MAAYX,OAAO;CAAE,IAAAY;CAAA,IAAAJ,EAAA,OAAAG,OAAAH,EAAA,OAAAE,eAAAF,EAAA,OAAAF,OAAA;EAMRM,MAAAC,UAAA;GACPP,MAAKQ,UAAWD,KAAK;GACrB,IAAIA,MAAKE,kBAAiB;GAC1BJ,IAAGK,UAAUC,kBAAmBP,YAAWQ,IAAK,EAAAC,QACtC,SACV,CAAC;EAAC;EACHX,EAAA,KAAAG;EAAAH,EAAA,KAAAE;EAAAF,EAAA,KAAAF;EAAAE,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAVHQ,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMd;GACC,MAAA;GACAC;GACI,SAAAK;EAMR,CAAA;EACDJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OAXFY;AAWE,CAEL;AAEDlB,8BAA8BmB,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveCancel.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useMcpElicitation","McpElicitationPrimitiveCancel","Element","button","Props","props","ref","$","_c","elicitation","aui","t0","event","onClick","defaultPrevented","mcpServer","answerElicitation","id","action","t1","displayName","_c"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveCancel.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveCancel {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpElicitationPrimitiveCancel = forwardRef<\n McpElicitationPrimitiveCancel.Element,\n McpElicitationPrimitiveCancel.Props\n>((props, ref) => {\n const elicitation = useMcpElicitation();\n const aui = useAui();\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n onClick={(event) => {\n props.onClick?.(event);\n if (event.defaultPrevented) return;\n aui.mcpServer.answerElicitation(elicitation.id, {\n action: \"cancel\",\n });\n }}\n />\n );\n});\n\nMcpElicitationPrimitiveCancel.displayName = \"McpElicitationPrimitive.Cancel\";\n"],"mappings":";;;;;;;AAcA,MAAaM,gCAAgCJ,YAG3CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,cAAoBT,kBAAkB;CACtC,MAAAU,MAAYX,OAAO;CAAE,IAAAY;CAAA,IAAAJ,EAAA,OAAAG,OAAAH,EAAA,OAAAE,eAAAF,EAAA,OAAAF,OAAA;EAMRM,MAAAC,UAAA;GACPP,MAAKQ,UAAWD,KAAK;GACrB,IAAIA,MAAKE,kBAAiB;GAC1BJ,IAAGK,UAAUC,kBAAmBP,YAAWQ,IAAK,EAAAC,QACtC,SACV,CAAC;EAAC;EACHX,EAAA,KAAAG;EAAAH,EAAA,KAAAE;EAAAF,EAAA,KAAAF;EAAAE,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAVHQ,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMd;GACC,MAAA;GACAC;GACI,SAAAK;EAMR,CAAA;EACDJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OAXFY;AAWE,CAEL;AAEDlB,8BAA8BmB,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/elicitation/McpElicitationPrimitiveDecline.d.ts
|
|
4
3
|
export declare namespace McpElicitationPrimitiveDecline {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.button>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
7
6
|
}
|
|
8
7
|
export declare const McpElicitationPrimitiveDecline: 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=McpElicitationPrimitiveDecline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveDecline.d.ts","
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveDecline.d.ts","sourceRoot":"","sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveDecline.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAItD,yBAAiB,8BAA8B,CAAC;IAC9C,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,8BAA8B;;6DAoBzC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMcpElicitation } from "./context.js";
|
|
2
|
-
import { useAui } from "@assistant-ui/store";
|
|
3
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
5
6
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/primitives/elicitation/McpElicitationPrimitiveDecline.tsx
|
|
8
8
|
const McpElicitationPrimitiveDecline = forwardRef((props, ref) => {
|
|
9
9
|
const $ = c(8);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveDecline.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useMcpElicitation","McpElicitationPrimitiveDecline","Element","button","Props","props","ref","$","_c","elicitation","aui","t0","event","onClick","defaultPrevented","mcpServer","answerElicitation","id","action","t1","displayName"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveDecline.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveDecline {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpElicitationPrimitiveDecline = forwardRef<\n McpElicitationPrimitiveDecline.Element,\n McpElicitationPrimitiveDecline.Props\n>((props, ref) => {\n const elicitation = useMcpElicitation();\n const aui = useAui();\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n onClick={(event) => {\n props.onClick?.(event);\n if (event.defaultPrevented) return;\n aui.mcpServer.answerElicitation(elicitation.id, {\n action: \"decline\",\n });\n }}\n />\n );\n});\n\nMcpElicitationPrimitiveDecline.displayName = \"McpElicitationPrimitive.Decline\";\n"],"mappings":";;;;;;;AAcA,MAAaM,iCAAiCJ,YAG5CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,cAAoBT,kBAAkB;CACtC,MAAAU,MAAYX,OAAO;CAAE,IAAAY;CAAA,IAAAJ,EAAA,OAAAG,OAAAH,EAAA,OAAAE,eAAAF,EAAA,OAAAF,OAAA;EAMRM,MAAAC,UAAA;GACPP,MAAKQ,UAAWD,KAAK;GACrB,IAAIA,MAAKE,kBAAiB;GAC1BJ,IAAGK,UAAUC,kBAAmBP,YAAWQ,IAAK,EAAAC,QACtC,UACV,CAAC;EAAC;EACHX,EAAA,KAAAG;EAAAH,EAAA,KAAAE;EAAAF,EAAA,KAAAF;EAAAE,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAVHQ,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMd;GACC,MAAA;GACAC;GACI,SAAAK;EAMR,CAAA;EACDJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OAXFY;AAWE,CAEL;AAEDlB,+BAA+BmB,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveDecline.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useMcpElicitation","McpElicitationPrimitiveDecline","Element","button","Props","props","ref","$","_c","elicitation","aui","t0","event","onClick","defaultPrevented","mcpServer","answerElicitation","id","action","t1","displayName","_c"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveDecline.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveDecline {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpElicitationPrimitiveDecline = forwardRef<\n McpElicitationPrimitiveDecline.Element,\n McpElicitationPrimitiveDecline.Props\n>((props, ref) => {\n const elicitation = useMcpElicitation();\n const aui = useAui();\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n onClick={(event) => {\n props.onClick?.(event);\n if (event.defaultPrevented) return;\n aui.mcpServer.answerElicitation(elicitation.id, {\n action: \"decline\",\n });\n }}\n />\n );\n});\n\nMcpElicitationPrimitiveDecline.displayName = \"McpElicitationPrimitive.Decline\";\n"],"mappings":";;;;;;;AAcA,MAAaM,iCAAiCJ,YAG5CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,cAAoBT,kBAAkB;CACtC,MAAAU,MAAYX,OAAO;CAAE,IAAAY;CAAA,IAAAJ,EAAA,OAAAG,OAAAH,EAAA,OAAAE,eAAAF,EAAA,OAAAF,OAAA;EAMRM,MAAAC,UAAA;GACPP,MAAKQ,UAAWD,KAAK;GACrB,IAAIA,MAAKE,kBAAiB;GAC1BJ,IAAGK,UAAUC,kBAAmBP,YAAWQ,IAAK,EAAAC,QACtC,UACV,CAAC;EAAC;EACHX,EAAA,KAAAG;EAAAH,EAAA,KAAAE;EAAAF,EAAA,KAAAF;EAAAE,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAVHQ,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMd;GACC,MAAA;GACAC;GACI,SAAAK;EAMR,CAAA;EACDJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OAXFY;AAWE,CAEL;AAEDlB,+BAA+BmB,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/elicitation/McpElicitationPrimitiveError.d.ts
|
|
4
3
|
export declare namespace McpElicitationPrimitiveError {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type Element = ComponentRef<typeof Primitive.div>;
|
|
5
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
7
6
|
}
|
|
8
7
|
export declare const McpElicitationPrimitiveError: 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=McpElicitationPrimitiveError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveError.d.ts","
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveError.d.ts","sourceRoot":"","sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveError.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,GAAG,CAAC,CAAC;IACzD,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;CACpE;AAED,eAAO,MAAM,4BAA4B;;0DAevC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMcpElicitation } 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/elicitation/McpElicitationPrimitiveError.tsx
|
|
7
7
|
const McpElicitationPrimitiveError = forwardRef((props, ref) => {
|
|
8
8
|
const $ = c(7);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveError.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpElicitation","McpElicitationPrimitiveError","Element","div","Props","props","ref","$","_c","error","t0","properties","join","t1","children","message","t2","displayName"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpElicitationPrimitiveError = forwardRef<\n McpElicitationPrimitiveError.Element,\n McpElicitationPrimitiveError.Props\n>((props, ref) => {\n const error = useMcpElicitation().error;\n if (!error) return null;\n return (\n <Primitive.div\n {...props}\n ref={ref}\n data-properties={error.properties?.join(\",\")}\n >\n {props.children ?? error.message}\n </Primitive.div>\n );\n});\n\nMcpElicitationPrimitiveError.displayName = \"McpElicitationPrimitive.Error\";\n"],"mappings":";;;;;;AAaA,MAAaK,+BAA+BH,YAG1CO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcT,kBAAkB,CAAC,CAAAS;CACjC,IAAI,CAACA,OAAK,OAAS;CAAK,IAAAC;CAAA,IAAAH,EAAA,OAAAE,MAAAE,YAAA;EAKHD,KAAAD,MAAKE,YAAiBC,KAAC,GAAG;EAACL,EAAA,KAAAE,MAAAE;EAAAJ,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAE3C,MAAAM,KAAAR,MAAKS,YAAaL,MAAKM;CAAQ,IAAAC;CAAA,IAAAT,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAM,IAAA;EALlCG,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMX;GACCC;GACY,mBAAAI;GAEhBG,UAAAA;EACH,CAAA;EAAgBN,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OANhBS;AAMgB,CAEnB;AAEDf,6BAA6BgB,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveError.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpElicitation","McpElicitationPrimitiveError","Element","div","Props","props","ref","$","_c","error","t0","properties","join","t1","children","message","t2","displayName","_c"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpElicitationPrimitiveError = forwardRef<\n McpElicitationPrimitiveError.Element,\n McpElicitationPrimitiveError.Props\n>((props, ref) => {\n const error = useMcpElicitation().error;\n if (!error) return null;\n return (\n <Primitive.div\n {...props}\n ref={ref}\n data-properties={error.properties?.join(\",\")}\n >\n {props.children ?? error.message}\n </Primitive.div>\n );\n});\n\nMcpElicitationPrimitiveError.displayName = \"McpElicitationPrimitive.Error\";\n"],"mappings":";;;;;;AAaA,MAAaK,+BAA+BH,YAG1CO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcT,kBAAkB,CAAC,CAAAS;CACjC,IAAI,CAACA,OAAK,OAAS;CAAK,IAAAC;CAAA,IAAAH,EAAA,OAAAE,MAAAE,YAAA;EAKHD,KAAAD,MAAKE,YAAiBC,KAAC,GAAG;EAACL,EAAA,KAAAE,MAAAE;EAAAJ,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAE3C,MAAAM,KAAAR,MAAKS,YAAaL,MAAKM;CAAQ,IAAAC;CAAA,IAAAT,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAM,IAAA;EALlCG,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMX;GACCC;GACY,mBAAAI;GAEhBG,UAAAA;EACH,CAAA;EAAgBN,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OANhBS;AAMgB,CAEnB;AAEDf,6BAA6BgB,cAAc"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
2
|
+
import { type ElicitationFieldContextValue } from "./context.js";
|
|
3
|
+
export { useMcpElicitationField } from "./context.js";
|
|
4
4
|
export declare namespace McpElicitationPrimitiveFields {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
type Props = {
|
|
6
|
+
children: (field: ElicitationFieldContextValue) => ReactNode;
|
|
7
|
+
};
|
|
8
8
|
}
|
|
9
9
|
export declare const McpElicitationPrimitiveFields: FC<McpElicitationPrimitiveFields.Props>;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { useMcpElicitationField };
|
|
12
10
|
//# sourceMappingURL=McpElicitationPrimitiveFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveFields.d.ts","
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveFields.d.ts","sourceRoot":"","sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveFields.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAEL,KAAK,4BAA4B,EAElC,qBAAkB;AAEnB,OAAO,EAAE,sBAAsB,EAAE,qBAAkB;AAEnD,yBAAiB,6BAA6B,CAAC;IAC7C,KAAY,KAAK,GAAG;QAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,4BAA4B,KAAK,SAAS,CAAC;KAC9D,CAAC;CACH;AAED,eAAO,MAAM,6BAA6B,EAAE,EAAE,CAC5C,6BAA6B,CAAC,KAAK,CAqCpC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElicitationFieldContext, useElicitationContext, useMcpElicitationField } from "./context.js";
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
-
import "@assistant-ui/tap/react-shim";
|
|
4
3
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
+
import "@assistant-ui/tap/react-shim";
|
|
5
5
|
//#region src/primitives/elicitation/McpElicitationPrimitiveFields.tsx
|
|
6
6
|
const McpElicitationPrimitiveFields = (t0) => {
|
|
7
7
|
const $ = c(6);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveFields.js","names":["FC","ReactNode","ElicitationFieldContext","ElicitationFieldContextValue","useElicitationContext","useMcpElicitationField","McpElicitationPrimitiveFields","Props","children","field","t0","$","_c","elicitation","draft","setField","properties","requestedSchema","Record","Array","isArray","t1","t2","Symbol","for","bb0","fields","Object","entries","length","map","t3","name","schema","value","hasOwn","undefined","setValue","displayName"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveFields.tsx"],"sourcesContent":["import { type FC, type ReactNode } from \"react\";\nimport {\n ElicitationFieldContext,\n type ElicitationFieldContextValue,\n useElicitationContext,\n} from \"./context\";\n\nexport { useMcpElicitationField } from \"./context\";\n\nexport namespace McpElicitationPrimitiveFields {\n export type Props = {\n children: (field: ElicitationFieldContextValue) => ReactNode;\n };\n}\n\nexport const McpElicitationPrimitiveFields: FC<\n McpElicitationPrimitiveFields.Props\n> = ({ children }) => {\n const { elicitation, draft, setField } = useElicitationContext();\n const properties = (\n elicitation.requestedSchema as {\n properties?: Record<string, unknown> | undefined;\n } | null\n )?.properties;\n\n if (\n properties === null ||\n typeof properties !== \"object\" ||\n Array.isArray(properties)\n ) {\n return null;\n }\n\n const fields = Object.entries(properties);\n if (fields.length === 0) return null;\n\n return (\n <>\n {fields.map(([name, schema]) => {\n const field = {\n name,\n schema,\n value: Object.hasOwn(draft, name) ? draft[name] : undefined,\n setValue: (value: unknown) => setField(name, value),\n };\n return (\n <ElicitationFieldContext.Provider key={name} value={field}>\n {children(field)}\n </ElicitationFieldContext.Provider>\n );\n })}\n </>\n );\n};\n\nMcpElicitationPrimitiveFields.displayName = \"McpElicitationPrimitive.Fields\";\n"],"mappings":";;;;;AAeA,MAAaM,iCAETI,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAJ,aAAAE;CACH,MAAA,EAAAG,aAAAC,OAAAC,aAAyCX,sBAAsB;CAC/D,MAAAY,aACEH,YAAWI,iBAGAD;CAEb,IACEA,eAAe,QACf,OAAOA,eAAe,YACtBG,MAAKC,QAASJ,UAAU,GAAC,OAElB;CACR,IAAAK;CAAA,IAAAC;CAAA,IAAAX,EAAA,OAAAH,YAAAG,EAAA,OAAAG,SAAAH,EAAA,OAAAK,cAAAL,EAAA,OAAAI,UAAA;EAG+BO,KAAAC,OAAIC,IAAJ,6BAAG;EAACC,KAAA;GADpC,MAAAC,SAAeC,OAAMC,QAASZ,UAAU;GACxC,IAAIU,OAAMG,WAAY,GAAC;IAASP,KAAA;IAAA,MAAAG;GAAI;GAGlCJ,KAAA,oBAAA,UAAA,EAAA,UACGK,OAAMI,KAAKC,OAAA;IAAC,MAAA,CAAAC,MAAAC,UAAAF;IACX,MAAAtB,QAAc;KAAAuB;KAAAC;KAAAC,OAGLP,OAAMQ,OAAQrB,OAAOkB,IAA8B,IAAtBlB,MAAMkB,QAAnCI,KAAAA;KAAoDC,WACjDH,UAAoBnB,SAASiB,MAAME,KAAK;IACpD;IAAE,OAEA,oBAAA,wBAAA,UAAA;KAAoDzB,OAAAA;KACjDD,UAAAA,SAASC,KAAK;IACjB,GAFuCuB,IAEvC;GAAmC,CAEtC,EAAC,CAAA;EACD;EAAArB,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAK;EAAAL,EAAA,KAAAI;EAAAJ,EAAA,KAAAU;EAAAV,EAAA,KAAAW;CAAA,OAAA;EAAAD,KAAAV,EAAA;EAAAW,KAAAX,EAAA;CAAA;CAAA,IAAAW,OAAAC,OAAAC,IAAA,6BAAA,GAAA,OAAAF;CAAA,OAdHD;AAcG;AAIPf,8BAA8BgC,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveFields.js","names":["FC","ReactNode","ElicitationFieldContext","ElicitationFieldContextValue","useElicitationContext","useMcpElicitationField","McpElicitationPrimitiveFields","Props","children","field","t0","$","_c","elicitation","draft","setField","properties","requestedSchema","Record","Array","isArray","t1","t2","Symbol","for","bb0","fields","Object","entries","length","map","t3","name","schema","value","hasOwn","undefined","setValue","displayName","_c"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveFields.tsx"],"sourcesContent":["import { type FC, type ReactNode } from \"react\";\nimport {\n ElicitationFieldContext,\n type ElicitationFieldContextValue,\n useElicitationContext,\n} from \"./context\";\n\nexport { useMcpElicitationField } from \"./context\";\n\nexport namespace McpElicitationPrimitiveFields {\n export type Props = {\n children: (field: ElicitationFieldContextValue) => ReactNode;\n };\n}\n\nexport const McpElicitationPrimitiveFields: FC<\n McpElicitationPrimitiveFields.Props\n> = ({ children }) => {\n const { elicitation, draft, setField } = useElicitationContext();\n const properties = (\n elicitation.requestedSchema as {\n properties?: Record<string, unknown> | undefined;\n } | null\n )?.properties;\n\n if (\n properties === null ||\n typeof properties !== \"object\" ||\n Array.isArray(properties)\n ) {\n return null;\n }\n\n const fields = Object.entries(properties);\n if (fields.length === 0) return null;\n\n return (\n <>\n {fields.map(([name, schema]) => {\n const field = {\n name,\n schema,\n value: Object.hasOwn(draft, name) ? draft[name] : undefined,\n setValue: (value: unknown) => setField(name, value),\n };\n return (\n <ElicitationFieldContext.Provider key={name} value={field}>\n {children(field)}\n </ElicitationFieldContext.Provider>\n );\n })}\n </>\n );\n};\n\nMcpElicitationPrimitiveFields.displayName = \"McpElicitationPrimitive.Fields\";\n"],"mappings":";;;;;AAeA,MAAaM,iCAETI,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAJ,aAAAE;CACH,MAAA,EAAAG,aAAAC,OAAAC,aAAyCX,sBAAsB;CAC/D,MAAAY,aACEH,YAAWI,iBAGAD;CAEb,IACEA,eAAe,QACf,OAAOA,eAAe,YACtBG,MAAKC,QAASJ,UAAU,GAAC,OAElB;CACR,IAAAK;CAAA,IAAAC;CAAA,IAAAX,EAAA,OAAAH,YAAAG,EAAA,OAAAG,SAAAH,EAAA,OAAAK,cAAAL,EAAA,OAAAI,UAAA;EAG+BO,KAAAC,OAAIC,IAAJ,6BAAG;EAACC,KAAA;GADpC,MAAAC,SAAeC,OAAMC,QAASZ,UAAU;GACxC,IAAIU,OAAMG,WAAY,GAAC;IAASP,KAAA;IAAA,MAAAG;GAAI;GAGlCJ,KAAA,oBAAA,UAAA,EAAA,UACGK,OAAMI,KAAKC,OAAA;IAAC,MAAA,CAAAC,MAAAC,UAAAF;IACX,MAAAtB,QAAc;KAAAuB;KAAAC;KAAAC,OAGLP,OAAMQ,OAAQrB,OAAOkB,IAA8B,IAAtBlB,MAAMkB,QAAnCI,KAAAA;KAAoDC,WACjDH,UAAoBnB,SAASiB,MAAME,KAAK;IACpD;IAAE,OAEA,oBAAA,wBAAA,UAAA;KAAoDzB,OAAAA;KACjDD,UAAAA,SAASC,KAAK;IACjB,GAFuCuB,IAEvC;GAAmC,CAEtC,EAAC,CAAA;EACD;EAAArB,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAK;EAAAL,EAAA,KAAAI;EAAAJ,EAAA,KAAAU;EAAAV,EAAA,KAAAW;CAAA,OAAA;EAAAD,KAAAV,EAAA;EAAAW,KAAAX,EAAA;CAAA;CAAA,IAAAW,OAAAC,OAAAC,IAAA,6BAAA,GAAA,OAAAF;CAAA,OAdHD;AAcG;AAIPf,8BAA8BgC,cAAc"}
|