@scalar/api-client 2.0.49 → 2.0.51

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 (35) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  3. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  4. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +105 -99
  5. package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
  6. package/dist/components/ScalarHotkey.vue.js +4 -4
  7. package/dist/components/Sidebar/Sidebar.vue.d.ts +4 -8
  8. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  9. package/dist/components/Sidebar/Sidebar.vue.js +32 -43
  10. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  11. package/dist/components/TopNav/TopNav.vue.js +2 -2
  12. package/dist/components/TopNav/TopNav.vue2.js +36 -32
  13. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  14. package/dist/layouts/App/ApiClientApp.vue.js +1 -1
  15. package/dist/layouts/App/create-api-client-app.d.ts +16 -14
  16. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  17. package/dist/layouts/Modal/create-api-client-modal.d.ts +32 -28
  18. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  19. package/dist/libs/create-client.d.ts +16 -14
  20. package/dist/libs/create-client.d.ts.map +1 -1
  21. package/dist/libs/event-busses/hot-keys-bus.d.ts +3 -3
  22. package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
  23. package/dist/libs/event-busses/hot-keys-bus.js +45 -15
  24. package/dist/libs/local-storage.js +1 -1
  25. package/dist/store/workspace.d.ts +188 -96
  26. package/dist/store/workspace.d.ts.map +1 -1
  27. package/dist/store/workspace.js +117 -113
  28. package/dist/style.css +1 -1
  29. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  30. package/dist/views/Request/Request.vue.js +1 -1
  31. package/dist/views/Request/Request.vue2.js +62 -62
  32. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  33. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  34. package/dist/views/Request/RequestSidebarItem.vue2.js +205 -199
  35. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.0.51
4
+
5
+ ### Patch Changes
6
+
7
+ - f2b4b3f: fix: request sidebar draft native context menu
8
+ - c386d64: fix: enable sidebar resizer on request page
9
+ - 5c877b8: fix: command palette navigation
10
+ - 1c81549: feat: topnav navigation hotkeys
11
+ - Updated dependencies [48693d7]
12
+ - Updated dependencies [1c81549]
13
+ - @scalar/components@0.12.32
14
+ - @scalar/oas-utils@0.2.32
15
+
16
+ ## 2.0.50
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [c220358]
21
+ - Updated dependencies [7ec175b]
22
+ - @scalar/oas-utils@0.2.31
23
+
3
24
  ## 2.0.49
4
25
 
5
26
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AA4WA;;;;GAIG;;AACH,wBA0YI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CACxD"}
1
+ {"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AA6WA;;;;GAIG;;AACH,wBAuYI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CACxD"}
@@ -2,7 +2,7 @@ import o from "./TheCommandPalette.vue2.js";
2
2
  import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-67f4ba63"]]);
5
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3597a300"]]);
6
6
  export {
7
7
  s as PaletteComponents,
8
8
  r as default
@@ -1,31 +1,31 @@
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";
3
- import { useRouter as J } from "vue-router";
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 = {
1
+ import { defineComponent as F, ref as i, computed as B, onMounted as T, onBeforeUnmount as U, openBlock as a, createElementBlock as l, Fragment as u, withDirectives as h, createElementVNode as s, vShow as b, unref as f, createVNode as x, vModelText as q, renderList as E, toDisplayString as I, normalizeClass as K, createTextVNode as H, createCommentVNode as G, createBlock as Q, resolveDynamicComponent as j, nextTick as J } from "vue";
2
+ import { useModal as O, ScalarIcon as w } from "@scalar/components";
3
+ import { useRouter as X } from "vue-router";
4
+ import { useWorkspace as Y } from "../../store/workspace.js";
5
+ import Z from "./CommandPaletteCollection.vue.js";
6
+ import ee from "./CommandPaletteExample.vue.js";
7
+ import oe from "./CommandPaletteFolder.vue.js";
8
+ import te from "./CommandPaletteImport.vue.js";
9
+ import ne from "./CommandPaletteRequest.vue.js";
10
+ import ae from "./CommandPaletteWorkspace.vue.js";
11
+ import { commandPaletteBus as V } from "../../libs/event-busses/command-palette-bus.js";
12
+ import { hotKeyBus as W } from "../../libs/event-busses/hot-keys-bus.js";
13
+ const le = { class: "commandmenu" }, se = { class: "bg-b-2 flex items-center rounded mb-2 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, ce = { for: "commandmenu" }, me = ["onClick"], re = {
14
14
  key: 0,
15
15
  class: "text-c-3 text-center text-sm p-2 pt-3"
16
- }, me = {
16
+ }, ie = {
17
17
  name: "TheCommandPalette"
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 = [
18
+ }, ue = {
19
+ "Import Collection": te,
20
+ "Create Request": ne,
21
+ "Create Workspace": ae,
22
+ "Add Folder": oe,
23
+ "Create Collection": Z,
24
+ "Add Example": ee
25
+ }, $e = /* @__PURE__ */ F({
26
+ ...ie,
27
+ setup(de) {
28
+ const y = [
29
29
  {
30
30
  label: "Add to Request Sidebar",
31
31
  commands: [
@@ -75,132 +75,138 @@ const ne = { class: "commandmenu" }, ae = { class: "bg-b-2 flex items-center rou
75
75
  }
76
76
  ]
77
77
  }
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())
78
+ ], c = O(), { push: z } = X(), { activeWorkspace: M } = Y(), S = i(), m = i(""), r = i(null), d = i(-1), $ = i([]), C = B(
79
+ () => y.reduce((e, n) => {
80
+ const o = n.commands.filter(
81
+ (t) => t.name.toLowerCase().includes(m.value.toLowerCase())
82
82
  );
83
83
  return [...e, ...o];
84
84
  }, [])
85
- ), v = () => {
86
- r.hide(), i.value = "", u.value = null, a.value = -1;
85
+ ), p = () => {
86
+ c.hide(), m.value = "", r.value = null, d.value = -1;
87
87
  }, A = (e) => {
88
- "path" in e ? (V(`/workspace/${W.value.uid}${e.path}`), v()) : u.value = e.name;
89
- }, R = d(), g = ({
88
+ "path" in e ? (z(`/workspace/${M.value.uid}${e.path}`), p()) : r.value = e.name;
89
+ }, D = i(), P = ({
90
90
  commandName: e,
91
- metaData: t
91
+ metaData: n
92
92
  } = {}) => {
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({
93
+ r.value = e ?? null, S.value = n, c.show(), J(() => {
94
+ var o;
95
+ return (o = D.value) == null ? void 0 : o.focus();
96
+ });
97
+ }, R = (e, n) => {
98
+ var v;
99
+ if (!c.open) return;
100
+ n.preventDefault();
101
+ const o = e === "up" ? -1 : 1, t = C.value.length;
102
+ d.value = (d.value + o + t) % t, (v = $.value[d.value]) == null || v.scrollIntoView({
100
103
  behavior: "smooth",
101
104
  block: "center"
102
105
  });
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());
106
+ }, k = B(
107
+ () => C.value[d.value]
108
+ ), N = () => {
109
+ k.value && A(k.value);
110
+ }, g = (e) => {
111
+ c.open && (e.closeModal && p(), e.commandPaletteUp && R("up", e.commandPaletteUp), e.commandPaletteDown && R("down", e.commandPaletteDown), e.commandPaletteSelect && N());
109
112
  };
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", {
113
+ return T(() => {
114
+ V.on(P), W.on(g);
115
+ }), U(() => {
116
+ V.off(P), W.off(g);
117
+ }), (e, n) => (a(), l(u, null, [
118
+ h(s("div", {
116
119
  class: "commandmenu-clickout",
117
- onClick: t[0] || (t[0] = (o) => v())
120
+ onClick: n[0] || (n[0] = (o) => p())
118
121
  }, null, 512), [
119
- [x, p(r).open]
122
+ [b, f(c).open]
120
123
  ]),
121
- h(m("div", ne, [
122
- u.value ? (n(), s(f, { key: 1 }, [
123
- m("button", {
124
+ h(s("div", le, [
125
+ r.value ? (a(), l(u, { key: 1 }, [
126
+ s("button", {
124
127
  class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 m-1.5 z-10",
125
128
  type: "button",
126
- onClick: t[2] || (t[2] = (o) => u.value = null)
129
+ onClick: n[2] || (n[2] = (o) => r.value = null)
127
130
  }, [
128
- w(p(y), {
131
+ x(f(w), {
129
132
  icon: "ChevronLeft",
130
133
  size: "md",
131
134
  thickness: "1.5"
132
135
  })
133
136
  ]),
134
- (n(), G(Q(re[u.value]), {
137
+ (a(), Q(j(ue[r.value]), {
135
138
  metaData: S.value,
136
- onClose: v
139
+ onClose: p
137
140
  }, null, 40, ["metaData"]))
138
- ], 64)) : (n(), s(f, { key: 0 }, [
139
- m("div", ae, [
140
- m("label", le, [
141
- w(p(y), {
141
+ ], 64)) : (a(), l(u, { key: 0 }, [
142
+ s("div", se, [
143
+ s("label", ce, [
144
+ x(f(w), {
142
145
  class: "text-c-1 mr-2.5",
143
146
  icon: "Search",
144
147
  size: "sm",
145
148
  thickness: "1.5"
146
149
  })
147
150
  ]),
148
- h(m("input", {
151
+ h(s("input", {
149
152
  id: "commandmenu",
150
153
  ref_key: "commandInputRef",
151
- ref: R,
152
- "onUpdate:modelValue": t[1] || (t[1] = (o) => i.value = o),
154
+ ref: D,
155
+ "onUpdate:modelValue": n[1] || (n[1] = (o) => m.value = o),
153
156
  autocomplete: "off",
154
157
  autofocus: "",
155
158
  class: "w-full rounded bg-none border-none py-1.5 text-sm focus:outline-none",
156
159
  placeholder: "Search commands...",
157
160
  type: "text"
158
161
  }, null, 512), [
159
- [K, i.value]
162
+ [q, m.value]
160
163
  ])
161
164
  ]),
162
- (n(), s(f, null, P(C, (o, c) => (n(), s(f, {
165
+ (a(), l(u, null, E(y, (o) => (a(), l(u, {
163
166
  key: o.label
164
167
  }, [
165
- h(m("div", { class: "text-c-3 font-medium text-xs mt-2" }, B(o.label), 513), [
168
+ h(s("div", { class: "text-c-3 font-medium text-xs mt-2" }, I(o.label), 513), [
166
169
  [
167
- x,
170
+ b,
168
171
  o.commands.filter(
169
- (l) => l.name.toLowerCase().includes(i.value.toLowerCase())
172
+ (t) => t.name.toLowerCase().includes(m.value.toLowerCase())
170
173
  ).length > 0
171
174
  ]
172
175
  ]),
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,
177
- ref_for: !0,
178
- ref: (b) => {
179
- b && ($.value[_] = b);
180
- },
181
- class: T(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
182
- "bg-b-2": c > 0 ? a.value === _ + C[c - 1].commands.length : a.value === _
183
- }]),
184
- onClick: (b) => A(l)
185
- }, [
186
- w(p(y), {
187
- class: "text-c-1 mr-2.5",
188
- icon: l.icon,
189
- size: "md",
190
- thickness: "1.5"
191
- }, null, 8, ["icon"]),
192
- U(" " + B(l.name), 1)
193
- ], 10, se))), 128))
176
+ (a(!0), l(u, null, E(o.commands.filter(
177
+ (t) => t.name.toLowerCase().includes(m.value.toLowerCase())
178
+ ), (t, v) => {
179
+ var L;
180
+ return a(), l("div", {
181
+ key: t.name,
182
+ ref_for: !0,
183
+ ref: (_) => {
184
+ _ && ($.value[v] = _);
185
+ },
186
+ class: K(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
187
+ "bg-b-2": t.name === ((L = k.value) == null ? void 0 : L.name)
188
+ }]),
189
+ onClick: (_) => A(t)
190
+ }, [
191
+ x(f(w), {
192
+ class: "text-c-1 mr-2.5",
193
+ icon: t.icon,
194
+ size: "md",
195
+ thickness: "1.5"
196
+ }, null, 8, ["icon"]),
197
+ H(" " + I(t.name), 1)
198
+ ], 10, me);
199
+ }), 128))
194
200
  ], 64))), 64)),
195
- k.value.length ? H("", !0) : (n(), s("div", ce, " No commands found "))
201
+ C.value.length ? G("", !0) : (a(), l("div", re, " No commands found "))
196
202
  ], 64))
197
203
  ], 512), [
198
- [x, p(r).open]
204
+ [b, f(c).open]
199
205
  ])
200
206
  ], 64));
201
207
  }
202
208
  });
203
209
  export {
204
- re as PaletteComponents,
205
- ye as default
210
+ ue as PaletteComponents,
211
+ $e as default
206
212
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarHotkey.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarHotkey.vue"],"names":[],"mappings":";YAoDU,MAAM;;;;YAAN,MAAM;;;;AAiFhB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ScalarHotkey.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScalarHotkey.vue"],"names":[],"mappings":";YAoDU,MAAM;;;;YAAN,MAAM;;;;AAgFhB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -8,16 +8,16 @@ const P = /* @__PURE__ */ l({
8
8
  hotkey: {}
9
9
  },
10
10
  emits: ["hotkeyPressed"],
11
- setup(n, { emit: i }) {
12
- const o = n, a = i, p = t(() => r() ? "⌘" : "⌃"), s = t(() => h().get(o.hotkey)), c = t(() => `${p.value}${o.hotkey}`), m = f({
11
+ setup(n, { emit: a }) {
12
+ const o = n, i = a, p = t(() => r() ? "⌘" : "⌃"), s = t(() => h().get(o.hotkey)), c = t(() => `${p.value}${o.hotkey}`), m = f({
13
13
  passive: !1,
14
14
  onEventFired(e) {
15
15
  !r() && e.ctrlKey && e.key === s.value && (e.preventDefault(), e.stopPropagation());
16
16
  }
17
17
  });
18
18
  return v(m[`${r() ? "meta" : "control"}_${o.hotkey}`], () => {
19
- a("hotkeyPressed", s.value || "");
20
- }), (e, b) => (d(), y("div", k(e.$attrs, { class: "bg-b-2 border-b-3 inline-block overflow-hidden rounded border-1/2 bg-inherit text-xxs rounded-b px-1 font-medium uppercase" }), u(c.value), 17));
19
+ i("hotkeyPressed", s.value || "");
20
+ }), (e, b) => (d(), y("div", k(e.$attrs, { class: "bg-c-btn border-b-3 inline-block overflow-hidden rounded border-1/2 text-xxs rounded-b px-1 font-medium uppercase" }), u(c.value), 17));
21
21
  }
22
22
  });
23
23
  export {
@@ -5,19 +5,15 @@ declare function __VLS_template(): {
5
5
  };
6
6
  declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
7
7
  title?: string;
8
- showSideBar: boolean;
8
+ showSideBar?: boolean;
9
9
  }>, {
10
10
  showSideBar: boolean;
11
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
- "update:showSideBar": (v: boolean) => void;
13
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
11
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
14
12
  title?: string;
15
- showSideBar: boolean;
13
+ showSideBar?: boolean;
16
14
  }>, {
17
15
  showSideBar: boolean;
18
- }>>> & {
19
- "onUpdate:showSideBar"?: ((v: boolean) => any) | undefined;
20
- }, {
16
+ }>>>, {
21
17
  showSideBar: boolean;
22
18
  }, {}>;
23
19
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue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,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,67 +1,56 @@
1
- import { defineComponent as B, ref as r, watch as L, onMounted as W, withDirectives as D, openBlock as h, createElementBlock as v, normalizeClass as g, normalizeStyle as k, renderSlot as n, unref as b, createElementVNode as i, toDisplayString as I, createCommentVNode as _, vShow as $ } from "vue";
2
- import { useWorkspace as C } from "../../store/workspace.js";
3
- const z = {
1
+ import { defineComponent as S, ref as f, withDirectives as x, openBlock as p, createElementBlock as v, normalizeClass as h, normalizeStyle as D, unref as r, renderSlot as a, createElementVNode as l, toDisplayString as k, createCommentVNode as L, vShow as _ } from "vue";
2
+ import { useWorkspace as B } from "../../store/workspace.js";
3
+ const W = {
4
4
  key: 0,
5
5
  class: "xl:min-h-header py-2.5 flex items-center border-b-1/2 px-4 text-sm"
6
- }, M = { class: "font-medium m-0 text-sm whitespace-nowrap" }, N = /* @__PURE__ */ B({
6
+ }, C = { class: "font-medium m-0 text-sm whitespace-nowrap" }, I = /* @__PURE__ */ S({
7
7
  __name: "Sidebar",
8
8
  props: {
9
9
  title: {},
10
10
  showSideBar: { type: Boolean, default: !0 }
11
11
  },
12
- emits: ["update:showSideBar"],
13
- setup(S, { emit: w }) {
14
- const d = S, l = w, { isReadOnly: c } = C(), a = r(!1), m = r(null), s = r(localStorage.getItem("sidebarWidth") || "280px"), u = () => {
15
- (s.value === "0px" || localStorage.getItem("sidebarWidth") === "0px") && (s.value = "280px");
16
- }, y = (e) => {
12
+ setup(g) {
13
+ const b = g, { isReadOnly: i, sidebarWidth: s, setSidebarWidth: o } = B(), n = f(!1), d = f(null), w = (e) => {
17
14
  e.preventDefault();
18
- const o = e.clientX, x = parseInt(
19
- getComputedStyle(m.value).width || "280px",
15
+ const m = e.clientX, y = parseInt(
16
+ getComputedStyle(d.value).width || s.value,
20
17
  10
21
- ), p = (E) => {
22
- a.value = !0, document.body.classList.add("dragging");
23
- let t = x + E.clientX - o;
24
- t > 420 && (t = 420 + (t - 420) * 0.2), t < 240 ? (t = 0, l("update:showSideBar", !1)) : l("update:showSideBar", !0), s.value = `${t}px`, localStorage.setItem("sidebarWidth", `${Math.min(t, 420)}px`);
25
- }, f = () => {
26
- a.value = !1, document.body.classList.remove("dragging"), document.documentElement.removeEventListener("mousemove", p, !1), document.documentElement.removeEventListener("mouseup", f, !1), parseInt(s.value, 10) > 420 && (s.value = "360px");
18
+ ), c = (E) => {
19
+ n.value = !0, document.body.classList.add("dragging");
20
+ let t = y + E.clientX - m;
21
+ t > 420 && (t = 420 + (t - 420) * 0.2), t < 240 && (t = 240), o(`${t}px`);
22
+ }, u = () => {
23
+ n.value = !1, document.body.classList.remove("dragging"), document.documentElement.removeEventListener("mousemove", c, !1), document.documentElement.removeEventListener("mouseup", u, !1), parseInt(s.value, 10) > 420 ? o("360px") : parseInt(s.value, 10) < 240 && o("240px");
27
24
  };
28
- document.documentElement.addEventListener("mousemove", p, !1), document.documentElement.addEventListener("mouseup", f, !1);
25
+ document.documentElement.addEventListener("mousemove", c, !1), document.documentElement.addEventListener("mouseup", u, !1);
29
26
  };
30
- return L(
31
- () => d.showSideBar,
32
- (e) => {
33
- const o = document.querySelector(".sidebar");
34
- o && (e ? o.classList.remove("blur-content") : (o.classList.add("blur-content"), document.body.classList.remove("dragging"))), u();
35
- }
36
- ), W(() => {
37
- u();
38
- }), (e, o) => D((h(), v("aside", {
27
+ return (e, m) => x((p(), v("aside", {
39
28
  ref_key: "sidebarRef",
40
- ref: m,
41
- class: g(["sidebar overflow-hidden relative flex flex-col border-r-1/2 bg-b-1", { dragging: a.value }]),
42
- style: k({ width: s.value })
29
+ ref: d,
30
+ class: h(["sidebar overflow-hidden relative flex flex-col border-r-1/2 bg-b-1", { dragging: n.value }]),
31
+ style: D({ width: r(s) })
43
32
  }, [
44
- n(e.$slots, "header"),
45
- !b(c) && e.title ? (h(), v("div", z, [
46
- i("h2", M, I(e.title), 1)
47
- ])) : _("", !0),
48
- i("div", {
49
- class: g(["custom-scroll sidebar-height", {
50
- "sidebar-mask": !b(c)
33
+ a(e.$slots, "header"),
34
+ !r(i) && e.title ? (p(), v("div", W, [
35
+ l("h2", C, k(e.title), 1)
36
+ ])) : L("", !0),
37
+ l("div", {
38
+ class: h(["custom-scroll sidebar-height", {
39
+ "sidebar-mask": !r(i)
51
40
  }])
52
41
  }, [
53
- n(e.$slots, "content")
42
+ a(e.$slots, "content")
54
43
  ], 2),
55
- n(e.$slots, "button"),
56
- i("div", {
44
+ a(e.$slots, "button"),
45
+ l("div", {
57
46
  class: "resizer",
58
- onMousedown: y
47
+ onMousedown: w
59
48
  }, null, 32)
60
49
  ], 6)), [
61
- [$, d.showSideBar]
50
+ [_, b.showSideBar]
62
51
  ]);
63
52
  }
64
53
  });
65
54
  export {
66
- N as default
55
+ I as default
67
56
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";AAqZA,wBAKG"}
1
+ {"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":";AAmaA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./TopNav.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-19efa966"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-91b3e5a4"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,41 +1,41 @@
1
- import { defineComponent as x, reactive as S, ref as T, watch as C, computed as B, onMounted as R, onBeforeUnmount as w, openBlock as i, createElementBlock as p, createElementVNode as r, createVNode as _, unref as g, toDisplayString as A, Fragment as M, renderList as z, createBlock as E, pushScopeId as L, popScopeId as V } from "vue";
2
- import { ROUTES as j } from "../../constants.js";
3
- import { ScalarIcon as b } from "@scalar/components";
1
+ import { defineComponent as T, reactive as x, ref as S, watch as C, computed as j, onMounted as B, onBeforeUnmount as R, openBlock as u, createElementBlock as p, createElementVNode as s, createVNode as b, unref as _, toDisplayString as w, Fragment as A, renderList as L, createBlock as M, pushScopeId as z, popScopeId as E } from "vue";
2
+ import { ROUTES as V } from "../../constants.js";
3
+ import { ScalarIcon as g } from "@scalar/components";
4
4
  import { capitalize as q } from "@scalar/oas-utils/helpers";
5
5
  import K from "./TopNavItem.vue.js";
6
6
  import { useWorkspace as U } from "../../store/workspace.js";
7
7
  import { hotKeyBus as k } from "../../libs/event-busses/hot-keys-bus.js";
8
- const $ = (l) => (L("data-v-19efa966"), l = l(), V(), l), D = { class: "flex h-10 t-app__top-nav" }, F = /* @__PURE__ */ $(() => /* @__PURE__ */ r("div", { class: "t-app__top-nav-draggable" }, null, -1)), H = { class: "flex h-10 flex-1 items-center justify-center gap-1.5 text-sm font-medium relative" }, O = {
8
+ const $ = (i) => (z("data-v-91b3e5a4"), i = i(), E(), i), D = { class: "flex h-10 t-app__top-nav" }, F = /* @__PURE__ */ $(() => /* @__PURE__ */ s("div", { class: "t-app__top-nav-draggable" }, null, -1)), H = { class: "flex h-10 flex-1 items-center justify-center gap-1.5 text-sm font-medium relative" }, O = {
9
9
  key: 0,
10
10
  class: "flex items-center gap-1 w-full justify-center"
11
- }, Z = /* @__PURE__ */ x({
11
+ }, Z = /* @__PURE__ */ T({
12
12
  __name: "TopNav",
13
- setup(l) {
14
- const { activeRequest: N, router: o } = U(), t = S([{ label: "", path: "", icon: "Add" }]), a = T(0);
13
+ setup(i) {
14
+ const { activeRequest: N, router: n } = U(), t = x([{ label: "", path: "", icon: "Add" }]), a = S(0);
15
15
  function m() {
16
- var s;
17
- const e = j.find((c) => o.currentRoute.value.name == c.name);
16
+ var o;
17
+ const e = V.find((r) => n.currentRoute.value.name == r.name);
18
18
  e && ((e == null ? void 0 : e.name) === "request" ? t[a.value] = {
19
- label: ((s = N.value) == null ? void 0 : s.summary) || "",
20
- path: o.currentRoute.value.path,
19
+ label: ((o = N.value) == null ? void 0 : o.summary) || "",
20
+ path: n.currentRoute.value.path,
21
21
  icon: e.icon
22
22
  } : t[a.value] = {
23
23
  label: q(e == null ? void 0 : e.name) || "",
24
- path: o.currentRoute.value.path,
24
+ path: n.currentRoute.value.path,
25
25
  icon: e.icon
26
26
  });
27
27
  }
28
28
  function v() {
29
- o.push(t[a.value].path);
29
+ n.push(t[a.value].path);
30
30
  }
31
31
  function d() {
32
32
  t.push({ label: "", path: "", icon: "Add" }), a.value = t.length - 1, m();
33
33
  }
34
- function u(e) {
34
+ function l(e) {
35
35
  a.value = e, v();
36
36
  }
37
37
  C(
38
- () => o.currentRoute.value.path,
38
+ () => n.currentRoute.value.path,
39
39
  () => {
40
40
  m();
41
41
  },
@@ -47,34 +47,38 @@ const $ = (l) => (L("data-v-19efa966"), l = l(), V(), l), D = { class: "flex h-1
47
47
  t.length - 1
48
48
  ), v();
49
49
  }
50
- const I = B(() => a.value), h = (e) => {
51
- e.addTopNav && d(), e.closeTopNav && f(a.value), e.navigateTopNavLeft && u(Math.max(a.value - 1, 0)), e.navigateTopNavRight && u(Math.min(a.value + 1, t.length - 1));
50
+ const I = j(() => a.value), h = (e) => {
51
+ if (e.addTopNav && d(), e.closeTopNav && f(a.value), e.navigateTopNavLeft && l(Math.max(a.value - 1, 0)), e.navigateTopNavRight && l(Math.min(a.value + 1, t.length - 1)), e.jumpToTab) {
52
+ const o = Number(e.jumpToTab.key) - 1;
53
+ o >= 0 && o < t.length && l(o);
54
+ }
55
+ e.jumpToLastTab && l(t.length - 1);
52
56
  };
53
- return R(() => k.on(h)), w(() => k.off(h)), (e, s) => (i(), p("nav", D, [
57
+ return B(() => k.on(h)), R(() => k.off(h)), (e, o) => (u(), p("nav", D, [
54
58
  F,
55
- r("div", H, [
56
- t.length === 1 ? (i(), p("div", O, [
57
- _(g(b), {
59
+ s("div", H, [
60
+ t.length === 1 ? (u(), p("div", O, [
61
+ b(_(g), {
58
62
  icon: t[0].icon,
59
63
  size: "xs",
60
64
  thickness: "2.5"
61
65
  }, null, 8, ["icon"]),
62
- r("div", null, A(t[0].label), 1)
63
- ])) : (i(!0), p(M, { key: 1 }, z(t, (c, n) => (i(), E(K, {
64
- key: n,
65
- active: n === I.value,
66
- hotkey: (n + 1).toString(),
67
- icon: c.icon,
68
- label: c.label,
69
- onClick: (y) => u(n),
70
- onClose: (y) => f(n)
66
+ s("div", null, w(t[0].label), 1)
67
+ ])) : (u(!0), p(A, { key: 1 }, L(t, (r, c) => (u(), M(K, {
68
+ key: c,
69
+ active: c === I.value,
70
+ hotkey: (c + 1).toString(),
71
+ icon: r.icon,
72
+ label: r.label,
73
+ onClick: (y) => l(c),
74
+ onClose: (y) => f(c)
71
75
  }, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose"]))), 128)),
72
- r("button", {
76
+ s("button", {
73
77
  class: "text-c-3 hover:bg-b-3 p-1.5 rounded-lg webkit-app-no-drag",
74
78
  type: "button",
75
79
  onClick: d
76
80
  }, [
77
- _(g(b), {
81
+ b(_(g), {
78
82
  icon: "Add",
79
83
  size: "xs",
80
84
  thickness: "2.5"
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";AAiVA,wBAKG"}
1
+ {"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";AAkVA,wBAKG"}
@@ -13,7 +13,7 @@ import { useDarkModeState as b } from "../../hooks/useDarkModeState.js";
13
13
  import { handleHotKeyDown as H } from "../../libs/event-busses/hot-keys-bus.js";
14
14
  const V = ["innerHTML"], F = {
15
15
  key: 0,
16
- class: "flex min-h-0 flex-1"
16
+ class: "flex min-h-0 flex-1 z-0"
17
17
  }, O = { class: "flex flex-1 flex-col min-w-0" }, ee = /* @__PURE__ */ _({
18
18
  __name: "ApiClientApp",
19
19
  setup(P) {