@scalar/api-client 2.1.16 → 2.1.18

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 (71) hide show
  1. package/CHANGELOG.md +22 -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/AddressBar/AddressBar.vue2.js +67 -66
  5. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +3 -0
  6. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/CommandActionForm.vue.js +13 -11
  8. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +0 -2
  9. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/CommandActionInput.vue.js +36 -38
  11. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +100 -80
  13. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  14. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +24 -24
  15. package/dist/components/ContextBar.vue.js +2 -2
  16. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +2 -2
  17. package/dist/components/SideNav/SideNav.vue.js +2 -2
  18. package/dist/components/SideNav/SideNav.vue2.js +1 -1
  19. package/dist/components/TopNav/TopNav.vue.js +2 -2
  20. package/dist/components/TopNav/TopNav.vue2.js +11 -11
  21. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  22. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  23. package/dist/layouts/App/ApiClientApp.vue.js +36 -40
  24. package/dist/layouts/App/hotkeys.d.ts +6 -0
  25. package/dist/layouts/App/hotkeys.d.ts.map +1 -0
  26. package/dist/layouts/App/hotkeys.js +21 -0
  27. package/dist/layouts/Web/ApiClientWeb.vue.d.ts +3 -0
  28. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -0
  29. package/dist/layouts/Web/ApiClientWeb.vue.js +54 -0
  30. package/dist/layouts/Web/ApiClientWeb.vue3.js +5 -0
  31. package/dist/layouts/Web/create-api-client-web.d.ts +3593 -0
  32. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -0
  33. package/dist/layouts/Web/create-api-client-web.js +18 -0
  34. package/dist/layouts/Web/index.d.ts +3 -0
  35. package/dist/layouts/Web/index.d.ts.map +1 -0
  36. package/dist/layouts/Web/index.js +7 -0
  37. package/dist/libs/event-busses/hot-keys-bus.d.ts +0 -1
  38. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
  39. package/dist/libs/event-busses/hot-keys-bus.js +19 -35
  40. package/dist/libs/extractAttachmentFilename.d.ts +2 -0
  41. package/dist/libs/extractAttachmentFilename.d.ts.map +1 -0
  42. package/dist/libs/extractAttachmentFilename.js +20 -0
  43. package/dist/libs/getOpenApiDocumentDetails.d.ts +10 -0
  44. package/dist/libs/getOpenApiDocumentDetails.d.ts.map +1 -0
  45. package/dist/libs/getOpenApiDocumentDetails.js +40 -0
  46. package/dist/libs/index.d.ts +1 -2
  47. package/dist/libs/index.d.ts.map +1 -1
  48. package/dist/libs/index.js +21 -23
  49. package/dist/libs/isUrl.d.ts +1 -1
  50. package/dist/libs/isUrl.d.ts.map +1 -1
  51. package/dist/libs/isUrl.js +4 -3
  52. package/dist/store/import-spec.d.ts.map +1 -1
  53. package/dist/store/import-spec.js +21 -26
  54. package/dist/style.css +1 -1
  55. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  56. package/dist/views/Request/RequestSubpageHeader.vue.js +3 -3
  57. package/dist/views/Request/RequestSubpageHeader.vue2.js +2 -2
  58. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  59. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +63 -55
  60. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts +2 -0
  61. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
  62. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +14 -14
  63. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  64. package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -2
  65. package/package.json +10 -6
  66. package/dist/libs/getOpenApiDocumentVersion.d.ts +0 -8
  67. package/dist/libs/getOpenApiDocumentVersion.d.ts.map +0 -1
  68. package/dist/libs/getOpenApiDocumentVersion.js +0 -20
  69. package/dist/libs/isDocument.d.ts +0 -3
  70. package/dist/libs/isDocument.d.ts.map +0 -1
  71. package/dist/libs/isDocument.js +0 -7
@@ -15,7 +15,7 @@ const I = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none"
15
15
  }, P = ["value"], z = {
16
16
  key: 2,
17
17
  class: "text-c-2"
18
- }, L = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-5 py-2.5" }, ee = /* @__PURE__ */ B({
18
+ }, L = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, ee = /* @__PURE__ */ B({
19
19
  __name: "RequestSection",
20
20
  setup(O) {
21
21
  const { activeRequest: a, activeExample: h, isReadOnly: p, requestMutators: k } = D(), S = _(() => {
@@ -1,7 +1,7 @@
1
- import e from "./RequestSubpageHeader.vue2.js";
1
+ import a from "./RequestSubpageHeader.vue2.js";
2
2
  /* empty css */
3
- import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-d2e340a5"]]);
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ e(a, [["__scopeId", "data-v-a60a547f"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -3,11 +3,11 @@ import f from "../../components/AddressBar/AddressBar.vue.js";
3
3
  import b from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
4
4
  import g from "../../components/Sidebar/SidebarToggle.vue.js";
5
5
  import { ScalarIcon as h } from "@scalar/components";
6
- const _ = (o) => (c("data-v-d2e340a5"), o = o(), u(), o), x = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, y = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, k = /* @__PURE__ */ _(() => /* @__PURE__ */ r("a", {
6
+ const _ = (o) => (c("data-v-a60a547f"), o = o(), u(), o), x = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, y = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, k = /* @__PURE__ */ _(() => /* @__PURE__ */ r("a", {
7
7
  class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
8
8
  href: "https://scalar.com/",
9
9
  target: "_blank"
10
- }, " Powered by Scalar.com ", -1)), V = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, C = /* @__PURE__ */ m({
10
+ }, " Powered by Scalar.com ", -1)), V = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, C = /* @__PURE__ */ m({
11
11
  __name: "RequestSubpageHeader",
12
12
  props: {
13
13
  modelValue: { type: Boolean },
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBody.vue"],"names":[],"mappings":";WA8GS,MAAM;UACP,OAAO;aACJ;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;WAFtD,MAAM;UACP,OAAO;aACJ;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;AAwL/D,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":"ResponseBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBody.vue"],"names":[],"mappings":";WAyHS,MAAM;UACP,OAAO;aACJ;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;WAFtD,MAAM;UACP,OAAO;aACJ;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;AAiM/D,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,85 +1,93 @@
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";
1
+ import { defineComponent as L, ref as U, computed as n, openBlock as s, createBlock as i, createSlots as V, withCtx as m, createTextVNode as w, toDisplayString as g, createElementBlock as j, createElementVNode as h, createCommentVNode as c, createVNode as C } from "vue";
2
2
  import O from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import T from "whatwg-mimetype";
4
- import C from "./ResponseBodyDownload.vue.js";
5
- import N from "./ResponseBodyInfo.vue.js";
6
- import S from "./ResponseBodyPreview.vue.js";
7
- import P from "./ResponseBodyRaw.vue.js";
8
- import $ from "./ResponseBodyToggle.vue.js";
9
- import { mediaTypes as E } from "../consts/mediaTypes.js";
10
- const D = {
3
+ import { extractFilename as T } from "../../../libs/extractAttachmentFilename.js";
4
+ import N from "whatwg-mimetype";
5
+ import S from "./ResponseBodyDownload.vue.js";
6
+ import P from "./ResponseBodyInfo.vue.js";
7
+ import $ from "./ResponseBodyPreview.vue.js";
8
+ import E from "./ResponseBodyRaw.vue.js";
9
+ import F from "./ResponseBodyToggle.vue.js";
10
+ import { mediaTypes as D } from "../consts/mediaTypes.js";
11
+ const I = {
11
12
  key: 0,
12
13
  class: "mx-1 border-1/2 flex flex-col rounded bg-b-1"
13
- }, I = { class: "flex justify-between items-center border-b-1/2 px-3 py-1.5" }, J = { class: "text-xxs leading-3 font-code" }, W = /* @__PURE__ */ x({
14
+ }, J = { class: "flex justify-between items-center border-b-1/2 px-3 py-1.5" }, M = { class: "text-xxs leading-3 font-code" }, Z = /* @__PURE__ */ L({
14
15
  __name: "ResponseBody",
15
16
  props: {
16
17
  title: {},
17
18
  data: {},
18
19
  headers: {}
19
20
  },
20
- setup(h) {
21
- const a = h, _ = (e) => e instanceof Blob, c = U(!0), m = n(
21
+ setup(b) {
22
+ const t = b, _ = (e) => e instanceof Blob, d = U(!0), p = n(
22
23
  () => {
23
24
  var e;
24
- return !!((e = t.value) != null && e.raw && t.value.preview);
25
+ return !!((e = a.value) != null && e.raw && a.value.preview);
25
26
  }
26
- ), B = n(() => c.value || !m.value), R = n(() => !c.value || !m.value), o = n(() => {
27
- var s;
28
- const e = ((s = a.headers.find((d) => d.name.toLowerCase() === "content-type")) == null ? void 0 : s.value) ?? "";
29
- return new T(e);
30
- }), t = n(() => E[o.value.essence]), l = n(() => _(a.data) ? URL.createObjectURL(a.data) : typeof a.data == "string" ? URL.createObjectURL(
31
- new Blob([a.data], { type: o.value.toString() })
32
- ) : a.data instanceof Object && Object.keys(a.data).length ? URL.createObjectURL(
33
- new Blob([JSON.stringify(a.data)], {
34
- type: o.value.toString()
27
+ ), B = n(() => d.value || !p.value), R = n(() => !d.value || !p.value), r = n(() => {
28
+ var o;
29
+ const e = ((o = t.headers.find((l) => l.name.toLowerCase() === "content-type")) == null ? void 0 : o.value) ?? "";
30
+ return new N(e);
31
+ }), k = n(() => {
32
+ var o;
33
+ const e = ((o = t.headers.find(
34
+ (l) => l.name.toLowerCase() === "content-disposition"
35
+ )) == null ? void 0 : o.value) ?? "";
36
+ return T(e);
37
+ }), a = n(() => D[r.value.essence]), u = n(() => _(t.data) ? URL.createObjectURL(t.data) : typeof t.data == "string" ? URL.createObjectURL(
38
+ new Blob([t.data], { type: r.value.toString() })
39
+ ) : t.data instanceof Object && Object.keys(t.data).length ? URL.createObjectURL(
40
+ new Blob([JSON.stringify(t.data)], {
41
+ type: r.value.toString()
35
42
  })
36
43
  ) : "");
37
- return (e, s) => (r(), u(O, null, L({
38
- title: p(() => [
44
+ return (e, o) => (s(), i(O, null, V({
45
+ title: m(() => [
39
46
  w(g(e.title), 1)
40
47
  ]),
41
- default: p(() => {
42
- var d, v, f, y;
48
+ default: m(() => {
49
+ var l, v, f, y;
43
50
  return [
44
- e.data ? (r(), V("div", D, [
45
- b("div", I, [
46
- b("span", J, g(o.value.essence), 1),
47
- m.value ? (r(), u($, {
51
+ e.data ? (s(), j("div", I, [
52
+ h("div", J, [
53
+ h("span", M, g(r.value.essence), 1),
54
+ p.value ? (s(), i(F, {
48
55
  key: 0,
49
- modelValue: c.value,
50
- "onUpdate:modelValue": s[0] || (s[0] = (k) => c.value = k)
51
- }, null, 8, ["modelValue"])) : i("", !0)
56
+ modelValue: d.value,
57
+ "onUpdate:modelValue": o[0] || (o[0] = (x) => d.value = x)
58
+ }, null, 8, ["modelValue"])) : c("", !0)
52
59
  ]),
53
- (d = t.value) != null && d.raw && R.value ? (r(), u(P, {
54
- key: l.value,
60
+ (l = a.value) != null && l.raw && R.value ? (s(), i(E, {
61
+ key: u.value,
55
62
  content: e.data,
56
- language: t.value.language
57
- }, null, 8, ["content", "language"])) : i("", !0),
58
- (v = t.value) != null && v.preview && B.value ? (r(), u(S, {
59
- key: l.value,
60
- alpha: t.value.alpha,
61
- mode: t.value.preview,
62
- src: l.value,
63
- type: o.value.essence
64
- }, null, 8, ["alpha", "mode", "src", "type"])) : i("", !0),
65
- !((f = t.value) != null && f.raw) && !((y = t.value) != null && y.preview) ? (r(), u(N, { key: 2 }, {
66
- default: p(() => [
63
+ language: a.value.language
64
+ }, null, 8, ["content", "language"])) : c("", !0),
65
+ (v = a.value) != null && v.preview && B.value ? (s(), i($, {
66
+ key: u.value,
67
+ alpha: a.value.alpha,
68
+ mode: a.value.preview,
69
+ src: u.value,
70
+ type: r.value.essence
71
+ }, null, 8, ["alpha", "mode", "src", "type"])) : c("", !0),
72
+ !((f = a.value) != null && f.raw) && !((y = a.value) != null && y.preview) ? (s(), i(P, { key: 2 }, {
73
+ default: m(() => [
67
74
  w(" Binary file ")
68
75
  ]),
69
76
  _: 1
70
- })) : i("", !0)
71
- ])) : i("", !0)
77
+ })) : c("", !0)
78
+ ])) : c("", !0)
72
79
  ];
73
80
  }),
74
81
  _: 2
75
82
  }, [
76
- e.data && l.value ? {
83
+ e.data && u.value ? {
77
84
  name: "actions",
78
- fn: p(() => [
79
- j(C, {
80
- href: l.value,
81
- type: o.value.essence
82
- }, null, 8, ["href", "type"])
85
+ fn: m(() => [
86
+ C(S, {
87
+ filename: k.value,
88
+ href: u.value,
89
+ type: r.value.essence
90
+ }, null, 8, ["filename", "href", "type"])
83
91
  ]),
84
92
  key: "0"
85
93
  } : void 0
@@ -87,5 +95,5 @@ const D = {
87
95
  }
88
96
  });
89
97
  export {
90
- W as default
98
+ Z as default
91
99
  };
@@ -1,9 +1,11 @@
1
1
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
2
  href: string;
3
3
  type?: string;
4
+ filename?: string;
4
5
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
5
6
  href: string;
6
7
  type?: string;
8
+ filename?: string;
7
9
  }>>>, {}, {}>;
8
10
  export default _default;
9
11
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseBodyDownload.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyDownload.vue"],"names":[],"mappings":";UAmCQ,MAAM;WACL,MAAM;;UADP,MAAM;WACL,MAAM;;AAqEf,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":"ResponseBodyDownload.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyDownload.vue"],"names":[],"mappings":";UAqCQ,MAAM;WACL,MAAM;eACF,MAAM;;UAFX,MAAM;WACL,MAAM;eACF,MAAM;;AAsEnB,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,27 +1,27 @@
1
- import { defineComponent as s, computed as p, openBlock as d, createElementBlock as a, withModifiers as i, createVNode as l, unref as c, createElementVNode as m } from "vue";
1
+ import { defineComponent as s, computed as a, openBlock as i, createElementBlock as l, withModifiers as p, createVNode as d, unref as c, createElementVNode as m } from "vue";
2
2
  import { ScalarIcon as f } from "@scalar/components";
3
3
  import { mediaTypes as u } from "../consts/mediaTypes.js";
4
4
  const x = ["download", "href"], h = /* @__PURE__ */ m("span", null, "Download", -1), k = /* @__PURE__ */ s({
5
5
  __name: "ResponseBodyDownload",
6
6
  props: {
7
7
  href: {},
8
- type: {}
8
+ type: {},
9
+ filename: {}
9
10
  },
10
- setup(n) {
11
- const t = n, r = p(
12
- () => {
13
- var e;
14
- return ((e = u[t.type ?? ""]) == null ? void 0 : e.extension) ?? ".unknown";
15
- }
16
- );
17
- return (e, o) => (d(), a("a", {
11
+ setup(t) {
12
+ const o = t, r = a(() => {
13
+ var e;
14
+ const n = ((e = u[o.type ?? ""]) == null ? void 0 : e.extension) ?? ".unknown";
15
+ return o.filename ? o.filename : `response${n}`;
16
+ });
17
+ return (n, e) => (i(), l("a", {
18
18
  class: "flex gap-1 text-c-3 text-xxs no-underline items-center hover:bg-b-3 rounded py-0.5 px-1.5",
19
- download: `response${r.value}`,
20
- href: e.href,
21
- onClick: o[0] || (o[0] = i(() => {
19
+ download: `${r.value}`,
20
+ href: n.href,
21
+ onClick: e[0] || (e[0] = p(() => {
22
22
  }, ["stop"]))
23
23
  }, [
24
- l(c(f), {
24
+ d(c(f), {
25
25
  icon: "Download",
26
26
  size: "xs"
27
27
  }),
@@ -21,7 +21,7 @@ const f = (o) => (g("data-v-43fc1968"), o = o(), b(), o), V = { class: "relative
21
21
  q.emit({ commandName: "Create Request" });
22
22
  }, i = (l) => {
23
23
  l.openCommandPaletteRequest && r();
24
- }, x = "2.1.16";
24
+ }, x = "2.1.18";
25
25
  return k(() => d.on(i)), R(() => d.off(i)), (l, m) => (a(), c("div", V, [
26
26
  e("div", w, [
27
27
  t(h).isReadOnly ? p("", !0) : (a(), c("div", E, [
@@ -168,9 +168,9 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
168
168
  o("div", J, [
169
169
  o("h2", K, z(e(f).name), 1),
170
170
  t(e(i), {
171
- class: "size-2.5",
171
+ class: "size-3",
172
172
  icon: "ChevronDown",
173
- thickness: "3.5"
173
+ thickness: "3"
174
174
  })
175
175
  ])
176
176
  ]),
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.1.16",
21
+ "version": "2.1.18",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -57,6 +57,10 @@
57
57
  "import": "./dist/libs/event-busses/index.js",
58
58
  "types": "./dist/libs/event-busses/index.d.ts"
59
59
  },
60
+ "./layouts/Web": {
61
+ "import": "./dist/layouts/Web/index.js",
62
+ "types": "./dist/layouts/Web/index.d.ts"
63
+ },
60
64
  "./layouts/Modal": {
61
65
  "import": "./dist/layouts/Modal/index.js",
62
66
  "types": "./dist/layouts/Modal/index.d.ts"
@@ -131,15 +135,15 @@
131
135
  "yaml": "^2.4.5",
132
136
  "zod": "^3.23.8",
133
137
  "@scalar/components": "0.12.50",
134
- "@scalar/icons": "0.1.0",
135
138
  "@scalar/draggable": "0.1.5",
136
- "@scalar/oas-utils": "0.2.52",
137
- "@scalar/object-utils": "1.1.9",
139
+ "@scalar/oas-utils": "0.2.53",
140
+ "@scalar/icons": "0.1.0",
138
141
  "@scalar/openapi-parser": "0.8.5",
142
+ "@scalar/object-utils": "1.1.9",
139
143
  "@scalar/openapi-types": "0.1.1",
140
- "@scalar/themes": "0.9.34",
141
- "@scalar/types": "0.0.13",
144
+ "@scalar/themes": "0.9.35",
142
145
  "@scalar/use-codemirror": "0.11.17",
146
+ "@scalar/types": "0.0.13",
143
147
  "@scalar/use-toasts": "0.7.6",
144
148
  "@scalar/use-tooltip": "1.0.2"
145
149
  },
@@ -1,8 +0,0 @@
1
- /**
2
- * Get the Swagger/OpenAPI version and format from the given string
3
- */
4
- export declare function getOpenApiDocumentVersion(input: string | null): false | {
5
- version: string;
6
- type: string;
7
- };
8
- //# sourceMappingURL=getOpenApiDocumentVersion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getOpenApiDocumentVersion.d.ts","sourceRoot":"","sources":["../../src/libs/getOpenApiDocumentVersion.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;;;EAsC7D"}
@@ -1,20 +0,0 @@
1
- import { json as n, yaml as o } from "@scalar/oas-utils/helpers";
2
- import { isDocument as t } from "./isDocument.js";
3
- function i(r) {
4
- if (!t(r))
5
- return !1;
6
- try {
7
- const e = n.parse(r ?? "");
8
- return typeof (e == null ? void 0 : e.openapi) == "string" ? { version: `OpenAPI ${e.openapi}`, type: "json" } : typeof (e == null ? void 0 : e.swagger) == "string" ? { version: `Swagger ${e.swagger}`, type: "json" } : !1;
9
- } catch {
10
- }
11
- try {
12
- const e = o.parse(r ?? "");
13
- return typeof (e == null ? void 0 : e.openapi) == "string" ? { version: `OpenAPI ${e.openapi}`, type: "yaml" } : typeof (e == null ? void 0 : e.swagger) == "string" ? { version: `Swagger ${e.swagger}`, type: "yaml" } : !1;
14
- } catch {
15
- }
16
- return !1;
17
- }
18
- export {
19
- i as getOpenApiDocumentVersion
20
- };
@@ -1,3 +0,0 @@
1
- /** Checks whether the given string could be an OpenAPI document */
2
- export declare function isDocument(input: string | null): boolean | "" | null;
3
- //# sourceMappingURL=isDocument.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isDocument.d.ts","sourceRoot":"","sources":["../../src/libs/isDocument.ts"],"names":[],"mappings":"AAEA,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,uBAE9C"}
@@ -1,7 +0,0 @@
1
- import { isUrl as o } from "./isUrl.js";
2
- function e(r) {
3
- return r && !o(r);
4
- }
5
- export {
6
- e as isDocument
7
- };