@scalar/api-client 2.1.34 → 2.1.35

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 (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  5. package/dist/components/ContextBar.vue.js +1 -1
  6. package/dist/components/ContextBar.vue2.js +6 -6
  7. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  8. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  9. package/dist/components/DataTable/DataTableInput.vue2.js +53 -40
  10. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  11. package/dist/components/SideNav/SideNav.vue.js +2 -2
  12. package/dist/components/SideNav/SideNav.vue2.js +8 -8
  13. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  14. package/dist/components/TopNav/TopNav.vue.js +2 -2
  15. package/dist/components/TopNav/TopNav.vue2.js +14 -14
  16. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  17. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
  18. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  19. package/dist/layouts/App/MainLayout.vue.js +4 -4
  20. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/views/Request/Request.vue2.js +30 -31
  23. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +21 -21
  24. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  25. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +79 -71
  26. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  27. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  28. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +24 -24
  29. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  30. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +8 -8
  31. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  32. package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -124
  33. package/dist/views/Request/RequestSection/RequestSection.vue2.js +126 -0
  34. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  35. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  36. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +1 -1
  37. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  38. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -99
  39. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +104 -2
  40. package/package.json +7 -7
  41. package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -5
@@ -1,21 +1,21 @@
1
- import { defineComponent as x, computed as g, openBlock as r, createElementBlock as s, Fragment as f, renderList as S, createVNode as o, unref as i, withCtx as l, createBlock as k, createTextVNode as n, toDisplayString as T, createCommentVNode as c, capitalize as B } from "vue";
1
+ import { defineComponent as b, computed as g, openBlock as r, createElementBlock as s, Fragment as f, renderList as x, createVNode as o, unref as i, withCtx as l, createBlock as k, createTextVNode as n, toDisplayString as T, createCommentVNode as c, capitalize as B } from "vue";
2
2
  import y from "../RequestAuthDataTableInput.vue.js";
3
3
  import E from "./OAuth2.vue.js";
4
4
  import p from "../../../../components/DataTable/DataTableRow.vue.js";
5
5
  import F from "../../../../components/DataTable/DataTableCell.vue.js";
6
6
  import { isOauth2Example as R } from "../../libs/oauth2.js";
7
7
  import { useWorkspace as C } from "../../../../store/store.js";
8
- const A = /* @__PURE__ */ x({
8
+ const A = /* @__PURE__ */ b({
9
9
  __name: "RequestExampleAuth",
10
10
  props: {
11
11
  selectedSecuritySchemeUids: {}
12
12
  },
13
13
  setup(_) {
14
- const { activeCollection: V, activeRequest: $, collectionMutators: v, securitySchemes: b } = C(), U = g(() => !V.value || !$.value ? [] : _.selectedSecuritySchemeUids.map((d) => ({
14
+ const { activeCollection: V, activeRequest: $, collectionMutators: v, securitySchemes: w } = C(), U = g(() => !V.value || !$.value ? [] : _.selectedSecuritySchemeUids.map((d) => ({
15
15
  example: V.value.auth[d],
16
- scheme: b[d]
16
+ scheme: w[d]
17
17
  })));
18
- function w(d) {
18
+ function S(d) {
19
19
  return `${B(d.nameKey)}: ${d.type} ${d.type === "oauth2" ? d.flow.type : ""}`;
20
20
  }
21
21
  function m(d, u, e, t) {
@@ -26,17 +26,17 @@ const A = /* @__PURE__ */ x({
26
26
  t
27
27
  );
28
28
  }
29
- return (d, u) => (r(!0), s(f, null, S(U.value, ({ scheme: e, example: t }) => (r(), s(f, {
29
+ return (d, u) => (r(!0), s(f, null, x(U.value, ({ scheme: e, example: t }) => (r(), s(f, {
30
30
  key: e.uid
31
31
  }, [
32
32
  o(i(p), { class: "group/delete" }, {
33
33
  default: l(() => [
34
34
  U.value.length > 1 ? (r(), k(i(F), {
35
35
  key: 0,
36
- class: "text-c-2 pl-2 text-xs font-medium flex items-center bg-b-2"
36
+ class: "text-c-3 pl-2 font-medium flex items-center"
37
37
  }, {
38
38
  default: l(() => [
39
- n(T(w(e)), 1)
39
+ n(T(S(e)), 1)
40
40
  ]),
41
41
  _: 2
42
42
  }, 1024)) : c("", !0)
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";gCA2J8B,MAAM,EAAE;;gCAAR,MAAM,EAAE;;AA+PtC,wBAMG"}
1
+ {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";gCA4K8B,MAAM,EAAE;;gCAAR,MAAM,EAAE;;AA4QtC,wBAMG"}
@@ -1,126 +1,7 @@
1
- import { defineComponent as q, computed as _, ref as g, watch as b, openBlock as m, createBlock as C, withCtx as S, createElementVNode as A, unref as s, createElementBlock as p, createCommentVNode as V, toDisplayString as w, createVNode as r, withDirectives as u, vShow as i } from "vue";
2
- import H from "../../../components/ContextBar.vue.js";
3
- import R from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import N from "./RequestBody.vue.js";
5
- import v from "./RequestParams.vue.js";
6
- import K from "./RequestPathParams.vue.js";
7
- import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
8
- import U from "./RequestAuth/RequestAuth.vue.js";
9
- import { useWorkspace as E } from "../../../store/store.js";
10
- const Q = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none" }, $ = {
11
- key: 0,
12
- class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
13
- for: "requestname"
14
- }, D = ["value"], M = {
15
- key: 2,
16
- class: "text-c-1"
17
- }, P = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, X = /* @__PURE__ */ q({
18
- __name: "RequestSection",
19
- props: {
20
- selectedSecuritySchemeUids: {}
21
- },
22
- setup(I) {
23
- const { activeRequest: a, activeExample: h, isReadOnly: d, requestMutators: x } = E(), k = _(() => {
24
- var l, o;
25
- const t = /* @__PURE__ */ new Set([
26
- "All",
27
- "Query",
28
- "Auth",
29
- "Variables",
30
- "Cookies",
31
- "Headers",
32
- "Body"
33
- ]);
34
- return (l = h.value) != null && l.parameters.path.length || t.delete("Variables"), f(((o = a.value) == null ? void 0 : o.method) ?? "get") || t.delete("Body"), y.value && t.delete("Auth"), [...t];
35
- }), y = _(
36
- () => {
37
- var t, l;
38
- return d.value && ((l = (t = a.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
39
- }
40
- ), e = g("All");
41
- b(a, (t) => {
42
- e.value === "Body" && t && !f(t.method) && (e.value = "All");
43
- });
44
- const B = (t) => {
45
- if (!a.value) return;
46
- const l = t.target;
47
- x.edit(a.value.uid, "summary", l.value);
48
- };
49
- return (t, l) => (m(), C(R, null, {
50
- title: S(() => {
51
- var o, n;
52
- return [
53
- A("div", Q, [
54
- s(d) ? V("", !0) : (m(), p("label", $)),
55
- s(d) ? (m(), p("span", M, w((n = s(a)) == null ? void 0 : n.summary), 1)) : (m(), p("input", {
56
- key: 1,
57
- id: "requestname",
58
- class: "outline-none border-0 text-c-1 rounded pointer-events-auto relative w-full",
59
- placeholder: "Request Name",
60
- value: (o = s(a)) == null ? void 0 : o.summary,
61
- onInput: B
62
- }, null, 40, D))
63
- ]),
64
- r(H, {
65
- activeSection: e.value,
66
- sections: k.value,
67
- onSetActiveSection: l[0] || (l[0] = (c) => e.value = c)
68
- }, null, 8, ["activeSection", "sections"])
69
- ];
70
- }),
71
- default: S(() => {
72
- var o, n, c;
73
- return [
74
- A("div", P, [
75
- u(r(U, {
76
- selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
77
- title: "Authentication"
78
- }, null, 8, ["selectedSecuritySchemeUids"]), [
79
- [
80
- i,
81
- !y.value && (e.value === "All" || e.value === "Auth")
82
- ]
83
- ]),
84
- u(r(K, {
85
- paramKey: "path",
86
- title: "Path Variables"
87
- }, null, 512), [
88
- [
89
- i,
90
- (e.value === "All" || e.value === "Variables") && ((c = (n = (o = s(h)) == null ? void 0 : o.parameters) == null ? void 0 : n.path) == null ? void 0 : c.length)
91
- ]
92
- ]),
93
- u(r(v, {
94
- paramKey: "cookies",
95
- title: "Cookies"
96
- }, null, 512), [
97
- [i, e.value === "All" || e.value === "Cookies"]
98
- ]),
99
- u(r(v, {
100
- paramKey: "headers",
101
- title: "Headers"
102
- }, null, 512), [
103
- [i, e.value === "All" || e.value === "Headers"]
104
- ]),
105
- u(r(v, {
106
- paramKey: "query",
107
- title: "Query Parameters"
108
- }, null, 512), [
109
- [i, e.value === "All" || e.value === "Query"]
110
- ]),
111
- u(r(N, { title: "Body" }, null, 512), [
112
- [
113
- i,
114
- s(a) && (e.value === "All" || e.value === "Body") && s(f)(s(a).method)
115
- ]
116
- ])
117
- ])
118
- ];
119
- }),
120
- _: 1
121
- }));
122
- }
123
- });
1
+ import o from "./RequestSection.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1039132b"]]);
124
5
  export {
125
- X as default
6
+ p as default
126
7
  };
@@ -0,0 +1,126 @@
1
+ import { defineComponent as g, computed as _, ref as q, watch as b, openBlock as m, createBlock as C, withCtx as S, createElementVNode as A, unref as s, createElementBlock as p, createCommentVNode as V, toDisplayString as w, createVNode as u, withDirectives as i, vShow as r } from "vue";
2
+ import H from "../../../components/ContextBar.vue.js";
3
+ import R from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import N from "./RequestBody.vue.js";
5
+ import v from "./RequestParams.vue.js";
6
+ import K from "./RequestPathParams.vue.js";
7
+ import { canMethodHaveBody as h } from "@scalar/oas-utils/helpers";
8
+ import U from "./RequestAuth/RequestAuth.vue.js";
9
+ import { useWorkspace as E } from "../../../store/store.js";
10
+ const Q = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none h-full" }, $ = {
11
+ key: 0,
12
+ class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
13
+ for: "requestname"
14
+ }, D = ["value"], M = {
15
+ key: 2,
16
+ class: "text-c-1"
17
+ }, P = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, X = /* @__PURE__ */ g({
18
+ __name: "RequestSection",
19
+ props: {
20
+ selectedSecuritySchemeUids: {}
21
+ },
22
+ setup(I) {
23
+ const { activeRequest: a, activeExample: f, isReadOnly: d, requestMutators: x } = E(), k = _(() => {
24
+ var l, o;
25
+ const t = /* @__PURE__ */ new Set([
26
+ "All",
27
+ "Query",
28
+ "Auth",
29
+ "Variables",
30
+ "Cookies",
31
+ "Headers",
32
+ "Body"
33
+ ]);
34
+ return (l = f.value) != null && l.parameters.path.length || t.delete("Variables"), h(((o = a.value) == null ? void 0 : o.method) ?? "get") || t.delete("Body"), y.value && t.delete("Auth"), [...t];
35
+ }), y = _(
36
+ () => {
37
+ var t, l;
38
+ return d.value && ((l = (t = a.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
39
+ }
40
+ ), e = q("All");
41
+ b(a, (t) => {
42
+ e.value === "Body" && t && !h(t.method) && (e.value = "All");
43
+ });
44
+ const B = (t) => {
45
+ if (!a.value) return;
46
+ const l = t.target;
47
+ x.edit(a.value.uid, "summary", l.value);
48
+ };
49
+ return (t, l) => (m(), C(R, null, {
50
+ title: S(() => {
51
+ var o, n;
52
+ return [
53
+ A("div", Q, [
54
+ s(d) ? V("", !0) : (m(), p("label", $)),
55
+ s(d) ? (m(), p("span", M, w((n = s(a)) == null ? void 0 : n.summary), 1)) : (m(), p("input", {
56
+ key: 1,
57
+ id: "requestname",
58
+ class: "text-c-1 rounded pointer-events-auto relative w-full pl-3 -ml-3 has-[:focus-visible]:outline h-8 group-hover-input has-[:focus-visible]:outline",
59
+ placeholder: "Request Name",
60
+ value: (o = s(a)) == null ? void 0 : o.summary,
61
+ onInput: B
62
+ }, null, 40, D))
63
+ ]),
64
+ u(H, {
65
+ activeSection: e.value,
66
+ sections: k.value,
67
+ onSetActiveSection: l[0] || (l[0] = (c) => e.value = c)
68
+ }, null, 8, ["activeSection", "sections"])
69
+ ];
70
+ }),
71
+ default: S(() => {
72
+ var o, n, c;
73
+ return [
74
+ A("div", P, [
75
+ i(u(U, {
76
+ selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
77
+ title: "Authentication"
78
+ }, null, 8, ["selectedSecuritySchemeUids"]), [
79
+ [
80
+ r,
81
+ !y.value && (e.value === "All" || e.value === "Auth")
82
+ ]
83
+ ]),
84
+ i(u(K, {
85
+ paramKey: "path",
86
+ title: "Path Variables"
87
+ }, null, 512), [
88
+ [
89
+ r,
90
+ (e.value === "All" || e.value === "Variables") && ((c = (n = (o = s(f)) == null ? void 0 : o.parameters) == null ? void 0 : n.path) == null ? void 0 : c.length)
91
+ ]
92
+ ]),
93
+ i(u(v, {
94
+ paramKey: "cookies",
95
+ title: "Cookies"
96
+ }, null, 512), [
97
+ [r, e.value === "All" || e.value === "Cookies"]
98
+ ]),
99
+ i(u(v, {
100
+ paramKey: "headers",
101
+ title: "Headers"
102
+ }, null, 512), [
103
+ [r, e.value === "All" || e.value === "Headers"]
104
+ ]),
105
+ i(u(v, {
106
+ paramKey: "query",
107
+ title: "Query Parameters"
108
+ }, null, 512), [
109
+ [r, e.value === "All" || e.value === "Query"]
110
+ ]),
111
+ i(u(N, { title: "Body" }, null, 512), [
112
+ [
113
+ r,
114
+ s(a) && (e.value === "All" || e.value === "Body") && s(h)(s(a).method)
115
+ ]
116
+ ])
117
+ ])
118
+ ];
119
+ }),
120
+ _: 1
121
+ }));
122
+ }
123
+ });
124
+ export {
125
+ X as default
126
+ };
@@ -14,7 +14,7 @@ const v = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, V = { cl
14
14
  s.commandPalette.emit({ commandName: "Create Request" });
15
15
  }, c = (n) => {
16
16
  n != null && n.createNew && x.name === "request" && m();
17
- }, y = "2.1.34";
17
+ }, y = "2.1.35";
18
18
  return R(() => s.hotKeys.on(c)), g(() => s.hotKeys.off(c)), (n, e) => (a(), l("div", v, [
19
19
  t("div", V, [
20
20
  o(f).isReadOnly ? u("", !0) : (a(), l("div", B, [
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAQrC,gBAAgB;;cAAhB,gBAAgB;;AAgIlD,wBAMG"}
1
+ {"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAQrC,gBAAgB;;cAAhB,gBAAgB;;AA+HlD,wBAMG"}
@@ -4,7 +4,7 @@ import { httpStatusCodes as N } from "@scalar/oas-utils/helpers";
4
4
  import V from "pretty-bytes";
5
5
  import f from "pretty-ms";
6
6
  import { useWorkspace as w } from "../../../store/store.js";
7
- const E = { class: "flex gap-1.5 text-c-3 pl-1" }, M = { key: 0 }, q = { key: 0 }, x = { key: 1 }, b = /* @__PURE__ */ y({
7
+ const E = { class: "flex gap-1.5 text-c-1" }, M = { key: 0 }, q = { key: 0 }, x = { key: 1 }, b = /* @__PURE__ */ y({
8
8
  __name: "ResponseMetaInformation",
9
9
  props: {
10
10
  response: {}
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAwHA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAgOxC,wBAMG"}
1
+ {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA8JA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAkPxC,wBAMG"}
@@ -1,101 +1,7 @@
1
- import { defineComponent as A, computed as i, ref as C, openBlock as s, createBlock as r, withCtx as u, createElementVNode as d, createTextVNode as B, createCommentVNode as a, createVNode as f, createElementBlock as v, Fragment as _ } from "vue";
2
- import S from "../../../components/ContextBar.vue.js";
3
- import H from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import R from "./ResponseBody.vue.js";
5
- import V from "./ResponseEmpty.vue.js";
6
- import $ from "./ResponseLoadingOverlay.vue.js";
7
- import N from "./ResponseMetaInformation.vue.js";
8
- import g from "./ResponseBodyVirtual.vue.js";
9
- /* empty css */
10
- import E from "./ResponseCookies.vue.js";
11
- import I from "./ResponseHeaders.vue.js";
12
- const L = { class: "flex items-center flex-1" }, O = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, T = 2e5, X = /* @__PURE__ */ A({
13
- __name: "ResponseSection",
14
- props: {
15
- response: {}
16
- },
17
- setup(k) {
18
- const l = k, c = i(() => {
19
- var t;
20
- const e = (t = l.response) == null ? void 0 : t.headers;
21
- return e ? Object.keys(e).map((o) => ({
22
- name: o,
23
- value: e[o],
24
- required: !1
25
- })).filter(
26
- (o) => ![
27
- "rest-api-client-content-length",
28
- "X-API-Client-Content-Length"
29
- ].includes(o.name)
30
- ) : [];
31
- }), y = i(
32
- () => {
33
- var e;
34
- return ((e = l.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((t) => {
35
- var p, m;
36
- const o = (m = (p = l.response) == null ? void 0 : p.headers) == null ? void 0 : m[t];
37
- return o ? {
38
- name: t,
39
- value: o,
40
- required: !1
41
- } : [];
42
- })) ?? [];
43
- }
44
- ), h = ["All", "Cookies", "Headers", "Body"], n = C("All"), x = i(
45
- () => {
46
- var e;
47
- return (((e = l.response) == null ? void 0 : e.size) ?? 0) > T;
48
- }
49
- );
50
- return (e, t) => (s(), r(H, null, {
51
- title: u(() => [
52
- d("div", L, [
53
- t[1] || (t[1] = B(" Response ")),
54
- e.response ? (s(), r(N, {
55
- key: 0,
56
- response: e.response
57
- }, null, 8, ["response"])) : a("", !0),
58
- f(S, {
59
- activeSection: n.value,
60
- sections: h,
61
- onSetActiveSection: t[0] || (t[0] = (o) => n.value = o)
62
- }, null, 8, ["activeSection"])
63
- ])
64
- ]),
65
- default: u(() => {
66
- var o;
67
- return [
68
- d("div", O, [
69
- e.response ? (s(), v(_, { key: 1 }, [
70
- n.value === "All" || n.value === "Cookies" ? (s(), r(E, {
71
- key: 0,
72
- cookies: y.value
73
- }, null, 8, ["cookies"])) : a("", !0),
74
- n.value === "All" || n.value === "Headers" ? (s(), r(I, {
75
- key: 1,
76
- headers: c.value
77
- }, null, 8, ["headers"])) : a("", !0),
78
- n.value === "All" || n.value === "Body" ? (s(), v(_, { key: 2 }, [
79
- x.value ? (s(), r(g, {
80
- key: 0,
81
- content: l.response.data
82
- }, null, 8, ["content"])) : (s(), r(R, {
83
- key: 1,
84
- active: !0,
85
- data: (o = l.response) == null ? void 0 : o.data,
86
- headers: c.value,
87
- title: "Body"
88
- }, null, 8, ["data", "headers"]))
89
- ], 64)) : a("", !0)
90
- ], 64)) : (s(), r(V, { key: 0 })),
91
- f($)
92
- ])
93
- ];
94
- }),
95
- _: 1
96
- }));
97
- }
98
- });
1
+ import o from "./ResponseSection.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9b7fd1f2"]]);
99
5
  export {
100
- X as default
6
+ r as default
101
7
  };
@@ -1,4 +1,106 @@
1
- import f from "./ResponseSection.vue.js";
1
+ import { defineComponent as A, computed as i, ref as x, openBlock as n, createBlock as r, withCtx as d, createElementVNode as p, normalizeClass as B, createCommentVNode as l, createVNode as f, createElementBlock as v, Fragment as k } from "vue";
2
+ import S from "../../../components/ContextBar.vue.js";
3
+ import g from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import H from "./ResponseBody.vue.js";
5
+ import R from "./ResponseEmpty.vue.js";
6
+ import $ from "./ResponseLoadingOverlay.vue.js";
7
+ import V from "./ResponseMetaInformation.vue.js";
8
+ import E from "./ResponseBodyVirtual.vue.js";
9
+ /* empty css */
10
+ import I from "./ResponseCookies.vue.js";
11
+ import L from "./ResponseHeaders.vue.js";
12
+ const N = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, O = 2e5, U = /* @__PURE__ */ A({
13
+ __name: "ResponseSection",
14
+ props: {
15
+ response: {}
16
+ },
17
+ setup(y) {
18
+ const a = y, c = i(() => {
19
+ var o;
20
+ const e = (o = a.response) == null ? void 0 : o.headers;
21
+ return e ? Object.keys(e).map((s) => ({
22
+ name: s,
23
+ value: e[s],
24
+ required: !1
25
+ })).filter(
26
+ (s) => ![
27
+ "rest-api-client-content-length",
28
+ "X-API-Client-Content-Length"
29
+ ].includes(s.name)
30
+ ) : [];
31
+ }), _ = i(
32
+ () => {
33
+ var e;
34
+ return ((e = a.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((o) => {
35
+ var m, u;
36
+ const s = (u = (m = a.response) == null ? void 0 : m.headers) == null ? void 0 : u[o];
37
+ return s ? {
38
+ name: o,
39
+ value: s,
40
+ required: !1
41
+ } : [];
42
+ })) ?? [];
43
+ }
44
+ ), h = ["All", "Cookies", "Headers", "Body"], t = x("All"), C = i(
45
+ () => {
46
+ var e;
47
+ return (((e = a.response) == null ? void 0 : e.size) ?? 0) > O;
48
+ }
49
+ );
50
+ return (e, o) => (n(), r(g, null, {
51
+ title: d(() => [
52
+ p("div", {
53
+ class: B(["flex items-center flex-1", {
54
+ "animate-response-heading": e.response
55
+ }])
56
+ }, [
57
+ o[1] || (o[1] = p("span", { class: "response-heading absolute pointer-events-none" }, "Response", -1)),
58
+ e.response ? (n(), r(V, {
59
+ key: 0,
60
+ class: "animate-response-children",
61
+ response: e.response
62
+ }, null, 8, ["response"])) : l("", !0),
63
+ f(S, {
64
+ activeSection: t.value,
65
+ sections: h,
66
+ onSetActiveSection: o[0] || (o[0] = (s) => t.value = s)
67
+ }, null, 8, ["activeSection"])
68
+ ], 2)
69
+ ]),
70
+ default: d(() => {
71
+ var s;
72
+ return [
73
+ p("div", N, [
74
+ e.response ? (n(), v(k, { key: 1 }, [
75
+ t.value === "All" || t.value === "Cookies" ? (n(), r(I, {
76
+ key: 0,
77
+ cookies: _.value
78
+ }, null, 8, ["cookies"])) : l("", !0),
79
+ t.value === "All" || t.value === "Headers" ? (n(), r(L, {
80
+ key: 1,
81
+ headers: c.value
82
+ }, null, 8, ["headers"])) : l("", !0),
83
+ t.value === "All" || t.value === "Body" ? (n(), v(k, { key: 2 }, [
84
+ C.value ? (n(), r(E, {
85
+ key: 0,
86
+ content: a.response.data
87
+ }, null, 8, ["content"])) : (n(), r(H, {
88
+ key: 1,
89
+ active: !0,
90
+ data: (s = a.response) == null ? void 0 : s.data,
91
+ headers: c.value,
92
+ title: "Body"
93
+ }, null, 8, ["data", "headers"]))
94
+ ], 64)) : l("", !0)
95
+ ], 64)) : (n(), r(R, { key: 0 })),
96
+ f($)
97
+ ])
98
+ ];
99
+ }),
100
+ _: 1
101
+ }));
102
+ }
103
+ });
2
104
  export {
3
- f as default
105
+ U as default
4
106
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.34",
21
+ "version": "2.1.35",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -153,16 +153,16 @@
153
153
  "whatwg-mimetype": "^4.0.0",
154
154
  "yaml": "^2.4.5",
155
155
  "zod": "^3.23.8",
156
- "@scalar/components": "0.12.60",
157
- "@scalar/icons": "0.1.1",
156
+ "@scalar/components": "0.12.61",
158
157
  "@scalar/draggable": "0.1.6",
159
- "@scalar/openapi-parser": "0.8.8",
158
+ "@scalar/icons": "0.1.1",
159
+ "@scalar/oas-utils": "0.2.62",
160
160
  "@scalar/object-utils": "1.1.10",
161
161
  "@scalar/openapi-types": "0.1.4",
162
- "@scalar/themes": "0.9.42",
163
- "@scalar/oas-utils": "0.2.61",
162
+ "@scalar/openapi-parser": "0.8.8",
163
+ "@scalar/themes": "0.9.43",
164
164
  "@scalar/types": "0.0.17",
165
- "@scalar/use-codemirror": "0.11.27",
165
+ "@scalar/use-codemirror": "0.11.28",
166
166
  "@scalar/use-toasts": "0.7.7",
167
167
  "@scalar/use-tooltip": "1.0.3"
168
168
  },
@@ -1,5 +0,0 @@
1
- import o from "./RequestSection.vue.js";
2
- /* empty css */
3
- export {
4
- o as default
5
- };