@scalar/api-client 2.0.46 → 2.0.47

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 (36) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  3. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  4. package/dist/components/HttpMethod/HttpMethod.vue2.js +10 -10
  5. package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
  6. package/dist/components/Search/SearchModal.vue.js +1 -1
  7. package/dist/components/Search/SearchModal.vue2.js +43 -41
  8. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  9. package/dist/components/SideNav/SideNav.vue.js +1 -1
  10. package/dist/components/SideNav/SideNav.vue2.js +22 -19
  11. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  12. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  13. package/dist/components/Sidebar/SidebarListElement.vue2.js +1 -1
  14. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -0
  15. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  16. package/dist/components/Sidebar/SidebarListElementActions.vue.js +22 -21
  17. package/dist/layouts/App/create-api-client-app.d.ts +11 -11
  18. package/dist/layouts/Modal/create-api-client-modal.d.ts +22 -22
  19. package/dist/libs/create-client.d.ts +11 -11
  20. package/dist/store/workspace.d.ts +22 -22
  21. package/dist/style.css +1 -1
  22. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  23. package/dist/views/Cookies/CookieForm.vue.js +14 -15
  24. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  25. package/dist/views/Cookies/Cookies.vue2.js +114 -55
  26. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  27. package/dist/views/Environment/Environment.vue2.js +21 -20
  28. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  29. package/dist/views/Request/Request.vue.js +1 -1
  30. package/dist/views/Request/Request.vue2.js +117 -117
  31. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  32. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  33. package/dist/views/Request/RequestSidebarItem.vue2.js +19 -19
  34. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  35. package/dist/views/Request/components/WorkspaceDropdown.vue.js +4 -4
  36. package/package.json +7 -7
@@ -1,74 +1,74 @@
1
- import { defineComponent as re, ref as se, watch as ie, onMounted as ae, onBeforeUnmount as le, openBlock as h, createElementBlock as U, Fragment as F, createElementVNode as v, normalizeClass as b, unref as s, createVNode as c, createCommentVNode as R, withCtx as p, withDirectives as ne, createSlots as de, withModifiers as N, renderList as ce, createBlock as O, createTextVNode as ue, vShow as me, pushScopeId as fe, popScopeId as pe } from "vue";
2
- import ve from "../../components/AddressBar/AddressBar.vue.js";
3
- import he from "../../components/Search/SearchButton.vue.js";
4
- import be from "../../components/Search/SearchModal.vue.js";
5
- import xe from "../../components/Sidebar/SidebarButton.vue.js";
6
- import ye from "../../components/Sidebar/SidebarToggle.vue.js";
7
- import ge from "../../components/ViewLayout/ViewLayout.vue.js";
8
- import we from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
- import { commandPaletteBus as P } from "../../libs/event-busses/command-palette.js";
10
- import { useWorkspace as _e } from "../../store/workspace.js";
11
- import ke from "./RequestSection/RequestSection.vue.js";
1
+ import { defineComponent as ie, ref as ae, watch as F, onMounted as le, onBeforeUnmount as ne, openBlock as h, createElementBlock as U, Fragment as N, createElementVNode as v, normalizeClass as b, unref as s, createVNode as c, createCommentVNode as R, withCtx as p, withDirectives as de, createSlots as ce, withModifiers as P, renderList as ue, createBlock as O, createTextVNode as me, vShow as fe, pushScopeId as pe, popScopeId as ve } from "vue";
2
+ import he from "../../components/AddressBar/AddressBar.vue.js";
3
+ import be from "../../components/Search/SearchButton.vue.js";
4
+ import xe from "../../components/Search/SearchModal.vue.js";
5
+ import ye from "../../components/Sidebar/SidebarButton.vue.js";
6
+ import ge from "../../components/Sidebar/SidebarToggle.vue.js";
7
+ import we from "../../components/ViewLayout/ViewLayout.vue.js";
8
+ import _e from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
+ import { commandPaletteBus as W } from "../../libs/event-busses/command-palette.js";
10
+ import { useWorkspace as ke } from "../../store/workspace.js";
11
+ import Se from "./RequestSection/RequestSection.vue.js";
12
12
  /* empty css */
13
- import Se from "./ResponseSection/ResponseSection.vue.js";
14
- import { useModal as Ue, ScalarIcon as C } from "@scalar/components";
15
- import { useToasts as Re } from "@scalar/use-toasts";
16
- import { isMacOS as W } from "@scalar/use-tooltip";
17
- import { useMagicKeys as Oe, useEventListener as Ce } from "@vueuse/core";
18
- import qe from "./RequestSidebarItem.vue.js";
19
- import De from "../../components/Sidebar/Sidebar.vue.js";
13
+ import Ue from "./ResponseSection/ResponseSection.vue.js";
14
+ import { useModal as Re, ScalarIcon as C } from "@scalar/components";
15
+ import { useToasts as Oe } from "@scalar/use-toasts";
16
+ import { isMacOS as z } from "@scalar/use-tooltip";
17
+ import { useMediaQuery as Ce, useMagicKeys as Me, useEventListener as qe } from "@vueuse/core";
18
+ import De from "./RequestSidebarItem.vue.js";
19
+ import Be from "../../components/Sidebar/Sidebar.vue.js";
20
20
  /* empty css */
21
- import Me from "./components/WorkspaceDropdown.vue.js";
22
- import { useSidebar as Be } from "../../hooks/useSidebar.js";
23
- import { sendRequest as Ie } from "../../libs/sendRequest.js";
24
- import { executeRequestBus as z } from "../../libs/event-busses/execute-requestBus.js";
21
+ import Ie from "./components/WorkspaceDropdown.vue.js";
22
+ import { useSidebar as Ve } from "../../hooks/useSidebar.js";
23
+ import { sendRequest as $e } from "../../libs/sendRequest.js";
24
+ import { executeRequestBus as L } from "../../libs/event-busses/execute-requestBus.js";
25
25
  import { requestStatusBus as k } from "../../libs/event-busses/request-status-bus.js";
26
- const Ve = (g) => (fe("data-v-29657ccc"), g = g(), pe(), g), $e = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, Ee = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, Fe = /* @__PURE__ */ Ve(() => /* @__PURE__ */ v("a", {
26
+ const Ee = (g) => (pe("data-v-660ba379"), g = g(), ve(), g), Fe = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, Ne = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, Pe = /* @__PURE__ */ Ee(() => /* @__PURE__ */ v("a", {
27
27
  class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
28
28
  href: "https://scalar.com/",
29
29
  target: "_blank"
30
- }, " Powered by Scalar.com ", -1)), Ne = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, ct = /* @__PURE__ */ re({
30
+ }, " Powered by Scalar.com ", -1)), We = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, mt = /* @__PURE__ */ ie({
31
31
  __name: "Request",
32
32
  setup(g) {
33
33
  var E;
34
34
  const {
35
35
  activeExample: w,
36
- activeRequest: m,
37
- activeSecuritySchemes: L,
36
+ activeRequest: f,
37
+ activeSecuritySchemes: j,
38
38
  activeWorkspace: l,
39
- activeWorkspaceCollections: j,
40
- activeWorkspaceServers: T,
41
- activeWorkspaceRequests: A,
42
- collectionMutators: q,
39
+ activeWorkspaceCollections: T,
40
+ activeWorkspaceServers: A,
41
+ activeWorkspaceRequests: H,
42
+ collectionMutators: M,
43
43
  collections: u,
44
- cookies: H,
45
- environments: J,
46
- findRequestFolders: K,
44
+ cookies: J,
45
+ environments: K,
46
+ findRequestFolders: Q,
47
47
  folders: x,
48
- folderMutators: D,
48
+ folderMutators: q,
49
49
  modalState: G,
50
- requestMutators: Q,
51
- workspaceMutators: M
52
- } = _e(), { collapsedSidebarFolders: X, setCollapsedSidebarFolder: Y } = Be(), { toast: B } = Re(), I = Ue(), f = se(!((E = l.value) != null && E.isReadOnly));
53
- ie(
54
- m,
55
- (r) => {
56
- r && K(r.uid).forEach(
57
- (t) => Y(t, !0)
50
+ requestMutators: X,
51
+ workspaceMutators: D
52
+ } = ke(), { collapsedSidebarFolders: Y, setCollapsedSidebarFolder: Z } = Ve(), { toast: B } = Oe(), I = Re(), ee = Ce("(max-width: 780px)"), m = ae(!((E = l.value) != null && E.isReadOnly));
53
+ F(ee, (t) => m.value = !t), F(
54
+ f,
55
+ (t) => {
56
+ t && Q(t.uid).forEach(
57
+ (o) => Z(o, !0)
58
58
  );
59
59
  },
60
60
  { immediate: !0 }
61
61
  );
62
62
  const V = async () => {
63
63
  var i;
64
- if (!m.value || !w.value) {
64
+ if (!f.value || !w.value) {
65
65
  console.warn(
66
66
  "There is no request active at the moment. Please select one then try again."
67
67
  );
68
68
  return;
69
69
  }
70
- let r = w.value.url;
71
- const t = Object.values(J).reduce(
70
+ let t = w.value.url;
71
+ const o = Object.values(K).reduce(
72
72
  (e, a) => {
73
73
  try {
74
74
  return { ...e, ...JSON.parse(a.raw) };
@@ -77,22 +77,22 @@ const Ve = (g) => (fe("data-v-29657ccc"), g = g(), pe(), g), $e = { class: "lg:m
77
77
  }
78
78
  },
79
79
  {}
80
- ), o = /\{\{(.*?)\}\}/g;
81
- r = r.replace(o, (e, a) => (T.value.forEach((n) => {
80
+ ), r = /\{\{(.*?)\}\}/g;
81
+ t = t.replace(r, (e, a) => (A.value.forEach((n) => {
82
82
  if (n.url === a)
83
83
  return a;
84
- }), t[a] || a)), k.emit("start");
84
+ }), o[a] || a)), k.emit("start");
85
85
  try {
86
- const { request: e, response: a, error: n } = await Ie(
87
- m.value,
86
+ const { request: e, response: a, error: n } = await $e(
87
+ f.value,
88
88
  w.value,
89
- r,
90
- L.value,
89
+ t,
90
+ j.value,
91
91
  (i = l.value) == null ? void 0 : i.proxyUrl,
92
- H
92
+ J
93
93
  );
94
- e && a ? (Q.edit(m.value.uid, "history", [
95
- ...m.value.history,
94
+ e && a ? (X.edit(f.value.uid, "history", [
95
+ ...f.value.history,
96
96
  {
97
97
  request: e,
98
98
  response: a,
@@ -104,70 +104,70 @@ const Ve = (g) => (fe("data-v-29657ccc"), g = g(), pe(), g), $e = { class: "lg:m
104
104
  ${e}`, "error"), k.emit("abort");
105
105
  }
106
106
  };
107
- ae(() => z.on(V)), le(() => z.off(V));
108
- const $ = (r, t) => {
109
- u[r] ? q.edit(r, "childUids", t) : x[r] && D.edit(r, "childUids", t);
110
- }, Z = (r, t) => {
111
- if (!r || !t) return;
112
- const { id: o, parentId: i } = r, { id: e, parentId: a, offset: n } = t;
113
- if (i ? u[i] ? q.edit(
107
+ le(() => L.on(V)), ne(() => L.off(V));
108
+ const $ = (t, o) => {
109
+ u[t] ? M.edit(t, "childUids", o) : x[t] && q.edit(t, "childUids", o);
110
+ }, te = (t, o) => {
111
+ if (!t || !o) return;
112
+ const { id: r, parentId: i } = t, { id: e, parentId: a, offset: n } = o;
113
+ if (i ? u[i] ? M.edit(
114
114
  i,
115
115
  "childUids",
116
116
  u[i].childUids.filter(
117
- (d) => d !== o
117
+ (d) => d !== r
118
118
  )
119
- ) : x[i] && D.edit(
119
+ ) : x[i] && q.edit(
120
120
  i,
121
121
  "childUids",
122
- x[i].childUids.filter((d) => d !== o)
123
- ) : M.edit(
122
+ x[i].childUids.filter((d) => d !== r)
123
+ ) : D.edit(
124
124
  l.value.uid,
125
125
  "collectionUids",
126
- l.value.collectionUids.filter((d) => d !== o)
126
+ l.value.collectionUids.filter((d) => d !== r)
127
127
  ), n === 2) {
128
128
  const d = u[e] || x[e];
129
- $(e, [...d.childUids, o]);
129
+ $(e, [...d.childUids, r]);
130
130
  } else if (a) {
131
- const y = [...(u[a] || x[a]).childUids], S = y.findIndex((oe) => e === oe) ?? 0;
132
- y.splice(S + n, 0, o), $(a, y);
131
+ const y = [...(u[a] || x[a]).childUids], S = y.findIndex((se) => e === se) ?? 0;
132
+ y.splice(S + n, 0, r), $(a, y);
133
133
  } else {
134
134
  const d = [...l.value.collectionUids], y = d.findIndex((S) => e === S) ?? 0;
135
- d.splice(y + n, 0, o), M.edit(
135
+ d.splice(y + n, 0, r), D.edit(
136
136
  l.value.uid,
137
137
  "collectionUids",
138
138
  d
139
139
  );
140
140
  }
141
- }, ee = () => P.emit(), _ = Oe();
142
- Ce(document, "keydown", (r) => {
143
- (W() ? _.meta.value : _.ctrl.value) && r.key === "b" && (f.value = !f.value), !l.value.isReadOnly && (W() ? _.meta.value : _.ctrl.value) && r.key === "k" && P.emit();
141
+ }, oe = () => W.emit(), _ = Me();
142
+ qe(document, "keydown", (t) => {
143
+ (z() ? _.meta.value : _.ctrl.value) && t.key === "b" && (m.value = !m.value), !l.value.isReadOnly && (z() ? _.meta.value : _.ctrl.value) && t.key === "k" && W.emit();
144
144
  });
145
- const te = (r, t) => {
146
- var o, i, e;
147
- return !(l.value.isReadOnly || !u[r.id] && t.offset !== 2 || u[r.id] && ((e = (i = (o = u[t.id]) == null ? void 0 : o.spec) == null ? void 0 : i.info) == null ? void 0 : e.title) === "Drafts");
145
+ const re = (t, o) => {
146
+ var r, i, e;
147
+ return !(l.value.isReadOnly || !u[t.id] && o.offset !== 2 || u[t.id] && ((e = (i = (r = u[o.id]) == null ? void 0 : r.spec) == null ? void 0 : i.info) == null ? void 0 : e.title) === "Drafts");
148
148
  };
149
- return (r, t) => (h(), U(F, null, [
149
+ return (t, o) => (h(), U(N, null, [
150
150
  v("div", {
151
151
  class: b(["flex flex-1 flex-col rounded pt-0 h-full bg-b-1 relative border-1/2 rounded mr-1.5 mb-1.5 overflow-hidden", {
152
152
  "!mr-0 !mb-0 !border-0": s(l).isReadOnly
153
153
  }])
154
154
  }, [
155
- v("div", $e, [
156
- v("div", Ee, [
157
- c(ye, {
158
- modelValue: f.value,
159
- "onUpdate:modelValue": t[0] || (t[0] = (o) => f.value = o),
155
+ v("div", Fe, [
156
+ v("div", Ne, [
157
+ c(ge, {
158
+ modelValue: m.value,
159
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => m.value = r),
160
160
  class: "gitbook-hidden"
161
161
  }, null, 8, ["modelValue"]),
162
- Fe
162
+ Pe
163
163
  ]),
164
- c(ve),
165
- v("div", Ne, [
164
+ c(he),
165
+ v("div", We, [
166
166
  s(l).isReadOnly ? (h(), U("button", {
167
167
  key: 0,
168
168
  class: "text-c-3 hover:bg-b-2 active:text-c-1 p-2 rounded",
169
169
  type: "button",
170
- onClick: t[1] || (t[1] = (o) => s(G).hide())
170
+ onClick: o[1] || (o[1] = (r) => s(G).hide())
171
171
  }, [
172
172
  c(s(C), {
173
173
  icon: "Close",
@@ -177,33 +177,33 @@ ${e}`, "error"), k.emit("abort");
177
177
  ])) : R("", !0)
178
178
  ])
179
179
  ]),
180
- c(ge, null, {
180
+ c(we, null, {
181
181
  default: p(() => [
182
- ne(c(s(De), {
183
- class: b([f.value ? "sidebar-active-width" : ""])
184
- }, de({
182
+ de(c(s(Be), {
183
+ class: b([m.value ? "sidebar-active-width" : ""])
184
+ }, ce({
185
185
  content: p(() => [
186
- c(he, {
187
- onOpenSearchModal: t[2] || (t[2] = (o) => s(I).show())
186
+ c(be, {
187
+ onOpenSearchModal: o[2] || (o[2] = (r) => s(I).show())
188
188
  }),
189
189
  v("div", {
190
190
  class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
191
191
  "pb-14": !s(l).isReadOnly
192
192
  }]),
193
- onDragenter: t[3] || (t[3] = N(() => {
193
+ onDragenter: o[3] || (o[3] = P(() => {
194
194
  }, ["prevent"])),
195
- onDragover: t[4] || (t[4] = N(() => {
195
+ onDragover: o[4] || (o[4] = P(() => {
196
196
  }, ["prevent"]))
197
197
  }, [
198
- (h(!0), U(F, null, ce(s(j), (o) => {
198
+ (h(!0), U(N, null, ue(s(T), (r) => {
199
199
  var i, e;
200
- return h(), O(qe, {
201
- key: o.uid,
202
- isDraggable: !s(l).isReadOnly && ((e = (i = o.spec) == null ? void 0 : i.info) == null ? void 0 : e.title) !== "Drafts",
203
- isDroppable: te,
204
- item: o,
200
+ return h(), O(De, {
201
+ key: r.uid,
202
+ isDraggable: !s(l).isReadOnly && ((e = (i = r.spec) == null ? void 0 : i.info) == null ? void 0 : e.title) !== "Drafts",
203
+ isDroppable: re,
204
+ item: r,
205
205
  parentUids: [],
206
- onOnDragEnd: Z
206
+ onOnDragEnd: te
207
207
  }, {
208
208
  leftIcon: p(() => [
209
209
  c(s(C), {
@@ -214,7 +214,7 @@ ${e}`, "error"), k.emit("abort");
214
214
  }),
215
215
  v("div", {
216
216
  class: b({
217
- "rotate-90": s(X)[o.uid]
217
+ "rotate-90": s(Y)[r.uid]
218
218
  })
219
219
  }, [
220
220
  c(s(C), {
@@ -230,15 +230,15 @@ ${e}`, "error"), k.emit("abort");
230
230
  ], 34)
231
231
  ]),
232
232
  button: p(() => [
233
- s(l).isReadOnly ? R("", !0) : (h(), O(xe, {
233
+ s(l).isReadOnly ? R("", !0) : (h(), O(ye, {
234
234
  key: 0,
235
235
  class: b({
236
- "empty-sidebar-item": s(A).length === 1
236
+ "empty-sidebar-item": s(H).length === 1
237
237
  }),
238
- click: ee
238
+ click: oe
239
239
  }, {
240
240
  title: p(() => [
241
- ue("Add Item")
241
+ me("Add Item")
242
242
  ]),
243
243
  _: 1
244
244
  }, 8, ["class"]))
@@ -248,23 +248,23 @@ ${e}`, "error"), k.emit("abort");
248
248
  s(l).isReadOnly ? void 0 : {
249
249
  name: "header",
250
250
  fn: p(() => [
251
- c(s(Me))
251
+ c(s(Ie))
252
252
  ]),
253
253
  key: "0"
254
254
  }
255
255
  ]), 1032, ["class"]), [
256
- [me, f.value]
256
+ [fe, m.value]
257
257
  ]),
258
- s(w) ? (h(), O(we, {
258
+ s(w) ? (h(), O(_e, {
259
259
  key: 0,
260
- class: b(["flex-1", [f.value ? "sidebar-active-hide-layout" : ""]])
260
+ class: b(["flex-1", [m.value ? "sidebar-active-hide-layout" : ""]])
261
261
  }, {
262
262
  default: p(() => {
263
- var o, i, e, a, n;
263
+ var r, i, e, a, n;
264
264
  return [
265
- c(ke),
266
- c(Se, {
267
- response: (n = (a = (o = s(m)) == null ? void 0 : o.history) == null ? void 0 : a[((e = (i = s(m)) == null ? void 0 : i.history) == null ? void 0 : e.length) - 1]) == null ? void 0 : n.response
265
+ c(Se),
266
+ c(Ue, {
267
+ response: (n = (a = (r = s(f)) == null ? void 0 : r.history) == null ? void 0 : a[((e = (i = s(f)) == null ? void 0 : i.history) == null ? void 0 : e.length) - 1]) == null ? void 0 : n.response
268
268
  }, null, 8, ["response"])
269
269
  ];
270
270
  }),
@@ -274,10 +274,10 @@ ${e}`, "error"), k.emit("abort");
274
274
  _: 1
275
275
  })
276
276
  ], 2),
277
- c(be, { modalState: s(I) }, null, 8, ["modalState"])
277
+ c(xe, { modalState: s(I) }, null, 8, ["modalState"])
278
278
  ], 64));
279
279
  }
280
280
  });
281
281
  export {
282
- ct as default
282
+ mt as default
283
283
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AA+TA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAA;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAA;AACzE,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;AAgKlD,iBAAS,cAAc;gBA7HT,IAAI;;gBAAJ,IAAI;EAycjB;AACD,QAAA,MAAM,eAAe;IApejB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAA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AAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,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"}
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import o from "../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-149f8145"]]);
5
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-481dd9cc"]]);
6
6
  export {
7
7
  a as default
8
8
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as H, useCssVars as G, computed as a, ref as J, resolveComponent as K, openBlock as o, createElementBlock as m, normalizeClass as d, unref as i, createVNode as U, withCtx as C, createBlock as c, createElementVNode as s, toDisplayString as I, createCommentVNode as b, createTextVNode as E, renderSlot as Q, withDirectives as X, Fragment as Y, renderList as Z, vShow as ee, pushScopeId as te, popScopeId as ie } from "vue";
1
+ import { defineComponent as H, useCssVars as G, computed as l, ref as J, resolveComponent as K, openBlock as o, createElementBlock as m, normalizeClass as d, unref as i, createVNode as U, withCtx as C, createBlock as c, createElementVNode as s, toDisplayString as I, createCommentVNode as b, createTextVNode as E, renderSlot as Q, withDirectives as X, Fragment as Y, renderList as Z, vShow as ee, pushScopeId as te, popScopeId as ie } from "vue";
2
2
  import { PathId as re } from "../../router.js";
3
3
  import { useWorkspace as se } from "../../store/workspace.js";
4
- import { ScalarIcon as le } from "@scalar/components";
5
- import { Draggable as ae } from "@scalar/draggable";
4
+ import { ScalarIcon as ae } from "@scalar/components";
5
+ import { Draggable as le } from "@scalar/draggable";
6
6
  import { RouterLink as ne } from "vue-router";
7
7
  import z from "./RequestSidebarItemMenu.vue.js";
8
8
  import oe from "../../components/HttpMethod/HttpMethod.vue.js";
9
9
  import { useSidebar as de } from "../../hooks/useSidebar.js";
10
- const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex flex-row gap-1 items-center" }, fe = { class: "relative" }, me = { class: "flex" }, ce = { class: "z-10 flex h-fit items-center justify-center max-w-[14px]" }, be = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, ge = { class: "relative flex h-fit" }, ve = /* @__PURE__ */ ue(() => /* @__PURE__ */ s("span", null, " ", -1)), he = { key: 2 }, O = "hover:bg-sidebar-active-b indent-padding-left", $e = /* @__PURE__ */ H({
10
+ const ue = (u) => (te("data-v-481dd9cc"), u = u(), ie(), u), pe = { class: "flex flex-row gap-1 items-center" }, fe = { class: "relative" }, me = { class: "flex items-start" }, ce = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, be = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, ge = { class: "relative flex h-fit" }, ve = /* @__PURE__ */ ue(() => /* @__PURE__ */ s("span", null, " ", -1)), he = { key: 2 }, O = "hover:bg-sidebar-active-b indent-padding-left", $e = /* @__PURE__ */ H({
11
11
  __name: "RequestSidebarItem",
12
12
  props: {
13
13
  isDraggable: { type: Boolean, default: !1 },
@@ -18,8 +18,8 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
18
18
  emits: ["onDragEnd"],
19
19
  setup(u) {
20
20
  G((e) => ({
21
- "75f1595a": N.value,
22
- d92033b8: _.value
21
+ "9215ea88": N.value,
22
+ "602f2182": _.value
23
23
  }));
24
24
  const t = u, {
25
25
  activeRequest: w,
@@ -27,20 +27,20 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
27
27
  activeWorkspace: g,
28
28
  collections: D,
29
29
  folders: V,
30
- isReadOnly: l,
30
+ isReadOnly: a,
31
31
  requests: k,
32
32
  requestExamples: v
33
- } = se(), { collapsedSidebarFolders: y, toggleSidebarFolder: j } = de(), F = a(() => "childUids" in t.item), q = a(() => "spec" in t.item), x = a(() => "summary" in t.item), N = a(() => t.parentUids.length ? l.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), _ = a(() => t.parentUids.length ? l.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), R = (e) => {
33
+ } = se(), { collapsedSidebarFolders: y, toggleSidebarFolder: j } = de(), F = l(() => "childUids" in t.item), q = l(() => "spec" in t.item), x = l(() => "summary" in t.item), N = l(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), _ = l(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), R = (e) => {
34
34
  var r;
35
35
  return "spec" in e ? (r = e.spec.info) == null ? void 0 : r.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
36
- }, L = a(() => ("requestUid" in t.item ? k[t.item.requestUid] : t.item).method), M = a(
36
+ }, L = l(() => ("requestUid" in t.item ? k[t.item.requestUid] : t.item).method), M = l(
37
37
  () => {
38
38
  var e;
39
39
  return y[t.item.uid] || ((e = w.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
40
40
  }
41
- ), P = () => "requestUid" in t.item ? `/workspace/${g.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${g.value.uid}/request/${t.item.uid}`, T = a(
41
+ ), P = () => "requestUid" in t.item ? `/workspace/${g.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${g.value.uid}/request/${t.item.uid}`, T = l(
42
42
  () => B.value[re.Request] === "default" && w.value.uid === t.item.uid
43
- ), h = J(null), S = a(() => {
43
+ ), h = J(null), S = l(() => {
44
44
  let e = 0.5, r = 0.5;
45
45
  if (!h.value) return { ceiling: e, floor: r };
46
46
  const { draggingItem: p } = h.value;
@@ -50,10 +50,10 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
50
50
  const p = K("RequestSidebarItem", !0);
51
51
  return o(), m("div", {
52
52
  class: d(["relative flex flex-row", [
53
- i(l) && e.parentUids.length > 1 || !i(l) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
53
+ i(a) && e.parentUids.length > 1 || !i(a) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
54
54
  ]])
55
55
  }, [
56
- U(i(ae), {
56
+ U(i(le), {
57
57
  id: e.item.uid,
58
58
  ref_key: "draggableRef",
59
59
  ref: h,
@@ -83,12 +83,12 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
83
83
  }, [
84
84
  s("span", {
85
85
  class: d(["z-10 font-medium w-full pl-2 word-break-break-word", {
86
- "editable-sidebar-hover-item": !i(l)
86
+ "editable-sidebar-hover-item": !i(a)
87
87
  }])
88
88
  }, I(R(e.item)), 3),
89
89
  s("div", pe, [
90
90
  s("div", fe, [
91
- i(l) ? b("", !0) : (o(), c(z, {
91
+ i(a) ? b("", !0) : (o(), c(z, {
92
92
  key: 0,
93
93
  item: e.item,
94
94
  parentUids: e.parentUids
@@ -105,7 +105,7 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
105
105
  ], 2)
106
106
  ]),
107
107
  _: 1
108
- }, 8, ["to"])) : !i(l) || e.parentUids.length ? (o(), m("button", {
108
+ }, 8, ["to"])) : !i(a) || e.parentUids.length ? (o(), m("button", {
109
109
  key: 1,
110
110
  class: d(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", O]),
111
111
  type: "button",
@@ -118,7 +118,7 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
118
118
  "rotate-90": i(y)[e.item.uid]
119
119
  })
120
120
  }, [
121
- U(i(le), {
121
+ U(i(ae), {
122
122
  class: "text-c-3 text-sm",
123
123
  icon: "ChevronRight",
124
124
  size: "sm",
@@ -131,11 +131,11 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
131
131
  s("div", be, [
132
132
  s("span", {
133
133
  class: d(["z-10 font-medium text-left w-full word-break-break-word", {
134
- "editable-sidebar-hover-item": !i(l)
134
+ "editable-sidebar-hover-item": !i(a)
135
135
  }])
136
136
  }, I(R(e.item)), 3),
137
137
  s("div", ge, [
138
- !i(l) && (($ = (f = e.item.spec) == null ? void 0 : f.info) == null ? void 0 : $.title) !== "Drafts" ? (o(), c(z, {
138
+ !i(a) && (($ = (f = e.item.spec) == null ? void 0 : f.info) == null ? void 0 : $.title) !== "Drafts" ? (o(), c(z, {
139
139
  key: 0,
140
140
  item: e.item,
141
141
  parentUids: e.parentUids
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAoWA,wBAKG"}
1
+ {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAqWA,wBAKG"}
@@ -1,9 +1,9 @@
1
- import { defineComponent as k, openBlock as c, createElementBlock as i, createVNode as t, unref as e, withCtx as o, Fragment as w, renderList as v, createBlock as g, withModifiers as C, createElementVNode as r, normalizeClass as b, createTextVNode as m, toDisplayString as p } from "vue";
1
+ import { defineComponent as k, openBlock as c, createElementBlock as i, createVNode as t, unref as e, withCtx as o, Fragment as w, renderList as v, createBlock as g, withModifiers as C, createElementVNode as r, normalizeClass as b, createTextVNode as p, toDisplayString as m } from "vue";
2
2
  import { useWorkspace as y } from "../../../store/workspace.js";
3
3
  import { ScalarDropdown as D, ScalarDropdownItem as d, ScalarIcon as l, ScalarDropdownDivider as S, ScalarButton as W } from "@scalar/components";
4
4
  import { useRouter as B } from "vue-router";
5
5
  import { commandPaletteBus as N } from "../../../libs/event-busses/command-palette.js";
6
- const j = { class: "xl:min-h-header py-2.5 flex items-center border-b-1/2 px-2.5 text-sm" }, z = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, V = { class: "flex items-center justify-center h-4 w-4" }, E = /* @__PURE__ */ r("span", null, "Create new workspace", -1), T = /* @__PURE__ */ k({
6
+ const j = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b px-2.5 text-sm" }, z = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, V = { class: "flex items-center justify-center h-4 w-4" }, E = /* @__PURE__ */ r("span", null, "Create new workspace", -1), T = /* @__PURE__ */ k({
7
7
  __name: "WorkspaceDropdown",
8
8
  setup(I) {
9
9
  const { activeWorkspace: s, workspaces: u } = y(), { push: f } = B(), h = (a) => {
@@ -30,7 +30,7 @@ const j = { class: "xl:min-h-header py-2.5 flex items-center border-b-1/2 px-2.5
30
30
  thickness: "3.5"
31
31
  })
32
32
  ], 2),
33
- m(" " + p(_.name), 1)
33
+ p(" " + m(_.name), 1)
34
34
  ]),
35
35
  _: 2
36
36
  }, 1032, ["onClick"]))), 128)),
@@ -59,7 +59,7 @@ const j = { class: "xl:min-h-header py-2.5 flex items-center border-b-1/2 px-2.5
59
59
  }, {
60
60
  default: o(() => [
61
61
  r("h2", z, [
62
- m(p(e(s).name) + " ", 1),
62
+ p(m(e(s).name) + " ", 1),
63
63
  t(e(l), {
64
64
  class: "size-2.5",
65
65
  icon: "ChevronDown",
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.46",
21
+ "version": "2.0.47",
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.28",
130
+ "@scalar/components": "0.12.29",
131
131
  "@scalar/draggable": "0.1.4",
132
- "@scalar/object-utils": "1.1.5",
133
- "@scalar/themes": "0.9.21",
134
- "@scalar/oas-utils": "0.2.27",
132
+ "@scalar/object-utils": "1.1.6",
133
+ "@scalar/oas-utils": "0.2.28",
134
+ "@scalar/themes": "0.9.22",
135
135
  "@scalar/use-codemirror": "0.11.10",
136
- "@scalar/use-toasts": "0.7.4",
137
- "@scalar/use-tooltip": "1.0.2"
136
+ "@scalar/use-tooltip": "1.0.2",
137
+ "@scalar/use-toasts": "0.7.5"
138
138
  },
139
139
  "devDependencies": {
140
140
  "@types/content-type": "^1.1.8",