@arcadeai/design-system 5.3.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/variables.css +1 -1
- package/dist/components/index.js +30 -28
- package/dist/components/ui/index.js +30 -28
- package/dist/components/ui/molecules/index.d.ts +5 -1
- package/dist/components/ui/molecules/index.d.ts.map +1 -1
- package/dist/components/ui/molecules/index.js +21 -19
- package/dist/components/ui/molecules/mcp-server-picker/card-setup-button.d.ts +21 -0
- package/dist/components/ui/molecules/mcp-server-picker/card-setup-button.d.ts.map +1 -0
- package/dist/components/ui/molecules/mcp-server-picker/card-setup-button.js +34 -0
- package/dist/components/ui/molecules/mcp-server-picker/constants.d.ts +2 -0
- package/dist/components/ui/molecules/mcp-server-picker/constants.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/constants.js +2 -2
- package/dist/components/ui/molecules/mcp-server-picker/section-callout.js +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/section-nav-header.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/section-nav-header.js +12 -6
- package/dist/components/ui/molecules/mcp-server-picker/selection-card-parts.d.ts +28 -0
- package/dist/components/ui/molecules/mcp-server-picker/selection-card-parts.d.ts.map +1 -0
- package/dist/components/ui/molecules/mcp-server-picker/selection-card-parts.js +28 -0
- package/dist/components/ui/molecules/mcp-server-picker/server-card.d.ts +3 -6
- package/dist/components/ui/molecules/mcp-server-picker/server-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/server-card.js +93 -108
- package/dist/components/ui/molecules/mcp-server-picker/setup-callout.d.ts +13 -0
- package/dist/components/ui/molecules/mcp-server-picker/setup-callout.d.ts.map +1 -0
- package/dist/components/ui/molecules/mcp-server-picker/setup-callout.js +27 -0
- package/dist/components/ui/molecules/mcp-server-picker/tool-card.d.ts +5 -1
- package/dist/components/ui/molecules/mcp-server-picker/tool-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/tool-card.js +48 -41
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-group-header.js +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/unoptimized-match-card.d.ts +3 -1
- package/dist/components/ui/molecules/mcp-server-picker/unoptimized-match-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/unoptimized-match-card.js +32 -30
- package/dist/components/ui/organisms/mcp-server-picker.d.ts +6 -3
- package/dist/components/ui/organisms/mcp-server-picker.d.ts.map +1 -1
- package/dist/components/ui/organisms/mcp-server-picker.js +4 -4
- package/dist/main.js +36 -34
- package/package.json +1 -1
|
@@ -1,166 +1,151 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../../../lib/utils.js";
|
|
4
|
-
import { t } from "../../../../
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
4
|
+
import { i as t, n, r, t as i } from "../../../../tooltip-BUR7V5Aa.js";
|
|
5
|
+
import { n as a } from "../../../../checkbox-DB9O_Iw9.js";
|
|
6
|
+
import { McpCardHeading as o, mcpSelectionCardShellVariants as s } from "./selection-card-parts.js";
|
|
7
|
+
import { McpToolkitAvatar as c } from "./toolkit-avatar.js";
|
|
8
|
+
import "./constants.js";
|
|
9
|
+
import { McpCardSetupButton as l } from "./card-setup-button.js";
|
|
10
|
+
import * as u from "react";
|
|
11
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
|
+
import { ChevronRight as m } from "lucide-react";
|
|
10
13
|
//#region lib/components/ui/molecules/mcp-server-picker/server-card.tsx
|
|
11
|
-
var p = t("flex items-stretch rounded-lg border transition-[background-color,border-color,box-shadow,transform] duration-[var(--duration-normal)] ease-[var(--ease-smooth)] motion-reduce:transition-colors", {
|
|
12
|
-
variants: { selectionState: {
|
|
13
|
-
selected: "border-foreground/45 bg-muted/20 shadow-[var(--shadow-card)]",
|
|
14
|
-
partial: "border-foreground/45 border-dashed bg-muted/20 shadow-[var(--shadow-card)]",
|
|
15
|
-
none: "border-border hover:border-foreground/40 hover:shadow-[var(--shadow-card-hover)]",
|
|
16
|
-
"setup-none": "border-warning/15 hover:border-warning/50 hover:shadow-[var(--shadow-card-hover)]",
|
|
17
|
-
"setup-selected": "border-warning/50 bg-warning/[0.5%] shadow-[var(--shadow-card)]",
|
|
18
|
-
"setup-partial": "border-warning/50 border-dashed bg-warning/[0.5%] shadow-[var(--shadow-card)]"
|
|
19
|
-
} },
|
|
20
|
-
defaultVariants: { selectionState: "none" }
|
|
21
|
-
});
|
|
22
|
-
function m(e, t) {
|
|
23
|
-
return t ? e === "selected" ? "setup-selected" : e === "partial" ? "setup-partial" : "setup-none" : e;
|
|
24
|
-
}
|
|
25
14
|
function h(e) {
|
|
26
15
|
return e === "selected" ? !0 : e === "partial" ? "mixed" : !1;
|
|
27
16
|
}
|
|
28
|
-
function g(
|
|
29
|
-
return /* @__PURE__ */
|
|
17
|
+
function g(e, a) {
|
|
18
|
+
return a ? /* @__PURE__ */ f(r, {
|
|
19
|
+
delay: 600,
|
|
20
|
+
children: /* @__PURE__ */ p(i, { children: [/* @__PURE__ */ f(t, { render: e }), /* @__PURE__ */ f(n, {
|
|
21
|
+
className: "max-w-xs flex-col items-start gap-0.5 text-left text-xs",
|
|
22
|
+
side: "bottom",
|
|
23
|
+
children: /* @__PURE__ */ f("span", { children: a })
|
|
24
|
+
})] })
|
|
25
|
+
}) : e;
|
|
26
|
+
}
|
|
27
|
+
function _({ name: e, description: t, toolkitId: n, version: r, selectionState: i, onToggle: s }) {
|
|
28
|
+
return g(/* @__PURE__ */ p("button", {
|
|
30
29
|
"aria-label": `${i === "selected" ? "Remove all" : "Add all"} ${e} tools`,
|
|
31
30
|
"aria-pressed": h(i),
|
|
32
|
-
className: "flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-l-lg px-3 py-2.5 text-left transition-[background-color,color,transform] duration-[var(--duration-fast)] ease-[var(--ease-smooth)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset active:
|
|
33
|
-
onClick:
|
|
34
|
-
title: t || void 0,
|
|
31
|
+
className: "peer/mcp-server-card-toggle flex min-w-0 flex-1 cursor-pointer items-center gap-2.5 rounded-l-lg px-3 py-2.5 text-left transition-[background-color,color,transform] duration-[var(--duration-fast)] ease-[var(--ease-smooth)] hover:bg-foreground/[0.03] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset active:translate-y-px group-has-[[data-slot=mcp-server-card-customize]:hover]/mcp-server-card:bg-[var(--mcp-server-card-subtle-hover)] motion-reduce:transition-colors motion-reduce:active:translate-y-0 dark:hover:bg-muted/50",
|
|
32
|
+
onClick: s,
|
|
35
33
|
type: "button",
|
|
36
|
-
children: [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ f(a, {
|
|
36
|
+
checked: i === "selected",
|
|
37
|
+
indeterminate: i === "partial"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ f(c, {
|
|
40
|
+
name: e,
|
|
41
|
+
size: "xl",
|
|
42
|
+
toolkitId: n
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ p("span", {
|
|
45
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
46
|
+
children: [/* @__PURE__ */ f(o, {
|
|
47
|
+
capitalize: !0,
|
|
48
|
+
name: e,
|
|
49
|
+
version: r
|
|
50
|
+
}), t ? /* @__PURE__ */ f("span", {
|
|
51
|
+
className: "mt-0.5 min-w-0 truncate text-[var(--mcp-muted-foreground)] text-xs",
|
|
52
|
+
children: t
|
|
53
|
+
}) : null]
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}), t);
|
|
51
57
|
}
|
|
52
|
-
function
|
|
53
|
-
return /* @__PURE__ */
|
|
58
|
+
function v({ hasSetup: t, name: n, description: r, toolkitId: i, version: a, toolsLabel: s, onCustomize: l }) {
|
|
59
|
+
return g(/* @__PURE__ */ p("button", {
|
|
54
60
|
"aria-label": `Choose individual tools for ${n}`,
|
|
55
61
|
className: e("flex min-w-0 flex-1 cursor-pointer items-center gap-2 px-3 py-2.5 text-left transition-[background-color,color,transform] duration-[var(--duration-fast)] ease-[var(--ease-smooth)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset active:scale-[0.98] motion-reduce:transition-colors motion-reduce:active:scale-100", t ? "rounded-l-lg" : "rounded-lg"),
|
|
56
|
-
onClick:
|
|
57
|
-
title: r || void 0,
|
|
62
|
+
onClick: l,
|
|
58
63
|
type: "button",
|
|
59
64
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ f(c, {
|
|
61
66
|
name: n,
|
|
62
67
|
size: "md",
|
|
63
68
|
toolkitId: i
|
|
64
69
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}), a ? /* @__PURE__ */ u("span", {
|
|
71
|
-
className: "shrink-0 font-normal text-muted-foreground text-xs tabular-nums",
|
|
72
|
-
children: ["v", a]
|
|
73
|
-
}) : null]
|
|
70
|
+
/* @__PURE__ */ f(o, {
|
|
71
|
+
capitalize: !0,
|
|
72
|
+
className: "flex-1",
|
|
73
|
+
name: n,
|
|
74
|
+
version: a
|
|
74
75
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
className: "flex shrink-0 items-center gap-1.5 text-muted-foreground text-xs",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ p("span", {
|
|
77
|
+
className: "flex shrink-0 items-center gap-1.5 text-[var(--mcp-muted-foreground)] text-xs",
|
|
78
|
+
children: [/* @__PURE__ */ f("span", {
|
|
78
79
|
className: "whitespace-nowrap tabular-nums",
|
|
79
80
|
children: s
|
|
80
|
-
}), /* @__PURE__ */
|
|
81
|
+
}), /* @__PURE__ */ f(m, {
|
|
81
82
|
"aria-hidden": !0,
|
|
82
83
|
className: "size-3 transition-transform duration-[var(--duration-fast)] ease-[var(--ease-smooth)] motion-reduce:transition-none"
|
|
83
84
|
})]
|
|
84
85
|
})
|
|
85
86
|
]
|
|
86
|
-
});
|
|
87
|
+
}), r);
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
return /* @__PURE__ */
|
|
89
|
+
function y({ name: e, toolsLabel: t, onCustomize: n }) {
|
|
90
|
+
return /* @__PURE__ */ p("button", {
|
|
90
91
|
"aria-label": `Choose individual tools for ${e}`,
|
|
91
|
-
className: "flex min-w-[5.
|
|
92
|
+
className: "flex min-w-[5.25rem] shrink-0 cursor-pointer items-center justify-end gap-1.5 rounded-r-lg border-border/65 border-l bg-foreground/[0.02] px-3 text-[var(--mcp-muted-foreground)] text-xs transition-[background-color,color,transform] duration-[var(--duration-fast)] ease-[var(--ease-smooth)] hover:bg-foreground/[0.045] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset active:translate-y-px peer-hover/mcp-server-card-toggle:bg-[var(--mcp-server-card-subtle-hover)] motion-reduce:transition-colors motion-reduce:active:translate-y-0 dark:border-border/50 dark:bg-foreground/[0.015] dark:hover:bg-muted/65",
|
|
92
93
|
"data-slot": "mcp-server-card-customize",
|
|
93
94
|
onClick: n,
|
|
94
95
|
type: "button",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ f("span", {
|
|
96
97
|
className: "whitespace-nowrap tabular-nums",
|
|
97
98
|
children: t
|
|
98
|
-
}), /* @__PURE__ */
|
|
99
|
+
}), /* @__PURE__ */ f(m, {
|
|
99
100
|
"aria-hidden": !0,
|
|
100
101
|
className: "size-3 transition-transform duration-[var(--duration-fast)] ease-[var(--ease-smooth)] motion-reduce:transition-none"
|
|
101
102
|
})]
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
onClick: s,
|
|
110
|
-
type: "button",
|
|
111
|
-
children: /* @__PURE__ */ l(f, {
|
|
112
|
-
"aria-hidden": !0,
|
|
113
|
-
className: "size-4"
|
|
114
|
-
})
|
|
115
|
-
}) }), /* @__PURE__ */ u(r, {
|
|
116
|
-
className: "max-w-56 flex-col items-start gap-0.5 text-left",
|
|
117
|
-
side: "top",
|
|
118
|
-
children: [/* @__PURE__ */ l("span", {
|
|
119
|
-
className: "font-semibold",
|
|
120
|
-
children: "Setup required"
|
|
121
|
-
}), /* @__PURE__ */ l("span", { children: "This server isn't ready yet. It needs some configuration before its tools work." })]
|
|
122
|
-
})] }) });
|
|
123
|
-
}
|
|
124
|
-
function b({ name: t, description: n, toolkitId: r, version: i, toolCount: a, selectedToolCount: o = 0, selectionState: s = "none", needsSetup: d = !1, interaction: f = "toggle", onSetup: h, onToggle: b, onCustomize: x, className: S, ...C }) {
|
|
125
|
-
let w = s === "partial" ? `${o}/${a} tools` : `${a} ${a === 1 ? "tool" : "tools"}`;
|
|
126
|
-
return /* @__PURE__ */ l("div", {
|
|
127
|
-
...C,
|
|
128
|
-
className: e(p({ selectionState: m(s, d) }), S),
|
|
105
|
+
function b({ name: t, description: n, toolkitId: r, version: i, toolCount: a, selectedToolCount: o = 0, selectionState: c = "none", needsSetup: u = !1, interaction: m = "toggle", onSetup: h, onToggle: g, onCustomize: b, className: x, ...S }) {
|
|
106
|
+
let C = c === "partial" ? `${o}/${a} tools` : `${a} ${a === 1 ? "tool" : "tools"}`;
|
|
107
|
+
return /* @__PURE__ */ f("div", {
|
|
108
|
+
...S,
|
|
109
|
+
className: e(s({ selectionState: c }), "group/mcp-server-card flex items-stretch", c === "none" && "hover:!bg-[var(--mcp-picker-surface)] dark:hover:!bg-muted/45", x),
|
|
129
110
|
"data-slot": "mcp-server-card",
|
|
130
|
-
"data-status":
|
|
131
|
-
children:
|
|
111
|
+
"data-status": u ? "needs-setup" : c,
|
|
112
|
+
children: m === "drill" ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(v, {
|
|
132
113
|
description: n,
|
|
133
|
-
hasSetup:
|
|
114
|
+
hasSetup: u,
|
|
134
115
|
name: t,
|
|
135
|
-
onCustomize:
|
|
116
|
+
onCustomize: b,
|
|
136
117
|
toolkitId: r,
|
|
137
|
-
toolsLabel:
|
|
118
|
+
toolsLabel: C,
|
|
138
119
|
version: i
|
|
139
|
-
}),
|
|
140
|
-
|
|
120
|
+
}), u ? /* @__PURE__ */ f(l, {
|
|
121
|
+
className: "rounded-r-lg",
|
|
122
|
+
description: "This server isn't ready yet. It needs some configuration before its tools work.",
|
|
141
123
|
name: t,
|
|
142
|
-
onSetup: h
|
|
143
|
-
|
|
144
|
-
|
|
124
|
+
onSetup: h,
|
|
125
|
+
slot: "mcp-server-card-setup"
|
|
126
|
+
}) : null] }) : /* @__PURE__ */ p(d, { children: [
|
|
127
|
+
/* @__PURE__ */ f(_, {
|
|
145
128
|
description: n,
|
|
146
129
|
name: t,
|
|
147
|
-
onToggle:
|
|
148
|
-
selectionState:
|
|
130
|
+
onToggle: g,
|
|
131
|
+
selectionState: c,
|
|
149
132
|
toolkitId: r,
|
|
150
133
|
version: i
|
|
151
134
|
}),
|
|
152
|
-
|
|
135
|
+
u ? /* @__PURE__ */ f(l, {
|
|
136
|
+
description: "This server isn't ready yet. It needs some configuration before its tools work.",
|
|
153
137
|
name: t,
|
|
154
|
-
onSetup: h
|
|
138
|
+
onSetup: h,
|
|
139
|
+
slot: "mcp-server-card-setup"
|
|
155
140
|
}) : null,
|
|
156
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ f(y, {
|
|
157
142
|
name: t,
|
|
158
|
-
onCustomize:
|
|
159
|
-
toolsLabel:
|
|
143
|
+
onCustomize: b,
|
|
144
|
+
toolsLabel: C
|
|
160
145
|
})
|
|
161
146
|
] })
|
|
162
147
|
});
|
|
163
148
|
}
|
|
164
|
-
var x =
|
|
149
|
+
var x = u.memo(b);
|
|
165
150
|
//#endregion
|
|
166
|
-
export { x as McpServerCard
|
|
151
|
+
export { x as McpServerCard };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type McpSetupCalloutProps = {
|
|
3
|
+
/** Number of selected items that still need setup. */
|
|
4
|
+
count: number;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
} & Omit<React.ComponentProps<"button">, "children" | "title" | "onClick">;
|
|
7
|
+
/**
|
|
8
|
+
* A non-blocking summary of the selection's remaining setup work — the base
|
|
9
|
+
* `Callout` with the picker's warning treatment and a count chip. Consumers
|
|
10
|
+
* own the destination (sheet, inline flow, or page).
|
|
11
|
+
*/
|
|
12
|
+
export declare function McpSetupCallout({ count, className, onClick, ...rest }: McpSetupCalloutProps): React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=setup-callout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-callout.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/molecules/mcp-server-picker/setup-callout.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,MAAM,MAAM,oBAAoB,GAAG;IACjC,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAI3E;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,SAAS,EACT,OAAO,EACP,GAAG,IAAI,EACR,EAAE,oBAAoB,qBA+BtB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
4
|
+
import { Callout as t } from "../callout.js";
|
|
5
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { KeyRound as a } from "lucide-react";
|
|
7
|
+
//#region lib/components/ui/molecules/mcp-server-picker/setup-callout.tsx
|
|
8
|
+
var o = "Review setup";
|
|
9
|
+
function s({ count: s, className: c, onClick: l, ...u }) {
|
|
10
|
+
let d = `${s} ${s === 1 ? "item" : "items"}`;
|
|
11
|
+
return /* @__PURE__ */ r(t, {
|
|
12
|
+
...u,
|
|
13
|
+
actionLabel: o,
|
|
14
|
+
"aria-label": `${o} for ${d}`,
|
|
15
|
+
className: e("border-[var(--mcp-setup-border)] bg-[var(--mcp-setup-surface)] hover:bg-[var(--mcp-setup-hover)] dark:border-border/70 dark:bg-muted/15 dark:hover:border-border dark:hover:bg-muted/25", "[&_[data-slot=callout-description]]:text-[var(--mcp-muted-foreground)]", c),
|
|
16
|
+
description: s === 1 ? "A selected item needs a secret or connection before agents can use it." : "A few selected items need a secret or connection before agents can use them.",
|
|
17
|
+
icon: /* @__PURE__ */ r(a, { className: "size-4" }),
|
|
18
|
+
iconClassName: "text-[var(--mcp-setup-foreground)] dark:bg-warning/12 dark:text-warning dark:group-hover:bg-warning/15",
|
|
19
|
+
onClick: l,
|
|
20
|
+
title: /* @__PURE__ */ i(n, { children: ["Setup recommended", /* @__PURE__ */ r("span", {
|
|
21
|
+
className: "rounded-md border border-[var(--mcp-setup-border)] bg-background/60 px-1.5 py-0.5 font-medium text-foreground text-xs tabular-nums dark:border-warning/30 dark:bg-warning/[0.06]",
|
|
22
|
+
children: d
|
|
23
|
+
})] })
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { s as McpSetupCallout };
|
|
@@ -14,9 +14,13 @@ export type McpToolCardProps = {
|
|
|
14
14
|
selected?: boolean;
|
|
15
15
|
destructive?: boolean;
|
|
16
16
|
readOnly?: boolean;
|
|
17
|
+
/** Whether this tool still needs configuration before it can run. */
|
|
18
|
+
needsSetup?: boolean;
|
|
19
|
+
/** Fired from the setup strip when `needsSetup` is true. */
|
|
20
|
+
onSetup?: () => void;
|
|
17
21
|
onToggle?: () => void;
|
|
18
22
|
} & Omit<React.ComponentProps<"button">, "onClick" | "onToggle" | "name">;
|
|
19
|
-
declare function McpToolCardImpl({ name, rawName, version, description, selected, destructive, readOnly, onToggle, className, ...rest }: McpToolCardProps): React.JSX.Element;
|
|
23
|
+
declare function McpToolCardImpl({ name, rawName, version, description, selected, destructive, readOnly, needsSetup, onSetup, onToggle, disabled, className, ...rest }: McpToolCardProps): React.JSX.Element;
|
|
20
24
|
export declare const McpToolCard: React.MemoExoticComponent<typeof McpToolCardImpl>;
|
|
21
25
|
export {};
|
|
22
26
|
//# sourceMappingURL=tool-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-card.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/molecules/mcp-server-picker/tool-card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tool-card.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/molecules/mcp-server-picker/tool-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qEAAqE;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;AAE1E,iBAAS,eAAe,CAAC,EACvB,IAAI,EACJ,OAAO,EACP,OAAO,EACP,WAAW,EACX,QAAgB,EAChB,WAAmB,EACnB,QAAgB,EAChB,UAAkB,EAClB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,gBAAgB,qBAkHlB;AAED,eAAO,MAAM,WAAW,mDAA8B,CAAC"}
|
|
@@ -2,65 +2,72 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../../../lib/utils.js";
|
|
4
4
|
import { i as t, n, r, t as i } from "../../../../tooltip-BUR7V5Aa.js";
|
|
5
|
+
import { n as a } from "../../../../checkbox-DB9O_Iw9.js";
|
|
6
|
+
import { McpCardHeading as o, mcpSelectionCardShellVariants as s } from "./selection-card-parts.js";
|
|
5
7
|
import "./constants.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
8
|
+
import { McpCardSetupButton as c } from "./card-setup-button.js";
|
|
9
|
+
import * as l from "react";
|
|
10
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
11
|
//#region lib/components/ui/molecules/mcp-server-picker/tool-card.tsx
|
|
10
|
-
function
|
|
11
|
-
let v = /* @__PURE__ */
|
|
12
|
-
...
|
|
13
|
-
"aria-pressed":
|
|
14
|
-
className: e(
|
|
12
|
+
function f({ name: l, rawName: f, version: p, description: m, selected: h = !1, destructive: g = !1, readOnly: _ = !1, needsSetup: v = !1, onSetup: y, onToggle: b, disabled: x, className: S, ...C }) {
|
|
13
|
+
let w = h ? "selected" : "none", T = v ? "needs-setup" : w, E = /* @__PURE__ */ d("button", {
|
|
14
|
+
...C,
|
|
15
|
+
"aria-pressed": h,
|
|
16
|
+
className: e(v ? "rounded-l-lg transition-[background-color] duration-[var(--duration-fast)] ease-[var(--ease-smooth)] hover:bg-foreground/[0.03] focus-visible:ring-inset motion-reduce:transition-colors dark:hover:bg-muted/50" : s({ selectionState: w }), "flex min-w-0 flex-1 cursor-pointer items-start gap-2.5 p-3 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 motion-reduce:active:scale-100", !v && "active:scale-[0.98]", !v && S),
|
|
15
17
|
"data-slot": "mcp-tool-card",
|
|
16
|
-
"data-status":
|
|
17
|
-
|
|
18
|
+
"data-status": T,
|
|
19
|
+
disabled: x,
|
|
20
|
+
onClick: b,
|
|
18
21
|
type: "button",
|
|
19
|
-
children: [/* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
}), /* @__PURE__ */ s("span", {
|
|
22
|
+
children: [/* @__PURE__ */ u(a, {
|
|
23
|
+
checked: h,
|
|
24
|
+
className: "mt-0.5"
|
|
25
|
+
}), /* @__PURE__ */ d("span", {
|
|
24
26
|
className: "min-w-0 flex-1",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ d("span", {
|
|
26
28
|
className: "flex items-start justify-between gap-3",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
children: a
|
|
32
|
-
}), u ? /* @__PURE__ */ s("span", {
|
|
33
|
-
className: "shrink-0 font-normal text-muted-foreground text-xs tabular-nums",
|
|
34
|
-
children: ["v", u]
|
|
35
|
-
}) : null]
|
|
36
|
-
}), /* @__PURE__ */ s("span", {
|
|
29
|
+
children: [/* @__PURE__ */ u(o, {
|
|
30
|
+
name: l,
|
|
31
|
+
version: p
|
|
32
|
+
}), /* @__PURE__ */ d("span", {
|
|
37
33
|
className: "flex shrink-0 items-center gap-1.5 self-start",
|
|
38
|
-
children: [
|
|
34
|
+
children: [g ? /* @__PURE__ */ u("span", {
|
|
39
35
|
className: "ds-focus-in rounded-full bg-destructive/10 px-1.5 py-0.5 font-medium text-[10px] text-destructive uppercase tracking-wide",
|
|
40
36
|
children: "Destructive"
|
|
41
|
-
}) : null,
|
|
42
|
-
className: "ds-focus-in rounded-full bg-muted px-1.5 py-0.5 font-medium text-[10px] text-muted-foreground uppercase tracking-wide",
|
|
37
|
+
}) : null, _ ? /* @__PURE__ */ u("span", {
|
|
38
|
+
className: "ds-focus-in rounded-full bg-muted px-1.5 py-0.5 font-medium text-[10px] text-[var(--mcp-muted-foreground)] uppercase tracking-wide",
|
|
43
39
|
children: "Read-only"
|
|
44
40
|
}) : null]
|
|
45
41
|
})]
|
|
46
|
-
}),
|
|
47
|
-
className: "mt-0.5 line-clamp-1 text-muted-foreground text-xs leading-snug",
|
|
48
|
-
children:
|
|
42
|
+
}), m ? /* @__PURE__ */ u("span", {
|
|
43
|
+
className: "mt-0.5 line-clamp-1 text-[var(--mcp-muted-foreground)] text-xs leading-snug",
|
|
44
|
+
children: m
|
|
49
45
|
}) : null]
|
|
50
46
|
})]
|
|
51
|
-
})
|
|
52
|
-
return d ? /* @__PURE__ */ o(r, {
|
|
47
|
+
}), D = m ? /* @__PURE__ */ u(r, {
|
|
53
48
|
delay: 600,
|
|
54
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ d(i, { children: [/* @__PURE__ */ u(t, { render: E }), /* @__PURE__ */ d(n, {
|
|
55
50
|
className: "max-w-xs flex-col items-start gap-0.5 text-left text-xs",
|
|
56
51
|
side: "bottom",
|
|
57
|
-
children: [
|
|
52
|
+
children: [f && f !== l ? /* @__PURE__ */ u("span", {
|
|
58
53
|
className: "font-medium",
|
|
59
|
-
children:
|
|
60
|
-
}) : null, /* @__PURE__ */
|
|
54
|
+
children: f
|
|
55
|
+
}) : null, /* @__PURE__ */ u("span", { children: m })]
|
|
61
56
|
})] })
|
|
62
|
-
}) :
|
|
57
|
+
}) : E;
|
|
58
|
+
return v ? /* @__PURE__ */ d("div", {
|
|
59
|
+
className: e(s({ selectionState: w }), "flex items-stretch", w === "none" && "hover:!bg-[var(--mcp-picker-surface)] dark:hover:!bg-muted/45", "has-[button:active]:scale-[0.98] motion-reduce:has-[button:active]:scale-100", S),
|
|
60
|
+
"data-slot": "mcp-tool-card-frame",
|
|
61
|
+
children: [D, /* @__PURE__ */ u(c, {
|
|
62
|
+
className: "rounded-r-lg",
|
|
63
|
+
description: "This tool needs a secret or an auth provider before it can run.",
|
|
64
|
+
disabled: x,
|
|
65
|
+
name: l,
|
|
66
|
+
onSetup: y,
|
|
67
|
+
slot: "mcp-tool-card-setup"
|
|
68
|
+
})]
|
|
69
|
+
}) : D;
|
|
63
70
|
}
|
|
64
|
-
var
|
|
71
|
+
var p = l.memo(f);
|
|
65
72
|
//#endregion
|
|
66
|
-
export {
|
|
73
|
+
export { p as McpToolCard };
|
|
@@ -22,7 +22,7 @@ function i({ name: i, toolkitId: a, avatarSize: o = "sm", headingAs: s = "h4", c
|
|
|
22
22
|
children: i
|
|
23
23
|
}),
|
|
24
24
|
c === void 0 ? null : /* @__PURE__ */ n("span", {
|
|
25
|
-
className: "shrink-0 text-muted-foreground text-xs tabular-nums",
|
|
25
|
+
className: "shrink-0 text-[var(--mcp-muted-foreground)] text-xs tabular-nums",
|
|
26
26
|
children: c
|
|
27
27
|
})
|
|
28
28
|
]
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export type McpUnoptimizedMatchCardProps = {
|
|
2
2
|
serverCount: number;
|
|
3
3
|
toolCount: number;
|
|
4
|
+
/** Explanation shown in the desktop-hover and mobile-tap tooltips. */
|
|
5
|
+
tooltip: string;
|
|
4
6
|
onShow?: () => void;
|
|
5
7
|
className?: string;
|
|
6
8
|
};
|
|
7
|
-
export declare function McpUnoptimizedMatchCard({ serverCount, toolCount, onShow, className, }: McpUnoptimizedMatchCardProps): import("react").JSX.Element | null;
|
|
9
|
+
export declare function McpUnoptimizedMatchCard({ serverCount, toolCount, tooltip, onShow, className, }: McpUnoptimizedMatchCardProps): import("react").JSX.Element | null;
|
|
8
10
|
//# sourceMappingURL=unoptimized-match-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unoptimized-match-card.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/molecules/mcp-server-picker/unoptimized-match-card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unoptimized-match-card.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/molecules/mcp-server-picker/unoptimized-match-card.tsx"],"names":[],"mappings":"AAaA,MAAM,MAAM,4BAA4B,GAAG;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF,wBAAgB,uBAAuB,CAAC,EACtC,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,GACV,EAAE,4BAA4B,sCAyF9B"}
|
|
@@ -2,58 +2,60 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../../../lib/utils.js";
|
|
4
4
|
import { i as t, n, r, t as i } from "../../../../tooltip-BUR7V5Aa.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { IconTile as a } from "../../atoms/icon-tile.js";
|
|
6
|
+
import { mcpSelectionCardShellVariants as o } from "./selection-card-parts.js";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { Braces as l, Info as u } from "lucide-react";
|
|
7
9
|
//#region lib/components/ui/molecules/mcp-server-picker/unoptimized-match-card.tsx
|
|
8
|
-
function
|
|
10
|
+
function d(e, t) {
|
|
9
11
|
return `${e} ${t}${e === 1 ? "" : "s"}`;
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
className: e("flex h-full w-full items-center gap-2 rounded-lg border border-brand-text/40 border-dashed bg-muted/20 p-3", m),
|
|
13
|
+
function f({ serverCount: f, toolCount: p, tooltip: m, onShow: h, className: g }) {
|
|
14
|
+
if (f === 0 && p === 0) return null;
|
|
15
|
+
let _ = [f > 0 ? `+${d(f, "server")}` : null, p > 0 ? `+${d(p, "tool")}` : null].filter(Boolean).join(" ");
|
|
16
|
+
return /* @__PURE__ */ c("div", {
|
|
17
|
+
className: e(o({ selectionState: "none" }), "relative flex h-full w-full items-stretch border-[var(--mcp-picker-selected-border)] border-dashed dark:border-brand-text/40", g),
|
|
17
18
|
"data-slot": "mcp-unoptimized-match-card",
|
|
18
|
-
children: [/* @__PURE__ */
|
|
19
|
-
render: /* @__PURE__ */
|
|
20
|
-
"aria-label": `Show unoptimized (${
|
|
21
|
-
className: "flex min-w-0 flex-1 cursor-pointer items-center gap-2 text-left transition-
|
|
22
|
-
onClick:
|
|
19
|
+
children: [/* @__PURE__ */ s(r, { children: /* @__PURE__ */ c(i, { children: [/* @__PURE__ */ c(t, {
|
|
20
|
+
render: /* @__PURE__ */ s("button", {
|
|
21
|
+
"aria-label": `Show unoptimized (${_})`,
|
|
22
|
+
className: "flex min-w-0 flex-1 cursor-pointer items-center gap-2.5 rounded-lg px-3 py-2.5 text-left transition-[background-color,color,transform] duration-[var(--duration-fast)] ease-[var(--ease-smooth)] after:absolute after:inset-0 after:rounded-lg after:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset active:translate-y-px motion-reduce:transition-colors motion-reduce:active:translate-y-0",
|
|
23
|
+
onClick: h,
|
|
23
24
|
type: "button"
|
|
24
25
|
}),
|
|
25
26
|
children: [
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
"
|
|
28
|
-
|
|
27
|
+
/* @__PURE__ */ s(a, {
|
|
28
|
+
className: "text-brand-text",
|
|
29
|
+
size: "xl",
|
|
30
|
+
children: /* @__PURE__ */ s(l, { "aria-hidden": !0 })
|
|
29
31
|
}),
|
|
30
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ s("span", {
|
|
31
33
|
className: "min-w-0 flex-1 truncate font-medium text-sm",
|
|
32
34
|
children: "Show unoptimized"
|
|
33
35
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
className: "shrink-0 whitespace-nowrap text-muted-foreground text-xs tabular-nums",
|
|
36
|
-
children:
|
|
36
|
+
/* @__PURE__ */ s("span", {
|
|
37
|
+
className: "shrink-0 whitespace-nowrap text-[var(--mcp-muted-foreground)] text-xs tabular-nums",
|
|
38
|
+
children: _
|
|
37
39
|
})
|
|
38
40
|
]
|
|
39
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ s(n, {
|
|
40
42
|
className: "max-w-xs",
|
|
41
43
|
side: "top",
|
|
42
|
-
children:
|
|
43
|
-
})] }) }), /* @__PURE__ */
|
|
44
|
-
render: /* @__PURE__ */
|
|
44
|
+
children: m
|
|
45
|
+
})] }) }), /* @__PURE__ */ s(r, { children: /* @__PURE__ */ c(i, { children: [/* @__PURE__ */ s(t, {
|
|
46
|
+
render: /* @__PURE__ */ s("button", {
|
|
45
47
|
"aria-label": "What are unoptimized tools?",
|
|
46
|
-
className: "shrink-0 cursor-pointer rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 sm:hidden",
|
|
48
|
+
className: "relative z-10 flex shrink-0 cursor-pointer items-center rounded-r-lg px-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset sm:hidden",
|
|
47
49
|
type: "button"
|
|
48
50
|
}),
|
|
49
|
-
children: /* @__PURE__ */
|
|
51
|
+
children: /* @__PURE__ */ s(u, {
|
|
50
52
|
"aria-hidden": !0,
|
|
51
|
-
className: "size-3.5 text-muted-foreground"
|
|
53
|
+
className: "size-3.5 text-[var(--mcp-muted-foreground)]"
|
|
52
54
|
})
|
|
53
|
-
}), /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ s(n, {
|
|
54
56
|
className: "max-w-xs",
|
|
55
57
|
side: "top",
|
|
56
|
-
children:
|
|
58
|
+
children: m
|
|
57
59
|
})] }) })]
|
|
58
60
|
});
|
|
59
61
|
}
|
|
@@ -11,7 +11,7 @@ import type * as React from "react";
|
|
|
11
11
|
* <McpServerPicker>
|
|
12
12
|
* <McpServerPickerHeader>
|
|
13
13
|
* <Input ... />
|
|
14
|
-
* <
|
|
14
|
+
* <FilterChipGroup ... />
|
|
15
15
|
* <McpUnoptimizedToggle ... />
|
|
16
16
|
* </McpServerPickerHeader>
|
|
17
17
|
* <McpSelectionSummaryBar ... />
|
|
@@ -32,8 +32,11 @@ export declare function McpServerPicker({ className, ...props }: React.Component
|
|
|
32
32
|
*/
|
|
33
33
|
export declare function McpServerPickerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
34
34
|
/**
|
|
35
|
-
* Responsive grid of server cards
|
|
36
|
-
*
|
|
35
|
+
* Responsive grid of server cards that keeps a roomy card width as the
|
|
36
|
+
* container grows: one column when narrow, two at `@2xl` (~672px), three at
|
|
37
|
+
* `@7xl` (~1280px). Capped at three so cards never get cramped or overly wide,
|
|
38
|
+
* and the name + description always have room. The steps match the ui-kit
|
|
39
|
+
* picker's 672/1280px column breakpoints so the two stay in sync.
|
|
37
40
|
*/
|
|
38
41
|
export declare function McpServerPickerGrid({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
39
42
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server-picker.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/organisms/mcp-server-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED
|
|
1
|
+
{"version":3,"file":"mcp-server-picker.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/organisms/mcp-server-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAa7B"}
|