@scalar/api-client 2.2.17 → 2.2.19

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 +21 -0
  2. package/dist/components/DataTable/DataTable.vue.js +1 -1
  3. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  4. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +27 -33
  5. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  6. package/dist/components/SideNav/SideNav.vue.js +9 -6
  7. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  8. package/dist/components/Sidebar/Sidebar.vue2.js +18 -18
  9. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  10. package/dist/components/Sidebar/SidebarListElement.vue2.js +1 -1
  11. package/dist/components/Sidebar/SidebarToggle.vue.js +2 -2
  12. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  13. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +19 -19
  14. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  15. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +7 -7
  16. package/dist/layouts/App/create-api-client-app.d.ts +3 -3
  17. package/dist/layouts/Modal/create-api-client-modal.d.ts +6 -6
  18. package/dist/layouts/Web/create-api-client-web.d.ts +3 -3
  19. package/dist/libs/create-client.d.ts +3 -3
  20. package/dist/libs/create-client.d.ts.map +1 -1
  21. package/dist/libs/create-client.js +51 -64
  22. package/dist/store/request-example.d.ts +2 -2
  23. package/dist/store/store.d.ts +2 -2
  24. package/dist/style.css +1 -1
  25. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  26. package/dist/views/Environment/Environment.vue2.js +1 -1
  27. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  28. package/dist/views/Request/Request.vue.js +2 -2
  29. package/dist/views/Request/Request.vue2.js +118 -108
  30. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  31. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  32. package/dist/views/Request/RequestSection/RequestBody.vue2.js +1 -1
  33. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  34. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  35. package/dist/views/Request/RequestSection/RequestSection.vue2.js +40 -40
  36. package/dist/views/Request/RequestSidebar.vue.d.ts +2 -0
  37. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  38. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  39. package/dist/views/Request/RequestSidebar.vue2.js +200 -163
  40. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  41. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  42. package/dist/views/Request/RequestSubpageHeader.vue2.js +48 -46
  43. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  44. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  45. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +20 -20
  46. package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts.map +1 -1
  47. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +11 -11
  48. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  49. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +7 -7
  50. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  51. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
  52. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +22 -22
  53. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  54. package/dist/views/Request/components/WorkspaceDropdown.vue.js +36 -40
  55. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AA+0CA,wBAMG"}
1
+ {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AA80CA,wBAMG"}
@@ -212,7 +212,7 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
212
212
  class: "flex flex-col gap-0.25"
213
213
  }, [
214
214
  y("button", {
215
- class: "flex font-medium gap-1.5 group items-center px-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
215
+ class: "flex font-medium gap-1.5 group items-center p-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
216
216
  type: "button",
217
217
  onClick: (a) => r(k)(n.uid)
218
218
  }, [
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAuQ8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA8XjD,wBAMG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAkR8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA4YjD,wBAMG"}
@@ -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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c563efae"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fa0c6bf7"]]);
5
5
  export {
6
- f as default
6
+ e as default
7
7
  };
@@ -1,167 +1,177 @@
1
- import { defineComponent as K, ref as y, computed as N, watch as P, onMounted as X, onBeforeUnmount as Y, openBlock as h, createElementBlock as Z, Fragment as _, createElementVNode as ee, normalizeClass as O, unref as s, createVNode as d, withCtx as g, createBlock as I, createCommentVNode as T } from "vue";
2
- import te from "../../components/ImportCurl/ImportCurlModal.vue.js";
3
- import oe from "../../components/ViewLayout/ViewLayout.vue.js";
4
- import re from "../../components/ViewLayout/ViewLayoutContent.vue.js";
5
- import { importCurlCommand as se } from "../../libs/importers/curl.js";
1
+ import { defineComponent as X, ref as S, computed as O, watch as Y, onMounted as Z, onBeforeUnmount as ee, openBlock as x, createElementBlock as te, Fragment as oe, createElementVNode as b, normalizeClass as g, unref as s, createVNode as d, withCtx as I, createBlock as T, createCommentVNode as M } from "vue";
2
+ import re from "../../components/ImportCurl/ImportCurlModal.vue.js";
3
+ import se from "../../components/ViewLayout/ViewLayout.vue.js";
4
+ import le from "../../components/ViewLayout/ViewLayoutContent.vue.js";
5
+ import { importCurlCommand as ae } from "../../libs/importers/curl.js";
6
6
  import { useActiveEntities as ue } from "../../store/active-entities.js";
7
- import ae from "./RequestSection/RequestSection.vue.js";
8
- import le from "./RequestSubpageHeader.vue.js";
9
- import ne from "./ResponseSection/ResponseSection.vue.js";
10
- import { useOpenApiWatcher as ie } from "./hooks/useOpenApiWatcher.js";
11
- import { safeJSON as me } from "@scalar/object-utils/parse";
12
- import { useBreakpoints as ce } from "@scalar/use-hooks/useBreakpoints";
13
- import { useToasts as de } from "@scalar/use-toasts";
14
- import { useRouter as ve } from "vue-router";
15
- import pe from "./RequestSidebar.vue.js";
16
- import { createRequestOperation as fe } from "../../libs/send-request/send-request.js";
17
- import { ERRORS as Se } from "../../libs/errors.js";
18
- import { useWorkspace as ye } from "../../store/store.js";
19
- const He = /* @__PURE__ */ K({
7
+ import ne from "./RequestSection/RequestSection.vue.js";
8
+ import ie from "./RequestSubpageHeader.vue.js";
9
+ import ce from "./ResponseSection/ResponseSection.vue.js";
10
+ import { useOpenApiWatcher as me } from "./hooks/useOpenApiWatcher.js";
11
+ import { safeJSON as de } from "@scalar/object-utils/parse";
12
+ import { useBreakpoints as ve } from "@scalar/use-hooks/useBreakpoints";
13
+ import { useToasts as fe } from "@scalar/use-toasts";
14
+ import { useRouter as pe } from "vue-router";
15
+ import ye from "./RequestSidebar.vue.js";
16
+ import { createRequestOperation as Se } from "../../libs/send-request/send-request.js";
17
+ import { ERRORS as Re } from "../../libs/errors.js";
18
+ import { useWorkspace as he } from "../../store/store.js";
19
+ import { useLayout as qe } from "../../hooks/useLayout.js";
20
+ const xe = { class: "flex h-full" }, be = { class: "flex flex-1 flex-col h-full" }, ze = /* @__PURE__ */ X({
20
21
  __name: "Request",
21
22
  emits: ["newTab"],
22
- setup(Re) {
23
- const M = ye(), { toast: w } = de(), {
24
- activeCollection: x,
23
+ setup(we) {
24
+ const _ = he(), { toast: w } = fe(), { layout: A } = qe(), {
25
+ activeCollection: U,
25
26
  activeExample: v,
26
- activeEnvironment: U,
27
+ activeEnvironment: k,
27
28
  activeRequest: R,
28
29
  activeWorkspace: a,
29
- activeServer: A
30
+ activeServer: L
30
31
  } = ue(), {
31
32
  cookies: H,
32
- isReadOnly: l,
33
+ isReadOnly: u,
33
34
  modalState: n,
34
- requestHistory: k,
35
- securitySchemes: L,
36
- requestMutators: $,
37
- serverMutators: j,
38
- servers: W,
39
- events: p
40
- } = M, u = y(!l), E = y(), t = y(), q = y(""), z = ve(), D = N(
41
- () => k.findLast((o) => {
35
+ requestHistory: E,
36
+ securitySchemes: $,
37
+ requestMutators: j,
38
+ serverMutators: W,
39
+ servers: z,
40
+ events: f
41
+ } = _, l = S(!u), V = S(), t = S(), h = S(""), D = pe(), F = O(
42
+ () => E.findLast((o) => {
42
43
  var e;
43
44
  return o.request.uid === ((e = v.value) == null ? void 0 : e.uid);
44
45
  })
45
- ), { mediaQueries: F } = ce();
46
- P(F.md, (o) => u.value = o);
47
- const V = N(
46
+ ), { mediaQueries: Q } = ve();
47
+ Y(Q.xl, (o) => l.value = o, {
48
+ immediate: A !== "modal"
49
+ });
50
+ const C = O(
48
51
  () => {
49
52
  var o, e;
50
- return (l ? (o = x.value) == null ? void 0 : o.selectedSecuritySchemeUids : (e = R.value) == null ? void 0 : e.selectedSecuritySchemeUids) ?? [];
53
+ return (u ? (o = U.value) == null ? void 0 : o.selectedSecuritySchemeUids : (e = R.value) == null ? void 0 : e.selectedSecuritySchemeUids) ?? [];
51
54
  }
52
- ), C = async () => {
53
- if (!R.value || !v.value || !x.value)
55
+ ), B = async () => {
56
+ if (!R.value || !v.value || !U.value)
54
57
  return;
55
- const o = typeof U.value == "object" ? U.value.value : "{}", e = me.parse(o);
58
+ const o = typeof k.value == "object" ? k.value.value : "{}", e = de.parse(o);
56
59
  e.error && console.error("INVALID ENVIRONMENT!");
57
- const r = e.error || typeof e.data != "object" ? {} : e.data ?? {}, f = a.value.cookies.map((S) => H[S]), [i, m] = fe({
60
+ const r = e.error || typeof e.data != "object" ? {} : e.data ?? {}, p = a.value.cookies.map((y) => H[y]), [i, c] = Se({
58
61
  request: R.value,
59
62
  example: v.value,
60
- selectedSecuritySchemeUids: V.value,
63
+ selectedSecuritySchemeUids: C.value,
61
64
  proxyUrl: a.value.proxyUrl ?? "",
62
65
  environment: r,
63
- globalCookies: f,
64
- status: p.requestStatus,
65
- securitySchemes: L,
66
- server: A.value
66
+ globalCookies: p,
67
+ status: f.requestStatus,
68
+ securitySchemes: $,
69
+ server: L.value
67
70
  });
68
71
  if (i) {
69
72
  w(i.message, "error");
70
73
  return;
71
74
  }
72
- E.value = m.controller;
73
- const [c, b] = await m.sendRequest();
74
- c ? w(c.message, "error") : k.push(b);
75
- }, Q = async () => {
75
+ V.value = c.controller;
76
+ const [m, q] = await c.sendRequest();
77
+ m ? w(m.message, "error") : E.push(q);
78
+ }, J = async () => {
76
79
  var o;
77
- return (o = E.value) == null ? void 0 : o.abort(Se.REQUEST_ABORTED);
80
+ return (o = V.value) == null ? void 0 : o.abort(Re.REQUEST_ABORTED);
78
81
  };
79
- X(() => {
80
- p.executeRequest.on(C), p.cancelRequest.on(Q);
81
- }), ie(), Y(() => p.executeRequest.off(C));
82
- function J({ requestName: o }) {
83
- var r, f, i, m;
82
+ Z(() => {
83
+ f.executeRequest.on(B), f.cancelRequest.on(J);
84
+ }), me(), ee(() => f.executeRequest.off(B));
85
+ function G({ requestName: o }) {
86
+ var r, p, i, c;
84
87
  if (!t.value) return;
85
88
  if (t.value.servers) {
86
- const c = Object.values(W).find(
87
- (b) => {
88
- var S, B;
89
- return b.url === ((B = (S = t == null ? void 0 : t.value) == null ? void 0 : S.servers) == null ? void 0 : B[0]);
89
+ const m = Object.values(z).find(
90
+ (q) => {
91
+ var y, N;
92
+ return q.url === ((N = (y = t == null ? void 0 : t.value) == null ? void 0 : y.servers) == null ? void 0 : N[0]);
90
93
  }
91
94
  );
92
- c ? q.value = c.uid : q.value = j.add(
95
+ m ? h.value = m.uid : h.value = W.add(
93
96
  { url: t.value.servers[0] },
94
97
  a.value.collections[0]
95
98
  ).uid;
96
99
  }
97
- const e = $.add(
100
+ const e = j.add(
98
101
  {
99
102
  summary: o,
100
103
  path: (r = t == null ? void 0 : t.value) == null ? void 0 : r.path,
101
- method: (f = t == null ? void 0 : t.value) == null ? void 0 : f.method,
104
+ method: (p = t == null ? void 0 : t.value) == null ? void 0 : p.method,
102
105
  parameters: (i = t == null ? void 0 : t.value) == null ? void 0 : i.parameters,
103
- selectedServerUid: q.value,
104
- requestBody: (m = t == null ? void 0 : t.value) == null ? void 0 : m.requestBody
106
+ selectedServerUid: h.value,
107
+ requestBody: (c = t == null ? void 0 : t.value) == null ? void 0 : c.requestBody
105
108
  },
106
109
  a.value.collections[0]
107
110
  );
108
- e && z.push(
111
+ e && D.push(
109
112
  `/workspace/${a.value.uid}/request/${e.uid}`
110
113
  ), n.hide();
111
114
  }
112
- function G(o) {
113
- t.value = se(o), n.show();
115
+ function K(o) {
116
+ t.value = ae(o), n.show();
114
117
  }
115
- return (o, e) => (h(), Z(_, null, [
116
- ee("div", {
117
- class: O(["flex flex-1 flex-col pt-0 h-full bg-b-1 relative z-0 overflow-hidden", {
118
- "!mr-0 !mb-0 !border-0": s(l)
118
+ function P(o) {
119
+ console.log("hello", o), l.value = o;
120
+ }
121
+ return (o, e) => (x(), te(oe, null, [
122
+ b("div", {
123
+ class: g(["flex flex-1 flex-col pt-0 h-full bg-b-1 relative z-0 overflow-hidden", {
124
+ "!mr-0 !mb-0 !border-0": s(u)
119
125
  }])
120
126
  }, [
121
- d(le, {
122
- modelValue: u.value,
123
- "onUpdate:modelValue": e[0] || (e[0] = (r) => u.value = r),
124
- isReadonly: s(l),
125
- onHideModal: e[1] || (e[1] = () => s(n).hide()),
126
- onImportCurl: G
127
- }, null, 8, ["modelValue", "isReadonly"]),
128
- d(oe, null, {
129
- default: g(() => [
130
- d(pe, {
131
- isReadonly: s(l),
132
- showSidebar: u.value,
133
- onNewTab: e[2] || (e[2] = (r) => o.$emit("newTab", r)),
134
- "onUpdate:showSidebar": e[3] || (e[3] = (r) => u.value = r)
135
- }, null, 8, ["isReadonly", "showSidebar"]),
136
- s(v) ? (h(), I(re, {
137
- key: 0,
138
- class: O(["flex-1", [u.value ? "sidebar-active-hide-layout" : ""]])
139
- }, {
140
- default: g(() => {
141
- var r;
142
- return [
143
- d(ae, { selectedSecuritySchemeUids: V.value }, null, 8, ["selectedSecuritySchemeUids"]),
144
- d(ne, {
145
- response: (r = D.value) == null ? void 0 : r.response
146
- }, null, 8, ["response"])
147
- ];
148
- }),
127
+ b("div", xe, [
128
+ d(ye, {
129
+ isReadonly: s(u),
130
+ showSidebar: l.value,
131
+ onNewTab: e[0] || (e[0] = (r) => o.$emit("newTab", r)),
132
+ "onUpdate:showSidebar": P
133
+ }, null, 8, ["isReadonly", "showSidebar"]),
134
+ b("div", be, [
135
+ d(ie, {
136
+ modelValue: l.value,
137
+ "onUpdate:modelValue": e[1] || (e[1] = (r) => l.value = r),
138
+ isReadonly: s(u),
139
+ onHideModal: e[2] || (e[2] = () => s(n).hide()),
140
+ onImportCurl: K
141
+ }, null, 8, ["modelValue", "isReadonly"]),
142
+ d(se, null, {
143
+ default: I(() => [
144
+ s(v) ? (x(), T(le, {
145
+ key: 0,
146
+ class: g(["flex-1", [l.value ? "sidebar-active-hide-layout" : ""]])
147
+ }, {
148
+ default: I(() => {
149
+ var r;
150
+ return [
151
+ d(ne, { selectedSecuritySchemeUids: C.value }, null, 8, ["selectedSecuritySchemeUids"]),
152
+ d(ce, {
153
+ response: (r = F.value) == null ? void 0 : r.response
154
+ }, null, 8, ["response"])
155
+ ];
156
+ }),
157
+ _: 1
158
+ }, 8, ["class"])) : M("", !0)
159
+ ]),
149
160
  _: 1
150
- }, 8, ["class"])) : T("", !0)
151
- ]),
152
- _: 1
153
- })
161
+ })
162
+ ])
163
+ ])
154
164
  ], 2),
155
- t.value ? (h(), I(te, {
165
+ t.value ? (x(), T(re, {
156
166
  key: 0,
157
167
  parsedCurl: t.value,
158
168
  state: s(n),
159
- onClose: e[4] || (e[4] = (r) => s(n).hide()),
160
- onImportCurl: J
161
- }, null, 8, ["parsedCurl", "state"])) : T("", !0)
169
+ onClose: e[3] || (e[3] = (r) => s(n).hide()),
170
+ onImportCurl: G
171
+ }, null, 8, ["parsedCurl", "state"])) : M("", !0)
162
172
  ], 64));
163
173
  }
164
174
  });
165
175
  export {
166
- He as default
176
+ ze as default
167
177
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"AAolBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAs4BF,wBAOG"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"AAolBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAu4BF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.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-7d610d02"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a3031462"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -13,7 +13,7 @@ import { useWorkspace as de } from "../../../store/store.js";
13
13
  import { useFileDialog as H } from "../../../hooks/useFileDialog.js";
14
14
  const se = {
15
15
  key: 0,
16
- class: "text-c-3 flex min-h-10 w-full items-center justify-center p-2 text-sm"
16
+ class: "border-t-1/2 text-c-3 flex min-h-10 w-full items-center justify-center p-2 text-sm"
17
17
  }, ce = {
18
18
  key: 1,
19
19
  class: "flex items-center justify-center p-1.5 overflow-hidden"
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AA6KA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAC;;AAsQF,wBAOG"}
1
+ {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AA4KA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAC;;AAmQF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestSection.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-317bb675"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0fb9317f"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,27 +1,27 @@
1
- import { defineComponent as B, computed as S, ref as b, watch as V, openBlock as d, createBlock as w, unref as o, withCtx as x, createElementVNode as A, createElementBlock as v, createCommentVNode as C, toDisplayString as R, createVNode as s, withDirectives as i, vShow as r } from "vue";
2
- import H from "../../../components/ContextBar.vue.js";
3
- import N from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import { useActiveEntities as E } from "../../../store/active-entities.js";
5
- import K from "./RequestBody.vue.js";
6
- import f from "./RequestParams.vue.js";
7
- import U from "./RequestPathParams.vue.js";
8
- import { canMethodHaveBody as h } from "@scalar/oas-utils/helpers";
9
- import Q from "./RequestAuth/RequestAuth.vue.js";
10
- import { useWorkspace as $ } from "../../../store/store.js";
11
- const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none group" }, M = {
1
+ import { defineComponent as b, computed as A, ref as V, watch as w, openBlock as d, createBlock as C, unref as o, withCtx as x, createElementVNode as g, createElementBlock as v, createCommentVNode as R, toDisplayString as H, createVNode as s, withDirectives as i, vShow as r } from "vue";
2
+ import N from "../../../components/ContextBar.vue.js";
3
+ import E from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import { useActiveEntities as K } from "../../../store/active-entities.js";
5
+ import U from "./RequestBody.vue.js";
6
+ import h from "./RequestParams.vue.js";
7
+ import Q from "./RequestPathParams.vue.js";
8
+ import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
9
+ import $ from "./RequestAuth/RequestAuth.vue.js";
10
+ import { useWorkspace as D } from "../../../store/store.js";
11
+ const M = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none group" }, z = {
12
12
  key: 0,
13
13
  class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
14
14
  for: "requestname"
15
- }, z = ["value"], I = {
15
+ }, I = ["value"], L = {
16
16
  key: 2,
17
17
  class: "flex items-center text-c-1 h-8"
18
- }, L = { class: "request-section-content custom-scroll flex flex-1 flex-col px-3 xl:px-4 py-2.5" }, ee = /* @__PURE__ */ B({
18
+ }, O = { class: "request-section-content custom-scroll flex flex-1 flex-col" }, te = /* @__PURE__ */ b({
19
19
  __name: "RequestSection",
20
20
  props: {
21
21
  selectedSecuritySchemeUids: {}
22
22
  },
23
- setup(O) {
24
- const { activeRequest: l, activeExample: y } = E(), { isReadOnly: p, requestMutators: g } = $(), k = S(() => {
23
+ setup(P) {
24
+ const { activeRequest: l, activeExample: y } = K(), { isReadOnly: p, requestMutators: k } = D(), q = A(() => {
25
25
  var a, u;
26
26
  const t = /* @__PURE__ */ new Set([
27
27
  "All",
@@ -32,52 +32,52 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
32
32
  "Headers",
33
33
  "Body"
34
34
  ]);
35
- return (a = y.value) != null && a.parameters.path.length || t.delete("Variables"), h(((u = l.value) == null ? void 0 : u.method) ?? "get") || t.delete("Body"), _.value && t.delete("Auth"), [...t];
36
- }), _ = S(
35
+ return (a = y.value) != null && a.parameters.path.length || t.delete("Variables"), f(((u = l.value) == null ? void 0 : u.method) ?? "get") || t.delete("Body"), _.value && t.delete("Auth"), [...t];
36
+ }), _ = A(
37
37
  () => {
38
38
  var t, a;
39
39
  return p && ((a = (t = l.value) == null ? void 0 : t.security) == null ? void 0 : a.length) === 0;
40
40
  }
41
- ), e = b("All");
42
- V(l, (t) => {
43
- e.value === "Body" && t && !h(t.method) && (e.value = "All");
41
+ ), e = V("All");
42
+ w(l, (t) => {
43
+ e.value === "Body" && t && !f(t.method) && (e.value = "All");
44
44
  });
45
- const q = (t) => {
45
+ const B = (t) => {
46
46
  if (!l.value) return;
47
47
  const a = t.target;
48
- g.edit(l.value.uid, "summary", a.value);
48
+ k.edit(l.value.uid, "summary", a.value);
49
49
  };
50
50
  return (t, a) => {
51
51
  var u;
52
- return d(), w(N, {
52
+ return d(), C(E, {
53
53
  "aria-label": `Request: ${(u = o(l)) == null ? void 0 : u.summary}`
54
54
  }, {
55
55
  title: x(() => {
56
56
  var n, c;
57
57
  return [
58
- A("div", D, [
59
- o(p) ? C("", !0) : (d(), v("label", M)),
60
- o(p) ? (d(), v("span", I, R((c = o(l)) == null ? void 0 : c.summary), 1)) : (d(), v("input", {
58
+ g("div", M, [
59
+ o(p) ? R("", !0) : (d(), v("label", z)),
60
+ o(p) ? (d(), v("span", L, H((c = o(l)) == null ? void 0 : c.summary), 1)) : (d(), v("input", {
61
61
  key: 1,
62
62
  id: "requestname",
63
63
  class: "text-c-1 rounded pointer-events-auto relative w-full pl-2 -ml-0.5 md:-ml-1 xl:-ml-2 has-[:focus-visible]:outline h-8 group-hover-input has-[:focus-visible]:outline z-10",
64
64
  placeholder: "Request Name",
65
65
  value: (n = o(l)) == null ? void 0 : n.summary,
66
- onInput: q
67
- }, null, 40, z))
66
+ onInput: B
67
+ }, null, 40, I))
68
68
  ]),
69
- s(H, {
69
+ s(N, {
70
70
  activeSection: e.value,
71
- sections: k.value,
71
+ sections: q.value,
72
72
  onSetActiveSection: a[0] || (a[0] = (m) => e.value = m)
73
73
  }, null, 8, ["activeSection", "sections"])
74
74
  ];
75
75
  }),
76
76
  default: x(() => {
77
- var n, c, m;
77
+ var n, c, m, S;
78
78
  return [
79
- A("div", L, [
80
- i(s(Q, {
79
+ g("div", O, [
80
+ i(s($, {
81
81
  selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
82
82
  title: "Authentication"
83
83
  }, null, 8, ["selectedSecuritySchemeUids"]), [
@@ -86,7 +86,7 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
86
86
  !_.value && (e.value === "All" || e.value === "Auth")
87
87
  ]
88
88
  ]),
89
- i(s(U, {
89
+ i(s(Q, {
90
90
  paramKey: "path",
91
91
  title: "Variables"
92
92
  }, null, 512), [
@@ -95,28 +95,28 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
95
95
  (e.value === "All" || e.value === "Variables") && ((m = (c = (n = o(y)) == null ? void 0 : n.parameters) == null ? void 0 : c.path) == null ? void 0 : m.length)
96
96
  ]
97
97
  ]),
98
- i(s(f, {
98
+ i(s(h, {
99
99
  paramKey: "cookies",
100
100
  title: "Cookies"
101
101
  }, null, 512), [
102
102
  [r, e.value === "All" || e.value === "Cookies"]
103
103
  ]),
104
- i(s(f, {
104
+ i(s(h, {
105
105
  paramKey: "headers",
106
106
  title: "Headers"
107
107
  }, null, 512), [
108
108
  [r, e.value === "All" || e.value === "Headers"]
109
109
  ]),
110
- i(s(f, {
110
+ i(s(h, {
111
111
  paramKey: "query",
112
112
  title: "Query Parameters"
113
113
  }, null, 512), [
114
114
  [r, e.value === "All" || e.value === "Query"]
115
115
  ]),
116
- i(s(K, { title: "Body" }, null, 512), [
116
+ i(s(U, { title: "Body" }, null, 512), [
117
117
  [
118
118
  r,
119
- o(l) && (e.value === "All" || e.value === "Body") && o(h)(o(l).method)
119
+ ((S = o(l)) == null ? void 0 : S.method) && (e.value === "All" || e.value === "Body") && o(f)(o(l).method)
120
120
  ]
121
121
  ])
122
122
  ])
@@ -128,5 +128,5 @@ const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
128
128
  }
129
129
  });
130
130
  export {
131
- ee as default
131
+ te as default
132
132
  };
@@ -3,6 +3,7 @@ type __VLS_Props = {
3
3
  isReadonly: boolean;
4
4
  };
5
5
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
6
+ "update:modelValue": (v: boolean) => any;
6
7
  clearDrafts: () => any;
7
8
  newTab: (args_0: {
8
9
  name: string;
@@ -10,6 +11,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
10
11
  }) => any;
11
12
  "update:showSidebar": (v: boolean) => any;
12
13
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
13
15
  onClearDrafts?: (() => any) | undefined;
14
16
  onNewTab?: ((args_0: {
15
17
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":"AAubA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;cAKqC,MAAM;aAAO,MAAM;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AAqpB1D,wBAOG"}
1
+ {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":"AA+eA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;cAMqC,MAAM;aAAO,MAAM;;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AAqwB1D,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestSidebar.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-2eb44014"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-17d11c53"]]);
5
5
  export {
6
6
  m as default
7
7
  };