@scalar/api-client 2.0.48 → 2.0.50

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.
@@ -1,180 +1,200 @@
1
- import { defineComponent as j, ref as z, computed as I, openBlock as i, createBlock as k, withCtx as a, createElementVNode as h, toDisplayString as U, createVNode as u, unref as n, createElementBlock as c, Fragment as v, renderList as B, createTextVNode as p, withModifiers as E, createCommentVNode as w, capitalize as W, pushScopeId as H, popScopeId as Q } from "vue";
2
- import K from "../../../components/DataTable/DataTableCell.vue.js";
3
- import L from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
- import { useWorkspace as G } from "../../../store/workspace.js";
1
+ import { defineComponent as K, ref as L, computed as C, openBlock as i, createBlock as b, withCtx as o, createElementVNode as h, toDisplayString as g, createVNode as u, unref as n, createElementBlock as c, Fragment as v, renderList as q, createTextVNode as f, withModifiers as z, createCommentVNode as A, capitalize as E, pushScopeId as Q, popScopeId as G } from "vue";
2
+ import J from "../../../components/DataTable/DataTableCell.vue.js";
3
+ import X from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
+ import { useWorkspace as Y } from "../../../store/workspace.js";
5
5
  import V from "./RequestAuthDataTableInput.vue.js";
6
- import { ScalarComboboxMultiselect as J, ScalarButton as X, ScalarIcon as O } 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";
10
- import f 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 C = (S) => (H("data-v-24e41ef0"), S = S(), Q(), S), oe = { class: "flex gap-1" }, ue = /* @__PURE__ */ C(() => /* @__PURE__ */ h("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), ne = {
6
+ import { ScalarComboboxMultiselect as Z, ScalarButton as ee, ScalarIcon as F } from "@scalar/components";
7
+ import { camelToTitleWords as te } from "@scalar/oas-utils/helpers";
8
+ import { ADD_AUTH_OPTIONS as le, ADD_AUTH_DICT as ae } from "../consts/new-auth-options.js";
9
+ import oe from "../../../components/DataTable/DataTable.vue.js";
10
+ import _ from "../../../components/DataTable/DataTableRow.vue.js";
11
+ import ue from "../../../components/DataTable/DataTableHeader.vue.js";
12
+ import ne from "../components/OAuth2.vue.js";
13
+ const D = (S) => (Q("data-v-afbf407f"), S = S(), G(), S), ie = { class: "flex gap-1" }, se = /* @__PURE__ */ D(() => /* @__PURE__ */ h("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 = {
14
14
  key: 0,
15
15
  class: "flex relative scroll-timeline-x w-full"
16
- }, ie = /* @__PURE__ */ C(() => /* @__PURE__ */ h("div", { class: "fade-left" }, null, -1)), de = { class: "flex flex-1 gap-0.75 mr-1.5 items-center" }, re = /* @__PURE__ */ C(() => /* @__PURE__ */ h("div", { class: "fade-right" }, null, -1)), se = {
16
+ }, de = /* @__PURE__ */ D(() => /* @__PURE__ */ h("div", { class: "fade-left" }, null, -1)), ce = { class: "flex flex-1 gap-0.75 mr-1.5 items-center" }, pe = /* @__PURE__ */ D(() => /* @__PURE__ */ h("div", { class: "fade-right" }, null, -1)), me = {
17
17
  key: 1,
18
18
  class: "pl-2"
19
- }, Se = /* @__PURE__ */ j({
19
+ }, $ = "*sclrMulti*", Te = /* @__PURE__ */ K({
20
20
  __name: "RequestAuth",
21
21
  props: {
22
22
  title: {}
23
23
  },
24
24
  setup(S) {
25
25
  const {
26
- activeCollection: g,
27
- activeRequest: b,
28
- activeSecurityRequirements: q,
29
- activeSecuritySchemes: T,
30
- isReadOnly: $,
31
- requestMutators: F,
32
- securitySchemeMutators: D,
33
- securitySchemes: N
34
- } = G(), R = z(null), A = (l) => {
35
- switch (l == null ? void 0 : l.type) {
26
+ activeCollection: T,
27
+ activeRequest: k,
28
+ activeSecurityRequirements: O,
29
+ activeSecuritySchemes: R,
30
+ isReadOnly: w,
31
+ requestMutators: P,
32
+ securitySchemeMutators: N,
33
+ securitySchemes: U
34
+ } = Y(), B = L(null), I = (t) => {
35
+ switch (t == null ? void 0 : t.type) {
36
36
  case "apiKey":
37
- return `${W(l.in)}`;
37
+ return `${E(t.in)}`;
38
38
  case "http":
39
- return `${W(l.scheme)} Authentication`;
39
+ return `${E(t.scheme)} Authentication`;
40
40
  case "oauth2":
41
- return Y(l.flow.type);
41
+ return te(t.flow.type);
42
42
  case "openIdConnect":
43
43
  return "Open ID Connect";
44
44
  default:
45
45
  return "None";
46
46
  }
47
- }, M = I(
47
+ }, j = C(
48
48
  () => {
49
49
  var e;
50
- const l = (e = g.value) == null ? void 0 : e.securitySchemeDict, o = q.value.flatMap((r) => {
51
- const t = Object.keys(r);
52
- return t.length === 0 && $.value ? { id: "none", label: "None", labelWithoutId: "None" } : t.flatMap((m) => {
53
- if (!l) return [];
54
- const s = l[m], y = N[s], x = A(y);
50
+ const t = (e = T.value) == null ? void 0 : e.securitySchemeDict, l = O.value.flatMap((d) => {
51
+ const a = Object.keys(d);
52
+ if (a.length === 0 && w.value)
53
+ return { id: "none", label: "None" };
54
+ if (!t) return [];
55
+ if (a.length > 1) {
56
+ const p = a.map((r) => {
57
+ const x = t[r];
58
+ return U[x];
59
+ }), s = p.map((r) => r.nameKey).join(" & ");
60
+ return {
61
+ id: $ + p.map((r) => r.uid).join($),
62
+ label: s
63
+ };
64
+ }
65
+ return a.flatMap((p) => {
66
+ const s = t[p], r = U[s], x = I(r);
55
67
  return {
56
68
  id: s,
57
- label: `${x} (${m})`,
58
- labelWithoutId: x
69
+ label: x
59
70
  };
60
71
  });
61
72
  });
62
- if ($.value)
63
- return o;
73
+ if (w.value)
74
+ return l;
64
75
  {
65
- const r = b.value.securitySchemeUids.map((s) => {
66
- const y = N[s], x = A(y);
76
+ const d = k.value.securitySchemeUids.map((s) => {
77
+ const r = U[s], x = I(r);
67
78
  return {
68
79
  id: s,
69
- label: "name" in y && y.name.length ? `${x} (${y.name})` : x,
70
- labelWithoutId: x
80
+ label: "name" in r && r.name.length ? `${x} (${r.name})` : x
71
81
  };
72
- }), t = b.value.selectedSecuritySchemeUids, m = r.filter(
73
- (s) => t.includes(s.id)
82
+ }), a = k.value.selectedSecuritySchemeUids, p = d.filter(
83
+ (s) => a.includes(s.id)
74
84
  );
75
85
  return [
76
- { label: "Select auth", options: [...o, ...m] },
86
+ { label: "Select auth", options: [...l, ...p] },
77
87
  {
78
88
  label: "Add new auth",
79
- options: Z
89
+ options: le
80
90
  }
81
91
  ];
82
92
  }
83
93
  }
84
- ), d = I({
94
+ ), M = (t) => {
95
+ if (t.startsWith($)) {
96
+ const l = t.split($);
97
+ return l.shift(), l;
98
+ } else
99
+ return [t];
100
+ }, m = C({
85
101
  // Grab the selected OR first security scheme
86
- get: () => M.value.flatMap(
87
- (o) => "options" in o ? o.options : o
88
- ).filter(
89
- ({ id: o }) => {
90
- var e, r;
91
- return (r = (e = b.value) == null ? void 0 : e.selectedSecuritySchemeUids) == null ? void 0 : r.find(
92
- (t) => t === o
93
- );
94
- }
95
- ),
102
+ get: () => {
103
+ var l;
104
+ const t = new Set(
105
+ ((l = k.value) == null ? void 0 : l.selectedSecuritySchemeUids) || []
106
+ );
107
+ return j.value.flatMap(
108
+ (e) => "options" in e ? e.options : e
109
+ ).filter(
110
+ (e) => M(e.id).some((d) => t.has(d))
111
+ );
112
+ },
96
113
  // Update the selected auth per this request
97
- set: (l) => {
98
- var e, r, t, m;
99
- const o = l.find(
100
- (s) => ee[s.id]
114
+ set: (t) => {
115
+ var e, d, a, p;
116
+ const l = t.find(
117
+ (s) => ae[s.id]
101
118
  );
102
- o != null && o.payload && g.value ? ((m = (t = (r = (e = R.value) == null ? void 0 : e.comboboxPopoverRef) == null ? void 0 : r.popoverButtonRef) == null ? void 0 : t.el) == null || m.click(), D.add(
103
- o.payload,
104
- g.value.uid,
105
- b.value,
119
+ l != null && l.payload && T.value ? ((p = (a = (d = (e = B.value) == null ? void 0 : e.comboboxPopoverRef) == null ? void 0 : d.popoverButtonRef) == null ? void 0 : a.el) == null || p.click(), N.add(
120
+ l.payload,
121
+ T.value.uid,
122
+ k.value,
106
123
  !0
107
- )) : F.edit(
108
- b.value.uid,
124
+ )) : P.edit(
125
+ k.value.uid,
109
126
  "selectedSecuritySchemeUids",
110
- l.map((s) => s.id)
127
+ t.flatMap((s) => M(s.id))
111
128
  );
112
129
  }
113
- }), _ = (l, o, e) => D.edit(l.uid ?? "", o, e);
114
- I(() => d.value.length > 1 ? d.value.map(({ labelWithoutId: l }) => l).join(", ") : d.value.length ? d.value[0].label : "None");
115
- const P = (l) => {
116
- const o = d.value.filter(
117
- (e) => e.id !== l
130
+ }), W = C(
131
+ () => m.value.flatMap(({ id: t }) => M(t)).map((t) => {
132
+ const l = U[t];
133
+ return `${I(l)} (${l.nameKey})`;
134
+ })
135
+ ), y = (t, l, e) => N.edit(t.uid ?? "", l, e), H = (t) => {
136
+ const l = m.value.filter(
137
+ (e) => e.id !== t
118
138
  );
119
- d.value = o;
139
+ m.value = l;
120
140
  };
121
- return (l, o) => (i(), k(L, {
141
+ return (t, l) => (i(), b(X, {
122
142
  class: "group/params",
123
- itemCount: d.value.length
143
+ itemCount: m.value.length
124
144
  }, {
125
- title: a(() => [
126
- h("div", oe, U(l.title), 1)
145
+ title: o(() => [
146
+ h("div", ie, g(t.title), 1)
127
147
  ]),
128
- default: a(() => [
148
+ default: o(() => [
129
149
  h("form", null, [
130
- u(n(te), {
150
+ u(n(oe), {
131
151
  class: "flex-1",
132
152
  columns: [""]
133
153
  }, {
134
- default: a(() => [
135
- u(n(f), null, {
136
- default: a(() => [
137
- u(n(le), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
138
- default: a(() => [
139
- u(n(J), {
154
+ default: o(() => [
155
+ u(n(_), null, {
156
+ default: o(() => [
157
+ u(n(ue), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
158
+ default: o(() => [
159
+ u(n(Z), {
140
160
  ref_key: "comboboxRef",
141
- ref: R,
142
- modelValue: d.value,
143
- "onUpdate:modelValue": o[0] || (o[0] = (e) => d.value = e),
161
+ ref: B,
162
+ modelValue: m.value,
163
+ "onUpdate:modelValue": l[0] || (l[0] = (e) => m.value = e),
144
164
  class: "text-xs w-full",
145
165
  fullWidth: "",
146
166
  multiple: "",
147
- options: M.value,
167
+ options: j.value,
148
168
  style: { "margin-left": "120px" },
149
169
  teleport: ""
150
170
  }, {
151
- default: a(() => [
152
- u(n(X), {
171
+ default: o(() => [
172
+ u(n(ee), {
153
173
  class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start",
154
174
  fullWidth: "",
155
175
  variant: "ghost"
156
176
  }, {
157
- default: a(() => [
158
- ue,
159
- d.value.length ? (i(), c("div", ne, [
160
- ie,
161
- h("div", de, [
162
- (i(!0), c(v, null, B(d.value, (e) => (i(), c("span", {
177
+ default: o(() => [
178
+ se,
179
+ m.value.length ? (i(), c("div", re, [
180
+ de,
181
+ h("div", ce, [
182
+ (i(!0), c(v, null, q(m.value, (e) => (i(), c("span", {
163
183
  key: e.id,
164
184
  class: "cm-pill flex items-center mx-0 h-fit"
165
185
  }, [
166
- p(U(e.labelWithoutId) + " ", 1),
167
- u(n(O), {
186
+ f(g(e.label) + " ", 1),
187
+ u(n(F), {
168
188
  class: "ml-1 cursor-pointer text-c-3 hover:text-c-1",
169
189
  icon: "Close",
170
190
  size: "xs",
171
- onClick: E((r) => P(e.id), ["stop"])
191
+ onClick: z((d) => H(e.id), ["stop"])
172
192
  }, null, 8, ["onClick"])
173
193
  ]))), 128))
174
194
  ]),
175
- re
176
- ])) : (i(), c("div", se, " None ")),
177
- u(n(O), {
195
+ pe
196
+ ])) : (i(), c("div", me, " None ")),
197
+ u(n(F), {
178
198
  class: "min-w-3 ml-auto mr-2.5",
179
199
  icon: "ChevronDown",
180
200
  size: "xs"
@@ -191,123 +211,120 @@ const C = (S) => (H("data-v-24e41ef0"), S = S(), Q(), S), oe = { class: "flex ga
191
211
  ]),
192
212
  _: 1
193
213
  }),
194
- (i(!0), c(v, null, B(n(T), (e, r) => (i(), c(v, {
214
+ (i(!0), c(v, null, q(n(R), (e, d) => (i(), c(v, {
195
215
  key: e.uid
196
216
  }, [
197
- n(T).length > 1 ? (i(), k(n(f), {
217
+ n(R).length > 1 ? (i(), b(n(_), {
198
218
  key: 0,
199
219
  class: "group/delete"
200
220
  }, {
201
- default: a(() => [
202
- u(K, { class: "text-c-2 pl-2 text-xs font-medium flex items-center bg-b-2" }, {
203
- default: a(() => {
204
- var t;
205
- return [
206
- p(U((t = d.value[r]) == null ? void 0 : t.label), 1)
207
- ];
208
- }),
221
+ default: o(() => [
222
+ u(J, { class: "text-c-2 pl-2 text-xs font-medium flex items-center bg-b-2" }, {
223
+ default: o(() => [
224
+ f(g(W.value[d]), 1)
225
+ ]),
209
226
  _: 2
210
227
  }, 1024)
211
228
  ]),
212
229
  _: 2
213
- }, 1024)) : w("", !0),
230
+ }, 1024)) : A("", !0),
214
231
  e.type === "http" ? (i(), c(v, { key: 1 }, [
215
- e.scheme === "bearer" ? (i(), k(n(f), { key: 0 }, {
216
- default: a(() => [
232
+ e.scheme === "bearer" ? (i(), b(n(_), { key: 0 }, {
233
+ default: o(() => [
217
234
  u(V, {
218
235
  id: `http-bearer-token-${e.uid}`,
219
236
  modelValue: e.value,
220
237
  placeholder: "Token",
221
238
  type: "password",
222
- "onUpdate:modelValue": (t) => _(e, "value", t)
239
+ "onUpdate:modelValue": (a) => y(e, "value", a)
223
240
  }, {
224
- default: a(() => [
225
- p(" Bearer Token ")
241
+ default: o(() => [
242
+ f(" Bearer Token ")
226
243
  ]),
227
244
  _: 2
228
245
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
229
246
  ]),
230
247
  _: 2
231
248
  }, 1024)) : e.scheme === "basic" ? (i(), c(v, { key: 1 }, [
232
- u(n(f), null, {
233
- default: a(() => [
249
+ u(n(_), null, {
250
+ default: o(() => [
234
251
  u(V, {
235
252
  id: `http-basic-username-${e.uid}`,
236
253
  class: "text-c-2",
237
254
  modelValue: e.value,
238
255
  placeholder: "ScalarEnjoyer01",
239
256
  required: "",
240
- "onUpdate:modelValue": (t) => _(e, "value", t)
257
+ "onUpdate:modelValue": (a) => y(e, "value", a)
241
258
  }, {
242
- default: a(() => [
243
- p(" Username ")
259
+ default: o(() => [
260
+ f(" Username ")
244
261
  ]),
245
262
  _: 2
246
263
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
247
264
  ]),
248
265
  _: 2
249
266
  }, 1024),
250
- u(n(f), null, {
251
- default: a(() => [
267
+ u(n(_), null, {
268
+ default: o(() => [
252
269
  u(V, {
253
270
  id: `http-basic-password-${e.uid}`,
254
271
  modelValue: e.secondValue,
255
272
  placeholder: "xxxxxx",
256
273
  type: "password",
257
- "onUpdate:modelValue": (t) => _(e, "secondValue", t)
274
+ "onUpdate:modelValue": (a) => y(e, "secondValue", a)
258
275
  }, {
259
- default: a(() => [
260
- p(" Password ")
276
+ default: o(() => [
277
+ f(" Password ")
261
278
  ]),
262
279
  _: 2
263
280
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
264
281
  ]),
265
282
  _: 2
266
283
  }, 1024)
267
- ], 64)) : w("", !0)
284
+ ], 64)) : A("", !0)
268
285
  ], 64)) : e.type === "apiKey" ? (i(), c(v, { key: 2 }, [
269
- n($) ? (i(), k(n(f), { key: 1 }, {
270
- default: a(() => [
286
+ n(w) ? (i(), b(n(_), { key: 1 }, {
287
+ default: o(() => [
271
288
  u(V, {
272
289
  id: `api-key-value-${e.uid}`,
273
290
  modelValue: e.value,
274
291
  placeholder: "Value",
275
- "onUpdate:modelValue": (t) => _(e, "value", t)
292
+ "onUpdate:modelValue": (a) => y(e, "value", a)
276
293
  }, {
277
- default: a(() => [
278
- p(U(e.name), 1)
294
+ default: o(() => [
295
+ f(g(e.name), 1)
279
296
  ]),
280
297
  _: 2
281
298
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
282
299
  ]),
283
300
  _: 2
284
301
  }, 1024)) : (i(), c(v, { key: 0 }, [
285
- u(n(f), null, {
286
- default: a(() => [
302
+ u(n(_), null, {
303
+ default: o(() => [
287
304
  u(V, {
288
305
  id: `api-key-name-${e.uid}`,
289
306
  modelValue: e.name,
290
307
  placeholder: "api-key",
291
- "onUpdate:modelValue": (t) => _(e, "name", t)
308
+ "onUpdate:modelValue": (a) => y(e, "name", a)
292
309
  }, {
293
- default: a(() => [
294
- p(" Name ")
310
+ default: o(() => [
311
+ f(" Name ")
295
312
  ]),
296
313
  _: 2
297
314
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
298
315
  ]),
299
316
  _: 2
300
317
  }, 1024),
301
- u(n(f), null, {
302
- default: a(() => [
318
+ u(n(_), null, {
319
+ default: o(() => [
303
320
  u(V, {
304
321
  id: `api-key-value-add-${e.uid}`,
305
322
  modelValue: e.value,
306
323
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
307
- "onUpdate:modelValue": (t) => _(e, "value", t)
324
+ "onUpdate:modelValue": (a) => y(e, "value", a)
308
325
  }, {
309
- default: a(() => [
310
- p(" Value ")
326
+ default: o(() => [
327
+ f(" Value ")
311
328
  ]),
312
329
  _: 2
313
330
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -315,10 +332,10 @@ const C = (S) => (H("data-v-24e41ef0"), S = S(), Q(), S), oe = { class: "flex ga
315
332
  _: 2
316
333
  }, 1024)
317
334
  ], 64))
318
- ], 64)) : e.type === "oauth2" ? (i(), k(n(ae), {
335
+ ], 64)) : e.type === "oauth2" ? (i(), b(n(ne), {
319
336
  key: 3,
320
337
  scheme: e
321
- }, null, 8, ["scheme"])) : w("", !0)
338
+ }, null, 8, ["scheme"])) : A("", !0)
322
339
  ], 64))), 128))
323
340
  ]),
324
341
  _: 1
@@ -330,5 +347,5 @@ const C = (S) => (H("data-v-24e41ef0"), S = S(), Q(), S), oe = { class: "flex ga
330
347
  }
331
348
  });
332
349
  export {
333
- Se as default
350
+ Te as default
334
351
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAq7BA,wBAKG"}
1
+ {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAs7BA,wBAKG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as K, computed as O, ref as W, openBlock as p, createElementBlock as D, Fragment as S, createElementVNode as a, createVNode as t, unref as e, withCtx as s, renderList as U, createBlock as x, withModifiers as h, normalizeClass as A, createTextVNode as k, toDisplayString as z, withKeys as F } from "vue";
1
+ import { defineComponent as K, computed as O, ref as W, openBlock as p, createElementBlock as D, Fragment as S, createElementVNode as a, createVNode as t, unref as e, withCtx as s, renderList as U, createBlock as x, withModifiers as w, normalizeClass as A, createTextVNode as k, toDisplayString as z, withKeys as F } from "vue";
2
2
  import I from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
3
  import { useWorkspace as L } from "../../../store/workspace.js";
4
4
  import { useModal as $, ScalarDropdown as N, ScalarContextMenu as P, ScalarDropdownItem as m, ScalarIcon as c, ScalarTooltip as q, ScalarDropdownDivider as G, ScalarButton as _, ScalarModal as V, ScalarTextField as H } from "@scalar/components";
@@ -8,36 +8,36 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
8
8
  /* @__PURE__ */ a("div", { class: "flex items-center text-c-2" }, [
9
9
  /* @__PURE__ */ a("span", null, "Only workspace cannot be deleted.")
10
10
  ])
11
- ], -1), se = /* @__PURE__ */ a("span", null, "Delete", -1), ae = { class: "flex items-center justify-center h-4 w-4" }, le = /* @__PURE__ */ a("span", null, "Create new workspace", -1), ne = { class: "flex gap-3" }, me = /* @__PURE__ */ K({
11
+ ], -1), se = /* @__PURE__ */ a("span", null, "Delete", -1), ae = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ a("span", null, "Create new workspace", -1), le = { class: "flex gap-3" }, me = /* @__PURE__ */ K({
12
12
  __name: "WorkspaceDropdown",
13
13
  setup(oe) {
14
- const { activeWorkspace: f, workspaces: d, workspaceMutators: g } = L(), { push: b } = J(), j = (l) => {
15
- l !== f.value.uid && b(`/workspace/${l}`);
16
- }, y = O(() => Object.keys(d).length === 1), B = () => Q.emit({ commandName: "Create Workspace" }), o = W(""), i = W(""), v = $(), w = $(), R = (l) => {
17
- o.value = d[l].name, i.value = l, v.show();
14
+ const { activeWorkspace: f, workspaces: d, workspaceMutators: g } = L(), { push: b } = J(), j = (n) => {
15
+ n !== f.value.uid && b(`/workspace/${n}`);
16
+ }, y = O(() => Object.keys(d).length === 1), B = () => Q.emit({ commandName: "Create Workspace" }), o = W(""), r = W(""), v = $(), h = $(), R = (n) => {
17
+ o.value = d[n].name, r.value = n, v.show();
18
18
  }, C = () => {
19
- o.value.trim() && (g.rename(i.value, o.value.trim()), v.hide());
20
- }, T = (l) => {
21
- o.value = d[l].name, i.value = l, w.show();
19
+ o.value.trim() && (g.rename(r.value, o.value.trim()), v.hide());
20
+ }, T = (n) => {
21
+ o.value = d[n].name, r.value = n, h.show();
22
22
  }, E = async () => {
23
23
  if (!y.value) {
24
- const l = f.value.uid === i.value, n = { ...d };
25
- if (delete n[i.value], g.delete(i.value), l) {
26
- const r = Object.keys(n)[0];
27
- await b(`/workspace/${r}/`);
24
+ const n = f.value.uid === r.value, l = { ...d };
25
+ if (delete l[r.value], g.delete(r.value), n) {
26
+ const i = Object.keys(l)[0];
27
+ await b(`/workspace/${i}/`);
28
28
  }
29
29
  }
30
- w.hide();
30
+ h.hide();
31
31
  };
32
- return (l, n) => (p(), D(S, null, [
32
+ return (n, l) => (p(), D(S, null, [
33
33
  a("div", X, [
34
34
  t(e(N), null, {
35
35
  items: s(() => [
36
- (p(!0), D(S, null, U(e(d), (r, u) => (p(), x(e(P), { key: u }, {
36
+ (p(!0), D(S, null, U(e(d), (i, u) => (p(), x(e(P), { key: u }, {
37
37
  trigger: s(() => [
38
38
  t(e(m), {
39
39
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
40
- onClick: h((M) => j(u), ["stop"])
40
+ onClick: w((M) => j(u), ["stop"])
41
41
  }, {
42
42
  default: s(() => [
43
43
  a("div", {
@@ -52,7 +52,7 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
52
52
  thickness: "3.5"
53
53
  })
54
54
  ], 2),
55
- k(" " + z(r.name), 1)
55
+ k(" " + z(i.name), 1)
56
56
  ]),
57
57
  _: 2
58
58
  }, 1032, ["onClick"])
@@ -84,7 +84,7 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
84
84
  t(e(m), {
85
85
  class: "flex w-full",
86
86
  disabled: "",
87
- onMousedown: n[0] || (n[0] = h(() => {
87
+ onMousedown: l[0] || (l[0] = w(() => {
88
88
  }, ["prevent"]))
89
89
  }, {
90
90
  default: s(() => [
@@ -106,7 +106,7 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
106
106
  })) : (p(), x(e(m), {
107
107
  key: 1,
108
108
  class: "flex !gap-2",
109
- onMousedown: h((M) => T(u), ["prevent"])
109
+ onMousedown: w((M) => T(u), ["prevent"])
110
110
  }, {
111
111
  default: s(() => [
112
112
  t(e(c), {
@@ -134,10 +134,11 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
134
134
  a("div", ae, [
135
135
  t(e(c), {
136
136
  class: "h-2.5",
137
- icon: "Add"
137
+ icon: "Add",
138
+ thickness: "3"
138
139
  })
139
140
  ]),
140
- le
141
+ ne
141
142
  ]),
142
143
  _: 1
143
144
  })
@@ -166,14 +167,14 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
166
167
  ]),
167
168
  t(e(V), {
168
169
  size: "sm",
169
- state: e(w),
170
+ state: e(h),
170
171
  title: `Delete ${o.value}`
171
172
  }, {
172
173
  default: s(() => [
173
174
  t(I, {
174
175
  variableName: o.value,
175
176
  warningMessage: "Warning: Deleting this will delete all items inside of this",
176
- onClose: n[1] || (n[1] = (r) => e(w).hide()),
177
+ onClose: l[1] || (l[1] = (i) => e(h).hide()),
177
178
  onDelete: E
178
179
  }, null, 8, ["variableName"])
179
180
  ]),
@@ -186,16 +187,16 @@ const X = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
186
187
  default: s(() => [
187
188
  t(e(H), {
188
189
  modelValue: o.value,
189
- "onUpdate:modelValue": n[2] || (n[2] = (r) => o.value = r),
190
+ "onUpdate:modelValue": l[2] || (l[2] = (i) => o.value = i),
190
191
  label: "Workspace",
191
192
  labelShadowColor: "var(--scalar-background-1)",
192
- onKeydown: F(h(C, ["prevent"]), ["enter"])
193
+ onKeydown: F(w(C, ["prevent"]), ["enter"])
193
194
  }, null, 8, ["modelValue", "onKeydown"]),
194
- a("div", ne, [
195
+ a("div", le, [
195
196
  t(e(_), {
196
197
  class: "flex-1",
197
198
  variant: "outlined",
198
- onClick: n[3] || (n[3] = (r) => e(v).hide())
199
+ onClick: l[3] || (l[3] = (i) => e(v).hide())
199
200
  }, {
200
201
  default: s(() => [
201
202
  k(" Cancel ")
@@ -2,7 +2,6 @@ import type { SecuritySchemePayload } from '@scalar/oas-utils/entities/workspace
2
2
  export type SecuritySchemeOption = {
3
3
  id: string;
4
4
  label: string;
5
- labelWithoutId: string;
6
5
  payload?: SecuritySchemePayload;
7
6
  };
8
7
  export type SecuritySchemeGroup = {