@scalar/api-client 2.0.42 → 2.0.43

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 (28) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarHistory.vue.js +43 -46
  4. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  5. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  6. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +3 -2
  7. package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
  8. package/dist/components/SubpageHeader.vue.js +2 -2
  9. package/dist/components/SubpageHeader.vue2.js +10 -9
  10. package/dist/layouts/App/create-api-client-app.d.ts +2 -2
  11. package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -4
  12. package/dist/libs/create-client.d.ts +2 -2
  13. package/dist/libs/normalizeHeaders.d.ts +12 -0
  14. package/dist/libs/normalizeHeaders.d.ts.map +1 -0
  15. package/dist/libs/normalizeHeaders.js +25 -0
  16. package/dist/libs/sendRequest.d.ts.map +1 -1
  17. package/dist/libs/sendRequest.js +22 -20
  18. package/dist/store/workspace.d.ts +4 -4
  19. package/dist/style.css +1 -1
  20. package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
  21. package/dist/views/Request/RequestSection/RequestAuth.vue.js +2 -2
  22. package/dist/views/Request/RequestSection/RequestAuth.vue2.js +147 -117
  23. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts +7 -10
  24. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  25. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +23 -24
  26. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  27. package/dist/views/Request/consts/mediaTypes.js +5 -0
  28. package/package.json +6 -6
@@ -1,81 +1,87 @@
1
- import { defineComponent as O, ref as Q, computed as I, openBlock as i, createBlock as x, withCtx as l, createElementVNode as b, toDisplayString as h, createVNode as u, unref as n, createElementBlock as _, Fragment as v, renderList as j, createTextVNode as c, withModifiers as H, createCommentVNode as $, capitalize as B, pushScopeId as z, popScopeId as E } from "vue";
2
- import L from "../../../components/DataTable/DataTableCell.vue.js";
3
- import K from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
- import { useWorkspace as G } from "../../../store/workspace.js";
5
- import y from "./RequestAuthDataTableInput.vue.js";
6
- import { ScalarComboboxMultiselect as J, ScalarButton as N, ScalarIcon as X } from "@scalar/components";
7
- import { camelToTitleWords as Y } from "@scalar/oas-utils/helpers";
8
- import { ADD_AUTH_OPTIONS as Z, ADD_AUTH_DICT as ee } from "../consts/new-auth-options.js";
9
- import te from "../../../components/DataTable/DataTable.vue.js";
1
+ import { defineComponent as H, ref as E, computed as I, openBlock as i, createBlock as b, withCtx as a, createElementVNode as _, toDisplayString as k, createVNode as u, unref as n, createElementBlock as p, Fragment as v, renderList as A, createTextVNode as f, withModifiers as B, createCommentVNode as $, capitalize as F, pushScopeId as K, popScopeId as L } from "vue";
2
+ import G from "../../../components/DataTable/DataTableCell.vue.js";
3
+ import J from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
+ import { useWorkspace as X } from "../../../store/workspace.js";
5
+ import x from "./RequestAuthDataTableInput.vue.js";
6
+ import { ScalarComboboxMultiselect as Y, ScalarButton as W, ScalarIcon as P } from "@scalar/components";
7
+ import { camelToTitleWords as Z } from "@scalar/oas-utils/helpers";
8
+ import { ADD_AUTH_OPTIONS as ee, ADD_AUTH_DICT as te } from "../consts/new-auth-options.js";
9
+ import le from "../../../components/DataTable/DataTable.vue.js";
10
10
  import m from "../../../components/DataTable/DataTableRow.vue.js";
11
- import le from "../../../components/DataTable/DataTableHeader.vue.js";
12
- import ae from "../components/OAuth2.vue.js";
13
- const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex gap-1" }, ne = /* @__PURE__ */ oe(() => /* @__PURE__ */ b("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), re = { class: "custom-scroll mr-1.5 pl-2" }, de = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/delete:opacity-100 request-meta-buttons pr-2" }, ke = /* @__PURE__ */ O({
11
+ import ae from "../../../components/DataTable/DataTableHeader.vue.js";
12
+ import oe from "../components/OAuth2.vue.js";
13
+ const w = (h) => (K("data-v-411d2b35"), h = h(), L(), h), ue = { class: "flex gap-1" }, ne = /* @__PURE__ */ w(() => /* @__PURE__ */ _("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), ie = {
14
+ key: 0,
15
+ class: "flex relative scroll-timeline-x w-full"
16
+ }, de = /* @__PURE__ */ w(() => /* @__PURE__ */ _("div", { class: "fade-left" }, null, -1)), re = { class: "flex flex-1 gap-0.75 mr-1.5" }, se = /* @__PURE__ */ w(() => /* @__PURE__ */ _("div", { class: "fade-right" }, null, -1)), ce = {
17
+ key: 1,
18
+ class: "pl-2"
19
+ }, pe = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/delete:opacity-100 request-meta-buttons pr-2" }, Ue = /* @__PURE__ */ H({
14
20
  __name: "RequestAuth",
15
21
  props: {
16
22
  title: {}
17
23
  },
18
- setup(k) {
24
+ setup(h) {
19
25
  const {
20
26
  activeCollection: S,
21
27
  activeRequest: V,
22
- activeSecurityRequirements: F,
23
- activeSecuritySchemes: w,
24
- isReadOnly: U,
25
- requestMutators: A,
26
- securitySchemeMutators: g,
28
+ activeSecurityRequirements: q,
29
+ activeSecuritySchemes: C,
30
+ isReadOnly: g,
31
+ requestMutators: O,
32
+ securitySchemeMutators: U,
27
33
  securitySchemes: T
28
- } = G(), C = Q(null), D = (a) => {
29
- switch (a == null ? void 0 : a.type) {
34
+ } = X(), D = E(null), R = (l) => {
35
+ switch (l == null ? void 0 : l.type) {
30
36
  case "apiKey":
31
- return `${B(a.in)}`;
37
+ return `${F(l.in)}`;
32
38
  case "http":
33
- return `${B(a.scheme)} Authentication`;
39
+ return `${F(l.scheme)} Authentication`;
34
40
  case "oauth2":
35
- return Y(a.flow.type);
41
+ return Z(l.flow.type);
36
42
  case "openIdConnect":
37
43
  return "Open ID Connect";
38
44
  default:
39
45
  return "None";
40
46
  }
41
- }, R = I(
47
+ }, M = I(
42
48
  () => {
43
49
  var e;
44
- const a = (e = S.value) == null ? void 0 : e.securitySchemeDict, o = F.value.flatMap((r) => {
50
+ const l = (e = S.value) == null ? void 0 : e.securitySchemeDict, o = q.value.flatMap((r) => {
45
51
  const t = Object.keys(r);
46
- return t.length === 0 && U.value ? { id: "none", label: "None", labelWithoutId: "None" } : t.flatMap((d) => {
47
- if (!a) return [];
48
- const s = a[d], q = T[s], M = D(q);
52
+ return t.length === 0 && g.value ? { id: "none", label: "None", labelWithoutId: "None" } : t.flatMap((s) => {
53
+ if (!l) return [];
54
+ const c = l[s], z = T[c], N = R(z);
49
55
  return {
50
- id: s,
51
- label: `${M} (${d})`,
52
- labelWithoutId: M
56
+ id: c,
57
+ label: `${N} (${s})`,
58
+ labelWithoutId: N
53
59
  };
54
60
  });
55
61
  });
56
- if (U.value)
62
+ if (g.value)
57
63
  return o;
58
64
  {
59
65
  const r = V.value.securitySchemeUids.map((t) => {
60
- const d = T[t], s = D(d);
66
+ const s = T[t], c = R(s);
61
67
  return {
62
68
  id: t,
63
- label: "name" in d && d.name.length ? `${s} (${d.name})` : s,
64
- labelWithoutId: s
69
+ label: "name" in s && s.name.length ? `${c} (${s.name})` : c,
70
+ labelWithoutId: c
65
71
  };
66
72
  });
67
73
  return [
68
74
  { label: "Select auth", options: [...o, ...r] },
69
75
  {
70
76
  label: "Add new auth",
71
- options: Z
77
+ options: ee
72
78
  }
73
79
  ];
74
80
  }
75
81
  }
76
- ), p = I({
82
+ ), d = I({
77
83
  // Grab the selected OR first security scheme
78
- get: () => R.value.flatMap(
84
+ get: () => M.value.flatMap(
79
85
  (o) => "options" in o ? o.options : o
80
86
  ).filter(
81
87
  ({ id: o }) => {
@@ -86,64 +92,88 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
86
92
  }
87
93
  ),
88
94
  // Update the selected auth per this request
89
- set: (a) => {
90
- var e, r, t, d;
91
- const o = a.find(
92
- (s) => ee[s.id]
95
+ set: (l) => {
96
+ var e, r, t, s;
97
+ const o = l.find(
98
+ (c) => te[c.id]
93
99
  );
94
- o != null && o.payload && S.value ? ((d = (t = (r = (e = C.value) == null ? void 0 : e.comboboxPopoverRef) == null ? void 0 : r.popoverButtonRef) == null ? void 0 : t.el) == null || d.click(), g.add(
100
+ o != null && o.payload && S.value ? ((s = (t = (r = (e = D.value) == null ? void 0 : e.comboboxPopoverRef) == null ? void 0 : r.popoverButtonRef) == null ? void 0 : t.el) == null || s.click(), U.add(
95
101
  o.payload,
96
102
  S.value.uid,
97
103
  V.value,
98
104
  !0
99
- )) : A.edit(
105
+ )) : O.edit(
100
106
  V.value.uid,
101
107
  "selectedSecuritySchemeUids",
102
- a.map((s) => s.id)
108
+ l.map((c) => c.id)
103
109
  );
104
110
  }
105
- }), f = (a, o, e) => g.edit(a.uid ?? "", o, e), P = I(() => p.value.length > 1 ? p.value.map(({ labelWithoutId: a }) => a).join(", ") : p.value.length ? p.value[0].label : "None"), W = (a) => g.delete(a, V.value);
106
- return (a, o) => (i(), x(K, {
111
+ }), y = (l, o, e) => U.edit(l.uid ?? "", o, e);
112
+ I(() => d.value.length > 1 ? d.value.map(({ labelWithoutId: l }) => l).join(", ") : d.value.length ? d.value[0].label : "None");
113
+ const Q = (l) => U.delete(l, V.value), j = (l) => {
114
+ const o = d.value.filter(
115
+ (e) => e.id !== l
116
+ );
117
+ d.value = o;
118
+ };
119
+ return (l, o) => (i(), b(J, {
107
120
  class: "group/params",
108
- itemCount: p.value.length
121
+ itemCount: d.value.length
109
122
  }, {
110
- title: l(() => [
111
- b("div", ue, h(a.title), 1)
123
+ title: a(() => [
124
+ _("div", ue, k(l.title), 1)
112
125
  ]),
113
- default: l(() => [
114
- b("form", null, [
115
- u(n(te), {
126
+ default: a(() => [
127
+ _("form", null, [
128
+ u(n(le), {
116
129
  class: "flex-1",
117
130
  columns: [""]
118
131
  }, {
119
- default: l(() => [
132
+ default: a(() => [
120
133
  u(n(m), null, {
121
- default: l(() => [
122
- u(n(le), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
123
- default: l(() => [
124
- u(n(J), {
134
+ default: a(() => [
135
+ u(n(ae), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
136
+ default: a(() => [
137
+ u(n(Y), {
125
138
  ref_key: "comboboxRef",
126
- ref: C,
127
- modelValue: p.value,
128
- "onUpdate:modelValue": o[0] || (o[0] = (e) => p.value = e),
139
+ ref: D,
140
+ modelValue: d.value,
141
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => d.value = e),
129
142
  class: "text-xs w-full",
130
143
  fullWidth: "",
131
144
  multiple: "",
132
- options: R.value,
145
+ options: M.value,
133
146
  style: { "margin-left": "120px" },
134
147
  teleport: ""
135
148
  }, {
136
- default: l(() => [
137
- u(n(N), {
149
+ default: a(() => [
150
+ u(n(W), {
138
151
  class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start",
139
152
  fullWidth: "",
140
153
  variant: "ghost"
141
154
  }, {
142
- default: l(() => [
155
+ default: a(() => [
143
156
  ne,
144
- b("span", re, h(P.value), 1),
145
- u(n(X), {
146
- class: "mr-2.5",
157
+ d.value.length ? (i(), p("div", ie, [
158
+ de,
159
+ _("div", re, [
160
+ (i(!0), p(v, null, A(d.value, (e) => (i(), p("span", {
161
+ key: e.id,
162
+ class: "cm-pill flex items-center mx-0"
163
+ }, [
164
+ f(k(e.labelWithoutId) + " ", 1),
165
+ u(n(P), {
166
+ class: "ml-1 cursor-pointer hover:text-c-1",
167
+ icon: "Close",
168
+ size: "xs",
169
+ onClick: B((r) => j(e.id), ["stop"])
170
+ }, null, 8, ["onClick"])
171
+ ]))), 128))
172
+ ]),
173
+ se
174
+ ])) : (i(), p("div", ce, " None ")),
175
+ u(n(P), {
176
+ class: "min-w-3 ml-auto mr-2.5",
147
177
  icon: "ChevronDown",
148
178
  size: "xs"
149
179
  })
@@ -159,28 +189,28 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
159
189
  ]),
160
190
  _: 1
161
191
  }),
162
- (i(!0), _(v, null, j(n(w), (e, r) => (i(), _(v, {
192
+ (i(!0), p(v, null, A(n(C), (e, r) => (i(), p(v, {
163
193
  key: e.uid
164
194
  }, [
165
- n(w).length > 1 ? (i(), x(n(m), {
195
+ n(C).length > 1 ? (i(), b(n(m), {
166
196
  key: 0,
167
197
  class: "group/delete"
168
198
  }, {
169
- default: l(() => [
170
- u(L, { class: "text-c-2 pl-2 text-xs font-medium flex items-center justify-between bg-b-2" }, {
171
- default: l(() => {
199
+ default: a(() => [
200
+ u(G, { class: "text-c-2 pl-2 text-xs font-medium flex items-center justify-between bg-b-2" }, {
201
+ default: a(() => {
172
202
  var t;
173
203
  return [
174
- c(h((t = p.value[r]) == null ? void 0 : t.label) + " ", 1),
175
- b("div", de, [
176
- u(n(N), {
204
+ f(k((t = d.value[r]) == null ? void 0 : t.label) + " ", 1),
205
+ _("div", pe, [
206
+ u(n(W), {
177
207
  class: "px-1 transition-none",
178
208
  size: "sm",
179
209
  variant: "ghost",
180
- onClick: H((d) => W(e), ["stop"])
210
+ onClick: B((s) => Q(e), ["stop"])
181
211
  }, {
182
- default: l(() => [
183
- c(" Delete ")
212
+ default: a(() => [
213
+ f(" Delete ")
184
214
  ]),
185
215
  _: 2
186
216
  }, 1032, ["onClick"])
@@ -192,36 +222,36 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
192
222
  ]),
193
223
  _: 2
194
224
  }, 1024)) : $("", !0),
195
- e.type === "http" ? (i(), _(v, { key: 1 }, [
196
- e.scheme === "bearer" ? (i(), x(n(m), { key: 0 }, {
197
- default: l(() => [
198
- u(y, {
225
+ e.type === "http" ? (i(), p(v, { key: 1 }, [
226
+ e.scheme === "bearer" ? (i(), b(n(m), { key: 0 }, {
227
+ default: a(() => [
228
+ u(x, {
199
229
  id: `http-bearer-token-${e.uid}`,
200
230
  modelValue: e.value,
201
231
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
202
232
  type: "password",
203
- "onUpdate:modelValue": (t) => f(e, "value", t)
233
+ "onUpdate:modelValue": (t) => y(e, "value", t)
204
234
  }, {
205
- default: l(() => [
206
- c(" Bearer Token ")
235
+ default: a(() => [
236
+ f(" Bearer Token ")
207
237
  ]),
208
238
  _: 2
209
239
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
210
240
  ]),
211
241
  _: 2
212
- }, 1024)) : e.scheme === "basic" ? (i(), _(v, { key: 1 }, [
242
+ }, 1024)) : e.scheme === "basic" ? (i(), p(v, { key: 1 }, [
213
243
  u(n(m), null, {
214
- default: l(() => [
215
- u(y, {
244
+ default: a(() => [
245
+ u(x, {
216
246
  id: `http-basic-username-${e.uid}`,
217
247
  class: "text-c-2",
218
248
  modelValue: e.value,
219
249
  placeholder: "ScalarEnjoyer01",
220
250
  required: "",
221
- "onUpdate:modelValue": (t) => f(e, "value", t)
251
+ "onUpdate:modelValue": (t) => y(e, "value", t)
222
252
  }, {
223
- default: l(() => [
224
- c(" Username ")
253
+ default: a(() => [
254
+ f(" Username ")
225
255
  ]),
226
256
  _: 2
227
257
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -229,16 +259,16 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
229
259
  _: 2
230
260
  }, 1024),
231
261
  u(n(m), null, {
232
- default: l(() => [
233
- u(y, {
262
+ default: a(() => [
263
+ u(x, {
234
264
  id: `http-basic-password-${e.uid}`,
235
265
  modelValue: e.secondValue,
236
266
  placeholder: "xxxxxx",
237
267
  type: "password",
238
- "onUpdate:modelValue": (t) => f(e, "secondValue", t)
268
+ "onUpdate:modelValue": (t) => y(e, "secondValue", t)
239
269
  }, {
240
- default: l(() => [
241
- c(" Password ")
270
+ default: a(() => [
271
+ f(" Password ")
242
272
  ]),
243
273
  _: 2
244
274
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -246,33 +276,33 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
246
276
  _: 2
247
277
  }, 1024)
248
278
  ], 64)) : $("", !0)
249
- ], 64)) : e.type === "apiKey" ? (i(), _(v, { key: 2 }, [
250
- n(U) ? (i(), x(n(m), { key: 1 }, {
251
- default: l(() => [
252
- u(y, {
279
+ ], 64)) : e.type === "apiKey" ? (i(), p(v, { key: 2 }, [
280
+ n(g) ? (i(), b(n(m), { key: 1 }, {
281
+ default: a(() => [
282
+ u(x, {
253
283
  id: `api-key-value-${e.uid}`,
254
284
  modelValue: e.value,
255
285
  placeholder: "Value",
256
- "onUpdate:modelValue": (t) => f(e, "value", t)
286
+ "onUpdate:modelValue": (t) => y(e, "value", t)
257
287
  }, {
258
- default: l(() => [
259
- c(h(e.name), 1)
288
+ default: a(() => [
289
+ f(k(e.name), 1)
260
290
  ]),
261
291
  _: 2
262
292
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
263
293
  ]),
264
294
  _: 2
265
- }, 1024)) : (i(), _(v, { key: 0 }, [
295
+ }, 1024)) : (i(), p(v, { key: 0 }, [
266
296
  u(n(m), null, {
267
- default: l(() => [
268
- u(y, {
297
+ default: a(() => [
298
+ u(x, {
269
299
  id: `api-key-name-${e.uid}`,
270
300
  modelValue: e.name,
271
301
  placeholder: "api-key",
272
- "onUpdate:modelValue": (t) => f(e, "name", t)
302
+ "onUpdate:modelValue": (t) => y(e, "name", t)
273
303
  }, {
274
- default: l(() => [
275
- c(" Name ")
304
+ default: a(() => [
305
+ f(" Name ")
276
306
  ]),
277
307
  _: 2
278
308
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -280,15 +310,15 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
280
310
  _: 2
281
311
  }, 1024),
282
312
  u(n(m), null, {
283
- default: l(() => [
284
- u(y, {
313
+ default: a(() => [
314
+ u(x, {
285
315
  id: `api-key-value-add-${e.uid}`,
286
316
  modelValue: e.value,
287
317
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
288
- "onUpdate:modelValue": (t) => f(e, "value", t)
318
+ "onUpdate:modelValue": (t) => y(e, "value", t)
289
319
  }, {
290
- default: l(() => [
291
- c(" Value ")
320
+ default: a(() => [
321
+ f(" Value ")
292
322
  ]),
293
323
  _: 2
294
324
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -296,7 +326,7 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
296
326
  _: 2
297
327
  }, 1024)
298
328
  ], 64))
299
- ], 64)) : e.type === "oauth2" ? (i(), x(n(ae), {
329
+ ], 64)) : e.type === "oauth2" ? (i(), b(n(oe), {
300
330
  key: 3,
301
331
  scheme: e
302
332
  }, null, 8, ["scheme"])) : $("", !0)
@@ -311,5 +341,5 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
311
341
  }
312
342
  });
313
343
  export {
314
- ke as default
344
+ Ue as default
315
345
  };
@@ -1,15 +1,12 @@
1
+ type Header = {
2
+ name: string;
3
+ value: string;
4
+ required: boolean;
5
+ };
1
6
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
- headers: {
3
- name: string;
4
- value: string;
5
- required: boolean;
6
- }[];
7
+ headers: Header[];
7
8
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
8
- headers: {
9
- name: string;
10
- value: string;
11
- required: boolean;
12
- }[];
9
+ headers: Header[];
13
10
  }>>>, {}, {}>;
14
11
  export default _default;
15
12
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":";aA2DW;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;aAApD;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;AA0H/D,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AAkDA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;;aAGrD,MAAM,EAAE;;aAAR,MAAM,EAAE;;AA+GnB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,51 +1,50 @@
1
- import { defineComponent as u, openBlock as t, createBlock as n, withCtx as r, createTextVNode as d, createElementBlock as o, Fragment as f, renderList as p, createVNode as m } from "vue";
2
- import _ from "../../../components/DataTable/DataTable.vue.js";
3
- import x from "../../../components/DataTable/DataTableRow.vue.js";
4
- import l from "../../../components/DataTable/DataTableText.vue.js";
5
- import h from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
6
- const k = {
1
+ import { defineComponent as c, openBlock as e, createBlock as a, withCtx as t, createTextVNode as i, createElementBlock as s, Fragment as d, renderList as f, createVNode as o } from "vue";
2
+ import u from "../../../components/DataTable/DataTable.vue.js";
3
+ import p from "../../../components/DataTable/DataTableRow.vue.js";
4
+ import m from "../../../components/DataTable/DataTableText.vue.js";
5
+ import _ from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
6
+ const x = {
7
7
  key: 1,
8
8
  class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
9
- }, B = /* @__PURE__ */ u({
9
+ }, B = /* @__PURE__ */ c({
10
10
  __name: "ResponseHeaders",
11
11
  props: {
12
12
  headers: {}
13
13
  },
14
- setup(b) {
15
- const c = (e) => e.split("-").map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join("-");
16
- return (e, a) => (t(), n(h, {
14
+ setup(h) {
15
+ return (r, k) => (e(), a(_, {
17
16
  defaultOpen: !1,
18
- itemCount: e.headers.length
17
+ itemCount: r.headers.length
19
18
  }, {
20
- title: r(() => [
21
- d("Headers")
19
+ title: t(() => [
20
+ i("Headers")
22
21
  ]),
23
- default: r(() => [
24
- e.headers.length ? (t(), n(_, {
22
+ default: t(() => [
23
+ r.headers.length ? (e(), a(u, {
25
24
  key: 0,
26
25
  columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
27
26
  scroll: ""
28
27
  }, {
29
- default: r(() => [
30
- (t(!0), o(f, null, p(e.headers, (s, i) => (t(), n(x, {
31
- key: i,
28
+ default: t(() => [
29
+ (e(!0), s(d, null, f(r.headers, (n, l) => (e(), a(p, {
30
+ key: l,
32
31
  class: "text-c-1"
33
32
  }, {
34
- default: r(() => [
35
- m(l, {
33
+ default: t(() => [
34
+ o(m, {
36
35
  class: "sticky left-0 z-1 bg-b-1 max-w-48",
37
- text: c(s.name)
36
+ text: n.name
38
37
  }, null, 8, ["text"]),
39
- m(l, {
38
+ o(m, {
40
39
  class: "z-0",
41
- text: s.value
40
+ text: n.value
42
41
  }, null, 8, ["text"])
43
42
  ]),
44
43
  _: 2
45
44
  }, 1024))), 128))
46
45
  ]),
47
46
  _: 1
48
- })) : (t(), o("div", k, " No Headers "))
47
+ })) : (e(), s("div", x, " No Headers "))
49
48
  ]),
50
49
  _: 1
51
50
  }, 8, ["itemCount"]));
@@ -1 +1 @@
1
- {"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CAuGjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
1
+ {"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CA4GjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
@@ -5,6 +5,11 @@ const n = {
5
5
  "application/javascript": { extension: ".js", raw: !0 },
6
6
  "application/json": { extension: ".json", raw: !0, language: "json" },
7
7
  "application/ld+json": { extension: ".jsonld", raw: !0, language: "json" },
8
+ "application/problem+json": {
9
+ extension: ".json",
10
+ raw: !0,
11
+ language: "json"
12
+ },
8
13
  "application/msword": { extension: ".doc" },
9
14
  "application/octet-stream": { extension: ".bin" },
10
15
  "application/ogg": { extension: ".ogx" },
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.42",
21
+ "version": "2.0.43",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -127,14 +127,14 @@
127
127
  "vue-router": "^4.3.0",
128
128
  "whatwg-mimetype": "^4.0.0",
129
129
  "zod": "^3.22.4",
130
- "@scalar/components": "0.12.27",
131
- "@scalar/oas-utils": "0.2.23",
130
+ "@scalar/components": "0.12.28",
132
131
  "@scalar/draggable": "0.1.4",
133
- "@scalar/themes": "0.9.19",
132
+ "@scalar/oas-utils": "0.2.24",
134
133
  "@scalar/object-utils": "1.1.5",
134
+ "@scalar/themes": "0.9.20",
135
+ "@scalar/use-toasts": "0.7.4",
135
136
  "@scalar/use-codemirror": "0.11.10",
136
- "@scalar/use-tooltip": "1.0.2",
137
- "@scalar/use-toasts": "0.7.4"
137
+ "@scalar/use-tooltip": "1.0.2"
138
138
  },
139
139
  "devDependencies": {
140
140
  "@types/content-type": "^1.1.8",