@scalar/api-client 2.2.0 → 2.2.2

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 (45) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue2.js +1 -1
  4. package/dist/components/SideNav/SideNav.vue.js +4 -4
  5. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  6. package/dist/components/TopNav/TopNav.vue.js +165 -5
  7. package/dist/components/TopNav/TopNav.vue2.js +2 -165
  8. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  9. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  10. package/dist/components/TopNav/TopNavItem.vue2.js +5 -5
  11. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  12. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  13. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
  14. package/dist/layouts/App/ApiClientApp.vue.d.ts +1 -1
  15. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  16. package/dist/layouts/App/ApiClientApp.vue.js +39 -36
  17. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  18. package/dist/style.css +1 -1
  19. package/dist/tailwind/desktop-variants.d.ts +18 -0
  20. package/dist/tailwind/desktop-variants.d.ts.map +1 -0
  21. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  22. package/dist/views/Request/Request.vue.js +2 -2
  23. package/dist/views/Request/Request.vue2.js +8 -8
  24. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  25. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  26. package/dist/views/Request/RequestSection/RequestBody.vue2.js +33 -34
  27. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  28. package/dist/views/Request/RequestSection/RequestParams.vue.js +30 -30
  29. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  30. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  31. package/dist/views/Request/RequestSection/RequestSection.vue2.js +6 -6
  32. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  33. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  34. package/dist/views/Request/RequestSection/RequestTable.vue2.js +42 -44
  35. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  36. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
  37. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +25 -21
  38. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  39. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +7 -7
  40. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  41. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +7 -7
  42. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  43. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  44. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +23 -23
  45. package/package.json +9 -9
@@ -1,12 +1,12 @@
1
- import { defineComponent as S, openBlock as u, createBlock as r, unref as p, withCtx as s, createElementBlock as y, Fragment as w, renderList as U, createElementVNode as d, createCommentVNode as m, createVNode as i, normalizeClass as _, createSlots as x, createTextVNode as E, toDisplayString as V, computed as I } from "vue";
2
- import k from "../../../components/CodeInput/CodeInput.vue.js";
3
- import T from "../../../components/DataTable/DataTable.vue.js";
4
- import f from "../../../components/DataTable/DataTableCell.vue.js";
5
- import N from "../../../components/DataTable/DataTableCheckbox.vue.js";
6
- import q from "../../../components/DataTable/DataTableRow.vue.js";
1
+ import { defineComponent as C, openBlock as u, createBlock as s, unref as p, withCtx as r, createElementBlock as y, Fragment as V, renderList as S, createElementVNode as d, createCommentVNode as m, createVNode as i, normalizeClass as U, createSlots as h, createTextVNode as E, toDisplayString as k, computed as T } from "vue";
2
+ import w from "../../../components/CodeInput/CodeInput.vue.js";
3
+ import N from "../../../components/DataTable/DataTable.vue.js";
4
+ import c from "../../../components/DataTable/DataTableCell.vue.js";
5
+ import q from "../../../components/DataTable/DataTableCheckbox.vue.js";
6
+ import I from "../../../components/DataTable/DataTableRow.vue.js";
7
7
  import { ScalarButton as z, ScalarIcon as D } from "@scalar/components";
8
8
  import H from "./RequestTableTooltip.vue.js";
9
- const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, O = ["onClick"], X = /* @__PURE__ */ S({
9
+ const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, O = ["onClick"], X = /* @__PURE__ */ C({
10
10
  __name: "RequestTable",
11
11
  props: {
12
12
  items: {},
@@ -14,12 +14,12 @@ const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hi
14
14
  showUploadButton: { type: Boolean, default: !1 }
15
15
  },
16
16
  emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
17
- setup(g, { emit: B }) {
18
- const R = g, a = B, $ = R.isEnabledHidden ? ["", ""] : ["", "", "36px"], c = (e, o, l) => {
17
+ setup(g, { emit: x }) {
18
+ const B = g, a = x, _ = B.isEnabledHidden ? ["", ""] : ["", "", "36px"], f = (e, o, l) => {
19
19
  a("updateRow", e, o, l);
20
20
  }, F = (e) => {
21
21
  a("uploadFile", e);
22
- }, b = (e) => !!(e.description || e.type || e.default || e.format), v = (e) => I(() => {
22
+ }, b = (e) => !!(e.description || e.type || e.default || e.format), v = (e) => T(() => {
23
23
  if (e.type === "integer" && e.value !== void 0) {
24
24
  const o = Number(e.value);
25
25
  if (e.minimum !== void 0 && o < e.minimum)
@@ -28,26 +28,26 @@ const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hi
28
28
  return `Max is ${e.maximum}`;
29
29
  }
30
30
  return !1;
31
- }), h = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default;
32
- return (e, o) => (u(), r(T, {
31
+ }), R = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default;
32
+ return (e, o) => (u(), s(N, {
33
33
  class: "flex-1",
34
- columns: p($)
34
+ columns: p(_)
35
35
  }, {
36
- default: s(() => [
37
- (u(!0), y(w, null, U(e.items, (l, t) => (u(), r(q, { key: t }, {
38
- default: s(() => [
36
+ default: r(() => [
37
+ (u(!0), y(V, null, S(e.items, (l, t) => (u(), s(I, { key: t }, {
38
+ default: r(() => [
39
39
  d("label", A, [
40
40
  o[4] || (o[4] = d("span", { class: "sr-only" }, "Row Enabled", -1)),
41
- e.isEnabledHidden ? m("", !0) : (u(), r(N, {
41
+ e.isEnabledHidden ? m("", !0) : (u(), s(q, {
42
42
  key: 0,
43
43
  class: "!border-r-1/2",
44
44
  modelValue: l.enabled,
45
45
  "onUpdate:modelValue": (n) => a("toggleRow", t, n)
46
46
  }, null, 8, ["modelValue", "onUpdate:modelValue"]))
47
47
  ]),
48
- i(f, null, {
49
- default: s(() => [
50
- i(k, {
48
+ i(c, null, {
49
+ default: r(() => [
50
+ i(w, {
51
51
  disableCloseBrackets: "",
52
52
  disableEnter: "",
53
53
  disableTabIndent: "",
@@ -56,17 +56,16 @@ const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hi
56
56
  required: l.required,
57
57
  onBlur: o[0] || (o[0] = (n) => a("inputBlur")),
58
58
  onFocus: o[1] || (o[1] = (n) => a("inputFocus")),
59
- onInput: (n) => e.items && t === e.items.length - 1 && a("addRow"),
60
- onSelectVariable: (n) => c(t, "key", n),
59
+ onSelectVariable: (n) => f(t, "key", n),
61
60
  "onUpdate:modelValue": (n) => a("updateRow", t, "key", n)
62
- }, null, 8, ["modelValue", "required", "onInput", "onSelectVariable", "onUpdate:modelValue"])
61
+ }, null, 8, ["modelValue", "required", "onSelectVariable", "onUpdate:modelValue"])
63
62
  ]),
64
63
  _: 2
65
64
  }, 1024),
66
- i(f, null, {
67
- default: s(() => [
68
- i(k, {
69
- class: _({
65
+ i(c, null, {
66
+ default: r(() => [
67
+ i(w, {
68
+ class: U({
70
69
  "pr-6": b(l)
71
70
  }),
72
71
  default: l.default,
@@ -82,53 +81,52 @@ const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hi
82
81
  type: l.type,
83
82
  onBlur: o[2] || (o[2] = (n) => a("inputBlur")),
84
83
  onFocus: o[3] || (o[3] = (n) => a("inputFocus")),
85
- onInput: (n) => e.items && t === e.items.length - 1 && a("addRow"),
86
- onSelectVariable: (n) => c(t, "value", n),
84
+ onSelectVariable: (n) => f(t, "value", n),
87
85
  "onUpdate:modelValue": (n) => a("updateRow", t, "value", n)
88
- }, x({
89
- icon: s(() => [
90
- b(l) ? (u(), r(H, {
86
+ }, h({
87
+ icon: r(() => [
88
+ b(l) ? (u(), s(H, {
91
89
  key: 0,
92
- item: { ...l, default: h(l) }
90
+ item: { ...l, default: R(l) }
93
91
  }, null, 8, ["item"])) : m("", !0)
94
92
  ]),
95
93
  _: 2
96
94
  }, [
97
95
  v(l).value ? {
98
96
  name: "warning",
99
- fn: s(() => [
100
- E(V(v(l).value), 1)
97
+ fn: r(() => [
98
+ E(k(v(l).value), 1)
101
99
  ]),
102
100
  key: "0"
103
101
  } : void 0
104
- ]), 1032, ["class", "default", "enum", "max", "min", "modelValue", "nullable", "type", "onInput", "onSelectVariable", "onUpdate:modelValue"])
102
+ ]), 1032, ["class", "default", "enum", "max", "min", "modelValue", "nullable", "type", "onSelectVariable", "onUpdate:modelValue"])
105
103
  ]),
106
104
  _: 2
107
105
  }, 1024),
108
- e.showUploadButton ? (u(), r(f, {
106
+ e.showUploadButton ? (u(), s(c, {
109
107
  key: 0,
110
108
  class: "group/upload p-1 overflow-hidden relative text-ellipsis whitespace-nowrap"
111
109
  }, {
112
- default: s(() => {
110
+ default: r(() => {
113
111
  var n;
114
112
  return [
115
- l.file ? (u(), y(w, { key: 0 }, [
113
+ l.file ? (u(), y(V, { key: 0 }, [
116
114
  d("div", M, [
117
- d("span", null, V((n = l.file) == null ? void 0 : n.name), 1)
115
+ d("span", null, k((n = l.file) == null ? void 0 : n.name), 1)
118
116
  ]),
119
117
  d("button", {
120
118
  class: "absolute bg-b-2 font-medium centered-x centered-y hidden rounded text-center p-0.5 w-[calc(100%_-_8px)] group-hover/upload:block text-xs",
121
119
  type: "button",
122
- onClick: (C) => a("removeFile", t)
120
+ onClick: ($) => a("removeFile", t)
123
121
  }, " Delete ", 8, O)
124
- ], 64)) : (u(), r(p(z), {
122
+ ], 64)) : (u(), s(p(z), {
125
123
  key: 1,
126
124
  class: "bg-b-2 hover:bg-b-3 border-0 py-px text-c-2 shadow-none",
127
125
  size: "sm",
128
126
  variant: "outlined",
129
- onClick: (C) => F(t)
127
+ onClick: ($) => F(t)
130
128
  }, {
131
- default: s(() => [
129
+ default: r(() => [
132
130
  o[5] || (o[5] = d("span", null, "File", -1)),
133
131
  i(p(D), {
134
132
  class: "ml-1",
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBodyRaw.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyRaw.vue"],"names":[],"mappings":"AAyGA,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,wBAAwB,CAAA;AAM/E,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,GAAG,CAAA;IACZ,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B,CAAC;;AAyGF,wBAOG"}
1
+ {"version":3,"file":"ResponseBodyRaw.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyRaw.vue"],"names":[],"mappings":"AAyGA,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,wBAAwB,CAAA;AAM/E,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,GAAG,CAAA;IACZ,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B,CAAC;;AA4GF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseBodyRaw.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-641bbcf9"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f3712b08"]]);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -1,40 +1,44 @@
1
- import { defineComponent as d, ref as p, toRef as s, openBlock as f, createElementBlock as m, createElementVNode as o, unref as c, createVNode as y } from "vue";
2
- import { ScalarIcon as C } from "@scalar/components";
3
- import { useCodeMirror as g } from "@scalar/use-codemirror";
4
- import { useClipboard as b } from "@scalar/use-hooks/useClipboard";
5
- const _ = { class: "relative" }, v = { class: "scalar-code-copy" }, x = /* @__PURE__ */ d({
1
+ import { defineComponent as m, ref as f, toRef as c, openBlock as a, createElementBlock as l, createElementVNode as t, unref as i, createVNode as y, createCommentVNode as C } from "vue";
2
+ import { ScalarIcon as b } from "@scalar/components";
3
+ import { prettyPrintJson as g } from "@scalar/oas-utils/helpers";
4
+ import { useCodeMirror as v } from "@scalar/use-codemirror";
5
+ import { useClipboard as _ } from "@scalar/use-hooks/useClipboard";
6
+ const k = { class: "body-raw relative overflow-auto" }, R = {
7
+ key: 0,
8
+ class: "scalar-code-copy"
9
+ }, E = /* @__PURE__ */ m({
6
10
  __name: "ResponseBodyRaw",
7
11
  props: {
8
12
  content: {},
9
13
  language: {}
10
14
  },
11
- setup(l) {
12
- const r = l, n = p(null), { copyToClipboard: a } = b(), { codeMirror: i } = g({
15
+ setup(u) {
16
+ const r = u, n = f(null), { copyToClipboard: d } = _(), { codeMirror: p } = v({
13
17
  codeMirrorRef: n,
14
18
  readOnly: !0,
15
19
  lineNumbers: !0,
16
- content: s(() => r.content),
17
- language: s(() => r.language),
20
+ content: c(() => g(r.content)),
21
+ language: c(() => r.language),
18
22
  forceFoldGutter: !0
19
- }), u = () => {
20
- var t;
21
- return ((t = i.value) == null ? void 0 : t.state.doc.toString()) || "";
23
+ }), s = () => {
24
+ var o;
25
+ return ((o = p.value) == null ? void 0 : o.state.doc.toString()) || "";
22
26
  };
23
- return (t, e) => (f(), m("div", _, [
24
- o("div", v, [
25
- o("button", {
27
+ return (o, e) => (a(), l("div", k, [
28
+ s() ? (a(), l("div", R, [
29
+ t("button", {
26
30
  class: "copy-button",
27
31
  type: "button",
28
- onClick: e[0] || (e[0] = (R) => c(a)(u()))
32
+ onClick: e[0] || (e[0] = (M) => i(d)(s()))
29
33
  }, [
30
- e[1] || (e[1] = o("span", { class: "sr-only" }, "Copy content", -1)),
31
- y(c(C), {
34
+ e[1] || (e[1] = t("span", { class: "sr-only" }, "Copy content", -1)),
35
+ y(i(b), {
32
36
  icon: "Clipboard",
33
37
  size: "md"
34
38
  })
35
39
  ])
36
- ]),
37
- o("div", {
40
+ ])) : C("", !0),
41
+ t("div", {
38
42
  ref_key: "codeMirrorRef",
39
43
  ref: n
40
44
  }, null, 512)
@@ -42,5 +46,5 @@ const _ = { class: "relative" }, v = { class: "scalar-code-copy" }, x = /* @__PU
42
46
  }
43
47
  });
44
48
  export {
45
- x as default
49
+ E as default
46
50
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseEmpty.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3c233eb3"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-886982fd"]]);
5
5
  export {
6
- r as default
6
+ s as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, onMounted as R, onBeforeUnmount as C, openBlock as l, createElementBlock as n, createElementVNode as o, normalizeClass as k, unref as t, createTextVNode as c, toDisplayString as N, createCommentVNode as m, createVNode as s } from "vue";
1
+ import { defineComponent as b, onMounted as R, onBeforeUnmount as C, openBlock as n, createElementBlock as l, createElementVNode as o, normalizeClass as k, unref as t, createTextVNode as c, toDisplayString as N, createCommentVNode as m, createVNode as s } from "vue";
2
2
  import q from "../../../assets/computer.ascii.js";
3
3
  import x from "../../../assets/keycap.ascii.js";
4
4
  import u from "../../../components/ScalarAsciiArt.vue.js";
@@ -17,14 +17,14 @@ const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, E = {
17
17
  a.commandPalette.emit({ commandName: "Create Request" });
18
18
  }, y = (i) => {
19
19
  i != null && i.createNew && v.name === "request" && f();
20
- }, h = "2.2.0";
21
- return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (l(), n("div", B, [
20
+ }, h = "2.2.2";
21
+ return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (n(), l("div", B, [
22
22
  o("div", {
23
23
  class: k(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
24
24
  "hidden opacity-0": t(d).length <= 1 && t(r) !== "modal"
25
25
  }])
26
26
  }, [
27
- t(g) ? m("", !0) : (l(), n("div", E, [
27
+ t(g) ? m("", !0) : (n(), l("div", E, [
28
28
  c(" Scalar App V" + N(t(h)) + " Beta ", 1),
29
29
  e[2] || (e[2] = o("div", { class: "mt-2" }, [
30
30
  o("a", {
@@ -38,7 +38,7 @@ const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, E = {
38
38
  class: "text-c-3"
39
39
  }, null, 8, ["art"])
40
40
  ], 2),
41
- t(r) !== "modal" ? (l(), n("div", {
41
+ t(r) !== "modal" ? (n(), l("div", {
42
42
  key: 0,
43
43
  class: k(["h-[calc(100%_-_50px)] items-center justify-center hidden pb-5", {
44
44
  "!flex opacity-100": t(d).length == 1
@@ -65,7 +65,7 @@ const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, E = {
65
65
  ])
66
66
  ], 2)) : m("", !0),
67
67
  o("div", j, [
68
- t(r) !== "modal" ? (l(), n("button", {
68
+ t(r) !== "modal" ? (n(), l("button", {
69
69
  key: 0,
70
70
  class: "flex items-center gap-1.5",
71
71
  type: "button",
@@ -82,7 +82,7 @@ const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, E = {
82
82
  e[5] || (e[5] = c(" Send Request ")),
83
83
  s(p, { hotkey: "↵" })
84
84
  ]),
85
- t(r) !== "modal" ? (l(), n("button", {
85
+ t(r) === "desktop" ? (n(), l("button", {
86
86
  key: 1,
87
87
  class: "flex items-center gap-1.5",
88
88
  type: "button",
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AA0EA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;;AAyJF,wBAOG"}
1
+ {"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AA0EA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;;AAwJF,wBAOG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as _, openBlock as e, createBlock as n, withCtx as t, createTextVNode as l, createElementBlock as s, createVNode as m, Fragment as f, renderList as x, toDisplayString as i } from "vue";
1
+ import { defineComponent as _, openBlock as e, createBlock as n, withCtx as t, createTextVNode as l, createElementBlock as s, createVNode as m, Fragment as c, renderList as x, toDisplayString as i } from "vue";
2
2
  import h from "../../../components/DataTable/DataTable.vue.js";
3
3
  import y from "../../../components/DataTable/DataTableRow.vue.js";
4
4
  import u from "../../../components/DataTable/DataTableText.vue.js";
@@ -10,7 +10,7 @@ const w = {
10
10
  class: "border max-h-[calc(100%-32px)] overflow-y-auto rounded"
11
11
  }, C = {
12
12
  key: 1,
13
- class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
13
+ class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1"
14
14
  }, R = /* @__PURE__ */ _({
15
15
  __name: "ResponseHeaders",
16
16
  props: {
@@ -21,7 +21,7 @@ const w = {
21
21
  (a) => a.name.toLowerCase() === r.toLowerCase()
22
22
  );
23
23
  return (r, a) => (e(), n(b, {
24
- class: "overflow-scroll",
24
+ class: "overflow-auto",
25
25
  defaultOpen: !1,
26
26
  itemCount: r.headers.length
27
27
  }, {
@@ -36,16 +36,16 @@ const w = {
36
36
  scroll: ""
37
37
  }, {
38
38
  default: t(() => [
39
- (e(!0), s(f, null, x(r.headers, (o, p) => (e(), n(y, {
39
+ (e(!0), s(c, null, x(r.headers, (o, p) => (e(), n(y, {
40
40
  key: p,
41
41
  class: "text-c-1"
42
42
  }, {
43
43
  default: t(() => [
44
44
  m(u, { class: "sticky left-0 z-1 bg-b-1 max-w-48" }, {
45
45
  default: t(() => {
46
- var c;
46
+ var f;
47
47
  return [
48
- typeof ((c = d(o.name)) == null ? void 0 : c.url) == "string" ? (e(), n(k, {
48
+ typeof ((f = d(o.name)) == null ? void 0 : f.url) == "string" ? (e(), n(k, {
49
49
  key: 0,
50
50
  class: "decoration-c-3",
51
51
  href: d(o.name).url
@@ -54,7 +54,7 @@ const w = {
54
54
  l(i(o.name), 1)
55
55
  ]),
56
56
  _: 2
57
- }, 1032, ["href"])) : (e(), s(f, { key: 1 }, [
57
+ }, 1032, ["href"])) : (e(), s(c, { key: 1 }, [
58
58
  l(i(o.name), 1)
59
59
  ], 64))
60
60
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA6MA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AASvE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACvC,CAAC;;AA2RF,wBAOG"}
1
+ {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA6MA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AASvE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACvC,CAAC;;AA4RF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseSection.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6fdb06f8"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4c842dc1"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as _, computed as m, ref as g, openBlock as n, createBlock as i, withCtx as u, createElementVNode as l, normalizeClass as f, createCommentVNode as c, createVNode as v, createElementBlock as y, Fragment as x } from "vue";
2
- import R from "../../../components/ContextBar.vue.js";
3
- import S from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import j from "./ResponseBody.vue.js";
2
+ import j from "../../../components/ContextBar.vue.js";
3
+ import R from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import S from "./ResponseBody.vue.js";
5
5
  import b from "./ResponseEmpty.vue.js";
6
6
  import H from "./ResponseLoadingOverlay.vue.js";
7
7
  import V from "./ResponseMetaInformation.vue.js";
@@ -16,27 +16,27 @@ const E = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ *
16
16
  },
17
17
  setup(k) {
18
18
  const t = k, d = m(() => {
19
- var s;
20
- const e = (s = t.response) == null ? void 0 : s.headers;
21
- return e ? Object.keys(e).map((o) => ({
22
- name: o,
23
- value: e[o],
19
+ var o;
20
+ const e = (o = t.response) == null ? void 0 : o.headers;
21
+ return e ? Object.keys(e).map((s) => ({
22
+ name: s,
23
+ value: e[s],
24
24
  required: !1
25
25
  })).filter(
26
- (o) => ![
26
+ (s) => ![
27
27
  "rest-api-client-content-length",
28
28
  "X-API-Client-Content-Length"
29
- ].includes(o.name)
29
+ ].includes(s.name)
30
30
  ) : [];
31
31
  }), B = m(
32
32
  () => {
33
33
  var e;
34
- return ((e = t.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((s) => {
34
+ return ((e = t.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((o) => {
35
35
  var r, p;
36
- const o = (p = (r = t.response) == null ? void 0 : r.headers) == null ? void 0 : p[s];
37
- return o ? {
38
- name: s,
39
- value: o,
36
+ const s = (p = (r = t.response) == null ? void 0 : r.headers) == null ? void 0 : p[o];
37
+ return s ? {
38
+ name: o,
39
+ value: s,
40
40
  required: !1
41
41
  } : [];
42
42
  })) ?? [];
@@ -74,32 +74,32 @@ const E = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ *
74
74
  "application/x-www-form-urlencoded"
75
75
  ].some((T) => e.includes(T)) && (t.response.size ?? 0) > h;
76
76
  });
77
- return (e, s) => (n(), i(S, { "aria-label": "Response" }, {
77
+ return (e, o) => (n(), i(R, { "aria-label": "Response" }, {
78
78
  title: u(() => [
79
79
  l("div", E, [
80
80
  l("div", {
81
81
  "aria-live": "polite",
82
82
  class: f(["flex items-center", { "animate-response-heading": e.response }])
83
83
  }, [
84
- s[1] || (s[1] = l("span", { class: "response-heading absolute pointer-events-none" }, " Response ", -1)),
84
+ o[1] || (o[1] = l("span", { class: "response-heading absolute pointer-events-none" }, " Response ", -1)),
85
85
  e.response ? (n(), i(V, {
86
86
  key: 0,
87
87
  class: "animate-response-children",
88
88
  response: e.response
89
89
  }, null, 8, ["response"])) : c("", !0)
90
90
  ], 2),
91
- v(R, {
91
+ v(j, {
92
92
  activeSection: a.value,
93
93
  sections: C,
94
- onSetActiveSection: s[0] || (s[0] = (o) => a.value = o)
94
+ onSetActiveSection: o[0] || (o[0] = (s) => a.value = s)
95
95
  }, null, 8, ["activeSection"])
96
96
  ])
97
97
  ]),
98
98
  default: u(() => {
99
- var o;
99
+ var s;
100
100
  return [
101
101
  l("div", {
102
- class: f(["custom-scroll h-full relative grid gap-[.5px] px-2 xl:px-3 py-2.5", {
102
+ class: f(["custom-scroll h-full relative grid gap-[.5px] px-2 xl:px-3 py-2.5 justify-stretch", {
103
103
  "content-start": e.response
104
104
  }])
105
105
  }, [
@@ -116,10 +116,10 @@ const E = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ *
116
116
  A.value ? (n(), i(w, {
117
117
  key: 0,
118
118
  content: t.response.data
119
- }, null, 8, ["content"])) : (n(), i(j, {
119
+ }, null, 8, ["content"])) : (n(), i(S, {
120
120
  key: 1,
121
121
  active: !0,
122
- data: (o = t.response) == null ? void 0 : o.data,
122
+ data: (s = t.response) == null ? void 0 : s.data,
123
123
  headers: d.value,
124
124
  title: "Body"
125
125
  }, null, 8, ["data", "headers"]))
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.2.0",
21
+ "version": "2.2.2",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -155,20 +155,20 @@
155
155
  "whatwg-mimetype": "^4.0.0",
156
156
  "yaml": "^2.4.5",
157
157
  "zod": "^3.23.8",
158
- "@scalar/draggable": "0.1.7",
158
+ "@scalar/components": "0.12.75",
159
159
  "@scalar/icons": "0.1.2",
160
- "@scalar/oas-utils": "0.2.78",
160
+ "@scalar/draggable": "0.1.7",
161
161
  "@scalar/import": "0.1.2",
162
+ "@scalar/oas-utils": "0.2.80",
162
163
  "@scalar/object-utils": "1.1.12",
163
- "@scalar/openapi-parser": "0.8.10",
164
164
  "@scalar/openapi-types": "0.1.5",
165
- "@scalar/themes": "0.9.49",
166
- "@scalar/types": "0.0.20",
167
- "@scalar/use-hooks": "0.1.2",
165
+ "@scalar/openapi-parser": "0.8.10",
166
+ "@scalar/types": "0.0.21",
167
+ "@scalar/use-codemirror": "0.11.42",
168
168
  "@scalar/use-toasts": "0.7.7",
169
+ "@scalar/use-hooks": "0.1.4",
169
170
  "@scalar/use-tooltip": "1.0.4",
170
- "@scalar/use-codemirror": "0.11.40",
171
- "@scalar/components": "0.12.73"
171
+ "@scalar/themes": "0.9.51"
172
172
  },
173
173
  "devDependencies": {
174
174
  "@types/js-cookie": "^3.0.6",