@arcadeai/design-system 3.29.0 → 3.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.js +95 -101
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +95 -101
- package/dist/components/ui/molecules/index.d.ts +0 -2
- package/dist/components/ui/molecules/index.d.ts.map +1 -1
- package/dist/components/ui/molecules/index.js +9 -13
- package/dist/components/ui/molecules/requirement-badges.js +4 -7
- package/dist/components/ui/molecules/toolkit-card.d.ts +14 -2
- package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/main.js +136 -142
- package/dist/{toolkit-card-BTFS_2j_.js → toolkit-card-DE-5B2dS.js} +2 -5
- package/package.json +27 -71
- package/dist/components/ui/molecules/toolkit-picker-trigger.d.ts +0 -9
- package/dist/components/ui/molecules/toolkit-picker-trigger.d.ts.map +0 -1
- package/dist/components/ui/molecules/toolkit-picker-trigger.js +0 -99
- package/dist/components/ui/molecules/toolkit-selection-summary.d.ts +0 -12
- package/dist/components/ui/molecules/toolkit-selection-summary.d.ts.map +0 -1
- package/dist/components/ui/molecules/toolkit-selection-summary.js +0 -116
- package/dist/components/ui/organisms/index.d.ts +0 -3
- package/dist/components/ui/organisms/index.d.ts.map +0 -1
- package/dist/components/ui/organisms/index.js +0 -4
- package/dist/components/ui/organisms/toolkit-picker/components/action-buttons.d.ts +0 -7
- package/dist/components/ui/organisms/toolkit-picker/components/action-buttons.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/components/action-buttons.js +0 -54
- package/dist/components/ui/organisms/toolkit-picker/components/filter-badges.d.ts +0 -2
- package/dist/components/ui/organisms/toolkit-picker/components/filter-badges.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/components/filter-badges.js +0 -89
- package/dist/components/ui/organisms/toolkit-picker/components/footer-summary.d.ts +0 -2
- package/dist/components/ui/organisms/toolkit-picker/components/footer-summary.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/components/footer-summary.js +0 -36
- package/dist/components/ui/organisms/toolkit-picker/components/search-input.d.ts +0 -2
- package/dist/components/ui/organisms/toolkit-picker/components/search-input.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +0 -70
- package/dist/components/ui/organisms/toolkit-picker/components/select-button.d.ts +0 -10
- package/dist/components/ui/organisms/toolkit-picker/components/select-button.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +0 -35
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.d.ts +0 -10
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +0 -36
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.d.ts +0 -9
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.js +0 -169
- package/dist/components/ui/organisms/toolkit-picker/components/tools-list.d.ts +0 -9
- package/dist/components/ui/organisms/toolkit-picker/components/tools-list.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/components/tools-list.js +0 -125
- package/dist/components/ui/organisms/toolkit-picker/components/unoptimized-toggle.d.ts +0 -21
- package/dist/components/ui/organisms/toolkit-picker/components/unoptimized-toggle.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/components/unoptimized-toggle.js +0 -29
- package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.d.ts +0 -8
- package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.js +0 -11
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts +0 -60
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.js +0 -326
- package/dist/components/ui/organisms/toolkit-picker/index.d.ts +0 -17
- package/dist/components/ui/organisms/toolkit-picker/index.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/index.js +0 -17
- package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts +0 -14
- package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.js +0 -896
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.d.ts +0 -3
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +0 -221
- package/dist/components/ui/organisms/toolkit-picker/utils/toolkit-grouping.d.ts +0 -51
- package/dist/components/ui/organisms/toolkit-picker/utils/toolkit-grouping.d.ts.map +0 -1
- package/dist/components/ui/organisms/toolkit-picker/utils/toolkit-grouping.js +0 -81
- package/dist/lib/arcade/arcade.d.ts +0 -76
- package/dist/lib/arcade/arcade.d.ts.map +0 -1
- package/dist/lib/arcade/arcade.js +0 -1305
- package/dist/lib/arcade/mocks.d.ts +0 -3
- package/dist/lib/arcade/mocks.d.ts.map +0 -1
- package/dist/lib/arcade/mocks.js +0 -547
- package/dist/lib/arcade/toolkit-collection.d.ts +0 -15
- package/dist/lib/arcade/toolkit-collection.d.ts.map +0 -1
- package/dist/lib/arcade/toolkit-collection.js +0 -149
- package/dist/web-sgv-FK6q.js +0 -84
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toolkit-picker.d.ts","sourceRoot":"","sources":["../../../../../lib/components/ui/organisms/toolkit-picker/toolkit-picker.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAIlD,eAAO,MAAM,mBAAmB,GAAI,OAAO,kBAAkB,4CAsN5D,CAAC"}
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { X as S, Package as z, Wrench as D } from "lucide-react";
|
|
3
|
-
import { useState as j, useRef as m } from "react";
|
|
4
|
-
import { Button as c } from "../../atoms/button.js";
|
|
5
|
-
import { Dialog as A, DialogTrigger as M, DialogContent as P, DialogHeader as R, DialogTitle as B, DialogDescription as F, DialogClose as p, DialogFooter as L } from "../../atoms/dialog.js";
|
|
6
|
-
import { Arcade as E } from "../../atoms/icons/arcade.js";
|
|
7
|
-
import { MobileTooltipProvider as X } from "../../atoms/mobile-tooltip.js";
|
|
8
|
-
import { Tabs as G, TabsList as H, TabsTrigger as h, TabsContent as x } from "../../atoms/tabs.js";
|
|
9
|
-
import { Tooltip as I, TooltipTrigger as O, TooltipContent as Q } from "../../atoms/tooltip.js";
|
|
10
|
-
import { ActionButtons as V } from "./components/action-buttons.js";
|
|
11
|
-
import { FilterBadges as W } from "./components/filter-badges.js";
|
|
12
|
-
import { FooterSummary as Y } from "./components/footer-summary.js";
|
|
13
|
-
import { SearchInput as $ } from "./components/search-input.js";
|
|
14
|
-
import { SelectButton as q } from "./components/select-button.js";
|
|
15
|
-
import { ToolkitList as J } from "./components/toolkit-list.js";
|
|
16
|
-
import { ToolsList as K } from "./components/tools-list.js";
|
|
17
|
-
import { useToolkitPicker as U } from "./hooks/use-toolkit-picker.js";
|
|
18
|
-
const Z = /Mac/i, ue = (f) => {
|
|
19
|
-
const {
|
|
20
|
-
description: g = "Select MCP servers and tools",
|
|
21
|
-
children: u,
|
|
22
|
-
selectionMode: a = "multi",
|
|
23
|
-
onSelectionChange: r
|
|
24
|
-
} = f, [b, s] = j(!1), i = m(null), o = m(null), {
|
|
25
|
-
state: {
|
|
26
|
-
selectedToolkits: v,
|
|
27
|
-
selectedTools: n,
|
|
28
|
-
activeTab: k,
|
|
29
|
-
filteredToolkits: N,
|
|
30
|
-
filteredTools: w
|
|
31
|
-
},
|
|
32
|
-
setActiveTab: d,
|
|
33
|
-
clearSearchQuery: y,
|
|
34
|
-
commitSelections: T,
|
|
35
|
-
restoreCommittedState: C
|
|
36
|
-
} = U(), _ = () => {
|
|
37
|
-
T(), r && r({
|
|
38
|
-
selectedToolkits: Array.from(v.keys()),
|
|
39
|
-
selectedTools: Array.from(n.keys())
|
|
40
|
-
}), s(!1);
|
|
41
|
-
};
|
|
42
|
-
return /* @__PURE__ */ e(X, { children: /* @__PURE__ */ t(
|
|
43
|
-
A,
|
|
44
|
-
{
|
|
45
|
-
onOpenChange: (l) => {
|
|
46
|
-
s(l), l && (C(), y(), d("toolkits"));
|
|
47
|
-
},
|
|
48
|
-
open: b,
|
|
49
|
-
children: [
|
|
50
|
-
/* @__PURE__ */ e(M, { asChild: !0, children: u }),
|
|
51
|
-
/* @__PURE__ */ t(
|
|
52
|
-
P,
|
|
53
|
-
{
|
|
54
|
-
className: "flex max-h-[80vh] min-h-80 w-[95vw] max-w-xl flex-col gap-2 p-0 sm:max-w-2xl md:max-w-3xl lg:max-w-4xl xl:max-w-5xl 2xl:max-w-7xl",
|
|
55
|
-
"data-testid": "toolkit-picker-dialog",
|
|
56
|
-
showCloseButton: !1,
|
|
57
|
-
children: [
|
|
58
|
-
/* @__PURE__ */ t(R, { className: "shrink-0 p-4 pb-0 sm:p-6 sm:pb-0", children: [
|
|
59
|
-
/* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
60
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
61
|
-
/* @__PURE__ */ t("div", { className: "relative flex size-10 items-center justify-center overflow-hidden rounded-xl shadow-lg ring-1 ring-black/5 sm:size-12", children: [
|
|
62
|
-
/* @__PURE__ */ e(
|
|
63
|
-
"span",
|
|
64
|
-
{
|
|
65
|
-
"aria-hidden": !0,
|
|
66
|
-
className: "pointer-events-none absolute inset-0 z-0 rounded-xl bg-[radial-gradient(at_15%_20%,rgba(249,115,22,0.9),transparent_45%),radial-gradient(at_10%_85%,rgba(14,165,233,0.9),transparent_45%),radial-gradient(at_95%_25%,rgba(236,72,153,0.9),transparent_40%),linear-gradient(135deg,rgba(14,165,233,0.6)_0%,rgba(236,72,153,0.6)_50%,rgba(249,115,22,0.6)_100%)]"
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
"span",
|
|
71
|
-
{
|
|
72
|
-
"aria-hidden": !0,
|
|
73
|
-
className: "pointer-events-none absolute inset-0 z-10 bg-[repeating-conic-gradient(from_0deg_at_100%_0%,rgba(0,0,0,0.25)_0deg_1deg,transparent_1deg_12deg)] opacity-30"
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
/* @__PURE__ */ e("span", { className: "relative z-20", children: /* @__PURE__ */ e(E, { className: "size-5 sm:size-7" }) })
|
|
77
|
-
] }),
|
|
78
|
-
/* @__PURE__ */ t("div", { className: "ml-1 text-left", children: [
|
|
79
|
-
/* @__PURE__ */ e(B, { className: "font-bold text-lg sm:text-xl", children: "Choose Your Tools" }),
|
|
80
|
-
/* @__PURE__ */ e(F, { className: "hidden sm:block", children: g })
|
|
81
|
-
] })
|
|
82
|
-
] }),
|
|
83
|
-
/* @__PURE__ */ e(p, { asChild: !0, children: /* @__PURE__ */ e(
|
|
84
|
-
c,
|
|
85
|
-
{
|
|
86
|
-
className: "h-8 w-8 rounded-full p-0",
|
|
87
|
-
"data-testid": "toolkit-picker-close",
|
|
88
|
-
size: "sm",
|
|
89
|
-
variant: "ghost",
|
|
90
|
-
children: /* @__PURE__ */ e(S, { className: "h-4 w-4" })
|
|
91
|
-
}
|
|
92
|
-
) })
|
|
93
|
-
] }),
|
|
94
|
-
/* @__PURE__ */ e("div", { className: "mb-2 space-y-2 pt-2 sm:space-y-4 sm:pt-4", children: /* @__PURE__ */ e($, {}) })
|
|
95
|
-
] }),
|
|
96
|
-
/* @__PURE__ */ t(
|
|
97
|
-
G,
|
|
98
|
-
{
|
|
99
|
-
className: "flex min-h-0 flex-1 flex-col gap-0.5",
|
|
100
|
-
onValueChange: (l) => d(l),
|
|
101
|
-
value: k,
|
|
102
|
-
children: [
|
|
103
|
-
/* @__PURE__ */ t("div", { className: "shrink-0 space-y-2 px-4 sm:space-y-3 sm:px-6", children: [
|
|
104
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
105
|
-
/* @__PURE__ */ t(H, { className: "h-10 w-auto gap-1 rounded-md border border-neutral-200 bg-white/60 p-1 shadow-sm dark:border-neutral-800 dark:bg-neutral-900/60", children: [
|
|
106
|
-
/* @__PURE__ */ t(
|
|
107
|
-
h,
|
|
108
|
-
{
|
|
109
|
-
className: "h-8 rounded-md px-3 font-medium text-neutral-600 text-sm hover:bg-black/5 data-[state=active]:bg-white data-[state=active]:text-neutral-900 dark:text-neutral-300 dark:data-[state=active]:bg-neutral-800 dark:data-[state=active]:text-white dark:hover:bg-white/10",
|
|
110
|
-
"data-testid": "toolkits-tab",
|
|
111
|
-
value: "toolkits",
|
|
112
|
-
children: [
|
|
113
|
-
/* @__PURE__ */ e(z, { className: "h-4 w-4" }),
|
|
114
|
-
/* @__PURE__ */ e("span", { children: "MCP Servers" }),
|
|
115
|
-
/* @__PURE__ */ e("span", { className: "ml-1 rounded-full bg-emerald-300 px-1.5 py-0.5 text-emerald-900 text-xs dark:bg-emerald-500/25 dark:text-emerald-200", children: N.size })
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
),
|
|
119
|
-
/* @__PURE__ */ t(
|
|
120
|
-
h,
|
|
121
|
-
{
|
|
122
|
-
className: "h-8 rounded-md px-3 font-medium text-neutral-600 text-sm hover:bg-black/5 data-[state=active]:bg-white data-[state=active]:text-neutral-900 dark:text-neutral-300 dark:data-[state=active]:bg-neutral-800 dark:data-[state=active]:text-white dark:hover:bg-white/10",
|
|
123
|
-
"data-testid": "tools-tab",
|
|
124
|
-
value: "tools",
|
|
125
|
-
children: [
|
|
126
|
-
/* @__PURE__ */ e(D, { className: "h-4 w-4" }),
|
|
127
|
-
/* @__PURE__ */ e("span", { children: "Tools" }),
|
|
128
|
-
/* @__PURE__ */ e("span", { className: "ml-1 rounded-full bg-emerald-300 px-1.5 py-0.5 text-emerald-900 text-xs dark:bg-emerald-500/25 dark:text-emerald-200", children: w.size })
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
] }),
|
|
133
|
-
/* @__PURE__ */ e(V, { selectionMode: a })
|
|
134
|
-
] }),
|
|
135
|
-
/* @__PURE__ */ e(W, {})
|
|
136
|
-
] }),
|
|
137
|
-
/* @__PURE__ */ e(
|
|
138
|
-
x,
|
|
139
|
-
{
|
|
140
|
-
className: "min-h-0 flex-1 overflow-y-auto px-4 py-2 sm:px-6",
|
|
141
|
-
"data-testid": "content-area",
|
|
142
|
-
ref: i,
|
|
143
|
-
value: "toolkits",
|
|
144
|
-
children: /* @__PURE__ */ e(
|
|
145
|
-
J,
|
|
146
|
-
{
|
|
147
|
-
scrollContainerRef: i,
|
|
148
|
-
selectionMode: a
|
|
149
|
-
}
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
),
|
|
153
|
-
/* @__PURE__ */ e(
|
|
154
|
-
x,
|
|
155
|
-
{
|
|
156
|
-
className: "min-h-0 flex-1 overflow-y-auto px-4 py-2 sm:px-6",
|
|
157
|
-
"data-testid": "content-area",
|
|
158
|
-
ref: o,
|
|
159
|
-
value: "tools",
|
|
160
|
-
children: /* @__PURE__ */ e(
|
|
161
|
-
K,
|
|
162
|
-
{
|
|
163
|
-
scrollContainerRef: o,
|
|
164
|
-
selectionMode: a
|
|
165
|
-
}
|
|
166
|
-
)
|
|
167
|
-
}
|
|
168
|
-
)
|
|
169
|
-
]
|
|
170
|
-
}
|
|
171
|
-
),
|
|
172
|
-
/* @__PURE__ */ e(L, { className: "shrink-0 border-t bg-white px-4 py-3 sm:px-6 sm:py-4 dark:bg-neutral-950", children: /* @__PURE__ */ t(
|
|
173
|
-
"div",
|
|
174
|
-
{
|
|
175
|
-
className: `${a === "single" ? "sm:justify-end" : "sm:justify-between"} flex w-full flex-col gap-3 sm:flex-row sm:items-center`,
|
|
176
|
-
children: [
|
|
177
|
-
a === "multi" && /* @__PURE__ */ e(Y, {}),
|
|
178
|
-
/* @__PURE__ */ t("div", { className: "mt-2 flex gap-2 sm:mt-0 sm:gap-2", children: [
|
|
179
|
-
/* @__PURE__ */ e(p, { asChild: !0, children: /* @__PURE__ */ e(
|
|
180
|
-
c,
|
|
181
|
-
{
|
|
182
|
-
className: "flex-1 sm:flex-none",
|
|
183
|
-
"data-testid": "cancel-button",
|
|
184
|
-
size: "sm",
|
|
185
|
-
variant: "outline",
|
|
186
|
-
children: "Cancel"
|
|
187
|
-
}
|
|
188
|
-
) }),
|
|
189
|
-
/* @__PURE__ */ t(I, { delayDuration: 350, children: [
|
|
190
|
-
/* @__PURE__ */ e(O, { asChild: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
191
|
-
q,
|
|
192
|
-
{
|
|
193
|
-
className: "flex-1 sm:flex-none",
|
|
194
|
-
onCommit: _,
|
|
195
|
-
selectedCount: n.size,
|
|
196
|
-
selectionMode: a
|
|
197
|
-
}
|
|
198
|
-
) }) }),
|
|
199
|
-
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
200
|
-
/* @__PURE__ */ e("span", { children: "Submit selection" }),
|
|
201
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: [
|
|
202
|
-
/* @__PURE__ */ e("kbd", { className: "inline-flex h-4 items-center rounded border bg-muted px-1 font-mono text-[10px]", children: typeof window < "u" && Z.test(navigator.userAgent) ? "⌘" : "Ctrl" }),
|
|
203
|
-
/* @__PURE__ */ e("span", { className: "text-xs", children: "+" }),
|
|
204
|
-
/* @__PURE__ */ e("kbd", { className: "inline-flex h-4 items-center rounded border bg-muted px-1 font-mono text-[10px]", children: "↵" })
|
|
205
|
-
] })
|
|
206
|
-
] }) })
|
|
207
|
-
] })
|
|
208
|
-
] })
|
|
209
|
-
]
|
|
210
|
-
}
|
|
211
|
-
) })
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
)
|
|
215
|
-
]
|
|
216
|
-
}
|
|
217
|
-
) });
|
|
218
|
-
};
|
|
219
|
-
export {
|
|
220
|
-
ue as ToolkitPickerDialog
|
|
221
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ProcessedToolkit } from '../../../../../lib/arcade/arcade';
|
|
2
|
-
/**
|
|
3
|
-
* A ToolkitGroup represents a primary toolkit and its associated unoptimized/starter toolkit.
|
|
4
|
-
*
|
|
5
|
-
* For example, "Gmail" (primary) may be grouped with "GmailApi" (starter/unoptimized).
|
|
6
|
-
* For now, unoptimized toolkits are always shown. In the future, they will not be.
|
|
7
|
-
* When the unoptimized toolkits toggle is off, only primary tools are shown.
|
|
8
|
-
* When on, both primary and unoptimized/starter tools are included.
|
|
9
|
-
*/
|
|
10
|
-
export type ToolkitGroup = {
|
|
11
|
-
/** The primary (non-starter) toolkit, or the starter toolkit if no primary exists */
|
|
12
|
-
primary: ProcessedToolkit;
|
|
13
|
-
/** Associated unoptimized/starter toolkit (null if none) */
|
|
14
|
-
starterToolkit: ProcessedToolkit | null;
|
|
15
|
-
/** True if this group has no primary toolkit (starter-only) */
|
|
16
|
-
isStarterOnly: boolean;
|
|
17
|
-
/** Display name for the group (uses primary toolkit name) */
|
|
18
|
-
displayName: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Check if a toolkit is an unoptimized/starter toolkit based on metadata type
|
|
22
|
-
*/
|
|
23
|
-
export declare const isStarterToolkit: (toolkit: ProcessedToolkit) => boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Group toolkits into ToolkitGroups by pairing primary toolkits with their starter counterpart.
|
|
26
|
-
*
|
|
27
|
-
* Strategy:
|
|
28
|
-
* 1. Identify all starter toolkits and try to match them to a primary
|
|
29
|
-
* 2. Group matched starter with its primary
|
|
30
|
-
* 3. Standalone starters (no matching primary) become their own starter-only groups
|
|
31
|
-
* 4. Primary toolkits without starters become groups with null starterToolkit
|
|
32
|
-
*
|
|
33
|
-
* Ordering: Groups are returned with primary toolkits first (in input order),
|
|
34
|
-
* followed by any unmatched starter-only groups (in input order).
|
|
35
|
-
*/
|
|
36
|
-
export declare function groupToolkits(toolkits: ProcessedToolkit[]): ToolkitGroup[];
|
|
37
|
-
/**
|
|
38
|
-
* Get the tool count for a toolkit group.
|
|
39
|
-
* If includeStarter is true, includes tool count from the starter toolkit.
|
|
40
|
-
*/
|
|
41
|
-
export declare function getGroupToolCount(group: ToolkitGroup, includeStarter: boolean): number;
|
|
42
|
-
/**
|
|
43
|
-
* Check if a toolkit group has any selected tools.
|
|
44
|
-
* When includeStarter is false, only checks primary toolkit tools.
|
|
45
|
-
*/
|
|
46
|
-
export declare function hasSelectedToolsInGroup(group: ToolkitGroup, selectedTools: Set<string>, includeStarter?: boolean): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Count selected tools in a group.
|
|
49
|
-
*/
|
|
50
|
-
export declare function countSelectedToolsInGroup(group: ToolkitGroup, selectedTools: Set<string>, includeStarter: boolean): number;
|
|
51
|
-
//# sourceMappingURL=toolkit-grouping.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toolkit-grouping.d.ts","sourceRoot":"","sources":["../../../../../../lib/components/ui/organisms/toolkit-picker/utils/toolkit-grouping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,qFAAqF;IACrF,OAAO,EAAE,gBAAgB,CAAC;IAC1B,4DAA4D;IAC5D,cAAc,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACxC,+DAA+D;IAC/D,aAAa,EAAE,OAAO,CAAC;IACvB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,gBAAgB,KAAG,OAChB,CAAC;AAuE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,YAAY,EAAE,CAyD1E;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,YAAY,EACnB,cAAc,EAAE,OAAO,GACtB,MAAM,CAWR;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,YAAY,EACnB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,EAC1B,cAAc,UAAO,GACpB,OAAO,CAuBT;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,YAAY,EACnB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,EAC1B,cAAc,EAAE,OAAO,GACtB,MAAM,CAqBR"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
const l = (t) => t.metadata?.type === "arcade_starter", f = /^(.+?)api$/i, u = /[A-Z][a-z]*$/;
|
|
2
|
-
function m(t) {
|
|
3
|
-
const e = t.match(f);
|
|
4
|
-
return e ? e[1] : null;
|
|
5
|
-
}
|
|
6
|
-
function c(t, e) {
|
|
7
|
-
const o = m(t.name);
|
|
8
|
-
if (!o)
|
|
9
|
-
return null;
|
|
10
|
-
const n = o.toLowerCase(), s = e.find(
|
|
11
|
-
(a) => !l(a) && a.name.toLowerCase() === n
|
|
12
|
-
) ?? null;
|
|
13
|
-
if (s)
|
|
14
|
-
return s;
|
|
15
|
-
const i = o.replace(u, "");
|
|
16
|
-
if (!i || i === o)
|
|
17
|
-
return null;
|
|
18
|
-
const r = i.toLowerCase();
|
|
19
|
-
return e.find(
|
|
20
|
-
(a) => !l(a) && a.name.toLowerCase() === r
|
|
21
|
-
) ?? null;
|
|
22
|
-
}
|
|
23
|
-
function y(t) {
|
|
24
|
-
const e = [], o = [];
|
|
25
|
-
for (const r of t)
|
|
26
|
-
l(r) ? e.push(r) : o.push(r);
|
|
27
|
-
const n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
|
|
28
|
-
for (const r of o)
|
|
29
|
-
n.set(r.name, null);
|
|
30
|
-
for (const r of e) {
|
|
31
|
-
const a = c(r, o);
|
|
32
|
-
a && !n.get(a.name) && (n.set(a.name, r), s.add(r.name));
|
|
33
|
-
}
|
|
34
|
-
const i = [];
|
|
35
|
-
for (const r of o) {
|
|
36
|
-
const a = n.get(r.name) ?? null;
|
|
37
|
-
i.push({
|
|
38
|
-
primary: r,
|
|
39
|
-
starterToolkit: a,
|
|
40
|
-
isStarterOnly: !1,
|
|
41
|
-
displayName: r.name
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
for (const r of e)
|
|
45
|
-
s.has(r.name) || i.push({
|
|
46
|
-
primary: r,
|
|
47
|
-
starterToolkit: null,
|
|
48
|
-
isStarterOnly: !0,
|
|
49
|
-
displayName: r.name
|
|
50
|
-
});
|
|
51
|
-
return i;
|
|
52
|
-
}
|
|
53
|
-
function p(t, e) {
|
|
54
|
-
if (!e && t.isStarterOnly)
|
|
55
|
-
return 0;
|
|
56
|
-
let o = t.primary.tools.length;
|
|
57
|
-
return e && t.starterToolkit && (o += t.starterToolkit.tools.length), o;
|
|
58
|
-
}
|
|
59
|
-
function h(t, e, o = !0) {
|
|
60
|
-
return !o && t.isStarterOnly ? !1 : !!(t.primary.tools.some((n) => e.has(n.fully_qualified_name)) || o && t.starterToolkit && t.starterToolkit.tools.some(
|
|
61
|
-
(n) => e.has(n.fully_qualified_name)
|
|
62
|
-
));
|
|
63
|
-
}
|
|
64
|
-
function d(t, e, o) {
|
|
65
|
-
if (!o && t.isStarterOnly)
|
|
66
|
-
return 0;
|
|
67
|
-
let n = 0;
|
|
68
|
-
for (const s of t.primary.tools)
|
|
69
|
-
e.has(s.fully_qualified_name) && (n += 1);
|
|
70
|
-
if (o && t.starterToolkit)
|
|
71
|
-
for (const s of t.starterToolkit.tools)
|
|
72
|
-
e.has(s.fully_qualified_name) && (n += 1);
|
|
73
|
-
return n;
|
|
74
|
-
}
|
|
75
|
-
export {
|
|
76
|
-
d as countSelectedToolsInGroup,
|
|
77
|
-
p as getGroupToolCount,
|
|
78
|
-
y as groupToolkits,
|
|
79
|
-
h as hasSelectedToolsInGroup,
|
|
80
|
-
l as isStarterToolkit
|
|
81
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { Arcade, ClientOptions } from '@arcadeai/arcadejs';
|
|
2
|
-
import { ToolDefinition } from '@arcadeai/arcadejs/resources/index.mjs';
|
|
3
|
-
import { Toolkit as ToolkitMetadata } from '../../metadata/types';
|
|
4
|
-
export type Toolkit = ToolDefinition.Toolkit & {
|
|
5
|
-
tools: ToolDefinition[];
|
|
6
|
-
requirements: {
|
|
7
|
-
met: boolean;
|
|
8
|
-
secrets?: Arcade.Tools.ToolDefinition.Requirements.Secret[];
|
|
9
|
-
authorization?: Arcade.Tools.ToolDefinition.Requirements.Authorization[];
|
|
10
|
-
scopes?: Record<string, string[]>;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export type ProcessedToolkit = Toolkit & {
|
|
14
|
-
searchableText: string;
|
|
15
|
-
requirementsSummary: {
|
|
16
|
-
secrets?: {
|
|
17
|
-
configured: string[];
|
|
18
|
-
pending: string[];
|
|
19
|
-
};
|
|
20
|
-
oauth?: {
|
|
21
|
-
providers: Array<{
|
|
22
|
-
id: string;
|
|
23
|
-
status: "active" | "inactive";
|
|
24
|
-
scopes: string[];
|
|
25
|
-
}>;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
metadata?: ToolkitMetadata;
|
|
29
|
-
};
|
|
30
|
-
export type ProcessedTool = ToolDefinition & {
|
|
31
|
-
searchableText: string;
|
|
32
|
-
};
|
|
33
|
-
export type ToolkitCollection = {
|
|
34
|
-
toolkits: ProcessedToolkit[];
|
|
35
|
-
tools: ProcessedTool[];
|
|
36
|
-
toolkitMap: Map<string, ProcessedToolkit>;
|
|
37
|
-
toolToToolkitMap: Map<string, string>;
|
|
38
|
-
searchIndex: {
|
|
39
|
-
toolkitsByName: Map<string, ProcessedToolkit>;
|
|
40
|
-
toolsByName: Map<string, ProcessedTool>;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
type ArcadeConfig = {
|
|
44
|
-
/**
|
|
45
|
-
* A unique identifier for your app or organization, used to authenticate and track requests.
|
|
46
|
-
*/
|
|
47
|
-
arcadeClientId?: string;
|
|
48
|
-
/**
|
|
49
|
-
* The base URL for the Arcade API.
|
|
50
|
-
*/
|
|
51
|
-
baseURL?: string;
|
|
52
|
-
/**
|
|
53
|
-
* The API key for the Arcade API.
|
|
54
|
-
*/
|
|
55
|
-
apiKey?: string;
|
|
56
|
-
/**
|
|
57
|
-
* The access token for the Arcade API.
|
|
58
|
-
*/
|
|
59
|
-
accessToken?: string;
|
|
60
|
-
} & ClientOptions;
|
|
61
|
-
export type GetToolsProps = {
|
|
62
|
-
limit?: number;
|
|
63
|
-
offset?: number;
|
|
64
|
-
toolkit?: string;
|
|
65
|
-
};
|
|
66
|
-
export declare class ArcadeClient extends Arcade {
|
|
67
|
-
constructor(config: ArcadeConfig);
|
|
68
|
-
static create(config: ArcadeConfig): Arcade;
|
|
69
|
-
getAllTools(props?: GetToolsProps): Promise<ToolDefinition[]>;
|
|
70
|
-
groupToolsBy(groupKey: keyof ToolDefinition): Promise<Map<string, ToolDefinition>>;
|
|
71
|
-
getToolkits(): Promise<Map<string, Toolkit>>;
|
|
72
|
-
getToolsForToolkit(toolkit: string): Promise<ToolDefinition[]>;
|
|
73
|
-
getProcessedToolkitCollection(): Promise<ToolkitCollection>;
|
|
74
|
-
}
|
|
75
|
-
export {};
|
|
76
|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