@scalar/api-reference 1.31.4 → 1.31.6

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 (48) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/browser/standalone.js +15616 -15521
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.js +6 -6
  5. package/dist/components/ApiReferenceLayout.vue.d.ts +6 -3
  6. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.js +4 -2
  8. package/dist/components/ApiReferenceLayout.vue2.js +230 -151
  9. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  10. package/dist/components/GettingStarted.vue.js +3 -3
  11. package/dist/components/GettingStarted.vue2.js +23 -23
  12. package/dist/index.d.ts +0 -3
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +37 -44
  15. package/dist/libs/openapi.js +32 -32
  16. package/dist/style.css +1 -1
  17. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +40 -0
  18. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -0
  19. package/dist/v2/ApiReferenceWorkspace.vue.js +65 -0
  20. package/dist/v2/ApiReferenceWorkspace.vue3.js +5 -0
  21. package/dist/v2/events/definitions.d.ts +35 -0
  22. package/dist/v2/events/definitions.d.ts.map +1 -0
  23. package/dist/v2/events/index.d.ts +3 -0
  24. package/dist/v2/events/index.d.ts.map +1 -0
  25. package/dist/v2/events/listeners.d.ts +8 -0
  26. package/dist/v2/events/listeners.d.ts.map +1 -0
  27. package/dist/v2/events/listeners.js +15 -0
  28. package/dist/v2/styles.d.ts +2 -0
  29. package/dist/v2/styles.d.ts.map +1 -0
  30. package/package.json +10 -9
  31. package/dist/components/Layouts/ClassicLayout.vue.d.ts +0 -23
  32. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +0 -1
  33. package/dist/components/Layouts/ClassicLayout.vue.js +0 -67
  34. package/dist/components/Layouts/ClassicLayout.vue2.js +0 -4
  35. package/dist/components/Layouts/Layouts.vue.d.ts +0 -26
  36. package/dist/components/Layouts/Layouts.vue.d.ts.map +0 -1
  37. package/dist/components/Layouts/Layouts.vue.js +0 -35
  38. package/dist/components/Layouts/Layouts.vue2.js +0 -4
  39. package/dist/components/Layouts/ModernLayout.vue.d.ts +0 -23
  40. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +0 -1
  41. package/dist/components/Layouts/ModernLayout.vue.js +0 -8
  42. package/dist/components/Layouts/ModernLayout.vue2.js +0 -102
  43. package/dist/components/Layouts/index.d.ts +0 -2
  44. package/dist/components/Layouts/index.d.ts.map +0 -1
  45. package/dist/components/SingleApiReference.vue.d.ts +0 -29
  46. package/dist/components/SingleApiReference.vue.d.ts.map +0 -1
  47. package/dist/components/SingleApiReference.vue.js +0 -57
  48. package/dist/components/SingleApiReference.vue3.js +0 -5
@@ -1,28 +1,28 @@
1
1
  import { XScalarStability as o } from "@scalar/types/legacy";
2
- function l(e, r) {
2
+ function l(e, t) {
3
3
  var n;
4
- let t = e;
5
- const i = (n = r.required) == null ? void 0 : n.includes(e);
6
- return t += i ? " REQUIRED " : " optional ", r.properties[e] && (t += r.properties[e].type, r.properties[e].description && (t += " " + r.properties[e].description)), t;
4
+ let r = e;
5
+ const i = (n = t.required) == null ? void 0 : n.includes(e);
6
+ return r += i ? " REQUIRED " : " optional ", t.properties[e] && (r += t.properties[e].type, t.properties[e].description && (r += " " + t.properties[e].description)), r;
7
7
  }
8
8
  function p(e) {
9
9
  var i;
10
- const r = ["Body"], t = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
11
- return t && Object.keys(t).forEach((n) => {
10
+ const t = ["Body"], r = (i = e == null ? void 0 : e.schema) == null ? void 0 : i.properties;
11
+ return r && Object.keys(r).forEach((n) => {
12
12
  if (!e.schema)
13
13
  return;
14
- r.push(l(n, e.schema));
15
- const s = t[n];
14
+ t.push(l(n, e.schema));
15
+ const s = r[n];
16
16
  s.type === "object" && !!s.properties && s.properties && Object.keys(s.properties).forEach((c) => {
17
17
  var u, f;
18
- r.push(`${c} ${(f = (u = s.properties) == null ? void 0 : u[c]) == null ? void 0 : f.type}`);
18
+ t.push(`${c} ${(f = (u = s.properties) == null ? void 0 : u[c]) == null ? void 0 : f.type}`);
19
19
  });
20
- }), r;
20
+ }), t;
21
21
  }
22
22
  function O(e) {
23
- var r, t, i;
23
+ var t, r, i;
24
24
  try {
25
- const n = (i = (t = (r = e == null ? void 0 : e.information) == null ? void 0 : r.requestBody) == null ? void 0 : t.content) == null ? void 0 : i["application/json"];
25
+ const n = (i = (r = (t = e == null ? void 0 : e.information) == null ? void 0 : t.requestBody) == null ? void 0 : r.content) == null ? void 0 : i["application/json"];
26
26
  if (!n)
27
27
  throw new Error("Body not found");
28
28
  return p(n);
@@ -31,28 +31,28 @@ function O(e) {
31
31
  }
32
32
  }
33
33
  function d(e) {
34
- var t, i;
34
+ var r, i;
35
35
  if (!e)
36
36
  return {};
37
- const r = (
37
+ const t = (
38
38
  // OpenAPI 3.x
39
- Object.keys(((t = e == null ? void 0 : e.components) == null ? void 0 : t.schemas) ?? {}).length ? (i = e == null ? void 0 : e.components) == null ? void 0 : i.schemas : (
39
+ Object.keys(((r = e == null ? void 0 : e.components) == null ? void 0 : r.schemas) ?? {}).length ? (i = e == null ? void 0 : e.components) == null ? void 0 : i.schemas : (
40
40
  // Fallback
41
41
  {}
42
42
  )
43
43
  );
44
- return Object.keys(r ?? {}).forEach((n) => {
44
+ return Object.keys(t ?? {}).forEach((n) => {
45
45
  var s;
46
- ((s = r[n]) == null ? void 0 : s["x-internal"]) === !0 && delete r[n];
47
- }), r;
46
+ ((s = t[n]) == null ? void 0 : s["x-internal"]) === !0 && delete t[n];
47
+ }), t;
48
48
  }
49
49
  const b = (e) => e ? !!Object.keys(d(e) ?? {}).length : !1, x = (e) => e ? !!Object.keys((e == null ? void 0 : e.webhooks) ?? {}).length : !1;
50
- function a(e, r) {
51
- for (const [t, i] of Object.entries(e))
52
- i !== null && typeof i == "object" ? (r[t] ?? (r[t] = new i.__proto__.constructor()), a(i, r[t])) : typeof i < "u" && (r[t] = i);
53
- return r;
50
+ function a(e, t) {
51
+ for (const [r, i] of Object.entries(e))
52
+ i !== null && typeof i == "object" ? (t[r] ??= new i.__proto__.constructor(), a(i, t[r])) : typeof i < "u" && (t[r] = i);
53
+ return t;
54
54
  }
55
- function E(e) {
55
+ function g(e) {
56
56
  return a(e ?? {}, {
57
57
  info: {
58
58
  title: "",
@@ -71,25 +71,25 @@ function E(e) {
71
71
  tags: []
72
72
  });
73
73
  }
74
- function S(e) {
74
+ function E(e) {
75
75
  return e.deprecated !== void 0 ? e.deprecated : !!(e["x-scalar-stability"] && e["x-scalar-stability"] === o.Deprecated);
76
76
  }
77
- function h(e) {
77
+ function y(e) {
78
78
  return e.deprecated ? o.Deprecated : e["x-scalar-stability"];
79
79
  }
80
- function v(e) {
81
- const r = h(e);
82
- return r === o.Deprecated ? "text-red" : r === o.Experimental ? "text-orange" : r === o.Stable ? "text-green" : "";
80
+ function S(e) {
81
+ const t = y(e);
82
+ return t === o.Deprecated ? "text-red" : t === o.Experimental ? "text-orange" : t === o.Stable ? "text-green" : "";
83
83
  }
84
84
  export {
85
- E as createEmptySpecification,
85
+ g as createEmptySpecification,
86
86
  a as deepMerge,
87
87
  O as extractRequestBody,
88
88
  l as formatProperty,
89
89
  d as getModels,
90
- h as getOperationStability,
91
- v as getOperationStabilityColor,
90
+ y as getOperationStability,
91
+ S as getOperationStabilityColor,
92
92
  b as hasModels,
93
93
  x as hasWebhooks,
94
- S as isOperationDeprecated
94
+ E as isOperationDeprecated
95
95
  };