@scalar/api-client 2.0.26 → 2.0.27

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 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";AAogCA,wBAKG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";AAi/BA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Request.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f0bfeb71"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-60c28ddd"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,41 +1,42 @@
1
- import { defineComponent as W, ref as j, onMounted as F, onBeforeUnmount as A, openBlock as f, createElementBlock as w, Fragment as O, createElementVNode as c, normalizeClass as b, createVNode as r, unref as e, createCommentVNode as _, withCtx as m, withDirectives as H, createSlots as P, withModifiers as R, renderList as J, createBlock as k, createTextVNode as K, vShow as Q } from "vue";
1
+ import { defineComponent as W, ref as j, onMounted as F, onBeforeUnmount as A, openBlock as p, createElementBlock as y, Fragment as R, createElementVNode as f, normalizeClass as b, createVNode as r, unref as e, createCommentVNode as _, withCtx as m, withDirectives as H, createSlots as P, withModifiers as O, renderList as J, createBlock as w, createTextVNode as K, vShow as Q } from "vue";
2
2
  import G from "../../components/AddressBar/AddressBar.vue.js";
3
3
  import X from "../../components/Search/SearchButton.vue.js";
4
4
  import Y from "../../components/Search/SearchModal.vue.js";
5
5
  import Z from "../../components/Sidebar/SidebarButton.vue.js";
6
- import ee from "../../components/ViewLayout/ViewLayout.vue.js";
7
- import te from "../../components/ViewLayout/ViewLayoutContent.vue.js";
8
- import { commandPaletteBus as oe } from "../../libs/eventBusses/command-palette.js";
9
- import { useWorkspace as re } from "../../store/workspace.js";
10
- import se from "./RequestSection/RequestSection.vue.js";
6
+ import ee from "../../components/Sidebar/SidebarToggle.vue.js";
7
+ import te from "../../components/ViewLayout/ViewLayout.vue.js";
8
+ import oe from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
+ import { commandPaletteBus as re } from "../../libs/eventBusses/command-palette.js";
10
+ import { useWorkspace as se } from "../../store/workspace.js";
11
+ import ae from "./RequestSection/RequestSection.vue.js";
11
12
  /* empty css */
12
- import ae from "./ResponseSection/ResponseSection.vue.js";
13
- import { useModal as ne, ScalarIcon as y } from "@scalar/components";
14
- import { REQUEST_METHODS as le } from "@scalar/oas-utils/helpers";
15
- import { isMacOS as B } from "@scalar/use-tooltip";
16
- import { useMagicKeys as ie, useEventListener as ue } from "@vueuse/core";
13
+ import ne from "./ResponseSection/ResponseSection.vue.js";
14
+ import { useModal as le, ScalarIcon as k } from "@scalar/components";
15
+ import { REQUEST_METHODS as ie } from "@scalar/oas-utils/helpers";
16
+ import { isMacOS as D } from "@scalar/use-tooltip";
17
+ import { useMagicKeys as ue, useEventListener as me } from "@vueuse/core";
17
18
  import ce from "./RequestSidebarItem.vue.js";
18
- import me from "../../components/Sidebar/Sidebar.vue.js";
19
+ import de from "../../components/Sidebar/Sidebar.vue.js";
19
20
  /* empty css */
20
- import de from "./components/WorkspaceDropdown.vue.js";
21
- import { useSidebar as pe } from "../../hooks/useSidebar.js";
22
- import { sendRequest as fe } from "../../libs/sendRequest.js";
23
- import { executeRequestBus as D } from "../../libs/eventBusses/executeRequestBus.js";
24
- const ve = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, ge = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, he = { 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" }, je = /* @__PURE__ */ W({
21
+ import pe from "./components/WorkspaceDropdown.vue.js";
22
+ import { useSidebar as fe } from "../../hooks/useSidebar.js";
23
+ import { sendRequest as ve } from "../../libs/sendRequest.js";
24
+ import { executeRequestBus as E } from "../../libs/eventBusses/executeRequestBus.js";
25
+ const ge = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, he = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, xe = { 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" }, Ae = /* @__PURE__ */ W({
25
26
  __name: "Request",
26
- setup(xe) {
27
+ setup(be) {
27
28
  var C;
28
29
  const {
29
30
  activeExample: h,
30
31
  activeRequest: n,
31
- activeSecurityScheme: E,
32
- activeWorkspaceServers: q,
33
- activeWorkspace: i,
32
+ activeSecurityScheme: q,
33
+ activeWorkspaceServers: B,
34
+ activeWorkspace: l,
34
35
  environments: M,
35
- requestMutators: $,
36
- activeWorkspaceCollections: I,
37
- modalState: N
38
- } = re(), { collapsedSidebarFolders: V } = pe(), v = ne(), l = j(!((C = i.value) != null && C.isReadOnly)), S = async () => {
36
+ requestMutators: V,
37
+ activeWorkspaceCollections: $,
38
+ modalState: I
39
+ } = se(), { collapsedSidebarFolders: N } = fe(), v = le(), i = j(!((C = l.value) != null && C.isReadOnly)), S = async () => {
39
40
  var g;
40
41
  if (!n.value || !h.value) {
41
42
  console.warn(
@@ -45,27 +46,27 @@ const ve = { class: "lg:min-h-header flex items-center w-full justify-center p-1
45
46
  }
46
47
  let s = h.value.url;
47
48
  const o = Object.values(M).reduce(
48
- (d, p) => {
49
+ (c, d) => {
49
50
  try {
50
- return { ...d, ...JSON.parse(p.raw) };
51
+ return { ...c, ...JSON.parse(d.raw) };
51
52
  } catch {
52
- return d;
53
+ return c;
53
54
  }
54
55
  },
55
56
  {}
56
57
  ), t = /\{\{(.*?)\}\}/g;
57
- s = s.replace(t, (d, p) => (q.value.forEach((U) => {
58
- if (U.url === p)
59
- return p;
60
- }), o[p] || p));
61
- const { request: a, response: u } = await fe(
58
+ s = s.replace(t, (c, d) => (B.value.forEach((T) => {
59
+ if (T.url === d)
60
+ return d;
61
+ }), o[d] || d));
62
+ const { request: a, response: u } = await ve(
62
63
  n.value,
63
64
  h.value,
64
65
  s,
65
- E.value,
66
- (g = i.value) == null ? void 0 : g.proxyUrl
66
+ q.value,
67
+ (g = l.value) == null ? void 0 : g.proxyUrl
67
68
  );
68
- a && u ? $.edit(n.value.uid, "history", [
69
+ a && u ? V.edit(n.value.uid, "history", [
69
70
  ...n.value.history,
70
71
  {
71
72
  request: a,
@@ -74,43 +75,37 @@ const ve = { class: "lg:min-h-header flex items-center w-full justify-center p-1
74
75
  }
75
76
  ]) : console.warn("No response or request was returned");
76
77
  };
77
- F(() => D.on(S)), A(() => D.off(S));
78
- const z = (s, o, t, a) => {
79
- }, L = () => oe.emit(), x = ie();
80
- ue(document, "keydown", (s) => {
81
- (B() ? x.meta.value : x.ctrl.value) && s.key === "b" && (l.value = !l.value), (B() ? x.meta.value : x.ctrl.value) && s.key === "k" && (v.open ? v.hide() : v.show());
78
+ F(() => E.on(S)), A(() => E.off(S));
79
+ const U = (s, o, t, a) => {
80
+ }, z = () => re.emit(), x = ue();
81
+ me(document, "keydown", (s) => {
82
+ (D() ? x.meta.value : x.ctrl.value) && s.key === "b" && (i.value = !i.value), (D() ? x.meta.value : x.ctrl.value) && s.key === "k" && (v.open ? v.hide() : v.show());
82
83
  });
83
- const T = () => {
84
+ const L = () => {
84
85
  if (!n.value) return "";
85
86
  const { method: s } = n.value;
86
- return le[s].backgroundColor;
87
+ return ie[s].backgroundColor;
87
88
  };
88
- return (s, o) => (f(), w(O, null, [
89
- c("div", {
90
- class: b(["flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full client-wrapper-bg-color", T()])
89
+ return (s, o) => (p(), y(R, null, [
90
+ f("div", {
91
+ class: b(["flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full client-wrapper-bg-color", L()])
91
92
  }, [
92
- c("div", ve, [
93
- c("div", ge, [
94
- c("button", {
95
- class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
96
- type: "button",
97
- onClick: o[0] || (o[0] = (t) => l.value = !l.value)
98
- }, [
99
- r(e(y), {
100
- icon: l.value ? "SideBarOpen" : "SideBarClosed",
101
- size: "sm"
102
- }, null, 8, ["icon"])
103
- ])
93
+ f("div", ge, [
94
+ f("div", he, [
95
+ r(ee, {
96
+ modelValue: i.value,
97
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => i.value = t)
98
+ }, null, 8, ["modelValue"])
104
99
  ]),
105
100
  r(G),
106
- c("div", he, [
107
- e(i).isReadOnly ? (f(), w("button", {
101
+ f("div", xe, [
102
+ e(l).isReadOnly ? (p(), y("button", {
108
103
  key: 0,
109
104
  class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
110
105
  type: "button",
111
- onClick: o[1] || (o[1] = (t) => e(N).hide())
106
+ onClick: o[1] || (o[1] = (t) => e(I).hide())
112
107
  }, [
113
- r(e(y), {
108
+ r(e(k), {
114
109
  icon: "Close",
115
110
  size: "lg",
116
111
  thickness: "1.75"
@@ -118,43 +113,43 @@ const ve = { class: "lg:min-h-header flex items-center w-full justify-center p-1
118
113
  ])) : _("", !0)
119
114
  ])
120
115
  ]),
121
- r(ee, null, {
116
+ r(te, null, {
122
117
  default: m(() => [
123
- H(r(e(me), {
124
- class: b([l.value ? "sidebar-active-width" : ""])
118
+ H(r(e(de), {
119
+ class: b([i.value ? "sidebar-active-width" : ""])
125
120
  }, P({
126
121
  content: m(() => [
127
122
  r(X, {
128
123
  onOpenSearchModal: o[2] || (o[2] = (t) => e(v).show())
129
124
  }),
130
- c("div", {
125
+ f("div", {
131
126
  class: "custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-12 pt-2.5",
132
- onDragenter: o[3] || (o[3] = R(() => {
127
+ onDragenter: o[3] || (o[3] = O(() => {
133
128
  }, ["prevent"])),
134
- onDragover: o[4] || (o[4] = R(() => {
129
+ onDragover: o[4] || (o[4] = O(() => {
135
130
  }, ["prevent"]))
136
131
  }, [
137
- (f(!0), w(O, null, J(e(I), (t, a) => (f(), k(ce, {
132
+ (p(!0), y(R, null, J(e($), (t, a) => (p(), w(ce, {
138
133
  key: t.uid,
139
- isDraggable: !e(i).isReadOnly,
140
- isDroppable: !e(i).isReadOnly,
134
+ isDraggable: !e(l).isReadOnly,
135
+ isDroppable: !e(l).isReadOnly,
141
136
  item: t,
142
137
  parentUids: [],
143
- onOnDragEnd: (...u) => z(t, a, ...u)
138
+ onOnDragEnd: (...u) => U(t, a, ...u)
144
139
  }, {
145
140
  leftIcon: m(() => [
146
- r(e(y), {
141
+ r(e(k), {
147
142
  class: "text-sidebar-c-2 text-sm group-hover:hidden",
148
143
  icon: "CodeFolder",
149
144
  size: "sm",
150
145
  thickness: "2"
151
146
  }),
152
- c("div", {
147
+ f("div", {
153
148
  class: b({
154
- "rotate-90": e(V)[t.uid]
149
+ "rotate-90": e(N)[t.uid]
155
150
  })
156
151
  }, [
157
- r(e(y), {
152
+ r(e(k), {
158
153
  class: "text-c-3 hidden text-sm group-hover:block",
159
154
  icon: "ChevronRight",
160
155
  size: "sm"
@@ -166,9 +161,9 @@ const ve = { class: "lg:min-h-header flex items-center w-full justify-center p-1
166
161
  ], 32)
167
162
  ]),
168
163
  button: m(() => [
169
- e(i).isReadOnly ? _("", !0) : (f(), k(Z, {
164
+ e(l).isReadOnly ? _("", !0) : (p(), w(Z, {
170
165
  key: 0,
171
- click: L
166
+ click: z
172
167
  }, {
173
168
  title: m(() => [
174
169
  K("Add Item")
@@ -178,26 +173,26 @@ const ve = { class: "lg:min-h-header flex items-center w-full justify-center p-1
178
173
  ]),
179
174
  _: 2
180
175
  }, [
181
- e(i).isReadOnly ? void 0 : {
176
+ e(l).isReadOnly ? void 0 : {
182
177
  name: "header",
183
178
  fn: m(() => [
184
- r(e(de))
179
+ r(e(pe))
185
180
  ]),
186
181
  key: "0"
187
182
  }
188
183
  ]), 1032, ["class"]), [
189
- [Q, l.value]
184
+ [Q, i.value]
190
185
  ]),
191
- e(h) ? (f(), k(te, {
186
+ e(h) ? (p(), w(oe, {
192
187
  key: 0,
193
- class: b(["flex-1", [l.value ? "sidebar-active-hide-layout" : ""]])
188
+ class: b(["flex-1", [i.value ? "sidebar-active-hide-layout" : ""]])
194
189
  }, {
195
190
  default: m(() => {
196
- var t, a, u, g, d;
191
+ var t, a, u, g, c;
197
192
  return [
198
- r(se),
199
- r(ae, {
200
- response: (d = (g = (t = e(n)) == null ? void 0 : t.history) == null ? void 0 : g[((u = (a = e(n)) == null ? void 0 : a.history) == null ? void 0 : u.length) - 1]) == null ? void 0 : d.response
193
+ r(ae),
194
+ r(ne, {
195
+ response: (c = (g = (t = e(n)) == null ? void 0 : t.history) == null ? void 0 : g[((u = (a = e(n)) == null ? void 0 : a.history) == null ? void 0 : u.length) - 1]) == null ? void 0 : c.response
201
196
  }, null, 8, ["response"])
202
197
  ];
203
198
  }),
@@ -212,5 +207,5 @@ const ve = { class: "lg:min-h-header flex items-center w-full justify-center p-1
212
207
  }
213
208
  });
214
209
  export {
215
- je as default
210
+ Ae as default
216
211
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";WAwcS,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;WAFT,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;AAmxBlB,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":";WA4dS,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;WAFT,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;AAuyBlB,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"}