@arcadeai/design-system 1.5.1 → 1.6.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.
@@ -31,7 +31,8 @@ export type Toolkit = {
31
31
  relativeDocsLink: string;
32
32
  type: ToolkitType;
33
33
  category: ToolkitCategory;
34
- isComingSoon?: boolean;
34
+ isComingSoon: boolean;
35
+ isHidden: boolean;
35
36
  };
36
37
  export type Category = {
37
38
  id: ToolkitCategory;
@@ -0,0 +1,84 @@
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
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arcadeai/design-system",
3
3
  "private": false,
4
- "version": "1.5.1",
4
+ "version": "1.6.0",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",