@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.
- package/CHANGELOG.md +21 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +105 -99
- package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
- package/dist/components/ScalarHotkey.vue.js +4 -4
- package/dist/components/Sidebar/Sidebar.vue.d.ts +4 -8
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +32 -43
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +36 -32
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +16 -14
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +32 -28
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +16 -14
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts +3 -3
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.js +45 -15
- package/dist/libs/local-storage.js +1 -1
- package/dist/store/workspace.d.ts +188 -96
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +117 -113
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +62 -62
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +205 -199
- package/package.json +4 -4
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
import { isMacOS as
|
|
2
|
-
import { useEventBus as
|
|
3
|
-
const
|
|
1
|
+
import { isMacOS as f } from "@scalar/use-tooltip";
|
|
2
|
+
import { useEventBus as d } from "@vueuse/core";
|
|
3
|
+
const m = Symbol(), a = d(m), u = [
|
|
4
|
+
"Escape",
|
|
5
|
+
"ArrowDown",
|
|
6
|
+
"ArrowUp",
|
|
7
|
+
"Enter",
|
|
8
|
+
"F1",
|
|
9
|
+
"F2",
|
|
10
|
+
"F3",
|
|
11
|
+
"F4",
|
|
12
|
+
"F5",
|
|
13
|
+
"F6",
|
|
14
|
+
"F7",
|
|
15
|
+
"F8",
|
|
16
|
+
"F9",
|
|
17
|
+
"F10",
|
|
18
|
+
"F11",
|
|
19
|
+
"F12"
|
|
20
|
+
], l = {
|
|
4
21
|
Escape: { event: "closeModal" },
|
|
5
22
|
b: { event: "toggleSidebar", modifiers: ["default"] },
|
|
6
23
|
k: { event: "openCommandPalette", modifiers: ["default"] },
|
|
@@ -11,23 +28,36 @@ const l = Symbol(), i = f(l), m = {
|
|
|
11
28
|
w: { event: "closeTopNav", modifiers: ["default"] },
|
|
12
29
|
ArrowLeft: { event: "navigateTopNavLeft", modifiers: ["default", "Alt"] },
|
|
13
30
|
ArrowRight: { event: "navigateTopNavRight", modifiers: ["default", "Alt"] },
|
|
14
|
-
l: { event: "focusAddressBar", modifiers: ["default"] }
|
|
15
|
-
|
|
31
|
+
l: { event: "focusAddressBar", modifiers: ["default"] },
|
|
32
|
+
1: { event: "jumpToTab", modifiers: ["default"] },
|
|
33
|
+
2: { event: "jumpToTab", modifiers: ["default"] },
|
|
34
|
+
3: { event: "jumpToTab", modifiers: ["default"] },
|
|
35
|
+
4: { event: "jumpToTab", modifiers: ["default"] },
|
|
36
|
+
5: { event: "jumpToTab", modifiers: ["default"] },
|
|
37
|
+
6: { event: "jumpToTab", modifiers: ["default"] },
|
|
38
|
+
7: { event: "jumpToTab", modifiers: ["default"] },
|
|
39
|
+
8: { event: "jumpToTab", modifiers: ["default"] },
|
|
40
|
+
9: { event: "jumpToLastTab", modifiers: ["default"] }
|
|
41
|
+
}, r = (e) => {
|
|
42
|
+
if (!(e.target instanceof HTMLElement)) return !1;
|
|
43
|
+
const t = e.target;
|
|
44
|
+
return t.tagName === "INPUT" ? !u.includes(e.key) : !!(t.tagName === "TEXTAREA" || t.getAttribute("contenteditable"));
|
|
45
|
+
}, c = {
|
|
16
46
|
Alt: "altKey",
|
|
17
47
|
Control: "ctrlKey",
|
|
18
48
|
Shift: "shiftKey",
|
|
19
49
|
Meta: "metaKey"
|
|
20
|
-
},
|
|
21
|
-
(
|
|
22
|
-
),
|
|
23
|
-
hotKeys:
|
|
24
|
-
modifiers:
|
|
50
|
+
}, T = (e) => e.map(
|
|
51
|
+
(t) => t === "default" ? f() ? "metaKey" : "ctrlKey" : c[t]
|
|
52
|
+
), A = (e, {
|
|
53
|
+
hotKeys: t = l,
|
|
54
|
+
modifiers: n = ["default"]
|
|
25
55
|
} = {}) => {
|
|
26
|
-
const
|
|
27
|
-
|
|
56
|
+
const i = e.key === " " ? "Space" : e.key, o = t[i];
|
|
57
|
+
o && (i === "Escape" ? a.emit({ [o.event]: e }) : T(o.modifiers || n).every((s) => e[s] === !0) && !r(e) ? a.emit({ [o.event]: e }) : !r(e) && o.modifiers === void 0 && a.emit({ [o.event]: e }));
|
|
28
58
|
};
|
|
29
59
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
60
|
+
l as DEFAULT_HOTKEYS,
|
|
61
|
+
A as handleHotKeyDown,
|
|
62
|
+
a as hotKeyBus
|
|
33
63
|
};
|
|
@@ -11,7 +11,7 @@ const g = (a) => {
|
|
|
11
11
|
workspaceMutators: S
|
|
12
12
|
} = a;
|
|
13
13
|
try {
|
|
14
|
-
t.loadLocalStorage(), e.loadLocalStorage(), r.loadLocalStorage(), l.loadLocalStorage(), c.loadLocalStorage(), s.loadLocalStorage(), u.loadLocalStorage(), d.loadLocalStorage(), S.loadLocalStorage(), localStorage.setItem("version", "2.0.
|
|
14
|
+
t.loadLocalStorage(), e.loadLocalStorage(), r.loadLocalStorage(), l.loadLocalStorage(), c.loadLocalStorage(), s.loadLocalStorage(), u.loadLocalStorage(), d.loadLocalStorage(), S.loadLocalStorage(), localStorage.setItem("version", "2.0.51");
|
|
15
15
|
} catch (o) {
|
|
16
16
|
return console.error(o), o;
|
|
17
17
|
}
|