@scalar/api-client 2.1.9 → 2.1.11

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 (24) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarServer.vue.js +18 -18
  4. package/dist/libs/send-request.d.ts.map +1 -1
  5. package/dist/libs/send-request.js +1 -1
  6. package/dist/router.js +1 -1
  7. package/dist/style.css +1 -1
  8. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  9. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  10. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +82 -88
  11. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  12. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  13. package/dist/views/Request/RequestSidebar.vue2.js +107 -98
  14. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
  15. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +2 -2
  16. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  17. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +3 -3
  18. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +14 -18
  19. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  20. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  21. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +26 -26
  22. package/package.json +5 -5
  23. package/dist/views/Components/Schemas/Schemas.vue.d.ts +0 -3
  24. package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as x, ref as U, computed as r, openBlock as l, createBlock as u, createSlots as L, withCtx as p, createTextVNode as w, toDisplayString as g, createElementBlock as V, createElementVNode as b, createCommentVNode as i, createVNode as j } from "vue";
1
+ import { defineComponent as x, ref as U, computed as n, openBlock as r, createBlock as u, createSlots as L, withCtx as p, createTextVNode as w, toDisplayString as g, createElementBlock as V, createElementVNode as b, createCommentVNode as i, createVNode as j } from "vue";
2
2
  import O from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
3
  import T from "whatwg-mimetype";
4
4
  import C from "./ResponseBodyDownload.vue.js";
@@ -18,51 +18,51 @@ const D = {
18
18
  headers: {}
19
19
  },
20
20
  setup(h) {
21
- const a = h, _ = (e) => e instanceof Blob, d = U(!0), m = r(
21
+ const a = h, _ = (e) => e instanceof Blob, c = U(!0), m = n(
22
22
  () => {
23
23
  var e;
24
24
  return !!((e = t.value) != null && e.raw && t.value.preview);
25
25
  }
26
- ), B = r(() => d.value || !m.value), R = r(() => !d.value || !m.value), o = r(() => {
26
+ ), B = n(() => c.value || !m.value), R = n(() => !c.value || !m.value), o = n(() => {
27
27
  var s;
28
- const e = ((s = a.headers.find((c) => c.name.toLowerCase() === "content-type")) == null ? void 0 : s.value) ?? "";
28
+ const e = ((s = a.headers.find((d) => d.name.toLowerCase() === "content-type")) == null ? void 0 : s.value) ?? "";
29
29
  return new T(e);
30
- }), t = r(() => E[o.value.essence]), n = r(() => _(a.data) ? URL.createObjectURL(a.data) : typeof a.data == "string" ? URL.createObjectURL(
30
+ }), t = n(() => E[o.value.essence]), l = n(() => _(a.data) ? URL.createObjectURL(a.data) : typeof a.data == "string" ? URL.createObjectURL(
31
31
  new Blob([a.data], { type: o.value.toString() })
32
32
  ) : a.data instanceof Object && Object.keys(a.data).length ? URL.createObjectURL(
33
33
  new Blob([JSON.stringify(a.data)], {
34
34
  type: o.value.toString()
35
35
  })
36
36
  ) : "");
37
- return (e, s) => (l(), u(O, null, L({
37
+ return (e, s) => (r(), u(O, null, L({
38
38
  title: p(() => [
39
39
  w(g(e.title), 1)
40
40
  ]),
41
41
  default: p(() => {
42
- var c, v, f, y;
42
+ var d, v, f, y;
43
43
  return [
44
- e.data ? (l(), V("div", D, [
44
+ e.data ? (r(), V("div", D, [
45
45
  b("div", I, [
46
46
  b("span", J, g(o.value.essence), 1),
47
- m.value ? (l(), u($, {
47
+ m.value ? (r(), u($, {
48
48
  key: 0,
49
- modelValue: d.value,
50
- "onUpdate:modelValue": s[0] || (s[0] = (k) => d.value = k)
49
+ modelValue: c.value,
50
+ "onUpdate:modelValue": s[0] || (s[0] = (k) => c.value = k)
51
51
  }, null, 8, ["modelValue"])) : i("", !0)
52
52
  ]),
53
- (c = t.value) != null && c.raw && R.value ? (l(), u(P, {
54
- key: n.value,
55
- data: e.data,
53
+ (d = t.value) != null && d.raw && R.value ? (r(), u(P, {
54
+ key: l.value,
55
+ content: e.data,
56
56
  language: t.value.language
57
- }, null, 8, ["data", "language"])) : i("", !0),
58
- (v = t.value) != null && v.preview && B.value ? (l(), u(S, {
59
- key: n.value,
57
+ }, null, 8, ["content", "language"])) : i("", !0),
58
+ (v = t.value) != null && v.preview && B.value ? (r(), u(S, {
59
+ key: l.value,
60
60
  alpha: t.value.alpha,
61
61
  mode: t.value.preview,
62
- src: n.value,
62
+ src: l.value,
63
63
  type: o.value.essence
64
64
  }, null, 8, ["alpha", "mode", "src", "type"])) : i("", !0),
65
- !((f = t.value) != null && f.raw) && !((y = t.value) != null && y.preview) ? (l(), u(N, { key: 2 }, {
65
+ !((f = t.value) != null && f.raw) && !((y = t.value) != null && y.preview) ? (r(), u(N, { key: 2 }, {
66
66
  default: p(() => [
67
67
  w(" Binary file ")
68
68
  ]),
@@ -73,11 +73,11 @@ const D = {
73
73
  }),
74
74
  _: 2
75
75
  }, [
76
- e.data && n.value ? {
76
+ e.data && l.value ? {
77
77
  name: "actions",
78
78
  fn: p(() => [
79
79
  j(C, {
80
- href: n.value,
80
+ href: l.value,
81
81
  type: o.value.essence
82
82
  }, null, 8, ["href", "type"])
83
83
  ]),
@@ -1,9 +1,9 @@
1
1
  import { type CodeMirrorLanguage } from '@scalar/use-codemirror';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
- data: any;
3
+ content: any;
4
4
  language?: CodeMirrorLanguage;
5
5
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
6
- data: any;
6
+ content: any;
7
7
  language?: CodeMirrorLanguage;
8
8
  }>>>, {}, {}>;
9
9
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBodyRaw.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyRaw.vue"],"names":[],"mappings":"AAsDA,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,wBAAwB,CAAA;;UAMvE,GAAG;eACE,kBAAkB;;UADvB,GAAG;eACE,kBAAkB;;AA8E/B,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ResponseBodyRaw.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyRaw.vue"],"names":[],"mappings":"AAuCA,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,wBAAwB,CAAA;;aAMpE,GAAG;eACD,kBAAkB;;aADpB,GAAG;eACD,kBAAkB;;AAgE/B,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseBodyRaw.vue2.js";
2
2
  /* empty css */
3
- import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ee29f8db"]]);
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b7d4ba6e"]]);
5
5
  export {
6
- s as default
6
+ r as default
7
7
  };
@@ -1,30 +1,26 @@
1
- import { defineComponent as a, ref as l, computed as u, toRaw as s, openBlock as c, createBlock as i, unref as p } from "vue";
2
- import { ScalarCodeBlock as f } from "@scalar/components";
3
- import { isJsonString as g } from "@scalar/oas-utils/helpers";
4
- import { useCodeMirror as m } from "@scalar/use-codemirror";
5
- const J = /* @__PURE__ */ a({
1
+ import { defineComponent as t, ref as a, openBlock as c, createBlock as l, unref as u } from "vue";
2
+ import { ScalarCodeBlock as p } from "@scalar/components";
3
+ import { useCodeMirror as s } from "@scalar/use-codemirror";
4
+ const d = /* @__PURE__ */ t({
6
5
  __name: "ResponseBodyRaw",
7
6
  props: {
8
- data: {},
7
+ content: {},
9
8
  language: {}
10
9
  },
11
10
  setup(o) {
12
- const n = o, t = l(null), r = u(() => {
13
- const e = n.data;
14
- return e && g(e) ? JSON.stringify(JSON.parse(e), null, 2) : e && typeof s(e) == "object" ? JSON.stringify(e, null, 2) : e;
15
- });
16
- return m({
17
- codeMirrorRef: t,
11
+ const e = o, r = a(null);
12
+ return s({
13
+ codeMirrorRef: r,
18
14
  readOnly: !0,
19
15
  lineNumbers: !0,
20
- content: r,
21
- language: n.language
22
- }), (e, d) => (c(), i(p(f), {
23
- content: r.value,
24
- lang: e.language
16
+ content: e.content,
17
+ language: e.language
18
+ }), (n, g) => (c(), l(u(p), {
19
+ content: n.content,
20
+ lang: n.language
25
21
  }, null, 8, ["content", "lang"]));
26
22
  }
27
23
  });
28
24
  export {
29
- J as default
25
+ d as default
30
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAmOA,wBAKG"}
1
+ {"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAyOA,wBAKG"}
@@ -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 s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-54db086c"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-43fc1968"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,50 +1,50 @@
1
- import { defineComponent as x, onMounted as y, onBeforeUnmount as k, openBlock as a, createElementBlock as c, createElementVNode as e, unref as o, createTextVNode as s, createCommentVNode as p, createVNode as n, pushScopeId as R, popScopeId as v } from "vue";
2
- import b from "../../../assets/computer.ascii.js";
3
- import C from "../../../components/ScalarAsciiArt.vue.js";
1
+ import { defineComponent as y, onMounted as k, onBeforeUnmount as R, openBlock as a, createElementBlock as c, createElementVNode as e, unref as t, createTextVNode as s, toDisplayString as v, createCommentVNode as p, createVNode as n, pushScopeId as g, popScopeId as b } from "vue";
2
+ import C from "../../../assets/computer.ascii.js";
3
+ import B from "../../../components/ScalarAsciiArt.vue.js";
4
4
  import u from "../../../components/ScalarHotkey.vue.js";
5
- import { useWorkspace as g } from "../../../store/store.js";
5
+ import { useWorkspace as N } from "../../../store/store.js";
6
6
  import { hotKeyBus as d } from "../../../libs/event-busses/hot-keys-bus.js";
7
- import { executeRequestBus as N } from "../../../libs/event-busses/execute-request-bus.js";
7
+ import { executeRequestBus as S } from "../../../libs/event-busses/execute-request-bus.js";
8
8
  import { commandPaletteBus as q } from "../../../libs/event-busses/command-palette-bus.js";
9
- const f = (t) => (R("data-v-54db086c"), t = t(), v(), t), B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, S = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, V = {
9
+ const f = (o) => (g("data-v-43fc1968"), o = o(), b(), o), V = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, w = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, E = {
10
10
  key: 0,
11
11
  class: "scalar-version-number"
12
- }, w = /* @__PURE__ */ f(() => /* @__PURE__ */ e("b", null, "Alpha", -1)), A = /* @__PURE__ */ f(() => /* @__PURE__ */ e("div", { class: "mt-1" }, [
12
+ }, I = /* @__PURE__ */ f(() => /* @__PURE__ */ e("b", null, "Beta", -1)), P = /* @__PURE__ */ f(() => /* @__PURE__ */ e("div", { class: "mt-1" }, [
13
13
  /* @__PURE__ */ e("a", {
14
14
  href: "https://github.com/scalar/scalar/issues/2669",
15
15
  target: "_blank"
16
- }, "Roadmap")
17
- ], -1)), E = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, M = /* @__PURE__ */ x({
16
+ }, " Roadmap ")
17
+ ], -1)), A = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, T = /* @__PURE__ */ y({
18
18
  __name: "ResponseEmpty",
19
- setup(t) {
20
- const { isReadOnly: _, activeWorkspace: h } = g(), r = () => {
19
+ setup(o) {
20
+ const { isReadOnly: _, activeWorkspace: h } = N(), r = () => {
21
21
  q.emit({ commandName: "Create Request" });
22
- }, l = (m) => {
23
- m.openCommandPaletteRequest && r();
24
- };
25
- return y(() => d.on(l)), k(() => d.off(l)), (m, i) => (a(), c("div", B, [
26
- e("div", S, [
27
- o(h).isReadOnly ? p("", !0) : (a(), c("div", V, [
28
- s(" Scalar V1.0.6 "),
29
- w,
22
+ }, i = (l) => {
23
+ l.openCommandPaletteRequest && r();
24
+ }, x = "2.1.11";
25
+ return k(() => d.on(i)), R(() => d.off(i)), (l, m) => (a(), c("div", V, [
26
+ e("div", w, [
27
+ t(h).isReadOnly ? p("", !0) : (a(), c("div", E, [
28
+ s(" Scalar V" + v(t(x)) + " ", 1),
29
+ I,
30
30
  s(" Release "),
31
- A
31
+ P
32
32
  ])),
33
- n(C, {
34
- art: o(b),
33
+ n(B, {
34
+ art: t(C),
35
35
  class: "text-c-3"
36
36
  }, null, 8, ["art"])
37
37
  ]),
38
- e("div", E, [
38
+ e("div", A, [
39
39
  e("button", {
40
40
  class: "flex items-center gap-1.5",
41
41
  type: "button",
42
- onClick: i[0] || (i[0] = (I) => o(N).emit())
42
+ onClick: m[0] || (m[0] = (K) => t(S).emit())
43
43
  }, [
44
44
  s(" Send Request "),
45
45
  n(u, { hotkey: "↵" })
46
46
  ]),
47
- o(_) ? p("", !0) : (a(), c("button", {
47
+ t(_) ? p("", !0) : (a(), c("button", {
48
48
  key: 0,
49
49
  class: "flex items-center gap-1.5",
50
50
  type: "button",
@@ -58,5 +58,5 @@ const f = (t) => (R("data-v-54db086c"), t = t(), v(), t), B = { class: "relative
58
58
  }
59
59
  });
60
60
  export {
61
- M as default
61
+ T as default
62
62
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.9",
21
+ "version": "2.1.11",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -125,18 +125,18 @@
125
125
  "vue-router": "^4.3.0",
126
126
  "whatwg-mimetype": "^4.0.0",
127
127
  "zod": "^3.23.8",
128
- "@scalar/components": "0.12.48",
129
128
  "@scalar/draggable": "0.1.5",
129
+ "@scalar/components": "0.12.49",
130
130
  "@scalar/icons": "0.1.0",
131
- "@scalar/oas-utils": "0.2.49",
131
+ "@scalar/oas-utils": "0.2.50",
132
132
  "@scalar/openapi-parser": "0.8.4",
133
- "@scalar/openapi-types": "0.1.1",
134
133
  "@scalar/object-utils": "1.1.9",
134
+ "@scalar/openapi-types": "0.1.1",
135
135
  "@scalar/themes": "0.9.32",
136
136
  "@scalar/types": "0.0.11",
137
137
  "@scalar/use-toasts": "0.7.6",
138
138
  "@scalar/use-tooltip": "1.0.2",
139
- "@scalar/use-codemirror": "0.11.14"
139
+ "@scalar/use-codemirror": "0.11.15"
140
140
  },
141
141
  "devDependencies": {
142
142
  "@types/content-type": "^1.1.8",
@@ -1,3 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
- export default _default;
3
- //# sourceMappingURL=Schemas.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schemas.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Components/Schemas/Schemas.vue"],"names":[],"mappings":";AA0DA,wBAKG"}