@scalar/api-client 2.0.46 → 2.0.48

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 (93) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +77 -71
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -1
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  8. package/dist/components/CodeInput/CodeInput.vue2.js +49 -44
  9. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  11. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +97 -106
  12. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  13. package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
  14. package/dist/components/HttpMethod/HttpMethod.vue2.js +10 -10
  15. package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
  16. package/dist/components/Search/SearchModal.vue.js +1 -1
  17. package/dist/components/Search/SearchModal.vue2.js +43 -41
  18. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  19. package/dist/components/SideNav/SideNav.vue.js +1 -1
  20. package/dist/components/SideNav/SideNav.vue2.js +22 -19
  21. package/dist/components/Sidebar/Sidebar.vue.d.ts +24 -3
  22. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  23. package/dist/components/Sidebar/Sidebar.vue.js +57 -19
  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 +1 -1
  27. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -0
  28. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  29. package/dist/components/Sidebar/SidebarListElementActions.vue.js +22 -21
  30. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  31. package/dist/components/TopNav/TopNav.vue.js +1 -1
  32. package/dist/components/TopNav/TopNav.vue2.js +46 -43
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +9 -9
  36. package/dist/layouts/App/ApiClientApp.vue.js +1 -1
  37. package/dist/layouts/App/create-api-client-app.d.ts +56 -46
  38. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  39. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  40. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  41. package/dist/layouts/Modal/ApiClientModal.vue2.js +20 -20
  42. package/dist/layouts/Modal/create-api-client-modal.d.ts +112 -92
  43. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  44. package/dist/libs/create-client.d.ts +56 -46
  45. package/dist/libs/create-client.d.ts.map +1 -1
  46. package/dist/libs/event-busses/{command-palette.d.ts → command-palette-bus.d.ts} +1 -1
  47. package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -0
  48. package/dist/libs/event-busses/{execute-requestBus.d.ts → execute-request-bus.d.ts} +1 -1
  49. package/dist/libs/event-busses/execute-request-bus.d.ts.map +1 -0
  50. package/dist/libs/event-busses/hot-keys-bus.d.ts +33 -0
  51. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -0
  52. package/dist/libs/event-busses/hot-keys-bus.js +33 -0
  53. package/dist/libs/event-busses/index.d.ts +3 -3
  54. package/dist/libs/event-busses/index.d.ts.map +1 -1
  55. package/dist/libs/event-busses/index.js +3 -3
  56. package/dist/libs/index.js +3 -3
  57. package/dist/libs/local-storage.d.ts +1 -1
  58. package/dist/libs/local-storage.d.ts.map +1 -1
  59. package/dist/libs/local-storage.js +15 -30
  60. package/dist/router.d.ts +2 -2
  61. package/dist/router.d.ts.map +1 -1
  62. package/dist/router.js +3 -3
  63. package/dist/store/workspace.d.ts +112 -92
  64. package/dist/store/workspace.d.ts.map +1 -1
  65. package/dist/store/workspace.js +140 -137
  66. package/dist/style.css +1 -1
  67. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  68. package/dist/views/Cookies/CookieForm.vue.js +14 -15
  69. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  70. package/dist/views/Cookies/Cookies.vue2.js +114 -55
  71. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  72. package/dist/views/Environment/Environment.vue2.js +21 -20
  73. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  74. package/dist/views/Request/Request.vue.js +1 -1
  75. package/dist/views/Request/Request.vue2.js +132 -128
  76. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  77. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  78. package/dist/views/Request/RequestSidebarItem.vue2.js +253 -139
  79. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +27 -5
  80. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  81. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  82. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +83 -158
  83. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  84. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  85. package/dist/views/Request/components/WorkspaceDropdown.vue.js +214 -70
  86. package/package.json +6 -6
  87. package/dist/libs/event-busses/command-palette.d.ts.map +0 -1
  88. package/dist/libs/event-busses/execute-requestBus.d.ts.map +0 -1
  89. package/dist/libs/event-busses/hot-key.d.ts +0 -34
  90. package/dist/libs/event-busses/hot-key.d.ts.map +0 -1
  91. package/dist/libs/event-busses/hot-key.js +0 -25
  92. /package/dist/libs/event-busses/{command-palette.js → command-palette-bus.js} +0 -0
  93. /package/dist/libs/event-busses/{execute-requestBus.js → execute-request-bus.js} +0 -0
@@ -1,32 +1,31 @@
1
- import { defineComponent as K, ref as u, computed as N, onMounted as F, onBeforeUnmount as I, openBlock as a, createElementBlock as s, Fragment as d, withDirectives as k, createElementVNode as c, vShow as L, unref as p, createVNode as S, vModelText as q, renderList as V, toDisplayString as B, normalizeClass as T, createTextVNode as U, createCommentVNode as G, createBlock as H, resolveDynamicComponent as O } from "vue";
2
- import { useModal as Q, ScalarIcon as g } from "@scalar/components";
3
- import { useMagicKeys as j, whenever as b } from "@vueuse/core";
1
+ import { defineComponent as M, ref as d, computed as N, onMounted as F, onBeforeUnmount as q, openBlock as n, createElementBlock as s, Fragment as f, withDirectives as h, createElementVNode as m, vShow as x, unref as p, createVNode as w, vModelText as K, renderList as P, toDisplayString as B, normalizeClass as T, createTextVNode as U, createCommentVNode as H, createBlock as G, resolveDynamicComponent as Q } from "vue";
2
+ import { useModal as j, ScalarIcon as y } from "@scalar/components";
4
3
  import { useRouter as J } from "vue-router";
5
- import { isMacOS as X } from "@scalar/use-tooltip";
6
- import { useWorkspace as Y } from "../../store/workspace.js";
7
- import Z from "./CommandPaletteCollection.vue.js";
8
- import ee from "./CommandPaletteExample.vue.js";
9
- import oe from "./CommandPaletteFolder.vue.js";
10
- import te from "./CommandPaletteImport.vue.js";
11
- import ne from "./CommandPaletteRequest.vue.js";
12
- import ae from "./CommandPaletteWorkspace.vue.js";
13
- import { commandPaletteBus as M } from "../../libs/event-busses/command-palette.js";
14
- const le = { class: "commandmenu" }, re = { class: "bg-b-2 flex items-center rounded mb-2 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, se = { for: "commandmenu" }, me = ["onClick"], ce = {
4
+ import { useWorkspace as O } from "../../store/workspace.js";
5
+ import X from "./CommandPaletteCollection.vue.js";
6
+ import Y from "./CommandPaletteExample.vue.js";
7
+ import Z from "./CommandPaletteFolder.vue.js";
8
+ import ee from "./CommandPaletteImport.vue.js";
9
+ import oe from "./CommandPaletteRequest.vue.js";
10
+ import te from "./CommandPaletteWorkspace.vue.js";
11
+ import { commandPaletteBus as E } from "../../libs/event-busses/command-palette-bus.js";
12
+ import { hotKeyBus as I } from "../../libs/event-busses/hot-keys-bus.js";
13
+ const ne = { class: "commandmenu" }, ae = { class: "bg-b-2 flex items-center rounded mb-2 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, le = { for: "commandmenu" }, se = ["onClick"], ce = {
15
14
  key: 0,
16
15
  class: "text-c-3 text-center text-sm p-2 pt-3"
17
- }, ie = {
16
+ }, me = {
18
17
  name: "TheCommandPalette"
19
- }, ue = {
20
- "Import Collection": te,
21
- "Create Request": ne,
22
- "Create Workspace": ae,
23
- "Add Folder": oe,
24
- "Create Collection": Z,
25
- "Add Example": ee
26
- }, Se = /* @__PURE__ */ K({
27
- ...ie,
28
- setup(de) {
29
- const w = [
18
+ }, re = {
19
+ "Import Collection": ee,
20
+ "Create Request": oe,
21
+ "Create Workspace": te,
22
+ "Add Folder": Z,
23
+ "Create Collection": X,
24
+ "Add Example": Y
25
+ }, ye = /* @__PURE__ */ M({
26
+ ...me,
27
+ setup(ie) {
28
+ const C = [
30
29
  {
31
30
  label: "Add to Request Sidebar",
32
31
  commands: [
@@ -76,140 +75,132 @@ const le = { class: "commandmenu" }, re = { class: "bg-b-2 flex items-center rou
76
75
  }
77
76
  ]
78
77
  }
79
- ], v = j(), l = Q(), { push: P } = J(), { activeWorkspace: W } = Y(), A = u(), i = u(""), m = u(null), o = u(-1), _ = u([]), f = N(
80
- () => w.reduce((e, n) => {
81
- const t = n.commands.filter(
82
- (C) => C.name.toLowerCase().includes(i.value.toLowerCase())
78
+ ], r = j(), { push: V } = J(), { activeWorkspace: W } = O(), S = d(), i = d(""), u = d(null), a = d(-1), $ = d([]), k = N(
79
+ () => C.reduce((e, t) => {
80
+ const o = t.commands.filter(
81
+ (c) => c.name.toLowerCase().includes(i.value.toLowerCase())
83
82
  );
84
- return [...e, ...t];
83
+ return [...e, ...o];
85
84
  }, [])
86
- ), h = () => {
87
- l.hide(), i.value = "", m.value = null, window.removeEventListener("keydown", y, !0), o.value = -1;
88
- };
89
- b(v.escape, () => {
90
- l.open && h();
91
- }), b(v.enter, () => {
92
- if (!l.open || o.value === -1) return;
93
- const e = f.value[o.value];
94
- $(e);
95
- }), b(v.ArrowDown, () => {
96
- var e;
97
- l.open && (o.value < f.value.length - 1 ? o.value++ : o.value = 0, (e = _.value[o.value]) == null || e.scrollIntoView({
98
- behavior: "smooth",
99
- block: "center"
100
- }));
101
- }), b(v.ArrowUp, () => {
102
- var e;
103
- l.open && (o.value > 0 ? o.value-- : o.value = f.value.length - 1, (e = _.value[o.value]) == null || e.scrollIntoView({
104
- behavior: "smooth",
105
- block: "center"
106
- }));
107
- });
108
- const $ = (e) => {
109
- "path" in e ? (P(`/workspace/${W.value.uid}${e.path}`), h()) : m.value = e.name;
110
- }, D = u(), R = ({
85
+ ), v = () => {
86
+ r.hide(), i.value = "", u.value = null, a.value = -1;
87
+ }, A = (e) => {
88
+ "path" in e ? (V(`/workspace/${W.value.uid}${e.path}`), v()) : u.value = e.name;
89
+ }, R = d(), g = ({
111
90
  commandName: e,
112
- metaData: n
91
+ metaData: t
113
92
  } = {}) => {
114
- var t;
115
- m.value = e ?? null, A.value = n, l.show(), (t = D.value) == null || t.focus(), window.addEventListener("keydown", y, !0);
116
- };
117
- F(() => M.on(R)), I(() => M.off(R));
118
- const z = (e) => X() ? e.metaKey && e.key === "Enter" : e.ctrlKey && e.key === "Enter", y = (e) => {
119
- z(e) && !m.value && (e.stopPropagation(), e.preventDefault());
93
+ var o;
94
+ u.value = e ?? null, S.value = t, r.show(), (o = R.value) == null || o.focus();
95
+ }, L = (e) => {
96
+ var c;
97
+ if (!r.open) return;
98
+ const t = e === "up" ? -1 : 1, o = k.value.length;
99
+ a.value = (a.value + t + o) % o, (c = $.value[a.value]) == null || c.scrollIntoView({
100
+ behavior: "smooth",
101
+ block: "center"
102
+ });
103
+ }, z = () => {
104
+ if (a.value === -1) return;
105
+ const e = k.value[a.value];
106
+ A(e);
107
+ }, D = (e) => {
108
+ r.open && (e.closeModal && v(), e.commandPaletteUp && L("up"), e.commandPaletteDown && L("down"), e.commandPaletteSelect && z());
120
109
  };
121
- return I(() => {
122
- window.removeEventListener("keydown", y, !0);
123
- }), (e, n) => (a(), s(d, null, [
124
- k(c("div", {
110
+ return F(() => {
111
+ E.on(g), I.on(D);
112
+ }), q(() => {
113
+ E.off(g), I.off(D);
114
+ }), (e, t) => (n(), s(f, null, [
115
+ h(m("div", {
125
116
  class: "commandmenu-clickout",
126
- onClick: n[0] || (n[0] = (t) => h())
117
+ onClick: t[0] || (t[0] = (o) => v())
127
118
  }, null, 512), [
128
- [L, p(l).open]
119
+ [x, p(r).open]
129
120
  ]),
130
- k(c("div", le, [
131
- m.value ? (a(), s(d, { key: 1 }, [
132
- c("button", {
121
+ h(m("div", ne, [
122
+ u.value ? (n(), s(f, { key: 1 }, [
123
+ m("button", {
133
124
  class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 m-1.5 z-10",
134
125
  type: "button",
135
- onClick: n[2] || (n[2] = (t) => m.value = null)
126
+ onClick: t[2] || (t[2] = (o) => u.value = null)
136
127
  }, [
137
- S(p(g), {
128
+ w(p(y), {
138
129
  icon: "ChevronLeft",
139
130
  size: "md",
140
131
  thickness: "1.5"
141
132
  })
142
133
  ]),
143
- (a(), H(O(ue[m.value]), {
144
- metaData: A.value,
145
- onClose: h
134
+ (n(), G(Q(re[u.value]), {
135
+ metaData: S.value,
136
+ onClose: v
146
137
  }, null, 40, ["metaData"]))
147
- ], 64)) : (a(), s(d, { key: 0 }, [
148
- c("div", re, [
149
- c("label", se, [
150
- S(p(g), {
138
+ ], 64)) : (n(), s(f, { key: 0 }, [
139
+ m("div", ae, [
140
+ m("label", le, [
141
+ w(p(y), {
151
142
  class: "text-c-1 mr-2.5",
152
143
  icon: "Search",
153
144
  size: "sm",
154
145
  thickness: "1.5"
155
146
  })
156
147
  ]),
157
- k(c("input", {
148
+ h(m("input", {
158
149
  id: "commandmenu",
159
150
  ref_key: "commandInputRef",
160
- ref: D,
161
- "onUpdate:modelValue": n[1] || (n[1] = (t) => i.value = t),
151
+ ref: R,
152
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => i.value = o),
162
153
  autocomplete: "off",
163
154
  autofocus: "",
164
155
  class: "w-full rounded bg-none border-none py-1.5 text-sm focus:outline-none",
165
156
  placeholder: "Search commands...",
166
157
  type: "text"
167
158
  }, null, 512), [
168
- [q, i.value]
159
+ [K, i.value]
169
160
  ])
170
161
  ]),
171
- (a(), s(d, null, V(w, (t, C) => (a(), s(d, {
172
- key: t.label
162
+ (n(), s(f, null, P(C, (o, c) => (n(), s(f, {
163
+ key: o.label
173
164
  }, [
174
- k(c("div", { class: "text-c-3 font-medium text-xs mt-2" }, B(t.label), 513), [
165
+ h(m("div", { class: "text-c-3 font-medium text-xs mt-2" }, B(o.label), 513), [
175
166
  [
176
- L,
177
- t.commands.filter(
178
- (r) => r.name.toLowerCase().includes(i.value.toLowerCase())
167
+ x,
168
+ o.commands.filter(
169
+ (l) => l.name.toLowerCase().includes(i.value.toLowerCase())
179
170
  ).length > 0
180
171
  ]
181
172
  ]),
182
- (a(!0), s(d, null, V(t.commands.filter(
183
- (r) => r.name.toLowerCase().includes(i.value.toLowerCase())
184
- ), (r, x) => (a(), s("div", {
185
- key: r.name,
173
+ (n(!0), s(f, null, P(o.commands.filter(
174
+ (l) => l.name.toLowerCase().includes(i.value.toLowerCase())
175
+ ), (l, _) => (n(), s("div", {
176
+ key: l.name,
186
177
  ref_for: !0,
187
- ref: (E) => {
188
- E && (_.value[x] = E);
178
+ ref: (b) => {
179
+ b && ($.value[_] = b);
189
180
  },
190
181
  class: T(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
191
- "bg-b-2": C > 0 ? o.value === x + w[C - 1].commands.length : o.value === x
182
+ "bg-b-2": c > 0 ? a.value === _ + C[c - 1].commands.length : a.value === _
192
183
  }]),
193
- onClick: (E) => $(r)
184
+ onClick: (b) => A(l)
194
185
  }, [
195
- S(p(g), {
186
+ w(p(y), {
196
187
  class: "text-c-1 mr-2.5",
197
- icon: r.icon,
188
+ icon: l.icon,
198
189
  size: "md",
199
190
  thickness: "1.5"
200
191
  }, null, 8, ["icon"]),
201
- U(" " + B(r.name), 1)
202
- ], 10, me))), 128))
192
+ U(" " + B(l.name), 1)
193
+ ], 10, se))), 128))
203
194
  ], 64))), 64)),
204
- f.value.length ? G("", !0) : (a(), s("div", ce, " No commands found "))
195
+ k.value.length ? H("", !0) : (n(), s("div", ce, " No commands found "))
205
196
  ], 64))
206
197
  ], 512), [
207
- [L, p(l).open]
198
+ [x, p(r).open]
208
199
  ])
209
200
  ], 64));
210
201
  }
211
202
  });
212
203
  export {
213
- ue as PaletteComponents,
214
- Se as default
204
+ re as PaletteComponents,
205
+ ye as default
215
206
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":";eA0Ge,OAAO;YACV,MAAM;iBACD,OAAO;;;;;;;;eAFT,OAAO;YACV,MAAM;iBACD,OAAO;;;;;;;;cAFT,OAAO;gBAEL,OAAO;;AA+HxB,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":";eA0Ge,OAAO;YACV,MAAM;iBACD,OAAO;;;;;;;;eAFT,OAAO;YACV,MAAM;iBACD,OAAO;;;;;;;;cAFT,OAAO;gBAEL,OAAO;;AAgIxB,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import t from "./HttpMethod.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-0bfd62ac"]]);
4
+ const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-5fe98831"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as S, computed as s, openBlock as m, createBlock as g, unref as t, withCtx as y, createElementVNode as l, normalizeClass as r, toDisplayString as c, createElementBlock as q } from "vue";
2
- import { ScalarListbox as k } from "@scalar/components";
3
- import { getRequest as x, REQUEST_METHODS as B } from "@scalar/oas-utils/helpers";
4
- import { cva as w, cx as p } from "cva";
1
+ import { defineComponent as S, computed as s, openBlock as p, createBlock as g, unref as t, withCtx as y, createElementVNode as l, normalizeClass as r, toDisplayString as c, createElementBlock as q } from "vue";
2
+ import { ScalarListbox as w } from "@scalar/components";
3
+ import { getRequest as k, REQUEST_METHODS as x } from "@scalar/oas-utils/helpers";
4
+ import { cva as B, cx as m } from "cva";
5
5
  const O = /* @__PURE__ */ S({
6
6
  __name: "HttpMethod",
7
7
  props: {
@@ -11,7 +11,7 @@ const O = /* @__PURE__ */ S({
11
11
  },
12
12
  emits: ["change"],
13
13
  setup(f, { emit: b }) {
14
- const i = f, h = b, o = s(() => x(i.method)), n = Object.entries(B).map(
14
+ const i = f, h = b, o = s(() => k(i.method)), n = Object.entries(x).map(
15
15
  ([e, { short: a }]) => ({
16
16
  id: e,
17
17
  label: e.charAt(0) + e.toLowerCase().slice(1)
@@ -19,7 +19,7 @@ const O = /* @__PURE__ */ S({
19
19
  ), d = s({
20
20
  get: () => n.find(({ id: e }) => e === i.method),
21
21
  set: (e) => (e == null ? void 0 : e.id) && h("change", e.id)
22
- }), u = w({
22
+ }), u = B({
23
23
  base: "text-center font-code text-3xs justify-center items-center flex",
24
24
  variants: {
25
25
  isSquare: {
@@ -32,7 +32,7 @@ const O = /* @__PURE__ */ S({
32
32
  }
33
33
  }
34
34
  }), v = s(() => o.value.short);
35
- return (e, a) => e.isEditable ? (m(), g(t(k), {
35
+ return (e, a) => e.isEditable ? (p(), g(t(w), {
36
36
  key: 0,
37
37
  modelValue: d.value,
38
38
  "onUpdate:modelValue": a[0] || (a[0] = (E) => d.value = E),
@@ -43,7 +43,7 @@ const O = /* @__PURE__ */ S({
43
43
  class: r(["h-full", { "pointer-events-none": !e.isEditable }])
44
44
  }, [
45
45
  l("button", {
46
- class: r(["relative h-full", t(p)(t(u)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
46
+ class: r(["relative h-full", t(m)(t(u)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
47
47
  type: "button"
48
48
  }, [
49
49
  l("span", null, c(v.value), 1)
@@ -51,9 +51,9 @@ const O = /* @__PURE__ */ S({
51
51
  ], 2)
52
52
  ]),
53
53
  _: 1
54
- }, 8, ["modelValue", "options"])) : (m(), q("div", {
54
+ }, 8, ["modelValue", "options"])) : (p(), q("div", {
55
55
  key: 1,
56
- class: r(["relative gap-1", t(p)(t(u)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
56
+ class: r(["relative gap-1 whitespace-nowrap", t(m)(t(u)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
57
57
  type: "button"
58
58
  }, c(o.value.short), 3));
59
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchModal.vue"],"names":[],"mappings":"AAoPA,OAAO,EACL,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAA;;gBASb,UAAU;;gBAAV,UAAU;;AAsWxB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchModal.vue"],"names":[],"mappings":"AA2PA,OAAO,EACL,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAA;;gBAUb,UAAU;;gBAAV,UAAU;;AA4WxB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SearchModal.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-67d6f77b"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-905c8bd2"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,25 +1,35 @@
1
- import { defineComponent as y, ref as i, watch as _, computed as C, openBlock as w, createBlock as E, unref as d, withCtx as r, createElementVNode as h, createVNode as R, createTextVNode as m, toDisplayString as p, createElementBlock as F, Fragment as N, renderList as A, createSlots as D, pushScopeId as T, popScopeId as W } from "vue";
2
- import { useWorkspace as L } from "../../store/workspace.js";
3
- import { ScalarModal as U, ScalarSearchInput as j, ScalarSearchResultList as H, ScalarSearchResultItem as K } from "@scalar/components";
4
- import { useMagicKeys as O, whenever as g } from "@vueuse/core";
5
- import P from "fuse.js";
6
- import { useRouter as z } from "vue-router";
7
- import G from "../HttpMethod/HttpMethod.vue.js";
8
- const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(() => /* @__PURE__ */ h("div", { class: "ref-search-meta" }, [
1
+ import { defineComponent as A, ref as i, watch as M, computed as y, openBlock as w, createBlock as B, unref as d, withCtx as r, createElementVNode as h, createVNode as R, createTextVNode as m, toDisplayString as p, createElementBlock as D, Fragment as N, renderList as T, createSlots as W, pushScopeId as L, popScopeId as U } from "vue";
2
+ import { useWorkspace as H } from "../../store/workspace.js";
3
+ import { ScalarModal as K, ScalarSearchInput as P, ScalarSearchResultList as j, ScalarSearchResultItem as z } from "@scalar/components";
4
+ import { useMagicKeys as G, whenever as g } from "@vueuse/core";
5
+ import J from "fuse.js";
6
+ import { useRouter as O } from "vue-router";
7
+ import Q from "../HttpMethod/HttpMethod.vue.js";
8
+ const X = (u) => (L("data-v-905c8bd2"), u = u(), U(), u), Y = /* @__PURE__ */ X(() => /* @__PURE__ */ h("div", { class: "ref-search-meta" }, [
9
9
  /* @__PURE__ */ h("span", null, "↑↓ Navigate"),
10
10
  /* @__PURE__ */ h("span", null, "⏎ Select")
11
- ], -1)), oe = /* @__PURE__ */ y({
11
+ ], -1)), re = /* @__PURE__ */ A({
12
12
  __name: "SearchModal",
13
13
  props: {
14
14
  modalState: {}
15
15
  },
16
16
  setup(u) {
17
- const c = u, M = z(), { activeWorkspaceRequests: B } = L(), v = O(), l = i([]), f = i([]), o = i(0), s = i(""), I = i(null), S = new P(l.value, {
17
+ const c = u, E = O(), { activeWorkspaceRequests: I } = H(), v = G(), l = i([]), f = i([]), o = i(0), s = i(""), V = i(null), S = new J(l.value, {
18
18
  keys: ["title", "description", "body"]
19
- }), $ = () => {
19
+ }), F = () => {
20
+ s.value = "", o.value = 0, f.value = [];
21
+ }, _ = (e) => {
22
+ l.value = e.map((a) => ({
23
+ id: a.uid,
24
+ title: a.summary ?? a.method,
25
+ description: a.description ?? "",
26
+ httpVerb: a.method,
27
+ path: a.path
28
+ })), S.setCollection(l.value);
29
+ }, $ = () => {
20
30
  o.value = 0, f.value = S.search(s.value);
21
31
  };
22
- _(
32
+ M(
23
33
  () => c.modalState.open,
24
34
  (e) => {
25
35
  var a;
@@ -27,35 +37,27 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
27
37
  l.value.length > 0 && (l.value = [], S.setCollection(l.value));
28
38
  return;
29
39
  }
30
- (a = I.value) == null || a.focus(), s.value = "", o.value = 0, f.value = [];
40
+ (a = V.value) == null || a.focus(), F(), _(I.value);
31
41
  }
32
- ), _(
33
- B,
42
+ ), M(
43
+ I,
34
44
  (e) => {
35
- Object.values(e).forEach((a) => {
36
- l.value.push({
37
- id: a.uid,
38
- title: a.summary ?? a.method,
39
- description: a.description ?? "",
40
- httpVerb: a.method,
41
- path: a.path
42
- });
43
- }), S.setCollection(l.value);
45
+ _(e);
44
46
  },
45
47
  { immediate: !0 }
46
48
  );
47
- function V(e) {
48
- M.push(e.item.id), c.modalState.hide();
49
+ function b(e) {
50
+ E.push(e.item.id), c.modalState.hide();
49
51
  }
50
- const k = C(
52
+ const k = y(
51
53
  () => n.value[o.value]
52
- ), n = C(
54
+ ), n = y(
53
55
  () => s.value.length === 0 ? l.value.map((e) => ({
54
56
  item: e
55
57
  })) : f.value
56
58
  );
57
59
  return g(v.enter, () => {
58
- c.modalState.open && window && V(k.value);
60
+ c.modalState.open && window && b(k.value);
59
61
  }), g(v.ArrowDown, () => {
60
62
  var e;
61
63
  c.modalState.open && window && (o.value < n.value.length - 1 ? o.value++ : o.value = 0, (e = document.getElementById(`search-modal-${k.value.item.id}`)) == null || e.scrollIntoView({
@@ -68,23 +70,23 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
68
70
  behavior: "smooth",
69
71
  block: "center"
70
72
  }));
71
- }), (e, a) => (w(), E(d(U), {
73
+ }), (e, a) => (w(), B(d(K), {
72
74
  state: e.modalState,
73
75
  variant: "search"
74
76
  }, {
75
77
  default: r(() => [
76
78
  h("div", {
77
79
  ref_key: "searchModalRef",
78
- ref: I,
80
+ ref: V,
79
81
  class: "ref-search-container"
80
82
  }, [
81
- R(d(j), {
83
+ R(d(P), {
82
84
  modelValue: s.value,
83
85
  "onUpdate:modelValue": a[0] || (a[0] = (t) => s.value = t),
84
86
  onInput: $
85
87
  }, null, 8, ["modelValue"])
86
88
  ], 512),
87
- R(d(H), {
89
+ R(d(j), {
88
90
  class: "ref-search-results custom-scroll",
89
91
  noResults: !n.value.length
90
92
  }, {
@@ -92,16 +94,16 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
92
94
  m(p(s.value), 1)
93
95
  ]),
94
96
  default: r(() => [
95
- (w(!0), F(N, null, A(n.value, (t, b) => (w(), E(d(K), {
97
+ (w(!0), D(N, null, T(n.value, (t, C) => (w(), B(d(z), {
96
98
  id: `#search-modal-${t.item.id}`,
97
99
  key: t.refIndex,
98
- active: o.value === b,
100
+ active: o.value === C,
99
101
  icon: "Terminal",
100
- onClick: (x) => V(t),
101
- onFocus: (x) => o.value = b
102
- }, D({
102
+ onClick: (x) => b(t),
103
+ onFocus: (x) => o.value = C
104
+ }, W({
103
105
  addon: r(() => [
104
- R(d(G), {
106
+ R(d(Q), {
105
107
  method: t.item.httpVerb ?? "get"
106
108
  }, null, 8, ["method"])
107
109
  ]),
@@ -127,12 +129,12 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
127
129
  ]),
128
130
  _: 1
129
131
  }, 8, ["noResults"]),
130
- Q
132
+ Y
131
133
  ]),
132
134
  _: 1
133
135
  }, 8, ["state"]));
134
136
  }
135
137
  });
136
138
  export {
137
- oe as default
139
+ re as default
138
140
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";AAiKA,wBAKG"}
1
+ {"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";AAmLA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SideNav.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-ccbc6a46"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ed782b2b"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,33 +1,36 @@
1
- import { defineComponent as _, openBlock as r, createElementBlock as i, createVNode as e, createElementVNode as t, Fragment as f, renderList as p, unref as s, withCtx as u, createTextVNode as d, toDisplayString as x } from "vue";
2
- import h from "../DarkModeToggle/DarkModeIconToggle.vue.js";
3
- import { ROUTES as v } from "../../constants.js";
4
- import { useRouter as N } from "vue-router";
5
- import g from "./SideHelp.vue.js";
1
+ import { defineComponent as _, openBlock as r, createElementBlock as a, createVNode as e, createElementVNode as t, Fragment as f, renderList as d, unref as n, withCtx as p, createTextVNode as u, toDisplayString as g } from "vue";
2
+ import x from "../DarkModeToggle/DarkModeIconToggle.vue.js";
3
+ import { ROUTES as h } from "../../constants.js";
4
+ import { useRouter as v } from "vue-router";
5
+ import N from "./SideHelp.vue.js";
6
6
  import y from "./SideNavLink.vue.js";
7
7
  import S from "./WorkspaceProfileIcon.vue.js";
8
8
  /* empty css */
9
9
  const $ = {
10
10
  "aria-label": "Side Navigation",
11
- class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav relative",
11
+ class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav relative drag-region",
12
12
  role: "navigation"
13
- }, k = { class: "mt-3.5 flex flex-col gap-1.5" }, E = { class: "mt-auto flex flex-col py-1.5" }, R = { class: "flex items-center" }, V = { class: "flex items-center" }, j = /* @__PURE__ */ _({
13
+ }, k = { class: "mt-3.5 flex flex-col gap-1.5" }, E = { class: "mt-auto flex flex-col py-1.5" }, R = { class: "flex items-center no-drag-region" }, V = { class: "flex items-center no-drag-region" }, j = /* @__PURE__ */ _({
14
14
  __name: "SideNav",
15
15
  setup(w) {
16
- const { currentRoute: c } = N();
17
- return (B, C) => (r(), i("nav", $, [
18
- e(S),
16
+ const { currentRoute: s } = v();
17
+ return (B, C) => (r(), a("nav", $, [
18
+ e(S, { class: "no-drag-region" }),
19
19
  t("ul", k, [
20
- (r(!0), i(f, null, p(s(v), ({ icon: n, name: o, prettyName: l }, m) => {
21
- var a;
22
- return r(), i("li", { key: m }, [
20
+ (r(!0), a(f, null, d(n(h), ({ icon: c, name: o, prettyName: l }, m) => {
21
+ var i;
22
+ return r(), a("li", {
23
+ key: m,
24
+ class: "no-drag-region"
25
+ }, [
23
26
  e(y, {
24
- active: (a = s(c).name) == null ? void 0 : a.startsWith(o),
25
- icon: n,
27
+ active: (i = n(s).name) == null ? void 0 : i.startsWith(o),
28
+ icon: c,
26
29
  name: o,
27
30
  prettyName: l
28
31
  }, {
29
- default: u(() => [
30
- d(x(o), 1)
32
+ default: p(() => [
33
+ u(g(o), 1)
31
34
  ]),
32
35
  _: 2
33
36
  }, 1032, ["active", "icon", "name", "prettyName"])
@@ -36,10 +39,10 @@ const $ = {
36
39
  ]),
37
40
  t("ul", E, [
38
41
  t("li", R, [
39
- e(g)
42
+ e(N)
40
43
  ]),
41
44
  t("li", V, [
42
- e(h)
45
+ e(x)
43
46
  ])
44
47
  ])
45
48
  ]));