@scalar/api-client 2.0.12 → 2.0.14

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 (54) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/App.vue.d.ts.map +1 -1
  3. package/dist/App.vue.js +51 -28
  4. package/dist/Modal/api-client-modal.d.ts +2 -1
  5. package/dist/Modal/api-client-modal.d.ts.map +1 -1
  6. package/dist/Modal/api-client-modal.js +49 -40
  7. package/dist/components/ActionModal/ActionModalFolder.vue.js +37 -35
  8. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  9. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  10. package/dist/components/AddressBar/AddressBar.vue2.js +44 -44
  11. package/dist/components/AddressBar/AddressBarServer.vue.d.ts +1 -14
  12. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  13. package/dist/components/AddressBar/AddressBarServer.vue.js +54 -59
  14. package/dist/components/CodeInput/CodeInput.vue.d.ts +2 -0
  15. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  16. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  17. package/dist/components/CodeInput/CodeInput.vue2.js +16 -14
  18. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  19. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +15 -17
  20. package/dist/components/Sidebar/Sidebar.vue.js +5 -5
  21. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  22. package/dist/components/Sidebar/SidebarListElementActions.vue.js +12 -12
  23. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  24. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  25. package/dist/components/TopNav/TopNavItem.vue2.js +10 -7
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +8 -9
  29. package/dist/libs/index.d.ts +1 -0
  30. package/dist/libs/index.d.ts.map +1 -1
  31. package/dist/libs/index.js +10 -8
  32. package/dist/libs/local-storage.d.ts +9 -0
  33. package/dist/libs/local-storage.d.ts.map +1 -0
  34. package/dist/libs/local-storage.js +36 -0
  35. package/dist/router.d.ts +2 -2
  36. package/dist/router.d.ts.map +1 -1
  37. package/dist/router.js +13 -13
  38. package/dist/store/workspace.d.ts +511 -269
  39. package/dist/store/workspace.d.ts.map +1 -1
  40. package/dist/store/workspace.js +213 -157
  41. package/dist/style.css +1 -1
  42. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  43. package/dist/views/Request/Request.vue.js +1 -1
  44. package/dist/views/Request/Request.vue2.js +105 -102
  45. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  46. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -0
  47. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  48. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  49. package/dist/views/Request/RequestSidebarItem.vue2.js +25 -25
  50. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  51. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  52. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +56 -56
  53. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +11 -11
  54. package/package.json +7 -7
@@ -1,146 +1,149 @@
1
- import { defineComponent as K, ref as P, onMounted as W, onBeforeUnmount as G, computed as J, openBlock as p, createElementBlock as _, Fragment as B, createElementVNode as c, createVNode as s, unref as e, createCommentVNode as k, withCtx as d, withDirectives as Q, normalizeClass as S, createTextVNode as q, toDisplayString as X, withModifiers as E, renderList as Y, createBlock as C, vShow as Z } from "vue";
2
- import ee from "../../components/ActionModal/ActionModal.vue.js";
3
- import te from "../../components/AddressBar/AddressBar.vue.js";
4
- import oe from "../../components/Search/SearchButton.vue.js";
5
- import re from "../../components/Search/SearchModal.vue.js";
6
- import se from "../../components/Sidebar/SidebarButton.vue.js";
7
- import ne from "../../components/ViewLayout/ViewLayout.vue.js";
8
- import ae from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
- import { useWorkspace as le } from "../../store/workspace.js";
10
- import ie from "./RequestSection/RequestSection.vue.js";
1
+ import { defineComponent as P, ref as G, onMounted as J, onBeforeUnmount as Q, computed as X, openBlock as p, createElementBlock as _, Fragment as q, createElementVNode as d, createVNode as r, unref as e, createCommentVNode as k, withCtx as m, withDirectives as Y, normalizeClass as S, createTextVNode as $, toDisplayString as Z, withModifiers as E, renderList as ee, createBlock as C, vShow as te } from "vue";
2
+ import oe from "../../components/ActionModal/ActionModal.vue.js";
3
+ import se from "../../components/AddressBar/AddressBar.vue.js";
4
+ import re from "../../components/Search/SearchButton.vue.js";
5
+ import ne from "../../components/Search/SearchModal.vue.js";
6
+ import ae from "../../components/Sidebar/SidebarButton.vue.js";
7
+ import le from "../../components/ViewLayout/ViewLayout.vue.js";
8
+ import ie from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
+ import { useWorkspace as ue } from "../../store/workspace.js";
10
+ import ce from "./RequestSection/RequestSection.vue.js";
11
11
  /* empty css */
12
- import ue from "./ResponseSection/ResponseSection.vue.js";
13
- import { useModal as ce, ScalarIcon as h } from "@scalar/components";
14
- import { isMacOS as $ } from "@scalar/use-tooltip";
15
- import { useMagicKeys as de, useEventListener as me } from "@vueuse/core";
16
- import pe from "./RequestSidebarItem.vue.js";
17
- import { useActionModal as fe } from "../../hooks/useActionModal.js";
18
- import ve from "../../components/Sidebar/Sidebar.vue.js";
12
+ import de from "./ResponseSection/ResponseSection.vue.js";
13
+ import { useModal as me, ScalarIcon as b } from "@scalar/components";
14
+ import { isMacOS as I } from "@scalar/use-tooltip";
15
+ import { useMagicKeys as pe, useEventListener as fe } from "@vueuse/core";
16
+ import ve from "./RequestSidebarItem.vue.js";
17
+ import { useActionModal as ge } from "../../hooks/useActionModal.js";
18
+ import xe from "../../components/Sidebar/Sidebar.vue.js";
19
19
  /* empty css */
20
- import { useSidebar as ge } from "../../hooks/useSidebar.js";
21
- import { sendRequest as xe } from "../../libs/sendRequest.js";
22
- import { executeRequestBus as I } from "../../libs/eventBusses/executeRequestBus.js";
23
- const he = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full" }, be = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, ye = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, 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" }, V = !0, Ke = /* @__PURE__ */ K({
20
+ import { useSidebar as he } from "../../hooks/useSidebar.js";
21
+ import { sendRequest as be } from "../../libs/sendRequest.js";
22
+ import { executeRequestBus as V } from "../../libs/eventBusses/executeRequestBus.js";
23
+ const ye = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full" }, we = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, _e = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, ke = { 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" }, Pe = /* @__PURE__ */ P({
24
24
  __name: "Request",
25
- setup(_e) {
25
+ setup(Se) {
26
+ var O;
26
27
  const {
27
- activeExample: b,
28
- activeRequest: m,
29
- activeServer: y,
28
+ activeExample: y,
29
+ activeRequest: i,
30
+ activeServer: x,
30
31
  activeSecurityScheme: z,
31
- collections: L,
32
- modalState: N,
33
- workspace: l
34
- } = le(), { collapsedSidebarFolders: U } = ge(), w = fe(), f = ce(), i = P(!l.isReadOnly), A = (r) => {
35
- w.tab = r;
32
+ activeWorkspace: u,
33
+ collections: N,
34
+ modalState: j
35
+ } = ue(), { collapsedSidebarFolders: A } = he(), w = ge(), f = me(), l = G(!((O = u.value) != null && O.isReadOnly)), L = (s) => {
36
+ w.tab = s;
36
37
  }, D = async () => {
37
- var n, u;
38
- if (!m.value || !b.value) {
38
+ var n, c, v, g;
39
+ if (!i.value || !y.value) {
39
40
  console.warn(
40
41
  "There is no request active at the moment. Please select one then try again."
41
42
  );
42
43
  return;
43
44
  }
44
- let r = ((n = y.value) == null ? void 0 : n.url) + m.value.path;
45
- if ((u = y.value) != null && u.variables) {
46
- const g = /{\s*([\w.-]+)\s*}/g;
47
- r = r.replace(g, (x, H) => {
48
- var R, M, O;
49
- const a = (M = (R = y.value) == null ? void 0 : R.variables) == null ? void 0 : M[H];
50
- return (a == null ? void 0 : a.value) || (a == null ? void 0 : a.default) || ((O = a == null ? void 0 : a.enum) == null ? void 0 : O[0]) || x;
45
+ let s = (n = x.value) != null && n.url ? ((c = x.value) == null ? void 0 : c.url) + i.value.path : i.value.path;
46
+ if ((v = x.value) != null && v.variables) {
47
+ const W = /{\s*([\w.-]+)\s*}/g;
48
+ s = s.replace(W, (H, K) => {
49
+ var R, M, B;
50
+ const a = (M = (R = x.value) == null ? void 0 : R.variables) == null ? void 0 : M[K];
51
+ return (a == null ? void 0 : a.value) || (a == null ? void 0 : a.default) || ((B = a == null ? void 0 : a.enum) == null ? void 0 : B[0]) || H;
51
52
  });
52
53
  }
53
- const { request: o, response: t } = await xe(
54
- m.value,
55
- b.value,
56
- r,
54
+ const { request: o, response: t } = await be(
55
+ i.value,
56
+ y.value,
57
+ s,
57
58
  z.value,
58
- l.proxyUrl
59
+ (g = u.value) == null ? void 0 : g.proxyUrl
59
60
  );
60
- o && t ? m.value.history.push({
61
+ o && t ? i.value.history.push({
61
62
  request: o,
62
63
  response: t,
63
64
  timestamp: Date.now()
64
65
  }) : console.warn("No response or request was returned");
65
66
  };
66
- W(() => I.on(D)), G(() => I.off(D));
67
- const F = J(
68
- () => l.collectionUids.map((r) => L[r])
69
- ), T = (r, o, t, n) => {
70
- }, j = () => {
67
+ J(() => V.on(D)), Q(() => V.off(D));
68
+ const U = X(() => {
69
+ const s = Object.values(N), o = s.findIndex((n) => n.uid === "drafts"), [t] = s.splice(o, 1);
70
+ return s.push(t), s;
71
+ }), F = (s, o, t, n) => {
72
+ }, T = () => {
71
73
  w.show();
72
- }, v = de();
73
- return me(document, "keydown", (r) => {
74
- ($() ? v.meta.value : v.ctrl.value) && r.key === "b" && (i.value = !i.value), ($() ? v.meta.value : v.ctrl.value) && r.key === "k" && (f.open ? f.hide() : f.show());
75
- }), (r, o) => (p(), _(B, null, [
76
- c("div", he, [
77
- c("div", be, [
78
- c("div", ye, [
79
- c("button", {
74
+ }, h = pe();
75
+ return fe(document, "keydown", (s) => {
76
+ (I() ? h.meta.value : h.ctrl.value) && s.key === "b" && (l.value = !l.value), (I() ? h.meta.value : h.ctrl.value) && s.key === "k" && (f.open ? f.hide() : f.show());
77
+ }), (s, o) => (p(), _(q, null, [
78
+ d("div", ye, [
79
+ d("div", we, [
80
+ d("div", _e, [
81
+ d("button", {
80
82
  class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
81
83
  type: "button",
82
- onClick: o[0] || (o[0] = (t) => i.value = !i.value)
84
+ onClick: o[0] || (o[0] = (t) => l.value = !l.value)
83
85
  }, [
84
- s(e(h), {
85
- icon: i.value ? "SideBarOpen" : "SideBarClosed",
86
+ r(e(b), {
87
+ icon: l.value ? "SideBarOpen" : "SideBarClosed",
86
88
  size: "sm"
87
89
  }, null, 8, ["icon"])
88
90
  ])
89
91
  ]),
90
- s(te),
91
- c("div", we, [
92
- e(l).isReadOnly ? (p(), _("button", {
92
+ r(se),
93
+ d("div", ke, [
94
+ e(u).isReadOnly ? (p(), _("button", {
93
95
  key: 0,
94
96
  class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
95
97
  type: "button",
96
- onClick: o[1] || (o[1] = (t) => e(N).hide())
98
+ onClick: o[1] || (o[1] = (t) => e(j).hide())
97
99
  }, [
98
- s(e(h), {
100
+ r(e(b), {
101
+ class: "stroke-[1.75]",
99
102
  icon: "Close",
100
- size: "xs"
103
+ size: "lg"
101
104
  })
102
105
  ])) : k("", !0)
103
106
  ])
104
107
  ]),
105
- s(ne, null, {
106
- default: d(() => [
107
- Q(s(e(ve), {
108
- class: S([i.value ? "sidebar-active-width" : ""])
108
+ r(le, null, {
109
+ default: m(() => [
110
+ Y(r(e(xe), {
111
+ class: S([l.value ? "sidebar-active-width" : ""])
109
112
  }, {
110
- title: d(() => [
111
- q(X(e(l).name), 1)
113
+ title: m(() => [
114
+ $(Z(e(u).name), 1)
112
115
  ]),
113
- content: d(() => [
114
- s(oe, {
116
+ content: m(() => [
117
+ r(re, {
115
118
  onOpenSearchModal: o[2] || (o[2] = (t) => e(f).show())
116
119
  }),
117
- c("div", {
120
+ d("div", {
118
121
  class: "custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-12 pt-2.5",
119
122
  onDragenter: o[3] || (o[3] = E(() => {
120
123
  }, ["prevent"])),
121
124
  onDragover: o[4] || (o[4] = E(() => {
122
125
  }, ["prevent"]))
123
126
  }, [
124
- (p(!0), _(B, null, Y(F.value, (t, n) => (p(), C(pe, {
127
+ (p(!0), _(q, null, ee(U.value, (t, n) => (p(), C(ve, {
125
128
  key: t.uid,
126
- isDraggable: V && !e(l).isReadOnly,
127
- isDroppable: V && !e(l).isReadOnly,
129
+ isDraggable: !e(u).isReadOnly,
130
+ isDroppable: !e(u).isReadOnly,
128
131
  item: t,
129
132
  parentUids: [],
130
- onOnDragEnd: (...u) => T(t, n, ...u)
133
+ onOnDragEnd: (...c) => F(t, n, ...c)
131
134
  }, {
132
- leftIcon: d(() => [
133
- s(e(h), {
135
+ leftIcon: m(() => [
136
+ r(e(b), {
134
137
  class: "text-sidebar-c-2 stroke-[1] text-sm group-hover:hidden",
135
138
  icon: "CodeFolder",
136
139
  size: "sm"
137
140
  }),
138
- c("div", {
141
+ d("div", {
139
142
  class: S({
140
- "rotate-90": e(U)[t.uid]
143
+ "rotate-90": e(A)[t.uid]
141
144
  })
142
145
  }, [
143
- s(e(h), {
146
+ r(e(b), {
144
147
  class: "text-c-3 hidden text-sm group-hover:block",
145
148
  icon: "ChevronRight",
146
149
  size: "sm"
@@ -151,48 +154,48 @@ const he = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
151
154
  }, 1032, ["isDraggable", "isDroppable", "item", "onOnDragEnd"]))), 128))
152
155
  ], 32)
153
156
  ]),
154
- button: d(() => [
155
- e(l).isReadOnly ? k("", !0) : (p(), C(se, {
157
+ button: m(() => [
158
+ e(u).isReadOnly ? k("", !0) : (p(), C(ae, {
156
159
  key: 0,
157
- click: j
160
+ click: T
158
161
  }, {
159
- title: d(() => [
160
- q("Add Item")
162
+ title: m(() => [
163
+ $("Add Item")
161
164
  ]),
162
165
  _: 1
163
166
  }))
164
167
  ]),
165
168
  _: 1
166
169
  }, 8, ["class"]), [
167
- [Z, i.value]
170
+ [te, l.value]
168
171
  ]),
169
- e(b) ? (p(), C(ae, {
172
+ e(y) ? (p(), C(ie, {
170
173
  key: 0,
171
- class: S(["flex-1", [i.value ? "sidebar-active-hide-layout" : ""]])
174
+ class: S(["flex-1", [l.value ? "sidebar-active-hide-layout" : ""]])
172
175
  }, {
173
- default: d(() => {
174
- var t, n, u, g, x;
176
+ default: m(() => {
177
+ var t, n, c, v, g;
175
178
  return [
176
- s(ie),
177
- s(ue, {
178
- response: (x = (g = (t = e(m)) == null ? void 0 : t.history) == null ? void 0 : g[((u = (n = e(m)) == null ? void 0 : n.history) == null ? void 0 : u.length) - 1]) == null ? void 0 : x.response
179
+ r(ce),
180
+ r(de, {
181
+ response: (g = (v = (t = e(i)) == null ? void 0 : t.history) == null ? void 0 : v[((c = (n = e(i)) == null ? void 0 : n.history) == null ? void 0 : c.length) - 1]) == null ? void 0 : g.response
179
182
  }, null, 8, ["response"])
180
183
  ];
181
184
  }),
182
185
  _: 1
183
186
  }, 8, ["class"])) : k("", !0),
184
- s(ee, {
187
+ r(oe, {
185
188
  state: e(w),
186
- "onUpdate:tab": A
189
+ "onUpdate:tab": L
187
190
  }, null, 8, ["state"])
188
191
  ]),
189
192
  _: 1
190
193
  })
191
194
  ]),
192
- s(re, { modalState: e(f) }, null, 8, ["modalState"])
195
+ r(ne, { modalState: e(f) }, null, 8, ["modalState"])
193
196
  ], 64));
194
197
  }
195
198
  });
196
199
  export {
197
- Ke as default
200
+ Pe as default
198
201
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";WAmbS,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;WAFT,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;AAkwBlB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";WAobS,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;WAFT,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;AAkwBlB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -291,6 +291,7 @@ const te = {
291
291
  content: "",
292
292
  language: z.value,
293
293
  lineNumbers: "",
294
+ lint: "",
294
295
  modelValue: ((l = s(t)) == null ? void 0 : l.body.raw.value) ?? "",
295
296
  "onUpdate:modelValue": $
296
297
  }, null, 8, ["language", "modelValue"]))
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AAoOA,OAAO,EAEL,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;AA2GlD,iBAAS,cAAc;gBAxET,IAAI;;gBAAJ,IAAI;EAyVjB;AACD,QAAA,MAAM,eAAe;IApXjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,OAAO;IACrB,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;IAdpD;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,OAAO;IACrB,qEAAq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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"}
@@ -1,8 +1,8 @@
1
1
  import t from "./RequestSidebarItem.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
- import e from "../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ e(t, [["__scopeId", "data-v-ee9f7225"]]);
4
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b4b0220b"]]);
6
6
  export {
7
7
  a as default
8
8
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as N, useCssVars as V, computed as l, resolveComponent as x, openBlock as o, createElementBlock as d, normalizeClass as p, unref as r, createVNode as u, withCtx as y, createBlock as f, createElementVNode as n, toDisplayString as U, createCommentVNode as b, createTextVNode as k, renderSlot as j, withDirectives as F, Fragment as L, renderList as T, vShow as K } from "vue";
1
+ import { defineComponent as V, useCssVars as x, computed as l, resolveComponent as O, openBlock as o, createElementBlock as d, normalizeClass as p, unref as r, createVNode as u, withCtx as U, createBlock as f, createElementVNode as n, toDisplayString as y, createCommentVNode as b, createTextVNode as q, renderSlot as j, withDirectives as F, Fragment as L, renderList as T, vShow as K } from "vue";
2
2
  import { useWorkspace as W } from "../../store/workspace.js";
3
3
  import { ScalarIcon as A } from "@scalar/components";
4
4
  import { Draggable as G } from "@scalar/draggable";
@@ -6,7 +6,7 @@ import { useRouter as H, RouterLink as J } from "vue-router";
6
6
  import M from "./RequestSidebarItemMenu.vue.js";
7
7
  import P from "../../components/HttpMethod/HttpMethod.vue.js";
8
8
  import { useSidebar as Q } from "../../hooks/useSidebar.js";
9
- const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y = { class: "relative" }, Z = { class: "flex" }, _ = { class: "z-10 mr-[-.5px] flex h-fit items-center justify-center" }, ee = { class: "z-10 font-medium" }, te = { key: 2 }, q = "hover:before:bg-sidebar-active-b before:absolute before:inset-0 before:rounded before-left-offset", pe = /* @__PURE__ */ N({
9
+ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y = { class: "relative" }, Z = { class: "flex" }, _ = { class: "z-10 mr-[-.5px] flex h-fit items-center justify-center" }, ee = { class: "z-10 font-medium" }, te = { key: 2 }, k = "hover:before:bg-sidebar-active-b before:absolute before:inset-0 before:rounded before-left-offset", pe = /* @__PURE__ */ V({
10
10
  __name: "RequestSidebarItem",
11
11
  props: {
12
12
  isDraggable: { type: Boolean, default: !1 },
@@ -16,25 +16,25 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
16
16
  },
17
17
  emits: ["onDragEnd"],
18
18
  setup(w) {
19
- V((e) => ({
20
- "5d4e900a": E.value
19
+ x((e) => ({
20
+ "1aa238fc": R.value
21
21
  }));
22
- const s = w, { activeRequest: g, folders: C, requests: c, requestExamples: R, workspace: a } = W(), { collapsedSidebarFolders: h, toggleSidebarFolder: $ } = Q(), S = H(), v = l(() => "childUids" in s.item), E = l(() => s.parentUids.length ? a.isReadOnly ? `-${(s.parentUids.length - 1) * 16}px` : `-${s.parentUids.length * 16}px` : "0px"), O = (e, t) => {
23
- e.metaKey ? window.open(`/request/${t}`, "_blank") : S.push(`/request/${t}`);
22
+ const s = w, { activeRequest: g, folders: C, isReadOnly: a, requests: c, requestExamples: $ } = W(), { collapsedSidebarFolders: h, toggleSidebarFolder: S } = Q(), E = H(), v = l(() => "childUids" in s.item), R = l(() => s.parentUids.length ? a ? `-${(s.parentUids.length - 1) * 16}px` : `-${s.parentUids.length * 16}px` : "0px"), z = (e, t) => {
23
+ e.metaKey ? window.open(`/request/${t}`, "_blank") : E.push(`/request/${t}`);
24
24
  }, D = (e) => {
25
25
  var t;
26
26
  return "spec" in e ? (t = e.spec.info) == null ? void 0 : t.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
27
- }, z = l(() => ("requestUid" in s.item ? c[s.item.requestUid] : s.item).method), I = l(
27
+ }, I = l(() => ("requestUid" in s.item ? c[s.item.requestUid] : s.item).method), B = l(
28
28
  () => {
29
29
  var e;
30
30
  return h[s.item.uid] || ((e = g.value) == null ? void 0 : e.uid) === s.item.uid && s.item.childUids.length > 1;
31
31
  }
32
32
  );
33
33
  return (e, t) => {
34
- const B = x("RequestSidebarItem", !0);
34
+ const N = O("RequestSidebarItem", !0);
35
35
  return o(), d("div", {
36
36
  class: p(["relative flex flex-row", [
37
- r(a).isReadOnly && e.parentUids.length > 1 || !r(a).isReadOnly && e.parentUids.length ? "before:bg-b-3 pl-4 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-px mb-[.5px] last:mb-0" : ""
37
+ r(a) && e.parentUids.length > 1 || !r(a) && e.parentUids.length ? "before:bg-b-3 pl-4 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-px mb-[.5px] last:mb-0" : ""
38
38
  ]])
39
39
  }, [
40
40
  u(r(G), {
@@ -47,35 +47,35 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
47
47
  parentIds: e.parentUids,
48
48
  onOnDragEnd: t[3] || (t[3] = (...i) => e.$emit("onDragEnd", ...i))
49
49
  }, {
50
- default: y(() => [
50
+ default: U(() => [
51
51
  "summary" in e.item || "requestUid" in e.item ? (o(), f(r(J), {
52
52
  key: 0,
53
53
  custom: "",
54
54
  to: `/request/${e.item.uid}`
55
55
  }, {
56
- default: y(() => {
56
+ default: U(() => {
57
57
  var i;
58
58
  return [
59
59
  n("div", {
60
60
  class: p(["group relative flex min-h-8 cursor-pointer flex-row items-start justify-between gap-2 py-1.5 pr-2 rounded editable-sidebar-hover", [
61
- q,
61
+ k,
62
62
  ((i = r(g)) == null ? void 0 : i.uid) === e.item.uid ? "before:bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2",
63
63
  (e.isDroppable, "pl-3")
64
64
  ]]),
65
65
  tabindex: "0",
66
- onClick: t[0] || (t[0] = (m) => O(m, e.item.uid))
66
+ onClick: t[0] || (t[0] = (m) => z(m, e.item.uid))
67
67
  }, [
68
- n("span", X, U(D(e.item)), 1),
68
+ n("span", X, y(D(e.item)), 1),
69
69
  n("div", Y, [
70
- r(a).isReadOnly ? b("", !0) : (o(), f(M, {
70
+ r(a) ? b("", !0) : (o(), f(M, {
71
71
  key: 0,
72
72
  item: e.item
73
73
  }, null, 8, ["item"])),
74
74
  n("span", Z, [
75
- k("   "),
75
+ q("   "),
76
76
  u(r(P), {
77
77
  class: "font-bold",
78
- method: z.value
78
+ method: I.value
79
79
  }, null, 8, ["method"])
80
80
  ])
81
81
  ])
@@ -83,11 +83,11 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
83
83
  ];
84
84
  }),
85
85
  _: 1
86
- }, 8, ["to"])) : !r(a).isReadOnly || e.parentUids.length ? (o(), d("button", {
86
+ }, 8, ["to"])) : !r(a) || e.parentUids.length ? (o(), d("button", {
87
87
  key: 1,
88
- class: p(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", q]),
88
+ class: p(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", k]),
89
89
  type: "button",
90
- onClick: t[1] || (t[1] = (i) => r($)(e.item.uid))
90
+ onClick: t[1] || (t[1] = (i) => r(S)(e.item.uid))
91
91
  }, [
92
92
  n("span", _, [
93
93
  j(e.$slots, "leftIcon", {}, () => [
@@ -103,21 +103,21 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
103
103
  })
104
104
  ], 2)
105
105
  ], !0),
106
- k("   ")
106
+ q("   ")
107
107
  ]),
108
- n("span", ee, U(D(e.item)), 1)
108
+ n("span", ee, y(D(e.item)), 1)
109
109
  ])) : b("", !0),
110
110
  "childUids" in e.item ? F((o(), d("div", te, [
111
- (o(!0), d(L, null, T(e.item.childUids, (i) => (o(), f(B, {
111
+ (o(!0), d(L, null, T(e.item.childUids, (i) => (o(), f(N, {
112
112
  key: i,
113
113
  isDraggable: e.isDraggable,
114
114
  isDroppable: e.isDroppable,
115
- item: r(C)[i] || r(c)[i] || r(R)[i],
115
+ item: r(C)[i] || r(c)[i] || r($)[i],
116
116
  parentUids: [...e.parentUids, e.item.uid],
117
117
  onOnDragEnd: t[2] || (t[2] = (...m) => e.$emit("onDragEnd", ...m))
118
118
  }, null, 8, ["isDraggable", "isDroppable", "item", "parentUids"]))), 128))
119
119
  ], 512)), [
120
- [K, I.value]
120
+ [K, B.value]
121
121
  ]) : b("", !0)
122
122
  ]),
123
123
  _: 3
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBody.vue"],"names":[],"mappings":";WA0KW,MAAM;YACL,OAAO;UACT,GAAG;aACA;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,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AAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-99c6c7a3"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cc2ae6a8"]]);
5
5
  export {
6
- a as default
6
+ r as default
7
7
  };