@assistant-ui/react-mcp 0.0.8 → 0.0.11

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 (86) hide show
  1. package/dist/auth/buildHeaders.js.map +1 -1
  2. package/dist/auth/createOAuthProvider.js.map +1 -1
  3. package/dist/connector.js.map +1 -1
  4. package/dist/context/McpConnectorByIndexProvider.js +29 -6
  5. package/dist/context/McpConnectorByIndexProvider.js.map +1 -1
  6. package/dist/context/McpCustomServerByIndexProvider.js +29 -6
  7. package/dist/context/McpCustomServerByIndexProvider.js.map +1 -1
  8. package/dist/context/McpServerByIdProvider.js +29 -6
  9. package/dist/context/McpServerByIdProvider.js.map +1 -1
  10. package/dist/hooks/useMcpOAuthCallback.js +30 -2
  11. package/dist/hooks/useMcpOAuthCallback.js.map +1 -1
  12. package/dist/primitives/addForm/McpAddFormAuthFields.js +59 -16
  13. package/dist/primitives/addForm/McpAddFormAuthFields.js.map +1 -1
  14. package/dist/primitives/addForm/McpAddFormAuthSelect.js +33 -9
  15. package/dist/primitives/addForm/McpAddFormAuthSelect.js.map +1 -1
  16. package/dist/primitives/addForm/McpAddFormCancel.js +24 -7
  17. package/dist/primitives/addForm/McpAddFormCancel.js.map +1 -1
  18. package/dist/primitives/addForm/McpAddFormError.js +16 -5
  19. package/dist/primitives/addForm/McpAddFormError.js.map +1 -1
  20. package/dist/primitives/addForm/McpAddFormNameField.js +25 -8
  21. package/dist/primitives/addForm/McpAddFormNameField.js.map +1 -1
  22. package/dist/primitives/addForm/McpAddFormRoot.js +10 -10
  23. package/dist/primitives/addForm/McpAddFormRoot.js.map +1 -1
  24. package/dist/primitives/addForm/McpAddFormSubmit.js +20 -7
  25. package/dist/primitives/addForm/McpAddFormSubmit.js.map +1 -1
  26. package/dist/primitives/addForm/McpAddFormUrlField.js +26 -9
  27. package/dist/primitives/addForm/McpAddFormUrlField.js.map +1 -1
  28. package/dist/primitives/addForm/context.js.map +1 -1
  29. package/dist/primitives/addForm.js.map +1 -1
  30. package/dist/primitives/manager/McpManagerAddCustomTrigger.js +14 -5
  31. package/dist/primitives/manager/McpManagerAddCustomTrigger.js.map +1 -1
  32. package/dist/primitives/manager/McpManagerConnectors.js.map +1 -1
  33. package/dist/primitives/manager/McpManagerCustomServers.js.map +1 -1
  34. package/dist/primitives/manager/McpManagerRoot.js +19 -6
  35. package/dist/primitives/manager/McpManagerRoot.js.map +1 -1
  36. package/dist/primitives/manager.js.map +1 -1
  37. package/dist/primitives/server/McpServerConnectButton.js +31 -9
  38. package/dist/primitives/server/McpServerConnectButton.js.map +1 -1
  39. package/dist/primitives/server/McpServerDisconnectButton.js +28 -8
  40. package/dist/primitives/server/McpServerDisconnectButton.js.map +1 -1
  41. package/dist/primitives/server/McpServerError.js +20 -6
  42. package/dist/primitives/server/McpServerError.js.map +1 -1
  43. package/dist/primitives/server/McpServerIcon.js +41 -9
  44. package/dist/primitives/server/McpServerIcon.js.map +1 -1
  45. package/dist/primitives/server/McpServerName.js +20 -6
  46. package/dist/primitives/server/McpServerName.js.map +1 -1
  47. package/dist/primitives/server/McpServerOAuthLink.js +35 -9
  48. package/dist/primitives/server/McpServerOAuthLink.js.map +1 -1
  49. package/dist/primitives/server/McpServerRemoveButton.js +28 -8
  50. package/dist/primitives/server/McpServerRemoveButton.js.map +1 -1
  51. package/dist/primitives/server/McpServerRoot.js +37 -12
  52. package/dist/primitives/server/McpServerRoot.js.map +1 -1
  53. package/dist/primitives/server/McpServerStatus.js +22 -7
  54. package/dist/primitives/server/McpServerStatus.js.map +1 -1
  55. package/dist/primitives/server/McpServerToolName.js +18 -6
  56. package/dist/primitives/server/McpServerToolName.js.map +1 -1
  57. package/dist/primitives/server/McpServerTools.js +31 -6
  58. package/dist/primitives/server/McpServerTools.js.map +1 -1
  59. package/dist/primitives/server.js.map +1 -1
  60. package/dist/resources/McpManagerResource.d.ts +1 -1
  61. package/dist/resources/McpManagerResource.d.ts.map +1 -1
  62. package/dist/resources/McpManagerResource.js +290 -102
  63. package/dist/resources/McpManagerResource.js.map +1 -1
  64. package/dist/resources/McpServerResource.d.ts +1 -1
  65. package/dist/resources/McpServerResource.d.ts.map +1 -1
  66. package/dist/resources/McpServerResource.js +34 -33
  67. package/dist/resources/McpServerResource.js.map +1 -1
  68. package/dist/resources/storage/McpCustomStorage.d.ts +1 -1
  69. package/dist/resources/storage/McpCustomStorage.d.ts.map +1 -1
  70. package/dist/resources/storage/McpCustomStorage.js +3 -2
  71. package/dist/resources/storage/McpCustomStorage.js.map +1 -1
  72. package/dist/resources/storage/McpLocalStorage.d.ts +1 -1
  73. package/dist/resources/storage/McpLocalStorage.d.ts.map +1 -1
  74. package/dist/resources/storage/McpLocalStorage.js +3 -2
  75. package/dist/resources/storage/McpLocalStorage.js.map +1 -1
  76. package/dist/resources/storage/McpMemoryStorage.d.ts +1 -1
  77. package/dist/resources/storage/McpMemoryStorage.d.ts.map +1 -1
  78. package/dist/resources/storage/McpMemoryStorage.js +3 -2
  79. package/dist/resources/storage/McpMemoryStorage.js.map +1 -1
  80. package/dist/utils/serverId.js.map +1 -1
  81. package/package.json +6 -6
  82. package/src/resources/McpManagerResource.ts +27 -17
  83. package/src/resources/McpServerResource.ts +5 -3
  84. package/src/resources/storage/McpCustomStorage.ts +4 -4
  85. package/src/resources/storage/McpLocalStorage.ts +4 -4
  86. package/src/resources/storage/McpMemoryStorage.ts +19 -19
@@ -1,18 +1,35 @@
1
1
  import { useAddForm } from "./context.js";
2
+ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
2
3
  import { forwardRef } from "@assistant-ui/tap/react-shim";
3
4
  import { Primitive } from "@radix-ui/react-primitive";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  //#region src/primitives/addForm/McpAddFormNameField.tsx
6
7
  const McpAddFormPrimitiveNameField = forwardRef((props, ref) => {
8
+ const $ = c(7);
7
9
  const { state, setField } = useAddForm();
8
- return /* @__PURE__ */ jsx(Primitive.input, {
9
- type: "text",
10
- placeholder: "Name",
11
- ...props,
12
- ref,
13
- value: state.name,
14
- onChange: (e) => setField("name", e.target.value)
15
- });
10
+ let t0;
11
+ if ($[0] !== setField) {
12
+ t0 = (e) => setField("name", e.target.value);
13
+ $[0] = setField;
14
+ $[1] = t0;
15
+ } else t0 = $[1];
16
+ let t1;
17
+ if ($[2] !== props || $[3] !== ref || $[4] !== state.name || $[5] !== t0) {
18
+ t1 = /* @__PURE__ */ jsx(Primitive.input, {
19
+ type: "text",
20
+ placeholder: "Name",
21
+ ...props,
22
+ ref,
23
+ value: state.name,
24
+ onChange: t0
25
+ });
26
+ $[2] = props;
27
+ $[3] = ref;
28
+ $[4] = state.name;
29
+ $[5] = t0;
30
+ $[6] = t1;
31
+ } else t1 = $[6];
32
+ return t1;
16
33
  });
17
34
  McpAddFormPrimitiveNameField.displayName = "McpAddFormPrimitive.NameField";
18
35
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"McpAddFormNameField.js","names":[],"sources":["../../../src/primitives/addForm/McpAddFormNameField.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveNameField {\n export type Element = ComponentRef<typeof Primitive.input>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.input>,\n \"value\" | \"onChange\" | \"type\"\n >;\n}\n\nexport const McpAddFormPrimitiveNameField = forwardRef<\n McpAddFormPrimitiveNameField.Element,\n McpAddFormPrimitiveNameField.Props\n>((props, ref) => {\n const { state, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"text\"\n placeholder=\"Name\"\n {...props}\n ref={ref}\n value={state.name}\n onChange={(e) => setField(\"name\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveNameField.displayName = \"McpAddFormPrimitive.NameField\";\n"],"mappings":";;;;;AAgBA,MAAa,+BAA+B,YAGzC,OAAO,QAAQ;CAChB,MAAM,EAAE,OAAO,aAAa,WAAW;CACvC,OACE,oBAAC,UAAU,OAAX;EACE,MAAK;EACL,aAAY;EACZ,GAAI;EACC;EACL,OAAO,MAAM;EACb,WAAW,MAAM,SAAS,QAAQ,EAAE,OAAO,KAAK;CACjD,CAAA;AAEL,CAAC;AAED,6BAA6B,cAAc"}
1
+ {"version":3,"file":"McpAddFormNameField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveNameField","Element","input","Props","Omit","props","ref","$","_c","state","setField","t0","e","target","value","t1","name","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormNameField.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveNameField {\n export type Element = ComponentRef<typeof Primitive.input>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.input>,\n \"value\" | \"onChange\" | \"type\"\n >;\n}\n\nexport const McpAddFormPrimitiveNameField = forwardRef<\n McpAddFormPrimitiveNameField.Element,\n McpAddFormPrimitiveNameField.Props\n>((props, ref) => {\n const { state, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"text\"\n placeholder=\"Name\"\n {...props}\n ref={ref}\n value={state.name}\n onChange={(e) => setField(\"name\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveNameField.displayName = \"McpAddFormPrimitive.NameField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,+BAA+BH,YAG1CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAA,EAAAC,OAAAC,aAA4BX,WAAW;CAAE,IAAAY;CAAA,IAAAJ,EAAA,OAAAG,UAAA;EAQ3BC,MAAAC,MAAOF,SAAS,QAAQE,EAACC,OAAOC,KAAM;EAACP,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAO,QAAAT,EAAA,OAAAI,IAAA;EANnDI,KAAA,oBAAA,UAAA,OAAA;GACO,MAAA;GACO,aAAA;GAAM,GACdV;GACCC;GACE,OAAAG,MAAKO;GACF,UAAAL;EAAuC,CAAA;EACjDJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE,MAAAO;EAAAT,EAAA,KAAAI;EAAAJ,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OAPFQ;AAOE,CAEL;AAEDf,6BAA6BiB,cAAc"}
@@ -65,22 +65,22 @@ const McpAddFormPrimitiveRoot = forwardRef(({ onSubmitted, onCancel, ...props },
65
65
  return;
66
66
  }
67
67
  if (state.authType === "bearer" && !state.bearerToken.trim()) {
68
- setState((p) => ({
69
- ...p,
68
+ setState((p_0) => ({
69
+ ...p_0,
70
70
  error: "Bearer token is required"
71
71
  }));
72
72
  return;
73
73
  }
74
74
  const urlResult = validateUrl(state.url);
75
75
  if ("error" in urlResult) {
76
- setState((p) => ({
77
- ...p,
76
+ setState((p_1) => ({
77
+ ...p_1,
78
78
  error: urlResult.error
79
79
  }));
80
80
  return;
81
81
  }
82
- setState((p) => ({
83
- ...p,
82
+ setState((p_2) => ({
83
+ ...p_2,
84
84
  submitting: true,
85
85
  error: null
86
86
  }));
@@ -93,8 +93,8 @@ const McpAddFormPrimitiveRoot = forwardRef(({ onSubmitted, onCancel, ...props },
93
93
  setState(INITIAL);
94
94
  onSubmitted?.(id);
95
95
  } catch (err) {
96
- setState((p) => ({
97
- ...p,
96
+ setState((p_3) => ({
97
+ ...p_3,
98
98
  submitting: false,
99
99
  error: err instanceof Error ? err.message : String(err)
100
100
  }));
@@ -109,7 +109,7 @@ const McpAddFormPrimitiveRoot = forwardRef(({ onSubmitted, onCancel, ...props },
109
109
  setState(INITIAL);
110
110
  onCancel?.();
111
111
  }, [onCancel]);
112
- const value = useMemo(() => ({
112
+ const value_0 = useMemo(() => ({
113
113
  state,
114
114
  setField,
115
115
  reset,
@@ -127,7 +127,7 @@ const McpAddFormPrimitiveRoot = forwardRef(({ onSubmitted, onCancel, ...props },
127
127
  submit();
128
128
  };
129
129
  return /* @__PURE__ */ jsx(AddFormContext.Provider, {
130
- value,
130
+ value: value_0,
131
131
  children: /* @__PURE__ */ jsx(Primitive.form, {
132
132
  ...props,
133
133
  ref,
@@ -1 +1 @@
1
- {"version":3,"file":"McpAddFormRoot.js","names":[],"sources":["../../../src/primitives/addForm/McpAddFormRoot.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n type FormEventHandler,\n forwardRef,\n useCallback,\n useMemo,\n useState,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { AddFormContext, type AddFormState } from \"./context\";\nimport type { MCPAuthConfig } from \"../../mcp-scope\";\n\nconst INITIAL: AddFormState = {\n name: \"\",\n url: \"\",\n authType: \"oauth\",\n bearerToken: \"\",\n scopes: \"\",\n submitting: false,\n error: null,\n};\n\nfunction validateUrl(raw: string): { url: string } | { error: string } {\n const trimmed = raw.trim();\n if (!trimmed) return { error: \"URL is required\" };\n let parsed: URL;\n try {\n parsed = new URL(trimmed);\n } catch {\n return { error: \"Invalid URL\" };\n }\n if (parsed.protocol !== \"http:\" && parsed.protocol !== \"https:\") {\n return { error: \"URL must be http(s)\" };\n }\n return { url: trimmed };\n}\n\nexport namespace McpAddFormPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.form>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.form>,\n \"onSubmit\"\n > & {\n onSubmitted?: (id: string) => void;\n onCancel?: () => void;\n };\n}\n\nexport const McpAddFormPrimitiveRoot = forwardRef<\n McpAddFormPrimitiveRoot.Element,\n McpAddFormPrimitiveRoot.Props\n>(({ onSubmitted, onCancel, ...props }, ref) => {\n const aui = useAui();\n const [state, setState] = useState<AddFormState>(INITIAL);\n\n const setField = useCallback(\n <K extends keyof AddFormState>(key: K, value: AddFormState[K]) => {\n setState((prev) => ({ ...prev, [key]: value }));\n },\n [],\n );\n\n const reset = useCallback(() => setState(INITIAL), []);\n\n const buildAuth = useCallback((): MCPAuthConfig => {\n switch (state.authType) {\n case \"none\":\n return { type: \"none\" };\n case \"bearer\":\n return { type: \"bearer\", token: state.bearerToken || undefined };\n case \"oauth\": {\n const scopeList = state.scopes\n .split(/[\\s,]+/)\n .map((s) => s.trim())\n .filter(Boolean);\n return {\n type: \"oauth\",\n scopes: scopeList.length > 0 ? scopeList : undefined,\n };\n }\n }\n }, [state.authType, state.bearerToken, state.scopes]);\n\n const submit = useCallback(async () => {\n if (state.submitting) return;\n if (!state.name.trim()) {\n setState((p) => ({ ...p, error: \"Name is required\" }));\n return;\n }\n if (state.authType === \"bearer\" && !state.bearerToken.trim()) {\n setState((p) => ({ ...p, error: \"Bearer token is required\" }));\n return;\n }\n const urlResult = validateUrl(state.url);\n if (\"error\" in urlResult) {\n setState((p) => ({ ...p, error: urlResult.error }));\n return;\n }\n setState((p) => ({ ...p, submitting: true, error: null }));\n try {\n const id = await aui.mcp().addCustomServer({\n name: state.name.trim(),\n url: urlResult.url,\n auth: buildAuth(),\n });\n setState(INITIAL);\n onSubmitted?.(id);\n } catch (err) {\n setState((p) => ({\n ...p,\n submitting: false,\n error: err instanceof Error ? err.message : String(err),\n }));\n }\n }, [aui, buildAuth, onSubmitted, state]);\n\n const cancel = useCallback(() => {\n setState(INITIAL);\n onCancel?.();\n }, [onCancel]);\n\n const value = useMemo(\n () => ({ state, setField, reset, submit, cancel }),\n [state, setField, reset, submit, cancel],\n );\n\n const onFormSubmit: FormEventHandler<HTMLFormElement> = (e) => {\n e.preventDefault();\n void submit();\n };\n\n return (\n <AddFormContext.Provider value={value}>\n <Primitive.form {...props} ref={ref} onSubmit={onFormSubmit} />\n </AddFormContext.Provider>\n );\n});\n\nMcpAddFormPrimitiveRoot.displayName = \"McpAddFormPrimitive.Root\";\n"],"mappings":"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"}
1
+ {"version":3,"file":"McpAddFormRoot.js","names":["ComponentPropsWithoutRef","ComponentRef","FormEventHandler","forwardRef","useCallback","useMemo","useState","Primitive","useAui","AddFormContext","AddFormState","MCPAuthConfig","INITIAL","name","url","authType","bearerToken","scopes","submitting","error","validateUrl","raw","trimmed","trim","parsed","URL","protocol","McpAddFormPrimitiveRoot","Element","form","Props","Omit","onSubmitted","id","onCancel","props","ref","aui","state","setState","setField","key","K","value","prev","reset","buildAuth","type","token","undefined","scopeList","split","map","s","filter","Boolean","length","submit","p","urlResult","mcp","addCustomServer","auth","err","Error","message","String","cancel","onFormSubmit","HTMLFormElement","e","preventDefault","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormRoot.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n type FormEventHandler,\n forwardRef,\n useCallback,\n useMemo,\n useState,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { AddFormContext, type AddFormState } from \"./context\";\nimport type { MCPAuthConfig } from \"../../mcp-scope\";\n\nconst INITIAL: AddFormState = {\n name: \"\",\n url: \"\",\n authType: \"oauth\",\n bearerToken: \"\",\n scopes: \"\",\n submitting: false,\n error: null,\n};\n\nfunction validateUrl(raw: string): { url: string } | { error: string } {\n const trimmed = raw.trim();\n if (!trimmed) return { error: \"URL is required\" };\n let parsed: URL;\n try {\n parsed = new URL(trimmed);\n } catch {\n return { error: \"Invalid URL\" };\n }\n if (parsed.protocol !== \"http:\" && parsed.protocol !== \"https:\") {\n return { error: \"URL must be http(s)\" };\n }\n return { url: trimmed };\n}\n\nexport namespace McpAddFormPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.form>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.form>,\n \"onSubmit\"\n > & {\n onSubmitted?: (id: string) => void;\n onCancel?: () => void;\n };\n}\n\nexport const McpAddFormPrimitiveRoot = forwardRef<\n McpAddFormPrimitiveRoot.Element,\n McpAddFormPrimitiveRoot.Props\n>(({ onSubmitted, onCancel, ...props }, ref) => {\n const aui = useAui();\n const [state, setState] = useState<AddFormState>(INITIAL);\n\n const setField = useCallback(\n <K extends keyof AddFormState>(key: K, value: AddFormState[K]) => {\n setState((prev) => ({ ...prev, [key]: value }));\n },\n [],\n );\n\n const reset = useCallback(() => setState(INITIAL), []);\n\n const buildAuth = useCallback((): MCPAuthConfig => {\n switch (state.authType) {\n case \"none\":\n return { type: \"none\" };\n case \"bearer\":\n return { type: \"bearer\", token: state.bearerToken || undefined };\n case \"oauth\": {\n const scopeList = state.scopes\n .split(/[\\s,]+/)\n .map((s) => s.trim())\n .filter(Boolean);\n return {\n type: \"oauth\",\n scopes: scopeList.length > 0 ? scopeList : undefined,\n };\n }\n }\n }, [state.authType, state.bearerToken, state.scopes]);\n\n const submit = useCallback(async () => {\n if (state.submitting) return;\n if (!state.name.trim()) {\n setState((p) => ({ ...p, error: \"Name is required\" }));\n return;\n }\n if (state.authType === \"bearer\" && !state.bearerToken.trim()) {\n setState((p) => ({ ...p, error: \"Bearer token is required\" }));\n return;\n }\n const urlResult = validateUrl(state.url);\n if (\"error\" in urlResult) {\n setState((p) => ({ ...p, error: urlResult.error }));\n return;\n }\n setState((p) => ({ ...p, submitting: true, error: null }));\n try {\n const id = await aui.mcp().addCustomServer({\n name: state.name.trim(),\n url: urlResult.url,\n auth: buildAuth(),\n });\n setState(INITIAL);\n onSubmitted?.(id);\n } catch (err) {\n setState((p) => ({\n ...p,\n submitting: false,\n error: err instanceof Error ? err.message : String(err),\n }));\n }\n }, [aui, buildAuth, onSubmitted, state]);\n\n const cancel = useCallback(() => {\n setState(INITIAL);\n onCancel?.();\n }, [onCancel]);\n\n const value = useMemo(\n () => ({ state, setField, reset, submit, cancel }),\n [state, setField, reset, submit, cancel],\n );\n\n const onFormSubmit: FormEventHandler<HTMLFormElement> = (e) => {\n e.preventDefault();\n void submit();\n };\n\n return (\n <AddFormContext.Provider value={value}>\n <Primitive.form {...props} ref={ref} onSubmit={onFormSubmit} />\n </AddFormContext.Provider>\n );\n});\n\nMcpAddFormPrimitiveRoot.displayName = \"McpAddFormPrimitive.Root\";\n"],"mappings":"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"}
@@ -1,17 +1,30 @@
1
1
  import { useAddForm } from "./context.js";
2
+ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
2
3
  import { forwardRef } from "@assistant-ui/tap/react-shim";
3
4
  import { Primitive } from "@radix-ui/react-primitive";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  //#region src/primitives/addForm/McpAddFormSubmit.tsx
6
7
  const McpAddFormPrimitiveSubmit = forwardRef((props, ref) => {
8
+ const $ = c(5);
7
9
  const { state } = useAddForm();
8
- return /* @__PURE__ */ jsx(Primitive.button, {
9
- type: "submit",
10
- ...props,
11
- ref,
12
- disabled: props.disabled || state.submitting,
13
- "data-submitting": state.submitting || void 0
14
- });
10
+ const t0 = props.disabled || state.submitting;
11
+ const t1 = state.submitting || void 0;
12
+ let t2;
13
+ if ($[0] !== props || $[1] !== ref || $[2] !== t0 || $[3] !== t1) {
14
+ t2 = /* @__PURE__ */ jsx(Primitive.button, {
15
+ type: "submit",
16
+ ...props,
17
+ ref,
18
+ disabled: t0,
19
+ "data-submitting": t1
20
+ });
21
+ $[0] = props;
22
+ $[1] = ref;
23
+ $[2] = t0;
24
+ $[3] = t1;
25
+ $[4] = t2;
26
+ } else t2 = $[4];
27
+ return t2;
15
28
  });
16
29
  McpAddFormPrimitiveSubmit.displayName = "McpAddFormPrimitive.Submit";
17
30
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"McpAddFormSubmit.js","names":[],"sources":["../../../src/primitives/addForm/McpAddFormSubmit.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveSubmit {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpAddFormPrimitiveSubmit = forwardRef<\n McpAddFormPrimitiveSubmit.Element,\n McpAddFormPrimitiveSubmit.Props\n>((props, ref) => {\n const { state } = useAddForm();\n return (\n <Primitive.button\n type=\"submit\"\n {...props}\n ref={ref}\n disabled={props.disabled || state.submitting}\n data-submitting={state.submitting || undefined}\n />\n );\n});\n\nMcpAddFormPrimitiveSubmit.displayName = \"McpAddFormPrimitive.Submit\";\n"],"mappings":";;;;;AAaA,MAAa,4BAA4B,YAGtC,OAAO,QAAQ;CAChB,MAAM,EAAE,UAAU,WAAW;CAC7B,OACE,oBAAC,UAAU,QAAX;EACE,MAAK;EACL,GAAI;EACC;EACL,UAAU,MAAM,YAAY,MAAM;EAClC,mBAAiB,MAAM,cAAc,KAAA;CACtC,CAAA;AAEL,CAAC;AAED,0BAA0B,cAAc"}
1
+ {"version":3,"file":"McpAddFormSubmit.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveSubmit","Element","button","Props","props","ref","$","_c","state","t0","disabled","submitting","t1","undefined","t2","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormSubmit.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveSubmit {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpAddFormPrimitiveSubmit = forwardRef<\n McpAddFormPrimitiveSubmit.Element,\n McpAddFormPrimitiveSubmit.Props\n>((props, ref) => {\n const { state } = useAddForm();\n return (\n <Primitive.button\n type=\"submit\"\n {...props}\n ref={ref}\n disabled={props.disabled || state.submitting}\n data-submitting={state.submitting || undefined}\n />\n );\n});\n\nMcpAddFormPrimitiveSubmit.displayName = \"McpAddFormPrimitive.Submit\";\n"],"mappings":";;;;;;AAaA,MAAaK,4BAA4BH,YAGvCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAA,EAAAC,UAAkBT,WAAW;CAMf,MAAAU,KAAAL,MAAKM,YAAaF,MAAKG;CAChB,MAAAC,KAAAJ,MAAKG,cAALE,KAAAA;CAA6B,IAAAC;CAAA,IAAAR,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAM,IAAA;EALhDE,KAAA,oBAAA,UAAA,QAAA;GACO,MAAA;GAAQ,GACTV;GACCC;GACK,UAAAI;GACO,mBAAAG;EAA6B,CAAA;EAC9CN,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANFQ;AAME,CAEL;AAEDd,0BAA0Be,cAAc"}
@@ -1,19 +1,36 @@
1
1
  import { useAddForm } from "./context.js";
2
+ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
2
3
  import { forwardRef } from "@assistant-ui/tap/react-shim";
3
4
  import { Primitive } from "@radix-ui/react-primitive";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  //#region src/primitives/addForm/McpAddFormUrlField.tsx
6
7
  const McpAddFormPrimitiveUrlField = forwardRef((props, ref) => {
8
+ const $ = c(7);
7
9
  const { state, setField } = useAddForm();
8
- return /* @__PURE__ */ jsx(Primitive.input, {
9
- type: "url",
10
- inputMode: "url",
11
- placeholder: "https://example.com/mcp",
12
- ...props,
13
- ref,
14
- value: state.url,
15
- onChange: (e) => setField("url", e.target.value)
16
- });
10
+ let t0;
11
+ if ($[0] !== setField) {
12
+ t0 = (e) => setField("url", e.target.value);
13
+ $[0] = setField;
14
+ $[1] = t0;
15
+ } else t0 = $[1];
16
+ let t1;
17
+ if ($[2] !== props || $[3] !== ref || $[4] !== state.url || $[5] !== t0) {
18
+ t1 = /* @__PURE__ */ jsx(Primitive.input, {
19
+ type: "url",
20
+ inputMode: "url",
21
+ placeholder: "https://example.com/mcp",
22
+ ...props,
23
+ ref,
24
+ value: state.url,
25
+ onChange: t0
26
+ });
27
+ $[2] = props;
28
+ $[3] = ref;
29
+ $[4] = state.url;
30
+ $[5] = t0;
31
+ $[6] = t1;
32
+ } else t1 = $[6];
33
+ return t1;
17
34
  });
18
35
  McpAddFormPrimitiveUrlField.displayName = "McpAddFormPrimitive.UrlField";
19
36
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"McpAddFormUrlField.js","names":[],"sources":["../../../src/primitives/addForm/McpAddFormUrlField.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveUrlField {\n export type Element = ComponentRef<typeof Primitive.input>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.input>,\n \"value\" | \"onChange\" | \"type\"\n >;\n}\n\nexport const McpAddFormPrimitiveUrlField = forwardRef<\n McpAddFormPrimitiveUrlField.Element,\n McpAddFormPrimitiveUrlField.Props\n>((props, ref) => {\n const { state, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"url\"\n inputMode=\"url\"\n placeholder=\"https://example.com/mcp\"\n {...props}\n ref={ref}\n value={state.url}\n onChange={(e) => setField(\"url\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveUrlField.displayName = \"McpAddFormPrimitive.UrlField\";\n"],"mappings":";;;;;AAgBA,MAAa,8BAA8B,YAGxC,OAAO,QAAQ;CAChB,MAAM,EAAE,OAAO,aAAa,WAAW;CACvC,OACE,oBAAC,UAAU,OAAX;EACE,MAAK;EACL,WAAU;EACV,aAAY;EACZ,GAAI;EACC;EACL,OAAO,MAAM;EACb,WAAW,MAAM,SAAS,OAAO,EAAE,OAAO,KAAK;CAChD,CAAA;AAEL,CAAC;AAED,4BAA4B,cAAc"}
1
+ {"version":3,"file":"McpAddFormUrlField.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAddForm","McpAddFormPrimitiveUrlField","Element","input","Props","Omit","props","ref","$","_c","state","setField","t0","e","target","value","t1","url","displayName"],"sources":["../../../src/primitives/addForm/McpAddFormUrlField.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAddForm } from \"./context\";\n\nexport namespace McpAddFormPrimitiveUrlField {\n export type Element = ComponentRef<typeof Primitive.input>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.input>,\n \"value\" | \"onChange\" | \"type\"\n >;\n}\n\nexport const McpAddFormPrimitiveUrlField = forwardRef<\n McpAddFormPrimitiveUrlField.Element,\n McpAddFormPrimitiveUrlField.Props\n>((props, ref) => {\n const { state, setField } = useAddForm();\n return (\n <Primitive.input\n type=\"url\"\n inputMode=\"url\"\n placeholder=\"https://example.com/mcp\"\n {...props}\n ref={ref}\n value={state.url}\n onChange={(e) => setField(\"url\", e.target.value)}\n />\n );\n});\n\nMcpAddFormPrimitiveUrlField.displayName = \"McpAddFormPrimitive.UrlField\";\n"],"mappings":";;;;;;AAgBA,MAAaK,8BAA8BH,YAGzCQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAA,EAAAC,OAAAC,aAA4BX,WAAW;CAAE,IAAAY;CAAA,IAAAJ,EAAA,OAAAG,UAAA;EAS3BC,MAAAC,MAAOF,SAAS,OAAOE,EAACC,OAAOC,KAAM;EAACP,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAO,OAAAT,EAAA,OAAAI,IAAA;EAPlDI,KAAA,oBAAA,UAAA,OAAA;GACO,MAAA;GACK,WAAA;GACE,aAAA;GAAyB,GACjCV;GACCC;GACE,OAAAG,MAAKO;GACF,UAAAL;EAAsC,CAAA;EAChDJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE,MAAAO;EAAAT,EAAA,KAAAI;EAAAJ,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OARFQ;AAQE,CAEL;AAEDf,4BAA4BiB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","names":[],"sources":["../../../src/primitives/addForm/context.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { MCPAuthConfig } from \"../../mcp-scope\";\n\nexport type AddFormAuthType = MCPAuthConfig[\"type\"];\n\nexport type AddFormState = {\n name: string;\n url: string;\n authType: AddFormAuthType;\n bearerToken: string;\n scopes: string;\n submitting: boolean;\n error: string | null;\n};\n\nexport type AddFormContextValue = {\n state: AddFormState;\n setField: <K extends keyof AddFormState>(\n key: K,\n value: AddFormState[K],\n ) => void;\n reset: () => void;\n submit: () => Promise<void>;\n cancel: () => void;\n};\n\nexport const AddFormContext = createContext<AddFormContextValue | null>(null);\n\nexport const useAddForm = (): AddFormContextValue => {\n const ctx = useContext(AddFormContext);\n if (!ctx) {\n throw new Error(\n \"McpAddFormPrimitive.* must be used inside McpAddFormPrimitive.Root\",\n );\n }\n return ctx;\n};\n"],"mappings":";;AA0BA,MAAa,iBAAiB,cAA0C,IAAI;AAE5E,MAAa,mBAAwC;CACnD,MAAM,MAAM,WAAW,cAAc;CACrC,IAAI,CAAC,KACH,MAAM,IAAI,MACR,oEACF;CAEF,OAAO;AACT"}
1
+ {"version":3,"file":"context.js","names":["createContext","useContext","MCPAuthConfig","AddFormAuthType","AddFormState","name","url","authType","bearerToken","scopes","submitting","error","AddFormContextValue","state","setField","key","K","value","reset","submit","Promise","cancel","AddFormContext","useAddForm","ctx","Error"],"sources":["../../../src/primitives/addForm/context.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { MCPAuthConfig } from \"../../mcp-scope\";\n\nexport type AddFormAuthType = MCPAuthConfig[\"type\"];\n\nexport type AddFormState = {\n name: string;\n url: string;\n authType: AddFormAuthType;\n bearerToken: string;\n scopes: string;\n submitting: boolean;\n error: string | null;\n};\n\nexport type AddFormContextValue = {\n state: AddFormState;\n setField: <K extends keyof AddFormState>(\n key: K,\n value: AddFormState[K],\n ) => void;\n reset: () => void;\n submit: () => Promise<void>;\n cancel: () => void;\n};\n\nexport const AddFormContext = createContext<AddFormContextValue | null>(null);\n\nexport const useAddForm = (): AddFormContextValue => {\n const ctx = useContext(AddFormContext);\n if (!ctx) {\n throw new Error(\n \"McpAddFormPrimitive.* must be used inside McpAddFormPrimitive.Root\",\n );\n }\n return ctx;\n};\n"],"mappings":";;AA0BA,MAAasB,iBAAiBtB,cAA0C,IAAI;AAE5E,MAAauB,mBAAa;CACxB,MAAAC,MAAYvB,WAAWqB,cAAc;CACrC,IAAI,CAACE,KACH,MAAM,IAAIC,MACR,oEACF;CACD,OACMD;AAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"addForm.js","names":[],"sources":["../../src/primitives/addForm.ts"],"sourcesContent":["export { McpAddFormPrimitiveRoot as Root } from \"./addForm/McpAddFormRoot\";\nexport { McpAddFormPrimitiveNameField as NameField } from \"./addForm/McpAddFormNameField\";\nexport { McpAddFormPrimitiveUrlField as UrlField } from \"./addForm/McpAddFormUrlField\";\nexport { McpAddFormPrimitiveAuthSelect as AuthSelect } from \"./addForm/McpAddFormAuthSelect\";\nexport { McpAddFormPrimitiveAuthFields as AuthFields } from \"./addForm/McpAddFormAuthFields\";\nexport { McpAddFormPrimitiveSubmit as Submit } from \"./addForm/McpAddFormSubmit\";\nexport { McpAddFormPrimitiveCancel as Cancel } from \"./addForm/McpAddFormCancel\";\nexport { McpAddFormPrimitiveError as Error } from \"./addForm/McpAddFormError\";\n"],"mappings":""}
1
+ {"version":3,"file":"addForm.js","names":["McpAddFormPrimitiveRoot","Root","McpAddFormPrimitiveNameField","NameField","McpAddFormPrimitiveUrlField","UrlField","McpAddFormPrimitiveAuthSelect","AuthSelect","McpAddFormPrimitiveAuthFields","AuthFields","McpAddFormPrimitiveSubmit","Submit","McpAddFormPrimitiveCancel","Cancel","McpAddFormPrimitiveError","Error"],"sources":["../../src/primitives/addForm.ts"],"sourcesContent":["export { McpAddFormPrimitiveRoot as Root } from \"./addForm/McpAddFormRoot\";\nexport { McpAddFormPrimitiveNameField as NameField } from \"./addForm/McpAddFormNameField\";\nexport { McpAddFormPrimitiveUrlField as UrlField } from \"./addForm/McpAddFormUrlField\";\nexport { McpAddFormPrimitiveAuthSelect as AuthSelect } from \"./addForm/McpAddFormAuthSelect\";\nexport { McpAddFormPrimitiveAuthFields as AuthFields } from \"./addForm/McpAddFormAuthFields\";\nexport { McpAddFormPrimitiveSubmit as Submit } from \"./addForm/McpAddFormSubmit\";\nexport { McpAddFormPrimitiveCancel as Cancel } from \"./addForm/McpAddFormCancel\";\nexport { McpAddFormPrimitiveError as Error } from \"./addForm/McpAddFormError\";\n"],"mappings":""}
@@ -1,13 +1,22 @@
1
+ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
1
2
  import { forwardRef } from "@assistant-ui/tap/react-shim";
2
3
  import { Primitive } from "@radix-ui/react-primitive";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  //#region src/primitives/manager/McpManagerAddCustomTrigger.tsx
5
6
  const McpManagerPrimitiveAddCustomTrigger = forwardRef((props, ref) => {
6
- return /* @__PURE__ */ jsx(Primitive.button, {
7
- ...props,
8
- type: "button",
9
- ref
10
- });
7
+ const $ = c(3);
8
+ let t0;
9
+ if ($[0] !== props || $[1] !== ref) {
10
+ t0 = /* @__PURE__ */ jsx(Primitive.button, {
11
+ ...props,
12
+ type: "button",
13
+ ref
14
+ });
15
+ $[0] = props;
16
+ $[1] = ref;
17
+ $[2] = t0;
18
+ } else t0 = $[2];
19
+ return t0;
11
20
  });
12
21
  McpManagerPrimitiveAddCustomTrigger.displayName = "McpManagerPrimitive.AddCustomTrigger";
13
22
  //#endregion
@@ -1 +1 @@
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
+ {"version":3,"file":"McpManagerAddCustomTrigger.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","McpManagerPrimitiveAddCustomTrigger","Element","button","Props","props","ref","$","_c","t0","displayName"],"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,MAAaI,sCAAsCF,YAGjDM,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,SAAAE,EAAA,OAAAD,KAAA;EACOG,KAAA,oBAAA,UAAA,QAAA;GAAA,GAAsBJ;GAAY,MAAA;GAAcC;EAAG,CAAA;EAAIC,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAAvDE;AAAuD,CAC/D;AAEDR,oCAAoCS,cAClC"}
@@ -1 +1 @@
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,CAAC,CAAC,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,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,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
+ {"version":3,"file":"McpManagerConnectors.js","names":["FC","ReactNode","memo","useMemo","RenderChildrenWithAccessor","useAuiState","McpConnectorByIndexProvider","MCPServerState","SEP","McpManagerPrimitiveConnectors","Props","children","value","server","McpManagerPrimitiveConnectorsInner","idsJoined","s","mcp","connectors","map","c","id","join","ids","split","length","index","aui","connector","getState","getItem","prev","next","displayName"],"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,MAAMQ,MAAM;AAaZ,MAAMM,sCAEA,EAAEH,eAAe;CAIrB,MAAMI,YAAYV,aAAaW,MAC7BA,EAAEC,IAAIC,WAAWC,KAAKC,MAAMA,EAAEC,EAAE,CAAC,CAACC,KAAKd,GAAG,CAC5C;CACA,MAAMe,MAAMpB,cACHY,YAAYA,UAAUS,MAAMhB,GAAG,IAAI,CAAA,GAC1C,CAACO,SAAS,CACZ;CAEA,OAAOZ,cAAc;EACnB,IAAIoB,IAAIE,WAAW,GAAG,OAAO;EAC7B,OAAOF,IAAIJ,KAAKE,IAAIK,UAClB,oBAAC,6BAAD;GAA6CA;aAC3C,oBAAC,4BAAD;IACE,eAAeC,QAAQA,IAAIV,IAAI,CAAC,CAACW,UAAU,EAAEF,MAAM,CAAC,CAAC,CAACG,SAAS;eAE7DC,YACAnB,SAAS,EACP,IAAIE,SAAS;KACX,OAAOiB,QAAQ;IACjB,EACF,CAAC;GAEuB,CAAA;EACD,GAZKT,EAYL,CAC9B;CACH,GAAG,CAACE,KAAKZ,QAAQ,CAAC;AACpB;;;;;;;;;;;;;;;;AAiBA,MAAaF,gCACXP,KACEY,qCACCiB,MAAMC,SAASD,KAAKpB,aAAaqB,KAAKrB,QACzC;AAEFF,8BAA8BwB,cAAc"}
@@ -1 +1 @@
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,CAAC,CAAC,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,CAAC,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,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
+ {"version":3,"file":"McpManagerCustomServers.js","names":["FC","ReactNode","memo","useMemo","RenderChildrenWithAccessor","useAuiState","McpCustomServerByIndexProvider","MCPServerState","SEP","McpManagerPrimitiveCustomServers","Props","children","value","server","McpManagerPrimitiveCustomServersInner","idsJoined","s","mcp","customServers","map","c","id","join","ids","split","length","index","aui","customServer","getState","getItem","prev","next","displayName"],"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,MAAMQ,MAAM;AAaZ,MAAMM,yCAEA,EAAEH,eAAe;CACrB,MAAMI,YAAYV,aAAaW,MAC7BA,EAAEC,IAAIC,cAAcC,KAAKC,MAAMA,EAAEC,EAAE,CAAC,CAACC,KAAKd,GAAG,CAC/C;CACA,MAAMe,MAAMpB,cACHY,YAAYA,UAAUS,MAAMhB,GAAG,IAAI,CAAA,GAC1C,CAACO,SAAS,CACZ;CAEA,OAAOZ,cAAc;EACnB,IAAIoB,IAAIE,WAAW,GAAG,OAAO;EAC7B,OAAOF,IAAIJ,KAAKE,IAAIK,UAClB,oBAAC,gCAAD;GAAgDA;aAC9C,oBAAC,4BAAD;IACE,eAAeC,QAAQA,IAAIV,IAAI,CAAC,CAACW,aAAa,EAAEF,MAAM,CAAC,CAAC,CAACG,SAAS;eAEhEC,YACAnB,SAAS,EACP,IAAIE,SAAS;KACX,OAAOiB,QAAQ;IACjB,EACF,CAAC;GAEuB,CAAA;EACE,GAZKT,EAYL,CACjC;CACH,GAAG,CAACE,KAAKZ,QAAQ,CAAC;AACpB;;;;;;;;;;;;;;;;AAiBA,MAAaF,mCACXP,KACEY,wCACCiB,MAAMC,SAASD,KAAKpB,aAAaqB,KAAKrB,QACzC;AAEFF,iCAAiCwB,cAC/B"}
@@ -1,17 +1,30 @@
1
1
  import { useAuiState } from "@assistant-ui/store";
2
+ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
2
3
  import { forwardRef } from "@assistant-ui/tap/react-shim";
3
4
  import { Primitive } from "@radix-ui/react-primitive";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  //#region src/primitives/manager/McpManagerRoot.tsx
6
7
  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
+ const $ = c(4);
9
+ const t0 = useAuiState(_temp) || void 0;
10
+ let t1;
11
+ if ($[0] !== props || $[1] !== ref || $[2] !== t0) {
12
+ t1 = /* @__PURE__ */ jsx(Primitive.div, {
13
+ ...props,
14
+ ref,
15
+ "data-mcp-hydrated": t0
16
+ });
17
+ $[0] = props;
18
+ $[1] = ref;
19
+ $[2] = t0;
20
+ $[3] = t1;
21
+ } else t1 = $[3];
22
+ return t1;
13
23
  });
14
24
  McpManagerPrimitiveRoot.displayName = "McpManagerPrimitive.Root";
25
+ function _temp(s) {
26
+ return s.mcp.isHydrated;
27
+ }
15
28
  //#endregion
16
29
  export { McpManagerPrimitiveRoot };
17
30
 
@@ -1 +1 @@
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
+ {"version":3,"file":"McpManagerRoot.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpManagerPrimitiveRoot","Element","div","Props","props","ref","$","_c","isHydrated","_temp","t0","undefined","t1","displayName","s","mcp"],"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,MAAaK,0BAA0BH,YAGrCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAMuB,MAAAG,KALJX,YAAYU,KAKRD,KAAAG,KAAAA;CAAuB,IAAAC;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAH5CE,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMR;GACCC;GACc,qBAAAK;EAAuB,CAAA;EAC1CJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAJFM;AAIE,CAEL;AAEDZ,wBAAwBa,cAAc;AAXpC,SAAAJ,MAAAK,GAAA;CAAA,OACsCA,EAACC,IAAIP;AAAW"}
@@ -1 +1 @@
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
+ {"version":3,"file":"manager.js","names":["McpManagerPrimitiveRoot","Root","McpManagerPrimitiveConnectors","Connectors","McpManagerPrimitiveCustomServers","CustomServers","McpManagerPrimitiveAddCustomTrigger","AddCustomTrigger"],"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,4 +1,5 @@
1
1
  import { useAui, useAuiState } from "@assistant-ui/store";
2
+ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
2
3
  import { forwardRef } from "@assistant-ui/tap/react-shim";
3
4
  import { Primitive } from "@radix-ui/react-primitive";
4
5
  import { jsx } from "react/jsx-runtime";
@@ -9,22 +10,43 @@ const CONNECTABLE = new Set([
9
10
  "authRequired"
10
11
  ]);
11
12
  const McpServerPrimitiveConnectButton = forwardRef((props, ref) => {
12
- const state = useAuiState((s) => s.mcpServer.connectionState);
13
+ const $ = c(8);
14
+ const state = useAuiState(_temp);
13
15
  const aui = useAui();
14
16
  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) => {
17
+ const t0 = state === "authRequired" ? "auth-required" : void 0;
18
+ let t1;
19
+ if ($[0] !== aui || $[1] !== props) {
20
+ t1 = (e) => {
21
21
  props.onClick?.(e);
22
22
  if (e.defaultPrevented) return;
23
23
  aui.mcpServer().connect();
24
- }
25
- });
24
+ };
25
+ $[0] = aui;
26
+ $[1] = props;
27
+ $[2] = t1;
28
+ } else t1 = $[2];
29
+ let t2;
30
+ if ($[3] !== props || $[4] !== ref || $[5] !== t0 || $[6] !== t1) {
31
+ t2 = /* @__PURE__ */ jsx(Primitive.button, {
32
+ ...props,
33
+ type: "button",
34
+ ref,
35
+ "data-state-hint": t0,
36
+ onClick: t1
37
+ });
38
+ $[3] = props;
39
+ $[4] = ref;
40
+ $[5] = t0;
41
+ $[6] = t1;
42
+ $[7] = t2;
43
+ } else t2 = $[7];
44
+ return t2;
26
45
  });
27
46
  McpServerPrimitiveConnectButton.displayName = "McpServerPrimitive.ConnectButton";
47
+ function _temp(s) {
48
+ return s.mcpServer.connectionState;
49
+ }
28
50
  //#endregion
29
51
  export { McpServerPrimitiveConnectButton };
30
52
 
@@ -1 +1 @@
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,CAAC,CAAC,QAAQ;EAC/B;CACD,CAAA;AAEL,CAAC;AAED,gCAAgC,cAC9B"}
1
+ {"version":3,"file":"McpServerConnectButton.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useAuiState","McpServerPrimitiveConnectButton","Element","button","Props","CONNECTABLE","Set","props","ref","$","_c","state","_temp","aui","has","t0","undefined","t1","e","onClick","defaultPrevented","mcpServer","connect","t2","displayName","s","connectionState"],"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,MAAMU,cAAc,IAAIC,IAAI;CAAC;CAAgB;CAAS;AAAc,CAAC;AAErE,MAAaL,kCAAkCJ,YAG7CU,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcX,YAAYY,KAAkC;CAC5D,MAAAC,MAAYd,OAAO;CACnB,IAAI,CAACM,YAAWS,IAAKH,KAAK,GAAC,OAAS;CAMf,MAAAI,KAAAJ,UAAU,iBAAV,kBAAAK,KAAAA;CAAsD,IAAAC;CAAA,IAAAR,EAAA,OAAAI,OAAAJ,EAAA,OAAAF,OAAA;EAC9DU,MAAAC,MAAA;GACPX,MAAKY,UAAWD,CAAC;GACjB,IAAIA,EAACE,kBAAiB;GACjBP,IAAGQ,UAAW,CAAC,CAAAC,QAAS;EAAC;EAC/Bb,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAc;CAAA,IAAAd,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAM,MAAAN,EAAA,OAAAQ,IAAA;EATHM,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMhB;GACC,MAAA;GACAC;GACY,mBAAAO;GACR,SAAAE;EAIR,CAAA;EACDR,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAM;EAAAN,EAAA,KAAAQ;EAAAR,EAAA,KAAAc;CAAA,OAAAA,KAAAd,EAAA;CAAA,OAVFc;AAUE,CAEL;AAEDtB,gCAAgCuB,cAC9B;AApBA,SAAAZ,MAAAa,GAAA;CAAA,OACiCA,EAACJ,UAAUK;AAAgB"}
@@ -1,4 +1,5 @@
1
1
  import { useAui, useAuiState } from "@assistant-ui/store";
2
+ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
2
3
  import { forwardRef } from "@assistant-ui/tap/react-shim";
3
4
  import { Primitive } from "@radix-ui/react-primitive";
4
5
  import { jsx } from "react/jsx-runtime";
@@ -9,21 +10,40 @@ const DISCONNECTABLE = new Set([
9
10
  "authPending"
10
11
  ]);
11
12
  const McpServerPrimitiveDisconnectButton = forwardRef((props, ref) => {
12
- const state = useAuiState((s) => s.mcpServer.connectionState);
13
+ const $ = c(7);
14
+ const state = useAuiState(_temp);
13
15
  const aui = useAui();
14
16
  if (!DISCONNECTABLE.has(state)) return null;
15
- return /* @__PURE__ */ jsx(Primitive.button, {
16
- ...props,
17
- type: "button",
18
- ref,
19
- onClick: (e) => {
17
+ let t0;
18
+ if ($[0] !== aui || $[1] !== props) {
19
+ t0 = (e) => {
20
20
  props.onClick?.(e);
21
21
  if (e.defaultPrevented) return;
22
22
  aui.mcpServer().disconnect();
23
- }
24
- });
23
+ };
24
+ $[0] = aui;
25
+ $[1] = props;
26
+ $[2] = t0;
27
+ } else t0 = $[2];
28
+ let t1;
29
+ if ($[3] !== props || $[4] !== ref || $[5] !== t0) {
30
+ t1 = /* @__PURE__ */ jsx(Primitive.button, {
31
+ ...props,
32
+ type: "button",
33
+ ref,
34
+ onClick: t0
35
+ });
36
+ $[3] = props;
37
+ $[4] = ref;
38
+ $[5] = t0;
39
+ $[6] = t1;
40
+ } else t1 = $[6];
41
+ return t1;
25
42
  });
26
43
  McpServerPrimitiveDisconnectButton.displayName = "McpServerPrimitive.DisconnectButton";
44
+ function _temp(s) {
45
+ return s.mcpServer.connectionState;
46
+ }
27
47
  //#endregion
28
48
  export { McpServerPrimitiveDisconnectButton };
29
49
 
@@ -1 +1 @@
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,CAAC,CAAC,WAAW;EAClC;CACD,CAAA;AAEL,CAAC;AAED,mCAAmC,cACjC"}
1
+ {"version":3,"file":"McpServerDisconnectButton.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useAuiState","McpServerPrimitiveDisconnectButton","Element","button","Props","DISCONNECTABLE","Set","props","ref","$","_c","state","_temp","aui","has","t0","e","onClick","defaultPrevented","mcpServer","disconnect","t1","displayName","s","connectionState"],"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,MAAMU,iBAAiB,IAAIC,IAAI;CAAC;CAAa;CAAc;AAAa,CAAC;AAEzE,MAAaL,qCAAqCJ,YAGhDU,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcX,YAAYY,KAAkC;CAC5D,MAAAC,MAAYd,OAAO;CACnB,IAAI,CAACM,eAAcS,IAAKH,KAAK,GAAC,OAAS;CAAK,IAAAI;CAAA,IAAAN,EAAA,OAAAI,OAAAJ,EAAA,OAAAF,OAAA;EAM/BQ,MAAAC,MAAA;GACPT,MAAKU,UAAWD,CAAC;GACjB,IAAIA,EAACE,kBAAiB;GACjBL,IAAGM,UAAW,CAAC,CAAAC,WAAY;EAAC;EAClCX,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAM,IAAA;EARHM,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMd;GACC,MAAA;GACAC;GACI,SAAAO;EAIR,CAAA;EACDN,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAM;EAAAN,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OATFY;AASE,CAEL;AAEDpB,mCAAmCqB,cACjC;AAnBA,SAAAV,MAAAW,GAAA;CAAA,OACiCA,EAACJ,UAAUK;AAAgB"}