@arcadeai/design-system 3.5.4 → 3.5.5

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.
@@ -19,9 +19,9 @@ const J = "RFC3986", Y = {
19
19
  });
20
20
  let i = "";
21
21
  for (let l = 0; l < o.length; l += W) {
22
- const c = o.length >= W ? o.slice(l, l + W) : o, u = [];
23
- for (let p = 0; p < c.length; ++p) {
24
- let a = c.charCodeAt(p);
22
+ const u = o.length >= W ? o.slice(l, l + W) : o, c = [];
23
+ for (let h = 0; h < u.length; ++h) {
24
+ let a = u.charCodeAt(h);
25
25
  if (a === 45 || // -
26
26
  a === 46 || // .
27
27
  a === 95 || // _
@@ -30,24 +30,24 @@ const J = "RFC3986", Y = {
30
30
  a >= 65 && a <= 90 || // a-z
31
31
  a >= 97 && a <= 122 || // A-Z
32
32
  s === tt && (a === 40 || a === 41)) {
33
- u[u.length] = c.charAt(p);
33
+ c[c.length] = u.charAt(h);
34
34
  continue;
35
35
  }
36
36
  if (a < 128) {
37
- u[u.length] = _[a];
37
+ c[c.length] = _[a];
38
38
  continue;
39
39
  }
40
40
  if (a < 2048) {
41
- u[u.length] = _[192 | a >> 6] + _[128 | a & 63];
41
+ c[c.length] = _[192 | a >> 6] + _[128 | a & 63];
42
42
  continue;
43
43
  }
44
44
  if (a < 55296 || a >= 57344) {
45
- u[u.length] = _[224 | a >> 12] + _[128 | a >> 6 & 63] + _[128 | a & 63];
45
+ c[c.length] = _[224 | a >> 12] + _[128 | a >> 6 & 63] + _[128 | a & 63];
46
46
  continue;
47
47
  }
48
- p += 1, a = 65536 + ((a & 1023) << 10 | c.charCodeAt(p) & 1023), u[u.length] = _[240 | a >> 18] + _[128 | a >> 12 & 63] + _[128 | a >> 6 & 63] + _[128 | a & 63];
48
+ h += 1, a = 65536 + ((a & 1023) << 10 | u.charCodeAt(h) & 1023), c[c.length] = _[240 | a >> 18] + _[128 | a >> 12 & 63] + _[128 | a >> 6 & 63] + _[128 | a & 63];
49
49
  }
50
- i += u.join("");
50
+ i += c.join("");
51
51
  }
52
52
  return i;
53
53
  };
@@ -102,7 +102,7 @@ function ct(t) {
102
102
  return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "symbol" || typeof t == "bigint";
103
103
  }
104
104
  const V = {};
105
- function Re(t, e, n, r, s, o, i, l, c, u, p, a, h, m, b, E, S, z) {
105
+ function Re(t, e, n, r, s, o, i, l, u, c, h, a, p, m, b, E, S, z) {
106
106
  let f = t, D = z, U = 0, ce = !1;
107
107
  for (; (D = D.get(V)) !== void 0 && !ce; ) {
108
108
  const g = D.get(t);
@@ -113,22 +113,22 @@ function Re(t, e, n, r, s, o, i, l, c, u, p, a, h, m, b, E, S, z) {
113
113
  }
114
114
  typeof D.get(V) > "u" && (U = 0);
115
115
  }
116
- if (typeof u == "function" ? f = u(e, f) : f instanceof Date ? f = h?.(f) : n === "comma" && A(f) && (f = pe(f, function(g) {
117
- return g instanceof Date ? h?.(g) : g;
116
+ if (typeof c == "function" ? f = c(e, f) : f instanceof Date ? f = p?.(f) : n === "comma" && A(f) && (f = pe(f, function(g) {
117
+ return g instanceof Date ? p?.(g) : g;
118
118
  })), f === null) {
119
119
  if (o)
120
- return c && !E ? (
120
+ return u && !E ? (
121
121
  // @ts-expect-error
122
- c(e, y.encoder, S, "key", m)
122
+ u(e, y.encoder, S, "key", m)
123
123
  ) : e;
124
124
  f = "";
125
125
  }
126
126
  if (ct(f) || st(f)) {
127
- if (c) {
128
- const g = E ? e : c(e, y.encoder, S, "key", m);
127
+ if (u) {
128
+ const g = E ? e : u(e, y.encoder, S, "key", m);
129
129
  return [
130
130
  b?.(g) + "=" + // @ts-expect-error
131
- b?.(c(f, y.encoder, S, "value", m))
131
+ b?.(u(f, y.encoder, S, "value", m))
132
132
  ];
133
133
  }
134
134
  return [b?.(e) + "=" + b?.(String(f))];
@@ -138,12 +138,12 @@ function Re(t, e, n, r, s, o, i, l, c, u, p, a, h, m, b, E, S, z) {
138
138
  return X;
139
139
  let I;
140
140
  if (n === "comma" && A(f))
141
- E && c && (f = pe(f, c)), I = [{ value: f.length > 0 ? f.join(",") || null : void 0 }];
142
- else if (A(u))
143
- I = u;
141
+ E && u && (f = pe(f, u)), I = [{ value: f.length > 0 ? f.join(",") || null : void 0 }];
142
+ else if (A(c))
143
+ I = c;
144
144
  else {
145
145
  const g = Object.keys(f);
146
- I = p ? g.sort(p) : g;
146
+ I = h ? g.sort(h) : g;
147
147
  }
148
148
  const ue = l ? String(e).replace(/\./g, "%2E") : String(e), $ = r && A(f) && f.length === 1 ? ue + "[]" : ue;
149
149
  if (s && A(f) && f.length === 0)
@@ -168,11 +168,11 @@ function Re(t, e, n, r, s, o, i, l, c, u, p, a, h, m, b, E, S, z) {
168
168
  i,
169
169
  l,
170
170
  // @ts-ignore
171
- n === "comma" && E && A(f) ? null : c,
172
- u,
173
- p,
174
- a,
171
+ n === "comma" && E && A(f) ? null : u,
172
+ c,
175
173
  h,
174
+ a,
175
+ p,
176
176
  m,
177
177
  b,
178
178
  E,
@@ -237,17 +237,17 @@ function lt(t, e = {}) {
237
237
  const i = [];
238
238
  if (typeof n != "object" || n === null)
239
239
  return "";
240
- const l = Ae[r.arrayFormat], c = l === "comma" && r.commaRoundTrip;
240
+ const l = Ae[r.arrayFormat], u = l === "comma" && r.commaRoundTrip;
241
241
  s || (s = Object.keys(n)), r.sort && s.sort(r.sort);
242
- const u = /* @__PURE__ */ new WeakMap();
243
- for (let h = 0; h < s.length; ++h) {
244
- const m = s[h];
242
+ const c = /* @__PURE__ */ new WeakMap();
243
+ for (let p = 0; p < s.length; ++p) {
244
+ const m = s[p];
245
245
  r.skipNulls && n[m] === null || Se(i, Re(
246
246
  n[m],
247
247
  m,
248
248
  // @ts-expect-error
249
249
  l,
250
- c,
250
+ u,
251
251
  r.allowEmptyArrays,
252
252
  r.strictNullHandling,
253
253
  r.skipNulls,
@@ -261,14 +261,14 @@ function lt(t, e = {}) {
261
261
  r.formatter,
262
262
  r.encodeValuesOnly,
263
263
  r.charset,
264
- u
264
+ c
265
265
  ));
266
266
  }
267
- const p = i.join(r.delimiter);
267
+ const h = i.join(r.delimiter);
268
268
  let a = r.addQueryPrefix === !0 ? "?" : "";
269
- return r.charsetSentinel && (r.charset === "iso-8859-1" ? a += "utf8=%26%2310003%3B&" : a += "utf8=%E2%9C%93&"), p.length > 0 ? a + p : "";
269
+ return r.charsetSentinel && (r.charset === "iso-8859-1" ? a += "utf8=%26%2310003%3B&" : a += "utf8=%E2%9C%93&"), h.length > 0 ? a + h : "";
270
270
  }
271
- const T = "1.10.0";
271
+ const T = "1.11.1";
272
272
  class P extends Error {
273
273
  }
274
274
  class w extends P {
@@ -520,16 +520,16 @@ class wt {
520
520
  return null;
521
521
  }
522
522
  async buildRequest(e, { retryCount: n = 0 } = {}) {
523
- const r = { ...e }, { method: s, path: o, query: i, defaultBaseURL: l, headers: c = {} } = r, u = ArrayBuffer.isView(r.body) || r.__binaryRequest && typeof r.body == "string" ? r.body : ye(r.body) ? r.body.body : r.body ? JSON.stringify(r.body, null, 2) : null, p = this.calculateContentLength(u), a = this.buildURL(o, i, l);
523
+ const r = { ...e }, { method: s, path: o, query: i, defaultBaseURL: l, headers: u = {} } = r, c = ArrayBuffer.isView(r.body) || r.__binaryRequest && typeof r.body == "string" ? r.body : ye(r.body) ? r.body.body : r.body ? JSON.stringify(r.body, null, 2) : null, h = this.calculateContentLength(c), a = this.buildURL(o, i, l);
524
524
  "timeout" in r && G("timeout", r.timeout), r.timeout = r.timeout ?? this.timeout;
525
- const h = r.httpAgent ?? this.httpAgent ?? Ye(a), m = r.timeout + 1e3;
526
- typeof h?.options?.timeout == "number" && m > (h.options.timeout ?? 0) && (h.options.timeout = m), this.idempotencyHeader && s !== "get" && (e.idempotencyKey || (e.idempotencyKey = this.defaultIdempotencyKey()), c[this.idempotencyHeader] = e.idempotencyKey);
527
- const b = this.buildHeaders({ options: r, headers: c, contentLength: p, retryCount: n });
525
+ const p = r.httpAgent ?? this.httpAgent ?? Ye(a), m = r.timeout + 1e3;
526
+ typeof p?.options?.timeout == "number" && m > (p.options.timeout ?? 0) && (p.options.timeout = m), this.idempotencyHeader && s !== "get" && (e.idempotencyKey || (e.idempotencyKey = this.defaultIdempotencyKey()), u[this.idempotencyHeader] = e.idempotencyKey);
527
+ const b = this.buildHeaders({ options: r, headers: u, contentLength: h, retryCount: n });
528
528
  return { req: {
529
529
  method: s,
530
- ...u && { body: u },
530
+ ...c && { body: c },
531
531
  headers: b,
532
- ...h && { agent: h },
532
+ ...p && { agent: p },
533
533
  // @ts-ignore node-fetch uses a custom AbortSignal type that is
534
534
  // not compatible with standard web types
535
535
  signal: r.signal ?? null
@@ -571,24 +571,24 @@ class wt {
571
571
  });
572
572
  if (await this.prepareRequest(o, { url: i, options: r }), L("request", i, r, o.headers), r.signal?.aborted)
573
573
  throw new Z();
574
- const c = new AbortController(), u = await this.fetchWithTimeout(i, o, l, c).catch(ee);
575
- if (u instanceof Error) {
574
+ const u = new AbortController(), c = await this.fetchWithTimeout(i, o, l, u).catch(ee);
575
+ if (c instanceof Error) {
576
576
  if (r.signal?.aborted)
577
577
  throw new Z();
578
578
  if (n)
579
579
  return this.retryRequest(r, n);
580
- throw u.name === "AbortError" ? new Ee() : new F({ cause: u });
580
+ throw c.name === "AbortError" ? new Ee() : new F({ cause: c });
581
581
  }
582
- const p = _t(u.headers);
583
- if (!u.ok) {
584
- if (n && this.shouldRetry(u)) {
582
+ const h = _t(c.headers);
583
+ if (!c.ok) {
584
+ if (n && this.shouldRetry(c)) {
585
585
  const S = `retrying, ${n} attempts remaining`;
586
- return L(`response (error; ${S})`, u.status, i, p), this.retryRequest(r, n, p);
586
+ return L(`response (error; ${S})`, c.status, i, h), this.retryRequest(r, n, h);
587
587
  }
588
- const a = await u.text().catch((S) => ee(S).message), h = Pt(a), m = h ? void 0 : a;
589
- throw L(`response (error; ${n ? "(error; no more retries left)" : "(error; not retryable)"})`, u.status, i, p, m), this.makeStatusError(u.status, h, m, p);
588
+ const a = await c.text().catch((S) => ee(S).message), p = Pt(a), m = p ? void 0 : a;
589
+ throw L(`response (error; ${n ? "(error; no more retries left)" : "(error; not retryable)"})`, c.status, i, h, m), this.makeStatusError(c.status, p, m, h);
590
590
  }
591
- return { response: u, options: r, controller: c };
591
+ return { response: c, options: r, controller: u };
592
592
  }
593
593
  requestAPIList(e, n) {
594
594
  const r = this.makeRequest(n, null);
@@ -610,12 +610,12 @@ class wt {
610
610
  async fetchWithTimeout(e, n, r, s) {
611
611
  const { signal: o, ...i } = n || {};
612
612
  o && o.addEventListener("abort", () => s.abort());
613
- const l = setTimeout(() => s.abort(), r), c = {
613
+ const l = setTimeout(() => s.abort(), r), u = {
614
614
  signal: s.signal,
615
615
  ...i
616
616
  };
617
- return c.method && (c.method = c.method.toUpperCase()), // use undefined this binding; fetch errors if bound to something else in browser/cloudflare
618
- this.fetch.call(void 0, e, c).finally(() => {
617
+ return u.method && (u.method = u.method.toUpperCase()), // use undefined this binding; fetch errors if bound to something else in browser/cloudflare
618
+ this.fetch.call(void 0, e, u).finally(() => {
619
619
  clearTimeout(l);
620
620
  });
621
621
  }
@@ -877,7 +877,7 @@ class O extends xt {
877
877
  }
878
878
  nextPageInfo() {
879
879
  const e = this.offset;
880
- if (!e)
880
+ if (typeof e != "number")
881
881
  return null;
882
882
  const n = this.getPaginatedItems().length, r = e + n, s = this.total_count;
883
883
  return s && r < s ? { params: { offset: r } } : null;
@@ -1258,14 +1258,15 @@ const Ut = /[._\-\s]+/, $t = /([a-z])([A-Z])/g, jt = /\s+/;
1258
1258
  class qt {
1259
1259
  #e;
1260
1260
  constructor(e) {
1261
- const { accessToken: n, apiKey: r, arcadeClientId: s, baseURL: o } = e, i = r ?? he("ARCADE_API_KEY"), l = !!i, c = {};
1262
- s && (c["Arcade-Client-Id"] = s), !l && n && (c.Authorization = `Bearer ${n}`);
1263
- const u = {
1261
+ const { accessToken: n, apiKey: r, arcadeClientId: s, baseURL: o, ...i } = e, l = r ?? he("ARCADE_API_KEY"), u = !!l, c = {};
1262
+ s && (c["Arcade-Client-Id"] = s), !u && n && (c.Authorization = `Bearer ${n}`);
1263
+ const h = {
1264
+ ...i,
1264
1265
  baseURL: o ?? he("ARCADE_BASE_URL"),
1265
1266
  defaultHeaders: c,
1266
- apiKey: i ?? ""
1267
+ apiKey: l ?? ""
1267
1268
  };
1268
- this.#e = new d(u);
1269
+ this.#e = new d(h);
1269
1270
  }
1270
1271
  static create(e) {
1271
1272
  return new d(e);
@@ -1400,33 +1401,33 @@ class qt {
1400
1401
  toolkitsByName: /* @__PURE__ */ new Map(),
1401
1402
  toolsByName: /* @__PURE__ */ new Map()
1402
1403
  };
1403
- for (const [l, c] of e.entries()) {
1404
- const u = this.normalizeText([
1405
- c.name,
1406
- c.description ?? "",
1407
- c.version ?? ""
1408
- ]), p = this.computeRequirementsSummary(
1409
- c.requirements
1404
+ for (const [l, u] of e.entries()) {
1405
+ const c = this.normalizeText([
1406
+ u.name,
1407
+ u.description ?? "",
1408
+ u.version ?? ""
1409
+ ]), h = this.computeRequirementsSummary(
1410
+ u.requirements
1410
1411
  ), a = {
1411
- ...c,
1412
- searchableText: u,
1413
- requirementsSummary: p,
1414
- metadata: et[c.name]
1412
+ ...u,
1413
+ searchableText: c,
1414
+ requirementsSummary: h,
1415
+ metadata: et[u.name]
1415
1416
  };
1416
1417
  n.push(a), s.set(l, a), i.toolkitsByName.set(l.toLowerCase(), a);
1417
- for (const h of c.tools) {
1418
+ for (const p of u.tools) {
1418
1419
  const m = this.normalizeText([
1419
- h.name,
1420
- h.fully_qualified_name,
1421
- h.description ?? "",
1422
- c.name,
1423
- c.description ?? ""
1420
+ p.name,
1421
+ p.fully_qualified_name,
1422
+ p.description ?? "",
1423
+ u.name,
1424
+ u.description ?? ""
1424
1425
  ]), b = {
1425
- ...h,
1426
+ ...p,
1426
1427
  searchableText: m
1427
1428
  };
1428
- r.push(b), o.set(h.fully_qualified_name, l), i.toolsByName.set(
1429
- h.fully_qualified_name.toLowerCase(),
1429
+ r.push(b), o.set(p.fully_qualified_name, l), i.toolsByName.set(
1430
+ p.fully_qualified_name.toLowerCase(),
1430
1431
  b
1431
1432
  );
1432
1433
  }
@@ -1455,9 +1456,9 @@ class qt {
1455
1456
  for (const i of o) {
1456
1457
  if (i.length <= 1)
1457
1458
  continue;
1458
- const c = i.replace($t, "$1 $2").split(jt);
1459
- for (const u of c)
1460
- u.length > 1 && n.add(u.toLowerCase());
1459
+ const u = i.replace($t, "$1 $2").split(jt);
1460
+ for (const c of u)
1461
+ c.length > 1 && n.add(c.toLowerCase());
1461
1462
  }
1462
1463
  }
1463
1464
  return Array.from(n).join(" ");
@@ -1,4 +1,4 @@
1
- import { Arcade } from '@arcadeai/arcadejs';
1
+ import { Arcade, ClientOptions } from '@arcadeai/arcadejs';
2
2
  import { ToolDefinition } from '@arcadeai/arcadejs/resources/index.mjs';
3
3
  import { Toolkit as ToolkitMetadata } from '../../metadata/types';
4
4
  export type Toolkit = ToolDefinition.Toolkit & {
@@ -57,7 +57,7 @@ type ArcadeConfig = {
57
57
  * The access token for the Arcade API.
58
58
  */
59
59
  accessToken?: string;
60
- };
60
+ } & ClientOptions;
61
61
  export type GetToolsProps = {
62
62
  limit?: number;
63
63
  offset?: number;
@@ -1,5 +1,5 @@
1
1
  import "../../web-sgv-FK6q.js";
2
- import { A as p } from "../../arcade-CHE48l2C.js";
2
+ import { A as p } from "../../arcade-BiJpW9jb.js";
3
3
  import "../../metadata/toolkits.js";
4
4
  import "../../utils-Db4QWi-E.js";
5
5
  export {
@@ -1,4 +1,4 @@
1
- import { A as i, a as c } from "../../arcade-CHE48l2C.js";
1
+ import { A as i, a as c } from "../../arcade-BiJpW9jb.js";
2
2
  import { allTools as m } from "./mocks.js";
3
3
  import { v as l, d as u, b as p, i as s, g as e } from "../../vi.bdSIJ99Y-DBnM2VfT.js";
4
4
  const d = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arcadeai/design-system",
3
3
  "private": false,
4
- "version": "3.5.4",
4
+ "version": "3.5.5",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -115,7 +115,7 @@
115
115
  "tailwindcss": "^4.1.13"
116
116
  },
117
117
  "devDependencies": {
118
- "@biomejs/biome": "2.2.5",
118
+ "@biomejs/biome": "2.2.6",
119
119
  "@commitlint/cli": "20.1.0",
120
120
  "@commitlint/config-conventional": "20.0.0",
121
121
  "@hookform/resolvers": "5.2.2",
@@ -130,23 +130,23 @@
130
130
  "@testing-library/jest-dom": "6.9.1",
131
131
  "@testing-library/react": "^16.3.0",
132
132
  "@testing-library/user-event": "^14.6.1",
133
- "@types/node": "24.7.0",
133
+ "@types/node": "24.7.2",
134
134
  "@types/react": "19.2.2",
135
- "@types/react-dom": "19.2.1",
135
+ "@types/react-dom": "19.2.2",
136
136
  "@vitejs/plugin-react-swc": "4.1.0",
137
137
  "@vitest/browser": "3.2.4",
138
138
  "@vitest/coverage-v8": "3.2.4",
139
139
  "chromatic": "13.3.0",
140
140
  "glob": "11.0.3",
141
141
  "globals": "16.4.0",
142
- "happy-dom": "^19.0.2",
142
+ "happy-dom": "^20.0.0",
143
143
  "husky": "9.1.7",
144
- "lint-staged": "16.2.3",
144
+ "lint-staged": "16.2.4",
145
145
  "lucide-react": "0.545.0",
146
146
  "playwright": "1.56.0",
147
147
  "react": "19.2.0",
148
148
  "react-dom": "19.2.0",
149
- "react-hook-form": "7.64.0",
149
+ "react-hook-form": "7.65.0",
150
150
  "recharts": "3.2.1",
151
151
  "semantic-release": "24.2.9",
152
152
  "storybook": "9.1.10",
@@ -154,15 +154,15 @@
154
154
  "tailwindcss": "4.1.14",
155
155
  "tw-animate-css": "1.4.0",
156
156
  "typescript": "~5.9.3",
157
- "ultracite": "5.6.1",
158
- "vite": "7.1.9",
157
+ "ultracite": "5.6.2",
158
+ "vite": "7.1.10",
159
159
  "vite-plugin-dts": "4.5.4",
160
160
  "vite-plugin-svgr": "^4.5.0",
161
161
  "vitest": "3.2.4",
162
162
  "zod": "4.1.12"
163
163
  },
164
164
  "dependencies": {
165
- "@arcadeai/arcadejs": "^1.10.0",
165
+ "@arcadeai/arcadejs": "^1.11.1",
166
166
  "@radix-ui/react-accordion": "1.2.12",
167
167
  "@radix-ui/react-alert-dialog": "^1.1.15",
168
168
  "@radix-ui/react-avatar": "1.1.10",