@scalar/api-client 2.0.40 → 2.0.42

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 +18 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +1 -1
  5. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +1 -1
  6. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +11 -11
  7. package/dist/components/Search/SearchButton.vue.d.ts.map +1 -1
  8. package/dist/components/Search/SearchButton.vue.js +5 -28
  9. package/dist/components/Search/SearchButton.vue2.js +28 -2
  10. package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
  11. package/dist/components/SideNav/SideHelp.vue.js +26 -28
  12. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  13. package/dist/components/SideNav/SideNav.vue.js +2 -2
  14. package/dist/components/SideNav/SideNav.vue2.js +5 -5
  15. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  16. package/dist/components/SideNav/SideNavLink.vue.js +6 -6
  17. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  18. package/dist/components/Sidebar/Sidebar.vue.js +14 -10
  19. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  20. package/dist/components/Sidebar/SidebarButton.vue.js +4 -4
  21. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  22. package/dist/style.css +1 -1
  23. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  24. package/dist/views/Request/Request.vue.js +1 -1
  25. package/dist/views/Request/Request.vue2.js +118 -112
  26. package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
  27. package/dist/views/Request/RequestSection/RequestAuth.vue.js +2 -2
  28. package/dist/views/Request/RequestSection/RequestAuth.vue2.js +58 -57
  29. package/package.json +8 -8
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, ref as Q, computed as $, 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 p, withModifiers as H, createCommentVNode as w, capitalize as B, pushScopeId as z, popScopeId as E } from "vue";
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
2
  import L from "../../../components/DataTable/DataTableCell.vue.js";
3
3
  import K from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
4
  import { useWorkspace as G } from "../../../store/workspace.js";
@@ -7,10 +7,10 @@ import { ScalarComboboxMultiselect as J, ScalarButton as N, ScalarIcon as X } fr
7
7
  import { camelToTitleWords as Y } from "@scalar/oas-utils/helpers";
8
8
  import { ADD_AUTH_OPTIONS as Z, ADD_AUTH_DICT as ee } from "../consts/new-auth-options.js";
9
9
  import te from "../../../components/DataTable/DataTable.vue.js";
10
- import c from "../../../components/DataTable/DataTableRow.vue.js";
10
+ import m from "../../../components/DataTable/DataTableRow.vue.js";
11
11
  import le from "../../../components/DataTable/DataTableHeader.vue.js";
12
12
  import ae from "../components/OAuth2.vue.js";
13
- const oe = (k) => (z("data-v-a3784b0e"), 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)), de = { class: "pl-2" }, re = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/delete:opacity-100 request-meta-buttons pr-2" }, ke = /* @__PURE__ */ O({
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({
14
14
  __name: "RequestAuth",
15
15
  props: {
16
16
  title: {}
@@ -20,12 +20,12 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
20
20
  activeCollection: S,
21
21
  activeRequest: V,
22
22
  activeSecurityRequirements: F,
23
- activeSecuritySchemes: T,
23
+ activeSecuritySchemes: w,
24
24
  isReadOnly: U,
25
25
  requestMutators: A,
26
26
  securitySchemeMutators: g,
27
- securitySchemes: C
28
- } = G(), D = Q(null), R = (a) => {
27
+ securitySchemes: T
28
+ } = G(), C = Q(null), D = (a) => {
29
29
  switch (a == null ? void 0 : a.type) {
30
30
  case "apiKey":
31
31
  return `${B(a.in)}`;
@@ -38,17 +38,17 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
38
38
  default:
39
39
  return "None";
40
40
  }
41
- }, I = $(
41
+ }, R = I(
42
42
  () => {
43
43
  var e;
44
- const a = (e = S.value) == null ? void 0 : e.securitySchemeDict, o = F.value.flatMap((d) => {
45
- const t = Object.keys(d);
46
- return t.length === 0 && U.value ? { id: "none", label: "None", labelWithoutId: "None" } : t.flatMap((r) => {
44
+ const a = (e = S.value) == null ? void 0 : e.securitySchemeDict, o = F.value.flatMap((r) => {
45
+ const t = Object.keys(r);
46
+ return t.length === 0 && U.value ? { id: "none", label: "None", labelWithoutId: "None" } : t.flatMap((d) => {
47
47
  if (!a) return [];
48
- const s = a[r], q = C[s], M = R(q);
48
+ const s = a[d], q = T[s], M = D(q);
49
49
  return {
50
50
  id: s,
51
- label: `${M} (${r})`,
51
+ label: `${M} (${d})`,
52
52
  labelWithoutId: M
53
53
  };
54
54
  });
@@ -56,16 +56,16 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
56
56
  if (U.value)
57
57
  return o;
58
58
  {
59
- const d = V.value.securitySchemeUids.map((t) => {
60
- const r = C[t], s = R(r);
59
+ const r = V.value.securitySchemeUids.map((t) => {
60
+ const d = T[t], s = D(d);
61
61
  return {
62
62
  id: t,
63
- label: "name" in r && r.name.length ? `${s} (${r.name})` : s,
63
+ label: "name" in d && d.name.length ? `${s} (${d.name})` : s,
64
64
  labelWithoutId: s
65
65
  };
66
66
  });
67
67
  return [
68
- { label: "Select auth", options: [...o, ...d] },
68
+ { label: "Select auth", options: [...o, ...r] },
69
69
  {
70
70
  label: "Add new auth",
71
71
  options: Z
@@ -73,25 +73,25 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
73
73
  ];
74
74
  }
75
75
  }
76
- ), f = $({
76
+ ), p = I({
77
77
  // Grab the selected OR first security scheme
78
- get: () => I.value.flatMap(
78
+ get: () => R.value.flatMap(
79
79
  (o) => "options" in o ? o.options : o
80
80
  ).filter(
81
81
  ({ id: o }) => {
82
- var e, d;
83
- return (d = (e = V.value) == null ? void 0 : e.selectedSecuritySchemeUids) == null ? void 0 : d.find(
82
+ var e, r;
83
+ return (r = (e = V.value) == null ? void 0 : e.selectedSecuritySchemeUids) == null ? void 0 : r.find(
84
84
  (t) => t === o
85
85
  );
86
86
  }
87
87
  ),
88
88
  // Update the selected auth per this request
89
89
  set: (a) => {
90
- var e, d, t, r;
90
+ var e, r, t, d;
91
91
  const o = a.find(
92
92
  (s) => ee[s.id]
93
93
  );
94
- o != null && o.payload && S.value ? ((r = (t = (d = (e = D.value) == null ? void 0 : e.comboboxPopoverRef) == null ? void 0 : d.popoverButtonRef) == null ? void 0 : t.el) == null || r.click(), g.add(
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(
95
95
  o.payload,
96
96
  S.value.uid,
97
97
  V.value,
@@ -102,10 +102,10 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
102
102
  a.map((s) => s.id)
103
103
  );
104
104
  }
105
- }), m = (a, o, e) => g.edit(a.uid ?? "", o, e), P = $(() => f.value.length > 1 ? f.value.map(({ labelWithoutId: a }) => a).join(", ") : f.value.length ? f.value[0].label : "None"), W = (a) => g.delete(a, V.value);
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
106
  return (a, o) => (i(), x(K, {
107
107
  class: "group/params",
108
- itemCount: I.value.length
108
+ itemCount: p.value.length
109
109
  }, {
110
110
  title: l(() => [
111
111
  b("div", ue, h(a.title), 1)
@@ -117,19 +117,19 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
117
117
  columns: [""]
118
118
  }, {
119
119
  default: l(() => [
120
- u(n(c), null, {
120
+ u(n(m), null, {
121
121
  default: l(() => [
122
122
  u(n(le), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
123
123
  default: l(() => [
124
124
  u(n(J), {
125
125
  ref_key: "comboboxRef",
126
- ref: D,
127
- modelValue: f.value,
128
- "onUpdate:modelValue": o[0] || (o[0] = (e) => f.value = e),
126
+ ref: C,
127
+ modelValue: p.value,
128
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => p.value = e),
129
129
  class: "text-xs w-full",
130
130
  fullWidth: "",
131
131
  multiple: "",
132
- options: I.value,
132
+ options: R.value,
133
133
  style: { "margin-left": "120px" },
134
134
  teleport: ""
135
135
  }, {
@@ -141,8 +141,9 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
141
141
  }, {
142
142
  default: l(() => [
143
143
  ne,
144
- b("span", de, h(P.value), 1),
144
+ b("span", re, h(P.value), 1),
145
145
  u(n(X), {
146
+ class: "mr-2.5",
146
147
  icon: "ChevronDown",
147
148
  size: "xs"
148
149
  })
@@ -158,10 +159,10 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
158
159
  ]),
159
160
  _: 1
160
161
  }),
161
- (i(!0), _(v, null, j(n(T), (e, d) => (i(), _(v, {
162
+ (i(!0), _(v, null, j(n(w), (e, r) => (i(), _(v, {
162
163
  key: e.uid
163
164
  }, [
164
- n(T).length > 1 ? (i(), x(n(c), {
165
+ n(w).length > 1 ? (i(), x(n(m), {
165
166
  key: 0,
166
167
  class: "group/delete"
167
168
  }, {
@@ -170,16 +171,16 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
170
171
  default: l(() => {
171
172
  var t;
172
173
  return [
173
- p(h((t = f.value[d]) == null ? void 0 : t.label) + " ", 1),
174
- b("div", re, [
174
+ c(h((t = p.value[r]) == null ? void 0 : t.label) + " ", 1),
175
+ b("div", de, [
175
176
  u(n(N), {
176
177
  class: "px-1 transition-none",
177
178
  size: "sm",
178
179
  variant: "ghost",
179
- onClick: H((r) => W(e), ["stop"])
180
+ onClick: H((d) => W(e), ["stop"])
180
181
  }, {
181
182
  default: l(() => [
182
- p(" Delete ")
183
+ c(" Delete ")
183
184
  ]),
184
185
  _: 2
185
186
  }, 1032, ["onClick"])
@@ -190,26 +191,26 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
190
191
  }, 1024)
191
192
  ]),
192
193
  _: 2
193
- }, 1024)) : w("", !0),
194
+ }, 1024)) : $("", !0),
194
195
  e.type === "http" ? (i(), _(v, { key: 1 }, [
195
- e.scheme === "bearer" ? (i(), x(n(c), { key: 0 }, {
196
+ e.scheme === "bearer" ? (i(), x(n(m), { key: 0 }, {
196
197
  default: l(() => [
197
198
  u(y, {
198
199
  id: `http-bearer-token-${e.uid}`,
199
200
  modelValue: e.value,
200
201
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
201
202
  type: "password",
202
- "onUpdate:modelValue": (t) => m(e, "value", t)
203
+ "onUpdate:modelValue": (t) => f(e, "value", t)
203
204
  }, {
204
205
  default: l(() => [
205
- p(" Bearer Token ")
206
+ c(" Bearer Token ")
206
207
  ]),
207
208
  _: 2
208
209
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
209
210
  ]),
210
211
  _: 2
211
212
  }, 1024)) : e.scheme === "basic" ? (i(), _(v, { key: 1 }, [
212
- u(n(c), null, {
213
+ u(n(m), null, {
213
214
  default: l(() => [
214
215
  u(y, {
215
216
  id: `http-basic-username-${e.uid}`,
@@ -217,77 +218,77 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
217
218
  modelValue: e.value,
218
219
  placeholder: "ScalarEnjoyer01",
219
220
  required: "",
220
- "onUpdate:modelValue": (t) => m(e, "value", t)
221
+ "onUpdate:modelValue": (t) => f(e, "value", t)
221
222
  }, {
222
223
  default: l(() => [
223
- p(" Username ")
224
+ c(" Username ")
224
225
  ]),
225
226
  _: 2
226
227
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
227
228
  ]),
228
229
  _: 2
229
230
  }, 1024),
230
- u(n(c), null, {
231
+ u(n(m), null, {
231
232
  default: l(() => [
232
233
  u(y, {
233
234
  id: `http-basic-password-${e.uid}`,
234
235
  modelValue: e.secondValue,
235
236
  placeholder: "xxxxxx",
236
237
  type: "password",
237
- "onUpdate:modelValue": (t) => m(e, "secondValue", t)
238
+ "onUpdate:modelValue": (t) => f(e, "secondValue", t)
238
239
  }, {
239
240
  default: l(() => [
240
- p(" Password ")
241
+ c(" Password ")
241
242
  ]),
242
243
  _: 2
243
244
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
244
245
  ]),
245
246
  _: 2
246
247
  }, 1024)
247
- ], 64)) : w("", !0)
248
+ ], 64)) : $("", !0)
248
249
  ], 64)) : e.type === "apiKey" ? (i(), _(v, { key: 2 }, [
249
- n(U) ? (i(), x(n(c), { key: 1 }, {
250
+ n(U) ? (i(), x(n(m), { key: 1 }, {
250
251
  default: l(() => [
251
252
  u(y, {
252
253
  id: `api-key-value-${e.uid}`,
253
254
  modelValue: e.value,
254
255
  placeholder: "Value",
255
- "onUpdate:modelValue": (t) => m(e, "value", t)
256
+ "onUpdate:modelValue": (t) => f(e, "value", t)
256
257
  }, {
257
258
  default: l(() => [
258
- p(h(e.name), 1)
259
+ c(h(e.name), 1)
259
260
  ]),
260
261
  _: 2
261
262
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
262
263
  ]),
263
264
  _: 2
264
265
  }, 1024)) : (i(), _(v, { key: 0 }, [
265
- u(n(c), null, {
266
+ u(n(m), null, {
266
267
  default: l(() => [
267
268
  u(y, {
268
269
  id: `api-key-name-${e.uid}`,
269
270
  modelValue: e.name,
270
271
  placeholder: "api-key",
271
- "onUpdate:modelValue": (t) => m(e, "name", t)
272
+ "onUpdate:modelValue": (t) => f(e, "name", t)
272
273
  }, {
273
274
  default: l(() => [
274
- p(" Name ")
275
+ c(" Name ")
275
276
  ]),
276
277
  _: 2
277
278
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
278
279
  ]),
279
280
  _: 2
280
281
  }, 1024),
281
- u(n(c), null, {
282
+ u(n(m), null, {
282
283
  default: l(() => [
283
284
  u(y, {
284
285
  id: `api-key-value-add-${e.uid}`,
285
286
  modelValue: e.value,
286
287
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
287
- "onUpdate:modelValue": (t) => m(e, "value", t)
288
+ "onUpdate:modelValue": (t) => f(e, "value", t)
288
289
  }, {
289
290
  default: l(() => [
290
- p(" Value ")
291
+ c(" Value ")
291
292
  ]),
292
293
  _: 2
293
294
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -298,7 +299,7 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
298
299
  ], 64)) : e.type === "oauth2" ? (i(), x(n(ae), {
299
300
  key: 3,
300
301
  scheme: e
301
- }, null, 8, ["scheme"])) : w("", !0)
302
+ }, null, 8, ["scheme"])) : $("", !0)
302
303
  ], 64))), 128))
303
304
  ]),
304
305
  _: 1
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.40",
21
+ "version": "2.0.42",
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.26",
131
- "@scalar/oas-utils": "0.2.22",
132
- "@scalar/object-utils": "1.1.5",
133
- "@scalar/themes": "0.9.19",
134
- "@scalar/use-codemirror": "0.11.9",
130
+ "@scalar/components": "0.12.27",
131
+ "@scalar/oas-utils": "0.2.23",
135
132
  "@scalar/draggable": "0.1.4",
136
- "@scalar/use-toasts": "0.7.4",
137
- "@scalar/use-tooltip": "1.0.2"
133
+ "@scalar/themes": "0.9.19",
134
+ "@scalar/object-utils": "1.1.5",
135
+ "@scalar/use-codemirror": "0.11.10",
136
+ "@scalar/use-tooltip": "1.0.2",
137
+ "@scalar/use-toasts": "0.7.4"
138
138
  },
139
139
  "devDependencies": {
140
140
  "@types/content-type": "^1.1.8",