@scalar/api-client 2.0.32 → 2.0.34

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 (55) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  3. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  4. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +39 -31
  5. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +65 -55
  7. package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
  8. package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +53 -44
  9. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +42 -34
  11. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +126 -70
  13. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
  14. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +37 -29
  15. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  16. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  17. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +97 -85
  18. package/dist/components/CommandPalette/handleKeyDown.d.ts +2 -0
  19. package/dist/components/CommandPalette/handleKeyDown.d.ts.map +1 -0
  20. package/dist/components/CommandPalette/handleKeyDown.js +7 -0
  21. package/dist/components/Form/Form.vue.js +1 -1
  22. package/dist/components/Search/SearchButton.vue.d.ts.map +1 -1
  23. package/dist/components/Search/SearchButton.vue.js +14 -16
  24. package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
  25. package/dist/components/Sidebar/SidebarList.vue.d.ts.map +1 -1
  26. package/dist/components/Sidebar/SidebarList.vue.js +1 -1
  27. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  28. package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
  29. package/dist/components/Sidebar/SidebarListElement.vue2.js +9 -9
  30. package/dist/constants.d.ts +0 -4
  31. package/dist/constants.d.ts.map +1 -1
  32. package/dist/constants.js +2 -2
  33. package/dist/hooks/useDarkModeState.d.ts.map +1 -1
  34. package/dist/hooks/useDarkModeState.js +5 -5
  35. package/dist/layouts/App/create-api-client-app.d.ts +1 -1
  36. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  37. package/dist/layouts/App/create-api-client-app.js +1 -1
  38. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  39. package/dist/layouts/Modal/ApiClientModal.vue2.js +9 -9
  40. package/dist/layouts/Modal/api-client-modal.d.ts +2 -2
  41. package/dist/layouts/Modal/api-client-modal.d.ts.map +1 -1
  42. package/dist/layouts/Modal/api-client-modal.js +2 -2
  43. package/dist/libs/create-client.d.ts +2 -2
  44. package/dist/libs/create-client.d.ts.map +1 -1
  45. package/dist/libs/create-client.js +68 -68
  46. package/dist/libs/sendRequest.d.ts +2 -1
  47. package/dist/libs/sendRequest.d.ts.map +1 -1
  48. package/dist/libs/sendRequest.js +54 -45
  49. package/dist/style.css +1 -1
  50. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  51. package/dist/views/Request/Request.vue.js +2 -2
  52. package/dist/views/Request/Request.vue2.js +102 -103
  53. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  54. package/dist/views/Request/RequestSection/RequestSection.vue.js +37 -37
  55. package/package.json +6 -6
@@ -1,57 +1,55 @@
1
- import { defineComponent as F, ref as P, onMounted as A, onBeforeUnmount as H, openBlock as f, createElementBlock as y, Fragment as O, createElementVNode as n, normalizeClass as _, createVNode as r, unref as e, createCommentVNode as w, withCtx as m, withDirectives as J, createSlots as K, withModifiers as D, renderList as Q, createBlock as k, createTextVNode as B, vShow as G, pushScopeId as X, popScopeId as Y } from "vue";
2
- import Z from "../../components/AddressBar/AddressBar.vue.js";
3
- import ee from "../../components/Search/SearchButton.vue.js";
4
- import te from "../../components/Search/SearchModal.vue.js";
5
- import oe from "../../components/Sidebar/SidebarButton.vue.js";
6
- import re from "../../components/Sidebar/SidebarToggle.vue.js";
7
- import se from "../../components/ViewLayout/ViewLayout.vue.js";
8
- import ae from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
- import { commandPaletteBus as le } from "../../libs/eventBusses/command-palette.js";
10
- import { useWorkspace as ne } from "../../store/workspace.js";
11
- import ie from "./RequestSection/RequestSection.vue.js";
1
+ import { defineComponent as P, ref as A, onMounted as H, onBeforeUnmount as J, openBlock as f, createElementBlock as y, Fragment as O, createElementVNode as m, normalizeClass as x, createVNode as r, unref as e, createCommentVNode as _, withCtx as u, withDirectives as K, createSlots as Q, withModifiers as D, renderList as G, createBlock as w, createTextVNode as X, vShow as Y, pushScopeId as Z, popScopeId as ee } from "vue";
2
+ import te from "../../components/AddressBar/AddressBar.vue.js";
3
+ import oe from "../../components/Search/SearchButton.vue.js";
4
+ import re from "../../components/Search/SearchModal.vue.js";
5
+ import ae from "../../components/Sidebar/SidebarButton.vue.js";
6
+ import se from "../../components/Sidebar/SidebarToggle.vue.js";
7
+ import le from "../../components/ViewLayout/ViewLayout.vue.js";
8
+ import ne from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
+ import { commandPaletteBus as E } from "../../libs/eventBusses/command-palette.js";
10
+ import { useWorkspace as ie } from "../../store/workspace.js";
11
+ import ce from "./RequestSection/RequestSection.vue.js";
12
12
  /* empty css */
13
- import ce from "./ResponseSection/ResponseSection.vue.js";
14
- import { useModal as ue, ScalarIcon as S } from "@scalar/components";
15
- import { REQUEST_METHODS as me } from "@scalar/oas-utils/helpers";
16
- import { isMacOS as E } from "@scalar/use-tooltip";
17
- import { useMagicKeys as de, useEventListener as pe } from "@vueuse/core";
18
- import fe from "./RequestSidebarItem.vue.js";
19
- import ve from "../../components/Sidebar/Sidebar.vue.js";
13
+ import ue from "./ResponseSection/ResponseSection.vue.js";
14
+ import { useModal as me, ScalarIcon as k } from "@scalar/components";
15
+ import { REQUEST_METHODS as de } from "@scalar/oas-utils/helpers";
16
+ import { isMacOS as q } from "@scalar/use-tooltip";
17
+ import { useMagicKeys as pe, useEventListener as fe } from "@vueuse/core";
18
+ import ve from "./RequestSidebarItem.vue.js";
19
+ import ge from "../../components/Sidebar/Sidebar.vue.js";
20
20
  /* empty css */
21
21
  import he from "./components/WorkspaceDropdown.vue.js";
22
- import { useSidebar as ge } from "../../hooks/useSidebar.js";
22
+ import { useSidebar as be } from "../../hooks/useSidebar.js";
23
23
  import { sendRequest as xe } from "../../libs/sendRequest.js";
24
- import { executeRequestBus as q } from "../../libs/eventBusses/executeRequestBus.js";
25
- const be = (g) => (X("data-v-0c56ac02"), g = g(), Y(), g), _e = { 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 = /* @__PURE__ */ be(() => /* @__PURE__ */ n("div", { class: "text-c-2 text-sm font-medium gitbook-show pl-2" }, [
26
- /* @__PURE__ */ B(" Powered by "),
27
- /* @__PURE__ */ n("a", {
28
- class: "hover:text-c-1",
29
- href: "https://scalar.com/",
30
- target: "_blank"
31
- }, "Scalar.com")
32
- ], -1)), 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" }, Ke = /* @__PURE__ */ F({
24
+ import { executeRequestBus as B } from "../../libs/eventBusses/executeRequestBus.js";
25
+ const ye = (g) => (Z("data-v-ceecd7c7"), g = g(), ee(), g), _e = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, we = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, ke = /* @__PURE__ */ ye(() => /* @__PURE__ */ m("a", {
26
+ class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
27
+ href: "https://scalar.com/",
28
+ target: "_blank"
29
+ }, " Powered by Scalar.com ", -1)), Se = { 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" }, Qe = /* @__PURE__ */ P({
33
30
  __name: "Request",
34
31
  setup(g) {
35
32
  var R;
36
33
  const {
37
- activeExample: x,
34
+ activeExample: h,
38
35
  activeRequest: l,
39
36
  activeSecurityScheme: M,
40
37
  activeWorkspaceServers: I,
41
- activeWorkspace: i,
38
+ activeWorkspace: n,
42
39
  environments: V,
43
40
  requestMutators: $,
44
41
  activeWorkspaceCollections: N,
45
- modalState: U
46
- } = ne(), { collapsedSidebarFolders: z } = ge(), v = ue(), c = P(!((R = i.value) != null && R.isReadOnly)), C = async () => {
47
- var h;
48
- if (!l.value || !x.value) {
42
+ modalState: U,
43
+ cookies: z
44
+ } = ie(), { collapsedSidebarFolders: L } = be(), S = me(), i = A(!((R = n.value) != null && R.isReadOnly)), C = async () => {
45
+ var v;
46
+ if (!l.value || !h.value) {
49
47
  console.warn(
50
48
  "There is no request active at the moment. Please select one then try again."
51
49
  );
52
50
  return;
53
51
  }
54
- let s = x.value.url;
52
+ let a = h.value.url;
55
53
  const o = Object.values(V).reduce(
56
54
  (d, p) => {
57
55
  try {
@@ -62,103 +60,104 @@ const be = (g) => (X("data-v-0c56ac02"), g = g(), Y(), g), _e = { class: "lg:min
62
60
  },
63
61
  {}
64
62
  ), t = /\{\{(.*?)\}\}/g;
65
- s = s.replace(t, (d, p) => (I.value.forEach((j) => {
66
- if (j.url === p)
63
+ a = a.replace(t, (d, p) => (I.value.forEach((F) => {
64
+ if (F.url === p)
67
65
  return p;
68
66
  }), o[p] || p));
69
- const { request: a, response: u } = await xe(
67
+ const { request: s, response: c } = await xe(
70
68
  l.value,
71
- x.value,
72
- s,
69
+ h.value,
70
+ a,
73
71
  M.value,
74
- (h = i.value) == null ? void 0 : h.proxyUrl
72
+ (v = n.value) == null ? void 0 : v.proxyUrl,
73
+ z
75
74
  );
76
- a && u ? $.edit(l.value.uid, "history", [
75
+ s && c ? $.edit(l.value.uid, "history", [
77
76
  ...l.value.history,
78
77
  {
79
- request: a,
80
- response: u,
78
+ request: s,
79
+ response: c,
81
80
  timestamp: Date.now()
82
81
  }
83
82
  ]) : console.warn("No response or request was returned");
84
83
  };
85
- A(() => q.on(C)), H(() => q.off(C));
86
- const L = (s, o, t, a) => {
87
- }, T = () => le.emit(), b = de();
88
- pe(document, "keydown", (s) => {
89
- (E() ? b.meta.value : b.ctrl.value) && s.key === "b" && (c.value = !c.value), (E() ? b.meta.value : b.ctrl.value) && s.key === "k" && (v.open ? v.hide() : v.show());
84
+ H(() => B.on(C)), J(() => B.off(C));
85
+ const T = (a, o, t, s) => {
86
+ }, W = () => E.emit(), b = pe();
87
+ fe(document, "keydown", (a) => {
88
+ (q() ? b.meta.value : b.ctrl.value) && a.key === "b" && (i.value = !i.value), !n.value.isReadOnly && (q() ? b.meta.value : b.ctrl.value) && a.key === "k" && E.emit();
90
89
  });
91
- const W = () => {
90
+ const j = () => {
92
91
  if (!l.value) return "";
93
- const { method: s } = l.value;
94
- return me[s].backgroundColor;
92
+ const { method: a } = l.value;
93
+ return de[a].backgroundColor;
95
94
  };
96
- return (s, o) => (f(), y(O, null, [
97
- n("div", {
98
- class: _(["flex flex-1 flex-col rounded rounded-b-none rounded-r-none pt-0 h-full client-wrapper-bg-color relative", W()])
95
+ return (a, o) => (f(), y(O, null, [
96
+ m("div", {
97
+ class: x(["flex flex-1 flex-col rounded rounded-b-none rounded-r-none pt-0 h-full client-wrapper-bg-color relative", j()])
99
98
  }, [
100
- n("div", _e, [
101
- n("div", ye, [
102
- r(re, {
103
- modelValue: c.value,
104
- "onUpdate:modelValue": o[0] || (o[0] = (t) => c.value = t),
99
+ m("div", _e, [
100
+ m("div", we, [
101
+ r(se, {
102
+ modelValue: i.value,
103
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => i.value = t),
105
104
  class: "gitbook-hidden"
106
105
  }, null, 8, ["modelValue"]),
107
- we
106
+ ke
108
107
  ]),
109
- r(Z),
110
- n("div", ke, [
111
- e(i).isReadOnly ? (f(), y("button", {
108
+ r(te),
109
+ m("div", Se, [
110
+ e(n).isReadOnly ? (f(), y("button", {
112
111
  key: 0,
113
112
  class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
114
113
  type: "button",
115
114
  onClick: o[1] || (o[1] = (t) => e(U).hide())
116
115
  }, [
117
- r(e(S), {
116
+ r(e(k), {
118
117
  icon: "Close",
119
118
  size: "lg",
120
119
  thickness: "1.75"
121
120
  })
122
- ])) : w("", !0)
121
+ ])) : _("", !0)
123
122
  ])
124
123
  ]),
125
- r(se, null, {
126
- default: m(() => [
127
- J(r(e(ve), {
128
- class: _([c.value ? "sidebar-active-width" : ""])
129
- }, K({
130
- content: m(() => [
131
- r(ee, {
132
- onOpenSearchModal: o[2] || (o[2] = (t) => e(v).show())
124
+ r(le, null, {
125
+ default: u(() => [
126
+ K(r(e(ge), {
127
+ class: x([i.value ? "sidebar-active-width" : ""])
128
+ }, Q({
129
+ content: u(() => [
130
+ r(oe, {
131
+ onOpenSearchModal: o[2] || (o[2] = (t) => e(S).show())
133
132
  }),
134
- n("div", {
133
+ m("div", {
135
134
  class: "custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-12 pt-2.5",
136
135
  onDragenter: o[3] || (o[3] = D(() => {
137
136
  }, ["prevent"])),
138
137
  onDragover: o[4] || (o[4] = D(() => {
139
138
  }, ["prevent"]))
140
139
  }, [
141
- (f(!0), y(O, null, Q(e(N), (t, a) => (f(), k(fe, {
140
+ (f(!0), y(O, null, G(e(N), (t, s) => (f(), w(ve, {
142
141
  key: t.uid,
143
- isDraggable: !e(i).isReadOnly,
144
- isDroppable: !e(i).isReadOnly,
142
+ isDraggable: !e(n).isReadOnly,
143
+ isDroppable: !e(n).isReadOnly,
145
144
  item: t,
146
145
  parentUids: [],
147
- onOnDragEnd: (...u) => L(t, a, ...u)
146
+ onOnDragEnd: (...c) => T(t, s, ...c)
148
147
  }, {
149
- leftIcon: m(() => [
150
- r(e(S), {
148
+ leftIcon: u(() => [
149
+ r(e(k), {
151
150
  class: "text-sidebar-c-2 text-sm group-hover:hidden",
152
151
  icon: "CodeFolder",
153
152
  size: "sm",
154
153
  thickness: "2"
155
154
  }),
156
- n("div", {
157
- class: _({
158
- "rotate-90": e(z)[t.uid]
155
+ m("div", {
156
+ class: x({
157
+ "rotate-90": e(L)[t.uid]
159
158
  })
160
159
  }, [
161
- r(e(S), {
160
+ r(e(k), {
162
161
  class: "text-c-3 hidden text-sm group-hover:block",
163
162
  icon: "ChevronRight",
164
163
  size: "sm"
@@ -169,52 +168,52 @@ const be = (g) => (X("data-v-0c56ac02"), g = g(), Y(), g), _e = { class: "lg:min
169
168
  }, 1032, ["isDraggable", "isDroppable", "item", "onOnDragEnd"]))), 128))
170
169
  ], 32)
171
170
  ]),
172
- button: m(() => [
173
- e(i).isReadOnly ? w("", !0) : (f(), k(oe, {
171
+ button: u(() => [
172
+ e(n).isReadOnly ? _("", !0) : (f(), w(ae, {
174
173
  key: 0,
175
- click: T
174
+ click: W
176
175
  }, {
177
- title: m(() => [
178
- B("Add Item")
176
+ title: u(() => [
177
+ X("Add Item")
179
178
  ]),
180
179
  _: 1
181
180
  }))
182
181
  ]),
183
182
  _: 2
184
183
  }, [
185
- e(i).isReadOnly ? void 0 : {
184
+ e(n).isReadOnly ? void 0 : {
186
185
  name: "header",
187
- fn: m(() => [
186
+ fn: u(() => [
188
187
  r(e(he))
189
188
  ]),
190
189
  key: "0"
191
190
  }
192
191
  ]), 1032, ["class"]), [
193
- [G, c.value]
192
+ [Y, i.value]
194
193
  ]),
195
- e(x) ? (f(), k(ae, {
194
+ e(h) ? (f(), w(ne, {
196
195
  key: 0,
197
- class: _(["flex-1", [c.value ? "sidebar-active-hide-layout" : ""]])
196
+ class: x(["flex-1", [i.value ? "sidebar-active-hide-layout" : ""]])
198
197
  }, {
199
- default: m(() => {
200
- var t, a, u, h, d;
198
+ default: u(() => {
199
+ var t, s, c, v, d;
201
200
  return [
202
- r(ie),
203
- r(ce, {
204
- response: (d = (h = (t = e(l)) == null ? void 0 : t.history) == null ? void 0 : h[((u = (a = e(l)) == null ? void 0 : a.history) == null ? void 0 : u.length) - 1]) == null ? void 0 : d.response
201
+ r(ce),
202
+ r(ue, {
203
+ response: (d = (v = (t = e(l)) == null ? void 0 : t.history) == null ? void 0 : v[((c = (s = e(l)) == null ? void 0 : s.history) == null ? void 0 : c.length) - 1]) == null ? void 0 : d.response
205
204
  }, null, 8, ["response"])
206
205
  ];
207
206
  }),
208
207
  _: 1
209
- }, 8, ["class"])) : w("", !0)
208
+ }, 8, ["class"])) : _("", !0)
210
209
  ]),
211
210
  _: 1
212
211
  })
213
212
  ], 2),
214
- r(te, { modalState: e(v) }, null, 8, ["modalState"])
213
+ r(re, { modalState: e(S) }, null, 8, ["modalState"])
215
214
  ], 64));
216
215
  }
217
216
  });
218
217
  export {
219
- Ke as default
218
+ Qe as default
220
219
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";AAiXA,wBAKG"}
1
+ {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";AAmXA,wBAKG"}
@@ -1,16 +1,16 @@
1
- import { defineComponent as y, computed as v, ref as x, watch as A, openBlock as S, createBlock as k, withCtx as _, createVNode as l, unref as n, createElementVNode as r, createTextVNode as q, toDisplayString as B, withDirectives as o, vShow as a } from "vue";
2
- import R from "../../../components/ContextBar.vue.js";
3
- import C from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import { useWorkspace as E } from "../../../store/workspace.js";
1
+ import { defineComponent as x, computed as f, ref as A, watch as S, openBlock as k, createBlock as q, withCtx as _, createVNode as l, unref as n, createElementVNode as u, createTextVNode as R, toDisplayString as B, withDirectives as a, vShow as o } from "vue";
2
+ import C from "../../../components/ContextBar.vue.js";
3
+ import E from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import { useWorkspace as O } from "../../../store/workspace.js";
5
5
  import $ from "./RequestAuth.vue.js";
6
6
  import g from "./RequestBody.vue.js";
7
- import u from "./RequestParams.vue.js";
7
+ import r from "./RequestParams.vue.js";
8
8
  import H from "./RequestPathParams.vue.js";
9
- import { ScalarIcon as O } from "@scalar/components";
10
- const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-5 py-2.5" }, M = /* @__PURE__ */ y({
9
+ import { ScalarIcon as P } from "@scalar/components";
10
+ const T = { class: "flex-1" }, w = { class: "text-c-3 pl-1" }, K = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-5 py-2.5" }, U = /* @__PURE__ */ x({
11
11
  __name: "RequestSection",
12
- setup(K) {
13
- const { activeRequest: i, activeExample: m, activeSecurityRequirements: p } = E(), c = ["POST", "PUT", "PATCH", "DELETE"], h = v(() => {
12
+ setup(N) {
13
+ const { activeRequest: i, activeExample: m, activeSecurityRequirements: d, isReadOnly: h } = O(), c = ["POST", "PUT", "PATCH", "DELETE"], y = f(() => {
14
14
  const t = [
15
15
  "All",
16
16
  "Auth",
@@ -20,74 +20,74 @@ const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "req
20
20
  "Query",
21
21
  "Body"
22
22
  ];
23
- return m.value.parameters.path.length || t.splice(t.indexOf("Request"), 1), c.includes(i.value.method) || t.splice(t.indexOf("Body"), 1), d.value && t.splice(t.indexOf("Auth"), 1), t;
24
- }), d = v(
25
- () => p.value.length === 0 || JSON.stringify(p.value) === "[{}]"
26
- ), e = x("All");
27
- return A(i, (t) => {
23
+ return m.value.parameters.path.length || t.splice(t.indexOf("Request"), 1), c.includes(i.value.method) || t.splice(t.indexOf("Body"), 1), p.value && t.splice(t.indexOf("Auth"), 1), t;
24
+ }), p = f(
25
+ () => h.value && (d.value.length === 0 || JSON.stringify(d.value) === "[{}]")
26
+ ), e = A("All");
27
+ return S(i, (t) => {
28
28
  e.value === "Body" && !c.includes(t.method) && (e.value = "All");
29
- }), (t, f) => (S(), k(C, null, {
29
+ }), (t, v) => (k(), q(E, null, {
30
30
  title: _(() => {
31
31
  var s;
32
32
  return [
33
- l(n(O), {
33
+ l(n(P), {
34
34
  class: "text-c-3 mr-2",
35
35
  icon: "ExternalLink",
36
36
  size: "sm",
37
37
  thickness: "2.5"
38
38
  }),
39
- r("div", P, [
40
- q(" Request "),
41
- r("span", T, B((s = n(i)) == null ? void 0 : s.summary), 1)
39
+ u("div", T, [
40
+ R(" Request "),
41
+ u("span", w, B((s = n(i)) == null ? void 0 : s.summary), 1)
42
42
  ])
43
43
  ];
44
44
  }),
45
45
  default: _(() => [
46
- r("div", w, [
47
- l(R, {
46
+ u("div", K, [
47
+ l(C, {
48
48
  activeSection: e.value,
49
- sections: h.value,
50
- onSetActiveSection: f[0] || (f[0] = (s) => e.value = s)
49
+ sections: y.value,
50
+ onSetActiveSection: v[0] || (v[0] = (s) => e.value = s)
51
51
  }, null, 8, ["activeSection", "sections"]),
52
- o(l($, { title: "Authentication" }, null, 512), [
52
+ a(l($, { title: "Authentication" }, null, 512), [
53
53
  [
54
- a,
55
- !d.value && (e.value === "All" || e.value === "Auth")
54
+ o,
55
+ !p.value && (e.value === "All" || e.value === "Auth")
56
56
  ]
57
57
  ]),
58
- o(l(H, {
58
+ a(l(H, {
59
59
  paramKey: "path",
60
60
  title: "Path Variables"
61
61
  }, null, 512), [
62
62
  [
63
- a,
63
+ o,
64
64
  (e.value === "All" || e.value === "Request") && n(m).parameters.path.length > 0
65
65
  ]
66
66
  ]),
67
- o(l(u, {
67
+ a(l(r, {
68
68
  paramKey: "cookies",
69
69
  title: "Cookies"
70
70
  }, null, 512), [
71
- [a, e.value === "All" || e.value === "Cookies"]
71
+ [o, e.value === "All" || e.value === "Cookies"]
72
72
  ]),
73
- o(l(u, {
73
+ a(l(r, {
74
74
  paramKey: "headers",
75
75
  title: "Headers"
76
76
  }, null, 512), [
77
- [a, e.value === "All" || e.value === "Headers"]
77
+ [o, e.value === "All" || e.value === "Headers"]
78
78
  ]),
79
- o(l(u, {
79
+ a(l(r, {
80
80
  paramKey: "query",
81
81
  title: "Query Parameters"
82
82
  }, null, 512), [
83
- [a, e.value === "All" || e.value === "Query"]
83
+ [o, e.value === "All" || e.value === "Query"]
84
84
  ]),
85
- o(l(g, {
85
+ a(l(g, {
86
86
  body: "foo",
87
87
  title: "Body"
88
88
  }, null, 512), [
89
89
  [
90
- a,
90
+ o,
91
91
  (e.value === "All" || e.value === "Body") && c.includes(n(i).method)
92
92
  ]
93
93
  ])
@@ -98,5 +98,5 @@ const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "req
98
98
  }
99
99
  });
100
100
  export {
101
- M as default
101
+ U as default
102
102
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.32",
21
+ "version": "2.0.34",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -122,14 +122,14 @@
122
122
  "vue": "^3.4.29",
123
123
  "vue-router": "^4.3.0",
124
124
  "zod": "^3.22.4",
125
- "@scalar/oas-utils": "0.2.17",
126
- "@scalar/themes": "0.9.16",
127
- "@scalar/components": "0.12.19",
125
+ "@scalar/components": "0.12.21",
126
+ "@scalar/oas-utils": "0.2.18",
127
+ "@scalar/object-utils": "1.1.5",
128
128
  "@scalar/draggable": "0.1.3",
129
+ "@scalar/themes": "0.9.16",
129
130
  "@scalar/use-codemirror": "0.11.8",
130
- "@scalar/use-toasts": "0.7.4",
131
131
  "@scalar/use-tooltip": "1.0.2",
132
- "@scalar/object-utils": "1.1.5"
132
+ "@scalar/use-toasts": "0.7.4"
133
133
  },
134
134
  "devDependencies": {
135
135
  "@types/content-type": "^1.1.8",