@scalar/api-reference 1.28.19 → 1.28.20

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/browser/examples/openapi-3.1/openapi.yaml +18 -0
  3. package/dist/browser/examples/openapi-3.1/pathItems.yaml +12 -0
  4. package/dist/browser/examples/swagger-2.0/openapi.yaml +17 -0
  5. package/dist/browser/examples/swagger-2.0/pathItems.yaml +6 -0
  6. package/dist/browser/standalone.js +5606 -5568
  7. package/dist/browser/webpack-stats.json +1 -1
  8. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.js +3 -3
  10. package/dist/components/ApiReferenceLayout.vue2.js +16 -17
  11. package/dist/components/DocumentSelector/DocumentSelector.vue.d.ts.map +1 -1
  12. package/dist/components/DocumentSelector/DocumentSelector.vue.js +3 -3
  13. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
  14. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  15. package/dist/components/Layouts/ModernLayout.vue2.js +18 -18
  16. package/dist/examples/openapi-3.1/openapi.yaml +18 -0
  17. package/dist/examples/openapi-3.1/pathItems.yaml +12 -0
  18. package/dist/examples/swagger-2.0/openapi.yaml +17 -0
  19. package/dist/examples/swagger-2.0/pathItems.yaml +6 -0
  20. package/dist/features/ApiClientModal/useApiClient.d.ts +5319 -5325
  21. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  22. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  23. package/dist/features/ExampleRequest/ExampleRequest.vue.js +3 -3
  24. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +145 -133
  25. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  26. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  27. package/dist/features/Operation/components/ParameterListItem.vue2.js +1 -1
  28. package/dist/helpers/get-request.d.ts.map +1 -1
  29. package/dist/helpers/parse.d.ts +2 -1
  30. package/dist/helpers/parse.d.ts.map +1 -1
  31. package/dist/helpers/parse.js +59 -54
  32. package/dist/hooks/useMultipleDocuments.d.ts +1 -1
  33. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  34. package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
  35. package/dist/hooks/useReactiveSpec.js +27 -25
  36. package/dist/index.js +1 -1
  37. package/dist/style.css +1 -1
  38. package/package.json +9 -9
  39. package/dist/components/Spinner/Spinner.vue.d.ts +0 -3
  40. package/dist/components/Spinner/Spinner.vue.d.ts.map +0 -1
  41. package/dist/components/Spinner/index.d.ts +0 -2
  42. package/dist/components/Spinner/index.d.ts.map +0 -1
@@ -1,63 +1,68 @@
1
- import { redirectToProxy as R, shouldIgnoreEntity as u } from "@scalar/oas-utils/helpers";
2
- import { load as M, dereference as q } from "@scalar/openapi-parser";
3
- import { fetchUrls as D } from "@scalar/openapi-parser/plugins/fetch-urls";
1
+ import { redirectToProxy as A, shouldIgnoreEntity as u } from "@scalar/oas-utils/helpers";
2
+ import { load as M, dereference as R } from "@scalar/openapi-parser";
3
+ import { fetchUrls as q } from "@scalar/openapi-parser/plugins/fetch-urls";
4
4
  import { createEmptySpecification as O } from "./createEmptySpecification.js";
5
- import { normalizeRequestMethod as j } from "../legacy/helpers/normalizeRequestMethod.js";
6
- import { validRequestMethods as C } from "../legacy/fixtures/httpRequestMethods.js";
5
+ import { normalizeRequestMethod as $ } from "../legacy/helpers/normalizeRequestMethod.js";
6
+ import { validRequestMethods as D } from "../legacy/fixtures/httpRequestMethods.js";
7
7
  const G = (m, {
8
- proxyUrl: e
9
- } = {}) => new Promise(async (n, b) => {
10
- var h;
8
+ proxyUrl: e,
9
+ source: h
10
+ } = {}) => new Promise(async (l, g) => {
11
+ var y;
11
12
  try {
12
13
  if (!m)
13
- return n(I(O()));
14
- const f = performance.now(), { filesystem: s } = await M(m, {
14
+ return l(x(O()));
15
+ const s = performance.now(), { filesystem: c } = await M(m, {
16
+ source: h,
15
17
  plugins: [
16
- D({
17
- fetch: (o) => fetch(e ? R(e, o) : o)
18
+ q({
19
+ fetch: async (a) => {
20
+ const n = await fetch(e ? A(e, a) : a);
21
+ return n.ok ? console.info(`fetch($ref): ${a} (${Math.round((await n.clone().text()).length / 1024)} kB)`) : console.error(`fetch($ref): ${a} (${n.status} ${n.statusText})`), n;
22
+ }
18
23
  })
19
24
  ]
20
- }), { schema: a, errors: r } = await q(s), t = performance.now();
21
- return console.log(`dereference: ${Math.round(t - f)} ms`), r != null && r.length && console.warn(
25
+ }), { schema: o, errors: t } = await R(c), r = performance.now();
26
+ return console.info(`dereference: ${Math.round(r - s)} ms`), t != null && t.length && console.warn(
22
27
  `Please open an issue on https://github.com/scalar/scalar
23
28
  `,
24
29
  `Scalar OpenAPI Parser Warning:
25
30
  `,
26
- r
27
- ), a === void 0 ? (b(((h = r == null ? void 0 : r[0]) == null ? void 0 : h.message) ?? "Failed to parse the OpenAPI file."), n(I(O()))) : n(I(a));
28
- } catch (f) {
29
- console.error("[@scalar/api-reference]", "Failed to parse the OpenAPI document. It might be invalid?"), console.error(f), b(f);
31
+ t
32
+ ), o === void 0 ? (g(((y = t == null ? void 0 : t[0]) == null ? void 0 : y.message) ?? "Failed to parse the OpenAPI file."), l(x(O()))) : l(x(o));
33
+ } catch (s) {
34
+ console.error("[@scalar/api-reference]", "Failed to parse the OpenAPI document. It might be invalid?"), console.error(s), g(s);
30
35
  }
31
- return n(I(O()));
32
- }), I = (m) => {
33
- var h, f;
36
+ return l(x(O()));
37
+ }), x = (m) => {
38
+ var g, y;
34
39
  let e = {};
35
40
  m && typeof m == "object" ? e = structuredClone(m) : e = O(), e.tags || (e.tags = []), e.paths || (e.paths = {}), e.components || (e.components = {}), e.webhooks || (e.webhooks = {}), e.servers || (e.servers = []), e.security || (e.security = []), e.externalDocs || (e.externalDocs = {});
36
- const n = {};
41
+ const h = {};
37
42
  return Object.keys(e.webhooks ?? {}).forEach((s) => {
38
- var a;
39
- Object.keys(((a = e.webhooks) == null ? void 0 : a[s]) ?? {}).forEach((r) => {
40
- var o, l, g, y;
41
- const t = (o = e.webhooks) == null ? void 0 : o[s][r];
43
+ var c;
44
+ Object.keys(((c = e.webhooks) == null ? void 0 : c[s]) ?? {}).forEach((o) => {
45
+ var r, a, n, w;
46
+ const t = (r = e.webhooks) == null ? void 0 : r[s][o];
42
47
  if (!(!t || u(t))) {
43
48
  if (Array.isArray(t.tags)) {
44
- const i = (l = t.tags) == null ? void 0 : l.map(
45
- (c) => {
46
- var w;
47
- return (w = e.tags) == null ? void 0 : w.find((p) => p.name === c);
49
+ const i = (a = t.tags) == null ? void 0 : a.map(
50
+ (f) => {
51
+ var I;
52
+ return (I = e.tags) == null ? void 0 : I.find((p) => p.name === f);
48
53
  }
49
54
  );
50
- if (t.tags = i == null ? void 0 : i.filter((c) => !u(c)), i != null && i.some((c) => u(c)))
55
+ if (t.tags = i == null ? void 0 : i.filter((f) => !u(f)), i != null && i.some((f) => u(f)))
51
56
  return;
52
57
  }
53
- n[s] === void 0 && (n[s] = {}), n[s][r] = {
58
+ h[s] === void 0 && (h[s] = {}), h[s][o] = {
54
59
  // Transformed data
55
- httpVerb: j(r),
60
+ httpVerb: $(o),
56
61
  path: s,
57
62
  operationId: (t == null ? void 0 : t.operationId) || s,
58
63
  name: (t == null ? void 0 : t.summary) || s || "",
59
64
  description: (t == null ? void 0 : t.description) || "",
60
- pathParameters: (y = (g = e.paths) == null ? void 0 : g[s]) == null ? void 0 : y.parameters,
65
+ pathParameters: (w = (n = e.paths) == null ? void 0 : n[s]) == null ? void 0 : w.parameters,
61
66
  // Original webhook
62
67
  information: {
63
68
  ...t
@@ -65,19 +70,19 @@ const G = (m, {
65
70
  };
66
71
  }
67
72
  });
68
- }), Object.keys(((h = e.components) == null ? void 0 : h.schemas) ?? {}).forEach((s) => {
69
- var a, r, t, o;
70
- u((r = (a = e.components) == null ? void 0 : a.schemas) == null ? void 0 : r[s]) && ((o = (t = e.components) == null ? void 0 : t.schemas) == null || delete o[s]);
73
+ }), Object.keys(((g = e.components) == null ? void 0 : g.schemas) ?? {}).forEach((s) => {
74
+ var c, o, t, r;
75
+ u((o = (c = e.components) == null ? void 0 : c.schemas) == null ? void 0 : o[s]) && ((r = (t = e.components) == null ? void 0 : t.schemas) == null || delete r[s]);
71
76
  }), Object.keys(e.paths).forEach((s) => {
72
77
  Object.keys(e.paths[s]).filter(
73
- (r) => C.includes(r.toUpperCase())
74
- ).forEach((r) => {
75
- var l, g, y, i, c, w;
76
- const t = e.paths[s][r];
78
+ (o) => D.includes(o.toUpperCase())
79
+ ).forEach((o) => {
80
+ var a, n, w, i, f, I;
81
+ const t = e.paths[s][o];
77
82
  if (t === void 0 || u(t))
78
83
  return;
79
- const o = {
80
- httpVerb: j(r),
84
+ const r = {
85
+ httpVerb: $(o),
81
86
  path: s,
82
87
  operationId: t.operationId || s,
83
88
  name: t.summary || s || "",
@@ -85,33 +90,33 @@ const G = (m, {
85
90
  information: {
86
91
  ...t
87
92
  },
88
- pathParameters: (g = (l = e.paths) == null ? void 0 : l[s]) == null ? void 0 : g.parameters
93
+ pathParameters: (n = (a = e.paths) == null ? void 0 : a[s]) == null ? void 0 : n.parameters
89
94
  };
90
95
  if (!t.tags || t.tags.length === 0) {
91
- (y = e.tags) != null && y.find((d) => d.name === "default") || (i = e.tags) == null || i.push({
96
+ (w = e.tags) != null && w.find((d) => d.name === "default") || (i = e.tags) == null || i.push({
92
97
  name: "default",
93
98
  description: "",
94
99
  operations: []
95
100
  });
96
- const p = (c = e.tags) == null ? void 0 : c.findIndex(
101
+ const p = (f = e.tags) == null ? void 0 : f.findIndex(
97
102
  (d) => d.name === "default"
98
103
  );
99
- p >= 0 && ((w = e.tags[p]) == null || w.operations.push(o));
104
+ p >= 0 && ((I = e.tags[p]) == null || I.operations.push(r));
100
105
  } else
101
106
  t.tags.forEach((p) => {
102
- var E, P, k;
103
- const d = (E = e.tags) == null ? void 0 : E.findIndex((A) => A.name === p);
104
- d === -1 && ((P = e.tags) == null || P.push({
107
+ var k, E, P;
108
+ const d = (k = e.tags) == null ? void 0 : k.findIndex((j) => j.name === p);
109
+ d === -1 && ((E = e.tags) == null || E.push({
105
110
  name: p,
106
111
  description: ""
107
112
  }));
108
- const x = d !== -1 ? d : e.tags.length - 1;
109
- typeof ((k = e.tags[x]) == null ? void 0 : k.operations) > "u" && (e.tags[x].operations = []), e.tags[x].operations.push(o);
113
+ const b = d !== -1 ? d : e.tags.length - 1;
114
+ typeof ((P = e.tags[b]) == null ? void 0 : P.operations) > "u" && (e.tags[b].operations = []), e.tags[b].operations.push(r);
110
115
  });
111
116
  });
112
- }), e.tags = (f = e.tags) == null ? void 0 : f.filter((s) => !u(s)), {
117
+ }), e.tags = (y = e.tags) == null ? void 0 : y.filter((s) => !u(s)), {
113
118
  ...e,
114
- webhooks: n
119
+ webhooks: h
115
120
  };
116
121
  };
117
122
  export {
@@ -23,7 +23,7 @@ export declare const useMultipleDocuments: ({ configuration, initialIndex, isInt
23
23
  default?: boolean;
24
24
  hideClientButton?: boolean | undefined;
25
25
  showSidebar?: boolean | undefined;
26
- theme?: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none" | undefined;
26
+ theme?: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none" | undefined;
27
27
  layout?: "modern" | "classic" | undefined;
28
28
  isEditable?: boolean | undefined;
29
29
  isLoading?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultipleDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EACL,KAAK,4BAA4B,EAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyDA"}
@@ -1,15 +1,15 @@
1
1
  import { fetchDocument as l, prettyPrintJson as d } from "@scalar/oas-utils/helpers";
2
- import { ref as s, watch as u, toValue as f } from "vue";
2
+ import { ref as f, watch as p, toValue as u } from "vue";
3
3
  import { parse as h } from "../helpers/parse.js";
4
4
  import { createEmptySpecification as m } from "../helpers/createEmptySpecification.js";
5
- const v = async ({ url: a, content: e }, r) => {
6
- if (a) {
5
+ const v = async ({ url: r, content: e }, n) => {
6
+ if (r) {
7
7
  const i = performance.now();
8
8
  try {
9
- const n = await l(a, r), o = performance.now();
10
- return console.log(`fetch: ${Math.round(o - i)} ms (${a})`), console.log("size:", Math.round(n.length / 1024), "kB"), n;
11
- } catch (n) {
12
- console.error("Failed to fetch OpenAPI document from URL:", n);
9
+ const c = await l(r, n), o = performance.now();
10
+ return console.log(`fetch: ${Math.round(o - i)} ms (${r})`), console.log("size:", Math.round(c.length / 1024), "kB"), c;
11
+ } catch (c) {
12
+ console.error("Failed to fetch OpenAPI document from URL:", c);
13
13
  }
14
14
  }
15
15
  const t = typeof e == "function" ? e() : e;
@@ -18,42 +18,44 @@ const v = async ({ url: a, content: e }, r) => {
18
18
  if (typeof t == "object")
19
19
  return d(t);
20
20
  };
21
- function C({
22
- specConfig: a,
21
+ function E({
22
+ specConfig: r,
23
23
  proxyUrl: e
24
24
  }) {
25
- const r = s(""), t = s(m()), i = s(null);
26
- function n(o) {
25
+ const n = f(""), t = f(m()), i = f(null);
26
+ function c(o) {
27
+ var s;
27
28
  if (!o) {
28
29
  t.value = m();
29
30
  return;
30
31
  }
31
32
  h(o, {
32
- proxyUrl: e ? f(e) : void 0
33
- }).then((c) => {
34
- i.value = null, t.value = c;
35
- }).catch((c) => {
36
- i.value = c.toString();
33
+ proxyUrl: e ? u(e) : void 0,
34
+ source: (s = u(r)) == null ? void 0 : s.url
35
+ }).then((a) => {
36
+ i.value = null, t.value = a;
37
+ }).catch((a) => {
38
+ i.value = a.toString();
37
39
  });
38
40
  }
39
- return u(
40
- () => f(a),
41
+ return p(
42
+ () => u(r),
41
43
  async (o) => {
42
- var c;
44
+ var s;
43
45
  if (o) {
44
- const p = (c = await v(o, f(e))) == null ? void 0 : c.trim();
45
- typeof p == "string" && (r.value = p);
46
+ const a = (s = await v(o, u(e))) == null ? void 0 : s.trim();
47
+ typeof a == "string" && (n.value = a);
46
48
  }
47
49
  },
48
50
  { immediate: !0, deep: !0 }
49
- ), u(r, () => {
50
- n(r.value);
51
+ ), p(n, () => {
52
+ c(n.value);
51
53
  }), {
52
- rawSpec: r,
54
+ rawSpec: n,
53
55
  parsedSpec: t,
54
56
  specErrors: i
55
57
  };
56
58
  }
57
59
  export {
58
- C as useReactiveSpec
60
+ E as useReactiveSpec
59
61
  };