@scalar/api-client 2.3.15 → 2.3.17

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 (29) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
  3. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  4. package/dist/components/ScalarAsciiArt.vue2.js +2 -1
  5. package/dist/hooks/useResponseBody.d.ts +4 -3
  6. package/dist/hooks/useResponseBody.d.ts.map +1 -1
  7. package/dist/hooks/useResponseBody.js +15 -15
  8. package/dist/style.css +1 -1
  9. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  10. package/dist/views/Request/Request.vue.js +2 -2
  11. package/dist/views/Request/Request.vue2.js +39 -36
  12. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  13. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  14. package/dist/views/Request/RequestSection/RequestSection.vue2.js +58 -58
  15. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  16. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  17. package/dist/views/Request/RequestSidebar.vue2.js +72 -69
  18. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  19. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +31 -31
  20. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +20 -20
  21. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts +5 -0
  22. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  23. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  24. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +56 -59
  25. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +5 -1
  26. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  27. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
  28. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +40 -34
  29. package/package.json +113 -113
@@ -1,4 +1,4 @@
1
- import { defineComponent as ge, useId as Se, reactive as ke, ref as Re, watch as H, onMounted as ye, onBeforeUnmount as xe, computed as D, openBlock as l, createElementBlock as k, Fragment as $, withDirectives as K, createVNode as p, unref as t, normalizeClass as h, createSlots as we, withCtx as d, createElementVNode as n, createBlock as u, createCommentVNode as b, toDisplayString as B, isRef as Ie, withKeys as q, withModifiers as g, vShow as U, renderList as G, createTextVNode as M, nextTick as Ce } from "vue";
1
+ import { defineComponent as ge, useId as Se, reactive as ke, ref as Re, watch as H, onMounted as ye, onBeforeUnmount as xe, computed as D, openBlock as r, createElementBlock as b, Fragment as $, withDirectives as K, createVNode as p, unref as t, normalizeClass as g, createSlots as we, withCtx as d, createElementVNode as n, createBlock as u, createCommentVNode as v, toDisplayString as B, isRef as Ie, withKeys as q, withModifiers as S, vShow as U, renderList as G, createTextVNode as M, nextTick as Ce } from "vue";
2
2
  import { ScalarIcon as P, ScalarSearchInput as De, ScalarSearchResultList as $e, ScalarSearchResultItem as qe, ScalarButton as Me } from "@scalar/components";
3
3
  import { LibraryIcon as Pe } from "@scalar/icons";
4
4
  import { useToasts as Te } from "@scalar/use-toasts";
@@ -31,7 +31,10 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
31
31
  }, ot = {
32
32
  key: 1,
33
33
  class: "contents"
34
- }, st = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, at = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, Mt = /* @__PURE__ */ ge({
34
+ }, st = {
35
+ key: 0,
36
+ class: "empty-sidebar-item-content px-2.5 py-2.5"
37
+ }, at = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, Mt = /* @__PURE__ */ ge({
35
38
  __name: "RequestSidebar",
36
39
  emits: ["newTab", "clearDrafts"],
37
40
  setup(rt, { emit: Q }) {
@@ -46,14 +49,14 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
46
49
  activeRequest: te,
47
50
  activeWorkspaceRequests: E,
48
51
  activeWorkspace: oe
49
- } = Ae(), { findRequestParents: se, events: R, requestMutators: L, requests: y } = _, { handleDragEnd: ae, isDroppable: re } = Ke(
52
+ } = Ae(), { findRequestParents: se, events: R, requestMutators: L, requests: x } = _, { handleDragEnd: ae, isDroppable: re } = Ke(
50
53
  oe,
51
54
  _
52
55
  ), { replace: N } = _e(), le = () => {
53
56
  R.commandPalette.emit({
54
57
  commandName: "Import from OpenAPI/Swagger/Postman/cURL"
55
58
  });
56
- }, O = Se(), { toast: ne } = Te(), S = ke({ open: !1 }), m = Re(!1);
59
+ }, O = Se(), { toast: ne } = Te(), k = ke({ open: !1 }), m = Re(!1);
57
60
  H(
58
61
  te,
59
62
  (s) => {
@@ -64,18 +67,18 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
64
67
  { immediate: !0 }
65
68
  );
66
69
  const {
67
- searchText: v,
68
- searchResultsWithPlaceholderResults: x,
69
- selectedSearchResult: w,
70
+ searchText: h,
71
+ searchResultsWithPlaceholderResults: w,
72
+ selectedSearchResult: I,
70
73
  onSearchResultClick: ie,
71
74
  fuseSearch: ue,
72
- searchInputRef: I,
75
+ searchInputRef: C,
73
76
  searchResultRefs: ce,
74
77
  navigateSearchResults: z,
75
78
  selectSearchResult: de
76
79
  } = Oe(), F = (s) => {
77
80
  var e;
78
- s && (s.toggleSidebar && ee(), s.focusRequestSearch && ((e = I.value) == null || e.focus()));
81
+ s && (s.toggleSidebar && ee(), s.focusRequestSearch && ((e = C.value) == null || e.focus()));
79
82
  };
80
83
  ye(() => R.hotKeys.on(F)), xe(() => {
81
84
  R.hotKeys.off(F);
@@ -95,8 +98,8 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
95
98
  ),
96
99
  (s, e) => {
97
100
  s.forEach((o, a) => {
98
- var r, f, W;
99
- if (i !== "modal" && o !== e[a] && ((f = (r = c.value[a]) == null ? void 0 : r.info) == null ? void 0 : f.title) !== "Drafts" && c.value[a]) {
101
+ var l, f, W;
102
+ if (i !== "modal" && o !== e[a] && ((f = (l = c.value[a]) == null ? void 0 : l.info) == null ? void 0 : f.title) !== "Drafts" && c.value[a]) {
100
103
  const A = c.value[a];
101
104
  if (!A)
102
105
  return;
@@ -108,14 +111,14 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
108
111
  );
109
112
  const fe = D(() => {
110
113
  var f;
111
- const s = x.value;
114
+ const s = w.value;
112
115
  if (!s.length)
113
116
  return "No results found";
114
- const e = (f = s[w.value]) == null ? void 0 : f.item;
117
+ const e = (f = s[I.value]) == null ? void 0 : f.item;
115
118
  if (!e)
116
119
  return "No result selected";
117
- const o = v.value.length ? `${s.length} result${s.length === 1 ? "" : "s"} found, ` : "", a = `, HTTP Method ${e.httpVerb}, Path ${e.path}`, r = `${e.title} ${a}`;
118
- return `${o}Selected: ${r}`;
120
+ const o = h.value.length ? `${s.length} result${s.length === 1 ? "" : "s"} found, ` : "", a = `, HTTP Method ${e.httpVerb}, Path ${e.path}`, l = `${e.title} ${a}`;
121
+ return `${o}Selected: ${l}`;
119
122
  }), pe = () => {
120
123
  const s = c.value.find(
121
124
  (o) => {
@@ -124,7 +127,7 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
124
127
  }
125
128
  );
126
129
  if (s && s.requests.forEach((o) => {
127
- y[o] && L.delete(y[o], s.uid);
130
+ x[o] && L.delete(x[o], s.uid);
128
131
  }), E.value.length) {
129
132
  const o = c.value[0], a = o == null ? void 0 : o.requests[0];
130
133
  a && N({
@@ -143,29 +146,29 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
143
146
  }));
144
147
  }
145
148
  }, ve = () => {
146
- m.value = !m.value, m.value || (v.value = ""), m.value && Ce(() => {
149
+ m.value = !m.value, m.value || (h.value = ""), m.value && Ce(() => {
147
150
  var s;
148
- return (s = I.value) == null ? void 0 : s.focus();
151
+ return (s = C.value) == null ? void 0 : s.focus();
149
152
  });
150
- }, C = D(
153
+ }, y = D(
151
154
  () => Ue(
152
155
  c.value,
153
156
  E.value,
154
- y
157
+ x
155
158
  )
156
159
  ), he = D(() => i === "modal" && V.value ? [V.value] : c.value);
157
- return (s, e) => (l(), k($, null, [
160
+ return (s, e) => (r(), b($, null, [
158
161
  K(p(t(je), {
159
- class: h([t(T) ? "sidebar-active-width" : ""])
162
+ class: g([t(T) ? "sidebar-active-width" : ""])
160
163
  }, we({
161
164
  content: d(() => [
162
165
  n("div", Xe, [
163
166
  n("div", {
164
- class: h(["size-8", { "xl:hidden": t(i) !== "modal" }])
167
+ class: g(["size-8", { "xl:hidden": t(i) !== "modal" }])
165
168
  }, null, 2),
166
- t(i) !== "modal" ? (l(), u(t(Je), { key: 0 })) : b("", !0),
167
- t(i) !== "modal" ? (l(), k("span", Ye, " / ")) : b("", !0),
168
- t(i) !== "modal" ? (l(), u(Le, { key: 2 })) : b("", !0),
169
+ t(i) !== "modal" ? (r(), u(t(Je), { key: 0 })) : v("", !0),
170
+ t(i) !== "modal" ? (r(), b("span", Ye, " / ")) : v("", !0),
171
+ t(i) !== "modal" ? (r(), u(Le, { key: 2 })) : v("", !0),
169
172
  n("button", {
170
173
  "aria-pressed": m.value,
171
174
  class: "ml-auto",
@@ -182,54 +185,54 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
182
185
  K(n("div", tt, [
183
186
  p(t(De), {
184
187
  ref_key: "searchInputRef",
185
- ref: I,
186
- modelValue: t(v),
187
- "onUpdate:modelValue": e[0] || (e[0] = (o) => Ie(v) ? v.value = o : null),
188
+ ref: C,
189
+ modelValue: t(h),
190
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => Ie(h) ? h.value = o : null),
188
191
  "aria-controls": t(O),
189
192
  label: fe.value,
190
193
  sidebar: "",
191
194
  onInput: t(ue),
192
195
  onKeydown: [
193
- e[1] || (e[1] = q(g((o) => t(z)("down"), ["stop"]), ["down"])),
194
- e[2] || (e[2] = q(g((o) => t(de)(), ["stop"]), ["enter"])),
195
- e[3] || (e[3] = q(g((o) => t(z)("up"), ["stop"]), ["up"]))
196
+ e[1] || (e[1] = q(S((o) => t(z)("down"), ["stop"]), ["down"])),
197
+ e[2] || (e[2] = q(S((o) => t(de)(), ["stop"]), ["enter"])),
198
+ e[3] || (e[3] = q(S((o) => t(z)("up"), ["stop"]), ["up"]))
196
199
  ]
197
200
  }, null, 8, ["modelValue", "aria-controls", "label", "onInput"])
198
201
  ], 512), [
199
202
  [U, m.value]
200
203
  ]),
201
204
  n("div", {
202
- class: h(["gap-1/2 flex flex-1 flex-col overflow-visible overflow-y-auto px-3 pb-3 pt-0", [
205
+ class: g(["gap-1/2 flex flex-1 flex-col overflow-visible overflow-y-auto px-3 pb-3 pt-0", [
203
206
  {
204
207
  "pb-14": t(i) !== "modal"
205
208
  },
206
209
  {
207
- "h-[calc(100%-273.5px)]": C.value
210
+ "h-[calc(100%-273.5px)]": y.value
208
211
  }
209
212
  ]]),
210
- onDragenter: e[6] || (e[6] = g(() => {
213
+ onDragenter: e[6] || (e[6] = S(() => {
211
214
  }, ["prevent"])),
212
- onDragover: e[7] || (e[7] = g(() => {
215
+ onDragover: e[7] || (e[7] = S(() => {
213
216
  }, ["prevent"]))
214
217
  }, [
215
- t(v) ? (l(), u(t($e), {
218
+ t(h) ? (r(), u(t($e), {
216
219
  key: 0,
217
220
  id: t(O),
218
221
  "aria-label": "Search Results",
219
222
  class: "gap-px",
220
- noResults: !t(x).length
223
+ noResults: !t(w).length
221
224
  }, {
222
225
  default: d(() => [
223
- (l(!0), k($, null, G(t(x), (o, a) => (l(), u(t(qe), {
226
+ (r(!0), b($, null, G(t(w), (o, a) => (r(), u(t(qe), {
224
227
  id: `#search-input-${o.item.id}`,
225
228
  key: o.refIndex,
226
229
  ref_for: !0,
227
- ref: (r) => t(ce)[a] = r,
228
- active: t(w) === a,
230
+ ref: (l) => t(ce)[a] = l,
231
+ active: t(I) === a,
229
232
  class: "px-2",
230
233
  href: o.item.link,
231
- onClick: g((r) => t(ie)(o), ["prevent"]),
232
- onFocus: (r) => w.value = a
234
+ onClick: S((l) => t(ie)(o), ["prevent"]),
235
+ onFocus: (l) => I.value = a
233
236
  }, {
234
237
  addon: d(() => [
235
238
  e[9] || (e[9] = n("span", { class: "sr-only" }, "HTTP Method:", -1)),
@@ -245,35 +248,35 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
245
248
  }, 1032, ["id", "active", "href", "onClick", "onFocus"]))), 128))
246
249
  ]),
247
250
  _: 1
248
- }, 8, ["id", "noResults"])) : (l(), k("nav", ot, [
249
- (l(!0), k($, null, G(he.value, (o) => {
251
+ }, 8, ["id", "noResults"])) : (r(), b("nav", ot, [
252
+ (r(!0), b($, null, G(he.value, (o) => {
250
253
  var a;
251
- return l(), u(Ge, {
254
+ return r(), u(Ge, {
252
255
  key: o.uid,
253
256
  isDraggable: t(i) !== "modal" && ((a = o.info) == null ? void 0 : a.title) !== "Drafts",
254
257
  isDroppable: t(re),
255
- menuItem: S,
258
+ menuItem: k,
256
259
  parentUids: [],
257
260
  uid: o.uid,
258
- onNewTab: e[4] || (e[4] = (r, f) => X("newTab", { name: r, uid: f })),
261
+ onNewTab: e[4] || (e[4] = (l, f) => X("newTab", { name: l, uid: f })),
259
262
  onOnDragEnd: t(ae),
260
- onOpenMenu: e[5] || (e[5] = (r) => Object.assign(S, r))
263
+ onOpenMenu: e[5] || (e[5] = (l) => Object.assign(k, l))
261
264
  }, {
262
265
  leftIcon: d(() => {
263
- var r;
266
+ var l;
264
267
  return [
265
- ((r = o.info) == null ? void 0 : r.title) === "Drafts" ? (l(), u(t(P), {
268
+ ((l = o.info) == null ? void 0 : l.title) === "Drafts" ? (r(), u(t(P), {
266
269
  key: 0,
267
270
  class: "text-sidebar-c-2 group-hover:hidden",
268
271
  icon: "Scribble",
269
272
  thickness: "2.25"
270
- })) : (l(), u(t(Pe), {
273
+ })) : (r(), u(t(Pe), {
271
274
  key: 1,
272
275
  class: "text-sidebar-c-2 size-3.5 min-w-3.5 stroke-2 group-hover:hidden",
273
276
  src: o["x-scalar-icon"] || "interface-content-folder"
274
277
  }, null, 8, ["src"])),
275
278
  n("div", {
276
- class: h({
279
+ class: g({
277
280
  "rotate-90": t(Y)[o.uid]
278
281
  })
279
282
  }, [
@@ -293,11 +296,11 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
293
296
  ]),
294
297
  button: d(() => [
295
298
  n("div", {
296
- class: h({
297
- "empty-sidebar-item": C.value
299
+ class: g({
300
+ "empty-sidebar-item": y.value
298
301
  })
299
302
  }, [
300
- n("div", st, [
303
+ y.value ? (r(), b("div", st, [
301
304
  n("div", at, [
302
305
  p(j, {
303
306
  art: t(Ve),
@@ -312,11 +315,11 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
312
315
  n("b", { class: "font-medium" }, "Let's Get Started"),
313
316
  n("p", { class: "mt-2" }, " Create request, folder, collection or import from OpenAPI/Postman ")
314
317
  ], -1))
315
- ]),
316
- t(i) !== "modal" ? (l(), u(t(Me), {
317
- key: 0,
318
- class: h(["mb-1.5 hidden h-fit w-full p-1.5 opacity-0", {
319
- "flex opacity-100": C.value
318
+ ])) : v("", !0),
319
+ t(i) !== "modal" ? (r(), u(t(Me), {
320
+ key: 1,
321
+ class: g(["mb-1.5 hidden h-fit w-full p-1.5 opacity-0", {
322
+ "flex opacity-100": y.value
320
323
  }]),
321
324
  onClick: le
322
325
  }, {
@@ -324,9 +327,9 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
324
327
  M(" Import Collection ")
325
328
  ])),
326
329
  _: 1
327
- }, 8, ["class"])) : b("", !0),
328
- t(i) !== "modal" ? (l(), u(ze, {
329
- key: 1,
330
+ }, 8, ["class"])) : v("", !0),
331
+ t(i) !== "modal" ? (r(), u(ze, {
332
+ key: 2,
330
333
  click: t(R).commandPalette.emit,
331
334
  hotkey: "K"
332
335
  }, {
@@ -334,7 +337,7 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
334
337
  M(" Add Item ")
335
338
  ])),
336
339
  _: 1
337
- }, 8, ["click"])) : b("", !0)
340
+ }, 8, ["click"])) : v("", !0)
338
341
  ], 2)
339
342
  ]),
340
343
  _: 2
@@ -347,13 +350,13 @@ const Xe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Ye
347
350
  ]), 1032, ["class"]), [
348
351
  [U, t(T)]
349
352
  ]),
350
- t(i) !== "modal" && S ? (l(), u(Be, {
353
+ t(i) !== "modal" && k ? (r(), u(Be, {
351
354
  key: 0,
352
- menuItem: S,
355
+ menuItem: k,
353
356
  onClearDrafts: pe,
354
- onCloseMenu: e[8] || (e[8] = (o) => S.open = !1),
357
+ onCloseMenu: e[8] || (e[8] = (o) => k.open = !1),
355
358
  onToggleWatchMode: me
356
- }, null, 8, ["menuItem"])) : b("", !0)
359
+ }, null, 8, ["menuItem"])) : v("", !0)
357
360
  ], 64));
358
361
  }
359
362
  });
@@ -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
  };
@@ -1,4 +1,9 @@
1
+ import type { Collection, Operation } from '@scalar/oas-utils/entities/spec';
2
+ import type { Workspace } from '@scalar/oas-utils/entities/workspace';
1
3
  type __VLS_Props = {
4
+ collection: Collection;
5
+ operation: Operation;
6
+ workspace: Workspace;
2
7
  numWorkspaceRequests: number;
3
8
  };
4
9
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":"AAsLA,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAC;;AA0NF,wBAOG"}
1
+ {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":"AAoKA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAcrE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,SAAS,EAAE,SAAS,CAAA;IACpB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAC;;AAkNF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseEmpty.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1cab2af3"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-464c4989"]]);
5
5
  export {
6
- r as default
6
+ s as default
7
7
  };