@scalar/api-client 2.3.16 → 2.3.18

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 (37) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +9 -9
  3. package/dist/components/SideNav/SideHelp.vue.js +1 -1
  4. package/dist/hooks/useClientConfig.d.ts +69 -0
  5. package/dist/hooks/useClientConfig.d.ts.map +1 -0
  6. package/dist/hooks/useClientConfig.js +7 -0
  7. package/dist/hooks/useResponseBody.d.ts +4 -3
  8. package/dist/hooks/useResponseBody.d.ts.map +1 -1
  9. package/dist/hooks/useResponseBody.js +15 -15
  10. package/dist/layouts/App/create-api-client-app.d.ts +34 -34
  11. package/dist/layouts/Modal/create-api-client-modal.d.ts +68 -68
  12. package/dist/layouts/Web/create-api-client-web.d.ts +34 -34
  13. package/dist/libs/create-client.d.ts +34 -34
  14. package/dist/libs/create-client.d.ts.map +1 -1
  15. package/dist/libs/create-client.js +63 -62
  16. package/dist/libs/hot-keys.d.ts +1 -1
  17. package/dist/store/collections.d.ts +4 -4
  18. package/dist/store/request-example.d.ts +2 -2
  19. package/dist/store/requests.d.ts +4 -4
  20. package/dist/store/security-schemes.d.ts +10 -10
  21. package/dist/store/servers.d.ts +4 -4
  22. package/dist/store/store.d.ts +34 -34
  23. package/dist/store/tags.d.ts +2 -2
  24. package/dist/store/workspace.d.ts +4 -4
  25. package/dist/style.css +1 -1
  26. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  27. package/dist/views/Request/RequestRoot.vue.js +1 -1
  28. package/dist/views/Request/RequestRoot.vue2.js +67 -66
  29. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  30. package/dist/views/Request/RequestSection/RequestBody.vue2.js +1 -1
  31. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  32. package/dist/views/Request/RequestSection/RequestTable.vue2.js +5 -5
  33. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  34. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +31 -31
  35. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +20 -20
  36. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  37. package/package.json +116 -116
@@ -1 +1 @@
1
- {"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;cA2P8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA8SjE,wBAMG"}
1
+ {"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;cAkQ8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAmTjE,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestRoot.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cc62b119"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-985ee6ae"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,76 +1,77 @@
1
- import { defineComponent as M, ref as c, computed as $, onMounted as H, onBeforeUnmount as Q, watch as F, openBlock as f, createElementBlock as G, normalizeClass as V, unref as r, createBlock as C, isRef as K, createCommentVNode as B, createElementVNode as T, createVNode as X } from "vue";
2
- import { isDefined as Y } from "@scalar/oas-utils/helpers";
3
- import { safeJSON as Z } from "@scalar/object-utils/parse";
4
- import { useToasts as ee } from "@scalar/use-toasts";
5
- import { RouterView as te } from "vue-router";
6
- import oe from "../../components/Sidebar/SidebarToggle.vue.js";
7
- import { useSidebar as re } from "../../hooks/useSidebar.js";
8
- import { validateParameters as se } from "../../libs/validate-parameters.js";
9
- import { useActiveEntities as ae } from "../../store/active-entities.js";
10
- import { useOpenApiWatcher as le } from "./hooks/useOpenApiWatcher.js";
11
- import ne from "./RequestSidebar.vue.js";
12
- import { createRequestOperation as ue } from "../../libs/send-request/create-request-operation.js";
13
- import { ERRORS as ce } from "../../libs/errors.js";
14
- import { useWorkspace as ie } from "../../store/store.js";
15
- import { useLayout as me } from "../../hooks/useLayout.js";
16
- const fe = { class: "flex h-full" }, de = { class: "flex h-full flex-1 flex-col" }, Ve = /* @__PURE__ */ M({
1
+ import { defineComponent as Q, ref as m, computed as F, onMounted as G, onBeforeUnmount as K, watch as X, openBlock as d, createElementBlock as Y, normalizeClass as g, unref as r, createBlock as B, isRef as Z, createCommentVNode as T, createElementVNode as A, createVNode as ee } from "vue";
2
+ import { isDefined as te } from "@scalar/oas-utils/helpers";
3
+ import { safeJSON as oe } from "@scalar/object-utils/parse";
4
+ import { useToasts as re } from "@scalar/use-toasts";
5
+ import { RouterView as se } from "vue-router";
6
+ import ae from "../../components/Sidebar/SidebarToggle.vue.js";
7
+ import { useClientConfig as le } from "../../hooks/useClientConfig.js";
8
+ import { useSidebar as ne } from "../../hooks/useSidebar.js";
9
+ import { validateParameters as ue } from "../../libs/validate-parameters.js";
10
+ import { useActiveEntities as ie } from "../../store/active-entities.js";
11
+ import { useOpenApiWatcher as ce } from "./hooks/useOpenApiWatcher.js";
12
+ import me from "./RequestSidebar.vue.js";
13
+ import { createRequestOperation as fe } from "../../libs/send-request/create-request-operation.js";
14
+ import { ERRORS as de } from "../../libs/errors.js";
15
+ import { useWorkspace as pe } from "../../store/store.js";
16
+ import { useLayout as ve } from "../../hooks/useLayout.js";
17
+ const Se = { class: "flex h-full" }, Re = { class: "flex h-full flex-1 flex-col" }, Ae = /* @__PURE__ */ Q({
17
18
  __name: "RequestRoot",
18
19
  emits: ["newTab"],
19
- setup(pe) {
20
- const A = ie(), { toast: d } = ee(), { layout: p } = me(), {
20
+ setup(ye) {
21
+ const D = pe(), { toast: p } = re(), { layout: v } = ve(), P = le(), { isSidebarOpen: s } = ne(), {
21
22
  activeCollection: l,
22
23
  activeExample: n,
23
- activeEnvironment: v,
24
- activeRequest: i,
25
- activeWorkspace: S,
26
- activeServer: g
27
- } = ae(), { cookies: D, requestHistory: P, showSidebar: R, securitySchemes: z, events: u } = A, { isSidebarOpen: s } = re(), I = c(), y = c(), m = c(/* @__PURE__ */ new Set()), q = c(null), x = $(
24
+ activeEnvironment: S,
25
+ activeRequest: u,
26
+ activeWorkspace: R,
27
+ activeServer: z
28
+ } = ie(), { cookies: I, requestHistory: J, showSidebar: y, securitySchemes: W, events: i } = D, j = m(), q = m(), f = m(/* @__PURE__ */ new Set()), x = m(null), b = F(
28
29
  () => {
29
30
  var e, t, o;
30
- return ((e = l.value) != null && e.useCollectionSecurity ? (t = l.value) == null ? void 0 : t.selectedSecuritySchemeUids : (o = i.value) == null ? void 0 : o.selectedSecuritySchemeUids) ?? [];
31
+ return ((e = l.value) != null && e.useCollectionSecurity ? (t = l.value) == null ? void 0 : t.selectedSecuritySchemeUids : (o = u.value) == null ? void 0 : o.selectedSecuritySchemeUids) ?? [];
31
32
  }
32
- ), b = async () => {
33
- var U, _, w, O;
34
- if (!i.value || !n.value || !l.value)
33
+ ), h = async () => {
34
+ var U, _, w, O, c, V;
35
+ if (!u.value || !n.value || !l.value)
35
36
  return;
36
- m.value = se(n.value);
37
- const e = typeof v.value == "object" ? v.value.value : "{}", t = Z.parse(e);
37
+ f.value = ue(n.value);
38
+ const e = typeof S.value == "object" ? S.value.value : "{}", t = oe.parse(e);
38
39
  t.error && console.error("INVALID ENVIRONMENT!");
39
- const o = t.error || typeof t.data != "object" ? {} : t.data ?? {}, a = ((U = S.value) == null ? void 0 : U.cookies.map((L) => D[L]).filter(Y)) ?? [], j = ((w = (_ = l.value) == null ? void 0 : _.info) == null ? void 0 : w.title) === "Drafts" ? void 0 : g.value, [h, k] = ue({
40
- request: i.value,
40
+ const o = t.error || typeof t.data != "object" ? {} : t.data ?? {}, a = ((U = R.value) == null ? void 0 : U.cookies.map((H) => I[H]).filter(te)) ?? [], $ = ((w = (_ = l.value) == null ? void 0 : _.info) == null ? void 0 : w.title) === "Drafts" ? void 0 : z.value, [k, E] = fe({
41
+ request: u.value,
41
42
  example: n.value,
42
- selectedSecuritySchemeUids: x.value,
43
- proxyUrl: ((O = S.value) == null ? void 0 : O.proxyUrl) ?? "",
43
+ selectedSecuritySchemeUids: b.value,
44
+ proxyUrl: ((O = R.value) == null ? void 0 : O.proxyUrl) ?? "",
44
45
  environment: o,
45
46
  globalCookies: a,
46
- status: u.requestStatus,
47
- securitySchemes: z,
48
- server: j
47
+ status: i.requestStatus,
48
+ securitySchemes: W,
49
+ server: $
49
50
  });
50
- if (h) {
51
- d(h.message, "error");
51
+ if ((V = (c = P.value) == null ? void 0 : c.onRequestSent) == null || V.call(c, u.value.path ?? ""), k) {
52
+ p(k.message, "error");
52
53
  return;
53
54
  }
54
- y.value = k.controller;
55
- const [E, N] = await k.sendRequest();
56
- q.value = N, E ? d(E.message, "error") : P.push(W(N));
57
- }, J = async () => {
55
+ q.value = E.controller;
56
+ const [C, N] = await E.sendRequest();
57
+ x.value = N, C ? p(C.message, "error") : J.push(M(N));
58
+ }, L = async () => {
58
59
  var e;
59
- return (e = y.value) == null ? void 0 : e.abort(ce.REQUEST_ABORTED);
60
+ return (e = q.value) == null ? void 0 : e.abort(de.REQUEST_ABORTED);
60
61
  };
61
- H(() => {
62
- u.executeRequest.on(b), u.cancelRequest.on(J);
63
- }), le(), Q(() => u.executeRequest.off(b)), F(
62
+ G(() => {
63
+ i.executeRequest.on(h), i.cancelRequest.on(L);
64
+ }), ce(), K(() => i.executeRequest.off(h)), X(
64
65
  () => {
65
66
  var e;
66
67
  return (e = n.value) == null ? void 0 : e.parameters;
67
68
  },
68
69
  () => {
69
- m.value.clear();
70
+ f.value.clear();
70
71
  },
71
72
  { deep: !0 }
72
73
  );
73
- const W = (e) => {
74
+ const M = (e) => {
74
75
  var t;
75
76
  try {
76
77
  return structuredClone(e);
@@ -79,33 +80,33 @@ const fe = { class: "flex h-full" }, de = { class: "flex h-full flex-1 flex-col"
79
80
  return (t = e.response) != null && t.data && (e.response.data instanceof Blob || e.response.data instanceof ArrayBuffer ? a.response.data = e.response.data : a.response.data = JSON.parse(JSON.stringify(e.response.data))), a;
80
81
  }
81
82
  };
82
- return (e, t) => (f(), G("div", {
83
+ return (e, t) => (d(), Y("div", {
83
84
  ref_key: "element",
84
- ref: I,
85
- class: V(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
86
- "!mb-0 !mr-0 !border-0": r(p) === "modal"
85
+ ref: j,
86
+ class: g(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
87
+ "!mb-0 !mr-0 !border-0": r(v) === "modal"
87
88
  }])
88
89
  }, [
89
- r(R) ? (f(), C(oe, {
90
+ r(y) ? (d(), B(ae, {
90
91
  key: 0,
91
92
  modelValue: r(s),
92
- "onUpdate:modelValue": t[0] || (t[0] = (o) => K(s) ? s.value = o : null),
93
- class: V(["absolute left-3 top-2 z-50", [
93
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => Z(s) ? s.value = o : null),
94
+ class: g(["absolute left-3 top-2 z-50", [
94
95
  { hidden: r(s) },
95
96
  { "xl:!flex": !r(s) },
96
- { "!flex": r(p) === "modal" }
97
+ { "!flex": r(v) === "modal" }
97
98
  ]])
98
- }, null, 8, ["modelValue", "class"])) : B("", !0),
99
- T("div", fe, [
100
- r(R) ? (f(), C(ne, {
99
+ }, null, 8, ["modelValue", "class"])) : T("", !0),
100
+ A("div", Se, [
101
+ r(y) ? (d(), B(me, {
101
102
  key: 0,
102
103
  onNewTab: t[1] || (t[1] = (o) => e.$emit("newTab", o))
103
- })) : B("", !0),
104
- T("div", de, [
105
- X(r(te), {
106
- invalidParams: m.value,
107
- selectedSecuritySchemeUids: x.value,
108
- requestResult: q.value
104
+ })) : T("", !0),
105
+ A("div", Re, [
106
+ ee(r(se), {
107
+ invalidParams: f.value,
108
+ selectedSecuritySchemeUids: b.value,
109
+ requestResult: x.value
109
110
  }, null, 8, ["invalidParams", "selectedSecuritySchemeUids", "requestResult"])
110
111
  ])
111
112
  ])
@@ -113,5 +114,5 @@ const fe = { class: "flex h-full" }, de = { class: "flex h-full flex-1 flex-col"
113
114
  }
114
115
  });
115
116
  export {
116
- Ve as default
117
+ Ae as default
117
118
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e20988de"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-435b665f"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -371,7 +371,7 @@ const me = {
371
371
  a[4] || (a[4] = k("span", null, "Upload File", -1)),
372
372
  c(v(C), {
373
373
  class: "ml-1",
374
- icon: "UploadSimple",
374
+ icon: "Upload",
375
375
  size: "xs",
376
376
  thickness: "2.5"
377
377
  })
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTable.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5b22d4e0"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-682f7941"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -30,9 +30,9 @@ const j = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
30
30
  setup(C, { emit: F }) {
31
31
  const b = C, s = F, U = ["", "", "36px"], y = (e, a, l) => {
32
32
  s("updateRow", e, a, l);
33
- }, S = (e) => {
33
+ }, $ = (e) => {
34
34
  s("uploadFile", e);
35
- }, $ = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default;
35
+ }, S = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default;
36
36
  return (e, a) => (r(), p(E, {
37
37
  class: "group/table flex-1",
38
38
  columns: U
@@ -157,7 +157,7 @@ const j = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
157
157
  icon: n(() => [
158
158
  u(R)(l) ? (r(), p(P, {
159
159
  key: 0,
160
- item: { ...l, default: $(l) }
160
+ item: { ...l, default: S(l) }
161
161
  }, null, 8, ["item"])) : g("", !0)
162
162
  ]),
163
163
  _: 2
@@ -186,13 +186,13 @@ const j = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
186
186
  class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
187
187
  size: "sm",
188
188
  variant: "outlined",
189
- onClick: (T) => S(d)
189
+ onClick: (T) => $(d)
190
190
  }, {
191
191
  default: n(() => [
192
192
  a[6] || (a[6] = i("span", null, "Upload File", -1)),
193
193
  t(u(B), {
194
194
  class: "ml-1",
195
- icon: "UploadSimple",
195
+ icon: "Upload",
196
196
  size: "xs",
197
197
  thickness: "2.5"
198
198
  })
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-51934a33"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-233b510c"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -1,63 +1,63 @@
1
- import { defineComponent as b, ref as C, computed as d, openBlock as o, createBlock as n, createSlots as N, withCtx as u, createTextVNode as w, toDisplayString as g, createElementBlock as T, createElementVNode as _, unref as a, createCommentVNode as s, createVNode as $ } from "vue";
2
- import E from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useResponseBody as P } from "../../../hooks/useResponseBody.js";
4
- import S from "./ResponseBodyDownload.vue.js";
5
- import U from "./ResponseBodyInfo.vue.js";
6
- import j from "./ResponseBodyPreview.vue.js";
7
- import D from "./ResponseBodyRaw.vue.js";
8
- import F from "./ResponseBodyToggle.vue.js";
9
- import { mediaTypes as I } from "../consts/mediaTypes.js";
10
- const q = {
1
+ import { defineComponent as C, ref as N, computed as d, toRef as w, openBlock as o, createBlock as n, createSlots as T, withCtx as u, createTextVNode as g, toDisplayString as _, createElementBlock as $, createElementVNode as x, unref as a, createCommentVNode as s, createVNode as E } from "vue";
2
+ import P from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
+ import { useResponseBody as S } from "../../../hooks/useResponseBody.js";
4
+ import U from "./ResponseBodyDownload.vue.js";
5
+ import j from "./ResponseBodyInfo.vue.js";
6
+ import D from "./ResponseBodyPreview.vue.js";
7
+ import F from "./ResponseBodyRaw.vue.js";
8
+ import I from "./ResponseBodyToggle.vue.js";
9
+ import { mediaTypes as q } from "../consts/mediaTypes.js";
10
+ const z = {
11
11
  key: 0,
12
12
  class: "bg-b-1 flex max-h-[calc(100%-32px)] flex-col overflow-hidden"
13
- }, z = { class: "flex min-h-8 items-center justify-between border-y px-3 py-1.5" }, A = { class: "text-xxs font-code leading-3" }, X = /* @__PURE__ */ b({
13
+ }, A = { class: "flex min-h-8 items-center justify-between border-y px-3 py-1.5" }, G = { class: "text-xxs font-code leading-3" }, Y = /* @__PURE__ */ C({
14
14
  __name: "ResponseBody",
15
15
  props: {
16
16
  title: {},
17
17
  data: {},
18
18
  headers: {}
19
19
  },
20
- setup(x) {
21
- const c = x, r = C(!0), p = d(
20
+ setup(k) {
21
+ const c = k, r = N(!0), p = d(
22
22
  () => {
23
23
  var t;
24
24
  return !!((t = e.value) != null && t.raw && e.value.preview);
25
25
  }
26
- ), k = d(() => r.value || !p.value), B = d(() => !r.value || !p.value), { mimeType: i, attachmentFilename: R, dataUrl: l } = P({
27
- data: c.data,
28
- headers: c.headers
29
- }), e = d(() => I[i.value.essence]);
30
- return (t, m) => (o(), n(E, { class: "max-h-content overflow-y-hidden" }, N({
26
+ ), B = d(() => r.value || !p.value), R = d(() => !r.value || !p.value), { mimeType: i, attachmentFilename: V, dataUrl: l } = S({
27
+ data: w(c, "data"),
28
+ headers: w(c, "headers")
29
+ }), e = d(() => q[i.value.essence]);
30
+ return (t, m) => (o(), n(P, { class: "max-h-content overflow-y-hidden" }, T({
31
31
  title: u(() => [
32
- w(g(t.title), 1)
32
+ g(_(t.title), 1)
33
33
  ]),
34
34
  default: u(() => {
35
35
  var f, v, y, h;
36
36
  return [
37
- t.data ? (o(), T("div", q, [
38
- _("div", z, [
39
- _("span", A, g(a(i).essence), 1),
40
- p.value ? (o(), n(F, {
37
+ t.data ? (o(), $("div", z, [
38
+ x("div", A, [
39
+ x("span", G, _(a(i).essence), 1),
40
+ p.value ? (o(), n(I, {
41
41
  key: 0,
42
42
  modelValue: r.value,
43
- "onUpdate:modelValue": m[0] || (m[0] = (V) => r.value = V)
43
+ "onUpdate:modelValue": m[0] || (m[0] = (b) => r.value = b)
44
44
  }, null, 8, ["modelValue"])) : s("", !0)
45
45
  ]),
46
- (f = e.value) != null && f.raw && B.value ? (o(), n(D, {
46
+ (f = e.value) != null && f.raw && R.value ? (o(), n(F, {
47
47
  key: a(l),
48
48
  content: t.data,
49
49
  language: e.value.language
50
50
  }, null, 8, ["content", "language"])) : s("", !0),
51
- (v = e.value) != null && v.preview && k.value ? (o(), n(j, {
51
+ (v = e.value) != null && v.preview && B.value ? (o(), n(D, {
52
52
  key: a(l),
53
53
  alpha: e.value.alpha,
54
54
  mode: e.value.preview,
55
55
  src: a(l),
56
56
  type: a(i).essence
57
57
  }, null, 8, ["alpha", "mode", "src", "type"])) : s("", !0),
58
- !((y = e.value) != null && y.raw) && !((h = e.value) != null && h.preview) ? (o(), n(U, { key: 2 }, {
58
+ !((y = e.value) != null && y.raw) && !((h = e.value) != null && h.preview) ? (o(), n(j, { key: 2 }, {
59
59
  default: u(() => m[1] || (m[1] = [
60
- w(" Binary file ")
60
+ g(" Binary file ")
61
61
  ])),
62
62
  _: 1
63
63
  })) : s("", !0)
@@ -69,8 +69,8 @@ const q = {
69
69
  t.data && a(l) ? {
70
70
  name: "actions",
71
71
  fn: u(() => [
72
- $(S, {
73
- filename: a(R),
72
+ E(U, {
73
+ filename: a(V),
74
74
  href: a(l),
75
75
  type: a(i).essence
76
76
  }, null, 8, ["filename", "href", "type"])
@@ -81,5 +81,5 @@ const q = {
81
81
  }
82
82
  });
83
83
  export {
84
- X as default
84
+ Y as default
85
85
  };
@@ -1,32 +1,32 @@
1
- import { defineComponent as d, computed as c, openBlock as p, createBlock as f, createSlots as x, withCtx as r, createTextVNode as u, createElementVNode as h, createVNode as a, unref as e } from "vue";
2
- import { ScalarVirtualText as y } from "@scalar/components";
3
- import { formatJsonOrYamlString as b } from "@scalar/oas-utils/helpers";
4
- import g from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
5
- import { useResponseBody as _ } from "../../../hooks/useResponseBody.js";
6
- import v from "./ResponseBodyDownload.vue.js";
7
- const N = /* @__PURE__ */ d({
1
+ import { defineComponent as c, computed as p, toRef as a, openBlock as f, createBlock as x, createSlots as u, withCtx as r, createTextVNode as h, createElementVNode as y, createVNode as s, unref as e } from "vue";
2
+ import { ScalarVirtualText as b } from "@scalar/components";
3
+ import { formatJsonOrYamlString as g } from "@scalar/oas-utils/helpers";
4
+ import _ from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
5
+ import { useResponseBody as v } from "../../../hooks/useResponseBody.js";
6
+ import k from "./ResponseBodyDownload.vue.js";
7
+ const R = /* @__PURE__ */ c({
8
8
  __name: "ResponseBodyVirtual",
9
9
  props: {
10
10
  content: {},
11
11
  data: {},
12
12
  headers: {}
13
13
  },
14
- setup(s) {
15
- const o = s, l = c(() => b(o.content)), { mimeType: i, attachmentFilename: m, dataUrl: n } = _({
16
- data: o.data,
17
- headers: o.headers
14
+ setup(l) {
15
+ const o = l, i = p(() => g(o.content)), { mimeType: m, attachmentFilename: d, dataUrl: n } = v({
16
+ data: a(o, "data"),
17
+ headers: a(o, "headers")
18
18
  });
19
- return (k, t) => (p(), f(g, { class: "!max-h-100% response-body-virtual overflow-x-auto" }, x({
19
+ return (w, t) => (f(), x(_, { class: "!max-h-100% response-body-virtual overflow-x-auto" }, u({
20
20
  title: r(() => [
21
- t[0] || (t[0] = u("Body"))
21
+ t[0] || (t[0] = h("Body"))
22
22
  ]),
23
23
  default: r(() => [
24
- t[1] || (t[1] = h("div", { class: "font-code text-xxs border-1/2 rounded-t border-b-0 px-2.5 py-1.5" }, " This response body is massive! Syntax highlighting won’t work here. ", -1)),
25
- a(e(y), {
24
+ t[1] || (t[1] = y("div", { class: "font-code text-xxs border-1/2 rounded-t border-b-0 px-2.5 py-1.5" }, " This response body is massive! Syntax highlighting won’t work here. ", -1)),
25
+ s(e(b), {
26
26
  containerClass: "custom-scroll scalar-code-block border-1/2 rounded-b flex flex-1 max-h-screen",
27
27
  contentClass: "language-plaintext whitespace-pre font-code text-base",
28
28
  lineHeight: 20,
29
- text: l.value
29
+ text: i.value
30
30
  }, null, 8, ["text"])
31
31
  ]),
32
32
  _: 2
@@ -34,10 +34,10 @@ const N = /* @__PURE__ */ d({
34
34
  e(n) ? {
35
35
  name: "actions",
36
36
  fn: r(() => [
37
- a(v, {
38
- filename: e(m),
37
+ s(k, {
38
+ filename: e(d),
39
39
  href: e(n),
40
- type: e(i).essence
40
+ type: e(m).essence
41
41
  }, null, 8, ["filename", "href", "type"])
42
42
  ]),
43
43
  key: "0"
@@ -46,5 +46,5 @@ const N = /* @__PURE__ */ d({
46
46
  }
47
47
  });
48
48
  export {
49
- N as default
49
+ R as default
50
50
  };
@@ -34,7 +34,7 @@ const W = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, $ = {
34
34
  }));
35
35
  }, k = (o) => {
36
36
  o != null && o.createNew && x.name === "request" && f();
37
- }, w = "2.3.16";
37
+ }, w = "2.3.18";
38
38
  return R(() => a.hotKeys.on(k)), v(() => a.hotKeys.off(k)), (o, e) => (l(), u("div", W, [
39
39
  s("div", {
40
40
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {