@scalar/api-client 2.2.32 → 2.2.34

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 (90) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  3. package/dist/components/AddressBar/AddressBar.vue2.js +27 -26
  4. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +9 -3
  5. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +62 -54
  7. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +13 -3
  8. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  9. package/dist/components/DataTable/DataTable.vue.js +7 -7
  10. package/dist/components/DataTable/DataTableCell.vue.js +6 -6
  11. package/dist/components/Form/Form.vue.d.ts.map +1 -1
  12. package/dist/components/Form/Form.vue.js +5 -5
  13. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  14. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +72 -71
  15. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  16. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +23 -22
  17. package/dist/components/Search/useSearch.d.ts.map +1 -1
  18. package/dist/components/Search/useSearch.js +61 -48
  19. package/dist/components/SideNav/SideNavLink.vue.js +2 -2
  20. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  21. package/dist/components/Sidebar/Sidebar.vue2.js +5 -5
  22. package/dist/components/Sidebar/SidebarList.vue.js +1 -1
  23. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +1 -1
  24. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  25. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  26. package/dist/components/Sidebar/SidebarListElement.vue2.js +12 -12
  27. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  28. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  29. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  30. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
  31. package/dist/constants.d.ts +4 -0
  32. package/dist/constants.d.ts.map +1 -1
  33. package/dist/constants.js +2 -2
  34. package/dist/layouts/App/create-api-client-app.d.ts +171 -128
  35. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  36. package/dist/layouts/Modal/create-api-client-modal.d.ts +342 -256
  37. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  38. package/dist/layouts/Web/create-api-client-web.d.ts +171 -128
  39. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  40. package/dist/libs/create-client.d.ts +172 -129
  41. package/dist/libs/create-client.d.ts.map +1 -1
  42. package/dist/libs/create-client.js +8 -7
  43. package/dist/libs/find-request.d.ts +2 -0
  44. package/dist/libs/find-request.d.ts.map +1 -1
  45. package/dist/libs/send-request/send-request.d.ts.map +1 -1
  46. package/dist/libs/send-request/send-request.js +93 -93
  47. package/dist/routes.d.ts +1 -0
  48. package/dist/routes.d.ts.map +1 -1
  49. package/dist/routes.js +12 -7
  50. package/dist/store/active-entities.d.ts +29 -27
  51. package/dist/store/active-entities.d.ts.map +1 -1
  52. package/dist/store/collections.d.ts +4 -4
  53. package/dist/store/events.d.ts +3 -1
  54. package/dist/store/events.d.ts.map +1 -1
  55. package/dist/store/request-example.d.ts +134 -134
  56. package/dist/store/request-example.d.ts.map +1 -1
  57. package/dist/store/requests.d.ts +26 -4
  58. package/dist/store/requests.d.ts.map +1 -1
  59. package/dist/store/store.d.ts +174 -129
  60. package/dist/store/store.d.ts.map +1 -1
  61. package/dist/store/store.js +48 -46
  62. package/dist/store/tags.d.ts +24 -4
  63. package/dist/store/tags.d.ts.map +1 -1
  64. package/dist/style.css +1 -1
  65. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  66. package/dist/views/Cookies/CookieForm.vue.js +12 -12
  67. package/dist/views/Cookies/Cookies.vue2.js +12 -12
  68. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  69. package/dist/views/Environment/Environment.vue2.js +98 -97
  70. package/dist/views/Environment/EnvironmentModal.vue.js +1 -1
  71. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +6 -6
  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 +14 -14
  75. package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -2
  76. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  77. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  78. package/dist/views/Request/RequestSidebarItem.vue2.js +132 -125
  79. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  80. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  81. package/dist/views/Request/RequestSubpageHeader.vue2.js +21 -21
  82. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  83. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  84. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +12 -12
  85. package/dist/views/Servers/ServerForm.vue.d.ts +8 -1
  86. package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
  87. package/dist/views/Servers/ServerForm.vue.js +28 -59
  88. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  89. package/dist/views/Servers/Servers.vue2.js +141 -53
  90. package/package.json +13 -13
@@ -1,34 +1,34 @@
1
- import { defineComponent as H, ref as W, computed as c, watch as g, onMounted as K, onUnmounted as G, openBlock as l, createBlock as J, unref as i, withCtx as Q, createElementBlock as a, createCommentVNode as u, createElementVNode as e, normalizeClass as X, Fragment as b, createVNode as d, toDisplayString as Y, createTextVNode as M } from "vue";
1
+ import { defineComponent as H, ref as W, computed as a, watch as _, onMounted as K, onUnmounted as G, openBlock as l, createBlock as J, unref as i, withCtx as Q, createElementBlock as d, createCommentVNode as f, createElementVNode as e, normalizeClass as X, Fragment as b, createVNode as m, toDisplayString as Y, createTextVNode as M } from "vue";
2
2
  import Z from "../CommandPalette/WatchModeToggle.vue.js";
3
3
  import ee from "./ImportNowButton.vue.js";
4
4
  import te from "./IntegrationLogo.vue.js";
5
5
  import oe from "./PrefetchError.vue.js";
6
6
  import se from "./WorkspaceSelector.vue.js";
7
7
  import { useUrlPrefetcher as ne } from "./hooks/useUrlPrefetcher.js";
8
- import { getOpenApiDocumentVersion as U } from "./utils/getOpenApiDocumentVersion.js";
9
- import { isDocument as A } from "./utils/isDocument.js";
10
- import { isUrl as C } from "./utils/isUrl.js";
8
+ import { getOpenApiDocumentVersion as T } from "./utils/getOpenApiDocumentVersion.js";
9
+ import { isDocument as U } from "./utils/isDocument.js";
10
+ import { isUrl as A } from "./utils/isUrl.js";
11
11
  import { useActiveEntities as re } from "../../store/active-entities.js";
12
12
  import { useModal as ie, ScalarModal as le, ScalarIcon as ce } from "@scalar/components";
13
13
  import { isLocalUrl as ae } from "@scalar/oas-utils/helpers";
14
14
  import { normalize as de } from "@scalar/openapi-parser";
15
- import { getThemeStyles as me } from "@scalar/themes";
16
- import { useColorMode as ue } from "@scalar/use-hooks/useColorMode";
15
+ import { getThemeStyles as me, themeIds as ue } from "@scalar/themes";
16
+ import { useColorMode as fe } from "@scalar/use-hooks/useColorMode";
17
17
  import { useRouter as pe } from "vue-router";
18
- import { useWorkspace as fe } from "../../store/store.js";
19
- const ve = ["innerHTML"], he = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden relative md:px-0" }, xe = {
18
+ import { useWorkspace as ve } from "../../store/store.js";
19
+ const he = ["innerHTML"], xe = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden relative md:px-0" }, ye = {
20
20
  key: 0,
21
21
  class: "flex justify-center items-center mb-2 p-1"
22
- }, ye = { class: "rounded-xl size-10" }, _e = ["src"], ge = {
22
+ }, ge = { class: "rounded-xl size-10" }, _e = ["src"], be = {
23
23
  key: 2,
24
24
  class: "text-center text-md font-bold mb-2 line-clamp-1"
25
- }, be = { class: "inline-flex flex-col gap-2 items-center z-10 w-full" }, we = { class: "flex justify-center" }, ke = { class: "inline-flex py-1 px-4 items-center text-xs font-medium text-c-3" }, Ie = {
25
+ }, we = { class: "inline-flex flex-col gap-2 items-center z-10 w-full" }, ke = { class: "flex justify-center" }, Ie = { class: "inline-flex py-1 px-4 items-center text-xs font-medium text-c-3" }, Le = {
26
26
  key: 0,
27
27
  class: "text-sm overflow-hidden mt-5 pt-4 border-t-1/2"
28
- }, Le = { class: "flex items-center justify-center" }, Me = { class: "flex flex-col justify-center items-center pb-8" }, Ue = { class: "text-center flex items-center flex-col" }, Ae = { class: "mb-2 w-10 h-10 border rounded-[10px] flex items-center justify-center" }, Ce = {
28
+ }, Me = { class: "flex items-center justify-center" }, Te = { class: "flex flex-col justify-center items-center pb-8" }, Ue = { class: "text-center flex items-center flex-col" }, Ae = { class: "mb-2 w-10 h-10 border rounded-[10px] flex items-center justify-center" }, Ce = {
29
29
  href: "https://scalar.com/download",
30
30
  target: "_blank"
31
- }, Ge = /* @__PURE__ */ H({
31
+ }, Je = /* @__PURE__ */ H({
32
32
  __name: "ImportCollectionModal",
33
33
  props: {
34
34
  source: {},
@@ -36,10 +36,10 @@ const ve = ["innerHTML"], he = { class: "flex flex-col h-screen justify-center p
36
36
  eventType: {}
37
37
  },
38
38
  emits: ["importFinished"],
39
- setup(T, { emit: P }) {
40
- const s = T, D = P, { activeWorkspace: p } = re(), { workspaceMutators: V, events: j } = fe(), { prefetchResult: n, prefetchUrl: w, resetPrefetchResult: S } = ne(), r = ie(), v = W(!0);
39
+ setup(C, { emit: P }) {
40
+ const s = C, D = P, { activeWorkspace: p } = re(), { workspaceMutators: V, events: j } = ve(), { prefetchResult: n, prefetchUrl: w, resetPrefetchResult: S } = ne(), r = ie(), h = W(!0);
41
41
  j.hotKeys.on(() => r.hide());
42
- const z = c(() => {
42
+ const z = a(() => {
43
43
  try {
44
44
  return de(
45
45
  n.content || s.source || ""
@@ -47,12 +47,12 @@ const ve = ["innerHTML"], he = { class: "flex flex-col h-screen justify-center p
47
47
  } catch {
48
48
  return;
49
49
  }
50
- }), N = c(() => {
50
+ }), N = a(() => {
51
51
  var o, t;
52
52
  return (t = (o = z.value) == null ? void 0 : o.info) == null ? void 0 : t.title;
53
- }), k = c(
54
- () => U(n.content || s.source || "")
55
- ), { darkLightMode: O } = ue(), { currentRoute: $ } = pe(), h = c(() => {
53
+ }), k = a(
54
+ () => T(n.content || s.source || "")
55
+ ), { darkLightMode: O } = fe(), { currentRoute: $ } = pe(), x = a(() => {
56
56
  try {
57
57
  const o = $.value.query, t = O.value === "dark" ? o.dark_logo : o.light_logo;
58
58
  if (t) return decodeURIComponent(t);
@@ -60,54 +60,55 @@ const ve = ["innerHTML"], he = { class: "flex flex-col h-screen justify-center p
60
60
  }
61
61
  return null;
62
62
  });
63
- g(
63
+ _(
64
64
  () => s.source,
65
65
  async (o) => {
66
- var t, m;
67
- if (S(), C(o)) {
66
+ var t, c;
67
+ if (S(), A(o)) {
68
68
  if (s.eventType && ["paste", "drop"].includes(s.eventType)) {
69
- const { error: f } = await w(
69
+ const { error: v } = await w(
70
70
  o,
71
71
  (t = p.value) == null ? void 0 : t.proxyUrl
72
72
  );
73
- f ? r.hide() : r.show();
73
+ v ? r.hide() : r.show();
74
74
  return;
75
75
  }
76
- w(o, (m = p.value) == null ? void 0 : m.proxyUrl), r.show();
76
+ w(o, (c = p.value) == null ? void 0 : c.proxyUrl), r.show();
77
77
  return;
78
78
  }
79
- o && A(o) && U(o) ? r.show() : r.hide();
79
+ o && U(o) && T(o) ? r.show() : r.hide();
80
80
  }
81
81
  );
82
- const E = c(() => !!s.source && C(s.source)), F = c(() => !!s.source && A(s.source)), x = c(() => n.url && ae(n.url)), y = (o) => {
82
+ const E = a(() => !!s.source && A(s.source)), F = a(() => !!s.source && U(s.source)), y = a(() => n.url && ae(n.url)), g = (o) => {
83
83
  document.body.classList.remove("has-no-import-url"), (E.value || F.value) && r.open ? document.body.classList.add("has-import-url") : document.body.classList.remove("has-import-url");
84
84
  }, R = () => {
85
85
  document.body.classList.remove("has-import-url"), document.body.classList.add("has-no-import-url");
86
86
  };
87
- g(
87
+ _(
88
88
  () => r.open,
89
89
  (o) => {
90
- o ? y() : R();
90
+ o ? g() : R();
91
91
  }
92
- ), g(
92
+ ), _(
93
93
  () => s.source,
94
94
  () => {
95
- y();
95
+ g();
96
96
  }
97
97
  ), K(() => {
98
- y();
98
+ g();
99
99
  }), G(() => {
100
100
  document.body.classList.remove("has-import-url"), document.body.classList.remove("has-no-import-url");
101
101
  });
102
- const I = c(
103
- () => p.value && x.value && s.integration && `<style>${me(s.integration)}</style>`
102
+ const I = a(
103
+ () => p.value && y.value && s.integration && `<style>${me(s.integration)}</style>`
104
104
  );
105
105
  function q() {
106
- var o;
107
- x.value && s.integration && V.edit(
108
- ((o = p.value) == null ? void 0 : o.uid) ?? "",
106
+ var c;
107
+ const o = (u) => ue.includes(u), t = s.integration && o(s.integration) ? s.integration : "default";
108
+ y.value && V.edit(
109
+ ((c = p.value) == null ? void 0 : c.uid) ?? "",
109
110
  "themeId",
110
- s.integration
111
+ t
111
112
  ), D("importFinished");
112
113
  }
113
114
  return (o, t) => (l(), J(i(le), {
@@ -115,13 +116,13 @@ const ve = ["innerHTML"], he = { class: "flex flex-col h-screen justify-center p
115
116
  state: i(r)
116
117
  }, {
117
118
  default: Q(() => {
118
- var m, _, f, L;
119
+ var c, u, v, L;
119
120
  return [
120
- I.value ? (l(), a("div", {
121
+ I.value ? (l(), d("div", {
121
122
  key: 0,
122
123
  innerHTML: I.value
123
- }, null, 8, ve)) : u("", !0),
124
- e("div", he, [
124
+ }, null, 8, he)) : f("", !0),
125
+ e("div", xe, [
125
126
  t[6] || (t[6] = e("div", { class: "section-flare" }, [
126
127
  e("div", { class: "section-flare-item" }),
127
128
  e("div", { class: "section-flare-item" }),
@@ -135,57 +136,57 @@ const ve = ["innerHTML"], he = { class: "flex flex-col h-screen justify-center p
135
136
  e("div", {
136
137
  class: X(["flex items-center flex-col m-auto px-8 py-8 rounded-xl border-1/2 max-w-[380px] w-full transition-opacity", { "opacity-0": i(n).state === "loading" }])
137
138
  }, [
138
- i(n).error && i(n).state === "idle" && !k.value ? (l(), a(b, { key: 0 }, [
139
+ i(n).error && i(n).state === "idle" && !k.value ? (l(), d(b, { key: 0 }, [
139
140
  t[1] || (t[1] = e("div", { class: "text-center text-md font-bold mb-2 line-clamp-1" }, " No OpenAPI document found ", -1)),
140
- d(oe, {
141
- url: ((m = i(n)) == null ? void 0 : m.input) || s.source
141
+ m(oe, {
142
+ url: ((c = i(n)) == null ? void 0 : c.input) || s.source
142
143
  }, null, 8, ["url"])
143
- ], 64)) : (l(), a(b, { key: 1 }, [
144
- x.value ? (l(), a("div", xe, [
145
- e("div", ye, [
146
- d(te, { integration: o.integration }, null, 8, ["integration"])
144
+ ], 64)) : (l(), d(b, { key: 1 }, [
145
+ y.value ? (l(), d("div", ye, [
146
+ e("div", ge, [
147
+ m(te, { integration: o.integration }, null, 8, ["integration"])
147
148
  ])
148
- ])) : h.value ? (l(), a("img", {
149
+ ])) : x.value ? (l(), d("img", {
149
150
  key: 1,
150
151
  alt: "Logo",
151
152
  class: "w-full object-contain mb-2",
152
- src: h.value
153
- }, null, 8, _e)) : u("", !0),
154
- h.value ? u("", !0) : (l(), a("div", ge, Y(N.value || "Untitled Collection"), 1)),
153
+ src: x.value
154
+ }, null, 8, _e)) : f("", !0),
155
+ x.value ? f("", !0) : (l(), d("div", be, Y(N.value || "Untitled Collection"), 1)),
155
156
  t[4] || (t[4] = e("div", { class: "text-c-1 text-sm font-medium text-center text-balance" }, " Import the OpenAPI document to instantly send API requests. No signup required. ", -1)),
156
- k.value ? (l(), a(b, { key: 3 }, [
157
- e("div", be, [
158
- d(ee, {
159
- source: ((_ = i(n)) == null ? void 0 : _.url) ?? ((f = i(n)) == null ? void 0 : f.content) ?? o.source,
157
+ k.value ? (l(), d(b, { key: 3 }, [
158
+ e("div", we, [
159
+ m(ee, {
160
+ source: ((u = i(n)) == null ? void 0 : u.url) ?? ((v = i(n)) == null ? void 0 : v.content) ?? o.source,
160
161
  variant: "button",
161
- watchMode: v.value,
162
+ watchMode: h.value,
162
163
  onImportFinished: q
163
164
  }, null, 8, ["source", "watchMode"])
164
165
  ]),
165
- e("div", we, [
166
- e("div", ke, [
166
+ e("div", ke, [
167
+ e("div", Ie, [
167
168
  t[2] || (t[2] = M(" Import to: ")),
168
- d(se)
169
+ m(se)
169
170
  ])
170
171
  ]),
171
- (L = i(n)) != null && L.url ? (l(), a("div", Ie, [
172
- e("div", Le, [
173
- d(Z, {
174
- modelValue: v.value,
175
- "onUpdate:modelValue": t[0] || (t[0] = (B) => v.value = B),
172
+ (L = i(n)) != null && L.url ? (l(), d("div", Le, [
173
+ e("div", Me, [
174
+ m(Z, {
175
+ modelValue: h.value,
176
+ "onUpdate:modelValue": t[0] || (t[0] = (B) => h.value = B),
176
177
  disableToolTip: !0
177
178
  }, null, 8, ["modelValue"])
178
179
  ]),
179
180
  t[3] || (t[3] = e("div", { class: "pt-0 text-center text-balance font-medium text-xs text-c-3" }, " Automatically update your API client when the OpenAPI document content changes. ", -1))
180
- ])) : u("", !0)
181
- ], 64)) : u("", !0)
181
+ ])) : f("", !0)
182
+ ], 64)) : f("", !0)
182
183
  ], 64))
183
184
  ], 2),
184
- e("div", Me, [
185
+ e("div", Te, [
185
186
  e("div", Ue, [
186
187
  e("div", Ae, [
187
188
  e("a", Ce, [
188
- d(i(ce), {
189
+ m(i(ce), {
189
190
  icon: "Logo",
190
191
  size: "xl"
191
192
  })
@@ -210,5 +211,5 @@ const ve = ["innerHTML"], he = { class: "flex flex-col h-screen justify-center p
210
211
  }
211
212
  });
212
213
  export {
213
- Ge as default
214
+ Je as default
214
215
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";AA2bA,wBAKG"}
1
+ {"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";AA6bA,wBAKG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as W, ref as D, openBlock as d, createElementBlock as w, Fragment as k, createElementVNode as s, createVNode as o, unref as e, withCtx as r, renderList as N, createBlock as z, withModifiers as v, normalizeClass as M, toDisplayString as h, withDirectives as B, vModelText as V, createTextVNode as j } from "vue";
1
+ import { defineComponent as W, ref as D, openBlock as m, createElementBlock as w, Fragment as v, createElementVNode as s, createVNode as o, unref as e, withCtx as r, renderList as z, createBlock as N, withModifiers as k, normalizeClass as M, toDisplayString as h, withDirectives as B, vModelText as V, createTextVNode as j } from "vue";
2
2
  import { useActiveEntities as E } from "../../store/active-entities.js";
3
3
  import { useModal as T, ScalarDropdown as $, ScalarDropdownItem as _, ScalarIcon as u, ScalarDropdownDivider as A, ScalarButton as b, ScalarModal as I } from "@scalar/components";
4
4
  import { useToasts as F } from "@scalar/use-toasts";
@@ -7,45 +7,45 @@ import { useWorkspace as P } from "../../store/store.js";
7
7
  const R = { class: "flex items-center text-sm w-[inherit]" }, U = { class: "font-medium m-0 text-sm flex gap-1 items-center" }, q = { class: "line-clamp-1 text-left w-[calc(100%-10px)] text-xs" }, G = { class: "text-ellipsis overflow-hidden" }, H = { class: "flex items-center justify-center h-4 w-4" }, ee = /* @__PURE__ */ W({
8
8
  __name: "WorkspaceSelector",
9
9
  setup(J) {
10
- const { activeWorkspace: i } = E(), { workspaces: g, workspaceMutators: C } = P(), { push: f } = L(), c = T(), { toast: x } = F(), n = D(""), S = (l) => {
10
+ const { activeWorkspace: i } = E(), { workspaces: g, workspaceMutators: C } = P(), { push: f } = L(), c = T(), { toast: x } = F(), l = D(""), y = (n) => {
11
11
  var t;
12
- l !== ((t = i.value) == null ? void 0 : t.uid) && f({
12
+ n !== ((t = i.value) == null ? void 0 : t.uid) && f({
13
13
  name: "workspace",
14
14
  params: {
15
- workspace: l
15
+ workspace: n
16
16
  }
17
17
  });
18
- }, y = () => {
19
- if (!n.value.trim()) {
18
+ }, S = () => {
19
+ if (!l.value.trim()) {
20
20
  x("Please enter a name before creating a workspace.", "error");
21
21
  return;
22
22
  }
23
- const l = C.add({
24
- name: n.value
23
+ const n = C.add({
24
+ name: l.value
25
25
  });
26
- x(`Created new workspace '${l.name}'`), f({
26
+ x(`Created new workspace '${n.name}'`), f({
27
27
  name: "workspace",
28
28
  params: {
29
- workspace: l.uid
29
+ workspace: n.uid
30
30
  }
31
- }), n.value = "", c.hide();
31
+ }), l.value = "", c.hide();
32
32
  };
33
- return (l, t) => (d(), w(k, null, [
33
+ return (n, t) => (m(), w(v, null, [
34
34
  s("div", R, [
35
35
  o(e($), null, {
36
36
  items: r(() => [
37
- (d(!0), w(k, null, N(e(g), (a, p) => (d(), z(e(_), {
37
+ (m(!0), w(v, null, z(e(g), (a, p) => (m(), N(e(_), {
38
38
  key: p,
39
39
  class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
40
- onClick: v((m) => S(p), ["stop"])
40
+ onClick: k((d) => y(p), ["stop"])
41
41
  }, {
42
42
  default: r(() => {
43
- var m;
43
+ var d;
44
44
  return [
45
45
  s("div", {
46
46
  class: M([
47
47
  "flex items-center justify-center rounded-full p-[3px] w-4 h-4",
48
- ((m = e(i)) == null ? void 0 : m.uid) === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
48
+ ((d = e(i)) == null ? void 0 : d.uid) === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
49
49
  ])
50
50
  }, [
51
51
  o(e(u), {
@@ -101,27 +101,28 @@ const R = { class: "flex items-center text-sm w-[inherit]" }, U = { class: "font
101
101
  })
102
102
  ]),
103
103
  o(e(I), {
104
- bodyClass: "!m-0 !p-1",
104
+ bodyClass: "m-0 p-1 rounded-lg border-t-0",
105
+ class: "absolute z-overlay",
105
106
  size: "xxs",
106
107
  state: e(c),
107
108
  variant: "form"
108
109
  }, {
109
110
  default: r(() => [
110
111
  s("form", {
111
- class: "flex gap-1 rounded",
112
- onSubmit: v(y, ["prevent"])
112
+ class: "flex gap-1",
113
+ onSubmit: k(S, ["prevent"])
113
114
  }, [
114
115
  B(s("input", {
115
- "onUpdate:modelValue": t[1] || (t[1] = (a) => n.value = a),
116
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => l.value = a),
116
117
  class: "border-none outline-none flex-1 w-full text-sm min-h-8 p-1.5",
117
118
  placeholder: "New Workspace",
118
119
  type: "text"
119
120
  }, null, 512), [
120
- [V, n.value]
121
+ [V, l.value]
121
122
  ]),
122
123
  o(e(b), {
123
124
  class: "max-h-8 text-xs p-0 px-3",
124
- disabled: !n.value.trim(),
125
+ disabled: !l.value.trim(),
125
126
  type: "submit"
126
127
  }, {
127
128
  default: r(() => t[3] || (t[3] = [
@@ -1 +1 @@
1
- {"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAIA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAMd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;;;iCA4FsB,UAAU;eAjGrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;MA4F0C;sBAxDjC,IAAI;;;uCAae,IAAI,GAAG,MAAM;;EAyExD"}
1
+ {"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAIA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAUd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;;;iCAkHsB,UAAU;eAvHrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;MAkH0C;sBAxDjC,IAAI;;;uCAae,IAAI,GAAG,MAAM;;EAyExD"}
@@ -1,17 +1,30 @@
1
- import { useActiveEntities as x } from "../../store/active-entities.js";
2
- import { isDefined as A } from "@scalar/oas-utils/helpers";
3
- import D from "fuse.js";
4
- import { ref as a, watch as d, computed as R, nextTick as E } from "vue";
5
- import { useRouter as I } from "vue-router";
6
- import { useWorkspace as C } from "../../store/store.js";
7
- function P() {
8
- const k = I(), { activeWorkspace: S, activeWorkspaceRequests: i } = x(), { requests: b } = C(), u = a([]), c = a([]), s = a(0), l = a(""), n = a(null), v = a([]), h = new D(u.value, {
1
+ import { useActiveEntities as H } from "../../store/active-entities.js";
2
+ import { isDefined as k, shouldIgnoreEntity as S } from "@scalar/oas-utils/helpers";
3
+ import L from "fuse.js";
4
+ import { ref as o, watch as y, computed as I, nextTick as M } from "vue";
5
+ import { useRouter as V } from "vue-router";
6
+ import { useWorkspace as $ } from "../../store/store.js";
7
+ function K() {
8
+ const T = V(), {
9
+ activeWorkspace: b,
10
+ activeWorkspaceRequests: h,
11
+ activeWorkspaceCollections: W
12
+ } = H(), { requests: w, tags: E } = $(), u = o([]), r = o([]), a = o(0), n = o(""), c = o(null), f = o([]), m = new L(u.value, {
9
13
  keys: ["title", "description", "body"]
10
- }), g = () => {
11
- l.value = "", s.value = 0, c.value = [], n.value instanceof HTMLInputElement && n.value.blur();
12
- }, y = (e) => {
13
- u.value = e.map((t) => {
14
- var o;
14
+ }), x = () => {
15
+ n.value = "", a.value = 0, r.value = [], c.value instanceof HTMLInputElement && c.value.blur();
16
+ }, A = (e) => {
17
+ u.value = e.filter((t) => S(t)).filter((t) => {
18
+ var g;
19
+ const s = (g = W.value) == null ? void 0 : g.find(
20
+ (l) => l.requests.includes(t.uid)
21
+ );
22
+ return !!!(s != null && s.tags.map((l) => E[l]).filter(k).filter((l) => {
23
+ var R;
24
+ return (R = t.tags) == null ? void 0 : R.includes(l.name);
25
+ }).filter((l) => S(l)).length);
26
+ }).map((t) => {
27
+ var s;
15
28
  return {
16
29
  id: t.uid,
17
30
  title: t.summary ?? t.method,
@@ -19,58 +32,58 @@ function P() {
19
32
  httpVerb: t.method,
20
33
  path: t.path,
21
34
  // TODO: Use router instead
22
- link: `/workspace/${(o = S.value) == null ? void 0 : o.uid}/request/${t.uid}`
35
+ link: `/workspace/${(s = b.value) == null ? void 0 : s.uid}/request/${t.uid}`
23
36
  };
24
- }), h.setCollection(u.value);
25
- }, m = () => {
26
- s.value = 0, c.value = h.search(l.value);
37
+ }), m.setCollection(u.value);
38
+ }, p = () => {
39
+ a.value = 0, r.value = m.search(n.value);
27
40
  };
28
- d(l, (e) => {
29
- e.length ? m() : c.value = [];
41
+ y(n, (e) => {
42
+ e.length ? p() : r.value = [];
30
43
  });
31
- const w = (e) => {
32
- const t = e === "up" ? -1 : 1, o = r.value.length;
33
- s.value = (s.value + t + o) % o, E(() => {
34
- const f = v.value[s.value];
35
- f instanceof HTMLElement && f.scrollIntoView({
44
+ const C = (e) => {
45
+ const t = e === "up" ? -1 : 1, s = i.value.length;
46
+ a.value = (a.value + t + s) % s, M(() => {
47
+ const v = f.value[a.value];
48
+ v instanceof HTMLElement && v.scrollIntoView({
36
49
  behavior: "smooth",
37
50
  block: "center"
38
51
  });
39
52
  });
40
- }, T = () => {
41
- if (s.value >= 0) {
42
- const e = r.value[s.value];
43
- e && p(e);
53
+ }, D = () => {
54
+ if (a.value >= 0) {
55
+ const e = i.value[a.value];
56
+ e && d(e);
44
57
  }
45
- }, W = R(
46
- () => i.value.map((e) => b[e]).filter(A)
58
+ }, F = I(
59
+ () => h.value.map((e) => w[e]).filter(k)
47
60
  );
48
- d(
49
- i,
61
+ y(
62
+ h,
50
63
  () => {
51
- y(W.value);
64
+ A(F.value);
52
65
  },
53
66
  { immediate: !0 }
54
67
  );
55
- const p = (e) => {
56
- k.push(e.item.id), g();
57
- }, r = R(
58
- () => l.value.length === 0 ? u.value.map((e) => ({
68
+ const d = (e) => {
69
+ T.push(e.item.id), x();
70
+ }, i = I(
71
+ () => n.value.length === 0 ? u.value.map((e) => ({
59
72
  item: e
60
- })) : c.value
73
+ })) : r.value
61
74
  );
62
75
  return {
63
- searchText: l,
64
- searchResultsWithPlaceholderResults: r,
65
- selectedSearchResult: s,
66
- onSearchResultClick: p,
67
- fuseSearch: m,
68
- searchInputRef: n,
69
- searchResultRefs: v,
70
- navigateSearchResults: w,
71
- selectSearchResult: T
76
+ searchText: n,
77
+ searchResultsWithPlaceholderResults: i,
78
+ selectedSearchResult: a,
79
+ onSearchResultClick: d,
80
+ fuseSearch: p,
81
+ searchInputRef: c,
82
+ searchResultRefs: f,
83
+ navigateSearchResults: C,
84
+ selectSearchResult: D
72
85
  };
73
86
  }
74
87
  export {
75
- P as useSearch
88
+ K as useSearch
76
89
  };
@@ -11,8 +11,8 @@ const h = /* @__PURE__ */ a({
11
11
  setup(f) {
12
12
  const { layout: n } = d();
13
13
  return (e, w) => (r(), i(m(e.is ?? "a"), {
14
- class: s(["hover:bg-b-3 no-underline min-w-[37px] max-w-[37px] flex items-center justify-center rounded-lg p-2", {
15
- "bg-b-3 transition-none hover:cursor-auto text-c-1": e.active,
14
+ class: s(["hover:bg-b-2 no-underline min-w-[37px] max-w-[37px] flex items-center justify-center rounded-lg p-2", {
15
+ "bg-b-2 transition-none hover:cursor-auto text-c-1": e.active,
16
16
  "sm:min-w-max sm:max-w-max sm:rounded sm:py-1.5": o(n) === "web"
17
17
  }])
18
18
  }, {
@@ -1,7 +1,7 @@
1
1
  import o from "./Sidebar.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ba6d2e30"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9571ad76"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -3,7 +3,7 @@ import { useBreakpoints as z } from "@scalar/use-hooks/useBreakpoints";
3
3
  import { useWorkspace as B } from "../../store/store.js";
4
4
  const C = {
5
5
  key: 0,
6
- class: "min-h-12 xl:min-h-client-header flex items-center justify-between px-3 py-1.5 md:px-4 md:py-2.5 text-sm"
6
+ class: "min-h-12 xl:min-h-client-header flex items-center justify-between px-3 py-1.5 md:px-[18px] md:py-2.5 text-sm"
7
7
  }, I = { class: "font-medium m-0 text-sm whitespace-nowrap" }, O = { class: "relative z-10 pt-0 md:px-2.5 md:pb-2.5 sticky bottom-0 w-[inherit] has-[.empty-sidebar-item]:border-t-1/2" }, V = /* @__PURE__ */ S({
8
8
  __name: "Sidebar",
9
9
  props: {
@@ -11,14 +11,14 @@ const C = {
11
11
  isSidebarOpen: { type: Boolean, default: !0 }
12
12
  },
13
13
  setup(y) {
14
- const w = y, { isReadOnly: c, sidebarWidth: o, setSidebarWidth: i } = B(), a = g(!1), p = g(null), { breakpoints: d } = z(), k = (e) => {
14
+ const w = y, { isReadOnly: c, sidebarWidth: o, setSidebarWidth: i } = B(), a = g(!1), p = g(null), { breakpoints: d } = z(), x = (e) => {
15
15
  e.preventDefault();
16
- const f = e.clientX, x = parseInt(
16
+ const f = e.clientX, k = parseInt(
17
17
  getComputedStyle(p.value).width || o.value,
18
18
  10
19
19
  ), v = (E) => {
20
20
  a.value = !0, document.body.classList.add("dragging");
21
- let t = x + E.clientX - f;
21
+ let t = k + E.clientX - f;
22
22
  t > 420 && (t = 420 + (t - 420) * 0.2), t < 240 && (t = 240), i(`${t}px`);
23
23
  }, b = () => {
24
24
  a.value = !1, document.body.classList.remove("dragging"), document.documentElement.removeEventListener("mousemove", v, !1), document.documentElement.removeEventListener("mouseup", b, !1), parseInt(o.value, 10) > 420 ? i("360px") : parseInt(o.value, 10) < 240 && i("240px");
@@ -49,7 +49,7 @@ const C = {
49
49
  ]),
50
50
  r("div", {
51
51
  class: "resizer",
52
- onMousedown: k
52
+ onMousedown: x
53
53
  }, null, 32)
54
54
  ], 64)) : u("", !0)
55
55
  ], 6)), [
@@ -1,6 +1,6 @@
1
1
  import { openBlock as o, createElementBlock as t, renderSlot as r } from "vue";
2
2
  import c from "../../_virtual/_plugin-vue_export-helper.js";
3
- const s = {}, l = { class: "flex flex-col gap-px px-3 pb-[75px]" };
3
+ const s = {}, l = { class: "gap-1/2 flex flex-col px-3 pb-[75px]" };
4
4
  function n(e, f) {
5
5
  return o(), t("ul", l, [
6
6
  r(e.$slots, "default")
@@ -12,7 +12,7 @@ type __VLS_Props = {
12
12
  isDeletable?: boolean;
13
13
  isCopyable?: boolean;
14
14
  isRenameable?: boolean;
15
- type: 'environment' | 'cookies' | 'server';
15
+ type: 'environment' | 'cookies' | 'servers';
16
16
  };
17
17
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
18
18
  delete: (id: string) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":"AAqHA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,oBAAoB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB,CAAA;IACD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAA;CAC3C,CAAC;;;;;;;;;;AAuNF,wBAQG"}
1
+ {"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":"AAwHA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,oBAAoB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB,CAAA;IACD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,SAAS,CAAA;CAC5C,CAAC;;;;;;;;;;AA0NF,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./SidebarListElement.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4713d7d0"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b9e543a3"]]);
5
5
  export {
6
- a as default
6
+ m as default
7
7
  };