@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,149 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/web-sgv-FK6q.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
let d = !1, a, u, f, c, p;
|
|
2
|
-
function m(e, t = { auto: !1 }) {
|
|
3
|
-
if (d)
|
|
4
|
-
throw new Error(`you must \`import '@arcadeai/arcadejs/shims/${e.kind}'\` before importing anything else from @arcadeai/arcadejs`);
|
|
5
|
-
if (a)
|
|
6
|
-
throw new Error(`can't \`import '@arcadeai/arcadejs/shims/${e.kind}'\` after \`import '@arcadeai/arcadejs/shims/${a}'\``);
|
|
7
|
-
d = t.auto, a = e.kind, u = e.fetch, e.Request, e.Response, e.Headers, e.FormData, e.Blob, f = e.File, e.ReadableStream, e.getMultipartRequestOptions, c = e.getDefaultAgent, p = e.fileFromPath, e.isFsReadStream;
|
|
8
|
-
}
|
|
9
|
-
class h {
|
|
10
|
-
constructor(t) {
|
|
11
|
-
this.body = t;
|
|
12
|
-
}
|
|
13
|
-
get [Symbol.toStringTag]() {
|
|
14
|
-
return "MultipartBody";
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function w({ manuallyImported: e } = {}) {
|
|
18
|
-
const t = e ? "You may need to use polyfills" : "Add one of these imports before your first `import … from '@arcadeai/arcadejs'`:\n- `import '@arcadeai/arcadejs/shims/node'` (if you're running on Node)\n- `import '@arcadeai/arcadejs/shims/web'` (otherwise)\n";
|
|
19
|
-
let o, n, i, s;
|
|
20
|
-
try {
|
|
21
|
-
o = fetch, n = Request, i = Response, s = Headers;
|
|
22
|
-
} catch (r) {
|
|
23
|
-
throw new Error(`this environment is missing the following Web Fetch API type: ${r.message}. ${t}`);
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
kind: "web",
|
|
27
|
-
fetch: o,
|
|
28
|
-
Request: n,
|
|
29
|
-
Response: i,
|
|
30
|
-
Headers: s,
|
|
31
|
-
FormData: (
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
typeof FormData < "u" ? FormData : class {
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
constructor() {
|
|
36
|
-
throw new Error(`file uploads aren't supported in this environment yet as 'FormData' is undefined. ${t}`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
),
|
|
40
|
-
Blob: typeof Blob < "u" ? Blob : class {
|
|
41
|
-
constructor() {
|
|
42
|
-
throw new Error(`file uploads aren't supported in this environment yet as 'Blob' is undefined. ${t}`);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
File: (
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
typeof File < "u" ? File : class {
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
constructor() {
|
|
50
|
-
throw new Error(`file uploads aren't supported in this environment yet as 'File' is undefined. ${t}`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
),
|
|
54
|
-
ReadableStream: (
|
|
55
|
-
// @ts-ignore
|
|
56
|
-
typeof ReadableStream < "u" ? ReadableStream : class {
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
constructor() {
|
|
59
|
-
throw new Error(`streaming isn't supported in this environment yet as 'ReadableStream' is undefined. ${t}`);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
getMultipartRequestOptions: async (r, l) => ({
|
|
64
|
-
...l,
|
|
65
|
-
body: new h(r)
|
|
66
|
-
}),
|
|
67
|
-
getDefaultAgent: (r) => {
|
|
68
|
-
},
|
|
69
|
-
fileFromPath: () => {
|
|
70
|
-
throw new Error("The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/ArcadeAI/arcade-js#file-uploads");
|
|
71
|
-
},
|
|
72
|
-
isFsReadStream: (r) => !1
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
m(w({ manuallyImported: !0 }));
|
|
76
|
-
export {
|
|
77
|
-
f as F,
|
|
78
|
-
c as a,
|
|
79
|
-
p as b,
|
|
80
|
-
u as f,
|
|
81
|
-
w as g,
|
|
82
|
-
a as k,
|
|
83
|
-
m as s
|
|
84
|
-
};
|