@scalar/api-client 2.0.57 → 2.0.58

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 (57) 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 +61 -58
  5. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +31 -25
  7. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  8. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +51 -45
  9. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +47 -41
  11. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -40
  13. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  14. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +67 -61
  15. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  16. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +30 -30
  17. package/dist/components/TopNav/TopNav.vue.d.ts +20 -1
  18. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  19. package/dist/components/TopNav/TopNav.vue.js +2 -2
  20. package/dist/components/TopNav/TopNav.vue2.js +64 -49
  21. package/dist/layouts/App/ApiClientApp.vue.d.ts +11 -1
  22. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  23. package/dist/layouts/App/ApiClientApp.vue.js +53 -49
  24. package/dist/libs/event-busses/cancel-request-bus.d.ts +2 -0
  25. package/dist/libs/event-busses/cancel-request-bus.d.ts.map +1 -0
  26. package/dist/libs/event-busses/cancel-request-bus.js +5 -0
  27. package/dist/libs/event-busses/hot-keys-bus.d.ts +3 -1
  28. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
  29. package/dist/libs/event-busses/hot-keys-bus.js +1 -0
  30. package/dist/libs/event-busses/index.d.ts +2 -1
  31. package/dist/libs/event-busses/index.d.ts.map +1 -1
  32. package/dist/libs/event-busses/index.js +11 -8
  33. package/dist/libs/index.js +21 -18
  34. package/dist/libs/local-storage.js +1 -1
  35. package/dist/libs/sendRequest.d.ts +2 -2
  36. package/dist/libs/sendRequest.d.ts.map +1 -1
  37. package/dist/libs/sendRequest.js +22 -21
  38. package/dist/store/workspace.d.ts.map +1 -1
  39. package/dist/store/workspace.js +100 -103
  40. package/dist/style.css +1 -1
  41. package/dist/views/Request/Request.vue.d.ts +11 -1
  42. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  43. package/dist/views/Request/Request.vue.js +3 -3
  44. package/dist/views/Request/Request.vue2.js +184 -174
  45. package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -0
  46. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  47. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  48. package/dist/views/Request/RequestSidebarItem.vue2.js +139 -130
  49. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts +3 -0
  50. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -0
  51. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +7 -0
  52. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +39 -0
  53. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  54. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -30
  55. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  56. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +23 -21
  57. package/package.json +7 -7
@@ -1,262 +1,272 @@
1
- import { defineComponent as pe, ref as he, watch as z, onMounted as ve, onBeforeUnmount as be, openBlock as f, createElementBlock as _, normalizeClass as b, unref as t, createElementVNode as v, createVNode as c, createCommentVNode as C, withCtx as m, withDirectives as xe, createSlots as ge, isRef as Se, withModifiers as L, createBlock as S, Fragment as T, renderList as j, createTextVNode as A, toDisplayString as Re, vShow as ye, pushScopeId as we, popScopeId as _e } from "vue";
2
- import ke from "../../components/AddressBar/AddressBar.vue.js";
3
- import Ue from "../../components/HttpMethod/HttpMethod.vue.js";
4
- import { useSearch as Ce } from "../../components/Search/useSearch.js";
5
- import Ie from "../../components/Sidebar/SidebarButton.vue.js";
6
- import De from "../../components/Sidebar/SidebarToggle.vue.js";
7
- import Be from "../../components/ViewLayout/ViewLayout.vue.js";
8
- import qe from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
- import { useWorkspace as Ve } from "../../store/workspace.js";
10
- import Oe from "./RequestSection/RequestSection.vue.js";
1
+ import { defineComponent as Re, ref as z, watch as A, onMounted as Se, onBeforeUnmount as we, openBlock as f, createElementBlock as _, normalizeClass as b, unref as o, createElementVNode as v, createVNode as d, createCommentVNode as q, withCtx as m, withDirectives as ye, createSlots as _e, isRef as ke, withModifiers as L, createBlock as R, Fragment as j, renderList as H, createTextVNode as K, toDisplayString as Ue, vShow as Ce, pushScopeId as qe, popScopeId as De } from "vue";
2
+ import Ie from "../../components/AddressBar/AddressBar.vue.js";
3
+ import Be from "../../components/HttpMethod/HttpMethod.vue.js";
4
+ import { useSearch as Ve } from "../../components/Search/useSearch.js";
5
+ import Oe from "../../components/Sidebar/SidebarButton.vue.js";
6
+ import $e from "../../components/Sidebar/SidebarToggle.vue.js";
7
+ import Ee from "../../components/ViewLayout/ViewLayout.vue.js";
8
+ import Fe from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
+ import { useWorkspace as Me } from "../../store/workspace.js";
10
+ import Ne from "./RequestSection/RequestSection.vue.js";
11
11
  /* empty css */
12
- import $e from "./ResponseSection/ResponseSection.vue.js";
13
- import { ScalarIcon as I, ScalarSearchInput as Fe, ScalarSearchResultList as Me, ScalarSearchResultItem as Pe } from "@scalar/components";
14
- import { useToasts as Ee } from "@scalar/use-toasts";
15
- import { useMediaQuery as Ne } from "@vueuse/core";
16
- import We from "./RequestSidebarItem.vue.js";
17
- import ze from "../../components/Sidebar/Sidebar.vue.js";
12
+ import Pe from "./ResponseSection/ResponseSection.vue.js";
13
+ import { ScalarIcon as D, ScalarSearchInput as Te, ScalarSearchResultList as We, ScalarSearchResultItem as ze } from "@scalar/components";
14
+ import { useToasts as Ae } from "@scalar/use-toasts";
15
+ import { useMediaQuery as Le } from "@vueuse/core";
16
+ import je from "./RequestSidebarItem.vue.js";
17
+ import He from "../../components/Sidebar/Sidebar.vue.js";
18
18
  /* empty css */
19
- import Le from "./components/WorkspaceDropdown.vue.js";
20
- import { useSidebar as Te } from "../../hooks/useSidebar.js";
21
- import { sendRequest as je } from "../../libs/sendRequest.js";
22
- import { executeRequestBus as H } from "../../libs/event-busses/execute-request-bus.js";
23
- import { hotKeyBus as K } from "../../libs/event-busses/hot-keys-bus.js";
24
- import { commandPaletteBus as J } from "../../libs/event-busses/command-palette-bus.js";
19
+ import Ke from "./components/WorkspaceDropdown.vue.js";
20
+ import { useSidebar as Je } from "../../hooks/useSidebar.js";
21
+ import { sendRequest as Qe } from "../../libs/sendRequest.js";
22
+ import { executeRequestBus as J } from "../../libs/event-busses/execute-request-bus.js";
23
+ import { cancelRequestBus as Ge } from "../../libs/event-busses/cancel-request-bus.js";
24
+ import { hotKeyBus as Q } from "../../libs/event-busses/hot-keys-bus.js";
25
+ import { commandPaletteBus as G } from "../../libs/event-busses/command-palette-bus.js";
25
26
  import { requestStatusBus as k } from "../../libs/event-busses/request-status-bus.js";
26
- const Ae = (R) => (we("data-v-05d30cb4"), R = R(), _e(), R), He = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, Ke = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, Je = /* @__PURE__ */ Ae(() => /* @__PURE__ */ v("a", {
27
+ const Xe = (S) => (qe("data-v-e8d1eeb0"), S = S(), De(), S), Ye = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, Ze = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, et = /* @__PURE__ */ Xe(() => /* @__PURE__ */ v("a", {
27
28
  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
29
  href: "https://scalar.com/",
29
30
  target: "_blank"
30
- }, " Powered by Scalar.com ", -1)), Qe = { 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" }, Ge = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, yt = /* @__PURE__ */ pe({
31
+ }, " Powered by Scalar.com ", -1)), tt = { 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" }, st = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Dt = /* @__PURE__ */ Re({
31
32
  __name: "Request",
32
- setup(R) {
33
+ emits: ["newTab"],
34
+ setup(S, { emit: X }) {
33
35
  var W;
34
- const {
35
- activeExample: y,
36
+ const Y = X, {
37
+ activeExample: w,
36
38
  activeRequest: h,
37
- activeSecuritySchemes: Q,
38
- activeWorkspace: l,
39
- activeWorkspaceCollections: G,
40
- activeWorkspaceServers: X,
41
- activeWorkspaceRequests: Y,
42
- collectionMutators: D,
39
+ activeSecuritySchemes: Z,
40
+ activeWorkspace: c,
41
+ activeWorkspaceCollections: ee,
42
+ activeWorkspaceServers: te,
43
+ activeWorkspaceRequests: se,
44
+ collectionMutators: I,
43
45
  collections: p,
44
- cookies: Z,
45
- environments: ee,
46
- findRequestFolders: te,
46
+ cookies: oe,
47
+ environments: re,
48
+ findRequestFolders: ae,
47
49
  folders: x,
48
50
  folderMutators: B,
49
- modalState: se,
50
- requestMutators: oe,
51
- workspaceMutators: q
52
- } = Ve(), { collapsedSidebarFolders: re, setCollapsedSidebarFolder: ie } = Te(), { toast: V } = Ee(), {
53
- searchText: w,
54
- searchResultsWithPlaceholderResults: O,
55
- selectedSearchResult: $,
56
- onSearchResultClick: ae,
57
- fuseSearch: le,
51
+ modalState: ie,
52
+ requestMutators: le,
53
+ workspaceMutators: V
54
+ } = Me(), { collapsedSidebarFolders: ne, setCollapsedSidebarFolder: ce } = Je(), { toast: O } = Ae(), {
55
+ searchText: y,
56
+ searchResultsWithPlaceholderResults: $,
57
+ selectedSearchResult: E,
58
+ onSearchResultClick: de,
59
+ fuseSearch: ue,
58
60
  searchInputRef: F,
59
- searchResultRefs: ne,
61
+ searchResultRefs: me,
60
62
  navigateSearchResults: M,
61
- selectSearchResult: de
62
- } = Ce(), ce = Ne("(max-width: 780px)"), u = he(!((W = l.value) != null && W.isReadOnly));
63
- z(ce, (s) => u.value = !s), z(
63
+ selectSearchResult: fe
64
+ } = Ve(), pe = Le("(max-width: 780px)"), u = z(!((W = c.value) != null && W.isReadOnly)), U = z();
65
+ A(pe, (e) => u.value = !e), A(
64
66
  h,
65
- (s) => {
66
- s && te(s.uid).forEach(
67
- (o) => ie(o, !0)
67
+ (e) => {
68
+ e && ae(e.uid).forEach(
69
+ (s) => ce(s, !0)
68
70
  );
69
71
  },
70
72
  { immediate: !0 }
71
73
  );
72
- const P = async () => {
73
- var i;
74
- if (!h.value || !y.value) {
74
+ const N = async () => {
75
+ var r, a;
76
+ if (!h.value || !w.value) {
75
77
  console.warn(
76
78
  "There is no request active at the moment. Please select one then try again."
77
79
  );
78
80
  return;
79
81
  }
80
- let s = y.value.url;
81
- const o = Object.values(ee).reduce(
82
- (r, a) => {
82
+ let e = w.value.url;
83
+ const s = Object.values(re).reduce(
84
+ (l, n) => {
83
85
  try {
84
- return { ...r, ...JSON.parse(a.raw) };
86
+ return { ...l, ...JSON.parse(n.raw) };
85
87
  } catch {
86
- return r;
88
+ return l;
87
89
  }
88
90
  },
89
91
  {}
90
- ), e = /\{\{(.*?)\}\}/g;
91
- s = s.replace(e, (r, a) => (X.value.forEach((n) => {
92
- if (n.url === a)
93
- return a;
94
- }), o[a] || a)), k.emit("start");
92
+ ), t = /\{\{(.*?)\}\}/g;
93
+ e = e.replace(t, (l, n) => (te.value.forEach((i) => {
94
+ if (i.url === n)
95
+ return n;
96
+ }), s[n] || n)), k.emit("start");
95
97
  try {
96
- const { request: r, response: a, error: n } = await je(
98
+ U.value = new AbortController();
99
+ const { request: l, response: n, error: i } = await Qe(
97
100
  h.value,
98
- y.value,
99
- s,
100
- Q.value,
101
- (i = l.value) == null ? void 0 : i.proxyUrl,
102
- Z
101
+ w.value,
102
+ e,
103
+ Z.value,
104
+ (r = c.value) == null ? void 0 : r.proxyUrl,
105
+ oe,
106
+ (a = U.value) == null ? void 0 : a.signal
103
107
  );
104
- r && a ? (oe.edit(h.value.uid, "history", [
108
+ l && n ? (le.edit(h.value.uid, "history", [
105
109
  ...h.value.history,
106
110
  {
107
- request: r,
108
- response: a,
111
+ request: l,
112
+ response: n,
109
113
  timestamp: Date.now()
110
114
  }
111
- ]), k.emit("stop")) : (V((n == null ? void 0 : n.message) ?? "Send Request Failed", "error"), k.emit("abort"));
112
- } catch (r) {
113
- console.error(r), V(`Oops!
114
- ${r}`, "error"), k.emit("abort");
115
+ ]), k.emit("stop")) : ((i == null ? void 0 : i.code) !== "ERR_CANCELED" && O((i == null ? void 0 : i.message) ?? "Send Request Failed", "error"), k.emit("abort"));
116
+ } catch (l) {
117
+ console.error(l), O(`Oops!
118
+ ${l}`, "error"), k.emit("abort");
115
119
  }
116
- }, E = (s) => {
117
- var o;
118
- s.toggleSidebar && (u.value = !u.value), s.openCommandPalette && (s.openCommandPalette.preventDefault(), J.emit()), s.focusRequestSearch && ((o = F.value) == null || o.focus()), s.navigateSearchResultsUp && M("up"), s.navigateSearchResultsDown && M("down"), s.selectSearchResult && de();
120
+ }, P = (e) => {
121
+ var s;
122
+ e.toggleSidebar && (u.value = !u.value), e.openCommandPalette && (e.openCommandPalette.preventDefault(), G.emit()), e.focusRequestSearch && ((s = F.value) == null || s.focus()), e.navigateSearchResultsUp && M("up"), e.navigateSearchResultsDown && M("down"), e.selectSearchResult && fe();
123
+ }, he = async () => {
124
+ var e;
125
+ return (e = U.value) == null ? void 0 : e.abort();
119
126
  };
120
- ve(() => {
121
- H.on(P), K.on(E);
122
- }), be(() => {
123
- H.off(P), K.off(E);
127
+ Se(() => {
128
+ J.on(N), Ge.on(he), Q.on(P);
129
+ }), we(() => {
130
+ J.off(N), Q.off(P);
124
131
  });
125
- const N = (s, o) => {
126
- p[s] ? D.edit(s, "childUids", o) : x[s] && B.edit(s, "childUids", o);
127
- }, ue = (s, o) => {
128
- if (!s || !o) return;
129
- const { id: e, parentId: i } = s, { id: r, parentId: a, offset: n } = o;
130
- if (i ? p[i] ? D.edit(
131
- i,
132
+ const T = (e, s) => {
133
+ p[e] ? I.edit(e, "childUids", s) : x[e] && B.edit(e, "childUids", s);
134
+ }, ve = (e, s) => {
135
+ if (!e || !s) return;
136
+ const { id: t, parentId: r } = e, { id: a, parentId: l, offset: n } = s;
137
+ if (r ? p[r] ? I.edit(
138
+ r,
132
139
  "childUids",
133
- p[i].childUids.filter(
134
- (d) => d !== e
140
+ p[r].childUids.filter(
141
+ (i) => i !== t
135
142
  )
136
- ) : x[i] && B.edit(
137
- i,
143
+ ) : x[r] && B.edit(
144
+ r,
138
145
  "childUids",
139
- x[i].childUids.filter((d) => d !== e)
140
- ) : q.edit(
141
- l.value.uid,
146
+ x[r].childUids.filter((i) => i !== t)
147
+ ) : V.edit(
148
+ c.value.uid,
142
149
  "collectionUids",
143
- l.value.collectionUids.filter((d) => d !== e)
150
+ c.value.collectionUids.filter((i) => i !== t)
144
151
  ), n === 2) {
145
- const d = p[r] || x[r];
146
- N(r, [...d.childUids, e]);
147
- } else if (a) {
148
- const g = [...(p[a] || x[a]).childUids], U = g.findIndex((fe) => r === fe) ?? 0;
149
- g.splice(U + n, 0, e), N(a, g);
152
+ const i = p[a] || x[a];
153
+ T(a, [...i.childUids, t]);
154
+ } else if (l) {
155
+ const g = [...(p[l] || x[l]).childUids], C = g.findIndex((ge) => a === ge) ?? 0;
156
+ g.splice(C + n, 0, t), T(l, g);
150
157
  } else {
151
- const d = [...l.value.collectionUids], g = d.findIndex((U) => r === U) ?? 0;
152
- d.splice(g + n, 0, e), q.edit(
153
- l.value.uid,
158
+ const i = [...c.value.collectionUids], g = i.findIndex((C) => a === C) ?? 0;
159
+ i.splice(g + n, 0, t), V.edit(
160
+ c.value.uid,
154
161
  "collectionUids",
155
- d
162
+ i
156
163
  );
157
164
  }
158
- }, me = (s, o) => {
159
- var e, i, r;
160
- return !(l.value.isReadOnly || !p[s.id] && o.offset !== 2 || p[s.id] && ((r = (i = (e = p[o.id]) == null ? void 0 : e.spec) == null ? void 0 : i.info) == null ? void 0 : r.title) === "Drafts");
165
+ }, be = (e, s) => {
166
+ var t, r, a;
167
+ return !(c.value.isReadOnly || !p[e.id] && s.offset !== 2 || p[e.id] && ((a = (r = (t = p[s.id]) == null ? void 0 : t.spec) == null ? void 0 : r.info) == null ? void 0 : a.title) === "Drafts");
168
+ }, xe = (e, s) => {
169
+ Y("newTab", { name: e, uid: s });
161
170
  };
162
- return (s, o) => (f(), _("div", {
171
+ return (e, s) => (f(), _("div", {
163
172
  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", {
164
- "!mr-0 !mb-0 !border-0": t(l).isReadOnly
173
+ "!mr-0 !mb-0 !border-0": o(c).isReadOnly
165
174
  }])
166
175
  }, [
167
- v("div", He, [
168
- v("div", Ke, [
169
- c(De, {
176
+ v("div", Ye, [
177
+ v("div", Ze, [
178
+ d($e, {
170
179
  modelValue: u.value,
171
- "onUpdate:modelValue": o[0] || (o[0] = (e) => u.value = e),
180
+ "onUpdate:modelValue": s[0] || (s[0] = (t) => u.value = t),
172
181
  class: "gitbook-hidden"
173
182
  }, null, 8, ["modelValue"]),
174
- Je
183
+ et
175
184
  ]),
176
- c(ke),
177
- v("div", Qe, [
178
- t(l).isReadOnly ? (f(), _("button", {
185
+ d(Ie),
186
+ v("div", tt, [
187
+ o(c).isReadOnly ? (f(), _("button", {
179
188
  key: 0,
180
189
  class: "text-c-3 hover:bg-b-2 active:text-c-1 p-2 rounded",
181
190
  type: "button",
182
- onClick: o[1] || (o[1] = (e) => t(se).hide())
191
+ onClick: s[1] || (s[1] = (t) => o(ie).hide())
183
192
  }, [
184
- c(t(I), {
193
+ d(o(D), {
185
194
  icon: "Close",
186
195
  size: "lg",
187
196
  thickness: "1.75"
188
197
  })
189
- ])) : C("", !0)
198
+ ])) : q("", !0)
190
199
  ])
191
200
  ]),
192
- c(Be, null, {
201
+ d(Ee, null, {
193
202
  default: m(() => [
194
- xe(c(t(ze), {
203
+ ye(d(o(He), {
195
204
  class: b([u.value ? "sidebar-active-width" : ""]),
196
205
  showSideBar: u.value,
197
- "onUpdate:showSideBar": o[5] || (o[5] = (e) => u.value = e)
198
- }, ge({
206
+ "onUpdate:showSideBar": s[5] || (s[5] = (t) => u.value = t)
207
+ }, _e({
199
208
  content: m(() => [
200
- v("div", Ge, [
201
- c(t(Fe), {
209
+ v("div", st, [
210
+ d(o(Te), {
202
211
  ref_key: "searchInputRef",
203
212
  ref: F,
204
- modelValue: t(w),
205
- "onUpdate:modelValue": o[2] || (o[2] = (e) => Se(w) ? w.value = e : null),
213
+ modelValue: o(y),
214
+ "onUpdate:modelValue": s[2] || (s[2] = (t) => ke(y) ? y.value = t : null),
206
215
  sidebar: "",
207
- onInput: t(le)
216
+ onInput: o(ue)
208
217
  }, null, 8, ["modelValue", "onInput"])
209
218
  ]),
210
219
  v("div", {
211
220
  class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
212
- "pb-14": !t(l).isReadOnly
221
+ "pb-14": !o(c).isReadOnly
213
222
  }]),
214
- onDragenter: o[3] || (o[3] = L(() => {
223
+ onDragenter: s[3] || (s[3] = L(() => {
215
224
  }, ["prevent"])),
216
- onDragover: o[4] || (o[4] = L(() => {
225
+ onDragover: s[4] || (s[4] = L(() => {
217
226
  }, ["prevent"]))
218
227
  }, [
219
- t(w) ? (f(), S(t(Me), {
228
+ o(y) ? (f(), R(o(We), {
220
229
  key: 0,
221
230
  class: "gap-px custom-scroll",
222
- noResults: !t(O).length
231
+ noResults: !o($).length
223
232
  }, {
224
233
  default: m(() => [
225
- (f(!0), _(T, null, j(t(O), (e, i) => (f(), S(t(Pe), {
226
- id: `#search-input-${e.item.id}`,
227
- key: e.refIndex,
234
+ (f(!0), _(j, null, H(o($), (t, r) => (f(), R(o(ze), {
235
+ id: `#search-input-${t.item.id}`,
236
+ key: t.refIndex,
228
237
  ref_for: !0,
229
- ref: (r) => t(ne)[i] = r,
230
- active: t($) === i,
238
+ ref: (a) => o(me)[r] = a,
239
+ active: o(E) === r,
231
240
  class: "px-2",
232
- onClick: (r) => t(ae)(e),
233
- onFocus: (r) => $.value = i
241
+ onClick: (a) => o(de)(t),
242
+ onFocus: (a) => E.value = r
234
243
  }, {
235
244
  addon: m(() => [
236
- c(Ue, {
245
+ d(Be, {
237
246
  class: "font-bold",
238
- method: e.item.httpVerb ?? "get"
247
+ method: t.item.httpVerb ?? "get"
239
248
  }, null, 8, ["method"])
240
249
  ]),
241
250
  default: m(() => [
242
- A(Re(e.item.title) + " ", 1)
251
+ K(Ue(t.item.title) + " ", 1)
243
252
  ]),
244
253
  _: 2
245
254
  }, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
246
255
  ]),
247
256
  _: 1
248
- }, 8, ["noResults"])) : (f(!0), _(T, { key: 1 }, j(t(G), (e) => {
249
- var i, r;
250
- return f(), S(We, {
251
- key: e.uid,
252
- isDraggable: !t(l).isReadOnly && ((r = (i = e.spec) == null ? void 0 : i.info) == null ? void 0 : r.title) !== "Drafts",
253
- isDroppable: me,
254
- item: e,
257
+ }, 8, ["noResults"])) : (f(!0), _(j, { key: 1 }, H(o(ee), (t) => {
258
+ var r, a;
259
+ return f(), R(je, {
260
+ key: t.uid,
261
+ isDraggable: !o(c).isReadOnly && ((a = (r = t.spec) == null ? void 0 : r.info) == null ? void 0 : a.title) !== "Drafts",
262
+ isDroppable: be,
263
+ item: t,
255
264
  parentUids: [],
256
- onOnDragEnd: ue
265
+ onNewTab: xe,
266
+ onOnDragEnd: ve
257
267
  }, {
258
268
  leftIcon: m(() => [
259
- c(t(I), {
269
+ d(o(D), {
260
270
  class: "text-sidebar-c-2 text-sm group-hover:hidden",
261
271
  icon: "CodeFolder",
262
272
  size: "sm",
@@ -264,10 +274,10 @@ ${r}`, "error"), k.emit("abort");
264
274
  }),
265
275
  v("div", {
266
276
  class: b({
267
- "rotate-90": t(re)[e.uid]
277
+ "rotate-90": o(ne)[t.uid]
268
278
  })
269
279
  }, [
270
- c(t(I), {
280
+ d(o(D), {
271
281
  class: "text-c-3 hidden text-sm group-hover:block",
272
282
  icon: "ChevronRight",
273
283
  size: "sm"
@@ -280,46 +290,46 @@ ${r}`, "error"), k.emit("abort");
280
290
  ], 34)
281
291
  ]),
282
292
  button: m(() => [
283
- t(l).isReadOnly ? C("", !0) : (f(), S(Ie, {
293
+ o(c).isReadOnly ? q("", !0) : (f(), R(Oe, {
284
294
  key: 0,
285
295
  class: b({
286
- "empty-sidebar-item": t(Y).length === 1
296
+ "empty-sidebar-item": o(se).length === 1
287
297
  }),
288
- click: t(J).emit
298
+ click: o(G).emit
289
299
  }, {
290
300
  title: m(() => [
291
- A("Add Item")
301
+ K("Add Item")
292
302
  ]),
293
303
  _: 1
294
304
  }, 8, ["class", "click"]))
295
305
  ]),
296
306
  _: 2
297
307
  }, [
298
- t(l).isReadOnly ? void 0 : {
308
+ o(c).isReadOnly ? void 0 : {
299
309
  name: "header",
300
310
  fn: m(() => [
301
- c(t(Le))
311
+ d(o(Ke))
302
312
  ]),
303
313
  key: "0"
304
314
  }
305
315
  ]), 1032, ["class", "showSideBar"]), [
306
- [ye, u.value]
316
+ [Ce, u.value]
307
317
  ]),
308
- t(y) ? (f(), S(qe, {
318
+ o(w) ? (f(), R(Fe, {
309
319
  key: 0,
310
320
  class: b(["flex-1", [u.value ? "sidebar-active-hide-layout" : ""]])
311
321
  }, {
312
322
  default: m(() => {
313
- var e, i, r, a, n;
323
+ var t, r, a, l, n;
314
324
  return [
315
- c(Oe),
316
- c($e, {
317
- response: (n = (a = (e = t(h)) == null ? void 0 : e.history) == null ? void 0 : a[((r = (i = t(h)) == null ? void 0 : i.history) == null ? void 0 : r.length) - 1]) == null ? void 0 : n.response
325
+ d(Ne),
326
+ d(Pe, {
327
+ response: (n = (l = (t = o(h)) == null ? void 0 : t.history) == null ? void 0 : l[((a = (r = o(h)) == null ? void 0 : r.history) == null ? void 0 : a.length) - 1]) == null ? void 0 : n.response
318
328
  }, null, 8, ["response"])
319
329
  ];
320
330
  }),
321
331
  _: 1
322
- }, 8, ["class"])) : C("", !0)
332
+ }, 8, ["class"])) : q("", !0)
323
333
  ]),
324
334
  _: 1
325
335
  })
@@ -327,5 +337,5 @@ ${r}`, "error"), k.emit("abort");
327
337
  }
328
338
  });
329
339
  export {
330
- yt as default
340
+ Dt as default
331
341
  };
@@ -29,6 +29,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
29
29
  isChild: boolean;
30
30
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
31
  onDragEnd: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => void;
32
+ newTab: (name: string, uid: string) => void;
32
33
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
33
34
  /**
34
35
  * Toggle dragging on and off
@@ -51,6 +52,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
51
52
  isChild: boolean;
52
53
  }>>> & {
53
54
  onOnDragEnd?: ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => any) | undefined;
55
+ onNewTab?: ((name: string, uid: string) => any) | undefined;
54
56
  }, {
55
57
  isDroppable: boolean | ((draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean);
56
58
  isDraggable: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AAueA,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;AAkPlD,iBAAS,cAAc;gBA/MT,IAAI;;gBAAJ,IAAI;EAg3BjB;AACD,QAAA,MAAM,eAAe;IA34BjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;IAdpD;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;;iBATtC,OAAO;MA64BvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAA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AAS,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-f405c234"]]);
5
+ const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-12eca20d"]]);
6
6
  export {
7
- a as default
7
+ p as default
8
8
  };