@assistant-ui/react-mcp 0.0.0 → 0.0.2
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 +21 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/auth/buildHeaders.d.ts +7 -3
- package/dist/auth/buildHeaders.d.ts.map +1 -1
- package/dist/auth/buildHeaders.js +14 -12
- package/dist/auth/buildHeaders.js.map +1 -1
- package/dist/auth/createOAuthProvider.d.ts +17 -15
- package/dist/auth/createOAuthProvider.d.ts.map +1 -1
- package/dist/auth/createOAuthProvider.js +111 -137
- package/dist/auth/createOAuthProvider.js.map +1 -1
- package/dist/auth/types.d.ts +10 -7
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js +0 -2
- package/dist/connector.d.ts +6 -2
- package/dist/connector.d.ts.map +1 -1
- package/dist/connector.js +7 -3
- package/dist/connector.js.map +1 -1
- package/dist/context/McpConnectorByIndexProvider.d.ts +7 -3
- package/dist/context/McpConnectorByIndexProvider.d.ts.map +1 -1
- package/dist/context/McpConnectorByIndexProvider.js +18 -11
- package/dist/context/McpConnectorByIndexProvider.js.map +1 -1
- package/dist/context/McpCustomServerByIndexProvider.d.ts +7 -3
- package/dist/context/McpCustomServerByIndexProvider.d.ts.map +1 -1
- package/dist/context/McpCustomServerByIndexProvider.js +18 -11
- package/dist/context/McpCustomServerByIndexProvider.js.map +1 -1
- package/dist/context/McpServerByIdProvider.d.ts +7 -3
- package/dist/context/McpServerByIdProvider.d.ts.map +1 -1
- package/dist/context/McpServerByIdProvider.js +15 -11
- package/dist/context/McpServerByIdProvider.js.map +1 -1
- package/dist/hooks/useMcpOAuthCallback.d.ts +16 -13
- package/dist/hooks/useMcpOAuthCallback.d.ts.map +1 -1
- package/dist/hooks/useMcpOAuthCallback.js +59 -55
- package/dist/hooks/useMcpOAuthCallback.js.map +1 -1
- package/dist/index.d.ts +17 -18
- package/dist/index.js +14 -26
- package/dist/mcp-scope.d.ts +91 -94
- package/dist/mcp-scope.d.ts.map +1 -1
- package/dist/mcp-scope.js +0 -1
- package/dist/primitives/addForm/McpAddFormAuthFields.d.ts +17 -13
- package/dist/primitives/addForm/McpAddFormAuthFields.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthFields.js +23 -14
- package/dist/primitives/addForm/McpAddFormAuthFields.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts +9 -5
- package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthSelect.js +36 -16
- package/dist/primitives/addForm/McpAddFormAuthSelect.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormCancel.d.ts +10 -6
- package/dist/primitives/addForm/McpAddFormCancel.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormCancel.js +19 -11
- package/dist/primitives/addForm/McpAddFormCancel.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormError.d.ts +10 -6
- package/dist/primitives/addForm/McpAddFormError.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormError.js +15 -8
- package/dist/primitives/addForm/McpAddFormError.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormNameField.d.ts +9 -5
- package/dist/primitives/addForm/McpAddFormNameField.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormNameField.js +17 -6
- package/dist/primitives/addForm/McpAddFormNameField.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormRoot.d.ts +15 -11
- package/dist/primitives/addForm/McpAddFormRoot.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormRoot.js +134 -94
- package/dist/primitives/addForm/McpAddFormRoot.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormSubmit.d.ts +10 -6
- package/dist/primitives/addForm/McpAddFormSubmit.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormSubmit.js +16 -6
- package/dist/primitives/addForm/McpAddFormSubmit.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormUrlField.d.ts +9 -5
- package/dist/primitives/addForm/McpAddFormUrlField.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormUrlField.js +18 -6
- package/dist/primitives/addForm/McpAddFormUrlField.js.map +1 -1
- package/dist/primitives/addForm/context.d.ts +22 -18
- package/dist/primitives/addForm/context.d.ts.map +1 -1
- package/dist/primitives/addForm/context.js +9 -7
- package/dist/primitives/addForm/context.js.map +1 -1
- package/dist/primitives/addForm.d.ts +15 -8
- package/dist/primitives/addForm.d.ts.map +1 -1
- package/dist/primitives/addForm.js +23 -8
- package/dist/primitives/addForm.js.map +1 -1
- package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts +10 -6
- package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerAddCustomTrigger.js +13 -6
- package/dist/primitives/manager/McpManagerAddCustomTrigger.js.map +1 -1
- package/dist/primitives/manager/McpManagerConnectors.d.ts +18 -14
- package/dist/primitives/manager/McpManagerConnectors.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerConnectors.js +37 -35
- package/dist/primitives/manager/McpManagerConnectors.js.map +1 -1
- package/dist/primitives/manager/McpManagerCustomServers.d.ts +18 -14
- package/dist/primitives/manager/McpManagerCustomServers.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerCustomServers.js +38 -32
- package/dist/primitives/manager/McpManagerCustomServers.js.map +1 -1
- package/dist/primitives/manager/McpManagerRoot.d.ts +10 -6
- package/dist/primitives/manager/McpManagerRoot.d.ts.map +1 -1
- package/dist/primitives/manager/McpManagerRoot.js +14 -6
- package/dist/primitives/manager/McpManagerRoot.js.map +1 -1
- package/dist/primitives/manager.d.ts +11 -4
- package/dist/primitives/manager.d.ts.map +1 -1
- package/dist/primitives/manager.js +15 -4
- package/dist/primitives/manager.js.map +1 -1
- package/dist/primitives/server/McpServerConnectButton.d.ts +10 -6
- package/dist/primitives/server/McpServerConnectButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerConnectButton.js +28 -17
- package/dist/primitives/server/McpServerConnectButton.js.map +1 -1
- package/dist/primitives/server/McpServerDisconnectButton.d.ts +10 -6
- package/dist/primitives/server/McpServerDisconnectButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerDisconnectButton.js +27 -17
- package/dist/primitives/server/McpServerDisconnectButton.js.map +1 -1
- package/dist/primitives/server/McpServerError.d.ts +10 -6
- package/dist/primitives/server/McpServerError.d.ts.map +1 -1
- package/dist/primitives/server/McpServerError.js +15 -8
- package/dist/primitives/server/McpServerError.js.map +1 -1
- package/dist/primitives/server/McpServerIcon.d.ts +16 -14
- package/dist/primitives/server/McpServerIcon.d.ts.map +1 -1
- package/dist/primitives/server/McpServerIcon.js +18 -10
- package/dist/primitives/server/McpServerIcon.js.map +1 -1
- package/dist/primitives/server/McpServerName.d.ts +10 -6
- package/dist/primitives/server/McpServerName.d.ts.map +1 -1
- package/dist/primitives/server/McpServerName.js +14 -6
- package/dist/primitives/server/McpServerName.js.map +1 -1
- package/dist/primitives/server/McpServerOAuthLink.d.ts +13 -11
- package/dist/primitives/server/McpServerOAuthLink.d.ts.map +1 -1
- package/dist/primitives/server/McpServerOAuthLink.js +18 -9
- package/dist/primitives/server/McpServerOAuthLink.js.map +1 -1
- package/dist/primitives/server/McpServerRemoveButton.d.ts +10 -6
- package/dist/primitives/server/McpServerRemoveButton.d.ts.map +1 -1
- package/dist/primitives/server/McpServerRemoveButton.js +21 -14
- package/dist/primitives/server/McpServerRemoveButton.js.map +1 -1
- package/dist/primitives/server/McpServerRoot.d.ts +10 -6
- package/dist/primitives/server/McpServerRoot.d.ts.map +1 -1
- package/dist/primitives/server/McpServerRoot.js +20 -9
- package/dist/primitives/server/McpServerRoot.js.map +1 -1
- package/dist/primitives/server/McpServerStatus.d.ts +10 -6
- package/dist/primitives/server/McpServerStatus.d.ts.map +1 -1
- package/dist/primitives/server/McpServerStatus.js +15 -6
- package/dist/primitives/server/McpServerStatus.js.map +1 -1
- package/dist/primitives/server/McpServerToolName.d.ts +10 -6
- package/dist/primitives/server/McpServerToolName.d.ts.map +1 -1
- package/dist/primitives/server/McpServerToolName.js +15 -6
- package/dist/primitives/server/McpServerToolName.js.map +1 -1
- package/dist/primitives/server/McpServerTools.d.ts +12 -8
- package/dist/primitives/server/McpServerTools.d.ts.map +1 -1
- package/dist/primitives/server/McpServerTools.js +17 -13
- package/dist/primitives/server/McpServerTools.js.map +1 -1
- package/dist/primitives/server.d.ts +18 -11
- package/dist/primitives/server.d.ts.map +1 -1
- package/dist/primitives/server.js +30 -11
- package/dist/primitives/server.js.map +1 -1
- package/dist/resources/McpManagerResource.d.ts +13 -11
- package/dist/resources/McpManagerResource.d.ts.map +1 -1
- package/dist/resources/McpManagerResource.js +149 -183
- package/dist/resources/McpManagerResource.js.map +1 -1
- package/dist/resources/McpServerResource.d.ts +19 -15
- package/dist/resources/McpServerResource.d.ts.map +1 -1
- package/dist/resources/McpServerResource.js +186 -235
- package/dist/resources/McpServerResource.js.map +1 -1
- package/dist/resources/storage/McpCustomStorage.d.ts +6 -2
- package/dist/resources/storage/McpCustomStorage.d.ts.map +1 -1
- package/dist/resources/storage/McpCustomStorage.js +5 -1
- package/dist/resources/storage/McpCustomStorage.js.map +1 -1
- package/dist/resources/storage/McpLocalStorage.d.ts +9 -7
- package/dist/resources/storage/McpLocalStorage.d.ts.map +1 -1
- package/dist/resources/storage/McpLocalStorage.js +51 -62
- package/dist/resources/storage/McpLocalStorage.js.map +1 -1
- package/dist/resources/storage/McpMemoryStorage.d.ts +6 -2
- package/dist/resources/storage/McpMemoryStorage.d.ts.map +1 -1
- package/dist/resources/storage/McpMemoryStorage.js +20 -16
- package/dist/resources/storage/McpMemoryStorage.js.map +1 -1
- package/dist/resources/storage/types.d.ts +14 -10
- package/dist/resources/storage/types.d.ts.map +1 -1
- package/dist/resources/storage/types.js +0 -2
- package/dist/utils/serverId.d.ts +4 -1
- package/dist/utils/serverId.d.ts.map +1 -1
- package/dist/utils/serverId.js +8 -14
- package/dist/utils/serverId.js.map +1 -1
- package/package.json +12 -12
- package/dist/auth/types.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mcp-scope.js.map +0 -1
- package/dist/resources/storage/types.js.map +0 -1
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, } from "react";
|
|
3
|
-
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
1
|
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/server/McpServerDisconnectButton.tsx
|
|
6
|
+
const DISCONNECTABLE = new Set([
|
|
7
|
+
"connected",
|
|
8
|
+
"connecting",
|
|
9
|
+
"authPending"
|
|
10
|
+
]);
|
|
11
|
+
const McpServerPrimitiveDisconnectButton = forwardRef((props, ref) => {
|
|
12
|
+
const state = useAuiState((s) => s.mcpServer.connectionState);
|
|
13
|
+
const aui = useAui();
|
|
14
|
+
if (!DISCONNECTABLE.has(state)) return null;
|
|
15
|
+
return /* @__PURE__ */ jsx(Primitive.button, {
|
|
16
|
+
...props,
|
|
17
|
+
type: "button",
|
|
18
|
+
ref,
|
|
19
|
+
onClick: (e) => {
|
|
20
|
+
props.onClick?.(e);
|
|
21
|
+
if (e.defaultPrevented) return;
|
|
22
|
+
aui.mcpServer().disconnect();
|
|
23
|
+
}
|
|
24
|
+
});
|
|
17
25
|
});
|
|
18
|
-
McpServerPrimitiveDisconnectButton.displayName =
|
|
19
|
-
|
|
26
|
+
McpServerPrimitiveDisconnectButton.displayName = "McpServerPrimitive.DisconnectButton";
|
|
27
|
+
//#endregion
|
|
28
|
+
export { McpServerPrimitiveDisconnectButton };
|
|
29
|
+
|
|
20
30
|
//# sourceMappingURL=McpServerDisconnectButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerDisconnectButton.js","
|
|
1
|
+
{"version":3,"file":"McpServerDisconnectButton.js","names":[],"sources":["../../../src/primitives/server/McpServerDisconnectButton.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveDisconnectButton {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nconst DISCONNECTABLE = new Set([\"connected\", \"connecting\", \"authPending\"]);\n\nexport const McpServerPrimitiveDisconnectButton = forwardRef<\n McpServerPrimitiveDisconnectButton.Element,\n McpServerPrimitiveDisconnectButton.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n const aui = useAui();\n if (!DISCONNECTABLE.has(state)) return null;\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 void aui.mcpServer().disconnect();\n }}\n />\n );\n});\n\nMcpServerPrimitiveDisconnectButton.displayName =\n \"McpServerPrimitive.DisconnectButton\";\n"],"mappings":";;;;;AAaA,MAAM,iBAAiB,IAAI,IAAI;CAAC;CAAa;CAAc;AAAa,CAAC;AAEzE,MAAa,qCAAqC,YAG/C,OAAO,QAAQ;CAChB,MAAM,QAAQ,aAAa,MAAM,EAAE,UAAU,eAAe;CAC5D,MAAM,MAAM,OAAO;CACnB,IAAI,CAAC,eAAe,IAAI,KAAK,GAAG,OAAO;CACvC,OACE,oBAAC,UAAU,QAAX;EACE,GAAI;EACJ,MAAK;EACA;EACL,UAAU,MAAM;GACd,MAAM,UAAU,CAAC;GACjB,IAAI,EAAE,kBAAkB;GACxB,IAAS,UAAU,EAAE,WAAW;EAClC;CACD,CAAA;AAEL,CAAC;AAED,mCAAmC,cACjC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/server/McpServerError.d.ts
|
|
5
|
+
declare namespace McpServerPrimitiveError {
|
|
6
|
+
type Element = ComponentRef<typeof Primitive.div>;
|
|
7
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
declare const McpServerPrimitiveError: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
10
|
+
asChild?: boolean;
|
|
9
11
|
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { McpServerPrimitiveError };
|
|
10
14
|
//# sourceMappingURL=McpServerError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerError.d.ts","
|
|
1
|
+
{"version":3,"file":"McpServerError.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerError.tsx"],"mappings":";;;;kBAQiB,uBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,GAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,GAAA;AAAA;AAAA,cAGnD,uBAAA,kBAAuB,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,cAAA,oBAAA,cAAA,CAAA,cAAA"}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, } from "react";
|
|
3
|
-
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
1
|
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/server/McpServerError.tsx
|
|
6
|
+
const McpServerPrimitiveError = forwardRef((props, ref) => {
|
|
7
|
+
const message = useAuiState((s) => s.mcpServer.lastError?.message ?? null);
|
|
8
|
+
if (message === null) return null;
|
|
9
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
10
|
+
...props,
|
|
11
|
+
ref,
|
|
12
|
+
children: props.children ?? message
|
|
13
|
+
});
|
|
10
14
|
});
|
|
11
15
|
McpServerPrimitiveError.displayName = "McpServerPrimitive.Error";
|
|
16
|
+
//#endregion
|
|
17
|
+
export { McpServerPrimitiveError };
|
|
18
|
+
|
|
12
19
|
//# sourceMappingURL=McpServerError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerError.js","
|
|
1
|
+
{"version":3,"file":"McpServerError.js","names":[],"sources":["../../../src/primitives/server/McpServerError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpServerPrimitiveError = forwardRef<\n McpServerPrimitiveError.Element,\n McpServerPrimitiveError.Props\n>((props, ref) => {\n const message = useAuiState((s) => s.mcpServer.lastError?.message ?? null);\n if (message === null) return null;\n return (\n <Primitive.div {...props} ref={ref}>\n {props.children ?? message}\n </Primitive.div>\n );\n});\n\nMcpServerPrimitiveError.displayName = \"McpServerPrimitive.Error\";\n"],"mappings":";;;;;AAaA,MAAa,0BAA0B,YAGpC,OAAO,QAAQ;CAChB,MAAM,UAAU,aAAa,MAAM,EAAE,UAAU,WAAW,WAAW,IAAI;CACzE,IAAI,YAAY,MAAM,OAAO;CAC7B,OACE,oBAAC,UAAU,KAAX;EAAe,GAAI;EAAY;YAC5B,MAAM,YAAY;CACN,CAAA;AAEnB,CAAC;AAED,wBAAwB,cAAc"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export declare const McpServerPrimitiveIcon: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & {
|
|
12
|
-
asChild?: boolean;
|
|
13
|
-
}, "ref">, "src" | "alt"> & {
|
|
14
|
-
/** Override the icon URL. Defaults to the server's icon prop. */
|
|
15
|
-
src?: string;
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/server/McpServerIcon.d.ts
|
|
5
|
+
declare namespace McpServerPrimitiveIcon {
|
|
6
|
+
type Element = ComponentRef<typeof Primitive.img>;
|
|
7
|
+
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.img>, "src" | "alt"> & {
|
|
8
|
+
/** Override the icon URL. Defaults to the server's icon prop. */src?: string;
|
|
16
9
|
alt?: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare const McpServerPrimitiveIcon: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & {
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
}, "ref">, "alt" | "src"> & {
|
|
15
|
+
/** Override the icon URL. Defaults to the server's icon prop. */src?: string;
|
|
16
|
+
alt?: string;
|
|
17
17
|
} & import("react").RefAttributes<HTMLImageElement>>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { McpServerPrimitiveIcon };
|
|
18
20
|
//# sourceMappingURL=McpServerIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerIcon.d.ts","
|
|
1
|
+
{"version":3,"file":"McpServerIcon.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerIcon.tsx"],"mappings":";;;;kBAQiB,sBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,GAAA;EAAA,KACxC,KAAA,GAAQ,IAAA,CAClB,wBAAA,QAAgC,SAAA,CAAU,GAAA;IAHP,iEAOnC,GAAA;IACA,GAAA;EAAA;AAAA;AAAA,cAIS,sBAAA,kBAAsB,yBAAA,CAAA,IAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,gBAAA,oBAAA,iBAAA,CAAA,gBAAA;;;EAVT"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, } from "react";
|
|
3
|
-
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
1
|
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/server/McpServerIcon.tsx
|
|
6
|
+
const McpServerPrimitiveIcon = forwardRef(({ src, alt, ...props }, ref) => {
|
|
7
|
+
const iconUrl = useAuiState((s) => s.mcpServer.icon ?? null);
|
|
8
|
+
const name = useAuiState((s) => s.mcpServer.name);
|
|
9
|
+
const effective = src ?? iconUrl;
|
|
10
|
+
if (!effective) return null;
|
|
11
|
+
return /* @__PURE__ */ jsx(Primitive.img, {
|
|
12
|
+
...props,
|
|
13
|
+
ref,
|
|
14
|
+
src: effective,
|
|
15
|
+
alt: alt ?? name
|
|
16
|
+
});
|
|
12
17
|
});
|
|
13
18
|
McpServerPrimitiveIcon.displayName = "McpServerPrimitive.Icon";
|
|
19
|
+
//#endregion
|
|
20
|
+
export { McpServerPrimitiveIcon };
|
|
21
|
+
|
|
14
22
|
//# sourceMappingURL=McpServerIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerIcon.js","
|
|
1
|
+
{"version":3,"file":"McpServerIcon.js","names":[],"sources":["../../../src/primitives/server/McpServerIcon.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveIcon {\n export type Element = ComponentRef<typeof Primitive.img>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.img>,\n \"src\" | \"alt\"\n > & {\n /** Override the icon URL. Defaults to the server's icon prop. */\n src?: string;\n alt?: string;\n };\n}\n\nexport const McpServerPrimitiveIcon = forwardRef<\n McpServerPrimitiveIcon.Element,\n McpServerPrimitiveIcon.Props\n>(({ src, alt, ...props }, ref) => {\n const iconUrl = useAuiState((s) => s.mcpServer.icon ?? null);\n const name = useAuiState((s) => s.mcpServer.name);\n const effective = src ?? iconUrl;\n if (!effective) return null;\n return (\n // biome-ignore lint/performance/noImgElement: unstyled primitive — consumers can swap via asChild\n <Primitive.img {...props} ref={ref} src={effective} alt={alt ?? name} />\n );\n});\n\nMcpServerPrimitiveIcon.displayName = \"McpServerPrimitive.Icon\";\n"],"mappings":";;;;;AAoBA,MAAa,yBAAyB,YAGnC,EAAE,KAAK,KAAK,GAAG,SAAS,QAAQ;CACjC,MAAM,UAAU,aAAa,MAAM,EAAE,UAAU,QAAQ,IAAI;CAC3D,MAAM,OAAO,aAAa,MAAM,EAAE,UAAU,IAAI;CAChD,MAAM,YAAY,OAAO;CACzB,IAAI,CAAC,WAAW,OAAO;CACvB,OAEE,oBAAC,UAAU,KAAX;EAAe,GAAI;EAAY;EAAK,KAAK;EAAW,KAAK,OAAO;CAAO,CAAA;AAE3E,CAAC;AAED,uBAAuB,cAAc"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/server/McpServerName.d.ts
|
|
5
|
+
declare namespace McpServerPrimitiveName {
|
|
6
|
+
type Element = ComponentRef<typeof Primitive.span>;
|
|
7
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
declare const McpServerPrimitiveName: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
10
|
+
asChild?: boolean;
|
|
9
11
|
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { McpServerPrimitiveName };
|
|
10
14
|
//# sourceMappingURL=McpServerName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerName.d.ts","
|
|
1
|
+
{"version":3,"file":"McpServerName.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerName.tsx"],"mappings":";;;;kBAQiB,sBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,IAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,IAAA;AAAA;AAAA,cAGnD,sBAAA,kBAAsB,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,eAAA,oBAAA,cAAA,CAAA,eAAA"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, } from "react";
|
|
3
|
-
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
1
|
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/server/McpServerName.tsx
|
|
6
|
+
const McpServerPrimitiveName = forwardRef((props, ref) => {
|
|
7
|
+
const name = useAuiState((s) => s.mcpServer.name);
|
|
8
|
+
return /* @__PURE__ */ jsx(Primitive.span, {
|
|
9
|
+
...props,
|
|
10
|
+
ref,
|
|
11
|
+
children: props.children ?? name
|
|
12
|
+
});
|
|
8
13
|
});
|
|
9
14
|
McpServerPrimitiveName.displayName = "McpServerPrimitive.Name";
|
|
15
|
+
//#endregion
|
|
16
|
+
export { McpServerPrimitiveName };
|
|
17
|
+
|
|
10
18
|
//# sourceMappingURL=McpServerName.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerName.js","
|
|
1
|
+
{"version":3,"file":"McpServerName.js","names":[],"sources":["../../../src/primitives/server/McpServerName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveName = forwardRef<\n McpServerPrimitiveName.Element,\n McpServerPrimitiveName.Props\n>((props, ref) => {\n const name = useAuiState((s) => s.mcpServer.name);\n return (\n <Primitive.span {...props} ref={ref}>\n {props.children ?? name}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveName.displayName = \"McpServerPrimitive.Name\";\n"],"mappings":";;;;;AAaA,MAAa,yBAAyB,YAGnC,OAAO,QAAQ;CAChB,MAAM,OAAO,aAAa,MAAM,EAAE,UAAU,IAAI;CAChD,OACE,oBAAC,UAAU,MAAX;EAAgB,GAAI;EAAY;YAC7B,MAAM,YAAY;CACL,CAAA;AAEpB,CAAC;AAED,uBAAuB,cAAc"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/server/McpServerOAuthLink.d.ts
|
|
5
|
+
declare namespace McpServerPrimitiveOAuthLink {
|
|
6
|
+
type Element = ComponentRef<typeof Primitive.a>;
|
|
7
|
+
type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.a>, "href"> & {
|
|
8
|
+
/** Optional href override; defaults to the server's authorizationUrl. */href?: string;
|
|
9
|
+
};
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
declare const McpServerPrimitiveOAuthLink: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
12
|
+
asChild?: boolean;
|
|
12
13
|
}, "ref">, "href"> & {
|
|
13
|
-
|
|
14
|
-
href?: string;
|
|
14
|
+
/** Optional href override; defaults to the server's authorizationUrl. */href?: string;
|
|
15
15
|
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { McpServerPrimitiveOAuthLink };
|
|
16
18
|
//# sourceMappingURL=McpServerOAuthLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerOAuthLink.d.ts","
|
|
1
|
+
{"version":3,"file":"McpServerOAuthLink.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerOAuthLink.tsx"],"mappings":";;;;kBAQiB,2BAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,CAAA;EAAA,KACxC,KAAA,GAAQ,IAAA,CAClB,wBAAA,QAAgC,SAAA,CAAU,CAAA;IAHF,yEAOxC,IAAA;EAAA;AAAA;AAAA,cAIS,2BAAA,kBAA2B,yBAAA,CAAA,IAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,iBAAA,oBAAA,oBAAA,CAAA,iBAAA;;;EATd"}
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, } from "react";
|
|
3
|
-
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
1
|
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/server/McpServerOAuthLink.tsx
|
|
6
|
+
const McpServerPrimitiveOAuthLink = forwardRef(({ href, ...props }, ref) => {
|
|
7
|
+
const url = useAuiState((s) => s.mcpServer.authorizationUrl);
|
|
8
|
+
const effective = href ?? url;
|
|
9
|
+
if (!effective) return null;
|
|
10
|
+
return /* @__PURE__ */ jsx(Primitive.a, {
|
|
11
|
+
target: "_blank",
|
|
12
|
+
...props,
|
|
13
|
+
ref,
|
|
14
|
+
href: effective,
|
|
15
|
+
rel: props.rel ?? "noopener noreferrer"
|
|
16
|
+
});
|
|
11
17
|
});
|
|
12
18
|
McpServerPrimitiveOAuthLink.displayName = "McpServerPrimitive.OAuthLink";
|
|
19
|
+
//#endregion
|
|
20
|
+
export { McpServerPrimitiveOAuthLink };
|
|
21
|
+
|
|
13
22
|
//# sourceMappingURL=McpServerOAuthLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerOAuthLink.js","
|
|
1
|
+
{"version":3,"file":"McpServerOAuthLink.js","names":[],"sources":["../../../src/primitives/server/McpServerOAuthLink.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveOAuthLink {\n export type Element = ComponentRef<typeof Primitive.a>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.a>,\n \"href\"\n > & {\n /** Optional href override; defaults to the server's authorizationUrl. */\n href?: string;\n };\n}\n\nexport const McpServerPrimitiveOAuthLink = forwardRef<\n McpServerPrimitiveOAuthLink.Element,\n McpServerPrimitiveOAuthLink.Props\n>(({ href, ...props }, ref) => {\n const url = useAuiState((s) => s.mcpServer.authorizationUrl);\n const effective = href ?? url;\n if (!effective) return null;\n return (\n <Primitive.a\n target=\"_blank\"\n {...props}\n ref={ref}\n href={effective}\n rel={props.rel ?? \"noopener noreferrer\"}\n />\n );\n});\n\nMcpServerPrimitiveOAuthLink.displayName = \"McpServerPrimitive.OAuthLink\";\n"],"mappings":";;;;;AAmBA,MAAa,8BAA8B,YAGxC,EAAE,MAAM,GAAG,SAAS,QAAQ;CAC7B,MAAM,MAAM,aAAa,MAAM,EAAE,UAAU,gBAAgB;CAC3D,MAAM,YAAY,QAAQ;CAC1B,IAAI,CAAC,WAAW,OAAO;CACvB,OACE,oBAAC,UAAU,GAAX;EACE,QAAO;EACP,GAAI;EACC;EACL,MAAM;EACN,KAAK,MAAM,OAAO;CACnB,CAAA;AAEL,CAAC;AAED,4BAA4B,cAAc"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/server/McpServerRemoveButton.d.ts
|
|
5
|
+
declare namespace McpServerPrimitiveRemoveButton {
|
|
6
|
+
type Element = ComponentRef<typeof Primitive.button>;
|
|
7
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
declare const McpServerPrimitiveRemoveButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
10
|
+
asChild?: boolean;
|
|
9
11
|
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { McpServerPrimitiveRemoveButton };
|
|
10
14
|
//# sourceMappingURL=McpServerRemoveButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerRemoveButton.d.ts","
|
|
1
|
+
{"version":3,"file":"McpServerRemoveButton.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerRemoveButton.tsx"],"mappings":";;;;kBAQiB,8BAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,MAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,MAAA;AAAA;AAAA,cAGnD,8BAAA,kBAA8B,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,iBAAA,oBAAA,oBAAA,CAAA,iBAAA"}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, } from "react";
|
|
3
|
-
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
1
|
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/server/McpServerRemoveButton.tsx
|
|
6
|
+
const McpServerPrimitiveRemoveButton = forwardRef((props, ref) => {
|
|
7
|
+
const kind = useAuiState((s) => s.mcpServer.kind);
|
|
8
|
+
const aui = useAui();
|
|
9
|
+
if (kind !== "custom") return null;
|
|
10
|
+
return /* @__PURE__ */ jsx(Primitive.button, {
|
|
11
|
+
...props,
|
|
12
|
+
type: "button",
|
|
13
|
+
ref,
|
|
14
|
+
onClick: (e) => {
|
|
15
|
+
props.onClick?.(e);
|
|
16
|
+
if (e.defaultPrevented) return;
|
|
17
|
+
aui.mcpServer().remove();
|
|
18
|
+
}
|
|
19
|
+
});
|
|
16
20
|
});
|
|
17
21
|
McpServerPrimitiveRemoveButton.displayName = "McpServerPrimitive.RemoveButton";
|
|
22
|
+
//#endregion
|
|
23
|
+
export { McpServerPrimitiveRemoveButton };
|
|
24
|
+
|
|
18
25
|
//# sourceMappingURL=McpServerRemoveButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerRemoveButton.js","
|
|
1
|
+
{"version":3,"file":"McpServerRemoveButton.js","names":[],"sources":["../../../src/primitives/server/McpServerRemoveButton.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveRemoveButton {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpServerPrimitiveRemoveButton = forwardRef<\n McpServerPrimitiveRemoveButton.Element,\n McpServerPrimitiveRemoveButton.Props\n>((props, ref) => {\n const kind = useAuiState((s) => s.mcpServer.kind);\n const aui = useAui();\n if (kind !== \"custom\") return null;\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 void aui.mcpServer().remove();\n }}\n />\n );\n});\n\nMcpServerPrimitiveRemoveButton.displayName = \"McpServerPrimitive.RemoveButton\";\n"],"mappings":";;;;;AAaA,MAAa,iCAAiC,YAG3C,OAAO,QAAQ;CAChB,MAAM,OAAO,aAAa,MAAM,EAAE,UAAU,IAAI;CAChD,MAAM,MAAM,OAAO;CACnB,IAAI,SAAS,UAAU,OAAO;CAC9B,OACE,oBAAC,UAAU,QAAX;EACE,GAAI;EACJ,MAAK;EACA;EACL,UAAU,MAAM;GACd,MAAM,UAAU,CAAC;GACjB,IAAI,EAAE,kBAAkB;GACxB,IAAS,UAAU,EAAE,OAAO;EAC9B;CACD,CAAA;AAEL,CAAC;AAED,+BAA+B,cAAc"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/server/McpServerRoot.d.ts
|
|
5
|
+
declare namespace McpServerPrimitiveRoot {
|
|
6
|
+
type Element = ComponentRef<typeof Primitive.div>;
|
|
7
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
declare const McpServerPrimitiveRoot: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
10
|
+
asChild?: boolean;
|
|
9
11
|
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { McpServerPrimitiveRoot };
|
|
10
14
|
//# sourceMappingURL=McpServerRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerRoot.d.ts","
|
|
1
|
+
{"version":3,"file":"McpServerRoot.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerRoot.tsx"],"mappings":";;;;kBAQiB,sBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,GAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,GAAA;AAAA;AAAA,cAGnD,sBAAA,kBAAsB,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,cAAA,oBAAA,cAAA,CAAA,cAAA"}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, } from "react";
|
|
3
|
-
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
1
|
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/server/McpServerRoot.tsx
|
|
6
|
+
const McpServerPrimitiveRoot = forwardRef((props, ref) => {
|
|
7
|
+
const id = useAuiState((s) => s.mcpServer.id);
|
|
8
|
+
const kind = useAuiState((s) => s.mcpServer.kind);
|
|
9
|
+
const connectionState = useAuiState((s) => s.mcpServer.connectionState);
|
|
10
|
+
const hasError = useAuiState((s) => s.mcpServer.lastError !== null);
|
|
11
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
12
|
+
...props,
|
|
13
|
+
ref,
|
|
14
|
+
"data-server-id": id,
|
|
15
|
+
"data-kind": kind,
|
|
16
|
+
"data-connection-state": connectionState,
|
|
17
|
+
"data-has-error": hasError || void 0
|
|
18
|
+
});
|
|
11
19
|
});
|
|
12
20
|
McpServerPrimitiveRoot.displayName = "McpServerPrimitive.Root";
|
|
21
|
+
//#endregion
|
|
22
|
+
export { McpServerPrimitiveRoot };
|
|
23
|
+
|
|
13
24
|
//# sourceMappingURL=McpServerRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerRoot.js","
|
|
1
|
+
{"version":3,"file":"McpServerRoot.js","names":[],"sources":["../../../src/primitives/server/McpServerRoot.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpServerPrimitiveRoot = forwardRef<\n McpServerPrimitiveRoot.Element,\n McpServerPrimitiveRoot.Props\n>((props, ref) => {\n const id = useAuiState((s) => s.mcpServer.id);\n const kind = useAuiState((s) => s.mcpServer.kind);\n const connectionState = useAuiState((s) => s.mcpServer.connectionState);\n const hasError = useAuiState((s) => s.mcpServer.lastError !== null);\n\n return (\n <Primitive.div\n {...props}\n ref={ref}\n data-server-id={id}\n data-kind={kind}\n data-connection-state={connectionState}\n data-has-error={hasError || undefined}\n />\n );\n});\n\nMcpServerPrimitiveRoot.displayName = \"McpServerPrimitive.Root\";\n"],"mappings":";;;;;AAaA,MAAa,yBAAyB,YAGnC,OAAO,QAAQ;CAChB,MAAM,KAAK,aAAa,MAAM,EAAE,UAAU,EAAE;CAC5C,MAAM,OAAO,aAAa,MAAM,EAAE,UAAU,IAAI;CAChD,MAAM,kBAAkB,aAAa,MAAM,EAAE,UAAU,eAAe;CACtE,MAAM,WAAW,aAAa,MAAM,EAAE,UAAU,cAAc,IAAI;CAElE,OACE,oBAAC,UAAU,KAAX;EACE,GAAI;EACC;EACL,kBAAgB;EAChB,aAAW;EACX,yBAAuB;EACvB,kBAAgB,YAAY,KAAA;CAC7B,CAAA;AAEL,CAAC;AAED,uBAAuB,cAAc"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentRef } from "react";
|
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/server/McpServerStatus.d.ts
|
|
5
|
+
declare namespace McpServerPrimitiveStatus {
|
|
6
|
+
type Element = ComponentRef<typeof Primitive.span>;
|
|
7
|
+
type Props = ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
declare const McpServerPrimitiveStatus: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
10
|
+
asChild?: boolean;
|
|
9
11
|
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { McpServerPrimitiveStatus };
|
|
10
14
|
//# sourceMappingURL=McpServerStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerStatus.d.ts","
|
|
1
|
+
{"version":3,"file":"McpServerStatus.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerStatus.tsx"],"mappings":";;;;kBAQiB,wBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,IAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,IAAA;AAAA;AAAA,cAGnD,wBAAA,kBAAwB,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,eAAA,oBAAA,cAAA,CAAA,eAAA"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, } from "react";
|
|
3
|
-
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
1
|
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/server/McpServerStatus.tsx
|
|
6
|
+
const McpServerPrimitiveStatus = forwardRef((props, ref) => {
|
|
7
|
+
const state = useAuiState((s) => s.mcpServer.connectionState);
|
|
8
|
+
return /* @__PURE__ */ jsx(Primitive.span, {
|
|
9
|
+
...props,
|
|
10
|
+
ref,
|
|
11
|
+
"data-state": state,
|
|
12
|
+
children: props.children ?? state
|
|
13
|
+
});
|
|
8
14
|
});
|
|
9
15
|
McpServerPrimitiveStatus.displayName = "McpServerPrimitive.Status";
|
|
16
|
+
//#endregion
|
|
17
|
+
export { McpServerPrimitiveStatus };
|
|
18
|
+
|
|
10
19
|
//# sourceMappingURL=McpServerStatus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerStatus.js","
|
|
1
|
+
{"version":3,"file":"McpServerStatus.js","names":[],"sources":["../../../src/primitives/server/McpServerStatus.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveStatus {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveStatus = forwardRef<\n McpServerPrimitiveStatus.Element,\n McpServerPrimitiveStatus.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n return (\n <Primitive.span {...props} ref={ref} data-state={state}>\n {props.children ?? state}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveStatus.displayName = \"McpServerPrimitive.Status\";\n"],"mappings":";;;;;AAaA,MAAa,2BAA2B,YAGrC,OAAO,QAAQ;CAChB,MAAM,QAAQ,aAAa,MAAM,EAAE,UAAU,eAAe;CAC5D,OACE,oBAAC,UAAU,MAAX;EAAgB,GAAI;EAAY;EAAK,cAAY;YAC9C,MAAM,YAAY;CACL,CAAA;AAEpB,CAAC;AAED,yBAAyB,cAAc"}
|