@scalar/api-client 2.1.22 → 2.1.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 (86) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +22 -0
  3. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  4. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  5. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  7. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +163 -154
  8. package/dist/components/ContextBar.vue.js +2 -2
  9. package/dist/components/ContextBar.vue2.js +1 -1
  10. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  11. package/dist/components/DataTable/DataTableCell.vue.js +5 -5
  12. package/dist/components/DataTable/DataTableText.vue.d.ts +12 -3
  13. package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
  14. package/dist/components/DataTable/DataTableText.vue.js +13 -9
  15. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  16. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +9 -9
  17. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  18. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +84 -63
  19. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  20. package/dist/components/ImportCollection/ImportNowButton.vue.js +36 -40
  21. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts +3 -0
  22. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -0
  23. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +125 -0
  24. package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +4 -0
  25. package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
  26. package/dist/components/ImportCurl/ImportCurlModal.vue.js +2 -2
  27. package/dist/components/ImportCurl/ImportCurlModal.vue2.js +28 -27
  28. package/dist/components/SideNav/SideHelp.vue.js +1 -1
  29. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  30. package/dist/components/SideNav/SideNav.vue.js +1 -1
  31. package/dist/components/SideNav/SideNav.vue2.js +8 -8
  32. package/dist/components/SideNav/SideNavLink.vue.js +1 -1
  33. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  34. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  35. package/dist/components/Sidebar/Sidebar.vue2.js +4 -4
  36. package/dist/components/Sidebar/SidebarList.vue.d.ts.map +1 -1
  37. package/dist/components/Sidebar/SidebarList.vue.js +3 -3
  38. package/dist/components/Sidebar/SidebarToggle.vue.js +1 -1
  39. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  40. package/dist/components/TopNav/TopNav.vue.js +3 -3
  41. package/dist/data/httpHeaders.d.ts +6 -0
  42. package/dist/data/httpHeaders.d.ts.map +1 -0
  43. package/dist/data/httpHeaders.js +537 -0
  44. package/dist/layouts/App/create-api-client-app.d.ts +8 -8
  45. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  46. package/dist/layouts/Modal/create-api-client-modal.d.ts +16 -16
  47. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  48. package/dist/layouts/Web/create-api-client-web.d.ts +8 -8
  49. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  50. package/dist/libs/create-client.d.ts +8 -8
  51. package/dist/libs/create-client.d.ts.map +1 -1
  52. package/dist/libs/importers/curl.d.ts +25 -1
  53. package/dist/libs/importers/curl.d.ts.map +1 -1
  54. package/dist/libs/importers/curl.js +40 -38
  55. package/dist/libs/parse-curl.d.ts +3 -4
  56. package/dist/libs/parse-curl.d.ts.map +1 -1
  57. package/dist/libs/parse-curl.js +58 -55
  58. package/dist/store/collections.d.ts.map +1 -1
  59. package/dist/store/import-spec.d.ts.map +1 -1
  60. package/dist/store/request-example.d.ts +4 -4
  61. package/dist/store/requests.d.ts +4 -4
  62. package/dist/store/store.d.ts +16 -16
  63. package/dist/store/store.d.ts.map +1 -1
  64. package/dist/store/tags.d.ts.map +1 -1
  65. package/dist/style.css +1 -1
  66. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  67. package/dist/views/Cookies/Cookies.vue2.js +21 -21
  68. package/dist/views/Request/Request.vue.js +1 -1
  69. package/dist/views/Request/Request.vue2.js +1 -1
  70. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  71. package/dist/views/Request/RequestSection/RequestSection.vue.js +45 -53
  72. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  73. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  74. package/dist/views/Request/RequestSidebar.vue2.js +61 -63
  75. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  76. package/dist/views/Request/RequestSidebarItem.vue2.js +43 -43
  77. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  78. package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
  79. package/dist/views/Request/RequestSubpageHeader.vue2.js +15 -13
  80. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  81. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  82. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +43 -22
  83. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  84. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +44 -51
  85. package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -2
  86. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AAsgBA,wBAKG"}
1
+ {"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AA0gBA,wBAKG"}
@@ -1,6 +1,6 @@
1
- import { defineComponent as V, computed as D, onMounted as M, openBlock as l, createBlock as y, withCtx as a, createVNode as s, unref as n, createElementVNode as m, createElementBlock as f, Fragment as _, renderList as x, normalizeClass as w, createTextVNode as v, toDisplayString as S, withDirectives as O, vShow as $ } from "vue";
2
- import N from "../../components/Sidebar/SidebarButton.vue.js";
3
- import z from "../../components/Sidebar/SidebarList.vue.js";
1
+ import { defineComponent as L, computed as V, onMounted as D, openBlock as l, createBlock as y, withCtx as a, createVNode as s, unref as n, createElementVNode as f, createElementBlock as m, Fragment as _, renderList as v, normalizeClass as w, createTextVNode as x, toDisplayString as S, withDirectives as O, vShow as $ } from "vue";
2
+ import M from "../../components/Sidebar/SidebarButton.vue.js";
3
+ import N from "../../components/Sidebar/SidebarList.vue.js";
4
4
  import B from "../../components/Sidebar/SidebarListElement.vue.js";
5
5
  import F from "../../components/ViewLayout/ViewLayout.vue.js";
6
6
  import I from "../../components/ViewLayout/ViewLayoutContent.vue.js";
@@ -12,7 +12,7 @@ import P from "./CookieRaw.vue.js";
12
12
  import { useSidebar as T } from "../../hooks/useSidebar.js";
13
13
  import { useWorkspace as W } from "../../store/store.js";
14
14
  import q from "../../components/Sidebar/Sidebar.vue.js";
15
- const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, Q = ["onClick"], U = { class: "before:bg-b-3 before:absolute before:left-[calc(1.75rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, de = /* @__PURE__ */ V({
15
+ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, Q = ["onClick"], U = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1.75rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, de = /* @__PURE__ */ L({
16
16
  __name: "Cookies",
17
17
  setup(X) {
18
18
  const { cookies: p, cookieMutators: g } = W(), { collapsedSidebarFolders: i, toggleSidebarFolder: k } = T(), b = A(), E = () => {
@@ -26,7 +26,7 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
26
26
  sameSite: "None"
27
27
  });
28
28
  g.add(e), b.push(e.uid);
29
- }, L = (t) => {
29
+ }, z = (t) => {
30
30
  g.delete(t);
31
31
  const e = Object.values(p).filter(
32
32
  (o) => o.uid !== t
@@ -35,13 +35,13 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
35
35
  const o = e[e.length - 1];
36
36
  b.push(o.uid);
37
37
  } else e.length === 1 && e[0].uid === "default" && b.push("default");
38
- }, h = D(() => {
38
+ }, h = V(() => {
39
39
  const t = {};
40
40
  return Object.values(p).forEach((e) => {
41
41
  e.domain && e.path && (t[e.domain] || (t[e.domain] = {}), t[e.domain][e.path] || (t[e.domain][e.path] = []), t[e.domain][e.path].push(e));
42
42
  }), t;
43
43
  }), C = (t) => i[t];
44
- return M(() => {
44
+ return D(() => {
45
45
  const t = Object.keys(h.value), e = Object.entries(h.value).flatMap(
46
46
  ([o, r]) => Object.keys(r).map((d) => o + d)
47
47
  );
@@ -54,11 +54,11 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
54
54
  default: a(() => [
55
55
  s(n(q), { title: "Cookies" }, {
56
56
  content: a(() => [
57
- m("div", G, [
58
- s(z, null, {
57
+ f("div", G, [
58
+ s(N, null, {
59
59
  default: a(() => [
60
- (l(!0), f(_, null, x(h.value, (o, r) => (l(), f("div", { key: r }, [
61
- m("button", {
60
+ (l(!0), m(_, null, v(h.value, (o, r) => (l(), m("div", { key: r }, [
61
+ f("button", {
62
62
  class: "flex font-medium gap-1.5 items-center px-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
63
63
  type: "button",
64
64
  onClick: (d) => n(k)(r)
@@ -71,11 +71,11 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
71
71
  size: "sm",
72
72
  thickness: "2.5"
73
73
  }, null, 8, ["class"]),
74
- v(" " + S(r), 1)
74
+ x(" " + S(r), 1)
75
75
  ], 8, J),
76
- O(m("div", K, [
77
- (l(!0), f(_, null, x(o, (d, c) => (l(), f("div", { key: c }, [
78
- m("button", {
76
+ O(f("div", K, [
77
+ (l(!0), m(_, null, v(o, (d, c) => (l(), m("div", { key: c }, [
78
+ f("button", {
79
79
  class: "flex font-medium gap-1.5 items-center pl-5 pr-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
80
80
  type: "button",
81
81
  onClick: (u) => n(k)(r + c)
@@ -88,15 +88,15 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
88
88
  size: "sm",
89
89
  thickness: "2.5"
90
90
  }, null, 8, ["class"]),
91
- v(" " + S(c), 1)
91
+ x(" " + S(c), 1)
92
92
  ], 8, Q),
93
- O(m("div", U, [
94
- (l(!0), f(_, null, x(d, (u) => (l(), y(B, {
93
+ O(f("div", U, [
94
+ (l(!0), m(_, null, v(d, (u) => (l(), y(B, {
95
95
  key: u.uid,
96
96
  class: "cookie text-xs",
97
97
  variable: { name: u.name, uid: u.uid },
98
98
  warningMessage: "Are you sure you want to delete this cookie?",
99
- onDelete: (Y) => L(u.uid)
99
+ onDelete: (Y) => z(u.uid)
100
100
  }, null, 8, ["variable", "onDelete"]))), 128))
101
101
  ], 512), [
102
102
  [$, C(r + c)]
@@ -112,9 +112,9 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
112
112
  ])
113
113
  ]),
114
114
  button: a(() => [
115
- s(N, { click: E }, {
115
+ s(M, { click: E }, {
116
116
  title: a(() => e[0] || (e[0] = [
117
- v("Add Item")
117
+ x("Add Item")
118
118
  ])),
119
119
  _: 1
120
120
  })
@@ -1,7 +1,7 @@
1
1
  import o from "./Request.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-adeb5a01"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a2bc9058"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -40,7 +40,7 @@ const Me = /* @__PURE__ */ z({
40
40
  var t;
41
41
  return o.request.uid === ((t = d.value) == null ? void 0 : t.uid);
42
42
  })
43
- ), D = me("(max-width: 780px)");
43
+ ), D = me("(max-width: 800px)");
44
44
  G(D, (o) => u.value = !o);
45
45
  const E = async () => {
46
46
  var f;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";AAuaA,wBAKG"}
1
+ {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";AAiZA,wBAKG"}
@@ -1,25 +1,24 @@
1
- import { defineComponent as B, computed as _, ref as g, watch as V, openBlock as m, createBlock as b, withCtx as x, createVNode as s, unref as o, createElementVNode as A, createTextVNode as C, createElementBlock as d, createCommentVNode as w, toDisplayString as H, withDirectives as n, vShow as i } from "vue";
2
- import N from "../../../components/ContextBar.vue.js";
3
- import R from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import E from "./RequestBody.vue.js";
1
+ import { defineComponent as g, computed as _, ref as q, watch as b, openBlock as m, createBlock as C, withCtx as x, createElementVNode as A, unref as r, createElementBlock as p, createCommentVNode as V, toDisplayString as w, createVNode as s, withDirectives as u, vShow as n } from "vue";
2
+ import H from "../../../components/ContextBar.vue.js";
3
+ import N from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import R from "./RequestBody.vue.js";
5
5
  import v from "./RequestParams.vue.js";
6
6
  import K from "./RequestPathParams.vue.js";
7
- import { ScalarIcon as $ } from "@scalar/components";
8
7
  import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
9
- import Q from "./RequestAuth/RequestAuth.vue.js";
10
- import { useWorkspace as D } from "../../../store/store.js";
11
- const I = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none" }, M = {
8
+ import $ from "./RequestAuth/RequestAuth.vue.js";
9
+ import { useWorkspace as E } from "../../../store/store.js";
10
+ const Q = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none" }, D = {
12
11
  key: 0,
13
12
  class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
14
13
  for: "requestname"
15
- }, P = ["value"], z = {
14
+ }, M = ["value"], P = {
16
15
  key: 2,
17
- class: "text-c-2"
18
- }, L = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, ee = /* @__PURE__ */ B({
16
+ class: "text-c-1"
17
+ }, I = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, X = /* @__PURE__ */ g({
19
18
  __name: "RequestSection",
20
19
  setup(O) {
21
- const { activeRequest: a, activeExample: h, isReadOnly: p, requestMutators: k } = D(), S = _(() => {
22
- var l, r;
20
+ const { activeRequest: a, activeExample: h, isReadOnly: d, requestMutators: k } = E(), B = _(() => {
21
+ var l, o;
23
22
  const t = /* @__PURE__ */ new Set([
24
23
  "All",
25
24
  "Query",
@@ -29,91 +28,84 @@ const I = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none"
29
28
  "Headers",
30
29
  "Body"
31
30
  ]);
32
- return (l = h.value) != null && l.parameters.path.length || t.delete("Variables"), f(((r = a.value) == null ? void 0 : r.method) ?? "get") || t.delete("Body"), y.value && t.delete("Auth"), [...t];
31
+ return (l = h.value) != null && l.parameters.path.length || t.delete("Variables"), f(((o = a.value) == null ? void 0 : o.method) ?? "get") || t.delete("Body"), y.value && t.delete("Auth"), [...t];
33
32
  }), y = _(
34
33
  () => {
35
34
  var t, l;
36
- return p.value && ((l = (t = a.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
35
+ return d.value && ((l = (t = a.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
37
36
  }
38
- ), e = g("All");
39
- V(a, (t) => {
37
+ ), e = q("All");
38
+ b(a, (t) => {
40
39
  e.value === "Body" && t && !f(t.method) && (e.value = "All");
41
40
  });
42
- const q = (t) => {
41
+ const S = (t) => {
43
42
  if (!a.value) return;
44
43
  const l = t.target;
45
44
  k.edit(a.value.uid, "summary", l.value);
46
45
  };
47
- return (t, l) => (m(), b(R, null, {
46
+ return (t, l) => (m(), C(N, null, {
48
47
  title: x(() => {
49
- var r, u;
48
+ var o, i;
50
49
  return [
51
- s(o($), {
52
- class: "text-c-3 mr-2 pointer-events-none",
53
- icon: "ExternalLink",
54
- size: "sm",
55
- thickness: "2.5"
56
- }),
57
- A("div", I, [
58
- l[1] || (l[1] = C(" Request ")),
59
- o(p) ? w("", !0) : (m(), d("label", M)),
60
- o(p) ? (m(), d("span", z, H((u = o(a)) == null ? void 0 : u.summary), 1)) : (m(), d("input", {
50
+ A("div", Q, [
51
+ r(d) ? V("", !0) : (m(), p("label", D)),
52
+ r(d) ? (m(), p("span", P, w((i = r(a)) == null ? void 0 : i.summary), 1)) : (m(), p("input", {
61
53
  key: 1,
62
54
  id: "requestname",
63
- class: "outline-none border-0 text-c-2 rounded pointer-events-auto relative w-full",
55
+ class: "outline-none border-0 text-c-1 rounded pointer-events-auto relative w-full",
64
56
  placeholder: "Request Name",
65
- value: (r = o(a)) == null ? void 0 : r.summary,
66
- onInput: q
67
- }, null, 40, P))
57
+ value: (o = r(a)) == null ? void 0 : o.summary,
58
+ onInput: S
59
+ }, null, 40, M))
68
60
  ]),
69
- s(N, {
61
+ s(H, {
70
62
  activeSection: e.value,
71
- sections: S.value,
63
+ sections: B.value,
72
64
  onSetActiveSection: l[0] || (l[0] = (c) => e.value = c)
73
65
  }, null, 8, ["activeSection", "sections"])
74
66
  ];
75
67
  }),
76
68
  default: x(() => {
77
- var r, u, c;
69
+ var o, i, c;
78
70
  return [
79
- A("div", L, [
80
- n(s(Q, { title: "Authentication" }, null, 512), [
71
+ A("div", I, [
72
+ u(s($, { title: "Authentication" }, null, 512), [
81
73
  [
82
- i,
74
+ n,
83
75
  !y.value && (e.value === "All" || e.value === "Auth")
84
76
  ]
85
77
  ]),
86
- n(s(K, {
78
+ u(s(K, {
87
79
  paramKey: "path",
88
80
  title: "Path Variables"
89
81
  }, null, 512), [
90
82
  [
91
- i,
92
- (e.value === "All" || e.value === "Variables") && ((c = (u = (r = o(h)) == null ? void 0 : r.parameters) == null ? void 0 : u.path) == null ? void 0 : c.length)
83
+ n,
84
+ (e.value === "All" || e.value === "Variables") && ((c = (i = (o = r(h)) == null ? void 0 : o.parameters) == null ? void 0 : i.path) == null ? void 0 : c.length)
93
85
  ]
94
86
  ]),
95
- n(s(v, {
87
+ u(s(v, {
96
88
  paramKey: "cookies",
97
89
  title: "Cookies"
98
90
  }, null, 512), [
99
- [i, e.value === "All" || e.value === "Cookies"]
91
+ [n, e.value === "All" || e.value === "Cookies"]
100
92
  ]),
101
- n(s(v, {
93
+ u(s(v, {
102
94
  paramKey: "headers",
103
95
  title: "Headers"
104
96
  }, null, 512), [
105
- [i, e.value === "All" || e.value === "Headers"]
97
+ [n, e.value === "All" || e.value === "Headers"]
106
98
  ]),
107
- n(s(v, {
99
+ u(s(v, {
108
100
  paramKey: "query",
109
101
  title: "Query Parameters"
110
102
  }, null, 512), [
111
- [i, e.value === "All" || e.value === "Query"]
103
+ [n, e.value === "All" || e.value === "Query"]
112
104
  ]),
113
- n(s(E, { title: "Body" }, null, 512), [
105
+ u(s(R, { title: "Body" }, null, 512), [
114
106
  [
115
- i,
116
- o(a) && (e.value === "All" || e.value === "Body") && o(f)(o(a).method)
107
+ n,
108
+ r(a) && (e.value === "All" || e.value === "Body") && r(f)(r(a).method)
117
109
  ]
118
110
  ])
119
111
  ])
@@ -124,5 +116,5 @@ const I = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none"
124
116
  }
125
117
  });
126
118
  export {
127
- ee as default
119
+ X as default
128
120
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBAuVe,OAAO;gBACR,OAAO;;;cAwnBkB,MAAM;aAAO,MAAM;;;;iBAznB3C,OAAO;gBACR,OAAO;;;cAwnBkB,MAAM;aAAO,MAAM;;;;AAR1D,wBAUG"}
1
+ {"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBAsVe,OAAO;gBACR,OAAO;;;cAqmBkB,MAAM;aAAO,MAAM;;;;iBAtmB3C,OAAO;gBACR,OAAO;;;cAqmBkB,MAAM;aAAO,MAAM;;;;AAR1D,wBAUG"}
@@ -1,7 +1,7 @@
1
- import o from "./RequestSidebar.vue2.js";
1
+ import e from "./RequestSidebar.vue2.js";
2
2
  /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-254a8369"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ o(e, [["__scopeId", "data-v-3e3ee583"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,20 +1,19 @@
1
- import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as _, createVNode as l, unref as t, normalizeClass as b, createSlots as ee, withCtx as n, createElementVNode as i, isRef as te, withKeys as v, withModifiers as p, createBlock as d, renderList as C, createTextVNode as D, toDisplayString as oe, createCommentVNode as $, vShow as re } from "vue";
2
- import se from "../../assets/rabbit.ascii.js";
1
+ import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as _, createVNode as u, unref as t, normalizeClass as b, createSlots as ee, withCtx as n, createElementVNode as i, isRef as te, withKeys as v, withModifiers as p, createBlock as l, renderList as C, createTextVNode as D, toDisplayString as oe, createCommentVNode as $, vShow as se } from "vue";
2
+ import re from "../../assets/rabbit.ascii.js";
3
3
  import ae from "../../assets/rabbitjump.ascii.js";
4
4
  import ie from "../../components/HttpMethod/HttpMethod.vue.js";
5
5
  import V from "../../components/ScalarAsciiArt.vue.js";
6
6
  import { useSearch as ne } from "../../components/Search/useSearch.js";
7
7
  import le from "../../components/Sidebar/SidebarButton.vue.js";
8
8
  import de from "./RequestSidebarItemMenu.vue.js";
9
- import { dragHandlerFactory as me } from "./handle-drag.js";
10
- import { ScalarSearchInput as ue, ScalarSearchResultList as pe, ScalarSearchResultItem as ce, ScalarIcon as q } from "@scalar/components";
9
+ import { dragHandlerFactory as ue } from "./handle-drag.js";
10
+ import { ScalarSearchInput as me, ScalarSearchResultList as pe, ScalarSearchResultItem as ce, ScalarIcon as q } from "@scalar/components";
11
11
  import { LibraryIcon as fe } from "@scalar/icons";
12
12
  import be from "./RequestSidebarItem.vue.js";
13
13
  import he from "../../components/Sidebar/Sidebar.vue.js";
14
- import Se from "./components/WorkspaceDropdown.vue.js";
15
- import { useSidebar as ve } from "../../hooks/useSidebar.js";
16
- import { useWorkspace as Re } from "../../store/store.js";
17
- const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, ke = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, Te = /* @__PURE__ */ J({
14
+ import { useSidebar as Se } from "../../hooks/useSidebar.js";
15
+ import { useWorkspace as ve } from "../../store/store.js";
16
+ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ke = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, we = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, Ke = /* @__PURE__ */ J({
18
17
  __name: "RequestSidebar",
19
18
  props: {
20
19
  showSidebar: { type: Boolean },
@@ -22,18 +21,18 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
22
21
  },
23
22
  emits: ["update:showSidebar", "newTab"],
24
23
  setup(P, { emit: B }) {
25
- const E = P, R = B, y = Re(), {
24
+ const E = P, R = B, k = ve(), {
26
25
  activeWorkspaceCollections: F,
27
26
  activeRequest: M,
28
27
  activeWorkspaceRequests: O,
29
28
  findRequestParents: K,
30
29
  isReadOnly: N,
31
30
  events: c
32
- } = y, { handleDragEnd: T, isDroppable: z } = me(y), { collapsedSidebarFolders: A, setCollapsedSidebarFolder: L } = ve(), u = Q({ open: !1 });
31
+ } = k, { handleDragEnd: T, isDroppable: z } = ue(k), { collapsedSidebarFolders: A, setCollapsedSidebarFolder: L } = Se(), m = Q({ open: !1 });
33
32
  X(
34
33
  M,
35
- (r) => {
36
- r && K(r).forEach(
34
+ (s) => {
35
+ s && K(s).forEach(
37
36
  (e) => L(e, !0)
38
37
  );
39
38
  },
@@ -42,28 +41,28 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
42
41
  const {
43
42
  searchText: f,
44
43
  searchResultsWithPlaceholderResults: w,
45
- selectedSearchResult: k,
44
+ selectedSearchResult: y,
46
45
  onSearchResultClick: U,
47
46
  fuseSearch: W,
48
47
  searchInputRef: g,
49
48
  searchResultRefs: H,
50
- navigateSearchResults: x,
49
+ navigateSearchResults: I,
51
50
  selectSearchResult: j
52
- } = ne(), I = (r) => {
51
+ } = ne(), x = (s) => {
53
52
  var e;
54
- r && (r.toggleSidebar && R("update:showSidebar", E.showSidebar), r.openCommandPalette && (r.openCommandPalette.preventDefault(), c.commandPalette.emit()), r.focusRequestSearch && ((e = g.value) == null || e.focus()));
53
+ s && (s.toggleSidebar && R("update:showSidebar", E.showSidebar), s.openCommandPalette && (s.openCommandPalette.preventDefault(), c.commandPalette.emit()), s.focusRequestSearch && ((e = g.value) == null || e.focus()));
55
54
  };
56
- return Y(() => c.hotKeys.on(I)), Z(() => {
57
- c.hotKeys.off(I);
58
- }), (r, e) => (a(), h(S, null, [
59
- _(l(t(he), {
60
- class: b([r.showSidebar ? "sidebar-active-width" : ""]),
61
- showSidebar: r.showSidebar,
62
- "onUpdate:showSidebar": e[8] || (e[8] = (o) => r.$emit("update:showSidebar", o))
55
+ return Y(() => c.hotKeys.on(x)), Z(() => {
56
+ c.hotKeys.off(x);
57
+ }), (s, e) => (a(), h(S, null, [
58
+ _(u(t(he), {
59
+ class: b([s.showSidebar ? "sidebar-active-width" : ""]),
60
+ showSidebar: s.showSidebar,
61
+ "onUpdate:showSidebar": e[8] || (e[8] = (o) => s.$emit("update:showSidebar", o))
63
62
  }, ee({
64
63
  content: n(() => [
65
- i("div", ye, [
66
- l(t(ue), {
64
+ i("div", Re, [
65
+ u(t(me), {
67
66
  ref_key: "searchInputRef",
68
67
  ref: g,
69
68
  modelValue: t(f),
@@ -71,39 +70,39 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
71
70
  sidebar: "",
72
71
  onInput: t(W),
73
72
  onKeydown: [
74
- e[1] || (e[1] = v(p((o) => t(x)("down"), ["stop"]), ["down"])),
73
+ e[1] || (e[1] = v(p((o) => t(I)("down"), ["stop"]), ["down"])),
75
74
  e[2] || (e[2] = v(p((o) => t(j)(), ["stop"]), ["enter"])),
76
- e[3] || (e[3] = v(p((o) => t(x)("up"), ["stop"]), ["up"]))
75
+ e[3] || (e[3] = v(p((o) => t(I)("up"), ["stop"]), ["up"]))
77
76
  ]
78
77
  }, null, 8, ["modelValue", "onInput"])
79
78
  ]),
80
79
  i("div", {
81
80
  class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
82
- "pb-14": !r.isReadonly
81
+ "pb-14": !s.isReadonly
83
82
  }]),
84
83
  onDragenter: e[6] || (e[6] = p(() => {
85
84
  }, ["prevent"])),
86
85
  onDragover: e[7] || (e[7] = p(() => {
87
86
  }, ["prevent"]))
88
87
  }, [
89
- t(f) ? (a(), d(t(pe), {
88
+ t(f) ? (a(), l(t(pe), {
90
89
  key: 0,
91
90
  class: "gap-px custom-scroll",
92
91
  noResults: !t(w).length
93
92
  }, {
94
93
  default: n(() => [
95
- (a(!0), h(S, null, C(t(w), (o, m) => (a(), d(t(ce), {
94
+ (a(!0), h(S, null, C(t(w), (o, d) => (a(), l(t(ce), {
96
95
  id: `#search-input-${o.item.id}`,
97
96
  key: o.refIndex,
98
97
  ref_for: !0,
99
- ref: (s) => t(H)[m] = s,
100
- active: t(k) === m,
98
+ ref: (r) => t(H)[d] = r,
99
+ active: t(y) === d,
101
100
  class: "px-2",
102
- onClick: (s) => t(U)(o),
103
- onFocus: (s) => k.value = m
101
+ onClick: (r) => t(U)(o),
102
+ onFocus: (r) => y.value = d
104
103
  }, {
105
104
  addon: n(() => [
106
- l(ie, {
105
+ u(ie, {
107
106
  class: "font-bold",
108
107
  method: o.item.httpVerb ?? "get"
109
108
  }, null, 8, ["method"])
@@ -116,29 +115,29 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
116
115
  ]),
117
116
  _: 1
118
117
  }, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, C(t(F), (o) => {
119
- var m;
120
- return a(), d(be, {
118
+ var d;
119
+ return a(), l(be, {
121
120
  key: o.uid,
122
- isDraggable: !r.isReadonly && ((m = o.info) == null ? void 0 : m.title) !== "Drafts",
121
+ isDraggable: !s.isReadonly && ((d = o.info) == null ? void 0 : d.title) !== "Drafts",
123
122
  isDroppable: t(z),
124
- menuItem: u,
123
+ menuItem: m,
125
124
  parentUids: [],
126
125
  uid: o.uid,
127
- onNewTab: e[4] || (e[4] = (s, G) => R("newTab", { name: s, uid: G })),
126
+ onNewTab: e[4] || (e[4] = (r, G) => R("newTab", { name: r, uid: G })),
128
127
  onOnDragEnd: t(T),
129
- onOpenMenu: e[5] || (e[5] = (s) => Object.assign(u, s))
128
+ onOpenMenu: e[5] || (e[5] = (r) => Object.assign(m, r))
130
129
  }, {
131
130
  leftIcon: n(() => {
132
- var s;
131
+ var r;
133
132
  return [
134
- ((s = o.info) == null ? void 0 : s.title) === "Drafts" ? (a(), d(t(q), {
133
+ ((r = o.info) == null ? void 0 : r.title) === "Drafts" ? (a(), l(t(q), {
135
134
  key: 0,
136
135
  class: "text-sidebar-c-2 group-hover:hidden",
137
136
  icon: "Scribble",
138
- thickness: "2.5"
139
- })) : (a(), d(t(fe), {
137
+ thickness: "2.25"
138
+ })) : (a(), l(t(fe), {
140
139
  key: 1,
141
- class: "text-sidebar-c-2 size-3.5 stroke-[2.5] group-hover:hidden",
140
+ class: "text-sidebar-c-2 size-3.5 stroke-[2.25] group-hover:hidden",
142
141
  src: o["x-scalar-icon"] || "interface-content-folder"
143
142
  }, null, 8, ["src"])),
144
143
  i("div", {
@@ -146,10 +145,11 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
146
145
  "rotate-90": t(A)[o.uid]
147
146
  })
148
147
  }, [
149
- l(t(q), {
148
+ u(t(q), {
150
149
  class: "text-c-3 hidden text-sm group-hover:block",
151
150
  icon: "ChevronRight",
152
- size: "sm"
151
+ size: "sm",
152
+ thickness: "2.5"
153
153
  })
154
154
  ], 2)
155
155
  ];
@@ -165,13 +165,13 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
165
165
  "empty-sidebar-item": t(O).length <= 1
166
166
  })
167
167
  }, [
168
- i("div", we, [
169
- i("div", ke, [
170
- l(V, {
171
- art: t(se),
168
+ i("div", ke, [
169
+ i("div", we, [
170
+ u(V, {
171
+ art: t(re),
172
172
  class: "font-bold rabbitsit"
173
173
  }, null, 8, ["art"]),
174
- l(V, {
174
+ u(V, {
175
175
  art: t(ae),
176
176
  class: "font-bold absolute top-0 left-0 rabbitjump"
177
177
  }, null, 8, ["art"])
@@ -181,7 +181,7 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
181
181
  i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
182
182
  ], -1))
183
183
  ]),
184
- r.isReadonly ? $("", !0) : (a(), d(le, {
184
+ s.isReadonly ? $("", !0) : (a(), l(le, {
185
185
  key: 0,
186
186
  click: t(c).commandPalette.emit
187
187
  }, {
@@ -194,24 +194,22 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
194
194
  ]),
195
195
  _: 2
196
196
  }, [
197
- r.isReadonly ? void 0 : {
197
+ s.isReadonly ? void 0 : {
198
198
  name: "header",
199
- fn: n(() => [
200
- l(t(Se), { class: "min-h-11 xl:min-h-header xl:py-2.5 py-1 px-2.5 border-b-1/2" })
201
- ]),
199
+ fn: n(() => []),
202
200
  key: "0"
203
201
  }
204
202
  ]), 1032, ["class", "showSidebar"]), [
205
- [re, r.showSidebar]
203
+ [se, s.showSidebar]
206
204
  ]),
207
- !t(N) && u ? (a(), d(de, {
205
+ !t(N) && m ? (a(), l(de, {
208
206
  key: 0,
209
- menuItem: u,
210
- onCloseMenu: e[9] || (e[9] = (o) => u.open = !1)
207
+ menuItem: m,
208
+ onCloseMenu: e[9] || (e[9] = (o) => m.open = !1)
211
209
  }, null, 8, ["menuItem"])) : $("", !0)
212
210
  ], 64));
213
211
  }
214
212
  });
215
213
  export {
216
- Te as default
214
+ Ke as default
217
215
  };
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import o from "../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-9324d78b"]]);
5
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-d0057f49"]]);
6
6
  export {
7
7
  a as default
8
8
  };