@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.
Files changed (179) hide show
  1. package/LICENSE +21 -0
  2. package/dist/_virtual/_rolldown/runtime.js +13 -0
  3. package/dist/auth/buildHeaders.d.ts +7 -3
  4. package/dist/auth/buildHeaders.d.ts.map +1 -1
  5. package/dist/auth/buildHeaders.js +14 -12
  6. package/dist/auth/buildHeaders.js.map +1 -1
  7. package/dist/auth/createOAuthProvider.d.ts +17 -15
  8. package/dist/auth/createOAuthProvider.d.ts.map +1 -1
  9. package/dist/auth/createOAuthProvider.js +111 -137
  10. package/dist/auth/createOAuthProvider.js.map +1 -1
  11. package/dist/auth/types.d.ts +10 -7
  12. package/dist/auth/types.d.ts.map +1 -1
  13. package/dist/auth/types.js +0 -2
  14. package/dist/connector.d.ts +6 -2
  15. package/dist/connector.d.ts.map +1 -1
  16. package/dist/connector.js +7 -3
  17. package/dist/connector.js.map +1 -1
  18. package/dist/context/McpConnectorByIndexProvider.d.ts +7 -3
  19. package/dist/context/McpConnectorByIndexProvider.d.ts.map +1 -1
  20. package/dist/context/McpConnectorByIndexProvider.js +18 -11
  21. package/dist/context/McpConnectorByIndexProvider.js.map +1 -1
  22. package/dist/context/McpCustomServerByIndexProvider.d.ts +7 -3
  23. package/dist/context/McpCustomServerByIndexProvider.d.ts.map +1 -1
  24. package/dist/context/McpCustomServerByIndexProvider.js +18 -11
  25. package/dist/context/McpCustomServerByIndexProvider.js.map +1 -1
  26. package/dist/context/McpServerByIdProvider.d.ts +7 -3
  27. package/dist/context/McpServerByIdProvider.d.ts.map +1 -1
  28. package/dist/context/McpServerByIdProvider.js +15 -11
  29. package/dist/context/McpServerByIdProvider.js.map +1 -1
  30. package/dist/hooks/useMcpOAuthCallback.d.ts +16 -13
  31. package/dist/hooks/useMcpOAuthCallback.d.ts.map +1 -1
  32. package/dist/hooks/useMcpOAuthCallback.js +59 -55
  33. package/dist/hooks/useMcpOAuthCallback.js.map +1 -1
  34. package/dist/index.d.ts +17 -18
  35. package/dist/index.js +14 -26
  36. package/dist/mcp-scope.d.ts +91 -94
  37. package/dist/mcp-scope.d.ts.map +1 -1
  38. package/dist/mcp-scope.js +0 -1
  39. package/dist/primitives/addForm/McpAddFormAuthFields.d.ts +17 -13
  40. package/dist/primitives/addForm/McpAddFormAuthFields.d.ts.map +1 -1
  41. package/dist/primitives/addForm/McpAddFormAuthFields.js +23 -14
  42. package/dist/primitives/addForm/McpAddFormAuthFields.js.map +1 -1
  43. package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts +9 -5
  44. package/dist/primitives/addForm/McpAddFormAuthSelect.d.ts.map +1 -1
  45. package/dist/primitives/addForm/McpAddFormAuthSelect.js +36 -16
  46. package/dist/primitives/addForm/McpAddFormAuthSelect.js.map +1 -1
  47. package/dist/primitives/addForm/McpAddFormCancel.d.ts +10 -6
  48. package/dist/primitives/addForm/McpAddFormCancel.d.ts.map +1 -1
  49. package/dist/primitives/addForm/McpAddFormCancel.js +19 -11
  50. package/dist/primitives/addForm/McpAddFormCancel.js.map +1 -1
  51. package/dist/primitives/addForm/McpAddFormError.d.ts +10 -6
  52. package/dist/primitives/addForm/McpAddFormError.d.ts.map +1 -1
  53. package/dist/primitives/addForm/McpAddFormError.js +15 -8
  54. package/dist/primitives/addForm/McpAddFormError.js.map +1 -1
  55. package/dist/primitives/addForm/McpAddFormNameField.d.ts +9 -5
  56. package/dist/primitives/addForm/McpAddFormNameField.d.ts.map +1 -1
  57. package/dist/primitives/addForm/McpAddFormNameField.js +17 -6
  58. package/dist/primitives/addForm/McpAddFormNameField.js.map +1 -1
  59. package/dist/primitives/addForm/McpAddFormRoot.d.ts +15 -11
  60. package/dist/primitives/addForm/McpAddFormRoot.d.ts.map +1 -1
  61. package/dist/primitives/addForm/McpAddFormRoot.js +134 -94
  62. package/dist/primitives/addForm/McpAddFormRoot.js.map +1 -1
  63. package/dist/primitives/addForm/McpAddFormSubmit.d.ts +10 -6
  64. package/dist/primitives/addForm/McpAddFormSubmit.d.ts.map +1 -1
  65. package/dist/primitives/addForm/McpAddFormSubmit.js +16 -6
  66. package/dist/primitives/addForm/McpAddFormSubmit.js.map +1 -1
  67. package/dist/primitives/addForm/McpAddFormUrlField.d.ts +9 -5
  68. package/dist/primitives/addForm/McpAddFormUrlField.d.ts.map +1 -1
  69. package/dist/primitives/addForm/McpAddFormUrlField.js +18 -6
  70. package/dist/primitives/addForm/McpAddFormUrlField.js.map +1 -1
  71. package/dist/primitives/addForm/context.d.ts +22 -18
  72. package/dist/primitives/addForm/context.d.ts.map +1 -1
  73. package/dist/primitives/addForm/context.js +9 -7
  74. package/dist/primitives/addForm/context.js.map +1 -1
  75. package/dist/primitives/addForm.d.ts +15 -8
  76. package/dist/primitives/addForm.d.ts.map +1 -1
  77. package/dist/primitives/addForm.js +23 -8
  78. package/dist/primitives/addForm.js.map +1 -1
  79. package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts +10 -6
  80. package/dist/primitives/manager/McpManagerAddCustomTrigger.d.ts.map +1 -1
  81. package/dist/primitives/manager/McpManagerAddCustomTrigger.js +13 -6
  82. package/dist/primitives/manager/McpManagerAddCustomTrigger.js.map +1 -1
  83. package/dist/primitives/manager/McpManagerConnectors.d.ts +18 -14
  84. package/dist/primitives/manager/McpManagerConnectors.d.ts.map +1 -1
  85. package/dist/primitives/manager/McpManagerConnectors.js +37 -35
  86. package/dist/primitives/manager/McpManagerConnectors.js.map +1 -1
  87. package/dist/primitives/manager/McpManagerCustomServers.d.ts +18 -14
  88. package/dist/primitives/manager/McpManagerCustomServers.d.ts.map +1 -1
  89. package/dist/primitives/manager/McpManagerCustomServers.js +38 -32
  90. package/dist/primitives/manager/McpManagerCustomServers.js.map +1 -1
  91. package/dist/primitives/manager/McpManagerRoot.d.ts +10 -6
  92. package/dist/primitives/manager/McpManagerRoot.d.ts.map +1 -1
  93. package/dist/primitives/manager/McpManagerRoot.js +14 -6
  94. package/dist/primitives/manager/McpManagerRoot.js.map +1 -1
  95. package/dist/primitives/manager.d.ts +11 -4
  96. package/dist/primitives/manager.d.ts.map +1 -1
  97. package/dist/primitives/manager.js +15 -4
  98. package/dist/primitives/manager.js.map +1 -1
  99. package/dist/primitives/server/McpServerConnectButton.d.ts +10 -6
  100. package/dist/primitives/server/McpServerConnectButton.d.ts.map +1 -1
  101. package/dist/primitives/server/McpServerConnectButton.js +28 -17
  102. package/dist/primitives/server/McpServerConnectButton.js.map +1 -1
  103. package/dist/primitives/server/McpServerDisconnectButton.d.ts +10 -6
  104. package/dist/primitives/server/McpServerDisconnectButton.d.ts.map +1 -1
  105. package/dist/primitives/server/McpServerDisconnectButton.js +27 -17
  106. package/dist/primitives/server/McpServerDisconnectButton.js.map +1 -1
  107. package/dist/primitives/server/McpServerError.d.ts +10 -6
  108. package/dist/primitives/server/McpServerError.d.ts.map +1 -1
  109. package/dist/primitives/server/McpServerError.js +15 -8
  110. package/dist/primitives/server/McpServerError.js.map +1 -1
  111. package/dist/primitives/server/McpServerIcon.d.ts +16 -14
  112. package/dist/primitives/server/McpServerIcon.d.ts.map +1 -1
  113. package/dist/primitives/server/McpServerIcon.js +18 -10
  114. package/dist/primitives/server/McpServerIcon.js.map +1 -1
  115. package/dist/primitives/server/McpServerName.d.ts +10 -6
  116. package/dist/primitives/server/McpServerName.d.ts.map +1 -1
  117. package/dist/primitives/server/McpServerName.js +14 -6
  118. package/dist/primitives/server/McpServerName.js.map +1 -1
  119. package/dist/primitives/server/McpServerOAuthLink.d.ts +13 -11
  120. package/dist/primitives/server/McpServerOAuthLink.d.ts.map +1 -1
  121. package/dist/primitives/server/McpServerOAuthLink.js +18 -9
  122. package/dist/primitives/server/McpServerOAuthLink.js.map +1 -1
  123. package/dist/primitives/server/McpServerRemoveButton.d.ts +10 -6
  124. package/dist/primitives/server/McpServerRemoveButton.d.ts.map +1 -1
  125. package/dist/primitives/server/McpServerRemoveButton.js +21 -14
  126. package/dist/primitives/server/McpServerRemoveButton.js.map +1 -1
  127. package/dist/primitives/server/McpServerRoot.d.ts +10 -6
  128. package/dist/primitives/server/McpServerRoot.d.ts.map +1 -1
  129. package/dist/primitives/server/McpServerRoot.js +20 -9
  130. package/dist/primitives/server/McpServerRoot.js.map +1 -1
  131. package/dist/primitives/server/McpServerStatus.d.ts +10 -6
  132. package/dist/primitives/server/McpServerStatus.d.ts.map +1 -1
  133. package/dist/primitives/server/McpServerStatus.js +15 -6
  134. package/dist/primitives/server/McpServerStatus.js.map +1 -1
  135. package/dist/primitives/server/McpServerToolName.d.ts +10 -6
  136. package/dist/primitives/server/McpServerToolName.d.ts.map +1 -1
  137. package/dist/primitives/server/McpServerToolName.js +15 -6
  138. package/dist/primitives/server/McpServerToolName.js.map +1 -1
  139. package/dist/primitives/server/McpServerTools.d.ts +12 -8
  140. package/dist/primitives/server/McpServerTools.d.ts.map +1 -1
  141. package/dist/primitives/server/McpServerTools.js +17 -13
  142. package/dist/primitives/server/McpServerTools.js.map +1 -1
  143. package/dist/primitives/server.d.ts +18 -11
  144. package/dist/primitives/server.d.ts.map +1 -1
  145. package/dist/primitives/server.js +30 -11
  146. package/dist/primitives/server.js.map +1 -1
  147. package/dist/resources/McpManagerResource.d.ts +13 -11
  148. package/dist/resources/McpManagerResource.d.ts.map +1 -1
  149. package/dist/resources/McpManagerResource.js +149 -183
  150. package/dist/resources/McpManagerResource.js.map +1 -1
  151. package/dist/resources/McpServerResource.d.ts +19 -15
  152. package/dist/resources/McpServerResource.d.ts.map +1 -1
  153. package/dist/resources/McpServerResource.js +186 -235
  154. package/dist/resources/McpServerResource.js.map +1 -1
  155. package/dist/resources/storage/McpCustomStorage.d.ts +6 -2
  156. package/dist/resources/storage/McpCustomStorage.d.ts.map +1 -1
  157. package/dist/resources/storage/McpCustomStorage.js +5 -1
  158. package/dist/resources/storage/McpCustomStorage.js.map +1 -1
  159. package/dist/resources/storage/McpLocalStorage.d.ts +9 -7
  160. package/dist/resources/storage/McpLocalStorage.d.ts.map +1 -1
  161. package/dist/resources/storage/McpLocalStorage.js +51 -62
  162. package/dist/resources/storage/McpLocalStorage.js.map +1 -1
  163. package/dist/resources/storage/McpMemoryStorage.d.ts +6 -2
  164. package/dist/resources/storage/McpMemoryStorage.d.ts.map +1 -1
  165. package/dist/resources/storage/McpMemoryStorage.js +20 -16
  166. package/dist/resources/storage/McpMemoryStorage.js.map +1 -1
  167. package/dist/resources/storage/types.d.ts +14 -10
  168. package/dist/resources/storage/types.d.ts.map +1 -1
  169. package/dist/resources/storage/types.js +0 -2
  170. package/dist/utils/serverId.d.ts +4 -1
  171. package/dist/utils/serverId.d.ts.map +1 -1
  172. package/dist/utils/serverId.js +8 -14
  173. package/dist/utils/serverId.js.map +1 -1
  174. package/package.json +12 -12
  175. package/dist/auth/types.js.map +0 -1
  176. package/dist/index.d.ts.map +0 -1
  177. package/dist/index.js.map +0 -1
  178. package/dist/mcp-scope.js.map +0 -1
  179. package/dist/resources/storage/types.js.map +0 -1
@@ -1,9 +1,16 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef, } from "react";
1
+ import { forwardRef } from "react";
3
2
  import { Primitive } from "@radix-ui/react-primitive";
4
- export const McpManagerPrimitiveAddCustomTrigger = forwardRef((props, ref) => {
5
- return _jsx(Primitive.button, { ...props, type: "button", ref: ref });
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/primitives/manager/McpManagerAddCustomTrigger.tsx
5
+ const McpManagerPrimitiveAddCustomTrigger = forwardRef((props, ref) => {
6
+ return /* @__PURE__ */ jsx(Primitive.button, {
7
+ ...props,
8
+ type: "button",
9
+ ref
10
+ });
6
11
  });
7
- McpManagerPrimitiveAddCustomTrigger.displayName =
8
- "McpManagerPrimitive.AddCustomTrigger";
12
+ McpManagerPrimitiveAddCustomTrigger.displayName = "McpManagerPrimitive.AddCustomTrigger";
13
+ //#endregion
14
+ export { McpManagerPrimitiveAddCustomTrigger };
15
+
9
16
  //# sourceMappingURL=McpManagerAddCustomTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpManagerAddCustomTrigger.js","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerAddCustomTrigger.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAOtD,MAAM,CAAC,MAAM,mCAAmC,GAAG,UAAU,CAG3D,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,OAAO,KAAC,SAAS,CAAC,MAAM,OAAK,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,GAAG,GAAI,CAAC;AACjE,CAAC,CAAC,CAAC;AAEH,mCAAmC,CAAC,WAAW;IAC7C,sCAAsC,CAAC"}
1
+ {"version":3,"file":"McpManagerAddCustomTrigger.js","names":[],"sources":["../../../src/primitives/manager/McpManagerAddCustomTrigger.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\n\nexport namespace McpManagerPrimitiveAddCustomTrigger {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpManagerPrimitiveAddCustomTrigger = forwardRef<\n McpManagerPrimitiveAddCustomTrigger.Element,\n McpManagerPrimitiveAddCustomTrigger.Props\n>((props, ref) => {\n return <Primitive.button {...props} type=\"button\" ref={ref} />;\n});\n\nMcpManagerPrimitiveAddCustomTrigger.displayName =\n \"McpManagerPrimitive.AddCustomTrigger\";\n"],"mappings":";;;;AAYA,MAAa,sCAAsC,YAGhD,OAAO,QAAQ;CAChB,OAAO,oBAAC,UAAU,QAAX;EAAkB,GAAI;EAAO,MAAK;EAAc;CAAM,CAAA;AAC/D,CAAC;AAED,oCAAoC,cAClC"}
@@ -1,16 +1,18 @@
1
- import { type FC, type ReactNode } from "react";
2
- import type { MCPServerState } from "../../mcp-scope.js";
3
- export declare namespace McpManagerPrimitiveConnectors {
4
- type Props = {
5
- /**
6
- * Render function called once per connector. Receives a lazy `server`
7
- * accessor — reading it inside the render function subscribes to that
8
- * connector's state.
9
- */
10
- children: (value: {
11
- server: MCPServerState;
12
- }) => ReactNode;
13
- };
1
+ import { MCPServerState } from "../../mcp-scope.js";
2
+ import { FC, ReactNode } from "react";
3
+
4
+ //#region src/primitives/manager/McpManagerConnectors.d.ts
5
+ declare namespace McpManagerPrimitiveConnectors {
6
+ type Props = {
7
+ /**
8
+ * Render function called once per connector. Receives a lazy `server`
9
+ * accessor — reading it inside the render function subscribes to that
10
+ * connector's state.
11
+ */
12
+ children: (value: {
13
+ server: MCPServerState;
14
+ }) => ReactNode;
15
+ };
14
16
  }
15
17
  /**
16
18
  * Renders all connectors declared on `McpManagerResource`.
@@ -27,5 +29,7 @@ export declare namespace McpManagerPrimitiveConnectors {
27
29
  * </McpManagerPrimitive.Connectors>
28
30
  * ```
29
31
  */
30
- export declare const McpManagerPrimitiveConnectors: FC<McpManagerPrimitiveConnectors.Props>;
32
+ declare const McpManagerPrimitiveConnectors: FC<McpManagerPrimitiveConnectors.Props>;
33
+ //#endregion
34
+ export { McpManagerPrimitiveConnectors };
31
35
  //# sourceMappingURL=McpManagerConnectors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpManagerConnectors.d.ts","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerConnectors.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,2BAAwB;AAMtD,yBAAiB,6BAA6B,CAAC;IAC7C,KAAY,KAAK,GAAG;QAClB;;;;WAIG;QACH,QAAQ,EAAE,CAAC,KAAK,EAAE;YAAE,MAAM,EAAE,cAAc,CAAA;SAAE,KAAK,SAAS,CAAC;KAC5D,CAAC;CACH;AAoCD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,6BAA6B,EAAE,EAAE,CAAC,6BAA6B,CAAC,KAAK,CAI/E,CAAC"}
1
+ {"version":3,"file":"McpManagerConnectors.d.ts","names":[],"sources":["../../../src/primitives/manager/McpManagerConnectors.tsx"],"mappings":";;;;kBASiB,6BAAA;EAAA,KACH,KAAA;IADG;;;;;IAOb,QAAA,GAAW,KAAA;MAAS,MAAA,EAAQ,cAAA;IAAA,MAAqB,SAAS;EAAA;AAAA;;AAAA;AAqD9D;;;;;;;;AAAkF;;;;;cAArE,6BAAA,EAA+B,EAAE,CAAC,6BAAA,CAA8B,KAAA"}
@@ -1,41 +1,43 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { memo, useMemo } from "react";
3
- import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
4
1
  import { McpConnectorByIndexProvider } from "../../context/McpConnectorByIndexProvider.js";
5
- // ASCII Unit Separator — never appears in MCP connector ids (uuids, urls,
6
- // app-provided strings).
7
- const SEP = "\x1f";
2
+ import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
3
+ import { memo, useMemo } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/primitives/manager/McpManagerConnectors.tsx
6
+ const SEP = "";
8
7
  const McpManagerPrimitiveConnectorsInner = ({ children }) => {
9
- // Subscribe to the connector id list, joined to a primitive so identity
10
- // is stable when the list hasn't changed. Re-renders on add/remove/reorder
11
- // but not on per-item state changes.
12
- const idsJoined = useAuiState((s) => s.mcp.connectors.map((c) => c.id).join(SEP));
13
- const ids = useMemo(() => (idsJoined ? idsJoined.split(SEP) : []), [idsJoined]);
14
- return useMemo(() => {
15
- if (ids.length === 0)
16
- return null;
17
- return ids.map((id, index) => (_jsx(McpConnectorByIndexProvider, { index: index, children: _jsx(RenderChildrenWithAccessor, { getItemState: (aui) => aui.mcp().connector({ index }).getState(), children: (getItem) => children({
18
- get server() {
19
- return getItem();
20
- },
21
- }) }) }, id)));
22
- }, [ids, children]);
8
+ const idsJoined = useAuiState((s) => s.mcp.connectors.map((c) => c.id).join(SEP));
9
+ const ids = useMemo(() => idsJoined ? idsJoined.split(SEP) : [], [idsJoined]);
10
+ return useMemo(() => {
11
+ if (ids.length === 0) return null;
12
+ return ids.map((id, index) => /* @__PURE__ */ jsx(McpConnectorByIndexProvider, {
13
+ index,
14
+ children: /* @__PURE__ */ jsx(RenderChildrenWithAccessor, {
15
+ getItemState: (aui) => aui.mcp().connector({ index }).getState(),
16
+ children: (getItem) => children({ get server() {
17
+ return getItem();
18
+ } })
19
+ })
20
+ }, id));
21
+ }, [ids, children]);
23
22
  };
24
23
  /**
25
- * Renders all connectors declared on `McpManagerResource`.
26
- *
27
- * @example
28
- * ```tsx
29
- * <McpManagerPrimitive.Connectors>
30
- * {({ server }) => (
31
- * <McpServerPrimitive.Root>
32
- * <McpServerPrimitive.Name />
33
- * {server.connectionState === "error" && <p>{server.lastError?.message}</p>}
34
- * </McpServerPrimitive.Root>
35
- * )}
36
- * </McpManagerPrimitive.Connectors>
37
- * ```
38
- */
39
- export const McpManagerPrimitiveConnectors = memo(McpManagerPrimitiveConnectorsInner, (prev, next) => prev.children === next.children);
24
+ * Renders all connectors declared on `McpManagerResource`.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <McpManagerPrimitive.Connectors>
29
+ * {({ server }) => (
30
+ * <McpServerPrimitive.Root>
31
+ * <McpServerPrimitive.Name />
32
+ * {server.connectionState === "error" && <p>{server.lastError?.message}</p>}
33
+ * </McpServerPrimitive.Root>
34
+ * )}
35
+ * </McpManagerPrimitive.Connectors>
36
+ * ```
37
+ */
38
+ const McpManagerPrimitiveConnectors = memo(McpManagerPrimitiveConnectorsInner, (prev, next) => prev.children === next.children);
40
39
  McpManagerPrimitiveConnectors.displayName = "McpManagerPrimitive.Connectors";
40
+ //#endregion
41
+ export { McpManagerPrimitiveConnectors };
42
+
41
43
  //# sourceMappingURL=McpManagerConnectors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpManagerConnectors.js","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerConnectors.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA2B,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,qDAAkD;AAGxF,0EAA0E;AAC1E,yBAAyB;AACzB,MAAM,GAAG,GAAG,MAAM,CAAC;AAanB,MAAM,kCAAkC,GAEnC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpB,wEAAwE;IACxE,2EAA2E;IAC3E,qCAAqC;IACrC,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAClC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAC5C,CAAC;IACF,MAAM,GAAG,GAAG,OAAO,CACjB,GAAG,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7C,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAClC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,KAAC,2BAA2B,IAAU,KAAK,EAAE,KAAK,YAChD,KAAC,0BAA0B,IACzB,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,YAE/D,CAAC,OAAO,EAAE,EAAE,CACX,QAAQ,CAAC;oBACP,IAAI,MAAM;wBACR,OAAO,OAAO,EAAE,CAAC;oBACnB,CAAC;iBACF,CAAC,GAEuB,IAXG,EAAE,CAYN,CAC/B,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,6BAA6B,GACxC,IAAI,CACF,kCAAkC,EAClC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,CAChD,CAAC;AAEJ,6BAA6B,CAAC,WAAW,GAAG,gCAAgC,CAAC"}
1
+ {"version":3,"file":"McpManagerConnectors.js","names":[],"sources":["../../../src/primitives/manager/McpManagerConnectors.tsx"],"sourcesContent":["import { type FC, type ReactNode, memo, useMemo } from \"react\";\nimport { RenderChildrenWithAccessor, useAuiState } from \"@assistant-ui/store\";\nimport { McpConnectorByIndexProvider } from \"../../context/McpConnectorByIndexProvider\";\nimport type { MCPServerState } from \"../../mcp-scope\";\n\n// ASCII Unit Separator — never appears in MCP connector ids (uuids, urls,\n// app-provided strings).\nconst SEP = \"\\x1f\";\n\nexport namespace McpManagerPrimitiveConnectors {\n export type Props = {\n /**\n * Render function called once per connector. Receives a lazy `server`\n * accessor — reading it inside the render function subscribes to that\n * connector's state.\n */\n children: (value: { server: MCPServerState }) => ReactNode;\n };\n}\n\nconst McpManagerPrimitiveConnectorsInner: FC<{\n children: (value: { server: MCPServerState }) => ReactNode;\n}> = ({ children }) => {\n // Subscribe to the connector id list, joined to a primitive so identity\n // is stable when the list hasn't changed. Re-renders on add/remove/reorder\n // but not on per-item state changes.\n const idsJoined = useAuiState((s) =>\n s.mcp.connectors.map((c) => c.id).join(SEP),\n );\n const ids = useMemo(\n () => (idsJoined ? idsJoined.split(SEP) : []),\n [idsJoined],\n );\n\n return useMemo(() => {\n if (ids.length === 0) return null;\n return ids.map((id, index) => (\n <McpConnectorByIndexProvider key={id} index={index}>\n <RenderChildrenWithAccessor\n getItemState={(aui) => aui.mcp().connector({ index }).getState()}\n >\n {(getItem) =>\n children({\n get server() {\n return getItem();\n },\n })\n }\n </RenderChildrenWithAccessor>\n </McpConnectorByIndexProvider>\n ));\n }, [ids, children]);\n};\n\n/**\n * Renders all connectors declared on `McpManagerResource`.\n *\n * @example\n * ```tsx\n * <McpManagerPrimitive.Connectors>\n * {({ server }) => (\n * <McpServerPrimitive.Root>\n * <McpServerPrimitive.Name />\n * {server.connectionState === \"error\" && <p>{server.lastError?.message}</p>}\n * </McpServerPrimitive.Root>\n * )}\n * </McpManagerPrimitive.Connectors>\n * ```\n */\nexport const McpManagerPrimitiveConnectors: FC<McpManagerPrimitiveConnectors.Props> =\n memo(\n McpManagerPrimitiveConnectorsInner,\n (prev, next) => prev.children === next.children,\n );\n\nMcpManagerPrimitiveConnectors.displayName = \"McpManagerPrimitive.Connectors\";\n"],"mappings":";;;;;AAOA,MAAM,MAAM;AAaZ,MAAM,sCAEA,EAAE,eAAe;CAIrB,MAAM,YAAY,aAAa,MAC7B,EAAE,IAAI,WAAW,KAAK,MAAM,EAAE,EAAE,EAAE,KAAK,GAAG,CAC5C;CACA,MAAM,MAAM,cACH,YAAY,UAAU,MAAM,GAAG,IAAI,CAAC,GAC3C,CAAC,SAAS,CACZ;CAEA,OAAO,cAAc;EACnB,IAAI,IAAI,WAAW,GAAG,OAAO;EAC7B,OAAO,IAAI,KAAK,IAAI,UAClB,oBAAC,6BAAD;GAA6C;aAC3C,oBAAC,4BAAD;IACE,eAAe,QAAQ,IAAI,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,SAAS;eAE7D,YACA,SAAS,EACP,IAAI,SAAS;KACX,OAAO,QAAQ;IACjB,EACF,CAAC;GAEuB,CAAA;EACD,GAZK,EAYL,CAC9B;CACH,GAAG,CAAC,KAAK,QAAQ,CAAC;AACpB;;;;;;;;;;;;;;;;AAiBA,MAAa,gCACX,KACE,qCACC,MAAM,SAAS,KAAK,aAAa,KAAK,QACzC;AAEF,8BAA8B,cAAc"}
@@ -1,16 +1,18 @@
1
- import { type FC, type ReactNode } from "react";
2
- import type { MCPServerState } from "../../mcp-scope.js";
3
- export declare namespace McpManagerPrimitiveCustomServers {
4
- type Props = {
5
- /**
6
- * Render function called once per custom server. Receives a lazy
7
- * `server` accessor — reading it inside the render function subscribes
8
- * to that server's state.
9
- */
10
- children: (value: {
11
- server: MCPServerState;
12
- }) => ReactNode;
13
- };
1
+ import { MCPServerState } from "../../mcp-scope.js";
2
+ import { FC, ReactNode } from "react";
3
+
4
+ //#region src/primitives/manager/McpManagerCustomServers.d.ts
5
+ declare namespace McpManagerPrimitiveCustomServers {
6
+ type Props = {
7
+ /**
8
+ * Render function called once per custom server. Receives a lazy
9
+ * `server` accessor — reading it inside the render function subscribes
10
+ * to that server's state.
11
+ */
12
+ children: (value: {
13
+ server: MCPServerState;
14
+ }) => ReactNode;
15
+ };
14
16
  }
15
17
  /**
16
18
  * Renders all user-added custom servers persisted in storage.
@@ -27,5 +29,7 @@ export declare namespace McpManagerPrimitiveCustomServers {
27
29
  * </McpManagerPrimitive.CustomServers>
28
30
  * ```
29
31
  */
30
- export declare const McpManagerPrimitiveCustomServers: FC<McpManagerPrimitiveCustomServers.Props>;
32
+ declare const McpManagerPrimitiveCustomServers: FC<McpManagerPrimitiveCustomServers.Props>;
33
+ //#endregion
34
+ export { McpManagerPrimitiveCustomServers };
31
35
  //# sourceMappingURL=McpManagerCustomServers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpManagerCustomServers.d.ts","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerCustomServers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,2BAAwB;AAItD,yBAAiB,gCAAgC,CAAC;IAChD,KAAY,KAAK,GAAG;QAClB;;;;WAIG;QACH,QAAQ,EAAE,CAAC,KAAK,EAAE;YAAE,MAAM,EAAE,cAAc,CAAA;SAAE,KAAK,SAAS,CAAC;KAC5D,CAAC;CACH;AAiCD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAIrF,CAAC"}
1
+ {"version":3,"file":"McpManagerCustomServers.d.ts","names":[],"sources":["../../../src/primitives/manager/McpManagerCustomServers.tsx"],"mappings":";;;;kBAOiB,gCAAA;EAAA,KACH,KAAA;IADG;;;;;IAOb,QAAA,GAAW,KAAA;MAAS,MAAA,EAAQ,cAAA;IAAA,MAAqB,SAAS;EAAA;AAAA;;AAAA;AAkD9D;;;;;;;;AAAwF;;;;;cAA3E,gCAAA,EAAkC,EAAE,CAAC,gCAAA,CAAiC,KAAA"}
@@ -1,37 +1,43 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { memo, useMemo } from "react";
3
- import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
4
1
  import { McpCustomServerByIndexProvider } from "../../context/McpCustomServerByIndexProvider.js";
5
- const SEP = "\x1f";
2
+ import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
3
+ import { memo, useMemo } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/primitives/manager/McpManagerCustomServers.tsx
6
+ const SEP = "";
6
7
  const McpManagerPrimitiveCustomServersInner = ({ children }) => {
7
- const idsJoined = useAuiState((s) => s.mcp.customServers.map((c) => c.id).join(SEP));
8
- const ids = useMemo(() => (idsJoined ? idsJoined.split(SEP) : []), [idsJoined]);
9
- return useMemo(() => {
10
- if (ids.length === 0)
11
- return null;
12
- return ids.map((id, index) => (_jsx(McpCustomServerByIndexProvider, { index: index, children: _jsx(RenderChildrenWithAccessor, { getItemState: (aui) => aui.mcp().customServer({ index }).getState(), children: (getItem) => children({
13
- get server() {
14
- return getItem();
15
- },
16
- }) }) }, id)));
17
- }, [ids, children]);
8
+ const idsJoined = useAuiState((s) => s.mcp.customServers.map((c) => c.id).join(SEP));
9
+ const ids = useMemo(() => idsJoined ? idsJoined.split(SEP) : [], [idsJoined]);
10
+ return useMemo(() => {
11
+ if (ids.length === 0) return null;
12
+ return ids.map((id, index) => /* @__PURE__ */ jsx(McpCustomServerByIndexProvider, {
13
+ index,
14
+ children: /* @__PURE__ */ jsx(RenderChildrenWithAccessor, {
15
+ getItemState: (aui) => aui.mcp().customServer({ index }).getState(),
16
+ children: (getItem) => children({ get server() {
17
+ return getItem();
18
+ } })
19
+ })
20
+ }, id));
21
+ }, [ids, children]);
18
22
  };
19
23
  /**
20
- * Renders all user-added custom servers persisted in storage.
21
- *
22
- * @example
23
- * ```tsx
24
- * <McpManagerPrimitive.CustomServers>
25
- * {() => (
26
- * <McpServerPrimitive.Root>
27
- * <McpServerPrimitive.Name />
28
- * <McpServerPrimitive.RemoveButton>Remove</McpServerPrimitive.RemoveButton>
29
- * </McpServerPrimitive.Root>
30
- * )}
31
- * </McpManagerPrimitive.CustomServers>
32
- * ```
33
- */
34
- export const McpManagerPrimitiveCustomServers = memo(McpManagerPrimitiveCustomServersInner, (prev, next) => prev.children === next.children);
35
- McpManagerPrimitiveCustomServers.displayName =
36
- "McpManagerPrimitive.CustomServers";
24
+ * Renders all user-added custom servers persisted in storage.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <McpManagerPrimitive.CustomServers>
29
+ * {() => (
30
+ * <McpServerPrimitive.Root>
31
+ * <McpServerPrimitive.Name />
32
+ * <McpServerPrimitive.RemoveButton>Remove</McpServerPrimitive.RemoveButton>
33
+ * </McpServerPrimitive.Root>
34
+ * )}
35
+ * </McpManagerPrimitive.CustomServers>
36
+ * ```
37
+ */
38
+ const McpManagerPrimitiveCustomServers = memo(McpManagerPrimitiveCustomServersInner, (prev, next) => prev.children === next.children);
39
+ McpManagerPrimitiveCustomServers.displayName = "McpManagerPrimitive.CustomServers";
40
+ //#endregion
41
+ export { McpManagerPrimitiveCustomServers };
42
+
37
43
  //# sourceMappingURL=McpManagerCustomServers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpManagerCustomServers.js","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerCustomServers.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA2B,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,wDAAqD;AAG9F,MAAM,GAAG,GAAG,MAAM,CAAC;AAanB,MAAM,qCAAqC,GAEtC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpB,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAClC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAC/C,CAAC;IACF,MAAM,GAAG,GAAG,OAAO,CACjB,GAAG,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7C,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAClC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,KAAC,8BAA8B,IAAU,KAAK,EAAE,KAAK,YACnD,KAAC,0BAA0B,IACzB,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,YAElE,CAAC,OAAO,EAAE,EAAE,CACX,QAAQ,CAAC;oBACP,IAAI,MAAM;wBACR,OAAO,OAAO,EAAE,CAAC;oBACnB,CAAC;iBACF,CAAC,GAEuB,IAXM,EAAE,CAYN,CAClC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAC3C,IAAI,CACF,qCAAqC,EACrC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,CAChD,CAAC;AAEJ,gCAAgC,CAAC,WAAW;IAC1C,mCAAmC,CAAC"}
1
+ {"version":3,"file":"McpManagerCustomServers.js","names":[],"sources":["../../../src/primitives/manager/McpManagerCustomServers.tsx"],"sourcesContent":["import { type FC, type ReactNode, memo, useMemo } from \"react\";\nimport { RenderChildrenWithAccessor, useAuiState } from \"@assistant-ui/store\";\nimport { McpCustomServerByIndexProvider } from \"../../context/McpCustomServerByIndexProvider\";\nimport type { MCPServerState } from \"../../mcp-scope\";\n\nconst SEP = \"\\x1f\";\n\nexport namespace McpManagerPrimitiveCustomServers {\n export type Props = {\n /**\n * Render function called once per custom server. Receives a lazy\n * `server` accessor — reading it inside the render function subscribes\n * to that server's state.\n */\n children: (value: { server: MCPServerState }) => ReactNode;\n };\n}\n\nconst McpManagerPrimitiveCustomServersInner: FC<{\n children: (value: { server: MCPServerState }) => ReactNode;\n}> = ({ children }) => {\n const idsJoined = useAuiState((s) =>\n s.mcp.customServers.map((c) => c.id).join(SEP),\n );\n const ids = useMemo(\n () => (idsJoined ? idsJoined.split(SEP) : []),\n [idsJoined],\n );\n\n return useMemo(() => {\n if (ids.length === 0) return null;\n return ids.map((id, index) => (\n <McpCustomServerByIndexProvider key={id} index={index}>\n <RenderChildrenWithAccessor\n getItemState={(aui) => aui.mcp().customServer({ index }).getState()}\n >\n {(getItem) =>\n children({\n get server() {\n return getItem();\n },\n })\n }\n </RenderChildrenWithAccessor>\n </McpCustomServerByIndexProvider>\n ));\n }, [ids, children]);\n};\n\n/**\n * Renders all user-added custom servers persisted in storage.\n *\n * @example\n * ```tsx\n * <McpManagerPrimitive.CustomServers>\n * {() => (\n * <McpServerPrimitive.Root>\n * <McpServerPrimitive.Name />\n * <McpServerPrimitive.RemoveButton>Remove</McpServerPrimitive.RemoveButton>\n * </McpServerPrimitive.Root>\n * )}\n * </McpManagerPrimitive.CustomServers>\n * ```\n */\nexport const McpManagerPrimitiveCustomServers: FC<McpManagerPrimitiveCustomServers.Props> =\n memo(\n McpManagerPrimitiveCustomServersInner,\n (prev, next) => prev.children === next.children,\n );\n\nMcpManagerPrimitiveCustomServers.displayName =\n \"McpManagerPrimitive.CustomServers\";\n"],"mappings":";;;;;AAKA,MAAM,MAAM;AAaZ,MAAM,yCAEA,EAAE,eAAe;CACrB,MAAM,YAAY,aAAa,MAC7B,EAAE,IAAI,cAAc,KAAK,MAAM,EAAE,EAAE,EAAE,KAAK,GAAG,CAC/C;CACA,MAAM,MAAM,cACH,YAAY,UAAU,MAAM,GAAG,IAAI,CAAC,GAC3C,CAAC,SAAS,CACZ;CAEA,OAAO,cAAc;EACnB,IAAI,IAAI,WAAW,GAAG,OAAO;EAC7B,OAAO,IAAI,KAAK,IAAI,UAClB,oBAAC,gCAAD;GAAgD;aAC9C,oBAAC,4BAAD;IACE,eAAe,QAAQ,IAAI,IAAI,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,SAAS;eAEhE,YACA,SAAS,EACP,IAAI,SAAS;KACX,OAAO,QAAQ;IACjB,EACF,CAAC;GAEuB,CAAA;EACE,GAZK,EAYL,CACjC;CACH,GAAG,CAAC,KAAK,QAAQ,CAAC;AACpB;;;;;;;;;;;;;;;;AAiBA,MAAa,mCACX,KACE,wCACC,MAAM,SAAS,KAAK,aAAa,KAAK,QACzC;AAEF,iCAAiC,cAC/B"}
@@ -1,10 +1,14 @@
1
- import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
1
+ import { ComponentPropsWithoutRef, ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
- export declare namespace McpManagerPrimitiveRoot {
4
- type Element = ComponentRef<typeof Primitive.div>;
5
- type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
3
+
4
+ //#region src/primitives/manager/McpManagerRoot.d.ts
5
+ declare namespace McpManagerPrimitiveRoot {
6
+ type Element = ComponentRef<typeof Primitive.div>;
7
+ type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
6
8
  }
7
- export declare const McpManagerPrimitiveRoot: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
8
- asChild?: boolean;
9
+ declare const McpManagerPrimitiveRoot: 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 { McpManagerPrimitiveRoot };
10
14
  //# sourceMappingURL=McpManagerRoot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpManagerRoot.d.ts","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerRoot.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,uBAAuB,CAAC;IACvC,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,uBAAuB;;0DAYlC,CAAC"}
1
+ {"version":3,"file":"McpManagerRoot.d.ts","names":[],"sources":["../../../src/primitives/manager/McpManagerRoot.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,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
- export const McpManagerPrimitiveRoot = forwardRef((props, ref) => {
6
- const isHydrated = useAuiState((s) => s.mcp.isHydrated);
7
- return (_jsx(Primitive.div, { ...props, ref: ref, "data-mcp-hydrated": isHydrated || undefined }));
2
+ import { forwardRef } from "react";
3
+ import { Primitive } from "@radix-ui/react-primitive";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/primitives/manager/McpManagerRoot.tsx
6
+ const McpManagerPrimitiveRoot = forwardRef((props, ref) => {
7
+ const isHydrated = useAuiState((s) => s.mcp.isHydrated);
8
+ return /* @__PURE__ */ jsx(Primitive.div, {
9
+ ...props,
10
+ ref,
11
+ "data-mcp-hydrated": isHydrated || void 0
12
+ });
8
13
  });
9
14
  McpManagerPrimitiveRoot.displayName = "McpManagerPrimitive.Root";
15
+ //#endregion
16
+ export { McpManagerPrimitiveRoot };
17
+
10
18
  //# sourceMappingURL=McpManagerRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpManagerRoot.js","sourceRoot":"","sources":["../../../src/primitives/manager/McpManagerRoot.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAG/C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACxD,OAAO,CACL,KAAC,SAAS,CAAC,GAAG,OACR,KAAK,EACT,GAAG,EAAE,GAAG,uBACW,UAAU,IAAI,SAAS,GAC1C,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,WAAW,GAAG,0BAA0B,CAAC"}
1
+ {"version":3,"file":"McpManagerRoot.js","names":[],"sources":["../../../src/primitives/manager/McpManagerRoot.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 McpManagerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpManagerPrimitiveRoot = forwardRef<\n McpManagerPrimitiveRoot.Element,\n McpManagerPrimitiveRoot.Props\n>((props, ref) => {\n const isHydrated = useAuiState((s) => s.mcp.isHydrated);\n return (\n <Primitive.div\n {...props}\n ref={ref}\n data-mcp-hydrated={isHydrated || undefined}\n />\n );\n});\n\nMcpManagerPrimitiveRoot.displayName = \"McpManagerPrimitive.Root\";\n"],"mappings":";;;;;AAaA,MAAa,0BAA0B,YAGpC,OAAO,QAAQ;CAChB,MAAM,aAAa,aAAa,MAAM,EAAE,IAAI,UAAU;CACtD,OACE,oBAAC,UAAU,KAAX;EACE,GAAI;EACC;EACL,qBAAmB,cAAc,KAAA;CAClC,CAAA;AAEL,CAAC;AAED,wBAAwB,cAAc"}
@@ -1,5 +1,12 @@
1
- export { McpManagerPrimitiveRoot as Root } from "./manager/McpManagerRoot.js";
2
- export { McpManagerPrimitiveConnectors as Connectors } from "./manager/McpManagerConnectors.js";
3
- export { McpManagerPrimitiveCustomServers as CustomServers } from "./manager/McpManagerCustomServers.js";
4
- export { McpManagerPrimitiveAddCustomTrigger as AddCustomTrigger } from "./manager/McpManagerAddCustomTrigger.js";
1
+ import { McpManagerPrimitiveRoot } from "./manager/McpManagerRoot.js";
2
+ import { McpManagerPrimitiveConnectors } from "./manager/McpManagerConnectors.js";
3
+ import { McpManagerPrimitiveCustomServers } from "./manager/McpManagerCustomServers.js";
4
+ import { McpManagerPrimitiveAddCustomTrigger } from "./manager/McpManagerAddCustomTrigger.js";
5
+
6
+ //#region src/primitives/manager.d.ts
7
+ declare namespace manager_d_exports {
8
+ export { McpManagerPrimitiveAddCustomTrigger as AddCustomTrigger, McpManagerPrimitiveConnectors as Connectors, McpManagerPrimitiveCustomServers as CustomServers, McpManagerPrimitiveRoot as Root };
9
+ }
10
+ //#endregion
11
+ export { McpManagerPrimitiveAddCustomTrigger as AddCustomTrigger, McpManagerPrimitiveConnectors as Connectors, McpManagerPrimitiveCustomServers as CustomServers, McpManagerPrimitiveRoot as Root, manager_d_exports };
5
12
  //# sourceMappingURL=manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/primitives/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,IAAI,IAAI,EAAE,oCAAiC;AAC3E,OAAO,EAAE,6BAA6B,IAAI,UAAU,EAAE,0CAAuC;AAC7F,OAAO,EAAE,gCAAgC,IAAI,aAAa,EAAE,6CAA0C;AACtG,OAAO,EAAE,mCAAmC,IAAI,gBAAgB,EAAE,gDAA6C"}
1
+ {"version":3,"file":"manager.d.ts","names":[],"sources":["../../src/primitives/manager.ts"],"mappings":""}
@@ -1,5 +1,16 @@
1
- export { McpManagerPrimitiveRoot as Root } from "./manager/McpManagerRoot.js";
2
- export { McpManagerPrimitiveConnectors as Connectors } from "./manager/McpManagerConnectors.js";
3
- export { McpManagerPrimitiveCustomServers as CustomServers } from "./manager/McpManagerCustomServers.js";
4
- export { McpManagerPrimitiveAddCustomTrigger as AddCustomTrigger } from "./manager/McpManagerAddCustomTrigger.js";
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ import { McpManagerPrimitiveRoot } from "./manager/McpManagerRoot.js";
3
+ import { McpManagerPrimitiveConnectors } from "./manager/McpManagerConnectors.js";
4
+ import { McpManagerPrimitiveCustomServers } from "./manager/McpManagerCustomServers.js";
5
+ import { McpManagerPrimitiveAddCustomTrigger } from "./manager/McpManagerAddCustomTrigger.js";
6
+ //#region src/primitives/manager.ts
7
+ var manager_exports = /* @__PURE__ */ __exportAll({
8
+ AddCustomTrigger: () => McpManagerPrimitiveAddCustomTrigger,
9
+ Connectors: () => McpManagerPrimitiveConnectors,
10
+ CustomServers: () => McpManagerPrimitiveCustomServers,
11
+ Root: () => McpManagerPrimitiveRoot
12
+ });
13
+ //#endregion
14
+ export { McpManagerPrimitiveAddCustomTrigger as AddCustomTrigger, McpManagerPrimitiveConnectors as Connectors, McpManagerPrimitiveCustomServers as CustomServers, McpManagerPrimitiveRoot as Root, manager_exports };
15
+
5
16
  //# sourceMappingURL=manager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/primitives/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,IAAI,IAAI,EAAE,oCAAiC;AAC3E,OAAO,EAAE,6BAA6B,IAAI,UAAU,EAAE,0CAAuC;AAC7F,OAAO,EAAE,gCAAgC,IAAI,aAAa,EAAE,6CAA0C;AACtG,OAAO,EAAE,mCAAmC,IAAI,gBAAgB,EAAE,gDAA6C"}
1
+ {"version":3,"file":"manager.js","names":[],"sources":["../../src/primitives/manager.ts"],"sourcesContent":["export { McpManagerPrimitiveRoot as Root } from \"./manager/McpManagerRoot\";\nexport { McpManagerPrimitiveConnectors as Connectors } from \"./manager/McpManagerConnectors\";\nexport { McpManagerPrimitiveCustomServers as CustomServers } from \"./manager/McpManagerCustomServers\";\nexport { McpManagerPrimitiveAddCustomTrigger as AddCustomTrigger } from \"./manager/McpManagerAddCustomTrigger\";\n"],"mappings":""}
@@ -1,10 +1,14 @@
1
- import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
1
+ import { ComponentPropsWithoutRef, ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
- export declare namespace McpServerPrimitiveConnectButton {
4
- type Element = ComponentRef<typeof Primitive.button>;
5
- type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
3
+
4
+ //#region src/primitives/server/McpServerConnectButton.d.ts
5
+ declare namespace McpServerPrimitiveConnectButton {
6
+ type Element = ComponentRef<typeof Primitive.button>;
7
+ type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
6
8
  }
7
- export declare const McpServerPrimitiveConnectButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
8
- asChild?: boolean;
9
+ declare const McpServerPrimitiveConnectButton: 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 { McpServerPrimitiveConnectButton };
10
14
  //# sourceMappingURL=McpServerConnectButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpServerConnectButton.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerConnectButton.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,+BAA+B,CAAC;IAC/C,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5D,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;CACvE;AAID,eAAO,MAAM,+BAA+B;;6DAoB1C,CAAC"}
1
+ {"version":3,"file":"McpServerConnectButton.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerConnectButton.tsx"],"mappings":";;;;kBAQiB,+BAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,MAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,MAAA;AAAA;AAAA,cAKnD,+BAAA,kBAA+B,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,iBAAA,oBAAA,oBAAA,CAAA,iBAAA"}
@@ -1,20 +1,31 @@
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
- const CONNECTABLE = new Set(["disconnected", "error", "authRequired"]);
6
- export const McpServerPrimitiveConnectButton = forwardRef((props, ref) => {
7
- const state = useAuiState((s) => s.mcpServer.connectionState);
8
- const aui = useAui();
9
- if (!CONNECTABLE.has(state))
10
- return null;
11
- return (_jsx(Primitive.button, { ...props, type: "button", ref: ref, "data-state-hint": state === "authRequired" ? "auth-required" : undefined, onClick: (e) => {
12
- props.onClick?.(e);
13
- if (e.defaultPrevented)
14
- return;
15
- void aui.mcpServer().connect();
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/McpServerConnectButton.tsx
6
+ const CONNECTABLE = new Set([
7
+ "disconnected",
8
+ "error",
9
+ "authRequired"
10
+ ]);
11
+ const McpServerPrimitiveConnectButton = forwardRef((props, ref) => {
12
+ const state = useAuiState((s) => s.mcpServer.connectionState);
13
+ const aui = useAui();
14
+ if (!CONNECTABLE.has(state)) return null;
15
+ return /* @__PURE__ */ jsx(Primitive.button, {
16
+ ...props,
17
+ type: "button",
18
+ ref,
19
+ "data-state-hint": state === "authRequired" ? "auth-required" : void 0,
20
+ onClick: (e) => {
21
+ props.onClick?.(e);
22
+ if (e.defaultPrevented) return;
23
+ aui.mcpServer().connect();
24
+ }
25
+ });
17
26
  });
18
- McpServerPrimitiveConnectButton.displayName =
19
- "McpServerPrimitive.ConnectButton";
27
+ McpServerPrimitiveConnectButton.displayName = "McpServerPrimitive.ConnectButton";
28
+ //#endregion
29
+ export { McpServerPrimitiveConnectButton };
30
+
20
31
  //# sourceMappingURL=McpServerConnectButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpServerConnectButton.js","sourceRoot":"","sources":["../../../src/primitives/server/McpServerConnectButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAO1D,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,+BAA+B,GAAG,UAAU,CAGvD,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC9D,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,OAAO,CACL,KAAC,SAAS,CAAC,MAAM,OACX,KAAK,EACT,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,GAAG,qBACS,KAAK,KAAK,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,EACvE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,CAAC,CAAC,gBAAgB;gBAAE,OAAO;YAC/B,KAAK,GAAG,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;QACjC,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,+BAA+B,CAAC,WAAW;IACzC,kCAAkC,CAAC"}
1
+ {"version":3,"file":"McpServerConnectButton.js","names":[],"sources":["../../../src/primitives/server/McpServerConnectButton.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 McpServerPrimitiveConnectButton {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nconst CONNECTABLE = new Set([\"disconnected\", \"error\", \"authRequired\"]);\n\nexport const McpServerPrimitiveConnectButton = forwardRef<\n McpServerPrimitiveConnectButton.Element,\n McpServerPrimitiveConnectButton.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n const aui = useAui();\n if (!CONNECTABLE.has(state)) return null;\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n data-state-hint={state === \"authRequired\" ? \"auth-required\" : undefined}\n onClick={(e) => {\n props.onClick?.(e);\n if (e.defaultPrevented) return;\n void aui.mcpServer().connect();\n }}\n />\n );\n});\n\nMcpServerPrimitiveConnectButton.displayName =\n \"McpServerPrimitive.ConnectButton\";\n"],"mappings":";;;;;AAaA,MAAM,cAAc,IAAI,IAAI;CAAC;CAAgB;CAAS;AAAc,CAAC;AAErE,MAAa,kCAAkC,YAG5C,OAAO,QAAQ;CAChB,MAAM,QAAQ,aAAa,MAAM,EAAE,UAAU,eAAe;CAC5D,MAAM,MAAM,OAAO;CACnB,IAAI,CAAC,YAAY,IAAI,KAAK,GAAG,OAAO;CACpC,OACE,oBAAC,UAAU,QAAX;EACE,GAAI;EACJ,MAAK;EACA;EACL,mBAAiB,UAAU,iBAAiB,kBAAkB,KAAA;EAC9D,UAAU,MAAM;GACd,MAAM,UAAU,CAAC;GACjB,IAAI,EAAE,kBAAkB;GACxB,IAAS,UAAU,EAAE,QAAQ;EAC/B;CACD,CAAA;AAEL,CAAC;AAED,gCAAgC,cAC9B"}
@@ -1,10 +1,14 @@
1
- import { type ComponentPropsWithoutRef, type ComponentRef } from "react";
1
+ import { ComponentPropsWithoutRef, ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
- export declare namespace McpServerPrimitiveDisconnectButton {
4
- type Element = ComponentRef<typeof Primitive.button>;
5
- type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
3
+
4
+ //#region src/primitives/server/McpServerDisconnectButton.d.ts
5
+ declare namespace McpServerPrimitiveDisconnectButton {
6
+ type Element = ComponentRef<typeof Primitive.button>;
7
+ type Props = ComponentPropsWithoutRef<typeof Primitive.button>;
6
8
  }
7
- export declare const McpServerPrimitiveDisconnectButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
8
- asChild?: boolean;
9
+ declare const McpServerPrimitiveDisconnectButton: 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 { McpServerPrimitiveDisconnectButton };
10
14
  //# sourceMappingURL=McpServerDisconnectButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpServerDisconnectButton.d.ts","sourceRoot":"","sources":["../../../src/primitives/server/McpServerDisconnectButton.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,kCAAkC,CAAC;IAClD,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5D,KAAY,KAAK,GAAG,wBAAwB,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;CACvE;AAID,eAAO,MAAM,kCAAkC;;6DAmB7C,CAAC"}
1
+ {"version":3,"file":"McpServerDisconnectButton.d.ts","names":[],"sources":["../../../src/primitives/server/McpServerDisconnectButton.tsx"],"mappings":";;;;kBAQiB,kCAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,MAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,MAAA;AAAA;AAAA,cAKnD,kCAAA,kBAAkC,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,iBAAA,oBAAA,oBAAA,CAAA,iBAAA"}