@scalar/api-client 2.1.46 → 2.1.47

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 (70) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  3. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +32 -26
  4. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
  5. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +14 -9
  6. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  8. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +15 -10
  9. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  10. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +17 -12
  11. package/dist/components/ImportCollection/DropEventListener.vue.d.ts +2 -2
  12. package/dist/components/ImportCollection/DropEventListener.vue.js +6 -6
  13. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
  14. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -21
  15. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +1 -0
  16. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  17. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +87 -74
  18. package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +2 -2
  19. package/dist/components/ImportCollection/PasteEventListener.vue.js +5 -5
  20. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +2 -2
  21. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -1
  22. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +10 -5
  23. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  24. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +43 -33
  25. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +1 -0
  26. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  27. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +31 -21
  28. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  29. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +15 -15
  30. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  31. package/dist/layouts/App/create-api-client-app.js +14 -13
  32. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  33. package/dist/layouts/Web/create-api-client-web.js +11 -10
  34. package/dist/libs/create-client.d.ts.map +1 -1
  35. package/dist/libs/create-client.js +22 -10
  36. package/dist/router.d.ts +4 -41
  37. package/dist/router.d.ts.map +1 -1
  38. package/dist/router.js +18 -149
  39. package/dist/routes.d.ts +150 -0
  40. package/dist/routes.d.ts.map +1 -0
  41. package/dist/routes.js +182 -0
  42. package/dist/store/router-params.js +1 -1
  43. package/dist/store/store.d.ts.map +1 -1
  44. package/dist/store/store.js +90 -90
  45. package/dist/style.css +1 -1
  46. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  47. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +20 -15
  48. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  49. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  50. package/dist/views/Request/RequestSidebarItem.vue2.js +46 -33
  51. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +6 -6
  52. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  53. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
  54. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
  55. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +8 -8
  56. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  57. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  58. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +61 -55
  59. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  60. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
  61. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +95 -64
  62. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  63. package/dist/views/Request/components/WorkspaceDropdown.vue.js +60 -50
  64. package/dist/views/Request/types/sidebar-item.d.ts +2 -1
  65. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  66. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  67. package/dist/views/Servers/Servers.vue2.js +12 -7
  68. package/package.json +8 -8
  69. package/dist/components/SubpageHeader.vue.d.ts +0 -18
  70. package/dist/components/SubpageHeader.vue.d.ts.map +0 -1
@@ -1,76 +1,82 @@
1
- import { defineComponent as _, openBlock as e, createBlock as o, withCtx as t, createTextVNode as s, createElementBlock as m, Fragment as i, renderList as x, createVNode as d, toDisplayString as c } 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 f, renderList as x, toDisplayString as i } from "vue";
2
2
  import h from "../../../components/DataTable/DataTable.vue.js";
3
- import k from "../../../components/DataTable/DataTableRow.vue.js";
3
+ import y from "../../../components/DataTable/DataTableRow.vue.js";
4
4
  import u from "../../../components/DataTable/DataTableText.vue.js";
5
- import y from "../../../components/HelpfulLink.vue.js";
6
- import g from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
- import { httpHeaders as b } from "../../../data/httpHeaders.js";
8
- const C = {
5
+ import k from "../../../components/HelpfulLink.vue.js";
6
+ import b from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
+ import { httpHeaders as g } from "../../../data/httpHeaders.js";
8
+ const w = {
9
+ key: 0,
10
+ class: "border max-h-[calc(100%-32px)] overflow-y-auto rounded md:mx-1"
11
+ }, C = {
9
12
  key: 1,
10
13
  class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
11
- }, D = /* @__PURE__ */ _({
14
+ }, R = /* @__PURE__ */ _({
12
15
  __name: "ResponseHeaders",
13
16
  props: {
14
17
  headers: {}
15
18
  },
16
- setup(w) {
17
- const l = (r) => b.find(
18
- (n) => n.name.toLowerCase() === r.toLowerCase()
19
+ setup(v) {
20
+ const d = (r) => g.find(
21
+ (a) => a.name.toLowerCase() === r.toLowerCase()
19
22
  );
20
- return (r, n) => (e(), o(g, {
23
+ return (r, a) => (e(), n(b, {
24
+ class: "overflow-scroll",
21
25
  defaultOpen: !1,
22
26
  itemCount: r.headers.length
23
27
  }, {
24
- title: t(() => n[0] || (n[0] = [
25
- s("Headers")
28
+ title: t(() => a[0] || (a[0] = [
29
+ l("Headers")
26
30
  ])),
27
31
  default: t(() => [
28
- r.headers.length ? (e(), o(h, {
29
- key: 0,
30
- columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
31
- scroll: ""
32
- }, {
33
- default: t(() => [
34
- (e(!0), m(i, null, x(r.headers, (a, p) => (e(), o(k, {
35
- key: p,
36
- class: "text-c-1"
37
- }, {
38
- default: t(() => [
39
- d(u, { class: "sticky left-0 z-1 bg-b-1 max-w-48" }, {
40
- default: t(() => {
41
- var f;
42
- return [
43
- typeof ((f = l(a.name)) == null ? void 0 : f.url) == "string" ? (e(), o(y, {
44
- key: 0,
45
- class: "decoration-c-3",
46
- href: l(a.name).url
47
- }, {
48
- default: t(() => [
49
- s(c(a.name), 1)
50
- ]),
51
- _: 2
52
- }, 1032, ["href"])) : (e(), m(i, { key: 1 }, [
53
- s(c(a.name), 1)
54
- ], 64))
55
- ];
56
- }),
57
- _: 2
58
- }, 1024),
59
- d(u, {
60
- class: "z-0",
61
- text: a.value
62
- }, null, 8, ["text"])
63
- ]),
64
- _: 2
65
- }, 1024))), 128))
66
- ]),
67
- _: 1
68
- })) : (e(), m("div", C, " No Headers "))
32
+ r.headers.length ? (e(), s("div", w, [
33
+ m(h, {
34
+ class: "!border-0 !mx-0",
35
+ columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
36
+ scroll: ""
37
+ }, {
38
+ default: t(() => [
39
+ (e(!0), s(f, null, x(r.headers, (o, p) => (e(), n(y, {
40
+ key: p,
41
+ class: "text-c-1"
42
+ }, {
43
+ default: t(() => [
44
+ m(u, { class: "sticky left-0 z-1 bg-b-1 max-w-48" }, {
45
+ default: t(() => {
46
+ var c;
47
+ return [
48
+ typeof ((c = d(o.name)) == null ? void 0 : c.url) == "string" ? (e(), n(k, {
49
+ key: 0,
50
+ class: "decoration-c-3",
51
+ href: d(o.name).url
52
+ }, {
53
+ default: t(() => [
54
+ l(i(o.name), 1)
55
+ ]),
56
+ _: 2
57
+ }, 1032, ["href"])) : (e(), s(f, { key: 1 }, [
58
+ l(i(o.name), 1)
59
+ ], 64))
60
+ ];
61
+ }),
62
+ _: 2
63
+ }, 1024),
64
+ m(u, {
65
+ class: "z-0",
66
+ text: o.value
67
+ }, null, 8, ["text"])
68
+ ]),
69
+ _: 2
70
+ }, 1024))), 128))
71
+ ]),
72
+ _: 1
73
+ })
74
+ ])) : (e(), s("div", C, " No Headers "))
69
75
  ]),
70
76
  _: 1
71
77
  }, 8, ["itemCount"]));
72
78
  }
73
79
  });
74
80
  export {
75
- D as default
81
+ R as default
76
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA6JA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AASvE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACvC,CAAC;;AA2OF,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;;AA2RF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseSection.vue2.js";
2
2
  /* empty css */
3
- import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e2a72c10"]]);
3
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ec63eb00"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,101 +1,132 @@
1
- import { defineComponent as x, computed as p, ref as A, openBlock as t, createBlock as r, withCtx as d, createElementVNode as l, normalizeClass as S, createCommentVNode as i, createVNode as f, createElementBlock as v, Fragment as k } from "vue";
2
- import B from "../../../components/ContextBar.vue.js";
3
- import R from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import g from "./ResponseBody.vue.js";
5
- import H from "./ResponseEmpty.vue.js";
6
- import V from "./ResponseLoadingOverlay.vue.js";
7
- import L from "./ResponseMetaInformation.vue.js";
8
- import $ from "./ResponseBodyVirtual.vue.js";
1
+ import { defineComponent as T, 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 S from "../../../components/ContextBar.vue.js";
3
+ import j from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import R from "./ResponseBody.vue.js";
5
+ import b from "./ResponseEmpty.vue.js";
6
+ import H from "./ResponseLoadingOverlay.vue.js";
7
+ import V from "./ResponseMetaInformation.vue.js";
8
+ import w from "./ResponseBodyVirtual.vue.js";
9
9
  /* empty css */
10
- import E from "./ResponseCookies.vue.js";
11
- import I from "./ResponseHeaders.vue.js";
12
- const N = { class: "flex items-center flex-1 h-8" }, O = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, b = 2e5, X = /* @__PURE__ */ x({
10
+ import L from "./ResponseCookies.vue.js";
11
+ import $ from "./ResponseHeaders.vue.js";
12
+ const z = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ */ T({
13
13
  __name: "ResponseSection",
14
14
  props: {
15
15
  response: {}
16
16
  },
17
- setup(y) {
18
- const a = y, c = p(() => {
19
- var o;
20
- const e = (o = a.response) == null ? void 0 : o.headers;
21
- return e ? Object.keys(e).map((s) => ({
22
- name: s,
23
- value: e[s],
17
+ setup(k) {
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],
24
24
  required: !1
25
25
  })).filter(
26
- (s) => ![
26
+ (o) => ![
27
27
  "rest-api-client-content-length",
28
28
  "X-API-Client-Content-Length"
29
- ].includes(s.name)
29
+ ].includes(o.name)
30
30
  ) : [];
31
- }), h = p(
31
+ }), B = m(
32
32
  () => {
33
33
  var e;
34
- return ((e = a.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((o) => {
35
- var m, u;
36
- const s = (u = (m = a.response) == null ? void 0 : m.headers) == null ? void 0 : u[o];
37
- return s ? {
38
- name: o,
39
- value: s,
34
+ return ((e = t.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((s) => {
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,
40
40
  required: !1
41
41
  } : [];
42
42
  })) ?? [];
43
43
  }
44
- ), _ = ["All", "Cookies", "Headers", "Body"], n = A("All"), C = p(
45
- () => {
46
- var e;
47
- return (((e = a.response) == null ? void 0 : e.size) ?? 0) > b;
48
- }
49
- );
50
- return (e, o) => (t(), r(R, { "aria-label": "Response" }, {
51
- title: d(() => [
52
- l("div", N, [
44
+ ), C = ["All", "Cookies", "Headers", "Body"], a = g("All"), _ = m(() => {
45
+ var r, p;
46
+ if (!t.response) return !1;
47
+ const e = ((r = t.response.headers) == null ? void 0 : r["content-type"]) || ((p = t.response.headers) == null ? void 0 : p["Content-Type"]);
48
+ return !e || (t.response.size ?? 0) <= h ? !1 : [
49
+ // Text types
50
+ "text/",
51
+ // JSON types
52
+ "application/json",
53
+ "application/ld+json",
54
+ "application/problem+json",
55
+ "application/vnd.api+json",
56
+ // XML types
57
+ "application/xml",
58
+ "application/atom+xml",
59
+ "application/rss+xml",
60
+ "application/problem+xml",
61
+ // Other structured text
62
+ "application/javascript",
63
+ "application/ecmascript",
64
+ "application/x-yaml",
65
+ "application/yaml",
66
+ // Source code
67
+ "application/x-httpd-php",
68
+ "application/x-sh",
69
+ "application/x-perl",
70
+ "application/x-python",
71
+ "application/x-ruby",
72
+ "application/x-java-source",
73
+ // Form data
74
+ "application/x-www-form-urlencoded"
75
+ ].some((A) => e.includes(A)) && (t.response.size ?? 0) > h;
76
+ });
77
+ return (e, s) => (n(), i(j, { "aria-label": "Response" }, {
78
+ title: u(() => [
79
+ l("div", z, [
53
80
  l("div", {
54
81
  "aria-live": "polite",
55
- class: S(["flex items-center", { "animate-response-heading": e.response }])
82
+ class: f(["flex items-center", { "animate-response-heading": e.response }])
56
83
  }, [
57
- o[1] || (o[1] = l("span", { class: "response-heading absolute pointer-events-none" }, " Response ", -1)),
58
- e.response ? (t(), r(L, {
84
+ s[1] || (s[1] = l("span", { class: "response-heading absolute pointer-events-none" }, " Response ", -1)),
85
+ e.response ? (n(), i(V, {
59
86
  key: 0,
60
87
  class: "animate-response-children",
61
88
  response: e.response
62
- }, null, 8, ["response"])) : i("", !0)
89
+ }, null, 8, ["response"])) : c("", !0)
63
90
  ], 2),
64
- f(B, {
65
- activeSection: n.value,
66
- sections: _,
67
- onSetActiveSection: o[0] || (o[0] = (s) => n.value = s)
91
+ v(S, {
92
+ activeSection: a.value,
93
+ sections: C,
94
+ onSetActiveSection: s[0] || (s[0] = (o) => a.value = o)
68
95
  }, null, 8, ["activeSection"])
69
96
  ])
70
97
  ]),
71
- default: d(() => {
72
- var s;
98
+ default: u(() => {
99
+ var o;
73
100
  return [
74
- l("div", O, [
75
- e.response ? (t(), v(k, { key: 1 }, [
76
- n.value === "All" || n.value === "Cookies" ? (t(), r(E, {
101
+ l("div", {
102
+ class: f(["custom-scroll h-full relative grid gap-[.5px] px-2 xl:px-4 py-2.5", {
103
+ "content-start": e.response
104
+ }])
105
+ }, [
106
+ e.response ? (n(), y(x, { key: 1 }, [
107
+ a.value === "All" || a.value === "Cookies" ? (n(), i(L, {
77
108
  key: 0,
78
- cookies: h.value
79
- }, null, 8, ["cookies"])) : i("", !0),
80
- n.value === "All" || n.value === "Headers" ? (t(), r(I, {
109
+ cookies: B.value
110
+ }, null, 8, ["cookies"])) : c("", !0),
111
+ a.value === "All" || a.value === "Headers" ? (n(), i($, {
81
112
  key: 1,
82
- headers: c.value
83
- }, null, 8, ["headers"])) : i("", !0),
84
- n.value === "All" || n.value === "Body" ? (t(), v(k, { key: 2 }, [
85
- C.value ? (t(), r($, {
113
+ headers: d.value
114
+ }, null, 8, ["headers"])) : c("", !0),
115
+ a.value === "All" || a.value === "Body" ? (n(), y(x, { key: 2 }, [
116
+ _.value ? (n(), i(w, {
86
117
  key: 0,
87
- content: a.response.data
88
- }, null, 8, ["content"])) : (t(), r(g, {
118
+ content: t.response.data
119
+ }, null, 8, ["content"])) : (n(), i(R, {
89
120
  key: 1,
90
121
  active: !0,
91
- data: (s = a.response) == null ? void 0 : s.data,
92
- headers: c.value,
122
+ data: (o = t.response) == null ? void 0 : o.data,
123
+ headers: d.value,
93
124
  title: "Body"
94
125
  }, null, 8, ["data", "headers"]))
95
- ], 64)) : i("", !0)
96
- ], 64)) : (t(), r(H, { key: 0 })),
97
- f(V)
98
- ])
126
+ ], 64)) : c("", !0)
127
+ ], 64)) : (n(), i(b, { key: 0 })),
128
+ v(H)
129
+ ], 2)
99
130
  ];
100
131
  }),
101
132
  _: 1
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAoyBA,wBAMG"}
1
+ {"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AA8zBA,wBAMG"}
@@ -1,78 +1,88 @@
1
- import { defineComponent as O, computed as A, ref as M, openBlock as u, createElementBlock as W, createElementVNode as l, createVNode as s, unref as e, withCtx as n, Fragment as I, renderList as L, createBlock as h, withModifiers as c, normalizeClass as U, toDisplayString as z } from "vue";
1
+ import { defineComponent as O, computed as A, ref as M, openBlock as m, createElementBlock as W, createElementVNode as a, createVNode as s, unref as e, withCtx as n, Fragment as I, renderList as L, createBlock as h, withModifiers as c, normalizeClass as U, toDisplayString as z } from "vue";
2
2
  import V from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
3
3
  import q from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
4
- import { useModal as C, ScalarDropdown as $, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as F, ScalarButton as S, ScalarDropdownDivider as P, ScalarModal as N } from "@scalar/components";
4
+ import { useModal as C, ScalarDropdown as S, ScalarDropdownItem as u, ScalarIcon as r, ScalarTooltip as F, ScalarButton as $, ScalarDropdownDivider as P, ScalarModal as N } from "@scalar/components";
5
5
  import { useRouter as Y } from "vue-router";
6
6
  import { useWorkspace as G } from "../../../store/store.js";
7
- const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = { class: "flex items-center justify-center h-4 w-4" }, ae = /* @__PURE__ */ O({
7
+ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = { class: "flex items-center justify-center h-4 w-4" }, le = /* @__PURE__ */ O({
8
8
  __name: "WorkspaceDropdown",
9
9
  setup(Z) {
10
10
  const { activeWorkspace: f, workspaces: d, workspaceMutators: g, events: T } = G(), { push: b } = Y(), E = (o) => {
11
- o !== f.value.uid && b(`/workspace/${o}`);
12
- }, _ = A(() => Object.keys(d).length === 1), j = () => T.commandPalette.emit({ commandName: "Create Workspace" }), v = M(""), r = M(""), w = C(), k = C(), y = (o) => {
13
- v.value = d[o].name, r.value = o, w.show();
11
+ o !== f.value.uid && b({
12
+ name: "workspace",
13
+ params: {
14
+ workspace: o
15
+ }
16
+ });
17
+ }, _ = A(() => Object.keys(d).length === 1), j = () => T.commandPalette.emit({ commandName: "Create Workspace" }), v = M(""), i = M(""), w = C(), k = C(), y = (o) => {
18
+ v.value = d[o].name, i.value = o, w.show();
14
19
  }, B = (o) => {
15
- o.trim() && (g.edit(r.value, "name", o.trim()), w.hide());
20
+ o.trim() && (g.edit(i.value, "name", o.trim()), w.hide());
16
21
  }, D = (o) => {
17
- v.value = d[o].name, r.value = o, k.show();
22
+ v.value = d[o].name, i.value = o, k.show();
18
23
  }, R = async () => {
19
24
  if (!_.value) {
20
- const o = f.value.uid === r.value, t = { ...d };
21
- if (delete t[r.value], g.delete(r.value), o) {
25
+ const o = f.value.uid === i.value, t = { ...d };
26
+ if (delete t[i.value], g.delete(i.value), o) {
22
27
  const p = Object.keys(t)[0];
23
- await b(`/workspace/${p}/`);
28
+ await b({
29
+ name: "workspace",
30
+ params: {
31
+ workspace: p
32
+ }
33
+ });
24
34
  }
25
35
  }
26
36
  k.hide();
27
37
  };
28
- return (o, t) => (u(), W("div", null, [
29
- l("div", H, [
30
- s(e($), null, {
38
+ return (o, t) => (m(), W("div", null, [
39
+ a("div", H, [
40
+ s(e(S), null, {
31
41
  items: n(() => [
32
- (u(!0), W(I, null, L(e(d), (p, a) => (u(), h(e(m), {
33
- key: a,
42
+ (m(!0), W(I, null, L(e(d), (p, l) => (m(), h(e(u), {
43
+ key: l,
34
44
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
35
- onClick: c((x) => E(a), ["stop"])
45
+ onClick: c((x) => E(l), ["stop"])
36
46
  }, {
37
47
  default: n(() => [
38
- l("div", {
48
+ a("div", {
39
49
  class: U([
40
50
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4",
41
- e(f).uid === a ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
51
+ e(f).uid === l ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
42
52
  ])
43
53
  }, [
44
- s(e(i), {
54
+ s(e(r), {
45
55
  class: "size-2.5",
46
56
  icon: "Checkmark",
47
57
  thickness: "3.5"
48
58
  })
49
59
  ], 2),
50
- l("span", Q, z(p.name), 1),
51
- s(e($), { teleport: ".scalar-client" }, {
60
+ a("span", Q, z(p.name), 1),
61
+ s(e(S), { teleport: ".scalar-client" }, {
52
62
  items: n(() => [
53
- s(e(m), {
63
+ s(e(u), {
54
64
  class: "flex gap-2",
55
- onMousedown: (x) => y(a),
56
- onTouchend: c((x) => y(a), ["prevent"])
65
+ onMousedown: (x) => y(l),
66
+ onTouchend: c((x) => y(l), ["prevent"])
57
67
  }, {
58
68
  default: n(() => [
59
- s(e(i), {
69
+ s(e(r), {
60
70
  class: "inline-flex",
61
71
  icon: "Edit",
62
72
  size: "md",
63
73
  thickness: "1.5"
64
74
  }),
65
- t[4] || (t[4] = l("span", null, "Rename", -1))
75
+ t[4] || (t[4] = a("span", null, "Rename", -1))
66
76
  ]),
67
77
  _: 2
68
78
  }, 1032, ["onMousedown", "onTouchend"]),
69
- _.value ? (u(), h(e(F), {
79
+ _.value ? (m(), h(e(F), {
70
80
  key: 0,
71
81
  class: "z-10",
72
82
  side: "bottom"
73
83
  }, {
74
84
  trigger: n(() => [
75
- s(e(m), {
85
+ s(e(u), {
76
86
  class: "flex gap-2 w-full",
77
87
  disabled: "",
78
88
  onMousedown: t[0] || (t[0] = c(() => {
@@ -81,52 +91,52 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
81
91
  }, ["prevent"]))
82
92
  }, {
83
93
  default: n(() => [
84
- s(e(i), {
94
+ s(e(r), {
85
95
  class: "inline-flex",
86
96
  icon: "Delete",
87
97
  size: "md",
88
98
  thickness: "1.5"
89
99
  }),
90
- t[5] || (t[5] = l("span", null, "Delete", -1))
100
+ t[5] || (t[5] = a("span", null, "Delete", -1))
91
101
  ]),
92
102
  _: 1
93
103
  })
94
104
  ]),
95
105
  content: n(() => t[6] || (t[6] = [
96
- l("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
97
- l("div", { class: "flex items-center text-c-2" }, [
98
- l("span", null, "Only workspace cannot be deleted.")
106
+ a("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
107
+ a("div", { class: "flex items-center text-c-2" }, [
108
+ a("span", null, "Only workspace cannot be deleted.")
99
109
  ])
100
110
  ], -1)
101
111
  ])),
102
112
  _: 1
103
- })) : (u(), h(e(m), {
113
+ })) : (m(), h(e(u), {
104
114
  key: 1,
105
115
  class: "flex !gap-2",
106
- onMousedown: c((x) => D(a), ["prevent"]),
107
- onTouchend: c((x) => D(a), ["prevent"])
116
+ onMousedown: c((x) => D(l), ["prevent"]),
117
+ onTouchend: c((x) => D(l), ["prevent"])
108
118
  }, {
109
119
  default: n(() => [
110
- s(e(i), {
120
+ s(e(r), {
111
121
  class: "inline-flex",
112
122
  icon: "Delete",
113
123
  size: "sm",
114
124
  thickness: "1.5"
115
125
  }),
116
- t[7] || (t[7] = l("span", null, "Delete", -1))
126
+ t[7] || (t[7] = a("span", null, "Delete", -1))
117
127
  ]),
118
128
  _: 2
119
129
  }, 1032, ["onMousedown", "onTouchend"]))
120
130
  ]),
121
131
  default: n(() => [
122
- s(e(S), {
132
+ s(e($), {
123
133
  class: "px-0.5 py-0 hover:bg-b-3 group-hover/item:flex aspect-square ml-auto -mr-1 h-fit",
124
134
  size: "sm",
125
135
  type: "button",
126
136
  variant: "ghost"
127
137
  }, {
128
138
  default: n(() => [
129
- s(e(i), {
139
+ s(e(r), {
130
140
  icon: "Ellipses",
131
141
  size: "sm"
132
142
  })
@@ -140,33 +150,33 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
140
150
  _: 2
141
151
  }, 1032, ["onClick"]))), 128)),
142
152
  s(e(P)),
143
- s(e(m), {
153
+ s(e(u), {
144
154
  class: "flex items-center gap-1.5",
145
155
  onClick: j
146
156
  }, {
147
157
  default: n(() => [
148
- l("div", X, [
149
- s(e(i), {
158
+ a("div", X, [
159
+ s(e(r), {
150
160
  class: "h-2.5",
151
161
  icon: "Add",
152
162
  thickness: "3"
153
163
  })
154
164
  ]),
155
- t[8] || (t[8] = l("span", null, "Create Workspace", -1))
165
+ t[8] || (t[8] = a("span", null, "Create Workspace", -1))
156
166
  ]),
157
167
  _: 1
158
168
  })
159
169
  ]),
160
170
  default: n(() => [
161
- s(e(S), {
171
+ s(e($), {
162
172
  class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
163
173
  fullWidth: "",
164
174
  variant: "ghost"
165
175
  }, {
166
176
  default: n(() => [
167
- l("div", J, [
168
- l("h2", K, z(e(f).name), 1),
169
- s(e(i), {
177
+ a("div", J, [
178
+ a("h2", K, z(e(f).name), 1),
179
+ s(e(r), {
170
180
  class: "size-3",
171
181
  icon: "ChevronDown",
172
182
  thickness: "3"
@@ -212,5 +222,5 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
212
222
  }
213
223
  });
214
224
  export {
215
- ae as default
225
+ le as default
216
226
  };
@@ -1,11 +1,12 @@
1
1
  import type { Collection, Request, RequestExample, RequestMethod, Tag } from '@scalar/oas-utils/entities/spec';
2
+ import type { RouteLocationRaw } from 'vue-router';
2
3
  export type SidebarItem = {
3
4
  title: string;
4
5
  entity: Collection | Tag | Request | RequestExample;
5
6
  resourceTitle: string;
6
7
  children: string[];
7
8
  method?: RequestMethod;
8
- link?: string;
9
+ link?: RouteLocationRaw;
9
10
  warning?: string;
10
11
  icon?: string;
11
12
  edit: (name: string, icon?: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/sidebar-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,GAAG,EACJ,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO,GAAG,cAAc,CAAA;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,OAAO,CAAA;CACd,CAAA"}
1
+ {"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/sidebar-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,GAAG,EACJ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO,GAAG,cAAc,CAAA;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,gBAAgB,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,OAAO,CAAA;CACd,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAsNA,wBAMG"}
1
+ {"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAgOA,wBAMG"}