@arcadeai/design-system 3.27.5 → 3.27.7
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/icons/attio.js +10 -0
- package/dist/assets/icons/claude.js +10 -0
- package/dist/assets/icons/cline.js +10 -0
- package/dist/assets/icons/cursor-install-dark.js +12 -0
- package/dist/assets/icons/cursor-install-light.js +12 -0
- package/dist/assets/icons/gemini.js +12 -0
- package/dist/assets/icons/goose.js +13 -0
- package/dist/assets/icons/openai.js +10 -0
- package/dist/assets/icons/vscode.js +12 -0
- package/dist/assets/icons/windsurf.js +10 -0
- package/dist/components/index.js +416 -396
- package/dist/components/ui/atoms/checkbox.d.ts.map +1 -1
- package/dist/components/ui/atoms/checkbox.js +100 -100
- package/dist/components/ui/atoms/icons/attio.d.ts +4 -0
- package/dist/components/ui/atoms/icons/attio.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/attio.js +27 -0
- package/dist/components/ui/atoms/icons/claude.d.ts +4 -0
- package/dist/components/ui/atoms/icons/claude.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/claude.js +27 -0
- package/dist/components/ui/atoms/icons/cline.d.ts +4 -0
- package/dist/components/ui/atoms/icons/cline.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/cline.js +23 -0
- package/dist/components/ui/atoms/icons/cursor-install-dark.d.ts +4 -0
- package/dist/components/ui/atoms/icons/cursor-install-dark.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/cursor-install-dark.js +79 -0
- package/dist/components/ui/atoms/icons/cursor-install-light.d.ts +4 -0
- package/dist/components/ui/atoms/icons/cursor-install-light.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/cursor-install-light.js +79 -0
- package/dist/components/ui/atoms/icons/gemini.d.ts +4 -0
- package/dist/components/ui/atoms/icons/gemini.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/gemini.js +234 -0
- package/dist/components/ui/atoms/icons/goose.d.ts +4 -0
- package/dist/components/ui/atoms/icons/goose.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/goose.js +22 -0
- package/dist/components/ui/atoms/icons/index.d.ts +10 -0
- package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/index.js +256 -236
- package/dist/components/ui/atoms/icons/openai.d.ts +4 -0
- package/dist/components/ui/atoms/icons/openai.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/openai.js +26 -0
- package/dist/components/ui/atoms/icons/vscode.d.ts +4 -0
- package/dist/components/ui/atoms/icons/vscode.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/vscode.js +187 -0
- package/dist/components/ui/atoms/icons/windsurf.d.ts +4 -0
- package/dist/components/ui/atoms/icons/windsurf.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/windsurf.js +26 -0
- package/dist/components/ui/atoms/index.js +399 -379
- package/dist/components/ui/index.js +416 -396
- package/dist/components/ui/molecules/index.js +1 -1
- package/dist/components/ui/molecules/requirement-badges.d.ts +6 -3
- package/dist/components/ui/molecules/requirement-badges.d.ts.map +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +1 -1
- package/dist/components/ui/molecules/tool-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/tool-card.js +55 -54
- package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/toolkit-picker-trigger.js +34 -34
- package/dist/components/ui/molecules/toolkit-selection-summary.d.ts.map +1 -1
- package/dist/components/ui/molecules/toolkit-selection-summary.js +5 -5
- package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +1 -1
- package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +1 -1
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +1 -1
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.d.ts.map +1 -1
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.js +101 -74
- package/dist/components/ui/organisms/toolkit-picker/components/tools-list.d.ts.map +1 -1
- package/dist/components/ui/organisms/toolkit-picker/components/tools-list.js +74 -50
- package/dist/components/ui/organisms/toolkit-picker/components/unoptimized-toggle.d.ts +21 -0
- package/dist/components/ui/organisms/toolkit-picker/components/unoptimized-toggle.d.ts.map +1 -0
- package/dist/components/ui/organisms/toolkit-picker/components/unoptimized-toggle.js +29 -0
- package/dist/components/ui/organisms/toolkit-picker/hooks/featured-toolkits.d.ts +1 -1
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts +8 -0
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.d.ts.map +1 -1
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker.js +120 -51
- package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.d.ts.map +1 -1
- package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.js +55 -24
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.js +20 -20
- package/dist/hooks/use-is-truncated.d.ts +13 -0
- package/dist/hooks/use-is-truncated.d.ts.map +1 -0
- package/dist/hooks/use-is-truncated.js +20 -0
- package/dist/lib/arcade/arcade.d.ts +0 -24
- package/dist/lib/arcade/arcade.d.ts.map +1 -1
- package/dist/lib/arcade/arcade.js +258 -421
- package/dist/lib/arcade/toolkit-collection.d.ts +15 -0
- package/dist/lib/arcade/toolkit-collection.d.ts.map +1 -0
- package/dist/lib/arcade/toolkit-collection.js +149 -0
- package/dist/main.js +455 -435
- 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 +84 -72
- package/dist/metadata/toolkits.js +7 -7
- package/dist/metadata/utils.d.ts +4 -7
- package/dist/metadata/utils.d.ts.map +1 -1
- package/dist/metadata/utils.js +16 -13
- package/dist/{toolkit-card-D6Dqff6p.js → toolkit-card-Cmp_yG03.js} +115 -110
- package/package.json +34 -23
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ToolDefinition } from '@arcadeai/arcadejs/resources/index.mjs';
|
|
2
|
+
import { Toolkit, ToolkitCollection } from './arcade';
|
|
3
|
+
/**
|
|
4
|
+
* Helper function to create normalized searchable text from multiple strings.
|
|
5
|
+
* Separates compound terms (like Gmail.List_emails) into individual searchable components.
|
|
6
|
+
* Handles camelCase, snake_case, kebab-case, and dot.notation.
|
|
7
|
+
*/
|
|
8
|
+
export declare const normalizeText: (parts: string[]) => string;
|
|
9
|
+
export declare const groupToolsIntoToolkits: (tools: ToolDefinition[]) => Map<string, Toolkit>;
|
|
10
|
+
/**
|
|
11
|
+
* Build a ToolkitCollection from pre-fetched tools data without making an API call.
|
|
12
|
+
* Groups tools by toolkit and creates pre-computed search indices.
|
|
13
|
+
*/
|
|
14
|
+
export declare const buildToolkitCollection: (rawTools: ToolDefinition[]) => ToolkitCollection;
|
|
15
|
+
//# sourceMappingURL=toolkit-collection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolkit-collection.d.ts","sourceRoot":"","sources":["../../../lib/lib/arcade/toolkit-collection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAE7E,OAAO,KAAK,EAGV,OAAO,EACP,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAOlB;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,WA6B5C,CAAC;AA2GF,eAAO,MAAM,sBAAsB,GACjC,OAAO,cAAc,EAAE,KACtB,GAAG,CAAC,MAAM,EAAE,OAAO,CA6BrB,CAAC;AA+BF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,cAAc,EAAE,KACzB,iBA2DF,CAAC"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { findToolkitByName as h } from "../../metadata/utils.js";
|
|
2
|
+
const _ = /[._\-\s]+/, k = /([a-z])([A-Z])/g, g = /\s+/, p = (t) => {
|
|
3
|
+
const s = /* @__PURE__ */ new Set();
|
|
4
|
+
for (const o of t) {
|
|
5
|
+
if (!o)
|
|
6
|
+
continue;
|
|
7
|
+
const e = o.toLowerCase();
|
|
8
|
+
s.add(e);
|
|
9
|
+
const r = o.split(_);
|
|
10
|
+
for (const n of r) {
|
|
11
|
+
if (n.length <= 1)
|
|
12
|
+
continue;
|
|
13
|
+
const m = n.replace(k, "$1 $2").split(g);
|
|
14
|
+
for (const a of m)
|
|
15
|
+
a.length > 1 && s.add(a.toLowerCase());
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return Array.from(s).join(" ");
|
|
19
|
+
}, T = (t = [], s = []) => {
|
|
20
|
+
if (t.length === 0)
|
|
21
|
+
return s;
|
|
22
|
+
const o = /* @__PURE__ */ new Map();
|
|
23
|
+
for (const e of s)
|
|
24
|
+
o.set(e.key, { ...e });
|
|
25
|
+
for (const e of t) {
|
|
26
|
+
const r = o.get(e.key);
|
|
27
|
+
if (!r) {
|
|
28
|
+
o.set(e.key, { ...e });
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const n = !!(r.met || e.met), i = e.status_reason ?? r.status_reason;
|
|
32
|
+
o.set(e.key, { key: e.key, met: n, status_reason: i });
|
|
33
|
+
}
|
|
34
|
+
return Array.from(o.values());
|
|
35
|
+
}, v = (t, s = []) => {
|
|
36
|
+
if (!t?.provider_id)
|
|
37
|
+
return s;
|
|
38
|
+
const o = new Map(s.map((n) => [n.provider_id, { ...n }])), e = o.get(t.provider_id);
|
|
39
|
+
if (!e)
|
|
40
|
+
return o.set(t.provider_id, { ...t }), Array.from(o.values());
|
|
41
|
+
const r = new Set(e.oauth2?.scopes ?? []);
|
|
42
|
+
for (const n of t.oauth2?.scopes ?? [])
|
|
43
|
+
r.add(n);
|
|
44
|
+
return o.set(t.provider_id, {
|
|
45
|
+
...e,
|
|
46
|
+
oauth2: {
|
|
47
|
+
...e.oauth2 ?? {},
|
|
48
|
+
scopes: Array.from(r)
|
|
49
|
+
}
|
|
50
|
+
}), Array.from(o.values());
|
|
51
|
+
}, E = (t, s = [], o = {}) => {
|
|
52
|
+
if (!t || s.length === 0)
|
|
53
|
+
return o;
|
|
54
|
+
const e = new Set(o[t] ?? []);
|
|
55
|
+
for (const r of s)
|
|
56
|
+
e.add(r);
|
|
57
|
+
return { ...o, [t]: Array.from(e) };
|
|
58
|
+
}, z = (t, s) => {
|
|
59
|
+
if (!s)
|
|
60
|
+
return;
|
|
61
|
+
t.requirements.secrets = T(
|
|
62
|
+
s.secrets ?? [],
|
|
63
|
+
t.requirements.secrets ?? []
|
|
64
|
+
), t.requirements.authorization = v(
|
|
65
|
+
s.authorization,
|
|
66
|
+
t.requirements.authorization ?? []
|
|
67
|
+
);
|
|
68
|
+
const o = s.authorization?.provider_id, e = s.authorization?.oauth2?.scopes ?? [];
|
|
69
|
+
o && e.length && (t.requirements.scopes = E(
|
|
70
|
+
o,
|
|
71
|
+
e,
|
|
72
|
+
t.requirements.scopes ?? {}
|
|
73
|
+
)), t.requirements.met = !!(t.requirements.met && (s.met ?? !0));
|
|
74
|
+
}, M = (t) => {
|
|
75
|
+
const s = /* @__PURE__ */ new Map();
|
|
76
|
+
for (const o of t) {
|
|
77
|
+
const e = o.toolkit.name;
|
|
78
|
+
let r = s.get(e);
|
|
79
|
+
r || (r = {
|
|
80
|
+
...o.toolkit,
|
|
81
|
+
tools: [],
|
|
82
|
+
requirements: {
|
|
83
|
+
met: !0,
|
|
84
|
+
secrets: [],
|
|
85
|
+
authorization: [],
|
|
86
|
+
scopes: {}
|
|
87
|
+
}
|
|
88
|
+
}, s.set(e, r)), r.tools.push(o), o.requirements && z(r, o.requirements);
|
|
89
|
+
}
|
|
90
|
+
return s;
|
|
91
|
+
}, S = (t) => {
|
|
92
|
+
const s = t?.secrets?.length ? {
|
|
93
|
+
configured: t.secrets.filter((e) => e.met === !0).map((e) => e.key),
|
|
94
|
+
pending: t.secrets.filter((e) => e.met === !1).map((e) => e.key)
|
|
95
|
+
} : void 0, o = t?.authorization?.length ? {
|
|
96
|
+
providers: t.authorization.filter((e) => e.provider_id || e.id).map((e) => ({
|
|
97
|
+
id: e.provider_id || e.id || "",
|
|
98
|
+
status: e.status,
|
|
99
|
+
scopes: e.oauth2?.scopes || []
|
|
100
|
+
}))
|
|
101
|
+
} : void 0;
|
|
102
|
+
return { secrets: s, oauth: o };
|
|
103
|
+
}, q = (t) => {
|
|
104
|
+
const s = M(t), o = [], e = [], r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), i = {
|
|
105
|
+
toolkitsByName: /* @__PURE__ */ new Map(),
|
|
106
|
+
toolsByName: /* @__PURE__ */ new Map()
|
|
107
|
+
};
|
|
108
|
+
for (const [m, a] of s.entries()) {
|
|
109
|
+
const f = p([
|
|
110
|
+
a.name,
|
|
111
|
+
a.description ?? "",
|
|
112
|
+
a.version ?? ""
|
|
113
|
+
]), d = S(a.requirements), u = {
|
|
114
|
+
...a,
|
|
115
|
+
searchableText: f,
|
|
116
|
+
requirementsSummary: d,
|
|
117
|
+
metadata: h(a.name)
|
|
118
|
+
};
|
|
119
|
+
o.push(u), r.set(m, u), i.toolkitsByName.set(m.toLowerCase(), u);
|
|
120
|
+
for (const c of a.tools) {
|
|
121
|
+
const y = p([
|
|
122
|
+
c.name,
|
|
123
|
+
c.fully_qualified_name,
|
|
124
|
+
c.description ?? "",
|
|
125
|
+
a.name,
|
|
126
|
+
a.description ?? ""
|
|
127
|
+
]), l = {
|
|
128
|
+
...c,
|
|
129
|
+
searchableText: y
|
|
130
|
+
};
|
|
131
|
+
e.push(l), n.set(c.fully_qualified_name, m), i.toolsByName.set(
|
|
132
|
+
c.fully_qualified_name.toLowerCase(),
|
|
133
|
+
l
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
toolkits: o,
|
|
139
|
+
tools: e,
|
|
140
|
+
toolkitMap: r,
|
|
141
|
+
toolToToolkitMap: n,
|
|
142
|
+
searchIndex: i
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
export {
|
|
146
|
+
q as buildToolkitCollection,
|
|
147
|
+
M as groupToolsIntoToolkits,
|
|
148
|
+
p as normalizeText
|
|
149
|
+
};
|