@arcadeai/design-system 5.0.2 → 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/{clamp-DV0oJUnl.js → CSPContext-_3HefTUC.js} +1 -6
- package/dist/{DialogRoot-xodRxCJ6.js → DialogRoot-DuiSPdsZ.js} +1 -1
- package/dist/{DialogTrigger-BRWKaMYv.js → DialogTrigger-DGGP-2Oc.js} +109 -108
- package/dist/{FloatingPortalLite-e0IaokaG.js → FloatingPortalLite-D5nFwFgJ.js} +1 -1
- package/dist/ReactStore-C3H8e2ha.js +600 -0
- package/dist/{Toggle-waFXW8db.js → Toggle-BdxyK_Ln.js} +1 -1
- package/dist/{accordion-DimUia61.js → accordion-BP9Lgkg8.js} +18 -18
- package/dist/{alert-dialog-BiDZwtP2.js → alert-dialog-1bUE2clB.js} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/variables.css +1 -1
- package/dist/{avatar-B-lhJ-Gz.js → avatar-DbL6b01k.js} +4 -3
- package/dist/{checkbox-CZViOGvt.js → checkbox-DB9O_Iw9.js} +96 -85
- package/dist/clamp-BT4ayAnN.js +6 -0
- package/dist/{collapsible-DlF1q_cg.js → collapsible-DP7Fb-Lu.js} +17 -17
- package/dist/components/index.js +259 -251
- package/dist/components/ui/atoms/accordion.js +1 -1
- package/dist/components/ui/atoms/alert-dialog.js +1 -1
- package/dist/components/ui/atoms/avatar.js +1 -1
- package/dist/components/ui/atoms/checkbox.d.ts +16 -2
- package/dist/components/ui/atoms/checkbox.d.ts.map +1 -1
- package/dist/components/ui/atoms/checkbox.js +2 -2
- package/dist/components/ui/atoms/clear-button.d.ts +13 -0
- package/dist/components/ui/atoms/clear-button.d.ts.map +1 -0
- package/dist/components/ui/atoms/clear-button.js +23 -0
- package/dist/components/ui/atoms/collapsible.js +1 -1
- package/dist/components/ui/atoms/dialog.js +2 -2
- package/dist/components/ui/atoms/dropdown-menu.js +1 -1
- package/dist/components/ui/atoms/hover-card.js +1 -1
- package/dist/components/ui/atoms/icon-tile.d.ts +10 -0
- package/dist/components/ui/atoms/icon-tile.d.ts.map +1 -0
- package/dist/components/ui/atoms/icon-tile.js +25 -0
- package/dist/components/ui/atoms/index.d.ts +3 -1
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +210 -208
- package/dist/components/ui/atoms/input-group.js +1 -1
- package/dist/components/ui/atoms/input.js +1 -1
- package/dist/components/ui/atoms/mobile-tooltip.js +2 -2
- package/dist/components/ui/atoms/popover.js +1 -1
- package/dist/components/ui/atoms/progress.js +1 -1
- package/dist/components/ui/atoms/radio-group.js +1 -1
- package/dist/components/ui/atoms/scroll-area.js +1 -1
- package/dist/components/ui/atoms/scroll-button.js +1 -1
- package/dist/components/ui/atoms/scroll-to-bottom-button.d.ts +24 -0
- package/dist/components/ui/atoms/scroll-to-bottom-button.d.ts.map +1 -0
- package/dist/components/ui/atoms/scroll-to-bottom-button.js +31 -0
- package/dist/components/ui/atoms/select.js +1 -1
- package/dist/components/ui/atoms/sheet.js +2 -2
- package/dist/components/ui/atoms/sidebar.js +2 -2
- package/dist/components/ui/atoms/slider.js +1 -1
- package/dist/components/ui/atoms/switch.js +1 -1
- package/dist/components/ui/atoms/tabs.js +1 -1
- package/dist/components/ui/atoms/toggle-group.js +1 -1
- package/dist/components/ui/atoms/toggle.js +1 -1
- package/dist/components/ui/atoms/tooltip.js +1 -1
- package/dist/components/ui/blocks/demo.js +4 -4
- package/dist/components/ui/index.js +259 -251
- package/dist/components/ui/molecules/avatar-stack.d.ts +32 -0
- package/dist/components/ui/molecules/avatar-stack.d.ts.map +1 -0
- package/dist/components/ui/molecules/avatar-stack.js +91 -0
- package/dist/components/ui/molecules/callout.d.ts +20 -0
- package/dist/components/ui/molecules/callout.d.ts.map +1 -0
- package/dist/components/ui/molecules/callout.js +39 -0
- package/dist/components/ui/molecules/chat-history-item.js +1 -1
- package/dist/components/ui/molecules/chip-body.d.ts +21 -0
- package/dist/components/ui/molecules/chip-body.d.ts.map +1 -0
- package/dist/components/ui/molecules/chip-body.js +21 -0
- package/dist/components/ui/molecules/client-secret-field.js +1 -1
- package/dist/components/ui/molecules/confirm-popover.js +1 -1
- package/dist/components/ui/molecules/date-time-picker.js +2 -2
- package/dist/components/ui/molecules/filter-chip-group.d.ts +26 -0
- package/dist/components/ui/molecules/filter-chip-group.d.ts.map +1 -0
- package/dist/components/ui/molecules/{mcp-server-picker/category-filter.js → filter-chip-group.js} +8 -7
- package/dist/components/ui/molecules/index.d.ts +19 -7
- package/dist/components/ui/molecules/index.d.ts.map +1 -1
- package/dist/components/ui/molecules/index.js +41 -35
- 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/recommended-toolkits-chip.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/recommended-toolkits-chip.js +18 -15
- package/dist/components/ui/molecules/mcp-server-picker/recommended-tools.js +2 -2
- package/dist/components/ui/molecules/mcp-server-picker/search-scope-tabs.js +1 -1
- 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-avatar-stack.d.ts +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/server-avatar-stack.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/server-avatar-stack.js +29 -81
- 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 +49 -42
- package/dist/components/ui/molecules/mcp-server-picker/tool-recommendations.d.ts +12 -0
- package/dist/components/ui/molecules/mcp-server-picker/tool-recommendations.d.ts.map +1 -0
- package/dist/components/ui/molecules/mcp-server-picker/{tool-search-band.js → tool-recommendations.js} +6 -6
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-avatar.d.ts +6 -6
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-avatar.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-avatar.js +21 -33
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-chip.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-chip.js +19 -22
- 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 +33 -31
- package/dist/components/ui/molecules/message.js +2 -2
- package/dist/components/ui/molecules/prompt-input.js +1 -1
- package/dist/components/ui/molecules/removable-chip.d.ts.map +1 -0
- package/dist/components/ui/{atoms → molecules}/removable-chip.js +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +1 -1
- package/dist/components/ui/molecules/tool-call-accordion.js +2 -2
- package/dist/components/ui/molecules/tool-card.js +2 -2
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/undo-toast.d.ts +47 -0
- package/dist/components/ui/molecules/undo-toast.d.ts.map +1 -0
- package/dist/components/ui/molecules/undo-toast.js +3 -0
- package/dist/components/ui/molecules/user-nav.js +2 -2
- package/dist/components/ui/organisms/mcp-selection-summary-bar.d.ts.map +1 -1
- package/dist/components/ui/organisms/mcp-selection-summary-bar.js +27 -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/{dropdown-menu-CWWN1cXs.js → dropdown-menu-ecggVuhu.js} +202 -199
- package/dist/{getPseudoElementBounds-D_dlkPnQ.js → getPseudoElementBounds-BOe22aYl.js} +3 -3
- package/dist/{hover-card-GELKDadU.js → hover-card-CGLPPPPP.js} +71 -70
- package/dist/{input-DZfZK6b1.js → input-DZTqcpe-.js} +1 -1
- package/dist/main.js +265 -257
- package/dist/metadata/oauth-providers.d.ts +2 -0
- package/dist/metadata/oauth-providers.d.ts.map +1 -1
- package/dist/metadata/oauth-providers.js +153 -141
- package/dist/{popover-Cne_hQUh.js → popover-CpLkQtT5.js} +129 -128
- package/dist/popupStateMapping-XiLS0Jku.js +643 -0
- package/dist/{progress-D71iUjvg.js → progress-BqG0PtAD.js} +1 -1
- package/dist/{radio-group-CTqA-p0w.js → radio-group-BpMluqfv.js} +8 -7
- package/dist/{safePolygon-os2F06tc.js → safePolygon-DmV1hDsw.js} +35 -34
- package/dist/{scroll-area-C0KbhRES.js → scroll-area-D7iOy7xj.js} +4 -3
- package/dist/{scrollEdges-CHZpP0us.js → scrollEdges-Dck9qFyQ.js} +1 -1
- package/dist/{select-RvAj5g6e.js → select-DFWNXxvZ.js} +179 -176
- package/dist/{slider-Bhn1ogwZ.js → slider-ClXWRpwI.js} +4 -3
- package/dist/{store-C-KXBzZ0.js → store-D7k1qIkZ.js} +23 -22
- package/dist/{switch-D8M0xvzp.js → switch-DlxZDt6o.js} +3 -3
- package/dist/{tabs-ttkDuwww.js → tabs-Cj3LY-7F.js} +9 -8
- package/dist/{toggle-group-CL_MBwuU.js → toggle-group-CmP4iHEJ.js} +1 -1
- package/dist/{tooltip-ZIywOFGf.js → tooltip-BUR7V5Aa.js} +197 -196
- package/dist/{ui-CttBuHXi.js → ui-46pgiw5T.js} +2 -2
- package/dist/undo-toast-Cf4T6ToX.js +898 -0
- package/dist/{useAnchoredPopupScrollLock-a2b_Frjv.js → useAnchoredPopupScrollLock-CnoPUwXv.js} +1 -1
- package/dist/{useAriaLabelledBy-WyUZP7Yf.js → useAriaLabelledBy-DJZioWd6.js} +1 -1
- package/dist/useBaseUiId-CXSJgVcI.js +8 -0
- package/dist/{useCollapsiblePanel-B6XZh6zH.js → useCollapsiblePanel-BPbcE70S.js} +15 -14
- package/dist/{useFocus-DwJfNYN6.js → useFocus-B_SrhX9q.js} +10 -10
- package/dist/{useBaseUiId-voePHgyX.js → useId-Bzr7_bed.js} +1 -6
- package/dist/{useLabelableId-CC2YaILf.js → useLabelableId-9jrDGk5d.js} +1 -1
- package/dist/useOpenChangeComplete-CVIwfcpl.js +80 -0
- package/dist/{useOpenInteractionType-DQhvPqO3.js → useOpenInteractionType-INvHftZi.js} +29 -28
- package/dist/{usePositioner-DkeyI5Le.js → usePositioner-CaLGGc-z.js} +98 -97
- package/dist/useTransitionStatus-CCIoL5RH.js +51 -0
- package/dist/{useTriggerFocusGuards-Qi8iK-AK.js → useTriggerFocusGuards-Dlv8KvSm.js} +7 -7
- package/package.json +1 -1
- package/dist/components/ui/atoms/removable-chip.d.ts.map +0 -1
- package/dist/components/ui/molecules/mcp-server-picker/category-filter-menu.d.ts +0 -31
- package/dist/components/ui/molecules/mcp-server-picker/category-filter-menu.d.ts.map +0 -1
- package/dist/components/ui/molecules/mcp-server-picker/category-filter-menu.js +0 -106
- package/dist/components/ui/molecules/mcp-server-picker/category-filter.d.ts +0 -18
- package/dist/components/ui/molecules/mcp-server-picker/category-filter.d.ts.map +0 -1
- package/dist/components/ui/molecules/mcp-server-picker/tool-search-band.d.ts +0 -12
- package/dist/components/ui/molecules/mcp-server-picker/tool-search-band.d.ts.map +0 -1
- package/dist/popupStateMapping-C8W76brO.js +0 -1221
- package/dist/useOpenChangeComplete-Bs6gnxd9.js +0 -127
- /package/dist/components/ui/{atoms → molecules}/removable-chip.d.ts +0 -0
|
@@ -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"}
|
|
@@ -1,66 +1,73 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../../../lib/utils.js";
|
|
4
|
-
import { i as t, n, r, t as i } from "../../../../tooltip-
|
|
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 };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type McpToolRecommendationsState = "on" | "off";
|
|
3
|
+
export type McpToolRecommendationsProps = {
|
|
4
|
+
state: McpToolRecommendationsState;
|
|
5
|
+
onToggle?: (checked: boolean) => void;
|
|
6
|
+
} & Omit<React.ComponentProps<"label">, "children" | "onToggle">;
|
|
7
|
+
/**
|
|
8
|
+
* Presentational Tool Recommendations opt-in for the MCP picker. The whole card
|
|
9
|
+
* is a `<label>` for the checkbox, so a click anywhere on it toggles.
|
|
10
|
+
*/
|
|
11
|
+
export declare function McpToolRecommendations({ state, onToggle, className, ...rest }: McpToolRecommendationsProps): React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=tool-recommendations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-recommendations.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/molecules/mcp-server-picker/tool-recommendations.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAKpC,MAAM,MAAM,2BAA2B,GAAG,IAAI,GAAG,KAAK,CAAC;AAEvD,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,2BAA2B,CAAC;IACnC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;AAEjE;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,2BAA2B,qBAoC7B"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../../../lib/utils.js";
|
|
4
|
-
import { t } from "../../../../checkbox-
|
|
4
|
+
import { t } from "../../../../checkbox-DB9O_Iw9.js";
|
|
5
5
|
import { useId as n } from "react";
|
|
6
6
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
|
-
//#region lib/components/ui/molecules/mcp-server-picker/tool-
|
|
7
|
+
//#region lib/components/ui/molecules/mcp-server-picker/tool-recommendations.tsx
|
|
8
8
|
function a({ state: a, onToggle: o, className: s, ...c }) {
|
|
9
9
|
let l = a === "on", u = n();
|
|
10
10
|
return /* @__PURE__ */ i("label", {
|
|
11
11
|
...c,
|
|
12
12
|
className: e("flex cursor-pointer items-start gap-3 rounded-lg border px-4 py-3 transition-colors", l ? "border-foreground/20 bg-muted/30" : "border-border/60 bg-muted/10 hover:border-foreground/25", s),
|
|
13
|
-
"data-slot": "mcp-tool-
|
|
13
|
+
"data-slot": "mcp-tool-recommendations",
|
|
14
14
|
"data-status": a,
|
|
15
15
|
htmlFor: u,
|
|
16
16
|
children: [/* @__PURE__ */ r(t, {
|
|
17
|
-
"aria-label": `
|
|
17
|
+
"aria-label": `Tool Recommendations ${l ? "on" : "off"}`,
|
|
18
18
|
checked: l,
|
|
19
19
|
className: "mt-0.5",
|
|
20
20
|
id: u,
|
|
@@ -23,7 +23,7 @@ function a({ state: a, onToggle: o, className: s, ...c }) {
|
|
|
23
23
|
className: "min-w-0",
|
|
24
24
|
children: [/* @__PURE__ */ r("p", {
|
|
25
25
|
className: "font-semibold text-[15px] text-foreground leading-5",
|
|
26
|
-
children: "
|
|
26
|
+
children: "Tool Recommendations"
|
|
27
27
|
}), /* @__PURE__ */ r("p", {
|
|
28
28
|
className: "mt-1 text-[13px] text-muted-foreground leading-snug",
|
|
29
29
|
children: "Your agent fetches only the tools relevant to each task, saving tokens and keeping responses focused."
|
|
@@ -32,4 +32,4 @@ function a({ state: a, onToggle: o, className: s, ...c }) {
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
|
-
export { a as
|
|
35
|
+
export { a as McpToolRecommendations };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconTileProps } from '../../atoms/icon-tile';
|
|
2
2
|
import { ClassProp } from 'class-variance-authority/types';
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
declare const avatarVariants: (props?: ({
|
|
5
|
-
size?: "xs" | "sm" | "lg" | "md" | null | undefined;
|
|
6
|
-
} & ClassProp) | undefined) => string;
|
|
7
4
|
export type McpToolkitAvatarProps = {
|
|
8
5
|
/** Toolkit display name — used for the letter fallback. */
|
|
9
6
|
name: string;
|
|
10
7
|
/** Toolkit ID — used to look up the brand icon. Omit to force fallback. */
|
|
11
8
|
toolkitId?: string;
|
|
12
|
-
} &
|
|
9
|
+
} & Pick<IconTileProps, "size"> & Omit<React.ComponentProps<"span">, "children">;
|
|
13
10
|
declare function McpToolkitAvatarImpl({ name, toolkitId, size, className, ...rest }: McpToolkitAvatarProps): React.JSX.Element;
|
|
14
11
|
export declare const McpToolkitAvatar: React.MemoExoticComponent<typeof McpToolkitAvatarImpl>;
|
|
15
|
-
export
|
|
12
|
+
export declare const mcpToolkitAvatarVariants: (props?: ({
|
|
13
|
+
size?: "xs" | "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
14
|
+
} & ClassProp) | undefined) => string;
|
|
15
|
+
export {};
|
|
16
16
|
//# sourceMappingURL=toolkit-avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolkit-avatar.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/molecules/mcp-server-picker/toolkit-avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"toolkit-avatar.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/molecules/mcp-server-picker/toolkit-avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,iCAAiC,CAAC;AA2BzC,MAAM,MAAM,qBAAqB,GAAG;IAClC,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,GAC7B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC;AAEjD,iBAAS,oBAAoB,CAAC,EAC5B,IAAI,EACJ,SAAS,EACT,IAAW,EACX,SAAS,EACT,GAAG,IAAI,EACR,EAAE,qBAAqB,qBA8BvB;AAED,eAAO,MAAM,gBAAgB,wDAAmC,CAAC;AACjE,eAAO,MAAM,wBAAwB;;8EAAmB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../../../lib/utils.js";
|
|
4
|
-
import { t } from "
|
|
5
|
-
import { resolveToolkitIcon as
|
|
6
|
-
import * as
|
|
7
|
-
import { jsx as
|
|
4
|
+
import { IconTile as t, iconTileVariants as n } from "../../atoms/icon-tile.js";
|
|
5
|
+
import { resolveToolkitIcon as r } from "../../../../metadata/toolkit-icons.js";
|
|
6
|
+
import * as i from "react";
|
|
7
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
8
8
|
//#region lib/components/ui/molecules/mcp-server-picker/toolkit-avatar.tsx
|
|
9
|
-
var
|
|
9
|
+
var o = [
|
|
10
10
|
"text-brand-text",
|
|
11
11
|
"text-brand-fuchsia",
|
|
12
12
|
"text-brand-red",
|
|
@@ -14,43 +14,31 @@ var a = [
|
|
|
14
14
|
"text-brand-navy",
|
|
15
15
|
"text-brand-green"
|
|
16
16
|
];
|
|
17
|
-
function
|
|
17
|
+
function s(e) {
|
|
18
18
|
let t = 0;
|
|
19
19
|
for (let n of e) t = (t * 31 + n.charCodeAt(0)) % 1000003;
|
|
20
|
-
return
|
|
20
|
+
return o[t % o.length] ?? o[0];
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
md: "size-7 rounded-md text-xs",
|
|
27
|
-
lg: "size-9 rounded-md text-sm"
|
|
28
|
-
} },
|
|
29
|
-
defaultVariants: { size: "md" }
|
|
30
|
-
}), c = {
|
|
31
|
-
xs: "size-3",
|
|
32
|
-
sm: "size-3.5",
|
|
33
|
-
md: "size-4",
|
|
34
|
-
lg: "size-5"
|
|
35
|
-
};
|
|
36
|
-
function l({ name: t, toolkitId: r, size: a = "md", className: l, ...u }) {
|
|
37
|
-
let { Icon: d, hasBrandIcon: f } = n(r), p = a ?? "md";
|
|
38
|
-
return f ? /* @__PURE__ */ i("span", {
|
|
39
|
-
...u,
|
|
22
|
+
function c({ name: n, toolkitId: i, size: o = "md", className: c, ...l }) {
|
|
23
|
+
let { Icon: u, hasBrandIcon: d } = r(i);
|
|
24
|
+
return d ? /* @__PURE__ */ a(t, {
|
|
25
|
+
...l,
|
|
40
26
|
"aria-hidden": !0,
|
|
41
|
-
className:
|
|
27
|
+
className: c,
|
|
42
28
|
"data-slot": "mcp-toolkit-avatar",
|
|
43
29
|
"data-variant": "brand",
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
30
|
+
size: o,
|
|
31
|
+
children: /* @__PURE__ */ a(u, {})
|
|
32
|
+
}) : /* @__PURE__ */ a(t, {
|
|
33
|
+
...l,
|
|
47
34
|
"aria-hidden": !0,
|
|
48
|
-
className: e(s(
|
|
35
|
+
className: e(s(n), c),
|
|
49
36
|
"data-slot": "mcp-toolkit-avatar",
|
|
50
37
|
"data-variant": "fallback",
|
|
51
|
-
|
|
38
|
+
size: o,
|
|
39
|
+
children: n.charAt(0)
|
|
52
40
|
});
|
|
53
41
|
}
|
|
54
|
-
var
|
|
42
|
+
var l = i.memo(c), u = n;
|
|
55
43
|
//#endregion
|
|
56
|
-
export {
|
|
44
|
+
export { l as McpToolkitAvatar, u as mcpToolkitAvatarVariants };
|