@scalar/api-client 2.0.21 → 2.0.24

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 (62) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +14 -17
  3. package/dist/Modal/api-client-modal.js +6 -6
  4. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  5. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  6. package/dist/components/AddressBar/AddressBar.vue2.js +2 -2
  7. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  8. package/dist/components/AddressBar/AddressBarHistory.vue.js +11 -10
  9. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  10. package/dist/components/AddressBar/AddressBarServer.vue.js +36 -29
  11. package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/CommandPalette.vue.js +1 -1
  13. package/dist/components/CommandPalette/CommandPalette.vue2.js +18 -17
  14. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +7 -6
  15. package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
  16. package/dist/components/DataTable/DataTableCheckbox.vue.js +3 -2
  17. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  18. package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -14
  19. package/dist/components/Search/SearchButton.vue.d.ts.map +1 -1
  20. package/dist/components/Search/SearchButton.vue.js +7 -6
  21. package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
  22. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  23. package/dist/components/SideNav/SideNavLink.vue.js +17 -15
  24. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  25. package/dist/components/Sidebar/SidebarListElementActions.vue.js +2 -2
  26. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  27. package/dist/components/TopNav/TopNav.vue.js +2 -2
  28. package/dist/components/TopNav/TopNav.vue2.js +0 -1
  29. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  30. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  31. package/dist/components/TopNav/TopNavItem.vue2.js +9 -10
  32. package/dist/libs/sendRequest.d.ts.map +1 -1
  33. package/dist/libs/sendRequest.js +36 -35
  34. package/dist/router.d.ts +20 -3
  35. package/dist/router.d.ts.map +1 -1
  36. package/dist/router.js +100 -68
  37. package/dist/store/workspace.d.ts +32 -32
  38. package/dist/store/workspace.d.ts.map +1 -1
  39. package/dist/store/workspace.js +49 -53
  40. package/dist/style.css +1 -1
  41. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  42. package/dist/views/Request/Request.vue.js +1 -1
  43. package/dist/views/Request/Request.vue2.js +3 -3
  44. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  45. package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -4
  46. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  47. package/dist/views/Request/RequestSection/RequestSection.vue.js +4 -4
  48. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  49. package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -4
  50. package/dist/views/Request/RequestSection/RequestTable.vue2.js +4 -3
  51. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  52. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  53. package/dist/views/Request/RequestSidebarItem.vue2.js +68 -60
  54. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  55. package/dist/views/Request/RequestSidebarItemMenu.vue.js +19 -19
  56. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  57. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -5
  58. package/package.json +5 -5
  59. package/dist/views/Collection/Collection.vue.js +0 -4
  60. package/dist/views/Collection/Collection.vue2.js +0 -136
  61. package/dist/views/Components/Schemas/Schemas.vue.js +0 -4
  62. package/dist/views/Components/Schemas/Schemas.vue2.js +0 -20
@@ -8,28 +8,28 @@ const U = { class: "w-full" }, W = { class: "flex items-center justify-center h-
8
8
  },
9
9
  emits: ["update:modelValue"],
10
10
  setup(_, { emit: g }) {
11
- const v = _, x = g, C = z(() => v.value ?? []), n = i(v.modelValue.toString()), s = i(!1), a = i(""), h = i(null);
11
+ const v = _, x = g, C = z(() => v.value ?? []), u = i(v.modelValue.toString()), s = i(!1), a = i(""), h = i(null);
12
12
  k(a, (e) => {
13
13
  x("update:modelValue", e);
14
14
  });
15
15
  const w = (e) => {
16
- n.value = e, x("update:modelValue", e), s.value = !1;
16
+ u.value = e, x("update:modelValue", e), s.value = !1;
17
17
  }, S = () => {
18
18
  a.value.trim() && (w(a.value), a.value = "");
19
19
  }, D = () => {
20
- a.value.trim() || (n.value = "", s.value = !1);
21
- }, b = (e) => n.value === e;
20
+ a.value.trim() || (u.value = "", s.value = !1);
21
+ }, b = (e) => u.value === e;
22
22
  return k(s, (e) => {
23
23
  e && N(() => {
24
- var u;
25
- (u = h.value) == null || u.focus();
24
+ var n;
25
+ (n = h.value) == null || n.focus();
26
26
  });
27
- }), (e, u) => (o(), p("div", U, [
27
+ }), (e, n) => (o(), p("div", U, [
28
28
  s.value ? T((o(), p("input", {
29
29
  key: 0,
30
30
  ref_key: "inputRef",
31
31
  ref: h,
32
- "onUpdate:modelValue": u[0] || (u[0] = (t) => a.value = t),
32
+ "onUpdate:modelValue": n[0] || (n[0] = (t) => a.value = t),
33
33
  class: "border-none focus:text-c-1 text-c-2 min-w-0 w-full px-2 py-1.5 outline-none",
34
34
  placeholder: "Value",
35
35
  type: "text",
@@ -40,7 +40,7 @@ const U = { class: "w-full" }, W = { class: "flex items-center justify-center h-
40
40
  ]) : (o(), m(l(F), {
41
41
  key: 1,
42
42
  resize: "",
43
- value: n.value
43
+ value: u.value
44
44
  }, {
45
45
  items: r(() => [
46
46
  (o(!0), p(A, null, E(C.value, (t) => (o(), m(l(V), {
@@ -57,8 +57,9 @@ const U = { class: "w-full" }, W = { class: "flex items-center justify-center h-
57
57
  ])
58
58
  }, [
59
59
  c(l(f), {
60
- class: "size-2.5 stroke-[1.75]",
61
- icon: "Checkmark"
60
+ class: "size-2.5",
61
+ icon: "Checkmark",
62
+ thickness: "3.5"
62
63
  })
63
64
  ], 2),
64
65
  R(" " + y(t), 1)
@@ -68,7 +69,7 @@ const U = { class: "w-full" }, W = { class: "flex items-center justify-center h-
68
69
  c(l(L)),
69
70
  c(l(V), {
70
71
  class: "flex items-center gap-1.5",
71
- onClick: u[1] || (u[1] = (t) => s.value = !0)
72
+ onClick: n[1] || (n[1] = (t) => s.value = !0)
72
73
  }, {
73
74
  default: r(() => [
74
75
  d("div", W, [
@@ -89,8 +90,8 @@ const U = { class: "w-full" }, W = { class: "flex items-center justify-center h-
89
90
  variant: "ghost"
90
91
  }, {
91
92
  default: r(() => [
92
- d("span", null, y(n.value || "Select a value"), 1),
93
- n.value ? $("", !0) : (o(), m(l(f), {
93
+ d("span", null, y(u.value || "Select a value"), 1),
94
+ u.value ? $("", !0) : (o(), m(l(f), {
94
95
  key: 0,
95
96
  icon: "ChevronDown",
96
97
  size: "xs"
@@ -1 +1 @@
1
- {"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchButton.vue"],"names":[],"mappings":";;;;;AAiIA,wBAMG"}
1
+ {"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchButton.vue"],"names":[],"mappings":";;;;;AAkIA,wBAMG"}
@@ -1,11 +1,11 @@
1
- import { defineComponent as c, openBlock as r, createElementBlock as i, createElementVNode as e, createVNode as o, unref as a } from "vue";
1
+ import { defineComponent as c, openBlock as r, createElementBlock as i, createElementVNode as e, createVNode as s, unref as a } from "vue";
2
2
  import l from "../ScalarHotkey.vue.js";
3
3
  import { ScalarIcon as m } from "@scalar/components";
4
4
  const d = { class: "bg-b-1 sticky top-0 z-50 px-3 py-2.5 pb-0" }, p = { class: "w-[15px] flex items-center justify-center" }, f = { class: "sidebar-search-input ml-1.5 flex w-full items-center justify-between text-sm font-medium" }, _ = /* @__PURE__ */ e("span", { class: "sidebar-search-placeholder" }, "Search", -1), S = /* @__PURE__ */ c({
5
5
  __name: "SearchButton",
6
6
  emits: ["openSearchModal"],
7
- setup(u, { emit: s }) {
8
- const n = s;
7
+ setup(u, { emit: o }) {
8
+ const n = o;
9
9
  return (h, t) => (r(), i("div", d, [
10
10
  e("button", {
11
11
  class: "shadow-border text-c-2 flex w-full items-center rounded p-1.5",
@@ -13,14 +13,15 @@ const d = { class: "bg-b-1 sticky top-0 z-50 px-3 py-2.5 pb-0" }, p = { class: "
13
13
  onClick: t[0] || (t[0] = (x) => n("openSearchModal"))
14
14
  }, [
15
15
  e("div", p, [
16
- o(a(m), {
16
+ s(a(m), {
17
17
  icon: "Search",
18
- size: "xs"
18
+ size: "xs",
19
+ thickness: "2.5"
19
20
  })
20
21
  ]),
21
22
  e("div", f, [
22
23
  _,
23
- o(l, { hotkey: "k" })
24
+ s(l, { hotkey: "k" })
24
25
  ])
25
26
  ])
26
27
  ]));
@@ -1 +1 @@
1
- {"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchModal.vue"],"names":[],"mappings":"AAgPA,OAAO,EACL,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAA;;gBASb,UAAU;;gBAAV,UAAU;;AAsVxB,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":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchModal.vue"],"names":[],"mappings":"AAgPA,OAAO,EACL,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAA;;gBASb,UAAU;;gBAAV,UAAU;;AA8VxB,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 +1 @@
1
- {"version":3,"file":"SideNavLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavLink.vue"],"names":[],"mappings":"AAyBA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAI/C,KAAK,SAAS,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAA;AAa1D,iBAAS,cAAc;qBAwDO,GAAG;EAehC;AACD,QAAA,MAAM,eAAe;UAlFb,SAAS,CAAC,MAAM,CAAC;UACjB,MAAM;aACH,OAAO;;UAFV,SAAS,CAAC,MAAM,CAAC;UACjB,MAAM;aACH,OAAO;aAsFhB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,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":"SideNavLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavLink.vue"],"names":[],"mappings":"AA6BA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAI/C,KAAK,SAAS,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAA;AAe1D,iBAAS,cAAc;qBAuDO,GAAG;EAgBhC;AACD,QAAA,MAAM,eAAe;UApFb,SAAS,CAAC,MAAM,CAAC;UACjB,MAAM;aACH,OAAO;;UAFV,SAAS,CAAC,MAAM,CAAC;UACjB,MAAM;aACH,OAAO;aAwFhB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,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,29 @@
1
- import { defineComponent as t, resolveComponent as n, openBlock as r, createBlock as a, normalizeClass as s, withCtx as c, createVNode as l, unref as i, createElementVNode as p, renderSlot as u } from "vue";
2
- import { ScalarIcon as m } from "@scalar/components";
3
- const d = { class: "sr-only" }, k = /* @__PURE__ */ t({
1
+ import { defineComponent as r, resolveComponent as s, openBlock as a, createBlock as c, normalizeClass as i, unref as o, withCtx as l, createVNode as p, createElementVNode as u, renderSlot as m } from "vue";
2
+ import { useWorkspace as d } from "../../store/workspace.js";
3
+ import { ScalarIcon as f } from "@scalar/components";
4
+ const k = { class: "sr-only" }, x = /* @__PURE__ */ r({
4
5
  __name: "SideNavLink",
5
6
  props: {
6
7
  icon: {},
7
8
  path: {},
8
9
  active: { type: Boolean }
9
10
  },
10
- setup(f) {
11
+ setup(v) {
12
+ const { activeWorkspace: t } = d();
11
13
  return (e, _) => {
12
- const o = n("router-link");
13
- return r(), a(o, {
14
+ const n = s("router-link");
15
+ return a(), c(n, {
14
16
  activeClass: "active-link",
15
- class: s(["w-[37px] hover:bg-b-2 active:text-c-1 flex items-center justify-center rounded-lg p-[7px]", { "bg-b-2 transition-none hover:cursor-auto text-c-1": e.active }]),
16
- to: e.path
17
+ class: i(["w-[37px] hover:bg-b-2 active:text-c-1 flex items-center justify-center rounded-lg p-[7px]", { "bg-b-2 transition-none hover:cursor-auto text-c-1": e.active }]),
18
+ to: `/workspace/${o(t).uid}${e.path}`
17
19
  }, {
18
- default: c(() => [
19
- l(i(m), {
20
- class: "stroke-[1.5]",
21
- icon: e.icon
20
+ default: l(() => [
21
+ p(o(f), {
22
+ icon: e.icon,
23
+ thickness: "1.5"
22
24
  }, null, 8, ["icon"]),
23
- p("span", d, [
24
- u(e.$slots, "default")
25
+ u("span", k, [
26
+ m(e.$slots, "default")
25
27
  ])
26
28
  ]),
27
29
  _: 3
@@ -30,5 +32,5 @@ const d = { class: "sr-only" }, k = /* @__PURE__ */ t({
30
32
  }
31
33
  });
32
34
  export {
33
- k as default
35
+ x as default
34
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";cAmFY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;cAJS;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;AA4LH,wBAOG;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":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";cAmFY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;cAJS;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;;;;AA0LH,wBAOG;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"}
@@ -27,7 +27,7 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
27
27
  onClick: o[0] || (o[0] = (s) => a(C)(e.variable.name))
28
28
  }, [
29
29
  r(a(d), {
30
- class: "h-3 w-3 stroke-[1.5]",
30
+ class: "h-3 w-3",
31
31
  icon: "Clipboard"
32
32
  })
33
33
  ]),
@@ -41,7 +41,7 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
41
41
  ), ["prevent"]))
42
42
  }, [
43
43
  r(a(d), {
44
- class: "h-3.5 w-3.5 stroke-[1.5]",
44
+ class: "h-3.5 w-3.5",
45
45
  icon: "Close"
46
46
  })
47
47
  ]))
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";AA+NA,wBAKG"}
1
+ {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";AA6NA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./TopNav.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-d4581e27"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-24eea304"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -19,7 +19,6 @@ const h = { class: "flex h-10 t-app__top-nav" }, C = { class: "flex h-10 flex-1
19
19
  c("div", C, [
20
20
  e(o).length === 1 ? (l(), a("div", B, [
21
21
  i(e(m), {
22
- class: "stroke-[2]",
23
22
  icon: e(o)[0].icon,
24
23
  size: "xs"
25
24
  }, null, 8, ["icon"]),
@@ -1 +1 @@
1
- {"version":3,"file":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AA6HA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;;aAM3B,MAAM;YACP,OAAO;;;;;aADN,MAAM;YACP,OAAO;;;;;AAsJnB,wBAOG;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":"TopNavItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNavItem.vue"],"names":[],"mappings":"AA4HA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;;aAM3B,MAAM;YACP,OAAO;;;;;aADN,MAAM;YACP,OAAO;;;;;AAoJnB,wBAOG;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 "./TopNavItem.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-a1e15ecf"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7c0ee464"]]);
5
5
  export {
6
- p as default
6
+ r as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as m, openBlock as n, createBlock as i, unref as s, withCtx as l, createElementVNode as o, normalizeClass as p, createVNode as a, toDisplayString as k, createCommentVNode as f } from "vue";
1
+ import { defineComponent as m, openBlock as i, createBlock as s, unref as n, withCtx as l, createElementVNode as o, normalizeClass as p, createVNode as a, toDisplayString as f, createCommentVNode as k } from "vue";
2
2
  import v from "../ScalarHotkey.vue.js";
3
3
  import { ScalarTooltip as y, ScalarIcon as c } from "@scalar/components";
4
4
  const d = { class: "nav-item-icon-copy flex flex-1 items-center justify-center gap-1.5" }, u = { class: "nav-item-copy text-xs" }, b = /* @__PURE__ */ m({
@@ -11,7 +11,7 @@ const d = { class: "nav-item-icon-copy flex flex-1 items-center justify-center g
11
11
  },
12
12
  emits: ["click", "close"],
13
13
  setup(C) {
14
- return (e, t) => (n(), i(s(y), {
14
+ return (e, t) => (i(), s(n(y), {
15
15
  class: "scalar-client",
16
16
  delay: 500,
17
17
  resize: "",
@@ -23,30 +23,29 @@ const d = { class: "nav-item-icon-copy flex flex-1 items-center justify-center g
23
23
  onClick: t[1] || (t[1] = (r) => e.$emit("click"))
24
24
  }, [
25
25
  o("div", d, [
26
- a(s(c), {
27
- class: "stroke-[2]",
26
+ a(n(c), {
28
27
  icon: e.icon,
29
28
  size: "xs"
30
29
  }, null, 8, ["icon"]),
31
- o("span", u, k(e.label), 1)
30
+ o("span", u, f(e.label), 1)
32
31
  ]),
33
32
  o("button", {
34
33
  class: "nav-item-close",
35
34
  type: "button",
36
35
  onClick: t[0] || (t[0] = (r) => e.$emit("close"))
37
36
  }, [
38
- a(s(c), {
39
- class: "stroke-[1.75]",
40
- icon: "Close"
37
+ a(n(c), {
38
+ icon: "Close",
39
+ thickness: "1.75"
41
40
  })
42
41
  ])
43
42
  ], 2)
44
43
  ]),
45
44
  content: l(() => [
46
- e.hotkey ? (n(), i(v, {
45
+ e.hotkey ? (i(), s(v, {
47
46
  key: 0,
48
47
  hotkey: e.hotkey
49
- }, null, 8, ["hotkey"])) : f("", !0)
48
+ }, null, 8, ["hotkey"])) : k("", !0)
50
49
  ]),
51
50
  _: 1
52
51
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"sendRequest.d.ts","sourceRoot":"","sources":["../../src/libs/sendRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACrB,MAAM,+CAA+C,CAAA;AACtD,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EAEd,gBAAgB,EACjB,MAAM,2CAA2C,CAAA;AAkBlD;;;GAGG;AACH,eAAO,MAAM,WAAW,YACb,OAAO,WACP,cAAc,UACf,MAAM,mBACG;IACf,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAA;CACpC,aACU,MAAM,KAChB,OAAO,CAAC;IACT,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAC5B,CA0LA,CAAA"}
1
+ {"version":3,"file":"sendRequest.d.ts","sourceRoot":"","sources":["../../src/libs/sendRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACrB,MAAM,+CAA+C,CAAA;AACtD,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EAEd,gBAAgB,EACjB,MAAM,2CAA2C,CAAA;AAkBlD;;;GAGG;AACH,eAAO,MAAM,WAAW,YACb,OAAO,WACP,cAAc,UACf,MAAM,mBACG;IACf,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAA;CACpC,aACU,MAAM,KAChB,OAAO,CAAC;IACT,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAC5B,CA2LA,CAAA"}
@@ -1,23 +1,23 @@
1
1
  import { redirectToProxy as A, shouldUseProxy as C } from "@scalar/oas-utils/helpers";
2
2
  import E from "axios";
3
3
  import R from "js-cookie";
4
- const c = (d = []) => d.reduce(
4
+ const u = (c = []) => c.reduce(
5
5
  (o, i) => (i.key && (o[i.key] = i.value), o),
6
6
  {}
7
- ), g = async (d, o, i, s, y) => {
8
- var w;
9
- let n = i;
7
+ ), g = async (c, o, i, s, y) => {
8
+ var k;
9
+ let a = i;
10
10
  o.parameters.path.forEach((e) => {
11
- !e.key || !e.value || (n = n.replace(`{${e.key}}`, e.value));
11
+ !e.key || !e.value || (a = a.replace(`{${e.key}}`, e.value));
12
12
  });
13
- const r = c(
13
+ const r = u(
14
14
  o.parameters.headers.filter(({ enabled: e }) => e)
15
15
  );
16
- let u = null;
16
+ let d = null;
17
17
  if (o.body.activeBody === "binary" && o.body.binary)
18
- r["Content-Type"] = o.body.binary.type, r["Content-Disposition"] = `attachment; filename="${o.body.binary.name}"`, u = o.body.binary;
19
- else if (o.body.activeBody === "raw")
20
- u = o.body.raw.value;
18
+ r["Content-Type"] = o.body.binary.type, r["Content-Disposition"] = `attachment; filename="${o.body.binary.name}"`, d = o.body.binary;
19
+ else if (o.body.activeBody === "raw" && o.body.raw.value)
20
+ d = o.body.raw.value;
21
21
  else if (o.body.activeBody === "formData") {
22
22
  r["Content-Type"] = "multipart/form-data";
23
23
  const e = new FormData();
@@ -25,23 +25,23 @@ const c = (d = []) => d.reduce(
25
25
  (t) => {
26
26
  t.key && t.value ? e.append(t.key, t.value) : t.file && e.append(t.file.name, t.file);
27
27
  }
28
- ), u = e);
28
+ ), d = e);
29
29
  }
30
- const f = [], [k, p] = n.split("?");
31
- new URLSearchParams(p ?? "").forEach((e, t) => {
30
+ const f = [], [p, D] = a.split("?");
31
+ new URLSearchParams(D ?? "").forEach((e, t) => {
32
32
  f.push({
33
33
  key: t,
34
34
  value: e,
35
35
  enabled: !0
36
36
  });
37
37
  });
38
- const h = {
39
- ...c(
38
+ const b = {
39
+ ...u(
40
40
  o.parameters.query.filter(({ enabled: e }) => e).filter(({ value: e }) => e !== "")
41
41
  ),
42
- ...c(f)
42
+ ...u(f)
43
43
  }, l = {
44
- ...c(
44
+ ...u(
45
45
  (o.parameters.cookies ?? []).filter(({ enabled: e }) => e)
46
46
  )
47
47
  };
@@ -53,13 +53,13 @@ const c = (d = []) => d.reduce(
53
53
  l[e.name] = e.value;
54
54
  break;
55
55
  case "query":
56
- h[e.name] = e.value;
56
+ b[e.name] = e.value;
57
57
  break;
58
58
  case "header":
59
59
  r[e.name] = e.value;
60
60
  break;
61
61
  }
62
- else e.type === "http" && e.value ? e.scheme === "basic" && e.secondValue ? r.Authorization = `Basic ${btoa(`${e.value}:${e.secondValue}`)}` : r.Authorization = `Bearer ${e.value}` : e.type === "oauth2" && ((w = s.flow) != null && w.token) && (r.Authorization = `Bearer ${s.flow.token}`);
62
+ else e.type === "http" && e.value ? e.scheme === "basic" && e.secondValue ? r.Authorization = `Basic ${btoa(`${e.value}:${e.secondValue}`)}` : r.Authorization = `Bearer ${e.value}` : e.type === "oauth2" && ((k = s.flow) != null && k.token) && (r.Authorization = `Bearer ${s.flow.token}`);
63
63
  }
64
64
  Object.keys(l).forEach((e) => {
65
65
  R.set(e, l[e], {
@@ -69,37 +69,38 @@ const c = (d = []) => d.reduce(
69
69
  secure: !0
70
70
  });
71
71
  });
72
- const b = new URLSearchParams(h).toString();
73
- n = `${k}${b ? "?" + b : ""}`;
74
- const D = {
75
- url: A(y, n),
76
- method: d.method,
77
- headers: r,
78
- data: u
79
- }, v = Date.now();
72
+ const h = new URLSearchParams(b).toString();
73
+ a = `${p}${h ? "?" + h : ""}`;
74
+ const v = {
75
+ url: A(y, a),
76
+ method: c.method,
77
+ headers: r
78
+ };
79
+ d && (v.data = d);
80
+ const w = Date.now();
80
81
  try {
81
- const e = await E(D);
82
- return C(y, n) && [
82
+ const e = await E(v);
83
+ return C(y, a) && [
83
84
  "Access-Control-Allow-Headers",
84
85
  "Access-Control-Allow-Origin",
85
86
  "Access-Control-Allow-Methods",
86
87
  "Access-Control-Expose-Headers"
87
- ].map((a) => a.toLowerCase()).forEach((a) => delete e.headers[a]), {
88
+ ].map((n) => n.toLowerCase()).forEach((n) => delete e.headers[n]), {
88
89
  sentTime: Date.now(),
89
90
  request: o,
90
91
  response: {
91
92
  ...e,
92
- duration: Date.now() - v
93
+ duration: Date.now() - w
93
94
  }
94
95
  };
95
96
  } catch (e) {
96
- const a = e.response;
97
+ const n = e.response;
97
98
  return console.error("ERROR", e), {
98
99
  sentTime: Date.now(),
99
100
  request: o,
100
- response: a ? {
101
- ...a,
102
- duration: Date.now() - v
101
+ response: n ? {
102
+ ...n,
103
+ duration: Date.now() - w
103
104
  } : void 0
104
105
  };
105
106
  }
package/dist/router.d.ts CHANGED
@@ -5,16 +5,32 @@ export declare enum PathId {
5
5
  Collection = "collection",
6
6
  Schema = "schema",
7
7
  Environment = "environment",
8
- Server = "server"
8
+ Server = "server",
9
+ Workspace = "workspace"
9
10
  }
10
11
  /** Routes required by the client modal */
11
12
  export declare const modalRoutes: ({
12
13
  path: string;
13
14
  redirect: string;
14
- component?: undefined;
15
+ children?: undefined;
15
16
  } | {
16
17
  path: string;
17
- component: () => Promise<typeof import("./views/Request/Request.vue.js")>;
18
+ children: ({
19
+ path: string;
20
+ redirect: (to: import("vue-router").RouteLocation) => string;
21
+ name?: undefined;
22
+ component?: undefined;
23
+ } | {
24
+ name: PathId;
25
+ path: string;
26
+ component: () => Promise<typeof import("./views/Request/Request.vue.js")>;
27
+ redirect?: undefined;
28
+ } | {
29
+ path: string;
30
+ component: () => Promise<typeof import("./views/Request/Request.vue.js")>;
31
+ redirect?: undefined;
32
+ name?: undefined;
33
+ })[];
18
34
  redirect?: undefined;
19
35
  })[];
20
36
  /**
@@ -31,6 +47,7 @@ export declare const activeRouterParams: import("vue").ComputedRef<{
31
47
  schema: string;
32
48
  cookies: string;
33
49
  server: string;
50
+ workspace: string;
34
51
  }>;
35
52
  /** If we try to navigate to a entity UID that does not exist then we fallback to the default */
36
53
  export declare function fallbackMissingParams(key: PathId, item: Record<string, any> | undefined): void;
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAGA,oBAAY,MAAM;IAChB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;CAClB;AAED,0CAA0C;AAC1C,eAAO,MAAM,WAAW;;;;;;;;IAcvB,CAAA;AAyDD;;GAEG;AACH,eAAO,MAAM,MAAM,6BAGjB,CAAA;AAEF,sCAAsC;AACtC,eAAO,MAAM,WAAW,6BAGtB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;EAyB7B,CAAA;AAEF,gGAAgG;AAChG,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,QAmBtC"}
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAQA,oBAAY,MAAM;IAChB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAuBD,0CAA0C;AAC1C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;IAaI,CAAA;AAwE5B;;GAEG;AACH,eAAO,MAAM,MAAM,6BAGjB,CAAA;AAEF,sCAAsC;AACtC,eAAO,MAAM,WAAW,6BAGtB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;EA0B7B,CAAA;AAEF,gGAAgG;AAChG,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,QAmBtC"}